setting.js
854 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
Component({
data: {
userInfo: {
username: '明我智会'
}
},
props: {},
didMount() {
if (dd.getStorageSync({ key: 'userInfo' }).data) {
this.setData({
userInfo: dd.getStorageSync({ key: 'userInfo' }).data
});
}
if (getApp().globalData.userInfo) {
this.setData({
userInfo: JSON.parse(getApp().globalData.userInfo)
});
}
},
didUpdate() {
},
didUnmount() { },
methods: {
contact() {
dd.confirm({
content: '尊敬的用户,您点击“确定”即可进入专属服务群咨询相关产品问题。',
confirmButtonText: '确定',
cancelButtonText: '取消',
success: (res) => {
if (res.confirm) {
console.log('点击了确定')
}
this.props.onClose();
}
})
}
}
});