From 014d19782d262ba7c6303a62ecd1f60d7f5abef6 Mon Sep 17 00:00:00 2001 From: yujialong <479214531@qq.com> Date: Thu, 27 Apr 2023 11:17:03 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B6=E8=97=8F=E5=AD=A6=E4=B9=A0=E8=AF=BE?= =?UTF-8?q?=E7=A8=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apis/modules/article.js | 4 ++++ config/request.js | 6 ++--- order/orderDetail/orderDetail.vue | 21 ++++++++++++++--- pages/study/study.vue | 18 +++++++++++---- team/article/article.vue | 38 ++++++++++--------------------- 5 files changed, 50 insertions(+), 37 deletions(-) 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 @@