twt 2 years ago
parent
commit
e265ce3782
7 changed files with 753 additions and 23 deletions
  1. 4 1
      manifest.json
  2. 9 3
      pages.json
  3. 356 0
      pages/shop/ckshopList.vue
  4. 329 5
      pages/shop/confirm.vue
  5. 33 12
      pages/shop/goodsDetail.vue
  6. 12 2
      pages/shop/shop.vue
  7. 10 0
      store/index.js

+ 4 - 1
manifest.json

@@ -59,7 +59,10 @@
             "scope.userLocation" : {
                 "desc" : "获取商家距离"
             }
-        }
+        },
+		"requiredPrivateInfos":[
+		"getLocation"
+		]
     },
     "mp-alipay" : {
         "usingComponents" : true

+ 9 - 3
pages.json

@@ -163,9 +163,15 @@
             "style" :                                                                                    
             {
                 "navigationBarTitleText": "订单确认"
-            }
-            
-        }
+            } 
+        },
+		{
+		    "path" : "pages/shop/ckshopList",
+		    "style" :                                                                                    
+		    {
+		        "navigationBarTitleText": "选择门店"
+		    } 
+		}
     ],
 	"tabBar": {
 		"color": "#8a8a8a",

+ 356 - 0
pages/shop/ckshopList.vue

@@ -0,0 +1,356 @@
+<template>
+	<view class="box">
+
+		<view class="shopline" v-for="(item,index) in queryShopList" @click="goDetail(item)">
+			<view class="shoplineLeft">
+				<image :src="item.photoPath" mode="" class="shopImg" v-if="item.photoPath"></image>
+				<image src="../../static/img/noimg.png" mode="" class="shopImg" v-else></image>
+			</view>
+			<view class="shopright">
+				<view class="shopTop">
+					<view class="shopName">{{item.shopName}}</view>
+				</view>
+				<view class="brandsBg" v-if="item.brands">
+					<view class="brands" v-for="(v,index2) in item.brands.split(',')">{{v}}</view>
+				</view>
+				<view class="shopTime"><span v-if="item.startTime">{{item.startTime}}</span> - <span
+						v-if="item.endTime">{{item.endTime}}</span> </view>
+				<view class="shopBottomLeft">
+					<span class="shopaddress"
+						v-if="item.address">{{item.provinceName}}{{item.cityName}}{{item.areaName}}{{item.address}}</span>
+					<span v-if="item.distance&&item.distance!= '0.00'">{{item.distance}}km</span>
+				</view>
+			</view>
+
+		</view>
+
+		<!-- 上拉 加载更多 -->
+		<view class="noMore" v-if="noMoreShow && (queryShopList.length!=0)">没有更多数据</view>
+		<!-- 无数据空白页 -->
+		<nodata v-if="queryShopList.length==0"></nodata>
+
+	</view>
+</template>
+
+<script>
+	import nodata from '../../components/nodata/nodata.vue'
+	export default {
+		components: {
+			nodata,
+		},
+
+		data() {
+			return {
+				location: {
+					lng: '',
+					lat: '',
+				},
+				queryShopList: '',
+				noMoreShow: false,
+                goodsId:'',
+
+
+			}
+		},
+
+		onLoad(opt) {
+			var that = this;
+			this.goodsId=opt.goodsId;
+			uni.getLocation({
+				type: 'gcj02',
+				success: function(res) {
+					console.log(res)
+					that.location.lat = res.latitude
+					that.location.lng = res.longitude
+
+					that.getqueryShopList() //获取全部门店列表
+
+				},
+				fail(err) {
+
+				}
+			});
+		},
+		methods: {
+
+
+			getqueryShopList() {
+				uni.showLoading({
+					title: '加载中'
+				})
+				this.$http('openMall/openStoreList', {
+                    goodsId:this.goodsId,
+					lat: this.location.lat ? this.location.lat : '',
+					lng: this.location.lng ? this.location.lng : '',
+				}, 'GET').then(res => {
+					uni.hideLoading();
+					this.queryShopList = res.data
+					//console.log('list+=', this.queryShopList);
+
+				})
+			},
+
+			goDetail(item) {
+				 this.$store.commit('mutationsckshopInfo', item)	
+				uni.navigateBack({
+					delta:-1
+				})
+				// uni.navigateTo({
+				// 	url: '../shop/shopDetail?id=' + item.shopId
+				// })
+			}
+		},
+		
+		// 下拉刷新
+		onPullDownRefresh() {
+			
+			this.getqueryShopList()
+			setTimeout(function() {
+				uni.stopPullDownRefresh();
+			}, 1000);
+		},
+		
+	}
+</script>
+
+<style scoped>
+	.box {
+		min-height: 100vh;
+		background-color: #F4F5F7;
+		padding-top: 20rpx;
+		padding-bottom: 60rpx;
+	}
+
+	.shopline {
+		margin: 0rpx 24rpx 20rpx;
+		padding: 20rpx;
+		background-color: #FFFFFF;
+		border-radius: 10rpx;
+
+		display: flex;
+	}
+
+
+	.nodataImg {
+		width: 400rpx;
+		padding-top: 100rpx;
+	}
+
+	.noTxt {
+		font-size: 36rpx;
+		color: #999999;
+		padding-top: 50rpx;
+	}
+
+	.nodataBox {
+		text-align: center;
+	}
+
+	.shopImg {
+		width: 146rpx;
+		height: 146rpx;
+		border-radius: 6rpx;
+	}
+
+	.shopBox {
+		padding-top: 30rpx;
+		display: flex;
+	}
+
+	.flex {
+		display: flex;
+		justify-content: space-between;
+	}
+
+	.shopCont {
+		padding-left: 22rpx;
+		width: 520rpx;
+	}
+
+	.shopName {
+		color: #333333;
+		font-size: 26rpx;
+		font-weight: 600;
+	}
+
+	.span1 {
+		color: #FF4F00;
+		font-size: 36rpx;
+	}
+
+	.span2 {
+		color: #FF4F00;
+		font-size: 22rpx;
+	}
+
+	.span3 {
+		color: #333333;
+		font-size: 22rpx;
+		padding-left: 22rpx;
+	}
+
+	.shopBq {
+		color: #FF4F00;
+		font-size: 22rpx;
+		border-radius: 4rpx;
+		border: 1px solid #FF4F00;
+		line-height: 30rpx;
+		height: 30rpx;
+		padding: 0rpx 5rpx;
+		margin-top: 10rpx;
+	}
+
+	.brandsBg {
+		display: flex;
+        height: 40rpx;
+		flex-wrap: wrap;
+		align-items: center;
+		overflow: hidden;
+		padding: 5rpx 0rpx;
+
+	}
+
+	.brands {
+		border-radius: 4rpx;
+		padding: 0 5rpx;
+		color: #F19D01;
+		height: 28rpx;
+		border: 1px solid #F19D01;
+
+		font-size: 20rpx;
+		line-height: 28rpx;
+		margin: 5rpx 10rpx 5rpx 0rpx;
+	}
+
+	.timeBg {
+		display: flex;
+
+	}
+
+	.shopTime {
+		color: #666666;
+		font-size: 22rpx;
+	}
+
+	.addressBox {
+		color: #666666;
+		font-size: 22rpx;
+	}
+
+	.shopNameSearchInput {
+		width: 500rpx;
+	}
+
+	.colorCS {
+		color: #FF4F00;
+	}
+
+	.shopbox {
+		padding: 0 16rpx;
+	}
+
+
+
+	.shopImg {
+		width: 146rpx;
+		height: 146rpx;
+		border-radius: 10rpx;
+	}
+
+	.shopCallImg {
+		width: 38rpx;
+		height: 46rpx;
+	}
+
+	.shopTop {
+		display: flex;
+		justify-content: space-between;
+		width: 510rpx;
+	}
+
+	.shopright {
+		padding-left: 20rpx;
+	}
+
+	.shopName {
+		font-size: 26rpx;
+		color: #333333;
+		line-height: 37rpx;
+		width: 450rpx;
+		white-space: nowrap;
+		overflow: hidden;
+		text-overflow: ellipsis;
+	}
+
+	.shopScore1 {
+		font-size: 36rpx;
+		font-weight: bold;
+		color: #FF4F00;
+		height: 50rpx;
+		line-height: 50rpx;
+	}
+
+	.shopScore11 {
+		font-size: 22rpx;
+		color: #FF4F00;
+		margin-right: 14rpx;
+
+	}
+
+	.shopScore2 {
+		font-size: 22rpx;
+		color: #666666;
+		margin-right: 14rpx;
+		padding: 8rpx 0;
+	}
+
+	.shopScore3 {
+		font-size: 22rpx;
+		color: #333333;
+		padding-left: 20rpx;
+	}
+
+
+
+	.Btn {
+		width: 104rpx;
+		height: 56rpx;
+		background: #FF2400 linear-gradient(135deg, #FD5300 0%, #FF270A 100%);
+		border-radius: 6rpx;
+		font-size: 26rpx;
+		text-align: center;
+		color: #FFFFFF;
+		line-height: 56rpx;
+	}
+
+	.shopBottom {
+		display: flex;
+
+	}
+
+	.shopBottomLeft {
+
+		font-size: 25rpx;
+		color: #666666;
+		line-height: 30rpx;
+		padding-top: 10rpx;
+		display: flex;
+		justify-content: space-between;
+		padding-right: 10rpx;
+	}
+
+	.shopaddress {
+		width: 400rpx;
+		/* 隐藏文字显示 ...不换行 */
+		overflow: hidden;
+		text-overflow: ellipsis;
+		white-space: nowrap;
+	}
+
+	.noMore {
+		text-align: center;
+		line-height: 50rpx;
+		color: #999999;
+		font-size: 28rpx;
+	}
+</style>

+ 329 - 5
pages/shop/confirm.vue

@@ -2,6 +2,75 @@
 <view class="box">
 	<view class="topBox"></view>
 	<view class="yuanhu"></view>
+	<view class="goodsBox">
+		<view class="goodsBoxLeft">
+			<image :src="goodsInfo.ImgList[0].url" mode="" v-if="goodsInfo.ImgList.length>1" class="hotGoodsLineImg"></image>
+			<image src="../../static/timg/noimg.png" v-else class="hotGoodsLineImg" ></image>
+		</view>
+		<view class="goodsBoxRgiht">
+			<view class="goodsName">{{goodsInfo.name}}</view>
+			<view class="goodsBottom">
+				<view class="goodsPrice"> <span class="goodsPrice1">¥</span> {{goodsInfo.salePrice?goodsInfo.salePrice:goodsInfo.scribingPrice}}</view>
+				<view class="numJsbox">
+					<view class="numJj" @click="calculation(1)">-</view>
+					<view class="goodsnum">{{goodsnum}}</view>
+					<view class="numJj" @click="calculation(2)">+</view>
+				</view>
+			</view>
+		</view>
+	</view>
+	<view class="cont">
+		<view class="contKk">
+			<view class="contLine">
+				<view class="contlineLeft">服务门店</view>
+				<view class="contlineRight">{{shopName}}</view>
+			</view>
+			<view class="contLine">
+				<view class="contlineLeft">车牌号</view>
+				<view class="contlineRight">
+					<span>{{carInfo.plateNumber}}</span>
+					<image src="../../static/timg/icon_arrow_right.png" mode="" class="contlineRightJt"></image>
+				</view>
+			</view>
+			<view class="contLine">
+				<view class="contlineLeft">车型</view>
+				<view class="contlineRight">
+					<span class="carModel">{{carInfo.carModel}}</span>
+					<image src="../../static/timg/icon_arrow_right.png" mode="" class="contlineRightJt"></image>
+				</view>
+			</view>
+			<view class="contLine">
+				<view class="contlineLeft">联系人</view>
+				<view class="contlineRight">
+					<input type="text" v-model="customerName" placeholder="请输入联系人姓名" class="contlineRightInput">
+				</view>
+			</view>
+			<view class="contLine " style="border-bottom: none;">
+				<view class="contlineLeft">手机号</view>
+				<view class="contlineRight">
+					<input type="text" v-model="mobilePhone" placeholder="请输入联系人手机号" class="contlineRightInput">
+				</view>
+			</view>
+		</view>
+		
+		<view class="contKk" style="margin-top:20rpx;">
+			<view class="contLine " style="border-bottom: none;">
+				<view class="contlineLeft">订单备注</view>
+				<view class="contlineRight">
+					<input type="text" v-model="comment" placeholder="请输入" class="contlineRightInput2">
+				</view>
+			</view>
+		</view>
+	</view>
+	
+	<view style="height:120rpx"></view>
+	<view class="bottomBox">
+		<view class="bottomLeft">
+			<view class="bottomLeftLine">合计: <span>¥</span> <span class="bottomPrice">{{totalMoney}}</span> </view>
+			<view class="bottomLeftLine2">总优惠:¥{{yhMoney}}</view>
+		</view>
+		<view class="bottomBtn" @click="submit">提交订单</view>
+	</view>
 </view>
 </template>
 
@@ -16,15 +85,78 @@
 				goodsnum:1,
 				id:'',
 				info:'',
+				carInfo:'',
+				shopID:'',
+				shopName:'',
+				goodsInfo:'',
+				totalMoney:'',
+				yhMoney:0,
+				customerName:'',
+				mobilePhone:'',
+				comment:'',
 			}
 		},
 		onLoad(opt) {
-			//this.id=opt.id;
+			this.shopID=opt.shopID;
+			this.shopName=opt.shopName;
+			this.carInfo=this.$store.state.carInfo;
+			this.goodsnum=opt.itemQty;
+			//console.log(this.carInfo)
 			this.userInfo = uni.getStorageSync("userInfo");
+			this.goodsInfo=uni.getStorageSync("goodsDetail");
+			this.jsMoney()
 			//this.openGoodsDetailById()
+			/* var a=[
+				{name:1},{name:2}
+			]
+			var b=a.map(i=>i.name);
+			console.log(b) */
 		},
 		
 		methods: {
+			submit(){
+				var jsonArray = [];
+				var obj={
+					itemId:this.goodsInfo.id,
+					itemName:this.goodsInfo.name,
+					itemQty:this.goodsnum,
+					salePrice:this.goodsInfo.salePrice,
+					totalPrice:this.totalMoney
+				}
+				jsonArray.push(obj)
+				//"bizType:1商品2项目3套餐
+				var params={
+					sheetType:this.goodsInfo.bizType,
+					sheetContent:this.goodsInfo.name,
+					customerName:this.customerName,
+					mobilePhone:this.mobilePhone,
+					plateNumber:this.carInfo.plateNumber,
+					carModel:this.carInfo.carModel,
+					totalMoney:this.totalMoney,
+					shopId:this.shopID,
+					comment:this.comment,
+					sheetDetail:JSON.stringify(jsonArray)
+				}
+				uni.showLoading({
+					title: '加载中'
+				})
+				this.$http('openMallOrder/submitOrder', params,'POST').then(res => {
+					uni.hideLoading();
+					if(res.code==0){
+						uni.showToast({
+							title: res.msg,
+							icon: 'none',
+							duration: 3000
+						});
+					}else{
+						uni.showToast({
+							title: res.msg,
+							icon: 'none',
+							duration: 3000
+						});
+					}
+				 })
+			},
 			openGoodsDetailById(){
 				this.$http('openMall/openGoodsDetailById', {
 				  id:this.id
@@ -41,11 +173,30 @@
 				if(type==1){
 					if(this.goodsnum>1){
 						this.goodsnum--
+						this.jsMoney()
 					}
 				}else{
-					if(this.info.oneQty>this.goodsnum){
+					if(this.goodsInfo.oneQty>this.goodsnum){
 						this.goodsnum++
+						this.jsMoney()
+					}
+				}
+			},
+			jsMoney(){
+				if(this.goodsInfo.salePrice){
+					this.totalMoney=this.goodsInfo.salePrice*this.goodsnum;
+					if(this.goodsInfo.scribingPrice){
+						var wyh=this.goodsInfo.scribingPrice*this.goodsnum;
+						this.yhMoney=wyh-this.totalMoney;
+						this.yhMoney=this.yhMoney.tofixed(2)
+					}else{
+						this.yhMoney=0
 					}
+					this.totalMoney=this.totalMoney.tofixed(2)
+				}else{
+					this.totalMoney=this.goodsInfo.scribingPrice*this.goodsnum
+					this.totalMoney=this.totalMoney.tofixed(2)
+					this.yhMoney=0
 				}
 			}
 			
@@ -54,20 +205,193 @@
 </script>
 
 <style scoped lang="less">
-
+.bottomBox{
+	width: 750rpx;
+	height: 120rpx;
+	background: #FFFFFF;
+	box-shadow: 0px -2px 10rpx 0px rgba(153,153,153,0.2000);
+	display: flex;
+	justify-content: space-between;
+	position: fixed;
+	left: 0;
+	bottom: 0;
+}
+.bottomLeft{
+	padding-top: 25rpx;
+	padding-left: 30rpx;
+}
+.bottomLeftLine{
+	color: #666666;
+	font-size: 24rpx;
+}
+.bottomLeftLine span{
+	color: #FF0000;
+}
+.bottomPrice{
+	font-size: 32rpx;
+}
+.bottomLeftLine2{
+	color: #999999;
+	line-height: 33rpx;
+	font-size: 24rpx;
+}
+.bottomBtn{
+	width: 204rpx;
+	height: 74rpx;
+	background: #D53533;
+	border-radius: 37rpx;
+	text-align: center;
+	line-height: 74rpx;
+	color: #FFFFFF;
+	font-size: 30rpx;
+	margin-top: 23rpx;
+	margin-right: 30rpx;
+}
+.cont{
+	padding: 20rpx 24rpx;
+}
+.contKk{
+	background: #FFFFFF;border-radius: 10rpx;
+	padding: 0 20rpx;
+}
+.contLine{
+	display: flex;
+	justify-content: space-between;
+	font-size: 28rpx;
+	padding: 30rpx 0;
+	border-bottom: 1px solid #EEEEEE;
+}
+.contlineLeft{
+	color: #666666;
+	line-height: 40rpx;
+	
+}
+.carModel{
+	    width: 500rpx;
+	    display: inline-block;
+		white-space: nowrap;
+		overflow: hidden;
+		text-overflow: ellipsis;
+}
+.contlineRight{
+	color: #333333;
+	line-height: 40rpx;
+	white-space: nowrap;
+	overflow: hidden;
+	text-overflow: ellipsis;
+	width: 450rpx;
+	text-align: right;
+}
+.contlineRightInput{
+	color: #333333;
+}
+.contlineRightJt{
+	width: 12rpx;
+	height: 20rpx;
+	margin-left: 20rpx;
+	margin-top: 10rpx;
+}
 .box{
 	background: #F4F5F7;
 	min-height: 100vh;
 }
 .topBox{
-	height: 150rpx;
+	height: 140rpx;
 	background: #FF0000;
 	width: 750rpx;
 }
 .yuanhu{
 	width: 750rpx;
-	height: 20rpx;
+	height: 30rpx;
 	background: #FF0000;
 	border-radius: 0 0 100% 100%;
 }
+.goodsBox{
+	width: 662rpx;
+	height: 194rpx;
+	background: #FFFFFF;
+	border-radius: 16rpx;
+	margin-left: 24rpx;
+	margin-top: -100rpx;
+	padding: 20rpx;
+	display: flex;
+}
+.goodsBoxLeft{
+	width: 208rpx;
+	height: 194rpx;
+	border-radius: 16rpx;
+	border: 1px solid #EEEEEE;
+}
+.hotGoodsLineImg{
+	width: 208rpx;
+	height: 194rpx;
+}
+.goodsnum{
+	width: 88rpx;
+	height: 44rpx;
+	background: #F4F5F7;
+	line-height: 44rpx;
+	text-align: center;
+	font-weight: 500;
+	color: #333333;
+	font-size: 24rpx;
+	margin: 0 4rpx;
+}
+.numJsbox{
+	display: flex;
+}
+.numJj{
+width: 44rpx;
+height: 44rpx;
+background: #F4F5F7;
+border-radius: 0px 6rpx 6rpx 0px;	
+text-align: center;
+line-height: 44rpx;
+font-size: 30rpx;
+color: #F4F5F7;
+}
+.goodsnum{
+	width: 88rpx;
+	height: 44rpx;
+	background: #F4F5F7;
+	line-height: 44rpx;
+	text-align: center;
+	font-weight: 500;
+	color: #333333;
+	font-size: 24rpx;
+	margin: 0 4rpx;
+}
+.goodsBottom{
+	display: flex;
+	justify-content: space-between;
+	padding-top: 60rpx;
+}
+.goodsPrice{
+	color: #333333;
+	font-size: 32rpx;
+}
+.goodsPrice1{
+	color: #333333;
+	font-size: 22rpx;
+}
+.goodsName{
+	font-weight: 400;
+	color: #333333;
+	line-height: 40rpx;
+	font-size: 28rpx;
+	height: 80rpx;
+	text-overflow: -o-ellipsis-lastline;
+	overflow: hidden;				
+	text-overflow: ellipsis;		
+	display: -webkit-box;			
+	-webkit-line-clamp: 2;		
+	line-clamp: 2;					
+	-webkit-box-orient: vertical;
+	width: 420rpx;
+}
+.goodsBoxRgiht{
+	padding-left: 24rpx;
+	
+}
+
 </style>

+ 33 - 12
pages/shop/goodsDetail.vue

@@ -15,8 +15,8 @@
 			<view class="goodsPrice">
 				<view class="goodsPrice1">店庆价</view>
 				<view class="goodsPrice2">¥</view>
-				<view class="goodsPrice3">{{info.scribingPrice?info.scribingPrice:info.salePrice}}</view>
-				<view class="goodsPrice4" v-if="info.scribingPrice">¥{{info.salePrice}}</view>
+				<view class="goodsPrice3">{{info.salePrice?info.salePrice:info.scribingPrice}}</view>
+				<view class="goodsPrice4" v-if="info.scribingPrice">¥{{info.scribingPrice}}</view>
 			</view>
 			<view class="Sold">已售 {{info.saleQty}}</view>
 		</view>
@@ -119,8 +119,8 @@
 						<view class="goodsPrice">
 							<view class="goodsPrice11">店庆价</view>
 							<view class="goodsPrice22">¥</view>
-							<view class="goodsPrice33">{{info.scribingPrice?info.scribingPrice:info.salePrice}}</view>
-							<view class="goodsPrice44" v-if="info.scribingPrice">¥{{info.salePrice}}</view>
+							<view class="goodsPrice33">{{info.salePrice?info.salePrice:info.scribingPrice}}</view>
+							<view class="goodsPrice44" v-if="info.scribingPrice">¥{{info.scribingPrice}}</view>
 						</view>
 					</view>
 				</view>
@@ -137,10 +137,11 @@
 						<view class="numJj" @click="calculation(2)">+</view>
 					</view>
 				</view>
-				<view class="buySHop">
+				<view class="buySHop" @click="ckShop">
 					<view>服务门店</view>
-					<view class="buyShopRight">
-						<view>连锁一号</view>
+					<view class="buyShopRight" >
+						<view v-if="shopInfo.shopId">{{shopInfo.shopName}}</view>
+						<view v-else>请选择</view>
 						<image src="../../static/timg/icon_arrow_right.png" mode="" class="buyShopRightJt"></image>
 					</view>
 				</view>
@@ -169,15 +170,27 @@
 				buyShow:false,
 				id:'',
 				info:'',
+				shopInfo:{
+					shopName:'',
+					shopId:''
+				},
 			}
 		},
 		onLoad(opt) {
 			this.id=opt.id;
 			this.userInfo = uni.getStorageSync("userInfo");
-			this.openGoodsDetailById()
+			this.openGoodsDetailById();
+		},
+		onShow() {
+			this.shopInfo=this.$store.state.ckshopInfo;
+			console.log(this.shopInfo)
 		},
-		
 		methods: {
+			ckShop(){
+				uni.navigateTo({
+					url:'ckshopList?goodsId='+this.id
+				})
+			},
 			openGoodsDetailById(){
 				this.$http('openMall/openGoodsDetailById', {
 				  id:this.id
@@ -191,9 +204,17 @@
 				})
 			},
 			goBuy(){
-				uni.navigateTo({
-					url:'confirm'
-				})
+				var that=this;
+				uni.setStorage({
+					key: 'goodsDetail',
+					data: that.info,
+					 success: function () {
+					   uni.navigateTo({
+					   	url:'confirm?itemQty='+that.goodsnum+'&shopID='+that.shopInfo.shopId+'&shopName='+that.shopInfo.shopName
+					   })
+					 }
+				}); 
+				
 			},
 			calculation(type){
 				if(type==1){

+ 12 - 2
pages/shop/shop.vue

@@ -99,11 +99,21 @@
 			}
 		},
 		onLoad() {
-			
+			 
 			this.userInfo = uni.getStorageSync("userInfo");
 			//this.getOrderTimes()
 			this.getcategoryList();
-			this.getlistOpenGoodsPage()
+			this.getlistOpenGoodsPage();
+			uni.getLocation({
+				type: 'gcj02',
+				success: function(res) {
+					console.log(res)
+			
+				},
+				fail(err) {
+			     console.log(err)
+				}
+			});
 		},
 		
 		methods: {

+ 10 - 0
store/index.js

@@ -6,6 +6,7 @@ const store = new Vuex.Store({
     state: {
 		yuyueData:'',
 		carInfo:'',
+		ckshopInfo:'',
 	},
 	getters:{
 		getyuyueData(state){
@@ -14,6 +15,9 @@ const store = new Vuex.Store({
 	    getcarInfo(state){
 	    	return state.carInfo
 	    },
+		getckshopInfo(state){
+			return state.ckshopInfo
+		},
     },
     mutations: {
 		mutationsyuyueData(state,data){
@@ -22,6 +26,9 @@ const store = new Vuex.Store({
 		mutationscarInfo(state,data){
 			state.carInfo=data
 		},
+		mutationsckshopInfo(state,data){
+			state.ckshopInfo=data
+		},
 	},
     actions: {
 		actionsyuyueData(context,playload){
@@ -30,6 +37,9 @@ const store = new Vuex.Store({
 		actionscarInfo(context,playload){
 			context.commit('mutationscarInfo',playload)
 		},
+		actionsckshopInfo(context,playload){
+			context.commit('mutationsckshopInfo',playload)
+		},
 	}
 })
 export default store