Bläddra i källkod

Merge branch 'feature_20250331_日报分享' into uat(dev)

# Conflicts:
#	public/index.html
zhujindu 7 månader sedan
förälder
incheckning
d16e1adcb6
5 ändrade filer med 34 tillägg och 31 borttagningar
  1. 2 2
      .env.production
  2. 4 4
      .env.test
  3. 6 5
      public/index.html
  4. 4 0
      src/permission.js
  5. 18 20
      src/views/week/dailyHistoricalDetails.vue

+ 2 - 2
.env.production

@@ -7,11 +7,11 @@ ENV = 'production'
 
 # 正式环境
 VUE_APP_Target=https://ssbsfa.nipponpaint.com.cn
-VUE_APP_SSB_LINK=http://suishenbang.nipponpaint.com.cn
+VUE_APP_SSB_LINK=https://suishenbang.nipponpaint.com.cn
 VUE_APP_XD_LINK=http://b2b.nipponpaint.com.cn
 # 测试环境
 # VUE_APP_Target=https://ssbsfatest.nipponpaint.com.cn 
-# VUE_APP_SSB_LINK=http://suishenbangtest.nipponpaint.com.cn
+# VUE_APP_SSB_LINK=https://suishenbangtest.nipponpaint.com.cn
 # VUE_APP_XD_LINK=http://b2btest.nipponpaint.com.cn
 VUE_APP_BASE_API='/ssbsfa/'
 devtool=cheap-module-source-map

+ 4 - 4
.env.test

@@ -3,19 +3,19 @@ VUE_APP_TITLE = 门店拜访
 ENV = 'test'
 
 # 本地开发环境配置
-# VUE_APP_Target=http://192.168.100.191:9560/
-# VUE_APP_SSB_LINK=http://suishenbangtest.nipponpaint.com.cn
+# VUE_APP_Target=https://192.168.100.191:9560/
+# VUE_APP_SSB_LINK=https://suishenbangtest.nipponpaint.com.cn
 # VUE_APP_XD_LINK=http://b2btest.nipponpaint.com.cn
 # VUE_APP_BASE_API = '/'
 #测试环境
 VUE_APP_Target=https://ssbsfatest.nipponpaint.com.cn
-VUE_APP_SSB_LINK=http://suishenbangtest.nipponpaint.com.cn
+VUE_APP_SSB_LINK=https://suishenbangtest.nipponpaint.com.cn
 VUE_APP_XD_LINK=http://b2btest.nipponpaint.com.cn
 VUE_APP_BASE_API = '/ssbsfa/'
 
 # 正式环境
 # VUE_APP_Target=https://ssbsfa.nipponpaint.com.cn
-# VUE_APP_SSB_LINK=http://suishenbang.nipponpaint.com.cn
+# VUE_APP_SSB_LINK=https://suishenbang.nipponpaint.com.cn
 # VUE_APP_XD_LINK=http://b2b.nipponpaint.com.cn
 # VUE_APP_BASE_API='/ssbsfa/'
 # 路由懒加载

+ 6 - 5
public/index.html

@@ -19,11 +19,12 @@
     </noscript>
     <div id="app"></div>
     <script>
-      if (GetQueryValue('loginName') != null) {
-        localStorage.removeItem('loginType');
-        localStorage.setItem('loginName', GetQueryValue('loginName'));
-        location.href = location.href.split('?')[0] + '?v=' + new Date().getTime();
-      }
+      //   if (GetQueryValue('loginName') != null) {
+      //     localStorage.removeItem('loginType');
+      //     localStorage.setItem('loginName', GetQueryValue('loginName'));
+      //     let href = location.href.split('?');
+      //     location.href = href[0] + '?v=' + new Date().getTime() + '&' + href[1];
+      //   }
       function GetQueryValue(queryName) {
         var query = decodeURI(window.location.search.substring(1));
         var vars = query.split('&');

+ 4 - 0
src/permission.js

@@ -4,6 +4,10 @@ import store from './store';
 const whiteList = ['/login', '/auth-redirect', '/bind', '/register'];
 
 router.beforeEach((to, from, next) => {
+  let queryLoginName = to.query.loginName || null;
+  if (queryLoginName) {
+    localStorage.setItem('loginName', queryLoginName);
+  }
   const username = localStorage.getItem('loginName');
   if (username) {
     /* has token*/

+ 18 - 20
src/views/week/dailyHistoricalDetails.vue

@@ -806,9 +806,21 @@ export default {
         message: '加载中...',
         forbidClick: true,
       });
-      getDetailById({ reportId: this.$route.query.reportId })
-        .then((res) => {
-          loading1.clear();
+      getDetailById({ reportId: this.$route.query.reportId }).then((res) => {
+        loading1.clear();
+        if (res.code == 500 && this.source == 'share') {
+          this.$dialog
+            .confirm({
+              title: '系统提示',
+              message: res.msg,
+              showCancelButton: false,
+            })
+            .then(() => {
+              this.$router.replace({
+                path: '/home',
+              });
+            });
+        } else {
           this.GZQuota = false;
           this.JZQuota = false;
           this.YFQuota = res.data.postType == 'YF' ? true : false;
@@ -854,22 +866,8 @@ export default {
             }
           }
           this.imgList = imgList;
-        })
-        .catch((err) => {
-          if (err.code == 500 && this.source == 'share') {
-            this.$dialog
-              .confirm({
-                title: '系统提示',
-                message: '没有权限',
-                showCancelButton: false,
-              })
-              .then(() => {
-                this.$router.push({
-                  path: '/home',
-                });
-              });
-          }
-        });
+        }
+      });
     },
     userTodayPlanNum() {
       userTodayPlanNum().then((res) => {
@@ -885,7 +883,7 @@ export default {
     },
     onClickLeft() {
       if (this.source == 'share') {
-        this.$router.push({
+        this.$router.replace({
           path: '/subordinateHistoricalDaily',
         });
       } else {