mirror of
https://gitee.com/lab1024/smart-admin.git
synced 2025-10-02 10:16:38 +08:00
Frontend layout fixed
This commit is contained in:
parent
b3c21bb35f
commit
2fdfb0e9c1
@ -122,6 +122,16 @@
|
|||||||
max-width:100%;
|
max-width:100%;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.tns-item {
|
||||||
|
video {
|
||||||
|
max-width:31.25rem;
|
||||||
|
min-width:28.25rem;
|
||||||
|
max-height:31.25rem;
|
||||||
|
min-height:28.25rem;
|
||||||
|
width:36vw;
|
||||||
|
height:36vw;
|
||||||
|
}
|
||||||
|
}
|
||||||
// 手机端
|
// 手机端
|
||||||
@media screen and (max-width:768px) {
|
@media screen and (max-width:768px) {
|
||||||
.uservideo{
|
.uservideo{
|
||||||
|
@ -9,7 +9,7 @@ let baseUrl = 'http://47.96.75.242:10086/royalcanin/royalcanin/'
|
|||||||
if (process.env.NODE_ENV === 'development') {
|
if (process.env.NODE_ENV === 'development') {
|
||||||
baseUrl = 'http://47.96.75.242:10086/royalcanin/royalcanin/';
|
baseUrl = 'http://47.96.75.242:10086/royalcanin/royalcanin/';
|
||||||
} else if (process.env.NODE_ENV === 'production') {
|
} else if (process.env.NODE_ENV === 'production') {
|
||||||
baseUrl = '/royalcanin/royalcanin/royalcanin/';
|
baseUrl = 'https://shop.royalcanin.com.cn/royalcanin/royalcanin/royalcanin/';
|
||||||
}
|
}
|
||||||
export {
|
export {
|
||||||
baseUrl,
|
baseUrl,
|
||||||
|
@ -36,7 +36,7 @@ export default async(url = '', data = {}, type = 'GET', method = 'fetch') => {
|
|||||||
'Content-Type': 'application/json',
|
'Content-Type': 'application/json',
|
||||||
'x-access-token': token
|
'x-access-token': token
|
||||||
},
|
},
|
||||||
mode: 'cors',
|
// mode: 'cors',
|
||||||
// channelId:'H5@2021',
|
// channelId:'H5@2021',
|
||||||
cache: 'force-cache'
|
cache: 'force-cache'
|
||||||
}
|
}
|
||||||
|
@ -254,7 +254,7 @@ let prdData={
|
|||||||
productCode:'17220400',
|
productCode:'17220400',
|
||||||
productList: [
|
productList: [
|
||||||
{
|
{
|
||||||
productCode: "17220400,17221000,1722040002,17220400F03",
|
productCode: "17220400,17220100,17221000,1722040002",
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
@ -266,7 +266,7 @@ let prdData={
|
|||||||
productCode:'20010200',
|
productCode:'20010200',
|
||||||
productList: [
|
productList: [
|
||||||
{
|
{
|
||||||
productCode: "20010200,20011000,20010040",
|
productCode: "20010200,2001020002,20010200F03,2001004003",
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
@ -15,12 +15,7 @@
|
|||||||
rc-border-colour--brand4
|
rc-border-colour--brand4
|
||||||
"
|
"
|
||||||
>
|
>
|
||||||
<div class="uservideo" v-if="videoshow">
|
<div class="rc-column">
|
||||||
<video controls="" preload="videoimg">
|
|
||||||
<source :src= videolist type="video/mp4">
|
|
||||||
</video>
|
|
||||||
</div>
|
|
||||||
<div class="rc-column" v-if="!videoshow">
|
|
||||||
<div data-js-carousel="" data-image-gallery="true">
|
<div data-js-carousel="" data-image-gallery="true">
|
||||||
<div
|
<div
|
||||||
class="rc-carousel rc-carousel__gallery-image"
|
class="rc-carousel rc-carousel__gallery-image"
|
||||||
@ -30,11 +25,10 @@
|
|||||||
<!-- Big images-->
|
<!-- Big images-->
|
||||||
<div v-for="(item, index) in productAttachmentList" :key="index">
|
<div v-for="(item, index) in productAttachmentList" :key="index">
|
||||||
<div>
|
<div>
|
||||||
<img :src="item.attachmentPath" />
|
<img v-if="(item.attachmentPath.indexOf('mp4')<0)" :src="item.attachmentPath" />
|
||||||
<!-- <img
|
<video v-if="(item.attachmentPath.indexOf('mp4')>0)" preload="meta" controls="controls">
|
||||||
src="https://cdn.royalcanin-weshare-online.io/m2kia2QBG95Xk-RBC8jn/v1/medium-maxi-giant-pos-2012-packshots-ma-ad-shn-packshot?w=420&fm=jpg&auto=compress"
|
<source :src= item.attachmentPath type="video/mp4">
|
||||||
alt="Product alt text"
|
</video>
|
||||||
/> -->
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -57,7 +51,8 @@
|
|||||||
:key="index"
|
:key="index"
|
||||||
>
|
>
|
||||||
<div class="rc-img--square">
|
<div class="rc-img--square">
|
||||||
<img :src="item.attachmentPath" />
|
<img :src="item.attachmentPath" v-if="(item.attachmentPath.indexOf('mp4')<0)" />
|
||||||
|
<img src="/images/default.jpg" v-if="(item.attachmentPath.indexOf('mp4')>0)" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- <div class="rc-carousel__gallery-thumbnail">
|
<!-- <div class="rc-carousel__gallery-thumbnail">
|
||||||
@ -113,15 +108,15 @@
|
|||||||
<span>{{ curItem.categoryName }}</span>
|
<span>{{ curItem.categoryName }}</span>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="rc-button" v-if="!userbuy">
|
<div class="rc-button" v-if="!userbuy && curItem.goodUrl && curItem.goodUrl.length>5">
|
||||||
<span @click="chuafangbuy()">立即购买</span>
|
<a :href="curItem.goodUrl" target='_blank' class="ts-standard-btn">立即购买</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div class="rc-productdetail" v-if="userbuy">
|
<div class="rc-productdetail" v-if="userbuy">
|
||||||
<i class="ts-row-title">商品价格:</i>
|
<i class="ts-row-title">商品价格:</i>
|
||||||
<span class="ts-realprice">¥{{ curItem.ecPrice }}</span>
|
<span class="ts-realprice">¥{{ curItem.ecPrice }}</span>
|
||||||
<span class="ts-remove ts-ecprice"
|
<span class="ts-remove ts-ecprice" v-if="curItem.ecPrice<curItem.rsp"
|
||||||
>¥{{ curItem.rsp }}
|
>¥{{ curItem.rsp }}
|
||||||
</span>
|
</span>
|
||||||
<span class="ts-record" v-if="curItem.basePoint!==0">
|
<span class="ts-record" v-if="curItem.basePoint!==0">
|
||||||
@ -284,8 +279,8 @@
|
|||||||
<span @click="usertanchu(curItem, 0)">加入购物车</span>
|
<span @click="usertanchu(curItem, 0)">加入购物车</span>
|
||||||
<span @click="usertanchu(curItem, 1)">立即购买</span>
|
<span @click="usertanchu(curItem, 1)">立即购买</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="rc-button rc-md-down " v-if="(!userbuy)">
|
<div class="rc-button rc-md-down " v-if="!userbuy && curItem.goodUrl && curItem.goodUrl.length>5">
|
||||||
<span @click="chuafangbuy()" style="margin-right: 20px">立即购买</span>
|
<a :href="curItem.goodUrl" target='_blank' class="ts-standard-btn">立即购买</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
@ -315,7 +310,6 @@ export default {
|
|||||||
let userbuy = true;
|
let userbuy = true;
|
||||||
let newlist = [];
|
let newlist = [];
|
||||||
let curItem = {};
|
let curItem = {};
|
||||||
let chufang = {};
|
|
||||||
let videolist=[];
|
let videolist=[];
|
||||||
let productAttachmentList = [];
|
let productAttachmentList = [];
|
||||||
let userlistmenu = [];
|
let userlistmenu = [];
|
||||||
@ -330,7 +324,6 @@ export default {
|
|||||||
let data = await oncequery(mainProductCode);
|
let data = await oncequery(mainProductCode);
|
||||||
let outputObj = {};
|
let outputObj = {};
|
||||||
if (data) {
|
if (data) {
|
||||||
chufang=data;
|
|
||||||
outputObj = data;
|
outputObj = data;
|
||||||
outputObj.productName = data.name;
|
outputObj.productName = data.name;
|
||||||
outputObj.picture = outputObj.picture;
|
outputObj.picture = outputObj.picture;
|
||||||
@ -379,10 +372,10 @@ export default {
|
|||||||
activeIndexa,
|
activeIndexa,
|
||||||
curItem,
|
curItem,
|
||||||
newlist,
|
newlist,
|
||||||
chufang,
|
|
||||||
videolist,
|
videolist,
|
||||||
productAttachmentList,
|
productAttachmentList,
|
||||||
userbuy
|
userbuy,
|
||||||
|
isRxGoods
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
@ -393,7 +386,6 @@ export default {
|
|||||||
dialogInfo1: false,
|
dialogInfo1: false,
|
||||||
videolist:[],
|
videolist:[],
|
||||||
videoimg:'',
|
videoimg:'',
|
||||||
videoshow: false,
|
|
||||||
name: [],
|
name: [],
|
||||||
userlist: [],
|
userlist: [],
|
||||||
drawlist: [], //用户可以领取的优惠券
|
drawlist: [], //用户可以领取的优惠券
|
||||||
@ -467,31 +459,6 @@ export default {
|
|||||||
if (this.usermessage !== "" || this.usermessage.data !== undefined) {
|
if (this.usermessage !== "" || this.usermessage.data !== undefined) {
|
||||||
this.usermessage = this.$store.state.userInfo;
|
this.usermessage = this.$store.state.userInfo;
|
||||||
this.productCode = this.$route.query.productCode;
|
this.productCode = this.$route.query.productCode;
|
||||||
//video显示
|
|
||||||
this.productAttachmentList.map(element=>{
|
|
||||||
if(element.attachmentPath.substring(element.attachmentPath.lastIndexOf(".")+1)=='mp4'){
|
|
||||||
this.videolist=element.attachmentPath;
|
|
||||||
}
|
|
||||||
})
|
|
||||||
this.videoimg=this.productAttachmentList[0].attachmentPath;
|
|
||||||
if(this.videolist.length>0){
|
|
||||||
this.videoshow=true
|
|
||||||
}else{
|
|
||||||
this.videoshow=false;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
let stype = this.$route.query.stype;
|
|
||||||
let isRxGoods = this.$route.query.isRxGoods;
|
|
||||||
isRxGoods = (isRxGoods == '1'?true:false);
|
|
||||||
if(isRxGoods){
|
|
||||||
this.rxquery(this.productCode);
|
|
||||||
this.userbuy = false;
|
|
||||||
} else {
|
|
||||||
this.userquery(this.productCode);
|
|
||||||
this.userbuy = true;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
_hmt.push([
|
_hmt.push([
|
||||||
"_trackCustomEvent",
|
"_trackCustomEvent",
|
||||||
"product_visit",
|
"product_visit",
|
||||||
@ -542,15 +509,6 @@ export default {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
//处方用粮跳转
|
|
||||||
chuafangbuy(){
|
|
||||||
window.location.href =this.chufang.goodUrl;
|
|
||||||
},
|
|
||||||
|
|
||||||
// changeName(newName){
|
|
||||||
// this.name = newName;
|
|
||||||
// },
|
|
||||||
|
|
||||||
userclose() {
|
userclose() {
|
||||||
this.userlist = [];
|
this.userlist = [];
|
||||||
this.dialogInfo1=false;
|
this.dialogInfo1=false;
|
||||||
|
Loading…
Reference in New Issue
Block a user