Skip to content

Commit be8621a

Browse files
committed
update 调整api分类
1 parent dd24a08 commit be8621a

13 files changed

+517
-55
lines changed

Demo/API_V2/Assets/API/Share/onShareMessage/onShareMessage.cs renamed to Demo/API_V2/Assets/API/Share/ShareAppMessage/ShareAppMessage.cs

Lines changed: 3 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,15 @@
33
using LitJson;
44
using UnityEngine;
55

6-
public class onShareMessage : Details
6+
public class ShareAppMessage : Details
77
{
88
protected override void TestAPI(string[] args)
99
{
1010
updateShareMenu();
1111
}
1212
private void Start()
1313
{
14-
GameManager.Instance.detailsController.BindExtraButtonAction(0, onShareAppMessage);
15-
GameManager.Instance.detailsController.BindExtraButtonAction(1, ShareAppMessage);
14+
GameManager.Instance.detailsController.BindExtraButtonAction(0, ShareAppMessages);
1615
}
1716
public void updateShareMenu()
1817
{
@@ -52,34 +51,9 @@ public void updateShareMenu()
5251
Debug.Log("chatType:" + res.chatType);
5352
});
5453
}
55-
public void onShareAppMessage()
56-
{
57-
var defaultParam = new WXShareAppMessageParam
58-
{
59-
title = "转发标题",
60-
imageUrl = "https://res.wx.qq.com/wxdoc/dist/assets/img/demo.ef5c5bef.jpg",
61-
query = "key1=val1&key2=val2"
62-
};
63-
WX.OnShareAppMessage(defaultParam);
64-
}
6554

66-
public void offShareAppMessage()
67-
{
68-
var defaultParam = new WXShareAppMessageParam
69-
{
70-
title = default,
71-
imageUrl = "xxx",
72-
query = "key1=val1&key2=val2"
73-
};
74-
WX.OnShareAppMessage(defaultParam);
75-
}
76-
77-
private void ShareAppMessage()
55+
private void ShareAppMessages()
7856
{
7957
WX.ShareAppMessage(new ShareAppMessageOption() { title = "小游戏分享" });
8058
}
81-
private void OnDestroy()
82-
{
83-
offShareAppMessage();
84-
}
8559
}
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
%YAML 1.1
2+
%TAG !u! tag:unity3d.com,2011:
3+
--- !u!114 &11400000
4+
MonoBehaviour:
5+
m_ObjectHideFlags: 0
6+
m_CorrespondingSourceObject: {fileID: 0}
7+
m_PrefabInstance: {fileID: 0}
8+
m_PrefabAsset: {fileID: 0}
9+
m_GameObject: {fileID: 0}
10+
m_Enabled: 1
11+
m_EditorHideFlags: 0
12+
m_Script: {fileID: 11500000, guid: fb48e4613a53bb941a20036d7c08fefb, type: 3}
13+
m_Name: ShareAppMessageSO
14+
m_EditorClassIdentifier:
15+
entryScriptTypeName: ShareAppMessage
16+
entryName: "\u5206\u4EAB\u8F6C\u53D1"
17+
entryAPI: updateShareMenu | ShareAppMessage
18+
entryDescription: "\u66F4\u65B0\u8F6C\u53D1\u5C5E\u6027\uFF0C\u6DFB\u52A0onShow\u83B7\u53D6Shareticket\u3002\n\u4E3B\u52A8\u62C9\u8D77\u8F6C\u53D1\uFF0C\u8FDB\u5165\u9009\u62E9\u901A\u8BAF\u5F55\u754C\u9762\u3002\n"
19+
optionList: []
20+
initialButtonText: "\u66F4\u65B0\u8F6C\u53D1\u5C5E\u6027"
21+
extraButtonList:
22+
- buttonText: "\u4E3B\u52A8\u8F6C\u53D1\u5206\u4EAB"
23+
initialResultList: []
24+
entryOrder: 0

Demo/API_V2/Assets/API/Share/ShareSO.asset

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,9 @@ MonoBehaviour:
1818
- {fileID: 11400000, guid: 4bdaaff4820c8eb4e9de6e076f490ab0, type: 2}
1919
- {fileID: 11400000, guid: c8002e7d2e031d045a8f350dbea866b0, type: 2}
2020
- {fileID: 11400000, guid: 38157a28d0b1af140aa9247a67207552, type: 2}
21-
- {fileID: 11400000, guid: 82f8461435201ae4b8a61a442878e16b, type: 2}
21+
- {fileID: 11400000, guid: f854158c3e3d7c646a22ba9e8a6f3b43, type: 2}
2222
- {fileID: 11400000, guid: 519da7c63574fd3499e390e73184682f, type: 2}
23+
- {fileID: 11400000, guid: 82f8461435201ae4b8a61a442878e16b, type: 2}
2324
- {fileID: 11400000, guid: 2ba9a02a26c73e048b5307d234540ade, type: 2}
2425
- {fileID: 11400000, guid: d9ee7e215d0456b488d2a691988d3377, type: 2}
2526
- {fileID: 11400000, guid: 67f658e249949454a9336842877eacb2, type: 2}

Demo/API_V2/Assets/API/Share/onShareAppMessage.meta

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
using WeChatWASM;
2+
using System;
3+
using LitJson;
4+
using UnityEngine;
5+
6+
public class onShareAppMessage : Details
7+
{
8+
protected override void TestAPI(string[] args)
9+
{
10+
OnShareAppMessage();
11+
}
12+
public void OnShareAppMessage()
13+
{
14+
var defaultParam = new WXShareAppMessageParam
15+
{
16+
title = "转发标题",
17+
imageUrl = "https://res.wx.qq.com/wxdoc/dist/assets/img/demo.ef5c5bef.jpg",
18+
query = "key1=val1&key2=val2"
19+
};
20+
WX.OnShareAppMessage(defaultParam);
21+
}
22+
public void OffShareAppMessage()
23+
{
24+
var defaultParam = new WXShareAppMessageParam
25+
{
26+
title = default,
27+
imageUrl = "xxx",
28+
query = "key1=val1&key2=val2"
29+
};
30+
WX.OnShareAppMessage(defaultParam);
31+
}
32+
private void OnDestroy()
33+
{
34+
OffShareAppMessage();
35+
}
36+
}

Demo/API_V2/Assets/API/Share/onShareAppMessage/onShareAppMessage.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.
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
%YAML 1.1
2+
%TAG !u! tag:unity3d.com,2011:
3+
--- !u!114 &11400000
4+
MonoBehaviour:
5+
m_ObjectHideFlags: 0
6+
m_CorrespondingSourceObject: {fileID: 0}
7+
m_PrefabInstance: {fileID: 0}
8+
m_PrefabAsset: {fileID: 0}
9+
m_GameObject: {fileID: 0}
10+
m_Enabled: 1
11+
m_EditorHideFlags: 0
12+
m_Script: {fileID: 11500000, guid: fb48e4613a53bb941a20036d7c08fefb, type: 3}
13+
m_Name: onShareAppMessageSO
14+
m_EditorClassIdentifier:
15+
entryScriptTypeName: onShareAppMessage
16+
entryName: "\u76D1\u542C\u8F6C\u53D1"
17+
entryAPI: onShareAppMessage
18+
entryDescription: "\u76D1\u542C\u7528\u6237\u70B9\u51FB\u53F3\u4E0A\u89D2\u83DC\u5355\u7684\u300C\u8F6C\u53D1\u300D\u6309\u94AE\u65F6\u89E6\u53D1\u7684\u4E8B\u4EF6\n\u88AB\u52A8\u8F6C\u53D1\uFF0C\u53EF\u901A\u8FC7\u8FD4\u56DE\u81EA\u5B9A\u4E49\u8F6C\u53D1\u53C2\u6570\u6765\u4FEE\u6539\u8F6C\u53D1\u5361\u7247\u7684\u5185\u5BB9\uFF0C\u5426\u5219\u4F7F\u7528\u9ED8\u8BA4\u5185\u5BB9\u3002"
19+
optionList: []
20+
initialButtonText: "\u76D1\u542C\u53F3\u4E0A\u89D2\u83DC\u5355\u8F6C\u53D1"
21+
extraButtonList: []
22+
initialResultList: []
23+
entryOrder: 0

Demo/API_V2/Assets/API/Share/onShareAppMessage/onShareAppMessageSO.asset.meta

Lines changed: 8 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/Share/onShareMessage/onShareMessageSO.asset

Lines changed: 0 additions & 25 deletions
This file was deleted.

0 commit comments

Comments
 (0)