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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
| import {
| loginInfo
| } from '../../../../assets/js/login';
|
| const AuthStepType = {
| ONE: 1,
| TWO: 2,
| THREE: 3,
| };
|
| const app = getApp()
|
| Component({
| options: {
| multipleSlots: true,
| },
| properties: {
| currAuthStep: {
| type: Number,
| value: AuthStepType.ONE,
| },
| userInfo: {
| type: Object,
| value: {},
| },
| isNeedGetUserInfo: {
| type: Boolean,
| value: false,
| },
| },
| data: {
| defaultAvatarUrl: 'https://cdn-we-retail.ym.tencent.com/miniapp/usercenter/icon-user-center-avatar@2x.png',
| AuthStepType,
| count: 0, //模拟退出,
| },
| methods: {
| gotoUserEditPage() {
| this.triggerEvent('gotoUserEditPage');
| },
| editUserType() {
| this.triggerEvent('editUserType');
| },
| cilckFive() {
| this.data.count += 1
| if (this.data.count >= 5) {
| wx.clearStorageSync()
| wx.showModal({
| title: '已清空,请点击登录',
| content: '',
| complete: (res) => {
| if (res.confirm) {
| loginInfo(app, (data) => {
| if (data) {
| this.setData({
| count: 0
| })
| return false
| }
| })
| } else {
| wx.switchTab({
| url: '/pages/home/home',
| })
| }
| }
| })
| }
| }
| },
| });
|
|