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.
 
 
 
 

268 lines
6.4 KiB

<template>
<view class="app">
<view class="menu-item">
<text class="menu-txt" @click="toStoreProduct">云仓备货</text>
<text class="menu-txt" style="border-left-width: 0rpx;">云仓提货</text>
</view>
<swiper class="swiper" indicator-active-color="white" :indicator-dots="indicatorDots" :autoplay="autoplay" :interval="interval" :duration="duration">
<swiper-item v-for="(item,index) in swipeImgs" :key=index>
<view class="swiper-item uni-bg-red">
<image class="swiper-img swiper-img-tt" :src="item"></image>
</view>
</swiper-item>
<!-- <swiper-item>
<view class="swiper-item uni-bg-green">
<image class="swiper-img" src="/static/shop/rem.jpg"></image>
</view>
</swiper-item>
<swiper-item>
<view class="swiper-item uni-bg-blue">
<image class="swiper-img" src="/static/shop/b7f2be6053cc88b4.jpg"></image>
</view>
</swiper-item> -->
</swiper>
<view class="product-section">
<text class="prduct-title">轻未来超纤维阻燃粉轻未来超纤维阻燃粉轻未来超纤维阻燃粉</text>
<view class="product-des">
<view class="product-price">
<text class="product-price-sale">5999</text>
<text class="product-price-show">6999</text>
</view>
<text class="product-number">库存2000</text>
</view>
</view>
<view class="separator-section"></view>
<view class="product-detail">
<text class="product-detail-title">产品描述</text>
<view class="product-detail-wrap">
<text class="product-detail-txt">理想是未来事物的美好想象和希望也比喻对某事物榛于最完善境界的观念是人们在实践过程中形成的有实现可能性的对未来社会和自身发展的向往和追求价值观是基于人的一定的思维感官之上而作出的认知理解判断或抉择也就是认定事物判定是非的一种思维或取向本产本具有良好疗效</text>
</view>
<image class="product-detail-img" src="/static/shop/677088217d8a00aa.jpg"></image>
</view>
<!-- <view class="shop-list">
<view class="shop-item">
<view class="shop-item-left">
<text class="shop-item-left-title">通知 | 关于轻未来超轻维阻燃粉外包装升级通知</text>
<text class="shop-item-left-time">2021年4月23日</text>
</view>
<image src="/static/shop/677088217d8a00aa.jpg" class="shop-item-img">
</image>
</view>
<view class="shop-item">
<view class="shop-item-left">
<text class="shop-item-left-title">通知 | 关于轻未来超轻维阻燃粉外包装升级通知</text>
<text class="shop-item-left-time">2021年4月23日</text>
</view>
<image src="/static/shop/677088217d8a00aa.jpg" class="shop-item-img">
</image>
</view>
<view class="shop-item">
<view class="shop-item-left">
<text class="shop-item-left-title">通知 | 关于轻未来超轻维阻燃粉外包装升级通知</text>
<text class="shop-item-left-time">2021年4月23日</text>
</view>
<image src="/static/shop/677088217d8a00aa.jpg" class="shop-item-img">
</image>
</view>
</view> -->
</view>
</template>
<script>
export default {
components: {
},
data() {
return {
navList: [],//导航列表
advertList: [],//广告列表
hotList: [],//热门推荐
indicatorDots: true,
autoplay: true,
interval: 2000,
duration: 500,
swipeImgs:['/static/shop/677088217d8a00aa.jpg','/static/shop/rem.jpg','/static/shop/b7f2be6053cc88b4.jpg']
}
},
computed: {
changeIndicatorDots(e) {
this.indicatorDots = !this.indicatorDots
},
changeAutoplay(e) {
this.autoplay = !this.autoplay
},
intervalChange(e) {
this.interval = e.target.value
},
durationChange(e) {
this.duration = e.target.value
},
midAdvert(){
if(this.advertList.length === 0) return {};
const res = this.advertList.filter(item=> item.advert_type === 'middle');
return res.length > 0 ? res[0]: {};
},
carousel(){
return this.advertList.filter(item=> item.advert_type === 'carousel');
}
},
onLoad() {
this.loadAdvert();
this.loadNavList();
setTimeout(()=>{
//this.navTo('/pages/address/list')
}, 1000)
},
methods: {
toStoreProduct(){
this.navTo(`/pages/yunProduct/storeProduct`)
},
//加载广告 缓存10分钟
async loadAdvert(){
const res = await this.$request('advert', 'getAdvertList', {}, {
cache: 10*60
});
this.advertList = res.data;
this.log(res);
},
//加载导航 缓存1小时
async loadNavList(){
const res = await this.$request('advert', 'getNavList', {}, {
cache: 60*60*0,
});
this.navList = res.data;
},
}
}
</script>
<style>
page{
background-color: white;
}
</style>
<style scoped lang="scss">
/* 分类 */
.swiper{
height: 750rpx;
}
.swiper-item{
}
.swiper-img{
width: 100%;
height: 750rpx;
}
.menu-item{
display: flex;
flex-direction: row;
align-items: center;
background-color: white;
}
.menu-txt{
height: 90rpx;
line-height: 90rpx;
text-align: center;
flex: 1;
font-size: 18px;
font-weight: 500;
color: #EDAF8B;
border: 1px solid #EDAF8B;
}
.product-section{
margin: 36rpx 64rpx 30rpx 40rpx;
}
.prduct-title{
font-size: 18px;
font-weight: bold;
color: #333333;
line-height: 50rpx;
// line-height: 48px;
}
.product-des{
margin: 30rpx 0rpx;
display: flex;
flex-direction: row;
justify-content: space-between;
align-items: flex-end;
}
.product-price-sale{
font-size: 28px;
font-weight: bold;
color: #EDAF8B;
}
.product-price-show{
font-size: 13px;
font-weight: 500;
text-decoration: line-through;
color: #999999;
}
.product-number{
font-size: 13px;
font-weight: 500;
color: #999999;
}
.separator-section{
background-color: $separatorColor;
height: 20rpx;
}
.product-detail{
margin: 60rpx 40rpx 10rpx;
}
.product-detail-title{
display: block;
font-size: 18px;
font-weight: bold;
color: #333333;
}
.product-detail-wrap{
margin: 30rpx 0rpx;
}
.product-detail-txt{
line-height: 30rpx;
font-size: 13px;
// font-weight: 500;
color: #999999;
}
.product-detail-img{
width: 100%;
height: 600rpx;
border-radius: 10rpx;
}
</style>