diff --git a/src/api/myApi.js b/src/api/myApi.js index c57c6cd..463fd8b 100644 --- a/src/api/myApi.js +++ b/src/api/myApi.js @@ -30,6 +30,14 @@ const getUserInfoApi = function (data) { }); }; +const getProfileUserInfoApi = function (data) { + return request({ + url: '/admin-api/system/user/profile/get', + method: 'get', + data: data + }); +}; + /** * 获得用户积分规则分页 * @param {*} data @@ -142,7 +150,7 @@ const replyGoodPageApi = function (data) { const sendSmSCodeApi = function (data) { return request({ url: '/admin-api/system/auth/send-sms-code', - method: 'get', + method: 'post', data: data }); }; @@ -150,7 +158,7 @@ const sendSmSCodeApi = function (data) { const systemAuthSmsLogin = function (data) { return request({ url: '/admin-api/system/auth/sms-login', - method: 'get', + method: 'post', data: data }); }; @@ -167,5 +175,6 @@ export { replyCreatUpdateApi, replyGoodPageApi, sendSmSCodeApi, - systemAuthSmsLogin + systemAuthSmsLogin, + getProfileUserInfoApi }; diff --git a/src/config/env.js b/src/config/env.js index 830e569..80b3931 100644 --- a/src/config/env.js +++ b/src/config/env.js @@ -2,7 +2,7 @@ * @name 小程序环境 * @description 多环境配置 */ -const envName = 'production'; +const envName = 'development'; const envs = [{ envName: 'production', appID: 'wx736395182f05a1b7', diff --git a/src/pages/my/my.vue b/src/pages/my/my.vue index 0d06cc4..a9b4a56 100644 --- a/src/pages/my/my.vue +++ b/src/pages/my/my.vue @@ -13,7 +13,7 @@ - {{ userInfo.nickName }} + {{ userInfo.nickname }} 请登录 @@ -135,22 +135,20 @@ }; }, async onLoad() { - // const { code } = await uni.pro.login(); - // this.setData({ - // code - // }); this.recursionApi(); }, onShow() { // 设置判断,限制不同权限渲染不同数据 this.setMune(); this.getInitData(); - // this.getUserInfoApi(); + this.getUserInfoApi(); + this.getUserInfo(); }, methods: { async getUserInfoApi() { const res = await myApi.getUserInfoApi(); if (res.data) { + this.myInfo = res.data uni.setStorageSync('userInfoCount', res.data); } }, @@ -310,16 +308,14 @@ } }, - // // 获取我的信息 - // async getUserInfo() { - // const res = await myApi.getUserInfoApi(); - // if (res.data) { - // this.setData({ - // myInfo: res.data, - // }); - // wx.setStorageSync('userInfoCount', res.data); - // } - // }, + // 获取我的信息 + async getUserInfo() { + const res = await myApi.getProfileUserInfoApi(); + if (res.data) { + this.userInfo = res.data + uni.setStorageSync("userInfoData", res.data); + } + }, async recursionApi() { const { data = [] diff --git a/src/pages/phone/index.vue b/src/pages/phone/index.vue index 755b0e6..51bcc42 100644 --- a/src/pages/phone/index.vue +++ b/src/pages/phone/index.vue @@ -1,35 +1,70 @@ \ No newline at end of file +.number-alert-icon { + width: 144rpx; + height: 144rpx; + display: inline-block; + border: none; + border-radius: 50%; +} + +.number-alert-title { + font-size: 32rpx; + font-weight: 500; + color: #293341; + line-height: 32rpx; + margin-top: 38rpx; + margin-bottom: 92rpx; +} + +.number-alert-btn { + background: #19ba50; + border-radius: 42px; + color: #fff; +} + +.phone-popup { + padding-bottom: 108rpx; +} +