gemercheung hace 1 año
padre
commit
0a9b2a27d9

+ 42 - 5
component/profilePatch/profilePatch.js

@@ -1,7 +1,7 @@
 // component/profilePatch.js
 const api = require('../../config/api')
 const util = require('../../utils/util.js');
-
+const services = require('../../services/user.js');
 Component({
   /**
    * 组件的属性列表
@@ -33,7 +33,8 @@ Component({
     bottom: 0,
     defaultAvatarUrl: 'https://platform-wxmall.oss-cn-beijing.aliyuncs.com/upload/20180727/150547696d798c.png',
     avatar: '',
-    nickname: ''
+    nickname: '',
+    mobile: '',
   },
   attached() {
     // this.setData({
@@ -80,10 +81,11 @@ Component({
     async updateUserInfo() {
       const {
         avatar,
-        nickname
+        nickname,
+        mobile,
       } = this.data
 
-      if (avatar == '' || nickname == '') {
+      if (avatar == '' || nickname == '' || mobile =='') {
         return
       }
 
@@ -95,6 +97,7 @@ Component({
         userId: getUserData.userId,
         avatar: this.data.avatar,
         nickname: this.data.nickname,
+        mobile:this.data.mobile
       }
       console.error('userInfo', body)
       const {
@@ -113,6 +116,40 @@ Component({
         ifShow: false
       })
       this.triggerEvent('save', lastUpdate)
-    }
+    },
+    async getPhoneNumber(e) {
+      try {
+
+        const isLogin = await services.checkLogin();
+
+        let userInfo = wx.getStorageSync('userInfo')
+        if (!isLogin) {
+          await services.loginByWeixin(userInfo)
+        }
+       
+        let {
+          encryptedData,
+          iv,
+          code
+        } = e.detail
+        console.log(e)
+
+        if (!encryptedData) return;
+        let res = await util.request(api.decryptedPhoneNum, {
+          encryptedData,
+          iv,
+          code,
+          sessionKey: userInfo.sessionKey
+        })
+        console.log(res)
+
+        this.setData({
+          mobile: res.phoneNum
+        })
+      } catch (error) {
+        console.log('error', error)
+      }
+
+    },
   }
 })

+ 8 - 1
component/profilePatch/profilePatch.wxml

@@ -23,7 +23,14 @@
         <input type="nickname" placeholder="请输入昵称" maxlength="15" value="{{nickname}}" class="ipname" bindinput="updateNickName"></input>
       </view>
 
+      <view class="col">
+        <text class="label">手机</text>
+        <input wx:if="{{mobile.length>0}}" disabled="true" value="{{mobile}}" class="ipname mobile txt" ></input>
+        <button wx:else class="ipname mobile" open-type="getPhoneNumber" bindgetphonenumber="getPhoneNumber"> 绑定手机 </button>
+      </view>
+
+
     </view>
-    <button class="button {{(avatar.length> 0 && nickname.length> 0) ? 'enable':'disable'}}" bindtap="updateUserInfo">更新微信息</button>
+    <button class="button {{(avatar.length> 0 && nickname.length> 0 && mobile.length> 0) ? 'enable':'disable'}}" bindtap="updateUserInfo">更新微信息</button>
   </view>
 </view>

+ 12 - 1
component/profilePatch/profilePatch.wxss

@@ -4,7 +4,7 @@
 
 .pa-layer {
   position: fixed;
-  height: calc(612rpx + env(safe-area-inset-bottom));
+  height: calc(682rpx + env(safe-area-inset-bottom));
   background: #FFFFFF;
   border-radius: 8px 8px 0px 0px;
   bottom: 0;
@@ -110,4 +110,15 @@
 .ipname {
   height: 60rpx;
   width: 80%;
+}
+
+.mobile{
+  background: #07C563;
+  line-height: 60rpx;
+  font-size: 28rpx;
+  color: white;
+}
+.mobile.txt{
+  background: none;
+  color: #131D34;
 }

+ 0 - 1
config/api.js

@@ -130,7 +130,6 @@ module.exports = {
     createOrUpdate: API_BASE_URL + 'liveRoom/createOrUpdate',
     listRooms: API_BASE_URL + 'liveRoom/listRooms',
     deleteRoom: API_BASE_URL + 'liveRoom/delete',
-    // exitRoom: API_BASE_URL + 'liveRoom/exit',
     getAssistants: API_BASE_URL + 'liveRoom/getAssistants',
     
     // 预设房间管理

+ 1 - 3
pages/webview/index.js

@@ -38,6 +38,7 @@ Page({
    */
   onLoad: async function (options) {
     // console.log(this.options.a)
+
     if (options.scene) {
       // [id_type_join_roomId_many]
       const scene = decodeURIComponent(options.scene)
@@ -269,9 +270,6 @@ Page({
 
   },
 
-
-
-
   /**
    * 生命周期函数--监听页面显示
    */

+ 229 - 231
project.config.json

@@ -1,232 +1,230 @@
-{
-  "description": "项目配置文件,详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html",
-  "setting": {
-    "urlCheck": false,
-    "es6": true,
-    "enhance": true,
-    "postcss": true,
-    "preloadBackgroundData": false,
-    "minified": true,
-    "newFeature": true,
-    "coverView": true,
-    "nodeModules": false,
-    "autoAudits": false,
-    "showShadowRootInWxmlPanel": true,
-    "scopeDataCheck": false,
-    "uglifyFileName": false,
-    "checkInvalidKey": true,
-    "checkSiteMap": true,
-    "uploadWithSourceMap": true,
-    "compileHotReLoad": false,
-    "lazyloadPlaceholderEnable": false,
-    "useMultiFrameRuntime": true,
-    "useApiHook": true,
-    "useApiHostProcess": true,
-    "babelSetting": {
-      "ignore": [],
-      "disablePlugins": [],
-      "outputPath": ""
-    },
-    "useIsolateContext": false,
-    "userConfirmedBundleSwitch": false,
-    "packNpmManually": false,
-    "packNpmRelationList": [],
-    "minifyWXSS": true,
-    "disableUseStrict": false,
-    "minifyWXML": true,
-    "showES6CompileOption": false,
-    "useCompilerPlugins": false,
-    "ignoreUploadUnusedFiles": true,
-    "useStaticServer": true
-  },
-  "compileType": "miniprogram",
-  "libVersion": "2.19.3",
-  "appid": "wx564b12f68f5e4feb",
-  "projectname": "FDshop",
-  "simulatorType": "wechat",
-  "simulatorPluginLibVersion": {},
-  "condition": {
-    "miniprogram": {
-      "list": [
-        {
-          "name": "选择优惠券",
-          "pathName": "pages/shopping/selCoupon/selCoupon",
-          "query": "isBuy=false"
-        },
-        {
-          "name": "订单界面",
-          "pathName": "pages/shopping/checkout/checkout",
-          "query": "isBuy=true"
-        },
-        {
-          "name": "我的优惠券",
-          "pathName": "pages/ucenter/coupon/coupon",
-          "query": "isBuy=true"
-        },
-        {
-          "name": "我的订单",
-          "pathName": "pages/ucenter/order/order",
-          "query": ""
-        },
-        {
-          "name": "pages/goods/goods",
-          "pathName": "pages/goods/goods",
-          "query": "id=1181015",
-          "scene": null
-        },
-        {
-          "name": "pages/ucenter/index/index",
-          "pathName": "pages/ucenter/index/index",
-          "query": "",
-          "scene": null
-        },
-        {
-          "name": "pages/cart/cart",
-          "pathName": "pages/cart/cart",
-          "query": "id=1181015",
-          "scene": null
-        },
-        {
-          "name": "pages/catalog/catalog",
-          "pathName": "pages/catalog/catalog",
-          "query": "id=1181015",
-          "scene": null
-        },
-        {
-          "name": "pages/category/category",
-          "pathName": "pages/category/category",
-          "query": "id=1036009",
-          "scene": null
-        },
-        {
-          "name": "pages/ucenter/orderDetail/orderDetail",
-          "pathName": "pages/ucenter/orderDetail/orderDetail",
-          "query": "id=142",
-          "scene": null
-        },
-        {
-          "name": "pages/payResult/payResult",
-          "pathName": "pages/payResult/payResult",
-          "query": "status=1",
-          "scene": null
-        },
-        {
-          "name": "pages/cart/cart",
-          "pathName": "pages/cart/cart",
-          "query": "",
-          "scene": null
-        },
-        {
-          "name": "pages/ucenter/addressAdd/addressAdd",
-          "pathName": "pages/ucenter/addressAdd/addressAdd",
-          "query": "",
-          "scene": null
-        },
-        {
-          "name": "pages/logistics/index",
-          "pathName": "pages/logistics/index",
-          "query": "no=75326914125277&id=157",
-          "scene": null
-        },
-        {
-          "name": "pages/ucenter/order/order",
-          "pathName": "pages/ucenter/order/order",
-          "query": "",
-          "scene": null
-        },
-        {
-          "name": "pages/ucenter/feedback/feedback",
-          "pathName": "pages/ucenter/feedback/feedback",
-          "query": "",
-          "scene": null
-        },
-        {
-          "name": "pages/ucenter/feedback/feedback",
-          "pathName": "pages/ucenter/feedback/feedback",
-          "query": "",
-          "scene": null
-        },
-        {
-          "name": "pages/shopping/checkout/checkout",
-          "pathName": "pages/shopping/checkout/checkout",
-          "query": "",
-          "scene": null
-        },
-        {
-          "name": "pages/ucenter/address/address",
-          "pathName": "pages/ucenter/address/address",
-          "query": "",
-          "scene": null
-        },
-        {
-          "name": "pages/shopping/address/address",
-          "pathName": "pages/shopping/address/address",
-          "query": "",
-          "scene": null
-        },
-        {
-          "name": "pages/shopping/address/address",
-          "pathName": "pages/shopping/address/address",
-          "query": "",
-          "scene": null
-        },
-        {
-          "name": "pages/search/search",
-          "pathName": "pages/search/search",
-          "query": "",
-          "scene": null
-        },
-        {
-          "name": "pages/webview/index",
-          "pathName": "pages/webview/index",
-          "query": "url=gu6HmTLKp",
-          "scene": null
-        },
-        {
-          "name": "pages/auth/btnAuth/btnAuth",
-          "pathName": "pages/auth/btnAuth/btnAuth",
-          "query": "",
-          "scene": null
-        },
-        {
-          "name": "pages/brandDetail/brandDetail",
-          "pathName": "pages/brandDetail/brandDetail",
-          "query": "id=1046017",
-          "scene": null
-        },
-        {
-          "name": "pages/ucenter/orderDetail/orderDetail",
-          "pathName": "pages/ucenter/orderDetail/orderDetail",
-          "query": "id=412",
-          "scene": null
-        },
-        {
-          "name": "pages/webview/index",
-          "pathName": "pages/webview/index",
-          "query": "",
-          "scene": null
-        },
-        {
-          "name": "dataReport/pages/data-report/data-report",
-          "pathName": "dataReport/pages/data-report/data-report",
-          "query": "",
-          "scene": null
-        },
-        {
-          "name": "首页",
-          "pathName": "pages/index/index",
-          "query": "",
-          "scene": null
-        }
-      ]
-    }
-  },
-  "packOptions": {
-    "ignore": [],
-    "include": []
-  },
-  "editorSetting": {
-    "tabIndent": "insertSpaces",
-    "tabSize": 2
-  }
+{
+  "description": "项目配置文件,详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html",
+  "setting": {
+    "urlCheck": false,
+    "es6": true,
+    "enhance": true,
+    "postcss": true,
+    "preloadBackgroundData": false,
+    "minified": true,
+    "newFeature": true,
+    "coverView": true,
+    "nodeModules": false,
+    "autoAudits": false,
+    "showShadowRootInWxmlPanel": true,
+    "scopeDataCheck": false,
+    "uglifyFileName": false,
+    "checkInvalidKey": true,
+    "checkSiteMap": true,
+    "uploadWithSourceMap": true,
+    "compileHotReLoad": false,
+    "lazyloadPlaceholderEnable": false,
+    "useMultiFrameRuntime": true,
+    "babelSetting": {
+      "ignore": [],
+      "disablePlugins": [],
+      "outputPath": ""
+    },
+    "useIsolateContext": false,
+    "userConfirmedBundleSwitch": false,
+    "packNpmManually": false,
+    "packNpmRelationList": [],
+    "minifyWXSS": true,
+    "disableUseStrict": false,
+    "minifyWXML": true,
+    "showES6CompileOption": false,
+    "useCompilerPlugins": false,
+    "ignoreUploadUnusedFiles": true,
+    "useStaticServer": true,
+    "condition": false
+  },
+  "compileType": "miniprogram",
+  "simulatorType": "wechat",
+  "simulatorPluginLibVersion": {},
+  "condition": {
+    "miniprogram": {
+      "list": [
+        {
+          "name": "选择优惠券",
+          "pathName": "pages/shopping/selCoupon/selCoupon",
+          "query": "isBuy=false"
+        },
+        {
+          "name": "订单界面",
+          "pathName": "pages/shopping/checkout/checkout",
+          "query": "isBuy=true"
+        },
+        {
+          "name": "我的优惠券",
+          "pathName": "pages/ucenter/coupon/coupon",
+          "query": "isBuy=true"
+        },
+        {
+          "name": "我的订单",
+          "pathName": "pages/ucenter/order/order",
+          "query": ""
+        },
+        {
+          "name": "pages/goods/goods",
+          "pathName": "pages/goods/goods",
+          "query": "id=1181015",
+          "scene": null
+        },
+        {
+          "name": "pages/ucenter/index/index",
+          "pathName": "pages/ucenter/index/index",
+          "query": "",
+          "scene": null
+        },
+        {
+          "name": "pages/cart/cart",
+          "pathName": "pages/cart/cart",
+          "query": "id=1181015",
+          "scene": null
+        },
+        {
+          "name": "pages/catalog/catalog",
+          "pathName": "pages/catalog/catalog",
+          "query": "id=1181015",
+          "scene": null
+        },
+        {
+          "name": "pages/category/category",
+          "pathName": "pages/category/category",
+          "query": "id=1036009",
+          "scene": null
+        },
+        {
+          "name": "pages/ucenter/orderDetail/orderDetail",
+          "pathName": "pages/ucenter/orderDetail/orderDetail",
+          "query": "id=142",
+          "scene": null
+        },
+        {
+          "name": "pages/payResult/payResult",
+          "pathName": "pages/payResult/payResult",
+          "query": "status=1",
+          "scene": null
+        },
+        {
+          "name": "pages/cart/cart",
+          "pathName": "pages/cart/cart",
+          "query": "",
+          "scene": null
+        },
+        {
+          "name": "pages/ucenter/addressAdd/addressAdd",
+          "pathName": "pages/ucenter/addressAdd/addressAdd",
+          "query": "",
+          "scene": null
+        },
+        {
+          "name": "pages/logistics/index",
+          "pathName": "pages/logistics/index",
+          "query": "no=75326914125277&id=157",
+          "scene": null
+        },
+        {
+          "name": "pages/ucenter/order/order",
+          "pathName": "pages/ucenter/order/order",
+          "query": "",
+          "scene": null
+        },
+        {
+          "name": "pages/ucenter/feedback/feedback",
+          "pathName": "pages/ucenter/feedback/feedback",
+          "query": "",
+          "scene": null
+        },
+        {
+          "name": "pages/ucenter/feedback/feedback",
+          "pathName": "pages/ucenter/feedback/feedback",
+          "query": "",
+          "scene": null
+        },
+        {
+          "name": "pages/shopping/checkout/checkout",
+          "pathName": "pages/shopping/checkout/checkout",
+          "query": "",
+          "scene": null
+        },
+        {
+          "name": "pages/ucenter/address/address",
+          "pathName": "pages/ucenter/address/address",
+          "query": "",
+          "scene": null
+        },
+        {
+          "name": "pages/shopping/address/address",
+          "pathName": "pages/shopping/address/address",
+          "query": "",
+          "scene": null
+        },
+        {
+          "name": "pages/shopping/address/address",
+          "pathName": "pages/shopping/address/address",
+          "query": "",
+          "scene": null
+        },
+        {
+          "name": "pages/search/search",
+          "pathName": "pages/search/search",
+          "query": "",
+          "scene": null
+        },
+        {
+          "name": "pages/webview/index",
+          "pathName": "pages/webview/index",
+          "query": "url=gu6HmTLKp",
+          "scene": null
+        },
+        {
+          "name": "pages/auth/btnAuth/btnAuth",
+          "pathName": "pages/auth/btnAuth/btnAuth",
+          "query": "",
+          "scene": null
+        },
+        {
+          "name": "pages/brandDetail/brandDetail",
+          "pathName": "pages/brandDetail/brandDetail",
+          "query": "id=1046017",
+          "scene": null
+        },
+        {
+          "name": "pages/ucenter/orderDetail/orderDetail",
+          "pathName": "pages/ucenter/orderDetail/orderDetail",
+          "query": "id=412",
+          "scene": null
+        },
+        {
+          "name": "pages/webview/index",
+          "pathName": "pages/webview/index",
+          "query": "",
+          "scene": null
+        },
+        {
+          "name": "dataReport/pages/data-report/data-report",
+          "pathName": "dataReport/pages/data-report/data-report",
+          "query": "",
+          "scene": null
+        },
+        {
+          "name": "首页",
+          "pathName": "pages/index/index",
+          "query": "",
+          "scene": null
+        }
+      ]
+    }
+  },
+  "editorSetting": {
+    "tabIndent": "insertSpaces",
+    "tabSize": 2
+  },
+  "packOptions": {
+    "ignore": [],
+    "include": []
+  },
+  "appid": "wx564b12f68f5e4feb",
+  "projectname": "FDshop"
 }

+ 210 - 210
project.private.config.json

@@ -1,211 +1,211 @@
-{
-  "condition": {
-    "miniprogram": {
-      "list": [
-        {
-          "name": "选择优惠券",
-          "pathName": "pages/shopping/selCoupon/selCoupon",
-          "query": "isBuy=false"
-        },
-        {
-          "name": "订单界面",
-          "pathName": "pages/shopping/checkout/checkout",
-          "query": "isBuy=true"
-        },
-        {
-          "name": "我的优惠券",
-          "pathName": "pages/ucenter/coupon/coupon",
-          "query": "isBuy=true"
-        },
-        {
-          "name": "我的订单",
-          "pathName": "pages/ucenter/order/order",
-          "query": ""
-        },
-        {
-          "name": "pages/goods/goods",
-          "pathName": "pages/goods/goods",
-          "query": "id=1181015",
-          "scene": null
-        },
-        {
-          "name": "pages/ucenter/index/index",
-          "pathName": "pages/ucenter/index/index",
-          "query": "",
-          "scene": null
-        },
-        {
-          "name": "pages/cart/cart",
-          "pathName": "pages/cart/cart",
-          "query": "id=1181015",
-          "scene": null
-        },
-        {
-          "name": "pages/catalog/catalog",
-          "pathName": "pages/catalog/catalog",
-          "query": "id=1181015",
-          "scene": null
-        },
-        {
-          "name": "pages/category/category",
-          "pathName": "pages/category/category",
-          "query": "id=1036009",
-          "scene": null
-        },
-        {
-          "name": "pages/ucenter/orderDetail/orderDetail",
-          "pathName": "pages/ucenter/orderDetail/orderDetail",
-          "query": "id=142",
-          "scene": null
-        },
-        {
-          "name": "pages/payResult/payResult",
-          "pathName": "pages/payResult/payResult",
-          "query": "status=1",
-          "scene": null
-        },
-        {
-          "name": "pages/cart/cart",
-          "pathName": "pages/cart/cart",
-          "query": "",
-          "scene": null
-        },
-        {
-          "name": "pages/ucenter/addressAdd/addressAdd",
-          "pathName": "pages/ucenter/addressAdd/addressAdd",
-          "query": "",
-          "scene": null
-        },
-        {
-          "name": "pages/logistics/index",
-          "pathName": "pages/logistics/index",
-          "query": "no=75326914125277&id=157",
-          "scene": null
-        },
-        {
-          "name": "pages/ucenter/order/order",
-          "pathName": "pages/ucenter/order/order",
-          "query": "",
-          "scene": null
-        },
-        {
-          "name": "pages/ucenter/feedback/feedback",
-          "pathName": "pages/ucenter/feedback/feedback",
-          "query": "",
-          "scene": null
-        },
-        {
-          "name": "pages/ucenter/feedback/feedback",
-          "pathName": "pages/ucenter/feedback/feedback",
-          "query": "",
-          "scene": null
-        },
-        {
-          "name": "pages/shopping/checkout/checkout",
-          "pathName": "pages/shopping/checkout/checkout",
-          "query": "",
-          "scene": null
-        },
-        {
-          "name": "pages/ucenter/address/address",
-          "pathName": "pages/ucenter/address/address",
-          "query": "",
-          "scene": null
-        },
-        {
-          "name": "pages/shopping/address/address",
-          "pathName": "pages/shopping/address/address",
-          "query": "",
-          "scene": null
-        },
-        {
-          "name": "pages/shopping/address/address",
-          "pathName": "pages/shopping/address/address",
-          "query": "",
-          "scene": null
-        },
-        {
-          "name": "pages/search/search",
-          "pathName": "pages/search/search",
-          "query": "",
-          "scene": null
-        },
-        {
-          "name": "pages/webview/index",
-          "pathName": "pages/webview/index",
-          "query": "url=gu6HmTLKp",
-          "scene": null
-        },
-        {
-          "name": "pages/auth/btnAuth/btnAuth",
-          "pathName": "pages/auth/btnAuth/btnAuth",
-          "query": "",
-          "scene": null
-        },
-        {
-          "name": "pages/brandDetail/brandDetail",
-          "pathName": "pages/brandDetail/brandDetail",
-          "query": "id=1046017",
-          "scene": null
-        },
-        {
-          "name": "pages/ucenter/orderDetail/orderDetail",
-          "pathName": "pages/ucenter/orderDetail/orderDetail",
-          "query": "id=412",
-          "scene": null
-        },
-        {
-          "name": "pages/webview/index",
-          "pathName": "pages/webview/index",
-          "query": "",
-          "scene": null
-        },
-        {
-          "name": "dataReport/pages/data-report/data-report",
-          "pathName": "dataReport/pages/data-report/data-report",
-          "query": "",
-          "scene": null
-        },
-        {
-          "name": "首页",
-          "pathName": "pages/index/index",
-          "query": "",
-          "scene": null
-        },
-        {
-          "name": "我的房间",
-          "pathName": "pages/roomManger/roomManger",
-          "query": "type=33",
-          "launchMode": "default",
-          "scene": null
-        },
-        {
-          "name": "新建房间",
-          "pathName": "pages/room/add",
-          "query": "",
-          "launchMode": "default",
-          "scene": null
-        },
-        {
-          "name": "我的个人",
-          "pathName": "pages/ucenter/index/index",
-          "query": "",
-          "launchMode": "default",
-          "scene": null
-        },
-        {
-          "name": "邀请人",
-          "pathName": "/pages/webview/index",
-          "query": "id=1047145&type=33&join=true&roomId=623AC6&many=true&inviterId=97209",
-          "launchMode": "default",
-          "scene": null
-        }
-      ]
-    }
-  },
-  "description": "项目私有配置文件。此文件中的内容将覆盖 project.config.json 中的相同字段。项目的改动优先同步到此文件中。详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html",
-  "setting": {
-    "compileHotReLoad": false
-  },
-  "libVersion": "2.28.1"
+{
+  "condition": {
+    "miniprogram": {
+      "list": [
+        {
+          "name": "选择优惠券",
+          "pathName": "pages/shopping/selCoupon/selCoupon",
+          "query": "isBuy=false"
+        },
+        {
+          "name": "订单界面",
+          "pathName": "pages/shopping/checkout/checkout",
+          "query": "isBuy=true"
+        },
+        {
+          "name": "我的优惠券",
+          "pathName": "pages/ucenter/coupon/coupon",
+          "query": "isBuy=true"
+        },
+        {
+          "name": "我的订单",
+          "pathName": "pages/ucenter/order/order",
+          "query": ""
+        },
+        {
+          "name": "pages/goods/goods",
+          "pathName": "pages/goods/goods",
+          "query": "id=1181015",
+          "scene": null
+        },
+        {
+          "name": "pages/ucenter/index/index",
+          "pathName": "pages/ucenter/index/index",
+          "query": "",
+          "scene": null
+        },
+        {
+          "name": "pages/cart/cart",
+          "pathName": "pages/cart/cart",
+          "query": "id=1181015",
+          "scene": null
+        },
+        {
+          "name": "pages/catalog/catalog",
+          "pathName": "pages/catalog/catalog",
+          "query": "id=1181015",
+          "scene": null
+        },
+        {
+          "name": "pages/category/category",
+          "pathName": "pages/category/category",
+          "query": "id=1036009",
+          "scene": null
+        },
+        {
+          "name": "pages/ucenter/orderDetail/orderDetail",
+          "pathName": "pages/ucenter/orderDetail/orderDetail",
+          "query": "id=142",
+          "scene": null
+        },
+        {
+          "name": "pages/payResult/payResult",
+          "pathName": "pages/payResult/payResult",
+          "query": "status=1",
+          "scene": null
+        },
+        {
+          "name": "pages/cart/cart",
+          "pathName": "pages/cart/cart",
+          "query": "",
+          "scene": null
+        },
+        {
+          "name": "pages/ucenter/addressAdd/addressAdd",
+          "pathName": "pages/ucenter/addressAdd/addressAdd",
+          "query": "",
+          "scene": null
+        },
+        {
+          "name": "pages/logistics/index",
+          "pathName": "pages/logistics/index",
+          "query": "no=75326914125277&id=157",
+          "scene": null
+        },
+        {
+          "name": "pages/ucenter/order/order",
+          "pathName": "pages/ucenter/order/order",
+          "query": "",
+          "scene": null
+        },
+        {
+          "name": "pages/ucenter/feedback/feedback",
+          "pathName": "pages/ucenter/feedback/feedback",
+          "query": "",
+          "scene": null
+        },
+        {
+          "name": "pages/ucenter/feedback/feedback",
+          "pathName": "pages/ucenter/feedback/feedback",
+          "query": "",
+          "scene": null
+        },
+        {
+          "name": "pages/shopping/checkout/checkout",
+          "pathName": "pages/shopping/checkout/checkout",
+          "query": "",
+          "scene": null
+        },
+        {
+          "name": "pages/ucenter/address/address",
+          "pathName": "pages/ucenter/address/address",
+          "query": "",
+          "scene": null
+        },
+        {
+          "name": "pages/shopping/address/address",
+          "pathName": "pages/shopping/address/address",
+          "query": "",
+          "scene": null
+        },
+        {
+          "name": "pages/shopping/address/address",
+          "pathName": "pages/shopping/address/address",
+          "query": "",
+          "scene": null
+        },
+        {
+          "name": "pages/search/search",
+          "pathName": "pages/search/search",
+          "query": "",
+          "scene": null
+        },
+        {
+          "name": "pages/webview/index",
+          "pathName": "pages/webview/index",
+          "query": "url=gu6HmTLKp",
+          "scene": null
+        },
+        {
+          "name": "pages/auth/btnAuth/btnAuth",
+          "pathName": "pages/auth/btnAuth/btnAuth",
+          "query": "",
+          "scene": null
+        },
+        {
+          "name": "pages/brandDetail/brandDetail",
+          "pathName": "pages/brandDetail/brandDetail",
+          "query": "id=1046017",
+          "scene": null
+        },
+        {
+          "name": "pages/ucenter/orderDetail/orderDetail",
+          "pathName": "pages/ucenter/orderDetail/orderDetail",
+          "query": "id=412",
+          "scene": null
+        },
+        {
+          "name": "pages/webview/index",
+          "pathName": "pages/webview/index",
+          "query": "",
+          "scene": null
+        },
+        {
+          "name": "dataReport/pages/data-report/data-report",
+          "pathName": "dataReport/pages/data-report/data-report",
+          "query": "",
+          "scene": null
+        },
+        {
+          "name": "首页",
+          "pathName": "pages/index/index",
+          "query": "",
+          "scene": null
+        },
+        {
+          "name": "我的房间",
+          "pathName": "pages/roomManger/roomManger",
+          "query": "type=33",
+          "launchMode": "default",
+          "scene": null
+        },
+        {
+          "name": "新建房间",
+          "pathName": "pages/room/add",
+          "query": "",
+          "launchMode": "default",
+          "scene": null
+        },
+        {
+          "name": "我的个人",
+          "pathName": "pages/ucenter/index/index",
+          "query": "",
+          "launchMode": "default",
+          "scene": null
+        },
+        {
+          "name": "邀请人",
+          "pathName": "/pages/webview/index",
+          "query": "id=1047145&type=33&join=true&roomId=623AC6&many=true&inviterId=97209",
+          "launchMode": "default",
+          "scene": null
+        }
+      ]
+    }
+  },
+  "description": "项目私有配置文件。此文件中的内容将覆盖 project.config.json 中的相同字段。项目的改动优先同步到此文件中。详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html",
+  "setting": {
+    "compileHotReLoad": false
+  },
+  "libVersion": "2.28.1"
 }

+ 77 - 78
services/user.js

@@ -1,78 +1,77 @@
-/**
- * 用户相关服务
- */
-
-const util = require('../utils/util.js');
-const api = require('../config/api.js');
-
-
-/**
- * 调用微信登录
- */
-function loginByWeixin(userInfo) {
-
-  let code = null;
-  return new Promise(function (resolve, reject) {
-    return util.login().then((res) => {
-      code = res.code;
-      return userInfo;
-    }).then((userInfo) => {
-      //登录远程服务器
-      util.request(api.AuthLoginByWeixin, { code: code, userInfo: userInfo }, 'POST', 'application/json').then(res => {
-        if (res.errno === 0) {
-          //存储用户信息
-          res.data.userInfo.userId = res.data.userId
-          res.data.userInfo.sessionKey = res.data.sessionKey
-          res.data.userInfo.isAdmin = res.data.isAdmin
-          wx.setStorageSync('userInfo', res.data.userInfo);
-          wx.setStorageSync('token', res.data.token);
-
-          resolve(res);
-        } else {
-          util.showErrorToast(res.errmsg)
-          reject(res);
-        }
-      }).catch((err) => {
-        reject(err);
-      });
-    }).catch((err) => {
-      reject(err);
-    })
-  });
-}
-
-/**
- * 判断用户是否登录
- */
-function checkLogin() {
-  return new Promise(function (resolve, reject) {
-    if (wx.getStorageSync('userInfo') && wx.getStorageSync('token')) {
-
-      util.checkSession().then(() => {
-        resolve(true);
-      }).catch(() => {
-        reject(false);
-      });
-
-    } else {
-      reject(false);
-    }
-  });
-}
-
-
-module.exports = {
-  loginByWeixin,
-  checkLogin,
-};
-
-
-
-
-
-
-
-
-
-
-
+/**
+ * 用户相关服务
+ */
+
+const util = require('../utils/util.js');
+const api = require('../config/api.js');
+
+
+/**
+ * 调用微信登录
+ */
+function loginByWeixin(userInfo) {
+
+  let code = null;
+  return new Promise(function (resolve, reject) {
+    return util.login().then((res) => {
+      code = res.code;
+      return userInfo;
+    }).then((userInfo) => {
+      //登录远程服务器
+      util.request(api.AuthLoginByWeixin, { code: code, userInfo: userInfo }, 'POST', 'application/json').then(res => {
+        if (res.errno === 0) {
+          //存储用户信息
+          res.data.userInfo.userId = res.data.userId
+          res.data.userInfo.sessionKey = res.data.sessionKey
+          res.data.userInfo.isAdmin = res.data.isAdmin
+          wx.setStorageSync('userInfo', res.data.userInfo);
+          wx.setStorageSync('token', res.data.token);
+
+          resolve(res);
+        } else {
+          util.showErrorToast(res.errmsg)
+          resolve(res);
+        }
+      }).catch((err) => {
+        reject(err);
+      });
+    }).catch((err) => {
+      reject(err);
+    })
+  });
+}
+
+/**
+ * 判断用户是否登录
+ */
+function checkLogin() {
+  return new Promise(function (resolve, reject) {
+    if (wx.getStorageSync('userInfo') && wx.getStorageSync('token')) {
+      util.checkSession().then(() => {
+        resolve(true);
+      }).catch(() => {
+        resolve(false);
+      });
+
+    } else {
+      resolve(false);
+    }
+  });
+}
+
+
+module.exports = {
+  loginByWeixin,
+  checkLogin,
+};
+
+
+
+
+
+
+
+
+
+
+

+ 1 - 1
socket.js

@@ -269,7 +269,7 @@ export default {
       const data = res.data
       data.region = data.city ? data.city.split(',') : []
       data.birthday = data.birthday || '1990-01-01'
-      if (!data.nickname || !data.avatar) {
+      if (!data.nickname || !data.avatar || !data.mobile) {
         this.setData({
           isNotPersonalfullpack: true
         })