鏡像自
https://github.com/ialley-workshop-open/uni-halo.git
已同步 2026-06-12 13:19:31 +08:00
!25 支持文章自定义验证码获取方式、优化友链提交页面
* fix(提交链接): 修复博客 logo 显示问题 * feat(plugin): 重构友链提交插件配置 * feat(api): 为 restrict-read 请求添加微信会话 ID 并支持自定义验证码类型
此提交包含在:
@@ -194,6 +194,7 @@ export default {
|
|||||||
return HttpHandler.Get(`/apis/tools.muyin.site/v1alpha1/restrict-read/create`, null, {
|
return HttpHandler.Get(`/apis/tools.muyin.site/v1alpha1/restrict-read/create`, null, {
|
||||||
header: {
|
header: {
|
||||||
'Authorization': getAppConfigs().pluginConfig.toolsPlugin?.Authorization,
|
'Authorization': getAppConfigs().pluginConfig.toolsPlugin?.Authorization,
|
||||||
|
'Wechat-Session-Id': uni.getStorageSync('openid'),
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|||||||
+4
-1
@@ -8,7 +8,10 @@ export const DefaultAppConfigs = {
|
|||||||
imagesConfig: {},
|
imagesConfig: {},
|
||||||
authorConfig: {},
|
authorConfig: {},
|
||||||
appConfig: {},
|
appConfig: {},
|
||||||
pluginConfig: {},
|
pluginConfig: {
|
||||||
|
toolsPlugin: {},
|
||||||
|
linksSubmitPlugin: {},
|
||||||
|
},
|
||||||
pageConfig: {}
|
pageConfig: {}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -483,7 +483,11 @@ export default {
|
|||||||
const restrictRead = checkPostRestrictRead(this.result);
|
const restrictRead = checkPostRestrictRead(this.result);
|
||||||
|
|
||||||
if (restrictRead && toolsPluginEnabled) {
|
if (restrictRead && toolsPluginEnabled) {
|
||||||
const verifyCodeType = getAppConfigs().pluginConfig.toolsPlugin?.verifyCodeType;
|
let verifyCodeType = getAppConfigs().pluginConfig.toolsPlugin?.verifyCodeType;
|
||||||
|
const postVerifyCodeType = this.result?.metadata?.annotations?.verifyCodeType;
|
||||||
|
if (postVerifyCodeType) {
|
||||||
|
verifyCodeType = postVerifyCodeType;
|
||||||
|
}
|
||||||
if (verifyCodeType === 'scan') {
|
if (verifyCodeType === 'scan') {
|
||||||
const scanCodeUrl = getAppConfigs().pluginConfig.toolsPlugin?.scanCodeUrl;
|
const scanCodeUrl = getAppConfigs().pluginConfig.toolsPlugin?.scanCodeUrl;
|
||||||
this.verificationCodeModal.type = 'scan';
|
this.verificationCodeModal.type = 'scan';
|
||||||
|
|||||||
@@ -65,7 +65,7 @@
|
|||||||
|
|
||||||
<!-- 返回顶部 -->
|
<!-- 返回顶部 -->
|
||||||
<tm-flotbutton color="light-blue" @click="fnToTopPage" size="m" icon="icon-angle-up"></tm-flotbutton>
|
<tm-flotbutton color="light-blue" @click="fnToTopPage" size="m" icon="icon-angle-up"></tm-flotbutton>
|
||||||
<tm-flotbutton v-if="haloPluginConfigs.submitLink.enabled" :offset="[16,80]" label="申请"
|
<tm-flotbutton v-if="haloPluginConfigs.linksSubmitPlugin.enabled" :offset="[16,80]" label="申请"
|
||||||
actions-pos="left" :show-text="true" color="bg-gradient-orange-accent"
|
actions-pos="left" :show-text="true" color="bg-gradient-orange-accent"
|
||||||
@click="toSubmitLinkPage"></tm-flotbutton>
|
@click="toSubmitLinkPage"></tm-flotbutton>
|
||||||
<!-- 详情弹窗 -->
|
<!-- 详情弹窗 -->
|
||||||
|
|||||||
@@ -53,7 +53,7 @@
|
|||||||
<view class="poup pa-36" scroll-y="auto">
|
<view class="poup pa-36" scroll-y="auto">
|
||||||
<view class="info flex">
|
<view class="info flex">
|
||||||
<view class="poup-logo pa-4 shadow-24">
|
<view class="poup-logo pa-4 shadow-24">
|
||||||
<image :src="blogDetail.blogLogo" class="poup-logo_img" mode="aspectFill"></image>
|
<image :src="$utils.checkAvatarUrl(blogDetail.blogLogo)" class="poup-logo_img" mode="aspectFill"></image>
|
||||||
</view>
|
</view>
|
||||||
<view class="pl-24 info-detail">
|
<view class="pl-24 info-detail">
|
||||||
<view class="poup-name text-size-lg text-weight-b">{{ blogDetail.blogName }}</view>
|
<view class="poup-name text-size-lg text-weight-b">{{ blogDetail.blogName }}</view>
|
||||||
@@ -97,6 +97,7 @@ import tmPoup from '@/tm-vuetify/components/tm-poup/tm-poup.vue'
|
|||||||
import tmImages from '@/tm-vuetify/components/tm-images/tm-images.vue'
|
import tmImages from '@/tm-vuetify/components/tm-images/tm-images.vue'
|
||||||
import tmTags from '@/tm-vuetify/components/tm-tags/tm-tags.vue'
|
import tmTags from '@/tm-vuetify/components/tm-tags/tm-tags.vue'
|
||||||
import tmCoupon from '@/tm-vuetify/components/tm-coupon/tm-coupon.vue'
|
import tmCoupon from '@/tm-vuetify/components/tm-coupon/tm-coupon.vue'
|
||||||
|
import $utils from "@/utils";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
@@ -128,11 +129,14 @@ export default {
|
|||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
$utils() {
|
||||||
|
return $utils
|
||||||
|
},
|
||||||
haloPluginConfigs(){
|
haloPluginConfigs(){
|
||||||
return this.$tm.vx.getters().getConfigs.pluginConfig;
|
return this.$tm.vx.getters().getConfigs.pluginConfig;
|
||||||
},
|
},
|
||||||
blogDetail() {
|
blogDetail() {
|
||||||
return this.haloPluginConfigs.submitLink;
|
return this.haloPluginConfigs.linksSubmitPlugin;
|
||||||
},
|
},
|
||||||
calcSiteThumbnail(val) {
|
calcSiteThumbnail(val) {
|
||||||
return val => {
|
return val => {
|
||||||
@@ -147,13 +151,13 @@ export default {
|
|||||||
return `
|
return `
|
||||||
博客名称:${this.blogDetail.blogName}
|
博客名称:${this.blogDetail.blogName}
|
||||||
博客地址:${this.blogDetail.blogUrl}
|
博客地址:${this.blogDetail.blogUrl}
|
||||||
博客logo:${this.blogDetail.blogLogo}
|
博客logo:${$utils.checkAvatarUrl(this.blogDetail.blogLogo)}
|
||||||
博客简介:${this.blogDetail.blogDesc}
|
博客简介:${this.blogDetail.blogDesc}
|
||||||
`
|
`
|
||||||
},
|
},
|
||||||
calcBlogCoupon() {
|
calcBlogCoupon() {
|
||||||
return {
|
return {
|
||||||
img: this.blogDetail.blogLogo,
|
img: $utils.checkAvatarUrl(this.blogDetail.blogLogo),
|
||||||
title: this.blogDetail.blogName,
|
title: this.blogDetail.blogName,
|
||||||
time: this.blogDetail.blogDesc,
|
time: this.blogDetail.blogDesc,
|
||||||
btnText: '友链详情'
|
btnText: '友链详情'
|
||||||
|
|||||||
新增問題並參考
封鎖使用者