import create from '../../../utils/create' import signUp from '../../../utils/signup' const app = getApp(); create({ behaviors: [], properties: {}, data: { userInfo: {}, sumData: [], UserSetList: [{ id: 'main', value: '个人资料', icon: '/assets/images/icon16.png', router: '', showSum: false }, { id: 'activity', value: '我报名的活动', icon: '/assets/images/icon17.png', router: '', showSum: true }, { id: 'appointment', value: '预约记录', icon: '/assets/images/icon18.png', router: '', showSum: true }, { id: 'collectionBuilding', value: '收藏的楼盘', icon: '/assets/images/icon19.png', router: '', showSum: true }, { value: '购房工具', icon: '/assets/images/icon21.png', router: '', showSum: false }, { value: '电话咨询', icon: '/assets/images/icon22.png', router: '', showSum: false }] }, methods: { checkUserLogin() { if (!this.data.userInfo.hasReg) { wx.showToast({ title: '请先登陆再进行操作', icon: 'none', }) return false } return true }, ListTap(e) { // 用户选项点击事件 if (e.target.dataset.type === 0) { // 个人资料 if (!this.checkUserLogin()) { return } wx.navigateTo({ url: '/pages/UserCenter/UserInfo/index' }) } else if (e.target.dataset.type === 1) { // 我的福利社 if (!this.checkUserLogin()) { return } wx.navigateTo({ url: '/pages/MyWelfare/index' }) } else if (e.target.dataset.type === 2) { // 预约记录 if (!this.checkUserLogin()) { return } wx.navigateTo({ url: '/pages/AppointmentHistory/index' }) } else if (e.target.dataset.type === 3) { // 收藏的楼盘 if (!this.checkUserLogin()) { return } wx.navigateTo({ url: '/pages/MyCollectEstateList/index' }) } // else if (e.target.dataset.type === 4) { // 楼盘展示 // this.triggerEvent('myevent', { // index: 1 // }) // } else if (e.target.dataset.type === 4) { // 购房工具 wx.navigateTo({ url: '/pages/SelfServiceTool/index' }) } else if (e.target.dataset.type === 5) { // 电话咨询 wx.makePhoneCall({ phoneNumber: '025-86505555' }) } }, signup(e) { signUp(e.detail.userInfo, app).then((dt) => { wx.showToast({ title: '注册成功', icon: 'success', }) }) } } })