cmy 2 anos atrás
pai
commit
af362726d6

+ 20 - 1
api/water.js

@@ -65,7 +65,7 @@ export function createPledge(data) {
 		data
 	});
 }
-// 
+// 还桶
 export function delPledge(data) {
 	return request({
 		url: '/api/pledge/refund',
@@ -74,6 +74,25 @@ export function delPledge(data) {
 	});
 }
 
+// 配送订单
+export function adminStatistics(data) {
+	return request({
+		url: '/api/admin/order/statistics',
+		method: 'get',
+		data
+	});
+}
+
+// 会员管理
+export function storeMember(data) {
+	return request({
+		url: '/api/store/member',
+		method: 'get',
+		data
+	});
+}
+
+
 
 
 

+ 42 - 0
pages.json

@@ -350,12 +350,54 @@
 				{
 					"path": "admin/ktadmin",
 					"style": {
+						// #ifndef MP || APP-PLUS
+						"app-plus": {
+							"titleNView": {
+								"searchInput": {
+									"backgroundColor": "rgba(231, 231, 231,.7)",
+									"borderRadius": "16px",
+									"placeholder": "请输入关键字",
+									"disabled": false,
+									"placeholderColor": "#606266",
+									"align": "left"
+								},
+								"buttons": [{
+									"text": "搜索",
+									"fontSize": "14",
+									"color": "#303133",
+									"background": "rgba(0,0,0,0)",
+									"width": "40px"
+								}]
+							}
+						},
+						// #endif
 						"navigationBarTitleText": "空桶管理"
 					}
 				},
 				{
 					"path": "admin/useradmin",
 					"style": {
+						// #ifndef MP || APP-PLUS
+						"app-plus": {
+							"titleNView": {
+								"searchInput": {
+									"backgroundColor": "rgba(231, 231, 231,.7)",
+									"borderRadius": "16px",
+									"placeholder": "请输入关键字",
+									"disabled": false,
+									"placeholderColor": "#606266",
+									"align": "left"
+								},
+								"buttons": [{
+									"text": "搜索",
+									"fontSize": "14",
+									"color": "#303133",
+									"background": "rgba(0,0,0,0)",
+									"width": "40px"
+								}]
+							}
+						},
+						// #endif
 						"navigationBarTitleText": "用户管理"
 					}
 				},

+ 1 - 1
pages/home/order.vue

@@ -24,7 +24,7 @@
 						v-if="tabItem.loaded === true && tabItem.orderList.length === 0"></empty>
 					<!-- #endif -->
 					<!-- 订单列表 -->
-					<view @click="navTo( '/pages/order/orderDetail?id=' + item.order_id )"
+					<view @click="navTo( '/pages/order/orderDetail?type=1&id=' + item.order_id )"
 						v-for="(item, index) in tabItem.orderList" :key="index" class="order-item position-relative">
 						<view class="i-top b-b flex">
 							<view class="order-code flex">

+ 28 - 14
pages/home/user.vue

@@ -3,8 +3,8 @@
 		<view class="content-box">
 			<view class="user-section">
 				<view class="avatar" @click="navTo('/pages/set/userinfo')">
-					<image class="image" :src="userInfo.avatar|| urlFile+`/static/error/missing-face.png`"
-						mode="scaleToFill"></image>
+					<image class="image" v-if="userInfo.avatar" :src="userInfo.avatar" mode="scaleToFill"></image>
+					<image class="image" v-else src="../../static/error/missing-face.png" mode="scaleToFill"></image>
 				</view>
 				<view class="flex-center phone">
 					{{userInfo.nickname || '游客'}}
@@ -27,8 +27,7 @@
 			</view>
 
 			<view class="cover-container">
-
-				<view class="item-box">
+				<view class="item-box" v-if="userInfo.adminid">
 					<view class="box-title flex">
 						<view class="title"><text>配送员订单</text></view>
 						<view class="link flex" @click="navTo('/pages/user/admin/orderAdmin?state=0')"
@@ -43,8 +42,8 @@
 							<view class=" icon position-relative">
 								<image class="icon-img" src="../../static/icon/userorder1.png" mode="aspectFit">
 								</image>
-								<view class="corner" v-if="userInfo.unpaid_count > 0">
-									<text>{{ userInfo.unpaid_count }}</text>
+								<view class="corner" v-if="shopOrderDetail.unpaid_count > 0">
+									<text>{{ shopOrderDetail.unpaid_count }}</text>
 								</view>
 							</view>
 							<text>待付款</text>
@@ -54,11 +53,11 @@
 							<view class="icon position-relative">
 								<image class="icon-img" src="../../static/icon/userorder2.png" mode="aspectFit">
 								</image>
-								<view class="corner" v-if="userInfo.received_count > 0">
-									<text>{{ userInfo.received_count }}</text>
+								<view class="corner" v-if="shopOrderDetail.unshipped_count > 0">
+									<text>{{ shopOrderDetail.unshipped_count }}</text>
 								</view>
 							</view>
-							<text>待核销</text>
+							<text>待发货</text>
 						</view>
 						<view class="order-item flex-line" @click="navTo('/pages/user/admin/orderAdmin?state=2')"
 							hover-class="common-hover" :hover-stay-time="50">
@@ -72,7 +71,7 @@
 				</view>
 				<view class="listBox">
 					<view class="list">
-						<view class="flex listItem" @click="navTo('/pages/user_home/shareQrCode')">
+						<view  v-if="userInfo.adminid" class="flex listItem" @click="navTo('/pages/user_home/shareQrCode')">
 							<view class="flex titleBox">
 								<image class="listIconImg" src="../../static/icon/usersm.png" mode="widthFix"></image>
 								<text class="title">扫码核销</text>
@@ -82,7 +81,7 @@
 								<image class="img" src="../../static/icon/next1.png" mode="widthFix"></image>
 							</view>
 						</view>
-						<view class="flex listItem" @click="navTo('/pages/user/admin/useradmin')">
+						<view  v-if="userInfo.adminid" class="flex listItem" @click="navTo('/pages/user/admin/useradmin')">
 							<view class="flex titleBox">
 								<image class="listIconImg" src="../../static/icon/useryh.png" mode="widthFix"></image>
 								<text class="title">用户管理</text>
@@ -92,7 +91,7 @@
 								<image class="img" src="../../static/icon/next1.png" mode="widthFix"></image>
 							</view>
 						</view>
-						<view class="flex listItem" @click="navTo('/pages/user/admin/ktadmin')">
+						<view  v-if="userInfo.adminid" class="flex listItem" @click="navTo('/pages/user/admin/ktadmin')">
 							<view class="flex titleBox">
 								<image class="listIconImg" src="../../static/icon/userkt.png" mode="widthFix"></image>
 								<text class="title">空桶管理</text>
@@ -174,6 +173,9 @@
 	import {
 		getUser
 	} from '@/api/user.js';
+	import {
+		adminStatistics
+	} from '@/api/water.js';
 	import {
 		articleList,
 		notify,
@@ -196,8 +198,8 @@
 		},
 		computed: {
 			...mapState('user', ['userInfo', 'orderInfo', 'hasLogin']),
+			...mapState('shop', ['shopOrderDetail']),
 			...mapState(['baseURL', 'urlFile']),
-			...mapState(['fx']),
 			// 总消息条数
 			notic() {
 				return this.user.question_sum + this.user.notice_sum;
@@ -216,6 +218,7 @@
 		},
 		methods: {
 			...mapMutations('user', ['setUserInfo']),
+			...mapMutations('shop', ['setShopOrder']),
 			qhx() {
 				let that = this
 				if (that.hxLoading) {
@@ -343,12 +346,23 @@
 				})
 			},
 			//#endif
+			// 获取订单信息
+			adminStatistics(){
+				adminStatistics({}).then((e) => {
+					this.setShopOrder(e.data)
+				}).catch((e) => {
+					console.log(e, 'sj');
+				})
+			},
 			// 获取用户数据
 			getUser() {
 				console.log('data')
 				const that = this;
 				getUser({}).then((e) => {
-					this.setUserInfo(e.data)
+					that.setUserInfo(e.data)
+					if(e.data.adminid){
+						that.adminStatistics()
+					}
 				}).catch((e) => {
 					console.log(e, 'sj');
 				})

Diferenças do arquivo suprimidas por serem muito extensas
+ 16 - 10
pages/order/orderDetail.vue


+ 152 - 83
pages/user/admin/ktadmin.vue

@@ -1,32 +1,30 @@
 <template>
 	<view class="content">
-		<scroll-view scroll-y="true" class="list-wrap" :style="{'height': maxheight}">
-			<view class="user-item flex">
-				<image src="" mode="" class="item-logo"></image>
-				<view class="item-info flex">
-					<view class="info-name">
-						李丹丹 13523025369
-					</view>
-					<view class="info-address">
-						椒江区东海大道400号
+		<view class="user-item flex">
+			<image src="" mode="" class="item-logo"></image>
+			<view class="item-info flex">
+				<view class="info-name">
+					李丹丹 13523025369
+				</view>
+				<view class="info-address">
+					椒江区东海大道400号
+				</view>
+				<view class="info-t">
+					空桶型号:小瓶330ML
+				</view>
+				<view class="info-info flex">
+					<view class="">
+						押桶:<text>0</text>
 					</view>
-					<view class="info-t">
-						空桶型号:小瓶330ML
+					<view class="">
+						押金:<text>0</text>元
 					</view>
-					<view class="info-info flex">
-						<view class="">
-							押桶:<text>0</text>
-						</view>
-						<view class="">
-							押金:<text>0</text>元
-						</view>
-						<view class="">
-							借桶:<text>0</text>
-						</view>
+					<view class="">
+						借桶:<text>0</text>
 					</view>
 				</view>
 			</view>
-		</scroll-view>
+		</view>
 	</view>
 </template>
 <script>
@@ -36,87 +34,158 @@
 	export default {
 		data() {
 			return {
-				maxheight: '',
+				keyword: '', //搜索关键字
+				searchData: {
+					page: 1,
+					limit: 10,
+					list: [],
+					loadingType: 'more',
+					loaded:false,
+				}
 			};
 		},
 		onLoad(opt) {
-			this.getUserList()
+			this.getlist()
 		},
 		onShow() {
 
 		},
+		// #ifndef MP
+		//点击导航栏 buttons 时触发
+		onNavigationBarButtonTap(e) {
+			const index = e.index;
+			if (index === 0) {
+				this.reLoadSearch();
+			}
+		},
+		// 点击键盘搜索事件
+		onNavigationBarSearchInputConfirmed(e) {
+			this.reLoadSearch();
+		},
+		// 搜索栏内容变化事件
+		onNavigationBarSearchInputChanged(e) {
+			this.keyword = e.text;
+		},
+		// #endif
 		onReady(res) {
 			var that = this;
-			uni.getSystemInfo({
-				success: resu => {
-					const query = uni.createSelectorQuery();
-					query.select('.list-wrap').boundingClientRect();
-					query.exec(function(res) {
-						that.maxheight = resu.windowHeight - res[0].top + 'px';
-					});
-				},
-				fail: res => {}
-			});
 		},
 		onReachBottom() {
-
+			this.getlist();
 		},
 		methods: {
-			getUserList() {
-				getUserList().then(res => {
-					console.log(res);
-				})
+			// 搜索
+			reLoadSearch() {
+				this.searchData={
+					page: 1,
+					limit: 10,
+					list: [],
+					loadingType: 'more',
+					loaded:false
+				};
+				this.getlist()
+			},
+			// 载入数据
+			getlist() {
+				//这里是将订单挂载到tab列表下
+				let navItem = this.searchData;
+				if (navItem.loadingType === 'loading') {
+					//防止重复加载
+					return;
+				}
+				if (navItem.loadingType === 'noMore') {
+					//防止重复加载
+					return;
+				}
+				// 修改当前对象状态为加载中
+				navItem.loadingType = 'loading';
+
+				GetAdminOrderList({
+						page: navItem.page,
+						limit: navItem.limit,
+						keyword: this.keyword
+					})
+					.then(({
+						data
+					}) => {
+						let arr = data.map(e => {
+							return e;
+						});
+						navItem.list = navItem.list.concat(arr);
+						// console.log(navItem.orderList);
+						navItem.page++;
+						if (navItem.limit == data.length) {
+							//判断是否还有数据, 有改为 more, 没有改为noMore
+							navItem.loadingType = 'more';
+							return;
+						} else {
+							//判断是否还有数据, 有改为 more, 没有改为noMore
+							navItem.loadingType = 'noMore';
+						}
+						uni.hideLoading();
+						navItem.loaded = true;
+					})
+					.catch(e => {
+						console.log(e);
+					});
 			}
 		}
 	};
 </script>
 <style lang="scss" scoped>
-.user-item {
-	width: 750rpx;
-	height: 277rpx;
-	align-items: flex-start;
-	padding: 42rpx 35rpx;
-	background-color: #fff;
-	margin-bottom: 15rpx;
-	.item-logo {
-		width: 115rpx;
-		height: 115rpx;
-		border-radius: 50%;
-		background-color: #eee;
-		flex-shrink: 0;
-		margin-right: 24rpx;
-	}
-	.item-info {
-		flex-grow: 1;
-		height: 100%;
-		flex-direction: column;
+	.user-item {
+		width: 750rpx;
+		height: 277rpx;
 		align-items: flex-start;
-		justify-content: space-between;
-		.info-name {
-			font-size: 34rpx;
-			font-weight: bold;
-			color: #333333;
-		}
-		.info-address {
-			font-size: 28rpx;
-			font-weight: 500;
-			color: #333333;
-		}
-		.info-t {
-			font-size: 26rpx;
-			font-weight: 500;
-			color: #333333;
+		padding: 42rpx 35rpx;
+		background-color: #fff;
+		margin-bottom: 15rpx;
+
+		.item-logo {
+			width: 115rpx;
+			height: 115rpx;
+			border-radius: 50%;
+			background-color: #eee;
+			flex-shrink: 0;
+			margin-right: 24rpx;
 		}
-		.info-info {
-			width: 100%;
-			font-size: 30rpx;
-			font-weight: bold;
-			color: #333333;
-			text {
-				color: #FF4C4C;
+
+		.item-info {
+			flex-grow: 1;
+			height: 100%;
+			flex-direction: column;
+			align-items: flex-start;
+			justify-content: space-between;
+
+			.info-name {
+				font-size: 34rpx;
+				font-weight: bold;
+				color: #333333;
+			}
+
+			.info-address {
+				font-size: 28rpx;
+				font-weight: 500;
+				color: #333333;
 			}
+
+			.info-t {
+				font-size: 26rpx;
+				font-weight: 500;
+				color: #333333;
+			}
+
+			.info-info {
+				width: 100%;
+				font-size: 30rpx;
+				font-weight: bold;
+				color: #333333;
+
+				text {
+					color: #FF4C4C;
+				}
+			}
+
 		}
-		
 	}
-}
-</style>
+</style>

+ 54 - 52
pages/user/admin/orderAdmin.vue

@@ -7,17 +7,22 @@
 
 		<swiper :current="tabCurrentIndex" class="swiper-box" duration="300" @change="changeTab">
 			<swiper-item class="tab-content" v-for="(tabItem, tabIndex) in navList" :key="tabIndex">
-				<scroll-view class="list-scroll-content" scroll-y @scrolltolower="loadData">
+				<scroll-view class="list-scroll-content padding-t-30" scroll-y @scrolltolower="loadData">
 					<!-- 空白页 -->
 					<empty v-if="tabItem.loaded === true && tabItem.orderList.length === 0"></empty>
 
 					<!-- 订单列表 -->
-					<view @click="goToOrderDetail(item)" v-for="(item, index) in tabItem.orderList" :key="index"
-						class="order-item">
-						<view class="i-top b-b">
-							<text class="time">订单编号:{{ item.order_id }}</text>
-							<text class="state" :style="{ color: item.stateTipColor }">{{ item.status_name }}</text>
-							<!-- <text v-if="item.status === 4" class="del-btn iconfont icondelete" @click="deleteOrder(index)"></text> -->
+					<view @click="goToOrderDetail(item)" v-for="(item, index) in tabItem.orderList" :key="index" class="order-item position-relative">
+						<view class="i-top b-b flex">
+							<view class="order-code flex">
+								<view class="no">
+									订单编号:
+								</view>
+								<view>
+									{{ item.order_id }}
+								</view>
+							</view>
+							<text class="font-size-sm" :style="{ color: item.stateTipColor }">{{ item.status_name }}</text>
 						</view>
 
 						<scroll-view v-if="item._info.length > 0" class="goods-box" scroll-x>
@@ -52,12 +57,15 @@
 								下单时间:{{item.add_time.split(' ')[0].replace(/-/g,'/')}}
 							</view>
 							<view class="btm-right flex">
-								<view class="btm-btn">
+								<view class="btm-btn" @click="toCall(item)">
 									联系客户
 								</view>
-								<view class="btm-btn ksps">
+								<view class="btm-btn ksps" v-if=" item.status_name=='未发货'">
 									开始配送
 								</view>
+								<view class="btm-btn ksps" v-if=" item.status_name=='待收货'">
+									导航
+								</view>
 							</view>
 						</view>
 					</view>
@@ -72,9 +80,6 @@
 <script>
 	import {
 		orderList,
-		orderCancel,
-		orderDel,
-		orderTake
 	} from '@/api/order.js';
 	import {
 		GetAdminOrderList
@@ -107,14 +112,6 @@
 						page: 1, //当前页数
 						limit: 10 //每次信息条数
 					},
-					{
-						state: 3,
-						text: '待评价',
-						loadingType: 'more',
-						orderList: [],
-						page: 1, //当前页数
-						limit: 10 //每次信息条数
-					},
 					{
 						state: 4,
 						text: '已完成',
@@ -151,19 +148,27 @@
 		},
 		// #endif
 		methods: {
+			// 前往商家
+			shopNext() {
+				// 打开地图导航
+				uni.openLocation({
+					latitude: +this.item.system_store.latitude,
+					longitude: +this.item.system_store.longitude,
+					fail(e) {
+						console.log(e);
+					}
+				})
+			},
+			// 联系用户
 			toCall(phone) {
 				uni.makePhoneCall({
 					phoneNumber:phone
 				})
 			},
-			// 转换金额为数字
-			moneyNum(value) {
-				return +value;
-			},
 			//跳转到订单详情
 			goToOrderDetail(e) {
 				uni.navigateTo({
-					url: '/pages/order/orderDetail?id=' + e.order_id
+					url: '/pages/order/orderDetail?type=2&id=' + e.order_id
 				});
 			},
 			//获取订单列表
@@ -232,13 +237,15 @@
 			//订单状态文字和颜色
 			orderStateExp(state) {
 				let stateTip = '',
-					stateTipColor = '#fa436a';
+					stateTipColor = '#3C82E6';
 				switch (+state) {
 					case 0:
 						stateTip = '待付款';
+						stateTipColor = '#3C82E6'
 						break;
 					case 1:
 						stateTip = '待发货';
+						stateTipColor = '#3C82E6'
 						break;
 					case 2:
 						stateTip = '待收货';
@@ -248,7 +255,7 @@
 						break;
 					case 4:
 						stateTip = '已完成';
-						stateTipColor = '#5dbc7c';
+						stateTipColor = '#999999';
 						break;
 					case 9:
 						stateTip = '订单已关闭';
@@ -317,39 +324,33 @@
 		}
 	}
 
-	.uni-swiper-item {
-		height: auto;
-	}
-
 	.order-item {
-		display: flex;
-		flex-direction: column;
 		padding-left: 30rpx;
 		padding-right: 30rpx;
+		margin: 0 30rpx;
+		margin-bottom: 30rpx;
+		border-radius: 30rpx;
 		background: #fff;
-		margin-top: 16rpx;
-		position: relative;
+		color: #A8ADBF;
 
 		.i-top {
-			display: flex;
-			align-items: center;
 			height: 80rpx;
-			font-size: $font-base;
-			color: $font-color-dark;
-			position: relative;
-
-			.time {
-				flex: 1;
-			}
-
-			.state {
-				color: $base-color;
+			.order-code{
+				font-size: $font-sm;
+				.no{
+					padding: 10rpx 10rpx;
+					background-color: #FFEAE5;
+					color: #FD5B23;
+					line-height: 1;
+					border-top-right-radius: 10rpx;
+					border-bottom-left-radius: 10rpx;
+					margin-right: 10rpx;
+					
+				}
 			}
-
 			.del-btn {
 				padding: 10rpx 0 10rpx 36rpx;
 				font-size: $font-lg;
-				color: $font-color-light;
 				position: relative;
 
 				&:after {
@@ -380,7 +381,7 @@
 
 			.hj {
 				padding-top: 40rpx;
-				color: #000000;
+				color: $font-color-dark;
 				padding-bottom: 20rpx;
 			}
 
@@ -433,6 +434,7 @@
 				width: 120rpx;
 				padding-top: 10rpx;
 				margin-right: 0;
+				color: $font-color-dark;
 			}
 		}
 
@@ -442,6 +444,7 @@
 			font-size: 24rpx;
 			font-weight: 500;
 			color: #A3A8BB;
+			line-height: 1;
 
 			.btm-right {
 				justify-content: flex-end;
@@ -449,13 +452,12 @@
 
 			.btm-btn {
 				width: 144rpx;
-				height: 55rpx;
+				padding: 10rpx 0;
 				border: 2px solid #ededed;
 				border-radius: 28rpx;
 				font-size: 26rpx;
 				font-weight: 500;
 				text-align: center;
-				line-height: 55rpx;
 				margin-left: 10rpx;
 				color: #999999;
 			}

+ 167 - 91
pages/user/admin/useradmin.vue

@@ -1,128 +1,204 @@
 <template>
 	<view class="content">
-		<scroll-view scroll-y="true" class="list-wrap" :style="{'height': maxheight}">
-			<view class="user-item ">
-				<view class="user-info">
-					<image src="" mode=""></image>
-					<view class="">
-						往事随风往事随风
-					</view>
+		<!-- 空白页 -->
+		<!-- #ifdef H5 -->
+		<empty src="../../../static/error/emptyOrder.png"
+			v-if="searchData.loaded === true && searchData.list.length === 0"></empty>
+		<!-- #endif -->
+		<!-- #ifndef H5 -->
+		<empty src="../../static/error/emptyOrder.png"
+			v-if="searchData.loaded === true && searchData.list.length === 0"></empty>
+		<!-- #endif -->
+		<view class="user-item " v-for="(item,index) in searchData.list">
+			<view class="user-info">
+				<image :src="item.avatar" mode="scaleToFill"></image>
+				<view class="">
+					{{item.nickname}}
 				</view>
-				<view class="user-base">
-					<view class="">
-						电话:13756234569
-					</view>
-					<view class="">
-						地址:椒江区东海大道400号
-					</view>
-					<view class="">
-						进店时间:2023-12-20 14:20:12
-					</view>
+			</view>
+			<view class="user-base">
+				<view class="">
+					电话:{{item.phone}}
+				</view>
+				<view class="">
+					地址:椒江区东海大道400号
+				</view>
+				<view class="">
+					进店时间:2023-12-20 14:20:12
+				</view>
+			</view>
+			<view class="jg"></view>
+			<view class="btn-list flex">
+				<view class="btn">
+					水票:<text>30</text>
 				</view>
-				<view class="jg"></view>
-				<view class="btn-list flex">
-					<view class="btn">
-						水票:<text>30</text>
-					</view>
-					<view class="btn">
-						押桶:<text>5</text>
-					</view>
+				<view class="btn">
+					押桶:<text>5</text>
 				</view>
 			</view>
-		</scroll-view>
+		</view>
+		<uni-load-more :status="searchData.loadingType"></uni-load-more>
 	</view>
 </template>
 <script>
 	import {
-		getUserList
-	} from "@/api/user.js"
+		storeMember
+	} from "@/api/water.js"
 	export default {
 		data() {
 			return {
-				maxheight: '',
+				keyword: '', //搜索关键字
+				searchData: {
+					page: 1,
+					limit: 10,
+					list: [],
+					loadingType: 'more',
+					loaded:false
+				}
 			};
 		},
 		onLoad(opt) {
-			this.getUserList()
+			this.getlist()
 		},
 		onShow() {
 
 		},
 		onReady(res) {
 			var that = this;
-			uni.getSystemInfo({
-				success: resu => {
-					const query = uni.createSelectorQuery();
-					query.select('.list-wrap').boundingClientRect();
-					query.exec(function(res) {
-						that.maxheight = resu.windowHeight - res[0].top + 'px';
-					});
-				},
-				fail: res => {}
-			});
 		},
+		// #ifndef MP
+		//点击导航栏 buttons 时触发
+		onNavigationBarButtonTap(e) {
+			const index = e.index;
+			if (index === 0) {
+				this.reLoadSearch();
+			}
+		},
+		// 点击键盘搜索事件
+		onNavigationBarSearchInputConfirmed(e) {
+			this.reLoadSearch();
+		},
+		// 搜索栏内容变化事件
+		onNavigationBarSearchInputChanged(e) {
+			this.keyword = e.text;
+		},
+		// #endif
 		onReachBottom() {
-
+			this.getlist();
 		},
 		methods: {
-			getUserList() {
-				getUserList().then(res => {
-					console.log(res);
-				})
+			// 搜索
+			reLoadSearch() {
+				this.searchData={
+					page: 1,
+					limit: 10,
+					list: [],
+					loadingType: 'more',
+					loaded:false
+				};
+				this.getlist()
+			},
+			// 获取数据
+			getlist() {
+				//这里是将订单挂载到tab列表下
+				let navItem = this.searchData;
+				if (navItem.loadingType === 'loading') {
+					//防止重复加载
+					return;
+				}
+				if (navItem.loadingType === 'noMore') {
+					//防止重复加载
+					return;
+				}
+				// 修改当前对象状态为加载中
+				navItem.loadingType = 'loading';
+				storeMember({
+						page: navItem.page,
+						limit: navItem.limit,
+						keyword: this.keyword
+					})
+					.then(({
+						data
+					}) => {
+						let arr = data.data;
+						navItem.list = navItem.list.concat(arr);
+						// console.log(navItem.orderList);
+						navItem.page++;
+						if (navItem.limit == data.length) {
+							//判断是否还有数据, 有改为 more, 没有改为noMore
+							navItem.loadingType = 'more';
+							return;
+						} else {
+							//判断是否还有数据, 有改为 more, 没有改为noMore
+							navItem.loadingType = 'noMore';
+						}
+						uni.hideLoading();
+						navItem.loaded = true;
+					})
+					.catch(e => {
+						console.log(e);
+					});
 			}
 		}
 	};
 </script>
 <style lang="scss" scoped>
-.user-item {
-	width: 750rpx;
-	align-items: flex-start;
-	padding: 25rpx 45rpx;
-	background-color: #fff;
-	margin-bottom: 15rpx;
-	.user-info {
-		height: 72rpx;
-		font-size: 36rpx;
-		font-weight: bold;
-		color: #333333;
-		display: flex;
-		justify-content: flex-start;
-		align-items: center;
-		image {
+	.user-item {
+		width: 750rpx;
+		align-items: flex-start;
+		padding: 25rpx 45rpx;
+		background-color: #fff;
+		margin-bottom: 15rpx;
+
+		.user-info {
 			height: 72rpx;
-			width: 72rpx;
-			margin-right: 20rpx;
-			background-color: #eee;
-			border-radius: 50%;
+			font-size: 36rpx;
+			font-weight: bold;
+			color: #333333;
+			display: flex;
+			justify-content: flex-start;
+			align-items: center;
+
+			image {
+				height: 72rpx;
+				width: 72rpx;
+				margin-right: 20rpx;
+				background-color: #eee;
+				border-radius: 50%;
+			}
 		}
-	}
-	.jg {
-		width: 681rpx;
-		height: 2rpx;
-		background: #E6E6E6;
-		margin: 25rpx auto;
-	}
-	.user-base {
-		view {
-			margin: 15rpx 0;
+
+		.jg {
+			width: 681rpx;
+			height: 2rpx;
+			background: #E6E6E6;
+			margin: 25rpx auto;
 		}
-	}
-	.btn-list {
-		justify-content: flex-start;
-		.btn {
-			padding: 15rpx 30rpx;
-			margin-right: 32rpx;
-			
-			border: 2px solid #333333;
-			border-radius: 10rpx;
-			font-size: 31rpx;
-			font-weight: 500;
-			color: #333333;
-			text {
-				color: #FF4C4C;
-				
+
+		.user-base {
+			view {
+				margin: 15rpx 0;
+			}
+		}
+
+		.btn-list {
+			justify-content: flex-start;
+
+			.btn {
+				padding: 15rpx 30rpx;
+				margin-right: 32rpx;
+
+				border: 2px solid #333333;
+				border-radius: 10rpx;
+				font-size: 31rpx;
+				font-weight: 500;
+				color: #333333;
+
+				text {
+					color: #FF4C4C;
+
+				}
 			}
 		}
 	}
-}
-</style>
+</style>

+ 2 - 7
pages/water/waterUse.vue

@@ -13,7 +13,7 @@
 			</empty>
 			<!-- #endif -->
 			<view @click="navTo( '/pages/order/orderDetail?id=' + item.order_id )"
-				v-for="(item, index) in tabItem.orderList" :key="index" class="order-item position-relative">
+				v-for="(item, index) in navList[tabCurrentIndex].orderList" :key="index" class="order-item position-relative">
 				<view class="i-top b-b flex">
 					<view class="order-code flex">
 						<view class="no">
@@ -23,8 +23,7 @@
 							{{ item.order_id }}
 						</view>
 					</view>
-					<text class="font-size-sm" :style="{ color: item.stateTipColor }">{{ item._status._title }}</text>
-					<!-- <text v-if="item.status === 4" class="del-btn iconfont icondelete" @click="deleteOrder(index)"></text> -->
+					<text class="font-size-sm font-color-gray" >已完成}</text>
 				</view>
 			
 				<scroll-view v-if="item.cartInfo.length > 0" class="goods-box" scroll-x>
@@ -76,12 +75,8 @@
 					</view>
 				</view>
 			</view>
-			
-			
-			
 			<uni-load-more :status="navList[tabCurrentIndex].loadingType"></uni-load-more>
 		</scroll-view>
-
 	</view>
 </template>
 

+ 12 - 4
store/model/shop.js

@@ -3,25 +3,33 @@ let state = {
 	shopAction:{
 		name:'',
 		image:'',
-	}//商店账号商家数据
+	},//商店账号商家数据
+	shopOrderDetail:{}//保存商家订单信息
 }
 
 let mutations = {
-	// 保存用户信息
+	
 	setShopInfo(state, provider) {
 		state.shopDetail = provider;
-		uni.setStorage({ //缓存用户登陆状态
+		uni.setStorage({ 
 			key: 'shopDetail',
 			data: provider
 		})
 	},
 	setShopAction(state, provider) {
 		state.shopAction = provider;
-		uni.setStorage({ //缓存用户登陆状态
+		uni.setStorage({ 
 			key: 'shopDetailAction',
 			data: provider
 		})
 	},
+	setShopOrder(state, provider) {
+		state.shopOrderDetail = provider;
+		uni.setStorage({ 
+			key: 'shopOrderDetail',
+			data: provider
+		})
+	},
 }
 
 let getters = {}

Alguns arquivos não foram mostrados porque muitos arquivos mudaram nesse diff