set.js 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. // pages/set/set.js
  2. const app = getApp()
  3. Page({
  4. /**
  5. * 页面的初始数据
  6. */
  7. data: {
  8. bindPhone: ''
  9. },
  10. /**
  11. * 生命周期函数--监听页面加载
  12. */
  13. onLoad(options) {
  14. this.setData({
  15. bindPhone: app.globalData.userInfo.phoneNumber
  16. })
  17. },
  18. /**
  19. * 联系我们
  20. */
  21. handleLinkus() {
  22. wx.showModal({
  23. content: '感谢您选择ITT,如你有疑问,欢迎您拨打打电话:400-,我们的客服人员在早上9点到晚上18点都会在线为您服务',
  24. confirmColor: '#333',
  25. showCancel: false
  26. })
  27. },
  28. handleLogout () {
  29. wx.showModal({
  30. content: '确认退出吗?',
  31. confirmColor: '#333',
  32. cancelColor: '#666',
  33. success (res) {
  34. if (res.confirm) {
  35. wx.exitMiniProgram({
  36. success () {
  37. wx.clearStorageSync()
  38. app.globalData.accessToken = ''
  39. app.globalData.userInfo.login = false
  40. app.globalData.userInfo.userName = ''
  41. app.globalData.userInfo.phoneNumber = ''
  42. app.globalData.userInfo.headImg = ''
  43. }
  44. })
  45. }
  46. }
  47. })
  48. }
  49. })