From 9fb9e0b5b7c2664552f06a683fe1204525d8fd4e Mon Sep 17 00:00:00 2001
From: MrShi <1878285526@qq.com>
Date: 星期三, 11 二月 2026 15:59:56 +0800
Subject: [PATCH] 合并

---
 mini-program/pagesA/pages/my-membership/my-membership.vue |  119 +++++++++++++++++++++++++++++++++++++++++++++++++++++------
 1 files changed, 106 insertions(+), 13 deletions(-)

diff --git a/mini-program/pagesA/pages/my-membership/my-membership.vue b/mini-program/pagesA/pages/my-membership/my-membership.vue
index 2b26c80..c9f8023 100644
--- a/mini-program/pagesA/pages/my-membership/my-membership.vue
+++ b/mini-program/pagesA/pages/my-membership/my-membership.vue
@@ -4,56 +4,148 @@
 			<u-search
 				placeholder="鎼滅储浼氬憳鏄电О/鎵嬫満鍙�"
 				:showAction="false"
+				@search="getFirstPageData()" 
 				bgColor="#F8F9FB"
 				placeholderColor="#999999"
 				searchIconSize="28"
 				height="36"
-				v-model="keyword" />
+				v-model="memberInfo" />
 			<view class="head-cate">
 				<view class="head-cate-item">
-					<text class="num">5,323</text>
+					<text class="num">{{totalAll}}</text>
 					<text class="title">浼氬憳鎬绘暟</text>
 				</view>
 				<view class="head-cate-item">
-					<text class="num">3,289</text>
+					<text class="num">{{countData.orderNum||0}}</text>
 					<text class="title">璁㈠崟鎬绘暟</text>
 				</view>
 				<view class="head-cate-item">
 					<view class="price">
-						<text>5,323</text>
-						<text>.00</text>
+						<text>{{countData.saleTotalNum||0}}</text>
+						<text>{{countData.saleTotalFloat||'.00'}}</text>
 					</view>
 					<text class="title">璁㈠崟閲戦</text>
 				</view>
 			</view>
 		</view>
 		<view class="list">
-			<view class="list-item">
+			<view class="list-item" v-for="(item,index) in dataList">
 				<view class="tx">
-					<image src="/static/logo.png" mode="widthFix"></image>
+					<image :src="item.imgFullUrl?item.imgFullUrl:'/static/icon/defualt.png'" mode="widthFix"></image>
 				</view>
 				<view class="info">
 					<view class="info-a">
-						<text>鏉庡┓骞�</text>
-						<text>1815****5556</text>
+						<text>{{item.name || item.nickname || ''}}</text>
+						<text>{{item.phone || ''}}</text>
 					</view>
-					<view class="info-date">鍏宠仈鏃堕棿锛�2024-04-18 19:29:01</view>
-					<view class="info-num">
+					<view class="info-date">鍏宠仈鏃堕棿锛歿{item.bindShopDate || ''}}</view>
+					 <!-- <view class="info-num">
 						<text>璁㈠崟閲忥細3</text>
 						<text>璁㈠崟閲戦锛毬�3678.00</text>
-					</view>
+					</view> -->
 				</view>
 			</view>
+			<view v-if="!hasNext" class="nomore">宸插姞杞藉叏閮�</view>
 		</view>
 	</view>
 </template>
 
 <script>
+	import { mapState } from 'vuex'
 	export default {
+		computed: {
+			...mapState(['navHeight', 'statusbarHeight','shopInfo', 'shopToken'])
+		},
 		data() {
 			return {
-				
+				memberInfo:'',
+				shop:{},
+				currentPage:1,
+				totalAll:0,	
+				total:0,	
+				hasNext:true,
+				dataList:[],
+				countData:{},
 			};
+		},
+		onShow() {
+			this.shop  ={}
+			this.checkShopLogin()
+			this.shop = this.shopInfo || {}
+			this.getFirstPageData()
+			this.getCountData()
+		},
+		onReachBottom(){
+			this.getDataList( );
+		},
+		methods:{
+			async  getCountData(index){
+					var that =this 
+					let res = await that.$u.api.saleReport({tokenType:1  })
+					if (res.code === 200) { 
+						this.active = index
+						this.countData = res.data 
+						this.countData.profitTotal = (this.countData.profitTotal||0.00 ).toFixed(2)
+						this.countData.saleTotal = (this.countData.saleTotal||0.00).toFixed(2)  
+						this.countData.profitTotalNum = Math.floor(this.countData.profitTotal) 
+						this.countData.saleTotalNum = Math.floor( this.countData.saleTotal) 
+						var t1 =(this.countData.profitTotal - this.countData.profitTotalNum).toFixed(2)
+						var t2 =(this.countData.saleTotal - this.countData.saleTotalNum).toFixed(2)
+						this.countData.profitTotalFloat =( t1+'').slice(1, 4)
+						this.countData.saleTotalFloat = ( t2+'').slice(1, 4) 
+					} 
+			},
+			getFirstPageData(){
+				this.currentPage = 0
+				this.hasNext=true
+				this.total=0
+				this.dataList=[]
+				this.getDataList()
+			},
+			async  getDataList(){
+					if(this.loading || !this.hasNext){
+						return
+					}
+					this.loading=true
+					this.currentPage =   this.currentPage+1
+					if(this.currentPage == 1){
+						this.hasNext =true
+						this.dataList=[]
+					}
+					var that =this 
+					let res = await that.$u.api.myCustomer({
+							capacity:10,
+							model: { 
+								memberInfo: this.memberInfo
+							},
+							page:this.currentPage
+						});
+						console.log(res)
+					if (res.code === 200 ) {
+						if(res.data && this.memberInfo ==''&&this.currentPage==1){
+							this.totalAll = res.data.total||0
+						}
+						if ( res.data && res.data.page ===this.currentPage) { 
+							res.data.records = res.data.records||[]
+							 that.dataList.push(...res.data.records)
+							 that.total=res.data.total
+							 if( this.currentPage >= res.data.pageCount||0){
+								 that.hasNext=false
+							 }else{
+								 that.hasNext=true
+							 }
+						}
+					} 
+					this.loading=false
+			},
+			checkShopLogin(){
+				var that =this
+				if( this.shopInfo ==null || this.shopInfo.id==null ||  this.shopToken==null || this.shopToken==''){
+					uni.navigateTo({
+						url: '/pages/login/login'
+					})
+				} 
+			}
 		}
 	}
 </script>
@@ -130,6 +222,7 @@
 			margin-top: 20rpx;
 			background-color: #ffffff;
 			padding: 0 30rpx;
+			padding-bottom: 60rpx;
 			box-sizing: border-box;
 			.list-item {
 				width: 100%;

--
Gitblit v1.9.3