Skip to content

Commit 9524e7a

Browse files
author
lucas
committed
优化视联网标签Lua的 miniAppInfo的层级
1 parent 74be0f6 commit 9524e7a

File tree

1 file changed

+18
-13
lines changed

1 file changed

+18
-13
lines changed

VideoOS/venvy_pub/src/main/java/cn/com/videopls/pub/VideoPlusController.java

Lines changed: 18 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -169,20 +169,25 @@ public void successful(Object result, String miniAppInfo, final ServiceQueryAdsI
169169

170170

171171
HashMap<String, String> skipParams = new HashMap<>();
172-
// json data
173-
skipParams.put(CONSTANT_DATA, result.toString());
174-
175-
// 视联网模式 启动模式(气泡、标签).
176-
if (serviceType == ServiceType.ServiceTypeVideoMode_POP) {
177-
skipParams.put(CONSTANT_VIDEO_MODE_TYPE, "1");
178-
} else if (serviceType == ServiceType.ServiceTypeVideoMode_TAG) {
179-
skipParams.put(CONSTANT_VIDEO_MODE_TYPE, "0");
180-
}
181-
// miniAppInfo
182-
if (!TextUtils.isEmpty(miniAppInfo)) {
183-
skipParams.put(CONSTANT_MINI_APP_INFO, miniAppInfo);
184-
}
172+
JSONObject jsonObject = new JSONObject();
173+
try {
174+
// json data
175+
jsonObject.put(CONSTANT_DATA, result.toString());
176+
// 视联网模式 启动模式(气泡、标签).
177+
if (serviceType == ServiceType.ServiceTypeVideoMode_POP) {
178+
jsonObject.put(CONSTANT_VIDEO_MODE_TYPE, "1");
179+
} else if (serviceType == ServiceType.ServiceTypeVideoMode_TAG) {
180+
jsonObject.put(CONSTANT_VIDEO_MODE_TYPE, "0");
181+
}
185182

183+
// miniAppInfo
184+
if (!TextUtils.isEmpty(miniAppInfo)) {
185+
jsonObject.put(CONSTANT_MINI_APP_INFO, miniAppInfo);
186+
}
187+
} catch (JSONException e) {
188+
e.printStackTrace();
189+
}
190+
skipParams.put(CONSTANT_DATA, jsonObject.toString());
186191
navigation(builder.build(), skipParams, new IRouterCallback() {
187192
@Override
188193
public void arrived() {

0 commit comments

Comments
 (0)