|
@@ -251,7 +251,7 @@
|
|
|
</div>
|
|
|
<div class="screenshot-money">金额 <i class="num">¥{{formatPrice(paymentForm.money, -1, true)}}</i></div>
|
|
|
<div class="screenshot-code">
|
|
|
- <img :src="'data:image/png;base64,' + paymentForm.imgCode">
|
|
|
+ <img :src="paymentForm.imgCode">
|
|
|
</div>
|
|
|
<p class="screenshot-tip">使用手机{{paymentForm.mode === '1' ? '微信' : '支付宝'}}扫描二维码支付</p>
|
|
|
<p class="screenshot-date">此二维码有效期截至到:{{ dateFormatter(paymentForm.expire * 1000, 'yyyy年MM月dd日') || '--'}}</p>
|
|
@@ -277,6 +277,7 @@ import { copyImage } from '@/utils/copy'
|
|
|
// import { Loading } from 'element-ui';
|
|
|
import vCascader from '@/components/cascader'
|
|
|
import { getChannelCode, formatPrice, debounce } from '@/utils/globalFun'
|
|
|
+import QRCode from 'qrcode'
|
|
|
export default {
|
|
|
props: {
|
|
|
data: {},
|
|
@@ -718,10 +719,21 @@ export default {
|
|
|
this.getPayOrderInfo('getPay', this.paymentForm.money, this.paymentForm.mode)
|
|
|
} else if (doType === 'getPay') {
|
|
|
this.paymentLoading = false
|
|
|
- this.paymentForm.imgCode = res.data.product
|
|
|
+ // this.paymentForm.imgCode = res.data.product
|
|
|
this.paymentForm.expire = res.data.expire
|
|
|
+ QRCode.toDataURL(res.data.product,{
|
|
|
+ color: {
|
|
|
+ dark:"#000000",
|
|
|
+ light:"#FFFFFF"
|
|
|
+ }
|
|
|
+ }).then((url) => {
|
|
|
+ // 获取到url后即可在页面使用--二维码图片
|
|
|
+ this.paymentForm.imgCode = url
|
|
|
+ }).catch((e) => {
|
|
|
+ console.log('e', e)
|
|
|
+ this.$toast('二维码转换失败')
|
|
|
+ })
|
|
|
}
|
|
|
-
|
|
|
}
|
|
|
}).error(() => { }).post()
|
|
|
},
|
|
@@ -1011,7 +1023,7 @@ export default {
|
|
|
border-radius: 12px;
|
|
|
text-align: center;
|
|
|
color: #171826;
|
|
|
- font-size: 14px;
|
|
|
+ font-size: 16px;
|
|
|
p{
|
|
|
line-height: 24px;
|
|
|
}
|