更改登录以及产品详情页

This commit is contained in:
952108534@qq.com
2022-01-26 19:31:17 +08:00
parent 8d77715414
commit 0274793731
5 changed files with 170 additions and 47 deletions

View File

@@ -15,7 +15,12 @@
rc-border-colour--brand4
"
>
<div class="rc-column">
<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 data-js-carousel="" data-image-gallery="true">
<div
class="rc-carousel rc-carousel__gallery-image"
@@ -108,7 +113,7 @@
<span>{{ curItem.categoryName }}</span>
</div>
<div class="rc-button ">
<div class="rc-button" v-if="!userbuy">
<span @click="chuafangbuy()">立即购买</span>
</div>
@@ -274,7 +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)" style="justify-content: flex-end">
<span @click="chuafangbuy()" style="margin-right: 20px">立即购买</span>
</div>
</div>
</template>
@@ -304,6 +311,7 @@ export default {
let newlist = [];
let curItem = {};
let chufang = {};
let videolist=[];
let productAttachmentList = [];
let userlistmenu = [];
isRxGoods = (isRxGoods == '1'?true:false);
@@ -318,7 +326,6 @@ export default {
let data = await oncequery(mainProductCode);
let outputObj = {};
if (data) {
console.log(data);
chufang=data;
outputObj = data;
outputObj.productName = data.name;
@@ -340,6 +347,7 @@ export default {
let data = await goodsmessage(singleCode);
if (data && data.data.length>0) {
newlist.push(data.data[0]);
if(data.data[0].leftAllotment>0 && !stopLeftAllotmentChecking) {
activeIndexa = stopIndex;
curItem = data.data[0];
@@ -350,6 +358,8 @@ export default {
}
if(curItem.productAttachmentList != undefined)
productAttachmentList = curItem.productAttachmentList;
let list=[];
if(curItem.productName == undefined)
curItem = newlist[0];
userbuy = true;
@@ -370,6 +380,7 @@ export default {
curItem,
newlist,
chufang,
videolist,
productAttachmentList,
userbuy
}
@@ -380,6 +391,9 @@ export default {
userimage: require("../../assets/image/unused.png"),
gotop: false,
dialogInfo1: false,
videolist:[],
videoimg:'',
videoshow: false,
name: [],
userlist: [],
drawlist: [], //用户可以领取的优惠券
@@ -452,6 +466,19 @@ 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;
@@ -511,7 +538,6 @@ export default {
this.newlist = data.data;
}
this.productAttachmentList = this.newlist[0].productAttachmentList;
this.userlistmenu = this.newlist[0].productAttachmentList;
let changemess = JSON.stringify(this.userlistmenu);
this.changemessage({ data: changemess });