From 3d1e8016516b1b27def77871c8644be363d4fb88 Mon Sep 17 00:00:00 2001 From: xuxueyang <xuxy@fengyuntec.com> Date: 星期五, 26 七月 2024 18:38:59 +0800 Subject: [PATCH] 1 --- sub_pages/customer/self/follow.vue | 25 +++++++++---------------- 1 files changed, 9 insertions(+), 16 deletions(-) diff --git a/sub_pages/customer/self/follow.vue b/sub_pages/customer/self/follow.vue index ca6531d..5963c4b 100644 --- a/sub_pages/customer/self/follow.vue +++ b/sub_pages/customer/self/follow.vue @@ -1,5 +1,7 @@ <template> <view class="follow-page"> + <no-data v-if="!list||list.length===0" style="width: 100%;"></no-data> + <view class="follow-item m-b-40" v-for="(item,index) of list" :key="index"> <image class="avatar img100" :src="item.avatar" mode="aspectFill"></image> <view class="info"> @@ -40,22 +42,13 @@ url: '/sub_pages/customer/shop/shop?id=' + (item.id || '') }) }, - clearFollow(item) { + async clearFollow(item) { this.$message.showLoading() - // var res; - // if(type){ - // res = await this.$http.request('post',`/api/follow/add`,{ - // data:{ - // supplierId:this.dto.supplierId || this.dto.id - // } - // }) - // }else{ - // res = await this.$http.request('get',`/api/follow/add`,{ - // data:{ - // supplierId:this.dto.supplierId || this.dto.id - // } - // }) - // } + const {code} = await this.$http.request('get', `/api/follow/delete`, { + params: { + supplierId: item.id + } + }) this.$message.hideLoading() if (code === 0) { //删除list里的本元素 @@ -119,7 +112,7 @@ .button-2 { border-radius: 34rpx; - border: 2rpx solid #20613D + border: 2rpx solid #20613D; color: #20613D; } } -- Gitblit v1.9.3