Skip to content

Commit 200d595

Browse files
committed
【ID871407511】合规修复-设备离线时,反馈问题跳转到h5对应的反馈页面。
http://tapd.oa.com/NEW_IOT/prong/stories/view/1020393192871407511 Change-Id: I05e8ef36948cf277b8bd179d6a31e10d30dba29a
1 parent dcd5360 commit 200d595

File tree

3 files changed

+19
-1
lines changed

3 files changed

+19
-1
lines changed

app/src/main/java/com/tencent/iot/explorer/link/kitlink/activity/ControlPanelActivity.kt

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package com.tencent.iot.explorer.link.kitlink.activity
22

33
import android.bluetooth.BluetoothGatt
4+
import android.content.Intent
45
import android.text.TextUtils
56
import android.util.Log
67
import android.view.View
@@ -23,6 +24,7 @@ import com.tencent.iot.explorer.link.core.link.listener.BleDeviceConnectionListe
2324
import com.tencent.iot.explorer.link.core.link.service.BleConfigService
2425
import com.tencent.iot.explorer.link.core.log.L
2526
import com.tencent.iot.explorer.link.customview.recyclerview.CRecyclerView
27+
import com.tencent.iot.explorer.link.kitlink.consts.CommonField
2628
import com.tencent.iot.explorer.link.kitlink.entity.DevicePropertyEntity
2729
import com.tencent.iot.explorer.link.kitlink.entity.ProductEntity
2830
import com.tencent.iot.explorer.link.kitlink.entity.ProductsEntity
@@ -296,7 +298,10 @@ class ControlPanelActivity : PActivity(), CoroutineScope by MainScope(), Control
296298
}
297299

298300
override fun toFeedback(popupWindow: OfflinePopupWindow) {
299-
jumpActivity(FeedbackActivity::class.java, true)
301+
var intent = Intent(this@ControlPanelActivity, HelpWebViewActivity::class.java)
302+
intent.putExtra(CommonField.FEEDBACK_DEVICE, true)
303+
intent.putExtra(CommonField.FEEDBACK_CATEGORY, deviceEntity?.AliasName)
304+
startActivity(intent)
300305
}
301306
}
302307
offlinePopup?.setBg(control_panel_bg)

app/src/main/java/com/tencent/iot/explorer/link/kitlink/activity/HelpWebViewActivity.kt

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,8 @@ class HelpWebViewActivity: BaseActivity(), MyCallback, View.OnClickListener {
5151
private val FILE_CHOOSER_CAMERA_RESULT_CODE = 9998
5252

5353
private var configQuestionList = false
54+
private var feedbackDevice = false
55+
private var feedbackCategory = ""
5456
private var permissionDialog: PermissionDialog? = null
5557

5658
private var permissions = arrayOf(
@@ -67,6 +69,12 @@ class HelpWebViewActivity: BaseActivity(), MyCallback, View.OnClickListener {
6769
if (intent.hasExtra(CommonField.CONFIG_QUESTION_LIST)) {
6870
configQuestionList = intent.getBooleanExtra(CommonField.CONFIG_QUESTION_LIST, false)
6971
}
72+
if (intent.hasExtra(CommonField.FEEDBACK_DEVICE)) {
73+
feedbackDevice = intent.getBooleanExtra(CommonField.FEEDBACK_DEVICE, false)
74+
}
75+
if (intent.hasExtra(CommonField.FEEDBACK_CATEGORY)) {
76+
feedbackCategory = intent.getStringExtra(CommonField.FEEDBACK_CATEGORY)
77+
}
7078
initWebView()
7179
getAppGetTokenTicket()
7280
}
@@ -157,6 +165,9 @@ class HelpWebViewActivity: BaseActivity(), MyCallback, View.OnClickListener {
157165
if (configQuestionList) {
158166
url += "/#/pages/Functional/HelpCenter/QnAList/QnAList?genCateID=config7"
159167
}
168+
if (feedbackDevice) {
169+
url += "#/pages/User/Feedback/Feedback?cate=" + feedbackCategory
170+
}
160171

161172
help_web.loadUrl(url)
162173
}

app/src/main/java/com/tencent/iot/explorer/link/kitlink/consts/CommonField.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@ object CommonField {
3939
const val HANDLER_NAME = "handlerName"
4040
const val MSG_TYPE = "msgType"
4141
const val CONFIG_QUESTION_LIST = "configQuestionList"
42+
const val FEEDBACK_DEVICE = "feedbackDevice"
43+
const val FEEDBACK_CATEGORY = "feedbackCategory"
4244
const val FIREBASE_USER_ID = "UserID"
4345
const val LOAD_VIEW_TXT_TYPE = "loadViewTxtType"
4446
const val CONFIG_TYPE = "configType"

0 commit comments

Comments
 (0)