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', }) } } }) } } }, });