更新头像接口和 UI界面

This commit is contained in:
COMPUTER\EDY 2026-04-03 18:09:49 +08:00
parent dd54289efe
commit eb67be2f8b
9 changed files with 160 additions and 81 deletions

View File

@ -27075,8 +27075,8 @@
"__type__": "TypedArray", "__type__": "TypedArray",
"ctor": "Float64Array", "ctor": "Float64Array",
"array": [ "array": [
308.407, 308.006,
176.539, 176.557,
0, 0,
0, 0,
0, 0,
@ -27115,7 +27115,7 @@
], ],
"paused": false, "paused": false,
"defaultSkin": "default", "defaultSkin": "default",
"defaultAnimation": "006", "defaultAnimation": "008",
"_preCacheMode": 0, "_preCacheMode": 0,
"_cacheMode": 0, "_cacheMode": 0,
"loop": true, "loop": true,
@ -27126,13 +27126,13 @@
"_frameCache": null, "_frameCache": null,
"_curFrame": null, "_curFrame": null,
"_skeletonCache": null, "_skeletonCache": null,
"_animationName": "006", "_animationName": "008",
"_animationQueue": [], "_animationQueue": [],
"_headAniInfo": null, "_headAniInfo": null,
"_playTimes": 0, "_playTimes": 0,
"_isAniComplete": true, "_isAniComplete": true,
"_N$skeletonData": { "_N$skeletonData": {
"__uuid__": "8f075b1e-2f12-4b9b-8600-abe8f8de6846" "__uuid__": "32d9a510-5cad-4839-a76f-0627308568b3"
}, },
"_N$_defaultCacheMode": 0, "_N$_defaultCacheMode": 0,
"_N$debugSlots": false, "_N$debugSlots": false,
@ -27309,8 +27309,8 @@
"__type__": "TypedArray", "__type__": "TypedArray",
"ctor": "Float64Array", "ctor": "Float64Array",
"array": [ "array": [
-198.521, -177.358,
-214.633, -215.557,
0, 0,
0, 0,
0, 0,
@ -27349,7 +27349,7 @@
], ],
"paused": false, "paused": false,
"defaultSkin": "default", "defaultSkin": "default",
"defaultAnimation": "008", "defaultAnimation": "009",
"_preCacheMode": 0, "_preCacheMode": 0,
"_cacheMode": 0, "_cacheMode": 0,
"loop": true, "loop": true,
@ -27360,13 +27360,13 @@
"_frameCache": null, "_frameCache": null,
"_curFrame": null, "_curFrame": null,
"_skeletonCache": null, "_skeletonCache": null,
"_animationName": "008", "_animationName": "009",
"_animationQueue": [], "_animationQueue": [],
"_headAniInfo": null, "_headAniInfo": null,
"_playTimes": 0, "_playTimes": 0,
"_isAniComplete": true, "_isAniComplete": true,
"_N$skeletonData": { "_N$skeletonData": {
"__uuid__": "32d9a510-5cad-4839-a76f-0627308568b3" "__uuid__": "27e9567c-70be-4df3-85b6-acc2be20df73"
}, },
"_N$_defaultCacheMode": 0, "_N$_defaultCacheMode": 0,
"_N$debugSlots": false, "_N$debugSlots": false,
@ -27466,7 +27466,7 @@
], ],
"paused": false, "paused": false,
"defaultSkin": "default", "defaultSkin": "default",
"defaultAnimation": "004", "defaultAnimation": "006",
"_preCacheMode": 0, "_preCacheMode": 0,
"_cacheMode": 0, "_cacheMode": 0,
"loop": true, "loop": true,
@ -27477,13 +27477,13 @@
"_frameCache": null, "_frameCache": null,
"_curFrame": null, "_curFrame": null,
"_skeletonCache": null, "_skeletonCache": null,
"_animationName": "004", "_animationName": "006",
"_animationQueue": [], "_animationQueue": [],
"_headAniInfo": null, "_headAniInfo": null,
"_playTimes": 0, "_playTimes": 0,
"_isAniComplete": true, "_isAniComplete": true,
"_N$skeletonData": { "_N$skeletonData": {
"__uuid__": "d9e7f55a-453a-4d4d-b3dd-7384e770da8b" "__uuid__": "8f075b1e-2f12-4b9b-8600-abe8f8de6846"
}, },
"_N$_defaultCacheMode": 0, "_N$_defaultCacheMode": 0,
"_N$debugSlots": false, "_N$debugSlots": false,

View File

@ -247,6 +247,11 @@ export default class GameManager extends cc.Component {
} }
} }
if (data.data.film) {
console.log("登录抽卡代币信息______________:", data.data.film);
cc.fx.GameConfig.GM_INFO.film = data.data.film;
}
if (data.data.shareLv) { if (data.data.shareLv) {
if (data.data.shareLv.length > 0) { if (data.data.shareLv.length > 0) {
cc.fx.GameConfig.GM_INFO.helpLevel = data.data.shareLv[0].lv; cc.fx.GameConfig.GM_INFO.helpLevel = data.data.shareLv[0].lv;

View File

@ -145,6 +145,7 @@ export default class JiaZai extends cc.Component {
// this.createIcon(); // this.createIcon();
cc.fx.GameConfig.GM_INFO.sceneValue = "HomeScene"; cc.fx.GameConfig.GM_INFO.sceneValue = "HomeScene";
initProvinceLocator(); initProvinceLocator();
// this.RankNode = null; // this.RankNode = null;

View File

@ -151,6 +151,7 @@ export class GameConfig {
randomLevel: number; randomLevel: number;
endLevelNum: number; // 通关后 记录玩家随机游戏关卡数量 endLevelNum: number; // 通关后 记录玩家随机游戏关卡数量
GameplayType: number; //游戏类型 GameplayType: number; //游戏类型
film: number; //抽卡代币
}; };
@ -349,6 +350,7 @@ export class GameConfig {
endLevelNum: 1, endLevelNum: 1,
testId: "", //测试ID testId: "", //测试ID
GameplayType: 0, // 0 正常模式, 1无尽模式 GameplayType: 0, // 0 正常模式, 1无尽模式
film: 0, //抽卡代币
}; };
// this.setCode(this.getKey("scode")); // this.setCode(this.getKey("scode"));
// this.GM_INFO.level = 0; // this.GM_INFO.level = 0;

View File

@ -1625,4 +1625,75 @@ export default class Utils {
} }
} }
//#region 抽卡相关
/**抽卡*/
static getGacha(callBack) {
//@ts-ignore
if (typeof wx !== 'undefined' && wx !== null) {
let uid = cc.fx.StorageMessage.getStorage("uid");
//旧的读取数据设置数据方法,以强联网为主
if (uid != undefined && uid != "" && uid != null) {
cc.fx.GameConfig.GM_INFO.uid = uid;
}
let setData = {
uid: cc.fx.GameConfig.GM_INFO.uid,
}
Utils.POST("drawHead", setData, res => {
if (res.code === 1) {
console.log("正常获取到抽卡结果", res);
if (callBack) callBack(res);
} else {
console.log("获取抽卡失败,失败原因", res);
}
})
}
}
/*获取所有用户所得头像*/
static getAvatar(callBack) {
//@ts-ignore
if (typeof wx !== 'undefined' && wx !== null) {
let uid = cc.fx.StorageMessage.getStorage("uid");
//旧的读取数据设置数据方法,以强联网为主
if (uid != undefined && uid != "" && uid != null) {
cc.fx.GameConfig.GM_INFO.uid = uid;
}
let setData = {
uid: cc.fx.GameConfig.GM_INFO.uid,
}
Utils.POST("getHeadInfo", setData, res => {
if (res.code === 1) {
console.log("正常获取用户头像接口所得数据", res);
if (callBack) callBack(res);
} else {
console.log("获取头像接口失败,失败原因", res);
}
})
}
}
/*获取所有用户代币*/
static getFilm(callBack) {
//@ts-ignore
if (typeof wx !== 'undefined' && wx !== null) {
let uid = cc.fx.StorageMessage.getStorage("uid");
//旧的读取数据设置数据方法,以强联网为主
if (uid != undefined && uid != "" && uid != null) {
cc.fx.GameConfig.GM_INFO.uid = uid;
}
let setData = {
uid: cc.fx.GameConfig.GM_INFO.uid,
}
Utils.POST("getFilm", setData, res => {
if (res.code === 1) {
console.log("正常获取用户代币", res);
if (callBack) callBack(res);
} else {
console.log("获取代币失败,失败原因", res);
}
})
}
}
} }

View File

@ -1,111 +1,111 @@
skeleton.png skeleton.png
size: 974,479 size: 530,715
format: RGBA8888 format: RGBA8888
filter: Linear,Linear filter: Linear,Linear
repeat: none repeat: none
0090001 0090001
rotate: true rotate: true
xy: 2, 348 xy: 2, 596
size: 129, 190 size: 117, 171
orig: 200, 200 orig: 180, 180
offset: 16, 0 offset: 14, 0
index: -1 index: -1
0090002 0090002
rotate: true rotate: true
xy: 190, 192 xy: 352, 456
size: 146, 191 size: 132, 172
orig: 200, 200 orig: 180, 180
offset: 15, 0 offset: 13, 0
index: -1 index: -1
0090003 0090003
rotate: true rotate: true
xy: 576, 182 xy: 346, 314
size: 156, 182 size: 140, 164
orig: 200, 200 orig: 180, 180
offset: 13, 0 offset: 12, 0
index: -1 index: -1
0090004 0090004
rotate: true rotate: true
xy: 769, 2 xy: 349, 2
size: 175, 199 size: 157, 179
orig: 200, 200 orig: 180, 180
offset: 12, 0 offset: 11, 0
index: -1 index: -1
0090005 0090005
rotate: true rotate: true
xy: 569, 5 xy: 169, 4
size: 172, 198 size: 155, 178
orig: 200, 200 orig: 180, 180
offset: 12, 0 offset: 11, 0
index: -1 index: -1
0090006 0090006
rotate: true rotate: true
xy: 187, 22 xy: 335, 161
size: 168, 195 size: 151, 176
orig: 200, 200 orig: 180, 180
offset: 12, 0 offset: 11, 0
index: -1 index: -1
0090007 0090007
rotate: true rotate: true
xy: 384, 22 xy: 2, 33
size: 168, 183 size: 151, 165
orig: 200, 200 orig: 180, 180
offset: 12, 0 offset: 11, 0
index: -1 index: -1
0090008 0090008
rotate: true rotate: true
xy: 2, 26 xy: 169, 176
size: 167, 183 size: 150, 164
orig: 200, 200 orig: 180, 180
offset: 12, 0 offset: 11, 0
index: -1 index: -1
0090009 0090009
rotate: true rotate: true
xy: 760, 179 xy: 2, 186
size: 159, 183 size: 143, 165
orig: 200, 200 orig: 180, 180
offset: 13, 0 offset: 12, 0
index: -1 index: -1
0090010 0090010
rotate: true rotate: true
xy: 2, 195 xy: 176, 328
size: 151, 186 size: 135, 168
orig: 200, 200 orig: 180, 180
offset: 14, 0 offset: 13, 0
index: -1 index: -1
0090011 0090011
rotate: true rotate: true
xy: 383, 192 xy: 2, 331
size: 146, 191 size: 132, 172
orig: 200, 200 orig: 180, 180
offset: 15, 0 offset: 13, 0
index: -1 index: -1
0090012 0090012
rotate: true rotate: true
xy: 194, 340 xy: 175, 590
size: 137, 193 size: 123, 173
orig: 200, 200 orig: 180, 180
offset: 15, 0 offset: 14, 0
index: -1 index: -1
0090013 0090013
rotate: true rotate: true
xy: 389, 340 xy: 350, 590
size: 137, 193 size: 123, 173
orig: 200, 200 orig: 180, 180
offset: 15, 0 offset: 14, 0
index: -1 index: -1
0090014 0090014
rotate: true rotate: true
xy: 584, 340 xy: 2, 465
size: 137, 193 size: 123, 173
orig: 200, 200 orig: 180, 180
offset: 15, 0 offset: 14, 0
index: -1 index: -1
0090015 0090015
rotate: true rotate: true
xy: 779, 340 xy: 177, 465
size: 137, 193 size: 123, 173
orig: 200, 200 orig: 180, 180
offset: 15, 0 offset: 14, 0
index: -1 index: -1

View File

@ -1 +1 @@
{"skeleton":{"hash":"vCfWI1AAQZ+iUmuJBwO1+SDkky0","spine":"3.8.75","x":-100,"y":-100,"width":200,"height":200,"images":"../009/","audio":""},"bones":[{"name":"root"},{"name":"骨骼","parent":"root"}],"slots":[{"name":"0090001","bone":"root","attachment":"0090015"}],"skins":[{"name":"default","attachments":{"0090001":{"0090001":{"width":200,"height":200},"0090002":{"width":200,"height":200},"0090003":{"width":200,"height":200},"0090004":{"width":200,"height":200},"0090005":{"width":200,"height":200},"0090006":{"width":200,"height":200},"0090007":{"width":200,"height":200},"0090008":{"width":200,"height":200},"0090009":{"width":200,"height":200},"0090010":{"width":200,"height":200},"0090011":{"width":200,"height":200},"0090012":{"width":200,"height":200},"0090013":{"width":200,"height":200},"0090014":{"width":200,"height":200},"0090015":{"width":200,"height":200}}}}],"animations":{"009":{"slots":{"0090001":{"attachment":[{"name":"0090001"},{"time":0.0667,"name":"0090002"},{"time":0.1333,"name":"0090003"},{"time":0.2,"name":"0090004"},{"time":0.3,"name":"0090005"},{"time":0.4,"name":"0090006"},{"time":0.5,"name":"0090007"},{"time":0.6,"name":"0090008"},{"time":0.7,"name":"0090009"},{"time":0.8,"name":"0090010"},{"time":0.9,"name":"0090011"},{"time":1,"name":"0090012"},{"time":1.1,"name":"0090013"},{"time":1.2,"name":"0090014"},{"time":1.3,"name":"0090015"},{"time":1.4,"name":"0090014"},{"time":1.5,"name":"0090013"},{"time":1.6,"name":"0090001"}]}}},"animation":{}}} {"skeleton":{"hash":"dl7U2oojoSQ6CZ+ZO2XZVvjvHYM","spine":"3.8.75","x":-90,"y":-90,"width":180,"height":180,"images":"../二期009补充/009/","audio":""},"bones":[{"name":"root"},{"name":"骨骼","parent":"root"}],"slots":[{"name":"0090001","bone":"root","attachment":"0090015"}],"skins":[{"name":"default","attachments":{"0090001":{"0090001":{"width":180,"height":180},"0090002":{"width":180,"height":180},"0090003":{"width":180,"height":180},"0090004":{"width":180,"height":180},"0090005":{"width":180,"height":180},"0090006":{"width":180,"height":180},"0090007":{"width":180,"height":180},"0090008":{"width":180,"height":180},"0090009":{"width":180,"height":180},"0090010":{"width":180,"height":180},"0090011":{"width":180,"height":180},"0090012":{"width":180,"height":180},"0090013":{"width":180,"height":180},"0090014":{"width":180,"height":180},"0090015":{"width":180,"height":180}}}}],"animations":{"009":{"slots":{"0090001":{"attachment":[{"name":"0090001"},{"time":0.0667,"name":"0090002"},{"time":0.1333,"name":"0090003"},{"time":0.2,"name":"0090004"},{"time":0.3,"name":"0090005"},{"time":0.4,"name":"0090006"},{"time":0.5,"name":"0090007"},{"time":0.6,"name":"0090008"},{"time":0.7,"name":"0090009"},{"time":0.8,"name":"0090010"},{"time":0.9,"name":"0090011"},{"time":1,"name":"0090012"},{"time":1.1,"name":"0090013"},{"time":1.2,"name":"0090014"},{"time":1.3,"name":"0090015"},{"time":1.4,"name":"0090014"},{"time":1.5,"name":"0090013"},{"time":1.6,"name":"0090001"}]}}},"animation":{}}}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 67 KiB

After

Width:  |  Height:  |  Size: 74 KiB

View File

@ -8,8 +8,8 @@
"premultiplyAlpha": false, "premultiplyAlpha": false,
"genMipmaps": false, "genMipmaps": false,
"packable": true, "packable": true,
"width": 974, "width": 530,
"height": 479, "height": 715,
"platformSettings": {}, "platformSettings": {},
"subMetas": { "subMetas": {
"skeleton": { "skeleton": {
@ -24,10 +24,10 @@
"offsetY": 0, "offsetY": 0,
"trimX": 2, "trimX": 2,
"trimY": 2, "trimY": 2,
"width": 970, "width": 526,
"height": 475, "height": 711,
"rawWidth": 974, "rawWidth": 530,
"rawHeight": 479, "rawHeight": 715,
"borderTop": 0, "borderTop": 0,
"borderBottom": 0, "borderBottom": 0,
"borderLeft": 0, "borderLeft": 0,