zhangxinlei1996 4 年之前
父节点
当前提交
ce22f4e9dd

+ 6 - 5
src/jfw/front/shorturl.go

@@ -254,15 +254,16 @@ func (s *Short) Article(stype, id string) error {
 			s.T["forceShareFlag"] = public.CheckUserNeedForceShare(userId, public.ShareType_detail)     //是否强制分享
 			if from_userid != "" && from_userid != userId && util.ObjToString(obj["subtype"]) != "拟建" { //分享开打的
 				article_id := util.CommonDecodeArticle(stype, id)[0]
-				if redis.Get("other", fmt.Sprintf("integral_article_%s_%s_%s", article_id, from_userid, userId)) == nil {
-					fmt.Println("from_userid", se.DecodeStringByCheck(from_userid))
+				key := fmt.Sprintf("integral_article_%s_%s_%s", article_id, from_userid, userId)
+				if redis.Incr("other", key) == 1 {
+					redis.SetExpire("other", key, 60*60*24)
 					err := jy.Publish(public.Mgo_Log, config.Sysconfig["nsq"].(string), jy.Jyweb_article_open, se.DecodeStringByCheck(from_userid), jy.Jywx_node1)
 					if err != nil {
 						log.Println("nsq队列写入失败-->", jy.Jyweb_article_open, se.DecodeStringByCheck(from_userid))
-					} else {
+					} /* else {
 						//integral_article_ +userId+ 三级页id
-						redis.Put("other", fmt.Sprintf("integral_article_%s_%s_%s", article_id, from_userid, userId), "1", 60*60*24)
-					}
+						redis.Put("other", fmt.Sprintf("integral_article_%s_%s_%s", article_id, from_userid, userId), 1, 60*60*24)
+					}*/
 				}
 			}
 			content, _ := s.Render4Cache("/weixin/wxinfocontent"+rec+".html", &s.T)

+ 5 - 3
src/jfw/modules/app/src/app/front/shorturl.go

@@ -132,14 +132,16 @@ func (s *Short) Article(stype, id string) error {
 	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_%s", article_id, belongUserId, userId)) == nil {
+			key := fmt.Sprintf("integral_article_%s_%s_%s", article_id, belongUserId, userId)
+			if redis.Incr("other", key) == 1 {
+				redis.SetExpire("other", key, 60*60*24)
 				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 {
+				} /* else {
 					//integral_article_ +userId+ 三级页id
 					redis.Put("other", fmt.Sprintf("integral_article_%s_%s_%s", article_id, belongUserId, userId), "1", 60*60*24)
-				}
+				}*/
 			}
 		}
 		//获取打赏文案

+ 2 - 1
src/jfw/modules/app/src/web/templates/commonPay/paySuccess.html

@@ -84,7 +84,7 @@
             </div>
         {{else if eq .T.doType "integral"}}
             <div class="bottom_button">
-                <button style="margin: 0 .32rem; background-color: #2cb7ca; margin-bottom: 0.45rem;height: 0.92rem;border-radius: 0.16rem;" class="right_btn" onclick="window.location.href = '/jyapp/front/myorder/tointegralDetail?order_code={{.T.orderCode}}'">
+                <button id ="order" style="margin: 0 .32rem; background-color: #2cb7ca; margin-bottom: 0.45rem;height: 0.92rem;border-radius: 0.16rem;" class="right_btn" onclick="window.location.href = '/jyapp/front/myorder/tointegralDetail?order_code={{.T.orderCode}}'">
                     查看订单
                 </button>
                 <button style="display:none;margin: 0 .32rem; background-color: #2cb7ca; margin-bottom: 0.45rem;height: 0.92rem;border-radius: 0.16rem;" class="right_btn" id ="read" >
@@ -135,6 +135,7 @@
           $("#read").show().click(function(){
             window.location.href = '/page_docs_app/details/'+docsId;
           });
+          $("#order").css({"background-color":"#EDEFF2","color":"#5F5E64"});
         }
     })
 

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

@@ -94,6 +94,7 @@ func (b *Integral) CreateOrder() {
 			"user_id":        userId,
 			"pay_way":        "",
 			"original_price": order_money,
+			"user_phone":     phone,
 		}
 		order_phone := b.GetString("order_phone") //p19.3用户信息采集 手机号
 		if order_phone != "" {

+ 2 - 1
src/web/templates/weixin/commonPay/paySuccess.html

@@ -68,7 +68,7 @@
     {{end}}
      {{if eq .T.doType "integral"}}
     <div class="bottom_button">
-        <button class="right_btn" onclick="window.location.href = '/front/wxMyOrder/integralDetail/{{.T.orderCode}}'">
+        <button id="order" class="right_btn" onclick="window.location.href = '/front/wxMyOrder/integralDetail/{{.T.orderCode}}'">
             查看订单
         </button>
         <button class="right_btn" id ="read" style="display:none">
@@ -101,6 +101,7 @@
           $("#read").show().click(function(){
             window.location.href = '/page_docs_app/details/'+docsId;
           });
+          $("#order").css({"background-color":"#EDEFF2","color":"#5F5E64"});
         }
     })