Browse Source

用户信息优化

test
Enzo 5 years ago
parent
commit
c77f0ee235
  1. 5
      common/api.js
  2. 2
      pages/order/refund_detail.vue
  3. 7
      pages/user/user.vue

5
common/api.js

@ -49,7 +49,10 @@ export const API_CHECKNEWS = '/api/message/read'; //消息标记为已读
export const API_RECOMMOND = '/api/agent_product/recommend'; //我的推荐列表
//用户信息
export const API_GETUSERINFO = '/api/user/profile'; //获取用户消息
export const API_GETUSERINFO = '/api/user/profile'; //设置用户消息
export const API_SETUSDRINFO = '/api/user/info'; //我的页面获取用户信息
//订单
export const API_ORDERLIST = '/api/order/list'; //订单列表

2
pages/order/refund_detail.vue

@ -40,7 +40,7 @@
<view class="bg-white lf-m-b-6">
<view class="lf-p-t-30 lf-p-l-32 lf-p-r-32 lf-p-b-36">
<view class="lf-font-28 lf-color-black lf-m-b-20 lf-font-bold">退款说明</view>
<view v-if="refund_info">{{orderDetails.refund_info.desc}}</view>
<view v-if="refund_info != ''">{{orderDetails.refund_info.desc}}</view>
<view v-else>暂无退款说明</view>
</view>
</view>

7
pages/user/user.vue

@ -163,7 +163,6 @@
//
verifyUserInfo(){
let userInfo = uni.getStorageSync('userinfo') || {};
this.userInfo = uni.getStorageSync('userinfo') || {}
if(!userInfo.id || !userInfo.nickname || !userInfo.avatar){
if(this.showLogin){
this.showLogin = false;
@ -174,6 +173,11 @@
}
}
},
getUserInfo() {
this.$http(this.API.API_SETUSDRINFO).then(res => {
this.userInfo = res.data
}).catch(err => {})
},
getRecommond() {
this.$http(this.API.API_RECOMMOND,{page: this.page}).then(res => {
let isPage = res.data.next_page_url == null?false:true;
@ -211,6 +215,7 @@
onShow() {
this.verifyUserInfo()
this.getRecommond()
this.getUserInfo()
}
}
</script>

Loading…
Cancel
Save