平台规则问题初步处理
This commit is contained in:
parent
2ac6bab914
commit
5a8ee8afc6
@ -183,6 +183,11 @@
|
||||
android:configChanges="keyboardHidden|orientation|locale"
|
||||
android:screenOrientation="portrait"
|
||||
android:windowSoftInputMode="adjustPan|stateHidden" />
|
||||
<activity
|
||||
android:name=".ui.mine.activity.ComProActivity"
|
||||
android:configChanges="keyboardHidden|orientation|locale"
|
||||
android:screenOrientation="portrait"
|
||||
android:windowSoftInputMode="adjustPan|stateHidden" />
|
||||
<activity
|
||||
android:name=".ui.mine.activity.ChoiceFleetActivity"
|
||||
android:configChanges="keyboardHidden|orientation|locale"
|
||||
@ -217,6 +222,12 @@
|
||||
android:screenOrientation="portrait"
|
||||
android:windowSoftInputMode="adjustPan|stateHidden"></activity>
|
||||
|
||||
<activity
|
||||
android:name=".ui.WebActivity"
|
||||
android:configChanges="keyboardHidden|orientation|locale"
|
||||
android:screenOrientation="portrait"
|
||||
android:windowSoftInputMode="adjustPan|stateHidden" />
|
||||
|
||||
</application>
|
||||
|
||||
</manifest>
|
@ -9,6 +9,7 @@ import android.widget.TextView
|
||||
import com.dahe.mylibrary.R
|
||||
import com.dahe.mylibrary.base.BaseActivity
|
||||
import com.dhsd.glowner.databinding.ActivityWebBinding
|
||||
import com.dhsd.glowner.utils.SPUtils
|
||||
import com.just.agentweb.AgentWeb
|
||||
import com.just.agentweb.AgentWebUIControllerImplBase
|
||||
import com.just.agentweb.WebChromeClient
|
||||
@ -46,6 +47,15 @@ class WebActivity : BaseActivity<ActivityWebBinding>() {
|
||||
.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())
|
||||
}
|
||||
|
||||
|
@ -3,6 +3,8 @@ package com.dhsd.glowner.ui.mine
|
||||
import BaseObserver
|
||||
import DataManager
|
||||
import RxHttpCallBack
|
||||
import android.content.Intent
|
||||
import android.net.Uri
|
||||
import android.os.Bundle
|
||||
import android.view.View
|
||||
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.SettingActivity
|
||||
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.schedulers.Schedulers
|
||||
|
||||
@ -201,6 +203,7 @@ class MineFragment : BaseFragment<FragmentMineBinding>(), View.OnClickListener,
|
||||
|
||||
|
||||
private fun initUserByData(userBean: UserBean){
|
||||
UserUtils.instance.updateUser(mContext,userBean)
|
||||
binding?.run {
|
||||
tvName.text = userBean.userName
|
||||
tvPhone.text = userBean.phonenumber
|
||||
|
@ -2,8 +2,10 @@ package com.dhsd.glowner.utils
|
||||
|
||||
import android.content.Context
|
||||
import android.content.Intent
|
||||
import com.dahe.glex.bean.UserBean
|
||||
import com.dahe.mylibrary.utils.BaseSPUtils
|
||||
import com.dhsd.glowner.ui.LauncherActivity
|
||||
import com.google.gson.Gson
|
||||
|
||||
class UserUtils private constructor() {
|
||||
|
||||
@ -26,4 +28,15 @@ class UserUtils private constructor() {
|
||||
context.startActivity(intent)
|
||||
// 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">
|
||||
|
||||
<LinearLayout
|
||||
android:visibility="gone"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_15"
|
||||
@ -119,6 +120,7 @@
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:visibility="gone"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_15"
|
||||
|
@ -99,10 +99,16 @@ public class BaseUtils {
|
||||
viewHolder.setOnClickListener(R.id.ok, new View.OnClickListener() {
|
||||
@Override
|
||||
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);
|
||||
intent.setData(data);
|
||||
context.startActivity(intent);
|
||||
|
||||
// Intent intent = new Intent(Intent.ACTION_CALL);
|
||||
// Uri data = Uri.parse("tel:" + phoneNum);
|
||||
// intent.setData(data);
|
||||
// context.startActivity(intent);
|
||||
baseNiceDialog.dismiss();
|
||||
}
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user