Selaa lähdekoodia

测试问题修改

gcj 3 vuotta sitten
vanhempi
commit
283ca2fe4a

+ 23 - 10
src/components/inputModules/common/Header.vue

@@ -233,12 +233,25 @@ export default {
       getContentFile(MethodName, {})
         .then((res) => {
           if (res.child_sys_list && res.child_sys_list.length > 0) {
+            let invok_module = this.$route.query.invok_module;
             _this.projectList = res.child_sys_list;
-            _this.projectList.forEach((item, index) => {
-              if (item.key == "GCLS-Book") {
-                _this.LoginNavIndex = index;
+            for(let i = 0;i<_this.projectList.length;i++){
+              let item = _this.projectList[i];
+              if(invok_module){
+                if(invok_module==item.key){
+                  _this.LoginNavIndex = i;
+                  _this.projectName = item.name;
+                }
+              }else{
+                let key = "GCLS-Book";
+                if(key==item.key){
+                  _this.LoginNavIndex = i;
+                  _this.projectName = item.name;
+                }
               }
-            });
+              
+             
+            }
           }
         })
         .catch((err) => {
@@ -272,12 +285,12 @@ export default {
     let user = getToken();
     if (user) {
       _this.userMessage = JSON.parse(user);
-      let popedom_code_list = _this.userMessage.popedom_code_list;
-      if (popedom_code_list.indexOf(2000003) > -1) {
-        _this.projectName = "教材管理系统";
-      } else {
-        _this.projectName = "学习中心";
-      }
+      // let popedom_code_list = _this.userMessage.popedom_code_list;
+      // if (popedom_code_list.indexOf(2000003) > -1) {
+      //   _this.projectName = "教材管理系统";
+      // } else {
+      //   _this.projectName = "学习中心";
+      // }
       _this.getLangList();
       _this.getNotReadMessage();
       _this.headTimer = setInterval(() => {

+ 27 - 7
src/components/pyment/Confirmorder.vue

@@ -15,7 +15,7 @@
         <p class="p3">{{ data.author }}</p>
       </div>
       <div class="price">
-        <p>¥{{ data.price }}</p>
+        <p>¥<span v-html="changePrice(data.price,16 )"></span></p>
       </div>
     </div>
     <div class="promotionCode">
@@ -36,7 +36,7 @@
         <!-- 确定 -->
         {{ $t("Key94") }}</span
       >
-      <span class="sp2" v-else>-{{ discount_money }}</span>
+      <span class="sp2" v-else>-¥<span v-html="changePrice(discount_money,16)"></span></span>
     </div>
     <div class="total">
       <p class="p1">
@@ -45,21 +45,21 @@
 
           {{ $t("Key53") }}:</span
         >
-        <span class="co-value">¥{{ data.price }}</span>
+        <span class="co-value">¥<span v-html="changePrice(data.price,16)"></span></span>
       </p>
       <p class="p2">
         <span>
           <!-- 优惠折扣 -->
           {{ $t("Key54") }}:</span
         >
-        <span class="co-value">-¥{{ discount_money }}</span>
+        <span class="co-value">-¥<span v-html="changePrice(discount_money,16)"></span></span>
       </p>
       <p class="p3">
         <span>
           <!-- 应付  -->
           {{ $t("Key55") }}:</span
         >
-        <span class="co-value">¥{{ receivables_money }}</span>
+        <span class="co-value">¥<span v-html="changePrice(receivables_money,24)"></span></span>
       </p>
     </div>
     <div class="submitBtn">
@@ -79,6 +79,7 @@ export default {
   //import引入的组件需要注入到对象中才能使用
   components: {},
   props: ["data", "changeOrderNumber", "goods_type"],
+  
   data() {
     //这里存放数据
     return {
@@ -166,6 +167,18 @@ export default {
         this.receivables_money = res.receivables_money; // 应收款
       });
     },
+     changePrice(price,fontSize) {
+      let str = "";
+      price = price ? price.toString() : "0.00";
+      if (price.indexOf(".") > -1) {
+        let arr = price.split(".");
+        str = `<span style="font-size: ${fontSize?fontSize:16}px;">${arr[0]}</span>.<span style="font-size: 16px;">${arr[1]}</span>`;
+      } else {
+        str = `<span style="font-size: ${fontSize?fontSize:16}px;">${price}</span>.<span  style="font-size: 16px;">00</span>`;
+      }
+
+      return str;
+    },
   },
   //生命周期 - 创建完成(可以访问当前this实例)
   created() {},
@@ -240,13 +253,16 @@ export default {
       }
     }
     .price {
+      flex:1;
+      box-sizing:border-box;
+      padding-right: 16px;
       p {
-        margin-left: 67px;
         margin-top: 22px;
         font-weight: bold;
         font-size: 16px;
         text-align: right;
         color: #ff4c00;
+        line-height:150%;
       }
     }
   }
@@ -314,8 +330,11 @@ export default {
   .submitBtn {
     text-align: right;
     margin-top: 16px;
+    
     button {
-      width: 120px;
+      min-width: 120px;
+      box-sizing: border-box;
+      padding:0 16px;
       height: 40px;
       background: #ff9900;
 
@@ -326,6 +345,7 @@ export default {
       border: none;
       outline: none;
       cursor: pointer;
+      font-size:16px;
     }
   }
 }

+ 20 - 6
src/components/pyment/Payment.vue

@@ -15,7 +15,7 @@
         <p class="p3">{{ data.author }}</p>
       </div>
       <div class="price">
-        <p>¥{{ data.price }}</p>
+        <p>¥<span v-html="changePrice(data.price,16)"></span></p>
       </div>
     </div>
     <div class="pay-platform">
@@ -37,14 +37,14 @@
           <!-- 一件商品,总金额:  -->
           {{ $t("Key53") }}:</span
         >
-        <span class="co-value">¥{{ data.price }}</span>
+        <span class="co-value">¥<span v-html="changePrice(data.price,16)"></span></span>
       </p>
       <p class="p2">
         <span>
           <!-- 优惠折扣 -->
           {{ $t("Key54") }}:
         </span>
-        <span class="co-value">-¥{{ data.discount_money }}</span>
+        <span class="co-value">-¥<span v-html="changePrice(data.discount_money ,16)"></span></span>
       </p>
       <p class="p4">
         <span></span>
@@ -58,7 +58,7 @@
           <!-- 应付  -->
           {{ $t("Key55") }}:
         </span>
-        <span class="co-value">¥{{ data.receivables_money }}</span>
+        <span class="co-value">¥<span v-html="changePrice(data.receivables_money ,24)"></span></span>
       </p>
     </div>
     <div class="submitBtn">
@@ -122,6 +122,18 @@ export default {
           this.loading = false;
         });
     },
+    changePrice(price,fontSize) {
+      let str = "";
+      price = price ? price.toString() : "0.00";
+      if (price.indexOf(".") > -1) {
+        let arr = price.split(".");
+        str = `<span style="font-size: ${fontSize?fontSize:16}px;">${arr[0]}</span>.<span style="font-size: 16px;">${arr[1]}</span>`;
+      } else {
+        str = `<span style="font-size: ${fontSize?fontSize:16}px;">${price}</span>.<span  style="font-size: 16px;">00</span>`;
+      }
+
+      return str;
+    },
   },
   //生命周期 - 创建完成(可以访问当前this实例)
   created() {},
@@ -330,10 +342,12 @@ export default {
     text-align: right;
     margin-top: 16px;
     button {
-      width: 120px;
+      min-width: 120px;
+      box-sizing: border-box;
+      padding:0 16px;
+      font-size: 16px;
       height: 40px;
       background: #ff4d00;
-
       border-radius: 4px;
       color: white;
       line-height: 40px;

+ 18 - 3
src/permission.js

@@ -30,13 +30,23 @@ router.beforeEach(async(to, from, next) => {
                     next()
                 } catch (error) {
                     Message.error(error || 'Has Error')
-                    next(`/login?redirect=${to.path}`)
+                    // next(`/login?redirect=${to.path}`)
+                    if (process.env.NODE_ENV == "development") {
+                      next(`/login?redirect=${to.path}`)
+                    } else {
+                      window.location.href = "/"
+                    }
                     NProgress.done()
                 }
             }
         } else {
             removeToken();
-            next(`/login?redirect=${to.path}`)
+            //next(`/login?redirect=${to.path}`)
+            if (process.env.NODE_ENV == "development") {
+              next(`/login?redirect=${to.path}`)
+            } else {
+              window.location.href = "/"
+            }
             NProgress.done()
         }
     } else {
@@ -46,7 +56,12 @@ router.beforeEach(async(to, from, next) => {
             next()
         } else {
             // other pages that do not have permission to access are redirected to the login page.
-            next(`/login?redirect=${to.path}`)
+            //next(`/login?redirect=${to.path}`)
+            if (process.env.NODE_ENV == "development") {
+              next(`/login?redirect=${to.path}`)
+            } else {
+              window.location.href = "/"
+            }
             NProgress.done()
         }
     }

+ 3 - 2
src/views/TextbookDetail.vue

@@ -147,11 +147,12 @@
         ></BookView>
       </div>
       <div v-else class="Resources">
-        <div>
+      <!--没有数据-->
+        <!-- <div>
           <img src="../assets/textBookDetail/fileType1.png" alt="" />
           <span> 文件名 </span>
           <img src="../assets/textBookDetail/upload.png" alt="" />
-        </div>
+        </div> -->
       </div>
     </div>
     <!-- 商品详情 -->

+ 1 - 0
src/views/bookView.vue

@@ -12,6 +12,7 @@
             :book-id="bookId"
             :change-id="changeId"
             :changeTreeData="changeTreeData"
+            :currentTreeID="chapterId"
           />
         </div>
       </div>

+ 4 - 0
src/views/login.vue

@@ -418,6 +418,10 @@ $fc: rgb(24, 144, 255);
 .login-left {
   // flex: 1;
   margin: 0 auto;
+  display: flex;
+ flex-direction: column;
+  align-items: center;
+  justify-content: center;
 }
 .login-right {
   // flex: 1;

+ 1 - 1
vue.config.js

@@ -43,7 +43,7 @@ module.exports = {
       // change xxx-api/login => mock/login
       // detail: https://cli.vuejs.org/config/#devserver-proxy
       [process.env.VUE_APP_BASE_API]: {
-        target: `http://gcls.helxsoft.cn/`,
+        target: `http://gcls.utschool.cn/`,
         // target: `http://gcls.helxsoft.cn/`,
         changeOrigin: true,
         pathRewrite: {