mall-applet1/pagesB/shop-detail/shop-detail.vue

76 lines
1.8 KiB
Vue

<template>
<view class="pad-x140">
<status-container titlet="详情">
<view slot="content" style="margin: -20rpx -20rpx 0 -20rpx;">
<swiper-pu newRadius="0rpx" :newHeight="swiperH+'px'" newBottom="40rpx" :isplay="isplay"></swiper-pu>
<view class="pad-zy20 bacf pad-sx20">
<view class="fon42 colb mar-x10">如意饼</view>
<view class="fon24 col6 mar-x20">如意饼 事事如意</view>
<view class="textc bold fon30 ">46,854/<text class="fon24"></text></view>
</view>
<view class="fon36 colb tcenter pad-sx30 bold">商品介绍</view>
<view class="pad-zy20">
<rich-text :nodes="richText"></rich-text>
</view>
</view>
</status-container>
<view class="disjbac posixzy bacf pad-sx20 pad-zy50">
<view class="btn buy-btn" @tap="buyEv"></view>
<view class="btn" @tap="addCartEv"></view>
</view>
</view>
</template>
<script>
import swiperPu from '@/components/swipers/swiper-pu';
export default {
components:{
swiperPu
},
data() {
return {
swiperH:uni.getSystemInfoSync().windowWidth,
richText:'',
isplay:false,
playTimer:null
}
},
onHide() {
clearTimeout(this.playTimer);
},
onShow() {
this.playTimer = setTimeout(()=>{
this.isplay = true;
},2000)
},
methods: {
// 立即购买
buyEv(){
uni.reLaunch({
url:'/pages/tabbar/cart/cart'
})
},
// 加入购物车
addCartEv(id) {
this.$toolAll.tools.showToast('加入购物车成功(*^▽^*)')
},
}
}
</script>
<style>
.btn{
width: 310rpx;
height: 98rpx;
line-height: 98rpx;
color: #FFFFFF;
background-color: #8c8c9b;
border-radius: 30rpx;
text-align: center;
font-size: 36rpx;
}
.buy-btn{
background: linear-gradient(to right, #ff3772 0%,#fd5548 100%);
}
</style>