28 lines
680 B
C#
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);
|
|
}
|
|
}
|