Sfoglia il codice sorgente

打赏文案请求地址修改

wangshan 5 anni fa
parent
commit
bb8885121c

+ 8 - 0
src/jfw/front/front.go

@@ -139,6 +139,8 @@ type Front struct {
 	payIndex xweb.Mapper `xweb:"/weixin/pay/index"` //微信打赏
 	//订阅付费消息提醒中转
 	msgremind xweb.Mapper `xweb:"/front/vipsubscribe/msgremind"`
+	//获取打赏标语
+	rewardText xweb.Mapper `xweb:"/front/rewardText"`
 }
 
 var sewx util.SimpleEncrypt //微信的加密方法
@@ -159,6 +161,12 @@ func init() {
 	//up.user = make(map[string]*map[string]interface{})
 }
 
+//获取打赏标语
+func (this *Front) RewardText() {
+	rewardText, _ := getRewardText()
+	this.Write(rewardText)
+	return
+}
 func (f *Front) Test() error {
 	return f.Render("/test.html")
 }

+ 0 - 4
src/jfw/front/swordfish.go

@@ -441,10 +441,6 @@ func (m *Front) PcAjaxReq() {
 			"list": ls,
 		})
 		return
-	} else if reqType == "rewardText" {
-		rewardText, _ := getRewardText()
-		m.Write(rewardText)
-		return
 	}
 	currentPage, _ := m.GetInteger("pageNumber")
 	if currentPage > pc_maxPageNum {

+ 1 - 1
src/web/templates/pc/biddetail.html

@@ -570,7 +570,7 @@ $(function(){
 			}
 		}
 	});
-	$.post("/front/pcAjaxReq",{reqType:"rewardText"},function(r){
+	$.post("/front/rewardText",{},function(r){
 		$(".reward").prepend(r);
 	},"text");
 	$(".reward>div").click(function(){

+ 1 - 1
src/web/templates/pc/biddetail_bd.html

@@ -243,7 +243,7 @@ $(function(){
 $(function(){
 	haslogin({{.T.logid}},"","D");
 	JYLogin({{.T.logid}})
-	$.post("/front/pcAjaxReq",{reqType:"rewardText"},function(r){
+	$.post("/front/rewardText",{},function(r){
 		$(".reward").prepend(r);
 	},"text");
 	$(".reward>div").click(function(){

+ 1 - 1
src/web/templates/pc/biddetail_rec.html

@@ -1135,7 +1135,7 @@ $(function(){
 			}
 		}
 	});
-	$.post("/front/pcAjaxReq",{reqType:"rewardText"},function(r){
+	$.post("/front/rewardText",{},function(r){
 		$(".reward").prepend(r);
 	},"text");
 	$(".reward>div").click(function(){