Commit 9f397a9e by 徐健

backup

parent 148cda53
...@@ -20,8 +20,8 @@ import java.util.List; ...@@ -20,8 +20,8 @@ import java.util.List;
public final class DemoGlobalConfig implements IConfigModule { public final class DemoGlobalConfig implements IConfigModule {
String APP_DOMAIN = "https://api.github.com/"; String APP_DOMAIN = "https://api.github.com/";
// public static String appEnv = YDLConstants.ENV_AUTO_TEST; // public static String appEnv = YDLConstants.ENV_AUTO_TEST;
public static String appEnv = YDLConstants.ENV_TEST; // public static String appEnv = YDLConstants.ENV_TEST;
// public static String appEnv = YDLConstants.ENV_PROD; public static String appEnv = YDLConstants.ENV_PROD;
@Override @Override
public void injectAppLifecycle(@NotNull Context context, @NotNull List<IAppLifecycles> lifecycles) { public void injectAppLifecycle(@NotNull Context context, @NotNull List<IAppLifecycles> lifecycles) {
......
...@@ -4,7 +4,9 @@ package com.ydl.component.service.web; ...@@ -4,7 +4,9 @@ package com.ydl.component.service.web;
import android.app.Activity; import android.app.Activity;
import com.ydl.webview.H5JsBean; import com.ydl.webview.H5JsBean;
import com.ydl.webview.H5Params;
import com.ydl.webview.NewH5Activity; import com.ydl.webview.NewH5Activity;
import com.yidianling.common.tools.LogUtil;
/** /**
* webview 点击事件监听 抽象类 * webview 点击事件监听 抽象类
...@@ -20,7 +22,11 @@ public class WVClickAbstractListener implements WebViewClientClickListener { ...@@ -20,7 +22,11 @@ public class WVClickAbstractListener implements WebViewClientClickListener {
@Override @Override
public void openH5(H5JsBean.H5JsCmd.Params jsData) { public void openH5(H5JsBean.H5JsCmd.Params jsData) {
LogUtil.d("openH5 params: " + jsData.toString());
H5Params h5Params = new H5Params(jsData.getUrl(), null);
h5Params.setShareData(jsData.getShare());
h5Params.setShowMenu(jsData.getDot_flag());
NewH5Activity.start(mContext, h5Params);
} }
@Override @Override
......
...@@ -9,6 +9,7 @@ import com.ydl.ydl_router.manager.YDLRouterManager ...@@ -9,6 +9,7 @@ import com.ydl.ydl_router.manager.YDLRouterManager
import com.ydl.ydlcommon.modular.ModularServiceManager import com.ydl.ydlcommon.modular.ModularServiceManager
import com.ydl.ydlcommon.utils.log.LogHelper import com.ydl.ydlcommon.utils.log.LogHelper
import com.yidianling.common.tools.LogUtil import com.yidianling.common.tools.LogUtil
import com.yidianling.user.UserHelper
/** /**
* update by harvie on 2017/7/04 * update by harvie on 2017/7/04
...@@ -48,9 +49,10 @@ class WebJavascriptHandler : IJavascriptHandler{ ...@@ -48,9 +49,10 @@ class WebJavascriptHandler : IJavascriptHandler{
if (jsData.url.equals("http")) { if (jsData.url.equals("http")) {
if (jsData.cmd?.params?.toUid != 0) { if (jsData.cmd?.params?.toUid != 0) {
wvEnventPro?.chat(
wvEnventPro?.chat(ModularServiceManager.getPlatformUserService()?.getUser()?.userId?.toInt()?:0, jsData.cmd?.params?.toUid UserHelper.getUserInfo()?.uid?.toInt()
?: 0, 0, ModularServiceManager.getPlatformUserService()?.getUser()?.token, jsData.cmd?.params?.isFromQingShu ?: 0, jsData.cmd?.params?.toUid
?: 0, 0, UserHelper.getUserInfo()?.accessToken, jsData.cmd?.params?.isFromQingShu
?: 0) ?: 0)
} else { } else {
wvEnventPro?.openH5(jsData.cmd?.params) wvEnventPro?.openH5(jsData.cmd?.params)
......
ext { ext {
kotlin_version = "1.3.21" kotlin_version = "1.3.21"
dev_mode = true dev_mode = false
ydl_app = [ ydl_app = [
appName : "心理咨询壹点灵", appName : "心理咨询壹点灵",
...@@ -45,9 +45,9 @@ ext { ...@@ -45,9 +45,9 @@ ext {
"m-confide" : "0.0.43", "m-confide" : "0.0.43",
"m-consultant" : "0.0.53", "m-consultant" : "0.0.53",
"m-fm" : "0.0.25", "m-fm" : "0.0.25",
"m-user" : "0.0.43", "m-user" : "0.0.44",
"m-home" : "0.0.16", "m-home" : "0.0.16",
"m-im" : "0.0.8", "m-im" : "0.0.9",
"m-dynamic" : "0.0.3", "m-dynamic" : "0.0.3",
"m-muse" : "0.0.24", "m-muse" : "0.0.24",
...@@ -69,10 +69,10 @@ ext { ...@@ -69,10 +69,10 @@ ext {
//-------------- 功能组件 -------------- //-------------- 功能组件 --------------
//第一步 //第一步
"ydl-platform" : "0.0.33.3", "ydl-platform" : "0.0.33.4",
//第二步 若干 //第二步 若干
"ydl-webview" : "0.0.32.2", "ydl-webview" : "0.0.32.3",
"ydl-media" : "0.0.16", "ydl-media" : "0.0.16",
"ydl-pay" : "0.0.13", "ydl-pay" : "0.0.13",
"m-audioim" : "0.0.42", "m-audioim" : "0.0.42",
...@@ -81,7 +81,7 @@ ext { ...@@ -81,7 +81,7 @@ ext {
"router" : "0.0.1", "router" : "0.0.1",
"ydl-net" : "0.0.3.1", "ydl-net" : "0.0.3.1",
"ydl-utils" : "0.0.3.1", "ydl-utils" : "0.0.3.1",
"ydl-flutter-base": "0.0.6", "ydl-flutter-base": "0.0.6.1",
] ]
...@@ -115,10 +115,10 @@ ext { ...@@ -115,10 +115,10 @@ ext {
//-------------- 功能组件 -------------- //-------------- 功能组件 --------------
//第一步 //第一步
"ydl-platform" : "0.0.33.3", "ydl-platform" : "0.0.33.4",
//第二步 若干 //第二步 若干
"ydl-webview" : "0.0.32.2", "ydl-webview" : "0.0.32.3",
"ydl-media" : "0.0.15.1", "ydl-media" : "0.0.15.1",
"ydl-pay" : "0.0.12.1", "ydl-pay" : "0.0.12.1",
"m-audioim" : "0.0.41.1", "m-audioim" : "0.0.41.1",
......
...@@ -90,9 +90,6 @@ public class YDLP2PMessageActivity extends YDLBaseMessageActivity { ...@@ -90,9 +90,6 @@ public class YDLP2PMessageActivity extends YDLBaseMessageActivity {
registerObservers(true); registerObservers(true);
NIMClient.getService(MsgService.class).clearUnreadCount(sessionId, SessionTypeEnum.P2P); NIMClient.getService(MsgService.class).clearUnreadCount(sessionId, SessionTypeEnum.P2P);
//初始化输入框中的hint消息
initDefaultHintMessage();
} }
@Override @Override
...@@ -124,21 +121,6 @@ public class YDLP2PMessageActivity extends YDLBaseMessageActivity { ...@@ -124,21 +121,6 @@ public class YDLP2PMessageActivity extends YDLBaseMessageActivity {
} }
} }
@SuppressLint("CheckResult")
private void initDefaultHintMessage() {
ServiceImpl.Companion.getInstance().getHintMessage()
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(res -> {
if (res.data != null && !TextUtils.isEmpty(res.data.getValue1())) {
if (messageFragment.getInputPanel().getInputContent() == null || messageFragment.getInputPanel().getInputContent().equals("")) {
messageFragment.getInputPanel().setInputHintContent(res.data.getValue1());
}
}
}, throwable -> {
});
}
@Override @Override
protected void onStop() { protected void onStop() {
super.onStop(); super.onStop();
......
...@@ -163,6 +163,8 @@ public class YDLMessageFragment extends TFragment implements ModuleProxy { ...@@ -163,6 +163,8 @@ public class YDLMessageFragment extends TFragment implements ModuleProxy {
private LinearLayout top_view_container; private LinearLayout top_view_container;
private LinearLayout constraint_ll; private LinearLayout constraint_ll;
private RelativeLayout rela_zixun;
private ValueAnimator anim_out; private ValueAnimator anim_out;
private ValueAnimator anim_in; private ValueAnimator anim_in;
private Boolean expertInfoViewIsIn = true; private Boolean expertInfoViewIsIn = true;
...@@ -216,6 +218,7 @@ public class YDLMessageFragment extends TFragment implements ModuleProxy { ...@@ -216,6 +218,7 @@ public class YDLMessageFragment extends TFragment implements ModuleProxy {
constraint_ll = rootView.findViewById(R.id.constraint_ll); constraint_ll = rootView.findViewById(R.id.constraint_ll);
im_focus_btn = rootView.findViewById(R.id.im_focus_btn); im_focus_btn = rootView.findViewById(R.id.im_focus_btn);
good_num_icons = rootView.findViewById(R.id.good_num_icons); good_num_icons = rootView.findViewById(R.id.good_num_icons);
rela_zixun = rootView.findViewById(R.id.rela_zixun);
//和助理私聊时的常用语逻辑 //和助理私聊时的常用语逻辑
rl_common_question_enter = rootView.findViewById(R.id.rl_common_question); rl_common_question_enter = rootView.findViewById(R.id.rl_common_question);
...@@ -331,6 +334,31 @@ public class YDLMessageFragment extends TFragment implements ModuleProxy { ...@@ -331,6 +334,31 @@ public class YDLMessageFragment extends TFragment implements ModuleProxy {
isFirst = false; isFirst = false;
ActionHandlerStorage.getL(sessionId).isNeedSendMsg(true); ActionHandlerStorage.getL(sessionId).isNeedSendMsg(true);
} }
//初始化私聊页面配置
initDefaultConfig();
}
@SuppressLint("CheckResult")
private void initDefaultConfig() {
ServiceImpl.Companion.getInstance().getChatViewConfig()
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(res -> {
if ("200".equals(res.code) && res.data != null && !TextUtils.isEmpty(res.data.getInputBoxReminder())) {
if (getInputPanel().getInputContent() == null || getInputPanel().getInputContent().equals("")) {
getInputPanel().setInputHintContent(res.data.getInputBoxReminder());
}
}
if ("200".equals(res.code) && res.data != null) {
if (res.data.getStatus() == 0) {
if (null != getActivity() && null != rela_zixun) {
rela_zixun.setVisibility(View.GONE);
}
}
}
}, throwable -> {
});
} }
private void addScrollListener() { private void addScrollListener() {
...@@ -553,7 +581,7 @@ public class YDLMessageFragment extends TFragment implements ModuleProxy { ...@@ -553,7 +581,7 @@ public class YDLMessageFragment extends TFragment implements ModuleProxy {
.subscribeOn(Schedulers.io()) .subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread()) .observeOn(AndroidSchedulers.mainThread())
.subscribe(res -> { .subscribe(res -> {
if ("200".equals(res.code)) { if ("200".equals(res.code) && null != getActivity()) {
ToastUtil.toastShort("关注成功"); ToastUtil.toastShort("关注成功");
im_focus_btn.setText("已关注"); im_focus_btn.setText("已关注");
im_focus_btn.setTextColor(Color.parseColor("#999999")); im_focus_btn.setTextColor(Color.parseColor("#999999"));
...@@ -563,8 +591,10 @@ public class YDLMessageFragment extends TFragment implements ModuleProxy { ...@@ -563,8 +591,10 @@ public class YDLMessageFragment extends TFragment implements ModuleProxy {
} }
} }
}, throwable -> { }, throwable -> {
ActionHandlerStorage.getL(sessionId).getInfo().isFollowed = false; if (null != getActivity()) {
ToastUtil.toastShort(throwable.toString()); ActionHandlerStorage.getL(sessionId).getInfo().isFollowed = false;
// ToastUtil.toastShort(throwable.toString());
}
}); });
} }
} }
...@@ -577,7 +607,6 @@ public class YDLMessageFragment extends TFragment implements ModuleProxy { ...@@ -577,7 +607,6 @@ public class YDLMessageFragment extends TFragment implements ModuleProxy {
//初始化聊天顶部快捷菜单 //初始化聊天顶部快捷菜单
@SuppressLint("CheckResult") @SuppressLint("CheckResult")
private void initMenu() { private void initMenu() {
View rela_zixun = rootView.findViewById(R.id.rela_zixun);
rela_zixun.setOnClickListener(view -> { rela_zixun.setOnClickListener(view -> {
if (sessionId != null && ActionHandlerStorage.getL(sessionId) != null && ActionHandlerStorage.getL(sessionId).getInfo() != null) { if (sessionId != null && ActionHandlerStorage.getL(sessionId) != null && ActionHandlerStorage.getL(sessionId).getInfo() != null) {
......
...@@ -61,7 +61,7 @@ interface ServiceApi{ ...@@ -61,7 +61,7 @@ interface ServiceApi{
fun serviceList(@Query("doctorId") doctorId: String): Observable<BaseAPIResponse<List<ServiceItemBean>>> fun serviceList(@Query("doctorId") doctorId: String): Observable<BaseAPIResponse<List<ServiceItemBean>>>
//获取输入框的hint内容 //获取输入框的hint内容
@GET("systemconfig/get-chat-remind-config") @GET("systemconfig/get-chat-view-config")
@Headers(YDL_DOMAIN + YDL_DOMAIN_JAVA) @Headers(YDL_DOMAIN + YDL_DOMAIN_JAVA)
fun getHintMessage(): Observable<BaseAPIResponse<SystemInfoBean>> fun getChatViewConfig(): Observable<BaseAPIResponse<SystemInfoBean>>
} }
\ No newline at end of file
...@@ -91,7 +91,7 @@ class ServiceImpl private constructor() { ...@@ -91,7 +91,7 @@ class ServiceImpl private constructor() {
/** /**
* 获取输入框的hint内容 * 获取输入框的hint内容
*/ */
fun getHintMessage(): Observable<BaseAPIResponse<SystemInfoBean>> { fun getChatViewConfig(): Observable<BaseAPIResponse<SystemInfoBean>> {
return YDLHttpUtils.obtainApi(ServiceApi::class.java).getHintMessage() return YDLHttpUtils.obtainApi(ServiceApi::class.java).getChatViewConfig()
} }
} }
\ No newline at end of file
package com.yidianling.uikit.custom.http.response package com.yidianling.uikit.custom.http.response
class SystemInfoBean( class SystemInfoBean(
var value1: String = "" val inputBoxReminder: String,
val status: Int
) )
\ No newline at end of file
...@@ -18,6 +18,15 @@ class ExpertConsultServiceView : LinearLayout { ...@@ -18,6 +18,15 @@ class ExpertConsultServiceView : LinearLayout {
private var mListener: ConsultServiceViewCallback? = null private var mListener: ConsultServiceViewCallback? = null
val mCompare: Comparator<ServiceItemBean.ProductsBean> = Comparator { o1, o2 ->
val res = o1.productDto.sortOrder.compareTo(o2.productDto.sortOrder)
when {
res == 0 -> 0
res > 0 -> -1
else -> 1
}
}
constructor(context: Context) : super(context) { constructor(context: Context) : super(context) {
mContext = context mContext = context
initView() initView()
...@@ -107,16 +116,20 @@ class ExpertConsultServiceView : LinearLayout { ...@@ -107,16 +116,20 @@ class ExpertConsultServiceView : LinearLayout {
private fun selectTypeServiceList() { private fun selectTypeServiceList() {
expert_consult_service_service_list.removeAllViews() expert_consult_service_service_list.removeAllViews()
if (mServiceList.size != 0) { if (mServiceList.size != 0) {
val lastList: ArrayList<ServiceItemBean.ProductsBean> = ArrayList()
mServiceList.forEachIndexed { index, itemBean -> mServiceList.forEachIndexed { index, itemBean ->
//当选中String相同的时候,添加view,或者选中typeSelectedIndex==0的时候,展示全部 //当选中String相同的时候,添加view,或者选中typeSelectedIndex==0的时候,展示全部
if (itemBean.cateName == mTypeList[typeSelectedIndex] || typeSelectedIndex == 0) { if (itemBean.cateName == mTypeList[typeSelectedIndex] || typeSelectedIndex == 0) {
itemBean.products.forEach { itemBean.products.forEach {
val item = ExpertConsultServiceItemView(mContext!!, mListener) lastList.add(it)
item.setData(it)
expert_consult_service_service_list.addView(item)
} }
} }
} }
lastList.sortedWith(mCompare).forEach {
val item = ExpertConsultServiceItemView(mContext!!, mListener)
item.setData(it)
expert_consult_service_service_list.addView(item)
}
} }
} }
......
package com.yidianling.user.ui.login package com.yidianling.user.ui.login
import android.annotation.SuppressLint import android.annotation.SuppressLint
import android.graphics.Color
import android.os.Build import android.os.Build
import android.os.Handler import android.os.Handler
import android.support.design.widget.CollapsingToolbarLayout
import android.view.KeyEvent import android.view.KeyEvent
import android.view.View
import android.view.WindowManager
import android.widget.RelativeLayout
import com.ydl.ydlcommon.base.BaseActivity import com.ydl.ydlcommon.base.BaseActivity
import com.ydl.ydlcommon.bean.StatusBarOptions
import com.ydl.ydlcommon.utils.ActivityManager import com.ydl.ydlcommon.utils.ActivityManager
import com.ydl.ydlcommon.utils.SharedPreferencesEditor import com.ydl.ydlcommon.utils.SharedPreferencesEditor
import com.ydl.ydlcommon.utils.StatusBarUtils import com.ydl.ydlcommon.utils.StatusBarUtils
import com.yidianling.common.tools.LogUtil
import com.yidianling.common.tools.ToastUtil import com.yidianling.common.tools.ToastUtil
import com.yidianling.user.R import com.yidianling.user.R
import com.yidianling.user.UserHelper
import com.yidianling.user.http.UserHttpImpl import com.yidianling.user.http.UserHttpImpl
import com.yidianling.user.widget.SecretDialog import com.yidianling.user.widget.SecretDialog
import io.reactivex.android.schedulers.AndroidSchedulers import io.reactivex.android.schedulers.AndroidSchedulers
...@@ -31,7 +23,7 @@ import kotlin.system.exitProcess ...@@ -31,7 +23,7 @@ import kotlin.system.exitProcess
* e-mail : zhangwch@yidianling.com * e-mail : zhangwch@yidianling.com
* time : 2018/01/10 * time : 2018/01/10
*/ */
class SecretActivity: BaseActivity() { class SecretActivity : BaseActivity() {
private var secretDialog: SecretDialog? = null private var secretDialog: SecretDialog? = null
...@@ -51,7 +43,7 @@ class SecretActivity: BaseActivity() { ...@@ -51,7 +43,7 @@ class SecretActivity: BaseActivity() {
user_secret_no_agree.setOnClickListener { user_secret_no_agree.setOnClickListener {
if (null == secretDialog) { if (null == secretDialog) {
secretDialog = SecretDialog(this, object: SecretDialog.OnSecretDialogListener { secretDialog = SecretDialog(this, object : SecretDialog.OnSecretDialogListener {
override fun onCancel() { override fun onCancel() {
Handler().postDelayed({ Handler().postDelayed({
ActivityManager.finishAll() ActivityManager.finishAll()
...@@ -65,7 +57,7 @@ class SecretActivity: BaseActivity() { ...@@ -65,7 +57,7 @@ class SecretActivity: BaseActivity() {
} }
}) })
secretDialog?.show() secretDialog?.show()
}else { } else {
secretDialog?.show() secretDialog?.show()
} }
} }
...@@ -73,6 +65,14 @@ class SecretActivity: BaseActivity() { ...@@ -73,6 +65,14 @@ class SecretActivity: BaseActivity() {
user_secret_agree.setOnClickListener { user_secret_agree.setOnClickListener {
agreeAction() agreeAction()
} }
user_use_btn.setOnClickListener {
H5Activity.start(this@SecretActivity, false)
}
user_secret_protect_btn.setOnClickListener {
H5Activity.start(this@SecretActivity, true)
}
} }
@SuppressLint("CheckResult") @SuppressLint("CheckResult")
......
...@@ -177,9 +177,7 @@ public class NewH5Activity extends BaseActivity implements PtrHandler { ...@@ -177,9 +177,7 @@ public class NewH5Activity extends BaseActivity implements PtrHandler {
showTestQuestionPageReturnDialog(); showTestQuestionPageReturnDialog();
}); });
tb_title.setOnLeftTextClick((view, isActive) -> { tb_title.setOnLeftTextClick((view, isActive) -> {
if (isActive) { showTestQuestionPageReturnDialog();
showTestQuestionPageReturnDialog();
}
}); });
} }
} }
......
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