E_ElecCompetition/Electrical_inspectionCompet.../Assets/Adam/Scripts/GoToSceneController.cs

52 lines
1.4 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

using Data;
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
using Utility;
//============================================================
//支持中文文件使用UTF-8编码
//@author YangHua
//@create 20230913
//@company QianHuo
//
//@description:
//============================================================
namespace QianHuo
{
public class GoToSceneController : MonoBehaviour
{
public Button goToSceneBtn;
public InputField userID;
public string url = "http://111.229.30.246:10013/Handler/Taiqu.ashx?action=changjing&bianhao=";
// Use this for initialization
private void Start()
{
goToSceneBtn.onClick.AddListener(OnGo);
}
public async void OnGo()
{
string _url = url + userID.text;
SceneInfoData sceneInfoData = await AsyncWebReq.Get<SceneInfoData>(_url);
GlobalFlag.sceneData = sceneInfoData;
string[] tt = ToolUtility.GetInfo(sceneInfoData.message,'_');
foreach (var item in tt)
{
Debug.Log(item);
}
if (tt[3].Equals("商业用户"))
{
SceneLoad.Instance.SceneChange("农家乐");
}
Debug.Log(sceneInfoData.message);
Debug.Log(GlobalFlag.sceneData.message);
}
}
}