WXMC/proj/unity/Assets/Scripts/Utils/WinXinTest.cs
2024-12-04 16:18:46 +08:00

28 lines
680 B
C#

using Sirenix.OdinInspector;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class WinXinTest : MonoBehaviour
{
[Button]
public void AskOnce(string content)
{
StartCoroutine(AskRoutine(content));
}
private IEnumerator AskRoutine(string content)
{
WenXinRequestStruct param = new WenXinRequestStruct();
param.messages = new List<WenXinRequestMessage>()
{
WenXinRequestMessage.UserMessage(content),
};
WenXinRequest testReq = new WenXinRequest();
yield return StartCoroutine(testReq.Post(this, param));
Debug.Log(testReq.Response);
}
}