set.js 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  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: wx.getStorageSync('phoneNumber')
  16. })
  17. },
  18. /**
  19. * 联系我们
  20. */
  21. handleLinkus() {
  22. wx.showModal({
  23. content: '感谢您选择ITT,如您有疑问,欢迎您在公众号【ITT健康扫描】直接留言,我们的客服人员在9:00-18:00在线为您服务',
  24. confirmColor: '#333',
  25. showCancel: false
  26. })
  27. },
  28. handleUserArgee () {
  29. wx.navigateTo({
  30. url: '/pages/userAgreement/userAgreement',
  31. })
  32. },
  33. handleLogout () {
  34. wx.showModal({
  35. content: '确认退出吗?',
  36. confirmColor: '#333',
  37. cancelColor: '#666',
  38. success (res) {
  39. if (res.confirm) {
  40. wx.exitMiniProgram({
  41. success () {
  42. wx.clearStorageSync()
  43. app.globalData.accessToken = ''
  44. app.globalData.userInfo.login = false
  45. app.globalData.userInfo.userName = ''
  46. app.globalData.userInfo.phoneNumber = ''
  47. app.globalData.userInfo.headImg = ''
  48. }
  49. })
  50. }
  51. }
  52. })
  53. },
  54. handleAboutus () {
  55. wx.navigateTo({
  56. url: '/pages/aboutUs/aboutUs',
  57. })
  58. }
  59. })