guhongwei 2 lat temu
rodzic
commit
47b6524808
2 zmienionych plików z 10 dodań i 13 usunięć
  1. 6 7
      manifest.json
  2. 4 6
      pages/market/index.vue

+ 6 - 7
manifest.json

@@ -138,14 +138,13 @@
                 "desc" : "定位当前位置,选在收获地址"
             }
         },
-        "requiredPrivateInfos" : [ "chooseAddress", "chooseLocation" ],//getLocation
-        "plugins" : {
-            // "chooseLocation" : {
-            //     "version" : "1.0.9",
-            //     "provider" : "wx76a9a06e5b4e693e"
-            // }
-        }
+        "requiredPrivateInfos" : [ "chooseAddress", "chooseLocation" ], //getLocation
+        "plugins" : {}
     },
+    // "chooseLocation" : {
+    //     "version" : "1.0.9",
+    //     "provider" : "wx76a9a06e5b4e693e"
+    // }
     "mp-alipay" : {
         "usingComponents" : true
     },

+ 4 - 6
pages/market/index.vue

@@ -8,14 +8,14 @@
 				<view class="text_2" v-if="num==0" @click="edit(1)">编辑</view>
 				<view class="text_2" v-if="num==1" @click="edit(0)">完成</view>
 			</view>
-			<view class="one" v-if="!user.id">
-				<view class="logo"><text class="iconfont icon-gouwuche"></text></view>
+			<view class="one" v-if="!user._id">
+				<view class="logo"><text class="iconfont icon-geren2"></text></view>
 				<view class="one_1">您还没有登录</view>
 				<view class="btn">
 					<button type="primary" size="mini" @click="toCommon('/pages/login/index')">去登录</button>
 				</view>
 			</view>
-			<view class="one" v-if="list.length==0&&user.id">
+			<view class="one" v-if="list.length==0&&user._id">
 				<view class="logo"><text class="iconfont icon-gouwuche"></text></view>
 				<view class="one_1">购物车空空如也~</view>
 				<view class="btn">
@@ -131,9 +131,7 @@
 					success: (res) => {
 						let user = that.$jwt(res.data);
 						if (user) {
-							that.$set(that, `user`, {
-								id: user.id,
-							})
+							that.$set(that, `user`,user)
 							that.searchMarket();
 						}
 					},