110 lines
2.4 KiB
Vue
110 lines
2.4 KiB
Vue
<template>
|
|
<view class="pb10">
|
|
<view>
|
|
<video :autoplay="true" muted loop :show-play-btn="false" :show-center-play-btn="false" :controls="false"
|
|
:show-fullscreen-btn="false" class="video-box"
|
|
src="https://hzs-in.oss-cn-beijing.aliyuncs.com/test-new/20230421/e4aff691-9386-4ec9-bf77-a33e88deda61.mp4"></video>
|
|
</view>
|
|
<view class="f34 fb p20">
|
|
|
|
</view>
|
|
<view class="">
|
|
<view class="product-item" v-for="(item,index) in productDetailsList" :key="index" @click="gotoPage('/pages/product/o-detail?pkId='+item.pkId)">
|
|
<view class="product-title text-ellipsis">{{item.titleName}}</view>
|
|
<view class="product-img">
|
|
<image :src="item.picture" mode="aspectFill"></image>
|
|
</view>
|
|
<view class="product-info ">
|
|
<view class="f28 gray3 text-ellipsis">{{item.twoLevelTitle}}</view>
|
|
<view class="d-b-e">
|
|
<view class="f22 gray9 flex-1 text-ellipsis-2" v-html="item.content"></view>
|
|
<image class="cart-btn ml20" src="/static/icon/cart-icon.png" mode=""></image>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</template>
|
|
|
|
<script>
|
|
export default {
|
|
data() {
|
|
return {
|
|
productDetailsList: []
|
|
}
|
|
},
|
|
created() {
|
|
this.getData();
|
|
},
|
|
methods: {
|
|
getData() {
|
|
let self = this;
|
|
uni.request({
|
|
url: 'http://index.hzs413.com/index-api/home/api/ho-product-details/getHoProductDetails/565',
|
|
method: 'GET',
|
|
success: result => {
|
|
console.log(result);
|
|
var data = result.data;
|
|
self.productDetailsList = data.data.productDetailsList;
|
|
},
|
|
error: error => {
|
|
console.log('----------------error');
|
|
console.log(error);
|
|
}
|
|
});
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style lang="scss">
|
|
.video-box {
|
|
width: 750rpx;
|
|
height: 425rpx;
|
|
}
|
|
|
|
.cart-btn {
|
|
width: 64rpx;
|
|
height: 64rpx;
|
|
background: #D82128;
|
|
box-shadow: 0rpx 3rpx 7rpx 0rpx rgba(0, 0, 0, 0.35);
|
|
border-radius: 50%;
|
|
flex-shrink: 0;
|
|
margin-left: 0;
|
|
}
|
|
|
|
.product-item {
|
|
margin: 0 auto;
|
|
width: 702rpx;
|
|
background-color: #fff;
|
|
border-radius: 20rpx;
|
|
overflow: hidden;
|
|
margin-bottom: 20rpx;
|
|
|
|
.product-title {
|
|
background-color: $dominant-color;
|
|
color: #fff;
|
|
font-size: 20rpx;
|
|
padding: 15rpx 23rpx;
|
|
}
|
|
|
|
.product-img {
|
|
width: 702rpx;
|
|
height: 556rpx;
|
|
border-radius: 0 0 20rpx 20rpx;
|
|
background-color: $dominant-color;
|
|
|
|
image {
|
|
width: 702rpx;
|
|
height: 556rpx;
|
|
border-radius: 20rpx;
|
|
}
|
|
|
|
|
|
}
|
|
|
|
.product-info {
|
|
padding: 26rpx 18rpx 40rpx 18rpx;
|
|
}
|
|
}
|
|
</style> |