Преглед изворни кода

修改小程序店铺查询

zs пре 1 година
родитељ
комит
9e1b810e3e

+ 12 - 6
config.js

@@ -28,14 +28,16 @@ if (system.uniPlatform == "app") {
 		wx_env.miniProgram.envVersion == "develop" ||
 		wx_env.miniProgram.envVersion == "trial"
 	) {
-		wx_projectkey = "pointApp";
-		wx_dev = "/dev";
+		// wx_projectkey = "pointApp";
+	    wx_projectkey = "tehqApp";
+		// wx_dev = "/dev";
+		wx_dev = "";
 	}
 }
 // 开发环境,生产环境新方法--end
 export default {
 	serverUrl: "https://broadcast.waityou24.cn",
-	// serverUrl: 'http://192.168.1.144:12211',
+	// serverUrl: 'http://192.168.1.113:12211',
 	stompUrl: "broadcast.waityou24.cn",
 	wsUrl: `wss://broadcast.waityou24.cn${wx_dev}/point/chat/v1/api/ws`,
 	system: system,
@@ -43,7 +45,7 @@ export default {
 	wx_dev: wx_dev,
 	share: {},
 	my_menu: [
-		//
+		//菜单
 		{
 			title: "我的优惠劵",
 			route: "pagesMy/discount/index",
@@ -51,6 +53,10 @@ export default {
 		{
 			title: "我的尊荣",
 			route: "pagesMy/integral/index",
+		},
+		{
+			title: "我的收藏",
+			route: "pagesMy/collection/market",
 		},
 		{
 			title: "我的资产",
@@ -59,7 +65,7 @@ export default {
 		{
 			title: "我的拼团",
 			route: "pagesMy/dough/index",
-		},
+		},
 		{
 			title: "我的收货地址",
 			route: "pagesMy/address/index",
@@ -78,7 +84,7 @@ export default {
 		},
 	],
 	my_orderList: [
-		//
+		//订单状态
 		{
 			icon: "icon-daifukuan",
 			title: "未支付",

Разлика између датотеке није приказан због своје велике величине
+ 637 - 616
pages/home/index.vue


+ 96 - 87
pages/index/index.vue

@@ -1,87 +1,96 @@
-<template>
-	<mobile-frame>
-		<view class="main">
-			<view class="one">
-				<image class="logo" :src="logoUrl" mode=""></image>
-			</view>
-		</view>
-	</mobile-frame>
-</template>
-
-<script>
-	export default {
-		data() {
-			return {
-				logoUrl: '',
-			};
-		},
-		onLoad: async function() {
-			const that = this;
-			await that.searchConfig();
-		},
-		methods: {
-			// 查询基本设置
-			async searchConfig() {
-				const that = this;
-				let res = await that.$api(`/config`, 'GET', {});
-				if (res.errcode == '0') {
-					uni.getStorage({
-						key: 'token',
-						success: async (res) => {
-							let arr = await that.$api(`/user/cct`, 'POST');
-							if (arr.errcode == '0') {
-								uni.setStorage({
-									key: 'token',
-									data: arr.data,
-									success: function() {}
-								});
-							}
-						}
-					})
-					let config = res.data;
-					that.$set(that, `logoUrl`, config.config.logo[0].url);
-					uni.setStorage({
-						key: 'config',
-						data: config,
-						success: function(res) {
-							// 赋值默认值
-							that.$config.share = {
-								title: config.title,
-								path: '/pages/index/index',
-								imageUrl: config.config.share[0].url
-							}
-							let url = `/pages/home/index`; ///pagesHome/order/detail   /pages/home/index
-							uni.redirectTo({
-								url
-							})
-						},
-						fail: function(err) {
-							console.log(err);
-						}
-					})
-				}
-			}
-		}
-	}
-</script>
-
-<style lang="scss">
-	.main {
-		display: flex;
-		flex-direction: column;
-		width: 100vw;
-		height: 100vh;
-
-		.one {
-			text-align: center;
-			margin: 40vw 0 0 0;
-
-			.logo {
-				width: 50vw;
-				height: 50vw;
-				border-radius: 90px;
-				box-shadow: 0 0 5px #f1f1f1;
-			}
-		}
-	}
-</style>
+<template>
+	<mobile-frame>
+		<view class="main">
+			<view class="one">
+				<image class="logo" :src="logoUrl" mode=""></image>
+			</view>
+		</view>
+	</mobile-frame>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				// 店铺id
+				shop: '6350f909a4d1c1253468bdb2',
+				logoUrl: '',
+			};
+		},
+		onLoad: async function() {
+			const that = this;
+			await that.searchConfig();
+		},
+		methods: {
+			// 查询基本设置
+			async searchConfig() {
+				const that = this;
+				let res = await that.$api(`/config`, 'GET', {
+					shop: that.shop
+				});
+				if (res.errcode == '0') {
+					uni.getStorage({
+						key: 'token',
+						success: async (res) => {
+							let arr = await that.$api(`/user/cct`, 'POST');
+							if (arr.errcode == '0') {
+								uni.setStorage({
+									key: 'token',
+									data: arr.data,
+									success: function() {}
+								});
+							}
+						}
+					})
+					let config = res.data;
+					that.$set(that, `logoUrl`, config.config.logo[0].url);
+					uni.setStorage({
+						key: 'config',
+						data: config,
+						success: function(res) {
+							// 赋值默认值
+							that.$config.share = {
+								title: config.title,
+								path: '/pages/index/index',
+								imageUrl: config.config.share[0].url
+							}
+							let url = `/pages/home/index`; ///pagesHome/order/detail   /pages/home/index
+							uni.redirectTo({
+								url
+							})
+						},
+						fail: function(err) {
+							console.log(err);
+						}
+					})
+					uni.setStorage({
+						key: 'shop',
+						data: that.shop || '6350f909a4d1c1253468bdb2',
+						success: function() {}
+					});
+				}
+			}
+		}
+	}
+</script>
+
+<style lang="scss">
+	.main {
+		display: flex;
+		flex-direction: column;
+		width: 100vw;
+		height: 100vh;
+
+		.one {
+			text-align: center;
+			margin: 40vw 0 0 0;
+
+			.logo {
+				width: 50vw;
+				height: 50vw;
+				border-radius: 90px;
+				box-shadow: 0 0 5px #f1f1f1;
+			}
+		}
+	}
+</style>

Разлика између датотеке није приказан због своје велике величине
+ 882 - 876
pages/login/index.vue


+ 389 - 376
pages/my/index.vue

@@ -1,376 +1,389 @@
-<template>
-	<mobile-frame :frameStyle="frameStyle" @toPath="toPath">
-		<view class="main">
-			<view class="one">
-				<view class="one_1" v-if="user&&user._id==null">
-					<text class="iconfont icon-geren2" @click="toCommon('pages/login/index')"></text>
-					<view class="name">未登录</view>
-				</view>
-				<view class="one_1" v-else>
-					<view class="one_1_1" @tap="toNotice()">
-						<uni-badge :text="notice_total" absolute="rightTop" size="normal">
-							<text class="iconfont icon-xiaoxitongzhi"></text>
-						</uni-badge>
-					</view>
-					<image class="image" :src="user.icon&&user.icon.length>0?user.icon[0].url:''"></image>
-					<view class="name">
-						<text>{{user&&user.name||'暂无名称'}}</text>
-						<text>{{user&&user.is_leader=='0'?'团购会员':'普通会员'}}</text>
-					</view>
-				</view>
-				<view class="one_2">
-					<view class="one_2_1" @click="toCommon('pagesMy/collection/market')">
-						<text v-if="user._id">{{market_num||0}}</text>
-						<text>收藏的商品</text>
-					</view>
-					<text class="link">|</text>
-					<view class="one_2_1" @click="toCommon('pagesMy/collection/shop')">
-						<text v-if="user._id">{{shop_num||0}}</text>
-						<text>收藏的店铺</text>
-					</view>
-				</view>
-			</view>
-			<view class="two">
-				<view class="two_1">
-					<view class="title">我的订单</view>
-					<view class="title">
-						<text @click="toCommon('pagesMy/order/all')">全部订单</text>
-						<text class="iconfont icon-jiantouyou"></text>
-					</view>
-				</view>
-				<view class="two_2">
-					<view class="orderList" v-for="(item, index) in orderList" :key="index" @click="toOrder(item)">
-						<uni-badge :text="item.num" absolute="rightTop" size="normal">
-							<view class="icon">
-								<text class="iconfont" :class="[item.icon]"></text>
-							</view>
-							<text class="title">{{item.title}}</text>
-						</uni-badge>
-					</view>
-				</view>
-				<view class="two_1" v-for="(item, index) in menuList" :key="index" @click="toCommon(item.route)">
-					<view class="title">{{item.title}}</view>
-					<view class="title">
-						<text v-if="user.id&&item.title=='我的尊荣'">{{integral||0}}分</text>
-						<text v-if="item.title=='客服电话'"
-							@tap="makePhone(serviceContactInfo.phone)">{{serviceContactInfo.phone||''}}</text>
-						<text class="iconfont icon-jiantouyou"></text>
-					</view>
-				</view>
-			</view>
-		</view>
-	</mobile-frame>
-</template>
-
-<script>
-	export default {
-		data() {
-			return {
-				frameStyle: {
-					useBar: true
-				},
-				// 用户信息
-				user: {},
-				// 客服信息
-				serviceContactInfo: {},
-				// 订单图标菜单
-				orderList: [],
-				// 菜单
-				menuList: [],
-				// 收藏商品
-				market_num: '',
-				// 收藏店铺
-				shop_num: '',
-				// 积分
-				integral: '',
-				// 未读消息
-				notice_total: 0,
-			};
-		},
-		onShow: async function() {
-			const that = this;
-			// 查询其他信息
-			await that.searchOther();
-			// 监听用户登录
-			await that.watchLogin();
-			// 监听用户登录
-			await that.notice();
-		},
-		methods: {
-			// 监听用户登录
-			watchLogin() {
-				const that = this;
-				uni.getStorage({
-					key: 'token',
-					success: async (res) => {
-						let user = that.$jwt(res.data);
-						if (user && user._id) {
-							let arr;
-							// 查询用户信息
-							arr = await that.$api(`/user/${user._id}`, 'GET');
-							if (arr.errcode == '0') that.$set(that, `user`, arr.data);
-							// 查询收藏商品
-							arr = await that.$api(`/storeGoods/userView`, 'GET', {
-								customer: user._id
-							})
-							if (arr.errcode == '0') that.$set(that, `market_num`, arr.total);
-							// 查询收藏店铺
-							arr = await that.$api(`/storeShop/userView`, 'GET', {
-								customer: user._id
-							})
-							if (arr.errcode == '0') that.$set(that, `shop_num`, arr.total);
-							arr = await that.$api(`/point/computedTotal`, 'GET', {
-								customer: user._id
-							})
-							if (arr.errcode == '0') that.$set(that, `integral`, Math.trunc(arr.data));
-							that.searchOther();
-						}
-					},
-					fail: (err) => {}
-				})
-			},
-			// 消息通知
-			notice() {
-				const that = this;
-				uni.getStorage({
-					key: 'token',
-					success: async (res) => {
-						let user = that.$jwt(res.data);
-						if (user && user._id) {
-							let res = await that.$api(`/notice`, 'GET', {
-								customer: user._id,
-								status: '0'
-							});
-							if (res.errcode == '0') that.$set(that, `notice_total`, res.total);
-						}
-					}
-				})
-			},
-			// 查询其他信息
-			async searchOther() {
-				const that = this;
-				let config = that.$config;
-				let user = that.user;
-				if (config) {
-					if (user && user._id) {
-						let res = await that.$api(`/viewUser/toDeal`, 'GET');
-						if (res.errcode == '0') {
-							for (let val of config.my_orderList) {
-								if (val.type == "order") {
-									if (val.status == '0') val.num = res.data.notPay
-									if (val.status == '1') val.num = res.data.isPay
-									if (val.status == '2') val.num = res.data.allSend
-								} else {
-									val.num = res.data.afterSale;
-								}
-							}
-						}
-						if (user.is_leader == '0') {
-							config.my_menu = config.my_menu.filter((i) => {
-								return i.route != 'pagesMy/apply/add';
-							});
-						}
-					}
-					// 订单图标菜单
-					that.$set(that, `orderList`, config.my_orderList);
-					// 菜单
-					that.$set(that, `menuList`, config.my_menu);
-				}
-				let res;
-				res = await that.$api(`/serviceContact`, 'GET');
-				if (res.errcode == '0' && res.total > 0) {
-					that.$set(that, `serviceContactInfo`, res.data[0])
-				}
-			},
-			// 公共跳转
-			toCommon(e) {
-				uni.getStorage({
-					key: 'token',
-					success: function(res) {
-						uni.navigateTo({
-							url: `/${e}`
-						})
-					},
-					fail: function(err) {
-						uni.navigateTo({
-							url: `/pages/login/index`
-						})
-					}
-				});
-
-			},
-			// 系统消息页
-			toNotice() {
-				uni.navigateTo({
-					url: `/pagesHome/notice/index`
-				})
-			},
-			// 订单跳转页面 
-			toOrder(e) {
-				const that = this;
-				uni.getStorage({
-					key: 'token',
-					success: function(res) {
-						if (e.type == 'order') {
-							uni.navigateTo({
-								url: `/${e.route}?status=${e.status}`
-							})
-						} else if (e.type == 'after') {
-							uni.navigateTo({
-								url: `/${e.route}`
-							})
-						}
-					},
-					fail: function(err) {
-						uni.navigateTo({
-							url: `/pages/login/index`
-						})
-					}
-				});
-
-			},
-			// 拨打电话
-			makePhone(e) {
-				uni.makePhoneCall({
-					phoneNumber: e
-				});
-			},
-			// 底部菜单跳转
-			toPath(e) {
-				let url = `/${e.route}`;
-				if (e.type == '0') uni.redirectTo({
-					url
-				})
-				else {
-					uni.navigateTo({
-						url
-					})
-				}
-			},
-		}
-	}
-</script>
-
-<style lang="scss">
-	.main {
-		display: flex;
-		flex-direction: column;
-		width: 100vw;
-		height: 100vh;
-
-		.one {
-			text-align: center;
-			padding: 4vw 0;
-			background-color: var(--fFB1Color);
-			color: var(--mainColor);
-
-			.one_1 {
-				margin: 0 0 5vw 0;
-
-				.one_1_1 {
-					position: absolute;
-					left: 55vw;
-
-					.iconfont {
-						font-size: 20px;
-					}
-				}
-
-				image {
-					width: 25vw;
-					height: 25vw;
-					border-radius: 25vw;
-				}
-
-				.iconfont {
-					font-size: 80px;
-				}
-
-				.name {
-					display: flex;
-					justify-content: space-evenly;
-					margin: 2vw 0;
-					font-size: var(--font18Szie);
-				}
-
-				.image {
-					border: 1px solid var(--f1Color);
-				}
-			}
-
-			.one_2 {
-				display: flex;
-				flex-direction: row;
-				justify-content: space-around;
-				font-size: var(--font16Szie);
-
-				.one_2_1 {
-					display: flex;
-					flex-direction: column;
-				}
-
-				.link {
-					font-weight: bold;
-				}
-			}
-		}
-
-		.two {
-			background-color: var(--f1Color);
-
-			.two_1 {
-				display: flex;
-				justify-content: space-between;
-				padding: 4vw;
-				background-color: var(--mainColor);
-				margin: 0 0 0.1vw 0;
-				border-bottom: 1px solid var(--f1Color);
-
-				.title {
-					font-size: var(--font16Szie);
-
-					text:first-child {
-						margin: 0 1vw 0 0;
-					}
-				}
-
-				.title:last-child {
-					color: var(--f85Color);
-					font-size: var(--font14Size);
-				}
-			}
-
-			.two_1:nth-last-child(2) {
-				margin: 0 0 2vw 0;
-			}
-
-			.two_1:nth-last-child(4) {
-				margin: 0 0 2vw 0;
-			}
-
-			.two_2 {
-				display: flex;
-				justify-content: space-between;
-				padding: 5vw;
-				background-color: var(--mainColor);
-				margin: 0 0 2vw 0;
-
-				.orderList {
-					text-align: center;
-
-					.icon {
-						.iconfont {
-							font-size: 25px;
-						}
-					}
-
-					.title {
-						display: inline-block;
-						margin: 2vw 0 0 0;
-						font-size: var(--font12Size);
-					}
-				}
-			}
-		}
-	}
-</style>
+<template>
+	<mobile-frame :frameStyle="frameStyle" @toPath="toPath">
+		<view class="main">
+			<view class="one">
+				<view class="one_1" v-if="user&&user._id==null">
+					<text class="iconfont icon-geren2" @click="toCommon('pages/login/index')"></text>
+					<view class="name">未登录</view>
+				</view>
+				<view class="one_1" v-else>
+					<view class="one_1_1" @tap="toNotice()">
+						<uni-badge :text="notice_total" absolute="rightTop" size="normal">
+							<text class="iconfont icon-xiaoxitongzhi"></text>
+						</uni-badge>
+					</view>
+					<image class="image" :src="user.icon&&user.icon.length>0?user.icon[0].url:''"></image>
+					<view class="name">
+						<text>{{user&&user.name||'暂无名称'}}</text>
+						<text>{{user&&user.is_leader=='0'?'团购会员':'普通会员'}}</text>
+					</view>
+				</view>
+				<!-- <view class="one_2">
+					<view class="one_2_1" @click="toCommon('pagesMy/collection/market')">
+						<text v-if="user._id">{{market_num||0}}</text>
+						<text>收藏的商品</text>
+					</view>
+					<text class="link">|</text>
+					<view class="one_2_1" @click="toCommon('pagesMy/collection/shop')">
+						<text v-if="user._id">{{shop_num||0}}</text>
+						<text>收藏的店铺</text>
+					</view>
+				</view> -->
+			</view>
+			<view class="two">
+				<view class="two_1">
+					<view class="title">我的订单</view>
+					<view class="title">
+						<text @click="toCommon('pagesMy/order/all')">全部订单</text>
+						<text class="iconfont icon-jiantouyou"></text>
+					</view>
+				</view>
+				<view class="two_2">
+					<view class="orderList" v-for="(item, index) in orderList" :key="index" @click="toOrder(item)">
+						<uni-badge :text="item.num" absolute="rightTop" size="normal">
+							<view class="icon">
+								<text class="iconfont" :class="[item.icon]"></text>
+							</view>
+							<text class="title">{{item.title}}</text>
+						</uni-badge>
+					</view>
+				</view>
+				<view class="two_1" v-for="(item, index) in menuList" :key="index" @click="toCommon(item.route)">
+					<view class="title">{{item.title}}</view>
+					<view class="title">
+						<text v-if="user.id&&item.title=='我的尊荣'">{{integral||0}}分</text>
+						<text v-if="user.id&&item.title=='我的收藏'">{{market_num||0}}个</text>
+						<text v-if="item.title=='客服电话'"
+							@tap="makePhone(serviceContactInfo.phone)">{{serviceContactInfo.phone||''}}</text>
+						<text class="iconfont icon-jiantouyou"></text>
+					</view>
+				</view>
+			</view>
+		</view>
+	</mobile-frame>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				frameStyle: {
+					useBar: true
+				},
+				// 店铺id
+				shop: '',
+				// 用户信息
+				user: {},
+				// 客服信息
+				serviceContactInfo: {},
+				// 订单图标菜单
+				orderList: [],
+				// 菜单
+				menuList: [],
+				// 收藏商品
+				market_num: '',
+				// 收藏店铺
+				shop_num: '',
+				// 积分
+				integral: '',
+				// 未读消息
+				notice_total: 0,
+			};
+		},
+		onShow: async function() {
+			const that = this;
+			// 查询其他信息
+			await that.searchOther();
+			// 监听用户登录
+			await that.watchLogin();
+			// 监听用户登录
+			await that.notice();
+		},
+		methods: {
+			// 监听用户登录
+			watchLogin() {
+				const that = this;
+				uni.getStorage({
+					key: 'token',
+					success: async (res) => {
+						let user = that.$jwt(res.data);
+						if (user && user._id) {
+							let arr;
+							// 查询用户信息
+							arr = await that.$api(`/user/${user._id}`, 'GET');
+							if (arr.errcode == '0') that.$set(that, `user`, arr.data);
+							// 查询收藏商品
+							arr = await that.$api(`/storeGoods/userView`, 'GET', {
+								customer: user._id,
+								limit: 1
+							})
+							if (arr.errcode == '0') that.$set(that, `market_num`, arr.total);
+							// // 查询收藏店铺
+							// arr = await that.$api(`/storeShop/userView`, 'GET', {
+							// 	customer: user._id
+							// })
+							// if (arr.errcode == '0') that.$set(that, `shop_num`, arr.total);
+							arr = await that.$api(`/point/computedTotal`, 'GET', {
+								customer: user._id
+							})
+							if (arr.errcode == '0') that.$set(that, `integral`, Math.trunc(arr.data));
+							that.searchOther();
+						}
+					},
+					fail: (err) => {}
+				})
+			},
+			// 消息通知
+			notice() {
+				const that = this;
+				uni.getStorage({
+					key: 'token',
+					success: async (res) => {
+						let user = that.$jwt(res.data);
+						if (user && user._id) {
+							let res = await that.$api(`/notice`, 'GET', {
+								customer: user._id,
+								shop: that.shop,
+								status: '0'
+							});
+							if (res.errcode == '0') that.$set(that, `notice_total`, res.total);
+						}
+					}
+				})
+			},
+			// 查询其他信息
+			async searchOther() {
+				const that = this;
+				let config = that.$config;
+				let user = that.user;
+				if (config) {
+					if (user && user._id) {
+						let res = await that.$api(`/viewUser/toDeal`, 'GET');
+						if (res.errcode == '0') {
+							for (let val of config.my_orderList) {
+								if (val.type == "order") {
+									if (val.status == '0') val.num = res.data.notPay
+									if (val.status == '1') val.num = res.data.isPay
+									if (val.status == '2') val.num = res.data.allSend
+								} else {
+									val.num = res.data.afterSale;
+								}
+							}
+						}
+						if (user.is_leader == '0') {
+							config.my_menu = config.my_menu.filter((i) => {
+								return i.route != 'pagesMy/apply/add';
+							});
+						}
+					}
+					// 订单图标菜单
+					that.$set(that, `orderList`, config.my_orderList);
+					// 菜单
+					that.$set(that, `menuList`, config.my_menu);
+				}
+				uni.getStorage({
+					key: 'shop',
+					success: async function(res) {
+						that.$set(that, `shop`, res.data);
+						const arr = await that.$api(`/serviceContact`, 'GET', {
+							shop: res.data
+						});
+						if (arr.errcode == '0' && arr.total > 0) {
+							that.$set(that, `serviceContactInfo`, arr.data[0])
+						}
+					}
+				})
+
+			},
+			// 公共跳转
+			toCommon(e) {
+				uni.getStorage({
+					key: 'token',
+					success: function(res) {
+						uni.navigateTo({
+							url: `/${e}`
+						})
+					},
+					fail: function(err) {
+						uni.navigateTo({
+							url: `/pages/login/index`
+						})
+					}
+				});
+
+			},
+			// 系统消息页
+			toNotice() {
+				uni.navigateTo({
+					url: `/pagesHome/notice/index`
+				})
+			},
+			// 订单跳转页面 
+			toOrder(e) {
+				const that = this;
+				uni.getStorage({
+					key: 'token',
+					success: function(res) {
+						if (e.type == 'order') {
+							uni.navigateTo({
+								url: `/${e.route}?status=${e.status}`
+							})
+						} else if (e.type == 'after') {
+							uni.navigateTo({
+								url: `/${e.route}`
+							})
+						}
+					},
+					fail: function(err) {
+						uni.navigateTo({
+							url: `/pages/login/index`
+						})
+					}
+				});
+
+			},
+			// 拨打电话
+			makePhone(e) {
+				uni.makePhoneCall({
+					phoneNumber: e
+				});
+			},
+			// 底部菜单跳转
+			toPath(e) {
+				let url = `/${e.route}`;
+				if (e.type == '0') uni.redirectTo({
+					url
+				})
+				else {
+					uni.navigateTo({
+						url
+					})
+				}
+			},
+		}
+	}
+</script>
+
+<style lang="scss">
+	.main {
+		display: flex;
+		flex-direction: column;
+		width: 100vw;
+		height: 100vh;
+
+		.one {
+			text-align: center;
+			padding: 4vw 0;
+			background-color: var(--fFB1Color);
+			color: var(--mainColor);
+
+			.one_1 {
+				margin: 0 0 5vw 0;
+
+				.one_1_1 {
+					position: absolute;
+					left: 55vw;
+
+					.iconfont {
+						font-size: 20px;
+					}
+				}
+
+				image {
+					width: 25vw;
+					height: 25vw;
+					border-radius: 25vw;
+				}
+
+				.iconfont {
+					font-size: 80px;
+				}
+
+				.name {
+					display: flex;
+					justify-content: space-evenly;
+					margin: 2vw 0;
+					font-size: var(--font18Szie);
+				}
+
+				.image {
+					border: 1px solid var(--f1Color);
+				}
+			}
+
+			.one_2 {
+				display: flex;
+				flex-direction: row;
+				justify-content: space-around;
+				font-size: var(--font16Szie);
+
+				.one_2_1 {
+					display: flex;
+					flex-direction: column;
+				}
+
+				.link {
+					font-weight: bold;
+				}
+			}
+		}
+
+		.two {
+			background-color: var(--f1Color);
+
+			.two_1 {
+				display: flex;
+				justify-content: space-between;
+				padding: 4vw;
+				background-color: var(--mainColor);
+				margin: 0 0 0.1vw 0;
+				border-bottom: 1px solid var(--f1Color);
+
+				.title {
+					font-size: var(--font16Szie);
+
+					text:first-child {
+						margin: 0 1vw 0 0;
+					}
+				}
+
+				.title:last-child {
+					color: var(--f85Color);
+					font-size: var(--font14Size);
+				}
+			}
+
+			.two_1:nth-last-child(2) {
+				margin: 0 0 2vw 0;
+			}
+
+			.two_1:nth-last-child(4) {
+				margin: 0 0 2vw 0;
+			}
+
+			.two_2 {
+				display: flex;
+				justify-content: space-between;
+				padding: 5vw;
+				background-color: var(--mainColor);
+				margin: 0 0 2vw 0;
+
+				.orderList {
+					text-align: center;
+
+					.icon {
+						.iconfont {
+							font-size: 25px;
+						}
+					}
+
+					.title {
+						display: inline-block;
+						margin: 2vw 0 0 0;
+						font-size: var(--font12Size);
+					}
+				}
+			}
+		}
+	}
+</style>

+ 480 - 461
pages/week/index.vue

@@ -1,461 +1,480 @@
-<template>
-	<mobile-frame :frameStyle="frameStyle" @toPath="toPath">
-		<view class="main">
-			<view class="one">
-				<input type="text" placeholder="搜索商品" @tap="toCommon('pagesHome/market/search')"
-					placeholder-class="placss">
-			</view>
-			<view class="two">
-				<view class="two_1">
-					<scroll-view scroll-y="true" class="scroll-view">
-						<view class="list-scroll-view">
-							<view class="list" :class="[active==index?'listActive':'']" v-for="(item,index) in typeList"
-								:key="index" @tap="toChange(index,item)">
-								<text>{{item.label}}</text>
-							</view>
-						</view>
-					</scroll-view>
-				</view>
-				<view class="two_2">
-					<scroll-view scroll-y="true" class="scroll-view" @scrolltolower="toPage" @scroll="toScroll">
-						<view class="list-scroll-view">
-							<view class="two_2_1">
-								<scroll-view scroll-x="true" class="typeScrollview">
-									<view class="list" v-for="(item,index) in list" :key="index"
-										@tap="twoChange(item,index)">
-										<image class="image"
-											:src="item.file&&item.file.length>0?item.file[0].url:logoUrl" mode="">
-										</image>
-										<view class="label textOver">
-											<text
-												:style="{color:twoActive==index?'var(--fFB1Color)':'#000000'}">{{item.label}}</text>
-										</view>
-									</view>
-								</scroll-view>
-							</view>
-							<view class=" two_2_2">
-								<view class="list" v-for="(tag,index) in marketList" :key="index" @tap="toBuy(tag)">
-									<view class="img">
-										<image class="image" :src="tag.file&&tag.file.length>0?tag.file[0].url:''"
-											mode=""></image>
-									</view>
-									<view class="info">
-										<view class="name textOver">
-											<text>{{tag.name}}</text>
-										</view>
-										<view class="num">
-											<text>库存{{tag.num}}</text>
-										</view>
-										<view class="money">
-											<text>¥{{tag.sell_money}}</text>
-										</view>
-										<view class="other" v-if="tag.p_act">
-											<text class="act" v-for="(tags,indexx) in tag.p_act"
-												:key="indexx">{{tags}}</text>
-										</view>
-										<view class="other" v-if="tag.leader_price">
-											<view class="leader">
-												<text>会员价</text><text>¥</text><text>{{tag.leader_price||0}}</text>
-											</view>
-										</view>
-									</view>
-								</view>
-							</view>
-							<view class="is_bottom" v-if="is_bottom">
-								<text>{{config.bottom_title}}</text>
-							</view>
-						</view>
-					</scroll-view>
-				</view>
-			</view>
-		</view>
-	</mobile-frame>
-</template>
-
-<script>
-	export default {
-		data() {
-			return {
-				frameStyle: {
-					useBar: true
-				},
-				active: '0',
-				typeList: [],
-				list: [],
-				// 平台信息
-				config: {},
-				logoUrl: '',
-				// 商品分类tags
-				tags: '',
-				twoActive: null,
-				// 商品列表
-				marketList: [],
-				total: 0,
-				page: 0,
-				skip: 0,
-				limit: 10,
-				// 数据是否触底
-				is_bottom: false,
-				scrollTop: 0,
-			};
-		},
-		onLoad: function() {
-			const that = this;
-			that.searchConfig();
-			that.search();
-		},
-		onPullDownRefresh: async function() {
-			const that = this;
-			that.clearPages();
-			await that.search();
-			uni.stopPullDownRefresh();
-		},
-		methods: {
-			// 查询基本设置
-			searchConfig() {
-				const that = this;
-				uni.getStorage({
-					key: 'config',
-					success: function(res) {
-						let data = res.data;
-						that.$set(that, `config`, data)
-						if (data) {
-							that.$set(that, `logoUrl`, data.config.logo[0].url)
-						}
-					},
-					fail: function(err) {
-						console.log(err);
-					}
-				})
-			},
-			// 查询左侧一级列表
-			async search() {
-				const that = this;
-				let res;
-				res = await that.$api(`/goodsTags`, 'GET', {
-					status: '0'
-				})
-				if (res.errcode == '0') {
-					that.$set(that, `typeList`, res.data);
-					if (res.total > 0) {
-						that.searchRight(res.data[0]);
-						// 查询产品
-						that.$set(that, `tags`, res.data[0].code)
-						that.searchMarket()
-					}
-				}
-			},
-			// 查询左侧二级信息
-			async searchRight(e) {
-				const that = this;
-				let info = {};
-				if (e.id) info.pid = e.id;
-				const res = await that.$api(`/goodsTags/tree`, 'GET', {
-					...info
-				})
-				if (res.errcode == '0' && res.data.length > 0) {
-					that.$set(that, `list`, res.data[0].children);
-				}
-			},
-			// 查询产品
-			async searchMarket() {
-				const that = this;
-				let info = {
-					skip: that.skip,
-					limit: that.limit,
-					tags: that.tags
-				}
-				const res = await that.$api(`/viewGoods/indexGoodsList`, `GET`, {
-					...info,
-				})
-				if (res.errcode == '0') {
-					let list = [...that.marketList, ...res.data];
-					that.$set(that, `marketList`, list);
-					that.$set(that, `total`, res.total)
-				} else {
-					uni.showToast({
-						title: res.errmsg || '错误信息',
-						icon: 'none'
-					})
-				}
-			},
-			// 分页
-			toPage() {
-				const that = this;
-				let list = that.marketList;
-				let limit = that.limit;
-				if (that.total > list.length) {
-					uni.showLoading({
-						title: '加载中',
-						mask: true
-					})
-					let page = that.page + 1;
-					that.$set(that, `page`, page)
-					let skip = page * limit;
-					that.$set(that, `skip`, skip)
-					that.searchMarket();
-					uni.hideLoading();
-				} else that.$set(that, `is_bottom`, true)
-			},
-			// 触底
-			toScroll(e) {
-				const that = this;
-				let up = that.scrollTop;
-				that.$set(that, `scrollTop`, e.detail.scrollTop);
-				let num = Math.sign(up - e.detail.scrollTop);
-				if (num == 1) that.$set(that, `is_bottom`, false);
-			},
-			// 左侧一级选择
-			toChange(index, e) {
-				const that = this;
-				that.$set(that, `list`, []);
-				that.$set(that, `active`, index);
-				that.$set(that, `tags`, e.code);
-				that.$set(that, `twoActive`, null);
-				that.clearPage();
-				that.searchRight(e);
-				that.searchMarket();
-			},
-			// 右侧二级选择
-			twoChange(e, index) {
-				const that = this;
-				that.$set(that, `tags`, e.code);
-				that.$set(that, `twoActive`, index);
-				that.clearPage();
-				that.searchMarket();
-			},
-			// 清空列表
-			clearPage() {
-				const that = this;
-				that.$set(that, `marketList`, []);
-				that.$set(that, `skip`, 0)
-				that.$set(that, `limit`, 10)
-				that.$set(that, `page`, 0)
-			},
-			// 清空总信息
-			clearPages() {
-				const that = this;
-				that.$set(that, `list`, [])
-				that.$set(that, `marketList`, [])
-				that.$set(that, `typeList`, [])
-				that.$set(that, `active`, '0')
-				that.$set(that, `skip`, 0)
-				that.$set(that, `limit`,10)
-				that.$set(that, `page`, 0)
-			},
-			// 搜索商品
-			toCommon(e) {
-				const that = this;
-				uni.navigateTo({
-					url: `/${e}`
-				})
-			},
-			// 购买
-			toBuy(e) {
-				const that = this;
-				uni.navigateTo({
-					url: `/pagesHome/order/detail?id=${e.id||e._id}`
-				})
-			},
-			// 菜单跳转
-			toPath(e) {
-				let url = `/${e.route}`;
-				if (e.type == '0') uni.redirectTo({
-					url
-				})
-				else {
-					uni.navigateTo({
-						url
-					})
-				}
-			},
-		},
-
-	}
-</script>
-
-<style lang="scss">
-	.main {
-		display: flex;
-		flex-direction: column;
-		width: 100vw;
-		height: 91vh;
-
-		.one {
-			padding: 2vw;
-			border: 1px solid var(--f1Color);
-
-			input {
-				background-color: var(--fFB1Color);
-				border-radius: 30px;
-				padding: 2vw;
-				color: var(--fffColor);
-				font-size: var(--font15Size);
-			}
-
-			.placss {
-				color: var(--fffColor);
-			}
-		}
-
-		.two {
-			height: 83vh;
-			display: flex;
-			flex-direction: row;
-
-			.two_1 {
-				position: relative;
-				width: 25vw;
-				background-color: #fafafa;
-				display: flex;
-				flex-direction: column;
-
-				.list {
-					text-align: center;
-					padding: 2.5vw 0;
-					border-bottom: 1px solid var(--f1Color);
-
-					text {
-						font-size: var(--font14Size);
-					}
-				}
-
-				.listActive {
-					background-color: var(--fffColor);
-				}
-			}
-
-			.two_2 {
-				flex-grow: 1;
-				position: relative;
-				display: flex;
-				flex-direction: column;
-
-				.two_2_1 {
-					padding: 0 2vw;
-					margin: 0 0 2vw 0;
-
-					.typeScrollview {
-						display: flex;
-						white-space: nowrap;
-
-						.list {
-							display: inline-block;
-							width: 14vw;
-							padding: 1vw;
-							text-align: center;
-							border-radius: 5px;
-							margin: 0 2vw 0 0;
-
-							.image {
-								width: 100%;
-								height: 7vh;
-								border-radius: 5px;
-								border: 1px solid var(--f1Color);
-								;
-							}
-
-							.label {
-								font-size: var(--font12Size);
-							}
-						}
-					}
-				}
-
-				.two_2_2 {
-					padding: 0 2vw;
-					width: 70vw;
-
-					.list {
-						display: flex;
-						width: 66vw;
-						margin: 0 0 2vw 0;
-						padding: 2vw;
-						box-shadow: 0 0 5px var(--f1Color);
-						;
-						border-radius: 5px;
-
-						.img {
-							width: 20vw;
-
-							.image {
-								width: 20vw;
-								height: 20vw;
-								border-radius: 5px;
-							}
-						}
-
-						.info {
-							width: 45vw;
-							padding: 0 0 0 2vw;
-
-							.name {
-								font-size: var(--font15Size);
-								margin: 0 0 1vw 0;
-							}
-
-							.num {
-								font-size: var(--font14Size);
-								color: #858585;
-								margin: 0 0 1vw 0;
-							}
-
-							.money {
-								font-size: var(--font14Size);
-								color: var(--fFB1Color);
-								margin: 0 0 1vw 0;
-							}
-
-							.other {
-								display: flex;
-								.leader {
-									font-size: 12px;
-									text-align: center;
-									color: #23B67A;
-								
-									text:last-child {
-										font-size: 16px;
-										padding: 0 0 0 1vw;
-									}
-								}
-
-								.act {
-									font-size: 12px;
-									color: #FFA500;
-									border: 1px solid #FFA500;
-									border-radius: 5px;
-									padding: 0 1vw;
-									margin: 0 1vw 0 0;
-								}
-							}
-						}
-					}
-				}
-			}
-		}
-	}
-
-	.scroll-view {
-		position: absolute;
-		top: 0;
-		left: 0;
-		right: 0;
-		bottom: 0;
-
-		.list-scroll-view {
-			display: flex;
-			flex-direction: column;
-		}
-	}
-
-	.is_bottom {
-		text-align: center;
-
-		text {
-			padding: 2vw 0;
-			display: inline-block;
-			color: #858585;
-			font-size: 14px;
-		}
-	}
-</style>
+<template>
+	<mobile-frame :frameStyle="frameStyle" @toPath="toPath">
+		<view class="main">
+			<view class="one">
+				<input type="text" placeholder="搜索商品" @tap="toCommon('pagesHome/market/search')"
+					placeholder-class="placss">
+			</view>
+			<view class="two">
+				<view class="two_1">
+					<scroll-view scroll-y="true" class="scroll-view">
+						<view class="list-scroll-view">
+							<view class="list" :class="[active==index?'listActive':'']" v-for="(item,index) in typeList"
+								:key="index" @tap="toChange(index,item)">
+								<text>{{item.label}}</text>
+							</view>
+						</view>
+					</scroll-view>
+				</view>
+				<view class="two_2">
+					<scroll-view scroll-y="true" class="scroll-view" @scrolltolower="toPage" @scroll="toScroll">
+						<view class="list-scroll-view">
+							<view class="two_2_1">
+								<scroll-view scroll-x="true" class="typeScrollview">
+									<view class="list" v-for="(item,index) in list" :key="index"
+										@tap="twoChange(item,index)">
+										<image class="image"
+											:src="item.file&&item.file.length>0?item.file[0].url:logoUrl" mode="">
+										</image>
+										<view class="label textOver">
+											<text
+												:style="{color:twoActive==index?'var(--fFB1Color)':'#000000'}">{{item.label}}</text>
+										</view>
+									</view>
+								</scroll-view>
+							</view>
+							<view class=" two_2_2">
+								<view class="list" v-for="(tag,index) in marketList" :key="index" @tap="toBuy(tag)">
+									<view class="img">
+										<image class="image" :src="tag.file&&tag.file.length>0?tag.file[0].url:''"
+											mode=""></image>
+									</view>
+									<view class="info">
+										<view class="name textOver">
+											<text>{{tag.name}}</text>
+										</view>
+										<view class="num">
+											<text>库存{{tag.num}}</text>
+										</view>
+										<view class="money">
+											<text>¥{{tag.sell_money}}</text>
+										</view>
+										<view class="other" v-if="tag.p_act">
+											<text class="act" v-for="(tags,indexx) in tag.p_act"
+												:key="indexx">{{tags}}</text>
+										</view>
+										<view class="other" v-if="tag.leader_price">
+											<view class="leader">
+												<text>会员价</text><text>¥</text><text>{{tag.leader_price||0}}</text>
+											</view>
+										</view>
+									</view>
+								</view>
+							</view>
+							<view class="is_bottom" v-if="is_bottom">
+								<text>{{config.bottom_title}}</text>
+							</view>
+						</view>
+					</scroll-view>
+				</view>
+			</view>
+		</view>
+	</mobile-frame>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				// 店铺id
+				shop: '',
+				frameStyle: {
+					useBar: true
+				},
+				active: '0',
+				typeList: [],
+				list: [],
+				// 平台信息
+				config: {},
+				logoUrl: '',
+				// 商品分类tags
+				tags: '',
+				twoActive: null,
+				// 商品列表
+				marketList: [],
+				total: 0,
+				page: 0,
+				skip: 0,
+				limit: 10,
+				// 数据是否触底
+				is_bottom: false,
+				scrollTop: 0,
+			};
+		},
+		onLoad: async function() {
+			const that = this;
+			await that.searchShop();
+			await that.searchConfig();
+
+		},
+		onPullDownRefresh: async function() {
+			const that = this;
+			that.clearPages();
+			await that.search();
+			uni.stopPullDownRefresh();
+		},
+		methods: {
+			// 查询基本设置
+			searchConfig() {
+				const that = this;
+				uni.getStorage({
+					key: 'config',
+					success: function(res) {
+						let data = res.data;
+						that.$set(that, `config`, data)
+						if (data) {
+							that.$set(that, `logoUrl`, data.config.logo[0].url)
+						}
+					},
+					fail: function(err) {
+						console.log(err);
+					}
+				})
+			},
+			// 查询左侧一级列表
+			async search() {
+				const that = this;
+				let res;
+				res = await that.$api(`/goodsTags`, 'GET', {
+					status: '0',
+					shop: that.shop
+				})
+				if (res.errcode == '0') {
+					that.$set(that, `typeList`, res.data);
+					if (res.total > 0) {
+						that.searchRight(res.data[0]);
+						// 查询产品
+						that.$set(that, `tags`, res.data[0].code)
+						that.searchMarket()
+					}
+				}
+			},
+			// 查询左侧二级信息
+			async searchRight(e) {
+				const that = this;
+				let info = {
+					shop: that.shop
+				};
+				if (e.id) info.pid = e.id;
+				const res = await that.$api(`/goodsTags/tree`, 'GET', {
+					...info
+				})
+				if (res.errcode == '0' && res.data.length > 0) {
+					that.$set(that, `list`, res.data[0].children);
+				}
+			},
+			// 查询产品
+			async searchMarket() {
+				const that = this;
+				let info = {
+					skip: that.skip,
+					limit: that.limit,
+					tags: that.tags,
+					// shop: that.shop
+				}
+				const res = await that.$api(`/viewGoods/indexGoodsList`, `GET`, {
+					...info,
+				})
+				if (res.errcode == '0') {
+					let list = [...that.marketList, ...res.data];
+					that.$set(that, `marketList`, list);
+					that.$set(that, `total`, res.total)
+				} else {
+					uni.showToast({
+						title: res.errmsg || '错误信息',
+						icon: 'none'
+					})
+				}
+			},
+			// 分页
+			toPage() {
+				const that = this;
+				let list = that.marketList;
+				let limit = that.limit;
+				if (that.total > list.length) {
+					uni.showLoading({
+						title: '加载中',
+						mask: true
+					})
+					let page = that.page + 1;
+					that.$set(that, `page`, page)
+					let skip = page * limit;
+					that.$set(that, `skip`, skip)
+					that.searchMarket();
+					uni.hideLoading();
+				} else that.$set(that, `is_bottom`, true)
+			},
+			// 触底
+			toScroll(e) {
+				const that = this;
+				let up = that.scrollTop;
+				that.$set(that, `scrollTop`, e.detail.scrollTop);
+				let num = Math.sign(up - e.detail.scrollTop);
+				if (num == 1) that.$set(that, `is_bottom`, false);
+			},
+			// 左侧一级选择
+			toChange(index, e) {
+				const that = this;
+				that.$set(that, `list`, []);
+				that.$set(that, `active`, index);
+				that.$set(that, `tags`, e.code);
+				that.$set(that, `twoActive`, null);
+				that.clearPage();
+				that.searchRight(e);
+				that.searchMarket();
+			},
+			// 右侧二级选择
+			twoChange(e, index) {
+				const that = this;
+				that.$set(that, `tags`, e.code);
+				that.$set(that, `twoActive`, index);
+				that.clearPage();
+				that.searchMarket();
+			},
+			// 清空列表
+			clearPage() {
+				const that = this;
+				that.$set(that, `marketList`, []);
+				that.$set(that, `skip`, 0)
+				that.$set(that, `limit`, 10)
+				that.$set(that, `page`, 0)
+			},
+			// 清空总信息
+			clearPages() {
+				const that = this;
+				that.$set(that, `list`, [])
+				that.$set(that, `marketList`, [])
+				that.$set(that, `typeList`, [])
+				that.$set(that, `active`, '0')
+				that.$set(that, `skip`, 0)
+				that.$set(that, `limit`, 10)
+				that.$set(that, `page`, 0)
+			},
+			// 搜索商品
+			toCommon(e) {
+				const that = this;
+				uni.navigateTo({
+					url: `/${e}`
+				})
+			},
+			// 购买
+			toBuy(e) {
+				const that = this;
+				uni.navigateTo({
+					url: `/pagesHome/order/detail?id=${e.id||e._id}`
+				})
+			},
+			// 菜单跳转
+			toPath(e) {
+				let url = `/${e.route}`;
+				if (e.type == '0') uni.redirectTo({
+					url
+				})
+				else {
+					uni.navigateTo({
+						url
+					})
+				}
+			},
+			// 店铺信息
+			searchShop() {
+				const that = this;
+				uni.getStorage({
+					key: 'shop',
+					success: async function(res) {
+						that.$set(that, `shop`, res.data);
+						await that.search();
+					}
+				})
+			}
+		},
+
+	}
+</script>
+
+<style lang="scss">
+	.main {
+		display: flex;
+		flex-direction: column;
+		width: 100vw;
+		height: 91vh;
+
+		.one {
+			padding: 2vw;
+			border: 1px solid var(--f1Color);
+
+			input {
+				background-color: var(--fFB1Color);
+				border-radius: 30px;
+				padding: 2vw;
+				color: var(--fffColor);
+				font-size: var(--font15Size);
+			}
+
+			.placss {
+				color: var(--fffColor);
+			}
+		}
+
+		.two {
+			height: 83vh;
+			display: flex;
+			flex-direction: row;
+
+			.two_1 {
+				position: relative;
+				width: 25vw;
+				background-color: #fafafa;
+				display: flex;
+				flex-direction: column;
+
+				.list {
+					text-align: center;
+					padding: 2.5vw 0;
+					border-bottom: 1px solid var(--f1Color);
+
+					text {
+						font-size: var(--font14Size);
+					}
+				}
+
+				.listActive {
+					background-color: var(--fffColor);
+				}
+			}
+
+			.two_2 {
+				flex-grow: 1;
+				position: relative;
+				display: flex;
+				flex-direction: column;
+
+				.two_2_1 {
+					padding: 0 2vw;
+					margin: 0 0 2vw 0;
+
+					.typeScrollview {
+						display: flex;
+						white-space: nowrap;
+
+						.list {
+							display: inline-block;
+							width: 14vw;
+							padding: 1vw;
+							text-align: center;
+							border-radius: 5px;
+							margin: 0 2vw 0 0;
+
+							.image {
+								width: 100%;
+								height: 7vh;
+								border-radius: 5px;
+								border: 1px solid var(--f1Color);
+								;
+							}
+
+							.label {
+								font-size: var(--font12Size);
+							}
+						}
+					}
+				}
+
+				.two_2_2 {
+					padding: 0 2vw;
+					width: 70vw;
+
+					.list {
+						display: flex;
+						width: 66vw;
+						margin: 0 0 2vw 0;
+						padding: 2vw;
+						box-shadow: 0 0 5px var(--f1Color);
+						;
+						border-radius: 5px;
+
+						.img {
+							width: 20vw;
+
+							.image {
+								width: 20vw;
+								height: 20vw;
+								border-radius: 5px;
+							}
+						}
+
+						.info {
+							width: 45vw;
+							padding: 0 0 0 2vw;
+
+							.name {
+								font-size: var(--font15Size);
+								margin: 0 0 1vw 0;
+							}
+
+							.num {
+								font-size: var(--font14Size);
+								color: #858585;
+								margin: 0 0 1vw 0;
+							}
+
+							.money {
+								font-size: var(--font14Size);
+								color: var(--fFB1Color);
+								margin: 0 0 1vw 0;
+							}
+
+							.other {
+								display: flex;
+
+								.leader {
+									font-size: 12px;
+									text-align: center;
+									color: #23B67A;
+
+									text:last-child {
+										font-size: 16px;
+										padding: 0 0 0 1vw;
+									}
+								}
+
+								.act {
+									font-size: 12px;
+									color: #FFA500;
+									border: 1px solid #FFA500;
+									border-radius: 5px;
+									padding: 0 1vw;
+									margin: 0 1vw 0 0;
+								}
+							}
+						}
+					}
+				}
+			}
+		}
+	}
+
+	.scroll-view {
+		position: absolute;
+		top: 0;
+		left: 0;
+		right: 0;
+		bottom: 0;
+
+		.list-scroll-view {
+			display: flex;
+			flex-direction: column;
+		}
+	}
+
+	.is_bottom {
+		text-align: center;
+
+		text {
+			padding: 2vw 0;
+			display: inline-block;
+			color: #858585;
+			font-size: 14px;
+		}
+	}
+</style>

+ 15 - 2
pagesHome/notice/index.vue

@@ -27,7 +27,9 @@
 <script>
 	export default {
 		data() {
-			return {
+			return {
+				// 店铺id
+				shop: '',
 				user: {},
 				list: [],
 				// 状态
@@ -60,7 +62,7 @@
 					success: function(res) {
 						let user = that.$jwt(res.data);
 						that.$set(that, `user`, user);
-						that.search()
+						that.searchShop();
 					},
 					fail: function(err) {
 						uni.navigateTo({
@@ -131,6 +133,17 @@
 					code: "notice_source"
 				});
 				if (res.errcode == '0') that.$set(that, `sourceList`, res.data)
+			},
+			// 店铺信息
+			searchShop() {
+				const that = this;
+				uni.getStorage({
+					key: 'shop',
+					success: async function(res) {
+						that.$set(that, `shop`, res.data);
+						await that.search();
+					}
+				})
 			},
 			// 分页
 			toPage() {

+ 1 - 1
pagesMessage/message/components/submit_1.vue

@@ -84,7 +84,7 @@
 					success: async function(res) {
 						that.$emit('choseImg', true);
 						let tempFile = JSON.parse(JSON.stringify(res.tempFilePaths));
-						const arr = await that.$apifile(`/point/upload`, 'file', tempFile[0], 'file');
+						const arr = await that.$apifile(`/point/shopOne/upload`, 'file', tempFile[0], 'file');
 						if (arr.errcode == '0') {
 							let filePaths = serverUrl + arr.uri
 							that.send(filePaths, '1')

+ 8 - 2
pagesMy/account/upBasic.vue

@@ -123,7 +123,7 @@
 				const that = this;
 				let avatarUrl = e.detail.avatarUrl;
 				let serverUrl = that.$config.serverUrl;
-				const res = await that.$apifile(`/point/upload`, 'file', avatarUrl, 'file');
+				const res = await that.$apifile(`/point/shopOne/upload`, 'file', avatarUrl, 'file');
 				if (res.errcode == '0') {
 					let obj = {
 						name: res.name,
@@ -166,7 +166,13 @@
 			// 提交保存
 			onSubmit(ref) {
 				const that = this;
-				that.$refs[ref].validate().then(async params => {
+				that.$refs[ref].validate().then(async params => {
+					uni.getStorage({
+						key: 'shop',
+						success: async function(res) {
+							parmas.shop = res.data
+						}
+					})
 					const arr = await that.$api(`/user/${that.form.id}`, 'POST', params);
 					if (arr.errcode == '0') {
 						uni.showToast({

+ 1 - 1
pagesMy/components/upload/index.vue

@@ -41,7 +41,7 @@
 					sourceType: ['album', 'camera'],
 					success: async function(res) {
 						let tempFile = JSON.parse(JSON.stringify(res.tempFilePaths));
-						const arr = await that.$apifile(`/point/upload`, 'file', tempFile[0], 'file');
+						const arr = await that.$apifile(`/point/shopOne/upload`, 'file', tempFile[0], 'file');
 						that.$emit('uplSuc', {
 							data: {
 								name: arr.name,

+ 319 - 305
pagesRest/activity/info.vue

@@ -1,305 +1,319 @@
-<template>
-	<mobile-frame>
-		<view class="main">
-			<scroll-view scroll-y="true" class="scroll-view" @scrolltolower="toPage" @scroll="toScroll">
-				<view class="list-scroll-view">
-					<view class="one">
-						<rich-text :nodes="info.content&&info.content.value"></rich-text>
-					</view>
-					<view class="two">
-						<view class="list" v-for="(item,index) in list" :key="index" @tap="toBuy(item)">
-							<view class="img">
-								<image class="image" :src="item.file&&item.file.length?item.file[0].url:''" mode="">
-								</image>
-							</view>
-							<view class="name textOver">
-								<text>{{item.goods_name}}</text>
-							</view>
-							<view class="money">
-								<view class="money_1">
-									<text>{{item.platform_act_type=='3'?'特价¥':'¥'}}</text><text>{{item.platform_act_type=='3'?item.config&&item.config.sp_price:item.sell_money}}</text>
-								</view>
-								<view class="money_2">
-									<text>¥</text><text>{{item.flow_money||0}}</text>
-								</view>
-							</view>
-							<view class="acttags">
-								<text v-for="(i,indexx) in item.act_tags" :key="indexx">{{i.label}}</text>
-							</view>
-						</view>
-					</view>
-					<view class="is_bottom" v-if="is_bottom">
-						<text>{{config.bottom_title}}</text>
-					</view>
-				</view>
-			</scroll-view>
-		</view>
-	</mobile-frame>
-</template>
-
-<script>
-	export default {
-		components: {},
-		data() {
-			return {
-				// 系统设置
-				config: {},
-				id: '',
-				// 详情
-				info: {},
-				// 商品列表
-				list: [],
-				total: 0,
-				page: 0,
-				skip: 0,
-				limit: 10,
-				// 数据是否触底
-				is_bottom: false,
-				scrollTop: 0,
-			};
-		},
-		onLoad: async function(e) {
-			const that = this;
-			that.$set(that, `id`, e.id || '');
-			that.searchConfig();
-			await that.searchAct();
-			await that.configShare();
-		},
-		onUnload: function() {
-			// 页面卸载,重新部署分享内容
-			const that = this;
-			if (that.config) {
-				// 赋值默认值
-				that.$config.share = {
-					title: that.config.title,
-					path: '/pages/index/index',
-					imageUrl: that.config.config.share[0].url
-				}
-			}
-		},
-		methods: {
-			// 查询基本设置
-			searchConfig() {
-				const that = this;
-				uni.getStorage({
-					key: 'config',
-					success: function(res) {
-						if (res.data) that.$set(that, `config`, res.data)
-					},
-					fail: function(err) {
-						console.log(err);
-					}
-				})
-			},
-			async searchAct() {
-				const that = this;
-				// 查询详情
-				let res = await that.$api(`/platformAct/${that.id}`, 'GET');
-				if (res.errcode == '0') {
-					uni.setNavigationBarTitle({
-						title: res.data.act_time.title
-					});
-					if (res.data.content.value) res.data.content.value = res.data.content.value.replace(/\<img/gi,
-						'<img class="rich-img"');
-					that.$set(that, `info`, res.data);
-					that.search()
-				}
-			},
-			async search() {
-				const that = this;
-				// 查询商品列表
-				let info = {
-					skip: that.skip,
-					limit: that.limit,
-					platform_act: that.id,
-					status: '0',
-					goods_status: '1'
-				}
-				let res = await that.$api(`/goodsJoinAct`, 'GET', {
-					...info,
-				})
-				if (res.errcode == '0') {
-					let list = [...that.list, ...res.data];
-					that.$set(that, `list`, list)
-					that.$set(that, `total`, res.total)
-				}
-			},
-			toPage() {
-				const that = this;
-				let list = that.list;
-				let limit = that.limit;
-				if (that.total > list.length) {
-					uni.showLoading({
-						title: '加载中',
-						mask: true
-					})
-					let page = that.page + 1;
-					that.$set(that, `page`, page)
-					let skip = page * limit;
-					that.$set(that, `skip`, skip)
-					that.search();
-					uni.hideLoading();
-
-				} else that.$set(that, `is_bottom`, true)
-			},
-			toScroll(e) {
-				const that = this;
-				let up = that.scrollTop;
-				that.$set(that, `scrollTop`, e.detail.scrollTop);
-				let num = Math.sign(up - e.detail.scrollTop);
-				if (num == 1) that.$set(that, `is_bottom`, false);
-			},
-			// 购买
-			toBuy(e) {
-				const that = this;
-				uni.navigateTo({
-					url: `/pagesHome/order/detail?id=${e.goods}`
-				})
-			},
-			// 清空列表
-			clearPage() {
-				const that = this;
-				that.$set(that, `list`, [])
-				that.$set(that, `skip`, 0)
-				that.$set(that, `limit`, 6)
-				that.$set(that, `page`, 0)
-			},
-			// 配置分享内容
-			configShare() {
-				const that = this;
-				let info = that.info;
-				let imageUrl = that.config?.config?.logo[0].url;
-				if (info.share.length > 0) imageUrl = info.share[0].url;
-				that.$config.share = {
-					title: info.act_time.title,
-					path: `/pagesRest/activity/info?id=${that.id}`,
-					imageUrl: imageUrl
-				}
-			}
-		}
-	}
-</script>
-
-<style lang="scss">
-	.main {
-		display: flex;
-		flex-direction: column;
-		width: 100vw;
-		height: 100vh;
-
-		.one {
-			padding: 2vw;
-
-			.rich-img {
-				width: 100% !important;
-				display: block;
-			}
-		}
-
-		.two {
-			display: flex;
-			flex-wrap: wrap;
-			padding: 2vw;
-
-			.list {
-				position: relative;
-				padding: 2vw;
-				background-color: var(--f1Color);
-				margin: 0 2vw 2vw 0;
-				border-radius: 5px;
-				width: 43vw;
-
-				.img {
-					.image {
-						width: 100%;
-						height: 28vh;
-						border-radius: 5px;
-					}
-				}
-
-				.name {
-					margin: 0 0 1vw 0;
-
-					text {
-						font-size: var(--font14Size);
-					}
-				}
-
-				.money {
-					display: flex;
-
-					.money_1 {
-						color: var(--fFB1Color);
-						font-size: 12px;
-
-						text:last-child {
-							font-size: 16px;
-							padding: 0 0 0 1vw;
-						}
-					}
-
-					.money_2 {
-						font-size: 12px;
-						margin: 0 0 0 2vw;
-						color: var(--f99Color);
-
-						text {
-							text-decoration: line-through;
-						}
-
-						text:last-child {
-							font-size: 16px;
-							padding: 0 0 0 1vw;
-						}
-					}
-				}
-
-				.acttags {
-					position: absolute;
-					top: 2vw;
-					width: 93%;
-
-					text {
-						display: inline-block;
-						background-color: var(--fFB1Color);
-						color: #fff;
-						border-radius: 1vw;
-						padding: 0.5vw;
-						font-size: 12px;
-
-						margin: 0 1vw 0 0;
-					}
-				}
-			}
-
-			.list:nth-child(2n) {
-				margin: 0 0 2vw 0;
-			}
-		}
-	}
-
-	.scroll-view {
-		position: absolute;
-		top: 0;
-		left: 0;
-		right: 0;
-		bottom: 0;
-
-		.list-scroll-view {
-			display: flex;
-			flex-direction: column;
-		}
-	}
-
-	.is_bottom {
-		text-align: center;
-		width: 100vw;
-
-		text {
-			padding: 2vw 0;
-			display: inline-block;
-			color: #858585;
-			font-size: 14px;
-		}
-	}
-</style>
+<template>
+	<mobile-frame>
+		<view class="main">
+			<scroll-view scroll-y="true" class="scroll-view" @scrolltolower="toPage" @scroll="toScroll">
+				<view class="list-scroll-view">
+					<view class="one">
+						<rich-text :nodes="info.content&&info.content.value"></rich-text>
+					</view>
+					<view class="two">
+						<view class="list" v-for="(item,index) in list" :key="index" @tap="toBuy(item)">
+							<view class="img">
+								<image class="image" :src="item.file&&item.file.length?item.file[0].url:''" mode="">
+								</image>
+							</view>
+							<view class="name textOver">
+								<text>{{item.goods_name}}</text>
+							</view>
+							<view class="money">
+								<view class="money_1">
+									<text>{{item.platform_act_type=='3'?'特价¥':'¥'}}</text><text>{{item.platform_act_type=='3'?item.config&&item.config.sp_price:item.sell_money}}</text>
+								</view>
+								<view class="money_2">
+									<text>¥</text><text>{{item.flow_money||0}}</text>
+								</view>
+							</view>
+							<view class="acttags">
+								<text v-for="(i,indexx) in item.act_tags" :key="indexx">{{i.label}}</text>
+							</view>
+						</view>
+					</view>
+					<view class="is_bottom" v-if="is_bottom">
+						<text>{{config.bottom_title}}</text>
+					</view>
+				</view>
+			</scroll-view>
+		</view>
+	</mobile-frame>
+</template>
+
+<script>
+	export default {
+		components: {},
+		data() {
+			return {
+				// 店铺id
+				shop: '',
+				// 系统设置
+				config: {},
+				id: '',
+				// 详情
+				info: {},
+				// 商品列表
+				list: [],
+				total: 0,
+				page: 0,
+				skip: 0,
+				limit: 10,
+				// 数据是否触底
+				is_bottom: false,
+				scrollTop: 0,
+			};
+		},
+		onLoad: async function(e) {
+			const that = this;
+			that.$set(that, `id`, e.id || '');
+			that.searchConfig();
+			await that.searchAct();
+			await that.configShare();
+		},
+		onUnload: function() {
+			// 页面卸载,重新部署分享内容
+			const that = this;
+			if (that.config) {
+				// 赋值默认值
+				that.$config.share = {
+					title: that.config.title,
+					path: '/pages/index/index',
+					imageUrl: that.config.config.share[0].url
+				}
+			}
+		},
+		methods: {
+			// 查询基本设置
+			searchConfig() {
+				const that = this;
+				uni.getStorage({
+					key: 'config',
+					success: function(res) {
+						if (res.data) that.$set(that, `config`, res.data)
+					},
+					fail: function(err) {
+						console.log(err);
+					}
+				})
+			},
+			async searchAct() {
+				const that = this;
+				// 查询详情
+				let res = await that.$api(`/platformAct/${that.id}`, 'GET');
+				if (res.errcode == '0') {
+					uni.setNavigationBarTitle({
+						title: res.data.act_time.title
+					});
+					if (res.data.content.value) res.data.content.value = res.data.content.value.replace(/\<img/gi,
+						'<img class="rich-img"');
+					that.$set(that, `info`, res.data);
+					that.searchShop();
+				}
+			},
+			async search() {
+				const that = this;
+				// 查询商品列表
+				let info = {
+					skip: that.skip,
+					limit: that.limit,
+					platform_act: that.id,
+					status: '0',
+					goods_status: '1',
+					// shop: that.shop
+				}
+				let res = await that.$api(`/goodsJoinAct`, 'GET', {
+					...info,
+				})
+				if (res.errcode == '0') {
+					let list = [...that.list, ...res.data];
+					that.$set(that, `list`, list)
+					that.$set(that, `total`, res.total)
+				}
+			},
+			toPage() {
+				const that = this;
+				let list = that.list;
+				let limit = that.limit;
+				if (that.total > list.length) {
+					uni.showLoading({
+						title: '加载中',
+						mask: true
+					})
+					let page = that.page + 1;
+					that.$set(that, `page`, page)
+					let skip = page * limit;
+					that.$set(that, `skip`, skip)
+					that.search();
+					uni.hideLoading();
+
+				} else that.$set(that, `is_bottom`, true)
+			},
+			toScroll(e) {
+				const that = this;
+				let up = that.scrollTop;
+				that.$set(that, `scrollTop`, e.detail.scrollTop);
+				let num = Math.sign(up - e.detail.scrollTop);
+				if (num == 1) that.$set(that, `is_bottom`, false);
+			},
+			// 购买
+			toBuy(e) {
+				const that = this;
+				uni.navigateTo({
+					url: `/pagesHome/order/detail?id=${e.goods}`
+				})
+			},
+			// 清空列表
+			clearPage() {
+				const that = this;
+				that.$set(that, `list`, [])
+				that.$set(that, `skip`, 0)
+				that.$set(that, `limit`, 6)
+				that.$set(that, `page`, 0)
+			},
+			// 配置分享内容
+			configShare() {
+				const that = this;
+				let info = that.info;
+				let imageUrl = that.config?.config?.logo[0].url;
+				if (info.share.length > 0) imageUrl = info.share[0].url;
+				that.$config.share = {
+					title: info.act_time.title,
+					path: `/pagesRest/activity/info?id=${that.id}`,
+					imageUrl: imageUrl
+				}
+			},
+			// 店铺信息
+			searchShop() {
+				const that = this;
+				uni.getStorage({
+					key: 'shop',
+					success: async function(res) {
+						that.$set(that, `shop`, res.data);
+						await that.search();
+					}
+				})
+			}
+		}
+	}
+</script>
+
+<style lang="scss">
+	.main {
+		display: flex;
+		flex-direction: column;
+		width: 100vw;
+		height: 100vh;
+
+		.one {
+			padding: 2vw;
+
+			.rich-img {
+				width: 100% !important;
+				display: block;
+			}
+		}
+
+		.two {
+			display: flex;
+			flex-wrap: wrap;
+			padding: 2vw;
+
+			.list {
+				position: relative;
+				padding: 2vw;
+				background-color: var(--f1Color);
+				margin: 0 2vw 2vw 0;
+				border-radius: 5px;
+				width: 43vw;
+
+				.img {
+					.image {
+						width: 100%;
+						height: 28vh;
+						border-radius: 5px;
+					}
+				}
+
+				.name {
+					margin: 0 0 1vw 0;
+
+					text {
+						font-size: var(--font14Size);
+					}
+				}
+
+				.money {
+					display: flex;
+
+					.money_1 {
+						color: var(--fFB1Color);
+						font-size: 12px;
+
+						text:last-child {
+							font-size: 16px;
+							padding: 0 0 0 1vw;
+						}
+					}
+
+					.money_2 {
+						font-size: 12px;
+						margin: 0 0 0 2vw;
+						color: var(--f99Color);
+
+						text {
+							text-decoration: line-through;
+						}
+
+						text:last-child {
+							font-size: 16px;
+							padding: 0 0 0 1vw;
+						}
+					}
+				}
+
+				.acttags {
+					position: absolute;
+					top: 2vw;
+					width: 93%;
+
+					text {
+						display: inline-block;
+						background-color: var(--fFB1Color);
+						color: #fff;
+						border-radius: 1vw;
+						padding: 0.5vw;
+						font-size: 12px;
+
+						margin: 0 1vw 0 0;
+					}
+				}
+			}
+
+			.list:nth-child(2n) {
+				margin: 0 0 2vw 0;
+			}
+		}
+	}
+
+	.scroll-view {
+		position: absolute;
+		top: 0;
+		left: 0;
+		right: 0;
+		bottom: 0;
+
+		.list-scroll-view {
+			display: flex;
+			flex-direction: column;
+		}
+	}
+
+	.is_bottom {
+		text-align: center;
+		width: 100vw;
+
+		text {
+			padding: 2vw 0;
+			display: inline-block;
+			color: #858585;
+			font-size: 14px;
+		}
+	}
+</style>

+ 18 - 5
pagesRest/recom/index.vue

@@ -52,7 +52,9 @@
 <script>
 	export default {
 		data() {
-			return {
+			return {
+				// 店铺id
+				shop: '',
 				// 系统设置
 				config: {},
 				// 路由参数
@@ -80,8 +82,8 @@
 				that.$set(that, `act_tags`, e.act_tags || '');
 			}
 			that.searchConfig();
-			that.searchOther();
-			that.search();
+			that.searchOther();
+			that.searchShop();
 		},
 		onPullDownRefresh: async function() {
 			const that = this;
@@ -104,7 +106,8 @@
 				const that = this;
 				let info = {
 					skip: that.skip,
-					limit: that.limit
+					limit: that.limit,
+					// shop: that.shop
 				};
 				if (that.type == '1') info.tags = that.tags;
 				else if (that.type == '2') info.act_tags = that.act_tags;
@@ -188,9 +191,19 @@
 				that.$set(that, `skip`, 0)
 				that.$set(that, `limit`, 6)
 				that.$set(that, `page`, 0)
+			},
+			// 店铺信息
+			searchShop() {
+				const that = this;
+				uni.getStorage({
+					key: 'shop',
+					success: async function(res) {
+						that.$set(that, `shop`, res.data);
+						await that.search();
+					}
+				})
 			}
 		},
-
 	}
 </script>