|
@@ -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 => {})
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
|
|
|
}
|