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