2312970463@qq.com 3 years ago
parent
commit
18525bcbaf

+ 17 - 1
api/index.js

@@ -33,4 +33,20 @@ export function loadIndexs(data) {
 		data
 	});
 }
-
+//获取门店列表
+export function getStoreList(data) {
+	return request({
+		url: '/api/store_list',
+		method: 'get',
+		data
+	});
+}
+
+//获取门店列表
+export function getStoreInfo(data) {
+	return request({
+		url: '/api/store_info',
+		method: 'get',
+		data
+	});
+}

+ 34 - 0
api/user.js

@@ -128,6 +128,14 @@ export function getSpreadPeople(data){
 		data
 	})
 }
+//我的会员
+export function getMyTvillage(data){
+	return request({
+		url:'/api/mytvillage',
+		method:'get',
+		data
+	})
+}
 
 //推广佣金/提现总和 
 //3=佣金,4=提现
@@ -137,4 +145,30 @@ export function getSpreadCount(data,type) {
 		method:'get',
 		data
 	})
+}
+//我的实体店
+export function getMyStore(data) {
+	return request({
+		url:'/api/mystore',
+		method:'get',
+		data
+	})
+}
+
+//申请会员 店长
+export function enter(data) {
+	return request({
+		url:'/api/enter',
+		method:'post',
+		data
+	})
+}
+
+//编辑门店
+export function editStore(data) {
+	return request({
+		url:'/api/store_edit',
+		method:'post',
+		data
+	})
 }

+ 1 - 1
components/empty.vue

@@ -36,7 +36,7 @@
 		justify-content: center;
 		flex-direction: column;
 		
-		position: fixed;
+		position: absolute;
 		left: 0;
 		top: 0;
 		right: 0;

+ 0 - 7
pages.json

@@ -311,13 +311,6 @@
 				"navigationBarTitleText": "申请会员"
 			}
 		},
-		{
-			"path": "pages/user/applyList",
-			"style": {
-				"navigationStyle": "custom",
-				"navigationBarTitleText": "申请列表"
-			}
-		},
 		{
 			"path": "pages/user/minMember",
 			"style": {

+ 90 - 151
pages/index/index.vue

@@ -52,28 +52,26 @@
 			</navigator>
 		</view>
 		<!-- 秒杀楼层 -->
-		<seckill></seckill>
+		<!-- <seckill></seckill> -->
 		<!-- 附近门店 -->
-		<view class="store-wrapper">
+		<view class="store-wrapper" v-if="storeList.length != 0">
 			<view class="title-wrapper flex">
 				<image src="/static/icon/t2.png" mode=""></image>
 				<view class="">附近门店</view>
 				<view class="title-b">门店好物随心购</view>
 			</view>
-			<navigator url="/pages/store/storeDetail" v-for="item in 3">
-				<view class="store flex">
-					<image src="" mode="" class="store-img"></image>
-					<view class="store-info">
-						<view class="store-name">鑫旺零售台州店</view>
-						<view class="store-detail">台州市椒江区市府大道120号</view>
-						<view class="store-tip">门店</view>
-						<view class="store-des">
-							<image src="" mode=""></image>
-							距离 15KM
-						</view>
+			<view class="store flex" v-for="item in storeList" @click="navTo('/pages/store/storeDetail?id=' + item.id)">
+				<image :src="item.image" mode="" class="store-img"></image>
+				<view class="store-info">
+					<view class="store-name">{{ item.name }}</view>
+					<view class="store-detail">{{ item.detailed_address }}</view>
+					<view class="store-tip">门店</view>
+					<view class="store-des">
+						<image src="../../static/icon/dingwei.png" mode=""></image>
+						距离 {{ item.space }}
 					</view>
 				</view>
-			</navigator>
+			</view>
 		</view>
 		<!-- 好货推荐 -->
 		<view class="store-wrapper">
@@ -83,137 +81,17 @@
 				<view class="title-b">优选商品低价入手</view>
 			</view>
 			<view class="goods-wrapper flex">
-				<view class="good" v-for="item in 5">
-					<image src="" mode="" class="good-img"></image>
-					<view class="good-name clamp">无患子植物家居眼罩无患子植物家居眼罩</view>
-					<view class="good-info clamp">纯植物无香精</view>
+				<view class="good" v-for="item in bastList" @click="navTo('/pages/product/product?id='+ item.id)">
+					<image :src="item.image" mode="" class="good-img"></image>
+					<view class="good-name clamp">{{ item.store_name }}</view>
+					<!-- <view class="good-info clamp">纯植物无香精</view> -->
 					<view class="good-price">
-						<text class="new-price">¥26.90</text>
-						<text class="old-price">¥36</text>
-					</view>
-				</view>
-			</view>
-		</view>
-		<!-- 精品 商品 -->
-		<!-- <view class="f-header m-t">
-			<view class="f-left-icon"></view>
-			<view class="tit-box"><text class="tit">精品推荐</text></view>
-			<navigator url="/pages/product/classify?type=1"><text class="iconfont iconenter">更多</text></navigator>
-		</view>
-		<view class="guess-section">
-			<view v-for="(item, index) in bastList" :key="index" class="guess-item" @click="navToDetailPage(item)">
-				<view class="image-wrapper"><image :src="item.image" mode="scaleToFill"></image></view>
-				<text class="title clamp margin-c-20">{{ item.store_name }}</text>
-				<view class="cmy-hr"></view>
-				<view class="price margin-c-20 flex">
-					<view>
-						<text class="font-size-sm ">¥</text>
-						{{ item.price }}
-					</view>
-					<view class="font-size-sm">
-						<text class="font-color-gray">{{ item.sales }}人购买</text>
+						<text class="new-price">{{ item.price }}</text>
+						<text class="old-price">{{ item.ot_price }}</text>
 					</view>
 				</view>
 			</view>
-		</view> -->
-		<!-- 最新 商品 -->
-		<!-- <view class="f-header m-t">
-			<view class="f-left-icon"></view>
-			<view class="tit-box"><text class="tit">最新商品</text></view>
-			<navigator url="/pages/product/classify?type=3"><text class="iconfont iconenter">更多</text></navigator>
 		</view>
-		<view class="guess-section">
-			<view v-for="(item, index) in goodsList" :key="index" class="guess-item" @click="navToDetailPage(item)">
-				<view class="image-wrapper"><image :src="item.image" mode="scaleToFill"></image></view>
-				<text class="title clamp margin-c-20">{{ item.store_name }}</text>
-				<view class="cmy-hr"></view>
-				<view class="price margin-c-20 flex">
-					<view>
-						<text class="font-size-sm ">¥</text>
-						{{ item.price }}
-					</view>
-					<view class="font-size-sm">
-						<text class="font-color-gray">{{ item.sales }}人购买</text>
-					</view>
-				</view>
-			</view>
-		</view> -->
-		<!-- 促销 商品 -->
-		<!-- <view class="f-header m-t">
-			<view class="f-left-icon"></view>
-			<view class="tit-box"><text class="tit">促销商品</text></view>
-			<navigator url="/pages/product/classify?type=4"><text class="iconfont iconenter">更多</text></navigator>
-		</view>
-		<view class="guess-section">
-			<view v-for="(item, index) in bastBanner" :key="index" class="guess-item" @click="navToDetailPage(item)">
-				<view class="image-wrapper"><image :src="item.image" mode="scaleToFill"></image></view>
-				<text class="title clamp margin-c-20">{{ item.store_name }}</text>
-				<view class="cmy-hr"></view>
-				<view class="price margin-c-20 flex">
-					<view>
-						<text class="font-size-sm ">¥</text>
-						{{ item.price }}
-					</view>
-					<view class="font-size-sm">
-						<text class="font-color-gray">{{ item.sales }}人购买</text>
-					</view>
-				</view>
-			</view>
-		</view> -->
-		<!-- 会员升级专区 -->
-		<!-- <view class="f-header m-t">
-			<view class="f-left-icon"></view>
-			<view class="tit-box"><text class="tit">会员升级专区</text></view>
-			<text class="iconfont iconenter">更多</text>
-		</view> -->
-		<!-- <view class="uservip flex">
-			<image @error="onImageError('userServant', 0)" lazy-load :src="userServant[0].image" mode="aspectFill"></image>
-			<view class="detail">
-				<view class="title">满园春1999元会员升级礼包</view>
-				<view class="icon">自营</view>
-				<view class="flex price-box">
-					<view class="price">
-						<text class="font-size-sm">¥</text>
-						18888
-					</view>
-					<view class="text">115人购买</view>
-				</view>
-			</view>
-		</view> -->
-
-		<!-- 精品推荐 -->
-		<!-- <view class="f-header m-t">
-			<view class="f-left-icon"></view>
-			<view class="tit-box"><text class="tit">精品推荐</text></view>
-			<text class="iconfont iconenter">更多</text>
-		</view> -->
-		<!-- <view class="guess-section">
-			<view v-for="(item, index) in goodsList" :key="index" class="guess-item" @click="navToDetailPage(item)">
-				<view class="image-wrapper"><image @error="onImageError('goodsList', index)" lazy-load :src="item.image" mode="aspectFill"></image></view>
-				<text class="title clamp margin-c-20">
-					<text class="icon">自营</text>
-					{{ item.title }}
-				</text>
-				<view class="hr"></view>
-				<view class="price margin-c-20 flex">
-					<view>
-						<text class="font-size-sm ">¥</text>
-						{{ item.price }}
-					</view>
-					<view class="font-size-sm">
-						<view class='detail'>
-							<text class="icon">代理价</text>
-							<text></text>
-						</view>
-						<view class="detail">
-							<text class="font-color-yellow">会员价</text>
-							<text class="font-color-yellow">7.5折</text>
-						</view>
-					</view>
-				</view>
-				<view class="tip">兑换价¥44+44积分</view>
-			</view>
-		</view> -->
 		<view class="Mask" v-show="shareShow">
 			<image @click="share" src="http://shicai.liuniu946.com/static/img/shareimg4.png"></image>
 			<view class="Toshare" @click="Toshare"></view>
@@ -223,17 +101,17 @@
 </template>
 
 <script>
-import seckill from '../../components/seckill/seckill.vue';
-import { loadIndexs } from '@/api/index.js';
+import { timeComputed, space, openMap } from '@/utils/rocessor.js';
+import { loadIndexs, getStoreList } from '@/api/index.js';
 import { getUserInfo } from '@/api/user.js';
 import { setCoupons } from '@/api/functionalUnit.js';
-import { getBargainList } from '@/api/product.js';
+import { getBargainList, getProducts } from '@/api/product.js';
 import { interceptor } from '@/utils/loginUtils';
-import { mapState } from 'vuex';
+import { mapState, mapMutations } from 'vuex';
 
 export default {
 	components: {
-		seckill
+		// seckill
 	},
 	watch: {
 		//自适应swiper高度
@@ -251,7 +129,7 @@ export default {
 				let bHeight = Math.ceil(obj.bastBanner.length / 2);
 				obj.swiperHeight = Math.ceil(obj.pageProportion * 520 * bHeight);
 			}
-		},
+		}
 		// 初次加载页面高度时修改页面高度
 		// bastList(newValue, oldValue) {
 		// 	let obj = this;
@@ -274,6 +152,7 @@ export default {
 	},
 	data() {
 		return {
+			storeList: [], //门店列表
 			shareShow: false, //分享海报
 			pageProportion: 0, //保存页面基于750宽度的比例
 			swiperHeight: 0,
@@ -317,7 +196,8 @@ export default {
 	},
 	computed: {
 		...mapState(['loginInterceptor']),
-		...mapState('user', ['hasLogin', 'userInfo'])
+		...mapState('user', ['hasLogin', 'userInfo']),
+		...mapState('latlon', ['lat', 'lon'])
 	},
 	onLoad: function(option) {
 		// #ifndef MP
@@ -335,6 +215,7 @@ export default {
 			});
 		}
 		// #endif
+		this.getaddress();
 	},
 	onShow: function() {
 		// 判断是否强制登录
@@ -344,6 +225,7 @@ export default {
 		}
 		this.loadData();
 		this.getBargainList();
+		// this.getProducts()
 	},
 	//下拉刷新
 	onPullDownRefresh() {
@@ -376,6 +258,12 @@ export default {
 	},
 	// #endif
 	methods: {
+		navTo(url) {
+			uni.navigateTo({
+				url: url
+			})
+		},
+		...mapMutations('latlon', ['setLat', 'setLon']),
 		navToTab(url) {
 			uni.switchTab({
 				url: url
@@ -515,6 +403,7 @@ export default {
 					this.menusList = data.menus;
 					this.goodsList = goods.firstList; //最新商品
 					this.bastList = goods.bastList; //精品推荐
+					console.log(this.bastList, 'this.bastList6666666666666666666666');
 					this.bastBanner = data.benefit; //促销单品
 					this.$set(this, 'couponArray', data.couponList); //保存卡包券
 
@@ -549,6 +438,58 @@ export default {
 			uni.navigateTo({
 				url: item.wap_url
 			});
+		},
+		//获取定位信息
+		getaddress() {
+			let obj = this;
+			uni.getLocation({
+				success: res => {
+					let latitude = Math.abs(res.latitude);
+					let longitude = Math.abs(res.longitude);
+					obj.setLat(latitude);
+					obj.setLon(longitude);
+					console.log(obj.lat, obj.lon, '经纬度数据');
+					obj.getStoreList(latitude, longitude);
+				},
+				fail: err => {
+					openMap().then(e => {
+						this.getaddress();
+					});
+				}
+			});
+		},
+		//获取门店列表
+		getStoreList(latitude, longitude) {
+			let obj = this;
+			getStoreList({
+				page: 1,
+				limit: 3,
+				latitude: latitude,
+				longitude: longitude
+			}).then(({ data }) => {
+				data.list = data.list.map(item => {
+					item.space = obj.space(obj.lat, obj.lon, item.latitude, item.longitude);
+					console.log(item.space, 'item.space++++++++++');
+					return item;
+				});
+				obj.storeList = data.list;
+			});
+		},
+		space(lat1, lng1, lat2, lng2) {
+			console.log(lat1, lng1, lat2, lng2, '位置信息');
+			var radLat1 = (lat1 * Math.PI) / 180.0;
+			var radLat2 = (lat2 * Math.PI) / 180.0;
+			var a = radLat1 - radLat2;
+			var b = (lng1 * Math.PI) / 180.0 - (lng2 * Math.PI) / 180.0;
+			var s = 2 * Math.asin(Math.sqrt(Math.pow(Math.sin(a / 2), 2) + Math.cos(radLat1) * Math.cos(radLat2) * Math.pow(Math.sin(b / 2), 2)));
+			s = s * 6378.137;
+			s = Math.round(s * 10000) / 10000;
+			// return s * 1000;
+			if (s > 1) {
+				return s.toFixed(2) + 'km';
+			} else {
+				return s * 1000 + 'm'; // 单位米
+			}
 		}
 	}
 };
@@ -1209,7 +1150,7 @@ page {
 		.good {
 			margin-bottom: 20rpx;
 			width: 345rpx;
-			height: 540rpx;
+			height: 480rpx;
 			background: #ffffff;
 			box-shadow: 0px 0px 10rpx rgba(50, 50, 52, 0.2);
 			border-radius: 10rpx;
@@ -1217,7 +1158,6 @@ page {
 				width: 345rpx;
 				height: 345rpx;
 				border-radius: 10rpx;
-				background-color: red;
 			}
 			.good-name {
 				font-size: 30rpx;
@@ -1271,7 +1211,7 @@ page {
 			width: 180rpx;
 			height: 180rpx;
 			border-radius: 10rpx;
-			background-color: red;
+			// background-color: red;
 		}
 		.store-info {
 			width: 100%;
@@ -1319,7 +1259,6 @@ page {
 					margin-right: 8rpx;
 					width: 17rpx;
 					height: 24rpx;
-					background-color: red;
 				}
 			}
 		}

+ 12 - 7
pages/money/pay.vue

@@ -11,13 +11,13 @@
 					<text class="tit">微信支付</text>
 					<text>推荐使用微信支付</text>
 				</view>
-				<label class="radio"><radio value="" color="#5dbc7c" :checked="payType == 1"></radio></label>
+				<label class="radio"><radio value="" color="#ff4c4c" :checked="payType == 1"></radio></label>
 			</view>
 			<!-- #ifdef APP-PLUS -->
 			<view class="type-item b-b" @click="changePayType(2)">
 				<text class="icon iconfont iconzhifubao"></text>
 				<view class="con"><text class="tit">支付宝支付</text></view>
-				<label class="radio"><radio value="" color="#5dbc7c" :checked="payType == 2"></radio></label>
+				<label class="radio"><radio value="" color="#ff4c4c" :checked="payType == 2"></radio></label>
 			</view>
 			<!-- #endif -->
 			<view class="type-item" @click="changePayType(3)">
@@ -26,7 +26,7 @@
 					<text class="tit">余额支付</text>
 					<text>可用余额 ¥{{ now_money }}</text>
 				</view>
-				<label class="radio"><radio value="" color="#5dbc7c" :checked="payType == 3"></radio></label>
+				<label class="radio"><radio value="" color="#ff4c4c" :checked="payType == 3"></radio></label>
 			</view>
 		</view>
 		<text class="mix-btn" :class="{ clickbg: payLoding }" @click="!payLoding ? confirm() : ''">确认支付</text>
@@ -57,7 +57,8 @@ export default {
 			// #ifdef H5
 			froms: '', //保存h5中数据来源对象
 			// #endif
-			pinkid: '' //保存拼团商品id
+			pinkid: '', //保存拼团商品id
+			isdrop: 0
 		};
 	},
 	computed: {
@@ -65,7 +66,10 @@ export default {
 		...mapState(['weichatObj'])
 		// #endif
 	},
-	onLoad(options) {
+	onLoad(options) {
+		if(options.isdrop) {
+			this.isdrop = options.isdrop*1
+		}
 		if (options.type == 1) {
 			this.type = 1;
 			this.orderId = options.ordid;
@@ -78,7 +82,7 @@ export default {
 				couponId: prepage.couponChecked.id, //优惠券编号
 				addressId: prepage.addressData.id, //地址编号
 				useIntegral: prepage.checkedPoints ? 1 : 0,
-				is_drop: 1
+				is_drop: this.isdrop
 			}).then(({ data }) => {
 				// 获取支付金额
 				this.money = data.result.pay_price;
@@ -240,7 +244,8 @@ export default {
 				// #ifdef APP-PLUS
 				from: 'app', //来源
 				// #endif
-				shipping_type: 1 //提货方式 1 快递 2自提
+				shipping_type: 1, //提货方式 1 快递 2自提
+				is_drop: this.isdrop//是否上门安装
 			};
 			// 判断是否拼团商品
 			if (obj.pinkid) {

+ 16 - 4
pages/money/wallet.vue

@@ -2,6 +2,7 @@
 	<view class="content">
 		<view class="content-money">
 			<view class="money-box">
+				<image src="../../static/img/qbbg.png" mode=""></image>
 				<view class="money"><text class="money-icon">¥</text>{{ userInfo.now_money | getMoneyStyle }}</view>
 			</view>
 		</view>
@@ -233,25 +234,36 @@ page {
 	}
 }
 .money-box {
-	background-color: $base-color;
+	// background-color: $base-color;
 	// padding-top: var(--status-bar-height);
 	height: 400rpx;
-	color: #ffffff;
+	color: #FF4C4C;
 	text-align: center;
+	position: relative;
+	image {
+		position: absolute;
+		top: 0;
+		right: 0;
+		height: 100%;
+		width: 100%;
+		// z-index: 1;
+	}
 	.text {
 		padding-top: 147rpx;
 		font-size: $font-sm;
+		position: relative;
 	}
 	.money {
 		padding-top: 175rpx;
 		// margin: auto 0;
 		font-size: 56rpx;
 		font-weight: bold;
-		color: #FFFFFF;
+		color: #FF4C4C;
+		position: relative;
 		.money-icon {
 			font-size: 38rpx;
 			font-weight: bold;
-			color: #FFFFFF;
+			color: #FF4C4C;
 		}
 	}
 }

+ 13 - 7
pages/order/createOrder.vue

@@ -161,7 +161,7 @@
 
 <script>
 import { confirm,computedOrderkey,couponsOrder } from '@/api/order.js';
-import { userinfo } from '@/api/user.js';
+import { getUserInfo } from '@/api/user.js';
 import { cartAdd } from '@/api/product.js';
 export default {
 	data() {
@@ -216,7 +216,8 @@ export default {
 			integralMoney: 0, //积分抵扣金额
 			integralShow: false, //是否显示积分抵扣金额
 			payType: true, //是否可支付
-			pinkid: '' //保存拼团商品id
+			pinkid: '', //保存拼团商品id
+			isdrop: 0,
 		};
 	},
 	onLoad(option) {
@@ -228,6 +229,10 @@ export default {
 			// 保存当前商品在购物车中的id
 			this.cartId = option.id;
 			this.loadData();
+		}
+		if(option.isdrop) {
+			this.isdrop = option.isdrop*1
+			console.log(this.isdrop,)
 		}
 		this.userinfo();
 	},
@@ -274,7 +279,7 @@ export default {
 		},
 		// 加载用户基础信息
 		userinfo() {
-			userinfo({}).then(({ data }) => {
+			getUserInfo({}).then(({ data }) => {
 				this.integralAll = data.integral;
 			});
 		},
@@ -285,7 +290,7 @@ export default {
 				useIntegral: this.checkedPoints ? 1 : 0, //是否积分抵扣
 				couponId: this.couponChecked.id, //优惠券编号
 				addressId: this.addressData.id ,//地址编号
-				is_drop: 1
+				is_drop: this.isdrop
 			})
 				.then(({ data }) => {
 					console.log(data,'111');
@@ -342,7 +347,7 @@ export default {
 				// 计算金额
 				this.payMoneyNub();
 				// 加载优惠券
-				obj.couponsOrder(data.priceGroup.totalPrice);
+				// obj.couponsOrder(data.priceGroup.totalPrice);
 			});
 		},
 		// 购买数量变化
@@ -362,8 +367,9 @@ export default {
 			if (!this.addressData.real_name) {
 				this.$api.msg('请选择收货地址');
 				return false;
-			}
-			let url =  '/pages/money/pay?key='+ this.orderKey
+			}
+			console.log(this.isdrop,'dddddddddddddddddddddddddd')
+			let url =  '/pages/money/pay?key='+ this.orderKey + '&isdrop=' + this.isdrop
 			if(this.pinkid){
 				url += '&pinkid='+this.pinkid
 			}

+ 9 - 9
pages/order/order.vue

@@ -3,7 +3,6 @@
 		<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>
-
 		<swiper :current="tabCurrentIndex" class="swiper-box" duration="300" @change="changeTab">
 			<swiper-item class="tab-content" v-for="(tabItem, tabIndex) in navList" :key="tabIndex">
 				<scroll-view class="list-scroll-content" scroll-y @scrolltolower="loadData">
@@ -13,7 +12,7 @@
 					<!-- 订单列表 -->
 					<view @click="goToOrderDetail(item)" v-for="(item, index) in tabItem.orderList" :key="index" class="order-item">
 						<view class="i-top b-b">
-							<text class="time">{{ item._add_time }}</text>
+							<text class="time">订单编号:{{ item.order_id }}</text>
 							<text class="state" :style="{ color: item.stateTipColor }">{{ item._status._title }}</text>
 							<text v-if="item.status === 4" class="del-btn iconfont icondelete" @click="deleteOrder(index)"></text>
 						</view>
@@ -36,7 +35,7 @@
 							<view class="right">
 								<view class="flex-start">
 									<text class="title clamp">{{ goodsItem.productInfo.store_name }}</text>
-									<text class="price">{{ goodsItem.productInfo.price|moneyNum }}</text>
+									<text class="price">{{ moneyNum(goodsItem.productInfo.price) }}</text>
 								</view>
 								<view class="row flex">
 									<text class="row_title">{{ goodsItem.productInfo.attrInfo ? goodsItem.productInfo.attrInfo.suk : '' }}</text>
@@ -48,14 +47,15 @@
 						<view class="price-box">
 							<text class="num">{{ item.cartInfo.length }}</text>
-							件商品 邮费
-							<text class="price">{{ moneyNum(item.pay_postage)}}</text>
-							实付款
-							<text class="price">{{ moneyNum(item.pay_price)}}</text>
+							件商品 合计
+							<text class="price">{{ moneyNum(item.pay_price)}}</text>
+							(含邮费
+							<text class="price">{{ moneyNum(item.pay_postage)}}</text>
+							)
 						</view>
 						<view class="action-box b-t" v-if="item.status != 5">
 							<button v-if="item._status._title == '未支付'" class="action-btn" @click.stop="cancelOrder(item)">取消订单</button>
-							<button v-if="item._status._title == '未支付'" @click.stop="orderPay(item)" class="action-btn recom">立即支付</button>
+							<button v-if="item._status._title == '未支付'" @click.stop="orderPay(item)" class="action-btn recom">付</button>
 							<button v-if="item._status._title == '待评价'" class="action-btn">评价</button>
 							<button v-if="item._status._title == '待收货'" @click.stop="orderTake(item, index)" class="action-btn">确认收货</button>
 							<button v-if="item._status._title == '未发货'" class="action-btn" @click.stop="orderRefund(item)">申请退款</button>
@@ -314,7 +314,7 @@ export default {
 					break;
 				case 4:
 					stateTip = '已完成';
-					stateTipColor = '#5dbc7c';
+					stateTipColor = '#909399';
 					break;
 				case 9:
 					stateTip = '订单已关闭';

+ 6 - 0
pages/order/orderDetail.vue

@@ -93,6 +93,12 @@
 					<text class="title">下单时间:</text>
 					<view class="text">{{ item._add_time }}</view>
 				</view>
+			</view>
+			<view class="item flex" v-if="item.is_drop == 1">
+				<view class="title-left flex">
+					<text class="title">安装方式:</text>
+					<view class="text">上门安装</view>
+				</view>
 			</view>
 			<view class="item flex">
 				<view class="title-left flex">

+ 13 - 4
pages/order/orderRefund.vue

@@ -87,7 +87,8 @@ export default {
 			});
 		},
 		//提交
-		confirm() {
+		confirm() {
+			let obj = this;
 			if (!obj.refund) {
 				uni.showModal({
 					title: '错误',
@@ -96,16 +97,23 @@ export default {
 				});
 				return false;
 			}
-			let obj = this;
+			uni.showLoading({
+				title: '提交中...',
+				mask: true
+			})
 			refund({
 				text: obj.refund,
 				uni: obj.orderId,
 				refund_reason_wap_explain: obj.reason
-			}).then(function(e) {
+			}).then(function(e) {
+				uni.hideLoading()
 				uni.showToast({
 					title:'提交成功',
 					duration:1500
 				})
+			}).catch( err => {
+				uni.hideLoading()
+				console.log(err)
 			});
 		}
 	}
@@ -133,7 +141,8 @@ page {
 	background: #fff;
 	.refund {
 		font-size: 30rpx;
-		color: $font-color-dark;
+		color: $font-color-dark;
+		padding-left: 20rpx;
 	}
 	.noRefund {
 		font-size: 30rpx;

+ 7 - 4
pages/product/common/productBottom.vue

@@ -13,8 +13,8 @@
 			<button type="primary" class=" action-btn no-border buy-now-btn" @click="buy(1)">立即购买</button>
 		</view> -->
 		<view class="btm-btn">
-			<button type="primary" class="add-btn" @click="buy(2)">加入购物车</button>
-			<button type="primary" class="buy-btn" @click="buy(1)">立即购买</button>
+			<button type="primary" class="add-btn" @click="buy(2)" v-if="showAdd">加入购物车</button>
+			<button type="primary" class="buy-btn" @click="buy(1)" :class="{'quck':!showAdd }">立即购买</button>
 		</view>
 	</view>
 </template>
@@ -33,6 +33,9 @@ export default {
 		},
 		goodsid: {
 			default: ''
+		},
+		showAdd: {
+			default: true
 		}
 	},
 	data() {
@@ -209,8 +212,8 @@ export default {
 		line-height: 90rpx;
 		color: #fff;
 	}
-	.skill {
-		width: 699rpx;
+	.quck {
+		width: 691px;
 	}
 }
 </style>

+ 38 - 10
pages/product/construction.vue

@@ -1,17 +1,17 @@
 <template>
 	<view class="store-list">
-		<scroll-view scroll-y="true" class="list" @scrolltolower="loadData()">
+		<scroll-view scroll-y="true" class="list" @scrolltolower="loadData()" :style="{'height': height}">
 			<empty v-if="loaded && list.length == 0"></empty>
-			<view class="store flex" v-for="item in list">
-				<image src="" mode="" class="store-img"></image>
+			<view class="store flex" v-for="item in list" @click="navTo('/pages/product/product?id=' + item.id)">
+				<image :src="item.image" mode="" class="store-img"></image>
 				<view class="store-info">
-					<view class="store-name clamp">鑫旺零售台州店鑫旺零售台州店鑫旺零售台州店鑫旺零售台州店鑫旺零售台州店</view>
+					<view class="store-name clamp2">{{item.store_name}}</view>
 					<!-- <view class="store-detail">台州市椒江区市府大道120号</view> -->
-					<view class="info clamp">鑫旺零售台州店鑫旺零售台州店</view>
+					<!-- <view class="info clamp">鑫旺零售台州店鑫旺零售台州店</view> -->
 					<view class="price-box">
 						<view class="new-price">
-							¥160.00
-							<text class="old-price"> ¥220.00</text>
+							{{item.price}}
+							<!-- <text class="old-price"> ¥220.00</text> -->
 						</view>
 					</view>
 					<view class="qb-btn">立即购买</view>
@@ -25,6 +25,7 @@
 <script>
 import empty from '@/components/empty';
 import uniLoadMore from '@/components/uni-load-more/uni-load-more.vue';
+import {getProducts} from '@/api/product.js'
 export default {
 	components: {
 		uniLoadMore,
@@ -32,7 +33,7 @@ export default {
 	},
 	data() {
 		return {
-			list: [1, 2, 3],
+			list: [],
 			storeList: [],
 			loadingType: 'more',
 			page: 1,
@@ -60,7 +61,12 @@ export default {
 		this.loadData();
 	},
 	methods: {
-		//获取门店list
+		navTo(url) {
+			uni.navigateTo({
+				url: url
+			})
+		},
+		//获取施工产品信息
 		loadData() {
 			let obj = this;
 			if (obj.loadingType == 'loading') {
@@ -69,6 +75,28 @@ export default {
 			if (obj.loadingType == 'noMore') {
 				return;
 			}
+			getProducts({
+				page: obj.page,
+				limit: obj.limit,
+				is_drop: 1
+			}).then(({data}) => {
+				console.log(data,'is_drop++++++++++++++++')
+				let list = data.map(item => {
+					return item
+				})
+				obj.list = obj.list.concat(list)
+				obj.page++
+				if (obj.limit == data.length) {
+					//判断是否还有数据, 有改为 more, 没有改为noMore
+					obj.loadingType = 'more';
+					return;
+				} else {
+					//判断是否还有数据, 有改为 more, 没有改为noMore
+					obj.loadingType = 'noMore';
+				}
+				// uni.hideLoading();
+				this.$set(obj, 'loaded', true);
+			})
 		}
 	}
 };
@@ -95,7 +123,7 @@ export default {
 	border-radius: 8rpx;
 	.store-img {
 		flex-shrink: 0;
-		background-color: red;
+		// background-color: red;
 		width: 190rpx;
 		height: 200rpx;
 		border-radius: 10rpx;

+ 36 - 27
pages/product/product.vue

@@ -2,31 +2,9 @@
 	<view class="container">
 		<!-- 轮播图 -->
 		<top-swiper :imgList="imgList"></top-swiper>
-		<view class="sckill-top">
-			<view class="top-left">
-				<view class="left-top">限时秒杀价</view>
-				<view class="left-btm">
-					¥
-					<text class="now-pri">{{ goodsObjact.price }}</text>
-					<text class="old-pri">¥{{ goodsObjact.ot_price }}</text>
-				</view>
-			</view>
-			<view class="top-right">
-				<view class="right-top">距离本场结束还剩</view>
-				<uni-countdown
-					class="timeBox"
-					color="#901b21"
-					background-color="#fff"
-					splitor-color="#fff"
-					:show-day="true"
-					:hour="seckillObj.stopTimeH"
-					:minute="seckillObj.stopTimeM"
-					:second="seckillObj.stopTimeS"
-				></uni-countdown>
-			</view>
-		</view>
 		<!-- 标题 -->
 		<product-content :goodsObjact="goodsObjact"></product-content>
+		
 		<!-- 拼货时间及优惠 -->
 		<!-- <discounts @clickCoupon="Getcoupon" :Info="goodsObjact.store_info" :showCoupon="true"></discounts> -->
 		<!-- 猜你喜欢 -->
@@ -40,7 +18,7 @@
 		<!-- 底部高度撑开 -->
 		<view class="contentBottomHeight"></view>
 		<!-- 底部操作菜单 -->
-		<product-bottom @buy="buy" :goodsObjact="goodsObjact" :goodsid="goodsid" @specOPne="specOPne"></product-bottom>
+		<product-bottom @buy="buy" :goodsObjact="goodsObjact" :goodsid="goodsid" @specOPne="specOPne" :showAdd="showAdd"></product-bottom>
 		<!-- 规格-模态层弹窗 -->
 		<view class="popup spec" :class="specClass" @touchmove.stop.prevent="stopPrevent" @click="toggleSpec">
 			<!-- 遮罩层 -->
@@ -73,12 +51,20 @@
 						</text>
 					</view>
 				</view>
+				<view class="attr-list" v-if="showDrop">
+					<text>选择是否上门安装</text>
+					<view class="item-list">
+						<text :class="{ selected: is_drop}" @click="dropClick(1)">是</text>
+						<text :class="{ selected: !is_drop}" @click="dropClick(0)">否</text>
+					</view>
+				</view>
 				<view class="mun-box">
 					<text>购买数量</text>
 					<view class="num">
 						<uni-number-box class="step" :isMin="true" :value="goodsNumber" :min="1" :max="goodsNumberMax" @eventChange="numberChange"></uni-number-box>
 					</view>
 				</view>
+				
 				<button class="btn" @click.stop="buy" v-show="buys_show">完成</button>
 				<button class="btn" style="background-color: #999999;" v-show="buys_shows">售罄</button>
 			</view>
@@ -87,6 +73,7 @@
 </template>
 
 <script>
+	import uniListItem from '@/components/uni-list-item/uni-list-item.vue';
 import { goodsDetail, cartAdd, seckillGoods } from '@/api/product.js';
 import { mapState } from 'vuex';
 import store from '@/store/index.js';
@@ -126,6 +113,7 @@ export default {
 	},
 	data() {
 		return {
+			showAdd: true,
 			isShare: false,
 			goodsStore: 0, //选中库存
 			specList: [],
@@ -175,7 +163,9 @@ export default {
 				i: '', //分
 				s: '' //秒
 			},
-			userInfo: ''
+			userInfo: '',
+			is_drop: false ,//是否上门安装
+			showDrop: false,//商品是否具有安装属性
 		};
 	},
 	filters: {
@@ -244,6 +234,14 @@ export default {
 		return shareObj;
 	},
 	methods: {
+		//选择是否上门安装
+		dropClick(val) {
+			if(val == 1) {
+				this.is_drop = true
+			}else {
+				this.is_drop = false
+			}
+		},
 		//选择数量
 		numberChange(e) {
 			console.log(e)
@@ -351,6 +349,10 @@ export default {
 					obj.good_list = data.good_list; //保存猜你喜欢列表
 					obj.reply = data.reply; //保存评论列表
 					let goods = data.storeInfo;
+					if(goods.is_drop == 1) {
+						obj.showAdd = false
+						obj.showDrop = true
+					}
 					obj.goodsObjact = goods;
 					if (obj.goodsObjact.description != null) {
 						obj.description = obj.goodsObjact.description.replace(/\<img/gi, '<img class="rich-img"');
@@ -388,11 +390,15 @@ export default {
 			}
 			// 获取秒杀商品信息
 			if (obj.goodsType == 1) {
+				obj.showAdd = false
 				seckillGoods({}, this.goodsid).then(function({ data }) {
 					obj.list = data;
 					console.log(obj.list, '秒杀商品数据++++++++++');
 					obj.reply = data.reply; //保存评论列表
 					let goods = data.storeInfo;
+					if(goods.is_drop == 1) {
+						obj.showDrop = true
+					}
 					obj.goodsNumberMax = goods.num;
 					console.log(obj.seckillObj, '数据');
 					obj.goodsObjact = goods;
@@ -444,7 +450,7 @@ export default {
 				new: 1,
 				productId: obj.goodsid, //商品编号
 				uniqueId: obj.uniqueId,
-				is_drop: 1
+				is_drop: obj.is_drop ? 1: 0,
 			};
 
 			if (obj.type == 2) {
@@ -455,8 +461,10 @@ export default {
 					let da = e.data;
 					if (obj.type == 1) {
 						// 跳转到支付页
+						let a =  obj.is_drop ? 1: 0
+						console.log(a)
 						uni.navigateTo({
-							url: '/pages/order/createOrder?id=' + da.cartId
+							url: '/pages/order/createOrder?id=' + da.cartId + '&isdrop=' + a
 						});
 					}
 					if (obj.type == 2) {
@@ -697,6 +705,7 @@ page {
 }
 //秒杀、拼团底部高度
 .contentBottomHeight {
+	background-color: #f8f8f8;
 	height: 130rpx;
 }
 //默认商品底部高度

+ 5 - 4
pages/public/forget.vue

@@ -1,7 +1,7 @@
 <template>
 	<view class="container">
 		<view class="container_text">
-			<image class="banner-img" src="/static/img/img01.png" mode=" scaleToFill"></image>
+			<!-- <image class="banner-img" src="/static/img/img01.png" mode=" scaleToFill"></image> -->
 		</view>
 		<view class="loginTitle"><text>手机号登录</text></view>
 		<view class="login_text">
@@ -130,7 +130,8 @@ page {
 }
 .container_text {
 	width: 100%;
-	height: 500rpx;
+	height: 500rpx;
+	background-color: #ff4c4c;
 	top: 0rpx;
 	.banner-img {
 		width: 100%;
@@ -163,7 +164,7 @@ page {
 				width: 325rpx !important;
 			}
 			.code {
-				color: #5dbc7c;
+				color: #ff4c4c;
 				font-size: 23rpx;
 				border-left: 1px solid #eeeeee;
 				width: 150rpx;
@@ -174,7 +175,7 @@ page {
 	}
 	.uni-button-green {
 		color: #ffffff;
-		background-color: #5dbc7c;
+		background-color: #ff4c4c;
 		margin: 40rpx 10rpx;
 		border-radius: 50rpx;
 	}

+ 385 - 381
pages/public/login.vue

@@ -1,382 +1,386 @@
-<template>
-	<view class="container">
-		<view class="container_text"><image class="banner-img" src="/static/img/img01.png" mode="scaleToFill"></image></view>
-		<view class="loginTitle"><text>登录</text></view>
-		<view class="login_text">
-			<view class="login_input flex">
-				<view class="login_img"><image src="/static/icon/img03.png"></image></view>
-				<view class="login_name"><input class="uni-input" v-model="username" focus placeholder="请输入手机号" /></view>
-			</view>
-			<view class="login_input flex">
-				<view class="login_img"><image src="/static/icon/img04.png"></image></view>
-				<view class="login_name"><input class="uni-input" type="password" v-model="passward" focus placeholder="请输入密码" /></view>
-			</view>
-			<view><button type="green" class="uni-button uni-button-green" @click="toLogin">登录</button></view>
-			<view><button type="green" class="uni-button uni-button-green uni-button-green-plain" plain="true" hover-class="none" @click="register">注册</button></view>
-			<navigator url="./forget"><view class="forget">忘记密码</view></navigator>
-			<view class="flex other">
-				<view class="fenge"></view>
-				<view class="qita">其他方式登录</view>
-				<view class="fenge"></view>
-			</view>
-			<!-- #ifndef APP-PLUS -->
-			<view class="weixin" @click="wecahtLogin"><image src="/static/img/img05.png"></image></view>
-			<view class="weixin_text" @click="wecahtLogin">微信登录</view>
-			<!-- #endif -->
-			<!-- #ifdef APP-PLUS -->
-			<block v-if="!is_ios">
-				<view class="weixin" @click="wecahtLogin"><image src="/static/img/img05.png" mode="scaleToFill"></image></view>
-				<view class="weixin_text" @click="wecahtLogin">微信登录</view>
-			</block>
-			<block v-else>
-				<view class="ios_login flex" @click="wecahtLogin('weixin')">
-					<text class="iconfont iconweixin"></text>
-					<text class="weixin_text">微信登录</text>
-				</view>
-				<view v-if="is_apple_login" class="ios_login flex" @click="wecahtLogin('apple')">
-					<image class="loginIcon" src="/static/icon/appleIcon.png" mode=" scaleToFill"></image>
-					<text class="weixin_text">通过Apple登录</text>
-				</view>
-			</block>
-			<!-- #endif -->
-		</view>
-	</view>
-</template>
-
-<script>
-import { mapMutations } from 'vuex';
-import { login } from '@/api/login.js';
-import { getUserInfo } from '@/api/user.js';
-// #ifdef APP-PLUS
-// applelogin接口需要开发编写,基础项目中可能没有
-import { applelogin } from '@/api/set.js';
-// loginWx接口需要开发编写,基础项目中可能没有
-import { loginWx } from '@/api/login.js';
-// #endif
-// #ifdef H5
-import { loginWinxin } from '@/utils/wxAuthorized';
-// #endif
-export default {
-	data() {
-		return {
-			username: '',
-			passward: '',
-			// #ifdef APP-PLUS
-			is_ios: false, //判断是否为ios手机
-			is_apple_login: false //是否有ios授权登录功能
-			// #endif
-		};
-	},
-	onLoad() {
-		let obj = this;
-		// #ifdef APP-PLUS
-		let system = uni.getStorageSync('platform');
-		// 判断是否为ios
-		if (system == 'ios') {
-			obj.is_ios = true;
-		}
-		uni.getSystemInfo({
-			success(e) {
-				if (+e.system.split('.')[0] >= 13) {
-					obj.is_apple_login = true;
-				}
-			}
-		});
-		// #endif
-	},
-	methods: {
-		...mapMutations('user', ['setUserInfo', 'login']),
-		// 微信登录
-		wecahtLogin(type) {
-			let obj = this;
-			// #ifdef H5
-			let weichatBrowser = uni.getStorageSync('weichatBrowser');
-			if (weichatBrowser) {
-				loginWinxin();
-			}
-			// #endif
-			// #ifdef APP-PLUS
-			uni.login({
-				provider: type,
-				success(e) {
-					uni.getUserInfo({
-						provider: type,
-						success(es) {
-							if (type === 'weixin') {
-								loginWx(es.userInfo)
-									.then(e => {
-										uni.setStorageSync('token', e.data.token);
-										getUserInfo({}).then(e => {
-											obj.login();
-											// 保存返回用户数据
-											obj.setUserInfo(e.data);
-											//成功跳转首页
-											uni.switchTab({
-												url: '/pages/index/index'
-											});
-										});
-									})
-									.catch(e => {
-										console.log(e);
-										uni.showModal({
-											content: JSON.stringify(e),
-											success() {},
-											fail() {}
-										});
-									});
-							}
-							if (type === 'apple') {
-								console.log(es.userInfo);
-								applelogin({
-									account: es.userInfo.openId
-								})
-									.then(function(e) {
-										console.log(e, 'token');
-										uni.setStorageSync('token', e.data.token);
-										getUserInfo({}).then(e => {
-											obj.login();
-											// 保存返回用户数据
-											obj.setUserInfo(e.data);
-											//成功跳转首页
-											uni.switchTab({
-												url: '/pages/index/index'
-											});
-										});
-									})
-									.catch(function(e) {
-										console.log(e);
-									});
-							}
-						},
-						fail(es) {
-							uni.showModal({
-								content: JSON.stringify(es),
-								success() {
-									// obj.login();
-									// // 保存返回用户数据
-									// obj.setUserInfo(e.data);
-									// //成功跳转首页
-									// uni.switchTab({
-									// 	url: '/pages/index/index'
-									// });
-								}
-							});
-						}
-					});
-				},
-				fail(e) {
-					uni.showModal({
-						title: '提示',
-						content: JSON.stringify(e),
-						showCancel: false
-					});
-				}
-			});
-			// #endif
-		},
-		//登录
-		async toLogin() {
-			let obj = this;
-			obj.logining = true;
-			if (obj.username == '') {
-				obj.$api.msg('请输入手机号');
-				return;
-			}
-			if (obj.passward == '') {
-				obj.$api.msg('请输入密码');
-				return;
-			}
-			login({
-				account: obj.username,
-				password: obj.passward
-			})
-				.then(function(e) {
-					uni.setStorageSync('token', e.data.token);
-					obj.$store.commit('hasLogin', true);
-					getUserInfo({}).then(e => {
-						obj.login();
-						// 保存返回用户数据
-						obj.setUserInfo(e.data);
-						let ur = uni.getStorageSync('present') || '/pages/index/index';
-						//成功跳转首页
-						uni.switchTab({
-							url: ur,
-							fail(e) {
-								uni.navigateTo({
-									url: ur,
-									fail(e) {
-										uni.navigateTo({
-											url: '/pages/index/index'
-										});
-									}
-								});
-							}
-						});
-					});
-				})
-				.catch(function(e) {
-					console.log(e);
-				});
-		},
-		//跳转注册页
-		register() {
-			uni.navigateTo({
-				url: `/pages/public/register`
-			});
-		},
-		// 后退
-		navBack() {
-			uni.navigateBack();
-		}
-	}
-};
-</script>
-
-<style lang="scss">
-/* #ifdef APP-PLUS */
-
-.ios_login {
-	width: 260rpx;
-	border-radius: 12rpx;
-	justify-content: center;
-	border: 1px solid #212121;
-	margin: 24rpx auto;
-	padding: 10rpx;
-	background-color: #212121;
-	color: #ffffff;
-	.loginIcon {
-		width: 50rpx;
-		height: 50rpx;
-	}
-	.weixin_text {
-		line-height: 1;
-		margin-left: 20rpx;
-		color: #ffffff !important;
-	}
-}
-
-/* #endif */
-.ios_login {
-	width: 350rpx;
-	border-radius: 12rpx;
-	justify-content: center;
-	border: 1px solid #212121;
-	margin: 24rpx auto;
-	padding: 15rpx;
-	background-color: #212121;
-	color: #ffffff;
-	font-size: 32rpx;
-	.loginIcon {
-		font-size: 35rpx;
-		width: 35rpx;
-		height: 35rpx;
-	}
-	.weixin_text {
-		line-height: 1;
-		margin-left: 20rpx;
-		color: #ffffff !important;
-	}
-}
-
-page {
-	height: 100%;
-}
-.container {
-	width: 100%;
-	height: 100%;
-	background-size: 100%;
-}
-.container_text {
-	width: 100%;
-	height: 500rpx;
-	top: 0rpx;
-	.banner-img {
-		width: 100%;
-		height: 100%;
-	}
-}
-.login_text {
-	margin: auto 30rpx;
-	position: relative;
-	padding: 100rpx 102rpx;
-	background-color: #ffffff;
-	margin-top: -180rpx;
-	border-radius: 20rpx;
-	.login_input {
-		border-bottom: 1px solid #f0f0f0;
-		margin-bottom: 65rpx;
-		.login_img image {
-			height: 35rpx;
-			width: 29rpx;
-			margin-right: 20rpx;
-		}
-		.uni-input {
-			text-align: left;
-			width: 470rpx;
-			font-size: 28rpx !important;
-		}
-		.login_name {
-			color: #333333;
-		}
-	}
-
-	.other {
-		margin-top: 60rpx;
-		.fenge {
-			width: 30%;
-			height: 2rpx;
-			background-color: #eeeeee;
-		}
-		.qita {
-			font-size: 28rpx;
-			color: #999999;
-		}
-	}
-	.weixin {
-		width: 75rpx;
-		height: 75rpx;
-		margin: 25rpx auto;
-	}
-	.weixin image {
-		width: 100%;
-		height: 100%;
-	}
-	.weixin_text {
-		text-align: center;
-		font-size: 28rpx;
-		color: #999999;
-	}
-	.forget {
-		font-size: 28rpx;
-		width: 100%;
-		text-align: right;
-		color: #999999;
-	}
-
-	.uni-button-green {
-		color: #ffffff;
-		background-color: #5dbc7c;
-		margin: 40rpx 10rpx;
-		border-radius: 50rpx;
-	}
-	.uni-button-green-plain {
-		border: 1px solid #5dbc7c;
-		margin: 40rpx 10rpx;
-		border-radius: 50rpx;
-		color: #5dbc7c;
-		background-color: #ffffff;
-	}
-	.uni-button {
-		height: 85rpx;
-		line-height: 85rpx;
-	}
-}
-.loginTitle {
-	position: absolute;
-	top: 250rpx;
-	width: 100%;
-	text-align: center;
-	color: white;
-	font-size: 40rpx;
-}
+<template>
+	<view class="container">
+		<view class="container_text">
+			<!-- <image class="banner-img" src="/static/img/img01.png" mode="scaleToFill"> -->
+		</image>
+		</view>
+		<view class="loginTitle"><text>登录</text></view>
+		<view class="login_text">
+			<view class="login_input flex">
+				<view class="login_img"><image src="/static/icon/img03.png"></image></view>
+				<view class="login_name"><input class="uni-input" v-model="username" focus placeholder="请输入手机号" /></view>
+			</view>
+			<view class="login_input flex">
+				<view class="login_img"><image src="/static/icon/img04.png"></image></view>
+				<view class="login_name"><input class="uni-input" type="password" v-model="passward" focus placeholder="请输入密码" /></view>
+			</view>
+			<view><button type="green" class="uni-button uni-button-green" @click="toLogin">登录</button></view>
+			<view><button type="green" class="uni-button uni-button-green uni-button-green-plain" plain="true" hover-class="none" @click="register">注册</button></view>
+			<navigator url="./forget"><view class="forget">忘记密码</view></navigator>
+			<view class="flex other">
+				<view class="fenge"></view>
+				<view class="qita">其他方式登录</view>
+				<view class="fenge"></view>
+			</view>
+			<!-- #ifndef APP-PLUS -->
+			<view class="weixin" @click="wecahtLogin"><image src="/static/img/img05.png"></image></view>
+			<view class="weixin_text" @click="wecahtLogin">微信登录</view>
+			<!-- #endif -->
+			<!-- #ifdef APP-PLUS -->
+			<block v-if="!is_ios">
+				<view class="weixin" @click="wecahtLogin"><image src="/static/img/img05.png" mode="scaleToFill"></image></view>
+				<view class="weixin_text" @click="wecahtLogin">微信登录</view>
+			</block>
+			<block v-else>
+				<view class="ios_login flex" @click="wecahtLogin('weixin')">
+					<text class="iconfont iconweixin"></text>
+					<text class="weixin_text">微信登录</text>
+				</view>
+				<view v-if="is_apple_login" class="ios_login flex" @click="wecahtLogin('apple')">
+					<image class="loginIcon" src="/static/icon/appleIcon.png" mode=" scaleToFill"></image>
+					<text class="weixin_text">通过Apple登录</text>
+				</view>
+			</block>
+			<!-- #endif -->
+		</view>
+	</view>
+</template>
+
+<script>
+import { mapMutations } from 'vuex';
+import { login } from '@/api/login.js';
+import { getUserInfo } from '@/api/user.js';
+// #ifdef APP-PLUS
+// applelogin接口需要开发编写,基础项目中可能没有
+import { applelogin } from '@/api/set.js';
+// loginWx接口需要开发编写,基础项目中可能没有
+import { loginWx } from '@/api/login.js';
+// #endif
+// #ifdef H5
+import { loginWinxin } from '@/utils/wxAuthorized';
+// #endif
+export default {
+	data() {
+		return {
+			username: '',
+			passward: '',
+			// #ifdef APP-PLUS
+			is_ios: false, //判断是否为ios手机
+			is_apple_login: false //是否有ios授权登录功能
+			// #endif
+		};
+	},
+	onLoad() {
+		let obj = this;
+		// #ifdef APP-PLUS
+		let system = uni.getStorageSync('platform');
+		// 判断是否为ios
+		if (system == 'ios') {
+			obj.is_ios = true;
+		}
+		uni.getSystemInfo({
+			success(e) {
+				if (+e.system.split('.')[0] >= 13) {
+					obj.is_apple_login = true;
+				}
+			}
+		});
+		// #endif
+	},
+	methods: {
+		...mapMutations('user', ['setUserInfo', 'login']),
+		// 微信登录
+		wecahtLogin(type) {
+			let obj = this;
+			// #ifdef H5
+			let weichatBrowser = uni.getStorageSync('weichatBrowser');
+			if (weichatBrowser) {
+				loginWinxin();
+			}
+			// #endif
+			// #ifdef APP-PLUS
+			uni.login({
+				provider: type,
+				success(e) {
+					uni.getUserInfo({
+						provider: type,
+						success(es) {
+							if (type === 'weixin') {
+								loginWx(es.userInfo)
+									.then(e => {
+										uni.setStorageSync('token', e.data.token);
+										getUserInfo({}).then(e => {
+											obj.login();
+											// 保存返回用户数据
+											obj.setUserInfo(e.data);
+											//成功跳转首页
+											uni.switchTab({
+												url: '/pages/index/index'
+											});
+										});
+									})
+									.catch(e => {
+										console.log(e);
+										uni.showModal({
+											content: JSON.stringify(e),
+											success() {},
+											fail() {}
+										});
+									});
+							}
+							if (type === 'apple') {
+								console.log(es.userInfo);
+								applelogin({
+									account: es.userInfo.openId
+								})
+									.then(function(e) {
+										console.log(e, 'token');
+										uni.setStorageSync('token', e.data.token);
+										getUserInfo({}).then(e => {
+											obj.login();
+											// 保存返回用户数据
+											obj.setUserInfo(e.data);
+											//成功跳转首页
+											uni.switchTab({
+												url: '/pages/index/index'
+											});
+										});
+									})
+									.catch(function(e) {
+										console.log(e);
+									});
+							}
+						},
+						fail(es) {
+							uni.showModal({
+								content: JSON.stringify(es),
+								success() {
+									// obj.login();
+									// // 保存返回用户数据
+									// obj.setUserInfo(e.data);
+									// //成功跳转首页
+									// uni.switchTab({
+									// 	url: '/pages/index/index'
+									// });
+								}
+							});
+						}
+					});
+				},
+				fail(e) {
+					uni.showModal({
+						title: '提示',
+						content: JSON.stringify(e),
+						showCancel: false
+					});
+				}
+			});
+			// #endif
+		},
+		//登录
+		async toLogin() {
+			let obj = this;
+			obj.logining = true;
+			if (obj.username == '') {
+				obj.$api.msg('请输入手机号');
+				return;
+			}
+			if (obj.passward == '') {
+				obj.$api.msg('请输入密码');
+				return;
+			}
+			login({
+				account: obj.username,
+				password: obj.passward
+			})
+				.then(function(e) {
+					uni.setStorageSync('token', e.data.token);
+					obj.$store.commit('hasLogin', true);
+					getUserInfo({}).then(e => {
+						obj.login();
+						// 保存返回用户数据
+						obj.setUserInfo(e.data);
+						let ur = uni.getStorageSync('present') || '/pages/index/index';
+						//成功跳转首页
+						uni.switchTab({
+							url: ur,
+							fail(e) {
+								uni.navigateTo({
+									url: ur,
+									fail(e) {
+										uni.navigateTo({
+											url: '/pages/index/index'
+										});
+									}
+								});
+							}
+						});
+					});
+				})
+				.catch(function(e) {
+					console.log(e);
+				});
+		},
+		//跳转注册页
+		register() {
+			uni.navigateTo({
+				url: `/pages/public/register`
+			});
+		},
+		// 后退
+		navBack() {
+			uni.navigateBack();
+		}
+	}
+};
+</script>
+
+<style lang="scss">
+/* #ifdef APP-PLUS */
+
+.ios_login {
+	width: 260rpx;
+	border-radius: 12rpx;
+	justify-content: center;
+	border: 1px solid #212121;
+	margin: 24rpx auto;
+	padding: 10rpx;
+	background-color: #212121;
+	color: #ffffff;
+	.loginIcon {
+		width: 50rpx;
+		height: 50rpx;
+	}
+	.weixin_text {
+		line-height: 1;
+		margin-left: 20rpx;
+		color: #ffffff !important;
+	}
+}
+
+/* #endif */
+.ios_login {
+	width: 350rpx;
+	border-radius: 12rpx;
+	justify-content: center;
+	border: 1px solid #212121;
+	margin: 24rpx auto;
+	padding: 15rpx;
+	background-color: #212121;
+	color: #ffffff;
+	font-size: 32rpx;
+	.loginIcon {
+		font-size: 35rpx;
+		width: 35rpx;
+		height: 35rpx;
+	}
+	.weixin_text {
+		line-height: 1;
+		margin-left: 20rpx;
+		color: #ffffff !important;
+	}
+}
+
+page {
+	height: 100%;
+}
+.container {
+	width: 100%;
+	height: 100%;
+	background-size: 100%;
+}
+.container_text {
+	width: 100%;
+	height: 500rpx;
+	top: 0rpx;
+	background-color: #ff4c4c;
+	.banner-img {
+		width: 100%;
+		height: 100%;
+	}
+}
+.login_text {
+	margin: auto 30rpx;
+	position: relative;
+	padding: 100rpx 102rpx;
+	background-color: #ffffff;
+	margin-top: -180rpx;
+	border-radius: 20rpx;
+	.login_input {
+		border-bottom: 1px solid #f0f0f0;
+		margin-bottom: 65rpx;
+		.login_img image {
+			height: 35rpx;
+			width: 29rpx;
+			margin-right: 20rpx;
+		}
+		.uni-input {
+			text-align: left;
+			width: 470rpx;
+			font-size: 28rpx !important;
+		}
+		.login_name {
+			color: #333333;
+		}
+	}
+
+	.other {
+		margin-top: 60rpx;
+		.fenge {
+			width: 30%;
+			height: 2rpx;
+			background-color: #eeeeee;
+		}
+		.qita {
+			font-size: 28rpx;
+			color: #999999;
+		}
+	}
+	.weixin {
+		width: 75rpx;
+		height: 75rpx;
+		margin: 25rpx auto;
+	}
+	.weixin image {
+		width: 100%;
+		height: 100%;
+	}
+	.weixin_text {
+		text-align: center;
+		font-size: 28rpx;
+		color: #999999;
+	}
+	.forget {
+		font-size: 28rpx;
+		width: 100%;
+		text-align: right;
+		color: #999999;
+	}
+
+	.uni-button-green {
+		color: #ffffff;
+		background-color: #ff4c4c;
+		margin: 40rpx 10rpx;
+		border-radius: 50rpx;
+	}
+	.uni-button-green-plain {
+		border: 1px solid #ff4c4c;
+		margin: 40rpx 10rpx;
+		border-radius: 50rpx;
+		color: #ff4c4c;
+		background-color: #ffffff;
+	}
+	.uni-button {
+		height: 85rpx;
+		line-height: 85rpx;
+	}
+}
+.loginTitle {
+	position: absolute;
+	top: 250rpx;
+	width: 100%;
+	text-align: center;
+	color: white;
+	font-size: 40rpx;
+}
 </style>

+ 18 - 10
pages/public/register.vue

@@ -1,7 +1,7 @@
 <template>
 	<view class="container">
 		<view class="container_text" >
-			<image class="banner-img" src="/static/img/img01.png" mode="scaleToFill"></image>
+			<!-- <image class="banner-img" src="/static/img/img01.png" mode="scaleToFill"></image> -->
 		</view>
 		<view class="loginTitle"><text>注册</text></view>
 		<view class="login_text">
@@ -21,13 +21,13 @@
 				<view class="login_img"><image src="/static/icon/img07.png"></image></view>
 				<view class="login_name"><input class="uni-input" type="text" v-model="invitation" focus placeholder="请输入邀请码" /></view>
 			</view>
-			<view class="login_input flex">
+			<!-- <view class="login_input flex">
 				<view class="login_img"><image src="/static/icon/img06.png"></image></view>
 				<view class="login_name flex">
 					<input class="uni-input width" v-model="code" focus placeholder="请输入验证码" />
 					<view class="code" @click="verification">{{ countDown == 0 ? '验证码' : countDown }}</view>
 				</view>
-			</view>
+			</view> -->
 			<view><button type="green" @click="register" class="uni-button uni-button-green">注册账号</button></view>
 			<view><button class="uni-button uni-button-green uni-button-green-plain" type="green" plain="true" hover-class="none" @click="login">返回登录</button></view>
 		</view>
@@ -90,13 +90,18 @@ export default {
 			// if (obj.code == '') {
 			// 	obj.$api.msg('请输入验证码');
 			// 	return;
-			// }
+			// }
+			uni.showLoading({
+				title: '注册中',
+				mask: true
+			})
 			register({
 				account: obj.phone, //账号
 				// captcha: obj.code, //验证码
 				password: obj.password ,//密码
 				spread:this.invitation//上级推广人
-			}).then(function(e) {
+			}).then(function(e) {
+				uni.hideLoading()
 				uni.showToast({
 					title:'注册成功',
 					duration:2000,
@@ -108,6 +113,8 @@ export default {
 					});
 				},1000)
 				
+			}).catch( err => {
+				uni.hideLoading()
 			});
 			//调用注册接口,成功跳转登录页
 		},
@@ -163,7 +170,8 @@ page {
 .container_text {
 	width: 100%;
 	height: 500rpx;
-	top: 0rpx;
+	top: 0rpx;
+	background-color: #FF4C4C;
 	.banner-img {
 		width: 100%;
 		height: 100%;
@@ -229,15 +237,15 @@ page {
 
 	.uni-button-green {
 		color: #ffffff;
-		background-color: #5dbc7c;
+		background-color: #FF4C4C;
 		margin: 40rpx 10rpx;
 		border-radius: 50rpx;
 	}
 	.uni-button-green-plain {
-		border: 1px solid #5dbc7c;
+		border: 1px solid #FF4C4C;
 		margin: 40rpx 10rpx;
 		border-radius: 50rpx;
-		color: #5dbc7c;
+		color: #FF4C4C;
 		background-color: #ffffff;
 	}
 	.uni-button {
@@ -265,7 +273,7 @@ page {
 	width: 325rpx !important;
 }
 .code {
-	color: #5dbc7c;
+	color: #FF4C4C;
 	font-size: 23rpx;
 	border-left: 1px solid #eeeeee;
 	width: 150rpx;

+ 1 - 1
pages/set/addressManage.vue

@@ -32,7 +32,7 @@
 				:switch-checked="addressData.default"
 				:show-switch="true"
 				:show-arrow="false"
-				switch-color="#5dbc7c"
+				switch-color="#ff4c4c"
 				@switchChange="switchChange"
 			></uni-list-item>
 		</uni-list>

+ 71 - 13
pages/store/apply.vue

@@ -70,9 +70,8 @@
 						<input type="text" v-model="phone" placeholder="请输入您的手机号"/>
 					</view>
 					<view class="itemx">
-						<view class="item-tit">验证码:</view>
-						<input type="text" v-model="code" placeholder="请输入验证码"/>
-						<view class="code" @click="verification">{{ countDown == 0 ? '验证码' : countDown }}</view>
+						<view class="item-tit">店铺名称:</view>
+						<input type="text" v-model="merchant_name" placeholder="请输入店铺名称"/>
 					</view>
 				</view>
 			</view>
@@ -93,19 +92,15 @@
 				营业执照
 				<view class="imgs">
 					<view class="imgs-item">
-						<image :src="sfzz" mode="" v-if="sfzz" @click.stop="upImg(1)"></image>
-						<image src="../../static/img/add.png" mode="" v-if="!sfzz" @click.stop="upImg(1)"></image>
-					</view>
-					<view class="imgs-item">
-						<image :src="sfzf" mode="" v-if="sfzf" @click.stop="upImg(2)"></image>
-						<image src="../../static/img/add.png" mode="" v-if="!sfzf" @click.stop="upImg(2)"></image>
+						<image :src="sfzz" mode="" v-if="yyzz" @click.stop="upImg('yyzz')"></image>
+						<image src="../../static/img/add.png" mode="" v-if="!yyzz" @click.stop="upImg('yyzz')"></image>
 					</view>
 				</view>
 			</view>
 			<view class="btn-tc">
 				
 			</view>
-			<view class="sub-btn">
+			<view class="sub-btn" @click="sub">
 				提交申请
 			</view>
 		</template>
@@ -114,7 +109,7 @@
 
 <script>
 import { register, verify } from '@/api/login.js';
-import { upload } from '@/api/user.js';
+import { upload ,enter} from '@/api/user.js';
 export default {
 	data() {
 		return {
@@ -124,9 +119,11 @@ export default {
 			name: '',
 			speed_id: '',
 			phone: '',
-			code: '',
+			// code: '',
 			sfzz: '', //身份证正面
-			sfzf: '' //身份证反面
+			sfzf: '', //身份证反面
+			yyzz: '',//营业执照
+			merchant_name: '',//店铺名称
 		};
 	},
 	watch:{
@@ -181,6 +178,67 @@ export default {
 					});
 			}
 		},
+		//提交
+		sub() {
+			let obj = this
+			if(obj.name == '') {
+				obj.$api.msg('请输入姓名')
+				return
+			}
+			if(obj.phone == '') {
+				obj.$api.msg('请输入联系方式')
+				return
+			}
+			if (this.phone.length < 11) {
+				this.$api.msg('请输入正确的手机号');
+				return;
+			}
+			if(obj.sfzz == '') {
+				obj.$api.msg('请上传身份证证件照')
+				return
+			}
+			if(obj.sfzf == '') {
+				obj.$api.msg('请上传身份证证件照')
+				return
+			}
+			if(obj.yyzz == '') {
+				obj.$api.msg('请上传营业执照')
+				return
+			}
+			if(obj.merchant_name == '') {
+				obj.$api.msg('请输入店铺名称')
+				return
+			}
+			let card_id = obj.sfzz + ',' + obj.sfzf
+			uni.showLoading({
+				title: '提交中...',
+				mask: true
+			})
+			enter({
+				type: 1,
+				merchant_name: obj.merchant_name,
+				link_user: obj.name,
+				link_tel: obj.phone,
+				spread_uid: obj.speed_id,
+				charter: obj.yyzz,
+				card_id: card_id
+			}).then( res => {
+				uni.hideLoading()
+				uni.showToast({
+					title: '提交成功',
+					duration: 2000
+				});
+				setTimeout(()=> {
+					uni.navigateBack({})
+				},2000)
+				
+				console.log(res)
+			}).catch( err => {
+				uni.hideLoading()
+				console.log(err)
+				
+			})
+		}
 	}
 };
 </script>

+ 90 - 35
pages/store/storeDetail.vue

@@ -1,59 +1,114 @@
 <template>
 	<view class="content">
-		<view class="top">
-			<image src="" mode="" class="store-img"></image>
-			<view class="right">
-				<view class="store-name clamp">
-					鑫旺零售台州店
-				</view>
-				<view class="store-content clamp2">
-					店铺简介店铺简介店铺简介店铺简介店铺简介店铺简介店铺简介店铺简介店铺简介店铺简介店铺简介店铺简介店铺简介店铺简介店铺简介店铺简介店铺简介店铺简介店铺简介店铺简介
+		<template v-if="store">
+			<view class="top">
+				<image :src="store.image" mode="" class="store-img"></image>
+				<view class="right">
+					<view class="store-name clamp">
+						{{store.name}}
+					</view>
+					<view class="store-content clamp2">
+						{{store.introduction}}
+					</view>
 				</view>
 			</view>
-		</view>
-		<view class="jg"></view>
-		<view class="store-info">
-			<view class="title">
-				门店地址/营业时间
-			</view>
-			<view class="info-box">
-				<view class="item">
-					<image src="" mode="" class="item-img"></image>
-					<view class="item-msg">
-						台州市市府大道110号
-					</view>
+			<view class="jg"></view>
+			<view class="store-info">
+				<view class="title">
+					门店地址/营业时间
 				</view>
-				<view class="item">
-					<image src="" mode="" class="item-img"></image>
-					<view class="item-msg">
-						营业时间8:30-12:00,13:30-17:00
+				<view class="info-box">
+					<view class="item">
+						<image src="../../static/icon/adress.png" mode="" class="item-img"></image>
+						<view class="item-msg">
+							{{store.detailed_address}}
+						</view>
 					</view>
-				</view>
-				<view class="item">
-					<image src="" mode="" class="item-img"></image>
-					<view class="item-msg">
-						0576-847112333
+					<view class="item">
+						<image src="../../static/icon/daytime.png" mode="" class="item-img"></image>
+						<view class="item-msg">
+							营业时间{{store.day_time}}
+						</view>
+					</view>
+					<view class="item">
+						<image src="../../static/icon/phone.png" mode="" class="item-img"></image>
+						<view class="item-msg">
+							{{store.phone}}
+						</view>
 					</view>
 				</view>
 			</view>
-		</view>
-		<view class="edit-btn" @click="navTo('/pages/store/storeMessage')">
+			
+		</template>
+		<empty v-if="!store && loaded"></empty>
+		<view class="edit-btn" @click="eidt()" v-if="store && loaded">
 			编辑信息
 		</view>
 	</view>
 </template>
 
 <script>
+	import empty from '@/components/empty';
+	import { getStoreInfo } from '@/api/index.js';
+	import { orderData, getUserInfo, getMyStore } from '@/api/user.js';
 	export default {
+		components: {
+			empty
+		},
 		data() {
-			return {}
+			return {
+				canEdit: false,
+				store: '',
+				loaded: false
+			}
+		},
+		onLoad(opt) {
+			if(opt.id) {
+				this.store_id = opt.id
+				this.getStoreInfo()
+			}else {
+				this.getMyStore()
+				
+			}
+			
 		},
 		methods: {
 			navTo(url) {
 				uni.navigateTo({
 					url: url
 				})
-			}
+			},
+			getStoreInfo() {
+				uni.showLoading({
+					title: '加载中...',
+					mask: true
+				})
+				getStoreInfo({
+					id: this.store_id
+				}).then(({data}) => {
+					uni.hideLoading()
+					this.store = data
+				}).catch( err => {
+					console.log(err)
+				})
+			},
+			getMyStore() {
+				getMyStore().then( ({data}) => {
+					if(data.length==0) {
+						this.loaded = true
+					}else {
+						this.store = data[0]
+						this.loaded = true
+					}
+				})
+			},
+			eidt() {
+				let str = JSON.stringify(this.store)
+				console.log(str)
+				uni.navigateTo({
+					url: '/pages/store/storeMessage?type=edit&item='+str
+				})
+			}	
 		}
 	}
 </script>
@@ -70,7 +125,7 @@
 		.store-img {
 			width: 132rpx;
 			height: 132rpx;
-			background-color: red;
+			
 			flex-shrink: 0;
 		}
 		.right {
@@ -121,7 +176,7 @@
 					margin-right: 20rpx;
 					height: 28rpx;
 					width: 28rpx;
-					background-color: red;
+					
 					flex-shrink: 0;
 				}
 				.item-msg {

+ 71 - 11
pages/store/storeList.vue

@@ -2,15 +2,15 @@
 	<view class="store-list">
 		<scroll-view scroll-y="true" class="list" @scrolltolower="loadData()">
 			<empty v-if="loaded && list.length == 0"></empty>
-			<view class="store flex" v-for="item in list" @click="navTo('/pages/store/storeDetail')">
-				<image src="" mode="" class="store-img"></image>
+			<view class="store flex" v-for="item in list" @click="navTo('/pages/store/storeDetail?id=' + item.id)">
+				<image :src="item.image" mode="" class="store-img"></image>
 				<view class="store-info">
-					<view class="store-name clamp">鑫旺零售台州店鑫旺零售台州店鑫旺零售台州店</view>
-					<view class="store-detail">台州市椒江区市府大道120号</view>
+					<view class="store-name clamp">{{item.name}}</view>
+					<view class="store-detail">{{item.detailed_address}}</view>
 					<view class="store-tip">门店</view>
 					<view class="store-des">
-						<image src="" mode=""></image>
-						距离 15KM
+						<image src="../../static/icon/dingwei.png" mode=""></image>
+						距离 {{item.space}}
 					</view>
 				</view>
 			</view>
@@ -20,6 +20,8 @@
 </template>
 
 <script>
+	import { getStoreList } from '@/api/index.js';
+	import { mapState, mapMutations } from 'vuex';
 	import empty from '@/components/empty';
 	import uniLoadMore from '@/components/uni-load-more/uni-load-more.vue';
 	export default {
@@ -29,7 +31,7 @@
 		},
 		data() {
 			return {
-				list: [1,2,3],
+				list: [],
 				storeList: [],
 				loadingType: 'more',
 				page: 1,
@@ -56,6 +58,9 @@
 		onLoad() {
 			this.loadData()
 		},
+		computed: {
+			...mapState('latlon',['lat','lon']),
+		},
 		methods: {
 			//获取门店list
 			loadData() {
@@ -66,14 +71,71 @@
 				if(obj.loadingType == 'noMore') {
 					return 
 				}
-				
+				obj.loadingType = 'loading'
+				getStoreList({
+					page: obj.page,
+					limit: obj.limit,
+					latitude: obj.lat,
+					longitude: obj.lon
+				}).then(({data}) => {
+					let list = data.list.map(item => {
+						item.space = obj.space(obj.lat,obj.lon,item.latitude,item.longitude)
+						console.log(item.space,'item.space++++++++++')
+						return item
+					})
+					obj.list = obj.list.concat(list)
+					obj.page++;
+					if (obj.limit == data.list.length) {
+						//判断是否还有数据, 有改为 more, 没有改为noMore
+						obj.loadingType = 'more';
+						return;
+					} else {
+						//判断是否还有数据, 有改为 more, 没有改为noMore
+						obj.loadingType = 'noMore';
+					}
+					// uni.hideLoading();
+					this.$set(obj, 'loaded', true);
+					
+				})
 				
 			},
 			navTo(url) {
 				uni.navigateTo({
 					url: url
 				})
-			}
+			},
+			getStoreList(latitude,longitude) {
+				let obj = this
+				getStoreList({
+					page: obj.page,
+					limit: obj.limit,
+					latitude: latitude,
+					longitude: longitude
+				}).then( ({data}) => {
+					data.list = data.list.map(item => {
+						item.space = obj.space(obj.lat,obj.lon,item.latitude,item.longitude)
+						console.log(item.space,'item.space++++++++++')
+						return item
+					})
+					obj.storeList = data.list
+				})
+			},
+			space(lat1, lng1,lat2,lng2) {
+				console.log(lat1, lng1, lat2, lng2, '位置信息');
+				var radLat1 = (lat1 * Math.PI) / 180.0;
+				var radLat2 = (lat2 * Math.PI) / 180.0;
+				var a = radLat1 - radLat2;
+				var b = (lng1 * Math.PI) / 180.0 - (lng2 * Math.PI) / 180.0;
+				var s = 2 * Math.asin(Math.sqrt(Math.pow(Math.sin(a / 2), 2) + Math.cos(radLat1) * Math.cos(radLat2) * Math.pow(Math.sin(b / 2), 2)));
+				s = s * 6378.137;
+				s = Math.round(s * 10000) / 10000;
+				// return s * 1000;
+				if (s > 1) {
+					return s.toFixed(2) + 'km';
+				} else {
+					return s * 1000 + 'm'; // 单位米
+				}
+			},
 		}
 	}
 </script>
@@ -96,7 +158,6 @@
 			width: 180rpx;
 			height: 180rpx;
 			border-radius: 10rpx;
-			background-color: red;
 		}
 		.store-info {
 			width: 100%;
@@ -145,7 +206,6 @@
 					margin-right: 8rpx;
 					width: 17rpx;
 					height: 24rpx;
-					background-color: red;
 				}
 			}
 		}

+ 68 - 15
pages/store/storeMessage.vue

@@ -4,38 +4,38 @@
 			<view class="item-tit">
 				店铺名称
 			</view>
-			<input type="text" v-model="name"/>
+			<input type="text" v-model="store.name"/>
 		</view>
 		<view class="item">
 			<view class="item-tit">
 				商家电话
 			</view>
-			<input type="number" v-model="phone"/>
+			<input type="number" v-model="store.phone"/>
 		</view>
 		<view class="item">
 			<view class="item-tit">
 				商家地址
 			</view>
-			<input type="text" v-model="address"/>
+			<input type="text" v-model="store.detailed_address"/>
 		</view>
 		<view class="item">
 			<view class="item-tit">
 				营业时间
 			</view>
-			<input type="text" v-model="workTime"/>
+			<input type="text" v-model="store.day_time"/>
 		</view>
 		<view class="item">
 			<view class="item-tit">
 				商户简介
 			</view>
-			<textarea v-model="info" placeholder="" />
+			<textarea v-model="store.introduction" placeholder="" />
 		</view>
 		<view class="item">
 			<view class="item-tit">
 				门户头像
 			</view>
 			<view class="up-wrapper">
-				<image :src="logo" mode="" v-if="logo" @click.stop="upImg"></image>
+				<image :src="store.image" mode="" v-if="store.image" @click.stop="upImg"></image>
 				<image src="../../static/img/add.png" mode="" v-else  @click.stop="upImg"></image>
 			</view>
 		</view>
@@ -46,20 +46,26 @@
 </template>
 
 <script>
+	
 	import {
-			upload
+			upload,editStore
 		} from '@/api/user.js';
 	export default {
 		data() {
 			return {
-				name: '鑫旺零售台州店',
-				phone: '12345678911',
-				address: '台州市市府大道110号',
-				info: '店铺简介店铺简介店铺简介店铺简介店铺简介店铺简介铺简介店铺简介店铺简介店铺简介店铺简介店铺简介店铺简介',
-				workTime: '8:30-12:00,13:30-17:00',
-				logo: ''
+				store: {},
+				// name: '鑫旺零售台州店',
+				// phone: '12345678911',
+				// address: '台州市市府大道110号',
+				// info: '店铺简介店铺简介店铺简介店铺简介店铺简介店铺简介铺简介店铺简介店铺简介店铺简介店铺简介店铺简介店铺简介',
+				// workTime: '8:30-12:00,13:30-17:00',
+				// logo: ''
 			}
 		},
+		onLoad(opt) {
+			this.store = JSON.parse(opt.item)
+			console.log(this.store,'this.store++++++++++++')
+		},
 		methods:{
 			// 修改logo
 			upImg() {
@@ -68,13 +74,60 @@
 					filename: ''
 				}).then(res => {
 					console.log(res[0].url)
-					obj.logo = res[0].url
+					obj.store.image= res[0].url
 				});
 			},
 			//提交
 			sub() {
 				let obj = this
-				
+				let store = obj.store
+				if(store.name == '') {
+					obj.$api.msg('请输入店铺名称')
+					return 
+				}
+				if(store.phone == '') {
+					obj.$api.msg('请输入店铺电话')
+					return 
+				}
+				if(store.image == '') {
+					obj.$api.msg('请选择店铺头像')
+					return 
+				}
+				if(store.day_time == '') {
+					obj.$api.msg('请输入营业时间')
+					return 
+				}
+				if(store.introduction == '') {
+					obj.$api.msg('请输入店铺简介')
+					return 
+				}
+				if(store.detailed_address == '') {
+					obj.$api.msg('请输入店铺地址')
+					return 
+				}
+				uni.showLoading({
+					title: '提交中...',
+					mask: true
+				})
+				editStore({
+					name: store.name,
+					introduction: store.introduction,
+					image: store.image,
+					phone: store.phone,
+					day_time: store.day_time
+				}).then( res => {
+					uni.hideLoading()
+					uni.showToast({
+						title: '提交成功',
+						duration: 2000
+					});
+					setTimeout(()=> {
+						uni.navigateBack({})
+					},2000)
+				}).catch( err => {
+					uni.hideLoading()
+					console.log(err)
+				})
 			}
 			
 		}

+ 0 - 165
pages/user/applyList.vue

@@ -1,165 +0,0 @@
-<template>
-	<view class="content">
-		<view style="height: 20rpx;"></view>
-		<scroll-view scroll-y="true" class="list-wrapper" :style="{'height':height}" @scrolltolower="loadData()">
-			<empty v-if="loaded && list.length == 0"></empty>
-			<view class="apply-item flex" v-for="item in list">
-				<view class="item-left flex">
-					<image src="" mode="" class="item-img"></image>
-					<view class="item-info flex">
-						<view class="name">
-							假猪套
-						</view>
-						<view class="phone">
-							13245678911
-						</view>
-					</view>
-				</view>
-				<view class="item-btn flex">
-					<view class="err-btn">
-						拒绝
-					</view>
-					<view class="pas-btn">
-						通过
-					</view>
-				</view>
-				<!-- <view class="item-right">
-					已拒绝
-				</view> -->
-			</view>
-			<uni-load-more :status="loadingType" v-if="list !=0"></uni-load-more>
-		</scroll-view>
-	</view>
-</template>
-
-<script>
-	import empty from '@/components/empty';
-	import uniLoadMore from '@/components/uni-load-more/uni-load-more.vue';
-	export default {
-		components: {
-			empty,
-			uniLoadMore
-		},
-		data(){
-			return {
-				list: [1,2,3],
-				loaded: false,
-				loadingType: 'more',
-				page: 1,
-				limit: 15,
-				height: '',//滚动区域高度
-			}
-		},
-		onReady(res) {
-			var _this = this;
-			uni.getSystemInfo({
-				success: resu => {
-					const query = uni.createSelectorQuery();
-					query.select('.list-wrapper').boundingClientRect();
-					query.exec(function(res) {
-						console.log(res, 'ddddddddddddd');
-						_this.height = resu.windowHeight - res[0].top + 'px';
-						console.log('打印页面的剩余高度', _this.height);
-					});
-				},
-				fail: res => {}
-			});
-		},
-		onLoad () {
-			this.loadData()
-		},
-		methods: {
-			loadData() {
-				let obj = this
-				if(obj.loadingType == 'loading') {
-					return
-				}
-				if(obj.loadingType == 'noMore') {
-					return 
-				}
-				
-			}
-		}
-	}
-</script>
-
-<style lang="scss" scoped>
-	.list-wrapper {
-		// padding: 20rpx 20rpx 0;
-		background-color: #f8f6f6;
-	}
-	.apply-item {
-		
-		background-color: #fff;
-		height: 130rpx;
-		border-bottom: 1px solid #F0F0F0;
-		padding: 0 35rpx 0 20rpx;
-		&:last-child {
-			border: none;
-		}
-		.item-left {
-			.item-img {
-				height: 80rpx;
-				width: 80rpx;
-				border-radius: 80rpx;
-				background-color: red;
-			}
-			.item-info {
-				height: 80rpx;
-				flex-direction: column;
-				padding-left: 20rpx;
-				justify-content: space-around;
-				align-items: flex-start;
-				line-height: 1;
-				.name {
-					font-size: 30rpx;
-					font-family: PingFangSC;
-					font-weight: 500;
-					color: #3F454B;
-				}
-				.phone {
-					font-size: 22rpx;
-					font-family: PingFang SC;
-					font-weight: 400;
-					color: #999999;
-				}
-			}
-		}
-		.item-btn {
-			.err-btn {
-				width: 98rpx;
-				height: 47rpx;
-				border: 1px solid #000000;
-				border-radius: 5rpx;
-				line-height: 47rpx;
-				text-align: center;
-				font-size: 24rpx;
-				font-family: PingFang SC;
-				font-weight: 500;
-				color: #333333;
-			}
-			.pas-btn {
-				width: 98rpx;
-				height: 47rpx;
-				background: linear-gradient(-35deg, #F8DD4F, #FBEB77);
-				border-radius: 5rpx;
-				line-height: 47rpx;
-				text-align: center;
-				font-size: 24rpx;
-				font-family: PingFang SC;
-				font-weight: 500;
-				color: #333333;
-				margin-left: 10rpx;
-			}
-		}
-		.item-right {
-			line-height: 129rpx;
-			font-size: 24rpx;
-			font-family: PingFang SC;
-			font-weight: 400;
-			color: #999999;
-		}
-		
-	}
-	
-</style>

+ 81 - 4
pages/user/applyMember.vue

@@ -14,11 +14,11 @@
 					<view class="item-tit">联系方式:</view>
 					<input type="text" v-model="phone" placeholder="请输入您的手机号"/>
 				</view>
-				<view class="itemx">
+				<!-- <view class="itemx">
 					<view class="item-tit">验证码:</view>
 					<input type="text" v-model="code" placeholder="请输入验证码"/>
 					<view class="code" @click="verification">{{ countDown == 0 ? '验证码' : countDown }}</view>
-				</view>
+				</view> -->
 			</view>
 		</view>
 		<view class="up-wrapper">
@@ -34,12 +34,16 @@
 				</view>
 			</view>
 		</view>
+		<view class="sub-ts"></view>
+		<view class="sub-wrapper" @click="sub">
+			提交申请
+		</view>
 	</view>
 </template>
 
 <script>
 	import { register, verify } from '@/api/login.js';
-	import { upload } from '@/api/user.js';
+	import { upload ,enter} from '@/api/user.js';
 	export default {
 		data() {
 			return {
@@ -49,7 +53,7 @@
 				name: '',
 				speed_id: '',
 				phone: '',
-				code: '',
+				// code: '',
 				sfzz: '', //身份证正面
 				sfzf: '' //身份证反面
 			}
@@ -104,6 +108,63 @@
 					console.log(err)
 				})
 			},
+			//提交
+			sub() {
+				let obj = this
+				if(obj.name == '') {
+					obj.$api.msg('请输入姓名')
+					return
+				}
+				if(obj.phone == '') {
+					obj.$api.msg('请输入联系方式')
+					return
+				}
+				if (this.phone.length < 11) {
+					this.$api.msg('请输入正确的手机号');
+					return;
+				}
+				// if(obj.code == '') {
+				// 	obj.$api.msg('请输入验证码')
+				// 	return
+				// }
+				if(obj.sfzz == '') {
+					obj.$api.msg('请上传身份证证件照')
+					return
+				}
+				if(obj.sfzf == '') {
+					obj.$api.msg('请上传身份证证件照')
+					return
+				}
+				let card_id = obj.sfzz + ',' + obj.sfzf
+				uni.showLoading({
+					title: '提交中...',
+					mask: true
+				})
+				enter({
+					type: 0,
+					// merchant_name: obj.merchant_name,
+					link_user: obj.name,
+					link_tel: obj.phone,
+					spread_uid: obj.speed_id,
+					// charter: obj.yyzz,
+					card_id: card_id
+				}).then( res => {
+					uni.hideLoading()
+					uni.showToast({
+						title: '提交成功',
+						duration: 2000
+					});
+					setTimeout(()=> {
+						uni.navigateBack({})
+					},2000)
+					
+					console.log(res)
+				}).catch( err => {
+					uni.hideLoading()
+					console.log(err)
+					
+				})
+			}
 		}
 	}
 </script>
@@ -177,5 +238,21 @@
 				}
 			}
 		}
+	}
+	.sub-ts {
+		height: 98rpx;
+	}
+	.sub-wrapper {
+		width: 750rpx;
+		height: 98rpx;
+		position: fixed;
+		bottom: 0;
+		background: linear-gradient(180deg, #FD4646, #FF3535);
+		text-align: center;
+		line-height: 98rpx;
+		font-size: 36rpx;
+		font-family: PingFang SC;
+		font-weight: 500;
+		color: #FFFFFF;
 	}
 </style>

+ 36 - 21
pages/user/award.vue

@@ -1,7 +1,8 @@
 <template>
 	<view class="content">
 		<view class="content-money">
-			<view class="money-box">
+			<view class="money-box">
+				<image src="../../static/img/qbbg.png" mode=""></image>
 				<view class="money"><text>¥</text>{{ money | getMoneyStyle }}</view>	
 			</view>
 		</view>
@@ -197,27 +198,41 @@ page {
 		}
 	}
 }
-.money-box {
-	background-color: $base-color;
-	padding-top: var(--status-bar-height);
-	height: 368rpx;
-	color: #ffffff;
-	text-align: center;
-	.text {
-		padding-top: 147rpx;
-		font-size: $font-sm;
-	}
-	.money {
-		padding-top: 150rpx;
+.money-box {
+	// background-color: $base-color;
+	// padding-top: var(--status-bar-height);
+	height: 400rpx;
+	color: #FF4C4C;
+	text-align: center;
+	position: relative;
+	image {
+		position: absolute;
+		top: 0;
+		right: 0;
+		height: 100%;
+		width: 100%;
+		// z-index: 1;
+	}
+	.text {
+		padding-top: 147rpx;
+		font-size: $font-sm;
+		position: relative;
+	}
+	.money {
+		padding-top: 175rpx;
+		// margin: auto 0;
 		font-size: 56rpx;
-		text {
-			display: inline-block;
-			font-size: 32rpx;
-			position: relative;
-			top: -5rpx;
-		}
-	}
-}
+		font-weight: bold;
+		color: #FF4C4C;
+		position: relative;
+		.money-icon {
+			font-size: 38rpx;
+			font-weight: bold;
+			color: #FF4C4C;
+		}
+	}
+}
+
 
 .navbar {
 	display: flex;

+ 18 - 8
pages/user/extension.vue

@@ -3,7 +3,7 @@
  		<view class="content-money">
  			<view class="money-box">
  				<view class="goback-box" @click="toBack">
- 					<image class="goback" src="https://37shop.liuniu946.com/front/img/fanhui.png" mode=""></image>
+ 					<image class="goback" src="../../static/img/tgbg.png" mode=""></image>
  				</view>
  				<view class="header">我的推广</view>
  				<image class="tuiguang_bg" src="../../static/img/tgbg.png"></image>
@@ -29,7 +29,7 @@
  		</view>
  		<swiper :current="tabCurrentIndex" :style="{ height: maxheight + 'px' }" class="swiper-box" duration="300" @change="changeTab">
  			<swiper-item class="tab-content" v-for="(tabItem, tabIndex) in navList" :key="tabIndex">
-				<view class="tg-wrapper">
+				<!-- <view class="tg-wrapper">
 					<view class="tg-box">
 						<view class="tg-item">
 							<view class="tg-tit">
@@ -58,18 +58,21 @@
 							</view>
 						</view>
 					</view>
-				</view>
+				</view> -->
  				<scroll-view class="list-scroll-content" scroll-y @scrolltolower="loadData">
  					<!-- 空白页 -->
- 					<!-- <empty v-if="tabItem.loaded === true && tabItem.orderList.length === 0"></empty> -->
+ 					<empty v-if="tabItem.loaded === true && tabItem.orderList.length === 0"></empty>
  
  					<!-- 订单列表 -->
  					<view v-for="(item, index) in tabItem.orderList" :key="index" class="order-item flex">
  						<view class="title-box flex_item">
  							<view class="title-avatar"><image :src="item.avatar"></image></view>
  							<view class="list_tpl">
- 								<view class="title">
+ 								<view class="title flex">
  									<text>{{ item.nickname }}</text>
+									<image src="../../static/img/lv02.png" mode="" v-if="item.level == 2"></image>
+									<image src="../../static/img/lv03.png" mode="" v-if="item.level == 3"></image>
+									<image src="../../static/img/lv04.png" mode="" v-if="item.level == 4"></image>
  								</view>
  								<view class="time">
  									<text>{{ item.spread_time }}</text>
@@ -283,7 +286,7 @@
  .money-box {
  	// background: $base-color;
  	height: 380rpx;
- 	color: #ffffff;
+ 	color: #FF4C4C;
  	text-align: center;
  	font-size: 35rpx;
  	position: relative;
@@ -354,10 +357,11 @@
  		
  	}
  	.money_num {
+		padding-top: 50rpx;
  		font-size: 72rpx;
  		font-family: PingFang SC;
  		font-weight: bold;
- 		color: #FFFFFF;
+ 		color: #FF4C4C;
  		.money_ren {
  			font-size: 36rpx;
  		}
@@ -390,7 +394,13 @@
  					color: $font-color-base;
  					overflow:hidden;            //超出的文本隐藏
  					text-overflow:ellipsis;     //溢出用省略号显示
- 					white-space:nowrap; 
+ 					white-space:nowrap;
+					 justify-content: flex-start;
+					image {
+						margin-left: 9rpx;
+						width: 147rpx;
+						height: 32rpx;
+					}
  				}
  				.time {
  					margin-top: 15rpx;

+ 21 - 7
pages/user/minMember.vue

@@ -1,19 +1,24 @@
 <template>
 	<view class="content">
 		<view class="top">
-			<image src="" mode=""></image>
+			<image src="../../static/img/tgbg.png" mode=""></image>
 			<view class="top-val">
 				{{allMun || 0}}<text>人</text>
 			</view>
 		</view>
 		<scroll-view scroll-y="true" :style="{'height': height}" class="list"  @scrolltolower="loadData()">
-			 <!-- <empty v-if="list.length == 0" ></empty> -->
+			 <empty v-if="list.length == 0" ></empty>
 			<view class="apply-item flex" v-for="item in list">
 				<view class="item-left flex">
 					<image src="" mode="" class="item-img"></image>
 					<view class="item-info flex">
-						<view class="name">
-							假猪套
+						<view class="name flex">
+							<view class="">
+								假猪套
+							</view>
+							<image src="../../static/img/lv02.png" mode=""></image>
+							<image src="../../static/img/lv03.png" mode=""></image>
+							<image src="../../static/img/lv04.png" mode=""></image>
 						</view>
 						<view class="phone">
 							13245678911
@@ -25,19 +30,20 @@
 			<view class="btn-jg"></view>
 		</scroll-view>
 		<!-- <view class="btn-jg"></view> -->
-		<view class="btn-wrapper">
+		<!-- <view class="btn-wrapper">
 			<navigator url="./applyList">
 				<view class="btm-btn">
 					申请列表
 				</view>
 			</navigator>
-		</view>
+		</view> -->
 	</view>
 </template>
 
 <script>
 	import empty from '@/components/empty';
 	import uniLoadMore from '@/components/uni-load-more/uni-load-more.vue';
+	import {getMyTvillage} from '@/api/user.js'
 	export default {
 		components: {
 			empty,
@@ -81,6 +87,12 @@
 				if(obj.loadingType == 'noMore') {
 					return 
 				}
+				getMyTvillage({
+					page: obj.page,
+					limit: obj.limit
+				}).then(res => {
+					console.log(res)
+				})
 			}
 		}
 	}
@@ -94,7 +106,6 @@
 		image {
 			width: 100%;
 			height: 100%;
-			background-color: #bfa;
 			position: absolute;
 			top: 0;
 		}
@@ -144,6 +155,9 @@
 		height: 116rpx;
 	}
 	.list {
+		height: 100%;
+		// position: relative;
+		// background-color: red;
 		.apply-item {
 			background-color: #fff;
 			height: 130rpx;

+ 29 - 15
pages/user/user.vue

@@ -13,16 +13,16 @@
 							<view class="username">{{ userInfo.nickname || '游客' }}</view>
 							<!-- <view class="font-size-sm" v-if="userInfo.spread_uid">邀请码:{{ userInfo.spread_uid }}</view> -->
 							<view class="user-lv">
-								<!-- <view class="lv-1">
+								<view class="lv-1" v-if="userInfo.level ==1">
 									普通会员
 								</view>
-								<view class="lv-2">
+								<view class="lv-2" v-if="userInfo.level ==2">
 									<image src="../../static/img/lv02.png" mode=""></image>
-								</view> -->
-								<view class="lv-3">
+								</view>
+								<view class="lv-3"  v-if="userInfo.level ==3">
 									<image src="../../static/img/lv03.png" mode=""></image>
 								</view>
-								<view class="lv-3" style="margin-left: -20rpx;">
+								<view class="lv-3"  v-if="userInfo.level ==4">
 									<image src="../../static/img/lv04.png" mode=""></image>
 								</view>
 							</view>
@@ -68,7 +68,7 @@
 						</view>
 						<text>待收货</text>
 					</view>
-					<view class="order-item" @click="navTo('/pages/order/order?state=3')" hover-class="common-hover" :hover-stay-time="50">
+					<view class="order-item" @click="navTo('/pages/order/order?state=4')" hover-class="common-hover" :hover-stay-time="50">
 						<view class="icon position-relative">
 							<image class="icon-img" src="/static/icon/i4.png" mode="aspectFit"></image>
 							<!-- <view class="corner" v-if="orderInfo.complete_count > 0">
@@ -80,7 +80,7 @@
 				</view>
 			</view>
 			<!-- 升级店长 -->
-			<navigator url="/pages/store/apply">
+			<navigator url="/pages/store/apply" v-if="userInfo.level < 3">
 				<view class="up-box">
 					<image src="/static/img/upto.png" mode=""></image>
 				</view>
@@ -112,10 +112,18 @@
 							<view class="icon icon-b"><image class="icon-img" src="/static/icon/u1.png" mode="aspectFit"></image></view>
 							<text>我的钱包</text>
 						</view>
-						<view class="order-item" @click="navTo('/pages/user/minMember')" hover-class="common-hover" :hover-stay-time="50">
+						<view class="order-item" @click="navTo('/pages/user/minMember')" hover-class="common-hover" :hover-stay-time="50" v-if="userInfo.level > 2">
 							<view class="icon icon-b"><image class="icon-img" src="/static/icon/u3.png" mode="aspectFit"></image></view>
 							<text>我的会员</text>
 						</view>
+						<view class="order-item" @click="navTo('/pages/user/extension')" hover-class="common-hover" :hover-stay-time="50" v-if="userInfo.level == 2">
+							<view class="icon icon-b"><image class="icon-img" src="/static/icon/minmen.png" mode="aspectFit"></image></view>
+							<text>我的推广</text>
+						</view>
+						<view class="order-item" @click="navTo('/pages/user/applyMember')" hover-class="common-hover" :hover-stay-time="50" v-if="userInfo.level < 2">
+							<view class="icon icon-b"><image class="icon-img" src="/static/icon/u3.png" mode="aspectFit"></image></view>
+							<text>申请会员</text>
+						</view>
 						<view class="order-item" @click="navTo('/pages/user/shareQrCode')" hover-class="common-hover" :hover-stay-time="50">
 							<view class="icon icon-b"><image class="icon-img" src="/static/icon/u4.png" mode="aspectFit"></image></view>
 							<text>邀请好友</text>
@@ -124,21 +132,20 @@
 				</view>
 				<view class="history-section icon">
 					<uni-list>
-						<uni-list-item title="我的实体店" @click="navTo('/pages/money/wallet')" thumb="/static/icon/img13.png"></uni-list-item>
-						<uni-list-item title="我的推广" @click="navTo('/pages/user/extension')" thumb="/static/icon/img11.png"></uni-list-item>
+						<uni-list-item title="我的实体店" @click="navTo('/pages/store/storeDetail')" thumb="/static/icon/img13.png" v-if="userInfo.level > 2"></uni-list-item>
+						<uni-list-item title="我的推广" @click="navTo('/pages/user/extension')" thumb="/static/icon/img11.png" v-if="userInfo.level != 2"></uni-list-item>
 						<uni-list-item title="收货地址" @click="navTo('/pages/set/address')" thumb="/static/icon/img12.png"></uni-list-item>
 						<uni-list-item title="联系客服" @click="showPopup" thumb="/static/icon/img02.png"></uni-list-item>
-						<!-- <uni-list-item title="邀请好友" @click="navTo('/pages/user/shareQrCode')" thumb="/static/icon/img10.png"></uni-list-item> -->
-						<uni-list-item title="关于我们" @click="navTo('/pages/shareQrCode/index')" thumb="/static/icon/img09.png"></uni-list-item>
+						<!-- <uni-list-item title="关于我们" @click="navTo('/pages/shareQrCode/index')" thumb="/static/icon/img09.png"></uni-list-item> -->
 					</uni-list>
 				</view>
 				<uni-popup ref="popup" type="center">
 					<view class="popup-box">
-						<view class="img"><image src="https://37shop.liuniu946.com/front/img/img009.png" mode=""></image></view>
+						<view class="img"><image src="../../static/img/img009.png" mode=""></image></view>
 						<view class="mian">
 							<view class="delivery">
 								<view class="title">已经为您定制专属客服</view>
-								<image src="https://37shop.liuniu946.com/front/img/img010.png" mode=""></image>
+								<image src="../../static/img/img010.png" mode=""></image>
 							</view>
 							<view class="nocancel">客服VX:{{ text }}</view>
 							<view class="comfirm-box">
@@ -156,7 +163,7 @@
 import { mapState, mapMutations } from 'vuex';
 import uniList from '@/components/uni-list/uni-list.vue';
 import uniListItem from '@/components/uni-list-item/uni-list-item.vue';
-import { orderData, getUserInfo } from '@/api/user.js';
+import { orderData, getUserInfo, getMyStore } from '@/api/user.js';
 import { saveUrl, interceptor } from '@/utils/loginUtils.js';
 // import uniCopy from '@/js_sdk/xb-copy/uni-copy.js';
 let startY = 0,
@@ -181,7 +188,9 @@ export default {
 		// 判断是否已经登录
 		if (this.hasLogin) {
 			this.loadBaseData();
+			this.getMyStore()
 		}
+		
 	},
 	onReady() {
 		// 初始化获取页面宽度
@@ -362,6 +371,11 @@ export default {
 			this.moving = false;
 			this.coverTransition = 'transform 0.3s cubic-bezier(.21,1.93,.53,.64)';
 			this.coverTransform = 'translateY(0px)';
+		},
+		getMyStore() {
+			getMyStore().then( res => {
+				console.log('getMyStore',res)
+			})
 		}
 	}
 };

+ 1 - 1
static/css/cmy.css

@@ -358,7 +358,7 @@
 
 /* 角标 */
 .corner {
-	background-color: #e51c23;
+	background-color: #FF4C4C;
 	position: absolute;
 	right: -18rpx;
 	top: -18rpx;

BIN
static/icon/adress.png


BIN
static/icon/daytime.png


BIN
static/icon/dingwei.png


BIN
static/icon/minmen.png


BIN
static/icon/phone.png


BIN
static/img/img009.png


BIN
static/img/img010.png


BIN
static/img/money.png


BIN
static/img/qbbg.png


BIN
static/img/tgbg.png


+ 8 - 2
store/index.js

@@ -1,7 +1,8 @@
 import Vue from 'vue'
 import Vuex from 'vuex'
 import user from './model/user'
-import address from './model/address'
+import address from './model/address'
+import latlon from './model/latlon.js'
 Vue.use(Vuex)
 
 const store = new Vuex.Store({
@@ -25,11 +26,16 @@ const store = new Vuex.Store({
 		//保存微信对象
 		setWeiChatObj(state, provider) {
 			state.weichatObj = provider;
+		},
+		//保存经度
+		setLatitude(state,provider) {
+			state.latitude = provider;
 		}
 	},
 	modules:{
 		user,
-		address
+		address,
+		latlon
 	},
 	actions: {}
 })

+ 25 - 0
store/model/latlon.js

@@ -0,0 +1,25 @@
+let state = {
+	lat:'',//纬度数据
+	lon:''//经度数据
+}
+
+let mutations = {
+	// 设置纬度数据
+	setLat(state,data){
+		state.lat = data;
+	},
+	// 设置经度数据
+	setLon(state,data){
+		state.lon = data;
+	}
+	
+	
+}
+let getters = {}
+
+export default {
+	namespaced: true,
+	state,
+	mutations,
+	getters
+}

+ 4 - 2
uni.scss

@@ -44,7 +44,8 @@ $box-shadow: 0rpx 0rpx 10rpx 10rpx #f3f3f3;
 // 圆角
 $border-radius-sm: 15rpx;
 // 渐变背景颜色
-$bg-green-gradual: linear-gradient(#5dbc7c, #71d094);
+$bg-green-gradual: linear-gradient(#5dbc7c, #71d094);
+$bg-red-gradual: linear-gradient(#fe4c4d,#fe4c4d);
 /* 功能栏字体大小 */
 %font-title {
 	font-size: $font-lg + 2rpx;
@@ -62,7 +63,8 @@ $bg-green-gradual: linear-gradient(#5dbc7c, #71d094);
 %f-left-icon {
 	height: $font-lg + 2rpx;
 	width: 8rpx;
-	background-image: $bg-green-gradual;
+	// background-image: $bg-green-gradual;
+	background-image: $bg-red-gradual;
 	margin-right: 10rpx;
 	border-radius: 10rpx;
 }