Commit e9ecca37 by 李嘉林

开播提醒

parent 24134a16
......@@ -53,4 +53,8 @@ export default {
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 @@
</template>
<script type="text/ecmascript-6">
import live from "@/api/live";
import timeDown from "@/components/livedModel/timeDown";
export default {
props: ["info"],
......@@ -27,13 +28,14 @@ export default {
onLoad(options) {
let params = JSON.parse(options.params);
this.liveId = params.liveId;
console.log(this.info, "--------------------126");
console.log(params, "--------------------126");
this.startTime = this.info.startTime;
},
mounted() {},
methods: {
// 开播提醒
remind() {
let _this=this;
console.log("点击开播,'------------34");
try {
const subscribeMessageObj = this.$store.state.subscribeMessageObj;
......@@ -53,6 +55,11 @@ export default {
wx.requestSubscribeMessage({
tmplIds: tmplIds,
success(res) {
let query={
liveBroadcastId:Number(_this.liveId),
openId:wx.getStorageSync("openid"),
}
live.addLiveNoticeByCustomer(query).then(res=>{});
console.log("message success response: ", 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