Commit 45363ca8 by MichaelJier

fix

1. 修复商品置顶去看看跳转
parent 58465d60
...@@ -70,12 +70,11 @@ export default { ...@@ -70,12 +70,11 @@ export default {
uin: this.channelInfo.uin, uin: this.channelInfo.uin,
type: 'live' type: 'live'
}); });
console.log('topRes',topRes)
if (topRes.code === 200 && topRes.errorCode === 0) { if (topRes.code === 200 && topRes.errorCode === 0) {
if (Object.keys(topRes.data).length !== 0) { if (Object.keys(topRes.data).length !== 0) {
this.info = topRes.data; this.info = topRes.data;
this.info.market = true;
} }
console.log('topRes', topRes)
} else { } else {
this.$layer.msg(topRes.errorMessage); this.$layer.msg(topRes.errorMessage);
} }
......
...@@ -47,6 +47,7 @@ ...@@ -47,6 +47,7 @@
<source-command v-model="isShow" :content="sourceContent"></source-command> <source-command v-model="isShow" :content="sourceContent"></source-command>
</div> </div>
</transition> </transition>
<market-frame v-model="isShowFrame" :marketSrc="`/showcase?uin=${this.channelInfo.uin}&caseId=${this.caseInfo.caseId}&goodsId=${goodsId}`" v-if="caseInfo.status"/>
</div> </div>
</template> </template>
...@@ -56,12 +57,14 @@ import { mapGetters } from 'vuex'; ...@@ -56,12 +57,14 @@ import { mapGetters } from 'vuex';
const shopDetails = r => require(['@/components/shop/details/index'], r); const shopDetails = r => require(['@/components/shop/details/index'], r);
const sourceLink = r => require(['@/components/shop/source/link'], r); const sourceLink = r => require(['@/components/shop/source/link'], r);
const sourceCommand = r => require(['@/components/shop/source/command'], r); const sourceCommand = r => require(['@/components/shop/source/command'], r);
const marketFrame = r => require(['@/components/showcase/marketFrame'], r);
export default { export default {
name: 'menu-shop', name: 'menu-shop',
components: { components: {
shopDetails, shopDetails,
sourceLink, sourceLink,
sourceCommand sourceCommand,
marketFrame
}, },
props: { props: {
menuId: {} menuId: {}
...@@ -69,6 +72,7 @@ export default { ...@@ -69,6 +72,7 @@ export default {
data() { data() {
return { return {
isShow: false, isShow: false,
isShowFrame: false,
goodsId: null, goodsId: null,
sourceType: null, sourceType: null,
sourceContent: null, sourceContent: null,
...@@ -80,7 +84,8 @@ export default { ...@@ -80,7 +84,8 @@ export default {
}, },
computed: { computed: {
...mapGetters({ ...mapGetters({
channelInfo: 'channelInfo' channelInfo: 'channelInfo',
caseInfo: 'caseInfo'
}), }),
sortList() { sortList() {
let list = this.list || []; let list = this.list || [];
...@@ -187,8 +192,17 @@ export default { ...@@ -187,8 +192,17 @@ export default {
this.goodsId = null; this.goodsId = null;
this.sourceType = null; this.sourceType = null;
this.sourceContent = null; this.sourceContent = null;
console.log(obj)
if (obj.type === 1) { if (obj.type === 1) {
this.goodsId = obj.id; 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) { } else if (obj.type === 2) {
this.sourceType = obj.source; this.sourceType = obj.source;
this.sourceContent = obj.sourceContent; this.sourceContent = obj.sourceContent;
......
...@@ -71,7 +71,7 @@ export default { ...@@ -71,7 +71,7 @@ export default {
if (this.caseInfo.goodsInfo.type === 2){ if (this.caseInfo.goodsInfo.type === 2){
this.isShow = !this.isShow this.isShow = !this.isShow
} else { } 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 = { ...@@ -337,6 +337,7 @@ const mixin = {
// 推荐商品 // 推荐商品
const { caseId, uin, include, goodsInfo } = data; const { caseId, uin, include, goodsInfo } = data;
if (include.live.includes(this.channelInfo.id) && uin === this.channelInfo.uin && caseId){ if (include.live.includes(this.channelInfo.id) && uin === this.channelInfo.uin && caseId){
goodsInfo.market = true
this.$Bus.$emit('bus-setCaseTopGoods', goodsInfo); this.$Bus.$emit('bus-setCaseTopGoods', goodsInfo);
} }
return false; 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