diff --git a/apis/modules/article.js b/apis/modules/article.js index a3683b2..c67ac27 100644 --- a/apis/modules/article.js +++ b/apis/modules/article.js @@ -19,4 +19,8 @@ export const schemeList = data => { export const schemeFindById = id => { return post('nakadai/nakadai/partner/schemeManagement/findById?id=' + id) +} + +export const collectCourse = (id, state) => { + return post('nakadai/nakadai/partner/article/management/collectCourse?contentId=' + id + '&state=' + state) } \ No newline at end of file diff --git a/config/request.js b/config/request.js index 1d9b09f..6748186 100644 --- a/config/request.js +++ b/config/request.js @@ -5,9 +5,9 @@ */ export default { - // baseURL: 'https://huorantech.cn/', - // baseURL: 'http://192.168.31.117:9000/', - baseURL: 'http://121.37.12.51/', + baseURL: 'https://huorantech.cn/', + // baseURL: 'http://192.168.31.151:9000/', + // baseURL: 'http://121.37.12.51/', headers: { 'Content-Type': 'application/json;charset=UTF-8' }, diff --git a/order/orderDetail/orderDetail.vue b/order/orderDetail/orderDetail.vue index b5cb1f5..3ff63d2 100644 --- a/order/orderDetail/orderDetail.vue +++ b/order/orderDetail/orderDetail.vue @@ -505,6 +505,23 @@ handleErr(val) { if (val === this.err) this.err = '' }, + // 消息推送授权 + publicNotice() { + uni.requestSubscribeMessage({ + tmplIds: ['8pDVfWYqh9c-nn3CeA1NXM58pmoyQXZzkVnRFKy_l2A'], + success: (res) => { + uni.navigateBack() + }, + fail: function(err) { + uni.showToast({ + title: err, + duration: 2000, + icon: 'error' + }); + } + }) + + }, // 提交 submit() { const { form, courses } = this @@ -542,9 +559,7 @@ add(data).then(res => { uni.hideLoading() this.$util.sucMsg('添加成功') - setTimeout(() => { - uni.navigateBack() - }, 1500) + this.publicNotice() }).catch(res => { uni.hideLoading() }) diff --git a/pages/study/study.vue b/pages/study/study.vue index ee95ad9..721db2b 100644 --- a/pages/study/study.vue +++ b/pages/study/study.vue @@ -27,10 +27,10 @@ {{ item.learnerNumber }}人学过 - + + + {{ item.collectionNumber }} + 上次阅读 @@ -51,7 +51,7 @@