lhl преди 2 години
родител
ревизия
c0d597d2a1
променени са 6 файла, в които са добавени 280 реда и са изтрити 6 реда
  1. 9 0
      api/user.js
  2. 12 0
      pages.json
  3. 2 2
      pages/home/user.vue
  4. 7 4
      pages/order/createOrder.vue
  5. 122 0
      pages/user/admin/ktadmin.vue
  6. 128 0
      pages/user/admin/useradmin.vue

+ 9 - 0
api/user.js

@@ -123,4 +123,13 @@ export function spreadPeople(data) {
 		method: 'post',
 		data
 	});
+}
+
+//获取会员列表
+export function getUserList(data) {
+	return request({
+		url: '/api/store/member',
+		method: 'get',
+		data
+	})
 }

+ 12 - 0
pages.json

@@ -327,6 +327,18 @@
 					"style": {
 						"navigationBarTitleText": "邀请好友"
 					}
+				},
+				{
+					"path": "admin/ktadmin",
+					"style": {
+						"navigationBarTitleText": "空桶管理"
+					}
+				},
+				{
+					"path": "admin/useradmin",
+					"style": {
+						"navigationBarTitleText": "用户管理"
+					}
 				}
 			]
 		}, {

+ 2 - 2
pages/home/user.vue

@@ -84,7 +84,7 @@
 								<image class="img" src="../../static/icon/next1.png" mode="widthFix"></image>
 							</view>
 						</view>
-						<view class="flex listItem" @click="navTo('/pages/user_home/shareQrCode')">
+						<view 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>
@@ -94,7 +94,7 @@
 								<image class="img" src="../../static/icon/next1.png" mode="widthFix"></image>
 							</view>
 						</view>
-						<view class="flex listItem" @click="navTo('/pages/user_home/shareQrCode')">
+						<view 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>

+ 7 - 4
pages/order/createOrder.vue

@@ -425,10 +425,13 @@
 					shipping_type: obj.tabCurrentIndex, //提货方式 1 快递 2自提
 				};
 				// 判断是否需要读取非默认商家id
-				if (obj.onShopId != -1) {
-					data.store_id = obj.onShopId;
-				} else {
-					data.store_id = obj.shopDetail.id;
+				// if (obj.onShopId != -1) {
+				// 	data.store_id = obj.onShopId;
+				// } else {
+				// 	data.store_id = obj.shopDetail.id;
+				// }
+				if(obj.tabCurrentIndex == 2) {
+					data.store_id = obj.shopAddress.id
 				}
 				// 生成订单
 				createOrderkey(data, obj.orderKey)

+ 122 - 0
pages/user/admin/ktadmin.vue

@@ -0,0 +1,122 @@
+<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>
+					<view class="info-t">
+						空桶型号:小瓶330ML
+					</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>
+				</view>
+			</view>
+		</scroll-view>
+	</view>
+</template>
+<script>
+	import {
+		getUserList
+	} from "@/api/user.js"
+	export default {
+		data() {
+			return {
+				maxheight: '',
+			};
+		},
+		onLoad(opt) {
+			this.getUserList()
+		},
+		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 => {}
+			});
+		},
+		onReachBottom() {
+
+		},
+		methods: {
+			getUserList() {
+				getUserList().then(res => {
+					console.log(res);
+				})
+			}
+		}
+	};
+</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;
+		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>

+ 128 - 0
pages/user/admin/useradmin.vue

@@ -0,0 +1,128 @@
+<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>
+				</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="jg"></view>
+				<view class="btn-list flex">
+					<view class="btn">
+						水票:<text>30</text>
+					</view>
+					<view class="btn">
+						押桶:<text>5</text>
+					</view>
+				</view>
+			</view>
+		</scroll-view>
+	</view>
+</template>
+<script>
+	import {
+		getUserList
+	} from "@/api/user.js"
+	export default {
+		data() {
+			return {
+				maxheight: '',
+			};
+		},
+		onLoad(opt) {
+			this.getUserList()
+		},
+		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 => {}
+			});
+		},
+		onReachBottom() {
+
+		},
+		methods: {
+			getUserList() {
+				getUserList().then(res => {
+					console.log(res);
+				})
+			}
+		}
+	};
+</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 {
+			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;
+		}
+	}
+	.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>