xuhaolan %!s(int64=3) %!d(string=hai) anos
pai
achega
470ddf9612
Modificáronse 75 ficheiros con 2135 adicións e 1814 borrados
  1. 8 0
      api/index.js
  2. 2 2
      manifest.json
  3. 8 12
      pages.json
  4. 456 454
      pages/cart/cart.vue
  5. 774 759
      pages/index/index.vue
  6. 133 123
      pages/index/sign.vue
  7. 0 187
      pages/index/sign1.vue
  8. 2 1
      pages/money/pay.vue
  9. 4 4
      pages/money/wallet.vue
  10. 49 12
      pages/order/createOrder.vue
  11. 230 22
      pages/product/list.vue
  12. 10 1
      pages/product/product.vue
  13. 1 1
      pages/set/phone.vue
  14. 262 0
      pages/shoping/list.vue
  15. 114 38
      pages/user/award.vue
  16. 55 192
      pages/user/team.vue
  17. 26 5
      pages/user/user.vue
  18. BIN=BIN
      static/img/index-fanl.png
  19. BIN=BIN
      static/img/libao-bg.png
  20. BIN=BIN
      static/img/promotion-bg.png
  21. BIN=BIN
      unpackage/dist/build/h5/3-23-1.rar
  22. 1 1
      unpackage/dist/build/h5/index.html
  23. BIN=BIN
      unpackage/dist/build/h5/static/icon/add.png
  24. BIN=BIN
      unpackage/dist/build/h5/static/icon/reduce.png
  25. BIN=BIN
      unpackage/dist/build/h5/static/img/index-fanl.d7d117e9.png
  26. BIN=BIN
      unpackage/dist/build/h5/static/img/index-fanl.png
  27. BIN=BIN
      unpackage/dist/build/h5/static/img/libao-bg.8e39b7cb.png
  28. BIN=BIN
      unpackage/dist/build/h5/static/img/libao-bg.png
  29. BIN=BIN
      unpackage/dist/build/h5/static/img/promotion-bg.070522fd.png
  30. BIN=BIN
      unpackage/dist/build/h5/static/img/promotion-bg.png
  31. 0 0
      unpackage/dist/build/h5/static/js/chunk-vendors.0c0314dc.js
  32. 0 0
      unpackage/dist/build/h5/static/js/chunk-vendors.b8929d0c.js
  33. 0 0
      unpackage/dist/build/h5/static/js/index.426f14e0.js
  34. 0 0
      unpackage/dist/build/h5/static/js/index.74c92c56.js
  35. 0 0
      unpackage/dist/build/h5/static/js/pages-cart-cart.75a11be0.js
  36. 0 0
      unpackage/dist/build/h5/static/js/pages-cart-cart.bbfdd30d.js
  37. 0 0
      unpackage/dist/build/h5/static/js/pages-category-category.b2f6fa8b.js
  38. 0 0
      unpackage/dist/build/h5/static/js/pages-index-index.2b06e6f7.js
  39. 0 0
      unpackage/dist/build/h5/static/js/pages-index-index.84e366e6.js
  40. 0 0
      unpackage/dist/build/h5/static/js/pages-index-sign.3f578c44.js
  41. 0 0
      unpackage/dist/build/h5/static/js/pages-index-sign.58a943ea.js
  42. 0 0
      unpackage/dist/build/h5/static/js/pages-index-sign1.1ba24fd5.js
  43. 0 0
      unpackage/dist/build/h5/static/js/pages-money-account.baea62db.js
  44. 0 0
      unpackage/dist/build/h5/static/js/pages-money-pay.25cecbf3.js
  45. 0 0
      unpackage/dist/build/h5/static/js/pages-money-pay.3e8ff275.js
  46. 0 0
      unpackage/dist/build/h5/static/js/pages-money-wallet.02c6ccab.js
  47. 0 0
      unpackage/dist/build/h5/static/js/pages-money-wallet.ec280623.js
  48. 0 0
      unpackage/dist/build/h5/static/js/pages-money-withdrawal.f411d668.js
  49. 0 0
      unpackage/dist/build/h5/static/js/pages-order-createOrder.3a58f5c1.js
  50. 0 0
      unpackage/dist/build/h5/static/js/pages-order-createOrder.eaa4e318.js
  51. 0 0
      unpackage/dist/build/h5/static/js/pages-order-order.5c6743f1.js
  52. 0 0
      unpackage/dist/build/h5/static/js/pages-order-orderDetail.7794dbdc.js
  53. 0 0
      unpackage/dist/build/h5/static/js/pages-order-orderRefund.b26d88d4.js
  54. 0 0
      unpackage/dist/build/h5/static/js/pages-product-groupBooking-productCollage.f271ce78.js
  55. 0 0
      unpackage/dist/build/h5/static/js/pages-product-list.6c9d29f2.js
  56. 0 0
      unpackage/dist/build/h5/static/js/pages-product-list.9a574b82.js
  57. 0 0
      unpackage/dist/build/h5/static/js/pages-product-product.46e390f7.js
  58. 0 0
      unpackage/dist/build/h5/static/js/pages-product-product.b78d78fb.js
  59. 0 0
      unpackage/dist/build/h5/static/js/pages-product-search.1ddc2cc9.js
  60. 0 0
      unpackage/dist/build/h5/static/js/pages-public-wxLogin.53e934d7.js
  61. 0 0
      unpackage/dist/build/h5/static/js/pages-set-address.3d066a2f.js
  62. 0 0
      unpackage/dist/build/h5/static/js/pages-set-addressManage.7c45abb6.js
  63. 0 0
      unpackage/dist/build/h5/static/js/pages-set-password.4e4d6177.js
  64. 0 0
      unpackage/dist/build/h5/static/js/pages-set-phone.07e6fb7e.js
  65. 0 0
      unpackage/dist/build/h5/static/js/pages-set-phone.5ff45121.js
  66. 0 0
      unpackage/dist/build/h5/static/js/pages-set-user.792552e9.js
  67. 0 0
      unpackage/dist/build/h5/static/js/pages-set-userinfo.92920d22.js
  68. 0 0
      unpackage/dist/build/h5/static/js/pages-shoping-list.7b896ad6.js
  69. 0 0
      unpackage/dist/build/h5/static/js/pages-user-award.254940eb.js
  70. 0 0
      unpackage/dist/build/h5/static/js/pages-user-award.9fc81c2f.js
  71. 0 0
      unpackage/dist/build/h5/static/js/pages-user-team.19de7992.js
  72. 0 0
      unpackage/dist/build/h5/static/js/pages-user-team.9e64d60d.js
  73. 0 0
      unpackage/dist/build/h5/static/js/pages-user-user.1de5d54c.js
  74. 0 0
      unpackage/dist/build/h5/static/js/pages-user-user.2f0fd599.js
  75. 0 0
      unpackage/dist/build/h5/static/js/pages-user-withdrawal.b9dc5b88.js

+ 8 - 0
api/index.js

@@ -34,3 +34,11 @@ export function loadIndexs(data) {
 	});
 }
 
+//获取门店列表
+export function store_list(data) {
+	return request({
+		url: '/api/store_list',
+		method: 'get',
+		data
+	});
+}

+ 2 - 2
manifest.json

@@ -73,8 +73,8 @@
         "devServer" : {
             "proxy" : {
                 "/api" : {
-                    "target" : "http://lnpt.frp.liuniu946.com/api",
-                    // "target" : "https://xl.liuniu946.com/api",
+                    // "target" : "http://lnpt.frp.liuniu946.com/api",
+                    "target" : "https://xl.liuniu946.com/api",
                     // "changeOrigin": true,
                     "pathRewrite" : {
                         "/api" : "" // rewrite path

+ 8 - 12
pages.json

@@ -14,22 +14,18 @@
 		{
 			"path": "pages/index/sign",
 			"style": {
-				"navigationBarTitleText": "每日签到",
-				"app-plus": {
-					"titleNView": {
-						"type": "transparent"
-					}
-				}
-			}
-		},
-		{
-			"path": "pages/index/sign1",
-			"style": {
-				"navigationBarTitleText": "每日签到",
+				"navigationBarTitleText": "天天领现金",
 				"app-plus": {
 					"titleNView": false
 				}
 			}
+		},
+		{
+			"path": "pages/shoping/list",
+			"style": {
+				"navigationBarTitleText": "店铺列表"
+				
+			}
 		},
 		{
 			"path": "pages/public/register",

+ 456 - 454
pages/cart/cart.vue

@@ -1,221 +1,224 @@
-<template>
-	<view class="container">
-		<!-- 空白页 -->
-		<view v-if="!hasLogin || empty === true" class="empty">
-			<image src="/static/error/emptyCart.png" class="emptyImg" mode="aspectFit"></image>
-			<view v-if="hasLogin" class="empty-tips">
-				空空如也
-				<navigator class="navigator" v-if="hasLogin" url="../index/index" open-type="switchTab">随便逛逛></navigator>
-			</view>
-			<view v-else class="empty-tips">
-				空空如也
-				<view class="navigator" @click="navToLogin">去登陆></view>
-			</view>
-		</view>
+<template>
+	<view class="container">
+		<!-- 空白页 -->
+		<view v-if="!hasLogin || empty === true" class="empty">
+			<image src="/static/error/emptyCart.png" class="emptyImg" mode="aspectFit"></image>
+			<view v-if="hasLogin" class="empty-tips">
+				空空如也
+				<navigator class="navigator" v-if="hasLogin" url="../index/index" open-type="switchTab">随便逛逛></navigator>
+			</view>
+			<view v-else class="empty-tips">
+				空空如也
+				<view class="navigator" @click="navToLogin">去登陆></view>
+			</view>
+		</view>
 		<view v-else>
 			<!-- 购物车头部 -->
 			<view class="cart-hand flex">
 				<view class="hand-tit">
-					购物车共 <text>{{ ' '+cartList.length}} 件</text>商品
+					购物车共
+					<text>{{ ' ' + cartList.length }} 件</text>
+					商品
 				</view>
-				<view class="hand-btn" @click="clearCart()">
-					清空购物车
-				</view>
-			</view>
-			<!-- 列表 -->
-			<view class="cart-list">
-				<block v-for="(item, index) in cartList" :key="item.id">
-					<view class="cart-item" :class="{ 'b-b': index !== cartList.length - 1 }">
-						<view class="image-wrapper">
-							<image
-								:src="item.productInfo.image"
-								:class="[item.loaded]"
-								mode="aspectFill"
-								lazy-load
-								@load="onImageLoad('cartList', index)"
-								@error="onImageError('cartList', index)"
-							></image>
-							<view class="iconfont iconroundcheckfill checkbox" :class="{ checked: item.checked }" @click="check('item', index)"></view>
-						</view>
-						<view class="item-right">
-							<text class="clamp title">{{ item.productInfo.store_name }}</text>
-							<text class="attr">{{ item.productInfo.attrInfo.suk }}</text>
-							<text class="price">¥{{ item.productInfo.price }}</text>
-							<!-- <uni-number-box
-								class="step"
-								:min="1"
-								:max="item.productInfo.stock"
-								:value="item.cart_num > item.productInfo.stock ? item.productInfo.stock : item.cart_num"
-								:isMax="item.cart_num >= item.productInfo.stock ? true : false"
-								:isMin="item.cart_num === 1"
-								:index="index"
-								@eventChange="numberChange"
+				<view class="hand-btn" @click="clearCart()">清空购物车</view>
+			</view>
+			<!-- 列表 -->
+			<view class="cart-list">
+				<block v-for="(item, index) in cartList" :key="item.id">
+					<view class="cart-item" :class="{ 'b-b': index !== cartList.length - 1 }">
+						<view class="image-wrapper">
+							<image
+								:src="item.productInfo.image"
+								:class="[item.loaded]"
+								mode="aspectFill"
+								lazy-load
+								@load="onImageLoad('cartList', index)"
+								@error="onImageError('cartList', index)"
+							></image>
+							<view class="iconfont iconroundcheckfill checkbox" :class="{ checked: item.checked }" @click="check('item', index)"></view>
+						</view>
+						<view class="item-right">
+							<text class="clamp title">{{ item.productInfo.store_name }}</text>
+							<text class="attr">{{ item.productInfo.attrInfo.suk }}</text>
+							<text class="price">¥{{ item.productInfo.price }}</text>
+							<!-- <uni-number-box
+								class="step"
+								:min="1"
+								:max="item.productInfo.stock"
+								:value="item.cart_num > item.productInfo.stock ? item.productInfo.stock : item.cart_num"
+								:isMax="item.cart_num >= item.productInfo.stock ? true : false"
+								:isMin="item.cart_num === 1"
+								:index="index"
+								@eventChange="numberChange"
 							></uni-number-box> -->
-							<view class="munbox flex" >
-								<image src="../../static/icon/reduce.png" mode="" @click="reduce(item,index)"></image>
-								<input type="number" :value="item.cart_num" disabled/>
+							<view class="munbox flex">
+								<image src="../../static/icon/reduce.png" mode="" @click="reduce(item, index)"></image>
+								<input type="number" :value="item.cart_num" disabled />
 								<image src="../../static/icon/add.png" mode="" @click="add(item)"></image>
-							</view>
-						</view>
-						<!-- <text class="del-btn iconfont iconclose" @click="deleteCartItem(index)"></text> -->
-					</view>
-				</block>
-			</view>
-			<!-- 底部菜单栏 -->
-			<view class="action-section">
-				<view class="checkbox">
-					<view class="iconfont iconroundcheckfill icon-checked-box" @click="check('all')" :class="{ 'icon-checked': allChecked }"></view>
-					<!-- <view class="clear-btn" @click="allChecked ? clearCart() : ''" :class="{ show: allChecked }"><text>清空</text></view> -->
-				</view>
-				<view class="total-box">
-					<text class="price">¥{{ total }}</text>
-					<!-- <text class="coupon">
-						已优惠
-						<text>74.35</text>
-						元
-					</text> -->
-				</view>
-				<button type="primary" class="no-border confirm-btn" @click="createOrder">去结算</button>
-			</view>
-		</view>
-	</view>
-</template>
-
+							</view>
+						</view>
+						<!-- <text class="del-btn iconfont iconclose" @click="deleteCartItem(index)"></text> -->
+					</view>
+				</block>
+			</view>
+			<!-- 底部菜单栏 -->
+			<view class="action-section">
+				<view class="checkbox">
+					<view class="iconfont iconroundcheckfill icon-checked-box" @click="check('all')" :class="{ 'icon-checked': allChecked }"></view>
+					<!-- <view class="clear-btn" @click="allChecked ? clearCart() : ''" :class="{ show: allChecked }"><text>清空</text></view> -->
+				</view>
+				<view class="total-box">
+					<text class="price">¥{{ total }}</text>
+					<!-- <text class="coupon">
+						已优惠
+						<text>74.35</text>
+						元
+					</text> -->
+				</view>
+				<button type="primary" class="no-border confirm-btn" @click="createOrder">去结算</button>
+			</view>
+		</view>
+		<u-tabbar activeColor="#EE0979" v-model="current" :list="tabbar" :mid-button="true"></u-tabbar>
+	</view>
+</template>
+
 <script>
-	import weixinObj from "@/plugin/jweixin-module/index.js";
-import { getCartList, getCartNum, cartDel } from '@/api/user.js';
-import { mapState } from 'vuex';
-import uniNumberBox from '@/components/uni-number-box.vue';
-import { saveUrl, interceptor } from '@/utils/loginUtils.js';
-export default {
-	components: {
-		uniNumberBox
-	},
-	data() {
-		return {
-			total: 0, //总价格
-			allChecked: false, //全选状态  true|false
-			empty: false, //空白页现实  true|false
-			cartList: []
-		};
-	},
-	onShow() {
-		// 只有登录时才加载数据
-		if (this.hasLogin) {
-			this.loadData();
+import weixinObj from '@/plugin/jweixin-module/index.js';
+import { getCartList, getCartNum, cartDel } from '@/api/user.js';
+import { mapState } from 'vuex';
+import uniNumberBox from '@/components/uni-number-box.vue';
+import { saveUrl, interceptor } from '@/utils/loginUtils.js';
+import { tabbar } from '@/utils/tabbar.js';
+export default {
+	components: {
+		uniNumberBox
+	},
+	data() {
+		return {
+			tabbar: tabbar,
+			current: 3,
+			total: 0, //总价格
+			allChecked: false, //全选状态  true|false
+			empty: false, //空白页现实  true|false
+			cartList: []
+		};
+	},
+	onShow() {
+		// 只有登录时才加载数据
+		if (this.hasLogin) {
+			this.loadData();
+		}
+		weixinObj.hideAllNonBaseMenuItem();
+	},
+	watch: {
+		//显示空白页
+		cartList(e) {
+			let empty = e.length === 0 ? true : false;
+			if (this.empty !== empty) {
+				this.empty = empty;
+			}
 		}
-		weixinObj.hideAllNonBaseMenuItem();
-	},
-	watch: {
-		//显示空白页
-		cartList(e) {
-			let empty = e.length === 0 ? true : false;
-			if (this.empty !== empty) {
-				this.empty = empty;
-			}
-		}
-	},
-	computed: {
-		...mapState('user', ['hasLogin'])
-	},
+	},
+	computed: {
+		...mapState('user', ['hasLogin'])
+	},
 	methods: {
-		reduce(item,index) {
-			if(item.cart_num == 1) {
+		reduce(item, index) {
+			if (item.cart_num == 1) {
 				uni.showModal({
 					content: '删除该商品?',
 					success: e => {
 						if (e.confirm) {
-							this.deleteCartItem(index)
+							this.deleteCartItem(index);
 						}
 					}
 				});
-				
-			}else {
-				item.cart_num--
-				this.newNumberChange(item)
+			} else {
+				item.cart_num--;
+				this.newNumberChange(item);
 			}
 		},
 		add(item) {
-			console.log(item)
-			if(item.productInfo.stock > item.cart_num) {
-				item.cart_num++
-				this.newNumberChange(item)
-			}else {
-				return 
+			console.log(item);
+			if (item.productInfo.stock > item.cart_num) {
+				item.cart_num++;
+				this.newNumberChange(item);
+			} else {
+				return;
+			}
+		},
+		//请求数据
+		async loadData() {
+			let obj = this;
+			getCartList({})
+				.then(function(e) {
+					// 获取当前购物车物品增加数量
+					let nub = obj.cartList.length;
+					// 获取之前对象数组
+					let aArray = obj.cartList.reverse();
+					// 获取返回数据对象数组
+					let bArray = e.data.valid.reverse();
+					obj.cartList = bArray
+						.map((item, ind) => {
+							// 设置返回数据默认为勾选状态
+							item.checked = true;
+							// 获取相同数组之前对象的数据
+							let carlist = aArray[ind];
+							// 判断之前是否已经加载完毕
+							if (carlist && carlist.loaded == 'loaded') {
+								item.loaded = 'loaded';
+							}
+							return item;
+						})
+						.reverse();
+					obj.calcTotal(); //计算总价
+				})
+				.catch(function(e) {
+					console.log(e);
+				});
+		},
+		//监听image加载完成
+		onImageLoad(key, index) {
+			// 修改载入完成后图片class样式
+			this.$set(this[key][index], 'loaded', 'loaded');
+		},
+		//监听image加载失败
+		onImageError(key, index) {
+			this[key][index].image = '/static/error/errorImage.jpg';
+		},
+		// 跳转到登录页
+		navToLogin() {
+			// 保存地址
+			saveUrl();
+			// 登录拦截
+			interceptor();
+		},
+		//选中状态处理
+		check(type, index) {
+			if (type === 'item') {
+				this.cartList[index].checked = !this.cartList[index].checked;
+			} else {
+				const checked = !this.allChecked;
+				const list = this.cartList;
+				list.forEach(item => {
+					item.checked = checked;
+				});
+				this.allChecked = checked;
 			}
-		},
-		//请求数据
-		async loadData() {
-			let obj = this;
-			getCartList({})
-				.then(function(e) {
-					// 获取当前购物车物品增加数量
-					let nub = obj.cartList.length;
-					// 获取之前对象数组
-					let aArray = obj.cartList.reverse();
-					// 获取返回数据对象数组
-					let bArray = e.data.valid.reverse();
-					obj.cartList = bArray
-						.map((item, ind) => {
-							// 设置返回数据默认为勾选状态
-							item.checked = true;
-							// 获取相同数组之前对象的数据
-							let carlist = aArray[ind];
-							// 判断之前是否已经加载完毕
-							if (carlist && carlist.loaded == 'loaded') {
-								item.loaded = 'loaded';
-							}
-							return item;
-						})
-						.reverse();
-					obj.calcTotal(); //计算总价
-				})
-				.catch(function(e) {
-					console.log(e);
-				});
-		},
-		//监听image加载完成
-		onImageLoad(key, index) {
-			// 修改载入完成后图片class样式
-			this.$set(this[key][index], 'loaded', 'loaded');
-		},
-		//监听image加载失败
-		onImageError(key, index) {
-			this[key][index].image = '/static/error/errorImage.jpg';
-		},
-		// 跳转到登录页
-		navToLogin() {
-			// 保存地址
-			saveUrl();
-			// 登录拦截
-			interceptor();
-		},
-		//选中状态处理
-		check(type, index) {
-			if (type === 'item') {
-				this.cartList[index].checked = !this.cartList[index].checked;
-			} else {
-				const checked = !this.allChecked;
-				const list = this.cartList;
-				list.forEach(item => {
-					item.checked = checked;
-				});
-				this.allChecked = checked;
-			}
-			this.calcTotal(type);
-		},
-		//数量
-		numberChange(data) {
-			let arr = this.cartList[data.index];
-			arr.cart_num = data.number;
-			getCartNum({ id: arr.id, number: data.number })
-				.then(e => {
-					console.log(e);
-				})
-				.catch(function(e) {
-					console.log(e);
-				});
-			this.calcTotal();
+			this.calcTotal(type);
+		},
+		//数量
+		numberChange(data) {
+			let arr = this.cartList[data.index];
+			arr.cart_num = data.number;
+			getCartNum({ id: arr.id, number: data.number })
+				.then(e => {
+					console.log(e);
+				})
+				.catch(function(e) {
+					console.log(e);
+				});
+			this.calcTotal();
 		},
 		newNumberChange(item) {
 			getCartNum({ id: item.id, number: item.cart_num })
@@ -226,150 +229,150 @@ export default {
 					console.log(e);
 				});
 			this.calcTotal();
-		},
-		//删除
-		deleteCartItem(index) {
-			let list = this.cartList;
-			let row = list[index];
-			let id = row.id;
-			cartDel({
-				ids: id
-			});
-			this.cartList.splice(index, 1);
-			uni.hideLoading();
-			this.calcTotal();
-		},
-		//清空
-		clearCart() {
-			uni.showModal({
-				content: '清空购物车?',
-				success: e => {
-					if (e.confirm) {
-						let st = this.cartList.map(e => {
-							return e.id;
-						});
-						cartDel({
-							ids: st.join(',')
-						}).then(e => {
-							console.log(e);
-						});
-						this.cartList = [];
-					}
-				}
-			});
-		},
-		//计算总价
-		calcTotal() {
-			let list = this.cartList;
-			if (list.length === 0) {
-				this.empty = true;
-				return;
-			}
-			let total = 0;
-			let checked = true;
-			list.forEach(item => {
-				if (item.checked === true) {
-					total += item.productInfo.price * item.cart_num;
-				} else if (checked === true) {
-					checked = false;
-				}
-			});
-			this.allChecked = checked;
-			this.total = Number(total.toFixed(2));
-		},
-		//创建订单
-		createOrder() {
-			let list = this.cartList;
-			let goodsData = [];
-			list.forEach(item => {
-				if (item.checked) {
-					goodsData.push(item.id);
-				}
-			});
-
-			uni.navigateTo({
-				url: '/pages/order/createOrder?id=' + goodsData.join(',')
-			});
-		}
-	}
-};
-</script>
-
-<style lang="scss">
-.container {
-	padding-bottom: 134rpx;
-	background-color: $page-color-base;
-	/* 空白页 */
-	.empty {
-		position: fixed;
-		left: 0;
-		top: 0;
-		width: 100%;
-		height: 100vh;
-		padding-bottom: 100rpx;
-		display: flex;
-		justify-content: center;
-		flex-direction: column;
-		align-items: center;
-		background: #fff;
-		.emptyImg {
-			width: 300rpx;
-			height: 250rpx;
-			margin-bottom: 30rpx;
-		}
-		.empty-tips {
-			display: flex;
-			font-size: $font-sm + 2rpx;
-			color: $font-color-disabled;
-			.navigator {
-				color: #f65067;
-				margin-left: 16rpx;
-			}
-		}
-	}
-}
-/* 购物车列表项 */
+		},
+		//删除
+		deleteCartItem(index) {
+			let list = this.cartList;
+			let row = list[index];
+			let id = row.id;
+			cartDel({
+				ids: id
+			});
+			this.cartList.splice(index, 1);
+			uni.hideLoading();
+			this.calcTotal();
+		},
+		//清空
+		clearCart() {
+			uni.showModal({
+				content: '清空购物车?',
+				success: e => {
+					if (e.confirm) {
+						let st = this.cartList.map(e => {
+							return e.id;
+						});
+						cartDel({
+							ids: st.join(',')
+						}).then(e => {
+							console.log(e);
+						});
+						this.cartList = [];
+					}
+				}
+			});
+		},
+		//计算总价
+		calcTotal() {
+			let list = this.cartList;
+			if (list.length === 0) {
+				this.empty = true;
+				return;
+			}
+			let total = 0;
+			let checked = true;
+			list.forEach(item => {
+				if (item.checked === true) {
+					total += item.productInfo.price * item.cart_num;
+				} else if (checked === true) {
+					checked = false;
+				}
+			});
+			this.allChecked = checked;
+			this.total = Number(total.toFixed(2));
+		},
+		//创建订单
+		createOrder() {
+			let list = this.cartList;
+			let goodsData = [];
+			list.forEach(item => {
+				if (item.checked) {
+					goodsData.push(item.id);
+				}
+			});
+
+			uni.navigateTo({
+				url: '/pages/order/createOrder?id=' + goodsData.join(',')
+			});
+		}
+	}
+};
+</script>
+
+<style lang="scss">
+.container {
+	padding-bottom: 134rpx;
+	background-color: $page-color-base;
+	/* 空白页 */
+	.empty {
+		position: fixed;
+		left: 0;
+		top: 0;
+		width: 100%;
+		height: 100vh;
+		padding-bottom: 100rpx;
+		display: flex;
+		justify-content: center;
+		flex-direction: column;
+		align-items: center;
+		background: #fff;
+		.emptyImg {
+			width: 300rpx;
+			height: 250rpx;
+			margin-bottom: 30rpx;
+		}
+		.empty-tips {
+			display: flex;
+			font-size: $font-sm + 2rpx;
+			color: $font-color-disabled;
+			.navigator {
+				color: #f65067;
+				margin-left: 16rpx;
+			}
+		}
+	}
+}
+/* 购物车列表项 */
 .cart-item {
 	width: 710rpx;
 	height: 210rpx;
-	background: #FFFFFF;
+	background: #ffffff;
 	box-shadow: 0px 0px 10rpx 0rpx rgba(0, 0, 0, 0.1);
 	border-radius: 10rpx;
 	margin: 20rpx auto;
-	
-	display: flex;
-	position: relative;
-	padding: 30rpx 26rpx 30rpx 80rpx;
-	.image-wrapper {
-		width: 150rpx;
-		height: 150rpx;
-		flex-shrink: 0;
-		position: relative;
-		image {
-			border-radius: 8rpx;
-		}
-	}
-	.checkbox {
-		position: absolute;
+
+	display: flex;
+	position: relative;
+	padding: 30rpx 26rpx 30rpx 80rpx;
+	.image-wrapper {
+		width: 150rpx;
+		height: 150rpx;
+		flex-shrink: 0;
+		position: relative;
+		image {
+			border-radius: 8rpx;
+		}
+	}
+	.checkbox {
+		position: absolute;
 		top: 0;
 		bottom: 0;
 		left: -65rpx;
 		margin: auto 0;
-		height: 50rpx;
-		z-index: 8;
-		font-size: 44rpx;
-		line-height: 1;
-		padding: 4rpx;
-		color: $font-color-disabled;
-		background: #fff;
-		border-radius: 50px;
-	}
-	.item-right {
-		display: flex;
-		flex-direction: column;
-		flex: 1;
-		overflow: hidden;
-		position: relative;
+		height: 50rpx;
+		z-index: 8;
+		font-size: 44rpx;
+		line-height: 1;
+		padding: 4rpx;
+		color: $font-color-disabled;
+		background: #fff;
+		border-radius: 50px;
+	}
+	.item-right {
+		display: flex;
+		flex-direction: column;
+		flex: 1;
+		overflow: hidden;
+		position: relative;
 		padding-left: 30rpx;
 		.munbox {
 			width: 144rpx;
@@ -386,144 +389,144 @@ export default {
 				width: 44rpx;
 				height: 44rpx;
 			}
-		}
-		.title,
-		.price {
-			font-size: $font-base + 2rpx;
-			color: $font-color-dark;
-			height: 40rpx;
-			line-height: 40rpx;
-		}
-		.attr {
-			font-size: $font-sm + 2rpx;
-			color: $font-color-light;
-			height: 50rpx;
+		}
+		.title,
+		.price {
+			font-size: $font-base + 2rpx;
+			color: $font-color-dark;
+			height: 40rpx;
+			line-height: 40rpx;
+		}
+		.attr {
+			font-size: $font-sm + 2rpx;
+			color: $font-color-light;
+			height: 50rpx;
 			line-height: 50rpx;
-			
+
 			font-size: 26rpx;
 			font-family: PingFang SC;
 			font-weight: bold;
-			color: #999999;
-		}
-		.price {
-			// height: 50rpx;
+			color: #999999;
+		}
+		.price {
+			// height: 50rpx;
 			// line-height: 50rpx;
 			padding-top: 20rpx;
 			font-size: 34rpx;
 			font-family: PingFang SC;
 			font-weight: bold;
-			color: #FF4C4C;
-		}
-		.step {
-			margin-top: 20rpx;
+			color: #ff4c4c;
+		}
+		.step {
+			margin-top: 20rpx;
 		}
 		.title {
 			font-size: 34rpx;
 			font-family: PingFang SC;
 			font-weight: bold;
 			color: #333333;
-		}
-	}
-	.del-btn {
-		padding: 4rpx 10rpx;
-		font-size: 34rpx;
-		height: 50rpx;
-		color: $font-color-light;
-	}
-}
-/* 底部栏 */
-.action-section {
-	/* #ifdef H5 */
-	margin-bottom: 100rpx;
-	/* #endif */
-	position: fixed;
-	left: 30rpx;
-	bottom: 30rpx;
-	z-index: 95;
-	display: flex;
-	align-items: center;
-	width: 690rpx;
-	height: 100rpx;
-	padding: 0 30rpx;
-	background: rgba(255, 255, 255, 0.9);
-	box-shadow: 0 0 20rpx 0 rgba(0, 0, 0, 0.5);
-	border-radius: 16rpx;
-	.checkbox {
-		height: 52rpx;
-		position: relative;
-		.icon-checked-box {
-			border-radius: 50rpx;
-			background-color: #ffffff;
-			width: 52rpx;
-			height: 100%;
-			position: relative;
-			z-index: 5;
-			font-size: 53rpx;
-			line-height: 1;
-			color: $font-color-light;
-		}
-		.icon-checked {
-			color: $base-color;
-		}
-	}
-	.clear-btn {
-		position: absolute;
-		left: 26rpx;
-		top: 0;
-		z-index: 4;
-		width: 0;
-		height: 52rpx;
-		line-height: 52rpx;
-		padding-left: 38rpx;
-		font-size: $font-base;
-		color: #fff;
-		background: $font-color-disabled;
-		border-radius: 0 50px 50px 0;
-		opacity: 0;
-		transition: 0.2s;
-		&.show {
-			opacity: 1;
-			width: 120rpx;
-		}
-	}
-	.total-box {
-		flex: 1;
-		display: flex;
-		flex-direction: column;
-		text-align: right;
+		}
+	}
+	.del-btn {
+		padding: 4rpx 10rpx;
+		font-size: 34rpx;
+		height: 50rpx;
+		color: $font-color-light;
+	}
+}
+/* 底部栏 */
+.action-section {
+	/* #ifdef H5 */
+	margin-bottom: 100rpx;
+	/* #endif */
+	position: fixed;
+	left: 30rpx;
+	bottom: 30rpx;
+	z-index: 95;
+	display: flex;
+	align-items: center;
+	width: 690rpx;
+	height: 100rpx;
+	padding: 0 30rpx;
+	background: rgba(255, 255, 255, 0.9);
+	box-shadow: 0 0 20rpx 0 rgba(0, 0, 0, 0.5);
+	border-radius: 16rpx;
+	.checkbox {
+		height: 52rpx;
+		position: relative;
+		.icon-checked-box {
+			border-radius: 50rpx;
+			background-color: #ffffff;
+			width: 52rpx;
+			height: 100%;
+			position: relative;
+			z-index: 5;
+			font-size: 53rpx;
+			line-height: 1;
+			color: $font-color-light;
+		}
+		.icon-checked {
+			color: $base-color;
+		}
+	}
+	.clear-btn {
+		position: absolute;
+		left: 26rpx;
+		top: 0;
+		z-index: 4;
+		width: 0;
+		height: 52rpx;
+		line-height: 52rpx;
+		padding-left: 38rpx;
+		font-size: $font-base;
+		color: #fff;
+		background: $font-color-disabled;
+		border-radius: 0 50px 50px 0;
+		opacity: 0;
+		transition: 0.2s;
+		&.show {
+			opacity: 1;
+			width: 120rpx;
+		}
+	}
+	.total-box {
+		flex: 1;
+		display: flex;
+		flex-direction: column;
+		text-align: right;
 		padding-right: 40rpx;
-		
-		.price {
-			font-size: $font-lg;
-			color: $font-color-dark;
-		}
-		.coupon {
-			font-size: $font-sm;
-			color: $font-color-light;
-			text {
-				color: $font-color-dark;
-			}
-		}
-	}
-	.confirm-btn {
-		padding: 0 38rpx;
-		margin: 0;
-		border-radius: 100px;
-		height: 76rpx;
-		line-height: 76rpx;
-		font-size: $font-base + 2rpx;
-		background: $base-color;
-	}
-}
-/* 复选框选中状态 */
-.action-section .checkbox.checked,
-.cart-item .checkbox.checked {
-	color: $base-color;
+
+		.price {
+			font-size: $font-lg;
+			color: $font-color-dark;
+		}
+		.coupon {
+			font-size: $font-sm;
+			color: $font-color-light;
+			text {
+				color: $font-color-dark;
+			}
+		}
+	}
+	.confirm-btn {
+		padding: 0 38rpx;
+		margin: 0;
+		border-radius: 100px;
+		height: 76rpx;
+		line-height: 76rpx;
+		font-size: $font-base + 2rpx;
+		background: $base-color;
+	}
+}
+/* 复选框选中状态 */
+.action-section .checkbox.checked,
+.cart-item .checkbox.checked {
+	color: $base-color;
 }
 .cart-hand {
 	width: 750rpx;
 	height: 88rpx;
-	background: #FFFFFF;
+	background: #ffffff;
 	font-size: 30rpx;
 	font-family: PingFang SC;
 	font-weight: bold;
@@ -533,21 +536,20 @@ export default {
 	padding-right: 26rpx;
 	.hand-tit {
 		text {
-			color: #FF4C4C;
+			color: #ff4c4c;
 		}
-	
 	}
 	.hand-btn {
 		width: 164rpx;
 		height: 62rpx;
-		border: 2rpx solid #FF4C4C;
+		border: 2rpx solid #ff4c4c;
 		border-radius: 31rpx;
 		font-size: 26rpx;
 		font-family: PingFang SC;
 		font-weight: bold;
-		color: #FF4C4C;
+		color: #ff4c4c;
 		line-height: 62rpx;
 		text-align: center;
 	}
-}
+}
 </style>

+ 774 - 759
pages/index/index.vue

@@ -1,94 +1,96 @@
-<template>
-	<view class="container">
-		<view class="carousel-section">
-			<!-- 背景色区域 -->
-			<view class="bg"><image src="../../static/index/index13.png" mode=""></image></view>
-			<!-- 标题栏和状态栏占位符 -->
-			<view class="titleNview-placing"></view>
-			<!-- 搜素栏 -->
-			<view class="search flex">
-				<image src="../../static/index/index09.png" class="address"></image>
-				<!-- <view class="shop-name clamp" @click.stop="canChange == 0?nav('/pages/shoping/list'):''">{{ storeInfo.name }}</view> -->
-				<view class="shop-name clamp">椒江区</view>
-				<image class="shop-jt" src="../../static/index/index07.png" mode=""></image>
-				<view class="input-box flex" @click.stop="clickSearch">
-					<view class=" input-content flex">
-						<view class="iconfont iconsearch"></view>
-						<view class="input"><input type="text" disabled value="输入关键字搜索" /></view>
-					</view>
-				</view>
-			</view>
-			<swiper class="carousel" autoplay="true" duration="400" interval="5000" @change="swiperChange" :indicator-dots="true" indicator-active-color="#FFFFFF">
-				<!-- <swiper class="carousel" autoplay="true" duration="400" interval="5000"> -->
-				<swiper-item v-for="(item, index) in carouselList" :key="index" class="carousel-item">
-					<image :src="item.pic" mode="aspectFill" @click="bannerNavToUrl(item)"></image>
-				</swiper-item>
-			</swiper>
-		</view>
-		<view class="navbar">
-			<view class="navbar-box flex">
-				<view class="navbar-item" @click="navTo('/pages/index/sign')">
-					<image class="nitem-image" src="../../static/index/index05.png" mode=""></image>
-					<view class="nitem-font">天天领红包</view>
-				</view>
-				<view class="navbar-item" @click="navTo('')">
-					<image class="nitem-image" src="../../static/index/index04.png" mode=""></image>
-					<view class="nitem-font">积分商城</view>
-				</view>
-				<view class="navbar-item" @click="navTo('/pages/product/list')">
-					<image class="nitem-image" src="../../static/index/index03.png" mode=""></image>
-					<view class="nitem-font">全部商品</view>
-				</view>
-				<view class="navbar-item" @click="navTo('/pages/user/shareQrCode')">
-					<image class="nitem-image" src="../../static/index/index02.png" mode=""></image>
-					<view class="nitem-font">邀请有礼</view>
-				</view>
-				<view class="navbar-item" @click="navTo('')">
-					<image class="nitem-image" src="../../static/index/index01.png" mode=""></image>
-					<view class="nitem-font">话费充值</view>
-				</view>
-			</view>
-		</view>
-		<view class="product-box" v-if="bastList.length != 0">
-			<view class="product-title">
-				<image class="pt-image" src="../../static/index/index15.png" mode=""></image>
-				<view class="pt-title">会员礼包</view>
-			</view>
-			<view class="hotgoods">
-				<view class="hotgoods-item" v-for="item in bastList" :key="item.id" @click="navToDetailPage(item)">
-					<view class="image-wrapper"><image :src="item.image" mode="scaleToFill"></image></view>
-					<view class="title clamp2">{{ item.store_name }}</view>
-					<view class="hot-price">
-						<view class="hotPrice-box">会员价</view>
-						<view class="price">
-							<text class="font-size-sm">¥</text>
-							{{ item.price * 1 }}
-						</view>
-						<view class="yuanPrice">{{ item.ot_price }}</view>
-					</view>
-				</view>
-			</view>
-		</view>
-		<view class="shop" v-if="shoplist.length != 0">
-			<view class="shop-title">
-				<view class="shop-item">
-					<view class="sitem-font">智能排序</view>
-					<image class="jt-down" src="../../static/index/index06.png" mode=""></image>
-				</view>
-				<view class="shop-item">
-					<view class="sitem-font">位置距离</view>
-					<image class="jt-down" src="../../static/index/index06.png" mode=""></image>
-				</view>
-				<view class="shop-item">
-					<view class="sitem-font">折扣优惠</view>
-					<image class="jt-down" src="../../static/index/index06.png" mode=""></image>
-				</view>
-				<view class="shop-item">
-					<view class="sitem-font">筛选</view>
-					<image class="jt-down" src="../../static/index/index06.png" mode=""></image>
-				</view>
-			</view>
-			
+<template>
+	<view class="container">
+		<view class="carousel-section">
+			<!-- 背景色区域 -->
+			<view class="bg"><image src="../../static/index/index13.png" mode=""></image></view>
+			<!-- 标题栏和状态栏占位符 -->
+			<view class="titleNview-placing"></view>
+			<!-- 搜素栏 -->
+			<view class="search flex">
+				<image src="../../static/index/index09.png" class="address"></image>
+				<!-- <view class="shop-name clamp" @click.stop="canChange == 0?nav('/pages/shoping/list'):''">{{ storeInfo.name }}</view> -->
+				<view class="shop-name clamp">椒江区</view>
+				<image class="shop-jt" src="../../static/index/index07.png" mode=""></image>
+				<view class="input-box flex" @click.stop="clickSearch">
+					<view class=" input-content flex">
+						<view class="iconfont iconsearch"></view>
+						<view class="input"><input type="text" disabled value="输入关键字搜索" /></view>
+					</view>
+				</view>
+			</view>
+			<swiper class="carousel" autoplay="true" duration="400" interval="5000" @change="swiperChange" :indicator-dots="true" indicator-active-color="#FFFFFF">
+				<!-- <swiper class="carousel" autoplay="true" duration="400" interval="5000"> -->
+				<swiper-item v-for="(item, index) in carouselList" :key="index" class="carousel-item">
+					<image :src="item.pic" mode="aspectFill" @click="bannerNavToUrl(item)"></image>
+				</swiper-item>
+			</swiper>
+		</view>
+		<view class="navbar">
+			<view class="navbar-box flex">
+				<view class="navbar-item" @click="navTo('/pages/product/list')">
+					<image class="nitem-image" src="../../static/index/index03.png" mode=""></image>
+					<view class="nitem-font">全部商品</view>
+				</view>
+				<view class="navbar-item" @click="navTo('/pages/user/shareQrCode')">
+					<image class="nitem-image" src="../../static/index/index02.png" mode=""></image>
+					<view class="nitem-font">邀请有礼</view>
+				</view>
+				<view class="navbar-item" @click="navTo('/pages/index/sign')">
+					<image class="nitem-image" src="../../static/index/index05.png" mode=""></image>
+					<view class="nitem-font">天天领红包</view>
+				</view>
+				<view class="navbar-item" @click="navTo('')">
+					<image class="nitem-image" src="../../static/index/index04.png" mode=""></image>
+					<view class="nitem-font">积分商城</view>
+				</view>
+				<view class="navbar-item" @click="navTo('')">
+					<image class="nitem-image" src="../../static/index/index01.png" mode=""></image>
+					<view class="nitem-font">话费充值</view>
+				</view>
+			</view>
+		</view>
+		<view class="product-box" v-if="bastList.length != 0">
+			<view class="product-title">
+				<image class="pt-image" src="../../static/index/index15.png" mode=""></image>
+				<view class="pt-title">会员礼包</view>
+			</view>
+			<view class="hotgoods">
+				<view class="hotgoods-item" v-for="item in bastList" :key="item.id" @click="navToDetailPage(item)">
+					<view class="image-wrapper">
+						<image class="image-bg" src="../../static/img/libao-bg.png" mode=""></image>
+						<image class="image" :src="item.image" mode="scaleToFill"></image>
+					</view>
+					<view class="title clamp2">{{ item.store_name }}</view>
+					<view class="hot-price">
+						<view class="hotPrice-box">会员价</view>
+						<view class="price">
+							<text class="font-size-sm">¥</text>
+							{{ item.price * 1 }}
+						</view>
+						<view class="yuanPrice">{{ item.ot_price }}</view>
+					</view>
+				</view>
+			</view>
+		</view>
+		<view class="shop" v-if="shoplist.length != 0">
+			<view class="shop-title">
+				<view class="shop-item">
+					<view class="sitem-font">智能排序</view>
+					<image class="jt-down" src="../../static/index/index06.png" mode=""></image>
+				</view>
+				<view class="shop-item">
+					<view class="sitem-font">位置距离</view>
+					<image class="jt-down" src="../../static/index/index06.png" mode=""></image>
+				</view>
+				<view class="shop-item">
+					<view class="sitem-font">折扣优惠</view>
+					<image class="jt-down" src="../../static/index/index06.png" mode=""></image>
+				</view>
+				<view class="shop-item">
+					<view class="sitem-font">筛选</view>
+					<image class="jt-down" src="../../static/index/index06.png" mode=""></image>
+				</view>
+			</view>
 		</view>
 		<view class="shop-main flex" v-for="(item, index) in shoplist" :key="index">
 			<image class="main-left" src="../../static/index/index13.png" mode=""></image>
@@ -112,107 +114,107 @@
 					</view>
 				</view>
 			</view>
-		</view>
-		<u-tabbar activeColor="#EE0979" v-model="current" :list="tabbar" :mid-button="true"></u-tabbar>
-	</view>
-</template>
-
-<script>
-import { lookSubpoints, lookOneself } from '../../api/user.js';
-import seckill from '../../components/seckill/seckill.vue';
-import { loadIndexs } from '@/api/index.js';
-import { getUserInfo, spread } from '@/api/user.js';
-import { setCoupons } from '@/api/functionalUnit.js';
-import { getBargainList } from '@/api/product.js';
-import { interceptor } from '@/utils/loginUtils';
-import { mapState, mapMutations } from 'vuex';
-import { tabbar } from '@/utils/tabbar.js';
-// #ifdef H5
-import { weixindata, shareLoad } from '@/utils/wxAuthorized';
-// #endif
-export default {
-	components: {
-		seckill
-	},
-	data() {
-		return {
-			tabbar: tabbar,
-			current: 0,
-			shareShow: false, //分享海报
-			pageProportion: 0, //保存页面基于750宽度的比例
-			swiperHeight: 0,
-			checkid: 0,
-			titleNViewBackground: '',
-			longitude: 0, //经度
-			latitude: 0, //纬度
-			swiperCurrent: 0,
-			swiperLength: 0,
-			carouselList: [], //轮播列表
-			bastList: [], //会员礼包
-			shoplist: [], //商店列表
-			page: 1,
-			limit: 5,
-		};
-	},
-	computed: {
-		...mapState(['loginInterceptor','baseURL']),
-		...mapState('user', ['hasLogin', 'userInfo'])
-	},
-	onLoad: function(option) {
-		this.getaddress();
-		// #ifdef MP
-		if (option.scene) {
-			// 存储小程序邀请人
-			uni.setStorage({
-				key: 'spread_code',
-				data: option.scene
-			});
-		}
+		</view>
+		<u-tabbar activeColor="#EE0979" v-model="current" :list="tabbar" :mid-button="true"></u-tabbar>
+	</view>
+</template>
+
+<script>
+import { lookSubpoints, lookOneself } from '../../api/user.js';
+import seckill from '../../components/seckill/seckill.vue';
+import { loadIndexs } from '@/api/index.js';
+import { getUserInfo, spread } from '@/api/user.js';
+import { setCoupons } from '@/api/functionalUnit.js';
+import { getBargainList } from '@/api/product.js';
+import { interceptor } from '@/utils/loginUtils';
+import { mapState, mapMutations } from 'vuex';
+import { tabbar } from '@/utils/tabbar.js';
+// #ifdef H5
+import { weixindata, shareLoad } from '@/utils/wxAuthorized';
+// #endif
+export default {
+	components: {
+		seckill
+	},
+	data() {
+		return {
+			tabbar: tabbar,
+			current: 0,
+			shareShow: false, //分享海报
+			pageProportion: 0, //保存页面基于750宽度的比例
+			swiperHeight: 0,
+			checkid: 0,
+			titleNViewBackground: '',
+			longitude: 0, //经度
+			latitude: 0, //纬度
+			swiperCurrent: 0,
+			swiperLength: 0,
+			carouselList: [], //轮播列表
+			bastList: [], //会员礼包
+			shoplist: [], //商店列表
+			page: 1,
+			limit: 5
+		};
+	},
+	computed: {
+		...mapState(['loginInterceptor', 'baseURL']),
+		...mapState('user', ['hasLogin', 'userInfo'])
+	},
+	onLoad: function(option) {
+		this.getaddress();
+		// #ifdef MP
+		if (option.scene) {
+			// 存储小程序邀请人
+			uni.setStorage({
+				key: 'spread_code',
+				data: option.scene
+			});
+		}
 		// #endif
 		// #ifdef H5
 		this.IndexShare();
-		//#endif
-	},
-	onShow: function() {
-		// 判断是否强制登录
-		if (!this.hasLogin) {
-			// 登录拦截
-			interceptor();
-		}
-		this.loadData();
-		this.getBargainList();
-	},
-	//下拉刷新
-	onPullDownRefresh() {
-		this.loadData();
-	},
-	// #ifndef MP
-	// 监听导航栏输入框点击事件
-	onNavigationBarSearchInputClicked(e) {
-		//跳转到搜索页面
-		this.clickSearch();
-	},
-	//点击导航栏 buttons 时触发
-	onNavigationBarButtonTap(e) {
-		const index = e.index;
-		if (index === 0) {
-			this.$api.msg('点击了扫描');
-		} else if (index === 1) {
-			// #ifdef APP-PLUS
-			const pages = getCurrentPages();
-			const page = pages[pages.length - 1];
-			const currentWebview = page.$getAppWebview();
-			currentWebview.hideTitleNViewButtonRedDot({
-				index
-			});
-			// #endif
-			uni.navigateTo({
-				url: '/pages/user/notice'
-			});
-		}
-	},
-	// #endif
-	methods: {
+		//#endif
+	},
+	onShow: function() {
+		// 判断是否强制登录
+		if (!this.hasLogin) {
+			// 登录拦截
+			interceptor();
+		}
+		this.loadData();
+		this.getBargainList();
+	},
+	//下拉刷新
+	onPullDownRefresh() {
+		this.loadData();
+	},
+	// #ifndef MP
+	// 监听导航栏输入框点击事件
+	onNavigationBarSearchInputClicked(e) {
+		//跳转到搜索页面
+		this.clickSearch();
+	},
+	//点击导航栏 buttons 时触发
+	onNavigationBarButtonTap(e) {
+		const index = e.index;
+		if (index === 0) {
+			this.$api.msg('点击了扫描');
+		} else if (index === 1) {
+			// #ifdef APP-PLUS
+			const pages = getCurrentPages();
+			const page = pages[pages.length - 1];
+			const currentWebview = page.$getAppWebview();
+			currentWebview.hideTitleNViewButtonRedDot({
+				index
+			});
+			// #endif
+			uni.navigateTo({
+				url: '/pages/user/notice'
+			});
+		}
+	},
+	// #endif
+	methods: {
 		...mapMutations(['setLat', 'setLon']),
 		// #ifdef H5
 		IndexShare() {
@@ -225,584 +227,597 @@ export default {
 			for (let i in page.options) {
 				path += i + '=' + page.options[i] + '&';
 			}
-			console.log(obj.Path)
+			console.log(obj.Path);
 			// 保存邀请人
 			path += 'spread=' + this.userInfo.uid;
 			let data = {
 				link: this.baseURL + '/index/' + path,
 				title: this.userInfo.nickname + '邀请您进入响亮商城',
-				desc:'欢迎加入响亮商城',
+				desc: '欢迎加入响亮商城',
 				imgUrl: 'https://xl.liuniu946.com/index/static/img/logo.jpg'
 			};
-			console.log(data,'分享数据');
+			console.log(data, '分享数据');
 			shareLoad(data);
 		},
-		// #endif
-		getaddress() {
-			console.log('dizhi+++++++++++');
-			let obj = this;
-			// uni.getLocation({
-			// 	type: 'gcj02',
-			// 	success: res => {
-			// 		console.log(res, 123456);
-			// 		obj.setLat(res.latitude);
-			// 		obj.setLon(res.longitude);
-			// 	},
-			// 	fail: err => {
-			// 		console.log(err, 'shi+++++++++++++++');
-			// 		openMap().then(e => {
-			// 			this.getaddress();
-			// 		});
-			// 	}
-			// });
-			weixindata().then(wxOjb => {
-				console.log(wxOjb,'获取微信');
-				wxOjb.getLocation({
-					type: 'gcj02',
-					success: res => {
-						console.log(res, 123456);
-						obj.setLat(res.latitude);
-						obj.setLon(res.longitude);
-					},
-					fail: err => {
-						console.log(err, 'shi+++++++++++++++');
-						openMap().then(e => {
-							this.getaddress();
-						});
-					}
-				});
-			});
-		},
-		//砍价商品推荐详情页
-		navToDetailPages(item) {
-			let id = item.product_id;
-			//let type = 2;
-
-			uni.navigateTo({
-				url: '/pages/product/product?id=' + id
-			});
-		},
-		navTo(url) {
-			if (url == '') {
-				this.$api.msg('暂未开通,敬请期待');
-			} else {
-				uni.navigateTo({
-					url
-				});
-			}
-		},
-		openSubscribe: function(e) {
-			let page = e;
-			// #ifndef MP
-			uni.navigateTo({
-				url: page
-			});
-			// #endif
-			// #ifdef MP
-			uni.showLoading({
-				title: '正在加载'
-			});
-			openBargainSubscribe()
-				.then(res => {
-					uni.hideLoading();
-					uni.navigateTo({
-						url: page
-					});
-				})
-				.catch(err => {
-					uni.hideLoading();
-				});
-			// #endif
-		},
-		getBargainList() {
-			let that = this;
-
-			getBargainList({
-				page: that.page,
-				limit: that.limit
-			})
-				.then(function(res) {
-					that.$set(that, 'bargainlist', res.data.slice(0, 2));
-				})
-				.catch(res => {
-					console.log(res, 'getBargainList');
-				});
-		},
-		Mask() {
-			this.MaskShow = false;
-			this.shareShow = true;
-			uni.setStorage({
-				key: 'FirstEntry',
-				data: true,
-				success: function() {
-					console.log(uni.getStorageSync('FirstEntry'), 'Mask');
-				}
-			});
-		},
-		Toshare() {
-			if (this.userInfo == '') {
-				getUserInfo({})
-					.then(({ data }) => {
-						this.setUserInfo(data);
-						this.userInfo = data;
-					})
-					.catch(e => {});
-			} else {
-				this.shareShow = false;
-				uni.navigateTo({
-					url: '/pages/user/shareQrCode?spread=' + this.userInfo.uid
-				});
-			}
-		},
-		Tocancel() {
-			this.shareShow = false;
-		},
-		// 监听切换事件
-		listChange(e) {
-			this.checkid = e.detail.current;
-		},
-		// 點擊搜索框
-		clickSearch() {
-			uni.navigateTo({
-				url: '/pages/product/search'
-			});
-		},
-		// 点击触发领取优惠券
-		setCoupons(item) {
-			// 判断是否已经领取了优惠券
-			let obj = this;
-			uni.showModal({
-				title: '领取提示',
-				content: '是否领取优惠券',
-				success(e) {
-					if (e.confirm) {
-						setCoupons({
-							couponId: item.id
-						}).then(e => {
-							item.is_use = true;
-							uni.showToast({
-								title: '领取成功',
-								type: 'top',
-								duration: 2000
-							});
-						});
-					}
-				}
-			});
-		},
-		//商品种类切换
-		change(item) {
-			let id = item;
-			this.checkid = id;
-			if (this.checkid == 1) {
-				// console.log(1);
-				this.detail = this.selected_detail;
-			} else if (this.checkid == 2) {
-				// console.log(2);
-				this.detail = this.new_product;
-			} else {
-				this.detail = this.cheap_good;
-			}
-		},
-		// 监听图片加载完成
-		onImageError(key, index) {
-			this[key][index].image = '/static/error/errorImage.jpg';
-		},
-		// 请求载入数据
-		async loadData() {
-			loadIndexs({})
-				.then(({ data }) => {
-					let goods = data.info;
-					this.carouselList = data.banner;
-					this.swiperLength = this.carouselList.length;
-					this.bastList = data.giftInfo; //会员礼包
-					uni.stopPullDownRefresh();
-				})
-				.catch(e => {
-					uni.stopPullDownRefresh();
-				});
-		},
-		//轮播图切换修改背景色
-		swiperChange(e) {
-			const index = e.detail.current;
-			this.swiperCurrent = index;
-			this.titleNViewBackground = this.carouselList[index].background;
-		},
-		//详情页
-		navToDetailPage(item) {
-			let id = item.id;
-			uni.navigateTo({
-				url: '/pages/product/product?id=' + id + '&isVip=1'
-			});
-		},
-
-		// 轮播图跳转
-		bannerNavToUrl(item) {
-			// #ifdef H5
-			if (item.wap_url.indexOf('http') > 0) {
-				window.location.href = item.wap_url;
-			}
-			// #endif
-			//测试数据没有写id,用title代替
-			uni.navigateTo({
-				url: item.wap_url
-			});
-		}
-	}
-};
-</script>
-
-<style lang="scss">
-.carousel-section {
-	position: relative;
-	padding-top: 10px;
-	.bg {
-		position: absolute;
-		top: 0;
-		left: 0;
-		width: 750rpx;
-		height: 378rpx;
-		image {
-			width: 100%;
-			height: 100%;
-		}
-	}
-	.titleNview-placing {
-		height: var(--status-bar-height);
-		box-sizing: content-box;
-	}
-	.search {
-		justify-content: flex-start;
-		padding: 10rpx 32rpx 20rpx;
-		align-items: center;
-		.address {
-			width: 32rpx;
-			height: 38rpx;
-		}
-		.shop-name {
-			height: 38rpx;
-			position: relative;
-			top: -4rpx;
-			z-index: 100;
-			font-size: 30rpx;
-			font-family: PingFang SC;
-			font-weight: 500;
-			color: #ffffff;
-			padding-left: 10rpx;
-		}
-		.shop-jt {
-			margin-left: 8rpx;
-			width: 16rpx;
-			height: 10rpx;
-		}
-		.input-box {
-			margin-left: 10rpx;
-			position: relative;
-			z-index: 99;
-			width: 520rpx;
-			height: 60rpx;
-			background: rgba(255, 255, 255, 0.4);
-			border-radius: 30rpx;
-			.input-content {
-				position: relative;
-				z-index: 11;
-				border-radius: 99rpx;
-				flex-grow: 1;
-				padding: 5rpx 30rpx;
-				background: rgba(255, 255, 255, 0.4);
-				.iconsearch {
-					font-size: 50rpx;
-					color: #ffffff;
-				}
-				.input {
-					margin-left: 19rpx;
-					flex-grow: 1;
-					color: #ffffff;
-					input {
-						font-size: 28rpx;
-
-						color: #ffffff;
-					}
-				}
-			}
-			.input-button {
-				padding-left: 20rpx;
-				font-size: $font-base;
-				height: 100%;
-			}
-		}
-	}
-}
-.carousel {
-	position: relative;
-	z-index: 3;
-	width: 100%;
-	height: 360rpx;
-	.carousel-item {
-		width: 100%;
-		height: 100%;
-		padding: 0 28rpx;
-		overflow: hidden;
-	}
-	image {
-		width: 100%;
-		height: 100%;
-		border-radius: $border-radius-sm;
-	}
-}
-.navbar {
-	position: relative;
-	z-index: 2;
-	margin-top: -200rpx;
-	width: 750rpx;
-	height: 462rpx;
-	background: #ffffff;
-	border-radius: 40rpx;
-	.navbar-box {
-		padding-top: 250rpx;
-		.navbar-item {
-			display: flex;
-			flex-direction: column;
-			align-items: center;
-			width: 20%;
-			.nitem-image {
-				width: 98rpx;
-				height: 98rpx;
-			}
-			.nitem-font {
-				margin-top: 22rpx;
-				font-size: 26rpx;
-				font-family: PingFang SC;
-				font-weight: 500;
-				color: #000000;
-			}
-		}
-	}
-}
-.product-box {
-	margin-top: 20rpx;
-	background: #ffffff;
-	padding: 26rpx 30rpx 20rpx;
-	.product-title {
-		display: flex;
-		align-items: center;
-		.pt-image {
-			width: 36rpx;
-			height: 36rpx;
-		}
-		.pt-title {
-			margin-left: 8rpx;
-			font-size: 32rpx;
-			font-family: PingFang SC;
-			font-weight: bold;
-			color: #333333;
-		}
-		.pt-tip {
-			margin-left: 16rpx;
-			font-size: 20rpx;
-			font-family: PingFang SC;
-			font-weight: bold;
-			color: #95a0b1;
-		}
-	}
-	.hotgoods {
-		margin-top: 38rpx;
-		width: 100%;
-		display: flex;
-		flex-wrap: wrap;
-		padding: 0 0 30rpx;
-
-		.hotgoods-item {
-			width: 48%;
-			background-color: #ffffff;
-			border-radius: 12rpx;
-			&:nth-child(2n + 1) {
-				margin-right: 24rpx;
-			}
-			.image-wrapper {
-				width: 100%;
-				height: 330rpx;
-				border-radius: 3px;
-				overflow: hidden;
-				image {
-					width: 100%;
-					height: 100%;
-					opacity: 1;
-					border-radius: 12rpx 12rpx 0 0;
-				}
-			}
-			.title {
-				margin-top: 24rpx;
-				font-size: 28rpx;
-				font-family: PingFang SC;
-				font-weight: 500;
-				color: #333333;
-			}
-			.hot-price {
-				display: flex;
-				justify-content: flex-start;
-				align-items: center;
-				padding: 14rpx 0 30rpx;
-				.hotPrice-box {
-					width: 70rpx;
-					height: 28rpx;
-					background: linear-gradient(90deg, #c79a4c, #f9df7f);
-					border-radius: 5rpx;
-					text-align: center;
-					line-height: 28rpx;
-					font-size: 20rpx;
-					font-family: Source Han Sans CN;
-					font-weight: 400;
-					color: #ffffff;
-				}
-				.price {
-					margin-left: 10rpx;
-					font-size: 40rpx;
-					color: #ff0000;
-					font-weight: 500;
-				}
-				.yuanPrice {
-					margin-left: 10rpx;
-					font-size: 20rpx;
-					font-family: PingFang SC;
-					font-weight: 500;
-					text-decoration: line-through;
-					color: #999999;
-				}
-				.cart-icon {
-					image {
-						width: 44rpx;
-						height: 44rpx;
-					}
-				}
-			}
-		}
-	}
-}
-.shop {
-	margin-top: 20rpx;
-	background: #ffffff;
-	padding: 0 12rpx;
-	.shop-title {
-		padding: 30rpx 0 20rpx;
-		display: flex;
-		align-items: center;
-		border-bottom: 1px solid #e3e6e7;
-		.shop-item {
-			width: 25%;
-			display: flex;
-			align-items: center;
-			justify-content: center;
-			.sitem-font {
-				font-size: 26rpx;
-				font-family: PingFang SC;
-				font-weight: bold;
-				color: #333333;
-			}
-			.jt-down {
-				width: 10rpx;
-				height: 8rpx;
-				margin-left: 12rpx;
-			}
-		}
-	}
-	
+		// #endif
+		getaddress() {
+			console.log('dizhi+++++++++++');
+			let obj = this;
+			// uni.getLocation({
+			// 	type: 'gcj02',
+			// 	success: res => {
+			// 		console.log(res, 123456);
+			// 		obj.setLat(res.latitude);
+			// 		obj.setLon(res.longitude);
+			// 	},
+			// 	fail: err => {
+			// 		console.log(err, 'shi+++++++++++++++');
+			// 		openMap().then(e => {
+			// 			this.getaddress();
+			// 		});
+			// 	}
+			// });
+			weixindata().then(wxOjb => {
+				console.log(wxOjb, '获取微信');
+				wxOjb.getLocation({
+					type: 'gcj02',
+					success: res => {
+						console.log(res, 123456);
+						obj.setLat(res.latitude);
+						obj.setLon(res.longitude);
+					},
+					fail: err => {
+						console.log(err, 'shi+++++++++++++++');
+						openMap().then(e => {
+							this.getaddress();
+						});
+					}
+				});
+			});
+		},
+		//砍价商品推荐详情页
+		navToDetailPages(item) {
+			let id = item.product_id;
+			//let type = 2;
+
+			uni.navigateTo({
+				url: '/pages/product/product?id=' + id
+			});
+		},
+		navTo(url) {
+			if (url == '') {
+				this.$api.msg('暂未开通,敬请期待');
+			} else {
+				uni.navigateTo({
+					url
+				});
+			}
+		},
+		openSubscribe: function(e) {
+			let page = e;
+			// #ifndef MP
+			uni.navigateTo({
+				url: page
+			});
+			// #endif
+			// #ifdef MP
+			uni.showLoading({
+				title: '正在加载'
+			});
+			openBargainSubscribe()
+				.then(res => {
+					uni.hideLoading();
+					uni.navigateTo({
+						url: page
+					});
+				})
+				.catch(err => {
+					uni.hideLoading();
+				});
+			// #endif
+		},
+		getBargainList() {
+			let that = this;
+
+			getBargainList({
+				page: that.page,
+				limit: that.limit
+			})
+				.then(function(res) {
+					that.$set(that, 'bargainlist', res.data.slice(0, 2));
+				})
+				.catch(res => {
+					console.log(res, 'getBargainList');
+				});
+		},
+		Mask() {
+			this.MaskShow = false;
+			this.shareShow = true;
+			uni.setStorage({
+				key: 'FirstEntry',
+				data: true,
+				success: function() {
+					console.log(uni.getStorageSync('FirstEntry'), 'Mask');
+				}
+			});
+		},
+		Toshare() {
+			if (this.userInfo == '') {
+				getUserInfo({})
+					.then(({ data }) => {
+						this.setUserInfo(data);
+						this.userInfo = data;
+					})
+					.catch(e => {});
+			} else {
+				this.shareShow = false;
+				uni.navigateTo({
+					url: '/pages/user/shareQrCode?spread=' + this.userInfo.uid
+				});
+			}
+		},
+		Tocancel() {
+			this.shareShow = false;
+		},
+		// 监听切换事件
+		listChange(e) {
+			this.checkid = e.detail.current;
+		},
+		// 點擊搜索框
+		clickSearch() {
+			uni.navigateTo({
+				url: '/pages/product/search'
+			});
+		},
+		// 点击触发领取优惠券
+		setCoupons(item) {
+			// 判断是否已经领取了优惠券
+			let obj = this;
+			uni.showModal({
+				title: '领取提示',
+				content: '是否领取优惠券',
+				success(e) {
+					if (e.confirm) {
+						setCoupons({
+							couponId: item.id
+						}).then(e => {
+							item.is_use = true;
+							uni.showToast({
+								title: '领取成功',
+								type: 'top',
+								duration: 2000
+							});
+						});
+					}
+				}
+			});
+		},
+		//商品种类切换
+		change(item) {
+			let id = item;
+			this.checkid = id;
+			if (this.checkid == 1) {
+				// console.log(1);
+				this.detail = this.selected_detail;
+			} else if (this.checkid == 2) {
+				// console.log(2);
+				this.detail = this.new_product;
+			} else {
+				this.detail = this.cheap_good;
+			}
+		},
+		// 监听图片加载完成
+		onImageError(key, index) {
+			this[key][index].image = '/static/error/errorImage.jpg';
+		},
+		// 请求载入数据
+		async loadData() {
+			loadIndexs({})
+				.then(({ data }) => {
+					let goods = data.info;
+					this.carouselList = data.banner;
+					this.swiperLength = this.carouselList.length;
+					this.bastList = data.giftInfo; //会员礼包
+					uni.stopPullDownRefresh();
+				})
+				.catch(e => {
+					uni.stopPullDownRefresh();
+				});
+		},
+		//轮播图切换修改背景色
+		swiperChange(e) {
+			const index = e.detail.current;
+			this.swiperCurrent = index;
+			this.titleNViewBackground = this.carouselList[index].background;
+		},
+		//详情页
+		navToDetailPage(item) {
+			let id = item.id;
+			uni.navigateTo({
+				url: '/pages/product/product?id=' + id + '&isVip=1'
+			});
+		},
+
+		// 轮播图跳转
+		bannerNavToUrl(item) {
+			// #ifdef H5
+				console.log(item.wap_url.indexOf('http'), 'banner');
+			if (item.wap_url.indexOf('http') >= 0) {
+				window.location.href = item.wap_url;
+			}
+			// #endif
+			//测试数据没有写id,用title代替
+			uni.navigateTo({
+				url: item.wap_url
+			});
+		}
+	}
+};
+</script>
+
+<style lang="scss">
+.carousel-section {
+	position: relative;
+	padding-top: 10px;
+	.bg {
+		position: absolute;
+		top: 0;
+		left: 0;
+		width: 750rpx;
+		height: 378rpx;
+		image {
+			width: 100%;
+			height: 100%;
+		}
+	}
+	.titleNview-placing {
+		height: var(--status-bar-height);
+		box-sizing: content-box;
+	}
+	.search {
+		justify-content: flex-start;
+		padding: 10rpx 32rpx 20rpx;
+		align-items: center;
+		.address {
+			width: 32rpx;
+			height: 38rpx;
+		}
+		.shop-name {
+			height: 38rpx;
+			position: relative;
+			top: -4rpx;
+			z-index: 100;
+			font-size: 30rpx;
+			font-family: PingFang SC;
+			font-weight: 500;
+			color: #ffffff;
+			padding-left: 10rpx;
+		}
+		.shop-jt {
+			margin-left: 8rpx;
+			width: 16rpx;
+			height: 10rpx;
+		}
+		.input-box {
+			margin-left: 10rpx;
+			position: relative;
+			z-index: 99;
+			width: 520rpx;
+			height: 60rpx;
+			background: rgba(255, 255, 255, 0.4);
+			border-radius: 30rpx;
+			.input-content {
+				position: relative;
+				z-index: 11;
+				border-radius: 99rpx;
+				flex-grow: 1;
+				padding: 5rpx 30rpx;
+				background: rgba(255, 255, 255, 0.4);
+				.iconsearch {
+					font-size: 50rpx;
+					color: #ffffff;
+				}
+				.input {
+					margin-left: 19rpx;
+					flex-grow: 1;
+					color: #ffffff;
+					input {
+						font-size: 28rpx;
+
+						color: #ffffff;
+					}
+				}
+			}
+			.input-button {
+				padding-left: 20rpx;
+				font-size: $font-base;
+				height: 100%;
+			}
+		}
+	}
+}
+.carousel {
+	position: relative;
+	z-index: 3;
+	width: 100%;
+	height: 360rpx;
+	.carousel-item {
+		width: 100%;
+		height: 100%;
+		padding: 0 28rpx;
+		overflow: hidden;
+	}
+	image {
+		width: 100%;
+		height: 100%;
+		border-radius: $border-radius-sm;
+	}
+}
+.navbar {
+	position: relative;
+	z-index: 2;
+	margin-top: -200rpx;
+	width: 750rpx;
+	height: 462rpx;
+	background: #ffffff;
+	border-radius: 40rpx;
+	.navbar-box {
+		padding-top: 250rpx;
+		.navbar-item {
+			display: flex;
+			flex-direction: column;
+			align-items: center;
+			width: 20%;
+			.nitem-image {
+				width: 98rpx;
+				height: 98rpx;
+			}
+			.nitem-font {
+				margin-top: 22rpx;
+				font-size: 26rpx;
+				font-family: PingFang SC;
+				font-weight: 500;
+				color: #000000;
+			}
+		}
+	}
+}
+.product-box {
+	margin-top: 20rpx;
+	background: #ffffff;
+	padding: 26rpx 30rpx 20rpx;
+	.product-title {
+		display: flex;
+		align-items: center;
+		.pt-image {
+			width: 36rpx;
+			height: 36rpx;
+		}
+		.pt-title {
+			margin-left: 8rpx;
+			font-size: 32rpx;
+			font-family: PingFang SC;
+			font-weight: bold;
+			color: #333333;
+		}
+		.pt-tip {
+			margin-left: 16rpx;
+			font-size: 20rpx;
+			font-family: PingFang SC;
+			font-weight: bold;
+			color: #95a0b1;
+		}
+	}
+	.hotgoods {
+		margin-top: 38rpx;
+		width: 100%;
+		display: flex;
+		flex-wrap: wrap;
+		padding: 0 0 30rpx;
+
+		.hotgoods-item {
+			width: 48%;
+			background-color: #ffffff;
+			border-radius: 12rpx;
+			&:nth-child(2n + 1) {
+				margin-right: 24rpx;
+			}
+			.image-wrapper {
+				width: 100%;
+				height: 330rpx;
+				border-radius: 3px;
+				overflow: hidden;
+				position: relative;
+				.image-bg {
+					position: absolute;
+					top: 0;
+					left: 0;
+					right: 0;
+					bottom: 0;
+					width: 100%;
+					height: 100%;
+					opacity: 1;
+					border-radius: 12rpx 12rpx 0 0;
+					z-index: 2;
+				}
+				.image {
+					width: 100%;
+					height: 100%;
+					opacity: 1;
+					border-radius: 12rpx 12rpx 0 0;
+				}
+			}
+			.title {
+				margin-top: 24rpx;
+				font-size: 28rpx;
+				font-family: PingFang SC;
+				font-weight: 500;
+				color: #333333;
+			}
+			.hot-price {
+				display: flex;
+				justify-content: flex-start;
+				align-items: center;
+				padding: 14rpx 0 30rpx;
+				.hotPrice-box {
+					width: 70rpx;
+					height: 28rpx;
+					background: linear-gradient(90deg, #c79a4c, #f9df7f);
+					border-radius: 5rpx;
+					text-align: center;
+					line-height: 28rpx;
+					font-size: 20rpx;
+					font-family: Source Han Sans CN;
+					font-weight: 400;
+					color: #ffffff;
+				}
+				.price {
+					margin-left: 10rpx;
+					font-size: 40rpx;
+					color: #ff0000;
+					font-weight: 500;
+				}
+				.yuanPrice {
+					margin-left: 10rpx;
+					font-size: 20rpx;
+					font-family: PingFang SC;
+					font-weight: 500;
+					text-decoration: line-through;
+					color: #999999;
+				}
+				.cart-icon {
+					image {
+						width: 44rpx;
+						height: 44rpx;
+					}
+				}
+			}
+		}
+	}
+}
+.shop {
+	margin-top: 20rpx;
+	background: #ffffff;
+	padding: 0 12rpx;
+	.shop-title {
+		padding: 30rpx 0 20rpx;
+		display: flex;
+		align-items: center;
+		border-bottom: 1px solid #e3e6e7;
+		.shop-item {
+			width: 25%;
+			display: flex;
+			align-items: center;
+			justify-content: center;
+			.sitem-font {
+				font-size: 26rpx;
+				font-family: PingFang SC;
+				font-weight: bold;
+				color: #333333;
+			}
+			.jt-down {
+				width: 10rpx;
+				height: 8rpx;
+				margin-left: 12rpx;
+			}
+		}
+	}
+}
+.shop-main {
+	padding: 32rpx 18rpx 0 12rpx;
+	align-items: flex-start;
+	justify-content: flex-start;
+	.main-left {
+		width: 180rpx;
+		height: 180rpx;
+		border-radius: 10rpx;
+	}
+	.main-right {
+		width: 500rpx;
+		justify-content: space-between;
+		align-items: flex-start;
+		margin-left: 20rpx;
+		padding: 13rpx 0 35rpx;
+		border-bottom: 1px solid #eaeced;
+		.shopm-info {
+			max-width: 60%;
+			line-height: 1;
+			.shopm-title {
+				display: flex;
+				justify-content: flex-start;
+				.shopmt-font {
+					font-size: 34rpx;
+					font-family: PingFang SC;
+					font-weight: bold;
+					color: #333333;
+				}
+				.shopmt-good {
+					margin-left: 6rpx;
+					width: 30rpx;
+					height: 30rpx;
+					border: 1px solid #ff4c4c;
+					border-radius: 5rpx;
+					font-size: 20rpx;
+					font-family: PingFang SC;
+					font-weight: 500;
+					color: #ff4c4c;
+					text-align: center;
+					line-height: 30rpx;
+				}
+			}
+			.address {
+				margin-top: 16rpx;
+				font-size: 24rpx;
+				font-family: PingFang SC;
+				font-weight: 500;
+				color: #666666;
+			}
+			.shopmt-tip {
+				position: relative;
+				display: inline-block;
+				flex-grow: 0;
+				margin-top: 52rpx;
+				padding: 8rpx;
+				background: #fcf3f0;
+				border-radius: 16rpx 16rpx 16rpx 0px;
+				font-size: 20rpx;
+				font-family: PingFang SC;
+				font-weight: 500;
+				color: #ff440d;
+			}
+		}
+		.right {
+			height: 100%;
+			margin-top: 5rpx;
+			display: flex;
+			flex-direction: column;
+			.mright-top {
+				display: flex;
+				justify-content: flex-end;
+				align-items: center;
+				.mrt-image {
+					width: 20rpx;
+					height: 28rpx;
+				}
+				.mrt-font {
+					margin-left: 8rpx;
+					font-size: 22rpx;
+					font-family: PingFang SC;
+					font-weight: 500;
+					color: #666666;
+				}
+			}
+			.mright-bottom {
+				margin-top: 80rpx;
+				display: flex;
+				justify-content: flex-end;
+				.mrb-item {
+					width: 46rpx;
+					height: 46rpx;
+					margin-left: 14rpx;
+				}
+			}
+		}
+	}
 }
-.shop-main {
-		padding: 32rpx 18rpx 0 12rpx;
-		align-items: flex-start;
-		justify-content: flex-start;
-		.main-left {
-			width: 180rpx;
-			height: 180rpx;
-			border-radius: 10rpx;
-		}
-		.main-right {
-			width: 500rpx;
-			justify-content: space-between;
-			align-items: flex-start;
-			margin-left: 20rpx;
-			padding: 13rpx 0 35rpx;
-			border-bottom: 1px solid #eaeced;
-			.shopm-info {
-				max-width: 60%;
-				line-height: 1;
-				.shopm-title {
-					display: flex;
-					justify-content: flex-start;
-					.shopmt-font {
-						font-size: 34rpx;
-						font-family: PingFang SC;
-						font-weight: bold;
-						color: #333333;
-					}
-					.shopmt-good {
-						margin-left: 6rpx;
-						width: 30rpx;
-						height: 30rpx;
-						border: 1px solid #ff4c4c;
-						border-radius: 5rpx;
-						font-size: 20rpx;
-						font-family: PingFang SC;
-						font-weight: 500;
-						color: #ff4c4c;
-						text-align: center;
-						line-height: 30rpx;
-					}
-				}
-				.address {
-					margin-top: 16rpx;
-					font-size: 24rpx;
-					font-family: PingFang SC;
-					font-weight: 500;
-					color: #666666;
-				}
-				.shopmt-tip {
-					position: relative;
-					display: inline-block;
-					flex-grow: 0;
-					margin-top: 52rpx;
-					padding: 8rpx;
-					background: #fcf3f0;
-					border-radius: 16rpx 16rpx 16rpx 0px;
-					font-size: 20rpx;
-					font-family: PingFang SC;
-					font-weight: 500;
-					color: #ff440d;
-				}
-			}
-			.right {
-				height: 100%;
-				margin-top: 5rpx;
-				display: flex;
-				flex-direction: column;
-				.mright-top {
-					display: flex;
-					justify-content: flex-end;
-					align-items: center;
-					.mrt-image {
-						width: 20rpx;
-						height: 28rpx;
-					}
-					.mrt-font {
-						margin-left: 8rpx;
-						font-size: 22rpx;
-						font-family: PingFang SC;
-						font-weight: 500;
-						color: #666666;
-					}
-				}
-				.mright-bottom {
-					margin-top: 80rpx;
-					display: flex;
-					justify-content: flex-end;
-					.mrb-item {
-						width: 46rpx;
-						height: 46rpx;
-						margin-left: 14rpx;
-					}
-				}
-			}
-		}
-	}
 </style>

+ 133 - 123
pages/index/sign.vue

@@ -1,26 +1,30 @@
 <template>
-	<view>
-		<view class="title-box">
-			<view class=" title-conetnt  position-relative">
-				<view class="title-img"><image src="/static/img/img08.png" mode="aspectFit"></image></view>
-				<view class="title-content-box">
-					<view class="title-text">已连续签到</view>
-					<view class="title-day-text">
-						<text class="title-day">{{actionDay}}</text>
-						<text>天</text>
-					</view>
-					<view class="title-button" :class="{'signAction':signTrue}" @click="signTrue?'':integral()">{{signTrue?'已签到':'立即签到'}}</view>
-				</view>
+	<view center>
+		<view class="title">天天领现金</view>
+		<view class="main after" v-if="signTrue">
+			<image class="main-bg" src="../../static/img/money-ok.png" mode=""></image>
+			<view class="num">{{ day_integral }}</view>
+		</view>
+		<view class="main before" v-if="!signTrue">
+			<image class="main-bg" src="../../static/img/money-bg.png" mode=""></image>
+			<view class="btn" :class="{ current: is_have }" @click="integral()">立即领取</view>
+		</view>
+		<view class="info-box flex">
+			<view class="info-item">
+				<view class="info-num">{{ sum_integral }}</view>
+				<view class="info-font">获得金额</view>
+			</view>
+			<view class="info-item">
+				<view class="info-num">{{ allSign }}</view>
+				<view class="info-font">公益池金额</view>
 			</view>
-			<view class="title-tip"><text>共获得{{sum_integral}}积分,总签到{{allSign}}天</text></view>
 		</view>
-		<!-- <calendar class="sign-date-box" :checks="signList" checksClass="" :checkTextShow="true" checksIcon="/static/img/img07.png"></calendar> -->
 	</view>
 </template>
 
 <script>
 import calendar from '../../components/ss-calendar/ss-calendar.vue';
-import { signList, integral,signUser } from '@/api/functionalUnit.js';
+import { signList, integral, signUser, my_award, get_award } from '@/api/functionalUnit.js';
 export default {
 	components: {
 		calendar
@@ -30,148 +34,154 @@ export default {
 			money: '', //保存当前月份
 			year: '', //保存当前年份
 			day: '', //保存当前日期
-			signList: [] ,//签到日子列表
-			actionDay:0,//连续签到天数
-			allSign:0,//累计签到
-			sum_integral:0,//累计获得积分
-			signTrue:false,
+			signList: [], //签到日子列表
+			actionDay: 0, //连续签到天数
+			allSign: 0, //累计签到
+			sum_integral: 0, //累计获得积分
+			day_integral: '', //今天签到的钱
+			signTrue: false,
+			is_have: true, //是否可领
+			id: ''
 		};
 	},
 	onLoad() {
 		this.signUser();
 		this.getData();
-		this.loadList();
 	},
 	methods: {
 		// 获取当前时间
 		getData(current) {
 			const date = current ? new Date(current) : new Date();
-			this.year = date.getFullYear();//保存当前年份
-			this.month = date.getMonth() + 1;//保存当前月份
-			this.day = date.getDate();//保存当前日期
+			this.year = date.getFullYear(); //保存当前年份
+			this.month = date.getMonth() + 1; //保存当前月份
+			this.day = date.getDate(); //保存当前日期
 		},
 		//获取签到用户信息
-		signUser(){
-			signUser({all:1}).then(({data}) => {
-				this.actionDay = data.sign_num;//连续签到天数
-				this.allSign = data.sum_sgin_day;//累计签到天数
-				this.sum_integral = data.sum_integral;//累计总积分
-			})
+		signUser() {
+			my_award().then(data => {
+				console.log(data);
+				this.sum_integral = data.data.all_get;
+				this.allSign = data.data.all_out;
+				if (data.data.todayAward != null) {
+					this.day_integral = data.data.todayAward.award; //今天获取的金额
+					this.id = data.data.todayAward.id;
+					this.is_have = false;
+				}
+				console.log(this.is_have);
+			});
 		},
 		// 签到
 		integral() {
-			integral({})
+			if(this.is_have){
+				return
+			}
+			console.log(111);
+			get_award({}, this.id)
 				.then(e => {
+					console.log(e);
 					// 改为已签到
 					this.signTrue = true;
-					this.actionDay++;
-					// 保存签到成功
-					this.signList.push(this.day);
-					uni.showToast({
-						title: '签到成功',
-						duration: 2000,
-						position: 'top'
-					});
 				})
 				.catch(e => {
 					console.log(e);
 				});
-		},
-		// 获取签到列表
-		loadList() {
-			let obj = this;
-			let present = this.day; //保存当前天数用于后续计算
-			let actionDay = 0; //用于计算活跃天数
-			let arr = []; //保存返回数组;
-			signList({
-				page: 1,
-				limit: 31
-			}).then(e => {
-				arr = e.data.map((e, ind) => {
-					let time = e.add_time.split('-');
-					let day = parseInt(time[2].replace(/^0/i, ''));
-					let year = time[0];
-					let month = +time[1];
-					if (obj.year == year && obj.month == month) {
-						return day;
-					}
-				});
-				this.signList = arr;
-				// 判断今天是否已经签到
-				if(arr[0]==this.day){
-					this.signTrue = true;
-				}
-			});
 		}
 	}
 };
 </script>
 
 <style lang="scss">
-page {
-	background: $page-color-base;
+page,
+.center {
+	height: auto;
+	min-height: 100%;
+	background: #ffdfd4;
+}
+.title {
+	padding-top: 66rpx;
+	text-align: center;
+	font-size: 94rpx;
+	font-family: SourceHanSansCN;
+	font-weight: bold;
+	color: #c85138;
+}
+.after {
+	padding-top: 230rpx;
 }
-.sign-date-box {
-	margin: 25rpx;
-	border-radius: 15rpx;
-	margin-top: -70rpx;
+.before {
+	padding-top: 590rpx;
 }
-.title-box {
-	background-color: $base-color;
-	padding-top: 120rpx;
-	color: #ffffff;
-	height: 590rpx;
-	.title-conetnt {
-		height: 350rpx;
-		width: 350rpx;
+.current {
+	color: #FFFFFF !important;
+	background: #989898 !important;
+}
+.main {
+	width: 750rpx;
+	height: 926rpx;
+	position: relative;
+	.main-bg {
+		position: absolute;
+		top: 0;
+		left: 0;
+		right: 0;
+		width: 750rpx;
+		height: 926rpx;
+	}
+	.num {
+		line-height: 1;
+		text-align: center;
+		font-size: 122rpx;
+		font-family: PingFang SC;
+		font-weight: bold;
+		color: #eb2749;
+		opacity: 0.9;
+	}
+	.btn {
+		position: relative;
 		margin: 0 auto;
+		z-index: 10;
+		width: 420rpx;
+		height: 76rpx;
+		background: linear-gradient(180deg, #fce9a8 0%, #fecd75 100%);
+		box-shadow: 0px 16rpx 16rpx 0px rgba(159, 20, 63, 0.3), 0px 2rpx 6rpx 0px #fef5d3;
+		border-radius: 38rpx;
+		font-size: 26rpx;
+		font-family: PingFang SC;
+		font-weight: bold;
+		color: #cb0908;
+		line-height: 76rpx;
 		text-align: center;
-		.title-img {
-			position: absolute;
-			top: 0;
-			left: 0;
-			height: 100%;
-			width: 100%;
-			image {
-				height: 100%;
-				width: 100%;
-			}
+	}
+}
+.info-box {
+	margin: 24rpx auto 0;
+	padding: 22rpx 0;
+	width: 640rpx;
+	height: 160rpx;
+	background: #ffffff;
+	box-shadow: 0px 0px 20rpx 0px rgba(50, 50, 52, 0.06);
+	border-radius: 20rpx;
+	.info-item {
+		width: 50%;
+		display: flex;
+		flex-direction: column;
+		align-items: center;
+		border-right: 1px solid #efefef;
+		line-height: 1;
+		.info-num {
+			font-size: 50rpx;
+			font-family: PingFang SC;
+			font-weight: bold;
+			color: #333333;
 		}
-		.title-content-box {
-			position: absolute;
-			width: 100%;
-			.title-day-text {
-				padding: 20rpx;
-				font-size: $font-base - 2rpx;
-				.title-day {
-					font-size: 60rpx;
-				}
-			}
-			.title-text {
-				font-size: 26rpx;
-				padding-top: 100rpx;
-			}
-			.title-button {
-				background-color: #fe7e51;
-				border-radius: 99rpx;
-				width: 200rpx;
-				height: 64rpx;
-				margin: 0 auto;
-				line-height: 64rpx;
-				text-align: center;
-				font-size: $font-base;
-				&.signAction{
-					background-color: $font-color-light;
-				}
-			}
+		.info-font {
+			margin-top: 20rpx;
+			font-size: 26rpx;
+			font-family: PingFang SC;
+			font-weight: 500;
+			color: #333333;
+			opacity: 0.6;
 		}
 	}
 }
-.title-tip {
-	color: #ffffff;
-	font-size: $font-base - 2rpx;
-	padding-top: 20rpx;
-	text-align: center;
-	margin-top: -40rpx;
-}
 </style>

+ 0 - 187
pages/index/sign1.vue

@@ -1,187 +0,0 @@
-<template>
-	<view center>
-		<view class="title">天天领现金</view>
-		<view class="main after" v-if="signTrue">
-			<image class="main-bg" src="../../static/img/money-ok.png" mode=""></image>
-			<view class="num">{{ day_integral }}</view>
-		</view>
-		<view class="main before" v-if="!signTrue">
-			<image class="main-bg" src="../../static/img/money-bg.png" mode=""></image>
-			<view class="btn" :class="{ current: is_have }" @click="integral()">立即领取</view>
-		</view>
-		<view class="info-box flex">
-			<view class="info-item">
-				<view class="info-num">{{ sum_integral }}</view>
-				<view class="info-font">获得金额</view>
-			</view>
-			<view class="info-item">
-				<view class="info-num">{{ allSign }}</view>
-				<view class="info-font">公益池金额</view>
-			</view>
-		</view>
-	</view>
-</template>
-
-<script>
-import calendar from '../../components/ss-calendar/ss-calendar.vue';
-import { signList, integral, signUser, my_award, get_award } from '@/api/functionalUnit.js';
-export default {
-	components: {
-		calendar
-	},
-	data() {
-		return {
-			money: '', //保存当前月份
-			year: '', //保存当前年份
-			day: '', //保存当前日期
-			signList: [], //签到日子列表
-			actionDay: 0, //连续签到天数
-			allSign: 0, //累计签到
-			sum_integral: 0, //累计获得积分
-			day_integral: '', //今天签到的钱
-			signTrue: false,
-			is_have: true, //是否可领
-			id: ''
-		};
-	},
-	onLoad() {
-		this.signUser();
-		this.getData();
-	},
-	methods: {
-		// 获取当前时间
-		getData(current) {
-			const date = current ? new Date(current) : new Date();
-			this.year = date.getFullYear(); //保存当前年份
-			this.month = date.getMonth() + 1; //保存当前月份
-			this.day = date.getDate(); //保存当前日期
-		},
-		//获取签到用户信息
-		signUser() {
-			my_award().then(data => {
-				console.log(data);
-				this.sum_integral = data.data.all_get;
-				this.allSign = data.data.all_out;
-				if (data.data.todayAward != null) {
-					this.day_integral = data.data.todayAward.award; //今天获取的金额
-					this.id = data.data.todayAward.id;
-					this.is_have = false;
-				}
-				console.log(this.is_have);
-			});
-		},
-		// 签到
-		integral() {
-			if(is_have){
-				return
-			}
-			console.log(111);
-			get_award({}, this.id)
-				.then(e => {
-					console.log(e);
-					// 改为已签到
-					this.signTrue = true;
-				})
-				.catch(e => {
-					console.log(e);
-				});
-		}
-	}
-};
-</script>
-
-<style lang="scss">
-page,
-.center {
-	height: auto;
-	min-height: 100%;
-	background: #ffdfd4;
-}
-.title {
-	padding-top: 66rpx;
-	text-align: center;
-	font-size: 94rpx;
-	font-family: SourceHanSansCN;
-	font-weight: bold;
-	color: #c85138;
-}
-.after {
-	padding-top: 230rpx;
-}
-.before {
-	padding-top: 590rpx;
-}
-.current {
-	color: #FFFFFF !important;
-	background: #989898 !important;
-}
-.main {
-	width: 750rpx;
-	height: 926rpx;
-	position: relative;
-	.main-bg {
-		position: absolute;
-		top: 0;
-		left: 0;
-		right: 0;
-		width: 750rpx;
-		height: 926rpx;
-	}
-	.num {
-		line-height: 1;
-		text-align: center;
-		font-size: 122rpx;
-		font-family: PingFang SC;
-		font-weight: bold;
-		color: #eb2749;
-		opacity: 0.9;
-	}
-	.btn {
-		position: relative;
-		margin: 0 auto;
-		z-index: 10;
-		width: 420rpx;
-		height: 76rpx;
-		background: linear-gradient(180deg, #fce9a8 0%, #fecd75 100%);
-		box-shadow: 0px 16rpx 16rpx 0px rgba(159, 20, 63, 0.3), 0px 2rpx 6rpx 0px #fef5d3;
-		border-radius: 38rpx;
-		font-size: 26rpx;
-		font-family: PingFang SC;
-		font-weight: bold;
-		color: #cb0908;
-		line-height: 76rpx;
-		text-align: center;
-	}
-}
-.info-box {
-	margin: 24rpx auto 0;
-	padding: 22rpx 0;
-	width: 640rpx;
-	height: 160rpx;
-	background: #ffffff;
-	box-shadow: 0px 0px 20rpx 0px rgba(50, 50, 52, 0.06);
-	border-radius: 20rpx;
-	.info-item {
-		width: 50%;
-		display: flex;
-		flex-direction: column;
-		align-items: center;
-		border-right: 1px solid #efefef;
-		line-height: 1;
-		.info-num {
-			font-size: 50rpx;
-			font-family: PingFang SC;
-			font-weight: bold;
-			color: #333333;
-		}
-		.info-font {
-			margin-top: 20rpx;
-			font-size: 26rpx;
-			font-family: PingFang SC;
-			font-weight: 500;
-			color: #333333;
-			opacity: 0.6;
-		}
-	}
-}
-</style>

+ 2 - 1
pages/money/pay.vue

@@ -322,7 +322,8 @@ export default {
 				// #ifdef APP-PLUS
 				from: 'app', //来源
 				// #endif
-				shipping_type: 1 //提货方式 1 快递 2自提
+				shipping_type: prepage.tabCurrentIndex + 1, //提货方式 1 快递 2自提
+				store_id: prepage.tabCurrentIndex == 1 ? prepage.shopAddress.id : '',
 			};
 			// 判断是否拼团商品
 			if (obj.pinkid) {

+ 4 - 4
pages/money/wallet.vue

@@ -4,19 +4,19 @@
 			<view class="status_bar"><!-- 这里是状态栏 --></view>
 			<view class="body-title">
 				<view class="goback-box" @click="toBack"><image class="goback" src="../../static/icon/fanhui.png" mode=""></image></view>
-				<view class="header">我的余额</view>
+				<view class="header">我的易货券</view>
 			</view>
 			<view class="content-bg"><image src="../../static/img/myyue.png" mode=""></image></view>
 			<view class="money-box">
 				<view class="money">{{money | getMoneyStyle}}</view>
-				<view>我的余额</view>
+				<view>我的易货券</view>
 			</view>
 			<view class="moneybtn-box">
 				<view class="money-btn" @click="navto('/pages/money/withdmoenys?type=yue')">
-					余额转账
+					易货券转账
 				</view>
 				<view class="money-btn" @click="navto('/pages/money/recharge')">
-					余额充值
+					易货券充值
 				</view>
 			</view>
 		</view>

+ 49 - 12
pages/order/createOrder.vue

@@ -1,8 +1,8 @@
 <template>
 	<view>
-		<!-- <view class="navbar">
+		<view class="navbar">
 			<view v-for="(item, index) in navList" :key="index" class="nav-item" :class="{ current: tabCurrentIndex === index }" @click="tabClick(index)">{{ item.text }}</view>
-		</view> -->
+		</view>
 
 		<!-- 地址 -->
 		<navigator v-if="tabCurrentIndex == 0" url="/pages/set/address?source=1" class="address-section">
@@ -26,7 +26,7 @@
 
 			<image class="a-bg" :src="addressImg"></image>
 		</navigator>
-		<navigator v-if="tabCurrentIndex == 1" url="/pages/address/shopList" class="address-section">
+		<navigator v-if="tabCurrentIndex == 1" url="/pages/shoping/list?type=4" class="address-section">
 			<view class="order-content" v-if="shopAddress.name">
 				<text class="iconfont iconlocation"></text>
 				<view class="cen">
@@ -100,6 +100,14 @@
 			<view class="yt-list-cell b-b">
 				<text class="cell-tit clamp">运费</text>
 				<text class="cell-tip">{{ Postage }}</text>
+			</view>
+			<view class="yt-list-cell desc-cell" v-if="tabCurrentIndex == 1">
+				<text class="cell-tit clamp">姓名</text>
+				<input class="desc" type="text" v-model="pickUpInfo.real_name" placeholder="收货人姓名" placeholder-class="placeholder" />
+			</view>
+			<view class="yt-list-cell desc-cell" v-if="tabCurrentIndex == 1">
+				<text class="cell-tit clamp">手机</text>
+				<input class="desc" type="text" v-model="pickUpInfo.phone" placeholder="联系手机号" placeholder-class="placeholder" />
 			</view>
 			<view class="yt-list-cell b-b">
 				<text class="cell-tit clamp">备注</text>
@@ -184,7 +192,12 @@ export default {
 			couponListshow: false, //是有可以显示优惠券列表
 			couponChecked: {}, //选中的优惠券
 			// 收货地址
-			addressData: {},
+			addressData: {},
+			// 提货个人信息
+			pickUpInfo: {
+				real_name: '',
+				phone: ''
+			},
 			// 店铺地址
 			shopAddress: {
 				name: '',
@@ -195,7 +208,8 @@ export default {
 				default: false
 			},
 			// 商品列表
-			shopList: [],
+			shopList: [],
+			system_store: [], //到店自提列表仓库
 			// 购物车id
 			cartId: '',
 			//购物金额详情
@@ -273,8 +287,13 @@ export default {
 		},
 		// 加载用户基础信息
 		userinfo() {
-			userinfo({}).then(({ data }) => {
-				this.integralAll = data.integral;
+			userinfo({}).then(({ data }) => {
+				let ob = this;
+				ob.integralAll = data.integral;
+				// 保存默认提货人姓名
+				ob.pickUpInfo.real_name = data.nickname;
+				// 保存默认提货人手机号
+				ob.pickUpInfo.phone = data.phone;
 			});
 		},
 		// 计算支付金额
@@ -319,7 +338,8 @@ export default {
 		},
 		//顶部tab点击
 		tabClick(index) {
-			this.tabCurrentIndex = index;
+			this.tabCurrentIndex = index;
+			this.addressData = {};
 		},
 		//显示优惠券面板
 		toggleMask(type) {
@@ -332,11 +352,15 @@ export default {
 		},
 		loadData() {
 			let obj = this;
-			confirm({ cartId: obj.cartId+'' }).then(({ data }) => {
+			confirm({ cartId: obj.cartId+'' }).then(({ data }) => {
+				console.log(data,'123456');
 				obj.addressData = data.addressInfo || {};
 				obj.shopList = data.cartInfo; //商品列表
 				obj.moneyAll = data.priceGroup; //金额数据
-				obj.orderKey = data.orderKey; //订单key
+				obj.orderKey = data.orderKey; //订单key
+				(obj.system_store = data.system_store), //到店自提列表
+					obj.shopAddress = data.system_store //选中的地址
+					obj.shopAddress.address = obj.shopAddress.address.join(',')
 				// 计算金额
 				this.payMoneyNub();
 				// 加载优惠券
@@ -352,14 +376,27 @@ export default {
 			this.payType = type;
 		},
 		// 提交订单
-		submit() {
+		submit() {
+			let obj = this
 			if (this.checkedPoints && this.shopList.length > 1) {
 				this.$api.msg('积分商品只可单件购买');
 				return false;
 			}
-			if (!this.addressData.real_name) {
+			if (!this.addressData.real_name && this.tabCurrentIndex == 0) {
 				this.$api.msg('请选择收货地址');
 				return false;
+			}
+			if (obj.tabCurrentIndex === 1) {
+				if (!obj.pickUpInfo.real_name) {
+					obj.$api.msg('请填写用户名');
+					return false;
+				}
+				if (!obj.pickUpInfo.phone) {
+					obj.$api.msg('请填写手机号');
+					return false;
+				}
+				obj.addressData.real_name = obj.pickUpInfo.real_name;
+				obj.addressData.phone = obj.pickUpInfo.phone;
 			}
 			let url =  '/pages/money/pay?key='+ this.orderKey + '&isP=' + this.isP
 			if(this.pinkid){

+ 230 - 22
pages/product/list.vue

@@ -20,7 +20,16 @@
 		</view>
 		<view class="goods-list">
 			<view v-for="(item, index) in goodsList" :key="index" class="goods-item" @click="navToDetailPage(item)">
-				<view class="image-wrapper"><image :src="item.image" mode="aspectFill"></image></view>
+				<view class="image-wrapper">
+					<image :src="item.image" mode="aspectFill"></image>
+					<view class="fanli" v-if="item.give_integral != 0">
+						<view class="fanli-bg"><image src="../../static/img/index-fanl.png" mode=""></image></view>
+						<view class="fanli-font flex">
+							<view class="font-left">获得响亮积分</view>
+							<view class="font-right">{{ item.give_integral * 1 }}</view>
+						</view>
+					</view>
+				</view>
 				<text class="title clamp">{{ item.store_name }}</text>
 				<view class="price-box">
 					<text class="price">{{ item.price }}</text>
@@ -31,7 +40,23 @@
 		<uni-load-more :status="loadingType"></uni-load-more>
 
 		<view class="cate-mask" :class="cateMaskState === 0 ? 'none' : cateMaskState === 1 ? 'show' : ''" @click="toggleCateMask">
-			<view class="cate-content" @click.stop.prevent="stopPrevent" @touchmove.stop.prevent="stopPrevent">
+			<view class="cate-content">
+				<scroll-view scroll-y class="left-aside">
+					<view v-for="item in cateList" :key="item.id" class="f-item b-b" :class="{ active: item.id === currentId }" @click.stop="tabtap(item)">{{ item.cate_name }}</view>
+				</scroll-view>
+				<scroll-view scroll-with-animation scroll-y class="right-aside" @scroll="asideScroll" :scroll-top="tabScrollTop">
+					<view v-for="item in cateList" :key="item.id" class="s-list" :id="'main-' + item.id">
+						<text class="s-item">{{ item.cate_name }}</text>
+						<view class="t-list ">
+							<view @click.stop="changeCate(titem)" class="t-item" v-for="titem in item.children" :key="titem.id">
+								<image :src="titem.pic"></image>
+								<text>{{ titem.cate_name }}</text>
+							</view>
+						</view>
+					</view>
+				</scroll-view>
+			</view>
+			<!-- <view class="cate-content" @click.stop.prevent="stopPrevent" @touchmove.stop.prevent="stopPrevent">
 				<scroll-view scroll-y class="cate-list">
 					<view v-for="item in cateList" :key="item.id">
 						<view class="cate-item b-b two">{{ item.cate_name }}</view>
@@ -40,7 +65,7 @@
 						</view>
 					</view>
 				</scroll-view>
-			</view>
+			</view> -->
 		</view>
 	</view>
 </template>
@@ -55,6 +80,8 @@ export default {
 	},
 	data() {
 		return {
+			currentId: '',
+			tabScrollTop: 0,
 			cateMaskState: 0, //分类面板展开状态
 			headerPosition: 'fixed',
 			headerTop: '0px',
@@ -100,11 +127,78 @@ export default {
 			let obj = this;
 			getCategoryList({}).then(function(e) {
 				obj.cateList = e.data.filter(e => {
-					return e.id != 1
-				})
-				console.log(obj.cateList,"123456789");
+					return e.id != 1;
+				});
+				obj.currentId = obj.cateList[0].id
+				console.log(obj.cateList, '123456789');
 			});
 		},
+		//一级分类点击
+		tabtap(item) {
+			console.log(item);
+			// 判断有没有初始化页面高度对象数据
+			if (!this.sizeCalcState) {
+				this.calcSize();
+			}
+			// 获取当前点击的id
+			this.currentId = item.id;
+			console.log(item.top);
+			this.tabScrollTop = item.top;
+			console.log(this.tabScrollTop);
+		},
+		//右侧栏滚动
+		asideScroll(e) {
+			// 判断有没有初始化页面高度对象数据
+			if (!this.sizeCalcState) {
+				this.calcSize();
+			}
+			let scrollTop = e.detail.scrollTop;
+			let box = 0; //列表包裹框高度初始化
+			let bottom = 10; //距离页面底部多少像素左侧列表切换到最后一个一级分类
+			// 查询当前页面对象
+			let view = uni.createSelectorQuery().select('.content');
+			view.fields(
+				{
+					id: true,
+					dataset: true,
+					rect: true,
+					size: true,
+					scrollOffset: true
+				},
+				function(e) {
+					// 保存包裹框高度
+					box = e.height;
+				}
+			).exec();
+			// 获取所有距离顶部大于滚轮距离页面高度的所有分类
+			let tabs = this.cateList.filter(item =>( item.top-10) <= scrollTop).reverse();
+			if (tabs.length > 0) {
+				// 判断是否已经到达滚轮底部
+				if (box + scrollTop + bottom >= e.detail.scrollHeight) {
+					this.currentId = this.cateList[this.cateList.length - 1].id;
+				} else {
+					this.currentId = tabs[0].id;
+				}
+			}
+		},
+		//计算右侧栏每个tab的高度等信息
+		calcSize() {
+			let h = 0;
+			this.cateList.forEach(item => {
+				let view = uni.createSelectorQuery().select('#main-' + item.id);
+				view.fields(
+					{
+						size: true
+					},
+					data => {
+						item.top = h;
+						h += data.height;
+						item.bottom = h;
+					}
+				).exec();
+			});
+			this.sizeCalcState = true;
+		},
 		//加载商品 ,带下拉刷新和上滑加载
 		async loadData(type = 'add', loading) {
 			let obj = this;
@@ -125,28 +219,28 @@ export default {
 			if (type === 'refresh') {
 				// 清空数组
 				obj.goodsList = [];
-				obj.page = 1
+				obj.page = 1;
 			}
 			if (this.filterIndex == 1) {
-				console.log( obj.salesOrder);
+				console.log(obj.salesOrder);
 				data.salesOrder = obj.numberOrder == 1 ? 'asc' : 'desc';
 			}
 			if (this.filterIndex == 2) {
-				console.log( obj.priceOrder);
+				console.log(obj.priceOrder);
 				data.priceOrder = obj.priceOrder == 1 ? 'asc' : 'desc';
 			}
 			getProducts(data).then(function(e) {
 				console.log(e.data);
 				let arr = e.data.filter(info => {
-					return (info.cate_id != 2)
-				})
+					return info.cate_id != 2;
+				});
 				obj.goodsList = obj.goodsList.concat(arr);
 				//判断是否还有下一页,有是more  没有是nomore
-				if (obj.limit==e.data.length) {
-					obj.page++
-					obj.loadingType='more'
-				} else{
-					obj.loadingType='nomore'
+				if (obj.limit == e.data.length) {
+					obj.page++;
+					obj.loadingType = 'more';
+				} else {
+					obj.loadingType = 'nomore';
 				}
 				if (type === 'refresh') {
 					if (loading == 1) {
@@ -204,7 +298,7 @@ export default {
 				scrollTop: 0
 			});
 			// 初始化查询页数
-			this.page = 1
+			this.page = 1;
 			// 重新加载数据
 			this.loadData('refresh', 1);
 			uni.showLoading({
@@ -217,8 +311,7 @@ export default {
 			uni.navigateTo({
 				url: `/pages/product/product?id=${id}`
 			});
-		},
-		stopPrevent() {}
+		}
 	}
 };
 </script>
@@ -252,7 +345,7 @@ page,
 		color: $font-color-dark;
 		position: relative;
 		&.current {
-			color: #FF4C4C;
+			color: #ff4c4c;
 			&:after {
 				content: '';
 				position: absolute;
@@ -261,7 +354,7 @@ page,
 				transform: translateX(-50%);
 				width: 150rpx;
 				height: 0;
-				border-bottom: 4rpx solid #FF4C4C;
+				border-bottom: 4rpx solid #ff4c4c;
 			}
 		}
 	}
@@ -325,6 +418,83 @@ page,
 		float: right;
 		transform: translateX(100%);
 		transition: 0.3s;
+		display: flex;
+		.left-aside {
+			flex-shrink: 0;
+			width: 200rpx;
+			height: 100%;
+			background-color: #fff;
+		}
+		.f-item {
+			display: flex;
+			align-items: center;
+			justify-content: center;
+			width: 100%;
+			height: 100rpx;
+			font-size: 28rpx;
+			color: $font-color-base;
+			position: relative;
+			&.active {
+				color: $base-color;
+				background: #f8f8f8;
+				&:before {
+					content: '';
+					position: absolute;
+					left: 0;
+					top: 50%;
+					transform: translateY(-50%);
+					height: 36rpx;
+					width: 8rpx;
+					background-color: $base-color;
+					border-radius: 0 4px 4px 0;
+					opacity: 0.8;
+				}
+			}
+		}
+		
+		.right-aside {
+			flex: 1;
+			overflow: hidden;
+			padding-left: 20rpx;
+			padding-right: 20rpx;
+		}
+		.s-item {
+			display: flex;
+			align-items: center;
+			height: 70rpx;
+			padding-top: 8rpx;
+			font-size: 28rpx;
+			color: $font-color-dark;
+		}
+		.t-list {
+			display: flex;
+			flex-wrap: wrap;
+			border-radius: 15rpx;
+			width: 100%;
+			background: #fff;
+			padding-top: 12rpx;
+			&:after {
+				content: '';
+				flex: 99;
+				height: 0;
+			}
+		}
+		.t-item {
+			flex-shrink: 0;
+			display: flex;
+			justify-content: center;
+			align-items: center;
+			flex-direction: column;
+			width: 171rpx;
+			font-size: 26rpx;
+			color: #666;
+			padding-bottom: 20rpx;
+		
+			image {
+				width: 140rpx;
+				height: 140rpx;
+			}
+		}
 	}
 	&.none {
 		display: none;
@@ -381,11 +551,49 @@ page,
 		height: 330rpx;
 		border-radius: 3px;
 		overflow: hidden;
+		position: relative;
 		image {
 			width: 100%;
 			height: 100%;
 			opacity: 1;
 		}
+		.fanli {
+			position: absolute;
+			bottom: 0;
+			left: 0;
+			width: 344rpx;
+			height: 96rpx;
+			.fanli-bg {
+				position: absolute;
+				bottom: 0;
+				left: 0;
+				width: 344rpx;
+				height: 96rpx;
+			}
+			.fanli-font {
+				position: relative;
+				z-index: 10;
+				color: #ffffff;
+				height: 96rpx;
+				align-items: flex-end;
+				padding: 36rpx 10rpx 10rpx;
+				.font-left {
+					width: 226rpx;
+					font-size: 20rpx;
+					font-family: PingFang SC;
+					font-weight: 500;
+					color: #ffffff;
+				}
+				.font-right {
+					width: 118rpx;
+					text-align: center;
+					font-size: 36rpx;
+					font-family: Microsoft YaHei;
+					font-weight: bold;
+					color: #ffffff;
+				}
+			}
+		}
 	}
 	.title {
 		font-size: $font-lg;
@@ -402,7 +610,7 @@ page,
 	}
 	.price {
 		font-size: $font-lg;
-		color: #FF4C4C;
+		color: #ff4c4c;
 		line-height: 1;
 		&:before {
 			content: '¥';

+ 10 - 1
pages/product/product.vue

@@ -78,6 +78,7 @@ import uniNumberBox from '@/components/uni-number-box.vue';
 import { goodsDetail, cartAdd } from '@/api/product.js';
 import { mapState } from 'vuex';
 import store from '@/store/index.js';
+import { orderData, userinfo } from '@/api/user.js';
 import { saveUrl } from '@/utils/loginUtils.js';
 // #ifdef H5
 import { weixindata, shareLoad } from '@/utils/wxAuthorized';
@@ -177,7 +178,11 @@ export default {
 	},
 	async onLoad(options) {
 		let obj = this;
-		obj.userInfo = uni.getStorageSync('userInfo');
+		userinfo({})
+			.then(({ data }) => {
+				obj.userInfo = data;
+				console.log(data,"123456")
+			})
 		//保存商品id
 		this.goodsid = options.id;
 		this.goodsType = options.type;
@@ -285,6 +290,10 @@ export default {
 				url: '/pages/coupon/getcoupon'
 			});
 		},
+		// 购买数量变化
+		numberChange(e) {
+			this.goodsNumber = e.number;
+		},
 		// #ifdef H5
 		// 加载微信html5页面分享方法
 		shareDate() {

+ 1 - 1
pages/set/phone.vue

@@ -151,7 +151,7 @@ page {
 	background-color: $color-gray;
 }
 .code {
-	color: #5dbc7c;
+	color: #f65067;
 	font-size: 23rpx;
 	border-left: 1px solid #eeeeee;
 	width: 150rpx;

+ 262 - 0
pages/shoping/list.vue

@@ -0,0 +1,262 @@
+<template>
+	<view class="content">
+		<view class="varHeight"></view>
+		<view class="jg" style="height: 20rpx;"></view>
+		<block :key="ind" v-for="(lss, ind) in list">
+			<view class="goodsList-item" v-if="lss.show" @click="chooseStore(lss)">
+				<view class="info-top flex">
+					<image :src="lss.image" lazy-load mode="scaleToFill"></image>
+					<view class="store-name clamp2">
+						{{lss.name}}
+					</view>
+				</view>
+				<view class="tag">
+					门店
+				</view>
+				<view class="goodsList-content">
+					<view class="info-tit">地区:<text class="info-val">{{lss.address}}</text></view>
+					<view class="info-tit">电话:<text class="info-val">{{lss.phone }}</text></view>
+					<view class="info-tit">地址:<text class="info-val">{{lss.detailed_address}}</text></view>
+				</view>
+			</view>
+		</block>
+		<view class="jg" style="height: 20rpx;"></view>
+	</view>
+</template>
+<script>
+import { mapState, mapMutations } from 'vuex';
+import { store_list } from '@/api/index.js';
+export default {
+	data() {
+		return {
+			// 当前选中的滑块
+			list: [],
+			keyword: '' ,//查询中的内容
+			type: 0,//3->开通会员选择门店  4->自提选择门店  5->附近门店进入不做任何操作
+		};
+	},
+	watch: {
+		keyword(newValue, oldValue) {
+			this.keyword = newValue;
+			console.log(newValue);
+			this.search();
+		}
+	},
+	computed: {
+		...mapState(['latitude','longitude'])
+	},
+	onLoad(opt) {
+		if(opt.type) {
+			this.type = opt.type
+		}
+		this.getShoping();
+	},
+	// #ifndef MP
+	// 点击键盘搜索事件
+	onNavigationBarSearchInputConfirmed(e) {
+		this.search();
+	},
+	// 搜索栏内容变化事件
+	onNavigationBarSearchInputChanged(e) {
+		this.keyword = e.text;
+	},
+	// #endif
+	methods: {
+		...mapMutations(['setLat', 'setLon','setStoreInfo']),
+		// 查询店铺信息
+		search(title) {
+			let obj = this;
+			obj.list.forEach(e => {
+				if (e.title.indexOf(obj.keyword) >= 0) {
+					e.show = true;
+				} else {
+					e.show = false;
+				}
+			});
+		},
+		// 跳转店铺页面
+		navProduct(item) {
+			uni.navigateTo({
+				url: './index?merid=' + item.id
+			});
+		},
+		//获取商店信息
+		getShoping() {
+			let obj = this;
+			console.log(obj.longitude,obj.latitude)
+			store_list({})
+				.then(function({ data }) {
+					console.log(data)
+					obj.list = data.list.map(e => {
+						e.show = true;
+						return e;
+					});
+				})
+				.catch(e => {
+					console.log(e);
+				});
+		},
+		//选择门店
+		chooseStore(item) {
+			if(this.type == 3) {
+				this.$api.prePage().storeInfo = item
+				uni.navigateBack({
+					
+				})
+			}else if(this.type == 4) {
+				this.$api.prePage().shopAddress = item
+				uni.navigateBack({
+					
+				})
+				
+			}else if(this.type == 5) {
+				
+			}else {
+				this.setStoreInfo(item)
+				uni.navigateBack({
+					
+				})
+			}
+			
+		}
+	}
+};
+</script>
+
+<style lang="scss">
+page,
+.content {
+	height: 100%;
+}
+.varHeight {
+	height: var(--status-bar-height);
+}
+$slider-color: #fe9398; //滑块左侧颜色
+.goodsList-item {
+	// background-color: #ffffff;
+	// padding: 30rpx;
+	// border-bottom: 1px solid $border-color-light;
+	margin: 0 auto 20rpx;
+	width: 710rpx;
+	height: 231rpx;
+	padding: 25rpx 20rpx;
+	background: #FFFFFF;
+	box-shadow: 0px 0px 20rpx 0px rgba(50, 50, 52, 0.06);
+	border-radius: 10rpx;
+	position: relative;
+	.tag {
+		width: 60rpx;
+		line-height: 40rpx;
+		background: #FF6F0F;
+		border-radius: 5rpx;
+		font-size: 24rpx;
+		font-family: PingFang SC;
+		font-weight: 500;
+		color: #FFFFFF;
+		text-align: center;
+		position: absolute;
+		top: 25rpx;
+		right: 20rpx;
+	}
+	.info-top {
+		justify-content: flex-start;
+		.store-name {
+			max-width: 500rpx;
+			font-size: 32rpx;
+			font-family: PingFang SC;
+			font-weight: bold;
+			color: #333333;
+			padding-left: 11rpx;
+		}
+	}
+	image {
+		flex-shrink: 0;
+		// border-radius: $border-radius-sm;
+		// height: 180rpx;
+		// width: 180rpx;
+		width: 65rpx;
+		height: 65rpx;
+		border-radius: 50%;
+	}
+	.slider {
+		margin-top: 15rpx;
+		justify-content: flex-start;
+		.slider-box {
+			width: 196rpx;
+			border-radius: 99px;
+			border: 1px solid $slider-color;
+			height: 16rpx;
+			.slider-action {
+				background-color: $slider-color;
+				height: 100%;
+			}
+		}
+		.sales-nub {
+			color: $font-color-light;
+			font-size: 24rpx;
+			height: 2.5em;
+			overflow: hidden;
+		}
+	}
+	.goodsList-content {
+		// margin-left: 20rpx;
+		flex-grow: 1;
+		// height: 180rpx;
+		position: relative;
+		padding-top: 20rpx;
+		.info-tit {
+			line-height: 1.5;
+			font-size: 24rpx;
+			font-family: PingFang SC;
+			font-weight: bold;
+			color: #333333;
+			.info-val {
+				font-weight: 500;
+				
+			}
+		}
+		.title {
+			font-size: $font-base;
+			color: $font-color-dark;
+			font-weight: 500;
+			width: 0;
+			min-width: 100%;
+		}
+		.goods-money {
+			position: absolute;
+			left: 0;
+			bottom: 0;
+			width: 100%;
+			.money-box {
+				.money {
+					font-size: $font-lg + 10rpx;
+					color: $color-red;
+					font-weight: bold;
+				}
+				.otMoney-box {
+					font-size: $font-sm;
+					.otMoney {
+						color: $font-color-light;
+						padding-right: 20rpx;
+					}
+					.sales {
+						color: $font-color-light;
+					}
+				}
+			}
+			.cart {
+				font-size: $font-base - 2rpx;
+				border-radius: 99px;
+				padding: 10rpx 20rpx;
+				line-height: 1;
+				color: #ffffff;
+				background-color: $color-gray;
+				&.seckill-action {
+					border: 1px solid $color-red;
+					background-color: $color-red;
+				}
+			}
+		}
+	}
+}
+</style>

+ 114 - 38
pages/user/award.vue

@@ -5,20 +5,32 @@
 				<!-- 这里是状态栏 -->
 			</view>
 			<view class="body-title">
+
 				<view class="goback-box" @click="toBack">
 					<image class="goback" src="../../static/icon/fanhui.png" mode=""></image>
 				</view>
 				<view class="header">我的补贴券</view>
+
+				<view class="goback-box" @click="toBack">
+					<image class="goback" src="../../static/icon/fanhui.png" mode=""></image>
+				</view>
+				<view class="header">我的消费补贴券</view>
+
 			</view>
 			<view class="content-bg">
 				<image src="../../static/img/yongjin-bg.png" mode=""></image>
 			</view>
 			<view class="money-box">
+
 				<view class="money">111</view>
 				<view>我的补贴券</view>
+
+				<view class="money">{{ userInfo.brokerage_price }}</view>
+				<view>我的消费补贴券</view>
+
 			</view>
 			<view class="money-btn" @click="navto('/pages/money/withdrawal')">
-				补贴券转换
+				消费补贴券转换
 				<text>></text>
 			</view>
 		</view>
@@ -34,18 +46,17 @@
 			</view>
 		</view>
 		<view class="navbar">
-			<view  class="nav-item"
-				 @click="tabClick(index)"></view>
+			<view class="nav-item" @click="tabClick(index)"></view>
 		</view>
 		<swiper :current="tabCurrentIndex" :style="{ height: maxheight }" class="swiper-box" duration="300"
 			@change="changeTab">
-			<swiper-item class="tab-content"  >
+			<swiper-item class="tab-content">
 				<scroll-view scroll-y="true" class="list-scroll-content" @scrolltolower="loadData">
 					<!-- 空白页 -->
 
 					<!-- 订单列表 -->
 					<view>
-						<view class="order-item flex" >
+						<view class="order-item flex">
 							<view class="title-box">
 								<view class="title">
 									<text></text>
@@ -56,7 +67,7 @@
 							</view>
 							<view class="money">
 								<view></view>
-								<view ></view>
+								<view></view>
 							</view>
 						</view>
 					</view>
@@ -136,7 +147,8 @@
 				money: ''
 			};
 		},
-		
+
+
 		onShow() {
 			this.loadData();
 		},
@@ -144,36 +156,100 @@
 			// 页面跳转
 			navto(e) {
 				uni.navigateTo({
-					url: e
-				});
-			},
-			// 点击返回 我的页面
-			toBack() {
-				uni.navigateBack({});
-			},
-			//获取收入支出信息
-			async loadData(){
-				let obj = this
-				// obj.state = order
-				spreadCommission(
-				{
-					limit:10,
-					page:1,
-					
-				}).then(({data})=>{
-					console.log(data,'列表数据');
-					obj.orderStatusSum = data.expend
-					obj.recharge = data.income
-					console.log(data.income);
-				})
-				
+						url: e
+					})
+
+				},
+				//获取收入支出信息
+				async loadData(source) {
+						let obj = this;
+						//这里是将订单挂载到tab列表下
+						let index = this.tabCurrentIndex;
+						let navItem = this.navList[index];
+						let state = navItem.state + 3;
+						if (source === 'tabChange' && navItem.loaded === true) {
+							//tab切换只有第一次需要加载数据
+							return;
+						}
+						if (navItem.loadingType === 'loading') {
+							//防止重复加载
+							return;
+						}
+						// 修改当前对象状态为加载中
+						navItem.loadingType = 'loading';
+
+						spreadCommission({
+									page: navItem.page,
+									limit: navItem.limit
+								},
+								state
+							)
+							.then(({
+								data
+							}) => {
+								console.log(data,'2211111');
+								obj.recharge = data.income;
+								obj.orderStatusSum = data.expend;
+								if (data.list.length > 0) {
+									data.list[0].list.forEach(e => {
+										console.log(e, "123456");
+										if (e.title == '市场分红') {
+											e.title = '市场分红补贴'
+										}
+										if (e.title == '礼包推荐奖') {
+											e.title = '礼包推荐补贴'
+										}
+									})
+									navItem.orderList = navItem.orderList.concat(data.list[0].list);
+									console.log(navItem.orderList);
+									navItem.page++;
+								} else {
+									navItem.loadingType = 'noMore';
+								}
+								if (navItem.limit == data.length) {
+									//判断是否还有数据, 有改为 more, 没有改为noMore
+									navItem.loadingType = 'more';
+									return;
+								} else {
+									//判断是否还有数据, 有改为 more, 没有改为noMore
+									navItem.loadingType = 'noMore';
+								}
+								uni.hideLoading();
+								this.$set(navItem, 'loaded', true);
+							})
+							.catch(e => {
+								console.log(e);
+
+							});
+					},
+					// 点击返回 我的页面
+					toBack() {
+						uni.navigateBack({});
+					},
+					//获取收入支出信息
+					async loadData() {
+						let obj = this
+						// obj.state = order
+						spreadCommission({
+							limit: 10,
+							page: 1,
+
+						}).then(({
+							data
+						}) => {
+							console.log(data, '列表数据');
+							obj.orderStatusSum = data.expend
+							obj.recharge = data.income
+							console.log(data.income);
+						})
+
+					}
+				//swiper 切换
+
+				//顶部tab点击
+
 			}
-			//swiper 切换
-		
-			//顶部tab点击
-			
-		}
-	};
+		};
 </script>
 
 <style lang="scss">
@@ -354,8 +430,8 @@
 					width: 44px;
 					height: 0;
 					border-bottom: 2px solid #fe5b38;
-			}
 				}
+			}
 		}
 	}
 
@@ -388,8 +464,8 @@
 
 				.status {
 					color: $font-color-light;
-			}
 				}
+			}
 		}
 	}
 

+ 55 - 192
pages/user/team.vue

@@ -2,14 +2,14 @@
 	<view class="content">
 		<view class="content-money">
 			<view class="status_bar"><!-- 这里是状态栏 --></view>
+			<view class="body-title">
+				<view class="goback-box" @click="toBack"><image class="goback" src="../../static/icon/fanhui.png" mode=""></image></view>
+				<view class="header">我的推广</view>
+			</view>
+			<view class="content-bg"><image src="../../static/img/promotion-bg.png" mode=""></image></view>
 			<view class="money-box">
-				<view class="money-frame">
-					<view class="money_num">
-						<text class="money_ren">共</text>
-						{{ all || '0' }}
-						<text class="money_ren">人</text>
-					</view>
-				</view>
+				<view class="money">{{ all }}</view>
+				<view>我的推广人数</view>
 			</view>
 		</view>
 		<swiper :current="tabCurrentIndex" :style="{ height: maxheight }" class="swiper-box" duration="300" @change="changeTab">
@@ -168,210 +168,73 @@ page {
 	background: #5dbc7c;
 }
 .content-money {
-	background: #5dbc7c;
-	padding-bottom: 30rpx;
-	.buttom-box {
-		position: relative;
-		background-color: #ffffff;
-		text-align: center;
-		margin: 0 30rpx;
-		padding: 30rpx 0;
-		border-radius: $border-radius-sm;
-		margin-top: -80rpx;
-
-		.buttom {
-			font-size: $font-lg;
-			flex-grow: 1;
-
-			.money {
-				font-weight: bold;
-				font-size: 32rpx;
-				color: #ff0000;
-			}
-		}
-
-		.text {
-			color: #666666;
-		}
-
-		.interval {
-			width: 2rpx;
-			height: 60rpx;
-			background-color: #eeeeee;
-		}
-
-		.icon {
-			height: 50rpx;
-			width: 48rpx;
-			margin: 0 auto;
-
-			.icon-img {
-				width: 100%;
-				height: 100%;
-			}
-		}
-	}
-}
-
-.money-box {
-	height: 484rpx;
-	color: #ffffff;
-	text-align: center;
-	font-size: 35rpx;
 	position: relative;
-	.header {
+	height: 480rpx;
+	.content-bg {
 		position: absolute;
-		left: 0;
 		top: 0;
-		width: 100%;
-		height: 80rpx;
-		font-size: 32rpx;
-		font-weight: 700;
-		z-index: 99;
-		display: flex;
-		justify-content: center;
-		align-items: center;
+		left: 0;
+		right: 0;
+		width: 750rpx;
+		height: 480rpx;
+		image {
+			width: 100%;
+			height: 100%;
+		}
 	}
-
-	.goback-box {
-		position: absolute;
-		left: 18rpx;
-		top: 0;
+	.body-title {
 		height: 80rpx;
-		display: flex;
-		align-items: center;
-	}
-
-	.goback {
-		z-index: 100;
-		width: 34rpx;
-		height: 34rpx;
-	}
-	.right {
-		position: absolute;
-		top: 140rpx;
-		right: 40rpx;
-		text-align: right;
-		line-height: 1;
-		.right-num {
-			font-size: 50rpx;
+		text-align: center;
+		font-size: 35rpx;
+		position: relative;
+		.header {
+			position: absolute;
+			left: 0;
+			top: 0;
+			width: 100%;
+			font-size: 36rpx;
 			font-family: PingFang SC;
 			font-weight: bold;
-
-			color: #ffffff;
-		}
-		.right-font {
-			margin-top: 10rpx;
-			font-size: 24rpx;
-			font-family: PingFang SC;
-			font-weight: 400;
-			color: #ffffff;
-		}
-		.time {
-			font-size: 26rpx;
-			font-family: PingFang SC;
-			font-weight: 500;
-			color: #ffffff;
-			line-height: 35px;
-		}
-	}
-	.user {
-		position: absolute;
-		top: 140rpx;
-		left: 34rpx;
-		display: flex;
-		justify-content: flex-start;
-		align-items: center;
-		z-index: 10;
-		.avtor {
-			width: 102rpx;
-			height: 102rpx;
-			border-radius: 50%;
-			position: relative;
-			.portrait {
-				width: 100%;
-				height: 100%;
-				border-radius: 50%;
-			}
-			.he {
-				position: absolute;
-				height: 30rpx;
-				bottom: -4rpx;
-				left: 0;
-				.image {
-					width: 102rpx;
-					height: 30rpx;
-				}
-			}
-		}
-		.name {
-			margin-left: 30rpx;
+			color: #fffeff;
+			height: 80rpx;
 			font-size: 36rpx;
-			font-family: PingFang SC;
-			font-weight: 500;
-			color: #ffffff;
+			font-weight: 700;
+			z-index: 9;
 			display: flex;
-			justify-content: start;
-			.name-left {
-				width: 220rpx;
-			}
-			.name-right {
-				margin-left: 20rpx;
-				width: 50rpx;
-				height: 60rpx;
-				position: relative;
-				image {
-					width: 100%;
-					height: 100%;
-				}
-				.level {
-					position: absolute;
-					top: 35%;
-					left: 50%;
-					margin-left: -12rpx;
-					font-size: 20rpx;
-				}
-			}
+			justify-content: center;
+			align-items: center;
 		}
-		.id {
-			margin-left: 30rpx;
-			font-size: 30rpx;
-			font-family: PingFang SC;
-			font-weight: 500;
-			color: #ffffff;
+		.goback-box {
+			position: absolute;
+			left: 18rpx;
+			top: 0;
+			height: 80rpx;
+			display: flex;
+			align-items: center;
 		}
-	}
 
-	.money_img {
-		width: 100%;
-		height: 120rpx;
-		text-align: center;
-		padding-top: 50rpx;
-		padding-bottom: 135rpx;
-
-		image {
-			width: 120rpx;
-			height: 120rpx;
-			border: 4rpx solid #fd5f6f;
-			border-radius: 50%;
+		.goback {
+			z-index: 100;
+			width: 34rpx;
+			height: 34rpx;
 		}
 	}
+}
 
-	.money-frame {
-		position: absolute;
-		top: 0;
-		width: 100%;
-		padding-top: 200rpx;
-	}
-	.money_num {
+.money-box {
+	position: relative;
+	z-index: 2;
+	padding-top: 90rpx;
+	color: #ffffff;
+	text-align: center;
+	.money {
 		font-size: 72rpx;
 		font-family: PingFang SC;
 		font-weight: bold;
 		color: #ffffff;
-
-		.money_ren {
-			font-size: 36rpx;
-		}
+	}
+	.text {
+		font-size: 30rpx;
 	}
 }
 

+ 26 - 5
pages/user/user.vue

@@ -7,10 +7,15 @@
 				<image class="avtar" :src="userInfo.avatar" mode=""></image>
 				<view class="name">{{ userInfo.nickname }}</view>
 				<view class="phone">{{ userInfo.phone }}</view>
+				<view class="phone" @click.stop="navTo('/pages/index/index')" v-if="userInfo.unlock_spread_user">已到邀请人{{userInfo.unlock_spread_user.phone}}下是否购买会员礼包绑定关系</view>
+				<view class="phone" v-if="userInfo.lock_spread_user">邀请人{{userInfo.lock_spread_user.phone}}</view>
+				<view class="vip-box" v-if="userInfo.level > 0">
+					<view class="vip" >{{ userInfo.level_info.name }}</view>
+				</view>
 			</view>
 			<view class="sy-box flex">
 				<view class="sy-item" @click="navTo('/pages/money/wallet')">
-					<view class="sy-item-name">余额</view>
+					<view class="sy-item-name">易货券</view>
 					<view class="sy-item-val">{{ userInfo.now_money  || '0.00' }}</view>
 				</view>
 				<view class="jg"></view>
@@ -29,7 +34,7 @@
 			<view class="order-section">
 				<view class="order-item" @click="navTo('/pages/user/award')" hover-class="common-hover" :hover-stay-time="50">
 					<view class="icon"><image class="icon-img" src="/static/icon/myyj.png" mode="aspectFit"></image></view>
-					<text>我的补贴券</text>
+					<text>消费补贴券</text>
 				</view>
 				<view class="order-item" @click="navTo('')" hover-class="common-hover" :hover-stay-time="50">
 					<view class="icon"><image class="icon-img" src="/static/icon/myqb.png" mode="aspectFit"></image></view>
@@ -626,7 +631,7 @@ page {
 	.user-info {
 		width: 750rpx;
 		position: absolute;
-		top: 66rpx;
+		top: 50rpx;
 		display: flex;
 		flex-direction: column;
 		justify-content: center;
@@ -637,19 +642,35 @@ page {
 			border-radius: 50%;
 		}
 		.name {
-			margin-top: 20rpx;
+			margin-top: 10rpx;
 			font-size: 39rpx;
 			font-family: PingFang SC;
 			font-weight: bold;
 			color: #FFFFFF;
 		}
 		.phone {
-			margin-top: 13rpx;
+			margin-top: 8rpx;
 			font-size: 29rpx;
 			font-family: PingFang SC;
 			font-weight: 500;
 			color: #FFFFFF;
 		}
+		.vip-box {
+			margin-top: 10rpx;
+			display: flex;
+			align-items: center;
+			line-height: 1;
+			.vip {
+				padding: 6rpx 16rpx;
+				text-align: center;
+				border-radius: 24rpx;
+				font-size: 20rpx;
+				font-family: PingFang SC;
+				font-weight: bold;
+				color: #FFFFFF;
+				margin-right: 10rpx;
+			}
+		}
 	}
 
 	.sy-box {

BIN=BIN
static/img/index-fanl.png


BIN=BIN
static/img/libao-bg.png


BIN=BIN
static/img/promotion-bg.png


BIN=BIN
unpackage/dist/build/h5/3-14-5.rar → unpackage/dist/build/h5/3-23-1.rar


+ 1 - 1
unpackage/dist/build/h5/index.html

@@ -1,2 +1,2 @@
 <!DOCTYPE html><html lang=zh-CN><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><title>响亮商城</title><script>var coverSupport = 'CSS' in window && typeof CSS.supports === 'function' && (CSS.supports('top: env(a)') || CSS.supports('top: constant(a)'))
-            document.write('<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' + (coverSupport ? ', viewport-fit=cover' : '') + '" />')</script><link rel=stylesheet href=/index/static/index.a5c69d49.css></head><body><noscript><strong>Please enable JavaScript to continue.</strong></noscript><div id=app></div><script src=/index/static/js/chunk-vendors.0c0314dc.js></script><script src=/index/static/js/index.74c92c56.js></script></body></html>
+            document.write('<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' + (coverSupport ? ', viewport-fit=cover' : '') + '" />')</script><link rel=stylesheet href=/index/static/index.a5c69d49.css></head><body><noscript><strong>Please enable JavaScript to continue.</strong></noscript><div id=app></div><script src=/index/static/js/chunk-vendors.b8929d0c.js></script><script src=/index/static/js/index.426f14e0.js></script></body></html>

BIN=BIN
unpackage/dist/build/h5/static/icon/add.png


BIN=BIN
unpackage/dist/build/h5/static/icon/reduce.png


BIN=BIN
unpackage/dist/build/h5/static/img/index-fanl.d7d117e9.png


BIN=BIN
unpackage/dist/build/h5/static/img/index-fanl.png


BIN=BIN
unpackage/dist/build/h5/static/img/libao-bg.8e39b7cb.png


BIN=BIN
unpackage/dist/build/h5/static/img/libao-bg.png


BIN=BIN
unpackage/dist/build/h5/static/img/promotion-bg.070522fd.png


BIN=BIN
unpackage/dist/build/h5/static/img/promotion-bg.png


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 0 - 0
unpackage/dist/build/h5/static/js/chunk-vendors.0c0314dc.js


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 0 - 0
unpackage/dist/build/h5/static/js/chunk-vendors.b8929d0c.js


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 0 - 0
unpackage/dist/build/h5/static/js/index.426f14e0.js


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 0 - 0
unpackage/dist/build/h5/static/js/index.74c92c56.js


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 0 - 0
unpackage/dist/build/h5/static/js/pages-cart-cart.75a11be0.js


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 0 - 0
unpackage/dist/build/h5/static/js/pages-cart-cart.bbfdd30d.js


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 0 - 0
unpackage/dist/build/h5/static/js/pages-category-category.b2f6fa8b.js


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 0 - 0
unpackage/dist/build/h5/static/js/pages-index-index.2b06e6f7.js


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 0 - 0
unpackage/dist/build/h5/static/js/pages-index-index.84e366e6.js


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 0 - 0
unpackage/dist/build/h5/static/js/pages-index-sign.3f578c44.js


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 0 - 0
unpackage/dist/build/h5/static/js/pages-index-sign.58a943ea.js


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 0 - 0
unpackage/dist/build/h5/static/js/pages-index-sign1.1ba24fd5.js


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 0 - 0
unpackage/dist/build/h5/static/js/pages-money-account.baea62db.js


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 0 - 0
unpackage/dist/build/h5/static/js/pages-money-pay.25cecbf3.js


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 0 - 0
unpackage/dist/build/h5/static/js/pages-money-pay.3e8ff275.js


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 0 - 0
unpackage/dist/build/h5/static/js/pages-money-wallet.02c6ccab.js


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 0 - 0
unpackage/dist/build/h5/static/js/pages-money-wallet.ec280623.js


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 0 - 0
unpackage/dist/build/h5/static/js/pages-money-withdrawal.f411d668.js


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 0 - 0
unpackage/dist/build/h5/static/js/pages-order-createOrder.3a58f5c1.js


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 0 - 0
unpackage/dist/build/h5/static/js/pages-order-createOrder.eaa4e318.js


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 0 - 0
unpackage/dist/build/h5/static/js/pages-order-order.5c6743f1.js


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 0 - 0
unpackage/dist/build/h5/static/js/pages-order-orderDetail.7794dbdc.js


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 0 - 0
unpackage/dist/build/h5/static/js/pages-order-orderRefund.b26d88d4.js


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 0 - 0
unpackage/dist/build/h5/static/js/pages-product-groupBooking-productCollage.f271ce78.js


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 0 - 0
unpackage/dist/build/h5/static/js/pages-product-list.6c9d29f2.js


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 0 - 0
unpackage/dist/build/h5/static/js/pages-product-list.9a574b82.js


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 0 - 0
unpackage/dist/build/h5/static/js/pages-product-product.46e390f7.js


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 0 - 0
unpackage/dist/build/h5/static/js/pages-product-product.b78d78fb.js


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 0 - 0
unpackage/dist/build/h5/static/js/pages-product-search.1ddc2cc9.js


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 0 - 0
unpackage/dist/build/h5/static/js/pages-public-wxLogin.53e934d7.js


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 0 - 0
unpackage/dist/build/h5/static/js/pages-set-address.3d066a2f.js


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 0 - 0
unpackage/dist/build/h5/static/js/pages-set-addressManage.7c45abb6.js


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 0 - 0
unpackage/dist/build/h5/static/js/pages-set-password.4e4d6177.js


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 0 - 0
unpackage/dist/build/h5/static/js/pages-set-phone.07e6fb7e.js


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 0 - 0
unpackage/dist/build/h5/static/js/pages-set-phone.5ff45121.js


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 0 - 0
unpackage/dist/build/h5/static/js/pages-set-user.792552e9.js


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 0 - 0
unpackage/dist/build/h5/static/js/pages-set-userinfo.92920d22.js


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 0 - 0
unpackage/dist/build/h5/static/js/pages-shoping-list.7b896ad6.js


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 0 - 0
unpackage/dist/build/h5/static/js/pages-user-award.254940eb.js


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 0 - 0
unpackage/dist/build/h5/static/js/pages-user-award.9fc81c2f.js


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 0 - 0
unpackage/dist/build/h5/static/js/pages-user-team.19de7992.js


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 0 - 0
unpackage/dist/build/h5/static/js/pages-user-team.9e64d60d.js


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 0 - 0
unpackage/dist/build/h5/static/js/pages-user-user.1de5d54c.js


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 0 - 0
unpackage/dist/build/h5/static/js/pages-user-user.2f0fd599.js


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 0 - 0
unpackage/dist/build/h5/static/js/pages-user-withdrawal.b9dc5b88.js


Algúns arquivos non se mostraron porque demasiados arquivos cambiaron neste cambio