|
@@ -1,8 +1,10 @@
|
|
package active
|
|
package active
|
|
|
|
|
|
import (
|
|
import (
|
|
|
|
+ "github.com/go-xweb/xweb"
|
|
"gopkg.in/mgo.v2/bson"
|
|
"gopkg.in/mgo.v2/bson"
|
|
"qfw/coreutil"
|
|
"qfw/coreutil"
|
|
|
|
+ "qfw/util/credit"
|
|
"qfw/util/mongodb"
|
|
"qfw/util/mongodb"
|
|
)
|
|
)
|
|
|
|
|
|
@@ -22,7 +24,12 @@ func (a *Activemanage) Flop(openid string) error {
|
|
return a.Render("/active/flop.html", &a.T)
|
|
return a.Render("/active/flop.html", &a.T)
|
|
}
|
|
}
|
|
|
|
|
|
-//修改积分
|
|
|
|
-func updateCredit(id string, value int) bool {
|
|
|
|
- return true
|
|
|
|
|
|
+//翻福卡修改积分
|
|
|
|
+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)
|
|
}
|
|
}
|