future 1 سال پیش
والد
کامیت
9030b046b3

+ 236 - 94
assets/resources/ui/sign_view.prefab

@@ -34,23 +34,23 @@
     "_active": true,
     "_components": [
       {
-        "__id__": 190
+        "__id__": 196
       },
       {
-        "__id__": 192
+        "__id__": 198
       },
       {
-        "__id__": 194
+        "__id__": 200
       },
       {
-        "__id__": 196
+        "__id__": 202
       },
       {
-        "__id__": 198
+        "__id__": 204
       }
     ],
     "_prefab": {
-      "__id__": 200
+      "__id__": 206
     },
     "_lpos": {
       "__type__": "cc.Vec3",
@@ -2026,26 +2026,26 @@
         "__id__": 99
       },
       {
-        "__id__": 175
+        "__id__": 181
       }
     ],
     "_active": false,
     "_components": [
       {
-        "__id__": 181
+        "__id__": 187
       },
       {
-        "__id__": 183
+        "__id__": 189
       },
       {
-        "__id__": 185
+        "__id__": 191
       },
       {
-        "__id__": 187
+        "__id__": 193
       }
     ],
     "_prefab": {
-      "__id__": 189
+      "__id__": 195
     },
     "_lpos": {
       "__type__": "cc.Vec3",
@@ -2147,7 +2147,7 @@
     "_contentSize": {
       "__type__": "cc.Size",
       "width": 1080,
-      "height": 1919.9999999999998
+      "height": 1920
     },
     "_anchorPoint": {
       "__type__": "cc.Vec2",
@@ -2289,19 +2289,16 @@
       },
       {
         "__id__": 136
-      },
-      {
-        "__id__": 150
       }
     ],
     "_active": true,
     "_components": [
       {
-        "__id__": 172
+        "__id__": 178
       }
     ],
     "_prefab": {
-      "__id__": 174
+      "__id__": 180
     },
     "_lpos": {
       "__type__": "cc.Vec3",
@@ -2334,7 +2331,7 @@
   },
   {
     "__type__": "cc.Node",
-    "_name": "img_gongxihuode",
+    "_name": "img_title",
     "_objFlags": 0,
     "__editorExtras__": {},
     "_parent": {
@@ -3207,7 +3204,7 @@
   },
   {
     "__type__": "cc.Node",
-    "_name": "btn_receive",
+    "_name": "node_btn",
     "_objFlags": 0,
     "__editorExtras__": {},
     "_parent": {
@@ -3216,27 +3213,84 @@
     "_children": [
       {
         "__id__": 137
+      },
+      {
+        "__id__": 151
       }
     ],
     "_active": true,
     "_components": [
       {
-        "__id__": 143
+        "__id__": 173
       },
       {
-        "__id__": 145
+        "__id__": 175
+      }
+    ],
+    "_prefab": {
+      "__id__": 177
+    },
+    "_lpos": {
+      "__type__": "cc.Vec3",
+      "x": 0,
+      "y": -540,
+      "z": 0
+    },
+    "_lrot": {
+      "__type__": "cc.Quat",
+      "x": 0,
+      "y": 0,
+      "z": 0,
+      "w": 1
+    },
+    "_lscale": {
+      "__type__": "cc.Vec3",
+      "x": 1,
+      "y": 1,
+      "z": 1
+    },
+    "_mobility": 0,
+    "_layer": 33554432,
+    "_euler": {
+      "__type__": "cc.Vec3",
+      "x": 0,
+      "y": 0,
+      "z": 0
+    },
+    "_id": ""
+  },
+  {
+    "__type__": "cc.Node",
+    "_name": "btn_receive",
+    "_objFlags": 0,
+    "__editorExtras__": {},
+    "_parent": {
+      "__id__": 136
+    },
+    "_children": [
+      {
+        "__id__": 138
+      }
+    ],
+    "_active": true,
+    "_components": [
+      {
+        "__id__": 144
+      },
+      {
+        "__id__": 146
       },
       {
-        "__id__": 147
+        "__id__": 148
       }
     ],
     "_prefab": {
-      "__id__": 149
+      "__id__": 150
     },
     "_lpos": {
       "__type__": "cc.Vec3",
       "x": -240,
-      "y": -540,
+      "y": 0,
       "z": 0
     },
     "_lrot": {
@@ -3268,20 +3322,20 @@
     "_objFlags": 512,
     "__editorExtras__": {},
     "_parent": {
-      "__id__": 136
+      "__id__": 137
     },
     "_children": [],
     "_active": true,
     "_components": [
       {
-        "__id__": 138
+        "__id__": 139
       },
       {
-        "__id__": 140
+        "__id__": 141
       }
     ],
     "_prefab": {
-      "__id__": 142
+      "__id__": 143
     },
     "_lpos": {
       "__type__": "cc.Vec3",
@@ -3318,11 +3372,11 @@
     "_objFlags": 0,
     "__editorExtras__": {},
     "node": {
-      "__id__": 137
+      "__id__": 138
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 139
+      "__id__": 140
     },
     "_contentSize": {
       "__type__": "cc.Size",
@@ -3346,11 +3400,11 @@
     "_objFlags": 0,
     "__editorExtras__": {},
     "node": {
-      "__id__": 137
+      "__id__": 138
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 141
+      "__id__": 142
     },
     "_customMaterial": null,
     "_srcBlendFactor": 2,
@@ -3427,11 +3481,11 @@
     "_objFlags": 0,
     "__editorExtras__": {},
     "node": {
-      "__id__": 136
+      "__id__": 137
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 144
+      "__id__": 145
     },
     "_contentSize": {
       "__type__": "cc.Size",
@@ -3455,11 +3509,11 @@
     "_objFlags": 0,
     "__editorExtras__": {},
     "node": {
-      "__id__": 136
+      "__id__": 137
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 146
+      "__id__": 147
     },
     "_customMaterial": null,
     "_srcBlendFactor": 2,
@@ -3500,11 +3554,11 @@
     "_objFlags": 0,
     "__editorExtras__": {},
     "node": {
-      "__id__": 136
+      "__id__": 137
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 148
+      "__id__": 149
     },
     "clickEvents": [],
     "_interactable": true,
@@ -3556,7 +3610,7 @@
     "_duration": 0.1,
     "_zoomScale": 0.9,
     "_target": {
-      "__id__": 136
+      "__id__": 137
     },
     "_id": ""
   },
@@ -3583,38 +3637,38 @@
     "_objFlags": 0,
     "__editorExtras__": {},
     "_parent": {
-      "__id__": 99
+      "__id__": 136
     },
     "_children": [
       {
-        "__id__": 151
+        "__id__": 152
       },
       {
-        "__id__": 157
+        "__id__": 158
       }
     ],
     "_active": true,
     "_components": [
       {
-        "__id__": 163
+        "__id__": 164
       },
       {
-        "__id__": 165
+        "__id__": 166
       },
       {
-        "__id__": 167
+        "__id__": 168
       },
       {
-        "__id__": 169
+        "__id__": 170
       }
     ],
     "_prefab": {
-      "__id__": 171
+      "__id__": 172
     },
     "_lpos": {
       "__type__": "cc.Vec3",
       "x": 240,
-      "y": -540,
+      "y": 0,
       "z": 0
     },
     "_lrot": {
@@ -3646,20 +3700,20 @@
     "_objFlags": 0,
     "__editorExtras__": {},
     "_parent": {
-      "__id__": 150
+      "__id__": 151
     },
     "_children": [],
     "_active": true,
     "_components": [
       {
-        "__id__": 152
+        "__id__": 153
       },
       {
-        "__id__": 154
+        "__id__": 155
       }
     ],
     "_prefab": {
-      "__id__": 156
+      "__id__": 157
     },
     "_lpos": {
       "__type__": "cc.Vec3",
@@ -3696,11 +3750,11 @@
     "_objFlags": 0,
     "__editorExtras__": {},
     "node": {
-      "__id__": 151
+      "__id__": 152
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 153
+      "__id__": 154
     },
     "_contentSize": {
       "__type__": "cc.Size",
@@ -3724,11 +3778,11 @@
     "_objFlags": 0,
     "__editorExtras__": {},
     "node": {
-      "__id__": 151
+      "__id__": 152
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 155
+      "__id__": 156
     },
     "_customMaterial": null,
     "_srcBlendFactor": 2,
@@ -3782,20 +3836,20 @@
     "_objFlags": 512,
     "__editorExtras__": {},
     "_parent": {
-      "__id__": 150
+      "__id__": 151
     },
     "_children": [],
     "_active": true,
     "_components": [
       {
-        "__id__": 158
+        "__id__": 159
       },
       {
-        "__id__": 160
+        "__id__": 161
       }
     ],
     "_prefab": {
-      "__id__": 162
+      "__id__": 163
     },
     "_lpos": {
       "__type__": "cc.Vec3",
@@ -3832,11 +3886,11 @@
     "_objFlags": 0,
     "__editorExtras__": {},
     "node": {
-      "__id__": 157
+      "__id__": 158
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 159
+      "__id__": 160
     },
     "_contentSize": {
       "__type__": "cc.Size",
@@ -3860,11 +3914,11 @@
     "_objFlags": 0,
     "__editorExtras__": {},
     "node": {
-      "__id__": 157
+      "__id__": 158
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 161
+      "__id__": 162
     },
     "_customMaterial": null,
     "_srcBlendFactor": 2,
@@ -3941,11 +3995,11 @@
     "_objFlags": 0,
     "__editorExtras__": {},
     "node": {
-      "__id__": 150
+      "__id__": 151
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 164
+      "__id__": 165
     },
     "_contentSize": {
       "__type__": "cc.Size",
@@ -3969,11 +4023,11 @@
     "_objFlags": 0,
     "__editorExtras__": {},
     "node": {
-      "__id__": 150
+      "__id__": 151
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 166
+      "__id__": 167
     },
     "_customMaterial": null,
     "_srcBlendFactor": 2,
@@ -4014,11 +4068,11 @@
     "_objFlags": 0,
     "__editorExtras__": {},
     "node": {
-      "__id__": 150
+      "__id__": 151
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 168
+      "__id__": 169
     },
     "clickEvents": [],
     "_interactable": true,
@@ -4070,7 +4124,7 @@
     "_duration": 0.1,
     "_zoomScale": 0.9,
     "_target": {
-      "__id__": 150
+      "__id__": 151
     },
     "_id": ""
   },
@@ -4084,11 +4138,11 @@
     "_objFlags": 0,
     "__editorExtras__": {},
     "node": {
-      "__id__": 150
+      "__id__": 151
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 170
+      "__id__": 171
     },
     "playOnLoad": false,
     "_clips": [
@@ -4120,6 +4174,83 @@
     "targetOverrides": null,
     "nestedPrefabInstanceRoots": null
   },
+  {
+    "__type__": "cc.UITransform",
+    "_name": "",
+    "_objFlags": 0,
+    "__editorExtras__": {},
+    "node": {
+      "__id__": 136
+    },
+    "_enabled": true,
+    "__prefab": {
+      "__id__": 174
+    },
+    "_contentSize": {
+      "__type__": "cc.Size",
+      "width": 900,
+      "height": 150
+    },
+    "_anchorPoint": {
+      "__type__": "cc.Vec2",
+      "x": 0.5,
+      "y": 0.5
+    },
+    "_id": ""
+  },
+  {
+    "__type__": "cc.CompPrefabInfo",
+    "fileId": "57UiqnZpJJpY9XUefXK9Ae"
+  },
+  {
+    "__type__": "cc.Widget",
+    "_name": "",
+    "_objFlags": 0,
+    "__editorExtras__": {},
+    "node": {
+      "__id__": 136
+    },
+    "_enabled": true,
+    "__prefab": {
+      "__id__": 176
+    },
+    "_alignFlags": 40,
+    "_target": null,
+    "_left": 0,
+    "_right": 0,
+    "_top": 0,
+    "_bottom": 0,
+    "_horizontalCenter": 0,
+    "_verticalCenter": 0,
+    "_isAbsLeft": true,
+    "_isAbsRight": true,
+    "_isAbsTop": true,
+    "_isAbsBottom": true,
+    "_isAbsHorizontalCenter": true,
+    "_isAbsVerticalCenter": true,
+    "_originalWidth": 100,
+    "_originalHeight": 0,
+    "_alignMode": 2,
+    "_lockFlags": 0,
+    "_id": ""
+  },
+  {
+    "__type__": "cc.CompPrefabInfo",
+    "fileId": "43RZpKfe1JBK14YYjNd+9t"
+  },
+  {
+    "__type__": "cc.PrefabInfo",
+    "root": {
+      "__id__": 1
+    },
+    "asset": {
+      "__id__": 0
+    },
+    "fileId": "0an5Te4i9PgI9JkNNC//EJ",
+    "instance": null,
+    "targetOverrides": null,
+    "nestedPrefabInstanceRoots": null
+  },
   {
     "__type__": "cc.UITransform",
     "_name": "",
@@ -4130,7 +4261,7 @@
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 173
+      "__id__": 179
     },
     "_contentSize": {
       "__type__": "cc.Size",
@@ -4173,14 +4304,14 @@
     "_active": true,
     "_components": [
       {
-        "__id__": 176
+        "__id__": 182
       },
       {
-        "__id__": 178
+        "__id__": 184
       }
     ],
     "_prefab": {
-      "__id__": 180
+      "__id__": 186
     },
     "_lpos": {
       "__type__": "cc.Vec3",
@@ -4217,11 +4348,11 @@
     "_objFlags": 0,
     "__editorExtras__": {},
     "node": {
-      "__id__": 175
+      "__id__": 181
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 177
+      "__id__": 183
     },
     "_contentSize": {
       "__type__": "cc.Size",
@@ -4245,11 +4376,11 @@
     "_objFlags": 0,
     "__editorExtras__": {},
     "node": {
-      "__id__": 175
+      "__id__": 181
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 179
+      "__id__": 185
     },
     "_customMaterial": null,
     "_srcBlendFactor": 2,
@@ -4307,12 +4438,12 @@
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 182
+      "__id__": 188
     },
     "_contentSize": {
       "__type__": "cc.Size",
       "width": 1080,
-      "height": 1919.9999999999998
+      "height": 1920
     },
     "_anchorPoint": {
       "__type__": "cc.Vec2",
@@ -4335,7 +4466,7 @@
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 184
+      "__id__": 190
     },
     "_alignFlags": 45,
     "_target": null,
@@ -4371,11 +4502,14 @@
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 186
+      "__id__": 192
     },
     "public_bg": {
       "__id__": 89
     },
+    "img_title": {
+      "__id__": 100
+    },
     "img_icon": {
       "__id__": 108
     },
@@ -4385,11 +4519,19 @@
     "lab_count": {
       "__id__": 120
     },
-    "btn_receive": {
+    "node_btn": {
       "__id__": 136
     },
+    "btn_receive": {
+      "__id__": 137
+    },
     "btn_double": {
-      "__id__": 150
+      "__id__": 151
+    },
+    "sf_dangrihuode": null,
+    "sf_gongxihuode": {
+      "__uuid__": "03920223-0b7b-464e-bce2-d8ebb3c5d3c8@f9941",
+      "__expectedType__": "cc.SpriteFrame"
     },
     "_id": ""
   },
@@ -4407,7 +4549,7 @@
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 188
+      "__id__": 194
     },
     "_id": ""
   },
@@ -4438,7 +4580,7 @@
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 191
+      "__id__": 197
     },
     "_contentSize": {
       "__type__": "cc.Size",
@@ -4466,7 +4608,7 @@
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 193
+      "__id__": 199
     },
     "_alignFlags": 45,
     "_target": null,
@@ -4502,7 +4644,7 @@
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 195
+      "__id__": 201
     },
     "public_bg": {
       "__id__": 2
@@ -4546,7 +4688,7 @@
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 197
+      "__id__": 203
     },
     "playOnLoad": true,
     "_clips": [
@@ -4575,7 +4717,7 @@
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 199
+      "__id__": 205
     },
     "_id": ""
   },

+ 3 - 1
assets/script/ui/mailbox/mailbox.ts

@@ -36,7 +36,7 @@ export class mailbox extends base_ui {
                 if(res.confirm) {
                     this.requestDelete(1,0, ()=>{
                         this.requestListData(false,()=>{
-                            uiManager.showToast('删除成功')
+                            uiManager.showToast('删除')
                         })
                     })
                 }
@@ -134,6 +134,7 @@ export class mailbox extends base_ui {
                 if(res.confirm) {
                     this.details_bg.active = false
                     this.requestDelete(0,v.getData().id, ()=>{
+                        uiManager.showToast('已删除')
                         this.deleteDataLocalHandle(item)
                     })
                 }
@@ -143,6 +144,7 @@ export class mailbox extends base_ui {
             let data = v.getData()
             if(data.state==0) {
                 this.requestRetrieve(0,v.getData().id, ()=>{
+                    uiManager.showToast('领取成功')
                     data.state = 1
                     item.setData(data)
                 })

+ 18 - 2
assets/script/ui/sign_view/sign_receive_reward.ts

@@ -1,20 +1,26 @@
-import { _decorator, Component, Label, Node, Sprite, Animation } from 'cc';
+import { _decorator, Component, Label, Node, Sprite, Animation, SpriteFrame } from 'cc';
 import { base_ui } from '../../fw/base_ui';
 import { sign_reward_data } from '../../data';
 import { tools } from '../../tools';
 import { http } from '../../http';
 import { config } from '../../config';
 import { GameManager } from '../../GameManager';
+import { uiManager } from '../../manager/uiManager';
 const { ccclass, property } = _decorator;
 
 @ccclass('sign_receive_reward')
 export class sign_receive_reward extends base_ui {
     @property(Node) public_bg:Node = null
+    @property(Node) img_title:Node = null
     @property(Node) img_icon:Node = null
     @property(Node) lab_name:Node = null
     @property(Node) lab_count:Node = null
+    @property(Node) node_btn:Node = null
     @property(Node) btn_receive:Node = null
     @property(Node) btn_double:Node = null
+
+    @property(SpriteFrame) sf_dangrihuode = null
+    @property(SpriteFrame) sf_gongxihuode = null
     private m_data:sign_reward_data = null
     private m_cb = null
     start() {
@@ -35,6 +41,8 @@ export class sign_receive_reward extends base_ui {
     initView(data:sign_reward_data, cb) {
         this.m_data = data
         this.m_cb = cb
+        this.img_title.getComponent(Sprite).spriteFrame = this.sf_dangrihuode
+        this.node_btn.active = true
         tools.loadRemoteImg(data.icon, (d)=>{
             this.img_icon.getComponent(Sprite).spriteFrame = d.sf
         })
@@ -42,7 +50,12 @@ export class sign_receive_reward extends base_ui {
         this.lab_count.getComponent(Label).string = `x${data.quantity}`
     }
 
-    public closeSelf() {
+    private showRewardDetails() {
+        this.img_title.getComponent(Sprite).spriteFrame = this.sf_gongxihuode
+        this.node_btn.active = false
+    }
+
+    private closeSelf() {
         this.btn_double.getComponent(Animation).stop()
         this.node.active = false
     }
@@ -52,12 +65,15 @@ export class sign_receive_reward extends base_ui {
         if(is_double) {
             stype = 2
         }
+        uiManager.Instance().showLoading()
         let opt = {'index':this.m_data.index, 'stype': stype}
         http.post(config.API.user_sign, opt, (err,d)=>{
+            uiManager.Instance().hideLoading()
             if(!err){
                 let nd = JSON.parse(d)
                 if(nd.code === config.status.SUCCESS){
                     // console.log("user_sign", nd.content)
+                    this.showRewardDetails()
                     this.m_cb && this.m_cb(this)
                 }
             }

+ 3 - 0
assets/script/ui/sign_view/sign_total_reward.ts

@@ -4,6 +4,7 @@ import { sign_total_reward_item } from './sign_total_reward_item';
 import { http } from '../../http';
 import { config } from '../../config';
 import { sign_total_reward_zw_item } from './sign_total_reward_zw_item';
+import { uiManager } from '../../manager/uiManager';
 const { ccclass, property } = _decorator;
 
 @ccclass('sign_total_reward')
@@ -80,8 +81,10 @@ export class sign_total_reward extends Component {
             return
         }
 
+        uiManager.Instance().showLoading()
         let opt = {'index':data.index}
         http.post(config.API.user_total_receive,opt, (err,d)=>{
+            uiManager.Instance().hideLoading()
             if(!err){
                 let nd = JSON.parse(d)
                 if(nd.code === config.status.SUCCESS){

+ 0 - 1
assets/script/ui/sign_view/sign_view.ts

@@ -88,7 +88,6 @@ export class sign_view extends base_ui {
     private showReceiveReward(data:sign_reward_data) {
         this.receive_reward.active = true
         this.receive_reward.getComponent(sign_receive_reward).initView(data, (v:sign_receive_reward)=>{
-            v.closeSelf()
             this.requestSignListData()
         })
     }