File tree Expand file tree Collapse file tree 3 files changed +23
-0
lines changed
Demo/API_V2/Assets/API/Navigate Expand file tree Collapse file tree 3 files changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ private void Start()
11
11
// 绑定额外的按钮操作
12
12
GameManager . Instance . detailsController . BindExtraButtonAction ( 0 , navigateToMiniProgram ) ;
13
13
GameManager . Instance . detailsController . BindExtraButtonAction ( 1 , exitMiniProgram ) ;
14
+ GameManager . Instance . detailsController . BindExtraButtonAction ( 2 , backMiniProgram ) ;
14
15
}
15
16
16
17
// 测试 API
@@ -56,4 +57,23 @@ public void exitMiniProgram()
56
57
{
57
58
WX . ExitMiniProgram ( new ExitMiniProgramOption { } ) ;
58
59
}
60
+
61
+ public void backMiniProgram ( )
62
+ {
63
+ Debug . Log ( "触发返回到上一个小程序" ) ;
64
+ WX . NavigateBackMiniProgram ( new NavigateBackMiniProgramOption {
65
+ success = ( res ) =>
66
+ {
67
+ Debug . Log ( "success: " + JsonUtility . ToJson ( res ) ) ;
68
+ } ,
69
+ fail = ( res ) =>
70
+ {
71
+ Debug . Log ( "fail: " + JsonUtility . ToJson ( res ) ) ;
72
+ } ,
73
+ complete = ( res ) =>
74
+ {
75
+ Debug . Log ( "complete" ) ;
76
+ }
77
+ } ) ;
78
+ }
59
79
}
Original file line number Diff line number Diff line change @@ -21,4 +21,6 @@ MonoBehaviour:
21
21
extraButtonList :
22
22
- buttonText : " \u6253\u5F00\u53E6\u4E00\u4E2A\u5C0F\u7A0B\u5E8F "
23
23
- buttonText : " \u9000\u51FA\u5F53\u524D\u5C0F\u7A0B\u5E8F "
24
+ - buttonText : " \u8FD4\u56DE\u5230\u4E0A\u4E00\u4E2A\u5C0F\u7A0B\u5E8F "
24
25
initialResultList : []
26
+ entryOrder : 0
Original file line number Diff line number Diff line change @@ -16,4 +16,5 @@ MonoBehaviour:
16
16
categorySprite : {fileID: 21300000, guid: 28238bea78eb34481998d9679ff9acc3, type: 3}
17
17
entryList :
18
18
- {fileID: 11400000, guid: ee0f2dd14aceb4a83a4c7c75f5c3b688, type: 2}
19
+ - {fileID: 11400000, guid: 61851e0243a1f344885a04bdaa28ee40, type: 2}
19
20
categoryOrder : 1
You can’t perform that action at this time.
0 commit comments