panhui 7 年 前
コミット
eae7dc36b7

+ 17 - 4
src/renderer/pages/Booking/OrderBookingStep3.vue

@@ -67,6 +67,7 @@ import choosePay from '../../components/ChoosePay'
 import { resolve } from 'url';
 import QrcodeVue from 'qrcode.vue';
 import { shell } from 'electron'
+import FileUploadService from '../../../service/FileUploadService'
 export default {
     name: 'orderBookingSteop3',
     data() {
@@ -75,14 +76,18 @@ export default {
             orderInfo: {},
             payStyle: 'sysMoney',  //sysMoney:余额,wxPay:微信支付,Alipay:支付宝支付
             wxPayCode: '',
-            wxPayPage: false
+            wxPayPage: false,
+
         }
     },
     computed: {
         ...mapState(['userInfo']),
         productInfo() {
             return this.orderInfo.productInfo || {}
-        }
+        },
+        userOrderList() {
+            return this.detail.userOrderList || []
+        },
     },
     components: { choosePay, QrcodeVue },
     async mounted() {
@@ -224,6 +229,7 @@ export default {
             this.loading = true
 
             this.checkPay().then(() => {
+                // this.upload()
                 this.loading = false
                 this.$message.success('支付成功');
                 this.$router.replace('/orderBookingStep4')
@@ -232,14 +238,21 @@ export default {
 
                 this.$alert('很遗憾未检测到该订单的支付结果。<br/>如果已经支付订单,可能存在网络延时,耐心等待几分钟;<br/>如果已经支付且长时间未显示支付完成,请保留支付流水找客服申诉哦!', '未检测到订单支付', {
                     confirmButtonText: '确定',
-                    dangerouslyUseHTMLString:true,
+                    dangerouslyUseHTMLString: true,
                     callback: action => {
-
                     }
                 });
 
             })
 
+        },
+        upload() {
+            var jsonp = {}
+            var userOrderList = [...this.userOrderList]
+            userOrderList.forEach(item => {
+                jsonp[item.zipName] = 'tutuxiangTest/' + this.productInfo.storeId + '/' + item.id
+            })
+            FileUploadService.uploadOrder('/Users/drew/Downloads/桌面客户端上传测试小', jsonp)
         }
     }
 }

+ 13 - 3
src/renderer/pages/Booking/OrderBookingStep4.vue

@@ -9,6 +9,7 @@
 
 <script>
 import { mapState } from 'vuex'
+import FileUploadService from '../../../service/FileUploadService'
 export default {
     name: '',
     data() {
@@ -20,9 +21,18 @@ export default {
         ...mapState(['userInfo']),
     },
     methods: {
-      upload(){
-        this.goNext('/uploading?id='+this.$route.query.id)
-      }
+        upload() {
+            this.goNext('/uploading?id=' + this.$route.query.id)
+        },
+        uploadInfo() {
+            var jsonp = {}
+            var userOrderList = [...this.userOrderList]
+            userOrderList.forEach(item => {
+                jsonp[item.zipName] = 'tutuxiangTest/' + this.productInfo.storeId + '/' + item.id
+            })
+            FileUploadService.uploadOrder('/Users/drew/Downloads/桌面客户端上传测试小', jsonp)
+        }
+
     }
 }
 </script>