mirror of
https://gitee.com/java110/WechatOwnerService.git
synced 2026-06-12 10:00:57 +08:00
优化头像展示问题
This commit is contained in:
parent
91740d2009
commit
3b05863438
@ -324,7 +324,7 @@ Page({
|
|||||||
method: "POST",
|
method: "POST",
|
||||||
data: _objData, //动态数据
|
data: _objData, //动态数据
|
||||||
success: function (res) {
|
success: function (res) {
|
||||||
console.log(res);
|
console.log("请求返回信息:",res);
|
||||||
if(res.statusCode == 200){
|
if(res.statusCode == 200){
|
||||||
//成功情况下跳转
|
//成功情况下跳转
|
||||||
wx.redirectTo({
|
wx.redirectTo({
|
||||||
|
|||||||
@ -161,8 +161,16 @@ Page({
|
|||||||
success: function (res) {
|
success: function (res) {
|
||||||
console.log(res);
|
console.log(res);
|
||||||
//成功情况下跳转
|
//成功情况下跳转
|
||||||
wx.redirectTo({
|
if (res.statusCode == 200) {
|
||||||
url: "/pages/viewBindOwner/viewBindOwner"
|
wx.redirectTo({
|
||||||
|
url: "/pages/viewBindOwner/viewBindOwner"
|
||||||
|
});
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
wx.showToast({
|
||||||
|
title: res.data,
|
||||||
|
icon: 'none',
|
||||||
|
duration: 2000
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
fail:function(e){
|
fail:function(e){
|
||||||
|
|||||||
@ -59,5 +59,8 @@ Page({
|
|||||||
wx.navigateTo({
|
wx.navigateTo({
|
||||||
url: '../complaintList/complaintList',
|
url: '../complaintList/complaintList',
|
||||||
})
|
})
|
||||||
|
},
|
||||||
|
onGotUserInfo: function (e) {
|
||||||
|
console.log("nickname=" + JSON.stringify(e.detail.userInfo));
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@ -3,12 +3,12 @@
|
|||||||
|
|
||||||
<view class="userinfo">
|
<view class="userinfo">
|
||||||
|
|
||||||
<block wx:if="{{!userInfo.userName}}">
|
<!-- <block wx:if="{{!userInfo.userName}}">
|
||||||
<image class="userinfo-avatar" src="../../images/login.png" background-size="cover" ></image>
|
<image class="userinfo-avatar" src="../../images/login.png" background-size="cover" ></image>
|
||||||
<button class="userinfo-nickname" open-type="getUserInfo" lang="zh_CN" bindgetuserinfo="onGotUserInfo">点击获取昵称</button>
|
<button class="userinfo-nickname" open-type="getUserInfo" lang="zh_CN" bindgetuserinfo="onGotUserInfo">点击获取昵称</button>
|
||||||
</block>
|
</block> -->
|
||||||
|
<!-- wx:else -->
|
||||||
<block wx:else>
|
<block>
|
||||||
<view class="userinfo-avatar" >
|
<view class="userinfo-avatar" >
|
||||||
<open-data type="userAvatarUrl" lang="zh_CN"/>
|
<open-data type="userAvatarUrl" lang="zh_CN"/>
|
||||||
</view>
|
</view>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user