高敬炎 2 years ago
parent
commit
fc4e93bb4c
1 changed files with 15 additions and 12 deletions
  1. 15 12
      xiaochengxu/pages/cardHolder/notice.vue

+ 15 - 12
xiaochengxu/pages/cardHolder/notice.vue

@@ -57,18 +57,21 @@
 						this.unreadList=data
 						if(this.unreadList.length>0){
 							for(var i=0;i<this.unreadList.length;i++){
-								this.unreadList[i].newsFlag=1
-								this.$request.baseRequest('admin.unimall.cardNewsInfo', 'update',{
-									cardNewsInfo:JSON.stringify(this.unreadList[i]),
-								}, failres => {
-									console.log('res+++++', failres.errmsg)
-									uni.showToast({
-										icon:"none",
-										title: failres.errmsg,
-										duration: 3000
-									});
-									uni.hideLoading()
-								}).then(res => {})
+								if(this.unreadList[i].newsFlag==0){
+									this.unreadList[i].newsFlag=1
+									this.$request.baseRequest('admin.unimall.cardNewsInfo', 'update',{
+										cardNewsInfo:JSON.stringify(this.unreadList[i]),
+									}, failres => {
+										console.log('res+++++', failres.errmsg)
+										uni.showToast({
+											icon:"none",
+											title: failres.errmsg,
+											duration: 3000
+										});
+										uni.hideLoading()
+									}).then(res => {})
+								}
+								
 							}
 							
 						}