|
@@ -55,12 +55,13 @@
|
|
|
点赞
|
|
|
</view>
|
|
|
</view>
|
|
|
- <view class="item">
|
|
|
+ <view class="item" @click="gotoUrl('pages/mine/myComment')" >
|
|
|
<view class="amout">
|
|
|
0
|
|
|
</view>
|
|
|
<view class="text">
|
|
|
- 评论
|
|
|
+ 评论
|
|
|
+
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="item">
|
|
@@ -197,19 +198,40 @@
|
|
|
}
|
|
|
},
|
|
|
onLoad() {
|
|
|
- this.plusInfo=this.carhelp.getPersonInfoPlus();
|
|
|
- this.userInfo=this.carhelp.getPersonInfo();
|
|
|
|
|
|
-
|
|
|
- if(this.userInfo&&this.userInfo.phone){
|
|
|
- var phone = this.userInfo.phone;
|
|
|
- var phone1 = phone.slice(0,3);
|
|
|
- var phone2 = phone.slice(-4);
|
|
|
- this.userPhone = phone1 + '****' + phone2;
|
|
|
- }
|
|
|
-
|
|
|
+ this.init()
|
|
|
+ },
|
|
|
+ onShow(){
|
|
|
+ this.findByOpenId()
|
|
|
},
|
|
|
methods: {
|
|
|
+ init(){
|
|
|
+ this.plusInfo=this.carhelp.getPersonInfoPlus();
|
|
|
+ this.userInfo=this.carhelp.getPersonInfo();
|
|
|
+
|
|
|
+
|
|
|
+ if(this.userInfo&&this.userInfo.phone){
|
|
|
+ var phone = this.userInfo.phone;
|
|
|
+ var phone1 = phone.slice(0,3);
|
|
|
+ var phone2 = phone.slice(-4);
|
|
|
+ this.userPhone = phone1 + '****' + phone2;
|
|
|
+ }
|
|
|
+ },
|
|
|
+ findByOpenId(){
|
|
|
+ API.findByOpenId({
|
|
|
+ noerror:true,
|
|
|
+ openId: this.carhelp.getOpenId(),
|
|
|
+
|
|
|
+ }).then((response) => {
|
|
|
+
|
|
|
+ this.carhelp.setPersonInfo(response.data.regUser);
|
|
|
+ this.carhelp.setPersonInfoPlus(response.data)
|
|
|
+ this.init();
|
|
|
+ }).catch(error => {
|
|
|
+ uni.hideLoading();
|
|
|
+
|
|
|
+ })
|
|
|
+ },
|
|
|
logoutApi(){
|
|
|
uni.showLoading({
|
|
|
title: "加载中",
|