From 4747d593be6855542c7227d089708e2b95fcf311 Mon Sep 17 00:00:00 2001 From: liuyiwuqing <1520431201@qq.com> Date: Mon, 27 May 2024 22:29:15 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E6=96=87=E7=AB=A0=E8=AE=BF?= =?UTF-8?q?=E9=97=AE=E9=AA=8C=E8=AF=81=E7=A0=81=E5=8A=9F=E8=83=BD=20?= =?UTF-8?q?=E4=BD=BF=E7=94=A8=E6=95=99=E7=A8=8B=EF=BC=9Ahttps://blog.muyin?= =?UTF-8?q?.site/archives/3gysn5O9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/v2/all.api.js | 31 ++- config/ad.config.template.js | 3 +- pages.json | 7 + pagesA/advertise/advertise.vue | 142 ++++++++++++++ pagesA/article-detail/article-detail.vue | 235 +++++++++++++++-------- 5 files changed, 339 insertions(+), 79 deletions(-) create mode 100644 pagesA/advertise/advertise.vue diff --git a/api/v2/all.api.js b/api/v2/all.api.js index 42550df..2d5890a 100644 --- a/api/v2/all.api.js +++ b/api/v2/all.api.js @@ -20,7 +20,11 @@ export default { * @param {String} name 分类名称 */ getPostByName: (name) => { - return HttpHandler.Get(`/apis/api.content.halo.run/v1alpha1/posts/${name}`, {}) + return HttpHandler.Get(`/apis/api.content.halo.run/v1alpha1/posts/${name}`, {}, { + header: { + 'Wechat-Session-Id': uni.getStorageSync('openid'), + } + }) }, /** @@ -140,4 +144,29 @@ export default { getFriendLinkList: (params) => { return HttpHandler.Get(`/apis/api.plugin.halo.run/v1alpha1/plugins/PluginLinks/links`, params) }, + + + /** + * 校验文章访问密码 + */ + checkPostVerifyCode: (verifyCode, postId) => { + return HttpHandler.Get(`/tools/verificationCode/check?code=${verifyCode}`, null, { + header: { + 'Authorization': 'Tools工具箱插件设置的认证token', + 'Wechat-Session-Id': uni.getStorageSync('openid'), + 'Post-Id': postId + } + }) + }, + + /** + * 获取文章验证码 + */ + getPostVerifyCode: () => { + return HttpHandler.Get(`/tools/verificationCode/create`, null, { + header: { + 'Authorization': 'Tools工具箱插件设置的认证token' + } + }) + }, } \ No newline at end of file diff --git a/config/ad.config.template.js b/config/ad.config.template.js index 3aeef49..b019649 100644 --- a/config/ad.config.template.js +++ b/config/ad.config.template.js @@ -9,5 +9,6 @@ export default { title: 'uni-halo 正式开源啦,欢迎来使用和体验!', content: '基于 uni-app + halo1.x API 实现一款现代化的开源博客 / CMS 系统API开发的多端应用。功能包括:前台博客系统 和 后台管理系统,同时满足浏览和管理两端合一的需求,真正实现一个应用实现博客浏览和后台管理。', url: 'https://uni-halo.925i.cn' - } + }, + rewardedVideoAd: '微信小程序激励广告id' // 奖励视频广告 } \ No newline at end of file diff --git a/pages.json b/pages.json index 793a4fe..7afa52f 100644 --- a/pages.json +++ b/pages.json @@ -266,6 +266,13 @@ { "navigationBarTitleText" : "" } + }, + { + "path": "advertise/advertise", + "style": { + "navigationBarTitleText": "广告页面", + "enablePullDownRefresh": false + } }] }, { diff --git a/pagesA/advertise/advertise.vue b/pagesA/advertise/advertise.vue new file mode 100644 index 0000000..6e36446 --- /dev/null +++ b/pagesA/advertise/advertise.vue @@ -0,0 +1,142 @@ + + + + + \ No newline at end of file diff --git a/pagesA/article-detail/article-detail.vue b/pagesA/article-detail/article-detail.vue index 7c56d08..4cab8f6 100644 --- a/pagesA/article-detail/article-detail.vue +++ b/pagesA/article-detail/article-detail.vue @@ -76,13 +76,16 @@ - - + + + + 以下内容已隐藏,请验证后查看完整内容…… +