12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849 |
- using System;
- using System.Collections;
- using System.Collections.Generic;
- using System.Linq;
- using UnityEngine;
- public class UserProxy : DataProxy
- {
- public UserInfo userInfo = new UserInfo();
- public override void OnRegister()
- {
- userInfo.userName = "Chiva";
- }
- /// <summary>
- /// 用户登录
- /// </summary>
- public StudentLoginResponse UserLogin(string account,string password)
- {
- StudentLoginResponse response = GrpcChannelContronller.Instance.client.StudentLogin(new StudentLoginRequest() {PhoneNumber = account,Password = password});
- if (response != null && response.Result == true)
- {
- userInfo.userName = response.Name;
- userInfo.phoneNumber = account;
- }
- return response;
- }
- public override void OnRemove()
- {
- }
- }
- public class UserInfo
- {
- /// <summary>
- /// 用户名
- /// </summary>
- public string userName;
- /// <summary>
- /// 账号
- /// </summary>
- public string phoneNumber;
- }
|