Browse Source

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

renzheng 9 years ago
parent
commit
cf7c47a7ad

+ 17 - 0
common/src/qfw/util/credit/credit.go

@@ -8,6 +8,7 @@ import (
 	"qfw/util"
 	"qfw/util"
 	mogo "qfw/util/mongodb"
 	mogo "qfw/util/mongodb"
 	"qfw/util/rpc"
 	"qfw/util/rpc"
+	"time"
 )
 )
 
 
 var Rc rpc.RpcCall
 var Rc rpc.RpcCall
@@ -215,3 +216,19 @@ func UpuserCreditSession(userId, code, dtype string, param map[string]interface{
 	})
 	})
 	return b
 	return b
 }
 }
+
+//其他更新积分接口--如 翻牌
+func OtherUpuserCredit(userId string, value int, clog map[string]interface{}, xb *xweb.Action) bool {
+	b := mogo.Update("user", `{"_id":"`+userId+`"}`, &map[string]interface{}{"$set": &map[string]interface{}{"i_credit": value}}, false, false)
+	if b {
+		//更新session
+		xb.Session().UpdateByCustomField("id", userId, "i_credit", value)
+		//记录日志
+		clog["s_uid"] = userId
+		clog["i_scorenow"] = value
+		clog["l_date"] = time.Now().Unix()
+		clog["l_datenm"] = time.Now().UnixNano() / 1000000
+		mogo.Save("creditlog", clog)
+	}
+	return b
+}

+ 2 - 2
core/src/luckdraw.json

@@ -34,7 +34,7 @@
 	},{
 	},{
 		"min":280,
 		"min":280,
 		"max":310,
 		"max":310,
-		"proportion":0.08,
+		"proportion":0,
 		"txt":"书"
 		"txt":"书"
 	},{
 	},{
 		"min":325,
 		"min":325,
@@ -75,7 +75,7 @@
 	},{
 	},{
 		"min":280,
 		"min":280,
 		"max":310,
 		"max":310,
-		"proportion":0.08,
+		"proportion":0,
 		"txt":"书"
 		"txt":"书"
 	},{
 	},{
 		"min":325,
 		"min":325,

+ 46 - 24
core/src/qfw/active/activemanage.go

@@ -121,6 +121,7 @@ func limitFun() {
 
 
 //解除限制的监测
 //解除限制的监测
 func unlimitFun() {
 func unlimitFun() {
+
 	limitLock.Lock()
 	limitLock.Lock()
 	//非限制状态
 	//非限制状态
 	if limitStatus {
 	if limitStatus {
@@ -202,6 +203,7 @@ type Activemanage struct {
 	luckdraw    xweb.Mapper `xweb:"/activity/(\\w+)/([^.]*)"`
 	luckdraw    xweb.Mapper `xweb:"/activity/(\\w+)/([^.]*)"`
 	getluckdraw xweb.Mapper `xweb:"/activity/luckdraw"`
 	getluckdraw xweb.Mapper `xweb:"/activity/luckdraw"`
 	addredis    xweb.Mapper `xweb:"/activity/addredis"`
 	addredis    xweb.Mapper `xweb:"/activity/addredis"`
+	flop        xweb.Mapper `xweb:"/activity/flop/(.*)"`
 }
 }
 
 
 //分享成功后建立redis判断值
 //分享成功后建立redis判断值
@@ -222,6 +224,13 @@ func (a *Activemanage) Addredis() error {
 
 
 //进入抽奖页面
 //进入抽奖页面
 func (a *Activemanage) Luckdraw(activecode, id string) error {
 func (a *Activemanage) Luckdraw(activecode, id string) error {
+	nowdate := time.Now().Unix()
+	enddate := LuckDraw.EndDate
+	if nowdate > enddate {
+		a.T["flog"] = "G"
+		a.T["msg"] = "  抱歉,来晚了,活动已经结束了!敬请期待下一次活动吧,注意看预告呦……"
+		return a.Render("/active/luckdraw.html", &a.T)
+	}
 	//userInfo := a.GetSession("userInfo").(*map[string]interface{})
 	//userInfo := a.GetSession("userInfo").(*map[string]interface{})
 	//se := SimpleEncrypt{Key: "topnet2015topnet2015"}
 	//se := SimpleEncrypt{Key: "topnet2015topnet2015"}
 	openid := se.DecodeString(id)
 	openid := se.DecodeString(id)
@@ -239,7 +248,7 @@ func (a *Activemanage) Luckdraw(activecode, id string) error {
 		userid := strings.Split(fmt.Sprintf("%s", (*f)["_id"]), `"`)[1]
 		userid := strings.Split(fmt.Sprintf("%s", (*f)["_id"]), `"`)[1]
 		if *f == nil {
 		if *f == nil {
 			a.T["flog"] = "B"
 			a.T["flog"] = "B"
-			a.T["msg"] = "您的微信号无效!!"
+			a.T["msg"] = "  您的微信号无效!!"
 			return a.Render("/active/luckdraw.html", &a.T)
 			return a.Render("/active/luckdraw.html", &a.T)
 		}
 		}
 		a.SetSession("userName", username)
 		a.SetSession("userName", username)
@@ -297,12 +306,13 @@ func (a *Activemanage) Getluckdraw() error {
 	data["s_openid"] = openid
 	data["s_openid"] = openid
 	data["s_actcode"] = s_actcode
 	data["s_actcode"] = s_actcode
 	black := a.GetSession("black")
 	black := a.GetSession("black")
+	plan := redis.GetStr("other", "s_luckydraw_mode")
 	var i int
 	var i int
-	if black == "T" {
+	if black == "T" || plan == "" || plan == "3" {
 		//黑名单指针范围
 		//黑名单指针范围
-		i = rand.Intn(30) + 50
+		i = rand.Intn(30) + 50 //手动第三套方案
 	} else {
 	} else {
-		i = getLuckDraw()
+		i = getLuckDraw(plan)
 	}
 	}
 	s_prize := getPrize(i)
 	s_prize := getPrize(i)
 	data["s_prize"] = s_prize
 	data["s_prize"] = s_prize
@@ -312,17 +322,21 @@ func (a *Activemanage) Getluckdraw() error {
 	enddate := LuckDraw.EndDate
 	enddate := LuckDraw.EndDate
 	if nowdate < enddate {
 	if nowdate < enddate {
 		id = Save("winningrecord", data)
 		id = Save("winningrecord", data)
+	} else {
+		flog = "G"
+		msg = "  抱歉,来晚了,活动已经结束了!敬请期待下一次活动吧,注意看预告呦……"
+		return a.Write(`{"flog":"` + flog + `","msg":"` + msg + `"}`)
 	}
 	}
 	if len(id) > 0 {
 	if len(id) > 0 {
 		flog = "T"
 		flog = "T"
 	}
 	}
 	//红包
 	//红包
-	if (i > 184 && i < 221) || (i > 319 && i < 356) {
+	if (i > 189 && i < 221) || (i > 324 && i < 351) {
 		var amount int //红包金额以“元”为单位,微信红包以“分”为单位
 		var amount int //红包金额以“元”为单位,微信红包以“分”为单位
-		if i > 184 && i < 221 {
+		if i > 189 && i < 221 {
 			amount = 500 //红包金额以“元”为单位,微信红包以“分”为单位
 			amount = 500 //红包金额以“元”为单位,微信红包以“分”为单位
 
 
-		} else if i > 319 && i < 356 {
+		} else if i > 324 && i < 351 {
 			amount = 100 //红包金额以“元”为单位,微信红包以“分”为单位
 			amount = 100 //红包金额以“元”为单位,微信红包以“分”为单位
 		}
 		}
 		bm := qrpc.BonusMsg{Mchbillno: fmt.Sprint(today.Unix()),
 		bm := qrpc.BonusMsg{Mchbillno: fmt.Sprint(today.Unix()),
@@ -358,7 +372,7 @@ func (a *Activemanage) Getluckdraw() error {
 
 
 		}
 		}
 		msg = "  小主是真真的好运气," + s_prize + "落入您囊中。红包将由系统自动发放到您的微信,请注意查收。<br/><br/>  分享给好友参加明天抽奖呦!乖,快去分享吧!大奖可能就在明天~~"
 		msg = "  小主是真真的好运气," + s_prize + "落入您囊中。红包将由系统自动发放到您的微信,请注意查收。<br/><br/>  分享给好友参加明天抽奖呦!乖,快去分享吧!大奖可能就在明天~~"
-	} else if (i > 274 && i < 311) || (i > 94 && i < 131) {
+	} else if (i > 279 && i < 311) || (i > 94 && i < 121) {
 		//时间判断,提醒不同
 		//时间判断,提醒不同
 		//now := time.Now()
 		//now := time.Now()
 		//不在工作时间
 		//不在工作时间
@@ -366,7 +380,7 @@ func (a *Activemanage) Getluckdraw() error {
 		//
 		//
 		//	msg = "  小主是真真的好运气," + s_prize + "落入您囊中!<br/>  请在微信留下您的联系方式(手机号或qq号),企明星客服会在下一个工作日9:00-17:00给小主回复哦!<br/>  小主翻个牌子,动动小手分享活动,么么哒……(分享点击页面右上方···分享到朋友圈)"
 		//	msg = "  小主是真真的好运气," + s_prize + "落入您囊中!<br/>  请在微信留下您的联系方式(手机号或qq号),企明星客服会在下一个工作日9:00-17:00给小主回复哦!<br/>  小主翻个牌子,动动小手分享活动,么么哒……(分享点击页面右上方···分享到朋友圈)"
 		//} else { //在工作时间
 		//} else { //在工作时间
-		msg = "  小主是真真的好运气," + s_prize + "落入您囊中。请将您的联系方式和邮寄地址留言给企明星。我们会在活动截止后尽快为您发出。<br/><br/>  分享给好友参加明天抽奖呦!乖,快去分享吧!大奖可能就在明天~~"
+		msg = "  小主是真真的好运气," + s_prize + "落入您囊中。请将您的姓名+联系方式+邮寄地址留言给企明星。我们会在活动截止后尽快为您发出。<br/><br/>  分享给好友参加明天抽奖呦!乖,快去分享吧!大奖可能就在明天~~"
 		//}
 		//}
 	} else if i > 139 && i < 176 {
 	} else if i > 139 && i < 176 {
 		obid := a.GetSession("userId").(string)
 		obid := a.GetSession("userId").(string)
@@ -384,14 +398,22 @@ func (a *Activemanage) Getluckdraw() error {
 }
 }
 
 
 //
 //
-func getLuckDraw() int {
+func getLuckDraw(plan string) int {
 	th := time.Now().Hour()
 	th := time.Now().Hour()
 	thflog := (th < 23 && th > 7) //限时 23到第二天7点 第二套方案
 	thflog := (th < 23 && th > 7) //限时 23到第二天7点 第二套方案
 	array := []map[string]interface{}{}
 	array := []map[string]interface{}{}
-	if CheckLimit() || !thflog {
-		array = LuckDraw.GetAmounttwo //第二套方案
-	} else {
-		array = LuckDraw.GetAmount //第一套方案
+	//手动
+	if plan == "1" {
+		array = LuckDraw.GetAmount //手动第一套方案
+	} else if plan == "2" {
+		array = LuckDraw.GetAmounttwo //手动第二套方案
+	} else if plan == "0" {
+		//自动
+		if CheckLimit() || !thflog {
+			array = LuckDraw.GetAmounttwo //第二套方案
+		} else {
+			array = LuckDraw.GetAmount //第一套方案
+		}
 	}
 	}
 	weightValue := getWeightRandom(array)
 	weightValue := getWeightRandom(array)
 	min := IntAll(array[weightValue]["min"])
 	min := IntAll(array[weightValue]["min"])
@@ -405,24 +427,24 @@ func getLuckDraw() int {
 		amount := min + rand.New(rand.NewSource(time.Now().UnixNano())).Intn(max-min)
 		amount := min + rand.New(rand.NewSource(time.Now().UnixNano())).Intn(max-min)
 		if amount <= 0 {
 		if amount <= 0 {
 			return 1
 			return 1
-		} else if amount > 274 && amount < 311 {
-			count := Count("winningrecord", "{'s_prize':'《牛奶可乐经济学》'}")
-			if count > 6 {
-				amount = 245
-			}
-		} else if amount > 94 && amount < 131 {
+		} else if amount > 279 && amount < 311 {
+			//count := Count("winningrecord", "{'s_prize':'《牛奶可乐经济学》'}")
+			//if count > 6 {
+			amount = 245
+			//}
+		} else if amount > 94 && amount < 121 {
 			count := Count("winningrecord", "{'s_prize':'限量版U盘'}")
 			count := Count("winningrecord", "{'s_prize':'限量版U盘'}")
 			if count > 100 {
 			if count > 100 {
 				amount = 255
 				amount = 255
 			}
 			}
-		} else if amount > 184 && amount < 221 {
+		} else if amount > 189 && amount < 221 {
 			count := Count("winningrecord", "{'s_prize':'五元现金红包'}")
 			count := Count("winningrecord", "{'s_prize':'五元现金红包'}")
-			if count > 200 {
+			if count > 250 {
 				amount = 65
 				amount = 65
 			}
 			}
-		} else if amount > 319 && amount < 356 {
+		} else if amount > 324 && amount < 356 {
 			count := Count("winningrecord", "{'s_prize':'一元现金红包'}")
 			count := Count("winningrecord", "{'s_prize':'一元现金红包'}")
-			if count > 2500 {
+			if count > 3100 {
 				amount = 75
 				amount = 75
 			}
 			}
 		}
 		}

+ 35 - 0
core/src/qfw/active/flop.go

@@ -0,0 +1,35 @@
+package active
+
+import (
+	"github.com/go-xweb/xweb"
+	"gopkg.in/mgo.v2/bson"
+	"qfw/coreutil"
+	"qfw/util/credit"
+	"qfw/util/mongodb"
+)
+
+func (a *Activemanage) Flop(openid string) error {
+	var s_openid string
+	if a.GetSession("s_m_openid") == nil {
+		s_openid = openid
+		a.T["flag"] = false
+	} else {
+		s_openid = a.GetSession("s_m_openid").(string)
+		a.T["flag"] = true
+		a.T["shareid"] = coreutil.FindMyShareId("topjy", s_openid)
+	}
+	if data := mongodb.FindOne("flop", bson.M{"s_openid": openid}); data != nil && len(*data) > 0 {
+		a.T["data"] = *data
+	}
+	return a.Render("/active/flop.html", &a.T)
+}
+
+//翻福卡修改积分
+func updateCredit(id string, o_value1, n_value int, xb *xweb.Action) bool {
+	clog := make(map[string]interface{})
+	clog["s_code"] = "o_fp" //福卡翻牌
+	clog["i_score"] = n_value - o_value1
+	clog["s_operation"] = "福卡翻牌"
+	clog["i_type"] = 1
+	return credit.OtherUpuserCredit(id, n_value, clog, xb)
+}

+ 1 - 1
core/src/timetask.json

@@ -1 +1 @@
-{"comment":{"c_rate":720,"commentrate":900},"market":{"demand":{"attr":["i_hits","i_bids","i_status"],"timepoint":"2016-02-01 08:43:38"},"service":{"attr":["i_hits","i_sales","i_comments","i_score","i_appcounts"],"timepoint":"2016-02-01 08:43:38"}},"marketisstart":true,"marketrate":300}
+{"comment":{"c_rate":720,"commentrate":900},"market":{"demand":{"attr":["i_hits","i_bids","i_status"],"timepoint":"2016-02-02 17:24:06"},"service":{"attr":["i_hits","i_sales","i_comments","i_score","i_appcounts"],"timepoint":"2016-02-02 17:24:06"}},"marketisstart":true,"marketrate":300}

+ 1 - 1
core/src/web/staticres/js/qfw.js

@@ -1,4 +1,4 @@
-var hasNewActive = new Date() >= Date.parse(new Date("2015/12/14 00:00:00")) && new Date() < Date.parse(new Date("2016/2/1 00:00:00"));
+var hasNewActive = new Date() >= Date.parse(new Date("2015/12/14 00:00:00")) && new Date() < Date.parse(new Date("2016/2/15 00:00:00"));
 //网站初始化状态
 //网站初始化状态
 var webSiteInitFlag = true;
 var webSiteInitFlag = true;
 //登录状态 false--未登录,true--已登录
 //登录状态 false--未登录,true--已登录

+ 75 - 0
core/src/web/templates/active/flop.html

@@ -0,0 +1,75 @@
+<html>
+<head>
+<title>企明星-剑鱼</title>
+<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
+<link href="/wxswordfish/style.css" rel="stylesheet">
+<script type="text/javascript" src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
+<script src="/js/jquery.js"></script>
+<script src="/wxswordfish/share.js"></script>
+<script>
+	initShare({{.T.signature}},{{.T.shareid}});
+</script>
+<style type="text/css">
+body{
+	margin: 0px;
+	font-family: tahoma, arial, 'Hiragino Sans GB', 'Microsoft YaHei', 宋体, sans-serif;
+	-webkit-tap-highlight-color: transparent;
+}
+ul{
+	list-style: none;
+	padding: 0px;
+	margin: 0px;
+}
+img{
+	vertical-align: sub;
+}
+.brand a{
+	display: block;
+	float: left;
+	margin: 20px;
+	width: 180px;
+	height: 240px;
+	text-align: center;
+	position: relative;
+}
+.brand img{
+	width: 180px;
+	height: 240px;
+}
+.brand .info{
+	display: none;
+	background-color: #f0f0f0;
+	color: #369242;
+	line-height:240px;
+}
+.vertical .info{
+	width: 0;
+	height: 240px;
+	margin: 0 auto;
+}
+</style>
+</head>
+<body>
+
+
+
+
+<script type="text/javascript">
+var turn = function(target,time,opts){
+	target.find('a').hover(function(){
+		$(this).find('img').stop().animate(opts[0],time,function(){
+			$(this).hide().next().show();
+			$(this).next().animate(opts[1],time);
+		});
+	},function(){
+		$(this).find('.info').animate(opts[0],time,function(){
+			$(this).hide().prev().show();
+			$(this).prev().animate(opts[1],time);
+		});
+	});
+}
+var verticalOpts = [{'width':0},{'width':'180px'}];
+turn($('#vertical'),100,verticalOpts);
+</script>
+</body>
+</html>

+ 18 - 14
core/src/web/templates/active/luckdraw.html

@@ -7,21 +7,21 @@
 <meta http-equiv="X-UA-Compatible" content="IE=edge,Chrome=1" />
 <meta http-equiv="X-UA-Compatible" content="IE=edge,Chrome=1" />
 <meta name="viewport" content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,initial-scale=1.0" user-scalable="no" />
 <meta name="viewport" content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,initial-scale=1.0" user-scalable="no" />
 <meta name="renderer" content="webkit">
 <meta name="renderer" content="webkit">
-<link href="/css/bootstrap.min.css" rel="stylesheet">
-<script src="/js/jquery.js"></script>
-<script src="/js/active/Rotate.js"></script>
+<link href="//cdn.qmx.top/css/bootstrap.min.css" rel="stylesheet">
+<script src="//cdn.qmx.top/js/jquery.js"></script>
+<script src="//cdn.qmx.top/js/active/Rotate.js"></script>
 <script type="text/javascript" src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
 <script type="text/javascript" src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
-<script src="/wxswordfish/share.js"></script>
-<script src="/js/bootstrap.min.js"></script>
+<script src="//cdn.qmx.top/wxswordfish/share.js"></script>
+<script src="//cdn.qmx.top/js/bootstrap.min.js"></script>
 <script>
 <script>
 	initShare({{.T.signature}},{{.T.shareid}});
 	initShare({{.T.signature}},{{.T.shareid}});
 </script>
 </script>
 <style>
 <style>
 *{padding:0; margin:0;}
 *{padding:0; margin:0;}
 .lotteryMain{ width:100%;}
 .lotteryMain{ width:100%;}
-.lotteryBg{ width:100%; height:608px; margin:0 auto; background:url(/images/activeimages/lotteryBg.png) no-repeat top center; position:relative; overflow:hidden;background-size: 375px 508px;}
+.lotteryBg{ width:100%; height:608px; margin:0 auto; background:url(//cdn.qmx.top/images/activeimages/lotteryBg.png) no-repeat top center; position:relative; overflow:hidden;background-size: 375px 508px;}
 #run{ width:145px; height:145px; position:absolute; left:50%; top:50%;  margin-left:-73px; margin-top:-53px; z-index:1; transform:rotate(0deg); -ms-transform:rotate(0deg); }
 #run{ width:145px; height:145px; position:absolute; left:50%; top:50%;  margin-left:-73px; margin-top:-53px; z-index:1; transform:rotate(0deg); -ms-transform:rotate(0deg); }
-#btn_run{ width:80px; height:80px; background:url(/images/activeimages/btn_start.png) no-repeat; border:none; outline:none; position:absolute; left:50%; top:50%; margin-left:-40px; margin-top:-22px; z-index:2;cursor:pointer;background-position:0px 0px;background-size: 100% 100%;}
+#btn_run{ width:80px; height:80px; background:url(//cdn.qmx.top/images/activeimages/btn_start.png) no-repeat; border:none; outline:none; position:absolute; left:50%; top:50%; margin-left:-40px; margin-top:-22px; z-index:2;cursor:pointer;background-position:0px 0px;background-size: 100% 100%;}
 .col-xs-12 p{
 .col-xs-12 p{
 	margin:0px 0px 5px;
 	margin:0px 0px 5px;
 }
 }
@@ -58,7 +58,7 @@
 </div>
 </div>
 <section class="lotteryMain">
 <section class="lotteryMain">
 	<div class="lotteryBg">
 	<div class="lotteryBg">
-    	<img id="run" src="/images/activeimages/start.png" />
+    	<img id="run" src="//cdn.qmx.top/images/activeimages/start.png" />
         <input id="btn_run" type="button" value="" />
         <input id="btn_run" type="button" value="" />
     </div>
     </div>
 </section> 
 </section> 
@@ -78,11 +78,15 @@ $(function(){
 	if (flog == "A"){
 	if (flog == "A"){
 		$(".modal-body").html("{{.T.msg}}")
 		$(".modal-body").html("{{.T.msg}}")
 		$(".modstart").click();
 		$(".modstart").click();
-		$("#btn_run").attr('disabled',true).css("cursor","pointer").css("background","url(/images/activeimages/btn_end.png) no-repeat").css("background-size","100% 100%");
+		$("#btn_run").attr('disabled',true).css("cursor","pointer").css("background","url(//cdn.qmx.top/images/activeimages/btn_end.png) no-repeat").css("background-size","100% 100%");
 	}else if (flog == "B"){
 	}else if (flog == "B"){
 		$(".modal-body").html("{{.T.msg}}")
 		$(".modal-body").html("{{.T.msg}}")
 		$(".modstart").click();
 		$(".modstart").click();
-		$("#btn_run").attr('disabled',true).css("cursor","pointer").css("background","url(/images/activeimages/btn_end.png) no-repeat").css("background-size","100% 100%");
+		$("#btn_run").attr('disabled',true).css("cursor","pointer").css("background","url(//cdn.qmx.top/images/activeimages/btn_end.png) no-repeat").css("background-size","100% 100%");
+	}else if (flog == "G"){
+		$(".modal-body").html("{{.T.msg}}")
+		$(".modstart").click();
+		$("#btn_run").attr('disabled',true).css("cursor","pointer").css("background","url(//cdn.qmx.top/images/activeimages/btn_end.png) no-repeat").css("background-size","100% 100%");
 	}
 	}
      $("#btn_run").click(function(){
      $("#btn_run").click(function(){
 		$("#btn_run").attr('disabled',true).css("cursor","default"); 
 		$("#btn_run").attr('disabled',true).css("cursor","default"); 
@@ -106,17 +110,17 @@ function lottery(){
 					easing: $.easing.easeOutSine, 
 					easing: $.easing.easeOutSine, 
 					callback: function(){ 
 					callback: function(){ 
 						//alert(obj.results); 
 						//alert(obj.results); 
-						$("#btn_run").attr('disabled',true).css("cursor","pointer").css("background","url(/images/activeimages/btn_end.png) no-repeat").css("background-size","100% 100%"); 
+						$("#btn_run").attr('disabled',true).css("cursor","pointer").css("background","url(//cdn.qmx.top/images/activeimages/btn_end.png) no-repeat").css("background-size","100% 100%"); 
 							$(".modal-body").html(obj.msg)
 							$(".modal-body").html(obj.msg)
 							$(".modstart").click();
 							$(".modstart").click();
-							$("#btn_run").attr('disabled',true).css("cursor","pointer").css("background","url(/images/activeimages/btn_end.png) no-repeat").css("background-size","100% 100%");
+							$("#btn_run").attr('disabled',true).css("cursor","pointer").css("background","url(//cdn.qmx.top/images/activeimages/btn_end.png) no-repeat").css("background-size","100% 100%");
 					} 
 					} 
 				});
 				});
 			}else if (obj.flog=="A"){
 			}else if (obj.flog=="A"){
 				$(".modal-body").html(obj.msg)
 				$(".modal-body").html(obj.msg)
 				$(".modstart").click();
 				$(".modstart").click();
-			}else if (obj.flog=="F"){
-				$(".modal-body").html("  小主来晚了,抽奖活动已过期!如果有疑问请联系企明星!")
+			}else if (obj.flog=="G"){
+				$(".modal-body").html(obj.msg)
 				$(".modstart").click();
 				$(".modstart").click();
 			}
 			}
         } 
         } 

+ 8 - 0
core/src/web/templates/common/memberleft.html

@@ -380,6 +380,14 @@ function bookinfo(isInCredit){
 				if(r[1]>7){
 				if(r[1]>7){
 					r[1]=1;
 					r[1]=1;
 				}
 				}
+				var yes=new Date();
+				yes.setDate(yes.getDate()-1);
+				yes.setHours(0);
+				yes.setMinutes(0);
+				yes.setSeconds(0);
+				if (r[0]*1000<yes.getTime()){
+					r[1]=0;
+				}
 				for(var i=0;i<r[1];i++){
 				for(var i=0;i<r[1];i++){
 					var src=images.eq(i).attr("src");
 					var src=images.eq(i).attr("src");
 					if (src.indexOf("ff")==-1){
 					if (src.indexOf("ff")==-1){

+ 4 - 2
core/src/web/templates/index.html

@@ -23,12 +23,14 @@
 		</div>
 		</div>
 		<div class="a-i-h-middle">
 		<div class="a-i-h-middle">
 			<div id="carousel-generic" class="carousel slide" data-ride="carousel">
 			<div id="carousel-generic" class="carousel slide" data-ride="carousel">
-			    <ol class="carousel-indicators">
-					{{$s:=(Ad "index-center-01" 4)}}
+			    {{$s:=(Ad "index-center-01" 4)}}
+				{{if gt (len $s) 1}}
+				<ol class="carousel-indicators">
 					{{range $k,$v := $s}}
 					{{range $k,$v := $s}}
 					<li data-target="#carousel-generic" data-slide-to="{{$k}}"{{if eq $k 0}} class="active"{{end}}></li>
 					<li data-target="#carousel-generic" data-slide-to="{{$k}}"{{if eq $k 0}} class="active"{{end}}></li>
 					{{end}}
 					{{end}}
 			    </ol>
 			    </ol>
+				{{end}}
 			    <div class="carousel-inner" role="listbox">
 			    <div class="carousel-inner" role="listbox">
 					{{$s:=(Ad "index-center-01" 4)}}
 					{{$s:=(Ad "index-center-01" 4)}}
 					{{range $k,$v := $s}}
 					{{range $k,$v := $s}}

+ 8 - 0
core/src/web/templates/member/credit/mcreditindex.html

@@ -336,6 +336,14 @@
 						if(r[1]>7){
 						if(r[1]>7){
 							r[1]=1;
 							r[1]=1;
 						}
 						}
+						var yes=new Date();
+						yes.setDate(yes.getDate()-1);
+						yes.setHours(0);
+						yes.setMinutes(0);
+						yes.setSeconds(0);
+						if (r[0]*1000<yes.getTime()){
+							r[1]=0;
+						}
 						for(var i=0;i<r[1];i++){
 						for(var i=0;i<r[1];i++){
 							var src=images.eq(i).attr("src");
 							var src=images.eq(i).attr("src");
 							if (src.indexOf("ff")==-1){
 							if (src.indexOf("ff")==-1){

+ 15 - 15
core/src/web/templates/swordfish/wxindex.html

@@ -2,12 +2,12 @@
 <head>
 <head>
 <title>企明星-剑鱼-演示</title>
 <title>企明星-剑鱼-演示</title>
 <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
 <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
-<link href="/wxswordfish/style.css" rel="stylesheet">
-<link href="/swiper/swiper.min.css" rel="stylesheet">
+<link href="//cdn.qmx.top/wxswordfish/style.css" rel="stylesheet">
+<link href="//cdn.qmx.top/swiper/swiper.min.css" rel="stylesheet">
 <script type="text/javascript" src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
 <script type="text/javascript" src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
-<script src="/js/jquery.js"></script>
-<script src="/wxswordfish/share.js"></script>
-<script src="/swiper/swiper.min.js"></script>
+<script src="//cdn.qmx.top/js/jquery.js"></script>
+<script src="//cdn.qmx.top/wxswordfish/share.js"></script>
+<script src="//cdn.qmx.top/swiper/swiper.min.js"></script>
 <script>
 <script>
 	initShare({{.T.signature}},{{.T.shareid}});
 	initShare({{.T.signature}},{{.T.shareid}});
 </script>
 </script>
@@ -16,31 +16,31 @@
 <div class="swiper-container">
 <div class="swiper-container">
     <div class="swiper-wrapper">
     <div class="swiper-wrapper">
         <div class="swiper-slide">
         <div class="swiper-slide">
-			<img id="guide-firstImg" src="/wxswordfish/images/guide-1.png">
+			<img id="guide-firstImg" src="//cdn.qmx.top/wxswordfish/images/guide-1.png">
 		</div>
 		</div>
        	<div class="swiper-slide">
        	<div class="swiper-slide">
-			<img src="/wxswordfish/images/guide-2.png">
+			<img src="//cdn.qmx.top/wxswordfish/images/guide-2.png">
 		</div>
 		</div>
        	<div class="swiper-slide">
        	<div class="swiper-slide">
-			<img src="/wxswordfish/images/guide-3.png">
+			<img src="//cdn.qmx.top/wxswordfish/images/guide-3.png">
 		</div>
 		</div>
 		<div class="swiper-slide">
 		<div class="swiper-slide">
-			<img src="/wxswordfish/images/guide-4.png">
+			<img src="//cdn.qmx.top/wxswordfish/images/guide-4.png">
 		</div>
 		</div>
 		<div class="swiper-slide">
 		<div class="swiper-slide">
-			<img src="/wxswordfish/images/guide-5.png">
+			<img src="//cdn.qmx.top/wxswordfish/images/guide-5.png">
 		</div>
 		</div>
 		<div class="swiper-slide">
 		<div class="swiper-slide">
-			<img src="/wxswordfish/images/guide-1.png">
+			<img src="//cdn.qmx.top/wxswordfish/images/guide-1.png">
 		</div>
 		</div>
     </div>
     </div>
     <!-- 如果需要分页器 -->
     <!-- 如果需要分页器 -->
    	<div class="swiper-pagination"></div>
    	<div class="swiper-pagination"></div>
 	<div class="guide-bottom">
 	<div class="guide-bottom">
-		<img class="arrow-up" src="/wxswordfish/images/up.png">
+		<img class="arrow-up" src="//cdn.qmx.top/wxswordfish/images/up.png">
 		<button class="btn experience" onclick="pageJump();">立即体验</button>
 		<button class="btn experience" onclick="pageJump();">立即体验</button>
-		<img src="/wxswordfish/images/jump.png" class="jumpGuide" onclick="pageJump();">
-		<img class="goToShare" id="goToShare" src="/wxswordfish/images/guide-share.png">
+		<img src="//cdn.qmx.top/wxswordfish/images/jump.png" class="jumpGuide" onclick="pageJump();">
+		<img class="goToShare" id="goToShare" src="//cdn.qmx.top/wxswordfish/images/guide-share.png">
 	</div>
 	</div>
 </div>
 </div>
 {{include "/swordfish/wxtoolbar.html"}}
 {{include "/swordfish/wxtoolbar.html"}}
@@ -55,7 +55,7 @@ $(function(){
 		touchMoveStopPropagation: false,
 		touchMoveStopPropagation: false,
 		virtualTranslate: true,
 		virtualTranslate: true,
 		onInit: function(swiper){
 		onInit: function(swiper){
-			$(swiper.slides[5]).children("img").attr("src","/wxswordfish/images/guide-6.png");
+			$(swiper.slides[5]).children("img").attr("src","//cdn.qmx.top/wxswordfish/images/guide-6.png");
 		},
 		},
 		onSlideChangeStart: function(swiper){
 		onSlideChangeStart: function(swiper){
 			var prevSlide = $(swiper.slides[swiper.previousIndex]);
 			var prevSlide = $(swiper.slides[swiper.previousIndex]);

+ 3 - 3
core/src/web/templates/swordfish/wxpush.html

@@ -2,10 +2,10 @@
 <head>
 <head>
 <meta name="viewport" content="width=device-width,initial-scale=1.0">
 <meta name="viewport" content="width=device-width,initial-scale=1.0">
 <title>企明星-剑鱼-信息推送</title>
 <title>企明星-剑鱼-信息推送</title>
-<link href="/wxswordfish/style.css" rel="stylesheet">
+<link href="//cdn.qmx.top/wxswordfish/style.css" rel="stylesheet">
 <script type="text/javascript" src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
 <script type="text/javascript" src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
-<script src="/js/jquery.js"></script>
-<script src="/wxswordfish/share.js"></script>
+<script src="//cdn.qmx.top/js/jquery.js"></script>
+<script src="//cdn.qmx.top/wxswordfish/share.js"></script>
 <script>
 <script>
 initShare({{.T.signature}},{{.T.shareid}});
 initShare({{.T.signature}},{{.T.shareid}});
 $(function(){
 $(function(){

+ 13 - 13
core/src/web/templates/swordfish/wxrssset.html

@@ -4,11 +4,11 @@
 <meta http-equiv="X-UA-Compatible" content="IE=edge,Chrome=1" />
 <meta http-equiv="X-UA-Compatible" content="IE=edge,Chrome=1" />
 <meta name="viewport" content="width=device-width, initial-scale=1">
 <meta name="viewport" content="width=device-width, initial-scale=1">
 <meta name="renderer" content="webkit">
 <meta name="renderer" content="webkit">
-<link href="/wxswordfish/style.css" rel="stylesheet">
+<link href="//cdn.qmx.top/wxswordfish/style.css" rel="stylesheet">
 <script type="text/javascript" src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
 <script type="text/javascript" src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
-<script src="/js/jquery.js"></script>
-<script src="/wxswordfish/share.js"></script>
-<script src="/wxswordfish/main.js"></script>
+<script src="//cdn.qmx.top/js/jquery.js"></script>
+<script src="//cdn.qmx.top/wxswordfish/share.js"></script>
+<script src="//cdn.qmx.top/wxswordfish/main.js"></script>
 <script>
 <script>
 	var msgset= {{.T.msgset}};
 	var msgset= {{.T.msgset}};
 	initShare({{.T.signature}},{{.T.shareid}});
 	initShare({{.T.signature}},{{.T.shareid}});
@@ -27,7 +27,7 @@
 </div>
 </div>
 	<ul class="operation">
 	<ul class="operation">
 		<li class="parent-node" id="tender">
 		<li class="parent-node" id="tender">
-			<img src="/wxswordfish/images/zhaobiao.png">
+			<img src="//cdn.qmx.top/wxswordfish/images/zhaobiao.png">
 			招标公告
 			招标公告
 			<day class="show-days"></day>
 			<day class="show-days"></day>
 			<span class="on-off" id="tender-on-off" v="tender"></span>
 			<span class="on-off" id="tender-on-off" v="tender"></span>
@@ -35,15 +35,15 @@
 		<li class="child-node">
 		<li class="child-node">
 			<ul id="tender-content">
 			<ul id="tender-content">
 				<li>
 				<li>
-					<div>订阅关键词<img src="/wxswordfish/images/right.png"></div>
+					<div>订阅关键词<img src="//cdn.qmx.top/wxswordfish/images/right.png"></div>
 				</li>
 				</li>
 				<li>
 				<li>
-					<div>信息范围<img src="/wxswordfish/images/right.png"></div>
+					<div>信息范围<img src="//cdn.qmx.top/wxswordfish/images/right.png"></div>
 				</li>
 				</li>
 			</ul>
 			</ul>
 		</li>
 		</li>
 		<li class="parent-node" id="bid">
 		<li class="parent-node" id="bid">
-			<img src="/wxswordfish/images/zhongbiao.png">
+			<img src="//cdn.qmx.top/wxswordfish/images/zhongbiao.png">
 			中标公告
 			中标公告
 			<day class="show-days"></day>
 			<day class="show-days"></day>
 			<span class="on-off" id="bid-on-off" v="bid"></span>
 			<span class="on-off" id="bid-on-off" v="bid"></span>
@@ -51,22 +51,22 @@
 		<li class="child-node">
 		<li class="child-node">
 			<ul id="bid-content">
 			<ul id="bid-content">
 				<li>
 				<li>
-					<div>订阅关键词<img src="/wxswordfish/images/right.png"></div>
+					<div>订阅关键词<img src="//cdn.qmx.top/wxswordfish/images/right.png"></div>
 				</li>
 				</li>
 				<li>
 				<li>
-					<div>信息范围<img src="/wxswordfish/images/right.png"></div>
+					<div>信息范围<img src="//cdn.qmx.top/wxswordfish/images/right.png"></div>
 				</li>
 				</li>
 			</ul>
 			</ul>
 		</li>
 		</li>
 		<li class="parent-node">
 		<li class="parent-node">
-			<img src="/wxswordfish/images/qingbao.png">
+			<img src="//cdn.qmx.top/wxswordfish/images/qingbao.png">
 			企业情报
 			企业情报
 			<span class="on-off" id="intelligence-on-off"></span>
 			<span class="on-off" id="intelligence-on-off"></span>
 		</li>
 		</li>
 		<li class="parent-node">
 		<li class="parent-node">
-			<img src="/wxswordfish/images/feerule.png">
+			<img src="//cdn.qmx.top/wxswordfish/images/feerule.png">
 			收费规则
 			收费规则
-			<span style="right:0" class="rule"><img src="/wxswordfish/images/right.png" style="width: 10px;height: 17px;float: right;"></span>
+			<span style="right:0" class="rule"><img src="//cdn.qmx.top/wxswordfish/images/right.png" style="width: 10px;height: 17px;float: right;"></span>
 		</li>
 		</li>
 	</ul>
 	</ul>
 	<!--剑鱼服务协议-->
 	<!--剑鱼服务协议-->

+ 14 - 14
core/src/web/templates/swordfish/wxshare.html

@@ -2,12 +2,12 @@
 <head>
 <head>
 <title>企明星-剑鱼</title>
 <title>企明星-剑鱼</title>
 <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
 <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
-<link href="/wxswordfish/style.css" rel="stylesheet">
-<link href="/swiper/swiper.min.css" rel="stylesheet">
+<link href="//cdn.qmx.top/wxswordfish/style.css" rel="stylesheet">
+<link href="//cdn.qmx.top/swiper/swiper.min.css" rel="stylesheet">
 <script type="text/javascript" src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
 <script type="text/javascript" src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
-<script src="/js/jquery.js"></script>
-<script src="/wxswordfish/share.js"></script>
-<script src="/swiper/swiper.min.js"></script>
+<script src="//cdn.qmx.top/js/jquery.js"></script>
+<script src="//cdn.qmx.top/wxswordfish/share.js"></script>
+<script src="//cdn.qmx.top/swiper/swiper.min.js"></script>
 <script>
 <script>
 	initShare({{.T.signature}},{{.T.shareid}});
 	initShare({{.T.signature}},{{.T.shareid}});
 </script>
 </script>
@@ -16,30 +16,30 @@
 <div class="swiper-container">
 <div class="swiper-container">
     <div class="swiper-wrapper">
     <div class="swiper-wrapper">
         <div class="swiper-slide">
         <div class="swiper-slide">
-			<img src="/wxswordfish/images/guide-0.png" alt="Cinque Terre">
+			<img src="//cdn.qmx.top/wxswordfish/images/guide-0.png" alt="Cinque Terre">
 			<img id="QRcode" style="position:absolute;z-index: 2;" src="/front/weixinshare/{{.T.shareid}}" >
 			<img id="QRcode" style="position:absolute;z-index: 2;" src="/front/weixinshare/{{.T.shareid}}" >
 		</div>
 		</div>
        	<div class="swiper-slide">
        	<div class="swiper-slide">
-			<img src="/wxswordfish/images/guide-2.png">
+			<img src="//cdn.qmx.top/wxswordfish/images/guide-2.png">
 		</div>
 		</div>
        	<div class="swiper-slide">
        	<div class="swiper-slide">
-			<img src="/wxswordfish/images/guide-3.png">
+			<img src="//cdn.qmx.top/wxswordfish/images/guide-3.png">
 		</div>
 		</div>
 		<div class="swiper-slide">
 		<div class="swiper-slide">
-			<img src="/wxswordfish/images/guide-4.png">
+			<img src="//cdn.qmx.top/wxswordfish/images/guide-4.png">
 		</div>
 		</div>
 		<div class="swiper-slide">
 		<div class="swiper-slide">
-			<img src="/wxswordfish/images/guide-5.png">
+			<img src="//cdn.qmx.top/wxswordfish/images/guide-5.png">
 		</div>
 		</div>
 		<div class="swiper-slide">
 		<div class="swiper-slide">
-			<img src="/wxswordfish/images/guide-0.png">
+			<img src="//cdn.qmx.top/wxswordfish/images/guide-0.png">
 		</div>
 		</div>
     </div>
     </div>
     <!-- 如果需要分页器 -->
     <!-- 如果需要分页器 -->
    	<div class="swiper-pagination"></div>
    	<div class="swiper-pagination"></div>
 	<div class="guide-bottom">
 	<div class="guide-bottom">
-		<img class="arrow-up" src="/wxswordfish/images/up.png">
-		<img src="/wxswordfish/images/index.png" class="jumpGuide" onclick="backToIndex()">
+		<img class="arrow-up" src="//cdn.qmx.top/wxswordfish/images/up.png">
+		<img src="//cdn.qmx.top/wxswordfish/images/index.png" class="jumpGuide" onclick="backToIndex()">
 	</div>
 	</div>
 </div>
 </div>
 <script type="text/javascript">
 <script type="text/javascript">
@@ -70,7 +70,7 @@ $(function(){
 		touchMoveStopPropagation: false,
 		touchMoveStopPropagation: false,
 		virtualTranslate: true,
 		virtualTranslate: true,
 		onInit: function(swiper){
 		onInit: function(swiper){
-			$("[data-swiper-slide-index='5']>img").attr("src","/wxswordfish/images/guide-6.png");
+			$("[data-swiper-slide-index='5']>img").attr("src","//cdn.qmx.top/wxswordfish/images/guide-6.png");
 		},
 		},
 		onSlideChangeStart: function(swiper){
 		onSlideChangeStart: function(swiper){
 			if(flag){
 			if(flag){

+ 4 - 4
core/src/web/templates/swordfish/wxshare_copy.html

@@ -5,11 +5,11 @@
 <meta http-equiv="X-UA-Compatible" content="IE=edge,Chrome=1" />
 <meta http-equiv="X-UA-Compatible" content="IE=edge,Chrome=1" />
 <meta name="viewport" content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,initial-scale=1.0" user-scalable="no" />
 <meta name="viewport" content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,initial-scale=1.0" user-scalable="no" />
 <meta name="renderer" content="webkit">
 <meta name="renderer" content="webkit">
-<link href="/css/bootstrap.min.css" rel="stylesheet">
+<link href="//cdn.qmx.top/css/bootstrap.min.css" rel="stylesheet">
 
 
 <script type="text/javascript" src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
 <script type="text/javascript" src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
-<script src="/js/jquery.js"></script>
-<script src="/js/bootstrap.min.js"></script>
+<script src="//cdn.qmx.top/js/jquery.js"></script>
+<script src="//cdn.qmx.top/js/bootstrap.min.js"></script>
 
 
 <script src="/wxswordfish/share.js"></script>
 <script src="/wxswordfish/share.js"></script>
 <script>
 <script>
@@ -17,7 +17,7 @@
 </script>
 </script>
 </head>
 </head>
 <body style="margin:0px; background-color:#C5F7FE;">
 <body style="margin:0px; background-color:#C5F7FE;">
-<img src="/wxswordfish/images/share-cj.jpg" class="img-responsive" alt="Cinque Terre">
+<img src="//cdn.qmx.top/wxswordfish/images/share-cj.jpg" class="img-responsive" alt="Cinque Terre">
 <img id="img2" style="position:absolute;" class="img-responsive" src="/front/weixinshare/{{.T.shareid}}" >
 <img id="img2" style="position:absolute;" class="img-responsive" src="/front/weixinshare/{{.T.shareid}}" >
 </body>
 </body>
 <script>
 <script>

+ 14 - 14
core/src/web/templates/swordfish/wxshareguide.html

@@ -2,12 +2,12 @@
 <head>
 <head>
 <title>企明星-剑鱼-分享</title>
 <title>企明星-剑鱼-分享</title>
 <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
 <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
-<link href="/wxswordfish/style.css" rel="stylesheet">
-<link href="/swiper/swiper.min.css" rel="stylesheet">
+<link href="//cdn.qmx.top/wxswordfish/style.css" rel="stylesheet">
+<link href="//cdn.qmx.top/swiper/swiper.min.css" rel="stylesheet">
 <script type="text/javascript" src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
 <script type="text/javascript" src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
-<script src="/js/jquery.js"></script>
-<script src="/wxswordfish/share.js"></script>
-<script src="/swiper/swiper.min.js"></script>
+<script src="//cdn.qmx.top/js/jquery.js"></script>
+<script src="//cdn.qmx.top/wxswordfish/share.js"></script>
+<script src="//cdn.qmx.top/swiper/swiper.min.js"></script>
 <script>
 <script>
 	initShare({{.T.signature}},{{.T.shareid}});
 	initShare({{.T.signature}},{{.T.shareid}});
 </script>
 </script>
@@ -16,30 +16,30 @@
 <div class="swiper-container">
 <div class="swiper-container">
     <div class="swiper-wrapper">
     <div class="swiper-wrapper">
         <div class="swiper-slide">
         <div class="swiper-slide">
-			<img src="/wxswordfish/images/share-cj.jpg" alt="Cinque Terre">
+			<img src="//cdn.qmx.top/wxswordfish/images/share-cj.jpg" alt="Cinque Terre">
 			<img id="QRcode" style="position:absolute;z-index: 2;" src="/front/weixinshare/{{.T.shareid}}" >
 			<img id="QRcode" style="position:absolute;z-index: 2;" src="/front/weixinshare/{{.T.shareid}}" >
 		</div>
 		</div>
        	<div class="swiper-slide">
        	<div class="swiper-slide">
-			<img src="/wxswordfish/images/guide-2.png">
+			<img src="//cdn.qmx.top/wxswordfish/images/guide-2.png">
 		</div>
 		</div>
        	<div class="swiper-slide">
        	<div class="swiper-slide">
-			<img src="/wxswordfish/images/guide-3.png">
+			<img src="//cdn.qmx.top/wxswordfish/images/guide-3.png">
 		</div>
 		</div>
 		<div class="swiper-slide">
 		<div class="swiper-slide">
-			<img src="/wxswordfish/images/guide-4.png">
+			<img src="//cdn.qmx.top/wxswordfish/images/guide-4.png">
 		</div>
 		</div>
 		<div class="swiper-slide">
 		<div class="swiper-slide">
-			<img src="/wxswordfish/images/guide-5.png">
+			<img src="//cdn.qmx.top/wxswordfish/images/guide-5.png">
 		</div>
 		</div>
 		<div class="swiper-slide">
 		<div class="swiper-slide">
-			<img src="/wxswordfish/images/share-cj.jpg">
+			<img src="//cdn.qmx.top/wxswordfish/images/share-cj.jpg">
 		</div>
 		</div>
     </div>
     </div>
     <!-- 如果需要分页器 -->
     <!-- 如果需要分页器 -->
    	<div class="swiper-pagination"></div>
    	<div class="swiper-pagination"></div>
 	<div class="guide-bottom">
 	<div class="guide-bottom">
-		<img class="arrow-up" src="/wxswordfish/images/up.png">
-		<img src="/wxswordfish/images/index.png" class="jumpGuide" onclick="backToIndex()">
+		<img class="arrow-up" src="//cdn.qmx.top/wxswordfish/images/up.png">
+		<img src="//cdn.qmx.top/wxswordfish/images/index.png" class="jumpGuide" onclick="backToIndex()">
 	</div>
 	</div>
 </div>
 </div>
 <script type="text/javascript">
 <script type="text/javascript">
@@ -70,7 +70,7 @@ $(function(){
 		touchMoveStopPropagation: false,
 		touchMoveStopPropagation: false,
 		virtualTranslate: true,
 		virtualTranslate: true,
 		onInit: function(swiper){
 		onInit: function(swiper){
-			$("[data-swiper-slide-index='5']>img").attr("src","/wxswordfish/images/guide-6.png");
+			$("[data-swiper-slide-index='5']>img").attr("src","//cdn.qmx.top/wxswordfish/images/guide-6.png");
 		},
 		},
 		onSlideChangeStart: function(swiper){
 		onSlideChangeStart: function(swiper){
 			if(flag){
 			if(flag){

+ 3 - 3
core/src/web/templates/swordfish/wxtoolbar.html

@@ -1,14 +1,14 @@
 <ul class="bottom-toolbar">
 <ul class="bottom-toolbar">
 	<li class="parent-node" id="goToGuide">
 	<li class="parent-node" id="goToGuide">
-		<img src="/wxswordfish/images/demo.png">
+		<img src="//cdn.qmx.top/wxswordfish/images/demo.png">
 		查看演示
 		查看演示
 	</li>
 	</li>
 	<li class="parent-node" id="feedback">
 	<li class="parent-node" id="feedback">
-		<img src="/wxswordfish/images/fankui.png">
+		<img src="//cdn.qmx.top/wxswordfish/images/fankui.png">
 		意见反馈
 		意见反馈
 	</li>
 	</li>
 	<li class="parent-node" id="goToShare">
 	<li class="parent-node" id="goToShare">
-		<img src="/wxswordfish/images/share.png">
+		<img src="//cdn.qmx.top/wxswordfish/images/share.png">
 		分享
 		分享
 	</li>
 	</li>
 </ul>
 </ul>

+ 6 - 2
weixin/src/qfw/weixin/dao/sharedao.go

@@ -8,6 +8,7 @@ import (
 	"qfw/util/credit"
 	"qfw/util/credit"
 	. "qfw/util/mongodb"
 	. "qfw/util/mongodb"
 	"sync"
 	"sync"
+	"qfw/util"
 	"time"
 	"time"
 )
 )
 
 
@@ -58,8 +59,11 @@ func SaveInviteLink(shareid string, myopenid string,isolduser bool) {
 	}
 	}
 	smid := fmt.Sprintf("%x", string(((*ret)["_id"]).(ObjectId)))
 	smid := fmt.Sprintf("%x", string(((*ret)["_id"]).(ObjectId)))
 	//积分处理,RPC
 	//积分处理,RPC
-	log.Println("smid:::", smid)
-	credit.InCreditB(smid, credit.C_TG, nil)
+	 util.Try(func() {
+				credit.InCreditB(smid, credit.C_TG, nil)
+			}, func(e interface{}) {
+				log.Println(e)
+			})
 	sharelock.Unlock()
 	sharelock.Unlock()
 }
 }
 
 

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

@@ -46,7 +46,7 @@ func CreateMenu(rw http.ResponseWriter, r *http.Request) {
 	menu.Buttons[2].SubButtons[2].Name = "法规查询"
 	menu.Buttons[2].SubButtons[2].Name = "法规查询"
 	menu.Buttons[2].SubButtons[2].Type = MenuButtonTypeUrl
 	menu.Buttons[2].SubButtons[2].Type = MenuButtonTypeUrl
 	menu.Buttons[2].SubButtons[2].Url = fmt.Sprintf(urlstr, "lawsearchaction")
 	menu.Buttons[2].SubButtons[2].Url = fmt.Sprintf(urlstr, "lawsearchaction")
-	menu.Buttons[2].SubButtons[3].Name = "签到"
+	menu.Buttons[2].SubButtons[3].Name = "我的积分/签到"
 	menu.Buttons[2].SubButtons[3].Type = MenuButtonTypeUrl
 	menu.Buttons[2].SubButtons[3].Type = MenuButtonTypeUrl
 	menu.Buttons[2].SubButtons[3].Url = fmt.Sprintf(urlstr, "signature")
 	menu.Buttons[2].SubButtons[3].Url = fmt.Sprintf(urlstr, "signature")
 
 

+ 32 - 0
weixin/src/qfw/weixin/msgaction.go

@@ -0,0 +1,32 @@
+package weixin
+
+import (
+	"fmt"
+	"log"
+	"net/http"
+)
+
+const (
+	PREVIEW_URL = "https://api.weixin.qq.com/cgi-bin/message/mass/preview?access_token="
+)
+
+//发红包(传统红包)
+func SendMsgAct(w http.ResponseWriter, r *http.Request) {
+	openid := r.FormValue("openid")
+	var msg struct {
+		ToUser string `json:"touser"`
+		Text   struct {
+			Content string `json:"content"`
+		} `json:"text"`
+		Msgtype string `json:"msgtype"`
+	}
+	msg.ToUser = openid
+	msg.Text.Content = fmt.Sprintf("<a href=\"%s\"><font color=red>%s</font></a>", "http://118.85.207.82/wx/czwap/person.do?phone=jfcpeeccfjgfokhfpmodakliicpeleek&toUserName=gh_aa76902ce7c6&openId=okAaojvZL77PDmx51yGZeGQbG8m8", "电信")
+	msg.Msgtype = "text"
+	bs, err := Mux.PostJsonCustom(PREVIEW_URL, msg)
+	if err != nil {
+		log.Println("preview msg::", err.Error())
+	} else {
+		log.Println("preview msg::", string(bs))
+	}
+}

+ 8 - 3
weixin/src/qfw/weixin/msgtxtchandler.go

@@ -71,9 +71,13 @@ func MsgTxtHandler(w ResponseWriter, r *Request) {
 		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关闭),man2重启微信,man3重启积分(man33关闭),man4重启微信认证(man44关闭))。\n输入q或Q离开。")
 		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关闭),man2重启微信,man3重启积分(man33关闭),man4重启微信认证(man44关闭))。\n输入q或Q离开。")
 		return
 		return
 	} else if r.Content == "抽奖" { //进入抽奖环节
 	} else if r.Content == "抽奖" { //进入抽奖环节
-		//w.ReplyText("非常抱歉!系统维护中,请稍后再试。")
-		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}})
+		if time.Now().Unix() > 1455465600 { //活动过期 ,过期后,这段代码要删除
+			//TODO
+			w.ReplyText("抱歉,活动已结束!敬请期待下一次抽奖活动,注意看预告哟……")
+		} else {
+			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 strings.HasPrefix(r.Content, "内部报名") { //绑定拓普员工姓名
 	} else if strings.HasPrefix(r.Content, "内部报名") { //绑定拓普员工姓名
 		tmp := strings.Fields(r.Content)
 		tmp := strings.Fields(r.Content)
 		//log.Println(tmp, len(tmp))
 		//log.Println(tmp, len(tmp))
@@ -230,3 +234,4 @@ func processRobotMsg(userid string, content string, w ResponseWriter, r *Request
 		return
 		return
 	}
 	}
 }
 }
+

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

@@ -52,7 +52,7 @@ func InitWeixinSdk() {
 	http.HandleFunc("/"+wf.SysConfig.Appcontext+"/recharge", RechargeAct)
 	http.HandleFunc("/"+wf.SysConfig.Appcontext+"/recharge", RechargeAct)
 	http.HandleFunc("/"+wf.SysConfig.Appcontext+"/paycallback", PayCallback)
 	http.HandleFunc("/"+wf.SysConfig.Appcontext+"/paycallback", PayCallback)
 	//监控
 	//监控
-
+	http.HandleFunc("/"+wf.SysConfig.Appcontext+"/sendmsg", SendMsgAct)
 	//生成推广二维码
 	//生成推广二维码
 	http.HandleFunc("/"+wf.SysConfig.Appcontext+"/adv/", AdvHandle)
 	http.HandleFunc("/"+wf.SysConfig.Appcontext+"/adv/", AdvHandle)