Преглед на файлове

Merge branch 'master' of http://git.izouma.com/xiongzhu/9th

panhui преди 4 години
родител
ревизия
44d7aa52d3
променени са 3 файла, в които са добавени 58 реда и са изтрити 18 реда
  1. 1 0
      src/main/pc-space/src/components/PageHeader.vue
  2. 5 2
      src/main/pc-space/src/views/AssetDetail.vue
  3. 52 16
      src/main/pc-space/src/views/Submit.vue

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

+ 52 - 16
src/main/pc-space/src/views/Submit.vue

@@ -52,16 +52,37 @@
                     <div class="pay-list">
                         <div class="pay-info">
                             <el-radio-group v-model="payMethods">
-                                <el-radio v-for="item in payList" border :label="item.type" :key="item.type">
+                                <el-radio
+                                    :disabled="flag"
+                                    v-for="item in payList"
+                                    border
+                                    :label="item.type"
+                                    :key="item.type"
+                                >
                                     <img :src="item.icon" alt="" />
                                     <span> {{ item.name }}</span>
                                 </el-radio>
                             </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 +90,6 @@
                                 >0</span
                             >{{ seconds }} 请尽快支付
                         </h3>
-                        <!-- <div class="qrcode-text">手机微信扫描二维码下单</div> -->
                     </div>
                 </div>
 
@@ -140,6 +160,7 @@ export default {
             org: '',
             empty: false,
             payMethods: 'WEIXIN',
+            flag: false,
             minters: 0,
             seconds: 0,
             allTime: 5 * 60 - 1,
@@ -151,12 +172,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 +189,12 @@ export default {
             info: {},
             gas: 0,
             id: 0,
-            status: ''
+            status: '',
+            payUrl2: ''
         };
     },
     computed: {
+        // 微信
         payUrl() {
             return resolveUrl(
                 this.$baseUrl,
@@ -277,9 +300,6 @@ export default {
         },
         all() {
             this.show2 = true;
-            // if (this.listAll.length === 0) {
-            //     this.empty = true;
-            // }
         },
         choose(info) {
             console.log(info);
@@ -288,6 +308,7 @@ export default {
         },
         handleClose() {
             this.show = false;
+            this.flag = false;
             if (this.payTimeout) {
                 clearInterval(this.payTimeout);
             }
@@ -296,10 +317,11 @@ export default {
             //监控支付状态
             this.payTimeout = setInterval(() => {
                 this.$http.get('/order/get/' + this.id).then(res => {
-                    console.log(res);
+                    // console.log(res);
                     if (res.status === 'FINISH') {
                         clearInterval(this.payTimeout);
                         this.show = false;
+                        this.flag = false;
                         setTimeout(() => {
                             this.init2();
                         }, 1000);
@@ -316,10 +338,12 @@ export default {
             }).then(() => {});
         },
         submit() {
+            // clearInterval(this.payTimeout);
             // console.log(this.$baseUrl);
             // if (this.payMethods === 'DCEP') {
             //     this.wait();
             // }
+            this.flag = true;
             let url = '/order/create?collectionId=' + this.$route.query.id + '&qty=1';
             if (this.couponInfo) {
                 url += '&couponId=' + this.couponInfo.id;
@@ -328,18 +352,27 @@ export default {
                 .post(url)
                 .then(res => {
                     if (this.money) {
-                        // 没有代金
+                        // 没有兑换
                         this.initTime(res.id, res.createdAt);
                         this.status = res.status;
                         this.id = res.id;
                         this.payWatch();
                     } else {
-                        // 有代金
+                        // 兑换
                         this.$message.success('支付成功');
                         setTimeout(() => {
                             this.$router.replace('/collectionorder');
                         }, 1000);
                     }
+                    if (this.payMethods === 'ALIPAY') {
+                        this.$http
+                            .get('/payOrder/alipay_qr', {
+                                id: res.id
+                            })
+                            .then(res => {
+                                this.payUrl2 = res;
+                            });
+                    }
                 })
                 .catch(e => {
                     if (e) {
@@ -403,6 +436,9 @@ export default {
 /deep/ .el-dialog__body {
     padding: 4px 20px 0;
 }
+/deep/ .el-radio__inner {
+    background-color: #fff !important;
+}
 .border {
     height: 1px;
     background: #f2f3f5;