This commit is contained in:
GL 2025-01-04 18:10:28 +08:00
commit 428de2d35b
31 changed files with 2536 additions and 191 deletions

View File

@ -1043,6 +1043,7 @@ MonoBehaviour:
IdBtn: {fileID: 1888475739171819190} IdBtn: {fileID: 1888475739171819190}
IdText: {fileID: 1888475739408919645} IdText: {fileID: 1888475739408919645}
username: {fileID: 1888475739198054969} username: {fileID: 1888475739198054969}
head: {fileID: 1888475738326150204}
--- !u!1 &1888475739171819188 --- !u!1 &1888475739171819188
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: d180986aa70c1c1439d24ec6aa141683
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -97,6 +97,7 @@ MonoBehaviour:
username: {fileID: 3835179725328637314} username: {fileID: 3835179725328637314}
userid: {fileID: 3835179723944946966} userid: {fileID: 3835179723944946966}
GiveBtn: {fileID: 3835179723751752291} GiveBtn: {fileID: 3835179723751752291}
GiveawayNumber: {fileID: 8191181331549273727, guid: d180986aa70c1c1439d24ec6aa141683, type: 3}
uid: uid:
--- !u!1 &3835179723641606691 --- !u!1 &3835179723641606691
GameObject: GameObject:

View File

@ -343,6 +343,7 @@ MonoBehaviour:
Activecount: {fileID: 3095757104724791354} Activecount: {fileID: 3095757104724791354}
RegisterTime: {fileID: 2554716571525085631} RegisterTime: {fileID: 2554716571525085631}
waterNumber: {fileID: 5673584769543089576} waterNumber: {fileID: 5673584769543089576}
headsprite: {fileID: 3775845607762266819}
--- !u!1 &4556036416265401581 --- !u!1 &4556036416265401581
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0

File diff suppressed because it is too large Load Diff

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

View File

@ -0,0 +1,123 @@
fileFormatVersion: 2
guid: f5b1db4774beacc4583f991f993702c7
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 12
mipmaps:
mipMapMode: 0
enableMipMap: 0
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
vTOnly: 0
ignoreMasterTextureLimit: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: 1
aniso: 1
mipBias: 0
wrapU: 1
wrapV: 1
wrapW: 0
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 1
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 8
textureShape: 1
singleChannelComponent: 0
flipbookRows: 1
flipbookColumns: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
ignorePngGamma: 0
applyGammaDecoding: 0
cookieLightType: 0
platformSettings:
- serializedVersion: 3
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Android
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID: 5e97eb03825dee720800000000000000
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
nameFileIdTable: {}
spritePackingTag:
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
userData:
assetBundleName:
assetBundleVariant:

View File

@ -13,7 +13,7 @@ public class HeadTanchuang : MonoBehaviour
public RectTransform AvatarRect; public RectTransform AvatarRect;
Vector3 Deflate = new Vector3(0.5f, 0.5f, 0.5f); Vector3 Deflate = new Vector3(0.5f, 0.5f, 0.5f);
public Transform canvas; public Transform canvas;
public Image head;
@ -45,5 +45,6 @@ public class HeadTanchuang : MonoBehaviour
PlayerInfoData _PlayerInfoData = await Scene_main_jiekou.instance.PlayerInfos(); PlayerInfoData _PlayerInfoData = await Scene_main_jiekou.instance.PlayerInfos();
this.Name.text =_PlayerInfoData.nickname.ToString(); this.Name.text =_PlayerInfoData.nickname.ToString();
this.Id.text = _PlayerInfoData.uid.ToString(); this.Id.text = _PlayerInfoData.uid.ToString();
this.head.sprite = await Scene_main_jiekou.instance.ImageLoaderSprite(_PlayerInfoData.avatar_url);
} }
} }

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: ff6b29309c45aaa4da821da053e0861c
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,46 @@
using Newtonsoft.Json;
using System.Collections;
using System.Collections.Generic;
using System.Threading.Tasks;
using UnityEngine;
public class Auctioncertificate: 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<certificateResponse> certificates()
{
string response = await myWeb.SendRequest(myWeb.URL + "/api/island/cert_list", "GET", "{}", CreateHeaders());
Debug.Log("岛主证书" + response);
certificateResponse certificate = JsonConvert.DeserializeObject<certificateResponse>(response);
//Debug.Log(teamInfo.Data.Info.Nickname);
return certificate;
}
}
public class certificateResponse: myResponse
{
public List<certificateData> Data { get; set; }
}
public class certificateData
{
public string uid { get; set; }
public string nickname { get; set; }
public string serial_no { get; set; }
public int copies { get; set; }
public string island_name { get; set; }
public string issue_date { get; set; }
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: acd9ea8f9fcf28f41ac1fe76a6a7e0a4
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,46 @@
using Newtonsoft.Json;
using System.Collections;
using System.Collections.Generic;
using System.Threading.Tasks;
using UnityEngine;
public class Auctioninformation: 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<AuctionResponse> InformationTask()
{
string response = await myWeb.SendRequest(myWeb.URL + "/api/island/info", "GET", "{}", CreateHeaders());
Debug.Log("岛主信息" + response);
AuctionResponse Island = JsonConvert.DeserializeObject<AuctionResponse>(response);
//Debug.Log(teamInfo.Data.Info.Nickname);
return Island;
}
}
public class AuctionResponse: myResponse
{
public AuctionData Data { get; set; }
}
public class AuctionData
{
public float gold { get; set; }
public string intro_text { get; set; }
public int countdown { get; set; }
public int island_id { get; set; }
public string island_name { get; set; }
public float invest_total { get; set; }
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 82907bb754fe74643be310ebe0654f63
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,46 @@
using Newtonsoft.Json;
using System.Collections;
using System.Collections.Generic;
using System.Threading.Tasks;
using UnityEngine;
public class Islandownerbidding: 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<IslandResponse> Island(Islandbody islandbody)
{
Debug.Log("岛主竞拍入参" + JsonConvert.SerializeObject(islandbody));
string response = await myWeb.SendRequest(myWeb.URL + "/api/island/submit", "POST", JsonConvert.SerializeObject(islandbody), CreateHeaders());
Debug.Log("岛主竞拍" + response);
IslandResponse Island = JsonConvert.DeserializeObject<IslandResponse>(response);
//Debug.Log(teamInfo.Data.Info.Nickname);
return Island;
}
}
public class Islandbody
{
public int count;
}
public class IslandResponse:myResponse
{
public IslandData Data { get; set; }
}
public class IslandData
{
public float balance { get; set; }
public float invest_total { get; set; }
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 70cf240f9a42b134181a608af77f0995
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -10,17 +10,19 @@ public class Promotion_Rank : MonoBehaviour
public Text FirstName; public Text FirstName;
public Text Firstcount; public Text Firstcount;
public Text FitstPrize; public Text FitstPrize;
public Image Fitsthead;
public Text Secondlevel; public Text Secondlevel;
public Text SecondName; public Text SecondName;
public Text Secondcount; public Text Secondcount;
public Text SecondPrize; public Text SecondPrize;
public Image Secondhead;
public Text Thirdlevel; public Text Thirdlevel;
public Text ThirdName; public Text ThirdName;
public Text Thirdcount; public Text Thirdcount;
public Text ThirdPrize; public Text ThirdPrize;
public Image Thirdhead;
public GameObject Promotionitem; public GameObject Promotionitem;
public Transform Content; public Transform Content;
@ -50,6 +52,7 @@ public class Promotion_Rank : MonoBehaviour
FirstName.text = response.data.ranks[0].nickname; FirstName.text = response.data.ranks[0].nickname;
Firstcount.text = response.data.ranks[0].quantity + "/" + response.data.ranks[0].require; Firstcount.text = response.data.ranks[0].quantity + "/" + response.data.ranks[0].require;
FitstPrize.text = response.data.ranks[0].reward.ToString(); FitstPrize.text = response.data.ranks[0].reward.ToString();
Fitsthead.sprite = await Scene_main_jiekou.instance.ImageLoaderSprite(response.data.ranks[0].avatar_url);
Secondlevel.text ="2"; Secondlevel.text ="2";
SecondName.text = ""; SecondName.text = "";
@ -68,11 +71,13 @@ public class Promotion_Rank : MonoBehaviour
FirstName.text = response.data.ranks[0].nickname; FirstName.text = response.data.ranks[0].nickname;
Firstcount.text = response.data.ranks[0].quantity + "/" + response.data.ranks[0].require; Firstcount.text = response.data.ranks[0].quantity + "/" + response.data.ranks[0].require;
FitstPrize.text = response.data.ranks[0].reward.ToString(); FitstPrize.text = response.data.ranks[0].reward.ToString();
Fitsthead.sprite = await Scene_main_jiekou.instance.ImageLoaderSprite(response.data.ranks[0].avatar_url);
Secondlevel.text = response.data.ranks[1].rank.ToString(); Secondlevel.text = response.data.ranks[1].rank.ToString();
SecondName.text = response.data.ranks[1].nickname; SecondName.text = response.data.ranks[1].nickname;
Secondcount.text = response.data.ranks[1].quantity + "/" + response.data.ranks[1].require; Secondcount.text = response.data.ranks[1].quantity + "/" + response.data.ranks[1].require;
SecondPrize.text = response.data.ranks[1].reward.ToString(); SecondPrize.text = response.data.ranks[1].reward.ToString();
Secondhead.sprite = await Scene_main_jiekou.instance.ImageLoaderSprite(response.data.ranks[1].avatar_url);
Thirdlevel.text = "3"; Thirdlevel.text = "3";
ThirdName.text = ""; ThirdName.text = "";
@ -85,16 +90,19 @@ public class Promotion_Rank : MonoBehaviour
FirstName.text = response.data.ranks[0].nickname; FirstName.text = response.data.ranks[0].nickname;
Firstcount.text = response.data.ranks[0].quantity + "/" + response.data.ranks[0].require; Firstcount.text = response.data.ranks[0].quantity + "/" + response.data.ranks[0].require;
FitstPrize.text = response.data.ranks[0].reward.ToString(); FitstPrize.text = response.data.ranks[0].reward.ToString();
Fitsthead.sprite = await Scene_main_jiekou.instance.ImageLoaderSprite(response.data.ranks[0].avatar_url);
Secondlevel.text = response.data.ranks[1].rank.ToString(); Secondlevel.text = response.data.ranks[1].rank.ToString();
SecondName.text = response.data.ranks[1].nickname; SecondName.text = response.data.ranks[1].nickname;
Secondcount.text = response.data.ranks[1].quantity + "/" + response.data.ranks[1].require; Secondcount.text = response.data.ranks[1].quantity + "/" + response.data.ranks[1].require;
SecondPrize.text = response.data.ranks[1].reward.ToString(); SecondPrize.text = response.data.ranks[1].reward.ToString();
Secondhead.sprite = await Scene_main_jiekou.instance.ImageLoaderSprite(response.data.ranks[1].avatar_url);
Thirdlevel.text = response.data.ranks[2].rank.ToString(); Thirdlevel.text = response.data.ranks[2].rank.ToString();
ThirdName.text = response.data.ranks[2].nickname; ThirdName.text = response.data.ranks[2].nickname;
Thirdcount.text = response.data.ranks[2].quantity + "/" + response.data.ranks[2].require; Thirdcount.text = response.data.ranks[2].quantity + "/" + response.data.ranks[2].require;
ThirdPrize.text = response.data.ranks[2].reward.ToString(); ThirdPrize.text = response.data.ranks[2].reward.ToString();
Thirdhead.sprite = await Scene_main_jiekou.instance.ImageLoaderSprite(response.data.ranks[2].avatar_url);
} }
for (int i = 3; i < response.data.ranks.Count; i++) for (int i = 3; i < response.data.ranks.Count; i++)
@ -105,6 +113,7 @@ public class Promotion_Rank : MonoBehaviour
obj.GetComponent<Promotion_Rankitem>().username.text = response.data.ranks[i].nickname; obj.GetComponent<Promotion_Rankitem>().username.text = response.data.ranks[i].nickname;
obj.GetComponent<Promotion_Rankitem>().prize.text = response.data.ranks[i].reward+"ÔªÏÖ½ð½±Àø"; obj.GetComponent<Promotion_Rankitem>().prize.text = response.data.ranks[i].reward+"ÔªÏÖ½ð½±Àø";
obj.GetComponent<Promotion_Rankitem>().count.text = response.data.ranks[i].quantity + "/" + response.data.ranks[i].require; obj.GetComponent<Promotion_Rankitem>().count.text = response.data.ranks[i].quantity + "/" + response.data.ranks[i].require;
obj.GetComponent<Promotion_Rankitem>().userImage.sprite = await Scene_main_jiekou.instance.ImageLoaderSprite(response.data.ranks[i].avatar_url);
} }

View File

@ -10,6 +10,7 @@ public class ReviseName : mount
public Text NameText; public Text NameText;
public Text IdText; public Text IdText;
public Text island; public Text island;
public Image head;
public GameObject headTanchuang; public GameObject headTanchuang;
// Start is called before the first frame update // Start is called before the first frame update
@ -63,6 +64,7 @@ public class ReviseName : mount
this.NameText.text = info.nickname.ToString(); this.NameText.text = info.nickname.ToString();
this.IdText.text = info.uid.ToString(); this.IdText.text = info.uid.ToString();
island.text = "³öÉúµØ£º"+info.island_name; island.text = "³öÉúµØ£º"+info.island_name;
this.head.sprite = await Scene_main_jiekou.instance.ImageLoaderSprite(info.avatar_url);
this.gameObject.SetActive(true); this.gameObject.SetActive(true);
} }
} }

View File

@ -7,6 +7,7 @@ using UnityEngine;
public class Scene_main_jiekou :MonoBehaviour public class Scene_main_jiekou :MonoBehaviour
{ {
ImageLoader ImageLoader = new ImageLoader();//解析头像类
login _Login = new login(); login _Login = new login();
logout logout = new logout(); logout logout = new logout();
treeInfo TreeInfoss = new treeInfo(); treeInfo TreeInfoss = new treeInfo();
@ -50,6 +51,9 @@ public class Scene_main_jiekou :MonoBehaviour
treeluckywheel treeluckywheel = new treeluckywheel(); treeluckywheel treeluckywheel = new treeluckywheel();
treeluckywheeldraw treeluckywheeldraw = new treeluckywheeldraw(); treeluckywheeldraw treeluckywheeldraw = new treeluckywheeldraw();
treeluckywheeladvert treeluckywheeladvert = new treeluckywheeladvert(); treeluckywheeladvert treeluckywheeladvert = new treeluckywheeladvert();
Auctioninformation auctioninformation = new Auctioninformation();
Auctioncertificate auctioncertificate=new Auctioncertificate();
Islandownerbidding islandownerbidding=new Islandownerbidding();
public static Scene_main_jiekou instance; public static Scene_main_jiekou instance;
//public PlayerInfoData infoData; //public PlayerInfoData infoData;
@ -64,6 +68,11 @@ public class Scene_main_jiekou :MonoBehaviour
IsTaskLoging = false; IsTaskLoging = false;
} }
public async Task<Sprite> ImageLoaderSprite(string url)
{
return await ImageLoader.LoadImageAsync(url);
}
public async Task<bool> Logouts()//µÇ¼Í˳ö public async Task<bool> Logouts()//µÇ¼Í˳ö
{ {
return await logout.Logout(); return await logout.Logout();
@ -346,5 +355,32 @@ public class Scene_main_jiekou :MonoBehaviour
return await treeluckywheeladvert.Treeluckywheeladverts(body); return await treeluckywheeladvert.Treeluckywheeladverts(body);
} }
/// <summary>
/// 岛主竞拍信息
/// </summary>
/// <returns></returns>
public async Task<AuctionResponse> Auctioninformations()
{
return await auctioninformation.InformationTask();
}
/// <summary>
/// 岛主证书
/// </summary>
/// <returns></returns>
public async Task<certificateResponse> AuctionCertificate()
{
return await auctioncertificate.certificates();
}
/// <summary>
/// 岛主竞拍
/// </summary>
/// <param name="count"></param>
/// <returns></returns>
public async Task<IslandResponse> Island(int count)
{
Islandbody body = new Islandbody();
body.count = count;
return await islandownerbidding.Island(body);
}
} }

View File

@ -13,10 +13,12 @@ public class Tree_team : MonoBehaviour
public GameObject start; public GameObject start;
public GameObject Invitewaterobj; public GameObject Invitewaterobj;
public Text waternumner; public Text waternumner;
public Image head;
public Text Inviteusername; public Text Inviteusername;
public Text Inviteuserid; public Text Inviteuserid;
public Text Invitewaternumner; public Text Invitewaternumner;
public Image Invitehead;
public Text ActiveUsers; public Text ActiveUsers;
public Text TeamName; public Text TeamName;
@ -36,6 +38,7 @@ public class Tree_team : MonoBehaviour
{ {
Inviteusername.text = info.Data.inviter.Nickname; Inviteusername.text = info.Data.inviter.Nickname;
Inviteuserid.text = info.Data.inviter.Uid; Inviteuserid.text = info.Data.inviter.Uid;
Invitehead.sprite = await Scene_main_jiekou.instance.ImageLoaderSprite(info.Data.inviter.avatar_url);
Invitewaternumner.text =info.Data.inviter.water.ToString(); Invitewaternumner.text =info.Data.inviter.water.ToString();
Invitewaterobj.gameObject.SetActive(true); Invitewaterobj.gameObject.SetActive(true);
start.gameObject.SetActive(true); start.gameObject.SetActive(true);
@ -54,6 +57,7 @@ public class Tree_team : MonoBehaviour
DirectPushFill.fillAmount = (float)info.Data.Info.directly_active_count / info.Data.Info.directly_count; DirectPushFill.fillAmount = (float)info.Data.Info.directly_active_count / info.Data.Info.directly_count;
PushNum.text = info.Data.Info.team_active_count + "/" + info.Data.Info.team_count; PushNum.text = info.Data.Info.team_active_count + "/" + info.Data.Info.team_count;
PushFill.fillAmount = (float)info.Data.Info.team_active_count/info.Data.Info.team_count; PushFill.fillAmount = (float)info.Data.Info.team_active_count/info.Data.Info.team_count;
head.sprite= await Scene_main_jiekou.instance.ImageLoaderSprite(info.Data.Info.avatar_url);
Init(); Init();
} }
@ -75,6 +79,7 @@ public class Tree_team : MonoBehaviour
obj.GetComponent<Tree_team_item>().Activecount.text = "»îÔ¾ÈËÊý:" + response.Data.List[i].team_active_count; obj.GetComponent<Tree_team_item>().Activecount.text = "»îÔ¾ÈËÊý:" + response.Data.List[i].team_active_count;
obj.GetComponent<Tree_team_item>().RegisterTime.text = "×¢²áʱ¼ä:"+ response.Data.List[i].create_time; obj.GetComponent<Tree_team_item>().RegisterTime.text = "×¢²áʱ¼ä:"+ response.Data.List[i].create_time;
obj.GetComponent<Tree_team_item>().waterNumber.text = response.Data.List[i].water.ToString(); obj.GetComponent<Tree_team_item>().waterNumber.text = response.Data.List[i].water.ToString();
obj.GetComponent<Tree_team_item>().headsprite.sprite = await Scene_main_jiekou.instance.ImageLoaderSprite(response.Data.List[i].avatar_url);
} }
} }

View File

@ -12,7 +12,7 @@ public class Tree_team_item : MonoBehaviour
public Text Activecount; public Text Activecount;
public Text RegisterTime; public Text RegisterTime;
public Text waterNumber; public Text waterNumber;
public Image headsprite;
void Start() void Start()
{ {

View File

@ -12,6 +12,7 @@ public class GhItem : MonoBehaviour
public Button IdBtn; public Button IdBtn;
public Text IdText; public Text IdText;
public Text username; public Text username;
public Image head;
Clipboard clipboard = new Clipboard(); Clipboard clipboard = new Clipboard();
void Start() void Start()

View File

@ -23,6 +23,7 @@ public class GhPanel : MonoBehaviour
obj.GetComponent<GhItem>().username.text = info.Data.members[i].name; obj.GetComponent<GhItem>().username.text = info.Data.members[i].name;
obj.GetComponent<GhItem>().WxText.text = info.Data.members[i].wechat; obj.GetComponent<GhItem>().WxText.text = info.Data.members[i].wechat;
obj.GetComponent<GhItem>().QqText.text = info.Data.members[i].qq; obj.GetComponent<GhItem>().QqText.text = info.Data.members[i].qq;
obj.GetComponent<GhItem>().head.sprite = await Scene_main_jiekou.instance.ImageLoaderSprite(info.Data.members[i].avatar_url);
} }
} }

View File

@ -0,0 +1,48 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class GiveawayNumberPanel : MonoBehaviour
{
public InputField GiftQuantity;
public InputField TransferPassword;
[HideInInspector]
public string uid;
public Button CloseBtn;
public Button CancelBtn;
public Button SureBtn;
void Start()
{
CloseBtn.onClick.AddListener(CloseClick);
CancelBtn.onClick.AddListener(CloseClick);
SureBtn.onClick.AddListener(SureClick);
}
async void SureClick()
{
int num = int.Parse(GiftQuantity.text);
Debug.Log(uid);
Debug.Log(num);
Debug.Log(TransferPassword.text);
bool issuccefull = await Scene_main_jiekou.instance.TransferapplyInfos(uid, num, TransferPassword.text);
if (issuccefull)
{
Destroy(this.gameObject);
}
}
void CloseClick()
{
Destroy(this.gameObject);
}
// Update is called once per frame
void Update()
{
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 11b96df38ece1ed458f727827c1b3a1b
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -11,7 +11,7 @@ public class GiveawayPanel : MonoBehaviour
public GameObject Giveawayitem; public GameObject Giveawayitem;
public Transform Connact; public Transform Connact;
ImageLoader ImageLoader = new ImageLoader();
List<GameObject> itemlist = new List<GameObject>(); List<GameObject> itemlist = new List<GameObject>();
void Start() void Start()
@ -32,7 +32,7 @@ public class GiveawayPanel : MonoBehaviour
{ {
GameObject obj = Instantiate(Giveawayitem, Connact); GameObject obj = Instantiate(Giveawayitem, Connact);
itemlist.Add(obj); itemlist.Add(obj);
obj.GetComponent<Giveawayitem>().head.sprite = await ImageLoader.LoadImageAsync(info.data.avatar_url); obj.GetComponent<Giveawayitem>().head.sprite = await Scene_main_jiekou.instance.ImageLoaderSprite(info.data.avatar_url);
obj.GetComponent<Giveawayitem>().username.text = info.data.name; obj.GetComponent<Giveawayitem>().username.text = info.data.name;
obj.GetComponent<Giveawayitem>().uid = info.data.uid; obj.GetComponent<Giveawayitem>().uid = info.data.uid;
obj.GetComponent<Giveawayitem>().userid.text = info.data.uid; obj.GetComponent<Giveawayitem>().userid.text = info.data.uid;

View File

@ -8,17 +8,21 @@ public class Giveawayitem : MonoBehaviour
public Text username; public Text username;
public Text userid; public Text userid;
public Button GiveBtn; public Button GiveBtn;
public GameObject GiveawayNumber;
public Transform canvas;
[HideInInspector] [HideInInspector]
public string uid; public string uid;
void Start() void Start()
{ {
GiveBtn.onClick.AddListener(GiveClick); GiveBtn.onClick.AddListener(GiveClick);
canvas = GameObject.Find("myCanvas").transform;
} }
void GiveClick() void GiveClick()
{ {
GameObject obj = Instantiate(GiveawayNumber,canvas);
obj.GetComponent<GiveawayNumberPanel>().uid= uid;
} }
// Update is called once per frame // Update is called once per frame

View File

@ -55,7 +55,7 @@ public class IllustrationsAssetDetails : MonoBehaviour
WaterText.text = _PlayerInfoData.water.ToString("F2"); WaterText.text = _PlayerInfoData.water.ToString("F2");
UserName.text = _PlayerInfoData.nickname.ToString(); UserName.text = _PlayerInfoData.nickname.ToString();
UserID.text = _PlayerInfoData.uid.ToString(); UserID.text = _PlayerInfoData.uid.ToString();
UserHead.sprite = await Scene_main_jiekou.instance.ImageLoaderSprite(_PlayerInfoData.avatar_url);
_PlayerInfoData = null; _PlayerInfoData = null;
// 异步操作完成,标记为未执行 // 异步操作完成,标记为未执行
isUpdating = false; isUpdating = false;

View File

@ -44,6 +44,7 @@ public class QuanwangPanel : MonoBehaviour
quanwangListItemFirstobj.GetComponent<quanwangListItemFirst>().start[i].gameObject.SetActive(true); quanwangListItemFirstobj.GetComponent<quanwangListItemFirst>().start[i].gameObject.SetActive(true);
} }
quanwangListItemFirstobj.GetComponent<quanwangListItemFirst>().moneynumber.text = response.data.ranks[0].amount.ToString(); quanwangListItemFirstobj.GetComponent<quanwangListItemFirst>().moneynumber.text = response.data.ranks[0].amount.ToString();
quanwangListItemFirstobj.GetComponent<quanwangListItemFirst>().headicon.sprite = await Scene_main_jiekou.instance.ImageLoaderSprite(response.data.ranks[0].avatar_url);
} }
if (response.data.ranks.Length == 2) if (response.data.ranks.Length == 2)
{ {
@ -59,6 +60,7 @@ public class QuanwangPanel : MonoBehaviour
quanwangListItemFirstobj2.GetComponent<quanwangListItemFirst>().start[i].gameObject.SetActive(true); quanwangListItemFirstobj2.GetComponent<quanwangListItemFirst>().start[i].gameObject.SetActive(true);
} }
quanwangListItemFirstobj2.GetComponent<quanwangListItemFirst>().moneynumber.text = response.data.ranks[0].amount.ToString(); quanwangListItemFirstobj2.GetComponent<quanwangListItemFirst>().moneynumber.text = response.data.ranks[0].amount.ToString();
quanwangListItemFirstobj2.GetComponent<quanwangListItemFirst>().headicon.sprite = await Scene_main_jiekou.instance.ImageLoaderSprite(response.data.ranks[0].avatar_url);
quanwangListItemScecondobj.GetComponent<quanwangListItemScecond>().username.text = response.data.ranks[1].nickname; quanwangListItemScecondobj.GetComponent<quanwangListItemScecond>().username.text = response.data.ranks[1].nickname;
quanwangListItemScecondobj.GetComponent<quanwangListItemScecond>().userid.text = response.data.ranks[1].uid; quanwangListItemScecondobj.GetComponent<quanwangListItemScecond>().userid.text = response.data.ranks[1].uid;
@ -67,6 +69,7 @@ public class QuanwangPanel : MonoBehaviour
quanwangListItemScecondobj.GetComponent<quanwangListItemScecond>().start[i].gameObject.SetActive(true); quanwangListItemScecondobj.GetComponent<quanwangListItemScecond>().start[i].gameObject.SetActive(true);
} }
quanwangListItemScecondobj.GetComponent<quanwangListItemScecond>().moneynumber.text = response.data.ranks[1].amount.ToString(); quanwangListItemScecondobj.GetComponent<quanwangListItemScecond>().moneynumber.text = response.data.ranks[1].amount.ToString();
quanwangListItemScecondobj.GetComponent<quanwangListItemScecond>().headicon.sprite = await Scene_main_jiekou.instance.ImageLoaderSprite(response.data.ranks[1].avatar_url);
} }
if (response.data.ranks.Length >= 3) if (response.data.ranks.Length >= 3)
@ -84,6 +87,7 @@ public class QuanwangPanel : MonoBehaviour
quanwangListItemFirstobj3.GetComponent<quanwangListItemFirst>().start[i].gameObject.SetActive(true); quanwangListItemFirstobj3.GetComponent<quanwangListItemFirst>().start[i].gameObject.SetActive(true);
} }
quanwangListItemFirstobj3.GetComponent<quanwangListItemFirst>().moneynumber.text = response.data.ranks[0].amount.ToString(); quanwangListItemFirstobj3.GetComponent<quanwangListItemFirst>().moneynumber.text = response.data.ranks[0].amount.ToString();
quanwangListItemFirstobj3.GetComponent<quanwangListItemFirst>().headicon.sprite = await Scene_main_jiekou.instance.ImageLoaderSprite(response.data.ranks[0].avatar_url);
quanwangListItemScecondobj2.GetComponent<quanwangListItemScecond>().username.text = response.data.ranks[1].nickname; quanwangListItemScecondobj2.GetComponent<quanwangListItemScecond>().username.text = response.data.ranks[1].nickname;
quanwangListItemScecondobj2.GetComponent<quanwangListItemScecond>().userid.text = response.data.ranks[1].uid; quanwangListItemScecondobj2.GetComponent<quanwangListItemScecond>().userid.text = response.data.ranks[1].uid;
@ -92,6 +96,7 @@ public class QuanwangPanel : MonoBehaviour
quanwangListItemScecondobj2.GetComponent<quanwangListItemScecond>().start[i].gameObject.SetActive(true); quanwangListItemScecondobj2.GetComponent<quanwangListItemScecond>().start[i].gameObject.SetActive(true);
} }
quanwangListItemScecondobj2.GetComponent<quanwangListItemScecond>().moneynumber.text = response.data.ranks[1].amount.ToString(); quanwangListItemScecondobj2.GetComponent<quanwangListItemScecond>().moneynumber.text = response.data.ranks[1].amount.ToString();
quanwangListItemScecondobj2.GetComponent<quanwangListItemScecond>().headicon.sprite = await Scene_main_jiekou.instance.ImageLoaderSprite(response.data.ranks[1].avatar_url);
quanwangListItemTirdobj.GetComponent<quanwangListItemTird>().username.text = response.data.ranks[2].nickname; quanwangListItemTirdobj.GetComponent<quanwangListItemTird>().username.text = response.data.ranks[2].nickname;
quanwangListItemTirdobj.GetComponent<quanwangListItemTird>().userid.text = response.data.ranks[2].uid; quanwangListItemTirdobj.GetComponent<quanwangListItemTird>().userid.text = response.data.ranks[2].uid;
@ -100,6 +105,7 @@ public class QuanwangPanel : MonoBehaviour
quanwangListItemTirdobj.GetComponent<quanwangListItemTird>().start[i].gameObject.SetActive(true); quanwangListItemTirdobj.GetComponent<quanwangListItemTird>().start[i].gameObject.SetActive(true);
} }
quanwangListItemTirdobj.GetComponent<quanwangListItemTird>().moneynumber.text = response.data.ranks[2].amount.ToString(); quanwangListItemTirdobj.GetComponent<quanwangListItemTird>().moneynumber.text = response.data.ranks[2].amount.ToString();
quanwangListItemTirdobj.GetComponent<quanwangListItemTird>().headicon.sprite = await Scene_main_jiekou.instance.ImageLoaderSprite(response.data.ranks[2].avatar_url);
} }
@ -115,6 +121,7 @@ public class QuanwangPanel : MonoBehaviour
quanwangListItemobj.GetComponent<quanwangListItem>().start[j].gameObject.SetActive(true); quanwangListItemobj.GetComponent<quanwangListItem>().start[j].gameObject.SetActive(true);
} }
quanwangListItemobj.GetComponent<quanwangListItem>().moneynumber.text = response.data.ranks[i].amount.ToString(); quanwangListItemobj.GetComponent<quanwangListItem>().moneynumber.text = response.data.ranks[i].amount.ToString();
quanwangListItemobj.GetComponent<quanwangListItem>().headicon.sprite = await Scene_main_jiekou.instance.ImageLoaderSprite(response.data.ranks[i].avatar_url);
} }
if (response.data.bottom_show == 1) if (response.data.bottom_show == 1)
@ -128,6 +135,7 @@ public class QuanwangPanel : MonoBehaviour
quanwangSelfListItem.GetComponent<quanwangListItemTird>().start[i].gameObject.SetActive(true); quanwangSelfListItem.GetComponent<quanwangListItemTird>().start[i].gameObject.SetActive(true);
} }
quanwangSelfListItem.GetComponent<quanwangSelfListItem>().moneynumber.text = response.data.bottom_rank.amount.ToString(); quanwangSelfListItem.GetComponent<quanwangSelfListItem>().moneynumber.text = response.data.bottom_rank.amount.ToString();
quanwangSelfListItem.GetComponent<quanwangSelfListItem>().headicon.sprite = await Scene_main_jiekou.instance.ImageLoaderSprite( response.data.bottom_rank.avatar_url);
} }
else else
{ {

View File

@ -23,9 +23,9 @@ public class transferapply : MonoBehaviour
public async Task<bool> TransferapplyInfo(transferapplyBody body) public async Task<bool> TransferapplyInfo(transferapplyBody body)
{ {
Debug.Log(JsonConvert.SerializeObject(body) + "Èë²Î========="); Debug.Log(JsonConvert.SerializeObject(body) + "תÔöÉêÇëÈë²Î=========");
string response = await myWeb.SendRequest(myWeb.URL + "/api/capital/transfer/apply", "POST", JsonConvert.SerializeObject(body), CreateHeaders()); string response = await myWeb.SendRequest(myWeb.URL + "/api/capital/transfer/apply", "POST", JsonConvert.SerializeObject(body), CreateHeaders());
Debug.Log(response); Debug.Log("תÔöÉêÇë"+response);
transferResponse info = JsonConvert.DeserializeObject<transferResponse>(response); transferResponse info = JsonConvert.DeserializeObject<transferResponse>(response);
if (info.code == 200) if (info.code == 200)
{ {

View File

@ -24,9 +24,9 @@ public class capitalbalance : MonoBehaviour
public async Task<CapitalbalanceIndefo> CapitalbalanceInfo() public async Task<CapitalbalanceIndefo> CapitalbalanceInfo()
{ {
string response = await myWeb.SendRequest(myWeb.URL + "/api/capital/balance", "GET", "{}", CreateHeaders()); string response = await myWeb.SendRequest(myWeb.URL + "/api/capital/balance", "GET", "{}", CreateHeaders());
Debug.Log("签到数据" + response); Debug.Log("资产数据" + response);
CapitalbalanceIndefo capitalbalanceInfo = JsonConvert.DeserializeObject<CapitalbalanceIndefo>(response); CapitalbalanceIndefo capitalbalanceInfo = JsonConvert.DeserializeObject<CapitalbalanceIndefo>(response);
Debug.Log("======" + capitalbalanceInfo.data.water); // Debug.Log("======" + capitalbalanceInfo.data.water);
return capitalbalanceInfo; return capitalbalanceInfo;
} }
} }