公司演示版e鹿悦游
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
CjyTravel/subPageA/shop/shopDetail/shopDetail.vue

184 lines
4.0 KiB

<template>
<view class="v-pages-bg bgcolor p-b-24">
<!-- 轮播 -->
11 months ago
<swiper :autoplay="autoplay" class="lh-swiper" :duration="duration" :indicator-dots="indicatorDots"
:interval="interval">
11 months ago
<swiper-item v-for="(item, index) in pic_list" :key="index">
<image class="slide-image" :src="item" mode="widthFix"></image>
</swiper-item>
</swiper>
11 months ago
<!-- 详情头部 -->
<view class="v-card detail container-fluid m-t--80">
11 months ago
<view class="v-shop-price row flex-align-center">
11 months ago
<text class="num-pre">&yen;</text>
11 months ago
<text class="num-price">{{info.price}}</text>
<text class="num-del col">&yen;{{info.marketPrice}}</text>
<text class="num-sell">已售 {{info.soldQuantity}}</text>
11 months ago
</view>
<view class="v-shop-name">{{info.merchantName}}</view>
11 months ago
<view class="v-detail-name">
<view class="text inline-block">{{info.goodsName}}</view>
<view class="v-detail-tip m-t-12"><text class="item">文创产品</text></view>
11 months ago
</view>
</view>
<!-- 介绍 -->
<view class="v-card detail container-fluid m-t-24">
<view class="v-detail-title">
<view class="text"><text>商品详情</text></view>
</view>
<view class="v-detail-content m-t-24">
<u-parse :content="info.description" />
11 months ago
</view>
</view>
10 months ago
<view class="v-order-submit">
11 months ago
<view class="btn m-t-24 text-center" @click="orderSubmit">立即购买</view>
</view>
</view>
</template>
<script>
11 months ago
import uParse from '@/uni_modules/uview-ui/components/u-parse/u-parse.vue'
export default {
components: {
uParse
},
11 months ago
data() {
return {
//轮播
indicatorDots: false,
autoplay: true,
interval: 3000,
duration: 500,
//数据
pic_list: undefined,
info: {},
netType: true,
id:1
11 months ago
};
},
onLoad: function(options) {
// this.id = options.id
11 months ago
this.getInitPage();
},
methods: {
// 页面初始化
getInitPage: function() {
11 months ago
var that = this;
var data = {
"goodsId": this.id
11 months ago
}
this.$Request.get(this.$config.selectAppGoodsDetails, data, '', '', false, false).then(res => {
this.info = res.data;
this.pic_list = res.data.picPhoto.split(",")
})
11 months ago
},
orderSubmit:function(){
/* this.judgeLogin((resa) => {
10 months ago
var data = {
openid: this.userInfo.openid,
shopId: this.info.id,
goodsName: this.info.goodsName,
price:this.info.price,
merchantId:this.info.merchantId,
merchantName:this.info.merchantName
};
10 months ago
const parame = {
10 months ago
...val,
...data
}
10 months ago
const shop = encodeURIComponent(JSON.stringify(parame));
10 months ago
uni.navigateTo({
url: "/subPageC/bookShop/bookShop?shop=" + shop
});
}); */
var data = {
shopId: this.info.id,
goodsName: this.info.goodsName,
price:this.info.price,
merchantId:this.info.merchantId,
merchantName:this.info.merchantName
};
uni.navigateTo({
url: "/subPageC/bookShop/bookShop?shop=" + data
});
}
}
11 months ago
};
</script>
<style lang="scss">
11 months ago
.scroll-view {
top: 200rpx;
}
11 months ago
11 months ago
.lh-swiper {
width: 100%;
height: 400rpx;
overflow: hidden;
position: relative;
}
11 months ago
11 months ago
.lh-swiper .slide-image {
width: 100%;
height: 100%;
}
.v-shop-price {
margin-top: 4rpx;
.num-pre {
color: #e02222;
font-size: 24rpx;
}
.num-price {
color: #e02222;
font-size: 48rpx;
margin-right: 12rpx;
}
.num-del {
text-decoration: line-through;
font-size: 30rpx;
color: #cccccc;
}
.num-sell {
font-size: 30rpx;
color: #cccccc;
}
}
.v-shop-name {
position: relative;
display: inline-block;
padding: 4rpx 20rpx 4rpx 30rpx;
margin: 4rpx 0 4rpx 20rpx;
background-color: rgba(#CA8950, .16);
color: #CA8950;
border-radius: 4rpx;
font-size: 24rpx;
&:before {
content: "";
position: absolute;
left: -20rpx;
top: 50%;
transform: translate(0, -50%);
width: 38rpx;
height: 38rpx;
10 months ago
background: url('https://eluyou.ailuquan.cn/upload/image/2024/mapIcon/daolan/icon-shop.png');
11 months ago
background-repeat: no-repeat;
background-position: center;
background-size: 38rpx;
}
}
10 months ago
</style>