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 @@
-
+
-
- {{ liveStatus[detail.live_status].title }}
+
+ {{ liveStatus[detail.liveStatus].title }}
{{ detail.name }}
-
+
- {{ detail.anchor_name }}
+ {{ detail.anchorName }}
-
-
-
+
+
+
¥{{ goods.price }}
- {{ detail.goods.length }}+
+ {{ detail.product.length }}+
@@ -96,10 +95,10 @@
this.getLiveStatus();
},
mounted() {
- let that = this;
- timer = setInterval(() => {
- that.getLiveStatus();
- }, 60000);
+ // let that = this;
+ // timer = setInterval(() => {
+ // that.getLiveStatus();
+ // }, 60000);
},
beforeDestroy() {
timer = null;
@@ -108,31 +107,31 @@
goRoom() {
let that = this;
wx.navigateTo({
- url: `plugin-private://wx2b03c6e691cd7370/pages/live-player-plugin?room_id=${that.detail.room_id}`
+ url: `plugin-private://wx2b03c6e691cd7370/pages/live-player-plugin?room_id=${that.detail.roomId}`
});
},
// 轮询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.liveStatus == 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.liveStatus = res.liveStatus;
+ // })
+ // .catch(err => {
+ // console.log('get live status', err);
+ // });
+ // }
}
}
};
diff --git a/pages.json b/pages.json
index ceea9ff..0962776 100644
--- a/pages.json
+++ b/pages.json
@@ -404,6 +404,12 @@
"style": {
"navigationBarTitleText": "地图"
}
+ },
+ {
+ "path": "pages/shop/Live/LiveList/index",
+ "style": {
+ "navigationBarTitleText": "直播列表"
+ }
}
],
"globalStyle": {
diff --git a/pages/home/components/FirstNewProduct.vue b/pages/home/components/FirstNewProduct.vue
index 3b888ff..31bde33 100644
--- a/pages/home/components/FirstNewProduct.vue
+++ b/pages/home/components/FirstNewProduct.vue
@@ -61,7 +61,6 @@
created() {},
watch: {
detail(next) {
- console.log(next)
this.goodsList = this.sortData(next, 4);
}
},
diff --git a/pages/home/components/HotCommodity.vue b/pages/home/components/HotCommodity.vue
index 2fcef91..3a4b25b 100644
--- a/pages/home/components/HotCommodity.vue
+++ b/pages/home/components/HotCommodity.vue
@@ -60,7 +60,6 @@
created() {},
watch: {
detail(next) {
- console.log(next)
this.goodsList = this.sortData(next, 4);
}
},
@@ -212,5 +211,9 @@
}
}
}
+ .min-goods{
+ margin-right: 22rpx;
+
+ }
}
diff --git a/pages/home/components/Live.vue b/pages/home/components/Live.vue
index 44f354f..cf2a752 100644
--- a/pages/home/components/Live.vue
+++ b/pages/home/components/Live.vue
@@ -2,29 +2,30 @@
热门直播
-
+
更多
-
-
-
+
+
+
-
- {{ liveStatus[live.live_status].title }}
+
+ {{ liveStatus[live.liveStatus].title }}
{{ live.name }}
-
+
-
+
@@ -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 @@
+
+
+
+
+
+ {{ tab.name }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+