Эх сурвалжийг харах

Merge remote-tracking branch 'origin/feature/v4.7.15' into feature/v4.7.15

wangkaiyue 3 жил өмнө
parent
commit
c25bfb4557

+ 7 - 7
src/jfw/modules/app/src/app/front/logoffuser.go

@@ -117,18 +117,18 @@ func LogOffAppUser(user_id, cause string) bool {
 	//存库
 	ok := mongodb.Save("delete_user", delete_data)
 	if ok != "" {
+		//删除用户中台
+		ck := &http.Cookie{}
+		base_userid_del := usercenter.GetBaseUserId(mongodb, user_id)
+		usercenter.PostUserCenter(qutil.ObjToString(config.Sysconfig["userCenterApi"])+usercenter.UserCenterDelete, usercenter.ContentType_Json, user_id, map[string]interface{}{
+			"appid": "10000",
+			"id":    base_userid_del,
+		}, ck)
 		//删除以前数据
 		_id, _ := primitive.ObjectIDFromHex(user_id)
 		if mongodb.Del("user", map[string]interface{}{
 			"_id": _id,
 		}) {
-			//删除用户中台
-			ck := &http.Cookie{}
-			base_userid_del := usercenter.GetBaseUserId(mongodb, user_id)
-			usercenter.PostUserCenter(qutil.ObjToString(config.Sysconfig["userCenterApi"])+usercenter.UserCenterDelete, usercenter.ContentType_Json, user_id, map[string]interface{}{
-				"appid": "10000",
-				"id":    base_userid_del,
-			}, ck)
 			return true
 		}
 	}

+ 16 - 14
src/jfw/modules/app/src/web/templates/frontRouter/activity/sess/task-202207.html

@@ -18,11 +18,6 @@
         .j-container.app > .j-main {
             margin-top: -21.34vw;
         }
-        /* @font-face {
-            font-family:"YouSheBiaoTiHei";
-            font-display: swap;
-            src:url('/big-member/image/new_big_index/font/YouSheBiaoTiHei-2.ttf');
-        } */
         @font-face {
             font-family:"YouSheBiaoTiHei";
             font-display: swap;
@@ -59,8 +54,8 @@
                     </div>
                     <div class="section-content">
                         <img src="{{Cdns .Host "seo" "cdn"|SafeUrl}}/common-module/active/2022.7/content-yure@2x.png" alt="">
-                        <div class="content-info">
-                            <div class="c-info-text" v-html="yureInfo.tipText"></div>
+                        <div class="content-info" :class="{ float: yureConf.tipFloat }">
+                            <div class="c-info-text" :class="{ 'mtb-48': !yureButtonShow }" v-html="yureInfo.tipText"></div>
                             <button
                                 class="c-info-button section-button button-small"
                                 @click="receiveYuReCoupon"
@@ -93,7 +88,7 @@
                             <div class="coupon-title">满<span v-text="item.Full"></span>可用</div>
                             <div class="coupon-value"><span class="num" v-text="item.Reduce">50</span>元</div>
                             <button class="section-button button-small" @click="receiveActiveCoupon([item])" v-text="receiveActiveButtonText(item)"></button>
-                            <div class="coupon-text" v-text="item.tipText"></div>
+                            <div class="coupon-text" v-html="item.tipText"></div>
                         </div>
                     </div>
                     <div class="section-footer">
@@ -134,7 +129,7 @@
                                     :key="a.rate"
                                     :style="{ left: a.rate + '%' }"
                                     :class="a.className">
-                                    <div class="anchor-text">${ a.anchorText }</div>
+                                    <div class="anchor-text"><span class="j-icon-bg icon-jy-coin"></span>${ a.anchorText }</div>
                                     <div class="point-img" v-if="a.pointImg">
                                         <img :src="progress.pointImgMap[a.pointImg]" alt="">
                                     </div>
@@ -145,12 +140,19 @@
                                 </div>
                                 <div class="progress-bar-content" :style="{ width: rate + '%' }">
                                     <div class="blink-point"></div>
-                                    <div class="blink-point-text anchor-text" v-show="blinkTextShow">${progress.current}剑鱼币</div>
+                                    <div class="blink-point-text anchor-text" v-show="blinkTextShow"><span class="j-icon-bg icon-jy-coin"></span>${progress.current}</div>
                                 </div>
                             </div>
                         </div>
                         <div class="progress-action-list">
                             <button
+                                class="progress-action-button"
+                                :class="{ pointer: receiveActiveButton.className === 'wait' }"
+                                :disabled="receiveActiveButton.disabled"
+                                :id="'progress-reward--' + receiveActiveButton.id"
+                                @click="onClickReceive('schedule', receiveActiveButton)"
+                            >${receiveActiveButton.buttonText}</button>
+                            <!-- <button
                                 class="progress-action-button"
                                 :class="{ pointer: a.className === 'wait' }"
                                 :disabled="a.className === 'received'"
@@ -158,7 +160,7 @@
                                 v-if="a.tipText"
                                 :id="'progress-reward--' + a.id"
                                 @click="onClickReceive('schedule', a)"
-                                :key="index">${a.className === 'received' ? '已' : '免费'}领${a.tipText}</button>
+                                :key="index">${a.className === 'received' ? '已' : '免费'}领${a.tipText}</button> -->
                         </div>
                     </div>
                 </div>
@@ -239,8 +241,8 @@
                 </div>
                 <!-- 右侧悬浮 -->
                 <div class="fixed-right">
-                    <button class="fixed-action-button" @click="dialogShow('rule', true)">活动<br />规则</button>
-                    <button class="fixed-action-button" @click="dialog.myReward = true">我的<br />奖励</button>
+                    <div class="fixed-action-button" @click="dialogShow('rule', true)"><div>活动</div><div>规则</div></div>
+                    <div class="fixed-action-button" @click="dialog.myReward = true"><div>我的</div><div>奖励</div></div>
                 </div>
             </div>
             <!-- 我的奖励 -->
@@ -310,7 +312,7 @@
               <div v-show="dialog.type === 'success'" class="modal-dialog active-tip--success">
                 <h5 class="text-gradient-red">领取成功</h5>
                 <p>
-                  恭喜成功领取<i style="font-weight: bold">${dialog.giftMonth}个月</i>超级订阅
+                  恭喜成功领取<i style="font-weight: bold"> ${dialog.text} </i>超级订阅
                   <br>
                   <span>可在“我的奖励”中查看</span>
                 </p>

+ 3 - 0
src/jfw/modules/subscribepay/src/service/afterPay.go

@@ -109,6 +109,9 @@ func (a *AfterPay) FastImport() error {
 						}
 					}
 				} else {
+					util.MQFW.UpdateById("user", userId, map[string]interface{}{
+						"$set": map[string]interface{}{"o_vipjy.a_items": []map[string]interface{}{}},
+					})
 					classify_index = 0
 				}
 				if len(_keys) > 0 {

+ 34 - 13
src/jfw/modules/subscribepay/src/service/invoice.go

@@ -557,6 +557,7 @@ func (this *Invoice) Callbackinvoice() {
 			}
 			redStr, _ := json.Marshal(red)
 			redMap["red"] = redStr
+			redMap["invoice_status"] = -2
 		}
 		if resType == "changed" {
 			query["invoice_changed"] = 0
@@ -601,7 +602,6 @@ func (this *Invoice) Replaceinvoice() {
 		//user_info, _ := util.MQFW.FindOneByField("user", bson.M{"_id": bson.ObjectIdHex(qutil.ObjToString(this.GetSession("userId")))}, `{"s_nickname":1}`)
 		if invoice_type == "个人" {
 			if phone == (*res)["phone"] && e_mail == (*res)["mail"] && (*res)["invoice_type"] == "个人" {
-
 				emailHtml := emailHtml_gr
 				emailHtmls := fmt.Sprintf(emailHtml, phone, e_mail)
 				html := fmt.Sprintf(email_format, order_code, (*res)["url"], emailHtmls)
@@ -766,6 +766,7 @@ func (this *Invoice) Replaceinvoice() {
 			"yfpdm":     (*res)["invoice_code"],
 			"changed":   "1",
 			"phone":     phone,
+			"redcode":   (*res)["invoice_serialnum"],
 		}
 		if invoice_type == "单位" {
 			body["custName"] = company_name
@@ -806,14 +807,20 @@ func (this *Invoice) Replaceinvoice() {
 					}
 				}
 			}
-
-			updata_status := util.Mysql.Update(dbname, map[string]interface{}{"order_code": order_code, "invoice_changed": 1}, map[string]interface{}{
-				"invoice_serialnum": invoice_res.data["swno"],
-				"invoice_code":      invoice_res.data["fpdm"],
-				"invoice_number":    invoice_res.data["fphm"],
-				"url":               invoice_res.data["path"],
-				"invoice_status":    invoice_status,
-			})
+			updata_status := true
+			if invoice_status == -1 {
+				if !delReplaceInvoice(map[string]interface{}{"order_code": order_code, "invoice_changed": 1}) {
+					log.Printf("delete replace invoice err: %s", order_code)
+				}
+			} else {
+				updata_status = util.Mysql.Update(dbname, map[string]interface{}{"order_code": order_code, "invoice_changed": 1}, map[string]interface{}{
+					"invoice_serialnum": invoice_res.data["swno"],
+					"invoice_code":      invoice_res.data["fpdm"],
+					"invoice_number":    invoice_res.data["fphm"],
+					"url":               invoice_res.data["path"],
+					"invoice_status":    invoice_status,
+				})
+			}
 			if updata_status {
 				this.ServeJson(map[string]interface{}{
 					"invoice_status": invoice_status,
@@ -825,9 +832,13 @@ func (this *Invoice) Replaceinvoice() {
 			}
 		} else {
 			go func() {
-				util.Mysql.Update(dbname, map[string]interface{}{"order_code": order_code, "invoice_changed": 1}, map[string]interface{}{
-					"invoice_status": -1,
-				})
+				//删除该错误发票信息
+				// util.Mysql.Update(dbname, map[string]interface{}{"order_code": order_code, "invoice_changed": 1}, map[string]interface{}{
+				// 	"invoice_status": -1,
+				// })
+				if !delReplaceInvoice(map[string]interface{}{"order_code": order_code, "invoice_changed": 1}) {
+					log.Printf("delete go func replace invoice err: %s", order_code)
+				}
 			}()
 
 			this.ServeJson(map[string]interface{}{
@@ -847,11 +858,12 @@ func (this *Invoice) Refundinvoice() {
 		query := make(map[string]interface{})
 		query["invoice_serialnum"] = invoice_serialnum
 		query["user_id"] = userid
-		res := util.Mysql.FindOne(dbname, query, "fpdm,fphm", "")
+		res := util.Mysql.FindOne(dbname, query, "fpdm,fphm,invoice_serialnum", "")
 		if res != nil {
 			req_ := make(map[string]interface{})
 			req_["fpdm"] = (*res)["fpdm"]
 			req_["fphm"] = (*res)["fphm"]
+			req_["redcode"] = (*res)["invoice_serialnum"]
 			b, _ := json.Marshal(req_)
 			buffer := bytes.NewBuffer(b)
 			request, _ := http.NewRequest("POST", config.InvoiceConfig.Invoice_interface_address+"/Invoice/RedSubmit", buffer)
@@ -958,3 +970,12 @@ func (this *Invoice) Available() {
 		"status": status,
 	})
 }
+
+//删除有问题的换开发票并记录
+func delReplaceInvoice(query map[string]interface{}) bool {
+	data := util.Mysql.FindOne(dbname, query, "", "")
+	if data != nil && len(*data) > 0 {
+		log.Printf("invoice replace delete data: %+v", data)
+	}
+	return util.Mysql.Delete(dbname, query)
+}

+ 26 - 1
src/web/staticres/common-module/active/2022.7/task-202207.css

@@ -46,7 +46,7 @@
   display: flex;
   align-items: center;
   justify-content: center;
-  font-size: .4rem;
+  font-size: .34rem;
   font-weight: bold;
   color: #E8100D;
   line-height: .46rem;
@@ -54,6 +54,7 @@
   background-repeat: no-repeat;
   background-size: contain;
   cursor: pointer;
+  white-space: nowrap;
 }
 .section-button:disabled {
   color: #FF7876;
@@ -86,12 +87,19 @@
 .section-yure .c-info-text {
   display: flex;
   align-items: center;
+  margin-bottom: 0.08rem;
   font-size: .44rem;
   font-family: 'YouSheBiaoTiHei';
   line-height: .52rem;
   text-shadow: 2px 3px 0px #CF1627;
   white-space: nowrap;
 }
+.section-yure .content-info.float {
+  padding-left: 2rem;
+}
+.section-yure .c-info-text.mtb-48 {
+  margin-bottom: .48rem;
+}
 .section-yure .c-info-text .num {
   font-size: .82rem;
   line-height: 1rem;
@@ -143,6 +151,9 @@
   color: #fff;
   white-space: nowrap;
 }
+.coupon-item .coupon-text .num {
+  font-size: .32rem;
+}
 .section-fuli1 .section-footer {
   margin: .8rem 0;
   display: flex;
@@ -167,6 +178,16 @@
   transform: translate(-50%,-50%) scale(1.2);
   z-index: 1;
 }
+.section-fuli2 .progress-action-list {
+  justify-content: center;
+}
+.section-fuli2 .progress-action-button {
+  min-width: 3.6rem;
+  width: auto;
+}
+.section-fuli2 .progress-action-button[disabled] {
+  opacity: 1;
+}
 
 .section-fuli3 .section-header {
   margin-bottom: .24rem;
@@ -235,6 +256,10 @@
   z-index: 2;
 }
 .fixed-action-button {
+  display: flex;
+  flex-direction: column;
+  align-items: center;
+  justify-content: center;
   margin-bottom: .18rem;
   padding-right: 0.14rem;
   color: #fff;

+ 142 - 69
src/web/staticres/common-module/active/2022.7/task-202207.js

@@ -164,6 +164,7 @@ var task = new Vue({
     yureInfo: {
       timerId: null,
       tipText: '',
+      tipFloat: false,
       buttonText: '点击免费领',
       buttonDisabled: false
     },
@@ -183,23 +184,27 @@ var task = new Vue({
           className: 'first',
           rate: 0, // 进度,单位%,最大为100
           pointImg: '', // ''/unreceived/received
-          anchorText: '0剑鱼币'
+          anchorText: '0'
         },
         {
-          id: '800',
+          id: '1000',
           className: 'unreceived',
-          rate: 80,
+          rate: 66.67,
           pointImg: 'unreceived',
-          anchorText: '800剑鱼币',
-          tipText: '1个月超级订阅'
+          anchorText: '1000',
+          tipText: '1个月超级订阅',
+          disabled: false,
+          buttonText: ''
         },
         {
           id: '1500',
           className: 'unreceived',
           rate: 100,
           pointImg: 'unreceived',
-          anchorText: '1500剑鱼币',
-          tipText: '1个月超级订阅'
+          anchorText: '1500',
+          tipText: '1个月超级订阅',
+          disabled: false,
+          buttonText: ''
         }
       ],
     },
@@ -218,7 +223,7 @@ var task = new Vue({
       },
       {
         id: 'invite',
-        className: 'delay-100',
+        className: '',
         x: 2.84,
         y: 0.06,
         num: 500,
@@ -229,7 +234,7 @@ var task = new Vue({
       },
       {
         id: 'share',
-        className: 'delay-300',
+        className: '',
         x: 4.8,
         y: 0.82,
         num: 200,
@@ -243,7 +248,7 @@ var task = new Vue({
     rewardList: [],
     dialog: {
       show: false,
-      giftMonth: 1,
+      text: '',
       type: 'rule',
       myReward: false // 奖励弹窗
     },
@@ -280,7 +285,7 @@ var task = new Vue({
       if (calcRate < 0) {
         calcRate = 0
       }
-      return calcRate
+      return calcRate.toFixed(2) - 0
     },
     blinkTextShow: function () {
       var anchorList = this.progress.anchorList
@@ -322,7 +327,11 @@ var task = new Vue({
       var lastTimeConf = this.calcLastTimeDiff(this.lastTimestamp)
       var days = lastTimeConf.days
       if (this.yureInfo.buttonText) {
-        return !(days < 1 && this.yureConf.total <= 0)
+        if (this.yureConf.got) {
+          return true
+        } else {
+          return !(days < 1 && this.yureConf.total <= 0)
+        }
       } else {
         return false
       }
@@ -337,13 +346,56 @@ var task = new Vue({
       }
     },
     onKeyReceiveShow: function () {
-      var arr = []
-      this.couponList.forEach(function (item) {
-        if (item.IsReceive === false && item.IsUser) {
-          arr.push(item)
+      if (this.activeState !== 'activating') {
+        return true
+      } else {
+        var arr = []
+        this.couponList.forEach(function (item) {
+          if (item.IsReceive === false) {
+            arr.push(item)
+          }
+        })
+        return arr.length !== this.couponList.length
+      }
+    },
+    receiveActiveButton: function () {
+      var anchor1 = this.progress.anchorList[1]
+      var anchor2 = this.progress.anchorList[2]
+      var anchor = {}
+      var buttonText = '免费领1个月超级订阅'
+      var disabled = false
+
+      // 1. 第一个anchor未完成,则显示第一个(都未完成)--anchor1
+      // 2. 第一个anchor完成,未领取,第二个未完成--anchor1
+      // 3. 第一个anchor完成,已经领取,第二个未完成--anchor1
+      // 4. 第一个anchor完成,未领取,第二个完成,未领取(都未领取)--anchor1
+      // 5. 第一个anchor完成,已经领取,第二个完成,未领取--anchor2
+      // 6. 都完成都且都已经领取(都已经领取)--anchor1
+
+      var bothUnReceived = anchor1.className === 'unreceived' && anchor2.className === 'unreceived'
+      var bothWait = anchor1.className === 'wait' && anchor2.className === 'wait'
+      var bothReceived = anchor1.className === 'received' && anchor2.className === 'received'
+
+      if (anchor1.className === 'received' && anchor2.className !== 'unreceived') {
+        anchor = anchor2
+      } else {
+        anchor = anchor1
+      }
+
+      // 格式化文字
+      if (bothReceived) {
+        buttonText = '已领取2个月超级订阅'
+        disabled = true
+      } else if (anchor1.className === 'received') {
+        if (anchor2.className === 'unreceived') {
+          buttonText = '已领取1个月,继续任务,可再领一个月超级订阅'
+          disabled = true
         }
-      })
-      return arr.length !== this.couponList.length
+      }
+
+      this.$set(anchor, 'disabled', disabled)
+      this.$set(anchor, 'buttonText', buttonText)
+      return anchor
     },
     forbidClose: function () {
       return this.dialog.type === 'over'
@@ -360,16 +412,17 @@ var task = new Vue({
   },
   mounted: function () {
     // this.calcPointList()
-    this.stickyTopEvents()
     this.headerTransparent()
+    this.stickyTopEvents()
   },
   methods: {
     add0: function (t) {
       return t < 10 ? ('0' + t) : t
     },
-    dialogShow: function (type, show) {
+    dialogShow: function (type, show, text) {
       this.dialog.type = type
       this.dialog.show = show
+      this.dialog.text = text
     },
     ajaxActiveStatus: function () {
       var _this = this
@@ -486,42 +539,43 @@ var task = new Vue({
         clearInterval(this.yureInfo.timerId)
       }
       if (this.activeState === 'yureing') {
-        // 当天时间
-        var todayString = new Date().pattern('yyyy/MM/dd')
-        // 当领券开始时间
-        var yureCouponStartTime = [todayString, this.conf.clock].join(' ')
-        var yureCouponStartStamp = +new Date(yureCouponStartTime)
-        // 计算倒计时
-        var diff = yureCouponStartStamp - Date.now()
-        if (diff > 0) {
-          // 预热当天未开始抢券
-          buttonDisabled = true
-          // 计算小时
-          if (this.conf.clock) {
-            var clockArr = this.conf.clock.split(':')
-            buttonText = '今日'+ clockArr[0] +'点开抢'
-          } else {
-            buttonText = '今日10点开抢'
-          }
-          // 创建定时器刷新倒计时
-          this.yureInfo.timerId = setInterval(function () {
-            var d = yureCouponStartStamp - Date.now()
-            var obj = _this.calcLastTimeDiff(d)
-            if (d <= 0) {
-              clearInterval(_this.yureInfo.timerId)
-              _this.calcYuReText()
+        if (this.yureConf.got) {
+          // 已领取过
+          this.yureConf.tipFloat = true
+          buttonDisabled = false
+          buttonText = '去查看'
+          tipText = '已领取成功'
+        } else {
+          // 当天时间
+          var todayString = new Date().pattern('yyyy/MM/dd')
+          // 当领券开始时间
+          var yureCouponStartTime = [todayString, this.conf.clock].join(' ')
+          var yureCouponStartStamp = +new Date(yureCouponStartTime)
+          // 计算倒计时
+          var diff = yureCouponStartStamp - Date.now()
+          if (diff > 0) {
+            // 预热当天未开始抢券
+            buttonDisabled = true
+            // 计算小时
+            if (this.conf.clock) {
+              var clockArr = this.conf.clock.split(':')
+              buttonText = '今日'+ clockArr[0] +'点开抢'
             } else {
-              // 计算倒计时
-              tipText = [_this.add0(obj.hours), _this.add0(obj.minutes), _this.add0(obj.seconds)].join(':')
-              _this.yureInfo.tipText = tipText
+              buttonText = '今日10点开抢'
             }
-          }, 1000)
-        } else {
-          if (this.yureConf.got) {
-            // 已领取过
-            buttonDisabled = false
-            buttonText = '去查看'
-            tipText = '已领取成功'
+            // 创建定时器刷新倒计时
+            this.yureInfo.timerId = setInterval(function () {
+              var d = yureCouponStartStamp - Date.now()
+              var obj = _this.calcLastTimeDiff(d)
+              if (d <= 0) {
+                clearInterval(_this.yureInfo.timerId)
+                _this.calcYuReText()
+              } else {
+                // 计算倒计时
+                tipText = [_this.add0(obj.hours), _this.add0(obj.minutes), _this.add0(obj.seconds)].join(':')
+                _this.yureInfo.tipText = '开始倒计时:' + tipText
+              }
+            }, 1000)
           } else {
             buttonDisabled = this.yureConf.total <= 0
             // 券是否有剩余
@@ -530,8 +584,16 @@ var task = new Vue({
               tipText = '今日还剩<span class="num">' + this.yureConf.total + '</span>份'
             } else {
               // 今日券领完了
-              buttonText = '今天已抢完'
-              tipText = '今天已经抢完啦~明天再来吧'
+              var obj = this.calcLastTimeDiff(this.lastTimestamp)
+              // 判断是否是预热最后一天
+              if (obj.days < 1) {
+                this.yureConf.tipFloat = true
+                buttonText = '今天已抢完'
+                tipText = '今天已经抢完啦~<br />更多福利明日即将开启'
+              } else {
+                buttonText = '今天已抢完'
+                tipText = '今天已经抢完啦~<br />明天再来吧'
+              }
             }
           }
         }
@@ -542,6 +604,7 @@ var task = new Vue({
       this.yureInfo.buttonDisabled = buttonDisabled
       this.yureInfo.buttonText = buttonText
       this.yureInfo.tipText = tipText
+      return this.yureInfo
     },
     calcLastTimeDiff: function (timestamp) {
       var diff = moment.duration(Math.abs(timestamp))
@@ -595,8 +658,8 @@ var task = new Vue({
         type: 'post',
         success: function (res) {
           if (res.data) {
+            _this.dialogShow('success', true, '7天')
             _this.getYuReCouponCount()
-            _this.$toast('领取成功')
             // 刷新我的奖励列表
             _this.getMissionList()
           }
@@ -622,9 +685,8 @@ var task = new Vue({
       if (coupons.length === 1) {
         var item = coupons[0]
         if (!item.IsReceive && item.IsUser) {
-          this.toBuyVip()
+          return this.toBuyVip()
         }
-        return
       }
       var idArr = []
       coupons.forEach(function (item) {
@@ -650,6 +712,7 @@ var task = new Vue({
             _this.couponList.forEach(function (item) {
               if (ids.indexOf(item.LotteryIdStr) !== -1) {
                 item.IsReceive = false
+                item.IsUser = true
               }
             })
             _this.$toast('领取成功')
@@ -688,7 +751,7 @@ var task = new Vue({
         for (var i = 0; i < priceArr.length; i++) {
           if (priceArr[i].price - full >= 0) {
             var pay = priceArr[i].price - reduce
-            item.tipText = prefix + priceArr[i].text + ':券后' + pay + '元'
+            item.tipText = prefix + priceArr[i].text + ':券后<span class="num">' + pay + '</span>元'
             break
           }
         }
@@ -770,7 +833,7 @@ var task = new Vue({
         } else {
           var text = '尚未达到领取条件,无法领取'
           switch (item.id) {
-            // 800
+            // 1000
             case this.progressAnchorList[1].id: {
               text = '尚未达到'+ this.progressAnchorList[1].id +'剑鱼币,无法领取'
               break
@@ -822,12 +885,12 @@ var task = new Vue({
               _this.$toast('已成功领取' + item.num + '剑鱼币', 1500)
               break
             }
-            case '800': {
-              _this.dialogShow('success', true)
+            case '1000': {
+              _this.dialogShow('success', true, '1个月')
               break
             }
             case '1500': {
-              _this.dialogShow('success', true)
+              _this.dialogShow('success', true, '1个月')
               break
             }
           }
@@ -881,10 +944,10 @@ var task = new Vue({
               '-1': 'received',
             }
 
-            _this.progress.anchorList[1].className = anchorStatus[res.data.schedule['800']]
+            _this.progress.anchorList[1].className = anchorStatus[res.data.schedule['1000']]
             _this.progress.anchorList[2].className = anchorStatus[res.data.schedule['1500']]
 
-            _this.progress.anchorList[1].pointImg = imgStatus[res.data.schedule['800']]
+            _this.progress.anchorList[1].pointImg = imgStatus[res.data.schedule['1000']]
             _this.progress.anchorList[2].pointImg = imgStatus[res.data.schedule['1500']]
           }
         }
@@ -964,8 +1027,13 @@ var task = new Vue({
       document.body.removeChild(input) // 最后删除实例中临时创建的input输入框,完成复制操作
     },
     scrollTo: function (className) {
+      var offsetTop = 0
+      if (utils.isWeiXinBrowser) {
+        offsetTop = $(className)[0].offsetTop - 72 - 6
+      } else {
+        offsetTop = $(className)[0].offsetTop - $('.jy-app-header').outerHeight() * 2
+      }
       setTimeout(function () {
-        var offsetTop = $(className)[0].offsetTop
         $('#main-app').scrollTop(offsetTop)
       }, 100)
     },
@@ -973,7 +1041,11 @@ var task = new Vue({
       var _this = this
       var fixedTop = $('.fixed-top.top-timeline')
       var scrollDOM = $('#main-app')
-      var height = $('.header-banner').height()
+      if (utils.isWeiXinBrowser) {
+        var height = $('.header-banner').height() - 72 * 1.5
+      } else {
+        var height = $('.header-banner').height() - $('.jy-app-header').outerHeight() * 2
+      }
       var showHide = function () {
         var scrollTop = scrollDOM.scrollTop()
         if (scrollTop > height) {
@@ -982,7 +1054,7 @@ var task = new Vue({
           fixedTop.hide()
         }
       }
-      showHide()
+      setTimeout(showHide, 200)
       scrollDOM.on('scroll', function () {
         showHide()
       })
@@ -990,6 +1062,7 @@ var task = new Vue({
         $(e.currentTarget).addClass('active').siblings().removeClass('active')
         var className = $(e.currentTarget).attr('data-s-class')
         _this.scrollTo('.' + className)
+        showHide()
       })
     },
     headerTransparent: function () {

Файлын зөрүү хэтэрхий том тул дарагдсан байна
+ 2 - 0
src/web/staticres/common-module/active/2022.7/task-common.css


+ 37 - 7
src/web/staticres/frontRouter/pc/activity/css/task-202207.css

@@ -4,7 +4,7 @@
   display: block;
   width: 100%;
 }
-.section:not(:first-of-type, :last-of-type) {
+.section {
   margin-bottom: 80px;
 }
 .header-banner {
@@ -75,6 +75,9 @@
   background-size: 100% 100%;
 }
 
+.section-yure {
+  margin-bottom: 0;
+}
 .section-yure .content-info {
   position: absolute;
   left: 50%;
@@ -89,8 +92,12 @@
   font-size: 42px;
   font-family: 'YouSheBiaoTiHei';
   line-height: 50px;
+  white-space: nowrap;
   text-shadow: 2px 3px 0px #CF1627;
 }
+.section-yure .c-info-text.mtb-56 {
+  margin-bottom: 56px;
+}
 .section-yure .c-info-text .num {
   font-size: 96px;
   line-height: 114px;
@@ -139,6 +146,9 @@
   color: #fff;
   white-space: nowrap;
 }
+.coupon-item .coupon-text .num {
+  font-size: 20px;
+}
 .section-fuli1 .section-footer {
   display: flex;
   align-items: center;
@@ -205,6 +215,9 @@
   text-align: center;
 }
 
+.activity-rules {
+  margin-bottom: 0;
+}
 .activity-rules .section-header-text {
   width: 207px;
 }
@@ -304,6 +317,7 @@
 
 
 .reward-section .el-dialog {
+  width: 55%;
   border-radius: 25px;
   background: linear-gradient(to bottom, #FBDB9F 0%, #FFECD7 50%, #FBDB9F 100%);
 }
@@ -327,7 +341,7 @@
   padding-right: 24px;
 }
 .reward-card {
-  padding: 8px 0;
+  padding: 8px 16px;
   background: #FDF0E1;
   border-radius: 20px;
 }
@@ -353,18 +367,25 @@
   padding: 16px;
 }
 .reward-card .tr .td:nth-of-type(1),
-.reward-card .tr .td:nth-of-type(2) {
-  flex: 5;
-}
+.reward-card .tr .td:nth-of-type(2),
 .reward-card .tr .td:nth-of-type(3) {
-  flex: 4;
+  flex: 5;
 }
+
 .reward-card .tr .td:nth-of-type(4) {
   flex: 2;
 }
 .reward-card .r-l-i-name .j-icon {
   margin-right: 4px;
 }
+.reward-card .j-icon {
+  width: 40px;
+  height: 40px;
+}
+.reward-card .j-icon.icon-jy-coin {
+  width: 32px;
+  height: 32px;
+}
 .table-line {
   height: 5px;
   width: 100%;
@@ -491,7 +512,16 @@
   border-radius: 12px;
   overflow: hidden;
 }
-.active-tip--success button,
+.active-tip--success button {
+  width: 231px;
+  height: 48px;
+  font-size: 16px;
+  font-weight: 500;
+  border-radius: 24px;
+  color:#fff;
+  background: linear-gradient(90deg, #FE542F 0%, #F01313 100%);
+  box-shadow: inset 0px 0px 4px 1px rgba(236,143,4,0.25);
+}
 .active-tip--over button {
   width: 231px;
   height: 48px;

Файлын зөрүү хэтэрхий том тул дарагдсан байна
+ 2 - 0
src/web/staticres/frontRouter/pc/activity/css/task-common.css


+ 83 - 63
src/web/staticres/frontRouter/pc/activity/js/task-202207.js

@@ -211,14 +211,14 @@ var task = new Vue({
           className: 'first',
           rate: 0, // 进度,单位%,最大为100
           pointImg: '', // ''/unreceived/received
-          anchorText: '0剑鱼币'
+          anchorText: '0'
         },
         {
-          id: '800',
+          id: '1000',
           className: 'unreceived',
-          rate: 80,
+          rate: 66.67,
           pointImg: 'unreceived',
-          anchorText: '800剑鱼币',
+          anchorText: '1000',
           tipText: '1个月超级订阅'
         },
         {
@@ -226,7 +226,7 @@ var task = new Vue({
           className: 'unreceived',
           rate: 100,
           pointImg: 'unreceived',
-          anchorText: '1500剑鱼币',
+          anchorText: '1500',
           tipText: '1个月超级订阅'
         }
       ],
@@ -246,7 +246,7 @@ var task = new Vue({
       },
       {
         id: 'invite',
-        className: 'delay-100',
+        className: '',
         x: 380,
         y: 0,
         num: 500,
@@ -257,7 +257,7 @@ var task = new Vue({
       },
       {
         id: 'share',
-        className: 'delay-300',
+        className: '',
         x: 900,
         y: 80,
         num: 200,
@@ -305,7 +305,7 @@ var task = new Vue({
       if (calcRate < 0) {
         calcRate = 0
       }
-      return calcRate
+      return calcRate.toFixed(2) - 0
     },
     blinkTextShow: function () {
       var anchorList = this.progress.anchorList
@@ -341,13 +341,17 @@ var task = new Vue({
       }
     },
     onKeyReceiveShow: function () {
-      var arr = []
-      this.couponList.forEach(function (item) {
-        if (item.IsReceive === false && item.IsUser) {
-          arr.push(item)
-        }
-      })
-      return arr.length !== this.couponList.length
+      if (this.activeState !== 'activating') {
+        return true
+      } else {
+        var arr = []
+        this.couponList.forEach(function (item) {
+          if (item.IsReceive === false) {
+            arr.push(item)
+          }
+        })
+        return arr.length !== this.couponList.length
+      }
     },
     calcYuReTopText: function () {
       if (this.activeState === 'yureing') {
@@ -365,7 +369,11 @@ var task = new Vue({
       var lastTimeConf = this.calcLastTimeDiff(this.lastTimestamp)
       var days = lastTimeConf.days
       if (this.yureInfo.buttonText) {
-        return !(days < 1 && this.yureConf.total <= 0)
+        if (this.yureConf.got) {
+          return true
+        } else {
+          return !(days < 1 && this.yureConf.total <= 0)
+        }
       } else {
         return false
       }
@@ -499,42 +507,42 @@ var task = new Vue({
         clearInterval(this.yureInfo.timerId)
       }
       if (this.activeState === 'yureing') {
-        // 当天时间
-        var todayString = new Date().pattern('yyyy/MM/dd')
-        // 当领券开始时间
-        var yureCouponStartTime = [todayString, this.conf.clock].join(' ')
-        var yureCouponStartStamp = +new Date(yureCouponStartTime)
-        // 计算倒计时
-        var diff = yureCouponStartStamp - Date.now()
-        if (diff > 0) {
-          // 预热当天未开始抢券
-          buttonDisabled = true
-          // 计算小时
-          if (this.conf.clock) {
-            var clockArr = this.conf.clock.split(':')
-            buttonText = '今日'+ clockArr[0] +'点开抢'
-          } else {
-            buttonText = '今日10点开抢'
-          }
-          // 创建定时器刷新倒计时
-          this.yureInfo.timerId = setInterval(function () {
-            var d = yureCouponStartStamp - Date.now()
-            var obj = _this.calcLastTimeDiff(d)
-            if (d <= 0) {
-              clearInterval(_this.yureInfo.timerId)
-              _this.calcYuReText()
+        if (this.yureConf.got) {
+          // 已领取过
+          buttonDisabled = false
+          buttonText = '去查看'
+          tipText = '已领取成功'
+        } else {
+          // 当天时间
+          var todayString = new Date().pattern('yyyy/MM/dd')
+          // 当领券开始时间
+          var yureCouponStartTime = [todayString, this.conf.clock].join(' ')
+          var yureCouponStartStamp = +new Date(yureCouponStartTime)
+          // 计算倒计时
+          var diff = yureCouponStartStamp - Date.now()
+          if (diff > 0) {
+            // 预热当天未开始抢券
+            buttonDisabled = true
+            // 计算小时
+            if (this.conf.clock) {
+              var clockArr = this.conf.clock.split(':')
+              buttonText = '今日'+ clockArr[0] +'点开抢'
             } else {
-              // 计算倒计时
-              tipText = [_this.add0(obj.hours), _this.add0(obj.minutes), _this.add0(obj.seconds)].join(':')
-              _this.yureInfo.tipText = tipText
+              buttonText = '今日10点开抢'
             }
-          }, 1000)
-        } else {
-          if (this.yureConf.got) {
-            // 已领取过
-            buttonDisabled = false
-            buttonText = '去查看'
-            tipText = '已领取成功'
+            // 创建定时器刷新倒计时
+            this.yureInfo.timerId = setInterval(function () {
+              var d = yureCouponStartStamp - Date.now()
+              var obj = _this.calcLastTimeDiff(d)
+              if (d <= 0) {
+                clearInterval(_this.yureInfo.timerId)
+                _this.calcYuReText()
+              } else {
+                // 计算倒计时
+                tipText = [_this.add0(obj.hours), _this.add0(obj.minutes), _this.add0(obj.seconds)].join(':')
+                _this.yureInfo.tipText = '开始倒计时:' + tipText
+              }
+            }, 1000)
           } else {
             buttonDisabled = this.yureConf.total <= 0
             // 券是否有剩余
@@ -543,8 +551,15 @@ var task = new Vue({
               tipText = '今日还剩<span class="num">' + this.yureConf.total + '</span>份'
             } else {
               // 今日券领完了
-              buttonText = '今天已抢完'
-              tipText = '今天已经抢完啦~明天再来吧'
+              var obj = this.calcLastTimeDiff(this.lastTimestamp)
+              // 判断是否是预热最后一天
+              if (obj.days < 1) {
+                buttonText = '今天已抢完'
+                tipText = '今天已经抢完啦~更多福利明日即将开启'
+              } else {
+                buttonText = '今天已抢完'
+                tipText = '今天已经抢完啦~明天再来吧'
+              }
             }
           }
         }
@@ -555,6 +570,8 @@ var task = new Vue({
       this.yureInfo.buttonDisabled = buttonDisabled
       this.yureInfo.buttonText = buttonText
       this.yureInfo.tipText = tipText
+
+      return this.yureInfo
     },
     calcLastTimeDiff: function (timestamp) {
       var diff = moment.duration(Math.abs(timestamp))
@@ -603,7 +620,8 @@ var task = new Vue({
         type: 'post',
         success: function (res) {
           if (res.data) {
-            toastFn('领取成功')
+            $('.active-tip--success .text-give-day').text('7天')
+            showDialogOfType('success')
             _this.getYuReCouponCount()
             // 刷新我的奖励列表
             _this.ajaxList()
@@ -696,7 +714,7 @@ var task = new Vue({
         for (var i = 0; i < priceArr.length; i++) {
           if (priceArr[i].price - full >= 0) {
             var pay = priceArr[i].price - reduce
-            item.tipText = prefix + priceArr[i].text + ':券后' + pay + '元'
+            item.tipText = prefix + priceArr[i].text + ':券后<span class="num">' + pay + '</span>元'
             break
           }
         }
@@ -768,7 +786,7 @@ var task = new Vue({
         } else {
           var text = '尚未达到领取条件,无法领取'
           switch (item.id) {
-            // 800
+            // 1000
             case this.progressAnchorList[1].id: {
               text = '尚未达到'+ this.progressAnchorList[1].id +'剑鱼币,无法领取'
               break
@@ -797,7 +815,7 @@ var task = new Vue({
           }
           case 'share': {
             // 分享
-            _this.scrollTo('.copy-share-container')
+            _this.scrollTo('.activity-rules .section-footer')
             break
           }
         }
@@ -816,8 +834,8 @@ var task = new Vue({
               toastFn('已成功领取' + item.num + '剑鱼币', 1500)
               break
             }
-            case '800': {
-              $('.active-tip--success .text-give-day').text('7天')
+            case '1000': {
+              $('.active-tip--success .text-give-day').text('1个月')
               showDialogOfType('success')
               break
             }
@@ -877,10 +895,10 @@ var task = new Vue({
               '-1': 'received',
             }
 
-            _this.progress.anchorList[1].className = anchorStatus[res.data.schedule['800']]
+            _this.progress.anchorList[1].className = anchorStatus[res.data.schedule['1000']]
             _this.progress.anchorList[2].className = anchorStatus[res.data.schedule['1500']]
 
-            _this.progress.anchorList[1].pointImg = imgStatus[res.data.schedule['800']]
+            _this.progress.anchorList[1].pointImg = imgStatus[res.data.schedule['1000']]
             _this.progress.anchorList[2].pointImg = imgStatus[res.data.schedule['1500']]
           }
         }
@@ -959,7 +977,7 @@ var task = new Vue({
     },
     scrollTo: function (className) {
       setTimeout(function () {
-        var offsetTop = $(className)[0].offsetTop - 64 * 2
+        var offsetTop = $(className)[0].offsetTop - 72 * 2
         $(window).scrollTop(offsetTop)
       }, 100)
     },
@@ -968,13 +986,14 @@ var task = new Vue({
       var fixedTop = $('.fixed-top.top-timeline')
       var showHide = function () {
         var scrollTop = $(window).scrollTop()
-        if (scrollTop > 600) {
+        var height = $('.header-banner').height() - 72 * 2
+        if (scrollTop > height) {
           fixedTop.show()
         } else {
           fixedTop.hide()
         }
       }
-      showHide()
+      setTimeout(showHide, 200)
       $(window).on('scroll', function () {
         showHide()
       })
@@ -982,6 +1001,7 @@ var task = new Vue({
         $(e.currentTarget).addClass('active').siblings().removeClass('active')
         var className = $(e.currentTarget).attr('data-s-class')
         _this.scrollTo('.' + className)
+        showHide()
       })
     },
     toOrderPage: function () {

+ 5 - 5
src/web/templates/frontRouter/pc/activity/sess/task-202207.html

@@ -65,7 +65,7 @@
             <div class="section-content">
                 <img src="{{Msg "seo" "cdn"}}/frontRouter/pc/activity/image/202207/content-yure.png" alt="">
                 <div class="content-info">
-                    <div class="c-info-text" v-html="yureInfo.tipText"></div>
+                    <div class="c-info-text" :class="{ 'mtb-56': !yureButtonShow }" v-html="yureInfo.tipText"></div>
                     <button
                         class="c-info-button section-button button-large"
                         @click="receiveYuReCoupon"
@@ -98,7 +98,7 @@
                     <div class="coupon-title">满<span v-text="item.Full"></span>可用</div>
                     <div class="coupon-value"><span class="num" v-text="item.Reduce">50</span>元</div>
                     <button class="section-button button-small" @click="receiveActiveCoupon([item])" v-text="receiveActiveButtonText(item)"></button>
-                    <div class="coupon-text" v-text="item.tipText"></div>
+                    <div class="coupon-text" v-html="item.tipText"></div>
                 </div>
             </div>
             <div class="section-footer">
@@ -141,18 +141,18 @@
                             :key="a.rate"
                             :style="{ left: a.rate + '%' }"
                             :class="a.className">
-                            <div class="anchor-text">${ a.anchorText }</div>
+                            <div class="anchor-text"><span class="j-icon icon-jy-coin"></span>${ a.anchorText }</div>
                             <div class="point-img" v-if="a.pointImg">
                                 <img :src="progress.pointImgMap[a.pointImg]" alt="">
                             </div>
                             <div class="anchor-tip-text" :class="{ floating: a.className === 'wait' }" :id="'progress-reward--' + a.id" v-show="a.tipText" @click="onClickReceive('schedule', a)">
-                                <p>${a.className === 'received' ? '已' : '免费'}</p>
+                                <p>${a.className === 'received' ? '已领取' : '免费'}</p>
                                 <p v-text="a.tipText"></p>
                             </div>
                         </div>
                         <div class="progress-bar-content" :style="{ width: rate + '%' }">
                             <div class="blink-point"></div>
-                            <div class="blink-point-text anchor-text" v-show="blinkTextShow">${progress.current}剑鱼币</div>
+                            <div class="blink-point-text anchor-text" v-show="blinkTextShow"><span class="j-icon icon-jy-coin"></span>${progress.current}</div>
                         </div>
                     </div>
                 </div>

+ 21 - 9
src/web/templates/frontRouter/wx/activity/sess/task-202207.html

@@ -20,6 +20,11 @@
         .header-banner {
             margin-top: -0.6rem;
         }
+        @font-face {
+            font-family:"YouSheBiaoTiHei";
+            font-display: swap;
+            src:url('/big-member/image/new_big_index/font/YouSheBiaoTiHei-2.ttf');
+        }
     </style>
 </head>
 
@@ -41,8 +46,8 @@
                     </div>
                     <div class="section-content">
                         <img src="{{Msg "seo" "cdn"}}/common-module/active/2022.7/content-yure@2x.png" alt="">
-                        <div class="content-info">
-                            <div class="c-info-text" v-html="yureInfo.tipText"></div>
+                        <div class="content-info" :class="{ float: yureConf.tipFloat }">
+                            <div class="c-info-text" :class="{ 'mtb-48': !yureButtonShow }" v-html="yureInfo.tipText"></div>
                             <button
                                 class="c-info-button section-button button-small"
                                 @click="receiveYuReCoupon"
@@ -75,7 +80,7 @@
                             <div class="coupon-title">满<span v-text="item.Full"></span>可用</div>
                             <div class="coupon-value"><span class="num" v-text="item.Reduce">50</span>元</div>
                             <button class="section-button button-small" @click="receiveActiveCoupon([item])" v-text="receiveActiveButtonText(item)"></button>
-                            <div class="coupon-text" v-text="item.tipText"></div>
+                            <div class="coupon-text" v-html="item.tipText"></div>
                         </div>
                     </div>
                     <div class="section-footer">
@@ -116,7 +121,7 @@
                                     :key="a.rate"
                                     :style="{ left: a.rate + '%' }"
                                     :class="a.className">
-                                    <div class="anchor-text">${ a.anchorText }</div>
+                                    <div class="anchor-text"><span class="j-icon-bg icon-jy-coin"></span>${ a.anchorText }</div>
                                     <div class="point-img" v-if="a.pointImg">
                                         <img :src="progress.pointImgMap[a.pointImg]" alt="">
                                     </div>
@@ -133,6 +138,13 @@
                         </div>
                         <div class="progress-action-list">
                             <button
+                                class="progress-action-button"
+                                :class="{ pointer: receiveActiveButton.className === 'wait' }"
+                                :disabled="receiveActiveButton.disabled"
+                                :id="'progress-reward--' + receiveActiveButton.id"
+                                @click="onClickReceive('schedule', receiveActiveButton)"
+                            >${receiveActiveButton.buttonText}</button>
+                            <!-- <button
                                 class="progress-action-button"
                                 :class="{ pointer: a.className === 'wait' }"
                                 :disabled="a.className === 'received'"
@@ -140,7 +152,7 @@
                                 v-if="a.tipText"
                                 :id="'progress-reward--' + a.id"
                                 @click="onClickReceive('schedule', a)"
-                                :key="index">${a.className === 'received' ? '已' : '免费'}领${a.tipText}</button>
+                                :key="index">${a.className === 'received' ? '已' : '免费'}领${a.tipText}</button> -->
                         </div>
                     </div>
                 </div>
@@ -212,7 +224,7 @@
                                     <div class="t-r-b-r" v-text="lastTimeText"></div>
                                 </div>
                                 <div class="t-r-bottom" v-else>
-                                    <div class="t-r-b-l2" timeDuration.active></div>
+                                    <div class="t-r-b-l2" v-text="timeDuration.active"></div>
                                     <div class="t-r-b-r2" v-text="activeState === 'ended' ? '已结束' : '进行中'"></div>
                                 </div>
                             </div>
@@ -221,8 +233,8 @@
                 </div>
                 <!-- 右侧悬浮 -->
                 <div class="fixed-right">
-                    <button class="fixed-action-button" @click="dialogShow('rule', true)">活动<br />规则</button>
-                    <button class="fixed-action-button" @click="dialog.myReward = true">我的<br />奖励</button>
+                    <div class="fixed-action-button" @click="dialogShow('rule', true)"><div>活动</div><div>规则</div></div>
+                    <div class="fixed-action-button" @click="dialog.myReward = true"><div>我的</div><div>奖励</div></div>
                 </div>
             </div>
             <!-- 我的奖励 -->
@@ -292,7 +304,7 @@
               <div v-show="dialog.type === 'success'" class="modal-dialog active-tip--success">
                 <h5 class="text-gradient-red">领取成功</h5>
                 <p>
-                  恭喜成功领取<i style="font-weight: bold">${dialog.giftMonth}个月</i>超级订阅
+                  恭喜成功领取<i style="font-weight: bold"> ${dialog.text} </i>超级订阅
                   <br>
                   <span>可在“我的奖励”中查看</span>
                 </p>

Энэ ялгаанд хэт олон файл өөрчлөгдсөн тул зарим файлыг харуулаагүй болно