zs пре 1 година
родитељ
комит
929f447f6c
3 измењених фајлова са 709 додато и 667 уклоњено
  1. 17 3
      pagesHome/market/search.vue
  2. 436 421
      pagesHome/market/type.vue
  3. 256 243
      pagesIntegral/home/index.vue

+ 17 - 3
pagesHome/market/search.vue

@@ -84,7 +84,9 @@
 <script>
 	export default {
 		data() {
-			return {
+			return {
+				// 店铺id
+				shop: '',
 				// 系统设置
 				config: {},
 				tags: '',
@@ -116,7 +118,7 @@
 			that.$set(that, `pid`, e.pid || '');
 			that.searchConfig();
 			await that.searchOther();
-			await that.search();
+			await that.searchShop();
 		},
 		onPullDownRefresh: async function() {
 			const that = this;
@@ -172,7 +174,8 @@
 				let info = {
 					skip: that.skip,
 					limit: that.limit,
-					tags: that.tags
+					tags: that.tags,
+					// shop: that.shop
 				}
 				const res = await that.$api(`/viewGoods/indexGoodsList`, `GET`, {
 					...info,
@@ -261,6 +264,17 @@
 				uni.navigateTo({
 					url: `/pagesHome/order/detail?id=${e.id||e._id}`
 				})
+			},
+			// 店铺信息
+			searchShop() {
+				const that = this;
+				uni.getStorage({
+					key: 'shop',
+					success: async function(res) {
+						that.$set(that, `shop`, res.data);
+						await that.search();
+					}
+				})
 			},
 			// 清空列表
 			clearPage() {

+ 436 - 421
pagesHome/market/type.vue

@@ -1,421 +1,436 @@
-<template>
-	<mobile-frame>
-		<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>
-								</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 {
-				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.searchMarket();
-			},
-			// 清空列表
-			clearPage() {
-				const that = this;
-				that.$set(that, `marketList`, []);
-				that.$set(that, `skip`, 0)
-				that.$set(that, `limit`, 6)
-				that.$set(that, `page`, 0)
-			},
-			// 清空总列表
-			clearPages() {
-				const that = this;
-				that.$set(that, `typeList`, [])
-				that.$set(that, `marketList`, [])
-				that.$set(that, `list`, [])
-				that.$set(that, `skip`, 0)
-				that.$set(that, `limit`, 6)
-				that.$set(that, `page`, 0)
-				that.$set(that, `active`, 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}`
-				})
-			}
-		}
-	}
-</script>
-
-<style lang="scss">
-	.main {
-		display: flex;
-		flex-direction: column;
-		width: 100vw;
-		height: 100vh;
-
-		.one {
-			border-bottom: 1px solid var(--f85Color);
-			padding: 2vw;
-
-			input {
-				padding: 2vw;
-				background-color: var(--f1Color);
-				font-size: var(--font14Size);
-				border-radius: 5px;
-			}
-		}
-
-		.two {
-			height: 91vh;
-			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: 19vw;
-
-							.image {
-								width: 19vw;
-								height: 12vh;
-								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: var(--f85Color);
-								margin: 0 0 1vw 0;
-							}
-
-							.money {
-								font-size: var(--font14Size);
-								color: var(--fFB1Color);
-								margin: 0 0 1vw 0;
-							}
-
-							.other {
-								display: flex;
-
-								.act {
-									font-size: 12px;
-									color: #FFA500;
-									border: 1px solid #FFA500;
-									border-radius: 5px;
-									padding: 0 1vw;
-									margin: 0 1vw 0 0;
-								}
-							}
-						}
-					}
-				}
-			}
-		}
-	}
-
-	.is_bottom {
-		text-align: center;
-
-		text {
-			padding: 2vw 0;
-			display: inline-block;
-			color: #858585;
-			font-size: 14px;
-		}
-	}
-
-	.scroll-view {
-		position: absolute;
-		top: 0;
-		left: 0;
-		right: 0;
-		bottom: 0;
-
-		.list-scroll-view {
-			display: flex;
-			flex-direction: column;
-		}
-	}
-</style>
+<template>
+	<mobile-frame>
+		<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>
+								</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: "",
+				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.searchShop();
+		},
+		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 = {};
+				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.searchMarket();
+			},
+			// 清空列表
+			clearPage() {
+				const that = this;
+				that.$set(that, `marketList`, []);
+				that.$set(that, `skip`, 0)
+				that.$set(that, `limit`, 6)
+				that.$set(that, `page`, 0)
+			},
+			// 清空总列表
+			clearPages() {
+				const that = this;
+				that.$set(that, `typeList`, [])
+				that.$set(that, `marketList`, [])
+				that.$set(that, `list`, [])
+				that.$set(that, `skip`, 0)
+				that.$set(that, `limit`, 6)
+				that.$set(that, `page`, 0)
+				that.$set(that, `active`, 0)
+			},
+			// 搜索商品
+			toCommon(e) {
+				const that = this;
+				uni.navigateTo({
+					url: `/${e}`
+				})
+			},
+			// 店铺信息
+			searchShop() {
+				const that = this;
+				uni.getStorage({
+					key: 'shop',
+					success: async function(res) {
+						that.$set(that, `shop`, res.data);
+						await that.search();
+					}
+				})
+			},
+			// 购买
+			toBuy(e) {
+				const that = this;
+				uni.navigateTo({
+					url: `/pagesHome/order/detail?id=${e.id||e._id}`
+				})
+			}
+		}
+	}
+</script>
+
+<style lang="scss">
+	.main {
+		display: flex;
+		flex-direction: column;
+		width: 100vw;
+		height: 100vh;
+
+		.one {
+			border-bottom: 1px solid var(--f85Color);
+			padding: 2vw;
+
+			input {
+				padding: 2vw;
+				background-color: var(--f1Color);
+				font-size: var(--font14Size);
+				border-radius: 5px;
+			}
+		}
+
+		.two {
+			height: 91vh;
+			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: 19vw;
+
+							.image {
+								width: 19vw;
+								height: 12vh;
+								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: var(--f85Color);
+								margin: 0 0 1vw 0;
+							}
+
+							.money {
+								font-size: var(--font14Size);
+								color: var(--fFB1Color);
+								margin: 0 0 1vw 0;
+							}
+
+							.other {
+								display: flex;
+
+								.act {
+									font-size: 12px;
+									color: #FFA500;
+									border: 1px solid #FFA500;
+									border-radius: 5px;
+									padding: 0 1vw;
+									margin: 0 1vw 0 0;
+								}
+							}
+						}
+					}
+				}
+			}
+		}
+	}
+
+	.is_bottom {
+		text-align: center;
+
+		text {
+			padding: 2vw 0;
+			display: inline-block;
+			color: #858585;
+			font-size: 14px;
+		}
+	}
+
+	.scroll-view {
+		position: absolute;
+		top: 0;
+		left: 0;
+		right: 0;
+		bottom: 0;
+
+		.list-scroll-view {
+			display: flex;
+			flex-direction: column;
+		}
+	}
+</style>

+ 256 - 243
pagesIntegral/home/index.vue

@@ -1,243 +1,256 @@
-<template>
-	<mobile-frame>
-		<view class="main">
-			<view class="one">
-				<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="toScroll">
-					<view class="list-scroll-view">
-						<view class="two_1">
-							<view class="list" v-for="(item,index) in list" :key="index">
-								<image class="image" :src="item.file&&item.file.length>0?item.file[0].url:''" mode="">
-								</image>
-								<view class="name textOver">
-									{{item.name}}
-								</view>
-								<view class="other">
-									<view class="money">
-										<text>{{item.cost}}</text>
-									</view>
-									<view class="btn">
-										<button type="default" size="mini" @click="toBuy(item)">兑换</button>
-									</view>
-								</view>
-							</view>
-						</view>
-					</view>
-				</scroll-view>
-			</view>
-			<view class="is_bottom" v-if="is_bottom">
-				<text>{{config.bottom_title}}</text>
-			</view>
-		</view>
-	</mobile-frame>
-</template>
-
-<script>
-	export default {
-		data() {
-			return {
-				// 系统设置
-				config: {},
-				searchInfo: {},
-				list: [],
-				total: 0,
-				page: 0,
-				skip: 0,
-				limit: 10,
-				// 数据是否触底
-				is_bottom: false,
-				scrollTop: 0
-			};
-		},
-		onLoad: async function(e) {
-			const that = this;
-			that.searchConfig();
-			await that.search();
-		},
-		onPullDownRefresh: async function() {
-			const that = this;
-			that.clearPage();
-			await that.search();
-			uni.stopPullDownRefresh();
-		},
-		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 search() {
-				const that = this;
-				let info = {
-					skip: that.skip,
-					limit: that.limit,
-				}
-				const res = await that.$api(`/zrGoods`, `GET`, {
-					...info,
-					...that.searchInfo
-				}, `integral`)
-				if (res.errcode == '0') {
-					let list = [...that.list, ...res.data]
-					that.$set(that, `list`, list)
-					that.$set(that, `total`, res.total)
-				} else {
-					uni.showToast({
-						title: res.errmsg,
-					});
-				}
-			},
-			// 分页
-			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);
-			},
-			// 输入框
-			toInput(e) {
-				const that = this;
-				if (e.detail.value) that.$set(that.searchInfo, `name`, e.detail.value);
-				that.clearPage();
-				that.search();
-			},
-			toBuy(e) {
-				uni.navigateTo({
-					url: `/pagesIntegral/order/detail?id=${e._id}`
-				})
-			},
-			// 清空列表
-			clearPage() {
-				const that = this;
-				that.$set(that, `list`, [])
-				that.$set(that, `skip`, 0)
-				that.$set(that, `limit`, 6)
-				that.$set(that, `page`, 0)
-			}
-		}
-
-	}
-</script>
-
-<style lang="scss">
-	.main {
-		display: flex;
-		flex-direction: column;
-		width: 100vw;
-		height: 100vh;
-
-		.one {
-			border-bottom: 1px solid var(--f85Color);
-			padding: 2vw;
-
-			input {
-				padding: 2vw;
-				background-color: var(--f1Color);
-				font-size: var(--font14Size);
-				border-radius: 5px;
-			}
-		}
-
-		.two {
-			position: relative;
-			flex-grow: 1;
-
-			.two_1 {
-				display: flex;
-				justify-content: space-between;
-				flex-wrap: wrap;
-
-				.list {
-					width: 43vw;
-					background: #fff;
-					padding: 2vw;
-					border-radius: 5px;
-					margin: 2vw 1vw 0 1vw;
-					border: 1px solid var(--f1Color);
-
-
-					.image {
-						width: 100%;
-						height: 43vw;
-					}
-
-					.name {
-						font-size: var(--font15Size);
-						margin: 0 0 2vw 0;
-					}
-
-					.other {
-						display: flex;
-						flex-direction: row;
-						justify-content: space-between;
-
-						.money {
-							color: var(--fFB1Color);
-						}
-
-						.btn {
-							button {
-								border-radius: 25px;
-								color: var(--fffColor);
-								background-color: #6A5ACD;
-								font-size: var(--font12Size);
-							}
-						}
-					}
-				}
-			}
-		}
-	}
-
-	.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>
+		<view class="main">
+			<view class="one">
+				<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="toScroll">
+					<view class="list-scroll-view">
+						<view class="two_1">
+							<view class="list" v-for="(item,index) in list" :key="index">
+								<image class="image" :src="item.file&&item.file.length>0?item.file[0].url:''" mode="">
+								</image>
+								<view class="name textOver">
+									{{item.name}}
+								</view>
+								<view class="other">
+									<view class="money">
+										<text>{{item.cost}}</text>
+									</view>
+									<view class="btn">
+										<button type="default" size="mini" @click="toBuy(item)">兑换</button>
+									</view>
+								</view>
+							</view>
+						</view>
+					</view>
+				</scroll-view>
+			</view>
+			<view class="is_bottom" v-if="is_bottom">
+				<text>{{config.bottom_title}}</text>
+			</view>
+		</view>
+	</mobile-frame>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				// 店铺id
+				shop: "",
+				// 系统设置
+				config: {},
+				searchInfo: {},
+				list: [],
+				total: 0,
+				page: 0,
+				skip: 0,
+				limit: 10,
+				// 数据是否触底
+				is_bottom: false,
+				scrollTop: 0
+			};
+		},
+		onLoad: async function(e) {
+			const that = this;
+			that.searchConfig();
+			await that.searchShop();
+		},
+		onPullDownRefresh: async function() {
+			const that = this;
+			that.clearPage();
+			await that.search();
+			uni.stopPullDownRefresh();
+		},
+		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 search() {
+				const that = this;
+				let info = {
+					skip: that.skip,
+					limit: that.limit,
+					shop: that.shop
+				}
+				const res = await that.$api(`/zrGoods`, `GET`, {
+					...info,
+					...that.searchInfo
+				}, `integral`)
+				if (res.errcode == '0') {
+					let list = [...that.list, ...res.data]
+					that.$set(that, `list`, list)
+					that.$set(that, `total`, res.total)
+				} else {
+					uni.showToast({
+						title: res.errmsg,
+					});
+				}
+			},
+			// 分页
+			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);
+			},
+			// 输入框
+			toInput(e) {
+				const that = this;
+				if (e.detail.value) that.$set(that.searchInfo, `name`, e.detail.value);
+				that.clearPage();
+				that.search();
+			},
+			toBuy(e) {
+				uni.navigateTo({
+					url: `/pagesIntegral/order/detail?id=${e._id}`
+				})
+			},
+			// 清空列表
+			clearPage() {
+				const that = this;
+				that.$set(that, `list`, [])
+				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>
+
+<style lang="scss">
+	.main {
+		display: flex;
+		flex-direction: column;
+		width: 100vw;
+		height: 100vh;
+
+		.one {
+			border-bottom: 1px solid var(--f85Color);
+			padding: 2vw;
+
+			input {
+				padding: 2vw;
+				background-color: var(--f1Color);
+				font-size: var(--font14Size);
+				border-radius: 5px;
+			}
+		}
+
+		.two {
+			position: relative;
+			flex-grow: 1;
+
+			.two_1 {
+				display: flex;
+				justify-content: space-between;
+				flex-wrap: wrap;
+
+				.list {
+					width: 43vw;
+					background: #fff;
+					padding: 2vw;
+					border-radius: 5px;
+					margin: 2vw 1vw 0 1vw;
+					border: 1px solid var(--f1Color);
+
+
+					.image {
+						width: 100%;
+						height: 43vw;
+					}
+
+					.name {
+						font-size: var(--font15Size);
+						margin: 0 0 2vw 0;
+					}
+
+					.other {
+						display: flex;
+						flex-direction: row;
+						justify-content: space-between;
+
+						.money {
+							color: var(--fFB1Color);
+						}
+
+						.btn {
+							button {
+								border-radius: 25px;
+								color: var(--fffColor);
+								background-color: #6A5ACD;
+								font-size: var(--font12Size);
+							}
+						}
+					}
+				}
+			}
+		}
+	}
+
+	.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>