123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127 |
- <template>
- <view class="content">
- <homenav :iStatusBarHeight="iStatusBarHeight" :title="'商品详情'"></homenav>
- <view class="uni-margin-wrap">
- <swiper class="swiper" circular :indicator-dots="true" :autoplay="false" :interval="3000"
- :duration="duration" indicator-active-color="rgba(0, 0, 0, .3)" indicator-color="#EAEAEA">
- <swiper-item v-for="(item,index) in info.imgList">
- <view class="swiper-item">
- <image @click="showImgList(item.imgPath)" :src="item.imgPath" mode="aspectFit" class="swiper-itemImg"></image>
- </view>
- </swiper-item>
-
- </swiper>
- </view>
- <view class="name" v-if="loading">{{info.name}} | {{info.specificationModel}} | {{info.partsCode}}</view>
- <view style="height: 30rpx;background: #F4F5F7;"></view>
- <view class="detail">
- <view class="datailTitle">商品详情</view>
-
- <!-- <video style="width:750rpx;" class="edui-faked-video twtcs" src="https://66km.oss-cn-beijing.aliyuncs.com/yanghuziliao/shachepan/%E6%AC%A7%E6%B4%B2%E7%BB%B4%E4%BF%AE%E5%88%B9%E8%BD%A6%E7%9B%98%E7%89%87%E6%A0%87%E5%87%86%E6%9B%B4%E6%8D%A2SOP%E6%B5%81%E7%A8%8B.mp4" width="420" height="280" enable-danmu danmu-btn controls></video> -->
- <!-- <player-component vid="f3310d4pktb"></player-component> -->
- <!-- <rich-text :nodes="html"></rich-text> -->
- <u-parse :content="html" ></u-parse>
- <!-- <view v-html="html"></view> -->
- </view>
-
- </view>
- </template>
- <script>
- import homenav from "../../components/homenav/nav.vue"
- import uParse from '@/components/u-parse/u-parse.vue'
- export default {
- components: {
- homenav,uParse
- },
- data() {
- return {
- id:'',
- info:'',
- iStatusBarHeight:'',
- html:'',
- loading:false,
-
- }
- },
- onLoad(opt) {
- this.iStatusBarHeight = uni.getSystemInfoSync().statusBarHeight;
- this.id=opt.id;
- this.queryPartDetail()
- },
- methods: {
- queryPartDetail(){
- uni.showLoading({ title: '加载中'});
- this.loading=false;
- this.$http('partsByOpen/queryPartDetail', {
- id:this.id,
- },'POST').then(res => {
- this.loading=true;
- uni.hideLoading();
- this.info=res.data;
- this.html = this.info.ozContent
- this.html = this.html.replace(/\<img/gi, '<img style="max-width:100%;height:auto" ');
- this.html = this.html.replace(/\<iframe/gi, '<video style="width:750rpx;" ');
- this.html = this.html.replace(/\<\/iframe/gi, '</video');
- console.log(this.html)
- })
- },
- showImgList(img){
- var arr=[]
- arr.push(img)
- uni.previewImage({
- urls: arr,
- longPressActions: {
- itemList: ['发送给朋友', '保存图片'],
- success: function(data) {
- console.log('选中了第' + (data.tapIndex + 1) + '个按钮,第' + (data.index + 1) + '张图片');
- },
- fail: function(err) {
- console.log(err.errMsg);
- }
- }
- });
- }
- },
-
- }
- </script>
- <style scoped>
- .swiper-itemImg{
- width: 750rpx;
- height: 750rpx;
- }
- .uni-margin-wrap{
- height: 750rpx;
- }
- .swiper{
- height: 750rpx;
- }
- .datailTitle{
- font-weight: 500;
- color: #1A1A1A;
- line-height: 40rpx;
- padding: 32rpx 24rpx;
- font-size: 28rpx;
- }
- .name{
- font-weight: 500;
- color: #1A1A1A;
- line-height: 40rpx;
- font-size: 28rpx;
- padding: 30rpx 24rpx;
- }
- .detail img{
- width: 750rpx;
-
- }
- .detail image{
- width: 750rpx;
- }
- /deep/ video{
- width: 750rpx;
- }
- </style>
|