意见反馈

This commit is contained in:
lijia 2024-03-26 10:37:21 +08:00
parent 613c04b0a6
commit 572cbe5cb4
2 changed files with 10 additions and 1 deletions

View File

@ -46,6 +46,12 @@ class WebActivity : BaseActivity<ActivityWebBinding>() {
.createAgentWeb()
.ready()
.go(mUrl)
if (mUrl == "https://support.qq.com/products/335639") {
val userInfo = SPUtils.instance.getUserInfo(mContext)
var postData =
"""nickname=${if (userInfo?.idcardName.isNullOrEmpty()) "游客" else userInfo?.idcardName}&avatar=${userInfo?.avatar}&openid=${userInfo?.contactPhone}"""
mAgentWeb?.webCreator?.webView?.postUrl(mUrl, postData.toByteArray())
}
// mAgentWeb?.jsInterfaceHolder?.addJavaObject("phone", AndroidInterfaceWeb())
}

View File

@ -173,7 +173,10 @@ class MineFragment : BaseFragment<FragmentMineBinding>(), View.OnClickListener,
}
3 -> {
ToastUtils.showToast(mContext, plats[pos].title)
ActivityUtils.startActivity(mContext, WebActivity::class.java, Bundle().apply {
putString("title", "意见反馈")
putString("url", "https://support.qq.com/products/335639")
})
}
4 -> {