Browse Source

fix:修复bug

jinx 4 năm trước cách đây
mục cha
commit
2940d3e551

+ 5 - 0
component/auth/auth.js

@@ -41,6 +41,7 @@ Component({
       return new Promise(r => {
         wx.login({
           success: function(res) {
+            console.log(res)
             if (res.code) {
               r(res.code)
             }
@@ -53,12 +54,16 @@ Component({
     },
     bindGetUserInfo: async function(e) {
       let code = await this.getCode()
+      console.log('******')
+      console.log(e.detail)
       //登录远程服务器
       util.request(api.AuthLoginByWeixin, {
         code: code,
         userInfo: e.detail
       }, 'POST', 'application/json').then(res => {
         if (res.errno === 0) {
+          console.log('&&&&&&&')
+          console.log(res.data)
           //存储用户信息
           res.data.userInfo.userId = res.data.userId
           res.data.userInfo.sessionKey = res.data.sessionKey

+ 3 - 3
config.js

@@ -5,9 +5,9 @@ const dev = {
   // 容器地址
   // viewHost: 'http://192.168.0.112:8081',
   // 发现地址
-  env: 'dev',
-  viewChildHost: 'https://test.4dkankan.com',
-  viewHost: 'https://test.4dkankan.com'
+  env: 'pro',
+  viewChildHost: 'https://www.4dkankan.com',
+  viewHost: 'https://www.4dkankan.com'
 }
 
 const mal = {

+ 5 - 2
pages/goods/goods.js

@@ -349,9 +349,12 @@ Router({
 
   },
   openCartPage: function () {
-    wx.switchTab({
+    // wx.switchTab({
+    //   url: '/pages/cart/cart',
+    // });
+    wx.navigateTo({
       url: '/pages/cart/cart',
-    });
+    }); 
   },
 
   /**

+ 2 - 2
pages/goods/goods.wxml

@@ -155,7 +155,7 @@
   <view class="l l-collect {{ openAttr ? 'back' : ''}}" bindtap="closeAttrOrCollect">
     <image class="icon" src="{{ collectBackImage }}"></image>
   </view>
-  <view class="l l-cart">
+  <!-- <view class="l l-cart">
     <view class="box">
       <text class="cart-count" wx:if="{{cartGoodsCount > 0}}">{{cartGoodsCount}}</text>
       <image bindtap="openCartPage" wx:if="{{imgServer}}" class="icon" src="{{imgServer+'/ic_menu_shoping_nor.png'}}"></image>
@@ -166,7 +166,7 @@
   </button>
   <view class="r" bindtap="addToCart">
   加入购物车
-  </view>
+  </view> -->
   <view class="c {{checkGoods.goods_number === 0 ? 'disbuy' : ''}}" bindtap='buyGoods'>立即购买</view>
 </view>
 

+ 1 - 1
pages/searchRoom/searchRoom.js

@@ -31,7 +31,7 @@ Page({
 
   },
   gotoWV: function (event) {
-    let id = event.detail
+    let {id} = event.detail
     wx.navigateTo({
       url: `/pages/webview/index?id=${id}`,
     })

+ 2 - 0
pages/ucenter/index/index.js

@@ -166,6 +166,8 @@ Page({
     },
     async getUserInfo() {
       const {data} = await util.request(api.UserInfo)
+      console.log('!!!!!!!!!')
+      console.log(data)
       wx.setStorageSync('userinfoDetail', data)
       this.setData({
         userInfo: {