Merge branch 'main' of http://shu.sheziwanglo.cn:3000/shurongsen/Cute_demon_attacks
This commit is contained in:
commit
69f5387d62
File diff suppressed because it is too large
Load Diff
@ -1,10 +1,13 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
using DG.Tweening;
|
||||
public class BaoshiRoomcontroller : MonoBehaviour
|
||||
{
|
||||
[Header("·¿¼äid")]
|
||||
public int RoomId;
|
||||
|
||||
[Header("精灵的预制体")]
|
||||
public GameObject fishManPrefab;
|
||||
@ -70,8 +73,6 @@ public class BaoshiRoomcontroller : MonoBehaviour
|
||||
private void Start()
|
||||
{
|
||||
FishPrice = 10;
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -119,7 +120,7 @@ public class BaoshiRoomcontroller : MonoBehaviour
|
||||
}
|
||||
}
|
||||
|
||||
public void OnClick()
|
||||
public async void OnClick()
|
||||
{
|
||||
|
||||
if (!canClick)
|
||||
@ -133,11 +134,20 @@ public class BaoshiRoomcontroller : MonoBehaviour
|
||||
// return;
|
||||
//}
|
||||
|
||||
add_fish();
|
||||
if (await ActivationRoom())
|
||||
{
|
||||
add_fish();
|
||||
}
|
||||
else
|
||||
{
|
||||
Promptmgr.Instance.PromptBubble("¼¤»îʧ°Ü");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public void add_fish(string timerStr = null)//生成船只
|
||||
{
|
||||
//ActivationRoom()
|
||||
|
||||
if (timerStr != null)
|
||||
{
|
||||
@ -195,4 +205,10 @@ public class BaoshiRoomcontroller : MonoBehaviour
|
||||
}
|
||||
|
||||
|
||||
public async Task<bool> ActivationRoom()
|
||||
{
|
||||
return await miner_jiekou.instance.MiningActivate(this.RoomId);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -12,16 +12,6 @@ public class miner_jiekou : MonoBehaviour
|
||||
instance=this;
|
||||
}
|
||||
|
||||
public async void Start()
|
||||
{
|
||||
|
||||
List<MinngConfigData> a = await GetMinerInfo(10);
|
||||
foreach (MinngConfigData config in a)
|
||||
{
|
||||
Debug.LogError(config.Id);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// »ñÈ¡ÐÅÏ¢
|
||||
/// </summary>
|
||||
@ -30,8 +20,7 @@ public class miner_jiekou : MonoBehaviour
|
||||
public async Task<List<MinngConfigData>> GetMinerInfo(int index)
|
||||
{
|
||||
await _Login.TastLogin();
|
||||
|
||||
miningActivate go = new miningActivate();
|
||||
miningConfig go = new miningConfig();
|
||||
MiningConfigResponse info= await go.MiningConfig(index);
|
||||
return info.Data;
|
||||
}
|
||||
@ -42,11 +31,9 @@ public class miner_jiekou : MonoBehaviour
|
||||
/// </summary>
|
||||
/// <param name="index"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<MiningConfigResponse> GetMiningConfig(int index)
|
||||
public async Task<bool> MiningActivate(int index)
|
||||
{
|
||||
miningConfig go = new miningConfig();
|
||||
|
||||
MiningConfigResponse info=await go.MiningConfig(index);
|
||||
return info;
|
||||
miningActivate go = new miningActivate();
|
||||
return await go.MiningActivate(index);
|
||||
}
|
||||
}
|
||||
|
8
meng_yao/Assets/script/scene_Main/scene.meta
Normal file
8
meng_yao/Assets/script/scene_Main/scene.meta
Normal file
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 4b82b2aee5315b047b3811d00bae546d
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
38
meng_yao/Assets/script/scene_Main/scene/Scene_baoshidao.cs
Normal file
38
meng_yao/Assets/script/scene_Main/scene/Scene_baoshidao.cs
Normal file
@ -0,0 +1,38 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
public class Scene_baoshidao : MonoBehaviour
|
||||
{
|
||||
public static Scene_baoshidao instance;
|
||||
|
||||
public List<GameObject> lands = new List<GameObject>();
|
||||
|
||||
void Awake()
|
||||
{
|
||||
instance = this;
|
||||
}
|
||||
|
||||
void Start()
|
||||
{
|
||||
init();
|
||||
}
|
||||
|
||||
async void init()
|
||||
{
|
||||
List<MinngConfigData> infos = await miner_jiekou.instance.GetMinerInfo(0);
|
||||
|
||||
int index = 0;
|
||||
foreach (MinngConfigData info in infos)
|
||||
{
|
||||
lands[index].GetComponent<baoshidao_contorl>().RoomId = info.Id;
|
||||
lands[index].GetComponent<baoshidao_contorl>().daoyuName.text = info.Name;
|
||||
|
||||
lands[index].GetComponent<baoshidao_contorl>().ActivateValue = info.Price;
|
||||
lands[index].GetComponent<baoshidao_contorl>().goldNumerTextPro.text = info.Price.ToString("f0");
|
||||
|
||||
|
||||
index++;
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 238239424c8d81641831f183d26ed6c6
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
34
meng_yao/Assets/script/scene_Main/scene/Scene_baoshikuang.cs
Normal file
34
meng_yao/Assets/script/scene_Main/scene/Scene_baoshikuang.cs
Normal file
@ -0,0 +1,34 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
public class Scene_baoshikuang : MonoBehaviour
|
||||
{
|
||||
|
||||
public static Scene_baoshikuang instance;
|
||||
|
||||
public List<GameObject> lands = new List<GameObject>();
|
||||
|
||||
void Awake()
|
||||
{
|
||||
instance = this;
|
||||
}
|
||||
|
||||
void Start()
|
||||
{
|
||||
init();
|
||||
}
|
||||
|
||||
async void init()
|
||||
{
|
||||
List<MinngConfigData> infos=await miner_jiekou.instance.GetMinerInfo(1);
|
||||
|
||||
int index = 0;
|
||||
foreach (MinngConfigData info in infos)
|
||||
{
|
||||
lands[index].GetComponent<BaoshiRoomcontroller>().RoomId = info.Id;
|
||||
index++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b17752bf02f68d14997c4c928bd65d40
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -4,9 +4,16 @@ using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
using DG.Tweening;
|
||||
using TMPro;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
public class baoshidao_contorl : MonoBehaviour
|
||||
{
|
||||
|
||||
[Header("id")]
|
||||
public int RoomId;
|
||||
|
||||
public Text daoyuName;
|
||||
|
||||
[Header("渔船的预制体")]
|
||||
public GameObject fishManPrefab;
|
||||
[Header("购买的渔船数据")]
|
||||
@ -129,7 +136,7 @@ public class baoshidao_contorl : MonoBehaviour
|
||||
}
|
||||
}
|
||||
|
||||
public void OnClick()
|
||||
public async void OnClick()
|
||||
{
|
||||
|
||||
if (!canClick)
|
||||
@ -138,16 +145,17 @@ public class baoshidao_contorl : MonoBehaviour
|
||||
}
|
||||
|
||||
|
||||
ScaleAni(OnBtnAni);
|
||||
|
||||
|
||||
/*if (fishMan == null)
|
||||
if (await ActivationRoom())
|
||||
{
|
||||
Promptmgr.Instance.PromptBubble("还没有买船了", Color.black, Color.red);
|
||||
return;
|
||||
}*/
|
||||
ScaleAni(OnBtnAni);
|
||||
add_fish();
|
||||
}
|
||||
else
|
||||
{
|
||||
Promptmgr.Instance.PromptBubble("¼¤»îʧ°Ü");
|
||||
}
|
||||
|
||||
|
||||
add_fish();
|
||||
|
||||
}
|
||||
public void add_fish(string timerStr = null)//生成船只
|
||||
@ -287,21 +295,9 @@ public class baoshidao_contorl : MonoBehaviour
|
||||
|
||||
}
|
||||
|
||||
|
||||
//使用代金卷
|
||||
async void UseShip()
|
||||
public async Task<bool> ActivationRoom()
|
||||
{
|
||||
Use use = new Use(); // 使用渔夫
|
||||
use.Id = listItem[0].Id;
|
||||
string rect = await web.SendRequest(web.URL + "/Voucher/Use", "POST", JsonUtility.ToJson(use));
|
||||
Res res = JsonUtility.FromJson<ids>(rect);
|
||||
if (res.ErrorCode == 0)
|
||||
{
|
||||
Promptmgr.Instance.PromptBubble("使用成功", Color.black, Color.blue);
|
||||
}
|
||||
else
|
||||
{
|
||||
Promptmgr.Instance.PromptBubble(res.ErrorMessage, Color.black, Color.red);
|
||||
}
|
||||
return await miner_jiekou.instance.MiningActivate(this.RoomId);
|
||||
|
||||
}
|
||||
}
|
||||
|
8
meng_yao/Assets/script/serveTestScript/RMBmodule.meta
Normal file
8
meng_yao/Assets/script/serveTestScript/RMBmodule.meta
Normal file
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b1bcd7753d3dcaa4f9d747ca8dd11b9f
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -0,0 +1,48 @@
|
||||
using Newtonsoft.Json;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
using UnityEngine;
|
||||
//体现账户设置
|
||||
public class withdrawAccountUpdate : MonoBehaviour
|
||||
{
|
||||
public Dictionary<string, string> CreateHeaders()
|
||||
{
|
||||
if (string.IsNullOrEmpty(MyGlobal.global.loginResponse.Data.access_token))
|
||||
{
|
||||
Debug.LogWarning("尝试创建请求头时,token 未设置。");
|
||||
return new Dictionary<string, string>();
|
||||
}
|
||||
return new Dictionary<string, string>
|
||||
{
|
||||
|
||||
{ "Authorization","Bearer "+MyGlobal.global.loginResponse.Data.access_token },
|
||||
{ "client-info", "{\"platform\":\"ios\",\"phone_product\":\"apple\",\"phone_model\":\"iPhone_8\",\"system_version\":\"12.0\",\"screen_size\":\"750*1334\",\"device_no\":\"e3e277810fff9d955ebdd7037eff51a8\",\"version\":\"1.0.0\"}" }
|
||||
};
|
||||
}
|
||||
public async Task<bool> WithdrawAccountUpdate(int type,string name,string account,string additional)
|
||||
{
|
||||
WithdrawAccountUpdateBody body = new WithdrawAccountUpdateBody();
|
||||
body.type = type;
|
||||
body.name = name;
|
||||
body.account = account;
|
||||
body.additional = additional;
|
||||
Debug.Log("体现账户设置入参" + JsonConvert.SerializeObject(body));
|
||||
string response = await myWeb.SendRequest(myWeb.URL + "/api/withdraw/account/update", "POST", JsonConvert.SerializeObject(body), CreateHeaders());
|
||||
Debug.Log("体现账户设置" + response);
|
||||
//bbbb
|
||||
myResponse petBelltesResponse = JsonConvert.DeserializeObject<myResponse>(response);
|
||||
Debug.Log(petBelltesResponse.message);
|
||||
bool isSucceed;
|
||||
if (petBelltesResponse.code == 200) { isSucceed = true; } else { isSucceed = false; }
|
||||
return isSucceed;
|
||||
}
|
||||
}
|
||||
//==========================================================================================================================
|
||||
public class WithdrawAccountUpdateBody
|
||||
{
|
||||
public int type;
|
||||
public string name;
|
||||
public string account;
|
||||
public string additional;
|
||||
}
|
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 41e474c13b990cb4cba2c2fbeb929559
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -0,0 +1,48 @@
|
||||
using Newtonsoft.Json;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
using UnityEngine;
|
||||
//提现申请
|
||||
public class withdrawApply : MonoBehaviour
|
||||
{
|
||||
public Dictionary<string, string> CreateHeaders()
|
||||
{
|
||||
if (string.IsNullOrEmpty(MyGlobal.global.loginResponse.Data.access_token))
|
||||
{
|
||||
Debug.LogWarning("尝试创建请求头时,token 未设置。");
|
||||
return new Dictionary<string, string>();
|
||||
}
|
||||
return new Dictionary<string, string>
|
||||
{
|
||||
|
||||
{ "Authorization","Bearer "+MyGlobal.global.loginResponse.Data.access_token },
|
||||
{ "client-info", "{\"platform\":\"ios\",\"phone_product\":\"apple\",\"phone_model\":\"iPhone_8\",\"system_version\":\"12.0\",\"screen_size\":\"750*1334\",\"device_no\":\"e3e277810fff9d955ebdd7037eff51a8\",\"version\":\"1.0.0\"}" }
|
||||
};
|
||||
}
|
||||
public async Task<bool> WithdrawApply(int type,int amount,int account_type,string trade_password)
|
||||
{
|
||||
WithdrawApplyBody body = new WithdrawApplyBody();
|
||||
body.type = type;
|
||||
body.amount = amount;
|
||||
body.account_type = account_type;
|
||||
body.trade_password = trade_password;
|
||||
Debug.Log("提现申请入参===" + JsonConvert.SerializeObject(body));
|
||||
string response = await myWeb.SendRequest(myWeb.URL + "/api/withdraw/apply", "POST", JsonConvert.SerializeObject(body), CreateHeaders());
|
||||
Debug.Log("提现申请" + response);
|
||||
//bbbb
|
||||
myResponse petBelltesResponse = JsonConvert.DeserializeObject<myResponse>(response);
|
||||
Debug.Log("=========" + petBelltesResponse.message);
|
||||
bool isSucceed;
|
||||
if (petBelltesResponse.code == 200) { isSucceed = true; } else { isSucceed = false; }
|
||||
return isSucceed;
|
||||
}
|
||||
}
|
||||
//============================================================================
|
||||
public class WithdrawApplyBody
|
||||
{
|
||||
public int type;
|
||||
public int amount;
|
||||
public int account_type;
|
||||
public string trade_password;
|
||||
}
|
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a7b4c242ebe957d47b9395dec9cefa32
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -0,0 +1,88 @@
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
using UnityEngine;
|
||||
|
||||
public class withdrawConfig : MonoBehaviour
|
||||
{
|
||||
public Dictionary<string, string> CreateHeaders()
|
||||
{
|
||||
if (string.IsNullOrEmpty(MyGlobal.global.loginResponse.Data.access_token))
|
||||
{
|
||||
Debug.LogWarning("尝试创建请求头时,token 未设置。");
|
||||
return new Dictionary<string, string>();
|
||||
}
|
||||
return new Dictionary<string, string>
|
||||
{
|
||||
|
||||
{ "Authorization","Bearer "+MyGlobal.global.loginResponse.Data.access_token },
|
||||
{ "client-info", "{\"platform\":\"ios\",\"phone_product\":\"apple\",\"phone_model\":\"iPhone_8\",\"system_version\":\"12.0\",\"screen_size\":\"750*1334\",\"device_no\":\"e3e277810fff9d955ebdd7037eff51a8\",\"version\":\"1.0.0\"}" }
|
||||
};
|
||||
}
|
||||
public async Task<WithdrawConfigResponse> WithdrawConfig()
|
||||
{
|
||||
string response = await myWeb.SendRequest(myWeb.URL + "/api/withdraw/config", "GET", "{}", CreateHeaders());
|
||||
Debug.Log("提现配置" + response);
|
||||
//bbbb
|
||||
WithdrawConfigResponse withdrawConfigResponse = JsonConvert.DeserializeObject<WithdrawConfigResponse>(response);
|
||||
Debug.Log(withdrawConfigResponse.data.config.title);
|
||||
|
||||
return withdrawConfigResponse;
|
||||
}
|
||||
}
|
||||
//============================================================================
|
||||
public class WithdrawConfigResponse
|
||||
{
|
||||
|
||||
public int code { get; set; }
|
||||
|
||||
public string message { get; set; }
|
||||
|
||||
public WithdrawConfigData data { get; set; }
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public class WithdrawConfigData
|
||||
{
|
||||
|
||||
public WithdrawConfigConfig config { get; set; }
|
||||
|
||||
|
||||
public List<WithdrawConfigAccount> accounts { get; set; }
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public class WithdrawConfigConfig
|
||||
{
|
||||
|
||||
public int type { get; set; }
|
||||
|
||||
public string balance { get; set; }
|
||||
|
||||
public string title { get; set; }
|
||||
|
||||
public string explained { get; set; }
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public class WithdrawConfigAccount
|
||||
{
|
||||
|
||||
public int type { get; set; }
|
||||
|
||||
|
||||
public string title { get; set; }
|
||||
|
||||
public string icon { get; set; }
|
||||
|
||||
|
||||
public string name { get; set; }
|
||||
|
||||
public string account { get; set; }
|
||||
|
||||
public string additional { get; set; }
|
||||
|
||||
public int status { get; set; }
|
||||
}
|
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: eb03e2669dc6e284fac84755a823485a
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -0,0 +1,99 @@
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
using UnityEngine;
|
||||
|
||||
public class withdrawRecord : MonoBehaviour
|
||||
{
|
||||
public Dictionary<string, string> CreateHeaders()
|
||||
{
|
||||
if (string.IsNullOrEmpty(MyGlobal.global.loginResponse.Data.access_token))
|
||||
{
|
||||
Debug.LogWarning("尝试创建请求头时,token 未设置。");
|
||||
return new Dictionary<string, string>();
|
||||
}
|
||||
return new Dictionary<string, string>
|
||||
{
|
||||
|
||||
{ "Authorization","Bearer "+MyGlobal.global.loginResponse.Data.access_token },
|
||||
{ "client-info", "{\"platform\":\"ios\",\"phone_product\":\"apple\",\"phone_model\":\"iPhone_8\",\"system_version\":\"12.0\",\"screen_size\":\"750*1334\",\"device_no\":\"e3e277810fff9d955ebdd7037eff51a8\",\"version\":\"1.0.0\"}" }
|
||||
};
|
||||
}
|
||||
public async Task<WithdrawRecordResponse> WithdrawRecord()
|
||||
{
|
||||
string response = await myWeb.SendRequest(myWeb.URL + "/api/withdraw/list", "GET", "{}", CreateHeaders());
|
||||
Debug.Log("提现记录" + response);
|
||||
//bbbb
|
||||
WithdrawRecordResponse withdrawRecordResponse = JsonConvert.DeserializeObject<WithdrawRecordResponse>(response);
|
||||
Debug.Log(withdrawRecordResponse.data.pages.page_num);
|
||||
|
||||
return withdrawRecordResponse;
|
||||
}
|
||||
}
|
||||
//====================================================================================
|
||||
public class WithdrawRecordResponse
|
||||
{
|
||||
public int code { get; set; }
|
||||
|
||||
public string message { get; set; }
|
||||
|
||||
public WithdrawRecordData data { get; set; }
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public class WithdrawRecordData
|
||||
{
|
||||
public WithdrawRecordPages pages { get; set; }
|
||||
|
||||
public List<WithdrawRecords> list { get; set; }
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public class WithdrawRecordPages
|
||||
{
|
||||
public int page_num { get; set; }
|
||||
|
||||
public int page_size { get; set; }
|
||||
|
||||
public int curr_size { get; set; }
|
||||
|
||||
public int total_count { get; set; }
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public class WithdrawRecords
|
||||
{
|
||||
public int id { get; set; }
|
||||
|
||||
public int status { get; set; }
|
||||
|
||||
public int type { get; set; }
|
||||
|
||||
public string type_name { get; set; }
|
||||
|
||||
public int amount { get; set; }
|
||||
|
||||
public float actual_amount { get; set; }
|
||||
|
||||
public float poundage_fee { get; set; }
|
||||
|
||||
public float poundage_ratio { get; set; }
|
||||
|
||||
public int account_type { get; set; }
|
||||
|
||||
public string alipay_name { get; set; }
|
||||
|
||||
public string alipay_account { get; set; }
|
||||
|
||||
public string holder { get; set; }
|
||||
|
||||
public string card_no { get; set; }
|
||||
|
||||
public string bank_name { get; set; }
|
||||
|
||||
public string create_time { get; set; }
|
||||
|
||||
public string update_time { get; set; }
|
||||
}
|
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 70b4f675b6e692d4f99a849f139c9e32
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -3,7 +3,7 @@ using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
using UnityEngine;
|
||||
|
||||
//矿场激活
|
||||
public class miningActivate : MonoBehaviour
|
||||
{
|
||||
public Dictionary<string, string> CreateHeaders()
|
||||
@ -20,13 +20,33 @@ public class miningActivate : MonoBehaviour
|
||||
{ "client-info", "{\"platform\":\"ios\",\"phone_product\":\"apple\",\"phone_model\":\"iPhone_8\",\"system_version\":\"12.0\",\"screen_size\":\"750*1334\",\"device_no\":\"e3e277810fff9d955ebdd7037eff51a8\",\"version\":\"1.0.0\"}" }
|
||||
};
|
||||
}
|
||||
public async Task<MiningConfigResponse> MiningConfig(int type)//ÀàÐÍ 0:±¦Ê¯µº 1:±¦Ê¯¿ó³¡ 10:½ð±Òµº 11:½ð±Ò¿ó³¡
|
||||
public async Task<bool> MiningActivate(int id)//类型 0:宝石岛 1:宝石矿场 10:金币岛 11:金币矿场
|
||||
{
|
||||
string response = await myWeb.SendRequest(myWeb.URL + "/api/mining/config/" + type, "GET", "{}", CreateHeaders());
|
||||
Debug.Log("¿ó³¡ÅäÖÃ" + response);
|
||||
MiningConfigBody body = new MiningConfigBody();
|
||||
body.id = id;
|
||||
string response = await myWeb.SendRequest(myWeb.URL + "/api/mining/activate", "POST", JsonConvert.SerializeObject(body), CreateHeaders());
|
||||
Debug.Log("矿场激活" + response);
|
||||
//bbbb
|
||||
MiningConfigResponse miningConfigResponse = JsonConvert.DeserializeObject<MiningConfigResponse>(response);
|
||||
myResponse miningActivateResponse = JsonConvert.DeserializeObject<myResponse>(response);
|
||||
//Debug.Log("======kc================" + miningConfigResponse.Data[0].Name);
|
||||
return miningConfigResponse;
|
||||
bool isSucceed;
|
||||
if (miningActivateResponse.code == 200)
|
||||
{
|
||||
Debug.Log("编号"+id+"激活成功");
|
||||
isSucceed = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.Log("编号" + id + "激活失败");
|
||||
isSucceed = false;
|
||||
}
|
||||
|
||||
return isSucceed;
|
||||
}
|
||||
}
|
||||
//=========================
|
||||
public class MiningConfigBody
|
||||
{
|
||||
public int id;
|
||||
}
|
||||
|
||||
|
@ -3,7 +3,7 @@ using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
using UnityEngine;
|
||||
//シ、サ錞<EFBFBD>。
|
||||
//ソ<EFBFBD>。ナ葷テ
|
||||
public class miningConfig : MonoBehaviour
|
||||
{
|
||||
public Dictionary<string, string> CreateHeaders()
|
||||
|
Loading…
Reference in New Issue
Block a user