Browse Source

修改密码

YY 3 years ago
parent
commit
3a78883399
2 changed files with 17 additions and 20 deletions
  1. 17 19
      pages/password/index.js
  2. 0 1
      pages/teamDetails/index.js

+ 17 - 19
pages/password/index.js

@@ -10,8 +10,7 @@ Page({
         // 主体高度
         // 主体高度
         infoHeight: '',
         infoHeight: '',
         frameStyle: { useTop: true, name: '修改密码', leftArrow: true, useBar: false },
         frameStyle: { useTop: true, name: '修改密码', leftArrow: true, useBar: false },
-        form: {
-        }
+        form: {}
     },
     },
     back: function () {
     back: function () {
         wx.navigateBack({ url: '/pages/me/index' })
         wx.navigateBack({ url: '/pages/me/index' })
@@ -25,7 +24,7 @@ Page({
             return false
             return false
         } else {
         } else {
             wx.request({
             wx.request({
-                url: `${app.globalData.publicUrl}/courtAdmin/api/user/updatePwd/${res.data.id}`, //接口地址
+                url: `${app.globalData.publicUrl}/courtAdmin/api/user/updatePwd/${res.data.id}`,
                 method: "post",
                 method: "post",
                 data: value,
                 data: value,
                 header: {},
                 header: {},
@@ -34,7 +33,7 @@ Page({
                         wx.showToast({
                         wx.showToast({
                             title: '保存成功',
                             title: '保存成功',
                             icon: 'success',
                             icon: 'success',
-                            duration: 2000//延迟两秒
+                            duration: 2000
                         })
                         })
                     } else {
                     } else {
                         wx.showToast({
                         wx.showToast({
@@ -72,11 +71,10 @@ Page({
         wx.getStorage({
         wx.getStorage({
             key: 'token',
             key: 'token',
             success: res => {
             success: res => {
-                //数据请求
                 wx.request({
                 wx.request({
-                    url: `${app.globalData.publicUrl}/courtAdmin/api/user/${res.data.id}`, //接口地址
-                    method: "get",//请求方法
-                    data: {},//请求参数
+                    url: `${app.globalData.publicUrl}/courtAdmin/api/user/${res.data.id}`,
+                    method: "get",
+                    data: {},
                     header: {},
                     header: {},
                     success: res => {
                     success: res => {
                         that.setData({ form: res.data.data })
                         that.setData({ form: res.data.data })
@@ -90,17 +88,17 @@ Page({
             }
             }
         })
         })
     },
     },
- // 计算高度
- searchHeight: function () {
-    let frameStyle = this.data.frameStyle;
-    let client = app.globalData.client;
-    let infoHeight = client.windowHeight;
-    // 是否去掉状态栏
-    if (frameStyle.useTop) infoHeight = infoHeight - (client.statusBarHeight + client.getMenu.height + (client.getMenu.top - client.statusBarHeight) * 2);
-    // 是否减去底部菜单
-    if (frameStyle.useBar) infoHeight = infoHeight - 50;
-    if (infoHeight) this.setData({ infoHeight: infoHeight })
-},
+    // 计算高度
+    searchHeight: function () {
+        let frameStyle = this.data.frameStyle;
+        let client = app.globalData.client;
+        let infoHeight = client.windowHeight;
+        // 是否去掉状态栏
+        if (frameStyle.useTop) infoHeight = infoHeight - (client.statusBarHeight + client.getMenu.height + (client.getMenu.top - client.statusBarHeight) * 2);
+        // 是否减去底部菜单
+        if (frameStyle.useBar) infoHeight = infoHeight - 50;
+        if (infoHeight) this.setData({ infoHeight: infoHeight })
+    },
 
 
     /**
     /**
      * 生命周期函数--监听页面初次渲染完成
      * 生命周期函数--监听页面初次渲染完成

+ 0 - 1
pages/teamDetails/index.js

@@ -44,7 +44,6 @@ Page({
       }
       }
     })
     })
   },
   },
-
   /**
   /**
    * 生命周期函数--监听页面加载
    * 生命周期函数--监听页面加载
    */
    */