Commit e9ecca37 by 李嘉林

开播提醒

parent 24134a16
...@@ -53,4 +53,8 @@ export default { ...@@ -53,4 +53,8 @@ export default {
addLiveUserGoodsByUser(options) { addLiveUserGoodsByUser(options) {
return requestPOST(`${process.env.OLSHOP_URL}/liveBroadcastInfo/addLiveUserGoodsByUser`,options); return requestPOST(`${process.env.OLSHOP_URL}/liveBroadcastInfo/addLiveUserGoodsByUser`,options);
}, },
// 添加订阅和推送
addLiveNoticeByCustomer(options) {
return requestPOST(`${process.env.OLSHOP_URL}/broadcastReminderRecord/addLiveNoticeByCustomer`,options);
},
}; };
\ No newline at end of file
...@@ -9,6 +9,7 @@ ...@@ -9,6 +9,7 @@
</template> </template>
<script type="text/ecmascript-6"> <script type="text/ecmascript-6">
import live from "@/api/live";
import timeDown from "@/components/livedModel/timeDown"; import timeDown from "@/components/livedModel/timeDown";
export default { export default {
props: ["info"], props: ["info"],
...@@ -27,13 +28,14 @@ export default { ...@@ -27,13 +28,14 @@ export default {
onLoad(options) { onLoad(options) {
let params = JSON.parse(options.params); let params = JSON.parse(options.params);
this.liveId = params.liveId; this.liveId = params.liveId;
console.log(this.info, "--------------------126"); console.log(params, "--------------------126");
this.startTime = this.info.startTime; this.startTime = this.info.startTime;
}, },
mounted() {}, mounted() {},
methods: { methods: {
// 开播提醒 // 开播提醒
remind() { remind() {
let _this=this;
console.log("点击开播,'------------34"); console.log("点击开播,'------------34");
try { try {
const subscribeMessageObj = this.$store.state.subscribeMessageObj; const subscribeMessageObj = this.$store.state.subscribeMessageObj;
...@@ -53,6 +55,11 @@ export default { ...@@ -53,6 +55,11 @@ export default {
wx.requestSubscribeMessage({ wx.requestSubscribeMessage({
tmplIds: tmplIds, tmplIds: tmplIds,
success(res) { success(res) {
let query={
liveBroadcastId:Number(_this.liveId),
openId:wx.getStorageSync("openid"),
}
live.addLiveNoticeByCustomer(query).then(res=>{});
console.log("message success response: ", res); console.log("message success response: ", res);
}, },
fail(res) { fail(res) {
......
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 to comment