瀏覽代碼

Merge branch 'develop' of 192.168.3.17:zhanghongbo/qfw into develop

zhangjinkun@topnet.net.cn 9 年之前
父節點
當前提交
f8f174bbad

二進制
core/src/web/staticres/images/flop/bg-1.png


二進制
core/src/web/staticres/images/flop/bg-2.png


二進制
core/src/web/staticres/images/flop/card-1.png


二進制
core/src/web/staticres/images/flop/card-2.png


二進制
core/src/web/staticres/images/flop/card-3.png


二進制
core/src/web/staticres/images/flop/card-4.png


二進制
core/src/web/staticres/images/flop/card-5.png


二進制
core/src/web/staticres/images/flop/card-6.png


二進制
core/src/web/staticres/images/flop/card.png


二進制
core/src/web/staticres/images/flop/min-blessing.png


二進制
core/src/web/staticres/wxswordfish/images/min-share-icon.png


+ 2 - 2
core/src/web/staticres/wxswordfish/share.js

@@ -15,7 +15,7 @@ function initShare(signature,shareid){
 	        wx.onMenuShareTimeline({
 			    title: '剑鱼招标订阅免费用,关注即可抽取iPad mini。', // 分享标题
 			    link: 'http://www.qimingxing.info/swordfish/share/'+shareid, // 分享链接
-			    imgUrl: 'http://www.qimingxing.info/wxswordfish/images/share-icon.png', // 分享图标
+			    imgUrl: 'http://www.qimingxing.info/wxswordfish/images/min-share-icon.png', // 分享图标
 			    success: function () { 
 			       //alert('分享成功');
 							$.ajax({    
@@ -37,7 +37,7 @@ function initShare(signature,shareid){
 			    title: '剑鱼招标订阅免费用,关注即可抽取iPad mini。', // 分享标题
 			    desc: '关注微信并设置剑鱼关键词,全国招标信息统统推送给您!', // 分享描述
 			    link: 'http://www.qimingxing.info/swordfish/share/'+shareid, // 分享链接
-			    imgUrl: 'http://www.qimingxing.info/wxswordfish/images/share-icon.png', // 分享图标
+			    imgUrl: 'http://www.qimingxing.info/wxswordfish/images/min-share-icon.png', // 分享图标
 			    type: 'link', // 分享类型,music、video或link,不填默认为link'
 			    dataUrl: '', // 如果type是music或video,则要提供数据链接,默认为空
 			    success: function () { 

+ 14 - 2
core/src/web/templates/active/flop.html

@@ -9,7 +9,7 @@
 var signature = {{.T.signature}};
 var shareTitle = "{{.T.nickName}}在2016年{{.T.words}}";
 var shareLink = "http://www.qimingxing.info/active/flop/share/{{.T.openid}}";
-var shareIcon = "http://www.qimingxing.info/images/flop/blessing.png";
+var shareIcon = "http://www.qimingxing.info/images/flop/min-blessing.png";
 if(typeof(signature) != "undefined" && signature != null && signature.length == 4){
 	wx.config({
 	    debug: false, // 开启调试模式,调用的所有api的返回值会在客户端alert出来,若要查看传入的参数,可以在pc端打开,参数信息会通过log打出,仅在pc端时才会打印。
@@ -194,14 +194,18 @@ ul{
 }
 .page-before{
 	background-image: url("{{Msg "seo" "cdn"}}/images/flop/bg-1.png");
+	background-repeat: no-repeat;
+	background-position-x: center;
 }
 .page-after{
 	background-image: url("{{Msg "seo" "cdn"}}/images/flop/bg-2.png");
+	background-repeat: no-repeat;
+	background-position-x: center;
 }
 </style>
 </head>
 <body>
-<img src="{{Msg "seo" "cdn"}}/images/flop/bubble.png" class="bubble"{{if eq .T.flag 1}} style="display: none;"{{end}}>
+<img src="{{Msg "seo" "cdn"}}/images/flop/bubble.png" class="bubble"{{if ne .T.flag 2}} style="display: none;"{{end}}>
 <div class="page{{if eq .T.flag 1}} page-before{{else}} page-after{{end}}">
 	<div class="flop-notice">
 		<span>{{.T.nickName}}</span><div>,您的猴年福牌是:</div>
@@ -253,6 +257,14 @@ if({{.T.IsOver}}){
 $(function(){
 	var windowWidth = $(window).width();
 	var windowHeight = $(window).height();
+	var rate=((5/3)/(windowHeight/windowWidth))*100
+	if(rate>120){
+		rate=120
+		$(".page").css({"background-position-y":"-"+(rate/100*12)+"px"})
+	}else if(rate<100){
+		rate=100
+	}
+	$(".page").css({"background-size":"100% "+rate+"%"})
 	var defaultWidth = 320;
 	var defaultHeight = 416;
 	var width = 250; // 625 706

+ 2 - 2
weixin/src/qfw/weixin/msgtxtchandler.go

@@ -44,7 +44,7 @@ func MsgTxtHandler(w ResponseWriter, r *Request) {
 		UserSession[r.FromUserName] = NewUserSession("wxadmin")
 		w.ReplyText("您已进入微信管理,请输入指令操作:\n1.查看抽奖模式(指令:f0)\n2.切换抽奖模式(指令:c*,*为数字。如c0(自动模式),c1(手动模式1),c2(手动模式2),c3(手动模式3))\n3.统计抽奖结果(tjr*,tjr120(最近两分钟),tjr120-1200(最近两分钟至最近20分钟之间的))\n4.统计新用户数(tju*)\n5.服务器情况监测(ser0)\n6服务管理(man*,man1重启主程序(man11关闭),man3重启积分(man33关闭),man4重启微信认证(man44关闭))。\n输入q或Q离开。")
 		return
-	} else if r.Content == "抽奖" { //进入抽奖环节
+	} else if cj_reg.MatchString(r.Content) { //进入抽奖环节
 		if time.Now().Unix() > 1455552000 { //活动过期 ,过期后,这段代码要删除
 			//TODO
 			w.ReplyText("抱歉,活动已结束!敬请期待下一次抽奖活动,注意看预告哟……")
@@ -52,7 +52,7 @@ func MsgTxtHandler(w ResponseWriter, r *Request) {
 			targeturl := fmt.Sprintf("http://%s/activity/%s/%s", wf.SysConfig.Domain, wf.SysConfig.Activity["activitycode"], se.EncodeString(r.FromUserName))
 			w.ReplyNews([]Article{Article{PicUrl: wf.SysConfig.Activity["picurl"], Title: wf.SysConfig.Activity["title"], Url: targeturl}})
 		}
-	} else if r.Content == "福牌" { //进入抽奖环节
+	} else if fp_reg.MatchString(r.Content){ //进入抽奖环节
 		targeturl := fmt.Sprintf("https://open.weixin.qq.com/connect/oauth2/authorize?appid=%s&redirect_uri=http://%s/weixinoauth/action/%s&response_type=code&scope=snsapi_base&state=1#wechat_redirect", wf.SysConfig.Appid, wf.SysConfig.Domain, "turncards")
 		w.ReplyText(fmt.Sprintf(wf.SysConfig.Activity["tuenCards"], targeturl))
 	} else if strings.HasPrefix(r.Content, "内部报名") { //绑定拓普员工姓名

+ 6 - 1
weixin/src/qfw/weixin/weixin.go

@@ -16,11 +16,15 @@ var WELCOME_MSG string
 var OWELCOME_MSG string
 var digitreg *regexp.Regexp = regexp.MustCompile("^\\d+$")
 
+//weixin admin
 var mids = map[string]bool{}
 var reg = regexp.MustCompile("^([a-z]+)(\\d.*)$")
 var subreg = regexp.MustCompile("^(\\d+)([smhd]{0,1})$")
 var DIR = ""
 
+//活动指令
+var cj_reg, fp_reg *regexp.Regexp
+
 func InitWeixinSdk() {
 	keyword_voice_reg, _ = regexp.Compile("查询|搜索|检索|看|找|查|搜")
 	clear_voice_reg, _ = regexp.Compile("!|!|\\s+")
@@ -28,7 +32,8 @@ func InitWeixinSdk() {
 	chat_bye, _ = regexp.Compile("再见|拜拜|不说了|不聊了")
 	WELCOME_MSG = wf.SysConfig.WelcomeTip
 	OWELCOME_MSG = wf.SysConfig.OWelcomeTip
-
+	cj_reg, _ = regexp.Compile("抽奖")
+	fp_reg, _ = regexp.Compile("福牌|翻牌")
 	//
 	for _, v := range wf.SysConfig.Mids {
 		mids[v] = true

+ 1 - 1
weixin/src/qfw/weixin/wxadmin.go

@@ -51,7 +51,7 @@ func processWxAdmin(openid, content string, w ResponseWriter, r *Request) {
 						if res != nil && len(res) > 0 {
 							sum := 0
 							for _, v := range res {
-								resStr += "\n" + v["_id"].(string) + ":" + fmt.Sprintf("%x", v["count"])
+								resStr += "\n" + v["_id"].(string) + ":" + fmt.Sprintf("%d", v["count"].(int))
 								sum += v["count"].(int)
 							}
 							resStr += "\n" + "总数:" + fmt.Sprintf("%d", sum)