平台规则问题初步处理
This commit is contained in:
parent
2ac6bab914
commit
5a8ee8afc6
@ -183,6 +183,11 @@
|
|||||||
android:configChanges="keyboardHidden|orientation|locale"
|
android:configChanges="keyboardHidden|orientation|locale"
|
||||||
android:screenOrientation="portrait"
|
android:screenOrientation="portrait"
|
||||||
android:windowSoftInputMode="adjustPan|stateHidden" />
|
android:windowSoftInputMode="adjustPan|stateHidden" />
|
||||||
|
<activity
|
||||||
|
android:name=".ui.mine.activity.ComProActivity"
|
||||||
|
android:configChanges="keyboardHidden|orientation|locale"
|
||||||
|
android:screenOrientation="portrait"
|
||||||
|
android:windowSoftInputMode="adjustPan|stateHidden" />
|
||||||
<activity
|
<activity
|
||||||
android:name=".ui.mine.activity.ChoiceFleetActivity"
|
android:name=".ui.mine.activity.ChoiceFleetActivity"
|
||||||
android:configChanges="keyboardHidden|orientation|locale"
|
android:configChanges="keyboardHidden|orientation|locale"
|
||||||
@ -217,6 +222,12 @@
|
|||||||
android:screenOrientation="portrait"
|
android:screenOrientation="portrait"
|
||||||
android:windowSoftInputMode="adjustPan|stateHidden"></activity>
|
android:windowSoftInputMode="adjustPan|stateHidden"></activity>
|
||||||
|
|
||||||
|
<activity
|
||||||
|
android:name=".ui.WebActivity"
|
||||||
|
android:configChanges="keyboardHidden|orientation|locale"
|
||||||
|
android:screenOrientation="portrait"
|
||||||
|
android:windowSoftInputMode="adjustPan|stateHidden" />
|
||||||
|
|
||||||
</application>
|
</application>
|
||||||
|
|
||||||
</manifest>
|
</manifest>
|
@ -9,6 +9,7 @@ import android.widget.TextView
|
|||||||
import com.dahe.mylibrary.R
|
import com.dahe.mylibrary.R
|
||||||
import com.dahe.mylibrary.base.BaseActivity
|
import com.dahe.mylibrary.base.BaseActivity
|
||||||
import com.dhsd.glowner.databinding.ActivityWebBinding
|
import com.dhsd.glowner.databinding.ActivityWebBinding
|
||||||
|
import com.dhsd.glowner.utils.SPUtils
|
||||||
import com.just.agentweb.AgentWeb
|
import com.just.agentweb.AgentWeb
|
||||||
import com.just.agentweb.AgentWebUIControllerImplBase
|
import com.just.agentweb.AgentWebUIControllerImplBase
|
||||||
import com.just.agentweb.WebChromeClient
|
import com.just.agentweb.WebChromeClient
|
||||||
@ -46,6 +47,15 @@ class WebActivity : BaseActivity<ActivityWebBinding>() {
|
|||||||
.go(mUrl)
|
.go(mUrl)
|
||||||
|
|
||||||
|
|
||||||
|
if (mUrl == "https://support.qq.com/products/335639") {
|
||||||
|
val userInfo = SPUtils.instance.getUserInfo(mContext)
|
||||||
|
var postData =
|
||||||
|
"""nickname=${if (userInfo?.userName.isNullOrEmpty()) "游客" else userInfo?.userName}&avatar=${userInfo?.avatar}&openid=${userInfo?.phonenumber}"""
|
||||||
|
mAgentWeb?.webCreator?.webView?.postUrl(mUrl, postData.toByteArray())
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// mAgentWeb?.jsInterfaceHolder?.addJavaObject("phone", AndroidInterfaceWeb())
|
// mAgentWeb?.jsInterfaceHolder?.addJavaObject("phone", AndroidInterfaceWeb())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3,6 +3,8 @@ package com.dhsd.glowner.ui.mine
|
|||||||
import BaseObserver
|
import BaseObserver
|
||||||
import DataManager
|
import DataManager
|
||||||
import RxHttpCallBack
|
import RxHttpCallBack
|
||||||
|
import android.content.Intent
|
||||||
|
import android.net.Uri
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import android.view.View
|
import android.view.View
|
||||||
import androidx.appcompat.app.AppCompatActivity
|
import androidx.appcompat.app.AppCompatActivity
|
||||||
@ -25,7 +27,7 @@ import com.dhsd.glowner.ui.mine.activity.ComProActivity
|
|||||||
import com.dhsd.glowner.ui.mine.activity.RulesActivity
|
import com.dhsd.glowner.ui.mine.activity.RulesActivity
|
||||||
import com.dhsd.glowner.ui.mine.activity.SettingActivity
|
import com.dhsd.glowner.ui.mine.activity.SettingActivity
|
||||||
import com.dhsd.glowner.utils.AppVersionUtils
|
import com.dhsd.glowner.utils.AppVersionUtils
|
||||||
import com.tencent.bugly.crashreport.CrashReport
|
import com.dhsd.glowner.utils.UserUtils
|
||||||
import io.reactivex.rxjava3.android.schedulers.AndroidSchedulers
|
import io.reactivex.rxjava3.android.schedulers.AndroidSchedulers
|
||||||
import io.reactivex.rxjava3.schedulers.Schedulers
|
import io.reactivex.rxjava3.schedulers.Schedulers
|
||||||
|
|
||||||
@ -201,6 +203,7 @@ class MineFragment : BaseFragment<FragmentMineBinding>(), View.OnClickListener,
|
|||||||
|
|
||||||
|
|
||||||
private fun initUserByData(userBean: UserBean){
|
private fun initUserByData(userBean: UserBean){
|
||||||
|
UserUtils.instance.updateUser(mContext,userBean)
|
||||||
binding?.run {
|
binding?.run {
|
||||||
tvName.text = userBean.userName
|
tvName.text = userBean.userName
|
||||||
tvPhone.text = userBean.phonenumber
|
tvPhone.text = userBean.phonenumber
|
||||||
|
@ -2,8 +2,10 @@ package com.dhsd.glowner.utils
|
|||||||
|
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
import android.content.Intent
|
import android.content.Intent
|
||||||
|
import com.dahe.glex.bean.UserBean
|
||||||
import com.dahe.mylibrary.utils.BaseSPUtils
|
import com.dahe.mylibrary.utils.BaseSPUtils
|
||||||
import com.dhsd.glowner.ui.LauncherActivity
|
import com.dhsd.glowner.ui.LauncherActivity
|
||||||
|
import com.google.gson.Gson
|
||||||
|
|
||||||
class UserUtils private constructor() {
|
class UserUtils private constructor() {
|
||||||
|
|
||||||
@ -26,4 +28,15 @@ class UserUtils private constructor() {
|
|||||||
context.startActivity(intent)
|
context.startActivity(intent)
|
||||||
// ToastUtils.showToast(context, "您的账号再异地登录,请重新登录")
|
// ToastUtils.showToast(context, "您的账号再异地登录,请重新登录")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新当前用户
|
||||||
|
* @param context Context
|
||||||
|
* @param userBean UserBean
|
||||||
|
*/
|
||||||
|
fun updateUser(context: Context, userBean: UserBean) {
|
||||||
|
SPUtils.instance.setUserInfo(context, Gson().toJson(userBean))
|
||||||
|
//设置推送别名
|
||||||
|
// PushHelper.setAlias(context, userBean)
|
||||||
|
}
|
||||||
}
|
}
|
@ -18,6 +18,7 @@
|
|||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
|
android:visibility="gone"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="@dimen/dp_15"
|
android:layout_marginTop="@dimen/dp_15"
|
||||||
@ -119,6 +120,7 @@
|
|||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
|
android:visibility="gone"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="@dimen/dp_15"
|
android:layout_marginTop="@dimen/dp_15"
|
||||||
|
@ -99,10 +99,16 @@ public class BaseUtils {
|
|||||||
viewHolder.setOnClickListener(R.id.ok, new View.OnClickListener() {
|
viewHolder.setOnClickListener(R.id.ok, new View.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
Intent intent = new Intent(Intent.ACTION_CALL);
|
|
||||||
|
Intent intent = new Intent(Intent.ACTION_DIAL);
|
||||||
Uri data = Uri.parse("tel:" + phoneNum);
|
Uri data = Uri.parse("tel:" + phoneNum);
|
||||||
intent.setData(data);
|
intent.setData(data);
|
||||||
context.startActivity(intent);
|
context.startActivity(intent);
|
||||||
|
|
||||||
|
// Intent intent = new Intent(Intent.ACTION_CALL);
|
||||||
|
// Uri data = Uri.parse("tel:" + phoneNum);
|
||||||
|
// intent.setData(data);
|
||||||
|
// context.startActivity(intent);
|
||||||
baseNiceDialog.dismiss();
|
baseNiceDialog.dismiss();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user