xuqiang 4 лет назад
Родитель
Сommit
ee0dcd1b09

+ 1 - 0
src/main/pc-space/src/components/PageHeader.vue

@@ -185,6 +185,7 @@ export default {
             let menus = [...this.menus];
             menus.forEach(item => {
                 let _route = this.parsePath(item.value);
+                // console.log(_route);
                 if (this.$route.path == _route.path && Object.keys(_route.query).length === 0) {
                     this.activeName = item.value;
                 } else if (this.$route.path == _route.path) {

+ 5 - 2
src/main/pc-space/src/views/AssetDetail.vue

@@ -1185,6 +1185,7 @@ export default {
                 border-left: 7px solid transparent;
                 border-right: 7px solid transparent;
                 border-bottom: 10px solid #fff;
+                z-index: 9999;
                 content: '';
                 display: block;
                 position: absolute;
@@ -1212,6 +1213,7 @@ export default {
                 border-left: 7px solid transparent;
                 border-right: 7px solid transparent;
                 border-bottom: 10px solid #fff;
+                z-index: 9999;
                 content: '';
                 display: block;
                 position: absolute;
@@ -1507,13 +1509,14 @@ export default {
                         font-size: @menuFont1;
                         font-weight: normal;
                         color: #939599;
-                        line-height: 22px;
+                        line-height: 17px;
+                        margin-top: 5px;
                     }
                     .box3 {
                         font-size: @menuFont1;
                         font-weight: normal;
                         color: #ffffff;
-                        line-height: 22px;
+                        line-height: 17px;
                     }
                 }
             }

+ 51 - 17
src/main/pc-space/src/views/Submit.vue

@@ -59,9 +59,24 @@
                             </el-radio-group>
                         </div>
                     </div>
-                    <div v-if="status == 'NOT_PAID'">
+                    <!-- <div v-if="status === 'NOT_PAID'">
+                        <vue-qrcode :value="payUrl2" :options="{ width: 140, margin: 1 }" class="code"></vue-qrcode>
+                    </div> -->
+
+                    <div v-if="status === 'NOT_PAID'">
                         <div class="qrcode">
-                            <vue-qrcode :value="payUrl" :options="{ width: 140, margin: 1 }" class="code"></vue-qrcode>
+                            <vue-qrcode
+                                v-if="payMethods === 'WEIXIN'"
+                                :value="payUrl"
+                                :options="{ width: 140, margin: 1 }"
+                                class="code"
+                            ></vue-qrcode>
+                            <vue-qrcode
+                                v-if="payMethods === 'ALIPAY'"
+                                :value="payUrl2"
+                                :options="{ width: 140, margin: 1 }"
+                                class="code"
+                            ></vue-qrcode>
                         </div>
                         <h3 class="qrcode-text">
                             二维码有效时常为5分钟,<span v-if="minters < 10">0</span>{{ minters }}分<span
@@ -69,7 +84,6 @@
                                 >0</span
                             >{{ seconds }} 请尽快支付
                         </h3>
-                        <!-- <div class="qrcode-text">手机微信扫描二维码下单</div> -->
                     </div>
                 </div>
 
@@ -151,12 +165,12 @@ export default {
                     icon: require('../assets/weixin.png'),
                     name: '微信',
                     type: 'WEIXIN'
+                },
+                {
+                    icon: require('../assets/alipay.png'),
+                    name: '支付宝',
+                    type: 'ALIPAY'
                 }
-                // {
-                //     icon: require('../assets/alipay.png'),
-                //     name: '支付宝',
-                //     type: 'ALIPAY'
-                // },
 
                 // {
                 //     icon: require('../assets/dcep.png'),
@@ -168,10 +182,12 @@ export default {
             info: {},
             gas: 0,
             id: 0,
-            status: ''
+            status: '',
+            payUrl2: ''
         };
     },
     computed: {
+        // 微信
         payUrl() {
             return resolveUrl(
                 this.$baseUrl,
@@ -327,19 +343,37 @@ export default {
             this.$http
                 .post(url)
                 .then(res => {
-                    if (this.money) {
-                        // 没有代金券
-                        this.initTime(res.id, res.createdAt);
-                        this.status = res.status;
-                        this.id = res.id;
-                        this.payWatch();
-                    } else {
-                        // 有代金券
+                    // 代金券
+                    if (!this.money) {
                         this.$message.success('支付成功');
                         setTimeout(() => {
                             this.$router.replace('/collectionorder');
                         }, 1000);
                     }
+                    if (this.payMethods === 'WEIXIN') {
+                        if (this.money) {
+                            // 没有代金券
+                            this.initTime(res.id, res.createdAt);
+                            this.status = res.status;
+                            this.id = res.id;
+                            this.payWatch();
+                        }
+                    } else {
+                        if (this.money) {
+                            // 没有代金券
+                            this.initTime(res.id, res.createdAt);
+                            this.status = res.status;
+                            this.id = res.id;
+                            this.payWatch();
+                        }
+                        this.$http
+                            .get('/payOrder/alipay_qr', {
+                                id: res.id
+                            })
+                            .then(res => {
+                                this.payUrl2 = res;
+                            });
+                    }
                 })
                 .catch(e => {
                     if (e) {