YY 3 years ago
parent
commit
890051351d
2 changed files with 5 additions and 9 deletions
  1. 2 2
      pages/auditTeam/index.js
  2. 3 7
      pages/user/index.js

+ 2 - 2
pages/auditTeam/index.js

@@ -31,7 +31,7 @@ Page({
         that.setData({ show: true })
         //用户详情
         wx.request({
-            url: `${app.globalData.publicUrl}/courtAdmin/api/user/${userid}`, //接口地址
+            url: `${app.globalData.publicUrl}/courtAdmin/api/user/${userid}`,
             method: "get",
             data: {},
             header: {},
@@ -72,7 +72,7 @@ Page({
                         })
                         //用户详情
                         wx.request({
-                            url: `${app.globalData.publicUrl}/courtAdmin/api/user/${userid}`//接口地址
+                            url: `${app.globalData.publicUrl}/courtAdmin/api/user/${userid}`
                             method: "get",
                             data: {},
                             header: {},

+ 3 - 7
pages/user/index.js

@@ -22,15 +22,14 @@ Page({
     toView: function (e) {
         const that = this;
         let { id } = e.currentTarget.dataset;
-        that.setData({ show: true })
         //用户详情
         wx.request({
-            url: `${app.globalData.publicUrl}/courtAdmin/api/user/${id}`, //接口地址
+            url: `${app.globalData.publicUrl}/courtAdmin/api/user/${id}`,
             method: "get",
             data: {},
             header: {},
             success: res => {
-                that.setData({ details: res.data.data })
+                that.setData({ details: res.data.data, show: true })
             },
             error: err => {
             }
@@ -88,12 +87,10 @@ Page({
     * 生命周期函数--监听页面加载
     */
     onLoad: function (options) {
-        let id = options.id;
-        this.setData({ id: id })
         // 计算高度
         this.searchHeight();
         // 监听用户是否登录
-        this.watchLogin(id);
+        this.watchLogin();
     },
     // 监听用户是否登录
     watchLogin: function () {
@@ -108,7 +105,6 @@ Page({
                     header: {},
                     success: res => {
                         that.setData({ list: res.data.data })
-                        console.log(res.data.data);
                     },
                     error: err => {
                     }