setting.vue 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  1. <template>
  2. <view class="setting">
  3. <custom-nav :title="pageTitle"></custom-nav>
  4. <!-- <tel-verify v-if="showVerify" :changeTel="true"></tel-verify> -->
  5. <!-- <custom-toast ref='toast'></custom-toast> -->
  6. <view class="content">
  7. <image @tap="tosignup" :src="userServerInfo.banner_3" mode="scaleToFill"></image>
  8. <view class="list">
  9. <navigator url="../help/help">
  10. <view class="item solid-bottom">帮助中心 <text class="cuIcon-right"></text></view>
  11. </navigator>
  12. <!-- <view class="item solid-bottom" @tap="toaddress">地址管理 <text class="cuIcon-right"></text></view> -->
  13. <!-- <view class="item solid-bottom" @tap="show" v-if="userServerInfo.type === 1">更换手机 <text class="cuIcon-right"></text></view> -->
  14. </view>
  15. </view>
  16. </view>
  17. </template>
  18. <script>
  19. import telVerify from '../../components/tel-verify.vue'
  20. export default {
  21. components: {
  22. telVerify
  23. },
  24. data() {
  25. return {
  26. pageTitle: '设置'
  27. };
  28. },
  29. computed: {
  30. // showVerify () {
  31. // return this.$store.state.showVerify
  32. // },
  33. userServerInfo () {
  34. return this.$store.state.userServerInfo
  35. }
  36. },
  37. methods: {
  38. tosignup () {
  39. if (this.$verified()) {
  40. if (this.userServerInfo.type === 1 && this.userServerInfo.status === 1) { //只有普通用户才可以通过banner图进入报名页面
  41. if (this.userServerInfo.signuped) {
  42. this.$refs.toast.hover('您已经报名参赛')
  43. } else {
  44. uni.navigateTo({ url: '../signup/signup' })
  45. }
  46. }
  47. } else {
  48. // this.$store.commit('SHOWVERIFY')
  49. uni.navigateTo({ url: '../boundPhone/boundPhone' })
  50. }
  51. },
  52. toaddress () {
  53. if (this.$verified()) { //客服不可以管理地址
  54. if (this.userServerInfo.type === 1 || this.userServerInfo.type === 2) {
  55. uni.navigateTo({
  56. url: '../address/address'
  57. })
  58. }
  59. } else {
  60. // this.$store.commit('SHOWVERIFY')
  61. uni.navigateTo({ url: '../boundPhone/boundPhone' })
  62. }
  63. },
  64. show () {
  65. // this.$store.commit('SHOWVERIFY')
  66. uni.navigateTo({ url: '../boundPhone/boundPhone' })
  67. }
  68. },
  69. created () { //加载完成后开启监听全局 MESSAGE 事件
  70. uni.$on('MESSAGE', (m, d, p) => { //m 要提示的文字信息 d 文字信息出现的时常 p 文字信息出现的位置
  71. this.$refs.toast.hover(m, d, p)
  72. })
  73. },
  74. beforeDestroy() { //离开页面之前关闭手机验证弹框
  75. // this.$store.commit('HIDEVERIFY')
  76. }
  77. }
  78. </script>
  79. <style lang="scss" scoped>
  80. .setting {
  81. @include page();
  82. .content {
  83. background: $custom-nav-borderbot-color;
  84. image {
  85. width: 100%;
  86. height: 302rpx;
  87. display: block;
  88. }
  89. .list {
  90. margin-top: 8rpx;
  91. .item {
  92. height: 98rpx;
  93. background: #FFFFFF;
  94. display: flex;
  95. justify-content: space-between;
  96. align-items: center;
  97. font-size: 32rpx;
  98. padding: 0 50rpx;
  99. color: rgba(42, 42, 42, 1);
  100. .cuIcon-right {
  101. color: #2A2A2A;
  102. font-size: 38rpx;
  103. }
  104. }
  105. }
  106. }
  107. }
  108. </style>