Explorar o código

4.0.75 修改登录和菜单logo获取路径

liuyanpeng hai 1 ano
pai
achega
b19f330244
Modificáronse 3 ficheiros con 28 adicións e 3 borrados
  1. 1 1
      package.json
  2. 26 1
      src/client/Login.vue
  3. 1 1
      src/client/MenuWidget.vue

+ 1 - 1
package.json

@@ -1,7 +1,7 @@
 {
   "name": "client-base-v4",
   "description": "Leanwo Prodog Client",
-  "version": "4.0.74",
+  "version": "4.0.75",
   "author": "yangzhijie1488 <yangzhijie1488@163.com>",
   "scripts": {
     "dev": "cross-env webpack serve --config ./webpack.dev.js",

+ 26 - 1
src/client/Login.vue

@@ -16,9 +16,10 @@
               <h1>
                 <img
                   alt=""
-                  src="/static/assets/client-base-v4/image/template-logo.png"
+                  :src="logoUrl"
                   style="margin-top: -40px; width: 100px; height: 100px"
                 />
+                <!-- src="/static/assets/client-base-v4/image/template-logo.png" -->
                 <div class="desc" data-v-7b9d9b52="">
                   Prodog 希望帮助您更好的管理物料
                 </div>
@@ -234,6 +235,7 @@ export default {
       authSetting: [],
       getImageSrc,
       backgroundImageUrl: '/static/assets/client-base-v4/image/background.svg',
+      logoUrl: '', // logo路径
     };
   },
 
@@ -262,12 +264,35 @@ export default {
     this.queryAllAuthSetting();
     this.unqiueAccountManagementDto();
 
+    this.getLogoName();
+    
     this.getCurrentDate();
 
     this.showLeanwoText = CustomerEnvironment.LOGIN_SHOW_LEANWO_TEXT;
   },
 
   methods: {
+
+    // 查询系统logo
+    getLogoName: function () {
+      const _self = this;
+      $.ajax({
+        type: 'GET',
+        url: Common.getApiURL('clientLogoResource/selectByClientId?logoName=mainLogoName'),
+        dataType: 'json',
+        beforeSend: function (request) {
+          Common.addTokenToRequest(request);
+        },
+        success: function (res) {
+          if (res.errorCode === 0) {
+            _self.logoUrl = `/Files/0/Images/com.leanwo.prodog.system.model.ClientLogo/${res.data.imageName}`;
+          }
+        },
+        error: function (XMLHttpRequest, textStatus, errorThrown) {
+          Common.processException(XMLHttpRequest, textStatus, errorThrown);
+        },
+      });
+    },
     initView: function () {
       var _self = this;
       const storageInfo = LoginService.restoreFromLocalStorage();

+ 1 - 1
src/client/MenuWidget.vue

@@ -353,7 +353,7 @@ export default {
       const _self = this;
       $.ajax({
         type: 'GET',
-        url: Common.getApiURL('clientLogoResource/selectByClientId'),
+        url: Common.getApiURL('clientLogoResource/selectByClientId?logoName=menuLogoName'),
         dataType: 'json',
         beforeSend: function (request) {
           Common.addTokenToRequest(request);