Browse Source

wangjianghan

yuelujie 9 months ago
parent
commit
3e8a296954

+ 5 - 0
src/jfw/front/singleLogin.go

@@ -220,6 +220,11 @@ func (this *SingleLogin) SingleLogin() error {
 			}, this.Session(), "singleLogin", false, true)
 			//loginCreateSess(openid, this.Session())
 		}
+		if this.GetString("toHref") == "/weixin/frontPage/activity/free/register" {
+			if phone := this.GetSession("phone"); phone != "" {
+				data["toHref"] = "/jy_mobile/tabbar/home?toast=r"
+			}
+		}
 		return this.Redirect(qutil.ObjToString(data["toHref"]))
 	}
 	//未关注跳转

+ 40 - 6
src/jfw/modules/app/src/app/front/login.go

@@ -233,18 +233,51 @@ func (l *Login) Login() error {
 				RegLock.Unlock()
 				reg.Lock.Lock()
 				defer reg.Lock.Unlock()
-				ok, user := getPhoneUser(phone)
+				ok, users := getPhoneUser(phone)
 				//登录成功
 				if !ok {
 					return 0, -1
 				}
+				userPhone := qutil.InterfaceToStr(l.GetSession("phone"))
+				userId := qutil.InterfaceToStr(l.GetSession("userId"))
+				if userId != "" && userPhone == "" {
+					//绑定手机号用户
+					key := "s_phone"
+					for _, m := range users {
+						s_phone := gconv.String(m["s_phone"])
+						s_m_phone := gconv.String(m["s_m_phone"])
+						openid := gconv.String(m["s_m_openid"])
+						if (s_m_phone != "" || s_phone != "") && openid != "" {
+							//已经绑定过手机号
+							return -2, -1
+						}
+						if s_phone != "" {
+							key = "s_m_phone"
+							continue
+						}
+					}
+					if mongodb.UpdateById("user", BsonIdToSId(userId), map[string]interface{}{
+						"$set": map[string]interface{}{key: phone},
+					}) {
+						jy.JyAppCreateSession(mongodb, l.Session(), userId, 0, l.ResponseWriter, true, config.Middleground, qutil.ObjToString(config.Sysconfig["appPushServiceRpc"]), qutil.IntAll(config.Sysconfig["criticality"]))
+						jy.Publish(public.Mgo_Log, nsqPath, nsq_topic, "task", userId, jy.Jyweb_node2, map[string]interface{}{
+							"code":       1007,
+							"types":      "bindPhone",
+							"num":        50,
+							"baseUserId": l.GetSession("base_user_id"),
+							"positionId": l.GetSession("positionId"),
+							"isOnlyBind": true,
+						})
+					}
+					return 3, 3
+				}
 				//用户不存在
 				rid := l.GetString("rid")
 				oid := l.GetString("oid")
 				phoneType := l.GetString("phoneType")
 				channel := l.GetString("channel")
 				deviceId := l.GetString("deviceId")
-				if user == nil || len(user) == 0 {
+				if users == nil || len(users) == 0 {
 					client := l.Header("User-Agent")
 					log.Println(client)
 					//clearRidByRid(rid)
@@ -334,6 +367,7 @@ func (l *Login) Login() error {
 						return 1, 3
 					}
 				} else {
+					user := users[0]
 					//以s_m_phone登录的 需要把s_m_phone转化为s_phone
 					updataMap := map[string]interface{}{}
 					if user["s_m_phone"] != nil {
@@ -987,7 +1021,7 @@ func (l *Login) ForgetPwd() error {
 			if !ok || user == nil || len(user) == 0 { //用户不存在
 				return "userNotExists"
 			}
-			if utils.Compatible.Update(qutil.InterfaceToStr(user["_id"]), map[string]interface{}{
+			if utils.Compatible.Update(qutil.InterfaceToStr(user[0]["_id"]), map[string]interface{}{
 				"$set": map[string]interface{}{
 					"s_phone":         phone,
 					"s_password":      qutil.GetMd5String(password),
@@ -1004,7 +1038,7 @@ func (l *Login) ForgetPwd() error {
 					if uinfo := jy.GetInfoForBaseUser(mongodb, userid); uinfo != nil {
 						jy.UpdateUser(mongodb, userid, *uinfo, *config.Middleground)
 					}
-				}(BsonIdToSId(user["_id"]))
+				}(BsonIdToSId(user[0]["_id"]))
 				return "y"
 			}
 			return "saveError"
@@ -1163,7 +1197,7 @@ func (l *Login) SetPwd() {
 /**********************************************************************
 ***********************************************************************
 ***********************************************************************/
-func getPhoneUser(phone string) (bool, map[string]interface{}) {
+func getPhoneUser(phone string) (bool, []map[string]interface{}) {
 	users, ok := mongodb.Find("user", map[string]interface{}{
 		"i_appid": 2,
 		"$or": []map[string]interface{}{
@@ -1171,7 +1205,7 @@ func getPhoneUser(phone string) (bool, map[string]interface{}) {
 			{"s_m_phone": phone}},
 	}, `{"s_phone":-1}`, nil, false, 0, 1)
 	if users != nil && len(*users) > 0 {
-		return ok, (*users)[0]
+		return ok, *users
 	}
 	return ok, nil
 }

+ 1 - 0
src/jfw/modules/app/src/go.sum

@@ -24,6 +24,7 @@ app.yhyue.com/moapp/jylog v0.0.0-20230522075550-05d7230ca545 h1:+Lak4m1zgsigQloO
 app.yhyue.com/moapp/jylog v0.0.0-20230522075550-05d7230ca545/go.mod h1:uFrsdUBFbETiJlEmr4PtJWPsZlUpPj2bHQRhryu6ggk=
 app.yhyue.com/moapp/jypkg v1.22.6 h1:38q9rpOWOwWtPEW6+Y95rcf0eI1Fvcejdq5rK92XNPs=
 app.yhyue.com/moapp/jypkg v1.22.6/go.mod h1:FylaC4MJ4G36WndktgeZfc8jTq3uvBGWIwbk02xfdQI=
+app.yhyue.com/moapp/jypkg v1.23.2/go.mod h1:FylaC4MJ4G36WndktgeZfc8jTq3uvBGWIwbk02xfdQI=
 app.yhyue.com/moapp/message v0.0.0-20231204024949-8c7145bfc161 h1:WGi4OEIoqw6NpNFGioUEBZnjK9aBa+xJqf/5WY+QyhM=
 app.yhyue.com/moapp/message v0.0.0-20231204024949-8c7145bfc161/go.mod h1:0Oj8SB4pVjdCLD28sy2zyM3hS0WHGpNuVcakLW43GmI=
 bp.jydev.jianyu360.cn/BP/jynsq v0.0.0-20220222052708-ebc43af90698/go.mod h1:ojo/AUH9Yr1wzarEjOaNMkj1Cet/9r8IgLyba64Z52E=

+ 122 - 0
src/jfw/modules/app/src/web/templates/frontRouter/activity/free/register.html

@@ -0,0 +1,122 @@
+<!DOCTYPE html>
+<html lang="zh-CN" style="font-size: 50px;">
+
+<head>
+    <title></title>
+    <!--引入公共资源头部-->
+    {{include "/big-member/meta.html"}}
+
+    <!--S-当前页面的css资源-->
+    <link rel="stylesheet" href=//cdn-common.jianyu360.com/cdn/lib/reset-css/5.0.1/reset.min.css />
+    <link rel="stylesheet" href=//cdn-common.jianyu360.com/cdn/lib/vant/2.12.24/lib/index.css />
+    <link rel="stylesheet" href=//cdn-common.jianyu360.com/cdn/lib/vant/2.12.24/lib/icon/local.css />
+    <link rel="stylesheet" href='{{Cdns .Host "seo" "cdn"|SafeUrl}}/common-module/public/css/app-share-sheet.css?v={{Msg "seo" "version"}}' />
+    <link rel="stylesheet" type="text/css" href="{{Cdns .Host "seo" "cdn"|SafeUrl}}/common-module/account/css/fast-login.css?v={{Msg "seo" "version"}}"/>
+    <link rel="stylesheet" href='{{Cdns .Host "seo" "cdn"|SafeUrl}}/common-module/active/register/register.css?v={{Msg "seo" "version"}}' />
+    <!--E-当前页面的css资源-->
+    <style>
+        .j-container.app > .j-main {
+            margin-top: -21.34vw;
+        }
+    </style>
+    <script>
+        try {
+            window.JyObj.hiddenBottom('0')
+        } catch (e) {
+            console.log('error: app not function')
+        }
+    </script>
+</head>
+
+<body>
+    <div class="j-container app">
+        {{include "/big-member/header.html"}}
+      <div class="j-main" id="main-app" v-cloak>
+
+        <div class="register-bg">
+          <img src='{{Cdns .Host "seo" "cdn"|SafeUrl}}/common-module/active/register/bg.png?v={{Msg "seo" "version"}}' alt="bg">
+        </div>
+        <div class="register-form">
+          <van-form validate-first @submit="doSubmit">
+            <!-- 通过 pattern 进行正则校验 -->
+            <van-field
+              v-model="form.phone"
+              name="手机号码"
+              placeholder="手机号码"
+              maxlength="11"
+              type="tel"
+              :rules="[{ validator: regPhone, message: '请输入正确的手机号码' }]"
+            ></van-field>
+            <!-- 通过 validator 进行函数校验 -->
+            <van-field
+              v-model="form.identCode"
+              name="手机验证码"
+              placeholder="手机验证码"
+              maxlength="6"
+              type="number"
+              :rules="[{ validator: regCode, message: '请输入正确的手机验证码' }]"
+            >
+              <template v-slot:button>
+                <span v-show="canRunDownTime" class="getCode" @click="getCode" v-bind:class="{ 'active-text': canActiveCode }">获取验证码</span>
+                <div class="getCodeDownTime" v-show="!canRunDownTime">
+                  <van-count-down
+                    ref="countDown"
+                    millisecond
+                    :time="60000"
+                    :auto-start="false"
+                    format="ss"
+                    @finish="finishDownTime"
+                  >
+                  </van-count-down>
+                  <span>s后重新发送</span>
+                </div>
+              </template>
+            </van-field>
+            <div class="footer-button-box">
+              <van-button v-bind:disabled="!canSubmit" round block type="info" native-type="submit">点击领取</van-button>
+              <span class="fast-login-open-link go-easy">本机号码领取</span>
+            </div>
+          </van-form>
+        </div>
+
+        <!--S-弹窗-->
+        <van-popup id="active-tip-modal" v-model="dialog.show" :data-modal-type="dialog.type" :close-on-click-overlay="dialog.type !== 'over'">
+          <div v-show="dialog.type === 'over'" class="modal-dialog active-tip--over">
+            <div class="close-dialog-icon" @click="dialog.show = false" id="dialog-icon--over" v-if="!forbidClose">
+              <img src='{{Cdns .Host "seo" "cdn"|SafeUrl}}/common-module/active/2022.5.20/close.png?v={{Msg "seo" "version"}}' alt="x">
+            </div>
+            <h4>活动结束提醒</h4>
+            <img style="width: 148px;" src='{{Cdns .Host "seo" "cdn"|SafeUrl}}/common-module/active/2022.5.20/empty.png?v={{Msg "seo" "version"}}' alt="活动已结束">
+            <p>
+              对不起,该活动已结束
+            </p>
+            <button @click="onClickReceive('', { id: 'invite' })" id="dialog-button--over">我知道了</button>
+          </div>
+        </van-popup>
+        <!--E-弹窗-->
+      </div>
+    </div>
+
+    <script src=//cdn-common.jianyu360.com/cdn/lib/vue/2.6.11/vue.min.js> </script>
+    <script src=//cdn-common.jianyu360.com/cdn/lib/vant/2.12.24/lib/vant.min.js> </script>
+    <script src=//cdn-common.jianyu360.com/cdn/lib/jquery/3.6.0/jquery.min.js> </script>
+    <script src=//cdn-common.jianyu360.com/cdn/lib/moment/2.29.1/min/moment.min.js></script>
+    <script src="//cdn-common.jianyu360.com/cdn/lib/number-auth-web-sdk/2.1.2/numberAuth-web-sdk.js"></script>
+    {{include "/big-member/commonjs.html"}}
+    <script src='{{Cdns .Host "seo" "cdn"|SafeUrl}}/jyapp/js/common.js?v={{Msg "seo" "version"}}'></script>
+    <script>
+        $(function () {
+            $('.j-header.jy-app-header')
+                .addClass('transparent-header')
+                .find('.header-left .j-icon')
+        })
+    </script>
+    <!-- <script src=//res2.wx.qq.com/open/js/jweixin-1.6.0.js></script> -->
+    <script src='{{Cdns .Host "seo" "cdn"|SafeUrl}}/common-module/public/js/wx-sdk-share.js?v={{Msg "seo" "version"}}'></script>
+    <script src='{{Cdns .Host "seo" "cdn"|SafeUrl}}/common-module/public/js/app-share-sheet.js?v={{Msg "seo" "version"}}'></script>
+    <script src='{{Cdns .Host "seo" "cdn"|SafeUrl}}/common-module/account/js/fast-login.js?v={{Msg "seo" "version" }}'></script>
+    <script src='{{Cdns .Host "seo" "cdn"|SafeUrl}}/common-module/active/register/register.js?v={{Msg "seo" "version"}}'></script>
+    {{include "/common/baiducc.html"}}
+</body>
+
+</html>

+ 5 - 0
src/jfw/modules/publicapply/src/go.sum

@@ -20,7 +20,12 @@ app.yhyue.com/moapp/jybase v0.0.0-20240226084952-7e7b38ef8a66/go.mod h1:XHNATN6t
 app.yhyue.com/moapp/jyfs v0.0.0-20231024061508-480c270480d4/go.mod h1:61hzZ3dZHXL28BNl8BOgZsvM2S5UVY5YFzOkEUPrSu4=
 app.yhyue.com/moapp/jylog v0.0.0-20230522075550-05d7230ca545 h1:+Lak4m1zgsigQloOsvp8AJ+0XeX/+PGp9QP550xlbBQ=
 app.yhyue.com/moapp/jylog v0.0.0-20230522075550-05d7230ca545/go.mod h1:uFrsdUBFbETiJlEmr4PtJWPsZlUpPj2bHQRhryu6ggk=
+<<<<<<< HEAD
 app.yhyue.com/moapp/jypkg v1.22.9 h1:tIcjYsDOBUM7vB5t4/qlGJY4XUI43Edfi3mmkmobH0Q=
+=======
+app.yhyue.com/moapp/jypkg v1.22.7 h1:7azZJOhvoJasnKHEab4QF8cwIc5DOthOpmDh85Tif7I=
+app.yhyue.com/moapp/jypkg v1.22.7/go.mod h1:FylaC4MJ4G36WndktgeZfc8jTq3uvBGWIwbk02xfdQI=
+>>>>>>> master
 app.yhyue.com/moapp/jypkg v1.22.9/go.mod h1:FylaC4MJ4G36WndktgeZfc8jTq3uvBGWIwbk02xfdQI=
 app.yhyue.com/moapp/message v0.0.0-20231204024949-8c7145bfc161 h1:WGi4OEIoqw6NpNFGioUEBZnjK9aBa+xJqf/5WY+QyhM=
 app.yhyue.com/moapp/message v0.0.0-20231204024949-8c7145bfc161/go.mod h1:0Oj8SB4pVjdCLD28sy2zyM3hS0WHGpNuVcakLW43GmI=

+ 40 - 5
src/jfw/modules/publicapply/src/oneclick/entity/entity.go

@@ -338,12 +338,45 @@ func (o *OneClickInfo) phoneLogin(phone string) (map[string]interface{}, error)
 		RegLock.Unlock()
 		reg.Lock.Lock()
 		defer reg.Lock.Unlock()
-		ok, user := getPhoneUser(phone)
+		ok, users := getPhoneUser(phone)
 		if !ok {
 			return 0
 		}
 		//用户不存在
-		if user == nil || len(user) == 0 {
+		userPhone := common.InterfaceToStr(o.Session.Get("phone"))
+		userId := common.InterfaceToStr(o.Session.Get("userId"))
+		if userId != "" && userPhone == "" {
+			//绑定手机号用户
+			key := "s_phone"
+			for _, m := range users {
+				s_phone := gconv.String(m["s_phone"])
+				s_m_phone := gconv.String(m["s_m_phone"])
+				openid := gconv.String(m["s_m_openid"])
+				if (s_m_phone != "" || s_phone != "" ) && openid != "" {
+					//已经绑定过手机号
+					return -1
+				}
+				if s_phone != ""  {
+					key = "s_m_phone"
+					continue
+				}
+			}
+			if db.Mgo.UpdateById("user", mongodb.BsonIdToSId(userId), map[string]interface{}{
+				"$set": map[string]interface{}{key: phone},
+			}) {
+				jy.JyAppCreateSession(db.Mgo, o.Session, userId, 0, *o.ResponseWriter, true, config.Middleground, config.Config.AppPushServiceRpc, config.Config.Criticality)
+				jy.Publish(db.Mgo_Log, config.Config.Nsq, config.Config.NsqTopic, "task", userId, jy.Jyweb_node2, map[string]interface{}{
+					"code":       1007,
+					"types":      "bindPhone",
+					"num":        50,
+					"baseUserId": o.Session.Get("base_user_id"),
+					"positionId": o.Session.Get("positionId"),
+					"isOnlyBind": true,
+				})
+			}
+			return 3
+		}
+		if users == nil || len(users) == 0 {
 			client := o.UA
 			log.Println(client)
 			//clearRidByRid(rid)
@@ -375,6 +408,7 @@ func (o *OneClickInfo) phoneLogin(phone string) (map[string]interface{}, error)
 				data["s_rsource"] = o.Activity
 			}
 			data["s_regsource"] = isAndroidOrIOS(client)
+
 			_id := db.Mgo.Save("user", data)
 			if _id != "" {
 				if sourceLabel != "" {
@@ -421,6 +455,7 @@ func (o *OneClickInfo) phoneLogin(phone string) (map[string]interface{}, error)
 				return 2
 			}
 		} else {
+			user := users[0]
 			//以s_m_phone登录的 需要把s_m_phone转化为s_phone
 			updataMap := map[string]interface{}{}
 			if user["s_m_phone"] != nil {
@@ -476,7 +511,7 @@ func (o *OneClickInfo) phoneLogin(phone string) (map[string]interface{}, error)
 		go func(us jy.UserSource) {
 			jy.SaveUserSource(public.BaseMysql, jy.ChannelTableName, common.StructToMapMore(us))
 		}(us)
-		status = 1
+		status = gconv.Int(common.If(status <= 2, 1, status))
 	}
 	result := map[string]interface{}{
 		"status": status,
@@ -608,7 +643,7 @@ func CollectPhone(userId, phone string) bool {
 	return true
 }
 
-func getPhoneUser(phone string) (bool, map[string]interface{}) {
+func getPhoneUser(phone string) (bool, []map[string]interface{}) {
 	users, ok := db.Mgo.Find("user", map[string]interface{}{
 		"i_appid": 2,
 		"$or": []map[string]interface{}{
@@ -616,7 +651,7 @@ func getPhoneUser(phone string) (bool, map[string]interface{}) {
 			{"s_m_phone": phone}},
 	}, `{"s_phone":-1}`, nil, false, 0, 1)
 	if users != nil && len(*users) > 0 {
-		return ok, (*users)[0]
+		return ok, *users
 	}
 	return ok, nil
 }

+ 6 - 1
src/jfw/modules/subscribepay/src/entity/shareFission.go

@@ -36,6 +36,7 @@ func NewShareFission(userId, shareUid, newSource string) *ShareFission {
 // 活动赠送
 const (
 	SaleChannel051    = "x051"          // 销售渠道活动赠送
+	SaleChannel054    = "x054"          // 活动 新注册/绑定 订单
 	OrderPassed       = 3               // 订单审核状态-审核通过
 	TableAuditRecords = "audit_records" // 审核记录表
 	OperateCreate     = 1               // 审核轨迹操作类型-新增
@@ -43,6 +44,7 @@ const (
 )
 
 var jianyubiReg = regexp.MustCompile(`达到(\d+)剑鱼币`)
+var regOrBindReg = regexp.MustCompile(`2024年新用户注册赠送7天超级订阅`)
 
 // 增加权益
 func (this *ShareFission) AddPower(r *http.Request) {
@@ -100,7 +102,7 @@ func AddPower(s_m_openid, userId string, r *http.Request) {
 starttime,endtime:权益开始结束时间
 types:订单类型  1: 仅延长周期  2: 开通权益
 */
-func Order(userid, starttime, endtime string, types, dayNum int, remark string) bool {
+func Order(userid, starttime, endtime string, types, dayNum int, remark, phone string) bool {
 	_, buyset, isvip := JyVipSubStruct.GetVipDetail(userid)
 	filter := VipSimpleMsg{
 		Area:       nil,
@@ -149,6 +151,9 @@ func Order(userid, starttime, endtime string, types, dayNum int, remark string)
 	// 如果备注为剑鱼币兑换
 	if jianyubiReg.MatchString(remark) {
 		insertMap["distribution_channel"] = SaleChannel051 // 销售渠道
+	} else if regOrBindReg.MatchString(remark) {
+		insertMap["distribution_channel"] = SaleChannel054
+		insertMap["user_phone"] = phone
 	}
 	insertMap["audit_status"] = OrderPassed // 订单审核状态
 

+ 5 - 4
src/jfw/modules/subscribepay/src/rpcfollow/share.go

@@ -18,7 +18,7 @@ import (
 	"app.yhyue.com/moapp/jypkg/common/src/qfw/util/jy"
 )
 
-//用户分享完成后,分享者和被分享者订单处理
+// 用户分享完成后,分享者和被分享者订单处理
 func (s *JyPayRpc) ShareFissionNew(p *frpc.JYShareUserIdsRes, r *frpc.JYShareResp) error {
 	if len(p.ShareUserInfo) > 0 {
 		errArr := []interface{}{}
@@ -28,12 +28,13 @@ func (s *JyPayRpc) ShareFissionNew(p *frpc.JYShareUserIdsRes, r *frpc.JYShareRes
 			if err != nil {
 				continue
 			}
-			data := util.Compatible.Select(userId, `{"i_vip_status":1,"l_vip_starttime":1,"l_vip_endtime":1,"o_vipjy":1,"i_shareCount":1,"s_m_openid":1}`)
+			data := util.Compatible.Select(userId, `{"i_vip_status":1,"l_vip_starttime":1,"l_vip_endtime":1,"o_vipjy":1,"i_shareCount":1,"s_m_openid":1,"s_phone":1, "s_m_phone":1}`)
 			if data != nil && len(*data) > 0 {
 				now := time.Now()
 				vip_status := qu.IntAll((*data)["i_vip_status"])
 				nowDay := time.Date(now.Year(), now.Month(), now.Day(), 23, 59, 59, 59, now.Location()).Unix() //当前晚上23:59:59
 				endtime := qu.Int64All(qu.If(qu.Int64All((*data)["l_vip_endtime"]) < nowDay, nowDay, qu.Int64All((*data)["l_vip_endtime"])))
+				phone := qu.If(qu.ObjToString((*data)["s_phone"]) != "", qu.ObjToString((*data)["s_phone"]), qu.ObjToString((*data)["s_m_phone"]))
 				//更新user表
 				setMap := map[string]interface{}{}
 				var updateMap = map[string]interface{}{}
@@ -90,7 +91,7 @@ func (s *JyPayRpc) ShareFissionNew(p *frpc.JYShareUserIdsRes, r *frpc.JYShareRes
 				st, et := "", ""
 				st = time.Unix(endtime, 0).Format(Date_Full_Layout)
 				et = endT.Format(Date_Full_Layout)
-				if !entity.Order(userId, st, et, types, ps.TimeExpand, ps.Remark) {
+				if !entity.Order(userId, st, et, types, ps.TimeExpand, ps.Remark, qu.ObjToString(phone)) {
 					r.Error_code = -2
 					errArr = append(errArr, map[string]interface{}{
 						"code":   -2,
@@ -115,7 +116,7 @@ func (s *JyPayRpc) ShareFissionNew(p *frpc.JYShareUserIdsRes, r *frpc.JYShareRes
 	return nil
 }
 
-//获取用户权益信息
+// 获取用户权益信息
 func (s *JyPayRpc) GetUserPowerInfo(p *frpc.JYShareUserIdsRes, r *frpc.JYShareResp, session *httpsession.Session) error {
 	if len(p.ShareUserInfo) > 0 {
 		ps := p.ShareUserInfo[0]

+ 2 - 2
src/jfw/modules/subscribepay/src/service/orderListDetails.go

@@ -1068,9 +1068,9 @@ func deleteRepeat(slice []int) []int {
 // @return sql语句 countsql语句
 func getOrderSql(userId, fromPage, typ string) (string, string) {
 	sql := fmt.Sprintf(`select id,order_code,order_channel,signing_subject,filter_publishtime,create_time,data_spec,filter_id,filter_keys,order_money,pay_money,data_count,order_status,pay_way,product_type,filter,pay_time,vip_starttime,vip_endtime,applybill_status,applybill_type,applybill_taxnum,applybill_company,vip_type,course_status,discount_price,d_relation_id,billingMode,is_backstage_order,return_status,expiration_time,buy_subject,buy_count from dataexport_order
-		where  del_status=0 and audit_status=3 and (order_channel != 'xdqd04' or (order_channel = 'xdqd04' and order_status=1)) AND ((is_backstage_order =0 AND user_id ='%s')`, userId)
+		where  del_status=0 and audit_status=3 and (order_channel != 'xdqd04' or order_channel IS NULL or (order_channel = 'xdqd04' and order_status=1)) AND ((is_backstage_order =0 AND user_id ='%s')`, userId)
 	sqlC := fmt.Sprintf(`select count(1) from dataexport_order
-		where del_status=0 and audit_status=3  and (order_channel != 'xdqd04' or (order_channel = 'xdqd04' and order_status=1)) AND ((is_backstage_order =0 AND user_id ='%s')`, userId)
+		where del_status=0 and audit_status=3  and (order_channel != 'xdqd04' or order_channel IS NULL or (order_channel = 'xdqd04' and order_status=1)) AND ((is_backstage_order =0 AND user_id ='%s')`, userId)
 
 	if fromPage == "wx" {
 		sql += `AND product_type !="企业商机管理"` //微信暂无企业商机管理

+ 1 - 0
src/jfw/modules/subscribepay/src/service/userAccountInfo.go

@@ -642,6 +642,7 @@ func (this *UserAccount) PhoneBind() {
 						"num":        50,
 						"baseUserId": sessVal["base_user_id"],
 						"positionId": sessVal["positionId"],
+						"isOnlyBind": true,
 					})
 					jy.Publish(util.Mgo_log, config.Config.Nsq, config.Config.Nsq_Topic, "task", userId, jy.Jyweb_node2, map[string]interface{}{
 						"code":       1008,

+ 2 - 1
src/jfw/modules/weixin/src/config.json

@@ -164,5 +164,6 @@
   "userCenterApi": "https://web-zxl.jydev.jianyu360.com",
   "merge": "<a href='%s'>系统检测到您有2个剑鱼标讯账号,为保证您的正常使用,请进行账号合并。</a>",
   "phrasesReplyText": "%s %s行业专属购买链接:<a href='%s'>点击</a>",
-  "miniProgramActivateReplyText": "%s %s 点此查看:<a href='%s'>%s</a>"
+  "miniProgramActivateReplyText": "%s %s 点此查看:<a href='%s'>%s</a>",
+  "subKFReplyText": "⚠重要提醒⚠\n因微信服务号消息折叠(隐藏)到一起,使您无法第一时间收到重要消息推送,为避免遗漏重要商机,3步将公众号置顶\n\n第1步:点击右上角“ ”\n第2步:点击右上角“…”\n第3步:点击“置顶公众号”"
 }

+ 1 - 1
src/jfw/modules/weixin/src/reply.yaml

@@ -9,7 +9,7 @@ stream:
   #  imgUrl: "https://jianyu360.cn/images/ddshare.png",
   - type: Text
     action: 1
-    desc: "欢迎关注剑鱼标讯"
+    desc: "Hi~欢迎来到剑鱼标讯,支持全国招采信息的免\n费搜索订阅,已帮助300W+用户实现业绩增长\n\n新人福利!点击领取7日免费会员  (加P647迭代关注公众号领会员链接)\n\n<a href=\"https://wx.jianyu360.cn/stl/kf\" target=\"_blank\">【点击联系客服】</a>\n如需获取更多专属服务,请添加客服微信或\n拨打客服热线 400-108-6670"
   - type: Text
     action: 2
     desc: "Hi~ 欢迎来到剑鱼标讯,我是专业的招投标大数据服务平台,支持全网招投标信息的免费搜索订阅,目前已服务300W+招投标人,中标更轻松。<a href='http://wx.jianyu360.cn/stl/index'>新人福利!绑定手机号,免费领取行业报告!</a>\n✅<a href='https://wx.jianyu360.cn/jy_mobile/tabbar/home'>【标讯搜索】</a>\n✅<a href='https://wx.jianyu360.cn/front/wx_dataExport/toSieve'>【数据服务】</a>\n✅<a href='https://mp.weixin.qq.com/mp/homepage?__biz=Mzk0MjIyMzY2Nw==&hid=2&sn=c2eabe3ce336a02746670f6559e48287'>【快速了解】</a>\n✅<a href='https://wx.jianyu360.cn/page_social_mobile/home?receiveAppId=465d475c52&userType=1&pname=%E5%89%91%E9%B1%BC%E6%A0%87%E8%AE%AF'>【联系客服】</a>\n\n如需获取更多专属服务,请添加客服微信或拨打客服热线400-108-6670"

+ 6 - 1
src/jfw/modules/weixin/src/wx/scanReplayStream.go

@@ -31,6 +31,8 @@ type ReplyTask struct {
 	Title   string `json:"title" doc:"图文标题"`
 	Url     string `json:"url" doc:"图文链接"`
 	ImgUrl  string `json:"imgUrl" doc:"图文图片地址"`
+	Start   int64  `json:"start"` //开始时间
+	End     int64  `json:"end"`   //结束时间
 }
 
 // ScanReplayStream 扫码回复公共方法处理
@@ -51,6 +53,9 @@ func ScanReplayStream(w ResponseWriter, openId, code string, action int) error {
 		if !(task.EwmCode == "" || task.EwmCode == code) {
 			continue
 		}
+		if task.Start > time.Now().Unix() || (task.End > 0 && task.End < time.Now().Unix()) {
+			continue
+		}
 		//等待时长后出发
 		var wait = time.Second
 		if task.Wait > 0 {
@@ -105,6 +110,6 @@ func getCacheMediaId(w ResponseWriter, mediaType, source string) (string, error)
 		return "", err
 	}
 	log.Println("cacheMediaIdKey--", cacheMediaIdKey)
-	redis.Put("other", cacheMediaIdKey, mediaId, 24*60*60*30)
+	redis.Put("other", cacheMediaIdKey, mediaId, 24*60*60*2)
 	return mediaId, nil
 }

+ 13 - 4
src/jfw/modules/weixin/src/wx/wx.go

@@ -190,10 +190,10 @@ func MsgTxtHandler(w ResponseWriter, r *Request) {
 			Description: BRTArray[1],
 			Url:         webdomain + replyUrl + fmt.Sprintf(BRTArray[3], id),
 		}})
-	} else if strings.Replace(r.Content, " ", "", -1) == "客服" {
-		log.Println("进入客服", r.FromUserName, r.Content) //测试信息
-		w.Reply2CustomerService()
-	} else { //if now.Hour() > 17 || now.Hour() < 9 || tools.CheckNowHoliday() {
+		//} else if strings.Replace(r.Content, " ", "", -1) == "客服" {
+		//	log.Println("进入客服", r.FromUserName, r.Content) //测试信息
+		//	w.Reply2CustomerService()
+	} else if r.Content != "" { //if now.Hour() > 17 || now.Hour() < 9 || tools.CheckNowHoliday() {
 		if KeysReply(r.Content, w) {
 			return
 		}
@@ -218,6 +218,12 @@ func MsgTxtHandler(w ResponseWriter, r *Request) {
 			}
 			w.ReplyText(fmt.Sprintf(config.Sysconfig["weixinAutoRpl"].(string), rsssetUrl, searchUrl, searchWordUrl, searchWord, vipFree7Url, chanPartnerUrl))
 		}
+	} else {
+		subKFReplyText := config.Sysconfig["subKFReplyText"].(string)
+		log.Println(r.FromUserName, "-- subscribe reply --", subKFReplyText)
+		if subKFReplyText != "" {
+			w.ReplyText(subKFReplyText)
+		}
 	}
 }
 
@@ -516,6 +522,9 @@ var loginWxPool = make(chan bool, 1)
 
 func Subscribe(w ResponseWriter, r *Request) {
 	defer util.Catch()
+	defer func() {
+		MsgTxtHandler(w, r)
+	}()
 	saveEvenLog(r)
 	openid := r.FromUserName
 	if isRepeatCall(openid, r.CreateTime) {

BIN
src/web/staticres/common-module/active/register/bg.png


+ 669 - 0
src/web/staticres/common-module/active/register/register.css

@@ -0,0 +1,669 @@
+.j-icon-bg {
+  display: block;
+  width: 24px;
+  height: 24px;
+  background-repeat: no-repeat;
+  background-size: contain;
+}
+.icon-bg-jy-coin {
+  background-image: url(/common-module/active/2022.5.20/jianyubi@2x.png);
+}
+.icon-bg-jy-svip {
+  background-image: url(/common-module/active/2022.5.20/chaojidingyue@2x.png);
+}
+.icon-img-close {
+  background-color: transparent;
+  background-image: url(/common-module/active/202402/icon-img-close@2x.png);
+}
+
+/* vant-custom */
+.j-confirm-dialog {
+  border-radius: 8px;
+}
+.j-confirm-dialog .van-dialog__message {
+  font-size: .32rem;
+  color: #171826;
+  line-height: .48rem;
+}
+.j-confirm-dialog.text-center .van-dialog__message {
+  text-align: center;
+}
+.j-confirm-dialog .van-button {
+  font-size: .36rem;
+  color: #171826;
+  line-height: .52rem;
+}
+
+
+.header-banner > img,
+.point-img > img {
+  display: block;
+  width: 100%;
+}
+.section {
+  padding: 0 .24rem;
+  margin-bottom: .4rem;
+}
+.section .section-card {
+  background-color: #FFEAD1;
+  border-radius: .16rem;
+}
+.header-banner-container {
+  position: relative;
+  background: #EB3A29 url(/common-module/active/202402/mobile/mobile-banner-bg.png) no-repeat;
+  background-size: 100% auto;
+  background-position: 0 1rem;
+  padding: 1.86rem 0 0;
+}
+.header-banner-header {
+  margin: 0 auto;
+  width: 5.58rem;
+  min-height: 1.96rem;
+}
+
+#main-app {
+  background: linear-gradient(180deg, #F7680F 0%, #E84D14 100%);
+}
+#main-app img {
+  display: block;
+  width: 100%;
+}
+
+.fixed-right {
+  position: fixed;
+  top: 3rem;
+  right: .16rem;
+  display: flex;
+  flex-direction: column;
+  z-index: 2;
+}
+.wx .fixed-right {
+  top: 1.6rem;
+}
+
+.header-banner-light {
+  width: 1.8rem;
+  height: 1.3rem;
+}
+.header-banner-light:last-of-type {
+  margin-left: .2rem;
+}
+.header-banner-bottom {
+  margin: 0 auto;
+  width: 3.45rem;
+  margin-top: -0.32rem;
+}
+.header-banner-bottom-img-2 {
+  margin-top: .08rem;
+}
+
+.header-banner-content {
+  display: flex;
+  flex-direction: column;
+  align-items: center;
+}
+.header-banner-content-time {
+  margin: .2rem 0;
+  margin-top: .06rem;
+  color: #fff;
+  font-size: .2rem;
+  letter-spacing: .06rem;
+  text-align: center;
+}
+
+.header-banner-machine {
+  position: relative;
+  width: 100%;
+  height: 6.31rem;
+  background: url(/common-module/active/202402/mobile/get-eggs-machine-bg.png) no-repeat;
+  background-size: contain;
+  background-position: center;
+}
+.header-banner-machine .machine-title {
+  position: absolute;
+  top: .06rem;
+  left: 50%;
+  transform: translateX(-50%);
+  font-size: .24rem;
+  font-weight: 700;
+  color: #fff;
+}
+.header-banner-machine .machine-button-tip {
+  position: absolute;
+  color: #fff;
+  font-size: .26rem;
+  font-weight: 700;
+  height: .48rem;
+  text-align: center;
+  line-height: .44rem;
+}
+.header-banner-machine .machine-button-tip.tip-left {
+  width: 4.12rem;
+  right: .9rem;
+  top: -.36rem;
+  background: url(/common-module/active/202402/button-left-tip-bg.png) no-repeat;
+  background-size: contain;
+}
+.header-banner-machine .machine-button-tip.tip-right {
+  width: 1.6rem;
+  height: .48rem;
+  right: -.8rem;
+  top: -0.26rem;
+  white-space: nowrap;
+  background: url(/common-module/active/202402/button-right-tip-bg.png) no-repeat;
+  background-size: contain;
+}
+
+.header-banner-machine .machine-confirm {
+  position: absolute;
+  left: 50%;
+  top: 2.64rem;
+  transform: translateX(-50%);
+  background-color: transparent;
+  width: 3.16rem;
+  height: 1rem;
+  background: url(/common-module/active/202402/get-eggs-machine-button.png) no-repeat;
+  background-size: contain;
+  z-index: 6;
+}
+.header-banner-machine .machine-pointer {
+  position: absolute;
+  width: 1.22rem;
+  height: 1.06rem;
+  right: -0.50rem;
+  bottom: -0.3rem;
+  transform: scale(0.9);
+  animation: pointer 1.3s cubic-bezier(0.4, 0, 0.2, 1) 1.3s infinite alternate;
+  background: url(/common-module/active/202402/img-pointer.png) no-repeat;
+  background-size: contain;
+}
+
+.header-banner-machine .machine-ani-content {
+  position: absolute;
+  top: .48rem;
+  left: calc(50%);
+  transform: translateX(-50%);
+  width: 5.2rem;
+  height: 2.68rem;
+}
+.header-banner-machine .machine-canvas {
+  width: 5rem;
+  height: 2.5rem;
+  z-index: 1;
+}
+.header-banner-machine .machine-mask {
+  background: transparent url(/common-module/active/202402/pc-get-eggs-machine-mask.png) no-repeat;
+  background-size: cover;
+  z-index: 3;
+}
+.header-banner-machine .machine-ball-list {
+  position: relative;
+  width: 100%;
+  height: 96%;
+}
+.header-banner-machine .machine-ball-item {
+  position: absolute;
+  width: 40px;
+  height: 40px;
+  background-repeat: no-repeat;
+  background-size: contain;
+  transition: all 0.5s ease;
+}
+
+.machine-balance-container {
+  position: absolute;
+  left: 1.2rem;
+  top: 4.32rem;
+  width: 3.32rem;
+  color: #fff;
+  font-size: .28rem;
+  font-weight: 700;
+}
+.my-coin-count {
+  padding-left: .12rem;
+}
+.add-jianyu-coin {
+  position: relative;
+  display: flex;
+  align-items: center;
+  margin-top: .2rem;
+  padding: 0.06rem .14rem;
+  font-size: .22rem;
+  font-weight: 400;
+  border-radius: .25rem;
+  border: 1px solid #FFF;
+  box-shadow: 0px 0px 4px 0px rgba(236, 143, 4, 0.25) inset;
+}
+.earn-button {
+  position: absolute;
+  right: 0;
+  top: 0;
+  height: 100%;
+  padding: 2px 6px;
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  border-radius: inherit;
+  color: #E8100D;
+  font-weight: 700;
+  background: linear-gradient(90deg, #FBDB9F 2.6%, #FFECD7 50.52%, #FFDEB8 100%);
+  box-shadow: 0px 0px 4px 0px rgba(236, 143, 4, 0.25) inset;
+}
+
+
+.reward-section .section-header,
+.activity-rules .section-header {
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  margin-bottom: .2rem;
+}
+.section-header-img {
+  display: block;
+  width: 2.08rem;
+  height: .74rem;
+  background-size: contain;
+  background-repeat: no-repeat;
+  background-position: center;
+}
+.section-header-img.reward-title {
+  background-image: url(/common-module/active/202402/activity-reward-text@2x.png);
+}
+.section-header-img.rules-title {
+  background-image: url(/common-module/active/202402/activity-rules-text@2x.png);
+}
+
+.reward-list.empty {
+  padding-top: 0;
+  min-height: 1.2rem;
+  display: flex;
+  align-items: center;
+  justify-content: center;
+}
+.reward-empty {
+  color: #171826;
+}
+
+.activity-red-button {
+  display: inline-block;
+  width: 4.04rem;
+  height: 0.96rem;
+  color: #fff;
+  font-size: .36rem;
+  font-weight: 700;
+  background-color: transparent;
+  background-repeat: no-repeat;
+  cursor: pointer;
+  background-image: url(/common-module/active/202402/button-red-bg@2x.png);
+  background-size: 100%;
+}
+.reward-card.no-login {
+  text-align: center;
+}
+
+.reward-list {
+  padding: 0 .44rem;
+}
+.reward-list-item {
+  display: flex;
+  justify-content: space-between;
+  padding: .24rem 0;
+}
+.reward-list-item:not(:last-of-type) {
+  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
+}
+.reward-list-item .r-l-i-l {
+  width: .8rem;
+  height: .8rem;
+}
+.reward-list-item .r-l-i-c {
+  margin: 0 .16rem;
+  flex: 1;
+}
+.reward-list-item .r-l-i-c-line:not(:last-of-type) {
+  margin-bottom: .16rem;
+}
+.reward-list-item .r-l-i-action {
+  font-size: .48rem;
+  color: #FFCD6A;
+}
+.reward-list-item .reward-text {
+  font-size: .32rem;
+  color: #171826;
+  line-height: .4rem;
+}
+.reward-list-item .reward-desc {
+  font-size: .24rem;
+  color: #171826;
+  line-height: .32rem;
+}
+.reward-list-item .receive-time {
+  font-size: .2rem;
+  color: #9B9CA3;
+}
+.reward-button {
+  color: #fff;
+  font-size: .24rem;
+  line-height: .32rem;
+  border-radius: .66rem;
+  border: 2px solid #FEF2C0;
+  background: linear-gradient(180deg, #F86436 0%, #E1180B 100%);
+  box-shadow: 0px 6.623px 6.623px 0px rgba(227, 29, 14, 0.24);
+}
+.reward-copy-button {
+  margin-top: .08rem;
+  width: 3.46rem;
+}
+
+.reward-list-item .receive-from {
+  padding: .04rem .16rem;
+  font-size: .2rem;
+  color: #171826;
+  line-height: .32rem;
+  background: linear-gradient(135deg, #FFCC66 0%, #FFECC5 100%);
+  border-radius: .2rem 0 0 .2rem;
+  white-space: nowrap;
+}
+.reward-list-item  .receive-time {
+  font-size: .24rem;
+  color: #9B9CA3;
+  line-height: .28rem;
+}
+
+.rules-list {
+  padding: .24rem;
+}
+.rules-item {
+  display: flex;
+  /* align-items: center; */
+  margin-bottom: .16rem;
+}
+.rules-item:last-of-type {
+  margin-bottom: 0;
+}
+.rule-index {
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  margin-right: .24rem;
+  width: .44rem;
+  height: .46rem;
+  color: #fff;
+  background-image: url(/common-module/active/202402/index-bg@2x.png);
+  background-repeat: no-repeat;
+  background-size: contain;
+}
+.rule-text {
+  flex: 1;
+  font-size: .24rem;
+  color: #1d1d1d;
+  line-height: .36rem;
+}
+.rules-list a,
+.terms-link {
+  color: #006CFF;
+}
+.rules-list a:hover,
+.terms-link:hover {
+  color: #006CFF;
+  text-decoration: none;
+}
+
+
+.activity-rules-button {
+  position: absolute;
+  right: 0;
+  top: 12%;
+  z-index: 9;
+
+  /* padding: .12rem .08rem;
+  writing-mode: vertical-lr;
+  background: linear-gradient(272deg, rgba(233, 138, 95, 0.5) 0%, #DB5634 100%); */
+
+  color: #fff;
+  width: .96rem;
+  height: .54rem;
+  line-height: .28rem;
+  border-radius: .12rem 0px 0px .12rem;
+  background: url(/common-module/active/202402/mobile/share-button.png) no-repeat;
+  background-size: cover;
+}
+.activity-rules-button::after {
+  /* content: ''; */
+  position: absolute;
+  top: -0.04rem;
+  bottom: -0.04rem;
+  left: -0.04rem;
+  right: -0.04rem;
+  background: linear-gradient(180deg, rgba(255, 216, 216, 0), rgba(255, 216, 216, 1));
+  z-index: -1;
+  border-radius: .12rem 0px 0px .12rem;
+}
+
+#active-tip-modal.van-popup {
+  background:transparent;
+}
+#active-tip-modal[data-modal-type='over'] .modal-dialog.active-tip--over {
+  display:flex;
+}
+.active-tip--over,
+.active-tip--success {
+  position:relative;
+  display:flex;
+  flex-direction:column;
+  align-items:center;
+  width:6.06rem;
+  margin:0 auto;
+  top:calc(50% - 4rem);
+  border-radius:0.24rem;
+  overflow:hidden;
+}
+.active-tip--over button {
+  width:4.62rem;
+  height:0.96rem;
+  background: linear-gradient(90deg, #FE542F 0%, #F01313 100%);
+  font-size:0.32rem;
+  font-weight:500;
+  color:#fff;
+  border-radius:0.48rem;
+  margin-bottom: 0.8rem;
+}
+.active-tip--over {
+  background-color:#fff;
+}
+.active-tip--over h4 {
+  font-size:0.4rem;
+  font-weight:bold;
+  color:#171826;
+  line-height:0.56rem;
+  margin-top:0.64rem;
+  margin-bottom:0.4rem;
+}
+.active-tip--over p {
+  margin-top:0.32rem;
+  margin-bottom:0.56rem;
+  font-size:0.28rem;
+  font-weight:500;
+  color:#5F5E64;
+  line-height:0.4rem;
+  text-align:center;
+}
+.close-dialog-icon img {
+  width:0.32rem;
+}
+.close-dialog-icon {
+  position:absolute;
+  top:0;
+  right:0;
+  padding:0.24rem;
+  cursor:pointer;
+}
+
+#active-tip-modal[data-modal-type=success] {
+  overflow: unset;
+}
+#active-tip-modal[data-modal-type=success] .close-dialog-icon-bottom {
+  position:absolute;
+  bottom:-1rem;
+  left:50%;
+  width: .48rem;
+  height: .48rem;
+  transform: translateX(-50%);
+  cursor:pointer;
+}
+
+.modal-dialog.active-tip--success {
+  background: url(/common-module/active/202402/success-dialog-bg.png) no-repeat;
+  background-size: contain;
+  background-position: center;
+  overflow: auto;
+}
+.active-tip-success-content {
+  display: flex;
+  flex-direction: column;
+  align-items: center;
+  justify-content: space-between;
+  position: absolute;
+  height: 4.52rem;
+  bottom: 0.32rem;
+  left: 50%;
+  transform: translateX(-50%);
+}
+.reward-success-text {
+  color: #fff;
+  font-size: .28rem;
+  line-height: .4rem;
+  text-align: center;
+  white-space: nowrap;
+}
+.reward-img-container {
+  position: relative;
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  width: 2.6rem;
+}
+.reward-img-container > .reward-img {
+  position: relative;
+  width: 2rem;
+}
+
+.float-tip-bg {
+  position: relative;
+  padding-left: .2rem;
+  padding-right: .12rem;
+  color: #fff;
+  font-size: .36rem;
+  font-weight: 700;
+  height: .6rem;
+  min-width: 1.12rem;
+  white-space: nowrap;
+  background-image: url(/common-module/active/202402/float-tip-left@2x.png), url(/common-module/active/202402/float-tip-right@2x.png);
+  background-repeat: no-repeat, no-repeat;
+  background-position: left top, right top;
+  background-size: contain, contain;
+  z-index: 2;
+}
+.float-tip-content {
+  width: 100%;
+  height: .48rem;
+  background-color: #E22317;
+  line-height: .48rem;
+  text-align: center;
+}
+.reward-float-tip {
+  position: absolute;
+  top: -.2rem;
+  left: 1.6rem;
+  z-index: 3;
+}
+
+.floating {
+  animation: floating 1.3s ease-in-out 1.3s infinite alternate;
+  transition: left,right,top,bottom 1.3s ease;
+}
+.floating.delay-100 {
+  /* animation-delay: 0.1s; */
+}
+.floating.delay-300 {
+  /* animation-delay: 0.3s; */
+}
+
+@keyframes floating {
+  from {
+    transform: translate(0, 0);
+  }
+  to {
+    transform: translate(0, 10px);
+  }
+}
+
+@keyframes pointer {
+  from {
+    transform: translate(0, 0) scale(1);
+  }
+  to {
+    transform: translate(0, -.1rem) scale(1.2);
+  }
+}
+
+
+.register-form .van-button--round {
+  margin: 0.24rem 0;
+  height: 0.92rem;
+  width: 100%;
+  line-height: 0.92rem;
+  color: #fff;
+  font-size: 0.36rem;
+  background: linear-gradient(90deg, #FA6F33 0%, #F44012 100%);
+  border: unset;
+  border-radius: 0.16rem;
+}
+.register-form .footer-button-box .go-easy {
+  color: rgba(246, 77, 28, 1);
+  font-size: 0.28rem;
+  line-height: 0.4rem;
+}
+.register-form .footer-button-box {
+  display: flex;
+  flex-direction: column;
+  align-items: center;
+  padding: 0.32rem;
+}
+
+.register-form .van-form .getCodeDownTime .van-count-down{
+  color: rgba(155, 156, 163, 1);
+  font-size: 0.3rem;
+}
+.register-form .van-form .getCodeDownTime {
+  color: rgba(155, 156, 163, 1);
+  display: flex;
+  flex-direction: row;
+  align-items: center;
+}
+.register-form .van-form .getCode {
+  color: rgba(155, 156, 163, 1);
+}
+.register-form .van-form .active-text {
+  color: rgba(246, 77, 28, 1);
+}
+.register-form .van-form .van-cell::after {
+  border-color: rgba(0, 0, 0, 0.1);
+}
+.register-form .van-form .van-cell {
+  font-size: 0.3rem;
+  padding: 0.28rem 0.32rem;
+  background: transparent;
+}
+.register-form .van-form input::placeholder{
+  color: rgba(155, 156, 163, 1);
+}
+.register-form .van-form{
+  border-radius: 0.32rem;
+  background: rgba(255, 255, 255, 0.9);
+  margin: -2.12rem 0.28rem 1rem 0.28rem;
+  padding: 0.24rem;
+  overflow: hidden;
+  color: rgba(155, 156, 163, 1);
+  font-size: 0.3rem;
+}

+ 403 - 0
src/web/staticres/common-module/active/register/register.js

@@ -0,0 +1,403 @@
+var platform = utils.$env.platform
+
+
+function fLoginSuccessFn (r) {
+  if (r.data) {
+    task.$toast.clear()
+    switch (r.data.status) {
+      case 1: {
+        task.showHomeToast('注册成功,赠送七天超级订阅。')
+        break
+      }
+      case -1: {
+        task.$toast('该手机手机号已经绑定其他微信号,无法重复绑定。')
+        break
+      }
+      case -4: {
+        task.$toast('系统错误,请重试')
+        break
+      }
+      case 3: {
+        task.showHomeToast('注册成功,赠送七天超级订阅。')
+        break
+      }
+      default: {
+        task.$toast('请稍后重试')
+        break
+      }
+    }
+  }
+  // if (r && r.data) {
+  //   loginSuccess(r.data)
+  // }
+}
+
+var fastLogin = {}
+if (utils.$envs.inApp) {
+  fastLogin = new Vue({
+    delimiters: ['${', '}'],
+    mixins: [loadingMixin, toastMixin, fLogin, fastLoginConfApp],
+    el: '#fast-login-container',
+    methods: {
+      doPhoneFastLoginSuccess (r) {
+        fLoginSuccessFn(r)
+      }
+    }
+  })
+} else {
+  fastLogin = new Vue({
+    delimiters: ['${', '}'],
+    mixins: [loadingMixin, toastMixin, fLogin, fastLoginConfH5],
+    el: '#fast-login-container',
+    methods: {
+      doPhoneFastLoginSuccess (r) {
+        fLoginSuccessFn(r)
+      }
+    }
+  })
+}
+
+var loginEvents = {
+  init: function () {
+    this.bindEvents()
+    this.checkFastButtonShow()
+  },
+  bindEvents: function () {
+    if (utils.$envs.inApp) {
+      this.initAppEvents()
+    } else {
+      this.initH5Events()
+    }
+  },
+  checkFastButtonShow: function () {
+    if (utils.$envs.inApp) {
+      // 如果app版本号大于3.0.5则展示
+      var currentVersion = ''
+      var targetVersion = '3.0.6'
+      try {
+        currentVersion = JyObj.getVersion()
+        if (currentVersion) {
+          var c = compareVersion(currentVersion, targetVersion)
+          this.fastButtonShow(!c)
+        }
+      } catch (error) {
+        console.log(error)
+      }
+    } else {
+      this.fastButtonShow(true)
+    }
+  },
+  fastButtonShow: function (f) {
+    // if (f) {
+    //   $('.forget').removeClass('center').find('.fast-login-open-link').show()
+    // } else {
+    //   $('.forget').addClass('center').find('.fast-login-open-link').hide()
+    // }
+  },
+  checkAutoFastLogin: function (auto) {
+    var autoFastLogin = utils.getParam('autoFastLogin')
+    if (autoFastLogin || auto) {
+      fastLogin.disabledToast()
+      $('.fast-login-open-link').trigger('click')
+    }
+  },
+  initAppEvents: function () {
+    $('.fast-login-open-link').on('click', fastLogin.getLogin)
+    this.checkAutoFastLogin(false)
+  },
+  initH5Events: function () {
+    $('.fast-login-open-link').on('click', fastLogin.getAuthInfo)
+    this.checkAutoFastLogin(false)
+  },
+}
+
+$(function () {
+  loginEvents.init()
+})
+
+
+var task = new Vue({
+  el: '#main-app',
+  delimiters: ['${', '}'],
+  mixins: [shareMixin],
+  data: {
+    isRunDownTime: false,
+    form: {
+      phone: '',
+      identCode: ''
+    },
+    platform: 'app',
+    shareInfo: {},
+    // wx分享配置
+    shareConf: {
+      title: '',
+      content: '',
+      pathname: '/weixin/frontPage/activity/free/register',
+      origin: location.origin,
+      link: '',
+      imgUrl: '',
+    },
+    shareEnableConf: {
+      shareActionImmediate: false,
+      app: true, // 开启app分享
+      wx: true, // 开启wx分享
+    },
+    conf: {
+      now: Date.now(),
+      header_pic: '',
+    },
+    loading: false,
+    dialog: {
+      show: false,
+      type: 'over',
+      successInfo: {},
+      successImg: '',
+      successTipLabel: '',
+      successTipContent: '',
+      successButtonText: '',
+      successRewardAttribute: 0,
+    }
+  },
+  computed: {
+    forbidClose: function () {
+      return this.dialog.type === 'over'
+    },
+    shareInfoPlatform: function () {
+      var platform = this.platform.toUpperCase()
+      if (this.shareInfo && this.shareInfo[platform]) {
+        return this.shareInfo[platform]
+      } else {
+        return {}
+      }
+    },
+    canActiveCode () {
+      return this.regPhone(this.form.phone)
+    },
+    canRunDownTime() {
+      return this.isRunDownTime === false
+    },
+    canRuleCode () {
+      return this.regCode(this.form.identCode)
+    },
+    canSubmit () {
+      return this.canActiveCode && this.canRuleCode
+    }
+  },
+  created: function () {
+    this.platform = utils.$env.platform
+    this.ajaxActiveStatus()
+  },
+  mounted: function () {
+    utils.iosBackRefresh()
+  },
+  methods: {
+    showHomeToast (tip) {
+      this.$toast.setDefaultOptions({ duration: 3000 })
+      this.$toast(tip)
+      // sessionStorage.setItem('show-home-tip', tip)
+      location.href = '/jy_mobile/tabbar/home'
+    },
+    finishDownTime () {
+      this.isRunDownTime = false
+      this.$refs.countDown.reset()
+    },
+    getCode () {
+      if (!this.canRunDownTime || !this.canActiveCode) {
+        return false
+      }
+
+      var _this = this
+      this.$toast.loading()
+
+      $.ajax({
+        url: '/jyapp/free/login',
+        type: 'post',
+        data: {
+          reqType: 'sendIdentCode',
+          phone: this.form.phone,
+          token: undefined
+        },
+        success: function (res) {
+          _this.$toast.clear()
+          if (res.status === 1) {
+            _this.isRunDownTime = true
+            _this.$refs.countDown.reset()
+            _this.$refs.countDown.start()
+          } else {
+            _this.$toast(res.error_msg || '请稍后重试')
+            _this.finishDownTime()
+          }
+        },
+        error: function () {
+          _this.$toast.clear()
+          _this.$toast('请稍后重试')
+          _this.finishDownTime()
+        }
+      })
+    },
+    doSubmit () {
+      if (!this.canSubmit) {
+        return false
+      }
+
+      var _this = this
+      this.$toast.loading()
+      $.ajax({
+        url: '/jyapp/free/login',
+        type: 'post',
+        data: {
+          reqType: 'identCodeLogin',
+          phone: this.form.phone,
+          identCode: this.form.identCode
+        },
+        success: function (res) {
+          if (res) {
+            _this.$toast.clear()
+            switch (res.status) {
+              case 0: {
+                if(localStorage){
+                  localStorage.loginPhone = phone;
+                }
+                _this.showHomeToast('注册成功,赠送七天超级订阅。')
+                break
+              }
+              case -4: {
+                _this.$toast('系统错误,请重试')
+                break
+              }
+              case -1: {
+                _this.$toast('验证码不正确')
+                break
+              }
+              case -2: {
+                _this.$toast('该手机手机号已经绑定其他微信号,无法重复绑定。')
+                break
+              }
+              case 1: {
+                _this.showHomeToast('注册成功,赠送七天超级订阅。')
+                break
+              }
+              case 3: {
+                _this.showHomeToast('注册成功,赠送七天超级订阅。')
+                break
+              }
+              default: {
+                _this.$toast('请稍后重试')
+                break
+              }
+            }
+          } else {
+            _this.$toast.clear()
+            _this.$toast('请稍后重试')
+          }
+        },
+        error: function () {
+          _this.$toast.clear()
+          _this.$toast('请稍后重试')
+        }
+      })
+
+
+
+
+
+    },
+    regPhone (val) {
+      return /^1[3-9]\d{9}$/.test(val)
+    },
+    regCode (val) {
+      return /\d{6}$/.test(val);
+    },
+    checkUserHasLogin() {
+      const _this = this
+      $.ajax({
+        type: 'POST',
+        url: '/jypay/user/getSimpleData',
+        success: function (res) {
+          if(res && res.userId) {
+            _this.hasLogin = true
+          }
+        },
+        error:function (e) {
+          _this.hasLogin = false
+        },
+        complete: function () {
+          if (_this.hasLogin) {}
+        }
+      })
+    },
+    getShareConfWithPlatform: function (platform) {
+      var p = platform.toUpperCase()
+      if (this.shareInfo && this.shareInfo[p]) {
+        return this.shareInfo[p]
+      }
+    },
+    doShareAjax: function (shareItem) {
+      if (!shareItem) return
+      var shareToWx = shareItem.id == 1 || shareItem.id == 3
+      if (shareToWx) {
+        var w = this.getShareConfWithPlatform('wx')
+        if (w) {
+          this.shareConf.origin = this.domainConf.wx
+          this.refreshShareInfo(w)
+          this.refreshShareLink()
+        }
+      } else {
+        var a = this.getShareConfWithPlatform('app')
+        if (a) {
+          this.shareConf.origin = this.domainConf.app
+          this.refreshShareInfo(a)
+          this.refreshShareLink()
+        }
+      }
+    },
+
+
+    ajaxActiveStatus: function () {
+      var _this = this
+      $.ajax({
+        url: '/jyActivity/getConfig/info',
+        type: 'post',
+        contentType: 'application/json',
+        data: JSON.stringify({
+          code: 'newRegister'
+        }),
+        success: function (res) {
+          if (res && res.data && res.data.entTime) {
+            var needTip = Date.now() > new Date(res.data.entTime).getTime()
+            if (needTip) {
+              _this.showActiveOver()
+            }
+          } else {
+            _this.$toast('获取活动信息异常')
+          }
+        }
+      })
+    },
+    showActiveOver () {
+      this.dialog.show = true
+    },
+    onClickReceive () {
+      location.href = '/jylab/mainSearch?form=register'
+    },
+    // 初始化
+    calcShareInfo: function () {
+      this.refreshShareInfo(this.shareInfoPlatform)
+      this.initShareMixin()
+      // this.shareReady = true
+      // console.log(JSON.stringify(this.shareInfoPlatform))
+    },
+    refreshShareInfo: function (r) {
+      if (!r) {
+        return
+      }
+      this.shareConf.title = r.title
+      this.shareConf.content = r.subtitle
+      this.shareConf.pathname = r.href
+      this.shareConf.link = r.href
+      this.shareConf.imgUrl = r.pic
+    },
+
+  },
+})
+

+ 117 - 0
src/web/templates/frontRouter/wx/activity/free/register.html

@@ -0,0 +1,117 @@
+<!DOCTYPE html>
+<html lang="zh-CN" style="font-size: 50px;">
+
+<head>
+    <title>注册送7天超级订阅</title>
+
+    {{include "/big-member/wx/meta.html"}}
+
+    <!--S-当前页面的css资源-->
+    <link rel="stylesheet" href=//cdn-common.jianyu360.com/cdn/lib/reset-css/5.0.1/reset.min.css />
+    <link rel="stylesheet" href=//cdn-common.jianyu360.com/cdn/lib/vant/2.12.24/lib/index.css />
+    <link rel="stylesheet" href=//cdn-common.jianyu360.com/cdn/lib/vant/2.12.24/lib/icon/local.css />
+    <link rel="stylesheet" href='{{Msg "seo" "cdn"}}/big-member/weixin/css/public.css?v={{Msg "seo" "version"}}'>
+    <link rel="stylesheet" href='{{Msg "seo" "cdn"}}/big-member/weixin/css/j-icons.css?v={{Msg "seo" "version"}}'>
+    <link rel="stylesheet" href='{{Msg "seo" "cdn"}}/common-module/public/css/app-share-sheet.css?v={{Msg "seo" "version"}}' />
+    <link rel="stylesheet" type="text/css" href="{{Msg "seo" "cdn"}}/common-module/account/css/fast-login.css?v={{Msg "seo" "version"}}"/>
+    <link rel="stylesheet" href='{{Msg "seo" "cdn"}}/common-module/active/register/register.css?v={{Msg "seo" "version"}}' />
+    <script src='{{Msg "seo" "cdn"}}/big-member/js/rem.js?v={{Msg "seo" "version"}}'></script>
+    <!--E-当前页面的css资源-->
+    <style>
+        .header-banner {
+            margin-top: -0.6rem;
+        }
+        .header-banner-container {
+            background-position: 0 0;
+            padding-top: 0.86rem;
+        }
+        .activity-rules-button {
+            top: 8%
+        }
+    </style>
+</head>
+
+<body>
+    <div class="j-container app">
+        <div class="j-main" id="main-app" v-cloak>
+
+            <div class="register-bg">
+              <img src='{{Msg "seo" "cdn"}}/common-module/active/register/bg.png?v={{Msg "seo" "version"}}' alt="bg">
+            </div>
+            <div class="register-form">
+              <van-form validate-first @submit="doSubmit">
+                <!-- 通过 pattern 进行正则校验 -->
+                <van-field
+                  v-model="form.phone"
+                  name="手机号码"
+                  placeholder="手机号码"
+                  maxlength="11"
+                  type="tel"
+                  :rules="[{ validator: regPhone, message: '请输入正确的手机号码' }]"
+                ></van-field>
+                <!-- 通过 validator 进行函数校验 -->
+                <van-field
+                  v-model="form.identCode"
+                  name="手机验证码"
+                  placeholder="手机验证码"
+                  maxlength="6"
+                  type="number"
+                  :rules="[{ validator: regCode, message: '请输入正确的手机验证码' }]"
+                >
+                  <template v-slot:button>
+                    <span v-show="canRunDownTime" class="getCode" @click="getCode" v-bind:class="{ 'active-text': canActiveCode }">获取验证码</span>
+                    <div class="getCodeDownTime" v-show="!canRunDownTime">
+                      <van-count-down
+                        ref="countDown"
+                        millisecond
+                        :time="60000"
+                        :auto-start="false"
+                        format="ss"
+                        @finish="finishDownTime"
+                      >
+                      </van-count-down>
+                      <span>s后重新发送</span>
+                    </div>
+                  </template>
+                </van-field>
+                <div class="footer-button-box">
+                  <van-button v-bind:disabled="!canSubmit" round block type="info" native-type="submit">点击领取</van-button>
+                  <span class="fast-login-open-link go-easy">本机号码领取</span>
+                </div>
+              </van-form>
+            </div>
+
+            <!--S-弹窗-->
+            <van-popup id="active-tip-modal" v-model="dialog.show" :data-modal-type="dialog.type" :close-on-click-overlay="dialog.type !== 'over'">
+              <div v-show="dialog.type === 'over'" class="modal-dialog active-tip--over">
+                <div class="close-dialog-icon" @click="dialog.show = false" id="dialog-icon--over" v-if="!forbidClose">
+                  <img src='{{Msg "seo" "cdn"}}/common-module/active/2022.5.20/close.png?v={{Msg "seo" "version"}}' alt="x">
+                </div>
+                <h4>活动结束提醒</h4>
+                <img style="width: 148px;" src='{{Msg "seo" "cdn"}}/common-module/active/2022.5.20/empty.png?v={{Msg "seo" "version"}}' alt="活动已结束">
+                <p>
+                  对不起,该活动已结束
+                </p>
+                <button @click="onClickReceive('', { id: 'invite' })" id="dialog-button--over">我知道了</button>
+              </div>
+            </van-popup>
+            <!--E-弹窗-->
+        </div>
+    </div>
+
+    <script src=//cdn-common.jianyu360.com/cdn/lib/vue/2.6.11/vue.min.js> </script>
+    <script src=//cdn-common.jianyu360.com/cdn/lib/vant/2.12.24/lib/vant.min.js> </script>
+    <script src=//cdn-common.jianyu360.com/cdn/lib/jquery/3.6.0/jquery.min.js> </script>
+    <script src=//cdn-common.jianyu360.com/cdn/lib/moment/2.29.1/min/moment.min.js></script>
+    <script src="//cdn-common.jianyu360.com/cdn/lib/number-auth-web-sdk/2.1.2/numberAuth-web-sdk.js"></script>
+    {{include "/big-member/commonjs.html"}}
+    <script src=//res2.wx.qq.com/open/js/jweixin-1.6.0.js></script>
+    <script src='{{Msg "seo" "cdn"}}/common-module/public/js/utils.js?v={{Msg "seo" "version"}}'></script>
+    <script src='{{Msg "seo" "cdn"}}/common-module/public/js/wx-sdk-share.js?v={{Msg "seo" "version"}}'></script>
+    <script src='{{Msg "seo" "cdn"}}/common-module/public/js/app-share-sheet.js?v={{Msg "seo" "version"}}'></script>
+    <script src='{{Msg "seo" "cdn"}}/common-module/account/js/fast-login.js?v={{Msg "seo" "version" }}'></script>
+    <script src='{{Msg "seo" "cdn"}}/common-module/active/register/register.js?v={{Msg "seo" "version"}}'></script>
+    {{include "/common/baiducc.html"}}
+</body>
+
+</html>