|
@@ -1,11 +1,13 @@
|
|
|
package front
|
|
|
|
|
|
import (
|
|
|
+ "app.yhyue.com/moapp/jybase/encrypt"
|
|
|
"app.yhyue.com/moapp/jybase/go-xweb/xweb"
|
|
|
"app.yhyue.com/moapp/jybase/redis"
|
|
|
"app.yhyue.com/moapp/jypkg/common/src/qfw/util/jy"
|
|
|
"fmt"
|
|
|
"jy/src/jfw/modules/app/src/jfw/config"
|
|
|
+ . "jy/src/jfw/modules/app/src/public"
|
|
|
"log"
|
|
|
)
|
|
|
|
|
@@ -16,13 +18,37 @@ var (
|
|
|
|
|
|
type WX struct {
|
|
|
*xweb.Action
|
|
|
- index xweb.Mapper `xweb:"/jyapp/new/(.*)"`
|
|
|
+ index xweb.Mapper `xweb:"/jyapp/new/(.*)"`
|
|
|
+ miniEr xweb.Mapper `xweb:"/jyapp/free/minier/(.*)"` //未关注二维码
|
|
|
}
|
|
|
|
|
|
func init() {
|
|
|
xweb.AddAction(&WX{})
|
|
|
}
|
|
|
|
|
|
+func (w *WX) MiniEr(id string) error {
|
|
|
+ if id := encrypt.SE.Decode4Hex(id); id != "" {
|
|
|
+ id = fmt.Sprintf("ac_%s", id)
|
|
|
+ var pngdata = []byte{}
|
|
|
+ if ret, _ := redis.GetBytes("other", "p_share_"+id); ret != nil {
|
|
|
+ pngdata = *ret
|
|
|
+ } else {
|
|
|
+ GetShareQRStr(id)
|
|
|
+ tmp, err := redis.GetBytes("other", "p_share_"+id)
|
|
|
+ if err == nil {
|
|
|
+ pngdata = *tmp
|
|
|
+ }
|
|
|
+ }
|
|
|
+ wr := w.ResponseWriter
|
|
|
+ wr.Header().Set("Cache-Control", "no-cache,no-store,must-revalidate")
|
|
|
+ wr.Header().Set("Prama", "no-cache")
|
|
|
+ wr.Header().Set("Expires", "0")
|
|
|
+ wr.Header().Set("Content-Type", "image/png")
|
|
|
+ wr.Write(pngdata)
|
|
|
+ }
|
|
|
+ return nil
|
|
|
+}
|
|
|
+
|
|
|
// 微信首页地址
|
|
|
func (w *WX) Index(pageLabel string) error {
|
|
|
log.Println("---sessionId----:", w.Session().Id())
|