From 3995eec885dd7a1458a3dcb9eaf85a8768a62df3 Mon Sep 17 00:00:00 2001
From: xuxueyang <xuxy@fengyuntec.com>
Date: 星期三, 18 九月 2024 16:08:13 +0800
Subject: [PATCH] update 积分历史

---
 manifest.json                               |    2 +-
 sub_pages/customer/coupon/point-history.vue |   38 ++++++++++++++++++++++++++++++--------
 plugins/http.js                             |    2 +-
 3 files changed, 32 insertions(+), 10 deletions(-)

diff --git a/manifest.json b/manifest.json
index 782394c..2848179 100644
--- a/manifest.json
+++ b/manifest.json
@@ -49,7 +49,7 @@
     "quickapp" : {},
     /* 快应用特有相关 */
     "mp-weixin" : {
-        "appid" : "wx6d0ecc4e18710458",
+        "appid" : "wx1441324401626290",
         "setting" : {
             "urlCheck" : false,
             "es6" : true,
diff --git a/plugins/http.js b/plugins/http.js
index 1f2b554..59919fb 100644
--- a/plugins/http.js
+++ b/plugins/http.js
@@ -72,7 +72,7 @@
 									code: 0,
 									msg: ''
 								})
-							} else if (res.data.code === '3000' || res.data && res.data.code &&
+							} else if (res.data.code === '3000' || res.data.code === '30000' || res.data && res.data.code &&
 								res.data.code.startsWith('3000')) {
 								let validmsg = ''
 								if (Array.isArray(res.data.data)) {
diff --git a/sub_pages/customer/coupon/point-history.vue b/sub_pages/customer/coupon/point-history.vue
index e0107f5..6fe0ef2 100644
--- a/sub_pages/customer/coupon/point-history.vue
+++ b/sub_pages/customer/coupon/point-history.vue
@@ -1,11 +1,10 @@
 <template>
 	<!-- 列表页面 -->
 	<view>
-		<view class="m-t-12 m-b-12 flex">
-			<!-- v-if="!selecttoday" -->
-			<view class="m-l-a m-r-20 w-fit" :class="[query.date?'':'desc-gray']" @click="show_time_picker_time=true">
-				{{query.date || '请选择日期'}}
-			</view>
+		<view class="m-t-12 m-b-12 text-center" :class="[query.recordDateStart?'':'desc-gray']"
+			@click="show_time_picker_time=true">
+			{{query.recordDateStart&&( (query.recordDateStart||'') + ' ~ ' + (query.recordDateEnd || '')) || '请选择日期'}}
+
 		</view>
 		<view class="p15" style="min-height: calc(100vh - 260rpx);">
 			<no-data v-if="!list||list.length==0" style="width: 100%;"></no-data>
@@ -29,8 +28,15 @@
 			</view>
 		</view>
 
+
 		<!-- 判断是否到底了,自动吧 -->
 		<footer-msg :more="page.total>0&&page.total>page.current*page.size"></footer-msg>
+
+		<u-calendar :show="show_time_picker_time" mode="range" @confirm="select_time_picker_time" :monthNum="3"
+			@cancel="show_time_picker_time = false" rowHeight="100" @close="show_time_picker_time = false"
+			minDate="2024-07-01" :maxDate="maxDate" toolTip="选择日期">
+		</u-calendar>
+
 	</view>
 </template>
 
@@ -40,11 +46,15 @@
 			return {
 				query: {
 					// status: ''
-				}
+					recordDateStart: '',
+					recordDateEnd: ''
+				},
+				show_time_picker_time: false,
+				maxDate: '',
 			}
 		},
 		onLoad() {
-
+			this.maxDate = this.$util.toDate(new Date())
 
 			this.listApi = '/api/customer/point/list'
 
@@ -60,7 +70,19 @@
 			uni.stopPullDownRefresh()
 		},
 		methods: {
-
+			select_time_picker_time(e) {
+				console.log('select_time_picker_time', e)
+				if (e && e.length > 0) {
+					this.query.recordDateStart = e[0]
+					this.query.recordDateEnd = e[e.length - 1]
+					this.show_time_picker_time = false
+				} else {
+					this.query.recordDateStart = ''
+					this.query.recordDateEnd = ''
+					this.show_time_picker_time = false
+				}
+				this.refreshList()
+			}
 		}
 	}
 </script>

--
Gitblit v1.9.3