Pārlūkot izejas kodu

Merge branch 'dev_v4.10.9_wh' of qmx/jy into feature/v4.10.9

王浩 4 mēneši atpakaļ
vecāks
revīzija
712ec5adbf

+ 7 - 4
src/jfw/front/login.go

@@ -91,7 +91,9 @@ func (l *Login) Login() error {
 	if ckErr == nil {
 		channelCode = cc.Value
 	}
+
 	status, isLogin := func() (int, bool) {
+		source := l.GetString("source")
 		if reqType == "phoneLogin" { //手机号登录
 			phone := l.GetString("phone")
 			password := l.GetString("password")
@@ -183,7 +185,6 @@ func (l *Login) Login() error {
 						"s_regsource": "pc",
 						"s_platform":  "pc",
 						"s_sourceid":  channelCode,
-						"s_rsource":   channelCode,
 					}
 					//注册邮箱
 					email := l.GetString("email")
@@ -203,7 +204,7 @@ func (l *Login) Login() error {
 						data["s_newsource"] = ck.Value
 						data["s_module"] = GetModule(ck.Value) //根据cookie中记录的来源获取模块
 					}
-					source := l.GetString("source") //用户手机号用户记录百度统计
+
 					if source != "" {
 						data["s_tracksource"] = source
 					}
@@ -227,15 +228,17 @@ func (l *Login) Login() error {
 						if l.GetSession("RReferer") != nil && qutil.ObjToString(l.GetSession("RReferer")) != "" {
 							Rref = gconv.String(l.GetSession("RReferer"))
 						}
+						source = gconv.String(data["s_rsource"])
 						go jy.SaveUserLog(public.Mgo_Log,
 							_id,
 							phone,
 							"phone",
 							jutil.IsAndroidOrIOS(l.UserAgent()),
-							source,
+							"pc",
 							"",
 							Rref,
-							gconv.String(sessVal["RSource"]),
+							gconv.String(qutil.If(source != "", source,
+								l.GetSession("RSource"))),
 							qutil.GetIp(l.Request),
 							l.UserAgent(),
 							"jybx",

+ 22 - 19
src/jfw/front/org_structure.go

@@ -144,6 +144,7 @@ func (this *OrgStructure) AutoLogon() error {
 	phone := this.GetString("phone")
 	name := this.GetString("name")
 	mail := this.GetString("email")
+	source := this.GetString("source")
 	rb := false
 	if openId != "" && phone != "" {
 		//解密
@@ -168,6 +169,7 @@ func (this *OrgStructure) AutoLogon() error {
 				"l_registedate":    time.Now().Unix(),
 				"i_ts_guide":       2,
 				"s_platform":       "wx",
+				"s_rsource":        gconv.String(util.If(source != "", source, this.GetSession("RSource"))),
 				"o_jy": map[string]interface{}{
 					"s_email":      mail,
 					"i_apppush":    1,
@@ -197,25 +199,26 @@ func (this *OrgStructure) AutoLogon() error {
 			}); resp != nil && resp.Data.Id > 0 {
 				data["base_user_id"] = resp.Data.Id
 				if id := mongodb.Save("user", data); id != "" {
-                    referer := this.Refer()
-                    var Rref = this.GetString("rref")
-                    if this.GetSession("RReferer") != nil && util.ObjToString(this.GetSession("RReferer")) != "" {
-                        Rref = gconv.String(this.GetSession("RReferer"))
-                    }
-                    go jy.SaveUserLog(public.Mgo_Log,
-                        id,
-                        phone,
-                        "phone",
-                        jyutil.IsAndroidOrIOS(this.UserAgent()),
-                        source,
-                        openId,
-                        Rref,
-                        gconv.String(this.GetSession("RSource")),
-                        util.GetIp(this.Request),
-                        this.UserAgent(),
-                        "",
-                        "",
-                        referer)
+					referer := this.Refer()
+					var Rref = this.GetString("rref")
+					if this.GetSession("RReferer") != nil && util.ObjToString(this.GetSession("RReferer")) != "" {
+						Rref = gconv.String(this.GetSession("RReferer"))
+					}
+					go jy.SaveUserLog(public.Mgo_Log,
+						id,
+						phone,
+						"phone",
+						jyutil.IsAndroidOrIOS(this.UserAgent()),
+						"pc",
+						openId,
+						Rref,
+						gconv.String(util.If(source != "", source,
+							this.GetSession("RSource"))),
+						util.GetIp(this.Request),
+						this.UserAgent(),
+						"",
+						"",
+						referer)
 					nsqPath, _ := config.Sysconfig["nsq"].(string)
 					nsq_topic, _ := config.Sysconfig["nsq_topic"].(string)
 					jy.Publish(public.Mgo_Log, nsqPath, nsq_topic, "task", id, jy.Jyweb_node2, map[string]interface{}{

+ 11 - 8
src/jfw/front/otherAct.go

@@ -101,6 +101,7 @@ func (f *Front) Lpsubmit() error {
 			phoneNum := f.GetString("phoneNum")
 			cancode := f.GetString("cancode")
 			s_extcode = f.GetString("extcode")
+			source := f.GetString("source")
 			phone := util.ObjToString(f.GetSession("phoneNum").(string))
 			MsgCode := util.ObjToString(f.GetSession("MsgCode"))
 
@@ -133,11 +134,13 @@ func (f *Front) Lpsubmit() error {
 			}
 			data := map[string]interface{}{
 				//"i_type":        1, //手机注册
-				"i_appid":       2,
-				"i_ispush":      1,
-				"s_unique":      phoneNum,
-				"s_phone":       phoneNum,
-				"s_source":      "landPage",
+				"i_appid":  2,
+				"i_ispush": 1,
+				"s_unique": phoneNum,
+				"s_phone":  phoneNum,
+				"s_source": "landPage",
+				"s_rsource": gconv.String(util.If(source != "", source,
+					f.GetSession("RSource"))),
 				"s_extcode":     s_extcode,
 				"l_registedate": time.Now().Unix(),
 				"i_ts_guide":    2,
@@ -157,7 +160,6 @@ func (f *Front) Lpsubmit() error {
 			if _id != "" {
 				//用户日志保存
 				referer := f.Refer()
-				source := f.GetString("source")
 				var Rref = f.GetString("rref")
 				if f.GetSession("RReferer") != nil && util.ObjToString(f.GetSession("RReferer")) != "" {
 					Rref = gconv.String(f.GetSession("RReferer"))
@@ -167,10 +169,11 @@ func (f *Front) Lpsubmit() error {
 					phoneNum,
 					"phone",
 					jyutil.IsAndroidOrIOS(f.UserAgent()),
-					source,
+					"pc",
 					"",
 					Rref,
-					util.ObjToString(f.GetSession("RSource")),
+					gconv.String(util.If(source != "", source,
+						f.GetSession("RSource"))),
 					util.GetIp(f.Request),
 					f.UserAgent(),
 					"",

+ 18 - 15
src/jfw/front/pchelper.go

@@ -83,6 +83,7 @@ func (l *PcHelper) Login() error {
 	reNickname := ""
 	status := func() int {
 		reqType := l.GetString("reqType")
+		source := l.GetString("source")
 		if reqType == "phoneLogin" {
 			phone := l.GetString("phone")
 			password := l.GetString("password")
@@ -137,6 +138,8 @@ func (l *PcHelper) Login() error {
 								"l_modifydate": time.Now().Unix(),
 							},
 							"s_regsource": "pchelper",
+							"s_rsource": gconv.String(util.If(source != "", source,
+								l.GetSession("RSource"))),
 						}
 						//注册邮箱
 						email := l.GetString("email")
@@ -155,26 +158,26 @@ func (l *PcHelper) Login() error {
 						_id := mongodb.Save("user", data)
 						if _id != "" {
 							referer := l.Refer()
-							source := l.GetString("source")
 							var Rref = l.GetString("rref")
 							if l.GetSession("RReferer") != nil && util.ObjToString(l.GetSession("RReferer")) != "" {
 								Rref = gconv.String(l.GetSession("RReferer"))
 							}
 							go jy.SaveUserLog(public.Mgo_Log,
-                                _id,
-                                phone,
-                                "phone",
-                                jyutil.IsAndroidOrIOS(l.UserAgent()),
-                                source,
-                                "",
-                                Rref,
-                                gconv.String(l.GetSession("RSource")),
-                                util.GetIp(l.Request),
-                                l.UserAgent(),
-                                "",
-                                "",
-                                referer,
-                            )
+								_id,
+								phone,
+								"phone",
+								jyutil.IsAndroidOrIOS(l.UserAgent()),
+								"pc",
+								"",
+								Rref,
+								gconv.String(util.If(source != "", source,
+									l.GetSession("RSource"))),
+								util.GetIp(l.Request),
+								l.UserAgent(),
+								"",
+								"",
+								referer,
+							)
 							jy.ClearPhoneIdentSession(l.Session())
 							reToken = getUToken(mac, phone)
 							reOpenId = phone

+ 25 - 18
src/jfw/front/wx_dataExport.go

@@ -24,30 +24,37 @@ import (
 
 type WxDataExport struct {
 	*xweb.Action
-	toSieve       xweb.Mapper `xweb:"/front/wx_dataExport/toSieve"`            //微信数据导出
-	saveData      xweb.Mapper `xweb:"/front/wx_dataExport/saveData"`           //保存筛选数据
-	area          xweb.Mapper `xweb:"/front/wx_dataExport/area"`               //区域
-	industry      xweb.Mapper `xweb:"/front/wx_dataExport/industry"`           //行业
-	buyerclass    xweb.Mapper `xweb:"/front/wx_dataExport/buyerclass"`         //采购单位类型
-	keyWord       xweb.Mapper `xweb:"/front/wx_dataExport/keyWord"`            //关键词
-	keyWordInput  xweb.Mapper `xweb:"/front/wx_dataExport/keyWordInput"`       //关键词输入
-	appended      xweb.Mapper `xweb:"/front/wx_dataExport/appended"`           //附加词
-	appendedInput xweb.Mapper `xweb:"/front/wx_dataExport/appendedInput"`      //附加词输入
-	exclude       xweb.Mapper `xweb:"/front/wx_dataExport/exclude"`            //排除词
-	excludeInput  xweb.Mapper `xweb:"/front/wx_dataExport/excludeInput"`       //排除词输入
-	price         xweb.Mapper `xweb:"/front/wx_dataExport/price"`              //金额
-	subType       xweb.Mapper `xweb:"/front/wx_dataExport/subType"`            //信息类型
-	buyerEdit     xweb.Mapper `xweb:"/front/wx_dataExport/buyerEdit"`          //采购单位编辑
-	buyerInput    xweb.Mapper `xweb:"/front/wx_dataExport/buyerInput"`         //采购单位输入
-	winnerEdit    xweb.Mapper `xweb:"/front/wx_dataExport/winnerEdit"`         //中标单位编辑
-	winnerInput   xweb.Mapper `xweb:"/front/wx_dataExport/winnerInput"`        //中标单位输入
-	agencyEdit    xweb.Mapper `xweb:"/front/wx_dataExport/agency(Edit|Input)"` //代理机构编辑
+	toSieve         xweb.Mapper `xweb:"/front/wx_dataExport/toSieve"`              //微信数据导出
+	saveData        xweb.Mapper `xweb:"/front/wx_dataExport/saveData"`             //保存筛选数据
+	area            xweb.Mapper `xweb:"/front/wx_dataExport/area"`                 //区域
+	industry        xweb.Mapper `xweb:"/front/wx_dataExport/industry"`             //行业
+	buyerclass      xweb.Mapper `xweb:"/front/wx_dataExport/buyerclass"`           //采购单位类型
+	keyWord         xweb.Mapper `xweb:"/front/wx_dataExport/keyWord"`              //关键词
+	keyWordInput    xweb.Mapper `xweb:"/front/wx_dataExport/keyWordInput"`         //关键词输入
+	appended        xweb.Mapper `xweb:"/front/wx_dataExport/appended"`             //附加词
+	appendedInput   xweb.Mapper `xweb:"/front/wx_dataExport/appendedInput"`        //附加词输入
+	exclude         xweb.Mapper `xweb:"/front/wx_dataExport/exclude"`              //排除词
+	excludeInput    xweb.Mapper `xweb:"/front/wx_dataExport/excludeInput"`         //排除词输入
+	price           xweb.Mapper `xweb:"/front/wx_dataExport/price"`                //金额
+	subType         xweb.Mapper `xweb:"/front/wx_dataExport/subType"`              //信息类型
+	buyerEdit       xweb.Mapper `xweb:"/front/wx_dataExport/buyerEdit"`            //采购单位编辑
+	buyerInput      xweb.Mapper `xweb:"/front/wx_dataExport/buyerInput"`           //采购单位输入
+	winnerEdit      xweb.Mapper `xweb:"/front/wx_dataExport/winnerEdit"`           //中标单位编辑
+	winnerInput     xweb.Mapper `xweb:"/front/wx_dataExport/winnerInput"`          //中标单位输入
+	agencyEdit      xweb.Mapper `xweb:"/front/wx_dataExport/agency(Edit|Input)"`   //代理机构编辑
+	wxtoOrderDetail xweb.Mapper `xweb:"/front/wx_bidcreditreport/wxToOrderDetail"` //代理机构编辑
+
 }
 
 func init() {
 	xweb.AddAction(&WxDataExport{})
 }
 
+func (w *WxDataExport) WxtoOrderDetail() error {
+	w.Render("/weixin/bidCreditReport/toOrderDetail.html")
+	return nil
+}
+
 // 微信数据导出
 func (w *WxDataExport) ToSieve() error {
 	defer util.Catch()

+ 0 - 1
src/jfw/modules/app/src/app/front/dataExport.go

@@ -356,7 +356,6 @@ func (w *WxDataExport) Area() error {
 	return nil
 }
 
-// Area 区域
 func (w *WxDataExport) ToOrderDetail() error {
 	w.Render("/bidCreditReport/toOrderDetail.html")
 	return nil