Quellcode durchsuchen

价格没有二维码则不显示

zhanghe vor 6 Jahren
Ursprung
Commit
76fd8e2eab

+ 7 - 3
src/stage/index/scene/ScanToPayScene.js

@@ -19,7 +19,7 @@ class ScanToPayScene extends scene {
         /* 课程包价格列表 */
         const goodsListHTMLContainer = [];
         let firstGoodsPrice = '';
-        let firstGoodsQR = 'resources/test_qr_1/15271483255269086.png';
+        let firstGoodsQR;
         packagePrices.forEach((goodsItem, index) => {
             const { id, chargeUnit, terminalPrice, recommend, shopQR } = goodsItem;
             if (index === 0) {
@@ -49,6 +49,10 @@ class ScanToPayScene extends scene {
             }
             goodsListHTMLContainer.push(itemHTML);
         });
+		let shopQRHTML = '';
+		if (firstGoodsQR) {
+			shopQRHTML = `<img src="${Consts.IMG_PATH}/${firstGoodsQR}" alt="" />`;
+		}
         const contentHTML = `
             <div class="pkg-title">《${packageName}》课程包:共${courseNum}个课程</div>
             <div class="pkg-content">${courseListHTMLContainer.join('')}</div>
@@ -56,7 +60,7 @@ class ScanToPayScene extends scene {
             <div class="scroll-list">${goodsListHTMLContainer.join('')}</div>
             </div>
             <div class="shop-qr">
-                <div class="shop-qr-img"><img src="${Consts.IMG_PATH}/${firstGoodsQR}" alt="" /></div>
+                <div class="shop-qr-img">${shopQRHTML}</div>
                 <div class="shop-qr-desc">微信/支付宝扫码支付<span class="price">${firstGoodsPrice}元</span></div>
             </div>
         `;
@@ -111,7 +115,7 @@ class ScanToPayScene extends scene {
                 let { terminalPrice, shopQR } = this.goodsArr[index];
                 let qrDescDom = document.querySelector('.price');
                 let qrImgDom = document.querySelector('.shop-qr-img');
-                let qrImgHTML = `<img src="${Consts.IMG_PATH}/resources/test_qr_1/15271483255269086.png" alt="" />`;
+                let qrImgHTML = '';
                 if (shopQR) {
                     qrImgHTML = `<img src="${Consts.IMG_PATH}/${shopQR}" alt="" />`;
                 }

+ 1 - 1
src/stage/index/scene/WaterFallIndexScene.js

@@ -51,7 +51,7 @@ class WaterfallIndexScene extends scene {
     		this.moye.root.getWidgetById(this.firstCourseItemId).focus();
     	}
         // 推荐列表渲染完成后,请求待续费产品列表
-        // this.fetchRenewProductList();
+        this.fetchRenewProductList();
     }
 
     fetchAdvertList() {

+ 2 - 2
src/util/API/APIClient.js

@@ -83,7 +83,7 @@ class APIClient {
 		params = APIClient.addCacheParam(params);
 		AJAXHelper.get(`/tag/${tagId}`, params, callback);
 	}
-	
+
 	// 获取推荐海报列表
 	static getRecommendPosters(callback) {
 		let params = APIClient.addCacheParam({});
@@ -99,7 +99,7 @@ class APIClient {
 	// 获取待续费产品列表
 	static getRenewProductList(callback) {
 		let params = APIClient.addCacheParam({});
-		AJAXHelper.get('/user/message/productExpiredAlert', params, callback);
+		AJAXHelper.get('/user/messages/productExpiredAlert', params, callback);
 	}
 
 	// 获取还未过期产品列表

+ 1 - 1
src/util/course.js

@@ -221,7 +221,7 @@ class Course {
 		detailContent.setAttribute('id', 'periphery-detail-content');
 		detailContent.setAttribute('fe-role', 'Switch');
 
-		let shopQRImg = shopQR ? `<img src="${IMG_PATH}/${shopQR}" alt="" />` : '';
+		let shopQRImg = shopQR ? `<img src="${Consts.IMG_PATH}/${shopQR}" alt="" />` : '';
 		let list = '';
 		list = `
 			<div id="periphery-detail-wrapper-${id}" class="periphery-detail-wrapper">