1
0
mirror of https://github.com/ialley-workshop-open/uni-halo.git synced 2026-06-12 13:19:31 +08:00

release: 发布 uni-halo beta-v2.0 版本

This commit is contained in:
小莫唐尼
2024-05-20 01:27:15 +08:00
parent a81c506a14
commit 057a7cf6f0
49 changed files with 2696 additions and 2531 deletions
+2 -2
View File
@@ -37,7 +37,7 @@ export const _DefaultAppSettings = {
},
// 评论弹幕(文章详情)
barrage: {
use: true, // 是否启用
use: false, // 是否启用
type: 'leftBottom' // 弹幕位置(rightToLeft leftBottom
},
gallery: {
@@ -51,7 +51,7 @@ export const _DefaultAppSettings = {
},
about: {
showAdmin: false, // 显示后台登录入口
showAllCount: true, // 默认显示所有的统计信息(关于页面)
showAllCount: false, // 默认显示所有的统计信息(关于页面)
},
// 文章配置
article: {
+6 -11
View File
@@ -11,6 +11,7 @@
*/
import HaloConfig from '@/config/halo.config.js';
import HaloTokenConfig from '@/config/token.config.js'
import {
logTypes,
logUtils
@@ -27,22 +28,16 @@ const utils = {
// 检查链接
checkUrl: function(url) {
if (!url) return '';
if (!this.checkIsUrl(url)) return HaloConfig.apiUrl + url;
if (!this.checkIsUrl(url)) return HaloTokenConfig.BASE_API + url;
return url
},
// 检查封面图
checkThumbnailUrl: function(thumbnail, mustRealUrl = false) {
console.log("thumbnail",thumbnail)
if (!thumbnail && mustRealUrl) {
return HaloConfig.defaultStaticThumbnailUrl
}
if (!HaloConfig.defaultThumbnailUrl) {
// logUtils.saveLog(logTypes.config, {
// path: 'checkThumbnailUrl',
// page: 'checkThumbnailUrl',
// msg: '未配置默认的封面图,配置参数【HaloConfig.defaultThumbnailUrl】'
// })
}
let _url = HaloConfig.defaultThumbnailUrl
if (_url) {
if (_url.indexOf('?') == -1) {
@@ -52,7 +47,7 @@ const utils = {
}
}
if (!thumbnail) return _url;
if (!this.checkIsUrl(thumbnail)) return HaloConfig.apiUrl + thumbnail;
if (!this.checkIsUrl(thumbnail)) return HaloTokenConfig.BASE_API + thumbnail;
return thumbnail
},
@@ -67,7 +62,7 @@ const utils = {
}
}
if (!image) return _url;
if (!this.checkIsUrl(image)) return HaloConfig.apiUrl + image;
if (!this.checkIsUrl(image)) return HaloTokenConfig.BASE_API + image;
return image
},
@@ -85,7 +80,7 @@ const utils = {
}
return _url;
}
if (!this.checkIsUrl(avatar)) return HaloConfig.apiUrl + avatar;
if (!this.checkIsUrl(avatar)) return HaloTokenConfig.BASE_API + avatar;
return avatar
},