twt 1 년 전
부모
커밋
72feaa2b65
3개의 변경된 파일26개의 추가작업 그리고 16개의 파일을 삭제
  1. 23 13
      pages/shop/ckshopList.vue
  2. 2 2
      pages/user/user.vue
  3. 1 1
      utils/request.js

+ 23 - 13
pages/shop/ckshopList.vue

@@ -56,20 +56,30 @@
 		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() //获取全部门店列表
-
+			uni.authorize({
+				scope: 'scope.userLocation',
+				success() {
+					uni.getLocation({
+						type: 'gcj02',
+						success: function(res) {
+							console.log(res)
+							that.location.lat = res.latitude
+							that.location.lng = res.longitude
+					
+							that.getqueryShopList() //获取全部门店列表
+					
+						},
+						fail(err) {
+					      console.log(err)
+						  that.getqueryShopList() //获取全部门店列表
+						}
+					});
 				},
-				fail(err) {
-
-				}
-			});
+				fail: (err) => {
+					 that.getqueryShopList();
+					 
+				}})
+			
 		},
 		methods: {
 

+ 2 - 2
pages/user/user.vue

@@ -240,13 +240,13 @@
 				</view>
 				<image src="../../static/img/big_rightArrow.png" mode="" class="big_rightArrow"></image>
 			</view>
-		    <!-- <view class="rowBox" @click="gonavigateTo('../subPack/depositList')">
+		    <view class="rowBox" @click="gonavigateTo('../subPack/depositList')">
 				<view class="leftView">
 					<image src="../../static/timg/icon_jydd.png" mode="" class="liftIcon"></image>
 					<view class="rowTitle">我的寄存</view>
 				</view>
 				<image src="../../static/img/big_rightArrow.png" mode="" class="big_rightArrow"></image>
-			</view> -->
+			</view> 
 			 <view class="rowBox" @click="gonavigateTo('../subPack/rescueOrder')">
 				<view class="leftView">
 					<image src="../../static/timg/sos.png" mode="" class="liftIcon"></image>

+ 1 - 1
utils/request.js

@@ -9,7 +9,7 @@ import $store from '../store'
 const extConfig = uni.getExtConfigSync();		
 console.log(extConfig)
 const baseUrl=extConfig.url+'/'
-//const baseUrl='http://192.168.0.127:20189/'
+//const baseUrl='http://192.168.0.129:20189/'
 //const baseUrl='http://192.168.0.174:20187/'
 //const baseUrl='http://dms.66km.com.cn/'