File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed
VideoOS/LuaViewSDK/src/cn/com/venvy/lua/plugin Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change 66
77import com .taobao .luaview .util .JsonUtil ;
88import com .taobao .luaview .util .LuaUtil ;
9+ import com .taobao .luaview .util .TextUtil ;
910
11+ import org .json .JSONException ;
12+ import org .json .JSONObject ;
1013import org .luaj .vm2 .LuaTable ;
1114import org .luaj .vm2 .LuaValue ;
1215import org .luaj .vm2 .Varargs ;
@@ -83,6 +86,22 @@ public Varargs invoke(Varargs args) {
8386 }
8487 }
8588 }
89+ if (!map .keySet ().contains ("miniAppId" )){
90+ // 如果过来的uri中不带miniAppId,则需要尝试去table中找miniAppId put进 map里
91+ try {
92+ JSONObject jsonObject = new JSONObject (JsonUtil .toString (table ));
93+ JSONObject miniAppInfo = jsonObject .getJSONObject ("miniAppInfo" );
94+ if (miniAppInfo != null ){
95+ String miniAppId = miniAppInfo .getString ("miniAppId" );
96+ if (!TextUtils .isEmpty (miniAppId )){
97+ map .put ("miniAppId" ,miniAppId );
98+ }
99+ }
100+ } catch (JSONException e ) {
101+ e .printStackTrace ();
102+ }
103+ }
104+
86105 if (map .size () > 0 ) {
87106 info .withSerializable ("data" , map );
88107 }
You can’t perform that action at this time.
0 commit comments