|
@@ -28,7 +28,12 @@ Page({
|
|
|
img: '../../images/icon5.jpg',
|
|
|
url: '/pages/share/share'
|
|
|
}
|
|
|
- ]
|
|
|
+ ],
|
|
|
+ userInfo: '',
|
|
|
+ ysf: {
|
|
|
+ title: '注册页',
|
|
|
+ config: ''
|
|
|
+ }
|
|
|
},
|
|
|
goTab(e) {
|
|
|
console.log(e.currentTarget.dataset.index)
|
|
@@ -120,6 +125,7 @@ Page({
|
|
|
tool.isLogin().then(res => {
|
|
|
console.log(res)
|
|
|
this.setData({
|
|
|
+ userInfo: JSON.parse(res.rawData),
|
|
|
avatarUrl: res.userInfo.avatarUrl,
|
|
|
nick: res.userInfo.nickName,
|
|
|
loginStatus: true
|
|
@@ -130,6 +136,57 @@ Page({
|
|
|
})
|
|
|
})
|
|
|
},
|
|
|
+ getInfos2() {
|
|
|
+ wx.request({
|
|
|
+ url: app.globalData.publicUrl + '/wx/member/' + this.data.openid + '/info',
|
|
|
+ method: "get",
|
|
|
+ success: (res) => {
|
|
|
+ if (res.data.code == 0) {
|
|
|
+ let config='ysf.config';
|
|
|
+ let sex1 = '';
|
|
|
+ if(res.data.info.sex==0){
|
|
|
+ sex1='女'
|
|
|
+ }else{
|
|
|
+ sex1='男'
|
|
|
+ }
|
|
|
+ console.log(sex1)
|
|
|
+ this.setData({
|
|
|
+ myInfo: res.data.info,
|
|
|
+ [config]:JSON.stringify({
|
|
|
+ "uid": res.data.id, // 用户唯一标识
|
|
|
+ "level": 1, // vip等级
|
|
|
+ "data": JSON.stringify([{
|
|
|
+ "index": 0,
|
|
|
+ "key": "name",
|
|
|
+ "label": "姓名",
|
|
|
+ "value": res.data.info.name
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "index": 1,
|
|
|
+ "key": "createTime",
|
|
|
+ "label": "创建时间",
|
|
|
+ "value": res.data.info.createTime
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "index": 2,
|
|
|
+ "key": "sex",
|
|
|
+ "label": "性别",
|
|
|
+ "value": sex1
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "index": 3,
|
|
|
+ "key": "tel",
|
|
|
+ "label": "电话",
|
|
|
+ "value": res.data.info.tel
|
|
|
+ }
|
|
|
+ ])
|
|
|
+ })
|
|
|
+ })
|
|
|
+ console.log(this.data.ysf.config)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
async onShow() {
|
|
|
tool.openidStatus().then(result => {
|
|
|
this.setData({
|
|
@@ -137,6 +194,7 @@ Page({
|
|
|
sessionkey: result[1]
|
|
|
})
|
|
|
this.getInfos();
|
|
|
+ this.getInfos2();
|
|
|
this.getTimes();
|
|
|
})
|
|
|
}
|