add switch
This commit is contained in:
parent
a13de8a8b0
commit
beec0fdc73
@ -13695,7 +13695,7 @@
|
||||
},
|
||||
"_contentSize": {
|
||||
"__type__": "cc.Size",
|
||||
"width": 796.5714285714286,
|
||||
"width": 671.4285714285714,
|
||||
"height": 73
|
||||
},
|
||||
"_anchorPoint": {
|
||||
@ -15001,7 +15001,7 @@
|
||||
},
|
||||
"_contentSize": {
|
||||
"__type__": "cc.Size",
|
||||
"width": 796.5714285714286,
|
||||
"width": 671.4285714285714,
|
||||
"height": 42
|
||||
},
|
||||
"_anchorPoint": {
|
||||
@ -15086,7 +15086,7 @@
|
||||
},
|
||||
"_position": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": -341.7142857142857,
|
||||
"x": -279.14285714285717,
|
||||
"y": -1,
|
||||
"z": 0
|
||||
},
|
||||
@ -15677,7 +15677,7 @@
|
||||
},
|
||||
"_position": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": -216.5714285714286,
|
||||
"x": -154.00000000000006,
|
||||
"y": -1,
|
||||
"z": 0
|
||||
},
|
||||
@ -16261,7 +16261,7 @@
|
||||
},
|
||||
"_position": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": -91.42857142857149,
|
||||
"x": -28.857142857142918,
|
||||
"y": -1,
|
||||
"z": 0
|
||||
},
|
||||
@ -18810,7 +18810,7 @@
|
||||
"__id__": 505
|
||||
}
|
||||
],
|
||||
"_active": true,
|
||||
"_active": false,
|
||||
"_level": 4,
|
||||
"_components": [
|
||||
{
|
||||
@ -18831,7 +18831,7 @@
|
||||
"_contentSize": {
|
||||
"__type__": "cc.Size",
|
||||
"width": 113.14285714285714,
|
||||
"height": 22
|
||||
"height": 40
|
||||
},
|
||||
"_anchorPoint": {
|
||||
"__type__": "cc.Vec2",
|
||||
@ -19512,7 +19512,7 @@
|
||||
},
|
||||
"_position": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": 134.78571428571422,
|
||||
"x": 72.21428571428565,
|
||||
"y": -0.9,
|
||||
"z": 0
|
||||
},
|
||||
@ -19699,7 +19699,7 @@
|
||||
},
|
||||
"_position": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": 211.78571428571422,
|
||||
"x": 149.21428571428567,
|
||||
"y": -0.9,
|
||||
"z": 0
|
||||
},
|
||||
@ -19886,7 +19886,7 @@
|
||||
},
|
||||
"_position": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": 288.7857142857142,
|
||||
"x": 226.21428571428567,
|
||||
"y": -0.9,
|
||||
"z": 0
|
||||
},
|
||||
@ -20073,7 +20073,7 @@
|
||||
},
|
||||
"_position": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": 365.7857142857142,
|
||||
"x": 303.21428571428567,
|
||||
"y": -0.9,
|
||||
"z": 0
|
||||
},
|
||||
@ -20229,7 +20229,7 @@
|
||||
"_enabled": true,
|
||||
"_layoutSize": {
|
||||
"__type__": "cc.Size",
|
||||
"width": 796.5714285714286,
|
||||
"width": 671.4285714285714,
|
||||
"height": 42
|
||||
},
|
||||
"_resize": 1,
|
||||
@ -20273,7 +20273,7 @@
|
||||
"_enabled": true,
|
||||
"_layoutSize": {
|
||||
"__type__": "cc.Size",
|
||||
"width": 796.5714285714286,
|
||||
"width": 671.4285714285714,
|
||||
"height": 73
|
||||
},
|
||||
"_resize": 1,
|
||||
@ -32345,6 +32345,9 @@
|
||||
"updateinfo": {
|
||||
"__id__": 863
|
||||
},
|
||||
"btn_task": {
|
||||
"__id__": 492
|
||||
},
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
|
@ -178,10 +178,22 @@ cc.Class({
|
||||
default: null,
|
||||
type: cc.Node,
|
||||
},
|
||||
|
||||
btn_task: {
|
||||
default: null,
|
||||
type: cc.Node,
|
||||
},
|
||||
},
|
||||
|
||||
onLoad() {
|
||||
cc.audioEngine.stopAll();
|
||||
|
||||
NetManage.getOptionSwitch((res) => {
|
||||
console.log('get switch' + JSON.stringify(res));
|
||||
if (res.open_list.includes(1)) {
|
||||
this.btn_task.active = true;
|
||||
}
|
||||
});
|
||||
},
|
||||
start() {
|
||||
//test
|
||||
|
@ -662,4 +662,14 @@ module.exports = {
|
||||
.addKV('session_id', this.session_id);
|
||||
this.getResponce(cb, this.urlbd);
|
||||
},
|
||||
|
||||
getOptionSwitch(cb) {
|
||||
this.urlbd.clear();
|
||||
this.urlbd
|
||||
.addKV('c', 'ServerSwitch')
|
||||
.addKV('a', 'getSwitch')
|
||||
.addKV('account_id', this.account_id)
|
||||
.addKV('session_id', this.session_id);
|
||||
this.getResponce(cb, this.urlbd);
|
||||
},
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user