diff --git a/components/ShoproLiveCard.vue b/components/ShoproLiveCard.vue index 25b5b1d..d481eb3 100644 --- a/components/ShoproLiveCard.vue +++ b/components/ShoproLiveCard.vue @@ -1,30 +1,29 @@ @@ -88,7 +89,6 @@ detail: Array }, created() { - this.getLiveList(); }, mounted() { let that = this; @@ -103,40 +103,40 @@ methods: { // 直播列表 getLiveList() { - let that = this; - yxWechatLive({ - page: 1, - size: 10, - }).then(res => { - console.log(res) - }) + // let that = this; + // yxWechatLive({ + // page: 1, + // size: 10, + // }).then(res => { + // console.log(res) + // }) }, // 轮询liveStatus getLiveStatus() { - if (HAS_LIVE) { - let that = this; - let date = ''; - if (that.detail.live_status == 102) { - date = that.$tools.dateFormat('mm-dd HH:MM', new Date(that.detail.starttime * 1000)).replace('-', - '/'); - that.liveStatus['102'].title = '预告 ' + date; - } - livePlayer - .getLiveStatus({ - room_id: that.detail.room_id - }) - .then(res => { - // 101: 直播中, 102: 未开始, 103: 已结束, 104: 禁播, 105: 暂停中, 106: 异常,107:已过期 - that.detail.live_status = res.liveStatus; - }) - .catch(err => { - console.log('get live status', err); - }); - } + // if (HAS_LIVE) { + // let that = this; + // let date = ''; + // if (that.detail.live_status == 102) { + // date = that.$tools.dateFormat('mm-dd HH:MM', new Date(that.detail.starttime * 1000)).replace('-', + // '/'); + // that.liveStatus['102'].title = '预告 ' + date; + // } + // livePlayer + // .getLiveStatus({ + // room_id: that.detail.room_id + // }) + // .then(res => { + // // 101: 直播中, 102: 未开始, 103: 已结束, 104: 禁播, 105: 暂停中, 106: 异常,107:已过期 + // that.detail.live_status = res.liveStatus; + // }) + // .catch(err => { + // console.log('get live status', err); + // }); + // } }, goRoom(live) { wx.navigateTo({ - url: `plugin-private://wx2b03c6e691cd7370/pages/live-player-plugin?room_id=${live.room_id}` + url: `plugin-private://wx2b03c6e691cd7370/pages/live-player-plugin?room_id=${live.roomId}` }); } } diff --git a/pages/home/components/ProductsRecommended.vue b/pages/home/components/ProductsRecommended.vue index 0bfe3cb..fde1ec6 100644 --- a/pages/home/components/ProductsRecommended.vue +++ b/pages/home/components/ProductsRecommended.vue @@ -60,7 +60,6 @@ created() {}, watch: { detail(next) { - console.log(next) this.goodsList = this.sortData(next, 4); } }, diff --git a/pages/home/components/PromoteProduct.vue b/pages/home/components/PromoteProduct.vue index f50eb54..1cb219a 100644 --- a/pages/home/components/PromoteProduct.vue +++ b/pages/home/components/PromoteProduct.vue @@ -61,7 +61,6 @@ created() {}, watch: { detail(next) { - console.log(next) this.goodsList = this.sortData(next, 4); } }, diff --git a/pages/home/index.vue b/pages/home/index.vue index 7713556..cf96de0 100644 --- a/pages/home/index.vue +++ b/pages/home/index.vue @@ -36,13 +36,13 @@ - + - + - + @@ -69,7 +69,7 @@ import HotCommodity from './components/HotCommodity'; import FirstNewProduct from './components/FirstNewProduct'; import ProductsRecommended from './components/ProductsRecommended'; - // import Live from './components/Live'; + import Live from './components/Live'; import { getHomeData, @@ -99,7 +99,7 @@ HotCommodity, FirstNewProduct, ProductsRecommended, - // Live + Live }, props: {}, data: function () { @@ -220,7 +220,7 @@ that.$set(that, 'firstList', res.data.firstList); that.$set(that, 'bastList', res.data.bastList); that.$set(that, 'likeInfo', res.data.likeInfo); - that.$set(that, 'live', res.data.live); + that.$set(that, 'live', res.data.liveList); that.$set(that, 'lovely', res.data.lovely); that.$set(that, 'benefit', res.data.benefit); that.$set(that, 'couponList', res.data.couponList); diff --git a/pages/shop/Live/LiveList/index.vue b/pages/shop/Live/LiveList/index.vue new file mode 100644 index 0000000..d01f97b --- /dev/null +++ b/pages/shop/Live/LiveList/index.vue @@ -0,0 +1,158 @@ + + + + +