| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164 |
- <template>
- <view class="content">
- <!-- <view class="changci-top flex">
- <view class="djs-wrap flex">
- 倒计时:
- <uni-countdown
- color="#C6914E"
- background-color="#F6EFDF"
- :show-day="false"
- :day="0"
- :hour="0"
- :minute="0"
- :second="0"
- ></uni-countdown>
- </view>
- <view class="user-info">
- <view class="" style="text-align: right;">
- 消费账户:{{userInfo.now_money*1 || '0'}}
- </view>
- <view class="" style="text-align: right;">
- 广告值: {{userInfo.aid_val*1 || '0'}}
- </view>
- </view>
- </view> -->
- <view class="" v-for="item in area">
- <view class="good-tit flex" >
- <view class="tit-left flex">
- <image src="../../static/icon/red-tit.png" mode=""></image>{{item.name}}
- </view>
- <view class="tit-right">
- 实付金额:{{item.low}} ~ {{ item.high }}
- </view>
- </view>
- <view class="good-list flex" @click="goumai(item)">
- <image src="../../static/icon/red-gift.png" mode="widthFix" v-for="itemg in 35"></image>
- </view>
- </view>
- <uni-popup ref="popupyyok" type="center">
- <view class="popupyyok-wrap">
- <image :src="good.image" mode="widthFix"></image>
- <view class="clamp2" style="padding: 20rpx 80rpx;color: #999999;font-size: 26rpx;">
- {{good.name}}
- </view>
- <view class="" style="font-size: 35rpx;font-weight: bold;color: #333333;">
- {{good.price}}
- </view>
- <view class="btn" @click="zhifu">
- 立即支付
- </view>
- </view>
- </uni-popup >
- </view>
- </template>
- <script>
- import { section, purchase } from '@/api/index.js'
- import uniCountdown from '@/components/uni-countdown/uni-countdown.vue';
- import { mapState, mapMutations } from 'vuex';
- export default {
- components: {
- uniCountdown
- },
- data() {
- return {
- ccid: '',
- area: [],
- good: {}
- }
- },
- computed: {
- ...mapState('user',['userInfo'])
- },
- onLoad(opt) {
- this.ccid = opt.id
- this.section()
- },
- methods: {
- section() {
- let obj = this
- section({
- id: obj.ccid
- }).then(res => {
- console.log(res)
- obj.area = res.data
- })
- },
- goumai(item) {
- let obj = this
- purchase({
- id: obj.ccid,
- s_id: item.id
- }).then(res => {
- console.log(res)
- obj.good = res.data
- obj.$refs.popupyyok.open()
- })
- },
- zhifu() {
- uni.navigateTo({
- url: ''
- })
- }
- }
- }
- </script>
- <style lang="scss" scoped>
- .changci-top {
- background-color: #fff;
- padding:0 25rpx;
- height: 100rpx;
- .djs-wrap {
- padding-left: 25rpx;
- }
- }
- .good-tit {
- // margin-top: 20rpx;
- background-color: #fff;
- padding: 20rpx;
- .tit-left {
- flex-shrink: 0;
- image {
- height: 36rpx;
- width: 36rpx;
- border-radius: 50%;
- margin-right: 10rpx;
- }
- }
- .tit-right {
- text-align: right;
- }
- }
- .good-list {
- flex-wrap: wrap;
- background-color: #fff;
- padding: 20rpx;
- // justify-content: flex-start;
- image {
- width: 80rpx;
- margin-left: 15rpx;
- }
-
- }
- .popupyyok-wrap {
- height: 707rpx;
- width: 551rpx;
- background-color: #fff;
- border-radius: 20rpx;
- text-align: center;
- image {
- width: 100%;
- }
- .btn {
- width: 295rpx;
- line-height: 69rpx;
- border-radius: 34rpx;
- background: #303030;
- color: #F8DABA;
- font-size: 35rpx;
- color: #F8DABA;
- margin: auto;
- }
- }
- </style>
|