xsh 1 jaar geleden
bovenliggende
commit
92255352d1
2 gewijzigde bestanden met toevoegingen van 17 en 15 verwijderingen
  1. 17 14
      src/pages/WineDetailPage.vue
  2. 0 1
      src/pages/WineOutPage.vue

+ 17 - 14
src/pages/WineDetailPage.vue

@@ -196,15 +196,20 @@ export default {
         this.$utils.Wines[Index].cash =  Math.floor((Math.floor(this.wine.price * this.$utils.loginCount.discount / 1000) / 100) * this.selected * 100)
         this.$utils.EventBus["debug"](`name: ${this.$utils.Wines[Index].name}, weight: ${this.$utils.Wines[Index].weight}, cash: ${this.$utils.Wines[Index].cash}`);
         // this.$emit("detail2pay", Index);
-        // this.$utils.SendWss({event: 'vipConsume', data: {
-        //     device: this.$utils.deviceId,
-        //     user: this.$utils.loginCount.user,
-        //     cell: Index,
-        //     cash: this.$utils.Wines[Index].cash,
-        //     weight: this.$utils.Wines[Index].weight
-        // }})
-        if(this.$utils.loginCount.remain / 100 < this.$utils.Wines[Index].cash) {
+        if(this.$utils.loginCount.remain < this.$utils.Wines[Index].cash) {
           this.showType = true
+        } else {
+          this.$utils.SendWss({event: 'vipConsume', data: {
+              device: this.$utils.deviceId,
+              cell: Index,
+              cash: this.$utils.Wines[Index].cash,
+              wine: this.$utils.Wines[Index].id,
+              weight: this.$utils.Wines[Index].weight,
+              useraccount: this.$utils.loginCount.useraccount ?  this.$utils.loginCount.useraccount  : '',
+              currvpdm: this.$utils.loginCount.currvpdm ?  this.$utils.loginCount.currvpdm : '',
+              userid: this.$utils.loginCount.userid ?  this.$utils.loginCount.userid : '',
+              paymethod: 1
+          }})
         }
       } else {
         this.$utils.EventBus["debug"]("detail page try buy called");
@@ -218,17 +223,15 @@ export default {
         this.$emit("detail2pay", Index);
       }
     },
-    _vipConsume(info) {
-      if(info.status) {
-        if(info.data.status) {
-          this._onOrderPayed(info.data.data)
-        } else {
+    _vipConsume(res) {
+      if(res.status) {
+        this._onOrderPayed(res.data)
+      } else {
           this.$utils.EventBus["ShowAlert"]({
             title: "温馨提示", subtitle: "支付失败", color: "deepskyblue", icon: this.get_icon("finish"),
             button: {need: true, text: "返 回 列 表", countdown: 10}, callback: () => this.$emit("out2list")
           });
         }
-      }
     },
     _onOrderPayed(volume) {
       if (volume === undefined) {

+ 0 - 1
src/pages/WineOutPage.vue

@@ -199,7 +199,6 @@ export default {
       });
       // 提交订单id 给小余
 
-        console.log('2212454')
         this.$utils.SendWss({
           event: "balanceAll",
           data: {