xzdl.vue 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  1. <template>
  2. <view class="content">
  3. <view class="flex item" v-if="type == 1" v-for="item in navList" @click="navto('/pages/user/yjzz?type=' + item.type)" >
  4. <image :src="item.img" mode="" class="logo"></image>
  5. <view class="name">
  6. {{item.name}}
  7. </view>
  8. <view class="" class="tit">
  9. 去转账
  10. </view>
  11. <image src="../../static/img/back.png" mode="" class="go"></image>
  12. </view>
  13. <view class="flex item" v-if="type == 2" v-for="item in navListt" @click="navto('/pages/user/yjzye?type=' + item.type)" >
  14. <image :src="item.img" mode="" class="logo"></image>
  15. <view class="name">
  16. {{item.name}}
  17. </view>
  18. <view class="" class="tit">
  19. 去兑换
  20. </view>
  21. <image src="../../static/img/back.png" mode="" class="go"></image>
  22. </view>
  23. </view>
  24. </template>
  25. <script>
  26. export default {
  27. data() {
  28. return {
  29. type: 1,
  30. navList: [
  31. {
  32. name: '佣金转账',
  33. type: 0,
  34. img: '../../static/icon/yjz.png',
  35. },
  36. {
  37. name: '消费积分转账',
  38. type: 1,
  39. img: '../../static/icon/xc1.png',
  40. }
  41. ],
  42. navListt: [
  43. {
  44. name: '佣金兑换消费积分',
  45. type: 1,
  46. img: '../../static/icon/yzy.png',
  47. },
  48. {
  49. name: '佣金兑换复投积分',
  50. type: 2,
  51. img: '../../static/icon/yzft.png',
  52. },
  53. {
  54. name: '佣金兑换通证',
  55. type: 3,
  56. img: '../../static/icon/task2.png',
  57. }
  58. ]
  59. }
  60. },
  61. onLoad(opt) {
  62. if(opt.type) {
  63. this.type = opt.type
  64. if(this.type == 2) {
  65. uni.setNavigationBarTitle({
  66. title:'兑换'
  67. })
  68. }
  69. }
  70. },
  71. onShow() {
  72. },
  73. onReachBottom() {
  74. },
  75. onReady() {
  76. },
  77. methods: {
  78. navto(url) {
  79. uni.navigateTo({
  80. url,
  81. fail() {
  82. uni.switchTab({
  83. url
  84. })
  85. }
  86. })
  87. },
  88. }
  89. }
  90. </script>
  91. <style lang="scss">
  92. .item {
  93. width: 710rpx;
  94. height: 110rpx;
  95. background: #FFFFFF;
  96. box-shadow: 0rpx 0rpx 20rpx 0rpx rgba(50,50,52,0.06);
  97. border-radius: 15rpx;
  98. font-size: 30rpx;
  99. font-weight: 500;
  100. color: #333333;
  101. margin:20rpx auto;
  102. padding: 0 30rpx;
  103. .logo {
  104. width: 40rpx;
  105. height: 40rpx;
  106. }
  107. .name {
  108. margin-left: 18rpx;
  109. flex-grow: 1;
  110. }
  111. .tit {
  112. font-size: 26rpx;
  113. font-weight: 500;
  114. color: #999999;
  115. }
  116. .go {
  117. margin-left: 18rpx;
  118. width: 15rpx;
  119. height: 25rpx;
  120. }
  121. }
  122. </style>