更新 排行里面的头像遮罩
This commit is contained in:
parent
e7bb0e51fb
commit
5e83f7e1cb
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
|
@ -2352,7 +2352,7 @@ export default class JiaZai extends cc.Component {
|
|||
.start()
|
||||
})
|
||||
}
|
||||
// console.log("rankData", rankData);
|
||||
console.log("rankData", rankData);
|
||||
});
|
||||
}
|
||||
|
||||
|
|
@ -2390,6 +2390,10 @@ export default class JiaZai extends cc.Component {
|
|||
}
|
||||
}
|
||||
|
||||
backTop() {
|
||||
|
||||
}
|
||||
|
||||
update(dt) {
|
||||
if (this.newbieGift && this.monthlyCardNode) {
|
||||
if (this.monthlyCardNode.active == true) {
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
import Utils from "../module/Pay/Utils";
|
||||
|
||||
/**
|
||||
* 小游戏平台SDK工具封装,目前只支持微信和抖音平台
|
||||
*/
|
||||
|
|
@ -1964,26 +1966,11 @@ export namespace MiniGameSdk {
|
|||
*/
|
||||
private static _getCityInfo(callback: (success: boolean, data?: any, error?: any) => void, useReverseGeocoding: boolean) {
|
||||
//@ts-ignore
|
||||
wx.getLocation({
|
||||
type: 'gcj02', // 使用国测局坐标系,更适合中国地图
|
||||
wx.getFuzzyLocation({
|
||||
type: 'wgs84', // 使用国测局坐标系,更适合中国地图
|
||||
success: (res) => {
|
||||
console.log('获取位置成功:', res);
|
||||
|
||||
if (useReverseGeocoding) {
|
||||
// 使用逆解析获取详细地址信息
|
||||
API._reverseGeocoding(res.latitude, res.longitude, callback);
|
||||
} else {
|
||||
// 直接返回基本位置信息,包含经纬度
|
||||
const cityInfo = {
|
||||
latitude: res.latitude, // 纬度
|
||||
longitude: res.longitude, // 经度
|
||||
province: '', // 省份(需要通过逆解析获取)
|
||||
city: '', // 城市(需要通过逆解析获取)
|
||||
district: '', // 区县(需要通过逆解析获取)
|
||||
address: '' // 详细地址(需要通过逆解析获取)
|
||||
};
|
||||
callback(true, cityInfo);
|
||||
}
|
||||
},
|
||||
fail: (err) => {
|
||||
console.log('获取位置失败:', err);
|
||||
|
|
@ -1992,6 +1979,12 @@ export namespace MiniGameSdk {
|
|||
});
|
||||
}
|
||||
|
||||
private static _setCityInfo(callback: (success: boolean, data?: any, error?: any) => void, useReverseGeocoding: boolean) {
|
||||
//@ts-ignore
|
||||
// let cityData = data;
|
||||
Utils.setCityInfo(callback, data);
|
||||
}
|
||||
|
||||
/**
|
||||
* 逆解析经纬度获取详细地址信息
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -1342,4 +1342,29 @@ export default class Utils {
|
|||
}
|
||||
}
|
||||
|
||||
static setCityInfo(callBack, data) {
|
||||
//@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,
|
||||
action: 'save',
|
||||
address: data,
|
||||
}
|
||||
Utils.POST("address", setData, res => {
|
||||
if (res.code === 1) {
|
||||
console.log("设置城市信息成功", res);
|
||||
if (callBack) callBack(res);
|
||||
} else {
|
||||
console.log("设置城市信息失败", res);
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -173,6 +173,19 @@
|
|||
<key>sourceSize</key>
|
||||
<string>{556,164}</string>
|
||||
</dict>
|
||||
<key>topBtn.png</key>
|
||||
<dict>
|
||||
<key>frame</key>
|
||||
<string>{{399,755},{141,147}}</string>
|
||||
<key>offset</key>
|
||||
<string>{0,0}</string>
|
||||
<key>rotated</key>
|
||||
<true/>
|
||||
<key>sourceColorRect</key>
|
||||
<string>{{0,0},{141,147}}</string>
|
||||
<key>sourceSize</key>
|
||||
<string>{141,147}</string>
|
||||
</dict>
|
||||
<key>touxiangk.png</key>
|
||||
<dict>
|
||||
<key>frame</key>
|
||||
|
|
@ -189,7 +202,7 @@
|
|||
<key>tu01.png</key>
|
||||
<dict>
|
||||
<key>frame</key>
|
||||
<string>{{594,755},{159,172}}</string>
|
||||
<string>{{595,755},{159,172}}</string>
|
||||
<key>offset</key>
|
||||
<string>{0,0}</string>
|
||||
<key>rotated</key>
|
||||
|
|
@ -202,7 +215,7 @@
|
|||
<key>tu02.png</key>
|
||||
<dict>
|
||||
<key>frame</key>
|
||||
<string>{{299,1125},{140,146}}</string>
|
||||
<string>{{150,1125},{140,146}}</string>
|
||||
<key>offset</key>
|
||||
<string>{0,0}</string>
|
||||
<key>rotated</key>
|
||||
|
|
@ -215,7 +228,7 @@
|
|||
<key>tu03.png</key>
|
||||
<dict>
|
||||
<key>frame</key>
|
||||
<string>{{151,1125},{140,146}}</string>
|
||||
<string>{{2,1125},{140,146}}</string>
|
||||
<key>offset</key>
|
||||
<string>{0,0}</string>
|
||||
<key>rotated</key>
|
||||
|
|
@ -254,11 +267,11 @@
|
|||
<key>tu06.png</key>
|
||||
<dict>
|
||||
<key>frame</key>
|
||||
<string>{{256,755},{148,133}}</string>
|
||||
<string>{{445,1125},{148,133}}</string>
|
||||
<key>offset</key>
|
||||
<string>{0,0}</string>
|
||||
<key>rotated</key>
|
||||
<true/>
|
||||
<false/>
|
||||
<key>sourceColorRect</key>
|
||||
<string>{{0,0},{148,133}}</string>
|
||||
<key>sourceSize</key>
|
||||
|
|
@ -306,20 +319,20 @@
|
|||
<key>tututtt.png</key>
|
||||
<dict>
|
||||
<key>frame</key>
|
||||
<string>{{2,1125},{140,147}}</string>
|
||||
<string>{{256,755},{141,147}}</string>
|
||||
<key>offset</key>
|
||||
<string>{0,0}</string>
|
||||
<key>rotated</key>
|
||||
<true/>
|
||||
<false/>
|
||||
<key>sourceColorRect</key>
|
||||
<string>{{0,0},{140,147}}</string>
|
||||
<string>{{0,0},{141,147}}</string>
|
||||
<key>sourceSize</key>
|
||||
<string>{140,147}</string>
|
||||
<string>{141,147}</string>
|
||||
</dict>
|
||||
<key>tutututu.png</key>
|
||||
<dict>
|
||||
<key>frame</key>
|
||||
<string>{{447,1125},{139,145}}</string>
|
||||
<string>{{298,1125},{139,145}}</string>
|
||||
<key>offset</key>
|
||||
<string>{0,0}</string>
|
||||
<key>rotated</key>
|
||||
|
|
@ -339,7 +352,7 @@
|
|||
<key>size</key>
|
||||
<string>{2048,2048}</string>
|
||||
<key>smartupdate</key>
|
||||
<string>$TexturePacker:SmartUpdate:f5bea88adb4175f02ca945fc4dde7c82$</string>
|
||||
<string>$TexturePacker:SmartUpdate:e370c7a256d8a72f063f5af041ad85fa$</string>
|
||||
<key>textureFileName</key>
|
||||
<string>newUI.png</string>
|
||||
</dict>
|
||||
|
|
|
|||
|
|
@ -308,6 +308,29 @@
|
|||
"spriteType": "normal",
|
||||
"subMetas": {}
|
||||
},
|
||||
"topBtn.png": {
|
||||
"ver": "1.0.6",
|
||||
"uuid": "230cd617-1cc5-4e4a-8d1b-b9c2bbda2bdf",
|
||||
"importer": "sprite-frame",
|
||||
"rawTextureUuid": "a151e332-9c6e-46d8-818a-d3ed01b5ba61",
|
||||
"trimType": "auto",
|
||||
"trimThreshold": 1,
|
||||
"rotated": true,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"trimX": 399,
|
||||
"trimY": 755,
|
||||
"width": 141,
|
||||
"height": 147,
|
||||
"rawWidth": 141,
|
||||
"rawHeight": 147,
|
||||
"borderTop": 0,
|
||||
"borderBottom": 0,
|
||||
"borderLeft": 0,
|
||||
"borderRight": 0,
|
||||
"spriteType": "normal",
|
||||
"subMetas": {}
|
||||
},
|
||||
"touxiangk.png": {
|
||||
"ver": "1.0.6",
|
||||
"uuid": "a2b7ccec-dd54-4c24-a54a-df9e81c1c461",
|
||||
|
|
@ -341,7 +364,7 @@
|
|||
"rotated": true,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"trimX": 594,
|
||||
"trimX": 595,
|
||||
"trimY": 755,
|
||||
"width": 159,
|
||||
"height": 172,
|
||||
|
|
@ -364,7 +387,7 @@
|
|||
"rotated": true,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"trimX": 299,
|
||||
"trimX": 150,
|
||||
"trimY": 1125,
|
||||
"width": 140,
|
||||
"height": 146,
|
||||
|
|
@ -387,7 +410,7 @@
|
|||
"rotated": true,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"trimX": 151,
|
||||
"trimX": 2,
|
||||
"trimY": 1125,
|
||||
"width": 140,
|
||||
"height": 146,
|
||||
|
|
@ -453,11 +476,11 @@
|
|||
"rawTextureUuid": "a151e332-9c6e-46d8-818a-d3ed01b5ba61",
|
||||
"trimType": "auto",
|
||||
"trimThreshold": 1,
|
||||
"rotated": true,
|
||||
"rotated": false,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"trimX": 256,
|
||||
"trimY": 755,
|
||||
"trimX": 445,
|
||||
"trimY": 1125,
|
||||
"width": 148,
|
||||
"height": 133,
|
||||
"rawWidth": 148,
|
||||
|
|
@ -545,14 +568,14 @@
|
|||
"rawTextureUuid": "a151e332-9c6e-46d8-818a-d3ed01b5ba61",
|
||||
"trimType": "auto",
|
||||
"trimThreshold": 1,
|
||||
"rotated": true,
|
||||
"rotated": false,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"trimX": 2,
|
||||
"trimY": 1125,
|
||||
"width": 140,
|
||||
"trimX": 256,
|
||||
"trimY": 755,
|
||||
"width": 141,
|
||||
"height": 147,
|
||||
"rawWidth": 140,
|
||||
"rawWidth": 141,
|
||||
"rawHeight": 147,
|
||||
"borderTop": 0,
|
||||
"borderBottom": 0,
|
||||
|
|
@ -571,7 +594,7 @@
|
|||
"rotated": true,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"trimX": 447,
|
||||
"trimX": 298,
|
||||
"trimY": 1125,
|
||||
"width": 139,
|
||||
"height": 145,
|
||||
|
|
|
|||
Binary file not shown.
|
Before Width: | Height: | Size: 261 KiB After Width: | Height: | Size: 248 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 6.6 KiB After Width: | Height: | Size: 6.8 KiB |
File diff suppressed because it is too large
Load Diff
|
|
@ -36,7 +36,7 @@ export default class CareerItem extends cc.Component {
|
|||
for (let i = 4; i < 12; i++) {
|
||||
this.node.children[i].getChildByName("name").getComponent(cc.Label).string = "";
|
||||
this.node.children[i].getChildByName("level").getComponent(cc.Label).string = "";
|
||||
this.node.children[i].getChildByName("icon").getComponent(RoundBox).spriteFrame = null;
|
||||
this.node.children[i].getChildByName("mask").getChildByName("icon").getComponent(cc.Sprite).spriteFrame = null;
|
||||
this.node.children[i].getChildByName("kong").active = true;
|
||||
}
|
||||
if (this.data != undefined) {
|
||||
|
|
@ -65,9 +65,9 @@ export default class CareerItem extends cc.Component {
|
|||
this.data.rankingData[i - 4].useravatar == "10") {
|
||||
let useravatar = this.data.rankingData[i - 4].useravatar;
|
||||
let useravatarTemp = "icon_" + useravatar;
|
||||
this.node.children[i].getChildByName("icon").getComponent(RoundBox).spriteFrame = this.UI.getSpriteFrame(useravatarTemp);
|
||||
this.node.children[i].getChildByName("mask").getChildByName("icon").getComponent(cc.Sprite).spriteFrame = this.UI.getSpriteFrame(useravatarTemp);
|
||||
}
|
||||
else this.setPic(this.data.rankingData[i - 4].useravatar, this.node.children[i].getChildByName("icon"));
|
||||
else this.setPic(this.data.rankingData[i - 4].useravatar, this.node.children[i].getChildByName("mask").getChildByName("icon"));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -86,7 +86,7 @@ export default class CareerItem extends cc.Component {
|
|||
if (texture) {
|
||||
// this.node.getChildByName("pic").active = true;
|
||||
|
||||
var sprite = node.getComponent(RoundBox);
|
||||
var sprite = node.getComponent(cc.Sprite);
|
||||
sprite.spriteFrame = new cc.SpriteFrame(texture);
|
||||
}
|
||||
else {
|
||||
|
|
|
|||
|
|
@ -455,9 +455,9 @@ export default class CareerList extends cc.Component {
|
|||
this.topData[i - 3].useravatar == "10") {
|
||||
let useravatar = this.topData[i - 3].useravatar;
|
||||
let useravatarTemp = "icon_" + useravatar;
|
||||
this.firstRender.children[i].getChildByName("icon").getComponent(RoundBox).spriteFrame = this.UI.getSpriteFrame(useravatarTemp);
|
||||
this.firstRender.children[i].getChildByName("mask").getChildByName("icon").getComponent(cc.Sprite).spriteFrame = this.UI.getSpriteFrame(useravatarTemp);
|
||||
}
|
||||
else this.setPic(this.topData[i - 3].useravatar, this.firstRender.children[i].getChildByName("icon"));
|
||||
else this.setPic(this.topData[i - 3].useravatar, this.firstRender.children[i].getChildByName("mask").getChildByName("icon"));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -472,7 +472,7 @@ export default class CareerList extends cc.Component {
|
|||
cc.assetManager.loadRemote(url, { ext: '.png' }, (err, texture: cc.Texture2D) => {
|
||||
if (texture) {
|
||||
// node.getChildByName("pic").active = true;
|
||||
var sprite = node.getComponent(RoundBox);
|
||||
var sprite = node.getComponent(cc.Sprite);
|
||||
sprite.spriteFrame = new cc.SpriteFrame(texture);
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user