123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208 |
- <template>
- <view class="center">
- <view v-if="list.imgs != null">
- <swiper :autoplay="true" :interval="3000" :duration="1000" class="top" indicator-color="rgba(0, 0, 0, .2)" indicator-dots indicator-active-color="#fff">
- <swiper-item v-for="item in list.imgs.split(',')">
- <image :src="item" mode="">
- </swiper-item>
- </swiper>
- </view>
- <view class="top" v-else><image :src="list.logo" mode=""></image></view>
- <view class="name-box">
- <view class="price-box">
- 兑换价:
- <text class="price">{{price * 1}}</text>
- <text class="unit">{{ list.cost_money_type}}</text>
- <!-- <text class="yuan">¥229</text> -->
- </view>
- <view class="name clamp">{{list.name}}</view>
- </view>
- <view class="tip-box">
- <view class="tip-titele">兑换须知</view>
- <view class="tip-main">兑换说明详细介绍兑换说明详细介绍兑换兑换说明详细介绍兑换说明详细介绍兑换说明详细介绍</view>
- </view>
- <view class="detail">
- <view class="detail-title">
- 商品详情
- </view>
- <view class="systom" v-html="list.detail">
-
- </view>
- </view>
- <view class="btn" @click="buy()">
- 立即兑换
- </view>
- </view>
- </template>
- <script>
- import { miningDateils } from '@/api/market.js';
- import uniNumberBox from '@/components/uni-number-box.vue';
- export default {
- components: {
- uniNumberBox
- },
- data() {
- return {
- id: '',
- type: '',
- num: 1,
- step: 0,
- password: '',
- price: '',
- list: {},
- checked: false,
- current: 0
- };
- },
- onLoad(option) {
- this.id = option.id;
- this.type = option.type;
- this.loadData();
- },
- computed: {
- money() {
- return this.num * this.price * this.step;
- }
- },
- onShow() {},
- methods: {
- async loadData() {
- let obj = this;
- miningDateils({}, obj.id).then(({ data }) => {
- console.log(data,"123456789")
- obj.list = data;
- // obj.money = obj.list.cost_money;
- obj.price = obj.list.cost_money;
- obj.step = obj.list.step;
- console.log(obj.list);
- });
- },
- ToIndex() {
- uni.navigateTo({
- url: '/pages/finance/xieyi'
- });
- },
- numberChange(data) {
- let obj = this;
- obj.num = data.number;
- },
- buy() {
- // let list = JSON.stringify(this.list)
- uni.navigateTo({
- url: '/pages/market/pay?&id=' + this.id + '&type=' + this.type
- });
- // console.log(this.list,'--------------***********')
- // console.log('buy click')
- },
- changeCurrent(index) {
- this.current = index;
- },
- back() {
- uni.navigateTo({
- url: '/pages/market/pay?&id=' + this.id + '&type=' + this.type
- });
- }
- }
- };
- </script>
- <style lang="scss" scoped>
- page,
- .center {
- background: #f8f6f6;
- height: 100%;
- }
- .top {
- width: 750rpx;
- height: 710rpx;
- image {
- width: 100%;
- height: 100%;
- }
- }
- .name-box {
- padding: 30rpx 26rpx;
- line-height: 1;
- background-color: #FFFFFF;
- .price-box {
- font-size: 28rpx;
- font-family: PingFang SC;
- font-weight: bold;
- color: #333333;
- .price {
- font-size: 48rpx;
- color: #E83F30;
- }
- .unit {
- display: inline-block;
- padding-left: 10rpx;
- color: #E83F30;
- }
- .yuan {
-
- padding-left: 10rpx;
- font-size: 30rpx;
- font-weight: 500;
- text-decoration: line-through;
- color: #999999;
- }
- }
- .name {
- font-size: 34rpx;
- font-family: PingFang SC;
- font-weight: bold;
- color: #1D2023;
- margin-top: 30rpx;
- }
- }
- .tip-box {
- margin-top: 20rpx;
- padding: 34rpx 90rpx 50rpx 30rpx;
- display: flex;
- align-items: flex-start;
- background-color: #FFFFFF;
- .tip-titele {
- font-size: 32rpx;
- font-family: PingFang SC;
- font-weight: bold;
- color: #3B3B3B;
- }
- .tip-main {
- margin-left: 30rpx;
- width: 467rpx;
- font-size: 26rpx;
- font-family: PingFang SC;
- font-weight: 500;
- color: #8A8A8A;
- }
- }
- .detail {
- .detail-title{
- width: 750rpx;
- height: 80rpx;
- line-height: 80rpx;
- text-align: center;
- font-size: 28rpx;
- font-family: PingFangSC;
- font-weight: bold;
- color: #1D2023;
- }
- }
- .btn {
- position: fixed;
- bottom: 0;
- left: 0;
- right: 0;
- width: 750rpx;
- height: 98rpx;
- background: linear-gradient(0deg, #2E58FF, #32C6FF);
- text-align: center;
- line-height: 98rpx;
- font-size: 36rpx;
- font-family: PingFang SC;
- font-weight: bold;
- color: #FFFFFF;
- }
- </style>
|