|  | @@ -17,19 +17,14 @@
 | 
	
		
			
				|  |  |          </div>
 | 
	
		
			
				|  |  |          <div class="pay_collect" v-if="!Ispreview">
 | 
	
		
			
				|  |  |            <div class="price" v-if="!data.isPurchased">
 | 
	
		
			
				|  |  | -            ¥
 | 
	
		
			
				|  |  | -            <span class="price_1" v-text="changePrice('1', data.price)"></span>
 | 
	
		
			
				|  |  | -            <span class="price_2" v-text="changePrice('2', data.price)"></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">
 | 
	
	
		
			
				|  | @@ -51,9 +46,7 @@
 | 
	
		
			
				|  |  |        <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}`
 | 
	
	
		
			
				|  | @@ -79,14 +72,8 @@
 | 
	
		
			
				|  |  |          <!-- 点击购买 -->{{ $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"
 | 
	
	
		
			
				|  | @@ -101,11 +88,7 @@
 | 
	
		
			
				|  |  |        width="720px"
 | 
	
		
			
				|  |  |        :before-close="closePyment"
 | 
	
		
			
				|  |  |      >
 | 
	
		
			
				|  |  | -      <Payment
 | 
	
		
			
				|  |  | -        :data="data"
 | 
	
		
			
				|  |  | -        :orderNumber="orderNumber"
 | 
	
		
			
				|  |  | -        :closePyment="closePyment"
 | 
	
		
			
				|  |  | -      />
 | 
	
		
			
				|  |  | +      <Payment :data="data" :orderNumber="orderNumber" :closePyment="closePyment" />
 | 
	
		
			
				|  |  |      </el-dialog>
 | 
	
		
			
				|  |  |    </div>
 | 
	
		
			
				|  |  |  </template>
 | 
	
	
		
			
				|  | @@ -170,12 +153,7 @@ 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;
 | 
	
	
		
			
				|  | @@ -195,31 +173,23 @@ export default {
 | 
	
		
			
				|  |  |        }
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  |      // 处理价格
 | 
	
		
			
				|  |  | -    changePrice(type, item) {
 | 
	
		
			
				|  |  | -      if (item.indexOf(".") != -1) {
 | 
	
		
			
				|  |  | -        this.data.price = item.split(".")[0] + "." + item.split(".")[1];
 | 
	
		
			
				|  |  | -        if (type == 1) {
 | 
	
		
			
				|  |  | -          return item.split(".")[0];
 | 
	
		
			
				|  |  | -        } else if (type == 2) {
 | 
	
		
			
				|  |  | -          return "." + item.split(".")[1];
 | 
	
		
			
				|  |  | -        }
 | 
	
		
			
				|  |  | -      } else {
 | 
	
		
			
				|  |  | -        this.data.price = item + ".00";
 | 
	
		
			
				|  |  | -        if (type == 1) {
 | 
	
		
			
				|  |  | -          return item;
 | 
	
		
			
				|  |  | -        }
 | 
	
		
			
				|  |  | -        if (type == 2) {
 | 
	
		
			
				|  |  | -          return ".00";
 | 
	
		
			
				|  |  | -        }
 | 
	
		
			
				|  |  | -      }
 | 
	
		
			
				|  |  | +    changePrice(price, fontSize1, fontSize2) {
 | 
	
		
			
				|  |  | +      price = price ? price : "0";
 | 
	
		
			
				|  |  | +      price = price.toFixed(2);
 | 
	
		
			
				|  |  | +      price = price.toString();
 | 
	
		
			
				|  |  | +      let arr = price.split(".");
 | 
	
		
			
				|  |  | +      let str = `<span style="font-size: ${fontSize1 ? fontSize1 : 16}px;">${
 | 
	
		
			
				|  |  | +        arr[0]
 | 
	
		
			
				|  |  | +      }</span>.<span style="font-size: ${fontSize2 ? fontSize2 : 16}px;">${
 | 
	
		
			
				|  |  | +        arr[1]
 | 
	
		
			
				|  |  | +      }</span>`;
 | 
	
		
			
				|  |  | +      return str;
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  |      // 获取pdf的页数
 | 
	
		
			
				|  |  |      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) => {
 | 
	
	
		
			
				|  | @@ -318,12 +288,11 @@ 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();
 | 
	
		
			
				|  |  |              }
 | 
	
		
			
				|  |  | -            this.changePrice(this.data.price);
 | 
	
		
			
				|  |  | +            this.changePrice(this.data.price * 1, 24, 16);
 | 
	
		
			
				|  |  |            }
 | 
	
		
			
				|  |  |          })
 | 
	
		
			
				|  |  |          .catch((res) => {
 | 
	
	
		
			
				|  | @@ -520,4 +489,4 @@ export default {
 | 
	
		
			
				|  |  |  .cui-ribbonTopBars {
 | 
	
		
			
				|  |  |    display: none !important;
 | 
	
		
			
				|  |  |  }
 | 
	
		
			
				|  |  | -</style>
 | 
	
		
			
				|  |  | +</style>
 |