From 2aeefc16be93b2ab09562d881718d432cf82e6f8 Mon Sep 17 00:00:00 2001
From: 陶杰 <1378534974@qq.com>
Date: 星期日, 08 九月 2024 18:09:48 +0800
Subject: [PATCH] 1.去掉fv
---
sub_pages/customer/self/history.vue | 29 +++++++++++++++++++++++++++++
1 files changed, 29 insertions(+), 0 deletions(-)
diff --git a/sub_pages/customer/self/history.vue b/sub_pages/customer/self/history.vue
index d1a2578..1664760 100644
--- a/sub_pages/customer/self/history.vue
+++ b/sub_pages/customer/self/history.vue
@@ -26,6 +26,7 @@
},
onLoad() {
this.listApi = '/api/browse/history/list'
+ this.page.size =30
this.getList()
this.$http.request('get', '/api/code/value', {
@@ -54,7 +55,31 @@
})
})
},
+ onShow() {
+ // 页面显示时重新加载浏览记录数据
+ this.listApi = '/api/browse/history/list'
+ this.page.size =30
+ this.getList()
+ },
+
methods: {
+
+ async deleteExpired() {
+ await this.$message.confirm('是否清空已失效的商品')
+ this.$message.showLoading()
+ const {
+ code
+ } = await this.$http.request('post', '/api/browse/history/clear', {
+ data: {
+
+ }
+ })
+ this.$message.hideLoading()
+ if (code === 0) {
+ this.refreshList()
+ }
+ },
+
toDetail(item) {
if (item.status == 'UP') {
@@ -179,6 +204,10 @@
{{ query.levelStr || '级别' }}
<image src="../../../static/common/icon-arrow-down.png" class="icon-arrow-down"></image>
</view>
+ <view class="flex1" @click="deleteExpired()">
+ 一键清空已失效
+ <!-- <image src="../../../static/common/icon-arrow-down.png" class="icon-arrow-down"></image> -->
+ </view>
</view>
</view>
--
Gitblit v1.9.3