|
@@ -55,15 +55,16 @@ Page({
|
|
|
graduationDate: ''
|
|
|
},
|
|
|
|
|
|
- isDev: true //开发环境隐藏"编辑资料"页面的部分数据项
|
|
|
+ isDev: true, //开发环境隐藏"编辑资料"页面的部分数据项
|
|
|
+ formKey: []
|
|
|
},
|
|
|
/**
|
|
|
* 防止穿透
|
|
|
*/
|
|
|
- preventTouchMove() {},
|
|
|
+ preventTouchMove() { },
|
|
|
|
|
|
//绑定选择器滑动事件 地区
|
|
|
- MultiPickerAreaChange: function(e) {
|
|
|
+ MultiPickerAreaChange: function (e) {
|
|
|
this.data.load = false;
|
|
|
let _this = this;
|
|
|
if (e.detail.column === 0) {
|
|
@@ -79,7 +80,7 @@ Page({
|
|
|
},
|
|
|
|
|
|
//点击完成修改后 地区
|
|
|
- PickerAreaChange: function(e) {
|
|
|
+ PickerAreaChange: function (e) {
|
|
|
this.data.load = false;
|
|
|
let _this = this;
|
|
|
_this.data.multiIndex[0] = e.detail.value[0]
|
|
@@ -93,7 +94,7 @@ Page({
|
|
|
},
|
|
|
|
|
|
// 学校选择事件
|
|
|
- bindSchChange: function(e) {
|
|
|
+ bindSchChange: function (e) {
|
|
|
this.data.load = false;
|
|
|
this.setData({
|
|
|
schIndex: e.detail.value
|
|
@@ -106,7 +107,7 @@ Page({
|
|
|
/**
|
|
|
* 年级 完成
|
|
|
*/
|
|
|
- pickerSchChange: function(e) {
|
|
|
+ pickerSchChange: function (e) {
|
|
|
this.data.load = false;
|
|
|
this.data.gradeIndex[0] = e.detail.value[0]
|
|
|
this.data.gradeIndex[1] = e.detail.value[1]
|
|
@@ -124,7 +125,7 @@ Page({
|
|
|
/**
|
|
|
* 体重滑轨完成
|
|
|
*/
|
|
|
- bindWeightChange: function(e) {
|
|
|
+ bindWeightChange: function (e) {
|
|
|
this.data.load = false;
|
|
|
this.setData({
|
|
|
weightIndex: e.detail.value
|
|
@@ -139,7 +140,7 @@ Page({
|
|
|
/**
|
|
|
* 年级滑轨后
|
|
|
*/
|
|
|
- MultiPickerSchChange: function(e) {
|
|
|
+ MultiPickerSchChange: function (e) {
|
|
|
this.data.load = false;
|
|
|
if (e.detail.column === 0) {
|
|
|
let pid = g1[e.detail.value].id;
|
|
@@ -159,7 +160,7 @@ Page({
|
|
|
/**
|
|
|
* 性别滑轨完成
|
|
|
*/
|
|
|
- bindSexChange: function(e) {
|
|
|
+ bindSexChange: function (e) {
|
|
|
this.setData({
|
|
|
sexIndex: e.detail.value
|
|
|
})
|
|
@@ -172,7 +173,7 @@ Page({
|
|
|
},
|
|
|
|
|
|
//生日
|
|
|
- bindTimeChange: function(e) {
|
|
|
+ bindTimeChange: function (e) {
|
|
|
if (e.detail.value) {
|
|
|
this.setData({
|
|
|
birthday: e.detail.value
|
|
@@ -181,7 +182,7 @@ Page({
|
|
|
}
|
|
|
},
|
|
|
//毕业时间
|
|
|
- bindTimeChange2: function(e) {
|
|
|
+ bindTimeChange2: function (e) {
|
|
|
if (e.detail.value) {
|
|
|
this.setData({
|
|
|
graduationDate: e.detail.value
|
|
@@ -192,7 +193,7 @@ Page({
|
|
|
},
|
|
|
|
|
|
//健康
|
|
|
- bindhisChange: function(e) {
|
|
|
+ bindhisChange: function (e) {
|
|
|
this.setData({
|
|
|
isHealthyIndex: e.detail.value
|
|
|
})
|
|
@@ -208,14 +209,14 @@ Page({
|
|
|
loadUser() {
|
|
|
// let uinfo = util.getUser();
|
|
|
// console.log(uinfo)
|
|
|
-
|
|
|
+
|
|
|
let _this = this;
|
|
|
let id = util.getUserId();
|
|
|
let parm = {
|
|
|
id
|
|
|
}
|
|
|
App._post_form('member/apiSelectMeberInfo', 'application/json', JSON.stringify(parm),
|
|
|
- function(res) {
|
|
|
+ function (res) {
|
|
|
if (res.code === 0) {
|
|
|
wx.setStorageSync("USER", res.member);
|
|
|
let uinfo = res.member;
|
|
@@ -231,7 +232,7 @@ Page({
|
|
|
['allData.rank']: uinfo.rank,
|
|
|
['allData.grade']: uinfo.grade,
|
|
|
graduationDate: uinfo.graduationDate,
|
|
|
- ['allData.graduationDate']:uinfo.graduationDate
|
|
|
+ ['allData.graduationDate']: uinfo.graduationDate
|
|
|
})
|
|
|
}
|
|
|
})
|
|
@@ -356,10 +357,10 @@ Page({
|
|
|
const tempFilePaths = res.tempFilePaths
|
|
|
wx.uploadFile({
|
|
|
url: App.apiRoot + 'member/addPhoto/' + util
|
|
|
- .getUserId(),
|
|
|
+ .getUserId(),
|
|
|
filePath: tempFilePaths[0],
|
|
|
name: 'file',
|
|
|
- success: function(res) {
|
|
|
+ success: function (res) {
|
|
|
if (res.errMsg === "uploadFile:ok") {
|
|
|
wx.showToast({
|
|
|
title: '修改成功',
|
|
@@ -393,10 +394,10 @@ Page({
|
|
|
const tempFilePaths = res.tempFilePaths
|
|
|
wx.uploadFile({
|
|
|
url: App.apiRoot + 'member/addPhoto/' + util
|
|
|
- .getUserId(),
|
|
|
+ .getUserId(),
|
|
|
filePath: tempFilePaths[0],
|
|
|
name: 'file',
|
|
|
- success: function(res) {
|
|
|
+ success: function (res) {
|
|
|
if (res.errMsg === "uploadFile:ok") {
|
|
|
wx.showToast({
|
|
|
title: '修改成功',
|
|
@@ -416,9 +417,9 @@ Page({
|
|
|
image: '',
|
|
|
duration: 1500,
|
|
|
mask: false,
|
|
|
- success: (result) => {},
|
|
|
- fail: () => {},
|
|
|
- complete: () => {}
|
|
|
+ success: (result) => { },
|
|
|
+ fail: () => { },
|
|
|
+ complete: () => { }
|
|
|
});
|
|
|
}
|
|
|
})
|
|
@@ -426,7 +427,7 @@ Page({
|
|
|
})
|
|
|
}
|
|
|
},
|
|
|
- fail(res) {}
|
|
|
+ fail(res) { }
|
|
|
})
|
|
|
},
|
|
|
|
|
@@ -438,7 +439,7 @@ Page({
|
|
|
/**
|
|
|
* 性别
|
|
|
*/
|
|
|
- App._post_form('bizcatelog/apiSelectBizcatelog/gender', '', null, function(res) {
|
|
|
+ App._post_form('bizcatelog/apiSelectBizcatelog/gender', '', null, function (res) {
|
|
|
if (res.code === 0) {
|
|
|
let gender = res.dictList
|
|
|
let all = {
|
|
@@ -467,7 +468,7 @@ Page({
|
|
|
/**
|
|
|
* 体重
|
|
|
*/
|
|
|
- App._post_form('bizcatelog/apiSelectBizcatelog/WEIGHTTYPE', '', null, function(res) {
|
|
|
+ App._post_form('bizcatelog/apiSelectBizcatelog/WEIGHTTYPE', '', null, function (res) {
|
|
|
if (res.code === 0) {
|
|
|
let weight = res.dictList
|
|
|
let all = {
|
|
@@ -495,7 +496,7 @@ Page({
|
|
|
/**
|
|
|
* 健康证
|
|
|
*/
|
|
|
- App._post_form('bizcatelog/apiSelectBizcatelog/YF', '', null, function(res) {
|
|
|
+ App._post_form('bizcatelog/apiSelectBizcatelog/YF', '', null, function (res) {
|
|
|
if (res.code === 0) {
|
|
|
let healthy = res.dictList
|
|
|
if (_this.data.u.ishealth) {
|
|
@@ -518,7 +519,7 @@ Page({
|
|
|
|
|
|
|
|
|
/***空闲时间*/
|
|
|
- App._post_form('bizcatelog/apiSelectBizcatelog/FREETIME', '', null, function(res) {
|
|
|
+ App._post_form('bizcatelog/apiSelectBizcatelog/FREETIME', '', null, function (res) {
|
|
|
if (res.code === 0) {
|
|
|
let FREETIME = res.dictList
|
|
|
if (FREETIME.length) {
|
|
@@ -531,7 +532,7 @@ Page({
|
|
|
})
|
|
|
|
|
|
/*** 技能 */
|
|
|
- App._post_form('bizcatelog/apiSelectBizcatelog/skill', '', null, function(res) {
|
|
|
+ App._post_form('bizcatelog/apiSelectBizcatelog/skill', '', null, function (res) {
|
|
|
if (res.code === 0) {
|
|
|
let skill = res.dictList
|
|
|
if (skill.length) {
|
|
@@ -553,7 +554,7 @@ Page({
|
|
|
let _this = this;
|
|
|
let proId = '';
|
|
|
let prov = '';
|
|
|
- App._post_form('areainfo/province', '', null, function(res) {
|
|
|
+ App._post_form('areainfo/province', '', null, function (res) {
|
|
|
if (res.code === 0) {
|
|
|
let provice = res.list
|
|
|
_this.data.multiArray[0] = provice;
|
|
@@ -585,7 +586,7 @@ Page({
|
|
|
//获取市级
|
|
|
loadCity(cid) {
|
|
|
let _this = this;
|
|
|
- App._post_form('areainfo/city/' + cid, '', null, function(res) {
|
|
|
+ App._post_form('areainfo/city/' + cid, '', null, function (res) {
|
|
|
if (res.code === 0) {
|
|
|
let city = res.list;
|
|
|
_this.data.multiArray[1] = city;
|
|
@@ -621,7 +622,7 @@ Page({
|
|
|
//获取学校
|
|
|
loadSchool(cityId) {
|
|
|
let _this = this;
|
|
|
- App._post_form('areainfo/Schoolinfo/' + cityId, '', null, function(res) {
|
|
|
+ App._post_form('areainfo/Schoolinfo/' + cityId, '', null, function (res) {
|
|
|
if (res.code === 0) {
|
|
|
let school = []
|
|
|
if (res.dictList.length <= 0) {
|
|
@@ -661,7 +662,7 @@ Page({
|
|
|
id
|
|
|
}
|
|
|
App._post_form('member/apiSelectMeberInfo', 'application/json', JSON.stringify(parm),
|
|
|
- function(res) {
|
|
|
+ function (res) {
|
|
|
if (res.code === 0) {
|
|
|
wx.setStorageSync("USER", res.member);
|
|
|
_this.loadUser();
|
|
@@ -757,7 +758,7 @@ Page({
|
|
|
maskShow: false,
|
|
|
})
|
|
|
},
|
|
|
- checkboxChange: function(e) {
|
|
|
+ checkboxChange: function (e) {
|
|
|
this.data.checkboxValue = e.detail.value
|
|
|
},
|
|
|
|
|
@@ -817,10 +818,13 @@ Page({
|
|
|
}
|
|
|
|
|
|
},
|
|
|
+ btnCancel() {
|
|
|
+ wx.navigateBack();
|
|
|
+ },
|
|
|
/**
|
|
|
* 生命周期函数--监听页面加载
|
|
|
*/
|
|
|
- onLoad: function(options) {
|
|
|
+ onLoad: function (options) {
|
|
|
let _this = this;
|
|
|
if (Object.keys(options).length > 0) {
|
|
|
if (options.type === "no") {
|
|
@@ -834,14 +838,14 @@ Page({
|
|
|
if (util.UserLoginStatus()) {
|
|
|
_this.loadUser();
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
this.loadVipSel();
|
|
|
},
|
|
|
|
|
|
/**
|
|
|
* 生命周期函数--监听页面初次渲染完成
|
|
|
*/
|
|
|
- onReady: function() {
|
|
|
+ onReady: function () {
|
|
|
wx.setNavigationBarTitle({
|
|
|
title: '个人资料',
|
|
|
})
|
|
@@ -850,7 +854,7 @@ Page({
|
|
|
/**
|
|
|
* 生命周期函数--监听页面显示
|
|
|
*/
|
|
|
- onShow: function() {
|
|
|
+ onShow: function () {
|
|
|
this.data.load = true;
|
|
|
this.data.allData = {};
|
|
|
},
|
|
@@ -858,7 +862,7 @@ Page({
|
|
|
/**
|
|
|
* 生命周期函数--监听页面隐藏
|
|
|
*/
|
|
|
- onHide: function() {},
|
|
|
+ onHide: function () { },
|
|
|
|
|
|
btnUpUserInfo() {
|
|
|
let that = this;
|
|
@@ -890,7 +894,7 @@ Page({
|
|
|
wx.showModal({
|
|
|
title: '请注意',
|
|
|
content: '您已修改资料,是否保存?',
|
|
|
- success: function(res) {
|
|
|
+ success: function (res) {
|
|
|
if (res.confirm) {
|
|
|
that.updateUserInfo()
|
|
|
}
|
|
@@ -907,7 +911,7 @@ Page({
|
|
|
/**
|
|
|
* 生命周期函数--监听页面卸载
|
|
|
*/
|
|
|
- onUnload: function() {
|
|
|
+ onUnload: function () {
|
|
|
|
|
|
},
|
|
|
|
|
@@ -916,7 +920,7 @@ Page({
|
|
|
App._post_form('member/apiUpdateMeberInfo',
|
|
|
'application/json',
|
|
|
JSON.stringify(_this.data.allData),
|
|
|
- function(res) {
|
|
|
+ function (res) {
|
|
|
if (res.code === 0) {
|
|
|
// wx.showLoading({
|
|
|
// title: '保存中...',
|
|
@@ -926,7 +930,7 @@ Page({
|
|
|
title: '修改成功!',
|
|
|
icon: 'none'
|
|
|
})
|
|
|
- setTimeout(() =>{
|
|
|
+ setTimeout(() => {
|
|
|
_this.PushVipInfo();
|
|
|
if (_this.data.nolink === true) {
|
|
|
wx.switchTab({
|
|
@@ -937,7 +941,7 @@ Page({
|
|
|
delta: 1
|
|
|
})
|
|
|
}
|
|
|
- },2000)
|
|
|
+ }, 2000)
|
|
|
|
|
|
}
|
|
|
})
|
|
@@ -980,21 +984,21 @@ Page({
|
|
|
/**
|
|
|
* 页面相关事件处理函数--监听用户下拉动作
|
|
|
*/
|
|
|
- onPullDownRefresh: function() {
|
|
|
+ onPullDownRefresh: function () {
|
|
|
|
|
|
},
|
|
|
|
|
|
/**
|
|
|
* 页面上拉触底事件的处理函数
|
|
|
*/
|
|
|
- onReachBottom: function() {
|
|
|
+ onReachBottom: function () {
|
|
|
|
|
|
},
|
|
|
|
|
|
/**
|
|
|
* 用户点击右上角分享
|
|
|
*/
|
|
|
- onShareAppMessage: function() {
|
|
|
+ onShareAppMessage: function () {
|
|
|
|
|
|
},
|
|
|
schoolInput(e) {
|
|
@@ -1006,7 +1010,7 @@ Page({
|
|
|
let _this = this;
|
|
|
App._post_form('wgfillinfo/apiSelectwgfillinfo', 'application/json',
|
|
|
null,
|
|
|
- function(res) {
|
|
|
+ function (res) {
|
|
|
if (res.code === 0) {
|
|
|
_this.setData({
|
|
|
isDev: res.wgFillInfo.isDev
|