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

Merge branch 'dev3.0active' of http://192.168.3.207:10080/qmx/jy into dev3.0active

zhangyuhan 4 жил өмнө
parent
commit
32ed5501a4

+ 3 - 0
src/active.json

@@ -10,5 +10,8 @@
 	"doubleEleven":{
 		"active_Start":1504505600,
 		"active_End":1605024000
+	},
+	"shortUrl":{
+		"introducePage":"https://www.jianyu360.com/swordfish/SingleLogin?toHref=https%3A%2F%2Fwww.jianyu360.com%2Fswordfish%2FSingleLogin%3FtoHref%3Dhttps%3A%2F%2Fwww.jianyu360.com%2Ffront%2Fvipsubscribe%2FintroducePage&title=%E8%B6%85%E7%BA%A7%E8%AE%A2%E9%98%85"
 	}
 }

+ 10 - 9
src/jfw/config/active.go

@@ -6,15 +6,16 @@ import (
 
 //系统配置
 type activeConfig struct {
-	Live_Preheat_Start int64         `json:"live_Preheat_Start"` //预热活动开始时间
-	Live_Preheat_End   int64         `json:"live_Preheat_End"`   //预热活动结束时间
-	Live_Active_Start  int64         `json:"live_Active_Start"`  //直播活动开始时间
-	Live_Active_End    int64         `json:"live_Active_End"`    //直播活动结束时间
-	Live_Ing_Start     int64         `json:"live_Ing_Start"`     //直播开始时间
-	Live_Ing_End       int64         `json:"live_Ing_End"`       //直播结束时间
-	Live_After_Date    int64         `json:"live_After_Date"`    //直播活动结束后 活动已结束提示时间段(暂定一个月) 一个月后 跳转到VIP介绍页
-	ActiveDiscount     float64       `json:"activeDiscount"`     //直播活动折扣
-	DoubleEleven       *doubleEleven `json:"doubleEleven"`
+	Live_Preheat_Start int64             `json:"live_Preheat_Start"` //预热活动开始时间
+	Live_Preheat_End   int64             `json:"live_Preheat_End"`   //预热活动结束时间
+	Live_Active_Start  int64             `json:"live_Active_Start"`  //直播活动开始时间
+	Live_Active_End    int64             `json:"live_Active_End"`    //直播活动结束时间
+	Live_Ing_Start     int64             `json:"live_Ing_Start"`     //直播开始时间
+	Live_Ing_End       int64             `json:"live_Ing_End"`       //直播结束时间
+	Live_After_Date    int64             `json:"live_After_Date"`    //直播活动结束后 活动已结束提示时间段(暂定一个月) 一个月后 跳转到VIP介绍页
+	ActiveDiscount     float64           `json:"activeDiscount"`     //直播活动折扣
+	DoubleEleven       *doubleEleven     `json:"doubleEleven"`       //双十一
+	ShortUrl           map[string]string `json:"shortUrl"`           //短地址跳转
 }
 
 //双十一活动

+ 14 - 1
src/jfw/front/big-member.go

@@ -46,6 +46,9 @@ func (s *BigMemberAction) WxVIPViewPage(htmlName string) error {
 	if member_give == 1 && isActiving() && htmlName != "full" {
 		htmlName = "write_infor_wx"
 	}
+	if member_give == 2 && power > 0 && htmlName != "full" {
+		htmlName = "open_app_active"
+	}
 	s.T["member_status"] = power
 	return s.Render("/big-member/wx/page_"+htmlName+".html", &s.T)
 }
@@ -56,13 +59,23 @@ func Power(userid string) (int, int, int) {
 	if userid == "" {
 		return 0, 0, 0
 	}
-	data, ok := public.MQFW.FindById("user", userid, `{"i_member_status":1,"i_member_give":1}`)
+	data, ok := public.MQFW.FindById("user", userid, `{"i_member_status":1,"i_member_give":1,"i_member_starttime":1,"i_member_endtime":1}`)
 	i_member_status, isused, member_give := 0, 0, 0
 	if ok && *data != nil && len(*data) > 0 {
 		i_member_status = qutil.IntAllDef((*data)["i_member_status"], 0)
 		if (*data)["i_member_give"] != nil && qutil.IntAll((*data)["i_member_give"]) == 1 && i_member_status <= 0 {
 			member_give = 1
 		}
+		//判断用户是不是试用用户
+		if (*data)["i_member_starttime"] != nil && (*data)["i_member_endtime"] != nil && (*data)["i_member_give"] != nil {
+			endtime := qutil.Int64All((*data)["i_member_endtime"])
+			starttime := qutil.Int64All((*data)["i_member_starttime"])
+			cycle := (endtime - starttime) / 86400
+			if cycle == 15 && qutil.IntAll((*data)["i_member_give"]) == 2 {
+				member_give = 2
+			}
+		}
+
 	}
 	if public.MQFW.Count("member", map[string]interface{}{"userid": userid}) > 0 {
 		isused = 1

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

@@ -20,12 +20,22 @@ import (
 type SingleLogin struct {
 	*xweb.Action
 	singleLogin xweb.Mapper `xweb:"/swordfish/SingleLogin"` //微信登录中转
+	shortUrl    xweb.Mapper `xweb:"/stl/(.*)"`              //短地址跳转
 }
 
 func init() {
 	xweb.AddAction(&SingleLogin{})
 }
 
+//短地址跳转
+func (this *SingleLogin) ShortUrl(key string) error {
+	var redirectUrl = "/swordfish/about"
+	if key != "" && config.ActiveConfig.ShortUrl[key] != "" {
+		redirectUrl = config.ActiveConfig.ShortUrl[key]
+	}
+	return this.Redirect(redirectUrl)
+}
+
 //是否关注处理
 func (this *SingleLogin) SingleLogin() error {
 	userid := qutil.ObjToString(this.GetSession("userId"))

+ 4 - 1
src/jfw/modules/app/src/app/front/big-member.go

@@ -22,6 +22,9 @@ func init() {
 //白名单(不需要权限的页面)
 var whiteReg = regexp.MustCompile(`full|landingPage|buy_commit|contrast|memberdetail|write_infor|init|set_*`)
 
+//推送设置列表
+var setListReg = regexp.MustCompile(`push_*|full`)
+
 //专家版可进入的页面
 var expertReg = regexp.MustCompile(`potential_cor_list|bigvip_subreport|ent_portrait_change`)
 
@@ -44,7 +47,7 @@ func (s *BigMemberAction) VIPViewPage(htmlName string) error {
 			return s.Redirect("/jyapp/big/page/init")
 		}
 	} else {
-		if member_give == 1 && isActiving() && htmlName != "full" {
+		if member_give == 1 && isActiving() && !setListReg.MatchString(htmlName) {
 			htmlName = "write_infor"
 		}
 	}

+ 2 - 6
src/jfw/modules/app/src/web/templates/big-member/page_write_infor.html

@@ -158,14 +158,10 @@ $(function(){
     $('.ipt_code').on('blur', function () {
         var workrule = isname(this.value)
         var myreg = /^\s*$/g;
-        if (workrule) {
+        if (this.value != '') {
             isfreesubmit[2] = 'true'
         } else {
-            if (myreg.test(this.value)) {
-                isfreesubmit[2] = 'false'
-            } else {
-                isfreesubmit[2] = 'false'
-            }
+            isfreesubmit[2] = 'false'
         }
         freesubmit()
     })

+ 2 - 6
src/web/templates/big-member/wx/page_write_infor_wx.html

@@ -133,14 +133,10 @@
         $('.ipt_code').on('blur', function () {
             var workrule = isname(this.value)
             var myreg = /^\s*$/g;
-            if (workrule) {
+            if (this.value != '') {
                 isfreesubmit[2] = 'true'
             } else {
-                if (myreg.test(this.value)) {
-                    isfreesubmit[2] = 'false'
-                } else {
-                    isfreesubmit[2] = 'false'
-                }
+                isfreesubmit[2] = 'false'
             }
             freesubmit()
         })