mine_data.js 945 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. // pages/mine_data/mine_data.js
  2. Page({
  3. /**
  4. * 页面的初始数据
  5. */
  6. data: {
  7. setting: '',//区域配置信息
  8. userState: '',//用户信息
  9. },
  10. onLoad: function (options) {
  11. let setting = my.getStorageSync({'key':'setting'}).data
  12. let userState = my.getStorageSync({'key':'userState'}).data
  13. this.setData({
  14. setting: setting,
  15. userState: userState
  16. })
  17. },
  18. onReady: function () {
  19. },
  20. onShow: function () {
  21. },
  22. onHide: function () {
  23. },
  24. onUnload: function () {
  25. },
  26. onPullDownRefresh: function () {
  27. },
  28. onReachBottom: function () {
  29. },
  30. onShareAppMessage: function () {
  31. },
  32. myAccount: function () {
  33. my.navigateTo({
  34. url: '/pages/my_account/my_account',
  35. })
  36. },
  37. realName: function () {
  38. if (this.data.userState.is_card_certified == 1) {
  39. return;
  40. } else {
  41. my.navigateTo({
  42. url: '/pages/real_name/real_name',
  43. })
  44. }
  45. }
  46. })