다음의 미러
https://github.com/ialley-workshop-open/uni-halo.git
동기화됨 2026-06-10 11:59:28 +08:00
refactor: 将页面配置通过插件动态化配置(plugin-uni-halo)
이 커밋은 다음에 포함됨:
@@ -1,7 +1,5 @@
|
||||
<script>
|
||||
import HaloTokenConfig from '@/config/token.config.js';
|
||||
import HaloConfig from '@/config/halo.config.js';
|
||||
import HaloAdConfig from '@/config/ad.config.js';
|
||||
|
||||
// app升级检测(搭配:https://ext.dcloud.net.cn/plugin?id=4470 升级中心)
|
||||
import CheckAppUpdate from '@/uni_modules/uni-upgrade-center-app/utils/check-update';
|
||||
@@ -10,9 +8,7 @@
|
||||
} from '@/utils/update.js';
|
||||
export default {
|
||||
globalData: {
|
||||
baseApiUrl: HaloTokenConfig.BASE_API,
|
||||
...HaloConfig,
|
||||
haloAdConfig: HaloAdConfig
|
||||
baseApiUrl: HaloTokenConfig.BASE_API
|
||||
},
|
||||
onLaunch: function() {
|
||||
console.log('App Launch');
|
||||
@@ -23,20 +19,14 @@
|
||||
|
||||
// #ifdef MP-WEIXIN
|
||||
CheckWxUpdate();
|
||||
uni.$tm.vx.commit('setWxShare', HaloConfig.wxShareConfig);
|
||||
// #endif
|
||||
|
||||
// 监听中间按钮(暂时没有使用)
|
||||
uni.onTabBarMidButtonTap(() => {
|
||||
console.log('点击中间按钮');
|
||||
});
|
||||
|
||||
// 初始化博主信息
|
||||
uni.$tm.vx.actions('blogger/fnGetBlogger');
|
||||
|
||||
// 临时:检查是否有用户,没有的话添加一个默认的用户
|
||||
uni.$tm.vx.actions('user/checkAndSetDefaultUser');
|
||||
|
||||
uni.$tm.vx.actions('config/fetchConfigs').then((res) => {
|
||||
console.log('正常:', res)
|
||||
// #ifdef MP-WEIXIN
|
||||
uni.$tm.vx.commit('setWxShare', res.shareConfig);
|
||||
// #endif
|
||||
})
|
||||
// 启动检查app的配置是否已经就绪,若未就绪则设置默认的
|
||||
uni.$tm.vx.actions('setting/checkAndSetDefaultAppSettings');
|
||||
},
|
||||
|
||||
새 이슈에서 참조
사용자 차단