Skip to content

Commit c2a167d

Browse files
committed
added getGameClubData demo
1 parent cd0a45f commit c2a167d

File tree

12 files changed

+80
-13
lines changed

12 files changed

+80
-13
lines changed

Demo/API_V2/Assets/API/DataStorage/DataStorageSO.asset

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,6 @@ MonoBehaviour:
1313
m_Name: DataStorageSO
1414
m_EditorClassIdentifier:
1515
categoryName: "\u6570\u636E\u7F13\u5B58"
16-
categorySprite: {fileID: 0}
16+
categorySprite: {fileID: 21300000, guid: aedb8ebe6c4a14a13b23dc2e9ab42dcf, type: 3}
1717
entryList:
1818
- {fileID: 11400000, guid: a587889226c1f491fa6c783db1e12837, type: 2}

Demo/API_V2/Assets/API/GUI/GUISO.asset

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ MonoBehaviour:
1313
m_Name: GUISO
1414
m_EditorClassIdentifier:
1515
categoryName: "\u754C\u9762"
16-
categorySprite: {fileID: 0}
16+
categorySprite: {fileID: 21300000, guid: bd5165d5d0b9b4f55b39dce7f4638c81, type: 3}
1717
entryList:
1818
- {fileID: 11400000, guid: 546628e39e8c246c38eebcdfbfd35b47, type: 2}
1919
- {fileID: 11400000, guid: 6902bd974e09745c4a185485a99c165d, type: 2}

Demo/API_V2/Assets/API/Network/NetworkSO.asset

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ MonoBehaviour:
1212
m_Script: {fileID: 11500000, guid: 4a9e19ed69c041c408533b50f5572d0f, type: 3}
1313
m_Name: NetworkSO
1414
m_EditorClassIdentifier:
15-
categoryName: "\u4E0B\u8F7D"
16-
categorySprite: {fileID: 0}
15+
categoryName: "\u7F51\u7EDC"
16+
categorySprite: {fileID: 21300000, guid: bb0b97758d57042a296e1ecd925f8088, type: 3}
1717
entryList:
1818
- {fileID: 11400000, guid: 8fb54c5918d454eea90d5147f2c316ea, type: 2}
1919
- {fileID: 11400000, guid: 1e0539509d074443f92d17035efbe40f, type: 2}

Demo/API_V2/Assets/API/OpenInterface/GameClub/GameClub SO.asset

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ MonoBehaviour:
1313
m_Name: GameClub SO
1414
m_EditorClassIdentifier:
1515
entryScriptTypeName: GameClub
16-
entryName: "\u6E38\u620F\u5708"
17-
entryAPI:
16+
entryName: "\u6E38\u620F\u5708\u6570\u636E"
17+
entryAPI: getGameClubData
1818
entryDescription:
1919
optionList: []
20-
initialButtonText: "\u8FD0\u884C"
20+
initialButtonText: "\u83B7\u53D6\u6E38\u620F\u5708\u6570\u636E"
2121
extraButtonList: []
2222
initialResultList: []
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
using System;
2+
using System.Collections;
3+
using System.Collections.Generic;
4+
using UnityEngine;
5+
using LitJson;
6+
using WeChatWASM;
7+
8+
public class GameClub : Details
9+
{
10+
private int[] _data = { 1, 2 };
11+
12+
// Start is called before the first frame update
13+
private void Start()
14+
{
15+
//Placeholder for later tests
16+
}
17+
18+
// ²âÊÔ API
19+
protected override void TestAPI(string[] args)
20+
{
21+
getGameClubData();
22+
}
23+
24+
private void getGameClubData()
25+
{
26+
GetGameClubDataOption option = new GetGameClubDataOption();
27+
28+
option.dataTypeList = new DataType[_data.Length];
29+
30+
for (int i = 0; i < _data.Length; i++)
31+
{
32+
option.dataTypeList[i] = new DataType();
33+
option.dataTypeList[i].type = _data[i];
34+
}
35+
36+
option.fail = (res) =>
37+
{
38+
Debug.Log("GetGameClubData fail: " + res.errMsg);
39+
};
40+
41+
option.complete = (res) =>
42+
{
43+
Debug.Log("GetGameClubData complete: " + JsonUtility.ToJson(res));
44+
};
45+
46+
option.success = (res) =>
47+
{
48+
Debug.Log("GetGameClubData success: " + JsonUtility.ToJson(res));
49+
Debug.Log("encryptedData:" + res.encryptedData);
50+
};
51+
52+
WX.GetGameClubData(option);
53+
}
54+
55+
}

Demo/API_V2/Assets/API/OpenInterface/GameClub/GameClub.cs.meta

Lines changed: 11 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Demo/API_V2/Assets/API/OpenInterface/OpenInterfaceSO.asset

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ MonoBehaviour:
1313
m_Name: OpenInterfaceSO
1414
m_EditorClassIdentifier:
1515
categoryName: "\u5F00\u653E\u63A5\u53E3"
16-
categorySprite: {fileID: 0}
16+
categorySprite: {fileID: 21300000, guid: 655a4cabb9e794434b9c028267c63e10, type: 3}
1717
entryList:
1818
- {fileID: 11400000, guid: d0c8de90644082f418ae2ec91900bd8f, type: 2}
1919
- {fileID: 11400000, guid: 8a4f679875fb6413b9b0df39d1359e57, type: 2}

Demo/API_V2/Assets/API/Payment/PaymentSO.asset

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ MonoBehaviour:
1212
m_Script: {fileID: 11500000, guid: 4a9e19ed69c041c408533b50f5572d0f, type: 3}
1313
m_Name: PaymentSO
1414
m_EditorClassIdentifier:
15-
categoryName: Payment
15+
categoryName: "\u865A\u62DF\u652F\u4ED8"
1616
categorySprite: {fileID: 0}
1717
entryList:
1818
- {fileID: 11400000, guid: dd332abe9d9fb41af85b675e4c8ea9f5, type: 2}

Demo/API_V2/Assets/API/Render/RenderSO.asset

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,6 @@ MonoBehaviour:
1313
m_Name: RenderSO
1414
m_EditorClassIdentifier:
1515
categoryName: "\u6E32\u67D3"
16-
categorySprite: {fileID: 0}
16+
categorySprite: {fileID: 21300000, guid: 9e35ae4b7c6f04df08ba76b6b663edc0, type: 3}
1717
entryList:
1818
- {fileID: 11400000, guid: 3742edf3f50854504ba8632134064e94, type: 2}

Demo/API_V2/Assets/API/Report/ReportSO.asset

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ MonoBehaviour:
1212
m_Script: {fileID: 11500000, guid: 4a9e19ed69c041c408533b50f5572d0f, type: 3}
1313
m_Name: ReportSO
1414
m_EditorClassIdentifier:
15-
categoryName: Report
15+
categoryName: "\u6570\u636E\u5206\u6790"
1616
categorySprite: {fileID: 0}
1717
entryList:
1818
- {fileID: 11400000, guid: 561537d53954943ce9a54e325b636fad, type: 2}

0 commit comments

Comments
 (0)