yuyuechang.vue 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164
  1. <template>
  2. <view class="content">
  3. <!-- <view class="changci-top flex">
  4. <view class="djs-wrap flex">
  5. 倒计时:
  6. <uni-countdown
  7. color="#C6914E"
  8. background-color="#F6EFDF"
  9. :show-day="false"
  10. :day="0"
  11. :hour="0"
  12. :minute="0"
  13. :second="0"
  14. ></uni-countdown>
  15. </view>
  16. <view class="user-info">
  17. <view class="" style="text-align: right;">
  18. 消费账户:{{userInfo.now_money*1 || '0'}}
  19. </view>
  20. <view class="" style="text-align: right;">
  21. 广告值: {{userInfo.aid_val*1 || '0'}}
  22. </view>
  23. </view>
  24. </view> -->
  25. <view class="" v-for="item in area">
  26. <view class="good-tit flex" >
  27. <view class="tit-left flex">
  28. <image src="../../static/icon/red-tit.png" mode=""></image>{{item.name}}
  29. </view>
  30. <view class="tit-right">
  31. 实付金额:{{item.low}} ~ {{ item.high }}
  32. </view>
  33. </view>
  34. <view class="good-list flex" @click="goumai(item)">
  35. <image src="../../static/icon/red-gift.png" mode="widthFix" v-for="itemg in 35"></image>
  36. </view>
  37. </view>
  38. <uni-popup ref="popupyyok" type="center">
  39. <view class="popupyyok-wrap">
  40. <image :src="good.image" mode="widthFix"></image>
  41. <view class="clamp2" style="padding: 20rpx 80rpx;color: #999999;font-size: 26rpx;">
  42. {{good.name}}
  43. </view>
  44. <view class="" style="font-size: 35rpx;font-weight: bold;color: #333333;">
  45. {{good.price}}
  46. </view>
  47. <view class="btn" @click="zhifu">
  48. 立即支付
  49. </view>
  50. </view>
  51. </uni-popup >
  52. </view>
  53. </template>
  54. <script>
  55. import { section, purchase } from '@/api/index.js'
  56. import uniCountdown from '@/components/uni-countdown/uni-countdown.vue';
  57. import { mapState, mapMutations } from 'vuex';
  58. export default {
  59. components: {
  60. uniCountdown
  61. },
  62. data() {
  63. return {
  64. ccid: '',
  65. area: [],
  66. good: {}
  67. }
  68. },
  69. computed: {
  70. ...mapState('user',['userInfo'])
  71. },
  72. onLoad(opt) {
  73. this.ccid = opt.id
  74. this.section()
  75. },
  76. methods: {
  77. section() {
  78. let obj = this
  79. section({
  80. id: obj.ccid
  81. }).then(res => {
  82. console.log(res)
  83. obj.area = res.data
  84. })
  85. },
  86. goumai(item) {
  87. let obj = this
  88. purchase({
  89. id: obj.ccid,
  90. s_id: item.id
  91. }).then(res => {
  92. console.log(res)
  93. obj.good = res.data
  94. obj.$refs.popupyyok.open()
  95. })
  96. },
  97. zhifu() {
  98. uni.navigateTo({
  99. url: ''
  100. })
  101. }
  102. }
  103. }
  104. </script>
  105. <style lang="scss" scoped>
  106. .changci-top {
  107. background-color: #fff;
  108. padding:0 25rpx;
  109. height: 100rpx;
  110. .djs-wrap {
  111. padding-left: 25rpx;
  112. }
  113. }
  114. .good-tit {
  115. // margin-top: 20rpx;
  116. background-color: #fff;
  117. padding: 20rpx;
  118. .tit-left {
  119. flex-shrink: 0;
  120. image {
  121. height: 36rpx;
  122. width: 36rpx;
  123. border-radius: 50%;
  124. margin-right: 10rpx;
  125. }
  126. }
  127. .tit-right {
  128. text-align: right;
  129. }
  130. }
  131. .good-list {
  132. flex-wrap: wrap;
  133. background-color: #fff;
  134. padding: 20rpx;
  135. // justify-content: flex-start;
  136. image {
  137. width: 80rpx;
  138. margin-left: 15rpx;
  139. }
  140. }
  141. .popupyyok-wrap {
  142. height: 707rpx;
  143. width: 551rpx;
  144. background-color: #fff;
  145. border-radius: 20rpx;
  146. text-align: center;
  147. image {
  148. width: 100%;
  149. }
  150. .btn {
  151. width: 295rpx;
  152. line-height: 69rpx;
  153. border-radius: 34rpx;
  154. background: #303030;
  155. color: #F8DABA;
  156. font-size: 35rpx;
  157. color: #F8DABA;
  158. margin: auto;
  159. }
  160. }
  161. </style>