Commit 45363ca8 by MichaelJier

fix

1. 修复商品置顶去看看跳转
parent 58465d60
......@@ -70,12 +70,11 @@ export default {
uin: this.channelInfo.uin,
type: 'live'
});
console.log('topRes',topRes)
if (topRes.code === 200 && topRes.errorCode === 0) {
if (Object.keys(topRes.data).length !== 0) {
this.info = topRes.data;
this.info.market = true;
}
console.log('topRes', topRes)
} else {
this.$layer.msg(topRes.errorMessage);
}
......
......@@ -47,6 +47,7 @@
<source-command v-model="isShow" :content="sourceContent"></source-command>
</div>
</transition>
<market-frame v-model="isShowFrame" :marketSrc="`/showcase?uin=${this.channelInfo.uin}&caseId=${this.caseInfo.caseId}&goodsId=${goodsId}`" v-if="caseInfo.status"/>
</div>
</template>
......@@ -56,12 +57,14 @@ import { mapGetters } from 'vuex';
const shopDetails = r => require(['@/components/shop/details/index'], r);
const sourceLink = r => require(['@/components/shop/source/link'], r);
const sourceCommand = r => require(['@/components/shop/source/command'], r);
const marketFrame = r => require(['@/components/showcase/marketFrame'], r);
export default {
name: 'menu-shop',
components: {
shopDetails,
sourceLink,
sourceCommand
sourceCommand,
marketFrame
},
props: {
menuId: {}
......@@ -69,6 +72,7 @@ export default {
data() {
return {
isShow: false,
isShowFrame: false,
goodsId: null,
sourceType: null,
sourceContent: null,
......@@ -80,7 +84,8 @@ export default {
},
computed: {
...mapGetters({
channelInfo: 'channelInfo'
channelInfo: 'channelInfo',
caseInfo: 'caseInfo'
}),
sortList() {
let list = this.list || [];
......@@ -187,8 +192,17 @@ export default {
this.goodsId = null;
this.sourceType = null;
this.sourceContent = null;
console.log(obj)
if (obj.type === 1) {
this.goodsId = obj.id;
if (obj.market) {
if (this.caseInfo.state === 0){
this.$layer.msg('橱窗已关闭');
return
}
this.isShowFrame = true;
return
}
} else if (obj.type === 2) {
this.sourceType = obj.source;
this.sourceContent = obj.sourceContent;
......
......@@ -71,7 +71,7 @@ export default {
if (this.caseInfo.goodsInfo.type === 2){
this.isShow = !this.isShow
} else {
this.$emit('enterMarket', `/showcase?uin=${this.channelInfo.uin}&caseId=${this.caseInfo.caseId}&goodsId=${550}`)
this.$emit('enterMarket', `/showcase?uin=${this.channelInfo.uin}&caseId=${this.caseInfo.caseId}&goodsId=${this.caseInfo.goodsInfo ? this.caseInfo.goodsInfo.id : ''}`)
}
}
}
......
......@@ -337,6 +337,7 @@ const mixin = {
// 推荐商品
const { caseId, uin, include, goodsInfo } = data;
if (include.live.includes(this.channelInfo.id) && uin === this.channelInfo.uin && caseId){
goodsInfo.market = true
this.$Bus.$emit('bus-setCaseTopGoods', goodsInfo);
}
return false;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment