guhongwei 2 年之前
父节点
当前提交
4bcb55c381
共有 1 个文件被更改,包括 1 次插入2 次删除
  1. 1 2
      pages/smy/index.js

+ 1 - 2
pages/smy/index.js

@@ -42,14 +42,13 @@ Page({
         wx.getStorage({
             key: 'user',
             success: async res => {
-                const arr = await app.$get(`/newCourt/api/user/${res.data._id}`);
+                const arr = await app.$get(`/newCourt/api/user/${res.data.openid}`);
                 if (arr.errcode == '0') {
                     that.setData({ user: arr.data })
                     let btnData = school_menu.find((i) => i.type == arr.data.type);
                     that.setData({ list: [...btnData.menu, ...school_sysmenu] })
                 }
                 else { wx.showToast({ title: `${arr.errmsg}`, icon: 'error', duration: 2000 }); }
-
             },
             fail: async res => {
                 wx.redirectTo({ url: '/pages/index/index' })