upgrade.vue 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140
  1. <template>
  2. <view class="content">
  3. <view class="user-info flex">
  4. <image src="" mode="" class="user-img"></image>
  5. <view class="user-name">{{ userInfo.nickname }}</view>
  6. <!-- <view class="tit">尚未升级黑钻会员</view> -->
  7. </view>
  8. <view class="up-box">
  9. <view class="up" v-for="(item, index) in list">
  10. <image src="../../static/img/upone.png" mode="" class="bg"></image>
  11. <view class="up-price">
  12. <text class="inconn">¥</text>
  13. <text>{{item.money}}</text>
  14. </view>
  15. <image src="../../static/img/uonow.png" mode="" class="uplevel" @click="navto(item.id)"></image>
  16. </view>
  17. </view>
  18. </view>
  19. </template>
  20. <script>
  21. import { activityList } from '@/api/active.js';
  22. import { mapState, mapMutations } from 'vuex';
  23. export default {
  24. data() {
  25. return {
  26. list: ''
  27. };
  28. },
  29. computed: {
  30. ...mapState('user', ['userInfo', 'orderInfo', 'hasLogin'])
  31. },
  32. onShow() {
  33. this.loadData();
  34. },
  35. methods: {
  36. navto(id) {
  37. if(!this.userInfo.bank_card_no && !this.userInfo.bank_of_deposit){
  38. console.log(this.userInfo,"11111")
  39. uni.showModal({
  40. title: '提示',
  41. content: '您当前未填写银行卡信息和所属银行是否前往填写',
  42. success: function (res) {
  43. if (res.confirm) {
  44. uni.navigateTo({
  45. url:'/pages/set/userinfo'
  46. })
  47. } else if (res.cancel) {
  48. console.log('用户点击取消');
  49. }
  50. }
  51. });
  52. }else {
  53. uni.navigateTo({
  54. url:'/pages/index/info?id='+ id
  55. });
  56. }
  57. },
  58. loadData(){
  59. activityList({}).then(({data}) =>{
  60. this.list = data.list
  61. })
  62. }
  63. }
  64. };
  65. </script>
  66. <style lang="scss" scoped>
  67. .user-info {
  68. flex-direction: column;
  69. align-items: center;
  70. text-align: center;
  71. padding-top: 20rpx;
  72. .user-img {
  73. width: 120rpx;
  74. height: 120rpx;
  75. border-radius: 50%;
  76. background-color: #eee;
  77. }
  78. .user-name {
  79. margin-top: 20rpx;
  80. width: 240rpx;
  81. font-size: 32rpx;
  82. font-family: PingFang SC;
  83. font-weight: bold;
  84. color: #ffffff;
  85. }
  86. .tit {
  87. padding-top: 8rpx;
  88. font-size: 24rpx;
  89. font-family: PingFang SC;
  90. font-weight: 400;
  91. color: #999999;
  92. }
  93. }
  94. .up-box {
  95. padding: 30rpx 0 100rpx 0;
  96. .up {
  97. width: 690rpx;
  98. height: 892rpx;
  99. position: relative;
  100. margin: 0 auto 34rpx;
  101. .bg {
  102. width: 690rpx;
  103. height: 892rpx;
  104. position: absolute;
  105. }
  106. .up-price {
  107. font-size: 116rpx;
  108. display: inline-block;
  109. font-family: Source Han Sans CN;
  110. font-weight: 800;
  111. color: #c63535;
  112. position: absolute;
  113. top: 250rpx;
  114. right: 0;
  115. left: 0;
  116. margin: auto;
  117. display: flex;
  118. justify-content: center;
  119. .inconn {
  120. font-size: 36rpx;
  121. font-family: Source Han Sans CN;
  122. font-weight: bold;
  123. color: #c63535;
  124. padding-top: 25rpx;
  125. }
  126. }
  127. .uplevel {
  128. width: 307rpx;
  129. height: 80rpx;
  130. position: absolute;
  131. bottom: 118rpx;
  132. right: 0;
  133. left: 0;
  134. margin: auto;
  135. }
  136. }
  137. }
  138. </style>