wujia 6 mesi fa
parent
commit
ac4c02a8eb

+ 1 - 1
assets/package/prefab/login/Bulletin.prefab

@@ -328,7 +328,7 @@
       "__id__": 1
     },
     "component": "",
-    "_componentId": "b3af5m1GXVGbbnvSfJdfFBW",
+    "_componentId": "72956a2pRNHBIKrygGKnOIv",
     "handler": "onTouchButton",
     "customEventData": ""
   },

+ 2 - 2
assets/script/game/data/MailData.ts

@@ -192,8 +192,8 @@ class Data {
         // }
     }
 
-    removeMail(mailList: string[]): void {
-        for (const k1 of mailList) {
+    removeMail(mailList): void {
+        for (const k1 in mailList) {
             for (const key in this._mails) {
                 const v = this._mails[key];
                 if (parseInt(v.id, 10) === parseInt(k1, 10)) {

+ 3 - 1
assets/script/game/ui/login/Bulletin.ts

@@ -25,9 +25,11 @@ export class Bulletin extends BaseView {
 		super.onLoad();
 		this.closeTips.string = StringUtil.getLanguageData('点击空白关闭');
 		this.titleTx.string = StringUtil.getLanguageData('公告');
-		tween(this.closeTips.getComponent(UIOpacity))
+		
+		tween(this.closeTips.node.getComponent(UIOpacity))
 			.to(1.2, { opacity: 10 })
 			.to(1, { opacity: 255 })
+			.union()
 			.repeatForever()
 			.start()
 	}

+ 6 - 4
assets/script/game/ui/mail/MailDetail.ts

@@ -71,9 +71,11 @@ export class MailDetail extends BaseView {
 		this.getTips.getComponent(Label).string = StringUtil.getLanguageData('附件已领取');
 		this.getBtnTx.string = StringUtil.getLanguageData('领取附件');
 		this.delBtnTx.string = StringUtil.getLanguageData('删除邮件');
-		tween(this.closeTips.getComponent(UIOpacity))
+		
+		tween(this.closeTips.node.getComponent(UIOpacity))
 			.to(1.2, { opacity: 10 })
 			.to(1, { opacity: 255 })
+			.union()
 			.repeatForever()
 			.start()
 	}
@@ -83,7 +85,6 @@ export class MailDetail extends BaseView {
 	}
 
 	onOpen(data) {
-		console.log('============= detail open', data)
 		this.data = data;
 		this.updateUI();
 	}
@@ -107,14 +108,15 @@ export class MailDetail extends BaseView {
 
 		} else if (target.name == 'del_btn') {
 			LoginMgr.sendPost('user', 'batch_del_mail', (data) => {
-				console.log(data);
+				// console.log(data);
 				MailData.removeMail(data.del_mails);
 				Framework.event.fireEvent(GameEvent.MailUpdate);
+				Framework.layer.close(this);
 			}, { ids: [this.data.id] })
 
 		} else if (target.name == 'get_btn') {
 			LoginMgr.sendPost('user', 'read_mail', (data) => {
-				console.log(data);
+				// console.log(data);
 				MailData.setMailReadById(this.data.id)
 				Framework.event.fireEvent(GameEvent.MailUpdate);
 				Framework.layer.open(ViewID.MailDetail, null, this.data);

+ 3 - 5
assets/script/game/ui/mail/MailItem.ts

@@ -101,18 +101,16 @@ export class MailItem extends ResKeeper {
 		let target: any = event.target;
 		if (target.name == 'bg') {
 			if (this.data.read == 1) {
-				console.log('=============== aa')
 				Framework.layer.open(ViewID.MailDetail, null, this.data);
 				return;
 			}
 			if (this.data.award && this.data.award.size > 0) {
-				console.log('=============== bb')
 				Framework.layer.open(ViewID.MailDetail, null, this.data);
 			} else {
 				LoginMgr.sendPost('user', 'read_mail', (data) => {
-					console.log(data);
-					MailData.setMailReadById(data.id)
-					// Framework.event.fireEvent(GameEvent.MailUpdate);
+					// console.log(data);
+					MailData.setMailReadById(this.data.id)
+					Framework.event.fireEvent(GameEvent.MailUpdate);
 					Framework.layer.open(ViewID.MailDetail, null, this.data);
 				}, { id: this.data.id })
 			}

+ 3 - 2
assets/script/game/ui/mail/MailMain.ts

@@ -50,9 +50,10 @@ export class MailMain extends BaseView {
 		this.delAutoBtnTx.string = StringUtil.getLanguageData('一键删除');
 		this.getAutoBtnTx.string = StringUtil.getLanguageData('一键领取');
 
-		tween(this.closeTips.getComponent(UIOpacity))
+		tween(this.closeTips.node.getComponent(UIOpacity))
 			.to(1.2, { opacity: 10 })
 			.to(1, { opacity: 255 })
+			.union()
 			.repeatForever()
 			.start()
 	}
@@ -122,7 +123,7 @@ export class MailMain extends BaseView {
 				return
 			}
 			LoginMgr.sendPost('user', 'batch_mail_awards', (data) => {
-				console.log(data);
+				// console.log(data);
 				for (const key in data.read_mails) {
 					if (Object.prototype.hasOwnProperty.call(data.read_mails, key)) {
 						const element = data.read_mails[key];

+ 2 - 2
assets/sub_bundle/mail/prefab/MailDetail.prefab

@@ -4388,7 +4388,7 @@
       "__id__": 1
     },
     "component": "",
-    "_componentId": "995a5ONk2pJD7rK6RU/nsFU",
+    "_componentId": "b3af5m1GXVGbbnvSfJdfFBW",
     "handler": "onTouchButton",
     "customEventData": ""
   },
@@ -4927,7 +4927,7 @@
       "__id__": 1
     },
     "component": "",
-    "_componentId": "995a5ONk2pJD7rK6RU/nsFU",
+    "_componentId": "b3af5m1GXVGbbnvSfJdfFBW",
     "handler": "onTouchButton",
     "customEventData": ""
   },

+ 2 - 2
assets/sub_bundle/mail/prefab/MailMain.prefab

@@ -1200,7 +1200,7 @@
     },
     "_lpos": {
       "__type__": "cc.Vec3",
-      "x": -160.07640075683594,
+      "x": -174.07640075683594,
       "y": 0,
       "z": 0
     },
@@ -1314,7 +1314,7 @@
     },
     "_alignFlags": 8,
     "_target": null,
-    "_left": -14,
+    "_left": -28,
     "_right": 0,
     "_top": 0,
     "_bottom": 0,