|
@@ -10,6 +10,7 @@ import (
|
|
|
"github.com/zeromicro/go-zero/core/logx"
|
|
|
"log"
|
|
|
"net/http"
|
|
|
+ "regexp"
|
|
|
"strings"
|
|
|
"time"
|
|
|
|
|
@@ -38,7 +39,10 @@ func (l *SearchListLogic) SearchList(req *types.SearchReq) (resp *types.CommonRe
|
|
|
defer common.Catch()
|
|
|
t := time.Now()
|
|
|
limitFlag, isNew := util.GetFlag(l.r, l.w, req.UserId)
|
|
|
- var mobileTag []string
|
|
|
+ var (
|
|
|
+ mobileTag []string
|
|
|
+ MobileReg = regexp.MustCompile("(?i)(Android|Mobile|Phone)")
|
|
|
+ )
|
|
|
//工作台内
|
|
|
if strings.Contains(l.r.Referer(), "/page_workDesktop/work-bench") {
|
|
|
mobileTag = req.MobileTag
|
|
@@ -101,7 +105,8 @@ func (l *SearchListLogic) SearchList(req *types.SearchReq) (resp *types.CommonRe
|
|
|
Data: nil,
|
|
|
}, err
|
|
|
}
|
|
|
- if req.UserId == "" {
|
|
|
+ //移动端未登录
|
|
|
+ if req.UserId == "" && MobileReg.MatchString(l.r.UserAgent()) {
|
|
|
var data []map[string]interface{}
|
|
|
detailMosaicTxt := IC.C.DetailMosaicTxt
|
|
|
sm := common.StructToMapMore(IC.C.SearchMosaic)
|