瀏覽代碼

🎨 按要求更换大标题

快乐的梦鱼 17 小時之前
父節點
當前提交
03c138da8b
共有 3 個文件被更改,包括 13 次插入5 次删除
  1. 5 1
      src/api/system/ConfigurationApi.ts
  2. 5 1
      src/api/system/DefaultConfiguration.json
  3. 3 3
      src/pages/home/index.vue

+ 5 - 1
src/api/system/ConfigurationApi.ts

@@ -18,7 +18,11 @@ export interface IBannerItem {
 export interface IConfigurationItem {
   banners: {
     homeTop: string;
-    homeTitle: string;
+    homeTitle: {
+      url: string;
+      width: number;
+      height: number;
+    };
     home: IBannerItem;
     dig: IBannerItem;
     discover: IBannerItem;

+ 5 - 1
src/api/system/DefaultConfiguration.json

@@ -1,7 +1,11 @@
 {
   "banners": {
     "homeTop": "https://xy.wenlvti.net/app_static/images/home/BannerHomeNew.png",
-    "homeTitle": "https://xy.wenlvti.net/app_static/images/home/BannerHomeTitle.png",
+    "homeTitle": {
+      "width": 140,
+      "height": 75,
+      "url": "https://xy.wenlvti.net/app_static/images/home/BannerHomeTitle.png"
+    },
     "home": {
       "height": 460,
       "images": [

+ 3 - 3
src/pages/home/index.vue

@@ -18,9 +18,9 @@
             :text="currentCity"
           />
           <Image
-            :src="appConfiguration?.banners.homeTitle"
-            :width="140"
-            :height="75"
+            :src="appConfiguration?.banners.homeTitle.url"
+            :width="appConfiguration?.banners.homeTitle.width || 140"
+            :height="appConfiguration?.banners.homeTitle.height || 75"
           />
           <Width :width="150" />
         </FlexRow>