dengjie commit : 代码完善

This commit is contained in:
clay
2023-01-09 18:03:51 +08:00
parent 9c0477da5c
commit c906a7d33a
16 changed files with 198 additions and 173 deletions

View File

@@ -30,11 +30,11 @@
</view>
</view>
<u-button v-if="type==1" type="success" text="移除" color="#0EBB5B" @click="showModal()"></u-button>
<u-button v-if="type==2" type="success" text="取消收藏" color="#0EBB5B"></u-button>
<u-button v-if="type==2" type="success" text="取消收藏" color="#0EBB5B" @click="showModal()"></u-button>
</u-grid-item>
</u-grid>
<u-modal :show="showM" :content="content" showCancelButton closeOnClickOverlay @confirm="confirm"
@cancel="cancel" @close="close">
<u-modal :show="showM" :content="content" showCancelButton closeOnClickOverlay="false" @confirm="confirm"
@cancel="cancel">
</u-modal>
<view style="font-size: 24rpx;color: #A3A3A3;text-align: center;padding: 26rpx 0;"
v-if="type==1&&productList.length==0">
@@ -96,17 +96,13 @@
},
confirm() {
this.showM = false
console.log('删除成功');
// this.$apiServe.deleteHistoryOrCollection(this.productId).then(res => {
// console.log('删除历史记录或收藏', res);
// this.getHistoryOrCollection()
// }).finally(_ => {})
this.$apiServe.deleteHistoryOrCollection(this.productId).then(res => {
// console.log('删除历史记录或收藏', res.data);
this.productList.splice(this.productId, 1)
}).finally(_ => {})
},
cancel() {
this.showM = false
},
close() {
this.showM = false
}
}
}