guhongwei 2 年之前
父節點
當前提交
4c357e563b

+ 4 - 1
components/discount/index.vue

@@ -1,6 +1,6 @@
 <template>
 	<view class="discount">
-		<view class="pre_one">优惠劵({{couponList.length}}张)</view>
+		<view class="pre_one">优惠劵({{total}}张)</view>
 		<view class="pre_two">
 			<view class="list" v-for="(item,index) in couponList" :key="index">
 				<view class="l">
@@ -45,6 +45,9 @@
 			couponList: {
 				type: Array,
 			},
+			total: {
+				type: Number
+			},
 			Style: {
 				type: Object,
 			},

+ 27 - 49
components/mobile-frame/index.vue

@@ -8,9 +8,9 @@
 			</scroll-view>
 		</view>
 		<view class="foot" v-if="frameStyle&&frameStyle.useBar||false">
-			<view class="list" v-for="(item,index) in barList" :key="index" @tap="toPath(index,item)" v-if="item.is_use=='0'">
-				<image class="image" :src="item.normal" mode="" v-if="active!=index"></image>
-				<image class="image" :src="item.active" mode="" v-else></image>
+			<view class="list" v-for="(item,index) in list" :key="index" @tap="toPath(index,item)" v-if="item.is_use=='0'">
+				<image class="image" :src="item.normal.length>0?item.normal[0].url:''" mode="" v-if="active!=index"></image>
+				<image class="image" :src="item.active.length>0?item.active[0].url:''" mode="" v-else></image>
 				<view class="name" :style="{color:active==index?frameStyle.barActive||'#FB1438':''}">{{item.name}}</view>
 			</view>
 		</view>
@@ -21,67 +21,45 @@
 	export default {
 		props: {
 			frameStyle: {
-				type: Object,
-			},
+				type: Object
+			}
 		},
 		data() {
 			return {
+				list: [],
 				active: 0,
-				barList: [{
-						name: '首页',
-						route: 'pages/home/index',
-						normal: require('@/static/shouye.png'),
-						active: require('@/static/shouye_1.png'),
-						type: '0',
-						is_use: '0'
-					},
-					{
-						name: '微店',
-						route: 'pages/store/index',
-						normal: require('@/static/store.png'),
-						active: require('@/static/store_1.png'),
-						type: '0',
-						is_use: '1'
-					},
-					{
-						name: '分类',
-						route: 'pages/week/index',
-						normal: require('@/static/type.png'),
-						active: require('@/static/type_1.png'),
-						type: '0',
-						is_use: '0'
-					},
-					{
-						name: '购物车',
-						route: 'pages/market/index',
-						normal: require('@/static/market.png'),
-						active: require('@/static/market_1.png'),
-						type: '0',
-						is_use: '0'
-					},
-					{
-						name: '我的',
-						route: 'pages/my/index',
-						normal: require('@/static/my.png'),
-						active: require('@/static/my_1.png'),
-						type: '0',
-						is_use: '0'
-					},
-				]
 			};
 		},
 		created: function() {
 			const that = this;
 			that.search()
 		},
-		onShow: function() {},
 		methods: {
 			search() {
 				const that = this;
 				let pages = getCurrentPages();
 				let currentPage = pages[pages.length - 1];
-				let index = that.barList.findIndex((i) => i.route == currentPage.route);
-				if (index) that.$set(that, `active`, index);
+				uni.getStorage({
+					key: 'config',
+					success: function(res) {
+						if (res.data) {
+							let bottom_menu = res.data.bottom_menu;
+							let list = bottom_menu.list.sort((a, b) => {
+								return a.sort - b.sort
+							});
+							that.$set(that, `list`, list);
+							let data = list.find((i) => i.route == currentPage.route);
+							if (data) {
+								let index =
+									list.findIndex((i) => i.route == currentPage.route);
+								that.$set(that, `active`, index);
+							}
+						}
+					},
+					fail: function(err) {
+						console.log(err);
+					}
+				})
 			},
 			toPath(index, item) {
 				const that = this;

+ 0 - 35
pages.json

@@ -194,47 +194,12 @@
 						"navigationBarTitleText": "商品分类"
 					}
 				},
-				{
-					"path": "farming/index",
-					"style": {
-						"navigationBarTitleText": "首农食品旗舰店"
-					}
-				},
-				{
-					"path": "place/index",
-					"style": {
-						"navigationBarTitleText": "地方特产"
-					}
-				}, {
-					"path": "place/detail",
-					"style": {
-						"navigationBarTitleText": "地方特产"
-					}
-				},
-				{
-					"path": "import/index",
-					"style": {
-						"navigationBarTitleText": "进口食品"
-					}
-				},
-				{
-					"path": "poverty/index",
-					"style": {
-						"navigationBarTitleText": "扶贫专区"
-					}
-				},
 				{
 					"path": "exchange/index",
 					"style": {
 						"navigationBarTitleText": "兑换中心"
 					}
 				},
-				{
-					"path": "activity/index",
-					"style": {
-						"navigationBarTitleText": "活动专区"
-					}
-				},
 				{
 					"path": "order/detail",
 					"style": {

+ 1 - 19
pages/home/index.vue

@@ -118,13 +118,6 @@
 			const that = this;
 			that.search();
 		},
-		onHide: function() {
-			const that = this;
-			// that.clearPage();
-		},
-		onUnload: function() {
-			console.log('1');
-		},
 		methods: {
 			async search() {
 				const that = this;
@@ -204,7 +197,7 @@
 			// 推荐好物更多
 			toMore(e) {
 				const that = this;
-				// that.clearPage();
+
 				uni.navigateTo({
 					url: `/pagesRest/recom/index?act_tags=${e.value}`
 				})
@@ -212,7 +205,6 @@
 			// 平台活动
 			toAct(e) {
 				const that = this;
-				// that.clearPage();
 				uni.navigateTo({
 					url: `/pagesRest/activity/info?id=${e._id}`
 				})
@@ -221,7 +213,6 @@
 			toBuy(e) {
 				const that = this;
 				let id = e._id || e.id;
-				// that.clearPage();
 				uni.navigateTo({
 					url: `/pagesHome/order/detail?id=${id}`
 				})
@@ -266,15 +257,6 @@
 					this.scrollTop = 0
 				});
 			},
-			// 清空列表
-			clearPage() {
-				const that = this;
-				that.$set(that, `marketList`, [])
-				that.$set(that, `skip`, 0)
-				that.$set(that, `limit`, 6)
-				that.$set(that, `page`, 0);
-				that.$set(that, `market_type`, '1');
-			}
 		}
 	}
 </script>

+ 15 - 17
pages/market/index.vue

@@ -42,8 +42,7 @@
 											<view class="img">
 												<image :src="getFile(gs)"></image>
 											</view>
-											<view class=" one_1" v-if="num==0"
-												@click="toCommon('/pagesHome/order/detail',gs)">
+											<view class=" one_1" v-if="num==0" @click="toCommon('/pagesHome/order/detail',gs)">
 												<view class="name">{{gs.goods_name}}</view>
 												<view class="info">
 													<view class="title_1" v-if="gs.goodsSpec_name">
@@ -56,8 +55,7 @@
 												<view>x{{gs.num}}</view>
 											</view>
 											<view class="num" v-if="num==1">
-												<uni-number-box @change="changeValue(gs)" name="num" value="gs" :min="1"
-													v-model="gs.num" />
+												<uni-number-box @change="changeValue(gs)" name="num" value="gs" :min="1" v-model="gs.num" />
 											</view>
 											<view class="del" v-if="num==1">
 												<text class="iconfont icon-del-copy" @click="toDel(gs)"></text>
@@ -100,23 +98,12 @@
 				totalMoney: 0,
 			};
 		},
-		onShow: function() {
+		onLoad: function() {
 			const that = this;
 			// 监听登录
 			that.watchLogin();
 		},
 		methods: {
-			toPath(e) {
-				if (e && e.route && e.type == '0') {
-					uni.redirectTo({
-						url: `/${e.route}`
-					})
-				} else {
-					uni.navigateTo({
-						url: `/${e.route}`
-					})
-				}
-			},
 			// 公共跳转
 			toCommon(route, e) {
 				uni.navigateTo({
@@ -131,7 +118,7 @@
 					success: (res) => {
 						let user = that.$jwt(res.data);
 						if (user) {
-							that.$set(that, `user`,user)
+							that.$set(that, `user`, user)
 							that.searchMarket();
 						}
 					},
@@ -390,6 +377,17 @@
 			// 是否选中商品,控制提交订单按钮
 			hasCheck() {
 				return this.list.some(e => e.goods.some(eg => eg.check))
+			},
+			toPath(e) {
+				if (e && e.route && e.type == '0') {
+					uni.redirectTo({
+						url: `/${e.route}`
+					})
+				} else {
+					uni.navigateTo({
+						url: `/${e.route}`
+					})
+				}
 			}
 		}
 	}

+ 13 - 17
pages/store/index.vue

@@ -51,18 +51,16 @@
 				total: 0,
 				page: 0,
 				skip: 0,
-				limit: 5,
+				limit: 6,
 			};
 		},
-		onShow: async function() {
+		onLoad: async function() {
 			const that = this;
+			// 监听用户是否登录
 			await that.watchLogin();
+			// 查询列表
 			await that.search();
 		},
-		onHide: function() {
-			const that = this;
-			that.clearPage();
-		},
 		methods: {
 			// 监听用户是否登录
 			watchLogin() {
@@ -75,6 +73,7 @@
 					}
 				})
 			},
+			// 查询列表
 			async search() {
 				const that = this;
 				let info = {
@@ -117,7 +116,6 @@
 			// 商铺
 			toShop(e) {
 				const that = this;
-				that.clearPage();
 				uni.navigateTo({
 					url: `/pagesHome/shop/index?id=${e._id}`
 				})
@@ -125,7 +123,6 @@
 			// 购买
 			toBuy(e) {
 				const that = this;
-				that.clearPage();
 				uni.navigateTo({
 					url: `/pagesHome/order/detail?id=${e._id}`
 				})
@@ -154,9 +151,16 @@
 					})
 				}
 			},
+			// 清空列表
+			clearPage() {
+				const that = this;
+				that.$set(that, `list`, [])
+				that.$set(that, `skip`, 0)
+				that.$set(that, `limit`, 5)
+				that.$set(that, `page`, 0)
+			},
 			toPath(e) {
 				const that = this;
-				that.clearPage();
 				if (e && e.route && e.type == '0') {
 					uni.redirectTo({
 						url: `/${e.route}`
@@ -167,14 +171,6 @@
 					})
 				}
 			},
-			// 清空列表
-			clearPage() {
-				const that = this;
-				that.$set(that, `list`, [])
-				that.$set(that, `skip`, 0)
-				that.$set(that, `limit`, 5)
-				that.$set(that, `page`, 0)
-			}
 		}
 	}
 </script>

+ 0 - 8
pages/week/index.vue

@@ -86,11 +86,6 @@
 			that.searchConfig();
 			that.search();
 		},
-		onHide: function() {
-			const that = this;
-			// that.clearPage();
-		},
-		onShow: function() {},
 		methods: {
 			// 查询基本设置
 			searchConfig() {
@@ -203,7 +198,6 @@
 				const that = this;
 				that.$set(that, `tags`, e.code);
 				that.$set(that, `twoActive`, index);
-				that.clearPage();
 				that.searchMarket();
 			},
 			// 清空列表
@@ -217,7 +211,6 @@
 			// 搜索商品
 			toCommon(e) {
 				const that = this;
-				// that.clearPage();
 				uni.navigateTo({
 					url: `/${e}`
 				})
@@ -225,7 +218,6 @@
 			// 购买
 			toBuy(e) {
 				const that = this;
-				// that.clearPage();
 				uni.navigateTo({
 					url: `/pagesHome/order/detail?id=${e.id||e._id}`
 				})

+ 0 - 137
pagesHome/activity/index.vue

@@ -1,137 +0,0 @@
-<template>
-	<mobile-frame>
-		<view class="main">
-			<view class="one">
-				<image class="image" :src="oneUrl" mode=""></image>
-			</view>
-			<view class="two">
-				<scroll-view scroll-y="true" class="scroll-view" @scrolltolower="toPage">
-					<view class="list-scroll-view">
-						<view class="list" v-for="(item,index) in list" :key="index">
-							<image class="image" :src="item.url" mode=""></image>
-							<view class="name">
-								{{item.name}}
-							</view>
-							<view class="other">
-								<view class="money">
-									<text>¥</text>
-									<text>{{item.money}}</text>
-								</view>
-								<view class="btn">
-									<button type="default" size="mini">购买</button>
-								</view>
-							</view>
-						</view>
-					</view>
-				</scroll-view>
-			</view>
-		</view>
-	</mobile-frame>
-</template>
-
-<script>
-	export default {
-		data() {
-			return {
-				oneUrl: '',
-				list: [ //
-					// {
-					// 	url: '',
-					// 	name: '商品名称',
-					// 	money: 100,
-					// },
-          ]
-			};
-		},
-		onShow: function() {},
-		methods: {
-			// 分页
-			toPage() {}
-		}
-	}
-</script>
-
-<style lang="scss">
-	.main {
-		display: flex;
-		flex-direction: column;
-		width: 96vw;
-		height: 97.5vh;
-		padding: 2vw;
-		background-color: #FB1438;
-
-		.one {
-			margin: 0 0 2vw 0;
-
-			.image {
-				width: 100%;
-				height: 50vw;
-			}
-		}
-
-		.two {
-			position: relative;
-			flex-grow: 1;
-
-			.list {
-				margin: 0 2vw 2vw 0;
-				background-color: var(--fffColor);
-				padding: 2vw;
-				width: 43vw;
-				border-radius: 5px;
-
-				.image {
-					width: 100%;
-					height: 49vw;
-					margin: 0 0 1vw 0;
-				}
-
-				.name {
-					font-size: var(--font15Size);
-					margin: 0 0 2vw 0;
-				}
-
-				.other {
-					display: flex;
-					flex-direction: row;
-					justify-content: space-between;
-
-					.money {
-						color: var(--ff0Color);
-
-						text:nth-child(1) {
-							font-size: var(--font12Size);
-						}
-					}
-
-					.btn {
-						button {
-							border-radius: 25px;
-							color: var(--fffColor);
-							background-color: var(--ff0Color);
-							font-size: var(--font12Size);
-						}
-					}
-				}
-			}
-
-			.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: row;
-			flex-wrap: wrap;
-		}
-	}
-</style>

+ 96 - 57
pagesHome/exchange/index.vue

@@ -1,13 +1,14 @@
 <template>
 	<mobile-frame>
 		<view class="main">
-			<view class="one">
-				<scroll-view scroll-y="true" class="scroll-view" @scrolltolower="toPage">
-					<view class="list-scroll-view">
-						<discount :Style="Style" :couponList="list" @toReceive="toReceive"></discount>
+			<scroll-view scroll-y="true" class="scroll-view" @scrolltolower="toPage" @scroll="toScroll">
+				<view class="list-scroll-view">
+					<discount :Style="Style" :couponList="list" :total="total" @toReceive="toReceive"></discount>
+					<view class="is_bottom" v-if="is_bottom">
+						<text>{{config.bottom_title}}</text>
 					</view>
-				</scroll-view>
-			</view>
+				</view>
+			</scroll-view>
 		</view>
 	</mobile-frame>
 </template>
@@ -20,15 +21,19 @@
 		},
 		data() {
 			return {
+				config: {},
+				user: {},
 				Style: {
 					receive: true
 				},
-				user: {},
 				list: [],
 				total: 0,
 				skip: 0,
-				limit: 5,
-				page: 0
+				limit: 6,
+				page: 0,
+				// 数据是否触底
+				is_bottom: false,
+				scrollTop: 0
 			};
 		},
 		onLoad: function(e) {
@@ -36,68 +41,40 @@
 			// 监听用户是否登录
 			that.watchLogin();
 		},
-    		onHide: function() {
+		onShow: function() {
 			const that = this;
-			that.clearPage();
+			that.searchConfig();
 		},
 		methods: {
-			// 领取优惠劵
-			async toReceive(e) {
+			// 查询基本设置
+			searchConfig() {
 				const that = this;
-				uni.showModal({
-					title: '提示',
-					content: '确定领取该优惠券?',
-					success: async function(res) {
-						if (res.confirm) {
-							const arr = await that.$api(`/userCoupon/getCoupon/${e._id}`, 'POST');
-							if (arr.errcode == '0') {
-								if (arr.data) {
-									uni.showToast({
-										title: arr.data.msg,
-										icon: 'none',
-										duration: 2000
-									});
-								} else {
-									uni.showToast({
-										title: `领取成功`,
-										icon: 'none',
-										duration: 3000
-									})
-									that.clearPage();
-									that.search();
-								}
-							} else {
-								uni.showToast({
-									title: arr.errmsg,
-									icon: 'none',
-									duration: 2000
-								});
-							}
-						}
-					}
-				});
+				uni.getStorage({
+					key: 'config',
+					success: function(res) {
+						if (res.data) that.$set(that, `config`, res.data)
+					},
+				})
 			},
-			// 监听用户是否登录
 			watchLogin() {
 				const that = this;
 				uni.getStorage({
 					key: 'token',
 					success: function(res) {
 						let user = that.$jwt(res.data);
-						if (user) that.$set(that, `user`, user);
-						that.search();
+						if (user) {
+							that.$set(that, `user`, user);
+							that.search();
+						}
 					},
 					fail: function(err) {
-						uni.navigateTo({
-							url: `/pages/login/index`
-						})
+						console.log(err);
 					}
-				});
+				})
 			},
 			// 查询列表
 			async search() {
 				const that = this;
-				let user = that.user;
 				let info = {
 					skip: that.skip,
 					limit: that.limit,
@@ -116,7 +93,7 @@
 				}
 			},
 			// 分页
-			toPage(e) {
+			toPage() {
 				const that = this;
 				let list = that.list;
 				let limit = that.limit;
@@ -131,8 +108,46 @@
 					that.$set(that, `skip`, skip)
 					that.search();
 					uni.hideLoading();
-				} else uni.showToast({
-					title: '没有更多数据了'
+
+				} 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);
+			},
+			async toReceive(e) {
+				const that = this;
+				uni.showModal({
+					title: '提示',
+					content: '确定领取该优惠券?',
+					success: async function(res) {
+						if (res.confirm) {
+							const arr = await that.$api(`/userCoupon/getCoupon/${e._id}`, 'POST');
+							if (arr.errcode == '0') {
+								if (arr.data) {
+									uni.showToast({
+										title: arr.errmsg,
+										icon: 'none'
+									});
+								} else {
+									uni.showToast({
+										title: `领取成功`,
+										icon: 'none'
+									})
+									that.clearPage();
+									that.search();
+								}
+							} else {
+								uni.showToast({
+									title: arr.errmsg,
+									icon: 'none',
+								});
+							}
+						}
+					}
 				});
 			},
 			// 清空列表
@@ -140,7 +155,7 @@
 				const that = this;
 				that.$set(that, `list`, [])
 				that.$set(that, `skip`, 0)
-				that.$set(that, `limit`, 5)
+				that.$set(that, `limit`, 6)
 				that.$set(that, `page`, 0)
 			}
 		}
@@ -151,4 +166,28 @@
 	.main {
 		background-color: var(--f5Color);
 	}
+
+	.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>

+ 0 - 359
pagesHome/farming/index.vue

@@ -1,359 +0,0 @@
-<template>
-	<mobile-frame>
-		<view class="main">
-			<view class="one">
-				<view class="one_1" v-if="barActive=='0'">
-					<view class="first">
-						<image class="image" :src="oneUrl" mode=""></image>
-					</view>
-					<view class="second">
-						<scroll-view scroll-y="true" class="scroll-view" @scrolltolower="toPage">
-							<view class="list-scroll-view">
-								<view class="list" v-for="(item,index) in list" :key="index" @tap="toCommon('pagesHome/order/detail')">
-									<image class="image" :src="item.url" mode=""></image>
-									<view class="name">
-										{{item.name}}
-									</view>
-									<view class="other">
-										<view class="money">
-											<text>¥</text>
-											<text>{{item.money}}</text>
-										</view>
-										<view class="btn">
-											<button type="default" size="mini">购买</button>
-										</view>
-									</view>
-								</view>
-							</view>
-						</scroll-view>
-					</view>
-				</view>
-				<view class="one_2" v-else-if="barActive=='1'">
-					商品分类
-				</view>
-				<view class="one_3" v-else-if="barActive=='2'">
-					全部商品
-				</view>
-				<view class="one_4" v-else-if="barActive=='3'">
-					<view class="first">
-						<image class="image" :src="info.url" mode=""></image>
-						<view class="name">{{info.name}}</view>
-					</view>
-					<view class="second">
-						<view class="second_1">
-							<view class="grade">
-								<view>{{info.grade||'5'}}</view>
-								商品
-							</view>
-							<view class="grade">
-								<view>{{info.grade||'5'}}</view>
-								发货
-							</view>
-							<view class="grade">
-								<view>{{info.grade||'5'}}</view>
-								服务
-							</view>
-						</view>
-						<view class="second_2">
-							<view class="second_2_bor">
-								<image class="image" :src="info.url" mode=""></image>
-							</view>
-							<view class="txt">
-								店铺二维码
-							</view>
-						</view>
-					</view>
-					<view class="collect">
-						<text v-if="!collection" @click="toCollect" class="iconfont icon-yduishoucangkongxin"></text>
-						<text v-else @click="toCollect" class="iconfont icon-yduishoucangshixin"></text>
-					</view>
-				</view>
-			</view>
-			<view class="two">
-				<view class="list" v-for="(item,index) in barList" :key="index" @tap="barChange(index,item)">
-					<view class="icon">
-						<text :class="['iconfont',barActive==index?item.acticon:item.icon]"></text>
-					</view>
-					<view :class="['name',barActive==index?'activename':'']">
-						{{item.name}}
-					</view>
-				</view>
-			</view>
-		</view>
-	</mobile-frame>
-</template>
-
-<script>
-	export default {
-		data() {
-			return {
-				barActive: '0',
-				barList: [ //底部菜单
-					{
-						icon: 'icon-shangdian',
-						acticon: "icon-shangdian-copy",
-						name: '微店首页'
-					}, {
-						icon: 'icon-fenlei',
-						acticon: "icon-fenlei-copy",
-						name: '商品分类'
-					}, {
-						icon: 'icon-shangpinfenlei',
-						acticon: "icon-shangpinfenlei-copy",
-						name: '全部商品'
-					}, {
-						icon: 'icon-qiyejianjie',
-						acticon: "icon-qiyejianjie-copy",
-						name: '店铺简介'
-					}
-				],
-				oneUrl:'',
-				info: {
-					url: '',
-					name: '首农食品旗舰店',
-					money: 100,
-				},
-				list: [ //
-					{
-						url: '',
-						name: '商品名称',
-						money: 100,
-					},
-				],
-				// 收藏
-				collection: false,
-			};
-		},
-		onShow: function() {},
-		methods: {
-			// 选择底部菜单
-			barChange(index, item) {
-				const that = this;
-				that.$set(that, `barActive`, index);
-			},
-			// 公共跳转
-			toCommon(e) {
-				uni.navigateTo({
-					url: `/${e}`
-				})
-			},
-			// 收藏
-			toCollect() {
-				const that = this;
-				that.collection = !that.collection;
-				if (that.collection == true) {
-					uni.showToast({
-						title: `收藏成功`,
-						icon: 'none'
-					})
-				} else {
-					uni.showToast({
-						title: `取消成功`,
-						icon: 'none'
-					})
-				}
-			},
-			// 分页
-			toPage() {}
-		}
-	}
-</script>
-
-<style lang="scss">
-	.main {
-		display: flex;
-		flex-direction: column;
-		width: 100vw;
-		height: 100vh;
-
-		.one {
-			position: relative;
-			flex-grow: 1;
-
-			.one_1 {
-				display: flex;
-				flex-direction: column;
-				width: 96vw;
-				height: 90vh;
-				padding: 2vw;
-				background-color: var(--fFB1Color);
-
-				.first {
-					margin: 0 0 2vw 0;
-
-					.image {
-						width: 100%;
-						height: 50vw;
-					}
-				}
-
-				.second {
-					position: relative;
-					flex-grow: 1;
-
-					.list {
-						margin: 0 2vw 2vw 0;
-						background-color: var(--fffColor);
-						padding: 2vw;
-						width: 43vw;
-						border-radius: 5px;
-
-						.image {
-							width: 100%;
-							height: 49vw;
-							margin: 0 0 1vw 0;
-						}
-
-						.name {
-							font-size: var(--font15Size);
-							margin: 0 0 2vw 0;
-						}
-
-						.other {
-							display: flex;
-							flex-direction: row;
-							justify-content: space-between;
-
-							.money {
-								color: var(--ff0Color);
-
-								text:nth-child(1) {
-									font-size: var(--font12Size);
-								}
-							}
-
-							.btn {
-								button {
-									border-radius: 25px;
-									color: var(--fffColor);
-									background-color: var(--ff0Color);
-									font-size: var(--font12Size);
-								}
-							}
-						}
-					}
-
-					.list:nth-child(2n) {
-						margin: 0 0 2vw 0;
-					}
-				}
-			}
-
-			.one_4 {
-				.first {
-					display: flex;
-					flex-direction: column;
-					align-items: center;
-					background-color: var(--fFB1Color);
-					border-bottom-right-radius: 10vw;
-					border-bottom-left-radius: 10vw;
-
-					.image {
-						width: 20vw;
-						height: 20vw;
-						border-radius: 20vw;
-					}
-
-					.name {
-						margin: 2vw 0;
-						font-size: var(--font16Szie);
-						font-weight: bold;
-						color: var(--mainColor);
-					}
-				}
-
-				.second {
-					margin: 2vw 0;
-
-					.second_1 {
-						display: flex;
-						justify-content: space-evenly;
-
-						.grade {
-							display: flex;
-							flex-direction: column;
-							align-items: center;
-							color: var(--f85Color);
-							font-size: var(--font13Size);
-
-							view {
-								margin: 1vw 0 0 0;
-								color: var(--ff0Color);
-							}
-						}
-					}
-
-					.second_2 {
-						display: flex;
-						justify-content: center;
-						flex-direction: column;
-						margin: 15vw 25vw 0 25vw;
-						text-align: center;
-						background: #b2b2b2;
-						padding: 2vw;
-						border-radius: 5px;
-
-						.second_2_bor {
-							.image {
-								width: 100%;
-								height: 40vw;
-							}
-						}
-
-						.txt {
-							color: #fff;
-							font-size: 14px;
-							margin: 2vw 0;
-						}
-					}
-				}
-			}
-
-			.collect {
-				position: fixed;
-				top: 0;
-				right: 2vw;
-
-				.iconfont {
-					font-size: 25px;
-				}
-			}
-		}
-
-		.two {
-			display: flex;
-			flex-direction: row;
-			justify-content: space-around;
-			border-top: 1px solid #f1f1f1;
-
-			.list {
-				padding: 1vw 0;
-				text-align: center;
-
-				.icon {}
-
-				.name {
-					font-size: 12px;
-				}
-
-				.activename {
-					color: var(--fFB1Color);
-				}
-			}
-		}
-	}
-
-	.scroll-view {
-		position: absolute;
-		top: 0;
-		left: 0;
-		right: 0;
-		bottom: 0;
-
-		.list-scroll-view {
-			display: flex;
-			flex-direction: row;
-			flex-wrap: wrap;
-		}
-	}
-</style>

+ 3 - 14
pagesHome/group/index.vue

@@ -3,8 +3,7 @@
 		<view class="main">
 			<view class="one">
 				<view class="list" @tap="toView">
-					<image class="image" :src="goodsInfo.file&&goodsInfo.file.length>0?goodsInfo.file[0].url:''"
-						mode="">
+					<image class="image" :src="goodsInfo.file&&goodsInfo.file.length>0?goodsInfo.file[0].url:''" mode="">
 					</image>
 					<view class="list_1_1">
 						<view class="name">
@@ -28,8 +27,7 @@
 					<view class="list-scroll-view">
 						<view class="list" v-for="(item, index) in list" :key="index">
 							<view class="image">
-								<image class="file" v-for="(tag, indexs) in item.persons.slice(0,9)" :key="indexs"
-									v-if="tag.status==0" :src="tag.icon&&tag.icon.length>0?tag.icon[0].url:''" mode="">
+								<image class="file" v-for="(tag, indexs) in item.persons.slice(0,9)" :key="indexs" v-if="tag.status==0" :src="tag.icon&&tag.icon.length>0?tag.icon[0].url:''" mode="">
 								</image>
 							</view>
 							<view class="list_1">
@@ -123,16 +121,9 @@
 				goods_id: e.goods_id || '',
 				specs_id: e.specs_id || ''
 			});
-		},
-		onShow: async function() {
-			const that = this;
 			await that.watchLogin();
 			await that.search();
 		},
-    		onHide: function() {
-			const that = this;
-			that.clearPage();
-		},
 		methods: {
 			// 开团
 			async toGroup() {
@@ -267,9 +258,7 @@
 					that.$set(that, `skip`, skip)
 					that.search();
 					uni.hideLoading();
-				} else uni.showToast({
-					title: '没有更多数据了'
-				});
+				} else {}
 			},
 			// 清空列表
 			clearPage() {

+ 0 - 3
pagesHome/group/share.vue

@@ -80,9 +80,6 @@
 		onLoad: function(e) {
 			const that = this;
 			that.$set(that, `id`, e.id || '');
-		},
-		onShow: function() {
-			const that = this;
 			that.watchLogin();
 			that.search();
 		},

+ 0 - 141
pagesHome/import/index.vue

@@ -1,141 +0,0 @@
-<template>
-  <mobile-frame>
-    <view class="main">
-      <view class="one">
-        <image class="image" :src="oneUrl" mode=""></image>
-      </view>
-      <view class="two">
-        <scroll-view
-          scroll-y="true"
-          class="scroll-view"
-          @scrolltolower="toPage"
-        >
-          <view class="list-scroll-view">
-            <view class="list" v-for="(item, index) in list" :key="index">
-              <image class="image" :src="item.url" mode=""></image>
-              <view class="name">
-                {{ item.name }}
-              </view>
-              <view class="other">
-                <view class="money">
-                  <text>¥</text>
-                  <text>{{ item.money }}</text>
-                </view>
-                <view class="btn">
-                  <button type="default" size="mini">购买</button>
-                </view>
-              </view>
-            </view>
-          </view>
-        </scroll-view>
-      </view>
-    </view>
-  </mobile-frame>
-</template>
-
-<script>
-export default {
-  data() {
-    return {
-      oneUrl: "",
-      list: [ //
-        {
-          url: "",
-          name: "商品名称",
-          money: 100,
-        },
-      ],
-    };
-  },
-  onShow: function () {},
-  methods: {
-    // 分页
-    toPage() {},
-  },
-};
-</script>
-
-<style lang="scss">
-.main {
-  display: flex;
-  flex-direction: column;
-  width: 96vw;
-  height: 97.5vh;
-  padding: 2vw;
-  background-color: #0d2576;
-
-  .one {
-    margin: 0 0 2vw 0;
-
-    .image {
-      width: 100%;
-      height: 50vw;
-    }
-  }
-
-  .two {
-    position: relative;
-    flex-grow: 1;
-
-    .list {
-      margin: 0 2vw 2vw 0;
-      background-color: var(--fffColor);
-      padding: 2vw;
-      width: 43vw;
-      border-radius: 5px;
-
-      .image {
-        width: 100%;
-        height: 49vw;
-        margin: 0 0 1vw 0;
-      }
-
-      .name {
-        font-size: var(--font15Size);
-        margin: 0 0 2vw 0;
-      }
-
-      .other {
-        display: flex;
-        flex-direction: row;
-        justify-content: space-between;
-
-        .money {
-          color: var(--ff0Color);
-
-          text:nth-child(1) {
-            font-size: var(--font12Size);
-          }
-        }
-
-        .btn {
-          button {
-            border-radius: 25px;
-            color: var(--fffColor);
-            background-color: var(--ff0Color);
-            font-size: var(--font12Size);
-          }
-        }
-      }
-    }
-
-    .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: row;
-    flex-wrap: wrap;
-  }
-}
-</style>

+ 2 - 10
pagesHome/market/search.vue

@@ -115,25 +115,17 @@
 				screen_name: '',
 				// 数据是否触底
 				is_bottom: false,
-				scrollTop: 0,
-				bottom_title: this.$config.bottom_title
+				scrollTop: 0
 			};
 		},
 		onLoad: async function(e) {
 			const that = this;
 			that.$set(that, `tags`, e.tags || '');
 			that.$set(that, `pid`, e.pid || '');
+			that.searchConfig();
 			await that.searchOther();
 			await that.search();
 		},
-		onShow: function() {
-			const that = this;
-			that.searchConfig();
-		},
-		onHide: function() {
-			const that = this;
-			// that.clearPage();
-		},
 		methods: {
 			// 查询基本设置
 			searchConfig() {

+ 0 - 8
pagesHome/market/type.vue

@@ -83,11 +83,6 @@
 			that.searchConfig();
 			that.search();
 		},
-		onShow: function() {},
-    onHide: function() {
-			const that = this;
-			that.clearPage();
-		},
 		methods: {
 			// 查询基本设置
 			searchConfig() {
@@ -199,7 +194,6 @@
 				const that = this;
 				that.$set(that, `tags`, e.code);
 				that.$set(that, `twoActive`, index);
-				that.clearPage();
 				that.searchMarket();
 			},
 			// 清空列表
@@ -213,7 +207,6 @@
 			// 搜索商品
 			toCommon(e) {
 				const that = this;
-				// that.clearPage();
 				uni.navigateTo({
 					url: `/${e}`
 				})
@@ -221,7 +214,6 @@
 			// 购买
 			toBuy(e) {
 				const that = this;
-				// that.clearPage();
 				uni.navigateTo({
 					url: `/pagesHome/order/detail?id=${e.id||e._id}`
 				})

+ 2 - 44
pagesHome/order/appraise.vue

@@ -16,9 +16,7 @@
 				<scroll-view scroll-y="true" class="scroll-view">
 					<view class="list-scroll-view">
 						<view class="list" v-for="(item, index) in list" :key="index">
-							<image v-if="item.customer.icon&&item.customer.icon.length>0" class="image"
-								:src="item.customer.icon&&item.customer.icon.length>0?item.customer.icon[0].url:''"
-								mode="">
+							<image v-if="item.customer.icon&&item.customer.icon.length>0" class="image" :src="item.customer.icon&&item.customer.icon.length>0?item.customer.icon[0].url:''" mode="">
 							</image>
 							<text v-else class="iconfont icon-top"></text>
 							<view class="list_1">
@@ -45,10 +43,7 @@
 										</view>
 										<view v-if="item.customer._id==user._id" @tap="toReply(item,indexx)">回复</view>
 									</view>
-									<uni-easyinput
-										v-if="reply.reply&&reply.customer._id==user._id&&reply._id==item._id&&reply.index==indexx"
-										class="input" maxlength=-1 type="textarea" @change="confirm"
-										placeholder="评论" />
+									<uni-easyinput v-if="reply.reply&&reply.customer._id==user._id&&reply._id==item._id&&reply.index==indexx" class="input" maxlength=-1 type="textarea" @change="confirm" placeholder="评论" />
 								</view>
 							</view>
 						</view>
@@ -107,10 +102,6 @@
 			that.$set(that, `id`, e.id || '');
 			that.watchLogin()
 		},
-        onHide: function() {
-			const that = this;
-			that.clearPage();
-		},
 		methods: {
 			async confirm(e) {
 				const that = this;
@@ -158,7 +149,6 @@
 				const that = this;
 				that.$set(that, `code`, e.code);
 				if (e.code == '0') {
-					// that.clearPage();
 					that.search()
 				} else if (e.code == '1') {
 					that.$set(that, `list`, that.one);
@@ -197,15 +187,12 @@
 					that.$set(that, `info`, res.data)
 				}
 				let info = {
-					// skip: that.skip,
-					// limit: that.limit,
 					goods: that.id
 				}
 				res = await that.$api(`/goodsRate`, `GET`, {
 					...info,
 				})
 				if (res.errcode == '0') {
-					// let list = [...that.list, ...res.data]
 					let list = res.data;
 					for (let val of list) {
 						val.customer.phone = val.customer.phone.replace(/(\d{3})\d{4}(\d{4})/, '$1****$2');
@@ -228,35 +215,6 @@
 					});
 				}
 			},
-			// 分页
-			toPage(e) {
-				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 uni.showToast({
-					title: '没有更多数据了',
-					icon: 'none'
-				});
-			},
-			// 清空列表
-			clearPage() {
-				const that = this;
-				that.$set(that, `list`, [])
-				that.$set(that, `skip`, 0)
-				that.$set(that, `limit`, 6)
-				that.$set(that, `page`, 0)
-			}
 		}
 	}
 </script>

+ 1 - 1
pagesHome/order/detail.vue

@@ -224,7 +224,7 @@
 		},
 		onLoad: async function(e) {
 			const that = this;
-			that.$set(that, `id`, e.id || '63552e45f6ec072bacdc8253');
+			that.$set(that, `id`, e.id || '');
 		},
 		onShow: async function() {
 			const that = this;

+ 0 - 144
pagesHome/place/detail.vue

@@ -1,144 +0,0 @@
-<template>
-	<mobile-frame>
-		<view class="main">
-			<view class="one">
-				<image class="image" :src="oneUrl" mode=""></image>
-			</view>
-			<view class="two">
-				<scroll-view scroll-y="true" class="scroll-view" @scrolltolower="toPage">
-					<view class="list-scroll-view">
-						<view class="list" v-for="(item,index) in list" :key="index">
-							<image class="image" :src="item.url" mode=""></image>
-							<view class="name">
-								{{item.name}}
-							</view>
-							<view class="other">
-								<view class="money">
-									<text>¥</text>
-									<text>{{item.money}}</text>
-								</view>
-								<view class="btn">
-									<button type="default" size="mini">购买</button>
-								</view>
-							</view>
-						</view>
-					</view>
-				</scroll-view>
-			</view>
-		</view>
-	</mobile-frame>
-</template>
-
-<script>
-	export default {
-		data() {
-			return {
-				oneUrl: '',
-				list: [ //
-					{
-						url: '',
-						name: '商品名称',
-						money: 100,
-					},
-					
-				]
-			};
-		},
-		onShow: function() {},
-		methods: {
-			// 分页
-			toPage() {},
-			// 公共跳转
-			toCommon(route, e) {
-				uni.navigateTo({
-					url: `${route}?id=${e && e._id ? e._id : ''}`
-				})
-			},
-		}
-	}
-</script>
-
-<style lang="scss">
-	.main {
-		display: flex;
-		flex-direction: column;
-		width: 96vw;
-		height: 97.5vh;
-		padding: 2vw;
-		background-color: #0D2576;
-
-		.one {
-			margin: 0 0 2vw 0;
-
-			.image {
-				width: 100%;
-				height: 50vw;
-			}
-		}
-
-		.two {
-			position: relative;
-			flex-grow: 1;
-
-			.list {
-				margin: 0 2vw 2vw 0;
-				background-color: var(--fffColor);
-				padding: 2vw;
-				width: 43vw;
-				border-radius: 5px;
-
-				.image {
-					width: 100%;
-					height: 49vw;
-					margin: 0 0 1vw 0;
-				}
-
-				.name {
-					font-size: var(--font15Size);
-					margin: 0 0 2vw 0;
-				}
-
-				.other {
-					display: flex;
-					flex-direction: row;
-					justify-content: space-between;
-
-					.money {
-						color: var(--ff0Color);
-
-						text:nth-child(1) {
-							font-size: var(--font12Size);
-						}
-					}
-
-					.btn {
-						button {
-							border-radius: 25px;
-							color: var(--fffColor);
-							background-color: var(--ff0Color);
-							font-size: var(--font12Size);
-						}
-					}
-				}
-			}
-
-			.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: row;
-			flex-wrap: wrap;
-		}
-	}
-</style>

+ 0 - 307
pagesHome/place/index.vue

@@ -1,307 +0,0 @@
-<template>
-	<mobile-frame>
-		<view class="main">
-			<view class="one">
-				<image class="image" :src="oneUrl" mode=""></image>
-			</view>
-			<view class="two">
-				<scroll-view scroll-y="true" class="scroll-view">
-					<view class="list-scroll-view">
-						<view class="list" v-for="(item,index) in list" :key="index" :style="{background:item.bgColor}"
-							@click="toCommon('/pagesHome/place/detail')">
-							<view class="name">
-								<text>{{item.name}}</text>
-							</view>
-							<image class="image" :src="item.url" mode=""></image>
-							<view class="no_use" v-if="item.is_use==false">
-								&nbsp;
-							</view>
-						</view>
-					</view>
-				</scroll-view>
-			</view>
-		</view>
-	</mobile-frame>
-</template>
-
-<script>
-	export default {
-		data() {
-			return {
-				oneUrl: '',
-				list: [ //
-					{
-						name: '北京特产',
-						url: '',
-						bgColor: '#FF6573',
-						is_use: true
-					},
-					{
-						name: '河北特产',
-						url:'',
-						bgColor: '#448E51',
-						is_use: false
-					},
-					{
-						name: '天津特产',
-						url:'',
-						bgColor: '#8A59B4',
-						is_use: false
-					},
-					{
-						name: '辽宁特产',
-						url:'',
-						bgColor: '#2A669A',
-						is_use: false
-					},
-					{
-						name: '山西特产',
-						url:'',
-						bgColor: '#794537',
-						is_use: false
-					},
-					{
-						name: '内蒙特产',
-						url:'',
-						bgColor: '#397126',
-						is_use: false
-					},
-					{
-						name: '吉林特产',
-						url:'',
-						bgColor: '#965400',
-						is_use: false
-					},
-					{
-						name: '黑龙江特产',
-						url:'',
-						bgColor: '#005854',
-						is_use: false
-					},
-					{
-						name: '湖北特产',
-						url:'',
-						bgColor: '#55C5C5',
-						is_use: false
-					},
-					{
-						name: '湖南特产',
-						url:'',
-						bgColor: '#659100',
-						is_use: false
-					},
-					{
-						name: '江西特产',
-						url:'',
-						bgColor: '#CF4779',
-						is_use: false
-					},
-					{
-						name: '河南特产',
-						url:'',
-						bgColor: '#1F83B7',
-						is_use: false
-					},
-					{
-						name: '安徽特产',
-						url:'',
-						bgColor: '#302760',
-						is_use: false
-					},
-					{
-						name: '上海特产',
-						url:'',
-						bgColor: '#8E8A64',
-						is_use: false
-					},
-					{
-						name: '江苏特产',
-						url:'',
-						bgColor: '#CF6B54',
-						is_use: false
-					},
-					{
-						name: '浙江特产',
-						url:'',
-						bgColor: '#0B4864',
-						is_use: false
-					},
-					{
-						name: '山东特产',
-						url:'',
-						bgColor: '#892557',
-						is_use: false
-					},
-					{
-						name: '福建特产',
-						url:'',
-						bgColor: '#13607A',
-						is_use: false
-					},
-					{
-						name: '广东特产',
-						url:'',
-						bgColor: '#FF6A52',
-						is_use: false
-					},
-					{
-						name: '海南特产',
-						url:'',
-						bgColor: '#1D2F79',
-						is_use: false
-					},
-					{
-						name: '广西特产',
-						url:'',
-						bgColor: '#DD863F',
-						is_use: false
-					},
-					{
-						name: '甘肃特产',
-						url:'',
-						bgColor: '#118582',
-						is_use: false
-					},
-					{
-						name: '青海特产',
-						url:'',
-						bgColor: '#9744B6',
-						is_use: false
-					},
-					{
-						name: '宁夏特产',
-						url:'',
-						bgColor: '#048B50',
-						is_use: false
-					},
-					{
-						name: '新疆特产',
-						url:'',
-						bgColor: '#5D832C',
-						is_use: false
-					},
-					{
-						name: '重庆特产',
-						url:'',
-						bgColor: '#32A6BF',
-						is_use: false
-					},
-					{
-						name: '陕西特产',
-						url:'',
-						bgColor: '#145342',
-						is_use: false
-					},
-					{
-						name: '四川特产',
-						url:'',
-						bgColor: '#9C3140',
-						is_use: false
-					},
-					{
-						name: '贵州特产',
-						url:'',
-						bgColor: '#7F8D02',
-						is_use: false
-					},
-					{
-						name: '云南特产',
-						url:'',
-						bgColor: '#019585',
-						is_use: false
-					},
-					{
-						name: '西藏特产',
-						url:'',
-						bgColor: '#B4A52E',
-						is_use: false
-					}
-				]
-			};
-		},
-		onShow: function() {},
-		methods: {
-			// 公共跳转
-			toCommon(route, e) {
-				uni.navigateTo({
-					url: `${route}?id=${e && e._id ? e._id : ''}`
-				})
-			},
-		}
-	}
-</script>
-
-<style lang="scss">
-	.main {
-		display: flex;
-		flex-direction: column;
-		width: 96vw;
-		height: 97vh;
-		padding: 2vw;
-
-		.one {
-			margin: 0 0 2vw 0;
-
-			.image {
-				width: 100%;
-				height: 50vw;
-			}
-		}
-
-		.two {
-			position: relative;
-			flex-grow: 1;
-
-			.list {
-				position: relative;
-				width: 27vw;
-				margin: 0 0 2vw 0;
-				border: 1px solid var(--f1Color);
-				text-align: center;
-				padding: 2vw;
-
-				.name {
-					text {
-						font-size: var(--font16Size);
-						border: 2px solid var(--f1Color);
-						display: inline-block;
-						color: var(--fffColor);
-						padding: 1vw 2vw;
-						margin: 0 0 2vw;
-						border-radius: 5px;
-					}
-				}
-
-				.image {
-					width: 90%;
-					height: 22vw;
-					border-radius: 90px;
-				}
-
-				.no_use {
-					position: absolute;
-					top: 0;
-					z-index: 999;
-					width: 100%;
-					height: 100%;
-					left: 0;
-					background-color: #f1f1f19f;
-				}
-			}
-		}
-	}
-
-	.scroll-view {
-		position: absolute;
-		top: 0;
-		left: 0;
-		right: 0;
-		bottom: 0;
-
-		.list-scroll-view {
-			display: flex;
-			flex-direction: row;
-			flex-wrap: wrap;
-		}
-	}
-</style>

+ 0 - 137
pagesHome/poverty/index.vue

@@ -1,137 +0,0 @@
-<template>
-	<mobile-frame>
-		<view class="main">
-			<view class="one">
-				<image class="image" :src="oneUrl" mode=""></image>
-			</view>
-			<view class="two">
-				<scroll-view scroll-y="true" class="scroll-view" @scrolltolower="toPage">
-					<view class="list-scroll-view">
-						<view class="list" v-for="(item,index) in list" :key="index">
-							<image class="image" :src="item.url" mode=""></image>
-							<view class="name">
-								{{item.name}}
-							</view>
-							<view class="other">
-								<view class="money">
-									<text>¥</text>
-									<text>{{item.money}}</text>
-								</view>
-								<view class="btn">
-									<button type="default" size="mini">购买</button>
-								</view>
-							</view>
-						</view>
-					</view>
-				</scroll-view>
-			</view>
-		</view>
-	</mobile-frame>
-</template>
-
-<script>
-	export default {
-		data() {
-			return {
-				oneUrl:'',
-				list: [ //
-					{
-						url: '',
-						name: '商品名称',
-						money: 100,
-					},
-				]
-			};
-		},
-		onShow: function() {},
-		methods: {
-			// 分页
-			toPage() {}
-		}
-	}
-</script>
-
-<style lang="scss">
-	.main {
-		display: flex;
-		flex-direction: column;
-		width: 96vw;
-		height: 97.5vh;
-		padding: 2vw;
-		background-color: #268E56;
-
-		.one {
-			margin: 0 0 2vw 0;
-
-			.image {
-				width: 100%;
-				height: 50vw;
-			}
-		}
-
-		.two {
-			position: relative;
-			flex-grow: 1;
-
-			.list {
-				margin: 0 2vw 2vw 0;
-				background-color: var(--fffColor);
-				padding: 2vw;
-				width: 43vw;
-				border-radius: 5px;
-
-				.image {
-					width: 100%;
-					height: 49vw;
-					margin: 0 0 1vw 0;
-				}
-
-				.name {
-					font-size: var(--font15Size);
-					margin: 0 0 2vw 0;
-				}
-
-				.other {
-					display: flex;
-					flex-direction: row;
-					justify-content: space-between;
-
-					.money {
-						color: var(--ff0Color);
-
-						text:nth-child(1) {
-							font-size: var(--font12Size);
-						}
-					}
-
-					.btn {
-						button {
-							border-radius: 25px;
-							color: var(--fffColor);
-							background-color: var(--ff0Color);
-							font-size: var(--font12Size);
-						}
-					}
-				}
-			}
-
-			.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: row;
-			flex-wrap: wrap;
-		}
-	}
-</style>

+ 1 - 15
pagesHome/shop/index.vue

@@ -109,13 +109,6 @@
 							<view class="txt">
 								店铺二维码
 							</view>
-							<!-- <view class="qrcode_1_1">
-								<uqrcode ref="uqrcode" canvas-id="qrcode" :value="uqrcodeInfo" :options="{ margin:10 }">
-								</uqrcode>
-								<view class="txt">
-									店铺二维码
-								</view>
-							</view> -->
 						</view>
 					</view>
 					<view class="collect">
@@ -219,18 +212,11 @@
 			if (e && e.id) id = e.id;
 			else id = decodeURIComponent(e.q).split('id=')[1];
 			that.$set(that, `id`, id);
+			that.searchConfig();
 			await that.watchLogin();
 			await that.search();
 			await that.searchOther();
 		},
-		onShow: function() {
-			const that = this;
-			that.searchConfig();
-		},
-        onHide: function() {
-			const that = this;
-			that.clearPage();
-		},
 		methods: {
 			// 查询基本设置
 			searchConfig() {

+ 0 - 3
pagesMy/account/bindEmail.vue

@@ -51,9 +51,6 @@
 			};
 		},
 		onLoad: function() {
-
-		},
-		onShow: function() {
 			const that = this;
 			that.watchLogin();
 		},

+ 1 - 1
pagesMy/account/bindPhone.vue

@@ -51,7 +51,7 @@
 				time_count: 0
 			};
 		},
-		onShow: function() {
+		onLoad: function() {
 			const that = this;
 			that.watchLogin();
 		},

+ 0 - 1
pagesMy/account/upBasic.vue

@@ -81,7 +81,6 @@
 			const that = this;
 			that.watchLogin();
 		},
-		onShow: function() {},
 		methods: {
 			watchLogin() {
 				const that = this;

+ 0 - 1
pagesMy/account/upPassword.vue

@@ -45,7 +45,6 @@
 			const that = this;
 			that.watchLogin();
 		},
-		onShow: function() {},
 		methods: {
 			watchLogin() {
 				const that = this;

+ 4 - 7
pagesMy/address/index.vue

@@ -66,16 +66,12 @@
 				scrollTop: 0,
 			};
 		},
-		onShow: function() {
+		onLoad: function() {
 			const that = this;
 			that.searchConfig();
 			that.watchLogin();
 
 		},
-    onHide: function() {
-			const that = this;
-			that.clearPage();
-		},
 		methods: {
 			// 查询基本设置
 			searchConfig() {
@@ -181,6 +177,7 @@
 											icon: 'none'
 										})
 										that.clearPage();
+										that.search();
 									} else {
 										uni.showToast({
 											title: arr.errmsg,
@@ -189,8 +186,8 @@
 									}
 								},
 								fail: function(err) {
-									console.log(err);
-									that.clearPage()
+									that.clearPage();
+									that.search();
 								}
 							})
 						}

+ 52 - 22
pagesMy/collection/market.vue

@@ -5,30 +5,26 @@
 				<input type="text" v-model="searchInfo.name" @blur="toInput" placeholder="搜索商品名称">
 			</view>
 			<view class="two">
-				<scroll-view scroll-y="true" class="scroll-view" @scrolltolower="toPage">
+				<scroll-view scroll-y="true" class="scroll-view" @scrolltolower="toPage" @scroll="toScroll">
 					<view class="list-scroll-view">
 						<view class="two_1">
-							<view :class="['list',condActive==index?'activeList':'']" v-for="(item,index) in condList"
-								:key="index" @tap="toCond(index,item)">
+							<view :class="['list',condActive==index?'activeList':'']" v-for="(item,index) in condList" :key="index" @tap="toCond(index,item)">
 								<view class="name" v-if="index!=4">
 									{{item.name}}
 								</view>
 								<view v-if="index==4" class="icon4">
 									<view class="icon_1">
-										<text :class="['iconfont',item.shangActive]"
-											v-if="condActive==index&&shang=='1'"></text>
+										<text :class="['iconfont',item.shangActive]" v-if="condActive==index&&shang=='1'"></text>
 										<text :class="['iconfont',item.shang]" v-else></text>
 									</view>
 								</view>
 								<view v-else class="icon">
 									<view class="icon_1">
-										<text :class="['iconfont',item.shangActive]"
-											v-if="condActive==index&&shang=='1'"></text>
+										<text :class="['iconfont',item.shangActive]" v-if="condActive==index&&shang=='1'"></text>
 										<text :class="['iconfont',item.shang]" v-else></text>
 									</view>
 									<view class="icon_1">
-										<text :class="['iconfont', item.xiaActive]"
-											v-if="condActive==index&&xia=='-1'"></text>
+										<text :class="['iconfont', item.xiaActive]" v-if="condActive==index&&xia=='-1'"></text>
 										<text :class="['iconfont', item.xia]" v-else></text>
 									</view>
 								</view>
@@ -38,7 +34,7 @@
 							<view class="list" v-for="(item, index) in list" :key="index" @tap="toView(item)">
 								<image class="image" :src="item.file&&item.file.length>0?item.file[0].url:''" mode="">
 								</image>
-								<view class="name">
+								<view class="name textOver">
 									{{item.name||'暂无'}}
 								</view>
 								<view class="money">
@@ -78,6 +74,9 @@
 								</view>
 							</view>
 						</view>
+						<view class="is_bottom" v-if="is_bottom">
+							<text>{{config.bottom_title}}</text>
+						</view>
 					</view>
 				</scroll-view>
 			</view>
@@ -89,6 +88,8 @@
 	export default {
 		data() {
 			return {
+				// 系统设置
+				config: {},
 				searchInfo: {},
 				user: {},
 				list: [],
@@ -130,17 +131,30 @@
 					}
 				],
 				type: 'gongge',
+				// 数据是否触底
+				is_bottom: false,
+				scrollTop: 0
 			};
 		},
-		onShow: function() {
+		onLoad: function() {
 			const that = this;
+			that.searchConfig();
 			that.watchLogin()
 		},
-    onHide: function() {
-			const that = this;
-			that.clearPage();
-		},
 		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);
+					}
+				})
+			},
 			// 输入框
 			toInput(e) {
 				const that = this;
@@ -148,10 +162,9 @@
 				that.clearPage();
 				that.search();
 			},
-			// 详细信息
+			// 购买
 			toView(e) {
 				const that = this;
-				that.clearPage();
 				uni.navigateTo({
 					url: `/pagesHome/order/detail?id=${e._id}`
 				})
@@ -267,7 +280,7 @@
 				}
 			},
 			// 分页
-			toPage(e) {
+			toPage() {
 				const that = this;
 				let list = that.list;
 				let limit = that.limit;
@@ -282,9 +295,15 @@
 					that.$set(that, `skip`, skip)
 					that.search();
 					uni.hideLoading();
-				} else uni.showToast({
-					title: '没有更多数据了'
-				});
+
+				} 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);
 			},
 			// 清空列表
 			clearPage() {
@@ -480,10 +499,21 @@
 		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>

+ 50 - 22
pagesMy/collection/shop.vue

@@ -5,30 +5,26 @@
 				<input type="text" v-model="searchInfo.name" @blur="toInput" placeholder="搜索店铺名称">
 			</view>
 			<view class="two">
-				<scroll-view scroll-y="true" class="scroll-view" @scrolltolower="toPage">
+				<scroll-view scroll-y="true" class="scroll-view" @scrolltolower="toPage" @scroll="toScroll">
 					<view class="list-scroll-view">
 						<view class="two_1">
-							<view :class="['list',condActive==index?'activeList':'']" v-for="(item,index) in condList"
-								:key="index" @tap="toCond(index,item)">
+							<view :class="['list',condActive==index?'activeList':'']" v-for="(item,index) in condList" :key="index" @tap="toCond(index,item)">
 								<view class="name" v-if="index!=2">
 									{{item.name}}
 								</view>
 								<view v-if="index==2" class="icon4">
 									<view class="icon_1">
-										<text :class="['iconfont',item.shangActive]"
-											v-if="condActive==index&&shang=='1'"></text>
+										<text :class="['iconfont',item.shangActive]" v-if="condActive==index&&shang=='1'"></text>
 										<text :class="['iconfont',item.shang]" v-else></text>
 									</view>
 								</view>
 								<view v-else class="icon">
 									<view class="icon_1">
-										<text :class="['iconfont',item.shangActive]"
-											v-if="condActive==index&&shang=='1'"></text>
+										<text :class="['iconfont',item.shangActive]" v-if="condActive==index&&shang=='1'"></text>
 										<text :class="['iconfont',item.shang]" v-else></text>
 									</view>
 									<view class="icon_1">
-										<text :class="['iconfont', item.xiaActive]"
-											v-if="condActive==index&&xia=='-1'"></text>
+										<text :class="['iconfont', item.xiaActive]" v-if="condActive==index&&xia=='-1'"></text>
 										<text :class="['iconfont', item.xia]" v-else></text>
 									</view>
 								</view>
@@ -36,8 +32,7 @@
 						</view>
 						<view class="two_2" v-if="type=='list'">
 							<view class="list" v-for="(item, index) in list" :key="index" @tap="toView(item)">
-								<image class="image"
-									:src="item.logo&&item.logo.length>0?item.logo[0].url:''" mode="">
+								<image class="image" :src="item.logo&&item.logo.length>0?item.logo[0].url:''" mode="">
 								</image>
 								<view class="other">
 									<view class="name">{{item.name}}</view>
@@ -55,8 +50,7 @@
 						</view>
 						<view class="two_3" v-else>
 							<view class="list" v-for="(item, index) in list" :key="index" @tap="toView(item)">
-								<image class="image"
-									:src="item.logo&&item.logo.length>0?item.logo[0].url:''" mode="">
+								<image class="image" :src="item.logo&&item.logo.length>0?item.logo[0].url:''" mode="">
 								</image>
 								<view class="name">
 									{{item.name||'暂无'}}
@@ -74,6 +68,9 @@
 								</view>
 							</view>
 						</view>
+						<view class="is_bottom" v-if="is_bottom">
+							<text>{{config.bottom_title}}</text>
+						</view>
 					</view>
 				</scroll-view>
 			</view>
@@ -85,6 +82,8 @@
 	export default {
 		data() {
 			return {
+				// 系统设置
+				config: {},
 				searchInfo: {},
 				user: {},
 				list: [],
@@ -112,17 +111,30 @@
 					}
 				],
 				type: 'list',
+				// 数据是否触底
+				is_bottom: false,
+				scrollTop: 0
 			};
 		},
-		onShow: function() {
+		onLoad: function() {
 			const that = this;
+			that.searchConfig();
 			that.watchLogin()
 		},
-        onHide: function() {
-			const that = this;
-			that.clearPage();
-		},
 		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);
+					}
+				})
+			},
 			// 输入框
 			toInput(e) {
 				const that = this;
@@ -221,14 +233,19 @@
 					that.$set(that, `skip`, skip)
 					that.search();
 					uni.hideLoading();
-				} else uni.showToast({
-					title: '没有更多数据了'
-				});
+
+				} 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);
 			},
 			// 详细信息
 			toView(e) {
 				const that = this;
-				that.clearPage();
 				uni.navigateTo({
 					url: `/pagesHome/shop/index?id=${e._id}`
 				})
@@ -442,4 +459,15 @@
 			flex-wrap: wrap;
 		}
 	}
+
+	.is_bottom {
+		text-align: center;
+
+		text {
+			padding: 2vw 0;
+			display: inline-block;
+			color: #858585;
+			font-size: 14px;
+		}
+	}
 </style>

+ 5 - 7
pagesMy/discount/index.vue

@@ -4,7 +4,7 @@
 			<view class="one">
 				<scroll-view scroll-y="true" class="scroll-view" @scrolltolower="toPage" @scroll="toScroll">
 					<view class="list-scroll-view">
-						<discount :Style="Style" :couponList="list"></discount>
+						<discount :Style="Style" :couponList="list" :total="total"></discount>
 						<view class="is_bottom" v-if="is_bottom">
 							<text>{{config.bottom_title}}</text>
 						</view>
@@ -45,10 +45,6 @@
 			// 监听用户是否登录
 			that.watchLogin();
 		},
-        onHide: function() {
-			const that = this;
-			that.clearPage();
-		},
 		methods: {
 			// 查询基本设置
 			searchConfig() {
@@ -70,8 +66,10 @@
 					key: 'token',
 					success: function(res) {
 						let user = that.$jwt(res.data);
-						if (user) that.$set(that, `user`, user);
-						that.search();
+						if (user) {
+							that.$set(that, `user`, user);
+							that.search();
+						}
 					},
 					fail: function(err) {
 						uni.navigateTo({

+ 4 - 12
pagesMy/dough/index.vue

@@ -11,8 +11,7 @@
 							<view class="list-scroll-view">
 								<view class="list" v-for="(item, index) in list" :key="index" @click="toShare(item)">
 									<view class="image">
-										<image class="file" v-for="(tag, indexs) in item.persons.slice(0,9)"
-											:key="indexs" :src="tag.icon&&tag.icon.length>0?tag.icon[0].url:''" mode="">
+										<image class="file" v-for="(tag, indexs) in item.persons.slice(0,9)" :key="indexs" :src="tag.icon&&tag.icon.length>0?tag.icon[0].url:''" mode="">
 										</image>
 									</view>
 									<view class="list_1">
@@ -100,10 +99,6 @@
 			const that = this;
 			that.watchLogin()
 		},
-        onHide: function() {
-			const that = this;
-			that.clearPage();
-		},
 		methods: {
 			// 输入框
 			toInput(e) {
@@ -202,10 +197,7 @@
 					that.$set(that, `skip`, skip)
 					that.search();
 					uni.hideLoading();
-				} else uni.showToast({
-					title: '没有更多数据了',
-					icon: 'none'
-				});
+				} else {}
 			},
 			// 清空列表
 			clearPage() {
@@ -328,17 +320,17 @@
 			}
 		}
 	}
+
 	.scroll-view {
 		position: absolute;
 		top: 0;
 		left: 0;
 		right: 0;
 		bottom: 0;
-	
+
 		.list-scroll-view {
 			display: flex;
 			flex-direction: column;
 		}
 	}
-	
 </style>

+ 1 - 2
pagesMy/logistics/index.vue

@@ -38,10 +38,9 @@
 		},
 		onLoad: function(e) {
 			const that = this;
-			that.$set(that, `id`, e.id || '6343b53f21b24c75ad8dbf7a');
+			that.$set(that, `id`, e.id || '');
 			that.watchLogin()
 		},
-		onShow: function() {},
 		methods: {
 			watchLogin() {
 				const that = this;

+ 1 - 6
pagesMy/order/after.vue

@@ -111,19 +111,14 @@
 				scrollTop: 0,
 			};
 		},
-		onShow: async function() {
+		onLoad: async function() {
 			const that = this;
 			that.searchConfig();
-			that.clearPage();
 			// 查询其他信息
 			await that.searchOther();
 			// 监听用户登录
 			await that.watchLogin();
 		},
-        onHide: function() {
-			const that = this;
-			that.clearPage();
-		},
 		methods: {
 			// 查询基本设置
 			searchConfig() {

+ 1 - 10
pagesMy/order/index.vue

@@ -180,19 +180,10 @@
 		onLoad: function(e) {
 			const that = this;
 			that.$set(that, `status`, e.status);
+			that.searchConfig();
 			// 监听用户是否登录
 			that.watchLogin();
 		},
-		onShow: function() {
-			const that = this;
-			that.searchConfig();
-			that.clearPage();
-			that.search();
-		},
-        onHide: function() {
-			const that = this;
-			that.clearPage();
-		},
 		methods: {
 			// 查询基本设置
 			searchConfig() {

+ 1 - 9
pagesRest/activity/info.vue

@@ -54,20 +54,13 @@
 				scrollTop: 0,
 			};
 		},
-		onLoad: function(e) {
+		onLoad: async function(e) {
 			const that = this;
 			that.$set(that, `id`, e.id || '634fa595e4ed552882f05a6f');
-		},
-		onShow: async function() {
-			const that = this;
 			that.searchConfig();
 			await that.searchAct();
 			await that.configShare();
 		},
-        onHide: function() {
-			const that = this;
-			that.clearPage();
-		},
 		methods: {
 			// 查询基本设置
 			searchConfig() {
@@ -140,7 +133,6 @@
 			// 购买
 			toBuy(e) {
 				const that = this;
-				that.clearPage();
 				uni.navigateTo({
 					url: `/pagesHome/order/detail?id=${e.goods._id}`
 				})

+ 1 - 7
pagesRest/activity/list.vue

@@ -46,16 +46,11 @@
 				scrollTop: 0,
 			};
 		},
-		onLoad: function(e) {},
-		onShow: function() {
+		onLoad: function() {
 			const that = this;
 			that.searchConfig();
 			that.search();
 		},
-        onHide: function() {
-			const that = this;
-			that.clearPage();
-		},
 		methods: {
 			// 查询基本设置
 			searchConfig() {
@@ -129,7 +124,6 @@
 			},
 			toInfo(e) {
 				const that = this;
-				that.clearPage();
 				uni.navigateTo({
 					url: `/pagesRest/activity/info?id=${e._id}`
 				})

+ 0 - 3
pagesRest/article/index.vue

@@ -20,9 +20,6 @@
 		onLoad: function(e) {
 			const that = this;
 			that.$set(that, `id`, e.id || "");
-		},
-		onShow: function() {
-			const that = this;
 			that.search();
 		},
 		methods: {

+ 0 - 3
pagesRest/recom/index.vue

@@ -48,9 +48,6 @@
 				that.$set(that, `type`, '2')
 				that.$set(that, `act_tags`, e.act_tags || '');
 			}
-		},
-		onShow: function() {
-			const that = this;
 			that.searchConfig();
 			that.searchOther();
 			that.search();