From c3319db3d83f2d4fa7fdf06e3792496ce77d90aa Mon Sep 17 00:00:00 2001
From: xuxueyang <xuxy@fengyuntec.com>
Date: 星期一, 09 九月 2024 02:24:16 +0800
Subject: [PATCH] update 提及的修复问题和会员信息相关的

---
 sub_pages/customer/self/history.vue |   46 ++++++++++++++++++++++++++++++++++++++++++++--
 1 files changed, 44 insertions(+), 2 deletions(-)

diff --git a/sub_pages/customer/self/history.vue b/sub_pages/customer/self/history.vue
index d1a2578..7026ddf 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.refreshList()
+		},
+
 		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>
 
@@ -198,18 +227,31 @@
 				<view class="flex1">
 					<view class="flex" @click.stop="toDetail(dto)">
 						<view class="title">
-							<span class="m-r-5" style="display: inline-block;"
-								v-if="dto.categoryStr">{{dto.categoryStr||''}}</span>
+							<!-- <span class="m-r-5" style="display: inline-block;" -->
+								<!-- v-if="dto.categoryStr">{{dto.categoryStr||''}}</span> -->
 							<span v-if="dto.levelStr" class="m-r-5"
 								style="display: inline-block;">{{ dto.levelStr || '' }}</span>
 							{{ dto.name || '-' }}
 						</view>
+						
+						<!-- #ifdef PUB_CUSTOMER_DEV -->
+						<view class="price m-l-a m-r-0 component-price-new">
+							¥{{ dto.priceMember || dto.price || '-' }}/扎<span class="tip">会员价</span>
+							<view class="component-price-old">
+								¥{{dto.price}}/扎
+							</view>
+						</view>
+						<!-- #endif -->
+						<!-- #ifndef PUB_CUSTOMER_DEV -->
 						<view class="price m-l-a m-r-0">
 							¥{{ dto.price || '-' }}/扎
 						</view>
+						<!-- #endif -->
 					</view>
 					<view class="flex">
 						<view class="desc p-t-12 flex" @click.stop="toDetail(dto)">
+							<view class="m-r-15"> 已售:{{ ((dto.sales||0) +(dto.realSales||0))  || 0 }}							</view>
+
 							<view class="m-r-15">剩余:{{ dto.stock || 0 }}</view>
 							<view class="m-r-15">颜色:{{ dto.color || '-' }}</view>
 						</view>

--
Gitblit v1.9.3