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

Merge remote-tracking branch 'origin/dev3.6' into dev3.6

wangkaiyue 4 жил өмнө
parent
commit
baa7860225

+ 1 - 1
src/jfw/front/shorturl.go

@@ -94,7 +94,6 @@ func (s *Short) Article(stype, id string) error {
 		}
 		if disWord != "" {
 			redisDis := redis.GetStr("other", "DIS_"+disWord[1:])
-			log.Println(redisDis)
 			if redisDis != "" {
 				suffix := disWord[len(disWord)-3 : len(disWord)]
 				//公告三级页处理
@@ -123,6 +122,7 @@ func (s *Short) Article(stype, id string) error {
 								}
 								insert_1 := public.Mysql.InsertByTx(tx, "dis_word", insert) //口号使用表
 								log.Println("插入口号使用表", insert_1)
+								from_userid = se.EncodeStringByCheck(belongUserId)
 							}
 							return true
 						}) {

+ 15 - 2
src/jfw/modules/app/src/app/front/shorturl.go

@@ -13,6 +13,7 @@ import (
 	"jfw/public"
 	"log"
 	"qfw/util"
+	"qfw/util/jy"
 	"qfw/util/redis"
 	"regexp"
 
@@ -46,6 +47,7 @@ func (s *Short) Article(stype, id string) error {
 		return s.Redirect("/jyapp/free/swordfish/about", 302)
 	}
 	disWord := s.GetString("disWord")
+	belongUserId := ""
 	if disWord != "" {
 		redisDis := redis.GetStr("other", "DIS_"+disWord[1:])
 		if redisDis != "" {
@@ -56,7 +58,7 @@ func (s *Short) Article(stype, id string) error {
 				effectiveTime, _ := strconv.ParseInt(effectiveTimeStr, 10, 64)
 				//是否计算佣金
 				if time.Now().Unix() <= effectiveTime {
-					belongUserId := strings.Split(redisDis, "##")[1]
+					belongUserId = strings.Split(redisDis, "##")[1]
 					if public.Mysql.ExecTx("口号使用", func(tx *sql.Tx) bool {
 						//口号是否使用过
 						wordInfo := public.Mysql.Find("dis_word", map[string]interface{}{"userId": userId, "password": disWord}, "id", "", 0, 0)
@@ -78,7 +80,6 @@ func (s *Short) Article(stype, id string) error {
 						}
 						return true
 					}) {
-
 					}
 				}
 
@@ -129,6 +130,18 @@ func (s *Short) Article(stype, id string) error {
 	var obj map[string]interface{}
 	obj = wxvisitD(sid, userId)
 	if len(obj) > 0 {
+		if belongUserId != "" && belongUserId != userId && util.ObjToString(obj["subtype"]) != "拟建" { //分享开打的
+			article_id := util.CommonDecodeArticle(stype, id)[0]
+			if redis.Get("other", fmt.Sprintf("integral_article_%s_%s", belongUserId, article_id)) == nil {
+				err := jy.Publish(public.Mgo_Log, config.Sysconfig["nsq"].(string), jy.Jyweb_article_open, belongUserId, jy.Jyapp_node1)
+				if err != nil {
+					log.Println("nsq队列写入失败-->", jy.Jyweb_article_open, belongUserId)
+				} else {
+					//integral_article_ +userId+ 三级页id
+					redis.Put("other", fmt.Sprintf("integral_article_%s_%s", belongUserId, article_id), "1", 60*60*24)
+				}
+			}
+		}
 		//获取打赏文案
 		//util.ReadConfig(&config.Sysconfig)
 		s.T["rewardText"], s.T["advertText"] = getRewardText()

+ 2 - 2
src/jfw/modules/app/src/web/staticres/jyapp/me/js/mine.js

@@ -410,7 +410,7 @@ var vNode = {
           score: _this.addHowPoints()
         },
         success: function(res){
-          if (res.error_code === 0 && res.data.points) {
+          if (res.error_code === 0) {
             _this.signInfo.days++
             _this.signInfo.state = true
             _this.showAnimate = true
@@ -495,7 +495,7 @@ var vNode = {
       return points
     },
     recordFn: function() {
-      window.location.href = '/page_points/list'
+      window.location.href = '/page_points_app/list'
     }
   }
 }

+ 4 - 1
src/jfw/modules/subscribepay/src/service/commonAction.go

@@ -162,11 +162,14 @@ func (p *CommonAction) IsPaySuccess() {
 func (d *CommonAction) GetwxSdkSign() {
 	var sign []string
 	url := d.GetString("url")
+	openId, _ := d.GetSession("s_m_openid").(string)
 	if url != "" {
 		sign = SignJSSDK(url)
 	}
 	d.ServeJson(map[string]interface{}{
-		"wxsdk": sign,
+		"wxsdk":     sign,
+		"openid":    se.EncodeString(openId),
+		"webdomain": config.Config.WebDomain,
 	})
 }
 

+ 2 - 2
src/web/staticres/me/js/mine.js

@@ -262,7 +262,7 @@ var vNode = {
           score: _this.addHowPoints()
         },
         success: function(res){
-          if (res.error_code === 0 && res.data.points) {
+          if (res.error_code === 0) {
             _this.signInfo.days++
             _this.signInfo.state = true
             _this.showAnimate = true
@@ -347,7 +347,7 @@ var vNode = {
       return points
     },
     recordFn: function() {
-      window.location.href = '/page_points/list'
+      window.location.href = '/page_points_app/list'
     }
   }
 }

BIN
src/web/staticres/order/image/jianyubi - 副本.png