فهرست منبع

Merge branch 'dev4.5.7' of ssh://127.0.0.1:10022/qmx/jy into dev4.5.7

wangchuanjin 4 سال پیش
والد
کامیت
9253e4f003
30فایلهای تغییر یافته به همراه520 افزوده شده و 106 حذف شده
  1. 49 2
      src/jfw/front/distribution.go
  2. 0 1
      src/jfw/front/ws_dataExport.go
  3. 0 1
      src/jfw/modules/app/src/web/staticres/jyapp/big-member/css/page_pro_follow_detail.css
  4. 2 2
      src/jfw/modules/app/src/web/staticres/jyapp/js/searchindex.js
  5. 36 14
      src/jfw/modules/app/src/web/templates/weixin/search/mainSearch.html
  6. 6 6
      src/jfw/modules/distribution/src/config.json
  7. 1 2
      src/jfw/modules/distribution/src/main.go
  8. 208 6
      src/jfw/modules/distribution/src/service/action/partner.go
  9. 15 8
      src/jfw/modules/distribution/src/service/action/share.go
  10. 31 6
      src/jfw/modules/subscribepay/src/entity/distribution.go
  11. 5 1
      src/jfw/modules/subscribepay/src/entity/subscribeVip.go
  12. 1 1
      src/jfw/modules/subscribepay/src/main.go
  13. 2 3
      src/jfw/modules/subscribepay/src/service/dataExportPay.go
  14. 24 8
      src/jfw/modules/subscribepay/src/service/vipSubscribeChange.go
  15. 59 3
      src/jfw/modules/subscribepay/src/service/vipSubscribePay.go
  16. 27 22
      src/jfw/modules/weixin/src/distribution.json
  17. 34 0
      src/jfw/modules/weixin/src/wx/wx.go
  18. 3 3
      src/web/staticres/common-module/ent-search/ent-search-template.js
  19. 1 1
      src/web/staticres/js/ent-search-index-pc.js
  20. 2 2
      src/web/staticres/js/wxSupersearch.js
  21. 1 1
      src/web/templates/_error.html
  22. 1 1
      src/web/templates/active/index_bak.html
  23. 1 1
      src/web/templates/active/topics.html
  24. 2 2
      src/web/templates/common/pcbottom.html
  25. 1 1
      src/web/templates/common/pchead.html
  26. 1 1
      src/web/templates/common/pchead_bak.html
  27. 1 1
      src/web/templates/frontRouter/pc/squeeze/sess/test.html
  28. 1 1
      src/web/templates/pc/classifylist.html
  29. 2 2
      src/web/templates/pc/index.html
  30. 3 3
      src/web/templates/pc/supsearch.html

+ 49 - 2
src/jfw/front/distribution.go

@@ -17,6 +17,7 @@ type Distrib struct {
 	*xweb.Action
 	linkShare  xweb.Mapper `xweb:"/F/(.*)"` //分销微信分享短地址
 	linkShareX xweb.Mapper `xweb:"/X/(.*)"` //公告分销微信分享短地址
+	linkShareG xweb.Mapper `xweb:"/G/(.*)"` //公告分销微信分享短地址
 }
 
 var suffix_msgt = "_SX"
@@ -112,8 +113,54 @@ func (this *Distrib) LinkShareX(discored string) error {
 	go this.ShareLogs(discored, userId)
 	log.Println("openid:", openid)
 	log.Println("DIS_" + discored[1:])
-
-	//redisDis := fmt.Sprint(redidis)
+	if !checkIsSubscribeFlag {
+		if discored == "" {
+			log.Println(userId, "分销用户微信分享错误")
+		}
+		//提示关注页面
+		this.T["discored"] = discored
+		return this.Render("/weixin/singlelogin/index.html")
+	}
+	return this.Redirect("/distribution/share/" + discored)
+}
+//企业分销
+func (this *Distrib) LinkShareG(discored string) error {
+	defer util.Catch()
+	checkIsSubscribeFlag := true
+	openid, _ := this.Session().Get("s_m_openid").(string)
+	if openid == "" {
+		if this.GetString("state") == "wx" {
+			//微信跳回来的
+			code := this.GetString("code")
+			if code != "" {
+				openid = jyutil.Getopenid(code)
+				if openid != "" {
+					//是否为关注用户
+					checkIsSubscribeFlag = CheckUserIsSubscribe(openid)
+					if checkIsSubscribeFlag {
+						//关注用户 建session
+						FindUserAndCreateSess(openid, this.Session())
+					}
+				}
+			}
+		} else {
+			if public.CheckWxBrowser(this.Request) {
+				//所有参数都不再使用,跳到微信验证用户
+				return this.Redirect(fmt.Sprintf(config.Wxoauth, url.QueryEscape(this.Site()+this.Url()), "wx"), 302)
+			}
+		}
+		openid, _ = this.Session().Get("s_m_openid").(string)
+		if openid == "" {
+			checkIsSubscribeFlag = false
+		}
+	} else {
+		//是否为关注用户
+		checkIsSubscribeFlag = CheckUserIsSubscribe(openid)
+	}
+	userId, _ := this.Session().Get("userId").(string)
+	go this.ShareLogs(discored, userId)
+	log.Println("openid:", openid)
+	log.Println("DIS_" + discored[1:])
 	if !checkIsSubscribeFlag {
 		if discored == "" {
 			log.Println(userId, "分销用户微信分享错误")

+ 0 - 1
src/jfw/front/ws_dataExport.go

@@ -388,7 +388,6 @@ func (wd *WsDataExport) SearchExport() error {
 		Haswinnertel: wd.GetString("winnertel"),                    //是否有中标电话
 		SelectIds:    strings.TrimSpace(wd.GetString("selectIds")), //选择信息id
 	}
-
 	saveData := reqData.PassBidSearchExport()
 	saveData["selectType"] = strings.Join(jy.GetVipState(public.Mysql, public.MQFW, userId).
 		GetQueryItems(wd.GetString("selectType"), util.Int64All(config.Sysconfig["bidSearchOldUserLimit"])), ",")

+ 0 - 1
src/jfw/modules/app/src/web/staticres/jyapp/big-member/css/page_pro_follow_detail.css

@@ -305,7 +305,6 @@
 /*取消关注弹窗样式*/
 .caredialog {
   width: 6.06rem;
-  height: 2.34rem;
 }
 
 .caredialog .van-dialog__message {

+ 2 - 2
src/jfw/modules/app/src/web/staticres/jyapp/js/searchindex.js

@@ -134,7 +134,7 @@ var SuperSearch = {
     "searchvalue": "",
     "subtype": "",
     "scope": "",
-    "publishtime": "lately-30",
+    "publishtime": "thisyear",
     "selectType": "",
     "minprice":"",
     "maxprice":"",
@@ -809,7 +809,7 @@ var SuperSearch = {
       "searchvalue": "",
       "subtype": "",
       "scope": "",
-      "publishtime": "lately-30",
+      "publishtime": "thisyear",
       "selectType": "",
       "minprice":"",
       "maxprice":"",

+ 36 - 14
src/jfw/modules/app/src/web/templates/weixin/search/mainSearch.html

@@ -170,10 +170,10 @@
                         <div class="jy_sprite_home_icon icon_1"></div>
                         <span>投标决策</span>
                     </a>
-                    <a class="tab_item" data-only-name="潜在项目预测" id="mainSearch-tab2">
+                    <!-- <a class="tab_item" data-only-name="潜在项目预测" id="mainSearch-tab2">
                         <div class="jy_sprite_home_icon_add icon_9"></div>
                         <span>潜在项目预测</span>
-                    </a>
+                    </a> -->
                     <a class="tab_item" data-only-name="中标企业预测" id="mainSearch-tab3">
                         <div class="jy_sprite_home_icon icon_3"></div>
                         <span>中标企业预测</span>
@@ -185,7 +185,11 @@
                     <a class="tab_item" data-only-name="剑鱼文库" id="">
                       <div class="jy_sprite_home_icon icon_2"></div>
                       <span>剑鱼文库</span>
-                  </a>
+                    </a>
+                    <a class="tab_item" data-only-name="剑鱼伙伴" id="mainSearch-tab2">
+                        <div class="jy_sprite_home_icon_add icon_9"></div>
+                        <span>剑鱼伙伴</span>
+                    </a>
                 </div>
                 <div class="tab_container">
                     <a class="tab_item" data-only-name="数据导出" id="mainSearch-tab5">
@@ -948,17 +952,17 @@
                     }
                     break
                 }
-                case '潜在项目预测': {
-                    sessionStorage.setItem('landinfo', JSON.stringify({
-                        anchor: '潜在项目预测'
-                    }))
-                    if ($this.attr('data-access')) {
-                        window.location.href = '/jyapp/big/page/forecast_list';
-                    } else {
-                        location.href = '/jyapp/big/page/landingPage';
-                    }
-                    break
-                }
+                // case '潜在项目预测': {
+                //     sessionStorage.setItem('landinfo', JSON.stringify({
+                //         anchor: '潜在项目预测'
+                //     }))
+                //     if ($this.attr('data-access')) {
+                //         window.location.href = '/jyapp/big/page/forecast_list';
+                //     } else {
+                //         location.href = '/jyapp/big/page/landingPage';
+                //     }
+                //     break
+                // }
                 case '中标企业预测':  {
                     sessionStorage.setItem('landinfo', JSON.stringify({
                         anchor: '中标企业预测'
@@ -1009,6 +1013,24 @@
                     }
                     break
                 }
+                case '剑鱼伙伴': {
+                    if(userId==""){
+                        window.location.href='/jyapp/free/login?back=index';
+                    }else{
+                        $.ajax({
+                            url: '/distribution/partner/isPartner?t=' + new Date().getTime(),
+                            type: 'POST',
+                            success: function (r) {
+                                if (r.isPartner) {
+                                    window.location.href = "/page_partner/home"
+                                } else {
+                                    window.location.href = "/page_partner/partner/partner.html" // 协议页面
+                                }
+                            }
+                        })
+                    }
+                    break
+                }
                 case '签到': {
                     if(userId==""){
                         window.location.href='/jyapp/free/login?back=index';

+ 6 - 6
src/jfw/modules/distribution/src/config.json

@@ -3,12 +3,12 @@
 	"webdomain":"http://web-jydev-wh.jianyu360.cn",
 	"mongodb": {
 		"main": {
-			"address": "192.168.3.128:27080",
+			"address": "192.168.3.11:27090",
 	 		"size": 5,
 	 		"dbName": "qfw"
 		},
 		"log": {
-			"address": "192.168.3.128:27080",
+			"address": "192.168.3.11:27090",
 	 		"size": 5,
 	 		"dbName": "qfw",
 			"userName": "admin",
@@ -23,9 +23,9 @@
     "mysql": {
 	    "main": {
 	        "dbName": "jianyu",
-	        "address": "192.168.3.14:3306",
-	        "userName": "admin",
-	        "passWord": "123456",
+	        "address": "192.168.3.11:3366",
+	        "userName": "root",
+	        "passWord": "Topnet123",
 			"maxOpenConns": 20,
 			"maxIdleConns": 20
 	    }
@@ -45,7 +45,7 @@
         }
     ],
     "workerNum":10,
-    "jobNum":20,
+	"jobNum":20,
     "modular":{
     	"bottomTxt": "- 全国招标信息免费看,不遮挡 -",
 		"butTxt": "打 开",

+ 1 - 2
src/jfw/modules/distribution/src/main.go

@@ -1,6 +1,7 @@
 package main
 
 import (
+	"github.com/go-xweb/xweb"
 	"net/http"
 	_ "service/a"
 	_ "service/action"
@@ -8,8 +9,6 @@ import (
 	_ "service/filter"
 	_ "service/public"
 	_ "timetask"
-
-	"github.com/go-xweb/xweb"
 )
 
 func main() {

+ 208 - 6
src/jfw/modules/distribution/src/service/action/partner.go

@@ -17,11 +17,14 @@ import (
 
 type Partner struct {
 	*xweb.Action
-	sendMessage  xweb.Mapper `xweb:"/partner/sendMessage"`  //发短信
-	addPartner   xweb.Mapper `xweb:"/partner/addPartner"`   //加入伙伴
-	echoInfo     xweb.Mapper `xweb:"/partner/echoInfo"`     //回显信息
-	isPartner    xweb.Mapper `xweb:"/partner/isPartner"`    //是否加入伙伴
-	getShareUser xweb.Mapper `xweb:"/partner/getShareUser"` //获取最新1000个用户头像和昵称(介绍页用)
+	sendMessage    xweb.Mapper `xweb:"/partner/sendMessage"`    //发短信
+	addPartner     xweb.Mapper `xweb:"/partner/addPartner"`     //加入伙伴
+	echoInfo       xweb.Mapper `xweb:"/partner/echoInfo"`       //回显信息
+	isPartner      xweb.Mapper `xweb:"/partner/isPartner"`      //是否加入伙伴
+	getShareUser   xweb.Mapper `xweb:"/partner/getShareUser"`   //获取最新1000个用户头像和昵称(介绍页用)
+	partnerInfo    xweb.Mapper `xweb:"/partner/partnerInfo"`    //回显用户详情
+	enterInfo      xweb.Mapper `xweb:"/partner/enterInfo"`      //审核通过,用户确定状态修改
+	reapplyPartner xweb.Mapper `xweb:"/partner/reapplyPartner"` //重新申请加入伙伴
 }
 
 func init() {
@@ -51,16 +54,18 @@ func (p *Partner) SendMessage() {
 
 //加入伙伴
 func (p *Partner) AddPartner() {
-	if !R.CheckReqParam(p.ResponseWriter, p.Request, "phone", "email", "type", "channel") {
+	if !R.CheckReqParam(p.ResponseWriter, p.Request, "phone", "email", "type", "channel", "contacts") {
 		return
 	}
 	status, msg := func() (int, string) {
 		userid := qu.ObjToString(p.GetSession("userId"))
+		//userid := "5f3391b8e138236a19cc2f67"
 		if userid == "" {
 			return -1, "未登录"
 		}
 		phone := p.GetString("phone")
 		mail := p.GetString("email")
+		contacts := p.GetString("contacts")
 		if !jy.IsPhone(phone) || !jy.IsEmail(mail) {
 			return -1, "手机号或邮箱正则校验失败"
 		}
@@ -71,10 +76,13 @@ func (p *Partner) AddPartner() {
 		} else if Mysql.Count("dis_partner", map[string]interface{}{"email": mail}) > 0 {
 			return -1, "该邮箱已加入合作伙伴"
 		}
+		log.Println("code:",p.GetString("code"))
 		send_phone := jy.CheckPhoneIdent(p.Session(), p.GetString("code")) //验证码不正确
+		log.Println("send_phone:",send_phone)
 		if send_phone == "" {
 			user_phone := ""
 			u, ok := MQFW.FindById("user", userid, `{"s_phone":1,"s_m_phone":1,"s_myemail":1}`)
+			log.Println("user:",u,ok)
 			if ok && u != nil && *u != nil {
 				if s_phone, _ := (*u)["s_phone"].(string); s_phone != "" {
 					user_phone = s_phone
@@ -82,6 +90,8 @@ func (p *Partner) AddPartner() {
 					user_phone = s_m_phone
 				}
 			}
+			log.Println("phone:",phone)
+			log.Println("user_phone:",user_phone)
 			if phone != user_phone {
 				return -1, "验证码错误"
 			}
@@ -117,6 +127,10 @@ func (p *Partner) AddPartner() {
 			islogoff, auth_status := isLogOffUser(userid)
 			name, idcard := "", ""
 			log.Println("是否是注销后的用户:", islogoff, "认证状态:", auth_status)
+			is_adopt := 0
+			if typ == 1 {
+				is_adopt = 1
+			}
 			insert := map[string]interface{}{
 				"type":          typ,
 				"phone":         phone,
@@ -126,6 +140,8 @@ func (p *Partner) AddPartner() {
 				"auth_status":   qu.If(typ == 2, 1, auth_status), //认证状态
 				"createtime":    time.Now().Format(qu.Date_Full_Layout),
 				"lastlogintime": time.Now().Format(qu.Date_Full_Layout),
+				"contacts":      contacts,
+				"is_adopt":      is_adopt,
 			}
 			if islogoff {
 				name, idcard = getLogOffInfo(userid)
@@ -154,9 +170,11 @@ func (p *Partner) AddPartner() {
 					"email":         mail,
 					"channel":       channel,
 					"uid":           userid,
+					"is_adopt":      is_adopt,
 					"auth_status":   qu.If(typ == 2, 1, auth_status), //认证状态
 					"createtime":    time.Now().Format(qu.Date_Full_Layout),
 					"lastlogintime": time.Now().Format(qu.Date_Full_Layout),
+					"contacts":      contacts,
 				}
 				fool := Mysql.UpdateByTx(tx, "dis_partner", query, inserts) //伙伴表
 				if !fool {
@@ -316,3 +334,187 @@ func getLogOffInfo(userid string) (name, idcard string) {
 	}
 	return "", ""
 }
+
+//用户状态及详情数据
+func (p *Partner) PartnerInfo() {
+	info, msg, code := func() (map[string]interface{}, string, int) {
+		data := map[string]interface{}{}
+		userid := qu.ObjToString(p.GetSession("userId"))
+		//userid := "5f3391b8e138236a19cc2f67"
+		if userid == "" {
+			return data, "未登录", Error_code
+		}
+		partner := Mysql.SelectBySql("SELECT dp.id,dp.is_adopt,dp.name,dp.contacts,dp.phone,dp.email,dp.type,dp.channel,dp.reason,dp.proving,da.name AS authName,da.license FROM dis_partner dp LEFT JOIN dis_auth da ON dp.id = da.partner_id WHERE dp.uid = ? ", userid)
+		if partner == nil {
+			return data, "用户并未加入伙伴", Error_code
+		}
+		if len(*partner) > 0 {
+			data["id"] = (*partner)[0]["id"]
+			data["is_adopt"] = (*partner)[0]["is_adopt"]
+			data["name"] = (*partner)[0]["name"]
+			data["phone"] = (*partner)[0]["phone"]
+			data["email"] = (*partner)[0]["email"]
+			data["type"] = (*partner)[0]["type"]
+			data["channel"] = (*partner)[0]["channel"]
+			data["authName"] = (*partner)[0]["authName"]
+			data["license"] = (*partner)[0]["license"]
+			data["reason"] = (*partner)[0]["reason"]
+			data["proving"] = (*partner)[0]["proving"]
+			data["contacts"] = (*partner)[0]["contacts"]
+		}
+
+		return data, "", Error_code
+	}()
+	p.ServeJson(Result{
+		Error_code: code,
+		Error_msg:  msg,
+		Data:       info,
+	})
+}
+
+//用户确认状态
+func (p *Partner) EnterInfo() {
+	userid, _ := p.GetSession("userId").(string)
+	//userid := "60ebf22a968b13f0bbe28260"
+	if userid == "" {
+		p.ServeJson(map[string]interface{}{"status": false, "message": "未登录"})
+		return
+	}
+	update := Mysql.UpdateOrDeleteBySql(`UPDATE dis_partner SET proving = 1 WHERE uid = ? `, userid)
+	if update < 0 {
+		log.Println("修改最后登录时间出错", userid)
+		p.ServeJson(map[string]interface{}{"status": false, "message": "修改失败"})
+		return
+	}
+	p.ServeJson(map[string]interface{}{
+		"status":  true,
+		"message": "",
+	})
+}
+
+//重新申请认证
+func (p *Partner) ReapplyPartner() {
+	if !R.CheckReqParam(p.ResponseWriter, p.Request, "phone", "email", "channel", "license", "entname", "contacts") {
+		return
+	}
+	status, msg := func() (int, string) {
+		userid := qu.ObjToString(p.GetSession("userId"))
+		//userid := "60ebf22a968b13f0bbe28260"
+		if userid == "" {
+			return -1, "未登录"
+		}
+		phone := p.GetString("phone")
+		mail := p.GetString("email")
+		contacts := p.GetString("contacts")
+		if !jy.IsPhone(phone) || !jy.IsEmail(mail) {
+			return -1, "手机号或邮箱正则校验失败"
+		}
+		//判断是否是当前账户手机号及邮箱
+		phoneData := Mysql.FindOne("dis_partner", map[string]interface{}{"phone": phone}, "uid", "")
+		if phoneData != nil {
+			if len(*phoneData) > 0 {
+				if (*phoneData)["uid"] != userid {
+					return -1, "该手机号已加入合作伙伴"
+				}
+			}else{
+				send_phone := jy.CheckPhoneIdent(p.Session(), p.GetString("code")) //验证码不正确
+				if send_phone == "" {
+					user_phone := ""
+					u, ok := MQFW.FindById("user", userid, `{"s_phone":1,"s_m_phone":1,"s_myemail":1}`)
+					if ok && u != nil && *u != nil {
+						if s_phone, _ := (*u)["s_phone"].(string); s_phone != "" {
+							user_phone = s_phone
+						} else if s_m_phone, _ := (*u)["s_m_phone"].(string); s_m_phone != "" {
+							user_phone = s_m_phone
+						}
+					}
+					if phone != user_phone {
+						return -1, "验证码错误"
+					}
+				}
+			}
+		}else{
+			send_phone := jy.CheckPhoneIdent(p.Session(), p.GetString("code")) //验证码不正确
+			if send_phone == "" {
+				user_phone := ""
+				u, ok := MQFW.FindById("user", userid, `{"s_phone":1,"s_m_phone":1,"s_myemail":1}`)
+				if ok && u != nil && *u != nil {
+					if s_phone, _ := (*u)["s_phone"].(string); s_phone != "" {
+						user_phone = s_phone
+					} else if s_m_phone, _ := (*u)["s_m_phone"].(string); s_m_phone != "" {
+						user_phone = s_m_phone
+					}
+				}
+				if phone != user_phone {
+					return -1, "验证码错误"
+				}
+			}
+		}
+		mailData := Mysql.FindOne("dis_partner", map[string]interface{}{"email": mail}, "uid", "")
+		if mailData != nil {
+			if len(*mailData) > 0 && (*mailData)["uid"] != userid {
+				return -1, "该邮箱已加入合作伙伴"
+			}
+		}
+
+		channel := p.GetString("channel")
+		license := "" //营业执照地址
+		if p.GetString("entname") == "" || p.GetString("license") == "" {
+			return -1, "缺少参数"
+		}
+		account := Mysql.FindOne("dis_partner", map[string]interface{}{
+			"uid": userid,
+		}, `id,type`, "")
+
+		authData := Mysql.FindOne("dis_auth", map[string]interface{}{"name": p.GetString("entname")}, "partner_id", "")
+		if authData != nil {
+			if len(*authData) > 0 && (*authData)["partner_id"] != (*account)["id"] {
+				return -1, "该企业已加入合作伙伴"
+			}
+		}
+
+		//如果是企业伙伴 直接进行认证
+		license = p.GetString("license")
+		if license == "" {
+			return -1, "未找到上传的图片"
+		}
+
+		//入库
+		if Mysql.ExecTx("加入伙伴", func(tx *sql.Tx) bool {
+			query := map[string]interface{}{
+				"uid": userid,
+			}
+			inserts := map[string]interface{}{
+				"phone":    phone,
+				"name":     p.GetString("entname"),
+				"email":    mail,
+				"channel":  channel,
+				"contacts": contacts,
+				"is_adopt": 0,
+			}
+			fool := Mysql.UpdateByTx(tx, "dis_partner", query, inserts) //伙伴表
+			if fool {
+				queryAuth := map[string]interface{}{
+					"partner_id": (*account)["id"],
+				}
+				update_auth := map[string]interface{}{
+					"license": license,
+					"name":    p.GetString("entname"),
+				}
+				fool2 := Mysql.UpdateByTx(tx, "dis_auth", queryAuth, update_auth) //认证表
+				if fool2 {
+					return true
+				}
+			}
+			return false
+		}) {
+			return 1, ""
+		}
+		return -1, "保存失败"
+	}()
+	p.ServeJson(Result{
+		Error_code: Error_code,
+		Error_msg:  msg,
+		Data:       M{"status": status},
+	})
+}

+ 15 - 8
src/jfw/modules/distribution/src/service/action/share.go

@@ -53,11 +53,20 @@ func (this *Share) ProductInfo() error {
 		userId, _ := this.Session().Get("userId").(string)
 		//userId := "5c89fead1c298a4d75fef39e"
 		if userId != "" {
-			if p_data, ok := MQFW.Find("dis_product", `{"s_status":1}`, `{"l_createdate":1}`, nil, false, -1, -1); ok && p_data != nil {
+			partner := Mysql.SelectBySql("SELECT type from dis_partner  WHERE uid = ? ", userId)
+			p_data, ok := MQFW.Find("dis_product", `{"s_status":1,"model":1}`, `{"l_createdate":1}`, nil, false, -1, -1);
+			if (fmt.Sprint((*partner)[0]["type"])) == "2" {
+				p_data, ok = MQFW.Find("dis_product", `{"s_status":1,"model":2}`, `{"l_createdate":1}`, nil, false, -1, -1);
+			}
+			if ok && p_data != nil {
 				//个人累计数据
 				dis_res := *Mysql.SelectBySql("SELECT DISTINCT a.product_name,SUM(a.sale_money) AS t_sale,SUM(a.commission) AS t_com,COUNT(a.product_name) AS t_count FROM dis_sale a  WHERE a.uid = '" + userId + "'  GROUP BY a.product_name")
-				for _, v := range *p_data {
+				for key, v := range *p_data {
 					delete(v, "_id")
+					if (v["s_name"]=="超级订阅企业版"){
+						v["s_name"]="超级订阅"
+						(*p_data)[key]["s_name"]="超级订阅"
+					}
 					for _, dv := range dis_res {
 						if dv["product_name"] == v["s_name"].(string) {
 							v["t_sale"] = util.IntAll(dv["t_sale"])   //销售金额
@@ -95,14 +104,13 @@ func (this *Share) LinkShare(discored string) error {
 	//userId := "5c89fead1c298a4d75fef39e"
 
 	_, url, _, _ := analyseWord(discored, userId)
-	log.Println("获取三级页面地址:",url)
+	log.Println("获取三级页面地址:", url)
 	return this.Redirect(url)
 }
 
 //分析口令
 func analyseWord(discored, userId string) (name, url, appUrl, shareNickname string) {
-
-	log.Println("分析口令传入参数",discored)
+	log.Println("分析口令传入参数", discored)
 	//指令第一个字母
 	encry := discored[:1]
 	//模块  A:超级订阅  B:数据导出  C:数据报告等  D公告信息 _SX三天有效
@@ -208,7 +216,7 @@ func CopyInfo(discored, userId string) (res map[string]interface{}) {
 		if (suffix == suffix_msgt) {
 			appUrl = "/jyapp" + appUrl
 		}
-		log.Println("需要打开页面地址:"+appUrl)
+		log.Println("需要打开页面地址:" + appUrl)
 		res = map[string]interface{}{
 			"title":     fmt.Sprintf(Sysconfig.Modular["title"].(string), shareNickname), //标题
 			"subTitle":  fmt.Sprintf(Sysconfig.Modular["subTitle"].(string), name),       //副标题
@@ -251,13 +259,13 @@ func (this *Share) GetOtherWordShare() {
 							"email":         0,
 							"channel":       "微信",
 							"uid":           userId,
+							"is_adopt":      1,
 							"auth_status":   0, //认证状态
 							"createtime":    time.Now().Format(qu.Date_Full_Layout),
 							"lastlogintime": time.Now().Format(qu.Date_Full_Layout),
 						}
 						insert_1 = Mysql.InsertByTx(tx, "dis_partner", insert) //伙伴表
 						log.Println("插入伙伴计划", insert_1)
-
 						partner_user = Mysql.CountBySql(`select count(*) from account where uid=?`, userId) > 0
 						if (!partner_user) {
 							insert_3 = Mysql.InsertByTx(tx, "account", map[string]interface{}{ //个人账户表
@@ -408,4 +416,3 @@ func (this *Share) ShareLogs() {
 		log.Println(this.GetSession("userId"), msg)
 	}
 }
-

+ 31 - 6
src/jfw/modules/subscribepay/src/entity/distribution.go

@@ -8,6 +8,7 @@ import (
 	"pay"
 	qutil "qfw/util"
 	"qfw/util/redis"
+	"strconv"
 	"strings"
 	"time"
 	"util"
@@ -20,15 +21,31 @@ func DisWordRecode(order_id, sale_money int, product_name, disWord string) {
 	if redisDis != "" {
 		//分销者id
 		shareUId := strings.Split(redisDis, "##")[1]
+		/*//查询用户是企业还是个人账户
+		parentList := util.Mysql.SelectBySql("select  * from  dis_partner where uid=? ", shareUId)
+		parentType := 1
+		if len(*parentList) > 0 {
+			parentTypeInt, _ := strconv.Atoi(fmt.Sprint((*parentList)[0]["type"]))
+			parentType = parentTypeInt
+		}*/
+		//if (parentType == 2) {
+		//	return
+		//}
 		//查询产品信息   获取  rate 佣金比例
 		var c_rate float64 = 0
 		if p_data, ok := util.MQFW.Find("dis_product", nil, `{"l_createdate":1}`, nil, false, -1, -1); ok && p_data != nil {
+
 			for _, v := range *p_data {
+				fmt.Println(v)
 				if product_name == qutil.ObjToString(v["s_name"]) {
 					c_rate = qutil.Float64All(v["f_rate"])
 				}
 			}
 		}
+		if product_name=="超级订阅企业版" {
+			product_name="超级订阅"
+		}
+		fmt.Println("佣金比例:",fmt.Sprint(c_rate))
 		//四舍五入 取整
 		c_money_f := float64(sale_money) * c_rate
 		c_money_i := int(qutil.RetainDecimal(c_money_f, 0))
@@ -50,7 +67,7 @@ func DisWordRecode(order_id, sale_money int, product_name, disWord string) {
 			//个人账户更新
 			p_count := util.Mysql.UpdateOrDeleteBySql("UPDATE account a SET a.dis_sales = a.dis_sales+? , a.dis_order = a.dis_order+1 , a.dis_commission=a.dis_commission+? WHERE a.uid = ?", sale_money, c_money_i, shareUId)
 
-			util.MsgRemind.DistributionSuccess(order_id, shareUId,c_money_i,product_name)
+			util.MsgRemind.DistributionSuccess(order_id, shareUId, c_money_i, product_name)
 			return s_count > 0 && p_count > 0
 		}) {
 			log.Println("分销记录和个人账户统计 错误:", shareUId, "-佣金单号:", code)
@@ -59,9 +76,19 @@ func DisWordRecode(order_id, sale_money int, product_name, disWord string) {
 		log.Println("保存分销记录出错:", order_id)
 	}
 }
-func OtherDisWordRecode(order_id, sale_money int, product_name, disWord,userId,creatTime string) {
+func OtherDisWordRecode(order_id, sale_money int, product_name, disWord, userId, creatTime string) {
 	//redis 获取分销者信息
-	infoList := util.Mysql.SelectBySql("select  * from  dis_word where userId=? and  password =? ",userId,disWord)
+	//查询用户是企业还是个人账户
+	parentList := util.Mysql.SelectBySql("select  * from  dis_partner where uid=? ", userId)
+	parentType := 1
+	if len(*parentList) > 0 {
+		parentTypeInt, _ := strconv.Atoi(fmt.Sprint((*parentList)[0]["type"]))
+		parentType = parentTypeInt
+	}
+	if (parentType == 2) {
+		return
+	}
+	infoList := util.Mysql.SelectBySql("select  * from  dis_word where userId=? and  password =? ", userId, disWord)
 	if len(*infoList) != 0 {
 		//分销者id
 		shareUId := fmt.Sprint((*infoList)[0]["belong_userid"])
@@ -85,9 +112,7 @@ func OtherDisWordRecode(order_id, sale_money int, product_name, disWord,userId,c
 			//个人账户更新
 			p_count := util.Mysql.UpdateOrDeleteBySql("UPDATE account a SET a.dis_sales = a.dis_sales+? , a.dis_order = a.dis_order+1 , a.dis_commission=a.dis_commission+? WHERE a.uid = ?", sale_money, c_money_i, shareUId)
 
-			util.MsgRemind.DistributionSuccess(order_id, shareUId,c_money_i,product_name)
-
-
+			util.MsgRemind.DistributionSuccess(order_id, shareUId, c_money_i, product_name)
 			return s_count > 0 && p_count > 0
 		}) {
 			log.Println("分销记录和个人账户统计 错误:", shareUId, "-佣金单号:", code)

+ 5 - 1
src/jfw/modules/subscribepay/src/entity/subscribeVip.go

@@ -209,8 +209,12 @@ func (this *vipSubscribeStruct) PayCallBack(param *CallBackParam) bool {
 			suffix := dis_word[len(dis_word)-3 : len(dis_word)]
 			if suffix == suffix_msgt {
 				go OtherDisWordRecode(qutil.IntAll((*orderdata)["id"]), qutil.IntAll((*orderdata)["order_money"]), "超级订阅", dis_word, qutil.ObjToString((*orderdata)["user_id"]), qutil.ObjToString((*orderdata)["create_time"]))
-			} else {
+			} else  if suffix=="_GX"{
+				go DisWordRecode(qutil.IntAll((*orderdata)["id"]), qutil.IntAll((*orderdata)["order_money"]), "超级订阅企业版", dis_word)
+
+			}else{
 				go DisWordRecode(qutil.IntAll((*orderdata)["id"]), qutil.IntAll((*orderdata)["order_money"]), "超级订阅", dis_word)
+
 			}
 		}
 		//卡卷使用

+ 1 - 1
src/jfw/modules/subscribepay/src/main.go

@@ -33,7 +33,7 @@ func main() {
 		rpc.HandleHTTP()
 		// err := http.ListenAndServe(":"+Config.Webrpcport, nil)
 		// if err != nil {
-		// 	log.Println("ListenAndServe: ", err)
+		//   log.Println("ListenAndServe: ", err)
 		// }
 		err := endless.ListenAndServe(":"+Config.Webrpcport, nil, func() {})
 		if err != nil {

+ 2 - 3
src/jfw/modules/subscribepay/src/service/dataExportPay.go

@@ -6,7 +6,6 @@ import (
 	"config"
 	"fmt"
 	"qfw/util/dataexport"
-
 	"qfw/util/jy"
 	"qfw/util/redis"
 
@@ -122,13 +121,14 @@ func (p *DataExportPay) CreateOrder() {
 				start_time := TimeProcessing(time.Now().Format(DateFullLayout), -config.Config.TermValidity).Format(DateFullLayout)
 				stop_time := TimeProcessing(time.Now().Format(DateFullLayout), config.Config.TermValidity).Format(DateFullLayout)
 				infoList := util.Mysql.SelectBySql("select  * from  dis_word where userId=?  and  ?<=start_time  and stop_time<? ORDER BY id ", userId, start_time, stop_time)
-				if len(*infoList) != 0 {
+				if len(*infoList) > 0 {
 					disWord = fmt.Sprint((*infoList)[0]["password"])
 				}
 			}
 			delete(*userfilter, "selectIds")
 			filterByte, _ := json.Marshal(userfilter)
 			filter = string(filterByte)
+
 		} else {
 			log.Println("id is not find in mongodb", userId, id)
 			return false
@@ -154,7 +154,6 @@ func (p *DataExportPay) CreateOrder() {
 			}
 		}
 		log.Println(userLotteryId, "--discount_price:", discount_price)
-
 		ordercode := pay.GetOrderCode(openId)
 		download_url := util.GetExcelFilePath(ordercode)
 		go func() {

+ 24 - 8
src/jfw/modules/subscribepay/src/service/vipSubscribeChange.go

@@ -133,7 +133,6 @@ func (this *SubscribeChange) Upgrade() {
 		date_count, date_unit, needRenew := 0, 0, false
 		endUnix := qutil.Int64All((*rData)["l_vip_endtime"])
 		startUnix := qutil.Int64All((*rData)["l_vip_starttime"])
-
 		if timeRenew != "" {
 			var err error
 			date_count, date_unit, err = checkReqDate(timeRenew)
@@ -148,7 +147,7 @@ func (this *SubscribeChange) Upgrade() {
 			}
 			needRenew = true
 		}
-		area_select := true                     //是否回显城市选择
+		area_select := true //是否回显城市选择
 		if len(*area) == 0 && area_count != 0 { //升级时为传入选择省份
 			(*area)["areacount"] = area_count
 			area_select = false
@@ -234,12 +233,29 @@ func (this *SubscribeChange) Upgrade() {
 			return &entity.FuncResult{false, errors.New("订单数据生成异常"), nil}
 		}
 		disWord := ""
+		//查询用户是否有分销链接
+		disWordStr := ""
+		userfilter, ok := util.MQFW.FindById("user", userId, "")
+		if ok && userfilter != nil {
+			startTime := qutil.Int64All((*userfilter)["startTime"])
+			endTime := qutil.Int64All((*userfilter)["endTime"])
+			if startTime != 0 {
+				if startTime <= time.Now().Unix() && endTime >= time.Now().Unix() {
+					disWordStr = qutil.ObjToString((*userfilter)["disWords"])
+				}
+			}
+		}
+		if disWordStr != "" {
+			disWord = disWordStr
+		}
 		ordercode := pay.GetOrderCode(userId)
-		start_time := TimeProcessing(time.Now().Format(DateFullLayout), -config.Config.TermValidity).Format(DateFullLayout)
-		stop_time := TimeProcessing(time.Now().Format(DateFullLayout), config.Config.TermValidity).Format(DateFullLayout)
-		infoList := util.Mysql.SelectBySql("select  * from  dis_word where userId=?  and  ?<=start_time  and stop_time<? ORDER BY id ", userId, start_time, stop_time)
-		if len(*infoList) != 0 {
-			disWord = fmt.Sprint((*infoList)[0]["password"])
+		if (disWord == "") {
+			start_time := TimeProcessing(time.Now().Format(DateFullLayout), -config.Config.TermValidity).Format(DateFullLayout)
+			stop_time := TimeProcessing(time.Now().Format(DateFullLayout), config.Config.TermValidity).Format(DateFullLayout)
+			infoList := util.Mysql.SelectBySql("select  * from  dis_word where userId=?  and  ?<=start_time  and stop_time<? ORDER BY id ", userId, start_time, stop_time)
+			if len(*infoList) != 0 {
+				disWord = fmt.Sprint((*infoList)[0]["password"])
+			}
 		}
 		insertMap := map[string]interface{}{
 			"order_money":    final_price,
@@ -434,7 +450,7 @@ func needUpgrade(newBuySet, oldBuySet *entity.SubvipBuySet) bool {
 						UpgradeBuyset.AreaCount = newBuySet.AreaCount
 					}
 					del_2_flag, del_1_flag := 0, 0 //被占用
-					if c_2_diff < 0 {              //有两个城市的名额未使用完
+					if c_2_diff < 0 { //有两个城市的名额未使用完
 						if p_Diff > 0 {
 							//转移给一个省使用
 							if c_2_diff+p_Diff > 0 {

+ 59 - 3
src/jfw/modules/subscribepay/src/service/vipSubscribePay.go

@@ -66,9 +66,36 @@ func (this *SubVipPayOrder) CreateOrder() {
 		orderType, _ := this.GetInteger("orderType") //1 简单付费,5 升降级续费
 		openId := qutil.ObjToString(this.GetSession("s_m_openid"))
 		disWord := this.GetString("disWord")
+		if disWord != "" {
+			if len(strings.Split(disWord, "_")) > 1 {
+				if fmt.Sprint(strings.Split(disWord, "_")[1]) == "GX" {
+					userfilter, ok := util.MQFW.FindById("user", userId, "")
+					if ok && userfilter != nil {
+						dis := qutil.ObjToString((*userfilter)["disWords"])
+						if (dis != disWord) {
+							disWord = ""
+						}
+					}
+				}
+			}
+		}
+		//查询用户是否有分销链接
+		disWordStr := ""
+		userfilter, ok := util.MQFW.FindById("user", userId, "")
+		if ok && userfilter != nil {
+			startTime := qutil.Int64All((*userfilter)["startTime"])
+			endTime := qutil.Int64All((*userfilter)["endTime"])
+			if startTime != 0 {
+				if startTime <= time.Now().Unix() && endTime >= time.Now().Unix() {
+					disWordStr = qutil.ObjToString((*userfilter)["disWords"])
+				}
+			}
+		}
+		if disWordStr != "" {
+			disWord = disWordStr
+		}
 		req_price, _ := this.GetInteger("price")     //前端展示金额
 		order_phone := this.GetString("order_phone") //p19.3用户信息采集 手机号
-
 		if disWord == "" {
 			start_time := TimeProcessing(time.Now().Format(DateFullLayout), -config.Config.TermValidity).Format(DateFullLayout)
 			stop_time := TimeProcessing(time.Now().Format(DateFullLayout), config.Config.TermValidity).Format(DateFullLayout)
@@ -78,9 +105,7 @@ func (this *SubVipPayOrder) CreateOrder() {
 			}
 		}
 		now := time.Now()
-
 		userData, oldBuyset, _ := entity.JyVipSubStruct.GetVipDetail(userId)
-
 		pass := func() bool { //校验订单是否合法
 			if orderType == 1 {
 				vipStatus := qutil.IntAll((*userData)["i_vip_status"])
@@ -222,14 +247,45 @@ func (this *SubVipPayOrder) Renew() {
 		disWord := this.GetString("disWord")
 		openId := qutil.ObjToString(this.GetSession("s_m_openid"))
 		req_price, _ := this.GetInteger("price") //前端展示金额
+		if disWord != "" {
+			if len(strings.Split(disWord, "_")) > 1 {
+				if fmt.Sprint(strings.Split(disWord, "_")[1]) == "GX" {
+					userfilter, ok := util.MQFW.FindById("user", userId, "")
+					if ok && userfilter != nil {
+						dis := qutil.ObjToString((*userfilter)["disWords"])
+						if (dis != disWord) {
+							disWord = ""
+						}
+					}
+				}
+			}
+		}
+		//查询用户是否有分销链接、
+		disWordStr := ""
+		userfilter, ok := util.MQFW.FindById("user", userId, "")
+		if ok && userfilter != nil {
+			startTime := qutil.Int64All((*userfilter)["startTime"])
+			endTime := qutil.Int64All((*userfilter)["endTime"])
+			if startTime != 0 {
+				if startTime <= time.Now().Unix() && endTime >= time.Now().Unix() {
+					disWordStr = qutil.ObjToString((*userfilter)["disWords"])
+				}
+			}
+		}
+		if disWordStr != "" {
+			disWord = disWordStr
+		}
 		if disWord == "" {
 			start_time := TimeProcessing(time.Now().Format(DateFullLayout), -config.Config.TermValidity).Format(DateFullLayout)
 			stop_time := TimeProcessing(time.Now().Format(DateFullLayout), config.Config.TermValidity).Format(DateFullLayout)
 			infoList := util.Mysql.SelectBySql("select  * from  dis_word where userId=? and  ?<=start_time  and stop_time<? ORDER BY id ", userId, start_time, stop_time)
+			fmt.Println("select  * from  dis_word where userId=? and  ?<=start_time  and stop_time<? ORDER BY id ", userId, start_time, stop_time)
+			fmt.Println("disWordStr4:", infoList)
 			if len(*infoList) != 0 {
 				disWord = fmt.Sprint((*infoList)[0]["password"])
 			}
 		}
+		fmt.Println("disWordStr3:", disWord)
 		now := time.Now()
 		date_count, date_unit, err := checkReqDate(this.GetString("time"))
 		if err != nil {

+ 27 - 22
src/jfw/modules/weixin/src/distribution.json

@@ -1,24 +1,29 @@
 {
-	"modular":{
-    	"A":{
-			"name":"你身边的人都在用剑鱼标讯【超级订阅】找商机就差你了!<a href='%s'>立即点击</a>,快速获取全国招标项目!",
-			"url":"/F/%s"
-			},
-    	"B":{
-			"name":"用剑鱼标讯【数据导出】彻底透视你的行业、客户、竞争对手!<a href='%s'>立即点击</a>,直接使用!",
-			"url":"/F/%s"
-			},
-    	"C":{
-			"name":"独家【数据报告】,为你深度洞察各领域的业绩增长点!<a href='%s'>立即点击</a>, 即可获取!",
-			"url":"/F/%s"
-			},
-    	"D":{
-			"name":"<a href='%s'>线上课程</a>",
-			"url":"/F/%s"
-			},
-		"X":{
-			"name":" 5000+万条招标信息免费看,不遮挡!<a href='%s'>立即点击</a>,你身边的人都在悄悄用剑鱼标讯找商机!",
-			"url":"/X/%s"
-		}
-	}
+
+  "modular": {
+    "A": {
+      "name": "你身边的人都在用剑鱼标讯【超级订阅】找商机就差你了!<a href='%s'>立即点击</a>,快速获取全国招标项目!",
+      "url": "/F/%s"
+    },
+    "B": {
+      "name": "用剑鱼标讯【数据导出】彻底透视你的行业、客户、竞争对手!<a href='%s'>立即点击</a>,直接使用!",
+      "url": "/F/%s"
+    },
+    "C": {
+      "name": "独家【数据报告】,为你深度洞察各领域的业绩增长点!<a href='%s'>立即点击</a>, 即可获取!",
+      "url": "/F/%s"
+    },
+    "D": {
+      "name": "<a href='%s'>线上课程</a>",
+      "url": "/F/%s"
+    },
+    "X": {
+      "name": " 5000+万条招标信息免费看,不遮挡!<a href='%s'>立即点击</a>,你身边的人都在悄悄用剑鱼标讯找商机!",
+      "url": "/X/%s"
+    },
+    "G": {
+      "name": "你身边的人都在用剑鱼标讯【超级订阅】找商机就差你了!<a href='%s'>立即点击</a>,快速获取全国招标项目!",
+      "url": "/G/%s"
+    }
+  }
 }

+ 34 - 0
src/jfw/modules/weixin/src/wx/wx.go

@@ -408,6 +408,23 @@ func saveUser(u *UserInfo, source, pre, RSource, CSource string) (bool, string,
 		newUser["s_province"] = u.Province
 		newUser["s_city"] = u.City
 		newUser["i_applystatus"] = 1
+		if len(strings.Split(source, "_")) >2 {
+			if (strings.Split(source, "_")[2] == "GX") {
+				disStr := strings.Split(source, "_")[0] + "_" + strings.Split(source, "_")[1][1:] + "_" + strings.Split(source, "_")[2]
+				log.Println("disStr", disStr)
+				diswordStr := redis.Get("other", disStr)
+				log.Println("diswordStr", diswordStr)
+				startTime := ""
+				if diswordStr != nil {
+					startTime = strings.Split(fmt.Sprint(diswordStr), "##")[2]
+				}
+				startTimeInt64, _ := strconv.ParseInt(startTime, 10, 64)
+				newUser["startTime"] = startTimeInt64
+				endTime := time.Unix(startTimeInt64, 0)
+				newUser["endTime"] = endTime.AddDate(1, 0, 0).Unix()
+				newUser["disWords"] = strings.Split(source, "_")[1] + "_" + strings.Split(source, "_")[2]
+			}
+		}
 		if isJyopUser {
 			newUser["s_registersource"] = "openplatform"
 		}
@@ -896,6 +913,14 @@ func Subscribe(w ResponseWriter, r *Request) {
 		ek := strings.SplitN(r.EventKey, "_", 3)[2]
 		log.Println("ek:", ek)
 		encry := ek[:1]
+		if (len(strings.Split(ek, "_"))>1){
+			suffix := strings.Split(ek, "_")[1]
+			fmt.Println(r.EventKey, ek, suffix)
+			if suffix == "GX" {
+				encry = "G"
+			}
+		}
+
 		modular := util.ObjToMap(config.DistribConfig.Modular[encry])
 		if modular != nil {
 			url := fmt.Sprintf((*modular)["url"].(string), ek) //指令传输
@@ -1068,11 +1093,20 @@ func ScanHandler(w ResponseWriter, r *Request) {
 	if strings.Contains(r.EventKey, "DIS_") {
 		ek := strings.Split(r.EventKey, "_")[1]
 		encry := ek[:1]
+		if (len(strings.Split(r.EventKey, "_"))>2){
+			suffix := strings.Split(r.EventKey, "_")[2]
+			if suffix == "GX" {
+				encry = "G"
+			}
+		}
 		modular := util.ObjToMap(config.DistribConfig.Modular[encry])
 		if encry == "X" {
 			suffix := strings.Split(r.EventKey, "_")[2]
 			ek = ek + "_" + suffix
 		}
+		if encry == "G" {
+			ek = ek + "_GX"
+		}
 		fmt.Println(ek)
 		if modular != nil {
 			url := fmt.Sprintf((*modular)["url"].(string), ek) //指令传输

+ 3 - 3
src/web/staticres/common-module/ent-search/ent-search-template.js

@@ -716,12 +716,12 @@ var vMainSearchComponent = new Vue({
       {
         name: '最近30天',
         value: 'lately30',
-        selected: true
+        selected: false
       },
       {
         name: '最近一年',
         value: 'lastYear',
-        selected: false
+        selected: true
       }
     ],
       selectDate: {
@@ -836,7 +836,7 @@ var vMainSearchComponent = new Vue({
       conditionStrMap: {
         subtype: '',
         scope: '',
-        publishtime: 'lately-30',
+        publishtime: 'thisyear',
         selectType: '',
         minprice: '',
         maxprice: '',

+ 1 - 1
src/web/staticres/js/ent-search-index-pc.js

@@ -181,7 +181,7 @@ var vm = new Vue({
         tabActive: function (newVal, oldVal) {
             if (newVal === 'zb') {
                 if (this.searchContent) {
-                    location.href = '/jylab/supsearch/index.html?keywords=' + this.searchContent + '&publishtime=lately-30'
+                    location.href = '/jylab/supsearch/index.html?keywords=' + this.searchContent + '&publishtime=thisyear'
                 } else {
                     location.href = '/jylab/supsearch/index.html'
                 }

+ 2 - 2
src/web/staticres/js/wxSupersearch.js

@@ -113,7 +113,7 @@ var SuperSearch = {
     "searchvalue": "",
     "subtype": "",
     "scope": "",
-    "publishtime": "lately-30",
+    "publishtime": "thisyear",
     "selectType": "",
     "minprice":"",
     "maxprice":"",
@@ -782,7 +782,7 @@ var SuperSearch = {
       "searchvalue": "",
       "subtype": "",
       "scope": "",
-      "publishtime": "lately-30",
+      "publishtime": "thisyear",
       "selectType": "",
       "minprice":"",
       "maxprice":"",

+ 1 - 1
src/web/templates/_error.html

@@ -250,7 +250,7 @@ function seclectNavLi(el, $index) {
 				<div class='useronline' id="login" style="float:left;"></div>
 			</div>
 			<div class="search" style="display:none;">
-				<form method="post" action="/jylab/supsearch/index.html?publishtime=lately-30" id="zbSeatchIndex" style="position:relative;">
+				<form method="post" action="/jylab/supsearch/index.html?publishtime=thisyear" id="zbSeatchIndex" style="position:relative;">
 					<input class="ser" autocomplete="off"  type="text" name="keywords" placeholder="请输入您要查询的招标信息 " id="" value="" />
 					<input type="hidden" name="searchvalue">
 					<input class="btn" type="button" onclick="zbSeatch('zbSeatchIndex')" />

+ 1 - 1
src/web/templates/active/index_bak.html

@@ -22,7 +22,7 @@
 		<section id="index">
 			<h3 class="title">全国招标信息免费看,不遮挡</h3>
 			<div class="search">
-				<form method="post" action="/jylab/supsearch/index.html?publishtime=lately-30" id="zbSeatchIndex">
+				<form method="post" action="/jylab/supsearch/index.html?publishtime=thisyear" id="zbSeatchIndex">
 					<input class="ser" type="text"  name="keywords" placeholder="请输入您要查询的招标信息" id="" value="" />
 					<input type="hidden" name="searchvalue">
 					<input class="btn" type="button" onclick="zbSeatch('zbSeatchIndex')" />

+ 1 - 1
src/web/templates/active/topics.html

@@ -594,7 +594,7 @@ _czc.push(["_setAccount", "1261815924"]);
 			<div class='useronline' id="login" style="float:left;"></div>
 		</div>
 		<div class="search" style="display:none;">
-			<form method="post" action="/jylab/supsearch/index.html?publishtime=lately-30" id="zbSeatchIndex" style="position:relative;">
+			<form method="post" action="/jylab/supsearch/index.html?publishtime=thisyear" id="zbSeatchIndex" style="position:relative;">
 				<input class="ser" autocomplete="off"  type="text" name="keywords" placeholder="请输入您要查询的招标信息 " id="" value="" />
 				<input type="hidden" name="searchvalue">
 				<input class="btn" type="button" onclick="zbSeatch('zbSeatchIndex')" />

+ 2 - 2
src/web/templates/common/pcbottom.html

@@ -740,13 +740,13 @@ function zbsqClose(){
 //
 function areasearch(scope){
 		$("#bottomform").remove();
-		$(".j-bottom").append('<form id="bottomform" action="/jylab/supsearch/index.html?publishtime=lately-30" method="post" class="hide" ><input type="hidden" name="area" value="'+scope+'"></form>');
+		$(".j-bottom").append('<form id="bottomform" action="/jylab/supsearch/index.html?publishtime=thisyear" method="post" class="hide" ><input type="hidden" name="area" value="'+scope+'"></form>');
 		$("#bottomform").submit();
 }
 //
 function stypesearch(stype){
 		$("#bottomform").remove();
-		$(".j-bottom").append('<form id="bottomform" action="/jylab/supsearch/index.html?publishtime=lately-30" method="post" class="hide" ><input type="hidden" name="subtype" value="'+stype+'"></form>');
+		$(".j-bottom").append('<form id="bottomform" action="/jylab/supsearch/index.html?publishtime=thisyear" method="post" class="hide" ><input type="hidden" name="subtype" value="'+stype+'"></form>');
 		$("#bottomform").submit();
 }
 //

+ 1 - 1
src/web/templates/common/pchead.html

@@ -419,7 +419,7 @@
         </a>
         <div class="fl">
             <div class="search-box"  style="display: none;">
-                <form method="post" action="/jylab/supsearch/index.html?publishtime=lately-30" id="public_header">
+                <form method="post" action="/jylab/supsearch/index.html?publishtime=thisyear" id="public_header">
                     <input class="jynav-search" autocomplete="off" placeholder="请输入您想要查询的招标信息" value="" type="text" name="keywords" />
                     <input type="hidden" name="searchvalue">
                     <button class="public-nav-search" type="submit" onclick="zbSeatch('public_header')" ></button><i></i>

+ 1 - 1
src/web/templates/common/pchead_bak.html

@@ -3,7 +3,7 @@
 		<ul>
 			<li class="j-nav-logo" onclick="window.location.href='/'" style="width:120px;"><a><img src="{{Msg "seo" "cdn"}}/images/swordfish/sf_01_new.png"></a></li>
 				<li class="navigation">
-					<form method="post" action="/jylab/supsearch/index.html?publishtime=lately-30" id="zbSeatchIndex" style="position:relative;">
+					<form method="post" action="/jylab/supsearch/index.html?publishtime=thisyear" id="zbSeatchIndex" style="position:relative;">
 			            <span class="j-inputgroup">
 							<input class="nav-search" type="text" name="keywords" placeholder="请输入您要查询的招标信息" value="{{.T.keywords}}" />
 			<!--				<img src="{{Msg "seo" "cdn"}}/images/pc_20.png" class="j-clearicon" id="t-clear">-->

+ 1 - 1
src/web/templates/frontRouter/pc/squeeze/sess/test.html

@@ -121,7 +121,7 @@
 		<section id="index">
 			<h3 class="title">全国招标信息免费看,不遮挡</h3>
 			<div class="search">
-				<form method="post" action="/jylab/supsearch/index.html?publishtime=lately-30" id="zbIndex">
+				<form method="post" action="/jylab/supsearch/index.html?publishtime=thisyear" id="zbIndex">
 					<input class="ser" autocomplete="off"  type="text"  name="keywords" placeholder="请输入您要查询的招标信息" id="keywords" value="" />
 					<input type="hidden" name="searchvalue">
 					<input class="btn" type="button" onclick="zbSeatch('zbIndex')" />

+ 1 - 1
src/web/templates/pc/classifylist.html

@@ -450,7 +450,7 @@ function priceCss(){
 		<div class="w searchHeader-container">
 			<!--搜索-->
 			<div class="searchInput clearfix">
-				<form action="/jylab/supsearch/index.html?publishtime=lately-30" method="post"  id="zbSeatchT" class="clearfix" onsubmit="return beforeSubmit('F')">
+				<form action="/jylab/supsearch/index.html?publishtime=thisyear" method="post"  id="zbSeatchT" class="clearfix" onsubmit="return beforeSubmit('F')">
 					<input class="searchname" autocomplete="off" type="search" id="searchinput" value="{{.T.keywords}}" name="keywords" placeholder="高速公路" />
 					<img src="{{Msg "seo" "cdn"}}/images/pc_20.png" id="t-clear" class="j-clearicon" style="display: none;">
 					<input type="submit" value="搜索" />

+ 2 - 2
src/web/templates/pc/index.html

@@ -120,10 +120,10 @@
 		<section id="index">
 			<h3 class="title">全国招标信息免费看,不遮挡</h3>
 			<div class="search">
-				<form method="post" action="/jylab/supsearch/index.html?publishtime=lately-30" id="zbIndex">
+				<form method="post" action="/jylab/supsearch/index.html?publishtime=thisyear" id="zbIndex">
 					<input class="ser" autocomplete="off"  type="text" name="keywords" placeholder="请输入您想要查询的招标信息" id="keywords" value="" />
           <input type="hidden" name="searchvalue">
-          <input type="hidden" name="publishtime" value="lately-30">
+          <input type="hidden">
 					<input class="btn" type="button" onclick="zbSeatch('zbIndex')" />
 				</form>
         <div class="index_search_thikn">

+ 3 - 3
src/web/templates/pc/supsearch.html

@@ -266,7 +266,7 @@ function isPower () {
 }
 isPower()
 var areas = {{.T.area}}!=null?{{.T.area}}:"";
-var selectPublishtime = {{.T.publishtime}}?{{.T.publishtime}}:"lately-30";
+var selectPublishtime = {{.T.publishtime}}?{{.T.publishtime}}:"thisyear";
 var selectTimeslot = {{.T.timeslot}}!=null?{{.T.timeslot}}:"";
 var toptype = {{.T.toptype}}!=null?{{.T.toptype}}:"";
 var subtype = {{.T.subtype}}!=null?{{.T.subtype}}:"";
@@ -437,7 +437,7 @@ $(function(){
 			$(".timerInput").addClass("active");
 		}
 	} else {
-    $(".timer [data-value='lately-30']").addClass("active").siblings().removeClass('active');
+    $(".timer [data-value='thisyear']").addClass("active").siblings().removeClass('active');
   }
 	if(selectTimeslot != "" && selectTimeslot.indexOf("_") > -1){
 		$("#starttime").css({"border-color":"#2cb7ca"});
@@ -741,7 +741,7 @@ $(function(){
 		<div class="w searchHeader-container">
 			<!--搜索-->
 			<div class="searchInput clearfix">
-				<form action="/jylab/supsearch/index.html?publishtime=lately-30" method="post"  id="zbSeatchT" class="clearfix" onsubmit="return beforeSubmit('F')">
+				<form action="/jylab/supsearch/index.html?publishtime=thisyear" method="post"  id="zbSeatchT" class="clearfix" onsubmit="return beforeSubmit('F')">
 					<input class="searchname" autocomplete="off" type="search" id="searchinput" value="{{.T.keywords}}" name="keywords" placeholder="高速公路" />
 					<img src="{{Msg "seo" "cdn"}}/images/pc_20.png" id="t-clear" class="j-clearicon" style="display: none;">
 					<input type="button" value="搜索" onclick="zbSeatch('zbSeatchT')"/>