|
@@ -4,16 +4,28 @@ const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
|
|
|
__name: "index",
|
|
|
setup(__props) {
|
|
|
var _a, _b, _c;
|
|
|
- (_a = common_vendor.getCurrentInstance()) == null ? void 0 : _a.appContext.config.globalProperties.$api;
|
|
|
+ const $api = (_a = common_vendor.getCurrentInstance()) == null ? void 0 : _a.appContext.config.globalProperties.$api;
|
|
|
(_b = common_vendor.getCurrentInstance()) == null ? void 0 : _b.appContext.config.globalProperties.$app;
|
|
|
(_c = common_vendor.getCurrentInstance()) == null ? void 0 : _c.appContext.config.globalProperties.$config;
|
|
|
- const config = common_vendor.ref({ logoUrl: [] });
|
|
|
+ const config = common_vendor.ref({ logo: [] });
|
|
|
common_vendor.onLoad(async () => {
|
|
|
await searchConfig();
|
|
|
await search();
|
|
|
});
|
|
|
const searchConfig = async () => {
|
|
|
- config.value = common_vendor.index.getStorageSync("config");
|
|
|
+ let res = await $api(`config`, "GET", {});
|
|
|
+ if (res.errcode == 0) {
|
|
|
+ config.value = res.data;
|
|
|
+ common_vendor.index.setStorage({
|
|
|
+ key: "config",
|
|
|
+ data: res.data,
|
|
|
+ success: function(arr) {
|
|
|
+ },
|
|
|
+ fail: function(err) {
|
|
|
+ console.log(err);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
};
|
|
|
const search = async () => {
|
|
|
common_vendor.index.getStorage({
|
|
@@ -43,7 +55,7 @@ const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
|
|
|
};
|
|
|
return (_ctx, _cache) => {
|
|
|
return {
|
|
|
- a: config.value.logoUrl || "/static/logo.png"
|
|
|
+ a: config.value.logo[0].url || "/static/logo.png"
|
|
|
};
|
|
|
};
|
|
|
}
|