修改密码接口脚本编写完成
This commit is contained in:
parent
0f0f72cab9
commit
739f82d458
3298
TheStrongestSnail/Assets/Resources/LLPrefabs/Change_Password.prefab
Normal file
3298
TheStrongestSnail/Assets/Resources/LLPrefabs/Change_Password.prefab
Normal file
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,7 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 4cf023c7e5330b44cb001cb7fa3945c8
|
||||||
|
PrefabImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,36 @@
|
|||||||
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using UnityEngine;
|
||||||
|
using TMPro;
|
||||||
|
using UnityEngine.UI;
|
||||||
|
public class Change_Password : Base
|
||||||
|
{
|
||||||
|
public TMP_InputField PhonenumberInput;
|
||||||
|
public TMP_InputField YanzhengmaInput;
|
||||||
|
public TMP_InputField NewPasswordInput;
|
||||||
|
public Button ConfirmBtn;
|
||||||
|
public ShimingPanel shimingPanel;
|
||||||
|
// Start is called before the first frame update
|
||||||
|
void Start()
|
||||||
|
{
|
||||||
|
testLogo();
|
||||||
|
ConfirmBtn.onClick.AddListener(ConfirmClick);
|
||||||
|
PhonenumberInput.placeholder.GetComponent<TextMeshProUGUI>().text = shimingPanel.phonenumber.text;
|
||||||
|
}
|
||||||
|
|
||||||
|
async void ConfirmClick()
|
||||||
|
{
|
||||||
|
string response = "";//²âÊÔ
|
||||||
|
string body = "{\"password\":\"" +NewPasswordInput.text + "\",\"verifyCode\":" + int.Parse(YanzhengmaInput.text) + "}";
|
||||||
|
Debug.Log(body);
|
||||||
|
response = await web.SendRequest(web.URL + "/snail/user/changePassword", "POST", body, testhead);
|
||||||
|
Debug.Log(response);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// Update is called once per frame
|
||||||
|
void Update()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,11 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: f12b354ab9e62ce458c404ba215fa392
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
54
TheStrongestSnail/Assets/Scripts/lianghaoLL/ShimingPanel.cs
Normal file
54
TheStrongestSnail/Assets/Scripts/lianghaoLL/ShimingPanel.cs
Normal file
@ -0,0 +1,54 @@
|
|||||||
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using UnityEngine;
|
||||||
|
using UnityEngine.UI;
|
||||||
|
public class ShimingPanel : Base
|
||||||
|
{
|
||||||
|
public Text phonenumber;
|
||||||
|
public Button changePdBtn;
|
||||||
|
public Button Deregister_accountBtn;
|
||||||
|
public Button User_AgreementBtn;
|
||||||
|
public Button Privacy_PolicyBtn;
|
||||||
|
public Button checkBtn;
|
||||||
|
// Start is called before the first frame update
|
||||||
|
void Start()
|
||||||
|
{
|
||||||
|
|
||||||
|
changePdBtn.onClick.AddListener(ChangeClick);
|
||||||
|
Deregister_accountBtn.onClick.AddListener(Deregisterclick);
|
||||||
|
User_AgreementBtn.onClick.AddListener(User_AgreementClick);
|
||||||
|
Privacy_PolicyBtn.onClick.AddListener(PrivacyClick);
|
||||||
|
checkBtn.onClick.AddListener(CheckClick);
|
||||||
|
}
|
||||||
|
|
||||||
|
void ChangeClick()
|
||||||
|
{
|
||||||
|
GameObject change = (GameObject)Instantiate(Resources.Load("LLPrefabs/Change_Password"),this.transform.parent);
|
||||||
|
change.GetComponent<Change_Password>().shimingPanel = this;
|
||||||
|
}
|
||||||
|
|
||||||
|
void Deregisterclick()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void User_AgreementClick()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void PrivacyClick()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void CheckClick()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
// Update is called once per frame
|
||||||
|
void Update()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,11 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 794ce95b9e9a04240a7eb22653d44ad4
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
Loading…
Reference in New Issue
Block a user