Sfoglia il codice sorgente

移动端 结构化数据开发

wangshan 5 anni fa
parent
commit
3eab8dd271
28 ha cambiato i file con 1964 aggiunte e 418 eliminazioni
  1. 6 0
      src/jfw/front/dataExport.go
  2. 239 7
      src/jfw/front/structedData.go
  3. 7 0
      src/jfw/front/ws_dataExport.go
  4. 205 6
      src/jfw/modules/app/src/app/front/structedData.go
  5. 6 0
      src/jfw/modules/app/src/web/staticres/jyapp/js/common.js
  6. 45 46
      src/jfw/modules/app/src/web/staticres/jyapp/structuredata/css/marketing.css
  7. 114 29
      src/jfw/modules/app/src/web/staticres/jyapp/structuredata/css/write_infor.css
  8. 11 5
      src/jfw/modules/app/src/web/templates/structeddata/marketing.html
  9. 421 110
      src/jfw/modules/app/src/web/templates/structeddata/write_infor.html
  10. 13 0
      src/jfw/modules/subscribepay/src/service/dataExportPay_mobile.go
  11. 7 0
      src/jfw/modules/subscribepay/src/service/dataExportPay_pc.go
  12. 37 0
      src/jfw/modules/subscribepay/src/util/structed.go
  13. 10 0
      src/jfw/public/public.go
  14. 53 0
      src/jfw/public/structed.go
  15. 2 1
      src/seo.json
  16. 15 0
      src/web/staticres/css/dataService.css
  17. 47 35
      src/web/staticres/structuredata/css/marketing.css
  18. 114 27
      src/web/staticres/structuredata/css/write_infor.css
  19. BIN
      src/web/staticres/structuredata/file/【剑鱼标讯】结构化招标数据.xlsx
  20. BIN
      src/web/staticres/structuredata/image/emaillogo.png
  21. 11 2
      src/web/templates/pc/dataExport_sieve.html
  22. 11 8
      src/web/templates/pc/dataService.html
  23. 1 1
      src/web/templates/structuredata/marketing_wx.html
  24. 55 0
      src/web/templates/structuredata/pc/index.html
  25. 55 0
      src/web/templates/structuredata/pc/info.html
  26. 0 140
      src/web/templates/structuredata/write_infor.html
  27. 467 0
      src/web/templates/structuredata/write_infor_wx.html
  28. 12 1
      src/web/templates/weixin/dataExport/dataExport.html

+ 6 - 0
src/jfw/front/dataExport.go

@@ -510,6 +510,12 @@ func (d *DataExport) ToCreateOrderPage(_id string) error {
 	if userId == "" {
 		return errors.New("未登录")
 	}
+	//是否是从结构化数据推广页过来的
+	if d.GetString("from") == "structed" {
+		d.SetSession("Structed", true)
+	} else {
+		d.DelSession("Structed")
+	}
 	msgCount := public.GetDataExportSearchCountUseId(id)
 	if msgCount > public.ExConf.MsgMaxCount {
 		msgCount = public.ExConf.MsgMaxCount

+ 239 - 7
src/jfw/front/structedData.go

@@ -1,30 +1,170 @@
 package front
 
 import (
-	"github.com/go-xweb/xweb"
-	"gopkg.in/mgo.v2/bson"
+	"fmt"
+	"jfw/config"
 	"jfw/public"
+	"log"
 	"qfw/util"
+	"qfw/util/redis"
+	"strings"
 	"time"
+
+	"github.com/go-xweb/xweb"
+	"gopkg.in/mgo.v2/bson"
 )
 
 type StructedData struct {
 	*xweb.Action
-	index      xweb.Mapper `xweb:"/front/structed/index"`      //数据结构化首页
-	writeInfo  xweb.Mapper `xweb:"/front/structed/writeinfo"`  //信息填写
+	index      xweb.Mapper `xweb:"/front/structed/index"`     //数据结构化首页
+	writeInfo  xweb.Mapper `xweb:"/front/structed/writeinfo"` //信息填写
 	checkUser  xweb.Mapper `xweb:"/front/structed/checkuser"`
 	success    xweb.Mapper `xweb:"/front/structed/success"`    //信息填写成功
 	saveData   xweb.Mapper `xweb:"/front/structed/savedata"`   //数据结构化保存用户
 	getPreview xweb.Mapper `xweb:"/front/structed/getpreview"` //数据结构化预览
+	//dev2.10.10
+	pc_index       xweb.Mapper `xweb:"/front/structed/pc_index.html"`  //pc端结构化数据首页
+	pc_info        xweb.Mapper `xweb:"/front/structed/pc_info.html"`   //pc端结构化数据信息页面
+	freeSamples    xweb.Mapper `xweb:"/front/structed/freeSamples"`    //数据结构化保存免费样例数据
+	verifyCode     xweb.Mapper `xweb:"/front/structed/verifyCode"`     //数据结构化验证邮箱验证码
+	sendMailVerify xweb.Mapper `xweb:"/front/structed/sendMailVerify"` //数据结构化发送邮箱验证码
 }
 
 func init() {
 	xweb.AddAction(&StructedData{})
 }
 
+//验证 验证码的正确性
+func (t *StructedData) VerifyCode() {
+	defer util.Catch()
+	msg := "请求方式有误"
+	status := false
+	if t.Method() == "POST" {
+		userId := util.ObjToString(t.GetSession("userId"))
+		msg = "未登录"
+		if userId != "" {
+			s_email := t.GetString("s_email")       //邮箱
+			verifyCode := t.GetString("verifyCode") //验证码
+			VerifyEmail := util.ObjToString(t.GetSession("DataSMVerifyEmail"))
+			if verifyCode != "" && s_email != "" && VerifyEmail != "" {
+				if s_email == VerifyEmail {
+					msg = "验证码正确"
+					status = true
+					SMVerifySucess := t.GetSession("SMVerifySucess")
+					//需验证邮箱
+					if !SMVerifySucess.(bool) {
+						//验证码
+						verifyStr := t.GetSession("DataSMVerify")
+						//是否超时
+						lastSendDEVerify := util.Int64All(t.GetSession("CreatSMVerifyTime"))
+						timeSpaceing := lastSendDEVerify - time.Now().Unix() + 60*5
+						if lastSendDEVerify == 0 || timeSpaceing < 0 {
+							msg = "验证码超时"
+							status = false
+						} else if verifyStr != verifyCode {
+							msg = "验证码有误"
+							status = false
+						} else {
+							t.SetSession("SMVerifySucess", true)
+						}
+					}
+				} else {
+					msg = "邮箱有误"
+					status = false
+				}
+			}
+		}
+	}
+	t.ServeJson(map[string]interface{}{
+		"msg":    msg,
+		"status": status,
+	})
+}
+
+//保存免费样例数据
+func (t *StructedData) FreeSamples() error {
+	defer util.Catch()
+	msg := "请求方式有误"
+	status := false
+	if t.Method() == "POST" {
+		userId := util.ObjToString(t.GetSession("userId"))
+		if userId != "" {
+			name := t.GetString("name")                      //联系人
+			phone_num := t.GetString("phone_num")            //手机号
+			s_email := t.GetString("s_email")                //邮箱
+			SMVerifySucess := t.GetSession("SMVerifySucess") //邮箱是否验证成功
+			if name != "" && phone_num != "" && s_email != "" && SMVerifySucess.(bool) {
+				count := public.Mysql.Count("structed_data", map[string]interface{}{
+					"name":  name,
+					"phone": phone_num,
+					"email": s_email,
+				})
+				if count >= 1 {
+					msg = "用户信息已存在"
+					status = true
+				} else {
+					stu := public.Mysql.Insert("structed_data", map[string]interface{}{
+						"name":        name,
+						"phone":       phone_num,
+						"email":       s_email,
+						"submit_time": time.Now().Unix(),
+						"status":      0,
+						"type":        1, //用户来源,0:联系客服,1:免费样例,2:自选购买
+					})
+					if stu == 0 {
+						msg = "数据库操作异常"
+						status = false
+					} else {
+						t.DelSession("SMVerifySucess")
+						msg = "保存成功"
+						status = true
+						go public.SendStructedDataByEmail(s_email, config.GmailAuth)
+					}
+				}
+			} else {
+				msg = "缺少参数"
+				status = false
+			}
+		}
+	}
+	t.ServeJson(map[string]interface{}{
+		"msg":    msg,
+		"status": status,
+	})
+	return nil
+}
+
+//必须登录
+func (t *StructedData) Pc_info() error {
+	defer util.Catch()
+	userId := util.ObjToString(t.GetSession("userId"))
+	if userId != "" {
+		nums, ok := public.MQFW.FindOne("user", bson.M{"_id": bson.ObjectIdHex(userId)})
+		if !ok {
+			return t.Redirect("/front/aboutus.html")
+		}
+		if _, ok := (*nums)["s_phone"]; ok {
+			t.T["phone_num"] = (*nums)["s_phone"].(string)
+		}
+		if _, ok := (*nums)["s_myemail"]; ok {
+			t.T["s_myemail"] = (*nums)["s_myemail"].(string)
+			//验证是否是绑定的邮箱
+			t.SetSession("DataSMVerifyEmail", (*nums)["s_myemail"].(string))
+		}
+		return t.Render("/structuredata/pc/info.html", &t.T)
+	} else {
+		return t.Redirect("/front/aboutus.html")
+	}
+}
+
+//可以不登录
+func (t *StructedData) Pc_index() error {
+	t.T["source"] = "wx_sy_dh_4"
+	return t.Render("/structuredata/pc/index.html", &t.T)
+}
 func (t *StructedData) Index() error {
 	t.T["source"] = "wx_sy_dh_4"
-	return t.Render("/structuredata/marketing.html", &t.T)
+	return t.Render("/structuredata/marketing_wx.html", &t.T)
 }
 
 //信息填写
@@ -49,7 +189,12 @@ func (t *StructedData) CheckUser() error {
 		if _, ok := (*nums)["s_phone"]; ok {
 			t.T["phone_num"] = (*nums)["s_phone"].(string)
 		}
-		return t.Render("/structuredata/write_infor.html", &t.T)
+		if _, ok := (*nums)["s_myemail"]; ok {
+			t.T["s_myemail"] = (*nums)["s_myemail"].(string)
+			//验证是否是绑定的邮箱
+			t.SetSession("DataSMVerifyEmail", (*nums)["s_myemail"].(string))
+		}
+		return t.Render("/structuredata/write_infor_wx.html", &t.T)
 	} else {
 		return t.Redirect("/swordfish/about?source=open_infocontent&o=-130")
 	}
@@ -59,7 +204,7 @@ func (t *StructedData) CheckUser() error {
 func (t *StructedData) SaveData() {
 	name := t.GetString("name")
 	phone_num := t.GetString("phone_num")
-	if name != "" && phone_num != "" {
+	if name != "" && phone_num != "" && isPhone(phone_num) {
 		count := public.Mysql.Count("structed_data", map[string]interface{}{
 			"name":  name,
 			"phone": phone_num,
@@ -78,6 +223,7 @@ func (t *StructedData) SaveData() {
 				"phone":       phone_num,
 				"submit_time": time.Now().Unix(),
 				"status":      0,
+				"type":        0, //用户来源,0:联系客服,1:免费样例,2:自选购买
 			})
 			if stu == 0 {
 				t.ServeJson(map[string]interface{}{
@@ -100,3 +246,89 @@ func (t *StructedData) SaveData() {
 	}
 }
 
+//发送邮件
+func (t *StructedData) SendMailVerify() {
+	defer util.Catch()
+	if t.Method() == "POST" {
+		userId := util.ObjToString(t.GetSession("userId"))
+		if userId != "" {
+			email := t.GetString("email")
+			if isEmail(email) {
+				var email_used = true
+				if email != t.GetSession("DataSMVerifyEmail") {
+					t.DelSession("CreatEVerifyTime")
+					emails := public.Mysql.FindOne("dataexport_order", map[string]interface{}{
+						"user_mail": email,
+						"user_id":   userId,
+					}, "user_mail", "")
+					if emails != nil && util.ObjToString((*emails)["user_mail"]) != "" {
+						email_used = false
+						t.T["success"] = true
+						t.T["errCode"] = 4
+						t.T["errMsg"] = "此邮箱已被验证"
+						t.SetSession("DataSMVerifyEmail", email)
+						t.SetSession("SMVerifySucess", true)
+					}
+				} else {
+					email_used = false
+					t.T["success"] = true
+					t.T["errCode"] = 4
+					t.T["errMsg"] = "此邮箱已被验证"
+					t.SetSession("SMVerifySucess", true)
+				}
+				if email_used {
+					lastSendDEVerify := util.Int64All(t.GetSession("CreatSMVerifyTime"))
+					timeSpaceing := lastSendDEVerify - time.Now().Unix() + 60*5
+					incurKey := fmt.Sprintf("SendSMEmail_%s_%t", t.GetSession("userId"), time.Now().Day())
+					if lastSendDEVerify == 0 || timeSpaceing < 0 {
+						//每日限制10次
+						times := util.IntAll(redis.Get("other", incurKey))
+						if times < 10 {
+							if times == 0 {
+								redis.Put("other", incurKey, 1, 24*60*60)
+							} else {
+								redis.Incr("other", incurKey)
+							}
+							//生成随机数
+							verifyStr := strings.ToUpper(util.GetComplexRandom(6, 3, 3))
+							t.SetSession("SMVerifySucess", false)
+							t.SetSession("DataSMVerify", verifyStr)
+							t.SetSession("CreatSMVerifyTime", time.Now().Unix())
+							t.SetSession("DataSMVerifyEmail", email)
+							log.Println("====================", verifyStr, "====================", t.GetSession("CreatSMVerifyTime"), "====================")
+							//发送邮箱验证码
+							go public.SendMailIdentCode(email, verifyStr, config.GmailAuth)
+							t.T["success"] = true
+							t.T["errCode"] = 5
+							t.T["errMsg"] = "已发送邮箱验证码"
+						} else {
+							t.T["success"] = false
+							t.T["errCode"] = 3
+							t.T["time"] = timeSpaceing
+							t.T["errMsg"] = "验证码发送次数已达到今日上限"
+						}
+
+					} else {
+						t.T["success"] = false
+						t.T["errCode"] = 2
+						t.T["time"] = timeSpaceing
+						t.T["errMsg"] = "已发送,5分钟后再尝试"
+					}
+				}
+			} else {
+				t.T["success"] = false
+				t.T["errCode"] = 1
+				t.T["errMsg"] = "邮箱格式不正确"
+			}
+		} else {
+			t.T["success"] = false
+			t.T["errCode"] = 7
+			t.T["errMsg"] = "未登录"
+		}
+	} else {
+		t.T["success"] = false
+		t.T["errCode"] = 6
+		t.T["errMsg"] = "请求方式有误"
+	}
+	t.ServeJson(&t.T)
+}

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

@@ -172,6 +172,13 @@ func (w *WsDataExport) ToCreateOrderPage() error {
 			return errors.New("未登录")
 		}
 	}
+	//是否是从结构化数据推广页过来的
+	if w.GetString("from") == "structed" {
+		w.SetSession("Structed", true)
+	} else {
+		w.DelSession("Structed")
+	}
+	log.Println("-------------------:", w.GetSession("Structed"))
 	msgCount := public.GetDataExportSearchCountUseId(id)
 	if msgCount > public.ExConf.MsgMaxCount {
 		msgCount = public.ExConf.MsgMaxCount

+ 205 - 6
src/jfw/modules/app/src/app/front/structedData.go

@@ -1,18 +1,29 @@
 package front
 
 import (
-	"github.com/go-xweb/xweb"
+	"fmt"
+	"jfw/config"
 	"jfw/public"
+	"log"
+	"qfw/util"
+	"qfw/util/redis"
+	"strings"
 	"time"
+
+	"github.com/go-xweb/xweb"
 )
 
 type StructedData struct {
 	*xweb.Action
-	index     xweb.Mapper `xweb:"/jyapp/structed/index"`     //数据结构化首页
-	writeInfo xweb.Mapper `xweb:"/jyapp/structed/writeinfo"` //信息填写
-	saveData  xweb.Mapper `xweb:"/jyapp/structed/savedata"`
-	success   xweb.Mapper `xweb:"/jyapp/structed/success"` //信息填写成功
-	getPreview  xweb.Mapper `xweb:"/jyapp/structed/getpreview"`  //数据结构化预览
+	index      xweb.Mapper `xweb:"/jyapp/structed/index"`     //数据结构化首页
+	writeInfo  xweb.Mapper `xweb:"/jyapp/structed/writeinfo"` //信息填写
+	saveData   xweb.Mapper `xweb:"/jyapp/structed/savedata"`
+	success    xweb.Mapper `xweb:"/jyapp/structed/success"`    //信息填写成功
+	getPreview xweb.Mapper `xweb:"/jyapp/structed/getpreview"` //数据结构化预览
+	//dev2.10.10
+	freeSamples    xweb.Mapper `xweb:"/jyapp/structed/freeSamples"`    //数据结构化保存免费样例数据
+	verifyCode     xweb.Mapper `xweb:"/jyapp/structed/verifyCode"`     //数据结构化验证邮箱验证码
+	sendMailVerify xweb.Mapper `xweb:"/jyapp/structed/sendMailVerify"` //数据结构化发送邮箱验证码
 
 }
 
@@ -20,6 +31,193 @@ func init() {
 	xweb.AddAction(&StructedData{})
 }
 
+//验证 验证码的正确性
+func (t *StructedData) VerifyCode() {
+	defer util.Catch()
+	msg := "请求方式有误"
+	status := false
+	if t.Method() == "POST" {
+		userId := util.ObjToString(t.GetSession("userId"))
+		msg = "未登录"
+		if userId != "" {
+			s_email := t.GetString("s_email")       //邮箱
+			verifyCode := t.GetString("verifyCode") //验证码
+			VerifyEmail := util.ObjToString(t.GetSession("DataSMVerifyEmail"))
+			if verifyCode != "" && s_email != "" && VerifyEmail != "" {
+				if s_email == VerifyEmail {
+					msg = "验证码正确"
+					status = true
+					SMVerifySucess := t.GetSession("SMVerifySucess")
+					//需验证邮箱
+					if !SMVerifySucess.(bool) {
+						//验证码
+						verifyStr := t.GetSession("DataSMVerify")
+						//是否超时
+						lastSendDEVerify := util.Int64All(t.GetSession("CreatSMVerifyTime"))
+						timeSpaceing := lastSendDEVerify - time.Now().Unix() + 60*5
+						if lastSendDEVerify == 0 || timeSpaceing < 0 {
+							msg = "验证码超时"
+							status = false
+						} else if verifyStr != verifyCode {
+							msg = "验证码有误"
+							status = false
+						} else {
+							t.SetSession("SMVerifySucess", true)
+						}
+					}
+				} else {
+					msg = "邮箱有误"
+					status = false
+				}
+			}
+		}
+	}
+	t.ServeJson(map[string]interface{}{
+		"msg":    msg,
+		"status": status,
+	})
+}
+
+//保存免费样例数据
+func (t *StructedData) FreeSamples() error {
+	defer util.Catch()
+	msg := "请求方式有误"
+	status := false
+	if t.Method() == "POST" {
+		userId := util.ObjToString(t.GetSession("userId"))
+		if userId != "" {
+			name := t.GetString("name")                      //联系人
+			phone_num := t.GetString("phone_num")            //手机号
+			s_email := t.GetString("s_email")                //邮箱
+			SMVerifySucess := t.GetSession("SMVerifySucess") //邮箱是否验证成功
+			if name != "" && phone_num != "" && s_email != "" && SMVerifySucess.(bool) {
+				count := public.Mysql.Count("structed_data", map[string]interface{}{
+					"name":  name,
+					"phone": phone_num,
+					"email": s_email,
+				})
+				if count >= 1 {
+					msg = "用户信息已存在"
+					status = true
+				} else {
+					stu := public.Mysql.Insert("structed_data", map[string]interface{}{
+						"name":        name,
+						"phone":       phone_num,
+						"email":       s_email,
+						"submit_time": time.Now().Unix(),
+						"status":      0,
+						"type":        1, //用户来源,0:联系客服,1:免费样例,2:自选购买
+					})
+					if stu == 0 {
+						msg = "数据库操作异常"
+						status = false
+					} else {
+						t.DelSession("SMVerifySucess")
+						msg = "保存成功"
+						status = true
+						go public.SendStructedDataByEmail(s_email, config.GmailAuth)
+					}
+				}
+			} else {
+				msg = "缺少参数"
+				status = false
+			}
+		}
+	}
+	t.ServeJson(map[string]interface{}{
+		"msg":    msg,
+		"status": status,
+	})
+	return nil
+}
+
+//发送邮件
+func (t *StructedData) SendMailVerify() {
+	defer util.Catch()
+	if t.Method() == "POST" {
+		userId := util.ObjToString(t.GetSession("userId"))
+		if userId != "" {
+			email := t.GetString("email")
+			if isEmail(email) {
+				var email_used = true
+				if email != t.GetSession("DataSMVerifyEmail") {
+					t.DelSession("CreatEVerifyTime")
+					emails := public.Mysql.FindOne("dataexport_order", map[string]interface{}{
+						"user_mail": email,
+						"user_id":   userId,
+					}, "user_mail", "")
+					if emails != nil && util.ObjToString((*emails)["user_mail"]) != "" {
+						email_used = false
+						t.T["success"] = true
+						t.T["errCode"] = 4
+						t.T["errMsg"] = "此邮箱已被验证"
+						t.SetSession("DataSMVerifyEmail", email)
+						t.SetSession("SMVerifySucess", true)
+					}
+				} else {
+					email_used = false
+					t.T["success"] = true
+					t.T["errCode"] = 4
+					t.T["errMsg"] = "此邮箱已被验证"
+					t.SetSession("SMVerifySucess", true)
+				}
+				if email_used {
+					lastSendDEVerify := util.Int64All(t.GetSession("CreatSMVerifyTime"))
+					timeSpaceing := lastSendDEVerify - time.Now().Unix() + 60*5
+					incurKey := fmt.Sprintf("SendSMEmail_%s_%t", t.GetSession("userId"), time.Now().Day())
+					if lastSendDEVerify == 0 || timeSpaceing < 0 {
+						//每日限制10次
+						times := util.IntAll(redis.Get("other", incurKey))
+						if times < 10 {
+							if times == 0 {
+								redis.Put("other", incurKey, 1, 24*60*60)
+							} else {
+								redis.Incr("other", incurKey)
+							}
+							//生成随机数
+							verifyStr := strings.ToUpper(util.GetComplexRandom(6, 3, 3))
+							t.SetSession("SMVerifySucess", false)
+							t.SetSession("DataSMVerify", verifyStr)
+							t.SetSession("CreatSMVerifyTime", time.Now().Unix())
+							t.SetSession("DataSMVerifyEmail", email)
+							log.Println("====================", verifyStr, "====================", t.GetSession("CreatSMVerifyTime"), "====================")
+							//发送邮箱验证码
+							go public.SendMailIdentCode(email, verifyStr, config.GmailAuth)
+							t.T["success"] = true
+							t.T["errCode"] = 5
+							t.T["errMsg"] = "已发送邮箱验证码"
+						} else {
+							t.T["success"] = false
+							t.T["errCode"] = 3
+							t.T["time"] = timeSpaceing
+							t.T["errMsg"] = "验证码发送次数已达到今日上限"
+						}
+
+					} else {
+						t.T["success"] = false
+						t.T["errCode"] = 2
+						t.T["time"] = timeSpaceing
+						t.T["errMsg"] = "已发送,5分钟后再尝试"
+					}
+				}
+			} else {
+				t.T["success"] = false
+				t.T["errCode"] = 1
+				t.T["errMsg"] = "邮箱格式不正确"
+			}
+		} else {
+			t.T["success"] = false
+			t.T["errCode"] = 7
+			t.T["errMsg"] = "未登录"
+		}
+	} else {
+		t.T["success"] = false
+		t.T["errCode"] = 6
+		t.T["errMsg"] = "请求方式有误"
+	}
+	t.ServeJson(&t.T)
+}
+
 func (t *StructedData) Index() error {
 	t.T["source"] = "app_sy_dh_5"
 	return t.Render("/structeddata/marketing.html", &t.T)
@@ -61,6 +259,7 @@ func (t *StructedData) SaveData() {
 				"phone":       phone_num,
 				"submit_time": time.Now().Unix(),
 				"status":      0,
+				"type":        0, //用户来源,0:联系客服,1:免费样例,2:自选购买
 			})
 			if stu == 0 {
 				t.ServeJson(map[string]interface{}{

+ 6 - 0
src/jfw/modules/app/src/web/staticres/jyapp/js/common.js

@@ -303,6 +303,12 @@ var JyObjMessage = new Object();
 $(function(){
 	if (mySysIsIos()){
 		window.JyObj = {
+			//拨打电话
+			callPhone:function(phone){
+			    JyObjMessage["phone"]=phone;
+			    window.webkit.messageHandlers.callPhone.postMessage(JyObjMessage);
+				JyObj.clearMessage();
+			},
 			//抖音or快手其他应用appName:应用名称;appLink:应用链接
 			openOtherAppLinks:function(appName,appLink){
 				JyObjMessage["appName"]=appName;

+ 45 - 46
src/jfw/modules/app/src/web/staticres/jyapp/structuredata/css/marketing.css

@@ -5,7 +5,7 @@ html {
 }
 
 body {
-  background: #2F96F4;
+  background: #2f96f4;
 }
 
 #app {
@@ -16,24 +16,6 @@ body {
   position: relative;
 }
 
-.jy-app-header.header-transparent {
-  position: absolute;
-  width: 100%;
-  background: transparent;
-  z-index: 999;
-}
-
-.jy-app-header.header-transparent .subreport_title {
-  font-size: 0;
-}
-
-.jy-app-header.header-transparent .fanhui {
-  width: 0.96rem;
-  height: 0.96rem;
-  font-size: 0.36rem;
-  color: #fff;
-}
-
 #app .j-main {
   width: 100%;
   height: 100%;
@@ -137,7 +119,7 @@ body {
   width: 100%;
   height: 0.36rem;
   font-size: 0.24rem;
-  color: #C0C4CC;
+  color: #c0c4cc;
   line-height: 0.36rem;
 }
 
@@ -173,7 +155,7 @@ body {
   background: rgba(47, 150, 244, 0.04);
   font-size: 0.3rem;
   font-weight: bold;
-  color: #2F96F4;
+  color: #2f96f4;
 }
 
 #app .j-main .str_what .str_content .data_mode .data_mode_content {
@@ -223,7 +205,7 @@ body {
   border-radius: 8px 24px 0px 0px;
   background: rgba(47, 150, 244, 0.04);
   font-size: 0.3rem;
-  color: #2F96F4;
+  color: #2f96f4;
   font-weight: bold;
 }
 
@@ -241,7 +223,7 @@ body {
   height: 2.88rem;
   font-size: 0.24rem;
   line-height: .36rem;
-  color: #5F5E64;
+  color: #5f5e64;
 }
 
 #app .j-main .str_what .str_content .message .message_page .click_view {
@@ -251,11 +233,11 @@ body {
   width: 2.6rem;
   height: 0.6rem;
   border-radius: .32rem;
-  border: 1px solid #2F96F4;
+  border: 1px solid #2f96f4;
   box-sizing: border-box;
   margin-top: 0.4rem;
   font-size: 0.26rem;
-  color: #2F96F4;
+  color: #2f96f4;
 }
 
 #app .j-main .advantage {
@@ -458,7 +440,7 @@ body {
   height: auto;
   padding-left: .72rem;
   font-size: .24rem;
-  color: #5F5E64;
+  color: #5f5e64;
 }
 
 #app .j-main .company {
@@ -517,35 +499,23 @@ body {
 
 #app .j-button-group {
   display: flex;
-  flex-direction: column;
-  justify-content: space-between;
   align-items: center;
+  justify-content: space-between;
   width: 100%;
-  height: 1.96rem;
+  height: 1.32rem;
   padding: 0.16rem 0.32rem 0.16rem;
   background-color: #fff;
 }
 
-#app .j-button-group .j-button-confirm,
-#app .j-button-group .j-button-cancel {
-  display: flex;
-  align-items: center;
-  justify-content: center;
-  width: 100%;
-  font-size: 0.32rem;
-  text-align: center;
-  border-radius: 0.16rem;
-}
-
 #app .j-button-group .j-button-cancel {
-  height: .64rem;
-  background: #fff;
-  color: #5F5E64;
+  height: .8rem;
+  background: #EDEFF2;
+  color: #171826;
 }
 
 #app .j-button-group .j-button-cancel .phone_num {
   font-size: .28rem;
-  color: #5F5E64;
+  color: #5f5e64;
 }
 
 #app .j-button-group .j-button-cancel .phone_icon {
@@ -558,11 +528,40 @@ body {
 }
 
 #app .j-button-group .j-button-confirm {
-  height: .92rem;
-  background: #2ABED1;
+  height: .8rem;
+  background: #2abed1;
   color: #fff;
 }
 
+.jy-app-header.header-transparent {
+  position: absolute;
+  width: 100%;
+  background: transparent;
+  z-index: 999;
+}
+
+.jy-app-header.header-transparent .subreport_title {
+  font-size: 0;
+}
+
+.jy-app-header.header-transparent .fanhui {
+  width: 0.96rem;
+  height: 0.96rem;
+  font-size: 0.36rem;
+  color: #fff;
+}
+
+#app .j-button-group .j-button-confirm,
+#app .j-button-group .j-button-cancel {
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  width: 48%;
+  font-size: 0.32rem;
+  text-align: center;
+  border-radius: 0.16rem;
+}
+
 @keyframes ballRotate {
   0% {
     transform: rotate(0);

+ 114 - 29
src/jfw/modules/app/src/web/staticres/jyapp/structuredata/css/write_infor.css

@@ -6,7 +6,26 @@ body, html {
 input::-webkit-input-placeholder, textarea::-webkit-input-placeholder {
   color: #C0C4CC;
   font-size: .32rem;
-  line-height: .48rem;
+}
+
+.weui-toast {
+  min-height: 2.6em;
+  line-height: 2.6em;
+  top: 6rem;
+}
+
+.weui-toast .weui-toast__content {
+  margin: 0;
+}
+
+.weui-icon_toast {
+  display: none;
+}
+
+.toast-lang .weui-toast {
+  width: auto;
+  padding: 0 .5rem;
+  left: 38%;
 }
 
 #writeInfo {
@@ -45,13 +64,50 @@ input::-webkit-input-placeholder, textarea::-webkit-input-placeholder {
   z-index: 2;
 }
 
-#writeInfo .infoMain {
+#writeInfo .weui-navbar {
+  height: .96rem;
+}
+
+#writeInfo .weui-navbar .weui-navbar__item {
+  font-size: .28rem;
+  color: #5F5E64;
+  padding: .24rem 0;
+}
+
+#writeInfo .weui-navbar .weui-navbar__item.weui-bar__item_on {
+  color: #2ABED1;
+}
+
+#writeInfo .weui-navbar .weui-navbar__item.weui-bar__item_on, #writeInfo .weui-navbar .weui-navbar__item:active {
+  background: #fff;
+}
+
+#writeInfo .weui-navbar .weui-navbar__item.weui-bar__item_on .showline, #writeInfo .weui-navbar .weui-navbar__item:active .showline {
+  margin-top: .16rem;
+  width: 100%;
+  height: .03rem;
+  display: flex;
+  justify-content: center;
+}
+
+#writeInfo .weui-navbar .weui-navbar__item.weui-bar__item_on .showline span, #writeInfo .weui-navbar .weui-navbar__item:active .showline span {
+  width: .48rem;
+  height: .03rem;
+  background: linear-gradient(270.45deg, #25BEEE 0.03%, #2ABED1 74.46%);
+  border-radius: 1px;
+}
+
+#writeInfo .weui-navbar .weui-navbar__item:after {
+  border-right: 0;
+}
+
+#writeInfo .infoMain, #writeInfo .purchase {
   width: 100%;
   height: 100%;
   flex: 1;
 }
 
-#writeInfo .infoMain .info_tip {
+#writeInfo .infoMain .info_tip, #writeInfo .purchase .info_tip {
   overflow: hidden;
   width: 100%;
   height: 3.6rem;
@@ -59,36 +115,36 @@ input::-webkit-input-placeholder, textarea::-webkit-input-placeholder {
   background-size: 100% 100%;
 }
 
-#writeInfo .infoMain .info_tip .tip_text {
-  margin-top: 1.04rem;
+#writeInfo .infoMain .info_tip .tip_text, #writeInfo .purchase .info_tip .tip_text {
+  margin-top: .64rem;
   padding: 0 .32rem;
   width: 100%;
   height: .48rem;
-  font-size: .32rem;
+  font-size: .28rem;
   color: #fff;
 }
 
-#writeInfo .infoMain .write_input {
+#writeInfo .infoMain .write_input, #writeInfo .purchase .write_input {
   width: 100%;
   padding: 0 .24rem;
   margin-top: -1.04rem;
 }
 
-#writeInfo .infoMain .write_input .write_con {
+#writeInfo .infoMain .write_input .write_con, #writeInfo .purchase .write_input .write_con {
   width: 100%;
   background: #fff;
   border-radius: 8px;
   margin-top: .08rem;
   overflow: hidden;
+  padding: 0 0 0 .32rem;
 }
 
-#writeInfo .infoMain .write_input .write_con .write_name {
+#writeInfo .infoMain .write_input .write_con .write_name, #writeInfo .purchase .write_input .write_con .write_name {
   width: 100%;
-  padding: 0 .32rem;
   margin-top: .08rem;
 }
 
-#writeInfo .infoMain .write_input .write_con .write_name .write_name_ipt {
+#writeInfo .infoMain .write_input .write_con .write_name .write_name_ipt, #writeInfo .purchase .write_input .write_con .write_name .write_name_ipt {
   width: 100%;
   height: 1.08rem;
   display: flex;
@@ -96,7 +152,7 @@ input::-webkit-input-placeholder, textarea::-webkit-input-placeholder {
   box-shadow: inset 0px -0.5px 0px rgba(0, 0, 0, 0.05), inset 16px 0px 0px #FFFFFF;
 }
 
-#writeInfo .infoMain .write_input .write_con .write_name .write_name_ipt .label_name {
+#writeInfo .infoMain .write_input .write_con .write_name .write_name_ipt .label_name, #writeInfo .purchase .write_input .write_con .write_name .write_name_ipt .label_name {
   display: flex;
   align-items: center;
   width: 1.6rem;
@@ -106,32 +162,29 @@ input::-webkit-input-placeholder, textarea::-webkit-input-placeholder {
   color: #5F5E64;
 }
 
-#writeInfo .infoMain .write_input .write_con .write_name .write_name_ipt .ipt_name {
+#writeInfo .infoMain .write_input .write_con .write_name .write_name_ipt .ipt_name, #writeInfo .purchase .write_input .write_con .write_name .write_name_ipt .ipt_name {
   height: .48rem;
   display: flex;
   align-items: center;
   padding-top: .08rem;
   font-size: .32rem;
-  color: #171826;
 }
 
-#writeInfo .infoMain .write_input .write_con .write_phone {
+#writeInfo .infoMain .write_input .write_con .write_phone, #writeInfo .infoMain .write_input .write_con .write_email, #writeInfo .infoMain .write_input .write_con .email_code, #writeInfo .purchase .write_input .write_con .write_phone, #writeInfo .purchase .write_input .write_con .write_email, #writeInfo .purchase .write_input .write_con .email_code {
   width: 100%;
   display: flex;
   flex-direction: column;
+  box-shadow: inset 0px -0.5px 0px rgba(0, 0, 0, 0.05), inset 16px 0px 0px #FFFFFF;
 }
 
-#writeInfo .infoMain .write_input .write_con .write_phone .write_phone_ipt {
+#writeInfo .infoMain .write_input .write_con .write_phone .write_phone_ipt, #writeInfo .infoMain .write_input .write_con .write_email .write_phone_ipt, #writeInfo .infoMain .write_input .write_con .email_code .write_phone_ipt, #writeInfo .purchase .write_input .write_con .write_phone .write_phone_ipt, #writeInfo .purchase .write_input .write_con .write_email .write_phone_ipt, #writeInfo .purchase .write_input .write_con .email_code .write_phone_ipt {
   width: 100%;
   height: 1.08rem;
   display: flex;
   align-items: center;
-  padding: 0 .32rem;
-  font-size: .32rem;
-  color: #171826;
 }
 
-#writeInfo .infoMain .write_input .write_con .write_phone .write_phone_ipt .label_phone {
+#writeInfo .infoMain .write_input .write_con .write_phone .write_phone_ipt .label_phone, #writeInfo .infoMain .write_input .write_con .write_email .write_phone_ipt .label_phone, #writeInfo .infoMain .write_input .write_con .email_code .write_phone_ipt .label_phone, #writeInfo .purchase .write_input .write_con .write_phone .write_phone_ipt .label_phone, #writeInfo .purchase .write_input .write_con .write_email .write_phone_ipt .label_phone, #writeInfo .purchase .write_input .write_con .email_code .write_phone_ipt .label_phone {
   display: flex;
   align-items: center;
   width: 1.6rem;
@@ -141,43 +194,71 @@ input::-webkit-input-placeholder, textarea::-webkit-input-placeholder {
   color: #5F5E64;
 }
 
-#writeInfo .infoMain .write_input .write_con .write_phone .write_phone_ipt .ipt_phone {
+#writeInfo .infoMain .write_input .write_con .write_phone .write_phone_ipt .ipt_phone, #writeInfo .infoMain .write_input .write_con .write_phone .write_phone_ipt .ipt_email, #writeInfo .infoMain .write_input .write_con .write_phone .write_phone_ipt .ipt_code, #writeInfo .infoMain .write_input .write_con .write_email .write_phone_ipt .ipt_phone, #writeInfo .infoMain .write_input .write_con .write_email .write_phone_ipt .ipt_email, #writeInfo .infoMain .write_input .write_con .write_email .write_phone_ipt .ipt_code, #writeInfo .infoMain .write_input .write_con .email_code .write_phone_ipt .ipt_phone, #writeInfo .infoMain .write_input .write_con .email_code .write_phone_ipt .ipt_email, #writeInfo .infoMain .write_input .write_con .email_code .write_phone_ipt .ipt_code, #writeInfo .purchase .write_input .write_con .write_phone .write_phone_ipt .ipt_phone, #writeInfo .purchase .write_input .write_con .write_phone .write_phone_ipt .ipt_email, #writeInfo .purchase .write_input .write_con .write_phone .write_phone_ipt .ipt_code, #writeInfo .purchase .write_input .write_con .write_email .write_phone_ipt .ipt_phone, #writeInfo .purchase .write_input .write_con .write_email .write_phone_ipt .ipt_email, #writeInfo .purchase .write_input .write_con .write_email .write_phone_ipt .ipt_code, #writeInfo .purchase .write_input .write_con .email_code .write_phone_ipt .ipt_phone, #writeInfo .purchase .write_input .write_con .email_code .write_phone_ipt .ipt_email, #writeInfo .purchase .write_input .write_con .email_code .write_phone_ipt .ipt_code {
   height: .48rem;
   display: flex;
   align-items: center;
   padding-top: .08rem;
   font-size: .32rem;
-  color: #171826;
 }
 
-#writeInfo .infoMain .write_input .write_con .write_phone .phone_tips {
+#writeInfo .infoMain .write_input .write_con .write_phone .write_phone_ipt .ipt_code, #writeInfo .infoMain .write_input .write_con .write_email .write_phone_ipt .ipt_code, #writeInfo .infoMain .write_input .write_con .email_code .write_phone_ipt .ipt_code, #writeInfo .purchase .write_input .write_con .write_phone .write_phone_ipt .ipt_code, #writeInfo .purchase .write_input .write_con .write_email .write_phone_ipt .ipt_code, #writeInfo .purchase .write_input .write_con .email_code .write_phone_ipt .ipt_code {
+  width: 3.5rem;
+}
+
+#writeInfo .infoMain .write_input .write_con .write_phone .write_phone_ipt .ipt_email:disabled, #writeInfo .infoMain .write_input .write_con .write_email .write_phone_ipt .ipt_email:disabled, #writeInfo .infoMain .write_input .write_con .email_code .write_phone_ipt .ipt_email:disabled, #writeInfo .purchase .write_input .write_con .write_phone .write_phone_ipt .ipt_email:disabled, #writeInfo .purchase .write_input .write_con .write_email .write_phone_ipt .ipt_email:disabled, #writeInfo .purchase .write_input .write_con .email_code .write_phone_ipt .ipt_email:disabled {
+  background: #fff;
+}
+
+#writeInfo .infoMain .write_input .write_con .write_phone .phone_tips, #writeInfo .infoMain .write_input .write_con .write_phone .email_tips, #writeInfo .infoMain .write_input .write_con .write_email .phone_tips, #writeInfo .infoMain .write_input .write_con .write_email .email_tips, #writeInfo .infoMain .write_input .write_con .email_code .phone_tips, #writeInfo .infoMain .write_input .write_con .email_code .email_tips, #writeInfo .purchase .write_input .write_con .write_phone .phone_tips, #writeInfo .purchase .write_input .write_con .write_phone .email_tips, #writeInfo .purchase .write_input .write_con .write_email .phone_tips, #writeInfo .purchase .write_input .write_con .write_email .email_tips, #writeInfo .purchase .write_input .write_con .email_code .phone_tips, #writeInfo .purchase .write_input .write_con .email_code .email_tips {
   margin-bottom: .26rem;
   display: flex;
   width: 100%;
   height: .36rem;
-  padding: 0 .32rem;
 }
 
-#writeInfo .infoMain .write_input .write_con .write_phone .phone_tips .label_tips {
+#writeInfo .infoMain .write_input .write_con .write_phone .phone_tips .label_tips, #writeInfo .infoMain .write_input .write_con .write_phone .email_tips .label_tips, #writeInfo .infoMain .write_input .write_con .write_email .phone_tips .label_tips, #writeInfo .infoMain .write_input .write_con .write_email .email_tips .label_tips, #writeInfo .infoMain .write_input .write_con .email_code .phone_tips .label_tips, #writeInfo .infoMain .write_input .write_con .email_code .email_tips .label_tips, #writeInfo .purchase .write_input .write_con .write_phone .phone_tips .label_tips, #writeInfo .purchase .write_input .write_con .write_phone .email_tips .label_tips, #writeInfo .purchase .write_input .write_con .write_email .phone_tips .label_tips, #writeInfo .purchase .write_input .write_con .write_email .email_tips .label_tips, #writeInfo .purchase .write_input .write_con .email_code .phone_tips .label_tips, #writeInfo .purchase .write_input .write_con .email_code .email_tips .label_tips {
   display: flex;
   width: 1.6rem;
   height: .48rem;
 }
 
-#writeInfo .infoMain .write_input .write_con .write_phone .phone_tips .phone_rule {
+#writeInfo .infoMain .write_input .write_con .write_phone .phone_tips .phone_rule, #writeInfo .infoMain .write_input .write_con .write_phone .email_tips .phone_rule, #writeInfo .infoMain .write_input .write_con .write_email .phone_tips .phone_rule, #writeInfo .infoMain .write_input .write_con .write_email .email_tips .phone_rule, #writeInfo .infoMain .write_input .write_con .email_code .phone_tips .phone_rule, #writeInfo .infoMain .write_input .write_con .email_code .email_tips .phone_rule, #writeInfo .purchase .write_input .write_con .write_phone .phone_tips .phone_rule, #writeInfo .purchase .write_input .write_con .write_phone .email_tips .phone_rule, #writeInfo .purchase .write_input .write_con .write_email .phone_tips .phone_rule, #writeInfo .purchase .write_input .write_con .write_email .email_tips .phone_rule, #writeInfo .purchase .write_input .write_con .email_code .phone_tips .phone_rule, #writeInfo .purchase .write_input .write_con .email_code .email_tips .phone_rule {
   height: 100%;
   font-size: .24rem;
   color: #FB483D;
 }
 
-#writeInfo .infoMain .run_button {
+#writeInfo .infoMain .write_input .write_con .email_code .write_phone_ipt .label_phone, #writeInfo .purchase .write_input .write_con .email_code .write_phone_ipt .label_phone {
+  font-size: .28rem;
+}
+
+#writeInfo .infoMain .write_input .write_con .email_code .write_phone_ipt .sendEmail, #writeInfo .purchase .write_input .write_con .email_code .write_phone_ipt .sendEmail {
+  font-size: .28rem;
+  color: #9B9CA3;
+}
+
+#writeInfo .infoMain .write_input .write_con .email_code .write_phone_ipt .timedown, #writeInfo .purchase .write_input .write_con .email_code .write_phone_ipt .timedown {
+  display: none;
+  font-size: .28rem;
+  text-align: center;
+  color: #C0C4CC;
+}
+
+#writeInfo .infoMain .option_purchase, #writeInfo .purchase .option_purchase {
+  padding: .64rem .64rem .36rem;
+  font-size: .28rem;
+  color: #171826;
+}
+
+#writeInfo .infoMain .run_button, #writeInfo .infoMain .free_button, #writeInfo .infoMain .run_now_button, #writeInfo .purchase .run_button, #writeInfo .purchase .free_button, #writeInfo .purchase .run_now_button {
   margin-top: .6rem;
   width: 100%;
   height: .92rem;
   padding: 0 .32rem;
 }
 
-#writeInfo .infoMain .run_button .write_run {
+#writeInfo .infoMain .run_button .write_run, #writeInfo .infoMain .run_button .write_free, #writeInfo .infoMain .run_button .write_run_now, #writeInfo .infoMain .free_button .write_run, #writeInfo .infoMain .free_button .write_free, #writeInfo .infoMain .free_button .write_run_now, #writeInfo .infoMain .run_now_button .write_run, #writeInfo .infoMain .run_now_button .write_free, #writeInfo .infoMain .run_now_button .write_run_now, #writeInfo .purchase .run_button .write_run, #writeInfo .purchase .run_button .write_free, #writeInfo .purchase .run_button .write_run_now, #writeInfo .purchase .free_button .write_run, #writeInfo .purchase .free_button .write_free, #writeInfo .purchase .free_button .write_run_now, #writeInfo .purchase .run_now_button .write_run, #writeInfo .purchase .run_now_button .write_free, #writeInfo .purchase .run_now_button .write_run_now {
   display: flex;
   align-items: center;
   justify-content: center;
@@ -189,8 +270,12 @@ input::-webkit-input-placeholder, textarea::-webkit-input-placeholder {
   font-size: .36rem;
 }
 
-#writeInfo .infoMain .run_button .write_run:disabled {
+#writeInfo .infoMain .run_button .write_run:disabled, #writeInfo .infoMain .run_button .write_free:disabled, #writeInfo .infoMain .free_button .write_run:disabled, #writeInfo .infoMain .free_button .write_free:disabled, #writeInfo .infoMain .run_now_button .write_run:disabled, #writeInfo .infoMain .run_now_button .write_free:disabled, #writeInfo .purchase .run_button .write_run:disabled, #writeInfo .purchase .run_button .write_free:disabled, #writeInfo .purchase .free_button .write_run:disabled, #writeInfo .purchase .free_button .write_free:disabled, #writeInfo .purchase .run_now_button .write_run:disabled, #writeInfo .purchase .run_now_button .write_free:disabled {
   background: #87DFEA;
   color: #FFFFFF;
   opacity: 0.65;
 }
+
+#writeInfo .purchase {
+  background: #fff;
+}

+ 11 - 5
src/jfw/modules/app/src/web/templates/structeddata/marketing.html

@@ -11,7 +11,6 @@
 	<meta http-equiv="X-UA-Compatible" content="ie=edge">
 	<meta http-equiv="X-UA-Compatible" content="ie=edge">
 	<title>结构化招标数据</title>
-	<script src="{{Cdns .Host "seo" "cdn"|SafeUrl}}/jyapp/structuredata/js/rem.js?v={{Msg "seo" "version"}}"></script>
 	<link rel="stylesheet" href="{{Cdns .Host "seo" "cdn"|SafeUrl}}/jyapp/structuredata/css/base.css?v={{Msg "seo" "version"}}">
 	<link rel="stylesheet" href="{{Cdns .Host "seo" "cdn"|SafeUrl}}/jyapp/structuredata/css/weui.min.css?v={{Msg "seo" "version"}}">
 	<link rel="stylesheet" href="{{Cdns .Host "seo" "cdn"|SafeUrl}}/jyapp/structuredata/iconfont/iconfont.css?v={{Msg "seo" "version"}}">
@@ -187,17 +186,18 @@
 			</div>
 		</div>
 		<div class="j-button-group">
-			<a href="javascript:;" class="j-button-cancel" id="j_cancel">
-				<!-- <span class="phone_icon"></span> -->
-				<span class="phone_num">咨询热线:400-108-6670</span>
+			<a onclick="tel('400-108-6670')" class="j-button-cancel" id="j_cancel">
+				<span class="phone_icon"></span>
+				<span>立即咨询</span>
 			</a>
-			<button class="j-button-confirm" id="j_confirm" onclick="learn_more()">了解详情</button>
+			<button class="j-button-confirm" id="j_confirm" onclick="learn_more()">深入了解</button>
 		</div>
 	</div>
 </body>
 <script src="/jyapp/structuredata/js/jquery.min.js"></script>
 <script src="/jyapp/structuredata/js/weui.min.js"></script>
 <script src="/jyapp/structuredata/js/imageViewer.min.js"></script>
+{{include "/common/js.html"}}
 <script>
 	// 监听页面滚动
 	var addEvent = (function(){
@@ -275,5 +275,11 @@
 			});
 		});
 	}
+  //拨打电话
+  function tel(phone){
+    JyObj.callPhone(phone);
+  }
 </script>
+<!--百度统计end-->
+{{include "/common/baiducc.html"}}
 </html>

+ 421 - 110
src/jfw/modules/app/src/web/templates/structeddata/write_infor.html

@@ -11,8 +11,9 @@
         <title>结构化招标数据</title>
         <script src="{{Cdns .Host "seo" "cdn"|SafeUrl}}/jyapp/structuredata/js/rem.js?v={{Msg "seo" "version"}}"></script>
         <link rel="stylesheet" href="{{Cdns .Host "seo" "cdn"|SafeUrl}}/jyapp/structuredata/css/base.css?v={{Msg "seo" "version"}}">
+        <link rel="stylesheet" href="{{Cdns .Host "seo" "cdn"|SafeUrl}}/jyapp/structuredata/css/weui.min.css?v={{Msg "seo" "version"}}">
         <link rel="stylesheet" href="{{Cdns .Host "seo" "cdn"|SafeUrl}}/jyapp/structuredata/iconfont/iconfont.css?v={{Msg "seo" "version"}}">
-        <link rel="stylesheet" href="{{Cdns .Host "seo" "cdn"|SafeUrl}}/jyapp/structuredata/css/write_infor.css?v={{Msg "seo" "version"}}">
+        <link rel="stylesheet" href="{{Cdns .Host "seo" "cdn"|SafeUrl}}/jyapp/structuredata/css/write_infor.css?v={{Msg "seo" "version"}}111">
     </head>
 <body>
     <div id="writeInfo">
@@ -21,135 +22,445 @@
             <span class="header-title">结构化招标数据</span>
             <span class="header-right"></span>
         </div>
-        <div class="infoMain">
-            <div class="info_tip">
-                <p class="tip_text">
-                    请完善信息,我们会尽快和您联系。
-                </p>
+        <div class="weui-tab" id="tab">
+            <div class="weui-navbar">
+                <div class="weui-navbar__item">免费样例
+                    <div class="showline">
+                        <span></span>
+                    </div>
+                </div>
+                <div class="weui-navbar__item">联系客服
+                    <div class="showline">
+                        <span></span>
+                    </div>
+                </div>
+                <div class="weui-navbar__item">自选购买
+                    <div class="showline">
+                        <span></span>
+                    </div>
+                </div>
             </div>
-            <div class="write_input">
-                <div class="write_con">
-                    <div class="write_name">
-                        <div class="write_name_ipt">
-                            <span class="label_name">姓名</span>
-                            <input class="ipt_name" type="text" placeholder="输入姓名">
-                        </div>
+            <div class="weui-tab__panel">
+                <div class="weui-tab__content infoMain mf">
+                    <div class="info_tip">
+                        <p class="tip_text">
+                            请正确填写以下信息,我们将以邮件的形式免费发送一份结构化招标数据至您填写的邮箱内,请注意查收。
+                        </p>
                     </div>
-                    <div class="write_phone">
-                        <div class="write_phone_ipt">
-                            <span class="label_phone">手机号</span>
-                            <input class="ipt_phone" type="text" placeholder="输入手机号" value="{{.T.phone_num}}">
+                    <div class="write_input">
+                        <div class="write_con">
+                            <div class="write_name">
+                                <div class="write_name_ipt">
+                                    <span class="label_name">姓名</span>
+                                    <input class="ipt_name" type="text" placeholder="输入姓名">
+                                </div>
+                            </div>
+                            <div class="write_phone">
+                                <div class="write_phone_ipt">
+                                    <span class="label_phone">手机号</span>
+                                    <input class="ipt_phone" type="text" placeholder="输入手机号">
+                                </div>
+                                <div class="phone_tips" style="display: none;">
+                                    <span class="label_tips"></span>
+                                    <p class="phone_rule">
+                                        手机号格式错误
+                                    </p>
+                                </div>
+                            </div>
+                            <div class="write_email">
+                                <div class="write_phone_ipt">
+                                    <span class="label_phone">邮箱地址</span>
+                                    <input class="ipt_email" type="text" placeholder="输入邮箱地址">
+                                </div>
+                                <div class="email_tips" style="display: none;">
+                                    <span class="label_tips"></span>
+                                    <p class="phone_rule">
+                                        邮箱格式错误
+                                    </p>
+                                </div>
+                            </div>
+                            <div class="email_code">
+                                <div class="write_phone_ipt">
+                                    <span class="label_phone">邮箱验证码</span>
+                                    <input class="ipt_code" type="text" placeholder="输入邮箱验证码">
+                                    <span class="sendEmail" id="sendEmail">发送验证码</span>
+                                    <span class="timedown"></span>
+                                </div>
+                                <!-- <div class="phone_tips" style="display: none;">
+                                    <span class="label_tips"></span>
+                                    <p class="phone_rule">
+                                        验证码错误
+                                    </p>
+                                </div> -->
+                            </div>
                         </div>
-                        <div class="phone_tips" style="display: none;">
-                            <span class="label_tips"></span>
-                            <p class="phone_rule">
-                                手机号格式错误
-                            </p>
+                    </div>
+                    <div class="free_button" id="free_button">
+                        <button class="write_free" id="write_free" disabled>确定</button>
+                    </div>
+                </div>
+                <div class="weui-tab__content infoMain kf">
+                    <div class="info_tip">
+                        <p class="tip_text">
+                            请正确填写手机号,客服人员将会在3个工作日内与您联系,针对结构化招标数据进行详细讲解。
+                        </p>
+                    </div>
+                    <div class="write_input">
+                        <div class="write_con">
+                            <div class="write_name">
+                                <div class="write_name_ipt">
+                                    <span class="label_name">姓名</span>
+                                    <input class="ipt_name" type="text" placeholder="输入姓名">
+                                </div>
+                            </div>
+                            <div class="write_phone">
+                                <div class="write_phone_ipt">
+                                    <span class="label_phone">手机号</span>
+                                    <input class="ipt_phone" type="text" placeholder="输入手机号">
+                                </div>
+                                <div class="phone_tips" style="display: none;">
+                                    <span class="label_tips"></span>
+                                    <p class="phone_rule">
+                                        手机号格式错误
+                                    </p>
+                                </div>
+                            </div>
+                            
                         </div>
                     </div>
-
+                    <div class="run_button" id="run_button">
+                        <button class="write_run" id="write_run" disabled>确定</button>
+                    </div>
+                </div>
+                <div class="weui-tab__content purchase">
+                    <div class="option_purchase">
+                        您可通过剑鱼标讯所提供的全国招投标数据的自助导出功能,根据自身企业,自定义设定关键词、发布时间、地区或行业等筛选条件,以“高级字段包”为选择,少量购买,用于核对数据的精准性。
+                    </div>
+                    <div class="run_now_button" id="run_now_button">
+                        <button class="write_run_now" id="write_run_now">立即前往</button>
+                    </div>
                 </div>
-            </div>
-            <div class="run_button" id="run_button">
-                <button class="write_run" id="write_run" disabled>立即提交</button>
             </div>
         </div>
     </div>
 </body>
 <script src="/jyapp/structuredata/js/jquery.min.js"></script>
+<script src="/jyapp/structuredata/js/weui.min.js"></script>
 <script>
-    (function() {
-        var issubmit = ["false","false"]
-        console.log($('.ipt_name').val())
-        console.log($('.ipt_phone').val())
-        var $iptphone = $('.ipt_phone').val()
-        var $iptname = $('.ipt_phone').val()
-        if($iptname != ''){
-            issubmit[0] = 'true'
-        }else{
-            issubmit[0] = 'false'
-        }
-        if($iptphone != ''){
-            issubmit[1] = 'true'
-        }else{
-            issubmit[1] = 'false'
-        }
-        // 验证手机号格式
-        function isPoneAvailable($poneInput) {
-            var myreg=/^[1][3,4,5,7,8][0-9]{9}$/;
-            if (!myreg.test($poneInput)) {
-                return false;
-            } else {
-                return true;
-            }
-        }
-        // 姓名不能为空
-        function isname($nameInput) {
-            var myreg=/^\s*$/g;
-            var status = /^[\u4e00-\u9fa5]{2,}$/
-            console.log(!myreg.test($nameInput))
-            console.log(status.test($nameInput))
-            if (!myreg.test($nameInput) == true && status.test($nameInput) == true) {
-                return false;
-            } else {
-                return true;
-            }
-        }
+var issubmit = ["false","false"]
+var isfreesubmit = ["false","false","false","false"]
+
+$(function(){
+  $(".write_run_now").on("click",function(){
+    window.location.href="/jyapp/front/dataExport/toSieve?from=structed"
+  })
+  // tabbar
+  weui.tab('#tab',{
+      defaultIndex: 0,
+      onChange: function(index){
+          console.log(index);
+      }
+  });
+  // 姓名输入事件
+  $('.mf .ipt_name').on('input', function() {
+      var namerule =  isname(this.value)
+      if(namerule){
+          issubmit[0] = "false"
+          isfreesubmit[0] = 'false'
+      }else{
+          issubmit[0] = "true"
+          isfreesubmit[0] = 'true'
+      }
+      console.log(issubmit)
+      submit()
+      freesubmit()
+  })
+  
+  // 手机号输入事件
+  $('.mf .ipt_phone').on('input', function() {
+      var phonerule = isPoneAvailable(this.value)
+      if(phonerule){
+          $('.phone_tips').css('display','none')
+          issubmit[1] = "true"
+          isfreesubmit[1] = 'true'
+      }else{
+          $('.phone_tips').css('display','flex')
+          issubmit[1] = "false"
+          isfreesubmit[1] = 'false'
+      }
+      submit()
+      freesubmit()
+  })
+
+  // 邮箱输入事件
+  $('.mf .ipt_email').on('input', function() {
+      var emailrule = isAvailableEmail(this.value)
+      if(emailrule){
+          $('.email_tips').hide()
+          isfreesubmit[2] = 'true'
+          $('.email_code').slideDown()
+      }else{
+          $('.email_tips').css('display','flex')
+          isfreesubmit[2] = 'false'
+          $('.email_code').slideUp()
+      }
+      freesubmit()
+  })
 
-        $('.ipt_name').on('input', function() {
-            var namerule =  isname(this.value)
-            if(namerule){
-                issubmit[0] = "false"
-            }else{
-                issubmit[0] = "true"
-            }
-            console.log(issubmit)
-            submit()
-        })
+  // 邮箱验证码输入事件
+  $('.mf .ipt_code').on('input',function() {
+      // console.log($(this).val().length)
+      var codeLen = $(this).val()
+      var iptEmail = $('.ipt_email').val()
+      if(codeLen.length == 6){
+          $.ajax({
+              url:'/jyapp/structed/verifyCode',
+              type:'POST',
+              data:{
+                  s_email:iptEmail,
+                  verifyCode:codeLen
+              },
+              success:function(res) {
+                  console.log(res)
+                  if(res.status == true) {
+                      isfreesubmit[3] = 'true'
+                      $('.ipt_email').attr('disabled','disabled')
+                      $('.email_code').slideUp()
+                      weui.toast('验证码正确', 1500);
+                  }else{
+                      weui.toast('验证码错误', 1500);
+                      $('.weui-icon_toast').hide()
+                      isfreesubmit[3] = 'false'
+                  }
+                  freesubmit()
+              },
+              error:function(err) {
+                  console.log(err)
 
+              } 
+          })
+      }
+  })
 
-        $('.ipt_phone').on('input', function() {
-            var phonerule = isPoneAvailable(this.value)
-            if(phonerule){
-                $('.phone_tips').css('display','none')
-                issubmit[1] = "true"
-            }else{
-                $('.phone_tips').css('display','flex')
-                issubmit[1] = "false"
-            }
-            submit()
-        })
-        submit()
-        // 立即提交
-        $('.run_button').on('click', function() {
-            var sub_name = $('.ipt_name').val()
-            var sub_phone = $('.ipt_phone').val()
-            $.ajax({
-                url:'/jyapp/structed/savedata',
-                type:'POST',
-                data:{
-                    name:sub_name,
-                    phone_num:sub_phone
-                },
-                success:function(res) {
-                    if(res.data.status == true){
-                        window.location.href = "/jyapp/structed/success"
+  // 免费样例--确定
+  $('.free_button').on('click', function() {
+      var iptname = $('.mf .ipt_name').val()
+      var iptphone = $('.mf .ipt_phone').val()
+      var iptemail = $('.mf .ipt_email').val()
+      $.ajax({
+          url:'/jyapp/structed/freeSamples',
+          type:'POST',
+          data:{
+              name:iptname,
+              phone_num:iptphone,
+              s_email:iptemail
+          },
+          success:function(res){
+              console.log(res)
+              if(res.status == true) {
+                  weui.toast('保存成功', {
+                    duration: 1500,
+                    callback:function(){
+                        history.go(-1)
                     }
-                }
-            })
-        })
+                  });
+              }else{
+                  weui.toast('保存失败', 1500);
+              }
+          },
+          error:function(err){
+              weui.toast('保存失败', 1500);
+          }
+      })
+  })
+
+  // 姓名输入事件
+  $('.kf .ipt_name').on('input', function() {
+      var namerule =  isname(this.value)
+      if(namerule){
+          issubmit[0] = "false"
+          isfreesubmit[0] = 'false'
+      }else{
+          issubmit[0] = "true"
+          isfreesubmit[0] = 'true'
+      }
+      console.log(issubmit)
+      submit()
+      freesubmit()
+  })
+  
+  // 手机号输入事件
+  $('.kf .ipt_phone').on('input', function() {
+      var phonerule = isPoneAvailable(this.value)
+      if(phonerule){
+          $('.phone_tips').css('display','none')
+          issubmit[1] = "true"
+          isfreesubmit[1] = 'true'
+      }else{
+          $('.phone_tips').css('display','flex')
+          issubmit[1] = "false"
+          isfreesubmit[1] = 'false'
+      }
+      submit()
+      freesubmit()
+  })
+  // 立即提交
+  $('.run_button').on('click', function() {
+      var sub_name = $('.kf .ipt_name').val()
+      var sub_phone = $('.kf .ipt_phone').val()
+      $.ajax({
+          url:'/jyapp/structed/savedata',
+          type:'POST',
+          data:{
+              name:sub_name,
+              phone_num:sub_phone
+          },
+          success:function(res) {
+              console.log(res)
+              if(res.error_code == 0){
+                weui.toast('保存成功', {
+                    duration: 1500,
+                    callback:function(){
+                        history.go(-1)
+                    }
+                });
+              }else{
+                weui.toast(res.data["msg"], {
+                    duration: 1500
+                });
+              }
+          }
+      })
+  })
+  // 点击发送验证码
+  $('.sendEmail').on('click', function() {
+      // 先判断邮箱格式
+      var iptemail = $('.ipt_email').val()
+      var emailrule = isAvailableEmail(iptemail)
+      if(emailrule){
+          $('.email_tips').hide()
+          $('.timedown').show()
+          $.ajax({
+              url:'/jyapp/structed/sendMailVerify',
+              type:'POST',
+              data:{
+                  email:iptemail
+              },
+              success:function(res){
+                  console.log(res)
+                  isfreesubmit[3] = 'false';
+                  if(res.errCode == 1){
+                      weui.toast('邮箱格式不正确', {
+                          duration: 1500,
+                          className: 'toast-lang',
+                      });
+                  }else if(res.errCode == 2) {
+                      weui.toast('已发送,5分钟后再尝试', {
+                          duration: 1500,
+                          className: 'toast-lang'
+                      });
+                  }else if(res.errCode == 3) {
+                      weui.toast('验证码发送次数已达今日上限', {
+                          duration: 1500,
+                          className: 'toast-lang',
+                      });
+                  }else if(res.errCode == 4) {
+                      weui.toast('此邮箱已被验证', {
+                          duration: 1500,
+                          className: 'toast-lang',
+                          callback:function(){
+                              $('.email_code').slideUp();
+                              isfreesubmit[3] = 'true';
+                              freesubmit();
+                          }
+                      });
+                  }else if(res.errCode == 5) {
+                      weui.toast('已发送', {
+                          duration: 1500,
+                          className: '',
+                          callback:function(){
+                              setTimeout(()=>{
+                                  $('.sendEmail').hide()
+                              },800)
+                              var time=300;
+                              setTime=setInterval(function(){
+                                if(time<=0){
+                                  $('.timedown').hide()
+                                  $('.sendEmail').show()
+                                  time=299
+                                  clearInterval(setTime);
+                                  return;
+                                }
+                                time--;
+                                $(".timedown").text(time+'s');
+                              },1000);
+                          }
+                      });
+                      
+                  }else{
+                      weui.toast('发送失败', 1500);
+                  }
+                  
+              }
+          })
+      }else{
+          $('.email_tips').show()
+      }
+      
+  })
+})
+// 验证手机号格式
+function isPoneAvailable($poneInput) {
+    var myreg=/^[1][3,4,5,7,8][0-9]{9}$/;
+    if (!myreg.test($poneInput)) {
+        return false;
+    } else {
+        return true;
+    }
+}
+// 姓名不能为空
+function isname($nameInput) {
+    var myreg=/^\s*$/g;
+    if (!myreg.test($nameInput)) {
+        return false;
+    } else {
+        return true;
+    }
+}
+
+// 验证邮箱格式
+function isAvailableEmail($emailInput) {
+    var myreg = /^([a-zA-Z0-9]+[_|\_|\.]?)*[a-zA-Z0-9]+@([a-zA-Z0-9]+[_|\_|\.]?)*[a-zA-Z0-9]+\.[a-zA-Z]{2,3}$/;
+    if(!myreg.test($emailInput)) {
+        return false;
+    } else {
+        return true;
+    }
+}
+
+// 判断提交按钮是否可以点击
+function submit() {
+    if(issubmit.includes('false')) {
+        $('.write_run').attr('disabled',true)
+    } else {
+        $('.write_run').attr('disabled',false)
+    }
+}
+
+// 判断免费样例的按钮是否可以点击
+function freesubmit() {
+    if(isfreesubmit.includes('false')) {
+        $('.write_free').attr('disabled',true)
+    } else {
+        $('.write_free').attr('disabled',false)
+    }
+}
 
-        function submit() {
-            if(issubmit.includes('false')) {
-                $('.write_run').attr('disabled',true)
-            } else {
-                $('.write_run').attr('disabled',false)
-            }
-        }
-    })()
     // 返回
     function fanhui() {
         history.go(-1)
     }
 </script>
+<!--百度统计end-->
+{{include "/common/baiducc.html"}}
 </html>

+ 13 - 0
src/jfw/modules/subscribepay/src/service/dataExportPay_mobile.go

@@ -255,6 +255,19 @@ func (p *DataExportPayMobile) CreateOrder() {
 	if errMsg != "" {
 		log.Println(userId, errMsg)
 	}
+	//保存结构化数据信息 记录
+	go func(ok bool) {
+		if ok && p.GetSession("Structed").(bool) {
+			//姓名  手机号  邮箱
+			nickname, _ := p.GetSession("s_nickname").(string)
+			user_mail, _ := p.GetSession("DataExportVerifyEmail_val").(string)
+			user_phone, _ := p.GetSession("DataExportVerifyPhone").(string)
+			if user_phone == "" {
+				user_phone, _ = p.GetSession("DataExportVerifyPhone_val").(string)
+			}
+			util.StructedDataByExportData(nickname, user_mail, user_phone)
+		}
+	}(ok)
 	p.ServeJson(map[string]interface{}{
 		"success": ok,
 		"data":    payStr,

+ 7 - 0
src/jfw/modules/subscribepay/src/service/dataExportPay_pc.go

@@ -373,6 +373,13 @@ func (p *DataExportPayPC) SacnPay_CreateOrder() {
 			}
 		}
 	}
+	//保存结构化数据信息 记录
+	go func(r map[string]interface{}) {
+		if r["status"] == "y" && p.GetSession("Structed").(bool) {
+			//姓名  手机号  邮箱
+			util.StructedDataByExportData(nickname, user_mail, user_phone)
+		}
+	}(result)
 	p.ServeJson(result)
 }
 

+ 37 - 0
src/jfw/modules/subscribepay/src/util/structed.go

@@ -0,0 +1,37 @@
+package util
+
+import (
+	"fmt"
+	"time"
+)
+
+func StructedDataByExportData(nickname, user_mail, user_phone string) {
+	if nickname != "" && user_mail != "" && user_phone != "" {
+		count := Mysql.Count("structed_data", map[string]interface{}{
+			"name":  nickname,
+			"phone": user_phone,
+			"email": user_mail,
+		})
+		if count >= 1 {
+			fmt.Println("用户信息已存在")
+		} else {
+			stu := Mysql.Insert("structed_data", map[string]interface{}{
+				"name":        nickname,
+				"phone":       user_phone,
+				"email":       user_mail,
+				"submit_time": time.Now().Unix(),
+				"status":      0,
+				"type":        2, //用户来源,0:联系客服,1:免费样例,2:自选购买
+			})
+			if stu == 0 {
+				fmt.Println("数据库操作异常")
+			} else {
+				//清除存储标识
+				p.DelSession("Structed")
+				fmt.Println("保存成功")
+			}
+		}
+	} else {
+		fmt.Println(nickname, "---", user_mail, "---", user_phone)
+	}
+}

+ 10 - 0
src/jfw/public/public.go

@@ -224,3 +224,13 @@ func MapArrSortMerge(arr1, arr2 []map[string]interface{}, mergeFiled, sortFiled
 	// }
 	// return &tmp
 }
+
+func isPhone(value string) bool {
+	var phonePattern = regexp.MustCompile("^[1][3-9][0-9]{9}$")
+	return phonePattern.MatchString(value)
+}
+
+func isEmail(value string) bool {
+	var emailPattern = regexp.MustCompile("^([a-zA-Z0-9_\\-\\.]+)@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.)|(([a-zA-Z0-9\\-]+\\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\\]?)$")
+	return emailPattern.MatchString(value)
+}

+ 53 - 0
src/jfw/public/structed.go

@@ -0,0 +1,53 @@
+package public
+
+import (
+	"fmt"
+	"jfw/config"
+	"log"
+	"qfw/util/mail"
+	"time"
+)
+
+func SendStructedDataByEmail(email string, auth []*mail.GmailAuth) bool {
+	var uploadAddress = config.Sysconfig["webdomain"].(string) + config.Seoconfig["structedUploadA"].(string)
+	var imagesAddress = config.Sysconfig["webdomain"].(string) + "/structuredata/image/emaillogo.png"
+	var feedbackAddress = "mailto:bd@topnet.net.cn"
+
+	if isEmail(email) {
+		html := fmt.Sprintf(`<div style="width:100%%;display: flex;justify-content: center;">
+		<div class="Email" id="Email" style="width: 1200px;height: 400px;display: flex;flex-direction: column;align-items: center;">
+        <div class="emailmain" style="border: 1px solid #ccc;width: 1200px;height: 319px;border-top: 8px solid #2CB7CA;border-radius: 8px;background: #fff; margin-top: 107px;padding: 0px 40px 20px;">
+            <div class="emailmain_top" style="height: 88px;width: 1200px;border-bottom: 1px solid #F7F7F7;display: flex;justify-content: center;align-items: center;">
+                <img src="%s" alt="" style="width: 120px;height: 32px;">
+            </div>
+            <div class="emailmain_bottom" style="display: flex;flex-direction: column;align-items: center;">
+                <p class="emailmain_text" style="margin-top: 32px;width: 960px;min-height: 72px;font-size: 16px;line-height: 24px;color: #1D1D1D;">
+                    尊敬的剑鱼标讯用户:<br> 您好,感谢您使用剑鱼标讯的结构化招标数据产品,免费样例已发送到您的邮箱,请查收!如有问题,可拨打400-108-6670,客服人员将诚挚为您服务。
+                </p>
+                <div class="download" style="margin-top: 32px; width: 1200px; height: 30px;display: flex;justify-content: center;align-items: center;">
+                    <a href="%s" class="download_btn" style="width: 116px;height: 30px;display: flex;text-decoration: none;justify-content: center;align-items: center;font-size: 14px;line-height: 24px;color: #fff;background: #2CB7CA;border-radius: 4px;">下载免费样例 </a>
+                </div>
+            </div>
+        </div>
+        <p class="havapro" style="font-size: 14px;height: 24px;color: #686868;margin-top: 32px;">
+            如有问题请<a href="%s" class="click_here"  id="click_here" style="color: #0987FF;cursor: pointer;">点击此处</a>,进行意见反馈
+        </p>
+    </div></div>`, imagesAddress, uploadAddress, feedbackAddress)
+
+		for k, v := range auth {
+			if mail.GSendMail("剑鱼标讯", email, "", "", "【剑鱼标讯】结构化招标数据", html, "", "", v) {
+				log.Println(email, fmt.Sprintf("使用%s发送邮件成功", v.User))
+				return true
+			}
+			if k < len(auth)-1 {
+				log.Println(email, fmt.Sprintf("使用%s发送邮件失败!3s后使用其他邮箱尝试", v.User))
+			} else {
+				log.Println(email, fmt.Sprintf("使用%s发送邮件失败!", v.User))
+			}
+			time.Sleep(time.Second * 3)
+		}
+	} else {
+		log.Println(fmt.Sprintf("%s 邮件格式有误", email))
+	}
+	return false
+}

+ 2 - 1
src/seo.json

@@ -478,5 +478,6 @@
         "downloadUrl_win": "http://w2blmjy.qmx.top/res/JianYu for Windows.exe",
         "downloadUrl_mac": "http://w2blmjy.qmx.top/res/JianYu for Mac.dmg"
     },
-	"orderCountdown":"72h"
+	"orderCountdown":"72h",
+	"structedUploadA":"/structuredata/file/【剑鱼标讯】结构化招标数据.xlsx"
 }

+ 15 - 0
src/web/staticres/css/dataService.css

@@ -362,3 +362,18 @@
 	left: 110px;
 	top: 175px;
 }
+/*v2.10.10*/
+.dataCustom .dataC{
+	margin-left: 30px;
+    margin-top: 15px;
+}
+.dataCustom .dataC p{
+	    width: 323px;
+    height: 154px;
+    font-size: 16px;
+    font-family: "Microsoft YaHei",sans-serif;
+    font-weight: 400;
+    line-height: 24px;
+    color: rgba(102, 102, 102, 1);
+    opacity: 1;
+}

+ 47 - 35
src/web/staticres/structuredata/css/marketing.css

@@ -5,7 +5,7 @@ html {
 }
 
 body {
-  background: #2F96F4;
+  background: #2f96f4;
 }
 
 #app {
@@ -16,18 +16,6 @@ body {
   position: relative;
 }
 
-#app .jy-app-header {
-  position: absolute;
-  background: transparent;
-}
-
-#app .jy-app-header .fanhui {
-  width: 0.96rem;
-  height: 0.96rem;
-  font-size: 0.36rem;
-  color: #fff;
-}
-
 #app .j-main {
   width: 100%;
   height: 100%;
@@ -131,7 +119,7 @@ body {
   width: 100%;
   height: 0.36rem;
   font-size: 0.24rem;
-  color: #C0C4CC;
+  color: #c0c4cc;
   line-height: 0.36rem;
 }
 
@@ -167,7 +155,7 @@ body {
   background: rgba(47, 150, 244, 0.04);
   font-size: 0.3rem;
   font-weight: bold;
-  color: #2F96F4;
+  color: #2f96f4;
 }
 
 #app .j-main .str_what .str_content .data_mode .data_mode_content {
@@ -217,8 +205,8 @@ body {
   border-radius: 8px 24px 0px 0px;
   background: rgba(47, 150, 244, 0.04);
   font-size: 0.3rem;
+  color: #2f96f4;
   font-weight: bold;
-  color: #2F96F4;
 }
 
 #app .j-main .str_what .str_content .message .message_page {
@@ -235,7 +223,7 @@ body {
   height: 2.88rem;
   font-size: 0.24rem;
   line-height: .36rem;
-  color: #5F5E64;
+  color: #5f5e64;
 }
 
 #app .j-main .str_what .str_content .message .message_page .click_view {
@@ -245,11 +233,11 @@ body {
   width: 2.6rem;
   height: 0.6rem;
   border-radius: .32rem;
-  border: 1px solid #2F96F4;
+  border: 1px solid #2f96f4;
   box-sizing: border-box;
   margin-top: 0.4rem;
   font-size: 0.26rem;
-  color: #2F96F4;
+  color: #2f96f4;
 }
 
 #app .j-main .advantage {
@@ -452,7 +440,7 @@ body {
   height: auto;
   padding-left: .72rem;
   font-size: .24rem;
-  color: #5F5E64;
+  color: #5f5e64;
 }
 
 #app .j-main .company {
@@ -511,29 +499,23 @@ body {
 
 #app .j-button-group {
   display: flex;
-  justify-content: space-between;
   align-items: center;
+  justify-content: space-between;
   width: 100%;
-  height: 1.12rem;
+  height: 1.32rem;
   padding: 0.16rem 0.32rem 0.16rem;
   background-color: #fff;
 }
 
-#app .j-button-group .j-button-confirm,
 #app .j-button-group .j-button-cancel {
-  display: flex;
-  align-items: center;
-  justify-content: center;
-  width: 48%;
-  height: 0.8rem;
-  font-size: 0.32rem;
-  text-align: center;
-  border-radius: 0.16rem;
+  height: .8rem;
+  background: #EDEFF2;
+  color: #171826;
 }
 
-#app .j-button-group .j-button-cancel {
-  background: #EDEFF2;
-  color: #5F5E64;
+#app .j-button-group .j-button-cancel .phone_num {
+  font-size: .28rem;
+  color: #5f5e64;
 }
 
 #app .j-button-group .j-button-cancel .phone_icon {
@@ -546,10 +528,40 @@ body {
 }
 
 #app .j-button-group .j-button-confirm {
-  background: #2ABED1;
+  height: .8rem;
+  background: #2abed1;
   color: #fff;
 }
 
+.jy-app-header.header-transparent {
+  position: absolute;
+  width: 100%;
+  background: transparent;
+  z-index: 999;
+}
+
+.jy-app-header.header-transparent .subreport_title {
+  font-size: 0;
+}
+
+.jy-app-header.header-transparent .fanhui {
+  width: 0.96rem;
+  height: 0.96rem;
+  font-size: 0.36rem;
+  color: #fff;
+}
+
+#app .j-button-group .j-button-confirm,
+#app .j-button-group .j-button-cancel {
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  width: 48%;
+  font-size: 0.32rem;
+  text-align: center;
+  border-radius: 0.16rem;
+}
+
 @keyframes ballRotate {
   0% {
     transform: rotate(0);

+ 114 - 27
src/web/staticres/structuredata/css/write_infor.css

@@ -6,7 +6,26 @@ body, html {
 input::-webkit-input-placeholder, textarea::-webkit-input-placeholder {
   color: #C0C4CC;
   font-size: .32rem;
-  line-height: .48rem;
+}
+
+.weui-toast {
+  min-height: 2.6em;
+  line-height: 2.6em;
+  top: 6rem;
+}
+
+.weui-toast .weui-toast__content {
+  margin: 0;
+}
+
+.weui-icon_toast {
+  display: none;
+}
+
+.toast-lang .weui-toast {
+  width: auto;
+  padding: 0 .5rem;
+  left: 38%;
 }
 
 #writeInfo {
@@ -14,12 +33,49 @@ input::-webkit-input-placeholder, textarea::-webkit-input-placeholder {
   height: 100%;
 }
 
-#writeInfo .infoMain {
+#writeInfo .weui-navbar {
+  height: .96rem;
+}
+
+#writeInfo .weui-navbar .weui-navbar__item {
+  font-size: .28rem;
+  color: #5F5E64;
+  padding: .24rem 0;
+}
+
+#writeInfo .weui-navbar .weui-navbar__item.weui-bar__item_on {
+  color: #2ABED1;
+}
+
+#writeInfo .weui-navbar .weui-navbar__item.weui-bar__item_on, #writeInfo .weui-navbar .weui-navbar__item:active {
+  background: #fff;
+}
+
+#writeInfo .weui-navbar .weui-navbar__item.weui-bar__item_on .showline, #writeInfo .weui-navbar .weui-navbar__item:active .showline {
+  margin-top: .16rem;
+  width: 100%;
+  height: .03rem;
+  display: flex;
+  justify-content: center;
+}
+
+#writeInfo .weui-navbar .weui-navbar__item.weui-bar__item_on .showline span, #writeInfo .weui-navbar .weui-navbar__item:active .showline span {
+  width: .48rem;
+  height: .03rem;
+  background: linear-gradient(270.45deg, #25BEEE 0.03%, #2ABED1 74.46%);
+  border-radius: 1px;
+}
+
+#writeInfo .weui-navbar .weui-navbar__item:after {
+  border-right: 0;
+}
+
+#writeInfo .infoMain, #writeInfo .purchase {
   width: 100%;
   height: 100%;
 }
 
-#writeInfo .infoMain .info_tip {
+#writeInfo .infoMain .info_tip, #writeInfo .purchase .info_tip {
   overflow: hidden;
   width: 100%;
   height: 3.6rem;
@@ -27,36 +83,36 @@ input::-webkit-input-placeholder, textarea::-webkit-input-placeholder {
   background-size: 100% 100%;
 }
 
-#writeInfo .infoMain .info_tip .tip_text {
-  margin-top: 1.04rem;
+#writeInfo .infoMain .info_tip .tip_text, #writeInfo .purchase .info_tip .tip_text {
+  margin-top: .64rem;
   padding: 0 .32rem;
   width: 100%;
   height: .48rem;
-  font-size: .32rem;
+  font-size: .28rem;
   color: #fff;
 }
 
-#writeInfo .infoMain .write_input {
+#writeInfo .infoMain .write_input, #writeInfo .purchase .write_input {
   width: 100%;
   padding: 0 .24rem;
   margin-top: -1.04rem;
 }
 
-#writeInfo .infoMain .write_input .write_con {
+#writeInfo .infoMain .write_input .write_con, #writeInfo .purchase .write_input .write_con {
   width: 100%;
   background: #fff;
   border-radius: 8px;
   margin-top: .08rem;
   overflow: hidden;
+  padding: 0 0 0 .32rem;
 }
 
-#writeInfo .infoMain .write_input .write_con .write_name {
+#writeInfo .infoMain .write_input .write_con .write_name, #writeInfo .purchase .write_input .write_con .write_name {
   width: 100%;
-  padding: 0 .32rem;
   margin-top: .08rem;
 }
 
-#writeInfo .infoMain .write_input .write_con .write_name .write_name_ipt {
+#writeInfo .infoMain .write_input .write_con .write_name .write_name_ipt, #writeInfo .purchase .write_input .write_con .write_name .write_name_ipt {
   width: 100%;
   height: 1.08rem;
   display: flex;
@@ -64,7 +120,7 @@ input::-webkit-input-placeholder, textarea::-webkit-input-placeholder {
   box-shadow: inset 0px -0.5px 0px rgba(0, 0, 0, 0.05), inset 16px 0px 0px #FFFFFF;
 }
 
-#writeInfo .infoMain .write_input .write_con .write_name .write_name_ipt .label_name {
+#writeInfo .infoMain .write_input .write_con .write_name .write_name_ipt .label_name, #writeInfo .purchase .write_input .write_con .write_name .write_name_ipt .label_name {
   display: flex;
   align-items: center;
   width: 1.6rem;
@@ -74,30 +130,29 @@ input::-webkit-input-placeholder, textarea::-webkit-input-placeholder {
   color: #5F5E64;
 }
 
-#writeInfo .infoMain .write_input .write_con .write_name .write_name_ipt .ipt_name {
+#writeInfo .infoMain .write_input .write_con .write_name .write_name_ipt .ipt_name, #writeInfo .purchase .write_input .write_con .write_name .write_name_ipt .ipt_name {
   height: .48rem;
   display: flex;
   align-items: center;
   padding-top: .08rem;
   font-size: .32rem;
-  color: #171826;
 }
 
-#writeInfo .infoMain .write_input .write_con .write_phone {
+#writeInfo .infoMain .write_input .write_con .write_phone, #writeInfo .infoMain .write_input .write_con .write_email, #writeInfo .infoMain .write_input .write_con .email_code, #writeInfo .purchase .write_input .write_con .write_phone, #writeInfo .purchase .write_input .write_con .write_email, #writeInfo .purchase .write_input .write_con .email_code {
   width: 100%;
   display: flex;
   flex-direction: column;
+  box-shadow: inset 0px -0.5px 0px rgba(0, 0, 0, 0.05), inset 16px 0px 0px #FFFFFF;
 }
 
-#writeInfo .infoMain .write_input .write_con .write_phone .write_phone_ipt {
+#writeInfo .infoMain .write_input .write_con .write_phone .write_phone_ipt, #writeInfo .infoMain .write_input .write_con .write_email .write_phone_ipt, #writeInfo .infoMain .write_input .write_con .email_code .write_phone_ipt, #writeInfo .purchase .write_input .write_con .write_phone .write_phone_ipt, #writeInfo .purchase .write_input .write_con .write_email .write_phone_ipt, #writeInfo .purchase .write_input .write_con .email_code .write_phone_ipt {
   width: 100%;
   height: 1.08rem;
   display: flex;
   align-items: center;
-  padding: 0 .32rem;
 }
 
-#writeInfo .infoMain .write_input .write_con .write_phone .write_phone_ipt .label_phone {
+#writeInfo .infoMain .write_input .write_con .write_phone .write_phone_ipt .label_phone, #writeInfo .infoMain .write_input .write_con .write_email .write_phone_ipt .label_phone, #writeInfo .infoMain .write_input .write_con .email_code .write_phone_ipt .label_phone, #writeInfo .purchase .write_input .write_con .write_phone .write_phone_ipt .label_phone, #writeInfo .purchase .write_input .write_con .write_email .write_phone_ipt .label_phone, #writeInfo .purchase .write_input .write_con .email_code .write_phone_ipt .label_phone {
   display: flex;
   align-items: center;
   width: 1.6rem;
@@ -107,43 +162,71 @@ input::-webkit-input-placeholder, textarea::-webkit-input-placeholder {
   color: #5F5E64;
 }
 
-#writeInfo .infoMain .write_input .write_con .write_phone .write_phone_ipt .ipt_phone {
+#writeInfo .infoMain .write_input .write_con .write_phone .write_phone_ipt .ipt_phone, #writeInfo .infoMain .write_input .write_con .write_phone .write_phone_ipt .ipt_email, #writeInfo .infoMain .write_input .write_con .write_phone .write_phone_ipt .ipt_code, #writeInfo .infoMain .write_input .write_con .write_email .write_phone_ipt .ipt_phone, #writeInfo .infoMain .write_input .write_con .write_email .write_phone_ipt .ipt_email, #writeInfo .infoMain .write_input .write_con .write_email .write_phone_ipt .ipt_code, #writeInfo .infoMain .write_input .write_con .email_code .write_phone_ipt .ipt_phone, #writeInfo .infoMain .write_input .write_con .email_code .write_phone_ipt .ipt_email, #writeInfo .infoMain .write_input .write_con .email_code .write_phone_ipt .ipt_code, #writeInfo .purchase .write_input .write_con .write_phone .write_phone_ipt .ipt_phone, #writeInfo .purchase .write_input .write_con .write_phone .write_phone_ipt .ipt_email, #writeInfo .purchase .write_input .write_con .write_phone .write_phone_ipt .ipt_code, #writeInfo .purchase .write_input .write_con .write_email .write_phone_ipt .ipt_phone, #writeInfo .purchase .write_input .write_con .write_email .write_phone_ipt .ipt_email, #writeInfo .purchase .write_input .write_con .write_email .write_phone_ipt .ipt_code, #writeInfo .purchase .write_input .write_con .email_code .write_phone_ipt .ipt_phone, #writeInfo .purchase .write_input .write_con .email_code .write_phone_ipt .ipt_email, #writeInfo .purchase .write_input .write_con .email_code .write_phone_ipt .ipt_code {
   height: .48rem;
   display: flex;
   align-items: center;
   padding-top: .08rem;
   font-size: .32rem;
-  color: #171826;
 }
 
-#writeInfo .infoMain .write_input .write_con .write_phone .phone_tips {
+#writeInfo .infoMain .write_input .write_con .write_phone .write_phone_ipt .ipt_code, #writeInfo .infoMain .write_input .write_con .write_email .write_phone_ipt .ipt_code, #writeInfo .infoMain .write_input .write_con .email_code .write_phone_ipt .ipt_code, #writeInfo .purchase .write_input .write_con .write_phone .write_phone_ipt .ipt_code, #writeInfo .purchase .write_input .write_con .write_email .write_phone_ipt .ipt_code, #writeInfo .purchase .write_input .write_con .email_code .write_phone_ipt .ipt_code {
+  width: 3.5rem;
+}
+
+#writeInfo .infoMain .write_input .write_con .write_phone .write_phone_ipt .ipt_email:disabled, #writeInfo .infoMain .write_input .write_con .write_email .write_phone_ipt .ipt_email:disabled, #writeInfo .infoMain .write_input .write_con .email_code .write_phone_ipt .ipt_email:disabled, #writeInfo .purchase .write_input .write_con .write_phone .write_phone_ipt .ipt_email:disabled, #writeInfo .purchase .write_input .write_con .write_email .write_phone_ipt .ipt_email:disabled, #writeInfo .purchase .write_input .write_con .email_code .write_phone_ipt .ipt_email:disabled {
+  background: #fff;
+}
+
+#writeInfo .infoMain .write_input .write_con .write_phone .phone_tips, #writeInfo .infoMain .write_input .write_con .write_phone .email_tips, #writeInfo .infoMain .write_input .write_con .write_email .phone_tips, #writeInfo .infoMain .write_input .write_con .write_email .email_tips, #writeInfo .infoMain .write_input .write_con .email_code .phone_tips, #writeInfo .infoMain .write_input .write_con .email_code .email_tips, #writeInfo .purchase .write_input .write_con .write_phone .phone_tips, #writeInfo .purchase .write_input .write_con .write_phone .email_tips, #writeInfo .purchase .write_input .write_con .write_email .phone_tips, #writeInfo .purchase .write_input .write_con .write_email .email_tips, #writeInfo .purchase .write_input .write_con .email_code .phone_tips, #writeInfo .purchase .write_input .write_con .email_code .email_tips {
   margin-bottom: .26rem;
   display: flex;
   width: 100%;
   height: .36rem;
-  padding: 0 .32rem;
 }
 
-#writeInfo .infoMain .write_input .write_con .write_phone .phone_tips .label_tips {
+#writeInfo .infoMain .write_input .write_con .write_phone .phone_tips .label_tips, #writeInfo .infoMain .write_input .write_con .write_phone .email_tips .label_tips, #writeInfo .infoMain .write_input .write_con .write_email .phone_tips .label_tips, #writeInfo .infoMain .write_input .write_con .write_email .email_tips .label_tips, #writeInfo .infoMain .write_input .write_con .email_code .phone_tips .label_tips, #writeInfo .infoMain .write_input .write_con .email_code .email_tips .label_tips, #writeInfo .purchase .write_input .write_con .write_phone .phone_tips .label_tips, #writeInfo .purchase .write_input .write_con .write_phone .email_tips .label_tips, #writeInfo .purchase .write_input .write_con .write_email .phone_tips .label_tips, #writeInfo .purchase .write_input .write_con .write_email .email_tips .label_tips, #writeInfo .purchase .write_input .write_con .email_code .phone_tips .label_tips, #writeInfo .purchase .write_input .write_con .email_code .email_tips .label_tips {
   display: flex;
   width: 1.6rem;
   height: .48rem;
 }
 
-#writeInfo .infoMain .write_input .write_con .write_phone .phone_tips .phone_rule {
+#writeInfo .infoMain .write_input .write_con .write_phone .phone_tips .phone_rule, #writeInfo .infoMain .write_input .write_con .write_phone .email_tips .phone_rule, #writeInfo .infoMain .write_input .write_con .write_email .phone_tips .phone_rule, #writeInfo .infoMain .write_input .write_con .write_email .email_tips .phone_rule, #writeInfo .infoMain .write_input .write_con .email_code .phone_tips .phone_rule, #writeInfo .infoMain .write_input .write_con .email_code .email_tips .phone_rule, #writeInfo .purchase .write_input .write_con .write_phone .phone_tips .phone_rule, #writeInfo .purchase .write_input .write_con .write_phone .email_tips .phone_rule, #writeInfo .purchase .write_input .write_con .write_email .phone_tips .phone_rule, #writeInfo .purchase .write_input .write_con .write_email .email_tips .phone_rule, #writeInfo .purchase .write_input .write_con .email_code .phone_tips .phone_rule, #writeInfo .purchase .write_input .write_con .email_code .email_tips .phone_rule {
   height: 100%;
   font-size: .24rem;
   color: #FB483D;
 }
 
-#writeInfo .infoMain .run_button {
+#writeInfo .infoMain .write_input .write_con .email_code .write_phone_ipt .label_phone, #writeInfo .purchase .write_input .write_con .email_code .write_phone_ipt .label_phone {
+  font-size: .28rem;
+}
+
+#writeInfo .infoMain .write_input .write_con .email_code .write_phone_ipt .sendEmail, #writeInfo .purchase .write_input .write_con .email_code .write_phone_ipt .sendEmail {
+  font-size: .28rem;
+  color: #9B9CA3;
+}
+
+#writeInfo .infoMain .write_input .write_con .email_code .write_phone_ipt .timedown, #writeInfo .purchase .write_input .write_con .email_code .write_phone_ipt .timedown {
+  display: none;
+  font-size: .28rem;
+  text-align: center;
+  color: #C0C4CC;
+}
+
+#writeInfo .infoMain .option_purchase, #writeInfo .purchase .option_purchase {
+  padding: .64rem .64rem .36rem;
+  font-size: .28rem;
+  color: #171826;
+}
+
+#writeInfo .infoMain .run_button, #writeInfo .infoMain .free_button, #writeInfo .infoMain .run_now_button, #writeInfo .purchase .run_button, #writeInfo .purchase .free_button, #writeInfo .purchase .run_now_button {
   margin-top: .6rem;
   width: 100%;
   height: .92rem;
   padding: 0 .32rem;
 }
 
-#writeInfo .infoMain .run_button .write_run {
+#writeInfo .infoMain .run_button .write_run, #writeInfo .infoMain .run_button .write_free, #writeInfo .infoMain .run_button .write_run_now, #writeInfo .infoMain .free_button .write_run, #writeInfo .infoMain .free_button .write_free, #writeInfo .infoMain .free_button .write_run_now, #writeInfo .infoMain .run_now_button .write_run, #writeInfo .infoMain .run_now_button .write_free, #writeInfo .infoMain .run_now_button .write_run_now, #writeInfo .purchase .run_button .write_run, #writeInfo .purchase .run_button .write_free, #writeInfo .purchase .run_button .write_run_now, #writeInfo .purchase .free_button .write_run, #writeInfo .purchase .free_button .write_free, #writeInfo .purchase .free_button .write_run_now, #writeInfo .purchase .run_now_button .write_run, #writeInfo .purchase .run_now_button .write_free, #writeInfo .purchase .run_now_button .write_run_now {
   display: flex;
   align-items: center;
   justify-content: center;
@@ -155,8 +238,12 @@ input::-webkit-input-placeholder, textarea::-webkit-input-placeholder {
   font-size: .36rem;
 }
 
-#writeInfo .infoMain .run_button .write_run:disabled {
+#writeInfo .infoMain .run_button .write_run:disabled, #writeInfo .infoMain .run_button .write_free:disabled, #writeInfo .infoMain .free_button .write_run:disabled, #writeInfo .infoMain .free_button .write_free:disabled, #writeInfo .infoMain .run_now_button .write_run:disabled, #writeInfo .infoMain .run_now_button .write_free:disabled, #writeInfo .purchase .run_button .write_run:disabled, #writeInfo .purchase .run_button .write_free:disabled, #writeInfo .purchase .free_button .write_run:disabled, #writeInfo .purchase .free_button .write_free:disabled, #writeInfo .purchase .run_now_button .write_run:disabled, #writeInfo .purchase .run_now_button .write_free:disabled {
   background: #87DFEA;
   color: #FFFFFF;
   opacity: 0.65;
 }
+
+#writeInfo .purchase {
+  background: #fff;
+}

BIN
src/web/staticres/structuredata/file/【剑鱼标讯】结构化招标数据.xlsx


BIN
src/web/staticres/structuredata/image/emaillogo.png


+ 11 - 2
src/web/templates/pc/dataExport_sieve.html

@@ -1525,7 +1525,7 @@
         // console.log(param);
         $.post("/front/dataExport/sieveData", param, function (data) {
             if (data.success) {
-                window.location.href = data.redirectUrl;
+                window.location.href = data.redirectUrl+"?from="+GetQueryString("from");
             }
         }, 'json');
     });
@@ -1584,7 +1584,16 @@
         $("#addWinner").hide();
         $("#winnerInput").show();
     });
-
+    function GetQueryString(name) { 
+      var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i"); 
+      var r = window.location.search.substr(1).match(reg); //获取url中"?"符后的字符串并正则匹配
+      var context = ""; 
+      if (r != null) 
+         context = r[2]; 
+      reg = null; 
+      r = null; 
+      return context == null || context == "" || context == "undefined" ? "" : context; 
+    }
     function setLocalStorage(param) {
         if(param){
             localStorage.setItem(prefix_storage+"params",toStr(param));

+ 11 - 8
src/web/templates/pc/dataService.html

@@ -12,7 +12,7 @@
     {{include "/common/pnc.html"}}
     <script type="text/javascript" src="{{Msg "seo" "cdn"}}/pccss/n_rem.js?v={{Msg "seo" "version"}}"></script>
     <script type="text/javascript" src="{{Msg "seo" "cdn"}}/js/public-nav.js?v={{Msg "seo" "version"}}"></script>
-    <link rel="stylesheet" href="{{Msg "seo" "cdn"}}/css/dataService.css?v={{Msg "seo" "version"}}1">
+    <link rel="stylesheet" href="{{Msg "seo" "cdn"}}/css/dataService.css?v={{Msg "seo" "version"}}">
     <link href="{{Msg "seo" "cdn"}}/css/pc.css?v={{Msg "seo" "version"}}" rel="stylesheet">
     <link rel="stylesheet" type="text/css" href="{{Msg "seo" "cdn"}}/pccss/reset_pc.css?v={{Msg "seo" "version"}}" />
     <link rel="stylesheet" type="text/css" href="{{Msg "seo" "cdn"}}/pccss/public-nav-1200.css?v={{Msg "seo" "version"}}" />
@@ -155,10 +155,10 @@
                   <span >点击进入></span>
               </button>
           </div>
-          <div class="dataCustom">
+          <div class="dataCustom dataExport">
               <div class="top">
                   <img class="left1" src="/images/dataService/left.png" alt="">
-                  <span>数据定制服务</span>
+                  <span>结构化招标数据</span>
                   <img class="right1" src="/images/dataService/right.png" alt="">
               </div>
               <div class="rr">
@@ -166,14 +166,17 @@
                       剑鱼标讯提供招投标数据接口对接、招投标数据挖掘、招投标数据分析报告等定制服务,解决企业的商机获取、竞争对手跟踪、市场分析等多种应用场景需求。
                   </p>
               </div>
-              <div class="tel">
-                  <p>
-                      电话:400-108-6670
-                  </p>
+              <div class="help">
+                  <p>为你提供</p>
+              </div>
+              <div class="dataC">
                   <p>
-                      邮箱:bd@topnet.net.cn
+                      项目名称、项目编号、项目范围、采购单位、招标代理机构、预算、采购单位联系人、采购单位电话、采购单位地址、招标代理机构联系人、招标代理机构联系方式......多达30+信息字段
                   </p>
               </div>
+              <button id="pc-dataExport" onclick="window.open('/front/structed/pc_index.html')">
+                  <span >点击进入></span>
+              </button>
           </div>
       </div>
     </div>

+ 1 - 1
src/web/templates/structuredata/marketing.html → src/web/templates/structuredata/marketing_wx.html

@@ -186,7 +186,7 @@
 				<span class="phone_icon"></span>
 				<span>立即咨询</span>
 			</a>
-			<button class="j-button-confirm" id="j_confirm" onclick="learn_more()">了解详情</button>
+			<button class="j-button-confirm" id="j_confirm" onclick="learn_more()">深入了解</button>
 		</div>
 	</div>
 	{{include "/common/baiducc.html"}}

+ 55 - 0
src/web/templates/structuredata/pc/index.html

@@ -0,0 +1,55 @@
+<html>
+<head>
+    <meta charset="UTF-8">
+    <title>广告服务_剑鱼标讯,全行业招标信息智能推送领导者!</title>
+    {{include "/common/pnc.html"}}
+    <link href="{{Msg "seo" "cdn"}}/css/pc.css?v={{Msg "seo" "version"}}" rel="stylesheet">
+	<link rel="stylesheet" type="text/css" href="{{Msg "seo" "cdn"}}/pccss/reset_pc.css?v={{Msg "seo" "version"}}" />
+	<link rel="stylesheet" type="text/css" href="{{Msg "seo" "cdn"}}/pccss/public-nav-1200.css?v={{Msg "seo" "version"}}" />
+	<link rel="stylesheet" type="text/css" href="{{Msg "seo" "cdn"}}/pccss/adCss.css?v={{Msg "seo" "version"}}" />
+	<script type="text/javascript" src="{{Msg "seo" "cdn"}}/js/TweenMax.min.js?v={{Msg "seo" "version"}}"></script>
+	<script type="text/javascript" src="{{Msg "seo" "cdn"}}/js/public-nav.js?v={{Msg "seo" "version"}}"></script>
+	<script type="text/javascript" src="{{Msg "seo" "cdn"}}/js/guanggao.js?v={{Msg "seo" "version"}}"></script>
+	<script>
+		$(function(){
+			//
+			haslogin({{.T.logid}});
+			selcetIndexNav(8)
+		})
+	</script>
+</head>
+<body class="indexpage">
+{{include "/common/pchead.html"}}
+<div class="advertisement-1">
+	<div class="iner w">
+		<div class="text">
+			<h3>广告服务</h3>
+			<p>ADVERTISING SERVICES</p>
+		</div>
+		<div class="animated">
+			<img class="jy" src="{{Msg "seo" "cdn"}}/images/pc/gg-jy-bg.png?v={{Msg "seo" "version"}}"/>
+			<img class="jy-bg" src="{{Msg "seo" "cdn"}}/images/pc/gg-r-bg.png"/>
+			<img class="b-1" src="{{Msg "seo" "cdn"}}/images/pc/gg-1.png"/>
+			<img class="b-2" src="{{Msg "seo" "cdn"}}/images/pc/gg-2.png"/>
+			<img class="b-3" src="{{Msg "seo" "cdn"}}/images/pc/gg-3.png"/>
+			<img class="b-4" src="{{Msg "seo" "cdn"}}/images/pc/gg-4.png"/>
+		</div>
+	</div>
+</div>
+<div class="coopbanner1" style="display:none;">
+	<div class="adv-1">
+		<img src="{{Msg "seo" "cdn"}}/images/adv-banner1.jpg"/>
+	</div>
+</div>
+<div class="coopbanner2">
+	<div class="adv-2">
+		<img style="width: 100%;" src="{{Msg "seo" "cdn"}}/images/aboutus_1/computer2.jpg?v={{Msg "seo" "version"}}"/>
+	</div>
+	<div class="adv-text">
+		<div class="adv-text-content">广告服务和刊例索取请联系 jy@topnet.net.cn</div>
+	</div>
+</div>
+{{include "/common/pcbottom.html"}}
+{{include "/common/baiducc.html"}}
+</body>
+</html>

+ 55 - 0
src/web/templates/structuredata/pc/info.html

@@ -0,0 +1,55 @@
+<html>
+<head>
+    <meta charset="UTF-8">
+    <title>广告服务_剑鱼标讯,全行业招标信息智能推送领导者!</title>
+    {{include "/common/pnc.html"}}
+    <link href="{{Msg "seo" "cdn"}}/css/pc.css?v={{Msg "seo" "version"}}" rel="stylesheet">
+	<link rel="stylesheet" type="text/css" href="{{Msg "seo" "cdn"}}/pccss/reset_pc.css?v={{Msg "seo" "version"}}" />
+	<link rel="stylesheet" type="text/css" href="{{Msg "seo" "cdn"}}/pccss/public-nav-1200.css?v={{Msg "seo" "version"}}" />
+	<link rel="stylesheet" type="text/css" href="{{Msg "seo" "cdn"}}/pccss/adCss.css?v={{Msg "seo" "version"}}" />
+	<script type="text/javascript" src="{{Msg "seo" "cdn"}}/js/TweenMax.min.js?v={{Msg "seo" "version"}}"></script>
+	<script type="text/javascript" src="{{Msg "seo" "cdn"}}/js/public-nav.js?v={{Msg "seo" "version"}}"></script>
+	<script type="text/javascript" src="{{Msg "seo" "cdn"}}/js/guanggao.js?v={{Msg "seo" "version"}}"></script>
+	<script>
+		$(function(){
+			//
+			haslogin({{.T.logid}});
+			selcetIndexNav(8)
+		})
+	</script>
+</head>
+<body class="indexpage">
+{{include "/common/pchead.html"}}
+<div class="advertisement-1">
+	<div class="iner w">
+		<div class="text">
+			<h3>广告服务</h3>
+			<p>ADVERTISING SERVICES</p>
+		</div>
+		<div class="animated">
+			<img class="jy" src="{{Msg "seo" "cdn"}}/images/pc/gg-jy-bg.png?v={{Msg "seo" "version"}}"/>
+			<img class="jy-bg" src="{{Msg "seo" "cdn"}}/images/pc/gg-r-bg.png"/>
+			<img class="b-1" src="{{Msg "seo" "cdn"}}/images/pc/gg-1.png"/>
+			<img class="b-2" src="{{Msg "seo" "cdn"}}/images/pc/gg-2.png"/>
+			<img class="b-3" src="{{Msg "seo" "cdn"}}/images/pc/gg-3.png"/>
+			<img class="b-4" src="{{Msg "seo" "cdn"}}/images/pc/gg-4.png"/>
+		</div>
+	</div>
+</div>
+<div class="coopbanner1" style="display:none;">
+	<div class="adv-1">
+		<img src="{{Msg "seo" "cdn"}}/images/adv-banner1.jpg"/>
+	</div>
+</div>
+<div class="coopbanner2">
+	<div class="adv-2">
+		<img style="width: 100%;" src="{{Msg "seo" "cdn"}}/images/aboutus_1/computer2.jpg?v={{Msg "seo" "version"}}"/>
+	</div>
+	<div class="adv-text">
+		<div class="adv-text-content">广告服务和刊例索取请联系 jy@topnet.net.cn</div>
+	</div>
+</div>
+{{include "/common/pcbottom.html"}}
+{{include "/common/baiducc.html"}}
+</body>
+</html>

+ 0 - 140
src/web/templates/structuredata/write_infor.html

@@ -1,140 +0,0 @@
-<!DOCTYPE html>
-<html lang="zh-CN">
-    <head>
-        <meta charset="UTF-8">
-        <meta name="viewport"
-            content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
-        <meta name="apple-mobile-web-app-capable" content="yes">
-        <meta name="apple-mobile-web-app-status-bar-style" content="black">
-        <meta http-equiv="X-UA-Compatible" content="ie=edge">
-        <meta http-equiv="X-UA-Compatible" content="ie=edge">
-        <title>结构化招标数据</title>
-        <script src="{{Msg "seo" "cdn"}}/structuredata/js/rem.js?v={{Msg "seo" "version"}}"></script>
-        <link rel="stylesheet" href="{{Msg "seo" "cdn"}}/structuredata/css/base.css?v={{Msg "seo" "version"}}">
-        <link rel="stylesheet" href="{{Msg "seo" "cdn"}}/structuredata/iconfont/iconfont.css?v={{Msg "seo" "version"}}">
-        <link rel="stylesheet" href="{{Msg "seo" "cdn"}}/structuredata/css/write_infor.css?v={{Msg "seo" "version"}}">
-    </head>
-<body>
-    <div id="writeInfo">
-        <div class="infoMain">
-            <div class="info_tip">
-                <p class="tip_text">
-                    请完善信息,我们会尽快和您联系。
-                </p>
-            </div>
-            <div class="write_input">
-                <div class="write_con">
-                    <div class="write_name">
-                        <div class="write_name_ipt">
-                            <span class="label_name">姓名</span>
-                            <input class="ipt_name" type="text" placeholder="输入姓名">
-                        </div>
-                    </div>
-                    <div class="write_phone">
-                        <div class="write_phone_ipt">
-                            <span class="label_phone">手机号</span>
-                            <input class="ipt_phone" type="text" placeholder="输入手机号" value="{{.T.phone_num}}">
-                        </div>
-                        <div class="phone_tips" style="display: none;">
-                            <span class="label_tips"></span>
-                            <p class="phone_rule">
-                                手机号格式错误
-                            </p>
-                        </div>
-                    </div>
-                    
-                </div>
-            </div>
-            <div class="run_button" id="run_button">
-                <button class="write_run" id="write_run" disabled>立即提交</button>
-            </div>
-        </div>
-    </div>
-</body>
-<script src="/structuredata/js/jquery.min.js"></script>
-<script>
-    (function() {
-        var issubmit = ["false","false"]
-        console.log($('.ipt_phone').val())
-        var $iptphone = $('.ipt_phone').val()
-        if($iptphone != ''){
-            issubmit[1] = 'true'
-        }else{
-            issubmit[1] = 'false'
-        }
-        // 验证手机号格式
-        function isPoneAvailable($poneInput) {
-            var myreg=/^[1][3,4,5,7,8][0-9]{9}$/;
-            if (!myreg.test($poneInput)) {
-                return false;
-            } else {
-                return true;
-            }
-        }
-        // 姓名不能为空
-        function isname($nameInput) {
-            var myreg=/^\s*$/g;
-            var status = /^[\u4e00-\u9fa5]{2,}$/
-            console.log(!myreg.test($nameInput))
-            console.log(status.test($nameInput))
-            if (!myreg.test($nameInput) == true && status.test($nameInput) == true) {
-                return false;
-            } else {
-                return true;
-            }
-        }
-
-        $('.ipt_name').on('input', function() {
-            var namerule =  isname(this.value)
-            if(namerule){
-                issubmit[0] = "false"
-            }else{
-                issubmit[0] = "true"
-            }
-            console.log(issubmit)
-            submit()
-        })
-        
-        
-        $('.ipt_phone').on('input', function() {
-            var phonerule = isPoneAvailable(this.value)
-            if(phonerule){
-                $('.phone_tips').css('display','none')
-                issubmit[1] = "true"
-            }else{
-                $('.phone_tips').css('display','flex')
-                issubmit[1] = "false"
-            }
-            submit()
-        })
-
-        // 立即提交
-        $('.run_button').on('click', function() {
-            var sub_name = $('.ipt_name').val()
-            var sub_phone = $('.ipt_phone').val()
-            $.ajax({
-                url:'/front/structed/savedata',
-                type:'POST',
-                data:{
-                    name:sub_name,
-                    phone_num:sub_phone
-                },
-                success:function(res) {
-                    if(res.data.status == true){
-                        window.location.href = "/front/structed/success"
-                    }
-                }
-            })
-        })
-
-
-        function submit() {
-            if(issubmit.includes('false')) {
-                $('.write_run').attr('disabled',true)
-            } else {
-                $('.write_run').attr('disabled',false)
-            }
-        }
-    })()
-</script>
-</html>

+ 467 - 0
src/web/templates/structuredata/write_infor_wx.html

@@ -0,0 +1,467 @@
+<!DOCTYPE html>
+<html lang="zh-CN">
+    <head>
+        <meta charset="UTF-8">
+        <meta name="viewport"
+            content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
+        <meta name="apple-mobile-web-app-capable" content="yes">
+        <meta name="apple-mobile-web-app-status-bar-style" content="black">
+        <meta http-equiv="X-UA-Compatible" content="ie=edge">
+        <meta http-equiv="X-UA-Compatible" content="ie=edge">
+        <title>结构化招标数据</title>
+        <script src="{{Msg "seo" "cdn"}}/structuredata/js/rem.js?v={{Msg "seo" "version"}}"></script>
+        <link rel="stylesheet" href="{{Msg "seo" "cdn"}}/structuredata/css/base.css?v={{Msg "seo" "version"}}">
+        <link rel="stylesheet" href="{{Msg "seo" "cdn"}}/structuredata/iconfont/iconfont.css?v={{Msg "seo" "version"}}">
+        <link rel="stylesheet" href="{{Msg "seo" "cdn"}}/structuredata/css/weui.min.css?v={{Msg "seo" "version"}}">
+        <link rel="stylesheet" href="{{Msg "seo" "cdn"}}/structuredata/css/write_infor.css?v={{Msg "seo" "version"}}">
+    </head>
+<body>
+    <div id="writeInfo">
+    <div class="weui-tab" id="tab">
+            <div class="weui-navbar">
+                <div class="weui-navbar__item">免费样例
+                    <div class="showline">
+                        <span></span>
+                    </div>
+                </div>
+                <div class="weui-navbar__item">联系客服
+                    <div class="showline">
+                        <span></span>
+                    </div>
+                </div>
+                <div class="weui-navbar__item">自选购买
+                    <div class="showline">
+                        <span></span>
+                    </div>
+                </div>
+            </div>
+            <div class="weui-tab__panel">
+                <div class="weui-tab__content infoMain mf">
+                    <div class="info_tip">
+                        <p class="tip_text">
+                            请正确填写以下信息,我们将以邮件的形式免费发送一份结构化招标数据至您填写的邮箱内,请注意查收。
+                        </p>
+                    </div>
+                    <div class="write_input">
+                        <div class="write_con">
+                            <div class="write_name">
+                                <div class="write_name_ipt">
+                                    <span class="label_name">姓名</span>
+                                    <input class="ipt_name" type="text" placeholder="输入姓名">
+                                </div>
+                            </div>
+                            <div class="write_phone">
+                                <div class="write_phone_ipt">
+                                    <span class="label_phone">手机号</span>
+                                    <input class="ipt_phone" type="text" placeholder="输入手机号" value="{{.T.phone_num}}">
+                                </div>
+                                <div class="phone_tips" style="display: none;">
+                                    <span class="label_tips"></span>
+                                    <p class="phone_rule">
+                                        手机号格式错误
+                                    </p>
+                                </div>
+                            </div>
+                            <div class="write_email">
+                                <div class="write_phone_ipt">
+                                    <span class="label_phone">邮箱地址</span>
+                                    <input class="ipt_email" type="text" placeholder="输入邮箱地址" value="{{.T.s_myemail}}">
+                                </div>
+                                <div class="email_tips" style="display: none;">
+                                    <span class="label_tips"></span>
+                                    <p class="phone_rule">
+                                        邮箱格式错误
+                                    </p>
+                                </div>
+                            </div>
+                            <div class="email_code">
+                                <div class="write_phone_ipt">
+                                    <span class="label_phone">邮箱验证码</span>
+                                    <input class="ipt_code" type="text" placeholder="输入邮箱验证码">
+                                    <span class="sendEmail" id="sendEmail">发送验证码</span>
+                                    <span class="timedown"></span>
+                                </div>
+                                <!-- <div class="phone_tips" style="display: none;">
+                                    <span class="label_tips"></span>
+                                    <p class="phone_rule">
+                                        验证码错误
+                                    </p>
+                                </div> -->
+                            </div>
+                        </div>
+                    </div>
+                    <div class="free_button" id="free_button">
+                        <button class="write_free" id="write_free" disabled>确定</button>
+                    </div>
+                </div>
+                <div class="weui-tab__content infoMain kf">
+                    <div class="info_tip">
+                        <p class="tip_text">
+                            请正确填写手机号,客服人员将会在3个工作日内与您联系,针对结构化招标数据进行详细讲解。
+                        </p>
+                    </div>
+                    <div class="write_input">
+                        <div class="write_con">
+                            <div class="write_name">
+                                <div class="write_name_ipt">
+                                    <span class="label_name">姓名</span>
+                                    <input class="ipt_name" type="text" placeholder="输入姓名">
+                                </div>
+                            </div>
+                            <div class="write_phone">
+                                <div class="write_phone_ipt">
+                                    <span class="label_phone">手机号</span>
+                                    <input class="ipt_phone" type="text" placeholder="输入手机号" value="{{.T.phone_num}}">
+                                </div>
+                                <div class="phone_tips" style="display: none;">
+                                    <span class="label_tips"></span>
+                                    <p class="phone_rule">
+                                        手机号格式错误
+                                    </p>
+                                </div>
+                            </div>
+                            
+                        </div>
+                    </div>
+                    <div class="run_button" id="run_button">
+                        <button class="write_run" id="write_run" disabled>确定</button>
+                    </div>
+                </div>
+                <div class="weui-tab__content purchase">
+                    <div class="option_purchase">
+                        您可通过剑鱼标讯所提供的全国招投标数据的自助导出功能,根据自身企业,自定义设定关键词、发布时间、地区或行业等筛选条件,以“高级字段包”为选择,少量购买,用于核对数据的精准性。
+                    </div>
+                    <div class="run_now_button" id="run_now_button">
+                        <button class="write_run_now" id="write_run_now">立即前往</button>
+                    </div>
+                </div>
+            </div>
+        </div>
+    </div>
+</body>
+<script src="/structuredata/js/jquery.min.js"></script>
+<script src="/structuredata/js/weui.min.js"></script>
+<script>
+var issubmit = ["false","false"]
+var isfreesubmit = ["false","false","false","false"]
+
+$(function(){
+  $(".write_run_now").on("click",function(){
+    window.location.href="/front/wx_dataExport/toSieve?from=structed"
+  })
+  // tabbar
+  weui.tab('#tab',{
+      defaultIndex: 0,
+      onChange: function(index){
+          console.log(index);
+      }
+  });
+  // 姓名输入事件
+  $('.mf .ipt_name').on('input', function() {
+      var namerule =  isname(this.value)
+      if(namerule){
+          issubmit[0] = "false"
+          isfreesubmit[0] = 'false'
+      }else{
+          issubmit[0] = "true"
+          isfreesubmit[0] = 'true'
+      }
+      console.log(issubmit)
+      submit()
+      freesubmit()
+  })
+  
+  // 手机号输入事件
+  $('.mf .ipt_phone').on('input', function() {
+      var phonerule = isPoneAvailable(this.value)
+      if(phonerule){
+          $('.phone_tips').css('display','none')
+          issubmit[1] = "true"
+          isfreesubmit[1] = 'true'
+      }else{
+          $('.phone_tips').css('display','flex')
+          issubmit[1] = "false"
+          isfreesubmit[1] = 'false'
+      }
+      submit()
+      freesubmit()
+  })
+
+  // 邮箱输入事件
+  $('.mf .ipt_email').on('input', function() {
+      var emailrule = isAvailableEmail(this.value)
+      if(emailrule){
+          $('.email_tips').hide()
+          isfreesubmit[2] = 'true'
+          $('.email_code').slideDown()
+      }else{
+          $('.email_tips').css('display','flex')
+          isfreesubmit[2] = 'false'
+          $('.email_code').slideUp()
+      }
+      freesubmit()
+  })
+
+  // 邮箱验证码输入事件
+  $('.mf .ipt_code').on('input',function() {
+      // console.log($(this).val().length)
+      var codeLen = $(this).val()
+      var iptEmail = $('.ipt_email').val()
+      if(codeLen.length == 6){
+          $.ajax({
+              url:'/front/structed/verifyCode',
+              type:'POST',
+              data:{
+                  s_email:iptEmail,
+                  verifyCode:codeLen
+              },
+              success:function(res) {
+                  console.log(res)
+                  if(res.status == true) {
+                      isfreesubmit[3] = 'true'
+                      $('.ipt_email').attr('disabled','disabled')
+                      $('.email_code').slideUp()
+                      weui.toast('验证码正确', 1500);
+                  }else{
+                      weui.toast('验证码错误', 1500);
+                      $('.weui-icon_toast').hide()
+                      isfreesubmit[3] = 'false'
+                  }
+                  freesubmit()
+              },
+              error:function(err) {
+                  console.log(err)
+
+              } 
+          })
+      }
+  })
+
+  // 免费样例--确定
+  $('.free_button').on('click', function() {
+      var iptname = $('.mf .ipt_name').val()
+      var iptphone = $('.mf .ipt_phone').val()
+      var iptemail = $('.mf .ipt_email').val()
+      $.ajax({
+          url:'/front/structed/freeSamples',
+          type:'POST',
+          data:{
+              name:iptname,
+              phone_num:iptphone,
+              s_email:iptemail
+          },
+          success:function(res){
+              console.log(res)
+              if(res.status == true) {
+                  weui.toast('保存成功', {
+                    duration: 1500,
+                    callback:function(){
+                        history.go(-1)
+                    }
+                  });
+              }else{
+                  weui.toast('保存失败', 1500);
+              }
+          },
+          error:function(err){
+              weui.toast('保存失败', 1500);
+          }
+      })
+  })
+
+  // 姓名输入事件
+  $('.kf .ipt_name').on('input', function() {
+      var namerule =  isname(this.value)
+      if(namerule){
+          issubmit[0] = "false"
+          isfreesubmit[0] = 'false'
+      }else{
+          issubmit[0] = "true"
+          isfreesubmit[0] = 'true'
+      }
+      console.log(issubmit)
+      submit()
+      freesubmit()
+  })
+  
+  // 手机号输入事件
+  $('.kf .ipt_phone').on('input', function() {
+      var phonerule = isPoneAvailable(this.value)
+      if(phonerule){
+          $('.phone_tips').css('display','none')
+          issubmit[1] = "true"
+          isfreesubmit[1] = 'true'
+      }else{
+          $('.phone_tips').css('display','flex')
+          issubmit[1] = "false"
+          isfreesubmit[1] = 'false'
+      }
+      submit()
+      freesubmit()
+  })
+  // 立即提交
+  $('.run_button').on('click', function() {
+      var sub_name = $('.kf .ipt_name').val()
+      var sub_phone = $('.kf .ipt_phone').val()
+      $.ajax({
+          url:'/front/structed/savedata',
+          type:'POST',
+          data:{
+              name:sub_name,
+              phone_num:sub_phone
+          },
+          success:function(res) {
+              console.log(res)
+              if(res.error_code == 0){
+                weui.toast('保存成功', {
+                    duration: 1500,
+                    callback:function(){
+                        history.go(-1)
+                    }
+                });
+              }else{
+                weui.toast(res.data["msg"], {
+                    duration: 1500
+                });
+              }
+          }
+      })
+  })
+  // 点击发送验证码
+  $('.sendEmail').on('click', function() {
+      // 先判断邮箱格式
+      var iptemail = $('.ipt_email').val()
+      var emailrule = isAvailableEmail(iptemail)
+      if(emailrule){
+          $('.email_tips').hide()
+          $('.timedown').show()
+          $.ajax({
+              url:'/front/structed/sendMailVerify',
+              type:'POST',
+              data:{
+                  email:iptemail
+              },
+              success:function(res){
+                  console.log(res)
+                  isfreesubmit[3] = 'false';
+                  if(res.errCode == 1){
+                      weui.toast('邮箱格式不正确', {
+                          duration: 1500,
+                          className: '',
+                      });
+                  }else if(res.errCode == 2) {
+                      weui.toast('已发送,5分钟后再尝试', {
+                          duration: 1500,
+                          className: 'toast-lang'
+                      });
+                  }else if(res.errCode == 3) {
+                      weui.toast('验证码发送次数已达今日上限', {
+                          duration: 1500,
+                          className: 'toast-lang',
+                      });
+                  }else if(res.errCode == 4) {
+                      weui.toast('此邮箱已被验证', {
+                          duration: 1500,
+                          className: '',
+                          callback:function(){
+                              $('.email_code').slideUp();
+                              isfreesubmit[3] = 'true';
+                              freesubmit();
+                          }
+                      });
+                  }else if(res.errCode == 5) {
+                      weui.toast('已发送', {
+                          duration: 1500,
+                          className: '',
+                          callback:function(){
+                              setTimeout(()=>{
+                                  $('.sendEmail').hide()
+                              },800)
+                              var time=300;
+                              setTime=setInterval(function(){
+                                if(time<=0){
+                                  $('.timedown').hide()
+                                  $('.sendEmail').show()
+                                  time=299
+                                  clearInterval(setTime);
+                                  return;
+                                }
+                                time--;
+                                $(".timedown").text(time+'s');
+                              },1000);
+                          }
+                      });
+                      
+                  }else{
+                      weui.toast('发送失败', 1500);
+                  }
+                  
+              }
+          })
+      }else{
+          $('.email_tips').show()
+      }
+      
+  })
+})
+// 验证手机号格式
+function isPoneAvailable($poneInput) {
+    var myreg=/^[1][3,4,5,7,8][0-9]{9}$/;
+    if (!myreg.test($poneInput)) {
+        return false;
+    } else {
+        return true;
+    }
+}
+// 姓名不能为空
+function isname($nameInput) {
+    var myreg=/^\s*$/g;
+    if (!myreg.test($nameInput)) {
+        return false;
+    } else {
+        return true;
+    }
+}
+
+// 验证邮箱格式
+function isAvailableEmail($emailInput) {
+    var myreg = /^([a-zA-Z0-9]+[_|\_|\.]?)*[a-zA-Z0-9]+@([a-zA-Z0-9]+[_|\_|\.]?)*[a-zA-Z0-9]+\.[a-zA-Z]{2,3}$/;
+    if(!myreg.test($emailInput)) {
+        return false;
+    } else {
+        return true;
+    }
+}
+
+// 判断提交按钮是否可以点击
+function submit() {
+    if(issubmit.includes('false')) {
+        $('.write_run').attr('disabled',true)
+    } else {
+        $('.write_run').attr('disabled',false)
+    }
+}
+
+// 判断免费样例的按钮是否可以点击
+function freesubmit() {
+    if(isfreesubmit.includes('false')) {
+        $('.write_free').attr('disabled',true)
+    } else {
+        $('.write_free').attr('disabled',false)
+    }
+}
+
+// 获取url参数
+function getQueryVariable(variable){
+    var query = window.location.search.substring(1);
+    var vars = query.split("&");
+    for (var i=0;i<vars.length;i++) {
+            var pair = vars[i].split("=");
+            if(pair[0] == variable){return pair[1];}
+    }
+    return(false);
+}
+</script>
+<!--百度统计end-->
+{{include "/common/baiducc.html"}}
+</html>

+ 12 - 1
src/web/templates/weixin/dataExport/dataExport.html

@@ -979,7 +979,7 @@
                 dataType: 'json',
                 success: function(data){
                     if(data._id!==""){
-                        window.location.href="/weixin/pay/dataexport?id="+data._id+"&source=d&dataspec="+data_spec;
+                        window.location.href="/weixin/pay/dataexport?id="+data._id+"&source=d&dataspec="+data_spec+"&from="+GetQueryString("from");
                     }
                 }
             })
@@ -1026,6 +1026,17 @@
             $(".confirm").show();
             $(".resetOne").hide();
         });
+        //获取url中"?"符后的字符串并正则匹配
+        function GetQueryString(name) { 
+          var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i"); 
+          var r = window.location.search.substr(1).match(reg); 
+          var context = ""; 
+          if (r != null) 
+             context = r[2]; 
+          reg = null; 
+          r = null; 
+          return context == null || context == "" || context == "undefined" ? "" : context; 
+        }
         //
         function getDate() {
             var start;