Browse Source

更新router

gcj 3 years ago
parent
commit
e2f0e31b49
2 changed files with 38 additions and 9 deletions
  1. 1 0
      src/router/index.js
  2. 37 9
      src/views/teacher-dev/Preview.vue

+ 1 - 0
src/router/index.js

@@ -35,6 +35,7 @@ const routes = [{
         path: "/Preview",
         query: {
           id: to.query.goods_id,
+          invok_module: to.query.invok_module
         },
       })
       loadingInstance.close()

+ 37 - 9
src/views/teacher-dev/Preview.vue

@@ -18,13 +18,20 @@
         <div class="pay_collect" v-if="!Ispreview">
           <div class="price" v-if="!data.isPurchased">
             ¥
-            <span class="price_1" v-html="changePrice(data.price * 1, 24, 16)"></span>
+            <span
+              class="price_1"
+              v-html="changePrice(data.price * 1, 24, 16)"
+            ></span>
           </div>
           <div class="pay" @click="buy" v-if="!data.isPurchased">
             <!-- 购买 -->{{ $t("Key72") }}
           </div>
           <div class="download" v-if="data.isPurchased && IsDownload">
-            <img @click="download" src="../../assets/teacherdev/download.png" alt="" />
+            <img
+              @click="download"
+              src="../../assets/teacherdev/download.png"
+              alt=""
+            />
             <!-- <span>DOWNLOAD</span> -->
           </div>
           <div class="collect">
@@ -46,7 +53,9 @@
       <div :class="data.isPurchased || Ispreview ? 'buy' : 'NObuy'">
         <!--fileUrl需要改成安全地址 file_url_https -->
         <iframe
-          v-if="attachment[0].fileType != 'pdf' && attachment[0].fileType != 'PDF'"
+          v-if="
+            attachment[0].fileType != 'pdf' && attachment[0].fileType != 'PDF'
+          "
           :src="
             'https://view.officeapps.live.com/op/view.aspx?src=' +
             `${attachment[0].fileUrlHttps}`
@@ -72,8 +81,14 @@
         <!-- 点击购买 -->{{ $t("Key574") }}
       </div>
     </div>
-    <el-dialog :visible.sync="NopymentShow" width="720px" :before-close="closeNoPyment">
-      <div class="dialogTitle" slot="title"><!-- 商品详情 -->{{ $t("Key52") }}</div>
+    <el-dialog
+      :visible.sync="NopymentShow"
+      width="720px"
+      :before-close="closeNoPyment"
+    >
+      <div class="dialogTitle" slot="title">
+        <!-- 商品详情 -->{{ $t("Key52") }}
+      </div>
       <Confirmorder
         ref="Confirmorder"
         :data="data"
@@ -88,7 +103,11 @@
       width="720px"
       :before-close="closePyment"
     >
-      <Payment :data="data" :orderNumber="orderNumber" :closePyment="closePyment" />
+      <Payment
+        :data="data"
+        :orderNumber="orderNumber"
+        :closePyment="closePyment"
+      />
     </el-dialog>
   </div>
 </template>
@@ -153,7 +172,12 @@ export default {
         `/GCLSFileServer/WebFileDownload?UserCode=${data.UserCode}&UserType=${data.UserType}&SessionID=${data.SessionID}&FileID=${data.FileID}`;
     },
     // 生成订单 同时切换到支付弹窗
-    changeOrderNumber(val, back_discount_code, discount_money, receivables_money) {
+    changeOrderNumber(
+      val,
+      back_discount_code,
+      discount_money,
+      receivables_money
+    ) {
       this.orderNumber = val;
       this.NopymentShow = false;
       this.data.back_discount_code = back_discount_code;
@@ -189,7 +213,9 @@ export default {
     getNumPages() {
       this.loading = true;
       let _this = this;
-      let loadingTask = pdf.createLoadingTask(_this.attachment[0].fileRelativePath);
+      let loadingTask = pdf.createLoadingTask(
+        _this.attachment[0].fileRelativePath
+      );
 
       loadingTask.promise
         .then((pdf) => {
@@ -288,7 +314,8 @@ export default {
               // this.attachment[0].fileRelativePath =
               //   process.env.VUE_APP_BASE_API + this.attachment[0].fileRelativePath;
               this.attachment[0].fileRelativePath =
-                process.env.VUE_APP_PDF_API + this.attachment[0].fileRelativePath;
+                process.env.VUE_APP_PDF_API +
+                this.attachment[0].fileRelativePath;
               console.log(this.attachment[0].fileRelativePath);
               this.getNumPages();
             }
@@ -307,6 +334,7 @@ export default {
         "Key8",
         "Key9",
         "Key39",
+        "Key43",
         "Key52",
         "Key53",
         "Key54",