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