|
@@ -90,13 +90,14 @@ func (m *Front) PcAjaxReq() {
|
|
|
if pageSize == 0 {
|
|
|
pageSize = 50
|
|
|
}
|
|
|
+ //userId = "63c11681800b227df5874680"
|
|
|
if tabularflag == "Y" && userId == "" {
|
|
|
//判断用户是否登录进行表格查询,否则返回基本数据
|
|
|
tabularflag = ""
|
|
|
}
|
|
|
- vipStatus := jy.GetVipState(public.Mysql, public.MQFW, userId)
|
|
|
+ userInfo := jy.GetVipState(public.Mysql, public.MQFW, userId)
|
|
|
if territorialization != "" { // 如果是领域化数据 判断是否是付费用户 是否有权限
|
|
|
- if (vipStatus.BigMember <= 0 && vipStatus.VipState <= 0) || (!jy.HasBidFieldPower(config.ResourceApi.HasPowers, fmt.Sprint(util.Int64All(baseUserId)), MedicalFunctionCode)) {
|
|
|
+ if (userInfo.BigMember <= 0 && userInfo.VipState <= 0) || (!jy.HasBidFieldPower(config.ResourceApi.HasPowers, fmt.Sprint(util.Int64All(baseUserId)), MedicalFunctionCode)) {
|
|
|
m.ServeJson(map[string]interface{}{
|
|
|
"list": []map[string]interface{}{},
|
|
|
})
|
|
@@ -109,12 +110,15 @@ func (m *Front) PcAjaxReq() {
|
|
|
toptype := m.GetString("toptype") //信息类型
|
|
|
publishtime := m.GetString("publishtime")
|
|
|
selectType := m.GetString("selectType")
|
|
|
+ if selectType == "" {
|
|
|
+ selectType = "title,content"
|
|
|
+ }
|
|
|
industry := strings.TrimSpace(m.GetString("industry"))
|
|
|
minprice := m.GetString("minprice") //最低价格
|
|
|
maxprice := m.GetString("maxprice") //最高价格
|
|
|
fileExists := m.GetString("fileExists") //是否有附件--所有用户都可用此功能 0:全部;1:有附件;-1:无附件
|
|
|
var (
|
|
|
- //高级筛选 仅vip用户可查询
|
|
|
+ //高级筛选 仅付费用户可查询
|
|
|
hasBuyerTel, hasWinnerTel string //是否有采购单位电话、是否有中标单位电话 y:有 n:没有
|
|
|
buyerclass string //采购单位类别
|
|
|
notkey string //排除词
|
|
@@ -129,14 +133,11 @@ func (m *Front) PcAjaxReq() {
|
|
|
wordsMode int //搜索关键词模式;默认0:包含所有关键词;1:包含任意关键词。
|
|
|
additionalWords string //关键词:附加关键词(副:五组,每组最多15个字符 每组,号隔开)
|
|
|
)
|
|
|
- userInfo := jy.GetVipState(public.Mysql, public.MQFW, userId)
|
|
|
queryItems = userInfo.GetQueryItems(selectType, util.Int64All(config.Sysconfig["bidSearchOldUserLimit"]))
|
|
|
isPayedUser = userInfo.IsPayedUser()
|
|
|
- //isPayedUser, publishtime, queryItems, currentPage, _ = bidsearch.PublicSearch(userId, selectType, publishtime, util.Int64All(config.Sysconfig["bidSearchOldUserLimit"]), currentPage, pageSize)
|
|
|
if isPayedUser {
|
|
|
buyerclass = m.GetString("buyerclass")
|
|
|
hasBuyerTel, hasWinnerTel = m.GetString("buyertel"), m.GetString("winnertel")
|
|
|
- //notkey = m.GetString("notkey")
|
|
|
notkey = util.If(strings.Contains(m.GetString("notkey"), ","), strings.ReplaceAll(m.GetString("notkey"), ",", " "), m.GetString("notkey")).(string)
|
|
|
city = m.GetString("city")
|
|
|
searchGroup, _ = m.GetInteger("searchGroup") //搜索分组;默认0:全部;1:招标采购搜索;2:超前项目。
|
|
@@ -144,7 +145,6 @@ func (m *Front) PcAjaxReq() {
|
|
|
wordsMode, _ = m.GetInteger("wordsMode") //搜索关键词模式;默认0:包含所有关键词;1:包含任意关键词。
|
|
|
additionalWords = m.GetString("additionalWords") //关键词:附加关键词(副:五组,每组最多15个字符 每组,号隔开)
|
|
|
}
|
|
|
- m.SetSession("selectType", selectType)
|
|
|
if userId == "" {
|
|
|
//未登录用户访问全部信息类型 需要过滤掉 拟建和采购意向
|
|
|
if subtype == "" {
|
|
@@ -168,7 +168,8 @@ func (m *Front) PcAjaxReq() {
|
|
|
}
|
|
|
if isLimit == 1 {
|
|
|
searchTypeSwitch, _ := config.Sysconfig["searchTypeSwitch"].(bool)
|
|
|
- so := NewSearchOptimize(userId, phone, area, city, subtype, toptype, publishtime, selectType, fmt.Sprintf("%s-%s", minprice, maxprice), industry, buyerclass, hasBuyerTel, hasWinnerTel, fileExists, s_word, additionalWords, notkey, "PC", territorialization, currentPage, pageSize, searchGroup, searchMode, wordsMode, *userInfo, searchTypeSwitch)
|
|
|
+ so := NewSearchOptimize(userId, phone, area, city, subtype, toptype, publishtime, strings.Join(queryItems, ","), fmt.Sprintf("%s-%s", minprice, maxprice), industry, buyerclass, hasBuyerTel, hasWinnerTel, fileExists, s_word, additionalWords, notkey, "PC", territorialization, currentPage, pageSize, searchGroup, searchMode, wordsMode, *userInfo, searchTypeSwitch)
|
|
|
+ m.SetSession("selectType", so.SelectType)
|
|
|
count, total, list = so.GetBidSearchList(false)
|
|
|
}
|
|
|
}
|
|
@@ -181,7 +182,6 @@ func (m *Front) PcAjaxReq() {
|
|
|
"interceptWord": a_word,
|
|
|
"interceptLimit": util.IntAllDef(config.Sysconfig["keywordsLimit"], 35),
|
|
|
"keywords": b_word,
|
|
|
- "searchvalue": a_word,
|
|
|
})
|
|
|
}
|
|
|
|