Compare commits

..

2 Commits

Author SHA1 Message Date
COMPUTER\EDY 90293f86ae 暂存 2025-11-11 10:43:57 +08:00
COMPUTER\EDY d76515e2c2 新模块 2025-11-11 10:43:42 +08:00
7 changed files with 683 additions and 35 deletions

View File

@ -2207,6 +2207,56 @@ export default class JiaZai extends cc.Component {
console.log("关闭过时数据", cc.fx.GameConfig.GM_INFO.getItemType)
this.checkAndSetPlayerPassLevel();
}
//获取入职排行榜
getSRank() {
Utils.getSRank(res => {
let data = JSON.parse(res.data);
let role = data.role;
let sortedArray = [];
sortedArray = Object.entries(role)
//@ts-ignore
.sort((a, b) => b[1] - a[1]) // 按数值从大到小排序
.map((item, index) => ({
rank: index + 1, // 排名
name: item[0], // 省份名称
count: item[1] // 数值
}));
// 排序后的结果
let city = JSON.parse(JSON.stringify(cc.fx.GameConfig.CITY));
let rankData = [];
for (let i = 0; i < sortedArray.length; i++) {
// 检查sortedArray中的省份名称是否存在于原始data.role数据中
if (data && data[sortedArray[i].name] !== undefined) {
// 如果存在则将data中对应的键值对放入rankData
if (data.role && data.role[sortedArray[i].name] !== undefined) {
rankData.push({
rank: sortedArray[i].rank,
name: sortedArray[i].name,
count: sortedArray[i].count,
// 可以添加data2中对应的数据
rankingData: data[sortedArray[i].name]
});
delete city[sortedArray[i].name];
}
}
}
// 循环完成后将CITY中剩下的城市按顺序添加到rankData中
let nextRank = rankData.length + 1; // 获取下一个排名
for (let cityName in city) {
rankData.push({
rank: nextRank++,
name: cityName,
count: 0,
rankingData: []
});
}
console.log(rankData);
});
}
update(dt) {
if (this.newbieGift && this.monthlyCardNode) {
if (this.monthlyCardNode.active == true) {

View File

@ -138,6 +138,7 @@ export class GameConfig {
};
static CITY: { 河北省: boolean; 山西省: boolean; 辽宁省: boolean; 吉林省: boolean; 黑龙江省: boolean; 江苏省: boolean; 浙江省: boolean; 安徽省: boolean; 福建省: boolean; 江西省: boolean; 山东省: boolean; 河南省: boolean; 湖北省: boolean; 湖南省: boolean; 广东省: boolean; 海南省: boolean; 四川省: boolean; 贵州省: boolean; 云南省: boolean; 陕西省: boolean; 甘肃省: boolean; 青海省: boolean; 港澳台: boolean; 北京: boolean; 天津: boolean; 上海: boolean; 重庆: boolean; 内蒙古: boolean; 广西: boolean; 西藏: boolean; 宁夏: boolean; 新疆: boolean; };
@ -161,6 +162,7 @@ export class GameConfig {
this.TA = null;
this.CLICK_init();
this.GM_INFO_init();
this.CITY_init();
this.LEVEL_INFO_init(false, 0, false);
var self = this;
@ -605,5 +607,15 @@ export class GameConfig {
static Authentication() {
cc.fx.GameTool.Authentication();
}
static CITY_init() {
this.CITY = {
"河北省": true, "山西省": true, "辽宁省": true, "吉林省": true, "黑龙江省": true, "江苏省": true,
"浙江省": true, "安徽省": true, "福建省": true, "江西省": true, "山东省": true, "河南省": true, "湖北省": true,
"湖南省": true, "广东省": true, "海南省": true, "四川省": true, "贵州省": true, "云南省": true, "陕西省": true,
"甘肃省": true, "青海省": true, "港澳台": true, "北京": true, "天津": true, "上海": true, "重庆": true,
"内蒙古": true, "广西": true, "西藏": true, "宁夏": true, "新疆": true
};
}
}

View File

@ -1033,6 +1033,43 @@ export default class Utils {
makeRequest();
}
/** 获取入职排行榜 */
static getSRank(callBack) {
// 最大重试次数
const maxRetries = 5;
let retryCount = 0;
// 标志位,用于记录 callBack 是否已经被调用
let isCallBackCalled = false;
const makeRequest = () => {
if (retryCount > maxRetries) {
if (!isCallBackCalled) {
MiniGameSdk.API.showToast("网络异常,获取排行失败");
callBack({ code: 2, data: null, message: '轮询超时,达到最大重试次数' });
isCallBackCalled = true;
}
return;
}
// 设置超时定时器
const timeoutId = setTimeout(() => {
retryCount++;
console.log(`请求超时,第 ${retryCount} 次重新申请接口`);
makeRequest();
}, 3000);
console.log("请求uid:" + Utils.uid);
Utils.POST("getSRank", { uid: cc.fx.GameConfig.GM_INFO.uid }, res => {
console.log("查询入职排行榜结果");
console.log(res);
// 清除超时定时器
clearTimeout(timeoutId);
if (!isCallBackCalled) {
callBack(res);
isCallBackCalled = true;
}
});
};
makeRequest();
}
//#region 新手礼包相关
//获取新手礼包是否能显示
static getStarter_pack(callBack) {
@ -1203,6 +1240,7 @@ export default class Utils {
}
static getpassCheckLv(callBack) {
//@ts-ignore
if (typeof wx !== 'undefined' && wx !== null) {
let uid = cc.fx.StorageMessage.getStorage("uid");
//旧的读取数据设置数据方法,以强联网为主
@ -1227,6 +1265,7 @@ export default class Utils {
}
static setPassCheckLv(callBack, data) {
//@ts-ignore
if (typeof wx !== 'undefined' && wx !== null) {
let uid = cc.fx.StorageMessage.getStorage("uid");
//旧的读取数据设置数据方法,以强联网为主
@ -1256,6 +1295,7 @@ export default class Utils {
}
static getPassCheckInfo(callBack) {
//@ts-ignore
if (typeof wx !== 'undefined' && wx !== null) {
let uid = cc.fx.StorageMessage.getStorage("uid");
//旧的读取数据设置数据方法,以强联网为主
@ -1280,6 +1320,7 @@ export default class Utils {
}
static setPassCheckInfo(callBack, data) {
//@ts-ignore
if (typeof wx !== 'undefined' && wx !== null) {
let uid = cc.fx.StorageMessage.getStorage("uid");
//旧的读取数据设置数据方法,以强联网为主

View File

@ -7,11 +7,11 @@
<key>beginBtn.png</key>
<dict>
<key>frame</key>
<string>{{2,685},{570,176}}</string>
<string>{{49,1170},{570,176}}</string>
<key>offset</key>
<string>{0,0}</string>
<key>rotated</key>
<false/>
<true/>
<key>sourceColorRect</key>
<string>{{0,0},{570,176}}</string>
<key>sourceSize</key>
@ -33,11 +33,11 @@
<key>cityName.png</key>
<dict>
<key>frame</key>
<string>{{849,1052},{179,40}}</string>
<string>{{597,1704},{179,40}}</string>
<key>offset</key>
<string>{0,0}</string>
<key>rotated</key>
<true/>
<false/>
<key>sourceColorRect</key>
<string>{{0,0},{179,40}}</string>
<key>sourceSize</key>
@ -46,7 +46,7 @@
<key>customDi.png</key>
<dict>
<key>frame</key>
<string>{{574,685},{352,89}}</string>
<string>{{597,1061},{352,89}}</string>
<key>offset</key>
<string>{0,0}</string>
<key>rotated</key>
@ -59,7 +59,7 @@
<key>customTitle.png</key>
<dict>
<key>frame</key>
<string>{{892,776},{230,32}}</string>
<string>{{926,782},{230,32}}</string>
<key>offset</key>
<string>{0,0}</string>
<key>rotated</key>
@ -69,23 +69,62 @@
<key>sourceSize</key>
<string>{230,32}</string>
</dict>
<key>fenKuang.png</key>
<key>dian1.png</key>
<dict>
<key>frame</key>
<string>{{926,1132},{236,62}}</string>
<string>{{966,61},{56,57}}</string>
<key>offset</key>
<string>{0,0}</string>
<key>rotated</key>
<true/>
<false/>
<key>sourceColorRect</key>
<string>{{0,0},{56,57}}</string>
<key>sourceSize</key>
<string>{56,57}</string>
</dict>
<key>dian2.png</key>
<dict>
<key>frame</key>
<string>{{966,2},{56,57}}</string>
<key>offset</key>
<string>{0,0}</string>
<key>rotated</key>
<false/>
<key>sourceColorRect</key>
<string>{{0,0},{56,57}}</string>
<key>sourceSize</key>
<string>{56,57}</string>
</dict>
<key>fenKuang.png</key>
<dict>
<key>frame</key>
<string>{{720,1152},{236,62}}</string>
<key>offset</key>
<string>{0,0}</string>
<key>rotated</key>
<false/>
<key>sourceColorRect</key>
<string>{{0,0},{236,62}}</string>
<key>sourceSize</key>
<string>{236,62}</string>
</dict>
<key>guanzi.png</key>
<dict>
<key>frame</key>
<string>{{295,1704},{30,32}}</string>
<key>offset</key>
<string>{0,0}</string>
<key>rotated</key>
<false/>
<key>sourceColorRect</key>
<string>{{0,0},{30,32}}</string>
<key>sourceSize</key>
<string>{30,32}</string>
</dict>
<key>gun1.png</key>
<dict>
<key>frame</key>
<string>{{604,638},{360,45}}</string>
<string>{{597,1014},{360,45}}</string>
<key>offset</key>
<string>{0,0}</string>
<key>rotated</key>
@ -98,11 +137,11 @@
<key>gun2.png</key>
<dict>
<key>frame</key>
<string>{{2,638},{600,45}}</string>
<string>{{2,1170},{600,45}}</string>
<key>offset</key>
<string>{0,0}</string>
<key>rotated</key>
<false/>
<true/>
<key>sourceColorRect</key>
<string>{{0,0},{600,45}}</string>
<key>sourceSize</key>
@ -111,7 +150,7 @@
<key>gun3.png</key>
<dict>
<key>frame</key>
<string>{{966,2},{810,45}}</string>
<string>{{966,120},{810,45}}</string>
<key>offset</key>
<string>{0,0}</string>
<key>rotated</key>
@ -124,7 +163,7 @@
<key>icon_kuang0.png</key>
<dict>
<key>frame</key>
<string>{{2,1107},{168,168}}</string>
<string>{{2,843},{168,168}}</string>
<key>offset</key>
<string>{0,0}</string>
<key>rotated</key>
@ -137,7 +176,7 @@
<key>icon_kuang1.png</key>
<dict>
<key>frame</key>
<string>{{574,776},{274,316}}</string>
<string>{{2,1772},{274,316}}</string>
<key>offset</key>
<string>{0,0}</string>
<key>rotated</key>
@ -150,7 +189,7 @@
<key>icon_kuang2.png</key>
<dict>
<key>frame</key>
<string>{{2,863},{242,299}}</string>
<string>{{720,1216},{242,299}}</string>
<key>offset</key>
<string>{0,0}</string>
<key>rotated</key>
@ -163,7 +202,7 @@
<key>icon_kuang3.png</key>
<dict>
<key>frame</key>
<string>{{551,1052},{242,296}}</string>
<string>{{720,1460},{242,296}}</string>
<key>offset</key>
<string>{0,0}</string>
<key>rotated</key>
@ -176,7 +215,7 @@
<key>jia.png</key>
<dict>
<key>frame</key>
<string>{{926,789},{38,38}}</string>
<string>{{926,638},{38,38}}</string>
<key>offset</key>
<string>{0,0}</string>
<key>rotated</key>
@ -186,10 +225,36 @@
<key>sourceSize</key>
<string>{38,38}</string>
</dict>
<key>jindut00.png</key>
<dict>
<key>frame</key>
<string>{{36,1013},{540,20}}</string>
<key>offset</key>
<string>{0,0}</string>
<key>rotated</key>
<false/>
<key>sourceColorRect</key>
<string>{{3,3},{540,20}}</string>
<key>sourceSize</key>
<string>{546,26}</string>
</dict>
<key>jindut02.png</key>
<dict>
<key>frame</key>
<string>{{49,1742},{546,26}}</string>
<key>offset</key>
<string>{0,0}</string>
<key>rotated</key>
<false/>
<key>sourceColorRect</key>
<string>{{0,0},{546,26}}</string>
<key>sourceSize</key>
<string>{546,26}</string>
</dict>
<key>manKuang.png</key>
<dict>
<key>frame</key>
<string>{{926,894},{236,62}}</string>
<string>{{960,932},{236,62}}</string>
<key>offset</key>
<string>{0,0}</string>
<key>rotated</key>
@ -202,7 +267,7 @@
<key>rank1.png</key>
<dict>
<key>frame</key>
<string>{{928,685},{102,34}}</string>
<string>{{926,678},{102,34}}</string>
<key>offset</key>
<string>{0,0}</string>
<key>rotated</key>
@ -215,7 +280,7 @@
<key>rank2.png</key>
<dict>
<key>frame</key>
<string>{{892,1008},{141,32}}</string>
<string>{{2,1014},{141,32}}</string>
<key>offset</key>
<string>{0,0}</string>
<key>rotated</key>
@ -228,7 +293,7 @@
<key>rank3.png</key>
<dict>
<key>frame</key>
<string>{{926,860},{66,32}}</string>
<string>{{227,1704},{66,32}}</string>
<key>offset</key>
<string>{0,0}</string>
<key>rotated</key>
@ -241,7 +306,7 @@
<key>rank4.png</key>
<dict>
<key>frame</key>
<string>{{926,829},{89,29}}</string>
<string>{{327,1704},{89,29}}</string>
<key>offset</key>
<string>{0,0}</string>
<key>rotated</key>
@ -251,14 +316,27 @@
<key>sourceSize</key>
<string>{89,29}</string>
</dict>
<key>staffKuang1.png</key>
<key>ruzhiBg.png</key>
<dict>
<key>frame</key>
<string>{{303,1063},{198,246}}</string>
<string>{{2,638},{922,203}}</string>
<key>offset</key>
<string>{0,0}</string>
<key>rotated</key>
<true/>
<false/>
<key>sourceColorRect</key>
<string>{{0,0},{922,203}}</string>
<key>sourceSize</key>
<string>{922,203}</string>
</dict>
<key>staffKuang1.png</key>
<dict>
<key>frame</key>
<string>{{520,1770},{198,246}}</string>
<key>offset</key>
<string>{0,0}</string>
<key>rotated</key>
<false/>
<key>sourceColorRect</key>
<string>{{0,0},{198,246}}</string>
<key>sourceSize</key>
@ -267,15 +345,41 @@
<key>staffKuang2.png</key>
<dict>
<key>frame</key>
<string>{{303,863},{198,246}}</string>
<string>{{320,1770},{198,246}}</string>
<key>offset</key>
<string>{0,0}</string>
<key>rotated</key>
<false/>
<key>sourceColorRect</key>
<string>{{0,0},{198,246}}</string>
<key>sourceSize</key>
<string>{198,246}</string>
</dict>
<key>xiegang.png</key>
<dict>
<key>frame</key>
<string>{{320,2018},{25,39}}</string>
<key>offset</key>
<string>{0,0}</string>
<key>rotated</key>
<true/>
<key>sourceColorRect</key>
<string>{{0,0},{198,246}}</string>
<string>{{0,0},{25,39}}</string>
<key>sourceSize</key>
<string>{198,246}</string>
<string>{25,39}</string>
</dict>
<key>yuangongka.png</key>
<dict>
<key>frame</key>
<string>{{36,1035},{95,114}}</string>
<key>offset</key>
<string>{0,0}</string>
<key>rotated</key>
<false/>
<key>sourceColorRect</key>
<string>{{0,0},{95,114}}</string>
<key>sourceSize</key>
<string>{95,114}</string>
</dict>
</dict>
<key>metadata</key>
@ -287,7 +391,7 @@
<key>size</key>
<string>{1024,2048}</string>
<key>smartupdate</key>
<string>$TexturePacker:SmartUpdate:4c876253524b1cd2dadda5c7f0cf6a95$</string>
<string>$TexturePacker:SmartUpdate:d0729302cd0db553e503a1fa6a931920$</string>
<key>textureFileName</key>
<string>careerUI.png</string>
</dict>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 30 KiB

After

Width:  |  Height:  |  Size: 38 KiB

View File

@ -49,16 +49,34 @@
},
{
"__id__": 230
},
{
"__id__": 388
},
{
"__id__": 390
},
{
"__id__": 392
},
{
"__id__": 394
},
{
"__id__": 396
},
{
"__id__": 398
}
],
"_active": true,
"_components": [
{
"__id__": 388
"__id__": 400
}
],
"_prefab": {
"__id__": 389
"__id__": 401
},
"_opacity": 255,
"_color": {
@ -13879,6 +13897,432 @@
"fileId": "02Dy7OMlFNc7owaoS3CsS7",
"sync": false
},
{
"__type__": "cc.Node",
"_name": "rank1",
"_objFlags": 0,
"_parent": {
"__id__": 1
},
"_children": [],
"_active": true,
"_components": [],
"_prefab": {
"__id__": 389
},
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 0,
"height": 0
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
0,
542,
0,
0,
0,
0,
1,
1,
1,
1
]
},
"_eulerAngles": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_skewX": 0,
"_skewY": 0,
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": ""
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__id__": 0
},
"fileId": "58kaXexONCBJS5OcUQnl8Q",
"sync": false
},
{
"__type__": "cc.Node",
"_name": "rank2",
"_objFlags": 0,
"_parent": {
"__id__": 1
},
"_children": [],
"_active": true,
"_components": [],
"_prefab": {
"__id__": 391
},
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 0,
"height": 0
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
-140,
225,
0,
0,
0,
0,
1,
1,
1,
1
]
},
"_eulerAngles": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_skewX": 0,
"_skewY": 0,
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": ""
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__id__": 0
},
"fileId": "cf4EOnC5tBA5YafiQx1p7B",
"sync": false
},
{
"__type__": "cc.Node",
"_name": "rank3",
"_objFlags": 0,
"_parent": {
"__id__": 1
},
"_children": [],
"_active": true,
"_components": [],
"_prefab": {
"__id__": 393
},
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 0,
"height": 0
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
140,
225,
0,
0,
0,
0,
1,
1,
1,
1
]
},
"_eulerAngles": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_skewX": 0,
"_skewY": 0,
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": ""
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__id__": 0
},
"fileId": "90E4baYrROpJLx354ZZmSI",
"sync": false
},
{
"__type__": "cc.Node",
"_name": "rank4",
"_objFlags": 0,
"_parent": {
"__id__": 1
},
"_children": [],
"_active": true,
"_components": [],
"_prefab": {
"__id__": 395
},
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 0,
"height": 0
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
-250,
-87,
0,
0,
0,
0,
1,
1,
1,
1
]
},
"_eulerAngles": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_skewX": 0,
"_skewY": 0,
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": ""
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__id__": 0
},
"fileId": "a70t23avVI4JjcTBOWwv5n",
"sync": false
},
{
"__type__": "cc.Node",
"_name": "rank5",
"_objFlags": 0,
"_parent": {
"__id__": 1
},
"_children": [],
"_active": true,
"_components": [],
"_prefab": {
"__id__": 397
},
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 0,
"height": 0
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
0,
-87,
0,
0,
0,
0,
1,
1,
1,
1
]
},
"_eulerAngles": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_skewX": 0,
"_skewY": 0,
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": ""
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__id__": 0
},
"fileId": "17cq78gqBFg7Obt6aqbf3s",
"sync": false
},
{
"__type__": "cc.Node",
"_name": "rank6",
"_objFlags": 0,
"_parent": {
"__id__": 1
},
"_children": [],
"_active": true,
"_components": [],
"_prefab": {
"__id__": 399
},
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 0,
"height": 0
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
250,
-87,
0,
0,
0,
0,
1,
1,
1,
1
]
},
"_eulerAngles": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_skewX": 0,
"_skewY": 0,
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": ""
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__id__": 0
},
"fileId": "367egRnxNKP5DXdyD/U2z1",
"sync": false
},
{
"__type__": "cc.Widget",
"_name": "",

View File

@ -28,7 +28,6 @@ export default class CareerManager extends cc.Component {
}
start() {
}
//调用获取排行榜接口
public getRank() {
@ -53,7 +52,6 @@ export default class CareerManager extends cc.Component {
//设置头像 处理的逻辑比较多,不用公共类的了
public setPic(pic) {
this.phone.node.parent.getChildByName("icon").active = false;
this.phone.node.active = false;
fetch(pic)
@ -70,7 +68,6 @@ export default class CareerManager extends cc.Component {
});
var self = this;
cc.assetManager.loadRemote(pic, { ext: '.png' }, (err, texture: cc.Texture2D) => {
if (texture) {
self.phone.node.active = true;
self.phone.spriteFrame = new cc.SpriteFrame(texture);