zhaoxiaohai 2 anni fa
parent
commit
02b20d1007
2 ha cambiato i file con 19 aggiunte e 12 eliminazioni
  1. 3 8
      pages/tabbar/mine/index.js
  2. 16 4
      pages/tabbar/mine/userMsg/index.js

+ 3 - 8
pages/tabbar/mine/index.js

@@ -9,9 +9,6 @@ Page({
         pathList: [], //功能权限
         teamAuth: '', //团队管理权限列表 JSON字符串 用于传递
     },
-    /**
-     * 生命周期函数--监听页面加载
-     */
     onLoad(options) {
         this.queryUserMsg();
         let auth = getApp().globalData.queryPer.query(wx.getStorageSync('userauth'), ['通用'], ['个人中心'])[0].apps;
@@ -59,9 +56,6 @@ Page({
             })
         })
     },
-    /**
-     * 生命周期函数--监听页面显示
-     */
     onShow() {
         this.getTabBar().init();
     },
@@ -86,10 +80,11 @@ Page({
         let {
             name,
             phonenumber,
-            attinfos
+            attinfos,
+            hr
         } = this.data.userMsg;
         wx.navigateTo({
-            url: `./userMsg/index?attinfos=${JSON.stringify(attinfos)}&name=${name}&phonenumber=${phonenumber}`
+            url: `./userMsg/index?attinfos=${JSON.stringify(attinfos)}&name=${name}&phonenumber=${phonenumber}&email=${hr.email}`
         })
     },
     /* 绑定或解绑微信 */

+ 16 - 4
pages/tabbar/mine/userMsg/index.js

@@ -17,6 +17,15 @@ Page({
             placeholder: "请填写",
             valueName: "name", //绑定的字段名称
             required: true, //必填
+        }, {
+            label: "邮箱",
+            error: false,
+            errMsg: "",
+            type: "text",
+            value: "",
+            placeholder: "请填写",
+            valueName: "email", //绑定的字段名称
+            required: true //必填
         }, {
             label: "手机号",
             error: false,
@@ -28,7 +37,7 @@ Page({
             required: true, //必填
             callback: null,
         }],
-        disabled: false, //禁用按钮
+        disabled: true, //禁用按钮
         show: false, //显示验证码输入框
         password: "", //验证码
         countDown: 0, //倒计时
@@ -43,8 +52,9 @@ Page({
         this.setData({
             attinfos: JSON.parse(options.attinfos),
             "fromList1[0].value": options.name,
-            "fromList1[1].value": options.phonenumber,
-            "fromList1[1].callback": function ({
+            "fromList1[1].value": options.email,
+            "fromList1[2].value": options.phonenumber,
+            "fromList1[2].callback": function ({
                 value
             }) {
                 that.setData({
@@ -103,19 +113,21 @@ Page({
         if (this.data.disabled || this.data.loading) return;
         let data = this.selectComponent("#form1").getData().returnData;
         if (!deletMark.CheckPhoneNumber(data.phonenumber.trim() - 0)) return;
+        if (!deletMark.CheckEmail(data.email.trim())) return;
         if (this.data.show && this.data.password.length == 0) return wx.showToast({
             title: '请输入短信验证码',
             icon: "none"
         });
         this.setData({
             loading: true
-        })
+        });
         _Http.basic({
             "classname": "common.usercenter.usercenter",
             "method": "updateUserMsg",
             "content": {
                 "name": data.name,
                 "phonenumber": data.phonenumber,
+                "email": data.email,
                 "password": MD5.hexMD5(this.data.password.trim())
             }
         }).then(res => {