Explorar el Código

fix: 活动中心 分享后价格为0的活动 进行支付校验

Cooklalala hace 1 año
padre
commit
4ba2bb12f7
Se han modificado 2 ficheros con 23 adiciones y 12 borrados
  1. 20 9
      orderPages/activityDetail/activityDetail.vue
  2. 3 3
      storePages/rights/index.vue

+ 20 - 9
orderPages/activityDetail/activityDetail.vue

@@ -388,7 +388,6 @@ export default {
     },
 
     beforeCommitOrder() {
-
       if (!this.userInfo.phone) {
         uni.showModal({
           title: '温馨提示',
@@ -454,14 +453,26 @@ export default {
         console.log('++++++++++++++++++订单提交+++++++++++', res)
         uni.hideLoading();
         this.subOrderNo = res.data.data.orderNo
-        if (this.activity.salePrice * 1 > 0) {
-          this.$refs.myPay.openPopup()
-        } else {
-          uni.showToast({
-            duration: 2000,
-            title: '活动参与成功!'
-          });
-          this.isActivityCheck = true
+        if(this.isShare){
+          if (this.activity.sharePrice * 1 > 0 ) {
+            this.$refs.myPay.openPopup()
+          } else {
+            uni.showToast({
+              duration: 2000,
+              title: '活动参与成功!'
+            });
+            this.isActivityCheck = true
+          }
+        }else {
+          if (this.activity.salePrice * 1 > 0 ) {
+            this.$refs.myPay.openPopup()
+          } else {
+            uni.showToast({
+              duration: 2000,
+              title: '活动参与成功!'
+            });
+            this.isActivityCheck = true
+          }
         }
         this.requestStatus = false
       }).catch(err => {

+ 3 - 3
storePages/rights/index.vue

@@ -135,7 +135,7 @@
 export default {
   data() {
     return {
-      selectServiceObjectIndex:-1,
+      selectServiceObjectIndex: -1,
       selectIcon: '',
       windowHeight: '',
       windowHeight1: '',
@@ -177,7 +177,7 @@ export default {
         url: '/myPages/TermsOfService/index?name=' + '娇骄儿权益服务协议' + '&type=' + 4
       })
     },
-    closeSelectServiceObjectPopup(){
+    closeSelectServiceObjectPopup() {
       this.selectServiceObjectIndex = -1
       this.$refs.selectObjectPopup.close()
     },
@@ -283,7 +283,7 @@ export default {
 
     confirm(e) {
       console.log(e)
-      if(!e){
+      if (!e) {
         uni.showToast({
           duration: 2000,
           title: '请选择一个服务对象',