7 Commits 4af15a75af ... ed29b37432

Author SHA1 Message Date
  c4az6 ed29b37432 好友助力模块上线 4 years ago
  c4az6 84e0c345ad 修改好友助力BUG 4 years ago
  c4az6 78d0cb6684 增加weixin js-sdk-1.6.0.js文件 4 years ago
  c4az6 dc54a3e7d8 Merge branch 'activityCenter' 4 years ago
  c4az6 39c415254d 好友助力模块迭代上线 4 years ago
  c4az6 fe87babcb3 修改好友助力部分 4 years ago
  c4az6 c301b9d295 修改好友助力跳转bug 4 years ago

+ 2 - 1
public/index.html

@@ -11,10 +11,11 @@
     <script charset="utf-8" src="https://map.qq.com/api/js?v=2.exp&key=LACBZ-MDX6W-NT3RH-OLECY-XVHD3-G5BKA"></script>
     <script type="text/javascript"
         src="https://api.map.baidu.com/api?v=2.0&ak=lvoePA4clqXo0Zad5GkrvziRmQ6b4q0X"></script>
-    <script type="text/javascript" src='https://res.wx.qq.com/open/js/jweixin-1.4.0.js'></script>
+    <!-- <script type="text/javascript" src='https://res.wx.qq.com/open/js/jweixin-1.4.0.js'></script> -->
     <script async src="//image.360lj.com/2020/01/Aliyun/es6-promise.min.js"></script>
     <script src="//image.360lj.com/2020/01/Aliyun/aliyun-upload-sdk-1.5.0.min.js"></script>
     <script src="//image.360lj.com/2020/01/Aliyun/aliyun-oss-sdk-5.3.1.min.js"></script>
+    <script src="//res.wx.qq.com/open/js/jweixin-1.6.0.js" type="text/javascript"></script>
     <!-- 添加百度统计前端埋点 -->
     <script>
         var _hmt = _hmt || [];

+ 18 - 20
src/views/activityCenter/friendHelp/friendHelp.vue

@@ -80,40 +80,37 @@
       async handleHelpClick() {
         let state = this.getUrlParams('state')
         console.log("state", state)
-        switch (state) {
-          case '0':
-            this.$toast('已关注的老用户,不可助力!')
-            break;
-          case '1':
-            this.$toast('您已助力!')
-            break;
-          case '2':
-            this.isLoading = true
-            let obj = {}
-            obj.acjoinId = this.acjoinId
-            obj.unionid = this.getUrlParams('unionid')
-            const { data: response } = await reqHelper(obj)
-            if(response.success!==1) {
+
+        if (state === '1') {
+          this.$toast('您已助力')
+        } else if (state === '0' || state === '2') {
+          this.isLoading = true
+          let obj = {}
+          obj.acjoinId = this.acjoinId
+          obj.unionid = this.getUrlParams('unionid')
+          const { data: response } = await reqHelper(obj)
+          if (response.success !== 1) {
+            setTimeout(() => {
               this.$toast(response.message)
-              this.isLoading = false
+            }, 1000);
+            console.log(response.message)
+            if (this.skiptype === 'view') {
               // 跳转H5网页
               setTimeout(() => {
                 window.location.href = this.pathlink
               }, 1000);
-              return
             }
+          } else {
             this.$toast('助力成功!')
-            this.isLoading = false
-            break
+          }
         }
+        this.isLoading = false
         // 跳转H5页面或者微信小程序
         if (this.skiptype === 'view') {
           // 跳转H5网页
           setTimeout(() => {
             window.location.href = this.pathlink
           }, 1000);
-        } else {
-          // 跳转微信小程序
         }
       }
     },
@@ -130,6 +127,7 @@
       })
     },
     created() {
+      console.log("comming...")
       this.acjoinId = this.getUrlParams('acjoinId')
       this.getActivityInfo()
 

+ 10 - 3
src/views/activityCenter/friendHelp/myHelp.vue

@@ -157,7 +157,6 @@
         } catch (error) {
           if (error.message !== 'endIterative') throw error
         }
-        console.log(`下一个奖品的邀请人数以及奖品的索引位置: ${tempNum}, ${tempIndex}`)
         // maxInviteNum:最后一个奖品所需要邀请的人数
         if (this.inviteObj.helpcount >= this.maxInviteNum) {
           tempNum = this.maxInviteNum
@@ -194,13 +193,22 @@
         // 显示领取奖励弹窗
         const { data: response } = await reqJudgeMobileIsNull({ unionid: this.unionid })
         console.log("领取奖品,判断手机号接口: ", response)
-        if (!response.result) return window.location.href = `https://mem.360lj.com/ym/ymallWechat/code?redirectCode=activityIndex&id=${this.id}`
+        if(process.env.VUE_APP_Name == "测试环境" || process.env.VUE_APP_Name == "开发环境") {
+          if (!response.result) return window.location.href = `https://mem.360lj.com/ym2/ymallWechat/code?redirectCode=activityIndex&id=${this.id}`
+        }else {
+          if (!response.result) return window.location.href = `https://mem.360lj.com/ym/ymallWechat/code?redirectCode=activityIndex&id=${this.id}`
+        }
         this.getPrizeModal = true
       },
       // 监听立即邀请按钮点击事件
       handleInviteClick() {
         let { begintime, endtime } = this.baseInfoObj
         const nowtime = new Date().getTime()
+        begintime = begintime.replace(/-/g, "/");
+        endtime = endtime.replace(/-/g, "/");
+        console.log('开始时间: ', begintime)
+        console.log('结束时间: ', endtime)
+        console.log("当前时间: ", nowtime)
         if (new Date(begintime).getTime() < nowtime && nowtime < new Date(endtime).getTime()) {
           // 活动进行中.
           this.createImage()
@@ -211,7 +219,6 @@
         } else {
           this.$toast('活动未开始')
         }
-
       }
     },
     mounted() {