Przeglądaj źródła

注释获取经纬度

zhanghui 2 lat temu
rodzic
commit
838a1b98ca
3 zmienionych plików z 27 dodań i 22 usunięć
  1. 2 2
      common/js/env.js
  2. 22 19
      pages/index/index.vue
  3. 3 1
      pages/order/index.vue

+ 2 - 2
common/js/env.js

@@ -1,8 +1,8 @@
 "use strict";
 
-// let baseUrl = `https://jje.admin.xinyuekj.com.cn`
+let baseUrl = `https://jje.admin.xinyuekj.com.cn`
 // let baseUrl = `http://127.0.0.1:9000`
-let baseUrl = `http://192.168.1.150:8080`
+// let baseUrl = `http://192.168.1.150:8080`
 // let baseUrl = `http://192.168.1.151:8080`
 
 

+ 22 - 19
pages/index/index.vue

@@ -227,6 +227,7 @@
 <script>
 import tabBar from "../../components/tabBar/tabBar";
 import ScrollNotice from '../../components/scroll-notice/ScrollNotice.vue';
+import login from "../login/login";
 
 export default {
   components: {
@@ -279,12 +280,12 @@ export default {
       console.log('7777777777777777777777777777777',scene)
       setTimeout(()=>{
         this.userInfo = uni.getStorageSync('userInfo');
-        this.scanCode(userInfo.otherId,scene);
+        this.scanCode(this.userInfo.otherId,scene);
       },5000)
     }
 
     // 获取经纬度信息
-    this.getLocation();
+    // this.getLocation();
 
     //公告信息
     this.getNoticeListData();
@@ -311,11 +312,13 @@ export default {
   methods: {
 
     scanCode(otherId,memberId){
+      console.log('绑定开始memberId=>'+memberId)
         this.$api.scanCode({
           openId:otherId,
           memberId:memberId
         }).then(res=>{
-          console.log('用户绑定成功')
+          console.log('用户绑定成功',res)
+          console.log('绑定结束memberId=>'+memberId)
         })
     },
 
@@ -452,22 +455,22 @@ export default {
 
     },
     // 获取经纬度信息
-    getLocation() {
-
-      uni.getLocation({
-        type: 'gcj02',
-        success: function (res) {
-          var latitude = res.latitude; // 纬度
-          var longitude = res.longitude; // 经度
-          var speed = res.speed; // 速度
-          var accuracy = res.accuracy; // 精确度
-          // 在这里可以对位置信息进行处理
-          console.log("纬度:" + latitude + ";经度" + longitude)
-          this.reqParm.latitude = latitude
-          this.reqParm.longitude = longitude
-        }
-      });
-    },
+    // getLocation() {
+    //
+    //   uni.getLocation({
+    //     type: 'gcj02',
+    //     success: function (res) {
+    //       var latitude = res.latitude; // 纬度
+    //       var longitude = res.longitude; // 经度
+    //       var speed = res.speed; // 速度
+    //       var accuracy = res.accuracy; // 精确度
+    //       // 在这里可以对位置信息进行处理
+    //       console.log("纬度:" + latitude + ";经度" + longitude)
+    //       this.reqParm.latitude = latitude
+    //       this.reqParm.longitude = longitude
+    //     }
+    //   });
+    // },
 
     // 去选择门店
     gotoStoreChoose() {

+ 3 - 1
pages/order/index.vue

@@ -1,6 +1,7 @@
 <template>
 	<view class="content">
 
+		<u-sticky>
 <!--			<view ref="hContentWrap" class="hContentWrap h-content-wrap">-->
 <!--				<view class="tab-bar">-->
 <!--					<view class="tab-item" :class="{ active: currentTab === 0 }" @click="changeTab(0)">-->
@@ -18,6 +19,7 @@
             					transform: 'scale(1.05)'
        							 }" :current="tabIndex" @click="clickTab"></u-tabs>
 			</View>
+		</u-sticky>
 
 		<!-- 订单列表 -->
 		<view :style="{'height':windowHeight}">
@@ -141,7 +143,7 @@
 		</uni-popup>
 
 
-		<view class="tabBarLineHeight"></view>
+<!--		<view class="tabBarLineHeight"></view>-->
 		<view class="tabBarView">
 			<tab-bar :tabIndex="tabBarIndex"></tab-bar>
 		</view>