Commit 930577b6 by fengquan

feat: 咨询师详情页改版联调

parent f6096946
...@@ -2,8 +2,10 @@ package com.ydl.component.service.web; ...@@ -2,8 +2,10 @@ package com.ydl.component.service.web;
import android.app.Activity; import android.app.Activity;
import android.graphics.Rect;
import com.alibaba.android.arouter.launcher.ARouter; import com.alibaba.android.arouter.launcher.ARouter;
import com.blankj.utilcode.util.ScreenUtils;
import com.ydl.confide.api.IConfideService; import com.ydl.confide.api.IConfideService;
import com.ydl.confide.home.event.ChangeAnotherExpertEvent; import com.ydl.confide.home.event.ChangeAnotherExpertEvent;
import com.ydl.webview.H5JsBean; import com.ydl.webview.H5JsBean;
...@@ -13,6 +15,8 @@ import com.ydl.ydl_router.manager.YDLRouterManager; ...@@ -13,6 +15,8 @@ import com.ydl.ydl_router.manager.YDLRouterManager;
import com.ydl.ydl_router.manager.YDLRouterParams; import com.ydl.ydl_router.manager.YDLRouterParams;
import com.ydl.ydlcommon.modular.ModularServiceManager; import com.ydl.ydlcommon.modular.ModularServiceManager;
import com.yidianling.common.tools.LogUtil; import com.yidianling.common.tools.LogUtil;
import com.yidianling.consultant.preview.GPreviewBuilder;
import com.yidianling.consultant.preview.UserViewInfo;
import com.yidianling.im.api.service.IImService; import com.yidianling.im.api.service.IImService;
import com.yidianling.muse.activity.ChooseMusicActivity; import com.yidianling.muse.activity.ChooseMusicActivity;
...@@ -21,6 +25,9 @@ import com.yidianling.muse.activity.ChooseMusicActivity; ...@@ -21,6 +25,9 @@ import com.yidianling.muse.activity.ChooseMusicActivity;
import de.greenrobot.event.EventBus; import de.greenrobot.event.EventBus;
import com.yidianling.im.event.CloseBottomWebviewEvent; import com.yidianling.im.event.CloseBottomWebviewEvent;
import java.util.ArrayList;
import java.util.List;
import de.greenrobot.event.EventBus; import de.greenrobot.event.EventBus;
/** /**
...@@ -495,6 +502,34 @@ public class WVClickAbstractListener implements WebViewClientClickListener { ...@@ -495,6 +502,34 @@ public class WVClickAbstractListener implements WebViewClientClickListener {
} }
@Override @Override
public void resourceToPreview(H5JsBean.H5JsCmd.Params params) {
List<H5JsBean.MediaInfo> dataList = params.getDataList();
H5JsBean.DoctorInfo info = params.getInfo();
List<UserViewInfo> mThumbViewInfoList = new ArrayList<>();
for (H5JsBean.MediaInfo mediaInfo : dataList) {
UserViewInfo userViewInfo = new UserViewInfo(mediaInfo.getCover(), mediaInfo.getUrl(), mediaInfo.getSourcesType());
Rect bounds = new Rect();
bounds.left = ScreenUtils.getScreenWidth() / 2;
bounds.top = ScreenUtils.getScreenHeight() / 2;
bounds.right = ScreenUtils.getScreenWidth() / 2;
bounds.bottom = ScreenUtils.getScreenHeight() / 2;
userViewInfo.setBounds(bounds);
mThumbViewInfoList.add(userViewInfo);
}
GPreviewBuilder.form(mContext)
.setData(mThumbViewInfoList)
.setCurrentIndex(params.getPreview_index())
.setFullscreen(true)
.setToUid(info.getToUid() +"")
.setDoctorId(info.getDoctorId())
.setType(GPreviewBuilder.IndicatorType.Dot)
.start();
}
@Override
public void switchSound(int mediaId, long meditationId, int meditationType, int businessType, public void switchSound(int mediaId, long meditationId, int meditationType, int businessType,
String buried, String mediaUrl, String mediaCoverUrl, String buried, String mediaUrl, String mediaCoverUrl,
String title, String desc, int status) { String title, String desc, int status) {
......
...@@ -464,6 +464,11 @@ class WebJavascriptHandler : IJavascriptHandler{ ...@@ -464,6 +464,11 @@ class WebJavascriptHandler : IJavascriptHandler{
wvEnventPro?.switchPushStatus(jsData.cmd?.params) wvEnventPro?.switchPushStatus(jsData.cmd?.params)
} }
"resources_to_preview" -> {
wvEnventPro?.resourceToPreview(jsData.cmd?.params)
}
} }
} }
} }
...@@ -203,4 +203,6 @@ public interface WebViewClientClickListener { ...@@ -203,4 +203,6 @@ public interface WebViewClientClickListener {
//h5页面是否需要打开推送 //h5页面是否需要打开推送
void switchPushStatus(H5JsBean.H5JsCmd.Params params); void switchPushStatus(H5JsBean.H5JsCmd.Params params);
void resourceToPreview(H5JsBean.H5JsCmd.Params params);
} }
...@@ -87,14 +87,23 @@ class BasePhotoFragment : Fragment() { ...@@ -87,14 +87,23 @@ class BasePhotoFragment : Fragment() {
videoView!!.seekTo(0) videoView!!.seekTo(0)
seekBar!!.progress = 0 seekBar!!.progress = 0
videoView!!.pause() videoView!!.pause()
if (ivPlay != null && !TextUtils.isEmpty(beanViewInfo!!.videoUrl)) { if (ivPlay != null && beanViewInfo?.sourcesType == 2) {
ivPlay!!.visibility = VISIBLE ivPlay?.visibility = VISIBLE
if (ivImg != null) {
ivImg?.visibility = VISIBLE
}
} else if (ivPlay != null && beanViewInfo?.sourcesType == 1) {
ivPlay?.visibility = GONE
if (ivImg != null) { if (ivImg != null) {
ivImg!!.visibility = VISIBLE ivImg!!.visibility = GONE
} }
} }
stopTiming() stopTiming()
} }
if (!isVisiable) {
videoView?.visibility = INVISIBLE
}
} }
override fun onDestroy() { override fun onDestroy() {
...@@ -173,7 +182,7 @@ class BasePhotoFragment : Fragment() { ...@@ -173,7 +182,7 @@ class BasePhotoFragment : Fragment() {
rootView!!.tag = beanViewInfo?.getUrl() rootView!!.tag = beanViewInfo?.getUrl()
//是否展示动画 //是否展示动画
isTransPhoto = bundle.getBoolean(KEY_TRANS_PHOTO, false) isTransPhoto = bundle.getBoolean(KEY_TRANS_PHOTO, false)
if (!TextUtils.isEmpty(beanViewInfo!!.getUrl())) { if (beanViewInfo?.sourcesType == 1) {
ivPlay!!.visibility = GONE ivPlay!!.visibility = GONE
if (beanViewInfo!!.getUrl().toLowerCase().contains(".gif")) { if (beanViewInfo!!.getUrl().toLowerCase().contains(".gif")) {
imageView!!.visibility = VISIBLE imageView!!.visibility = VISIBLE
...@@ -191,15 +200,15 @@ class BasePhotoFragment : Fragment() { ...@@ -191,15 +200,15 @@ class BasePhotoFragment : Fragment() {
mySimpleTarget!! mySimpleTarget!!
) )
} }
} else { } else if (beanViewInfo?.sourcesType == 2) {
ivPlay!!.visibility = VISIBLE ivPlay!!.visibility = VISIBLE
videoContainer!!.visibility = VISIBLE videoContainer!!.visibility = VISIBLE
imageView!!.visibility = GONE imageView!!.visibility = GONE
ZoomMediaLoader.getInstance().loader.displayImage( ZoomMediaLoader.getInstance().loader.displayImage(
this, "https://hellorfimg.zcool.cn/preview260/123343987.jpg", ivImg, this, beanViewInfo!!.cover, ivImg,
mySimpleTarget!! mySimpleTarget!!
) )
val videoUlr = beanViewInfo!!.getVideoUrl() val videoUlr = beanViewInfo!!.url
if (!TextUtils.isEmpty(videoUlr)) { if (!TextUtils.isEmpty(videoUlr)) {
rootView!!.setBackgroundColor(Color.BLACK) rootView!!.setBackgroundColor(Color.BLACK)
seekBar!!.visibility = VISIBLE seekBar!!.visibility = VISIBLE
...@@ -235,6 +244,7 @@ class BasePhotoFragment : Fragment() { ...@@ -235,6 +244,7 @@ class BasePhotoFragment : Fragment() {
ivImg!!.visibility = GONE ivImg!!.visibility = GONE
ivPlay!!.visibility = GONE ivPlay!!.visibility = GONE
startTiming() startTiming()
videoView?.visibility = VISIBLE
videoView!!.start() videoView!!.start()
isCompletion = false isCompletion = false
} }
...@@ -296,7 +306,7 @@ class BasePhotoFragment : Fragment() { ...@@ -296,7 +306,7 @@ class BasePhotoFragment : Fragment() {
} }
imageView!!.setAlphaChangeListener { alpha -> imageView!!.setAlphaChangeListener { alpha ->
if (alpha == 255) { if (alpha == 255) {
val video = beanViewInfo!!.videoUrl val video = beanViewInfo!!.url
if (video != null && !video.isEmpty()) { if (video != null && !video.isEmpty()) {
btnVideo!!.visibility = VISIBLE btnVideo!!.visibility = VISIBLE
} else { } else {
......
...@@ -3,21 +3,25 @@ package com.yidianling.consultant.preview ...@@ -3,21 +3,25 @@ package com.yidianling.consultant.preview
import android.animation.ObjectAnimator import android.animation.ObjectAnimator
import android.annotation.SuppressLint import android.annotation.SuppressLint
import android.graphics.Color import android.graphics.Color
import android.os.Build
import android.os.Bundle import android.os.Bundle
import android.text.TextUtils
import android.view.View import android.view.View
import android.view.WindowManager
import android.widget.TextView import android.widget.TextView
import androidx.appcompat.app.AppCompatActivity import androidx.appcompat.app.AppCompatActivity
import androidx.fragment.app.Fragment import androidx.fragment.app.Fragment
import androidx.fragment.app.FragmentManager import androidx.fragment.app.FragmentManager
import androidx.fragment.app.FragmentStatePagerAdapter import androidx.fragment.app.FragmentStatePagerAdapter
import androidx.viewpager.widget.ViewPager import androidx.viewpager.widget.ViewPager
import com.alibaba.android.arouter.launcher.ARouter
import com.ydl.ydlcommon.data.http.BaseAPIResponse
import com.ydl.ydlcommon.utils.StatusBarUtils import com.ydl.ydlcommon.utils.StatusBarUtils
import com.yidianling.consultant.R import com.yidianling.consultant.R
import com.yidianling.consultant.preview.GPreviewBuilder.IndicatorType import com.yidianling.consultant.preview.GPreviewBuilder.IndicatorType
import com.yidianling.consultant.preview.SmoothImageView.onTransformListener import com.yidianling.consultant.preview.SmoothImageView.onTransformListener
import com.yidianling.im.api.service.IImService
import io.reactivex.android.schedulers.AndroidSchedulers
import io.reactivex.functions.Consumer
import io.reactivex.schedulers.Schedulers
import kotlinx.android.synthetic.main.consultant_image_preview_photo.*
import java.util.* import java.util.*
/** /**
...@@ -37,6 +41,10 @@ class GPreviewActivity : AppCompatActivity() { ...@@ -37,6 +41,10 @@ class GPreviewActivity : AppCompatActivity() {
/***默认显示 */ /***默认显示 */
private var isShow = true private var isShow = true
private var toUid: String? = null
private var doctorId: String? = null
/*** /***
* 得到PhotoViewPager * 得到PhotoViewPager
* @return PhotoViewPager * @return PhotoViewPager
...@@ -80,6 +88,19 @@ class GPreviewActivity : AppCompatActivity() { ...@@ -80,6 +88,19 @@ class GPreviewActivity : AppCompatActivity() {
selectPosition = findViewById(R.id.select_position) selectPosition = findViewById(R.id.select_position)
total = findViewById(R.id.total) total = findViewById(R.id.total)
titleBar = findViewById(R.id.titleBar) titleBar = findViewById(R.id.titleBar)
chatBtn.setOnClickListener {
if (!toUid.isNullOrBlank()) {
ARouter.getInstance().navigation(IImService::class.java)
?.startChatBySessionId(context = this, toUid = toUid!!)
}
}
bookingBtn.setOnClickListener {
}
backIv?.setOnClickListener(View.OnClickListener { backIv?.setOnClickListener(View.OnClickListener {
transformOutAnim() transformOutAnim()
transformOut() transformOut()
...@@ -109,6 +130,9 @@ class GPreviewActivity : AppCompatActivity() { ...@@ -109,6 +130,9 @@ class GPreviewActivity : AppCompatActivity() {
currentIndex = intent.getIntExtra("position", -1) currentIndex = intent.getIntExtra("position", -1)
type = intent.getSerializableExtra("type") as IndicatorType type = intent.getSerializableExtra("type") as IndicatorType
isShow = intent.getBooleanExtra("isShow", true) isShow = intent.getBooleanExtra("isShow", true)
toUid = intent.getStringExtra("toUid")
doctorId = intent.getStringExtra("doctorId")
val isScale = intent.getBooleanExtra("isScale", false) val isScale = intent.getBooleanExtra("isScale", false)
SmoothImageView.setIsScale(isScale) SmoothImageView.setIsScale(isScale)
initFragment(imgUrls, currentIndex, BasePhotoFragment::class.java) initFragment(imgUrls, currentIndex, BasePhotoFragment::class.java)
...@@ -173,15 +197,15 @@ class GPreviewActivity : AppCompatActivity() { ...@@ -173,15 +197,15 @@ class GPreviewActivity : AppCompatActivity() {
isTransformOut = true isTransformOut = true
val currentItem = viewPager!!.currentItem val currentItem = viewPager!!.currentItem
if (currentItem < imgUrls!!.size) { if (currentItem < imgUrls!!.size) {
if (TextUtils.isEmpty(imgUrls!![currentItem].videoUrl)) { if (imgUrls!![currentItem].sourcesType == 1) {
val fragment = fragments!![currentItem] val fragment = fragments!![currentItem]
fragment.changeBg(Color.TRANSPARENT) fragment.changeBg(Color.TRANSPARENT)
fragment.transformOut(onTransformListener { fragment.transformOut(onTransformListener {
getViewPager()?.setEnabled(true) getViewPager()?.setEnabled(true)
exit() exit()
}) })
} else { } else if (imgUrls!![currentItem].sourcesType == 2) {
exit() exitNormal()
} }
} else { } else {
exit() exit()
...@@ -196,6 +220,10 @@ class GPreviewActivity : AppCompatActivity() { ...@@ -196,6 +220,10 @@ class GPreviewActivity : AppCompatActivity() {
overridePendingTransition(0, 0) overridePendingTransition(0, 0)
} }
private fun exitNormal() {
finish()
}
override fun onBackPressed() { override fun onBackPressed() {
isTransformOut = false isTransformOut = false
transformOutAnim() transformOutAnim()
......
...@@ -81,6 +81,16 @@ public class GPreviewBuilder { ...@@ -81,6 +81,16 @@ public class GPreviewBuilder {
return this; return this;
} }
public GPreviewBuilder setToUid(String toUid){
intent.putExtra("toUid", toUid);
return this;
}
public GPreviewBuilder setDoctorId(String doctorId){
intent.putExtra("doctorId", doctorId);
return this;
}
/*** /***
* 指示器类型 * 指示器类型
* ***/ * ***/
......
...@@ -70,7 +70,7 @@ public class GridPreviewActivity extends BaseActivity { ...@@ -70,7 +70,7 @@ public class GridPreviewActivity extends BaseActivity {
mThumbViewInfoList.add(new UserViewInfo(urls.get(i))); mThumbViewInfoList.add(new UserViewInfo(urls.get(i)));
} }
mThumbViewInfoList.add(4, new UserViewInfo("https://pic.ydlcdn.com/GGyHyDwKJ8.MP4", null)); // mThumbViewInfoList.add(4, new UserViewInfo("https://pic.ydlcdn.com/GGyHyDwKJ8.MP4", null));
adapter = new MyListAdapter(); adapter = new MyListAdapter();
gridView.setAdapter(adapter); gridView.setAdapter(adapter);
gridView.setOnItemClickListener(new AdapterView.OnItemClickListener() { gridView.setOnItemClickListener(new AdapterView.OnItemClickListener() {
......
...@@ -28,7 +28,9 @@ public interface IThumbViewInfo extends Parcelable { ...@@ -28,7 +28,9 @@ public interface IThumbViewInfo extends Parcelable {
/** /**
* 获取视频链接 * 获取视频链接
***/ ***/
String getVideoUrl(); String getCover();
int getSourcesType();
} }
...@@ -17,31 +17,31 @@ public final class ImageUrlConfig { ...@@ -17,31 +17,31 @@ public final class ImageUrlConfig {
public static List<UserViewInfo> getVideos() { public static List<UserViewInfo> getVideos() {
videos.clear(); videos.clear();
videos.add(new UserViewInfo("http://lmp4.vjshi.com/2017-09-13/f55a900d89679ac1c9837d5b5aaf632a.mp4", // videos.add(new UserViewInfo("http://lmp4.vjshi.com/2017-09-13/f55a900d89679ac1c9837d5b5aaf632a.mp4",
"http://pic.vjshi.com/2017-09-13/f55a900d89679ac1c9837d5b5aaf632a/online/puzzle.jpg?x-oss-process=style/resize_w_285_crop_h_428")); // "http://pic.vjshi.com/2017-09-13/f55a900d89679ac1c9837d5b5aaf632a/online/puzzle.jpg?x-oss-process=style/resize_w_285_crop_h_428"));
videos.add(new UserViewInfo("http://lmp4.vjshi.com/2017-09-13/f55a900d89679ac1c9837d5b5aaf632a.mp4", // videos.add(new UserViewInfo("http://lmp4.vjshi.com/2017-09-13/f55a900d89679ac1c9837d5b5aaf632a.mp4",
"http://pic.vjshi.com/2017-05-25/b146e104069c2bd0590bb919269193c4/online/puzzle.jpg?x-oss-process=style/resize_w_285_crop_h_428")); // "http://pic.vjshi.com/2017-05-25/b146e104069c2bd0590bb919269193c4/online/puzzle.jpg?x-oss-process=style/resize_w_285_crop_h_428"));
videos.add(new UserViewInfo("http://ac-QYgvX1CC.clouddn.com/36f0523ee1888a57.jpg")); // videos.add(new UserViewInfo("http://ac-QYgvX1CC.clouddn.com/36f0523ee1888a57.jpg"));
videos.add(new UserViewInfo("http://lmp4.vjshi.com/2017-05-07/d0bbfc4ac4dd173cc93873ed4eb0be53.mp4", // videos.add(new UserViewInfo("http://lmp4.vjshi.com/2017-05-07/d0bbfc4ac4dd173cc93873ed4eb0be53.mp4",
"http://pic.vjshi.com/2017-05-07/d0bbfc4ac4dd173cc93873ed4eb0be53/online/puzzle.jpg?x-oss-process=style/resize_w_285_crop_h_428")); // "http://pic.vjshi.com/2017-05-07/d0bbfc4ac4dd173cc93873ed4eb0be53/online/puzzle.jpg?x-oss-process=style/resize_w_285_crop_h_428"));
//
videos.add(new UserViewInfo("http://lmp4.vjshi.com/2017-07-18/80d08ce1a84adfbaed5c7067b73d19ed.mp4", // videos.add(new UserViewInfo("http://lmp4.vjshi.com/2017-07-18/80d08ce1a84adfbaed5c7067b73d19ed.mp4",
"http://pic.vjshi.com/2017-07-18/80d08ce1a84adfbaed5c7067b73d19ed/online/puzzle.jpg?x-oss-process=style/resize_w_285_crop_h_428")); // "http://pic.vjshi.com/2017-07-18/80d08ce1a84adfbaed5c7067b73d19ed/online/puzzle.jpg?x-oss-process=style/resize_w_285_crop_h_428"));
videos.add(new UserViewInfo("http://img0.imgtn.bdimg.com/it/u=556618733,1205300389&fm=21&gp=0.jpg")); // videos.add(new UserViewInfo("http://img0.imgtn.bdimg.com/it/u=556618733,1205300389&fm=21&gp=0.jpg"));
videos.add(new UserViewInfo("http://lmp4.vjshi.com/2017-09-13/f55a900d89679ac1c9837d5b5aaf632a.mp4", // videos.add(new UserViewInfo("http://lmp4.vjshi.com/2017-09-13/f55a900d89679ac1c9837d5b5aaf632a.mp4",
"http://pic.vjshi.com/2017-09-13/f55a900d89679ac1c9837d5b5aaf632a/online/puzzle.jpg?x-oss-process=style/resize_w_285_crop_h_428")); // "http://pic.vjshi.com/2017-09-13/f55a900d89679ac1c9837d5b5aaf632a/online/puzzle.jpg?x-oss-process=style/resize_w_285_crop_h_428"));
videos.add(new UserViewInfo("http://img0.imgtn.bdimg.com/it/u=556618733,1205300389&fm=21&gp=0.jpg")); // videos.add(new UserViewInfo("http://img0.imgtn.bdimg.com/it/u=556618733,1205300389&fm=21&gp=0.jpg"));
videos.add(new UserViewInfo("http://lmp4.vjshi.com/2018-06-07/cf673556cce54ab9cf4633fd7d9d0d46.mp4", // videos.add(new UserViewInfo("http://lmp4.vjshi.com/2018-06-07/cf673556cce54ab9cf4633fd7d9d0d46.mp4",
"http://pic.vjshi.com/2018-06-06/caa296729c8e6e41e6aff2aadf4feff3/online/puzzle.jpg?x-oss-process=style/resize_w_285_crop_h_428")); // "http://pic.vjshi.com/2018-06-06/caa296729c8e6e41e6aff2aadf4feff3/online/puzzle.jpg?x-oss-process=style/resize_w_285_crop_h_428"));
videos.add(new UserViewInfo("http://img44.photophoto.cn/20170730/0018090594006661_s.jpg")); // videos.add(new UserViewInfo("http://img44.photophoto.cn/20170730/0018090594006661_s.jpg"));
videos.add(new UserViewInfo("http://lmp4.vjshi.com/2017-09-13/f55a900d89679ac1c9837d5b5aaf632a.mp4", // videos.add(new UserViewInfo("http://lmp4.vjshi.com/2017-09-13/f55a900d89679ac1c9837d5b5aaf632a.mp4",
"http://pic.vjshi.com/2017-09-13/f55a900d89679ac1c9837d5b5aaf632a/online/puzzle.jpg?x-oss-process=style/resize_w_285_crop_h_428")); // "http://pic.vjshi.com/2017-09-13/f55a900d89679ac1c9837d5b5aaf632a/online/puzzle.jpg?x-oss-process=style/resize_w_285_crop_h_428"));
videos.add(new UserViewInfo("http://ac-QYgvX1CC.clouddn.com/36f0523ee1888a57.jpg")); // videos.add(new UserViewInfo("http://ac-QYgvX1CC.clouddn.com/36f0523ee1888a57.jpg"));
videos.add(new UserViewInfo("http://lmp4.vjshi.com/2018-01-27/5169bb7bdd7386ce7bd4ce1739229424.mp4", // videos.add(new UserViewInfo("http://lmp4.vjshi.com/2018-01-27/5169bb7bdd7386ce7bd4ce1739229424.mp4",
"http://pic.vjshi.com/2018-01-27/5169bb7bdd7386ce7bd4ce1739229424/online/puzzle.jpg?x-oss-process=style/resize_w_285_crop_h_428")); // "http://pic.vjshi.com/2018-01-27/5169bb7bdd7386ce7bd4ce1739229424/online/puzzle.jpg?x-oss-process=style/resize_w_285_crop_h_428"));
videos.add(new UserViewInfo("http://photocdn.sohu.com/20160307/mp62252655_1457334772519_2.png")); // videos.add(new UserViewInfo("http://photocdn.sohu.com/20160307/mp62252655_1457334772519_2.png"));
videos.add(new UserViewInfo("http://lmp4.vjshi.com/2017-09-27/9a6e69f7c257ff7b7832e8bac6fddf82.mp4", // videos.add(new UserViewInfo("http://lmp4.vjshi.com/2017-09-27/9a6e69f7c257ff7b7832e8bac6fddf82.mp4",
"http://pic.vjshi.com/2017-09-27/9a6e69f7c257ff7b7832e8bac6fddf82/online/puzzle.jpg?x-oss-process=style/resize_w_285_crop_h_428")); // "http://pic.vjshi.com/2017-09-27/9a6e69f7c257ff7b7832e8bac6fddf82/online/puzzle.jpg?x-oss-process=style/resize_w_285_crop_h_428"));
videos.add(new UserViewInfo("http://photocdn.sohu.com/20160307/mp62252655_1457334772519_2.png")); videos.add(new UserViewInfo("http://photocdn.sohu.com/20160307/mp62252655_1457334772519_2.png"));
......
...@@ -14,25 +14,19 @@ public class UserViewInfo implements IThumbViewInfo { ...@@ -14,25 +14,19 @@ public class UserViewInfo implements IThumbViewInfo {
private String url; //图片地址 private String url; //图片地址
private Rect mBounds; // 记录坐标 private Rect mBounds; // 记录坐标
private String user = "用户字段"; private int sourcesType;
private String videoUrl; private String cover;
public UserViewInfo(String url) { public UserViewInfo(String url) {
this.url = url; this.url = url;
} }
public UserViewInfo(String videoUrl, String url) { public UserViewInfo(String cover, String url, int sourcesType) {
this.url = url; this.url = url;
this.videoUrl = videoUrl; this.cover = cover;
this.sourcesType = sourcesType;
} }
public String getUser() {
return user;
}
public void setUser(String user) {
this.user = user;
}
@Override @Override
public String getUrl() {//将你的图片地址字段返回 public String getUrl() {//将你的图片地址字段返回
...@@ -49,17 +43,21 @@ public class UserViewInfo implements IThumbViewInfo { ...@@ -49,17 +43,21 @@ public class UserViewInfo implements IThumbViewInfo {
} }
@Override @Override
public String getVideoUrl() { public String getCover() {
return videoUrl; return cover;
} }
@Override
public int getSourcesType() {
return sourcesType;
}
public void setBounds(Rect bounds) { public void setBounds(Rect bounds) {
mBounds = bounds; mBounds = bounds;
} }
public void setVideoUrl(String videoUrl) {
this.videoUrl = videoUrl;
}
@Override @Override
public int describeContents() { public int describeContents() {
...@@ -70,15 +68,15 @@ public class UserViewInfo implements IThumbViewInfo { ...@@ -70,15 +68,15 @@ public class UserViewInfo implements IThumbViewInfo {
public void writeToParcel(Parcel dest, int flags) { public void writeToParcel(Parcel dest, int flags) {
dest.writeString(this.url); dest.writeString(this.url);
dest.writeParcelable(this.mBounds, flags); dest.writeParcelable(this.mBounds, flags);
dest.writeString(this.user); dest.writeString(this.cover);
dest.writeString(this.videoUrl); dest.writeInt(this.sourcesType);
} }
protected UserViewInfo(Parcel in) { protected UserViewInfo(Parcel in) {
this.url = in.readString(); this.url = in.readString();
this.mBounds = in.readParcelable(Rect.class.getClassLoader()); this.mBounds = in.readParcelable(Rect.class.getClassLoader());
this.user = in.readString(); this.cover = in.readString();
this.videoUrl = in.readString(); this.sourcesType = in.readInt();
} }
public static final Parcelable.Creator<UserViewInfo> CREATOR = new Parcelable.Creator<UserViewInfo>() { public static final Parcelable.Creator<UserViewInfo> CREATOR = new Parcelable.Creator<UserViewInfo>() {
......
...@@ -40,7 +40,7 @@ class H5JsBean { ...@@ -40,7 +40,7 @@ class H5JsBean {
var isFromQingShu = 0//是否是从专家倾述主页跳转私聊界面 0: 不是 1:是 var isFromQingShu = 0//是否是从专家倾述主页跳转私聊界面 0: 不是 1:是
var docHead: String? = null//聊天头像 var docHead: String? = null//聊天头像
var doctorId: Int = 0//医生id var doctorId: Int = 0//医生id
var confidedId: String?=null//医生id var confidedId: String? = null//医生id
var listenerId: Int = 0 var listenerId: Int = 0
var orderStatus: Int = 0 var orderStatus: Int = 0
var orderStatusDesc: String? = null var orderStatusDesc: String? = null
...@@ -65,7 +65,7 @@ class H5JsBean { ...@@ -65,7 +65,7 @@ class H5JsBean {
var succ: String? = null var succ: String? = null
var course_id: String? = null var course_id: String? = null
var courseType: String? = null//课程类型:0 音频 1 视屏 var courseType: String? = null//课程类型:0 音频 1 视屏
var mediaType : String? = null//资料类型 1.音频 2.视频 var mediaType: String? = null//资料类型 1.音频 2.视频
var coursePlayUrl: String? = null//课程播放地址 var coursePlayUrl: String? = null//课程播放地址
var testResultId: Int? = 0 var testResultId: Int? = 0
...@@ -73,6 +73,7 @@ class H5JsBean { ...@@ -73,6 +73,7 @@ class H5JsBean {
//群聊id //群聊id
var tid: Int = 0 var tid: Int = 0
//专家id //专家id
var doctor_id: Int = 0 var doctor_id: Int = 0
...@@ -114,66 +115,93 @@ class H5JsBean { ...@@ -114,66 +115,93 @@ class H5JsBean {
} }
var test_items_id = 0 var test_items_id = 0
//倾诉线路类型 //倾诉线路类型
var confideType = 1 //1 axb 2双呼 3声网 var confideType = 1 //1 axb 2双呼 3声网
//倾诉支付参数 //倾诉支付参数
var payTitle: String? = null var payTitle: String? = null
//订单金额 //订单金额
var orderPrice: Double? = null var orderPrice: Double? = null
//优惠金额 //优惠金额
var coupnPrice: Double? = null var coupnPrice: Double? = null
//测评题 优惠券金额 //测评题 优惠券金额
var couponMoney: String? = "" var couponMoney: String? = ""
//可用余额 //可用余额
var avliableMoney: Double? = null var avliableMoney: Double? = null
//倾诉支付成功跳转地址 //倾诉支付成功跳转地址
var confideUrl: String? = null var confideUrl: String? = null
//打开与关闭右上角菜单 //打开与关闭右上角菜单
var toggleRightTopMenu: Int = 0 //0 关闭,1 打开 var toggleRightTopMenu: Int = 0 //0 关闭,1 打开
//打开与关闭分享菜单 //打开与关闭分享菜单
var toggleShareMenu: Int = 0 //0 关闭,1 打开 var toggleShareMenu: Int = 0 //0 关闭,1 打开
//标识首页第几个tab //标识首页第几个tab
var selectTab:Int = 0 var selectTab: Int = 0
//倾诉拨打电话使用参数 //倾诉拨打电话使用参数
var callType:String?=null var callType: String? = null
var switchStatus = 1 var switchStatus = 1
var closeReplaceChat=false var closeReplaceChat = false
var merchantType:String="" var merchantType: String = ""
var day:String="" // 预约日期 var day: String = "" // 预约日期
// meditation start // meditation start
// {"meditationId":21,"mediaId":15,"meditionType":1,"status":0, // {"meditationId":21,"mediaId":15,"meditionType":1,"status":0,
// "coverImageUrl":"https://pic.ydlcdn.com/NsBRkaxNba.png", // "coverImageUrl":"https://pic.ydlcdn.com/NsBRkaxNba.png",
// "title":"创建冥想-标题-20", // "title":"创建冥想-标题-20",
// "desc":"冥想测试数据基础入门1冥想测试数据基础入门1冥想测试数据基础入门1冥想测试数据基础入门1冥想测试数据基础入门1", // "desc":"冥想测试数据基础入门1冥想测试数据基础入门1冥想测试数据基础入门1冥想测试数据基础入门1冥想测试数据基础入门1",
// "duration":250.9845} // "duration":250.9845}
var meditationId:Int?=null var meditationId: Int? = null
var mediaId:Int?=null var mediaId: Int? = null
var meditionType:Int?=null var meditionType: Int? = null
var status = 0 var status = 0
var coverImageUrl:String?=null var coverImageUrl: String? = null
var desc:String?=null var desc: String? = null
var mediaUrl:String?=null var mediaUrl: String? = null
var duration:Double?=null var duration: Double? = null
var businessType:Int?=null var businessType: Int? = null
var share_url:String?=null var share_url: String? = null
var cover:String?=null var cover: String? = null
var isDarkMode = false var isDarkMode = false
var buried:String?=null var buried: String? = null
val color:String?=null val color: String? = null
val alpha:String?=null val alpha: String? = null
// meditation end // meditation end
var preview_type: Int = 0
var preview_index: Int = 0
val dataList: List<MediaInfo>? = null
var info: DoctorInfo? = null
} }
} }
class MediaInfo {
var url: String? = null
var sourcesType: Int = 0
var cover: String? = null
}
class DoctorInfo {
var doctorId: String? = null
var toUid: Int = 0
var utype: String? = null
}
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment