D:删除调试用的console.log。
F:修复输入姓名和手机时不保存的问题
This commit is contained in:
parent
2553839224
commit
f98b9ddf26
@ -42,7 +42,6 @@ Page({
|
||||
let code = '';
|
||||
wx.login({
|
||||
success: (res) => {
|
||||
console.log(res)
|
||||
code = res.code;
|
||||
},
|
||||
});
|
||||
@ -59,7 +58,6 @@ Page({
|
||||
rawData: res.rawData,
|
||||
signature: res.signature
|
||||
};
|
||||
console.log(loginParams);
|
||||
that.postLogin(loginParams);
|
||||
},
|
||||
// 失败回调
|
||||
@ -73,14 +71,12 @@ Page({
|
||||
util.request(api.AuthLoginByWeixin, {
|
||||
info: info
|
||||
}, 'POST').then(function (res) {
|
||||
console.log(res);
|
||||
if (res.errno === 0) {
|
||||
wx.setStorageSync('userInfo', res.data.userInfo);
|
||||
wx.setStorageSync('token', res.data.token);
|
||||
app.globalData.userInfo = res.data.userInfo;
|
||||
app.globalData.token = res.data.token;
|
||||
let is_new = res.data.is_new; //服务器返回的数据;
|
||||
console.log(is_new);
|
||||
if (is_new == 0) {
|
||||
util.showErrorToast('您已经是老用户啦!');
|
||||
wx.navigateBack();
|
||||
|
||||
@ -18,8 +18,11 @@ Page({
|
||||
imgurl: '',
|
||||
sysHeight: 0,
|
||||
loading: 0,
|
||||
autoplay:true,
|
||||
showContact:1,
|
||||
autoplay: true,
|
||||
showContact: 1,
|
||||
},
|
||||
onLoad: function (options) {
|
||||
this.getChannelShowInfo();
|
||||
},
|
||||
onPageScroll: function (e) {
|
||||
let scrollTop = e.scrollTop;
|
||||
@ -34,9 +37,9 @@ Page({
|
||||
})
|
||||
}
|
||||
},
|
||||
onHide:function(){
|
||||
onHide: function () {
|
||||
this.setData({
|
||||
autoplay:false
|
||||
autoplay: false
|
||||
})
|
||||
},
|
||||
goSearch: function () {
|
||||
@ -93,9 +96,7 @@ Page({
|
||||
}
|
||||
});
|
||||
},
|
||||
onLoad: function (options) {
|
||||
this.getChannelShowInfo();
|
||||
},
|
||||
|
||||
onShow: function () {
|
||||
this.getIndexData();
|
||||
var that = this;
|
||||
@ -109,7 +110,7 @@ Page({
|
||||
let sysHeight = info.windowHeight - 100;
|
||||
this.setData({
|
||||
sysHeight: sysHeight,
|
||||
autoplay:true
|
||||
autoplay: true
|
||||
});
|
||||
wx.removeStorageSync('categoryId');
|
||||
},
|
||||
|
||||
@ -27,13 +27,11 @@ Page({
|
||||
wx.requestSubscribeMessage({
|
||||
tmplIds: ['w6AMCJ0FI2LqjCjWPIrpnVWTsFgnlNlmCf9TTDmG6_U'],
|
||||
success(res) {
|
||||
console.log(res);
|
||||
wx.switchTab({
|
||||
url: '/pages/index/index'
|
||||
});
|
||||
},
|
||||
fail(err) {
|
||||
console.log(err);
|
||||
wx.switchTab({
|
||||
url: '/pages/index/index'
|
||||
});
|
||||
|
||||
@ -98,11 +98,8 @@ Page({
|
||||
getSettingsDetail() {
|
||||
let that = this;
|
||||
util.request(api.SettingsDetail).then(function (res) {
|
||||
console.log(res)
|
||||
if (res.errno === 0) {
|
||||
let userInfo = res.data;
|
||||
console.log('userInfo')
|
||||
console.log(userInfo)
|
||||
// wx.setStorageSync('userInfo', userInfo);
|
||||
that.setData({
|
||||
userInfo: userInfo,
|
||||
|
||||
@ -29,10 +29,8 @@ Page({
|
||||
if (res.statusCode == 200) {
|
||||
let re = res.data
|
||||
let echo = JSON.parse(re);
|
||||
console.log(echo);
|
||||
let data = echo.data;
|
||||
let avatarUrl = data.fileUrl
|
||||
console.log(avatarUrl)
|
||||
that.setData({
|
||||
avatarUrl: avatarUrl,
|
||||
hasAvatar: 1
|
||||
@ -100,7 +98,6 @@ Page({
|
||||
util.showErrorToast('请输入昵称');
|
||||
return false;
|
||||
}
|
||||
console.log(avatar)
|
||||
util.request(api.SaveSettings, {
|
||||
name: name,
|
||||
mobile: mobile,
|
||||
|
||||
@ -5,15 +5,15 @@
|
||||
<view class='edit-container'>
|
||||
<view class="a-item">
|
||||
<image class="icon" src="/images/icon/nick.png"></image>
|
||||
<input type="nickname" class="a-input" bindblur="bindinputNickName" value="{{nickName}}" placeholder="请输入昵称" />
|
||||
<input type="nickname" class="a-input" bindinput="bindinputNickName" bindblur="bindinputNickName" value="{{nickName}}" placeholder="请输入昵称" />
|
||||
</view>
|
||||
<view class="a-item">
|
||||
<image class="icon" src="/images/icon/receiver.png"></image>
|
||||
<input class='a-input' bindblur="bindinputName" placeholder='请输入姓名' value="{{name}}"></input>
|
||||
<input class='a-input' bindinput="bindinputName" bindblur="bindinputName" placeholder='请输入姓名' value="{{name}}"></input>
|
||||
</view>
|
||||
<view class="a-item">
|
||||
<image class="icon" src="/images/icon/mobile.png"></image>
|
||||
<input class='a-input' bindblur="mobilechange" value="{{mobile}}" placeholder='请输入手机'></input>
|
||||
<input class='a-input' bindinput="mobilechange" bindblur="mobilechange" value="{{mobile}}" placeholder='请输入手机'></input>
|
||||
</view>
|
||||
</view>
|
||||
<view class='wrap-btn'>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user