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