Ver código fonte

Merge branch 'dev/v2.4.44_yf' of jianyu/qmx_page_admin into feature/v2.4.44

yangfeng 7 meses atrás
pai
commit
6c873009d6
3 arquivos alterados com 354 adições e 341 exclusões
  1. 2 1
      package.json
  2. 16 4
      src/views/order/components/detailModel.vue
  3. 336 336
      yarn.lock

+ 2 - 1
package.json

@@ -10,7 +10,6 @@
   "dependencies": {
     "@jy/pc-ui": "^0.0.3",
     "@tinymce/tinymce-vue": "^3",
-    "tinymce": "^5.10.3",
     "axios": "^0.19.0",
     "cascader-multi": "^2.0.3",
     "clipboard": "^2.0.11",
@@ -22,7 +21,9 @@
     "lodash": "^4.17.15",
     "marked": "^0.7.0",
     "qiankun": "^2.4.0",
+    "qrcode": "^1.5.4",
     "qs": "^6.9.0",
+    "tinymce": "^5.10.3",
     "view-design": "^4.4.0",
     "vue": "^2.6.10",
     "vue-router": "^3.1.3",

+ 16 - 4
src/views/order/components/detailModel.vue

@@ -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;
     }

Diferenças do arquivo suprimidas por serem muito extensas
+ 336 - 336
yarn.lock


Alguns arquivos não foram mostrados porque muitos arquivos mudaram nesse diff