소스 검색

Merge branch 'feature/双11' of Software/android-cloud-H5 into develop

huangxiaojing 2 년 전
부모
커밋
2f0cfce14e
2개의 변경된 파일27개의 추가작업 그리고 36개의 파일을 삭제
  1. 16 33
      pages/activity/doubleEleven/index.vue
  2. 11 3
      pages/activity/doubleEleven/pc.vue

+ 16 - 33
pages/activity/doubleEleven/index.vue

@@ -37,7 +37,7 @@
             <div class="tips">{{item.couponExplain}}</div>
             <div class="number">剩余数量:{{item.remainder}}张</div>
           </div>
-          <div v-if="item.receivingStatus===1 || 1===1" class="btn" @click="receiveCouponRewards(item)"></div>
+          <div v-if="item.receivingStatus===1" class="btn" @click="receiveCouponRewards(item)"></div>
           <div v-else-if="item.receivingStatus===2" class="btn-collect"></div>
           <div v-else-if="item.receivingStatus===3" class="btn-nocoupon"></div>
         </div>
@@ -91,7 +91,7 @@ import { Toast } from 'vant';
 const RSA = require('../../../plugins/wx_rsa');
 const webUni = require('../../../plugins/uni');
 export default {
-  name: 'Lottery',
+  name: 'doubleEleven',
   auth: false,
   components: {
   },
@@ -128,6 +128,7 @@ export default {
       this.client = 7;
     }
 
+    this.visit()
 
   },
   head: {
@@ -138,23 +139,15 @@ export default {
     setInterval(() => {
       _this.getCoupons()
     }, 600000);
-    this.makePoint('优惠券')
   },
   methods: {
-    makePoint(positionButton) {
-      const now = new Date();
-      this.$axios.$post('/public/v5/buriedPointRecord/reportRecords', [
+    visit() {
+      this.$axios.$post('/user/v5/userAccess/user/visit', 
         {
-          client: this.client,
-          eventCode: '优惠券',
-          userName: this.$auth.user.username,
-          positionButton,
-          operationTime: now
-            .toISOString()
-            .replace(/T/g, ' ')
-            .replace(/\.[\d]{3}Z/, ''),
+          loginType: this.token ? 1 : 2,
+          accessType: 13
         },
-      ]);
+      );
     },
     goOrder()
     {
@@ -164,26 +157,16 @@ export default {
         } else if (this.$userAgent.isSzx && this.$userAgent.isAndroid) {
           window.native.startPurchasePage(productId);
         } else if (this.$userAgent.isSzx && this.$userAgent.isIos) {
-          window.webkit.messageHandlers.activity202211.postMessage({productId});
+          window.webkit.messageHandlers.activity202211.postMessage(productId);
         } else if (this.$userAgent.isMiniProgram) {
-          // this.$wx.miniProgram.navigateTo({
-          //   url:
-          //     '/packageA/order/status/index?record=' +
-          //     JSON.stringify({
-          //       payActive: this.payType === 'wxPay' ? 1 : 0,
-          //       myOrderNum: res.data.myOrderNum,
-          //     }),
-          // });
+          this.$wx.miniProgram.navigateTo({
+            url:
+              '/packageA/order/buy/index',
+          });
         } else {
-          // // 使用postMessage 方法可以发送消息到应用, 消息内容需要在data 对象中,否则webview无法接收到
-          // webUni.webView.postMessage({
-          //   data: {
-          //     payType: this.payType === 'aliPay' ? 3 : 2,
-          //     orderNum: res.data.myOrderNum,
-          //     buyType: 1,
-          //     price: this.actualPrice,
-          //   },
-          // });
+          webUni.webView.navigateTo({
+            url: '/pages/order/order?productId=' + productId
+          });
         }
     },
     async getCoupons()

+ 11 - 3
pages/activity/doubleEleven/pc.vue

@@ -37,7 +37,7 @@
               <div class="tips">{{item.couponExplain}}</div>
               <div class="number">剩余数量:{{item.remainder}}张</div>
             </div>
-            <div v-if="item.receivingStatus===1 || 1===1" class="btn" @click="receiveCouponRewards(item)"></div>
+            <div v-if="item.receivingStatus===1" class="btn" @click="receiveCouponRewards(item)"></div>
             <div v-else-if="item.receivingStatus===2" class="btn-collect"></div>
             <div v-else-if="item.receivingStatus===3" class="btn-nocoupon"></div>
           </div>
@@ -91,7 +91,7 @@
   const RSA = require('../../../plugins/wx_rsa');
   const webUni = require('../../../plugins/uni');
   export default {
-    name: 'Lottery',
+    name: 'doubleEleven',
     auth: false,
     components: {
     },
@@ -127,7 +127,7 @@
       } else {
         this.client = 7;
       }
-  
+      this.visit()
   
     },
     head: {
@@ -140,6 +140,14 @@
       }, 600000);
     },
     methods: {
+    visit() {
+      this.$axios.$post('/user/v5/userAccess/user/visit', 
+        {
+          loginType: this.token ? 1 : 2,
+          accessType: 13
+        },
+      );
+    },
       goOrder()
       {
         const productId = !this.coupons.products || this.coupons.products.split(',').length > 1 ? -1 : parseInt(this.coupons.products)