瀏覽代碼

分支合并

lianbingjie 4 年之前
父節點
當前提交
df73d9f9b6
共有 76 個文件被更改,包括 3815 次插入1784 次删除
  1. 3 0
      src/config.json
  2. 3 0
      src/jfw/filter/filter.go
  3. 135 0
      src/jfw/filter/phonefilter.go
  4. 53 16
      src/jfw/front/dataExport.go
  5. 45 0
      src/jfw/front/front.go
  6. 20 0
      src/jfw/front/frontRouter.go
  7. 11 0
      src/jfw/front/login.go
  8. 7 2
      src/jfw/jyutil/jyutil.go
  9. 3 0
      src/jfw/modules/app/src/app/filter/filter.go
  10. 0 2
      src/jfw/modules/app/src/app/filter/loginfilter.go
  11. 1 1
      src/jfw/modules/app/src/app/filter/mergefilter.go
  12. 117 0
      src/jfw/modules/app/src/app/filter/phonefilter.go
  13. 7 2
      src/jfw/modules/app/src/app/front/laboratory.go
  14. 1 0
      src/jfw/modules/app/src/app/front/login.go
  15. 1 1
      src/jfw/modules/app/src/app/front/me.go
  16. 5 2
      src/jfw/modules/app/src/config.json
  17. 18 0
      src/jfw/modules/app/src/web/staticres/jyapp/big-member/css/buy_commit.css
  18. 209 0
      src/jfw/modules/app/src/web/staticres/jyapp/big-member/js/ontrial-commit.js
  19. 1 8
      src/jfw/modules/app/src/web/staticres/jyapp/css/searchindex.css
  20. 0 0
      src/jfw/modules/app/src/web/staticres/jyapp/images/sprite/home_area_add-2.png
  21. 127 116
      src/jfw/modules/app/src/web/staticres/jyapp/me/css/userMerge.css
  22. 4 5
      src/jfw/modules/app/src/web/staticres/jyapp/me/js/mine.js
  23. 84 13
      src/jfw/modules/app/src/web/staticres/jyapp/me/js/phone_bind.js
  24. 25 275
      src/jfw/modules/app/src/web/templates/big-member/page_ontrial_commit.html
  25. 259 0
      src/jfw/modules/app/src/web/templates/frontRouter/userMerge/free/confirm.html
  26. 109 140
      src/jfw/modules/app/src/web/templates/frontRouter/userMerge/free/index.html
  27. 1 1
      src/jfw/modules/app/src/web/templates/me/account.html
  28. 12 0
      src/jfw/modules/app/src/web/templates/me/account/phone_bind.html
  29. 2 2
      src/jfw/modules/app/src/web/templates/me/mine.html
  30. 7 0
      src/jfw/modules/app/src/web/templates/weixin/search/mainSearch.html
  31. 13 175
      src/jfw/modules/common/src/qfw/util/jy/userMerge.go
  32. 15 15
      src/jfw/modules/followent/src/web/templates/_error.html
  33. 2 2
      src/jfw/modules/subscribepay/src/a/init.go
  34. 2 2
      src/jfw/modules/subscribepay/src/config.json
  35. 18 8
      src/jfw/modules/subscribepay/src/config/config.go
  36. 20 2
      src/jfw/modules/subscribepay/src/filter/filter.go
  37. 9 11
      src/jfw/modules/subscribepay/src/filter/logfilter.go
  38. 34 0
      src/jfw/modules/subscribepay/src/filter/mergefilter.go
  39. 7 8
      src/jfw/modules/subscribepay/src/filter/sessionfilter.go
  40. 40 39
      src/jfw/modules/subscribepay/src/service/payCallback.go
  41. 126 0
      src/jfw/modules/subscribepay/src/service/phoneCollent.go
  42. 67 32
      src/jfw/modules/subscribepay/src/service/userAccountInfo.go
  43. 0 145
      src/jfw/modules/subscribepay/src/service/userMerge.go
  44. 1 0
      src/jfw/modules/subscribepay/src/service/vipSubscribeTrial.go
  45. 14 0
      src/jfw/modules/subscribepay/src/util/public.go
  46. 0 16
      src/jfw/modules/wxUserMergeTask/src/config.json
  47. 0 122
      src/jfw/modules/wxUserMergeTask/src/main.go
  48. 18 28
      src/jfw/public/search.go
  49. 210 0
      src/web/staticres/big-member/js/ontrial-commit.js
  50. 18 0
      src/web/staticres/big-member/weixin/css/buy_commit.css
  51. 127 116
      src/web/staticres/css/userMerge.css
  52. 308 0
      src/web/staticres/frontRouter/pc/merge/index.css
  53. 34 7
      src/web/staticres/js/login.js
  54. 1 1
      src/web/staticres/me/js/mine.js
  55. 42 11
      src/web/staticres/me/js/phone_bind.js
  56. 8 8
      src/web/staticres/pccss/index.css
  57. 3 3
      src/web/templates/_error.html
  58. 8 8
      src/web/templates/active/index_bak.html
  59. 113 8
      src/web/templates/big-member/pc/page_ontrial_commit.html
  60. 23 254
      src/web/templates/big-member/wx/page_ontrial_commit.html
  61. 3 3
      src/web/templates/common/mobilebottom.html
  62. 8 3
      src/web/templates/common/pcbottom.html
  63. 1 1
      src/web/templates/common/pchead.html
  64. 117 0
      src/web/templates/frontRouter/pc/entpc/sess/index.html
  65. 179 0
      src/web/templates/frontRouter/pc/userMerge/sess/bind.html
  66. 335 0
      src/web/templates/frontRouter/pc/userMerge/sess/merge.html
  67. 1 1
      src/web/templates/frontRouter/pc/xspc/sess/index.html
  68. 267 0
      src/web/templates/frontRouter/wx/userMerge/free/confirm.html
  69. 109 142
      src/web/templates/frontRouter/wx/userMerge/free/index.html
  70. 196 0
      src/web/templates/login/bind.html
  71. 30 21
      src/web/templates/pc/createOrderPage.html
  72. 3 1
      src/web/templates/pc/index.html
  73. 1 2
      src/web/templates/pc/supsearch.html
  74. 1 1
      src/web/templates/structuredata/pc/index.html
  75. 11 0
      src/web/templates/weixin/me/account/phone_bind.html
  76. 2 2
      src/web/templates/weixin/my.html

+ 3 - 0
src/config.json

@@ -282,5 +282,8 @@
     "entnichePcUser": [442,1686,1685,1711],
     "uploadPath": "./web/staticres/upload/res/",
     "redisSessionLockSize":20,
+    "accountMergeOnline":"2021-03-30 00:00:00",
+    "firstBindPop":3,
+    "maxBindPop":8,
     "nsq":"192.168.3.240:4260"
 }

+ 3 - 0
src/jfw/filter/filter.go

@@ -28,5 +28,8 @@ func (f *Filter) Do(w http.ResponseWriter, r *http.Request) bool {
 	if !(&mergeFilter{w, r, session, getSession}).Do() {
 		return false
 	}
+	if !(&phoneFilter{w, r, session, getSession}).Do() {
+		return false
+	}
 	return true
 }

+ 135 - 0
src/jfw/filter/phonefilter.go

@@ -0,0 +1,135 @@
+package filter
+
+import (
+	"fmt"
+	"jfw/config"
+	"jfw/jyutil"
+	"mongodb"
+	"net/http"
+	"net/url"
+	qu "qfw/util"
+	"qfw/util/redis"
+	"regexp"
+	"strings"
+	"time"
+
+	"github.com/go-xweb/httpsession"
+)
+
+type phoneFilter struct {
+	W          http.ResponseWriter
+	R          *http.Request
+	Session    *httpsession.Session
+	GetSession map[string]interface{}
+}
+
+var mobileReg = regexp.MustCompile("(?i)(Android|Mobile|Phone)")
+var urls = regexp.MustCompile("^/article/.*")
+var bindurl = []*regexp.Regexp{
+	regexp.MustCompile("^/swordfish/frontPage/userMerge/sess/bind$"),
+	regexp.MustCompile("^/front/account/phone/bind$"),
+	regexp.MustCompile("^/front/sess/(.*)"),
+	regexp.MustCompile("^/front/signOut$"),
+	regexp.MustCompile("^/front/hasSign$"),
+	regexp.MustCompile("^/front/ajaxPolling$"),
+	regexp.MustCompile("^/front/downloadapppage/normal$"),
+	regexp.MustCompile("^/front/share/(.*)"),
+	regexp.MustCompile("^/swordfish/frontPage/(.*)"),
+	regexp.MustCompile("^/weixin/frontPage/(.*)"),
+}
+
+func (l *phoneFilter) Do() bool {
+	href := "/swordfish/frontPage/userMerge/sess/bind" //pc
+	for _, v := range bindurl {
+		if v.MatchString(l.R.URL.Path) {
+			return true
+		}
+	}
+	if uid := l.GetSession["userId"]; uid != nil && uid != "" {
+		if phone := l.GetSession["phone"]; phone != nil && phone != "" {
+			return true
+		}
+		if person, sessionVal := jyutil.GetSessionVal(map[string]interface{}{"_id": mongodb.StringTOBsonId(qu.ObjToString(uid))}); len(sessionVal) > 0 && person != nil {
+			s_phone := qu.ObjToString((*person)["s_phone"])
+			if s_phone == "" {
+				s_phone = qu.ObjToString((*person)["s_m_phone"])
+			}
+			if s_phone != "" {
+				sessionVal["phone"] = s_phone
+				l.Session.SetMultiple(sessionVal)
+				return true
+			}
+			if userAgent := l.R.UserAgent(); mobileReg.MatchString(userAgent) {
+				href = "/front/account/phone/bind?mode=mergeBind" //wx
+				redirectTo := l.R.URL.String()
+				href += "&redirectTo=" + encodeURIComponent(redirectTo) //加密 前端用于返回
+			}
+			regtime := qu.Int64All((*person)["l_registedate"])
+			reg := time.Unix(regtime, 0)
+			//新用户时间
+			accountMergeOnline, _ := config.Sysconfig["accountMergeOnline"].(string)
+			onLineTime, _ := time.ParseInLocation(qu.Date_Full_Layout, accountMergeOnline, time.Local)
+			if remind, _ := (*person)["b_merge_remind"].(bool); remind { //不再提醒
+				return true
+			}
+			//取关用户
+			if i_ispush := qu.IntAll((*person)["i_ispush"]); i_ispush == 0 {
+				return true
+			}
+			if onLineTime.After(reg) { //老用户
+				if !urls.MatchString(l.R.URL.Path) {
+					return true
+				}
+				//bindPopNum := redis.GetInt("other", fmt.Sprintf("bindPop_%s", uid))
+				key := fmt.Sprintf("bindPop_%s_%s", uid, l.R.URL.Path)
+				if redis.Incr("other", key) == 1 {
+					_ = redis.SetExpire("other", key, GetExpire())
+				}
+				bindPopNum := len(redis.GetKeysByPattern("other", fmt.Sprintf("bindPop_%s_*", uid)))
+				if bindPopNum != (qu.IntAll(config.Sysconfig["firstBindPop"])) &&
+					bindPopNum < (qu.IntAll(config.Sysconfig["maxBindPop"]))+1 {
+					return true
+				}
+				if bindPopNum == (qu.IntAll(config.Sysconfig["firstBindPop"])) {
+					keytime := key + time.Now().Format("20060102150405")
+					if redis.Incr("other", keytime) == 1 {
+						_ = redis.SetExpire("other", keytime, GetExpire())
+					}
+				}
+			}
+			//设置cookie 前端跳转
+			SetCookie(l.R.URL.String(), int(time.Hour*24/time.Second), l.W)
+		} else {
+			return true
+		}
+	} else {
+		return true
+	}
+	http.Redirect(l.W, l.R, href, 302)
+	return false
+}
+
+//获取当天结束时间 单位秒
+func GetExpire() int {
+	t, _ := time.ParseInLocation(qu.Date_Short_Layout, time.Now().AddDate(0, 0, 1).Format(qu.Date_Short_Layout), time.Local)
+	t2, _ := time.ParseInLocation(qu.Date_Full_Layout, time.Now().Format(qu.Date_Full_Layout), time.Local)
+	return int(t.Unix() - t2.Unix())
+}
+
+//文章三级页跳转设置cookie
+func SetCookie(value string, timeout int, w http.ResponseWriter) {
+	c := &http.Cookie{
+		Name:     "article",
+		Value:    value,
+		Path:     "/",
+		HttpOnly: true,
+		MaxAge:   timeout,
+	}
+	http.SetCookie(w, c)
+}
+
+func encodeURIComponent(str string) string {
+	r := url.QueryEscape(str)
+	r = strings.Replace(r, "+", "%20", -1)
+	return r
+}

+ 53 - 16
src/jfw/front/dataExport.go

@@ -15,6 +15,7 @@ import (
 	"regexp"
 	"strconv"
 	"strings"
+	"sync"
 	"time"
 
 	//"github.com/SKatiyar/qr"
@@ -51,9 +52,10 @@ type DataExport struct {
 	bidfileDetail        xweb.Mapper `xweb:"/front/bidfile/bidfileDetail"`               //招标文件解读详情
 	integralDetail       xweb.Mapper `xweb:"/front/integral/integralDetail"`             //剑鱼币订单详情
 
-	gettest       xweb.Mapper `xweb:"/front/order/gettest"`         //模拟
-	entDataExport xweb.Mapper `xweb:"/front/entDataExport/(.*)"`    //企业数据导出
-	getPcEntAuth  xweb.Mapper `xweb:"/front/entExportAuth/getAuth"` //获取企业权限
+	gettest            xweb.Mapper `xweb:"/front/order/gettest"`                    //模拟
+	entDataExport      xweb.Mapper `xweb:"/front/entDataExport/(.*)"`               //企业数据导出
+	getPcEntAuth       xweb.Mapper `xweb:"/front/entExportAuth/getAuth"`            //获取企业权限
+	isEntExportSuccess xweb.Mapper `xweb:"/front/entExportAuth/isEntExportSuccess"` //企业导出是否成功
 }
 
 var order_pageSize = 10
@@ -74,6 +76,8 @@ var (
 	orderStatus_cancel  = "-2"               //订单状态-已取消
 	tableName_order     = "dataexport_order" //订单表
 	SE                  = util.SimpleEncrypt{Key: "topJYBX2019"}
+	exportLock          = sync.Mutex{}
+	exportLockMap       = map[int]sync.Mutex{}
 )
 
 func (d *DataExport) ToSieve() error {
@@ -822,6 +826,8 @@ func (d *DataExport) EntDataExport(_id string) error {
 	userId := util.ObjToString(d.GetSession("userId"))
 	entId := util.IntAll(d.GetSession("entId"))
 	entUserId := util.IntAll(d.GetSession("entUserId"))
+	entId = 1947
+	entUserId = 3128
 	isFirst, err := d.GetBool("isFirst")
 	if err != nil {
 		isFirst = true
@@ -829,6 +835,11 @@ func (d *DataExport) EntDataExport(_id string) error {
 	if userId == "" {
 		return errors.New("未登录")
 	}
+	exportLock.Lock()
+	exportLockMap[entId] = sync.Mutex{}
+	entLock := exportLockMap[entId]
+	exportLock.Unlock()
+	entLock.Lock()
 	query := map[string]interface{}{"ent_id": entId, "user_id": entUserId}
 	data_limit, remain_nums, export_nums := 0, 0, 0
 	limit := public.Mysql.FindOne("entniche_export_limit", query, "data_limit,remain_nums,export_nums", "")
@@ -862,21 +873,26 @@ func (d *DataExport) EntDataExport(_id string) error {
 		"isEntExport": isEntExport,
 	}
 	if isFirst || !isExport || !isEntExport {
+		entLock.Unlock()
 		d.ServeJson(result)
-		return nil
-	}
-	xlsxUrl := GetXlsx(*data, entId, entUserId)
-	if xlsxUrl != "" {
-		result["xlsxUrl"] = xlsxUrl
-		filter := Filters{
-			FilterId: id,
-		}
-		filterStr, _ := json.Marshal(filter)
-		go SaveExportLog(entId, entUserId, count, newCount, remain_nums, export_nums, xlsxUrl, "2", string(filterStr))
-		go DeductNum(entId, newCount)
+	} else {
 		go func() {
-			for _, v := range *data {
-				mongodb.Save("entdataexport", v)
+			data = public.FormatExportDatas(data, config.Sysconfig["webdomain"].(string), "2", entId)
+			xlsxUrl := GetXlsx(*data, entId, entUserId)
+			if xlsxUrl != "" {
+				filter := Filters{
+					FilterId: id,
+				}
+				filterStr, _ := json.Marshal(filter)
+				SaveExportLog(entId, entUserId, count, newCount, remain_nums, export_nums, xlsxUrl, "2", string(filterStr))
+				DeductNum(entId, newCount)
+				go func() {
+					for _, v := range *data {
+						mongodb.Save("entdataexport", v)
+					}
+				}()
+				redis.Put("other", "entexportdata_"+fmt.Sprintln(entId), xlsxUrl, 60)
+				entLock.Unlock()
 			}
 		}()
 		d.ServeJson(result)
@@ -945,6 +961,27 @@ func (this *DataExport) GetPcEntAuth() {
 	this.ServeJson(data)
 }
 
+//判断是否导出成功
+func (this *DataExport) IsEntExportSuccess() {
+	entId := util.IntAll(this.GetSession("entId"))
+	entId = 1947
+	res := map[string]interface{}{
+		"state": false,
+	}
+	if entId != 0 {
+		key := "entexportdata_" + fmt.Sprintln(entId)
+		log.Println(key)
+		xlsxUrl := redis.Get("other", key)
+		log.Println(xlsxUrl)
+		if xlsxUrl != nil {
+			res["state"] = true
+			res["xlsxUrl"] = xlsxUrl
+			redis.Del("other", key)
+		}
+	}
+	this.ServeJson(res)
+}
+
 //生成xlsx
 func GetXlsx(mMap []map[string]interface{}, entId, entUserId int) string {
 	xf, err := xlsx.OpenFile("./web/staticres/fields.xlsx")

+ 45 - 0
src/jfw/front/front.go

@@ -10,6 +10,8 @@ import (
 	"jfw/wx"
 	"log"
 	"math/rand"
+	mgdb "mongodb"
+	"net/url"
 	"qfw/util"
 	"qfw/util/elastic"
 	"qfw/util/redis"
@@ -640,6 +642,7 @@ func (f *Front) SignOut() error {
 	f.DelSession("DataExportVerifyPhone_val")
 	f.DelSession("phoneAuthTime")
 	f.DelSession("mailAuthTime")
+	f.DelSession("phone")
 	f.ServeJson("ok")
 	return nil
 }
@@ -834,6 +837,17 @@ func (m *Front) Sess(ostr string) error {
 						}(strs[1:])...)
 					}
 				}
+				//百宝箱走的nginx配置,需要单独在sess中判断
+				if strings.Contains(actionurl, "/jyTreasureBox/treasureBox") {
+					uid, _ := m.GetSession("userId").(string)
+					if NeedBind(uid) {
+						if mobileReg.MatchString(m.UserAgent()) {
+							actionurl = "/front/account/phone/bind?mode=mergeBind"
+							redirectTo := m.Url()
+							actionurl += "&redirectTo=" + encodeURIComponent(redirectTo)
+						}
+					}
+				}
 				//后续这个判断要去掉
 				if str[1] == "uid" && str[3] == "rssset" {
 					actionurl = actionurl + "?times=" + str[2]
@@ -1522,3 +1536,34 @@ func (f *Front) OrderSource() {
 		})
 	}
 }
+
+func NeedBind(uid string) bool {
+	if uid != "" {
+		if person, sessionVal := jyutil.GetSessionVal(map[string]interface{}{"_id": mgdb.StringTOBsonId(util.ObjToString(uid))}); len(sessionVal) > 0 && person != nil {
+			s_phone := util.ObjToString((*person)["s_phone"])
+			if s_phone == "" {
+				s_phone = util.ObjToString((*person)["s_m_phone"])
+			}
+			if s_phone != "" {
+				return false
+			}
+			regtime := util.Int64All((*person)["l_registedate"])
+			reg := time.Unix(regtime, 0)
+			//新用户时间
+			accountMergeOnline, _ := config.Sysconfig["accountMergeOnline"].(string)
+			onLineTime, _ := time.ParseInLocation(util.Date_Full_Layout, accountMergeOnline, time.Local)
+			if remind, _ := (*person)["b_merge_remind"].(bool); remind { //不再提醒
+				return false
+			}
+			if onLineTime.Before(reg) { //新用户
+				return true
+			}
+		}
+	}
+	return false
+}
+func encodeURIComponent(str string) string {
+	r := url.QueryEscape(str)
+	r = strings.Replace(r, "+", "%20", -1)
+	return r
+}

+ 20 - 0
src/jfw/front/frontRouter.go

@@ -30,6 +30,9 @@ type CommonRouter struct {
 	couponIndex  xweb.Mapper `xweb:"/swordfish/coupon/"`
 	couponPage   xweb.Mapper `xweb:"/swordfish/coupon/(.*)"`
 	couponActive xweb.Mapper `xweb:"/swordfish/CA"`
+	//商机管理
+	entpcIndex xweb.Mapper `xweb:"/entpc/"`
+	entpcPage  xweb.Mapper `xweb:"/entpc/(.*)"`
 }
 
 func init() {
@@ -102,6 +105,22 @@ func (this *CommonRouter) XspcPage(htmlPage string) error {
 	return this.Render(fmt.Sprintf("/frontRouter/pc/xspc/sess/index.html"))
 }
 
+//商机管理
+func (this *CommonRouter) EntpcIndex() error {
+	userid, _ := this.GetSession("userId").(string)
+	if userid == "" {
+		return this.Redirect("/notin/page")
+	}
+	return this.Render(fmt.Sprintf("/frontRouter/pc/entpc/sess/index.html"))
+}
+func (this *CommonRouter) EntpcPage(htmlPage string) error {
+	userid, _ := this.GetSession("userId").(string)
+	if userid == "" {
+		return this.Redirect("/notin/page")
+	}
+	return this.Render(fmt.Sprintf("/frontRouter/pc/entpc/sess/index.html"))
+}
+
 //卡卷
 func (this *CommonRouter) CouponIndex() error {
 	userid, _ := this.GetSession("userId").(string)
@@ -110,6 +129,7 @@ func (this *CommonRouter) CouponIndex() error {
 	}
 	return this.Render(fmt.Sprintf("/frontRouter/pc/coupon/sess/index.html"))
 }
+
 func (this *CommonRouter) CouponPage(htmlPage string) error {
 	userid, _ := this.GetSession("userId").(string)
 	if userid == "" {

+ 11 - 0
src/jfw/front/login.go

@@ -23,6 +23,8 @@ type Login struct {
 	login     xweb.Mapper `xweb:"/phone/login"`     //登录
 	forgetPwd xweb.Mapper `xweb:"/phone/forgetPwd"` //忘记密码
 	register  xweb.Mapper `xweb:"/phone/register"`  //注册
+	phoneBind xweb.Mapper `xweb:"/phone/bind"`      //绑定手机号
+
 }
 
 var (
@@ -32,6 +34,15 @@ var (
 func init() {
 	xweb.AddAction(&Login{})
 }
+
+func (l *Login) PhoneBind() error {
+	userId := qutil.ObjToString(l.GetSession("userId"))
+	if userId == "" {
+		return l.Redirect("/notin/page")
+	}
+	return l.Render("/login/phoneBind.html", &l.T)
+}
+
 func (l *Login) Login() error {
 	defer qutil.Catch()
 	result := map[string]interface{}{}

+ 7 - 2
src/jfw/jyutil/jyutil.go

@@ -161,7 +161,7 @@ func Getopenid(code string) (openid string) {
 
 //
 func GetSessionVal(q map[string]interface{}) (*map[string]interface{}, map[string]interface{}) {
-	person, ok := public.MQFW.FindOneByField("user", q, `{"_id":1,"i_shareknow":1,"s_m_openid":1,"s_nickname":1,"s_headimage":1,"s_headimageurl":1,"s_phone":1}`)
+	person, ok := public.MQFW.FindOneByField("user", q, `{"_id":1,"i_shareknow":1,"s_m_openid":1,"s_nickname":1,"s_headimage":1,"s_headimageurl":1,"s_phone":1,"s_m_phone":1,"l_registedate":1,"b_merge_remind":1,"i_ispush":1}`)
 	sessionVal := make(map[string]interface{})
 	if !ok || person == nil || len(*person) == 0 {
 		return nil, sessionVal
@@ -172,8 +172,9 @@ func GetSessionVal(q map[string]interface{}) (*map[string]interface{}, map[strin
 	}
 	sessionVal["userId"] = BsonIdToSId((*person)["_id"])
 	nickName, _ := (*person)["s_nickname"].(string)
+	phone := util.ObjToString((*person)["s_phone"])
 	if nickName == "" {
-		if phone, _ := (*person)["s_phone"].(string); phone != "" && len(phone) > 3 {
+		if phone != "" && len(phone) > 3 {
 			nickName = string(phone[0:3]) + "****" + string(phone[len(phone)-4:])
 		}
 	}
@@ -186,5 +187,9 @@ func GetSessionVal(q map[string]interface{}) (*map[string]interface{}, map[strin
 	sessionVal["s_avatar"] = strings.Replace(avatar, "http://", "https://", 1)
 	sessionVal["s_m_openid"], _ = (*person)["s_m_openid"].(string)
 	sessionVal["openid"] = sessionVal["s_m_openid"]
+	if phone == "" {
+		phone = util.ObjToString((*person)["s_m_phone"])
+	}
+	sessionVal["phone"] = phone
 	return person, sessionVal
 }

+ 3 - 0
src/jfw/modules/app/src/app/filter/filter.go

@@ -27,5 +27,8 @@ func (f *Filter) Do(w http.ResponseWriter, r *http.Request) bool {
 	if !(&mergeFilter{w, r, session, getSession}).Do() {
 		return false
 	}
+	if !(&phoneFilter{w, r, session, getSession}).Do() {
+		return false
+	}
 	return true
 }

+ 0 - 2
src/jfw/modules/app/src/app/filter/loginfilter.go

@@ -1,7 +1,6 @@
 package filter
 
 import (
-	"fmt"
 	"net/http"
 	"regexp"
 	"strings"
@@ -43,7 +42,6 @@ func (l *loginFilter) Do() bool {
 			disWord := strings.Split(lrurl, "disWord=")[1]
 			loginUrl += "&disWord=" + disWord
 		}
-		fmt.Println(loginUrl)
 		http.Redirect(l.W, l.R, loginUrl, 302)
 		return false
 	}

+ 1 - 1
src/jfw/modules/app/src/app/filter/mergefilter.go

@@ -2,10 +2,10 @@ package filter
 
 import (
 	"fmt"
-	"jfw/modules/common/src/qfw/util/jy"
 	"jfw/public"
 	"log"
 	"net/http"
+	"qfw/util/jy"
 	"qfw/util/redis"
 
 	"github.com/go-xweb/httpsession"

+ 117 - 0
src/jfw/modules/app/src/app/filter/phonefilter.go

@@ -0,0 +1,117 @@
+package filter
+
+import (
+	"fmt"
+	"jfw/config"
+	"jfw/public"
+	"mongodb"
+	"net/http"
+	qu "qfw/util"
+	"qfw/util/redis"
+	"regexp"
+	"time"
+
+	"github.com/go-xweb/httpsession"
+)
+
+type phoneFilter struct {
+	W          http.ResponseWriter
+	R          *http.Request
+	Session    *httpsession.Session
+	GetSession map[string]interface{}
+}
+
+var articleUrl = regexp.MustCompile("^/jyapp/article/.*")
+var bindurl = []*regexp.Regexp{
+	regexp.MustCompile("^/jyapp/account/phone/bind$"),
+	regexp.MustCompile("^/jyapp/free/sess/(.*)"),
+	regexp.MustCompile("^/jyapp/free/signOut$"),
+	regexp.MustCompile("^/jyapp/free/checkUpdate$"),
+	regexp.MustCompile("^/jyapp/free/login$"),
+	regexp.MustCompile("^/jyapp/free/afterPageLoadToCheck$"),
+	regexp.MustCompile("^/jyapp/jylab/mainSearch$"),
+	regexp.MustCompile("^/jyapp/free/showRedSpotOnMenu$"),
+	regexp.MustCompile("^/jyapp/frontPage/(.*)"),
+	regexp.MustCompile("/jyapp/errLogs/Receive"),
+}
+
+func (l *phoneFilter) Do() bool {
+	href := "/jyapp/account/phone/bind?mode=mergeBind"
+	for _, v := range bindurl {
+		if v.MatchString(l.R.URL.Path) {
+			return true
+		}
+	}
+	if uid := l.GetSession["userId"]; uid != nil && uid != "" {
+		if phone := l.GetSession["phone"]; phone != nil && phone != "" {
+			return true
+		}
+		if person, ok := public.MQFW.FindById("user", mongodb.BsonIdToSId(qu.ObjToString(uid)), `{"s_phone":1,"s_m_phone":1,"l_registedate":1,"b_merge_remind":1}`); person != nil && ok {
+			s_phone := qu.ObjToString((*person)["s_phone"])
+			if s_phone == "" {
+				s_phone = qu.ObjToString((*person)["s_m_phone"])
+			}
+			if s_phone != "" {
+				l.Session.Set("phone", s_phone)
+				return true
+			}
+			regtime := qu.Int64All((*person)["l_registedate"])
+			reg := time.Unix(regtime, 0)
+			//新用户时间
+			accountMergeOnline, _ := config.Sysconfig["accountMergeOnline"].(string)
+			onLineTime, _ := time.ParseInLocation(qu.Date_Full_Layout, accountMergeOnline, time.Local)
+			if remind, _ := (*person)["b_merge_remind"].(bool); remind { //不再提醒
+				return true
+			}
+			if onLineTime.After(reg) { //老用户
+				if !articleUrl.MatchString(l.R.URL.Path) {
+					return true
+				}
+				// bindPopNum := redis.GetInt("other", fmt.Sprintf("bindPop_%s", uid))
+				key := fmt.Sprintf("bindPop_%s_%s", uid, l.R.URL.Path)
+				if redis.Incr("other", key) == 1 {
+					_ = redis.SetExpire("other", key, GetExpire())
+				}
+				bindPopNum := len(redis.GetKeysByPattern("other", fmt.Sprintf("bindPop_%s_*", uid)))
+				if bindPopNum != (qu.IntAll(config.Sysconfig["firstBindPop"])) &&
+					bindPopNum < (qu.IntAll(config.Sysconfig["maxBindPop"]))+1 {
+					return true
+				}
+				if bindPopNum == (qu.IntAll(config.Sysconfig["firstBindPop"])) {
+					keytime := key + time.Now().Format("20060102150405")
+					if redis.Incr("other", keytime) == 1 {
+						_ = redis.SetExpire("other", keytime, GetExpire())
+					}
+				}
+				//设置cookie 前端跳转
+				SetCookie(l.R.URL.String(), int(time.Hour*24/time.Second), l.W)
+			} else {
+				//新用户
+				href += "&act=logout"
+			}
+		}
+	} else {
+		return true
+	}
+	http.Redirect(l.W, l.R, href, 302)
+	return false
+}
+
+//获取当天结束时间 单位秒
+func GetExpire() int {
+	t, _ := time.ParseInLocation(qu.Date_Short_Layout, time.Now().AddDate(0, 0, 1).Format(qu.Date_Short_Layout), time.Local)
+	t2, _ := time.ParseInLocation(qu.Date_Full_Layout, time.Now().Format(qu.Date_Full_Layout), time.Local)
+	return int(t.Unix() - t2.Unix())
+}
+
+//文章三级页跳转设置cookie
+func SetCookie(value string, timeout int, w http.ResponseWriter) {
+	c := &http.Cookie{
+		Name:     "article",
+		Value:    value,
+		Path:     "/",
+		HttpOnly: true,
+		MaxAge:   timeout,
+	}
+	http.SetCookie(w, c)
+}

+ 7 - 2
src/jfw/modules/app/src/app/front/laboratory.go

@@ -7,8 +7,8 @@ import (
 type Lab struct {
 	*xweb.Action
 	/********************剑鱼标讯实验室dev2.0**************************/
-	index xweb.Mapper `xweb:"/jyapp/jylab/index"` //实验室首页
-
+	index   xweb.Mapper `xweb:"/jyapp/jylab/index"`   //实验室首页
+	indexNg xweb.Mapper `xweb:"/jyapp/jylab/indexNg"` //实验室 nginx跳转
 }
 
 //
@@ -22,3 +22,8 @@ func (l *Lab) Index() error {
 	//return l.Render("/weixin/jylab/lab-index.html")
 	return l.Redirect("/page_entniche/page/treasure_box.html")
 }
+
+//剑鱼标讯实验室首页
+func (l *Lab) IndexNg() error {
+	return l.Redirect("/jyapp/jylab/page_index") //在nginx配置的路由
+}

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

@@ -942,6 +942,7 @@ func ClearSession(s *httpsession.Session) {
 	s.Del("s_m_phone")
 	s.Del("phoneAuthTime")
 	s.Del("mailAuthTime")
+	s.Del("phone")
 
 }
 

+ 1 - 1
src/jfw/modules/app/src/app/front/me.go

@@ -4,10 +4,10 @@ import (
 	. "app/jyutil"
 	"fmt"
 	"jfw/config"
-	"jfw/modules/common/src/qfw/util/jy"
 	"jfw/public"
 	"log"
 	qutil "qfw/util"
+	"qfw/util/jy"
 	"qfw/util/redis"
 	"strconv"
 	"strings"

+ 5 - 2
src/jfw/modules/app/src/config.json

@@ -4,7 +4,7 @@
 	"weixinrpc": "127.0.0.1:8083",
 	"cacheflag": false,
 	"agreement": "http",
-	"webdomain": "http://web-jydev-zxl.jianyu360.cn",
+	"webdomain": "http://web-zxl.jydev.jianyu360.com",
 	"redirect": {
 		"wxpushlist": "/jyapp/wxpush/bidinfo/%s",
 		"newInfoFollow": "/jyapp/followent/newInfo/%s",
@@ -152,5 +152,8 @@
 		"pushGrpcHeartBeat":3
 	},
     "redisSessionLockSize":20,
-    "nsq":"192.168.3.240:4260"
+    "nsq":"192.168.3.240:4260",
+    "accountMergeOnline":"2021-03-30 00:00:00",
+    "firstBindPop":3,
+    "maxBindPop":8
 }

+ 18 - 0
src/jfw/modules/app/src/web/staticres/jyapp/big-member/css/buy_commit.css

@@ -251,3 +251,21 @@
 .submit-container .j-button-group {
   box-sizing: border-box;
 }
+
+.order-phone-group {
+  margin-top: .16rem;
+}
+
+.order-phone-group .van-field {
+  padding: .3rem .32rem;
+  font-size: .3rem;
+  line-height: .44rem;
+}
+
+.order-phone-group .send-code {
+  height: unset;
+  color: #2ABED1;
+  font-size: .28rem;
+  line-height: .4rem;
+  border: none;
+}

+ 209 - 0
src/jfw/modules/app/src/web/staticres/jyapp/big-member/js/ontrial-commit.js

@@ -0,0 +1,209 @@
+var vNode = {
+    delimiters: ['${', '}'],
+    el: '#v-commit',
+    data: {
+        sessStorageKey: '$data-ontrial-commit',
+        checked: false,
+        price: 2,
+        numberStatus: 0,
+        hasAccountsOrder: true,
+        edition: [
+            {
+                setmeal:"试用版",
+                setmealprice:"¥199"
+            }
+        ],
+        severList:[
+            {listname:'招标订阅推送(可试用7天)'},
+            {listname:'中标企业预测(可试用3个项目)'},
+            {listname:'投标决策分析(可试用10个项目)'},
+            {listname:'潜在竞争对手(可展现7个潜在竞争对手)'},
+            {listname:'潜在客户(可展现7个潜在客户)'}
+        ],
+        // 手机号信息
+        info: {
+            phone: '',
+            code: ''
+        },
+        // 手机号错误提示
+        errorMessage: {
+            phone: '',
+            code: ''
+        },
+        sendCodeButton: {
+            timerId: 0,
+            timeStartDefault: 60,
+            defaultValue: '发送验证码',
+            count: 0
+        },
+    },
+    computed: {
+        confirmDisabled: function () {
+          return this.errorMessage.phone || !this.info.phone || !this.info.code || !this.checked || this.hasAccountsOrder || this.numberStatus > 0
+        },
+        sendCodeButtonText: function () {
+            var dText = this.sendCodeButton.defaultValue
+            return this.sendCodeButton.count <= 0 ? dText : `重新发送(${this.sendCodeButton.count}s)`
+        },
+        sendCodeButtonDisabled: function () {
+            return this.sendCodeButton.count > 0
+        },
+    },
+    created () {
+        var recover = this.recover()
+        this.checkOrder()
+    },
+    methods: {
+        showLoading: function() {
+            var loading = this.$toast.loading({
+                duration: 0,
+                forbidClick: true,
+                message: 'loading...',
+            })
+            return loading
+        },
+        showToast: function (message) {
+            this.$toast({
+                duration: 1500,
+                forbidClick: true,
+                message: message,
+            })
+        },
+        checkOrder:function(){//是否可以支付
+            $.ajax({
+                type:'POST',
+                url:'/jypay/bigmember/createOrderCheck',
+                success:(res)=>{
+                    if(res.error_code===0){
+                        this.numberStatus=res.data.vipStatus;
+                        this.hasAccountsOrder=res.data.hasAccountsOrder;
+                    }
+                    console.log(this.numberStatus,this.hasAccountsOrder)
+                }
+            })
+        },
+        recover: function () {
+            // 不恢复数据列表
+            var excludeKey = ['sessStorageKey', 'numberStatus', 'hasAccountsOrder']
+            var $data = sessionStorage.getItem(this.sessStorageKey)
+            if ($data) {
+                $data = JSON.parse($data)
+                for (var key in $data) {
+                    if (excludeKey.indexOf(key) !== -1) {
+                        continue
+                    }
+                    this.$data[key] = $data[key]
+                }
+                sessionStorage.removeItem(this.sessStorageKey)
+            }
+            return !!$data
+        },
+        onOrder: function () {
+            var _this = this
+            $.ajax({
+                type:'POST',
+                url:'/jypay/bigmember/createOrder',
+                data:{
+                    level:4,
+                    cycle:7,
+                    order_phone: _this.info.phone
+                },
+                success:function(res){
+                    if( res.error_code >= 0 ){
+                        history.replaceState({}, '', '/jyapp/big/page/orderdetail_member?order_code=' + res.data.order_code);
+                        location.href = '/jyapp/pay/checkout_member?orderCode='+res.data.order_code+'&from=buy';
+                    }else {
+                        alert(res.error_msg)
+                    }
+                }
+            })
+        },
+        setStatus:function(){
+            sessionStorage.setItem(this.sessStorageKey, JSON.stringify(this.$data))
+        },
+        // 查看服务清单
+        viewMeau:function(){
+            location.href = 'free_contrast_trial'
+        },
+        checkPhoneRegPass: function () {
+            var pass = /^1[3|7|8]\d{9}$|^19[8-9]\d{8}$|^166\d{8}|^15[0-3|5-9]\d{8}|^14[5|7]\d{8}$/.test(this.info.phone)
+            if (this.info.phone) {
+                if (pass) {
+                    this.errorMessage.phone = ''
+                } else {
+                    this.errorMessage.phone = '手机号格式不正确'
+                }
+            } else {
+                this.errorMessage.phone = ''
+            }
+            return pass
+        },
+        // 发送验证码
+        sendVerifyCode: function () {
+            var pass = this.checkPhoneRegPass()
+            if (!pass) return
+            var _this = this
+            var loading = this.showLoading()
+            var data = {
+                phone: _this.info.phone,
+                step: 1
+            }
+            $.ajax({
+                type: 'POST',
+                url: '/jypay/userMsg/collect',
+                data: data,
+                success: function (res) {
+                    if (res.error_code == 0 && res.data && res.data.status) {
+                        _this.startSendCodeTimer()
+                        _this.showToast('验证码发送成功')
+                    } else {
+                        _this.showToast(res.error_msg || '验证码发送失败')
+                    }
+                }
+            })
+        },
+        startSendCodeTimer: function (t) {
+            var _this = this
+            this.sendCodeButton.count = t || this.sendCodeButton.timeStartDefault
+            this.sendCodeButton.timerId = setInterval(function () {
+                _this.sendCodeButton.count--
+                if (_this.sendCodeButton.count <= 0) {
+                    // 倒计时结束
+                    clearInterval(_this.sendCodeButton.timerId)
+                }
+            }, 1000)
+        },
+        checkVerifyCode: function (callback) {
+            var pass = this.checkPhoneRegPass()
+            if (!pass) return
+        
+            var _this = this
+            var loading = this.showLoading()
+            var data = {
+                phone: this.info.phone,
+                code: this.info.code,
+                step: 2
+            }
+        
+            $.ajax({
+                type: 'POST',
+                url: '/jypay/userMsg/collect',
+                data: data,
+                success: function (res) {
+                    loading.clear()
+                    if (res.error_code == 0 && res.data && res.data.status) {
+                        callback && callback(res.data.status)
+                    } else {
+                        _this.showToast(res.error_msg)
+                    }
+                }
+            })
+        },
+        onSubmit: function () {
+            var pass = this.checkPhoneRegPass()
+            if (!pass) return
+            this.checkVerifyCode(this.onOrder)
+        }
+    }
+}
+var vm = new Vue(vNode)

+ 1 - 8
src/jfw/modules/app/src/web/staticres/jyapp/css/searchindex.css

@@ -3,19 +3,12 @@
     search sprite img class
 **/
 .tab_item .jy_sprite_home_icon {
-    background: url(/jyapp/images/sprite/home_area.png) no-repeat;
+    background: url(/jyapp/images/sprite/home_area.png?v=51430) no-repeat;
     background-size: 7.6rem 0.88rem;
     display: inline-block;
     height: .88rem;
     width: .88rem;
 }
-.jy_sprite_home_icon_add {
-  background: url(/jyapp/images/sprite/home_area_add.png) no-repeat;
-  background-size: 1.76rem 0.88rem;
-  display: inline-block;
-  height: .88rem;
-  width: .88rem;
-}
 .tab_item .icon_1 {
     background-position: 0 0;
 }

+ 0 - 0
src/jfw/modules/app/src/web/staticres/jyapp/images/sprite/home_area_add.png → src/jfw/modules/app/src/web/staticres/jyapp/images/sprite/home_area_add-2.png


+ 127 - 116
src/jfw/modules/app/src/web/staticres/jyapp/me/css/userMerge.css

@@ -1,164 +1,175 @@
-.merge-main{
-    flex: 1;
-    height: 100%;
-    display: flex;
-    flex-direction: column;
-    justify-content: space-between;
-    overflow: hidden;
+.icon-tel-phone {
+    background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAARoSURBVHgB7VlNctNKEO7RSMKpeoscQTkBzu4V7zlPXrz3DBvCCbBPQDgBzgkCJ4hzgoQNuGBhQ4BiBzfAN8C7GEszQ49s2WNpJI1kx6GKfFVJ5MxP96fu6e5pA9ziFr83CGwRQetvH0UOUOhI4A8I+ApEvHT6H4ZQETdCANJKICHSC2F6ttP/PIISsOAXAFrDw99dB5zBtNVol1habIGrlu9ZELYDxi/+ePvpK6wB4fu7YS2sMyHqFhAPhf8DhNTTE+HC/kE7ZDgcF+2ZS0Aq7wAbzN6QnEzadv/9GWwQ0wf36sDpESryGFYVGwUQNItcKpNAUvnlgs2TyJInSdAJ3c+zROYZoMD8pPISAkQvbB08hopKTv7/60geZulO6thOfxgpizLPlrLAC2vsPG9PLYGg1RgwCIa4QUc3XpWEDaFHiXUiIxEq9j1sNU6vWn968bh8027/sq2SQPiT+40jMCUwjwK+jAjXQWJ1D2jb4HwLWgfP1P87k+hMjOLPFOBZ0mKZBIgQD+ebe5smIRgfq4opI11pjYUOaAncu6MI2p3WwiMjAqD4vTGJ/xqHYAAXw7Ddv9wLge7J/VQy0hrB/YOT+LPMzqorWYQ80e2ZikLo/0IzKQppFBwfn081u4ztK7pnErdV6COdaMalRTpzL8diGGXiIksQAeOyykvIyBMAbaIAZS1ZnAep7IqVBKQsbWm01SqSSQLnc4s9goqQJDgRL5R/rYRYHHsZPxNC7kIhARAjyECKBCovKGu6r9YrMdyJ/Vz9PHWZvxRKFnsTTV5KERAWvIMcqCSwXtlbV/lIMXS/FVeh3IufLb70CF1itVObYSGFf7QnXt3IIU4dBV/AhiDDJpbUnny2iFi8FDqlw6DGOlnrUlEoqhjvsG84sgs5cPqXW71LZCGdyNCciUOlRVZm3Da0YZSD3YMCZGXGbSPTDbAm6iVr9CQEY/vu2/UP8TrITGSyoMrKCYvFlJ6r1eRNIJNAVFBZ/BhyIKORTdzzmzwPuaWE+/qjTDDDvDmY3+sYtU7hhlBYC2Hl2ClyJTxJh2o5vE0YxXJ5ydFWoUmU6CZE+/57r84oH5ftBakwqkbxmtdD7Y4LJ0pL7PCBycGWtzBC6RebOF8kEaiIUtnUJLTON81ticyukKKrLBiLEIvCCiG5VGduFlpJoZBZdMI3q+myzd62ovxswS6x6aCKJUrXM7NaiQ+w6jMShgJ6nLEXTuCOwhp/IvuflNBDIqwTzeTSlqhUkJUlkRAYuZcNdlu9fSkTSpGoXFH+KiQqd6dlqLR/WM1EE8oI8aUohLCnjW4lzsRGanrsHnS1b7JYeKElQhHs5+WJjXw/gN2DriD8aWHGTsDEEhZ3cq2w0VtVVke7CFmWkO4pe6UFazePKi6VJGGi/Hzd9UBaA1v0XZPMrSgTkXDQbew3l0YNg2u/mC+ICHhY1CiQ4ECO7/Tfd8EQW+0syCYwNgx8QuAuliT1mNC8J4TNMnG2zleut7jF74ifix9Q1ZAZXC0AAAAASUVORK5CYII=) no-repeat center center;
+    background-size: 100% 100%;
+}
+
+/* notice-dialog */
+.notice-dialog {
+    border-radius: 8px;
+}
+.notice-dialog .van-dialog__message{
+    padding: .48rem .6rem .44rem;
+    font-size: .32rem;
+    line-height: .48rem;
+    color: #171826;
+    text-align: justify;
+}
+.notice-dialog .van-dialog__confirm{
+    color: #2ABED1;
 }
-.concat{
+.notice-dialog .van-button__text {
+    font-size: .36rem;
+    line-height: .52rem;
+}
+
+.concat {
     display: flex;
     align-items: center;
     justify-content: space-between;
-    padding: .28rem .3rem;
-    background-color: #FEE9E8;
+    padding: .28rem .32rem;
+    width: 100%;
     white-space: nowrap;
+    font-size: .28rem;
+    color: #2ABED1;
+    background-color: #FEE9E8;
 }
-.content{
-    flex: 1;
-    overflow-y: scroll;
-}
-.service{
+.concat-text {
     flex: 1;
     display: flex;
-    margin-right: .16rem;
     align-items: center;
+    margin: 0 .16rem;
     color: #FB483D;
-    white-space: nowrap;
+    white-space: pre-wrap;
     line-height: .4rem;
-    font-size: .26rem;
-}
-.notice{
-    font-size: .28rem;
-    color: #2ABED1;
-}
-.tel_phone{
-    width: .48rem;
-    height: .48rem;
-    margin-right: .16rem;
-    background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAARoSURBVHgB7VlNctNKEO7RSMKpeoscQTkBzu4V7zlPXrz3DBvCCbBPQDgBzgkCJ4hzgoQNuGBhQ4BiBzfAN8C7GEszQ49s2WNpJI1kx6GKfFVJ5MxP96fu6e5pA9ziFr83CGwRQetvH0UOUOhI4A8I+ApEvHT6H4ZQETdCANJKICHSC2F6ttP/PIISsOAXAFrDw99dB5zBtNVol1habIGrlu9ZELYDxi/+ePvpK6wB4fu7YS2sMyHqFhAPhf8DhNTTE+HC/kE7ZDgcF+2ZS0Aq7wAbzN6QnEzadv/9GWwQ0wf36sDpESryGFYVGwUQNItcKpNAUvnlgs2TyJInSdAJ3c+zROYZoMD8pPISAkQvbB08hopKTv7/60geZulO6thOfxgpizLPlrLAC2vsPG9PLYGg1RgwCIa4QUc3XpWEDaFHiXUiIxEq9j1sNU6vWn968bh8027/sq2SQPiT+40jMCUwjwK+jAjXQWJ1D2jb4HwLWgfP1P87k+hMjOLPFOBZ0mKZBIgQD+ebe5smIRgfq4opI11pjYUOaAncu6MI2p3WwiMjAqD4vTGJ/xqHYAAXw7Ddv9wLge7J/VQy0hrB/YOT+LPMzqorWYQ80e2ZikLo/0IzKQppFBwfn081u4ztK7pnErdV6COdaMalRTpzL8diGGXiIksQAeOyykvIyBMAbaIAZS1ZnAep7IqVBKQsbWm01SqSSQLnc4s9goqQJDgRL5R/rYRYHHsZPxNC7kIhARAjyECKBCovKGu6r9YrMdyJ/Vz9PHWZvxRKFnsTTV5KERAWvIMcqCSwXtlbV/lIMXS/FVeh3IufLb70CF1itVObYSGFf7QnXt3IIU4dBV/AhiDDJpbUnny2iFi8FDqlw6DGOlnrUlEoqhjvsG84sgs5cPqXW71LZCGdyNCciUOlRVZm3Da0YZSD3YMCZGXGbSPTDbAm6iVr9CQEY/vu2/UP8TrITGSyoMrKCYvFlJ6r1eRNIJNAVFBZ/BhyIKORTdzzmzwPuaWE+/qjTDDDvDmY3+sYtU7hhlBYC2Hl2ClyJTxJh2o5vE0YxXJ5ydFWoUmU6CZE+/57r84oH5ftBakwqkbxmtdD7Y4LJ0pL7PCBycGWtzBC6RebOF8kEaiIUtnUJLTON81ticyukKKrLBiLEIvCCiG5VGduFlpJoZBZdMI3q+myzd62ovxswS6x6aCKJUrXM7NaiQ+w6jMShgJ6nLEXTuCOwhp/IvuflNBDIqwTzeTSlqhUkJUlkRAYuZcNdlu9fSkTSpGoXFH+KiQqd6dlqLR/WM1EE8oI8aUohLCnjW4lzsRGanrsHnS1b7JYeKElQhHs5+WJjXw/gN2DriD8aWHGTsDEEhZ3cq2w0VtVVke7CFmWkO4pe6UFazePKi6VJGGi/Hzd9UBaA1v0XZPMrSgTkXDQbew3l0YNg2u/mC+ICHhY1CiQ4ECO7/Tfd8EQW+0syCYwNgx8QuAuliT1mNC8J4TNMnG2zleut7jF74ifix9Q1ZAZXC0AAAAASUVORK5CYII=) no-repeat center center;
-    background-size: 100% 100%;
 }
-.tel-text{
-    flex: 1;
-}
-.system{
-    padding: .48rem .32rem;
+
+.user-info {
+    padding: .32rem;
     background-color: #fff;
-    
 }
-.system-title{
+
+.user-info-title{
     font-size: .36rem;
     line-height: .52rem;
     color: #171826;
 }
-.system-content{
+.user-info-content{
     margin-top: .16rem;
     color: #9B9CA3;
     font-size: .28rem;
     line-height: .4rem;
     text-align: justify;
 }
-.wx-icon{
-    display: inline-block;
-    width: .48rem;
-    height: .48rem;
-    background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAOUSURBVHgB7ZhdTttAEMdn1qGfUpsb1DxUgiA18QlIglqpb3CChBNATpBwAuAETU8APFVqBU5P4IRKBKkP+Ab1E1JpvNNZh9AQvI7jOKIP/klRLM9mPX/vzscGICMjIyMjI+PxQEiAeeTkX76COgEWAbHMk+SJP7dml++7QNAl6Z9cvrc6sEBmErDyxTHFE6OJSJtjDk+Dxci9iw2rDQsgtoBVu7cjCFozOD6JK3/LyuVHy4UUiSWgYJ9/AqI6pIBEqF9Wip8hJcS0AWv2+X5azgcPJGiv2L0apESkgMKpUyei3cn7RHAofVkhkNo3ORrDF8cPHkpwoOIJUiByCxXOelf8ZY7f4wzT6VffVcbG/IKJuGBhJ/2qtamuS7aTvyFx9XDM/XmSol0B9fZhwnkFAsUIYuP16KpbsTwICXyep7zyzSnDnOR0BkSsUbiptKriwofvwoB13mKhzhXsH03yqYcINfW+J3CDcQJK/NWBOdBuobCtMQce14JDKaHD+98jYZgsLJibY8UbSN/9+cHqQgJyEbY0nB86fgNt8SxXM1AeqTqCYyvCQmBJCFg763lEeCxv/L1ZakXUChDMAf/YRZRbBGJ95gJI2L4WfsMdxk8kUWnUhYQo5wcDuQWS2w5OmTNXb6T6CxJOnFSrF0DyBBJCvtxeMowmO7IJyTHFU2GbnIajBmkFcMAdQxKQ2rylzRDneY/LQ03x09nM52QcQdTjooxrZ12bC04ZZuAPSmuJhHqoOX6fHWz0N6yD4bw9h7dV6Z8x6FZboTZGVXRdWx7ZSvhI26AySUzU3s/5gePmpA1B5MfG5XVuhMWLyKG2d5rajRa+OiXICRtiBKJqIThoXa5QO6F2TpP8RJVGy7PYGPeiWlwOm3NqN3qhCsxANW4xshIJl1AvVB2ENA5G2iBkRUdMFaBQIgjl3I3XIoglIGCgfwt3oDTVWRhSRnWuOltUK3EPIYxRU3bXHvCvTU6ZZfb8TTAGhOdL2UUDUoXI1547Yp+JubVwVHG7FnAwrcQnSb86VOz1NQGsiLUC6lDigay4VStWSqUBNSCHDqQAr2gjyp7of6E4rJ46u4hiH+aBgAtcsRU1ZGECFLcimpCgNR+v3FEsVIBixXZMLm4trsSx/4mY5by8cAEjAiESdgVikR1Uvc5oVTwC6vIr7w0rcSDUu0a5HOc88N/x1nZKKuOlceB/VNSKQUZGRkZGxhT+Anbwl4xpcp5vAAAAAElFTkSuQmCC) no-repeat center center;
-    background-size: 100% 100%;
-}
-.phone-icon{
-    display: inline-block;
-    width: .48rem;
-    height: .48rem;
-    background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAFhSURBVHgB7dhBSsNAFAbg/00rddkj1F2Nm+QGLb2A3iCeQDyB9gZ6A71Bdi6kTW6Q1EV0p0fISkQkzzFVqBRKZtIwVN8HA0NJk/xkMpAfEEII8Z8RLHmzNASpMz310UwGLq/zSXADC1YBvHhxAcYltoi5PH+cBFcwZBxgeJcOVE89Y/uKVyoPXsZBYfKnLgzR3tqSKb6HjcHKvL//UZ07gQHzAIT+7x84ysf+KSwczbOYQSM0oLDjJIBrEsA1CeCaBHBNArgmAVyTAK5JANd2PoDxJ+UaptCbL0JYYDQnS2gTZo7wNVrUWoBlUeWf5HqUXFq1FnW0FmC1ZXuyrA3rMA7AXK/EGt6no5951aO2xHgX6nWQvC9D9DcdpzoqPpw9RISy0G1YiBreurroNWT8BDLdXer1Pa1zLBEf1715vadOTXvR6hqwNNTLQhHpep0a1esMTvRuddvmeyKEEOLv+gTP12Vh3HHPrAAAAABJRU5ErkJggg==) no-repeat center center;
-    background-size: 100% 100%;
-}
-.account{
-    padding: 0 .32rem;
-}
-.set{
-    margin: .32rem 0;
-    padding: .3rem;
-    background-color: #fff;
+
+.list-item {
+    margin: 16px;
+    padding: .24rem .32rem;
     border-radius: 8px;
+    background: #fff;
+    box-shadow: 0px 2px 8px 0px rgba(54, 147, 179, 0.051);
+}
+.list-header {
+    margin-bottom: .24rem;
+    color: #1D1D1D;
+    font-size: 16px;
+    line-height: 24px;
 }
-.set-header{
+.list-content-item {
     display: flex;
     align-items: center;
     justify-content: space-between;
+    font-size: 14px;
+    line-height: 20px;
+    color: #686868;
 }
-.set-header-left{
-    display: flex;
-    align-items: center;
+.list-content-item:not(:last-of-type) {
+    margin-bottom: .16rem;
 }
-.set-header-title{
-    margin: 0 .16rem;
-    font-size: .32rem;
-    color: #171826;
+.list-content-item .l-c-i-text {
+    max-width: 75%;
+    flex: 1;
+    color: #999;
+    text-align: right;
 }
-.set-header-pay{
-    display: inline-block;
-    min-width: 1.76rem;
-    height: .4rem;
-    line-height: .4rem;
-    text-align: center;
-    background: #2ABED1;
-    border-radius: 4px;
-    color: #fff;
-    font-size: .24rem;
-    box-sizing: border-box;
+.um-confirm-container {
+    background-color: transparent;
+}
+.um-confirm-container .j-button-confirm {
+    height: .96rem;
+}
+
+.list-item.table {
+    padding: .12rem 0;
 }
-.set-main{
-    margin-top: .32rem;
+.list-item.table .list-tip-row,
+.list-item.table .list-row {
     padding: 0 .32rem;
-    background: #F5F6F7;
-    border-radius: 8px;
 }
-.item-pay{
-    padding: .2rem 0;
+.list-item.table .list-item-header {
+    font-size: .28rem;
+    line-height: .48rem;
+    color: #1D1D1D;
+    font-weight: bold;
+    border: none;
+}
+
+.list-item.table .list-item-content {
     font-size: .28rem;
     line-height: .4rem;
-    color: #5F5E64;
+    color: #686868;
 }
-.set-radio{
-    width: .48rem;
-    height: .48rem;
+
+.list-tip {
+    color: #2CB7CA;
+    font-size: .24rem;
+    line-height: .48rem;
+    text-align: center;
+    border-radius: .24rem;
+    background-color: rgba(44, 183, 202, 0.1);
 }
-.icon-radio-gray{
-    background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAANySURBVHgB7VndUdtAEP5OsvPsDiIqiDMJmWEgg1VBTAVABZAKwBUEKghUEFKB7AmEBwg4FcTpgKc8YKTN7kk2MsPpx5asyUTfjHxne3W7e3u3u7cH1KhRo0aVUCgI3uWlA7/RVcp6BaIOCC0evaX/JNxxfyQPEQ0wfjhz3bURCsDCCngXP3YU0TZ3O8iHIang2F1/d4IFMLcC3rerjlLqM3cd/YPMsqXOyMcAtj/EfXPkuq/vNK1328KLMdPZbfg+v2d9mFoHbBUV9OZVJLcCIozVDA4ItD8VAHSMceNkInCmcULLHSCaAAV1FIytXp4xwvdywPMuHdVsfuFuW2acFPXcjdUjLADv/Gqfhf8UfR3ReOzm2R+ZFYiE9xDOWG5GZY1tZSGSZRNjMCxSeIGMJWPK2MJDrKz3TQZkUkDWPB5nZ6tI4SeIlNgSHvy0I56pSF1C0WYTbwNmsFKG8DP8wuV0y90WxwzXfb/aT6JPtUDkKXjP0seyhRdoS4B6mnfophORaIHY7I86G29XsET0z69/ceNwjNhNihGJFmDh96SVQIMlQ8cWLYO1nURnVEDWIsTfA3eLhvu5wIFRePPTubi5eWkiM1ug2eiGHXWGCiARmQJ8lf79H3/LRGdUQJHalJaUP0BlUH39KRmuAWYLqChJC4NLNfD9Ce+OiSRpEzv6k7NKVIaIN5ExKicpoF/Kmx0WiRjvuRT4J5CkwONhpCLEeBtXQaoC4UmqKkx5j0wURgXYB0/cZxtV4YWteXNU/m0iMVvAIu3CFOxNVAROZSa8+yYaswJc+tAtUbfCfdCdkeUZGBWIUuc+xIU1H3awZEgmjNB9DpPS+EQ3SkqdSsuH7j0sGdNzCNeOkugSFXDX35wg9ACOVA+wJAy+X8uEOcI7LRNODWR8rNuVlq1wEKXYpUJ4sAfUpZos55BUBeRMSgQxo65MlKlErLwC4ZnlHJItlXiwDzFT8iheiVjRzIEs25BnKv6PwpYgVnwaIbTEbREbWzasaugyioM5imZzFXfR8A+VwsS15q4u6zE4tkTu2ZHf9D7jZVNqcXdGiCfV5fASg8vr4RH0+fK6b7eVjU0E1J0pr7OnSytgFa7AE0VkJvMmfX223GllFxxPoT1TU66YuBhAbBV5Zq+YxELskoOfsPmKaa38Kl+NGjVqlI+/zO65Qdp3pJkAAAAASUVORK5CYII=) no-repeat center;
-    background-size: contain;
+
+.list-row {
+    display: flex;
+    align-items: center;
 }
-.icon-radio-success{
-    background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAOuSURBVHgB7ZlPSBRRHMd/762oocUWgmJKIyWsQegePHRyN+nQba276VUhu3kwUA9BxwzqmtI53E5BYeqhk4ddCXRByJFUlKIWS/xDO6/fm3YHXebNvLezs3uZDww7s+/Nm+935r3fe/MbgICAgIBqQqBMRN6ntFAtJBiQbiAkhg2HGW75i2RxX2eM6BRyy7lTSGbuRXUoA54N3FxIDTESekiAxUCNNDBjZq0/OgseKNlA5GMqRkP0Ne5q4A0djUyXakTZgDafCjeEQ5OMscdQRggjzw9pblqPR7NK56lU5v2c1tF53O0Bf9CNEyOuMj6kDeTFL4L3LuOGkgkqU4l3mwqJNy/Hn7K2mArLVJYywPs8VEZ8gZ4Gw7ymK65diIdJIGa0qThGDrvS3eiSUx33J0Co1J3wg3yYdq7jVGje/Qp0nUTLZXOzQctrEFLjVEgIHWPgL6NaM4x0NFvHyb1f58r5LI8/s6LzhU+Ah03mX7w3KRZvB1+idH1euyYqFxoguDADH7G788V33+L4ZEDUjtgAhPrAJ+zET6x/E9YnFFe4AsQGCNPs/m+tr4UPtyPmFmmsB1VUxZswEhMVCQ0wQfTh0eIqmuDbbPQ69DddAllKEv8f4axMVU96hxfdPT419y/WhODFLQ0G25rAjWLxC98PZMULtXCklhJn2UHxQ6mvlgnOeGcrjDpEk2LxmT9H8CQjLd4RJwPCdbmdiREUaWfCTvwwnnvwNwcKCLWUZIDDTdxf2TAFFeAmnna1Wcd8vJRBPEcXFTgMYmMZXPiNQh6gieTeT+u/RMsVeNvbCYPtTWim3frfg3iuZUtURh3OSoMkE+vb8HJz3zqONF6A8Rut1jHvao++bJUkPq9lSVQkfgIUkqDAK33/nIkCu/nxsnNmvKjipEVoIBOP6rgOWQIFuIlnG7vWcTnEI2muRVTouBrNMTZHiXgWtOPN9g9YyR5Cb7jBnDNK7jZ5DMwdOZW7vpF1fVrdJJV9nbTg2bz1O90dTnVcJzKWM4ahSjBMeLnVcTVgvpO6PEY/YAxmMhLZOqmlRC2FKQD5sOoV3nWOqDElU1fKQBrTfQYxBpjDjFguzCw2MeKyKUbpxRwPZbxhP01g22l+DaewWYzSapQ3XEeMqB9jgvf5I0XxnNLT65juwKzFpNcQa3YZjHRuCSwRnj9wcCM42Y1hU0oZDIazPKbo5zLV+sBRTGQxpREDEgRIH7aqYdO4WW9SWXNjKBrYKivjJ6aAgICA6vIPiiaSgW3pn7sAAAAASUVORK5CYII=) no-repeat center;
-    background-size: contain;
+.list-row:not(:last-of-type) {
+    border-bottom: 1px dashed #E0E0E0;
 }
-.merge-dialog {
-    border-radius: 8px;
+.list-row .list-column {
+    padding: .16rem 0;
 }
-.merge-dialog .van-dialog__message{
-    font-size: .32rem;
-    line-height: .48rem;
-    color: #171826;
+.list-row .list-column:nth-of-type(1) {
+    flex: 1;
 }
-.merge-dialog .van-button--large{
-    height: 46px;
-    color: #171826;
-    font-size: .36rem;
-    line-height: .52rem;
+.list-row .list-column:nth-of-type(2),
+.list-row .list-column:nth-of-type(3) {
+    display: inline-block;
+    width: 30%;
+    text-align: center;
 }
-.merge-toast .van-toast__text{
-    font-size: 15px;
+
+.van-radio,
+.van-radio__icon {
+    display: flex;
+    align-items: center;
+    justify-content: center;
 }
-.notice-dialog {
-    border-radius: 8px;
+
+.reminder-container {
+    display: flex;
+    align-items: center;
+    justify-content: flex-end;
+    padding: .24rem .32rem;
 }
-.notice-dialog .van-dialog__message{
-    padding: .48rem .6rem .44rem;
-    font-size: .32rem;
+.reminder-container {
+    font-size: .28rem;
     line-height: .48rem;
-    color: #171826;
-    text-align: justify;
 }
-.notice-dialog .van-dialog__confirm{
-    color: #2ABED1;
-}
+.reminder-container .van-checkbox__label {
+    color: #888;
+}
+.reminder-container  .no-merge {
+    margin-left: .24rem;
+    color: #2CB7CA;
+    text-decoration: underline;
+}

+ 4 - 5
src/jfw/modules/app/src/web/staticres/jyapp/me/js/mine.js

@@ -270,13 +270,12 @@ var mine = {
     },
     // 用户合并是否显示
     showUserMerge: function () {
-        $('.merge .to-merge').on('click', function(){
-            location.href = '/jyapp/frontPage/userMerge/free/index'
-        })
-        $.get("/jypay/userMsg/query?t=" + Date.now(), function (r) {
+        $.get("/jyMerge/userMsg/query?t=" + Date.now(), function (r) {
             if (r.error_code == 0) {
                 if (r.data.needMerge) {
-                    $(".merge").show();
+                    $('.merge').show().on('click', function(){
+                        location.href = '/jyapp/frontPage/userMerge/free/index'
+                    })
                 } else {
                     $(".merge").hide();
                 }

+ 84 - 13
src/jfw/modules/app/src/web/staticres/jyapp/me/js/phone_bind.js

@@ -3,7 +3,10 @@ var vm = new Vue({
     el: '#phone-bind',
     data: {
         type: 'bind',
+        act: '',  // 是否要做某些操作
+        mode: '',  // 是否跳转强制绑定
         from: '',  // 是否通过iframe进入
+        token: '',  // 账号合并需要的token
         userInfo: {
             company: ''
         },
@@ -14,6 +17,7 @@ var vm = new Vue({
             picCode: '',
             code: ''
         },
+        needShowEntItem: true, // 需不需要显示填写公司名称
         entListShow: false, // 联想结果列表显示控制
         searchEntList: [], // 联想结果数组
         errorMessage: {
@@ -78,18 +82,41 @@ var vm = new Vue({
         },
         // 如果已经填写过公司,则不显示公司填写部分
         showEntItem: function () {
-            return this.getUserInfoLoaded && !this.userInfo.company
+            return this.getUserInfoLoaded && !this.userInfo.company && this.needShowEntItem
+        },
+        showBottomTip: function () {
+            const filter = ['mergeBind']
+            return filter.indexOf(this.mode) !== -1
         }
     },
     created: function () {
         this.getImgCaptcha()
         this.getType()
         this.from = utils.getParam('from')
+        this.mode = utils.getParam('mode')
+        this.act = utils.getParam('act')
+
         if (this.type === 'bind') {
             this.getUserInfo()
         }
+        if (this.mode === 'mergeBind') {
+            this.needShowEntItem = false
+        }
+    },
+    mounted: function () {
+        // this.backButtonEvents()
+        this.setHistory()
+        try {
+            JyObj.hiddenBottom('0')
+        } catch (error) {}
     },
     methods: {
+        backButtonEvents: function () {
+            // 返回按钮统一用on绑定
+            var backButton = document.querySelector('.j-header .header-left')
+            backButton.removeEventListener('click', goBack)
+            $(backButton).on('click', goBack)
+        },
         getType: function () {
             if (location.pathname.indexOf('bind') !== -1) {
                 this.type = 'bind'
@@ -279,18 +306,26 @@ var vm = new Vue({
             var _this = this
             var loading = this.showLoading()
             var data = {
-                mail: this.info.phone,
+                phone: this.info.phone,
                 code: this.info.code,
                 step: 2
             }
+
+            if (this.mode === 'mergeBind') {
+                data.mode = this.mode
+            }
+
             $.ajax({
                 type: 'POST',
                 url: '/jypay/user/phone/' + _this.type,
                 data: data,
                 success: function (res) {
                     loading.clear()
-                    if (res.error_code == 0 && res.data && res.data.state == 1) {
-                        callback && callback()
+                    if (res.error_code == 0 && res.data && res.data.state) {
+                        if (res.data.token) {
+                            _this.token = res.data.token
+                        }
+                        callback && callback(res.data.state)
                     } else {
                         _this.showToast(res.error_msg || _this.someText.text + '失败')
                     }
@@ -310,26 +345,38 @@ var vm = new Vue({
                         window.parent.postMessage({
                             action: 'success'
                         }, location.origin)
+                    } else if (_this.act == 'logout') {
+                        try {
+                            JyObj.backUrl('H')
+                            JyObj.refreshAppointTab('subscribe', 1)
+                            JyObj.refreshAppointTab('box', 1)
+                            JyObj.refreshAppointTab('me', 1)
+                        } catch (error) {}
                     } else {
-                        history.back()
+                        _this.onCancel()
                     }
                 }
             })
         },
+        // 手机号绑定或者换绑取消
         onCancel: function () {
-            history.back()
+            history.go(-1)
         },
         onSubmit: function () {
             var _this = this
             if (this.type === 'bind') {
                 console.log('绑定手机号...')
-                this.setPhone(function () {
-                    // 绑定手机号完成后,如果已经填写过公司。则不发送提交公司的请求
-                    // 可以直接判断计算属性showEntItem,来判断需不需要填写公司
-                    if (_this.showEntItem) {
-                        _this.setCompany(_this.afterSetPhoneSuccess)
-                    } else {
-                        _this.afterSetPhoneSuccess()
+                this.setPhone(function (state) {
+                    if (state == 1) {
+                        // 绑定手机号完成后,如果已经填写过公司。则不发送提交公司的请求
+                        // 可以直接判断计算属性showEntItem,来判断需不需要填写公司
+                        if (_this.showEntItem) {
+                            _this.setCompany(_this.afterSetPhoneSuccess)
+                        } else {
+                            _this.afterSetPhoneSuccess()
+                        }
+                    } else if (state == 2) {
+                        location.replace('/jyapp/frontPage/userMerge/free/index?token=' + _this.token)
                     }
                 })
             } else {
@@ -339,5 +386,29 @@ var vm = new Vue({
                 })
             }
         },
+        // 如果是强制绑定重定向过来的,返回时候就回到首页
+        setHistory: function () {
+            var _this = this
+            // act=logout,返回则退出登录,绑定成功则回到首页
+            if (this.act == 'logout') {
+                setTimeout(function () {
+                    history.pushState({ act: _this.act }, '', '#act')
+                    _this.onPopstate()
+                }, 300)
+            }
+        },
+        removePopstate: function () {
+            $(window).off('popstate')
+            $('.j-header .header-left').on('click', goBack)
+        },
+        onPopstate: function () {
+            $(window).on('popstate', function () {
+                try {
+                    appQuit(false)
+                } catch (error) {}
+                // location.replace('/jyapp/free/login?back=index&flag=quit')
+                // location.replace('/jyapp/jylab/mainSearch')
+            })
+        }
     }
 })

+ 25 - 275
src/jfw/modules/app/src/web/templates/big-member/page_ontrial_commit.html

@@ -6,67 +6,11 @@
     <!--引入公共资源头部-->
     {{include "/big-member/meta.html"}}
 
-    <!--S-当前页必定需要预加载的资源-->
-    <link rel="preload" as="style" href=//cdn.jsdelivr.net/npm/reset-css@4.0.1/reset.min.css />
-    <link rel="preload" as="style" href=//cdn.jsdelivr.net/npm/vant@2.8.2/lib/index.css />
-    <link rel="preload" as="style" href=//cdn.jsdelivr.net/npm/vant@2.8.2/lib/icon/local.css />
-    <link rel="preload" as="style" href="{{Cdns .Host "seo" "cdn"|SafeUrl}}/jyapp/big-member/css/buy_commit.css?v={{Msg "seo" "version"}}" />
-    <!--E-当前页必定需要预加载的资源-->
-
-
     <!--S-当前页面的css资源-->
     <link rel="stylesheet" href=//cdn.jsdelivr.net/npm/reset-css@4.0.1/reset.min.css />
     <link rel="stylesheet" href=//cdn.jsdelivr.net/npm/vant@2.8.2/lib/index.css />
     <link rel="stylesheet" href=//cdn.jsdelivr.net/npm/vant@2.8.2/lib/icon/local.css />
     <link rel="stylesheet" href="{{Cdns .Host "seo" "cdn"|SafeUrl}}/jyapp/big-member/css/buy_commit.css?v={{Msg "seo" "version"}}" />
-    <!--E-当前页面的css资源-->
-    <!--S-手机号输入样式-->
-    <style>
-        .order-phone-group {
-            background: #FFFFFF;
-            color: #5F5E64;
-            font-size: 15px;
-            line-height: 22px;
-            letter-spacing: 0px;
-            text-align: left;
-            padding: 8px 16px;
-            box-sizing: border-box;
-            margin-top: 8px;
-        }
-        .order-phone-group label {
-            display: inline-block;
-            min-width: 80px;
-            padding: 8px 0;
-        }
-        .order-phone-group.error input {
-            color: #FB483D;
-        }
-        .order-phone-group.error p {
-            display: inherit;
-        }
-        .order-phone-group input {
-            padding: 8px 0;
-            color: #5F5E64;
-            font-size: 16px;
-            line-height: 24px;
-            letter-spacing: 0px;
-            text-align: left;
-        }
-        .order-phone-group input::placeholder {
-            color: #C0C4CC;
-        }
-        .order-phone-group p {
-            display: none;
-            color: #FB483D;
-            font-size: 12px;
-            line-height: 18px;
-            letter-spacing: 0px;
-            text-align: left;
-            margin-top: 2px;
-        }
-    </style>
-    <!--E-手机号输入样式-->
-
 </head>
 
 <body>
@@ -97,9 +41,26 @@
                     </div>
                     <!--S-手机号输入-->
                     <div class='order-phone-group'>
-                        <label for='order_phone'>手机号码</label>
-                        <input id='order_phone' autocomplete='off' placeholder='请输入手机号码' maxlength='11' type='tel' />
-                        <p>手机号码输入错误</p>
+                        <van-field
+                            v-model.trim="info.phone"
+                            label="手机号"
+                            type="tel"
+                            maxlength="11"
+                            placeholder="请输入手机号码"
+                            :error-message="errorMessage.phone"
+                            @blur="checkPhoneRegPass"
+                        ></van-field>
+                        <van-field
+                            v-model.trim="info.code"
+                            label="验证码"
+                            maxlength="6"
+                            placeholder="请输入验证码"
+                            :error-message="errorMessage.code"
+                        >
+                            <template #button>
+                                <van-button class="send-code" size="small" :disabled="sendCodeButtonDisabled" @click="sendVerifyCode">${ sendCodeButtonText }</van-button>
+                            </template>
+                        </van-field>
                     </div>
                     <!--E-手机号输入-->
 
@@ -109,12 +70,6 @@
                             <span class="serve_title">权限清单</span>
                         </div>
                         <div class="serve_list">
-                            <!-- <van-cell-group>
-                                <van-cell :title="item.listname" :class="item.addclass"  v-for="(item,index) in severList" />
-                                <template #icon>
-                                    <span class="j-icon icon-root"></span>
-                                </template>
-                            </van-cell-group> -->
                             <div class="viewmeau clickable" @click="viewMeau()">
                                 <span class="meau_text">《大会员试用版功能权限清单》</span>
                                 <span class="j-icon icon-arrow-right"></span>
@@ -124,7 +79,6 @@
                 </div>
                 <div class="j-footer">
                     <div class="submit-container">
-                        <!-- 当 price-top/price-bottom 有一个显示的时候,则price-container显示。否则不显示 -->
                         <div class="price-container">
                             <div class="price-top">
                                 <span class="price-t-label">合计:</span>
@@ -141,228 +95,24 @@
                                 <a href="/jyapp/front/staticPage/dataExport_serviceterms.html" @click="setStatus()" class="link highlight-text">《剑鱼标讯线上购买与服务条款》</a>
                             </p>
                         </div>
-                        <div class="j-button-group"  @click="onOrder()">
-                            <button data-need-bind-phone id="run-call-buy" class="j-button-confirm"
+                        <div class="j-button-group">
+                            <button data-need-bind-phone @click="onSubmit" id="run-call-buy" class="j-button-confirm"
                                 :disabled="confirmDisabled">提交订单</button>
                         </div>
                     </div>
                 </div>
             </div>
         </div>
-        <!--S-Vue-->
+        <!--E-Vue-->
     </div>
 
-    <!--S-必定需要预加载的资源-->
-    <script rel="preload" as="script" src=//cdn.jsdelivr.net/npm/vue@2.6.11/dist/vue.min.js> </script>
-    <script rel="preload" as="script" src=//cdn.jsdelivr.net/npm/vant@2.8.2/lib/vant.min.js> </script>
-    <link rel="preload" as="script" href=//cdn.jsdelivr.net/npm/jquery@3.4.1/dist/jquery.min.js />
-        <!--S-有可能需要提前预加载的资源
-        -->
-    <!--E-有可能需要提前预加载的资源-->
-
     <!--S-当前页面的资源-->
     <script src=//cdn.jsdelivr.net/npm/vue@2.6.11/dist/vue.min.js> </script>
     <script src=//cdn.jsdelivr.net/npm/vant@2.8.2/lib/vant.min.js> </script>
     <script src=//cdn.jsdelivr.net/npm/jquery@3.4.1/dist/jquery.min.js></script>
     {{include "/big-member/commonjs.html"}}
-    <!--<script src='{{Cdns .Host "seo" "cdn"|SafeUrl}}/jyapp/js/check-bind-phone.js?v={{Msg "seo" "version"}}'></script>-->
-<!--E-当前页面的资源-->
-
-<!--小于100行同css,减少请求数-->
-<script>
-  // @订单手机号-S
-  function OrderPhone (data) {
-    this.addListener = function () {
-      var _this = this
-      $(this.data.el).on('input propertychange change',   function () {
-        _this.OrderPhoneCheck && clearTimeout(_this.OrderPhoneCheck)
-        var o_phone = $(this).val()
-        _this.result.phone = o_phone
-        _this.result.status = _this.check_phone(o_phone)
-        var o_parent = $(this).parents()
-        _this.OrderPhoneCheck = setTimeout( () => {
-          if (_this.result.status) {
-            o_parent.removeClass('error')
-            typeof _this.data.success === 'function' && _this.data.success()
-          } else {
-            o_parent.addClass('error')
-            typeof _this.data.error === 'function' && _this.data.error()
-          }
-        }, _this.data.time || 300)
-      })
-    }
-    this.check_phone = function (phone) {
-      if (phone.trim().length === 0) {
-        return true
-      }
-      var result = /^[1][3-9][0-9]{9}$/.test(phone)
-      if (result) {
-        sessionStorage.setItem(_this.OrderPhoneCheckKey, phone)
-      }
-      return result
-    }
-    this.update = function (str) {
-      if (this.check_phone(str)) {
-        $(this.data.el).val(str)
-        this.result.phone = str
-        this.result.status = true
-      }
-    }
-    this.ajaxPhone = function () {
-      var isCache = sessionStorage.getItem(this.OrderPhoneCheckKey)
-      if (isCache) {
-        this.update(isCache)
-      }
-      var _this = this
-      $.get("/jypay/user/getAccountInfo?t=" + new Date().getTime(), function (r) {
-        if (r && r.data && r.data.phone) {
-          _this.update(r.data.phone)
-        }
-      })
-    }
-    this.removeCachePhone = function () {
-      var levelTime = sessionStorage.getItem(_this.OrderPhoneCheckKey + '_level_time') || false
-      if (levelTime) {
-        var nowTime = new Date().getTime()
-        if (nowTime - levelTime > 5 * 60 * 1000) {
-          sessionStorage.removeItem(_this.OrderPhoneCheckKey)
-        }
-      }
-      sessionStorage.setItem(_this.OrderPhoneCheckKey + '_level_time', nowTime)
-      window.addEventListener('pageshow', function(event) {
-        if (event.persisted || window.performance && window.performance.navigation.type != 2) {
-          sessionStorage.removeItem(_this.OrderPhoneCheckKey)
-        }
-      }, false);
-      window.addEventListener('beforeunload', function () {
-        sessionStorage.setItem(_this.OrderPhoneCheckKey + '_level_time', new Date().getTime())
-      })
-    }
-    this.data = data || {
-      el: 'input#order_phone',
-      time: 300
-    }
-    var _this = this
-    this.OrderPhoneCheck = null
-    this.OrderPhoneCheckKey = 'p19.3_order_phone'
-    this.result = {
-      phone: '',
-      status: true,
-      update: _this.update.bind(_this)
-    }
-    this.removeCachePhone()
-    this.addListener()
-    this.ajaxPhone()
-    return this.result
-  }
-  // @订单手机号-E
-
-  var vNode = {
-        delimiters: ['${', '}'],
-        el: '#v-commit',
-        data: {
-            loading: true,
-            checked: false,
-            showPicker: false,
-            // originPrice: 2,
-            // 价格参数
-            price: 2,
-            grades:0,
-            gradeyear:0,
-            beforeall:0,
-            beforeprice:27999,
-            afterprice:21999,
-            numberStatus:999,
-            hasAccountsOrder:true,
-            severList:[
-                {listname:'招标订阅推送(可试用7天)'},
-                {listname:'中标企业预测(可试用3个项目)'},
-                {listname:'投标决策分析(可试用10个项目)'},
-                {listname:'潜在竞争对手(可展现7个潜在竞争对手)'},
-                {listname:'潜在客户(可展现7个潜在客户)'}
-            ],
-            edition: [
-                {
-                    setmeal:"试用版",
-                    setmealprice:"¥199"
-                }
-            ],
-            OrderPhoneCheck: {}
-        },
-        computed: {
-            confirmDisabled: function () {
-              return !this.OrderPhoneCheck.status || !this.checked||this.hasAccountsOrder||this.numberStatus>0
-            }
-        },
-        created () {
-            var recover = this.recover()
-            if(!recover){
-            }
-            this.checkOrder()
-        },
-        methods: {
-            checkOrder:function(){//是否可以支付
-                $.ajax({
-                    type:'POST',
-                    url:'/jypay/bigmember/createOrderCheck',
-                    success:(res)=>{
-                        if(res.error_code===0){
-                            this.numberStatus=res.data.vipStatus;
-                            this.hasAccountsOrder=res.data.hasAccountsOrder;
-                        }
-                        console.log(this.numberStatus,this.hasAccountsOrder)
-                    }
-                })
-            },
-            recover: function () {
-                var excludeKey = ['sessStorageKey']
-                var $data = sessionStorage.getItem(this.sessStorageKey)
-                if ($data) {
-                    $data = JSON.parse($data)
-                    for (var key in $data) {
-                        if (excludeKey.indexOf(key) !== -1) {
-                            continue
-                        }
-                        this.$data[key] = $data[key]
-                    }
-                    sessionStorage.removeItem(this.sessStorageKey)
-                }
-                return !!$data
-            },
-            onOrder: function (e) {
-                var _this = this
-                $.ajax({
-                    type:'POST',
-                    url:'/jypay/bigmember/createOrder',
-                    data:{
-                        level:4,
-                        cycle:7,
-                        order_phone: this.OrderPhoneCheck.phone
-                    },
-                    success:function(res){
-                        if( res.error_code >= 0 ){
-                            history.replaceState({}, '', '/jyapp/big/page/orderdetail_member?order_code=' + res.data.order_code);
-                            location.href = '/jyapp/pay/checkout_member?orderCode='+res.data.order_code+'&from=buy';
-                        }else {
-                            alert(res.error_msg)
-                        }
-                    }
-                })
-            },
-            setStatus:function(){
-                sessionStorage.setItem(this.sessStorageKey, JSON.stringify(this.$data))
-            },
-            // 查看服务清单
-            viewMeau:function(){
-                location.href = 'free_contrast_trial'
-            }
-        },
-        mounted () {
-          this.OrderPhoneCheck = new OrderPhone()
-        }
-  }
-    new Vue(vNode)
-    </script>
+    <script src='{{Cdns .Host "seo" "cdn"|SafeUrl}}/jyapp/big-member/js/ontrial-commit.js?v={{Msg "seo" "version"}}'></script>
+    <!--<script src='{{Msg "seo" "cdn"}}/js/check-bind-phone.js?v={{Msg "seo" "version"}}'></script>-->
     {{include "/common/baiducc.html"}}
 </body>
 

+ 259 - 0
src/jfw/modules/app/src/web/templates/frontRouter/userMerge/free/confirm.html

@@ -0,0 +1,259 @@
+<!DOCTYPE html>
+<html lang="zh-CN">
+
+<head>
+    <!--引入公共资源头部-->
+    {{include "/big-member/meta.html"}}
+    <title>提示</title>
+
+    <link rel="stylesheet" href=//cdn.jsdelivr.net/npm/reset-css@4.0.1/reset.min.css />
+    <link rel="stylesheet" href=//cdn.jsdelivr.net/npm/vant@2.8.2/lib/index.css />
+    <link rel="stylesheet" href=//cdn.jsdelivr.net/npm/vant@2.8.2/lib/icon/local.css />
+    <link rel="stylesheet" href="{{Cdns .Host "seo" "cdn"|SafeUrl}}/jyapp/me/css/userMerge.css?v={{Msg "seo" "version"}}" />
+</head>
+
+<body>
+    <div class="j-container">
+        <div class="j-header jy-app-header">
+            <span class="header-left"></span>
+            <span class="header-title">提示</span>
+            <span class="header-right"></span>
+        </div>
+        <div class="j-main" id="merge-confirm" v-cloak>
+            <div class="j-container">
+                <div class="j-header">
+                    <div class="concat">
+                        <span class="j-icon base-icon icon-tel-phone"></span>
+                        <span class="concat-text">如有疑问,请联系客服:400-108-6670</span>
+                        <div class="concat-notice" @click="noticeHandle">合并须知</div>
+                    </div>
+                </div>
+                <div class="j-main">
+                    <div class="user-info">
+                        <h2 class="user-info-title">账号合并:</h2>
+                        <div class="user-info-content">
+                            <span>请选择需要保留的功能或设置,合并后,账号将继承此次的选择,请慎重选择。</span>
+                        </div>
+                    </div>
+                    <div class="account-list">
+                        <!-- 冲突功能 -->
+                        <div class="list-item table" v-show="productions.conflict.length">
+                            <div class="list-row list-item-header">
+                                <div class="list-column">冲突功能</div>
+                                <div class="list-column">微信账号</div>
+                                <div class="list-column">手机账号</div>
+                            </div>
+                            <div class="list-tip-row">
+                                <div class="list-tip">请选择需要保留的账号内容</div>
+                            </div>
+                            <div class="list-item-content">
+                                <van-radio-group class="list-row" v-model="item.checked" class="list-row" v-for="(item, index) in productions.conflict" :key="index">
+                                    <div class="list-column">${item.name}</div>
+                                    <!-- wx=0, app=1 -->
+                                    <van-radio class="list-column" name="0" :checked-color="checkedColor"></van-radio>
+                                    <van-radio class="list-column" name="1" :checked-color="checkedColor"></van-radio>
+                                </van-radio-group>
+                            </div>
+                        </div>
+                        <!-- 合并内容 -->
+                        <div class="list-item table" v-show="productions.autoMerge.length">
+                            <div class="list-row list-item-header">
+                                <div class="list-column">合并内容</div>
+                                <div class="list-column"></div>
+                                <div class="list-column"></div>
+                            </div>
+                            <div class="list-item-content">
+                                <div class="list-row" v-for="(item, index) in productions.autoMerge" :key="index">
+                                    <div class="list-column">${item.name}</div>
+                                </div>
+                            </div>
+                        </div>
+                        <!-- 取消提示 -->
+                        <div class="reminder-container">
+                            <van-checkbox class="no-more-reminders" shape="square" icon-size="18px" :checked-color="checkedColor" v-model="neverRemind">不再提醒</van-checkbox>
+                            <div class="no-merge" @click="noMerge">暂不合并</div>
+                        </div>
+                    </div>
+                </div>
+                <div class="j-footer j-button-group">
+                    <button type="button" class="j-button-cancel" @click="prevStep">上一步</button>
+                    <button type="button" class="j-button-confirm" @click="confirmMerge">确认合并</button>
+                </div>
+            </div>
+        </div>
+    </div>
+
+    <!--S-当前页面的资源-->
+    <script src=//cdn.jsdelivr.net/npm/vue@2.6.11/dist/vue.min.js></script>
+    <script src=//cdn.jsdelivr.net/npm/vant@2.8.2/lib/vant.min.js></script>
+    <script src=//cdn.jsdelivr.net/npm/zepto@1.2.0/dist/zepto.min.js></script>
+    <!--E-当前页面的资源-->
+    {{include "/big-member/commonjs.html"}}
+    <script>
+        var vConf = {
+            delimiters: ['${', '}'],
+            el: '#merge-confirm',
+            data: {
+                neverRemind: false, // 不再提醒
+                checkedColor: '#2CB7CA',
+                token: '',
+                userName:{
+                    wx:'',
+                    phone:''
+                },
+                productions: {
+                    // checked: wx=0, app=1
+                    conflict: [
+                        // {
+                        //     name: '免费订阅',
+                        //     checked: '0'
+                        // }
+                    ],
+                    autoMerge: [
+                        // {
+                        //     name: '中标必听课'
+                        // }
+                    ]
+                }
+            },
+            created () {
+                this.token = utils.getParam('token')
+                this.getInfo()
+            },
+            methods: {
+                showLoading: function () {
+                    var loading = this.$toast.loading({
+                        duration: 0,
+                        forbidClick: true,
+                        message: 'loading...',
+                    })
+                    return loading
+                },
+                getInfo: function () {
+                    var _this = this
+                    var loading = this.showLoading()
+                    $.ajax({
+                        url: '/jyMerge/usermerge/state?t=' + Date.now(),
+                        type: 'POST',
+                        data: {
+                            token: _this.token
+                        },
+                        success:function (res) {
+                            if (res.error_msg == 0 && res.data) {
+                                if (res.data.needMerge) {
+                                    _this.setPageState(res.data)
+                                }
+                                if (res.data.token) {
+                                    _this.token = res.data.token
+                                }
+                            }
+                        },
+                        complete: function () {
+                            loading.clear()
+                        }
+                    })
+                },
+                neverRemindRequest: function (callback) {
+                    var _this = this
+                    var loading = this.showLoading()
+                    $.ajax({
+                        url: '/jypay/userMsg/neverRemind',
+                        type: 'POST',
+                        data: {
+                            merge_remind: _this.neverRemind
+                        },
+                        success:function (res) {
+                            if (res.error_msg == 0) {
+                                callback && callback()
+                            }
+                        },
+                        complete: function () {
+                            loading.clear()
+                        }
+                    })
+                },
+                confirmRequest: function (callback) {
+                    var _this = this
+                    var loading = this.showLoading()
+                    var choose = this.getSubmitInfo()
+                    $.ajax({
+                        url: '/jyMerge/usermerge/submit',
+                        type: 'POST',
+                        data: {
+                            token: _this.token,
+                            choose: choose.join('#')
+                        },
+                        success:function (res) {
+                            if (res.error_msg == 0) {
+                                callback && callback()
+                            }
+                        },
+                        complete: function () {
+                            loading.clear()
+                        }
+                    })
+                },
+                setPageState: function (data) {
+                    if (!data) return
+                    if (data.mergeItem) {
+                        for (var key in data.mergeItem) {
+                            if (data.mergeItem[key] == 0) {
+                                this.productions.conflict.push({
+                                    name: key,
+                                    checked: '0'
+                                })
+                            } else if (data.mergeItem[key] == 1) {
+                                this.productions.conflict.push({
+                                    name: key,
+                                    checked: '1'
+                                })
+                            } else if (data.mergeItem[key] == -1) {
+                                this.productions.autoMerge.push({
+                                    name: key
+                                })
+                            }
+                        }
+                    }
+                },
+                getSubmitInfo: function () {
+                    var arr = []
+                    this.productions.conflict.forEach(function (item, index) {
+                        arr.push(item.name + '=' + item.checked)
+                    })
+                    return arr
+                },
+                prevStep: function () {
+                    history.back()
+                },
+                noMerge: function () {
+                    // 暂不合并
+                    if (this.neverRemind) {
+                        this.neverRemindRequest(this.successCallback)
+                    } else {
+                        this.successCallback()
+                    }
+                },
+                confirmMerge: function () {
+                    this.confirmRequest(this.successCallback)
+                },
+                successCallback: function () {
+                    history.go(-2)
+                },
+                noticeHandle: function(){
+                    var html = '<p>合并须知:</p><p>1.账号合并为手机号和微信号进行合并绑定,两个账号内功能、剑鱼币、优惠券等均可合并。</p><p>2.账号信息将根据您选择的账号进行保留,未被选择的账号信息将被舍弃,请慎重选择。</p><p>3.账号合并后,您使用微信或手机号进行登录,将看到并使用相同的功能设置,共同使用账号内的功能、剑鱼币、优惠券等。</p><p>4.如您选择确认合并,则默认为您已阅读并同意此须知。</p>'
+                    this.$dialog.alert({
+                        width: 303,
+                        message: html,
+                        messageAlign:'left',
+                        className:'notice-dialog',
+                        confirmButtonText: '我知道了'
+                    })
+                }
+            }
+        }
+        var vm = new Vue(vConf)
+    </script>
+    {{include "/common/baiducc.html"}}
+</body>
+
+</html>

+ 109 - 140
src/jfw/modules/app/src/web/templates/frontRouter/userMerge/free/index.html

@@ -6,7 +6,6 @@
     {{include "/big-member/meta.html"}}
     <title>提示</title>
 
-    <!--S-当前页面的css资源-->
     <link rel="stylesheet" href=//cdn.jsdelivr.net/npm/reset-css@4.0.1/reset.min.css />
     <link rel="stylesheet" href=//cdn.jsdelivr.net/npm/vant@2.8.2/lib/index.css />
     <link rel="stylesheet" href=//cdn.jsdelivr.net/npm/vant@2.8.2/lib/icon/local.css />
@@ -22,46 +21,40 @@
         </div>
         <div class="j-main" id="merge-prompt" v-cloak>
             <div class="j-container">
-                <div class="j-main merge-main">
+                <div class="j-header">
                     <div class="concat">
-                        <div class="service">
-                            <span class="tel_phone"></span>
-                            <span class="tel-text">如有疑问,请联系客服:400-108-6670</span>
+                        <span class="j-icon base-icon icon-tel-phone"></span>
+                        <span class="concat-text">如有疑问,请联系客服:400-108-6670</span>
+                        <div class="concat-notice" @click="noticeHandle">合并须知</div>
+                    </div>
+                </div>
+                <div class="j-main">
+                    <div class="user-info">
+                        <h2 class="user-info-title">系统检测到:</h2>
+                        <div class="user-info-content">
+                            <span>您同时拥有<em>2</em>个剑鱼标讯账号</span>
+                            <span class="highlight-text">手机号:${userName.phone}</span>、
+                            <span class="highlight-text">微信号:${userName.wx}</span>
+                            <span>且都使用了剑鱼标讯中的功能。<br>为保证您的正常使用,请您根据提示进行账号合并。</span>
                         </div>
-                        <div class="notice" @click="noticeHandle">合并须知</div>
                     </div>
-                    <div class="content">
-                        <div class="system">
-                            <h2 class="system-title">系统检测到:</h2>
-                            <div class="system-content">
-                                您同时拥有<em>2</em>个剑鱼标讯账号<span style="color: #2ABED1;">手机号:${userName.phone}、微信号:${userName.wx}</span>,且都使用了剑鱼标讯中的功能。<br>为保证您的正常使用,请您选择保留任一账号中的设置信息。
-                            </div>
-                        </div> 
-                        <div class="account">
-                            <div class="set" v-for="item in account">
-                                <div class="set-header">
-                                    <div class="set-header-left">
-                                        <span :class="item.icon"></span>
-                                        <span class="set-header-title">${item.title}</span>
-                                        <span class="set-header-pay" v-show="item.isPay">存在付费功能</span>
-                                    </div>
-                                    <div class="set-radio" :class="item.isSelected ? 'icon-radio-success' : 'icon-radio-gray'" @click="selectedHandle(item)"></div>
+                    <div class="account-list">
+                        <div class="list-item" v-for="item in account" :key="item.id">
+                            <p class="list-header">${item.title}</p>
+                            <div class="list-content">
+                                <div class="list-content-item" v-for="(iitem, iindex) in item.info">
+                                    <span class="l-c-i-label">${iitem.label}:</span>
+                                    <span class="l-c-i-text ellipsis" :class="iindex == 0 ? 'highlight-text' : ''">${iitem.text}</span>
                                 </div>
-                                <ul class="set-main">
-                                    <li class="item-pay" v-for="sItem in item.list">${sItem}</li>
-                                </ul>
                             </div>
                         </div>
                     </div>
-                </div>
-                <div class="j-footer j-button-group">
-                    <button type="button" class="j-button-cancel" @click="cancelHandle">取消</button>
-                    <button type="button" class="j-button-confirm" @click="confirmHandle">立即合并</button>
+                    <div class="j-button-group um-confirm-container">
+                        <button type="button" class="j-button-confirm" @click="nextStep">下一步</button>
+                    </div>
                 </div>
             </div>
-            
         </div>
-        
     </div>
 
     <!--S-当前页面的资源-->
@@ -71,11 +64,11 @@
     <!--E-当前页面的资源-->
     {{include "/big-member/commonjs.html"}}
     <script>
-        var successIcon ='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAF1SURBVHgB7dfhjcIwDAVgj8AIHYFR2OBuBDaADXobtBswQkdghIzQEXyumkgook5BJCXu+6T+QhA/06YxEQAAAAAAAABAxZj5JJfj2SBXQ3vhw8cG2gMJepRrfNIAJuum2/zhto/dybJEeGd6D0iEH62HPyTCH8kqH/7Oy05kmQS8KeHPZJkE7JTwV8rB33Ktf+aGrZ4vWfdSPLxfuIsWG0s/Z5uF94sv+aECEuF7yo31HTfrpjM1WVn7RiXwfM52SiEXyoCfDzfB9KccqBTWT10fbwIrww1vdcQt1QS/zneFj4pzuZrANQw3K5rQ0hu4puHGF6u9HboXf6++4YbTQ8l0Zk/u1FzzcOOL14aT5OuKLQw3UmifaEKz8L1O+d6VaiIF/ylhXNwE3vJ8n8tU+JommAwfrGhCq3zekwWJJiwpM9yU8mITyg43pUio84rwzmT4QML9JsI3ZB3Ps/24y/ABzzN+OPIOuwoPAAAAAAAAAF/lHxGmEQRUlMs+AAAAAElFTkSuQmCC';
-        var vNode = {
+        var vConf = {
             delimiters: ['${', '}'],
             el: '#merge-prompt',
             data: {
+                token: '',
                 userName:{
                     wx:'',
                     phone:''
@@ -83,33 +76,48 @@
                 account:[
                     {
                         id: 1,
-                        icon:'wx-icon',
-                        title:'保留微信账号设置',
-                        list:[],
-                        isPay: false,
-                        isSelected:false,
+                        title:'微信账号',
+                        info: [
+                            {
+                                label: '微信昵称',
+                                text: ''
+                            },
+                            {
+                                label: '注册日期',
+                                text: ''
+                            },
+                            {
+                                label: '上次登录日期',
+                                text: ''
+                            }
+                        ]
                     },
                     {
                         id: 2,
-                        icon:'phone-icon',
-                        title:'保留手机账号设置',
-                        list:[],
-                        isPay: false,
-                        isSelected:false
+                        title:'手机账号',
+                        info: [
+                            {
+                                label: '手机号',
+                                text: ''
+                            },
+                            {
+                                label: '注册日期',
+                                text: ''
+                            },
+                            {
+                                label: '上次登录日期',
+                                text: ''
+                            }
+                        ]
                     }
-                ],
-                token:''
-            },
-            computed: {
-                showKF:function() {
-                    return this.account.every(function(v){return v.isPay})
-                }
+                ]
             },
             created () {
-                this.getState()
+                this.token = utils.getParam('token')
+                this.getInfo()
             },
             methods: {
-                showLoading: function() {
+                showLoading: function () {
                     var loading = this.$toast.loading({
                         duration: 0,
                         forbidClick: true,
@@ -117,115 +125,76 @@
                     })
                     return loading
                 },
-                getState:function(){
+                getInfo: function () {
                     var _this = this;
-                    var data = utils.getParam('token') ? {
-                        token: utils.getParam('token')
-                    } : {}
+                    var loading = this.showLoading()
                     $.ajax({
-                        url:'/jypay/usermerge/state?t=' + Date.now(),
+                        url:'/jyMerge/usermerge/state?t=' + Date.now(),
                         type:'POST',
-                        data: data,
-                        success:function(res){
-                            if(res.data && res.data.needMerge){
-                                _this.userName.wx = res.data.name;
-                                _this.userName.phone = res.data.phone;
-                                _this.token = res.data.token;
-                                if(res.data.wxBuyed && res.data.wxBuyed.length > 0) {
-                                    _this.account[0].isPay = true
-                                    _this.account[0].list = res.data.wxBuyed
-                                }
-                                if(res.data.phBuyed && res.data.phBuyed.length > 0) {
-                                    _this.account[1].isPay = true
-                                    _this.account[1].list = res.data.phBuyed
+                        data: {
+                            token: _this.token
+                        },
+                        success:function (res) {
+                            if (res.error_msg == 0 && res.data) {
+                                if (res.data.needMerge) {
+                                    _this.setPageState(res.data)
                                 }
-                                // 两个账号都有付费业务,默认选中第一个;若只有一个账号有付费服务,选中有付费业务的
-                                if(_this.account[1].isPay && !_this.account[0].isPay) {
-                                    _this.account[1].isSelected = true
-                                } else {
-                                    _this.account[0].isSelected = true
+                                if (res.data.token) {
+                                    _this.token = res.data.token
                                 }
                             }
+                        },
+                        complete: function () {
+                            loading.clear()
                         }
                     })
                 },
-                selectedHandle: function(item) {
-                    var _this = this;
-                    if(item.isSelected) {
-                        return
+                setPageState: function (data) {
+                    if (!data) return
+                    this.userName.phone = data.phData.phone
+                    this.userName.wx = data.wxData.name
+                    // 微信信息
+                    if (data.wxData) {
+                        this.account[0].info[0].text = data.wxData.name
+                        this.account[0].info[1].text = new Date(data.wxData.registDate * 1000).pattern('yyyy-MM-dd')
+                        // lastLogin首次登录为-1
+                        if (data.wxData.lastLogin < 0) {
+                            this.account[0].info[2].text = ' - '
+                        } else {
+                            this.account[0].info[2].text = new Date(data.wxData.lastLogin * 1000).pattern('yyyy-MM-dd')
+                        }
+                    }
+                    // 手机号信息
+                    if (data.phData) {
+                        this.account[1].info[0].text = data.phData.phone
+                        this.account[1].info[1].text = new Date(data.phData.registDate * 1000).pattern('yyyy-MM-dd')
+                        if (data.phData.lastLogin < 0) {
+                            this.account[1].info[2].text = ' - '
+                        } else {
+                            this.account[1].info[2].text = new Date(data.phData.lastLogin * 1000).pattern('yyyy-MM-dd')
+                        }
                     }
-                    item.isSelected = true;
-                    item.id == 1 ? _this.account[1].isSelected = false : _this.account[0].isSelected = false;
-                },
-                cancelHandle: function() {
-                    window.history.back();
                 },
-                confirmHandle: function() {
-                    var _this = this;
-                    var title = _this.account[0].isSelected ? '微信账号' : '手机账号';
-                    var html = '<span style="color:#2ABED1">' + title + '</span>'
-                    _this.$dialog.confirm({
-                        className:'merge-dialog',
-                        width:303,
-                        message: '已阅读并认同合并须知,确定保留' + html  + '信息。',
-                        confirmButtonColor:'#2ABED1',
-                        confirmButtonText:'确定'
-                    })
-                    .then(function() {
-                        var loading = _this.showLoading()
-                        $.ajax({
-                            url:'/jypay/usermerge/submit',
-                            type:'post',
-                            data:{
-                                choose: _this.account[0].isSelected ? 1 : 2,
-                                token: _this.token
-                            },
-                            success: function(res) {
-                                if(res.data) {
-                                    loading.clear()
-                                    _this.$toast({
-                                        className:'merge-toast',
-                                        message: '合并成功',
-                                        icon: successIcon,
-                                        onClose:function() {
-                                            if(utils.getParam('from') == 'iframe') {
-                                                window.parent.postMessage({
-                                                    action: 'success'
-                                                }, location.origin)
-                                            } else {
-                                                history.back();
-                                            }
-                                        }
-                                    })
-                                } else {
-                                    // loading.clear()
-                                    _this.$toast({
-                                        className:'merge-toast',
-                                        message: res.error_msg,
-                                    })
-                                }
-                            }
-                        })
-                    })
-                    .catch(function(){
-                        // on cancel
-                    })
+                nextStep: function () {
+                    var url = './confirm'
+                    if (this.token) {
+                        url = './confirm?token=' + this.token
+                    }
+                    location.href = url
                 },
-                noticeHandle: function(){
-                    var html = `合并须知:\n1.账号合并仅为手机号和微信进行合并绑定,两个账号信息、功能、积分、优惠券等不做合并。\n2.账号信息将根据您选择的账号进行保留,未被选择的账号信息将被舍弃,其账号内信息将无法找回,请慎重选择。\n3.账号合并后,您使用微信或手机号进行登录,将看到并使用相同的功能设置,共同使用账号内的权限、积分等。\n4.如您选择立即合并,则默认为您已阅读并同意此须知。`
+                noticeHandle: function () {
+                    var html = '<p>合并须知:</p><p>1.账号合并为手机号和微信号进行合并绑定,两个账号内功能、剑鱼币、优惠券等均可合并。</p><p>2.账号信息将根据您选择的账号进行保留,未被选择的账号信息将被舍弃,请慎重选择。</p><p>3.账号合并后,您使用微信或手机号进行登录,将看到并使用相同的功能设置,共同使用账号内的功能、剑鱼币、优惠券等。</p><p>4.如您选择确认合并,则默认为您已阅读并同意此须知。</p>'
                     this.$dialog.alert({
                         width: 303,
                         message: html,
                         messageAlign:'left',
                         className:'notice-dialog',
                         confirmButtonText: '我知道了'
-                    }).then(() => {
-                    // on close
-                    });
+                    })
                 }
             }
         }
-        var userMerge = new Vue(vNode)
+        var vm = new Vue(vConf)
     </script>
     {{include "/common/baiducc.html"}}
 </body>

+ 1 - 1
src/jfw/modules/app/src/web/templates/me/account.html

@@ -16,7 +16,7 @@
     <link rel="stylesheet" href="{{Cdns .Host "seo" "cdn"|SafeUrl}}/jyapp/me/logoff/iconfont/iconfont.css?v={{Msg "seo" "version"}}">
     <link rel="stylesheet" href="{{Cdns .Host "seo" "cdn"|SafeUrl}}/jyapp/me/logoff/css/public.css?v={{Msg "seo" "version"}}">
     <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/vant@2.6/lib/index.css" />
-    <link rel="stylesheet" href="{{Cdns .Host "seo" "cdn"|SafeUrl}}/jyapp/me//css/account.css?v={{Msg "seo" "version"}}">
+    <link rel="stylesheet" href="{{Cdns .Host "seo" "cdn"|SafeUrl}}/jyapp/me/css/account.css?v={{Msg "seo" "version"}}">
 </head>
 
 <body>

+ 12 - 0
src/jfw/modules/app/src/web/templates/me/account/phone_bind.html

@@ -70,6 +70,14 @@
         .j-button-confirm {
             height: .92rem;
         }
+        .tip-text {
+            margin-top: .1rem;
+            padding: 0 .32rem;
+            text-align: center;
+            color: #5F5E64;
+            font-size: 12px;
+            line-height: 18px;
+        }
     </style>
 </head>
 <body>
@@ -140,6 +148,9 @@
                         <!-- <button class="j-button-cancel" @click="onCancel">取消</button> -->
                         <button class="j-button-confirm" @click="onSubmit" :disabled="confirmButtonDisabled">立即绑定</button>
                     </div>
+                    <div class="tip-text" v-if="showBottomTip">
+                        您好,根据《中华人民共和国网络安全法》及相关法律规定,<br />请您填写正确的手机号进行认证,获取更多网络服务。
+                    </div>
                 </div>
             </div>
         </div>
@@ -148,6 +159,7 @@
     <script src=//cdn.jsdelivr.net/npm/vant@2.8.2/lib/vant.min.js></script>
     <script src=//cdn.jsdelivr.net/npm/zepto@1.2.0/dist/zepto.min.js></script>
     {{include "/big-member/commonjs.html"}}
+    <script src='{{Cdns .Host "seo" "cdn"|SafeUrl}}/jyapp/js/common.js?v={{Msg "seo" "version"}}'></script>
     <script src='{{Cdns .Host "seo" "cdn"|SafeUrl}}/jyapp/me/js/phone_bind.js?v={{Msg "seo" "version"}}'></script>
     {{include "/common/baiducc.html"}}
 </body>

+ 2 - 2
src/jfw/modules/app/src/web/templates/me/mine.html

@@ -105,14 +105,14 @@
             </div>
             <div class="list">
                 <!--账号合并-->
-                <!--<div class="menu merge" style="display:none">
+                <div class="menu merge" style="display:none">
                     <div class="menu_list">
                         <div class="menu_list_left">
                             <span class="text">账号数据合并</span>
                         </div>
                         <div class="to-merge">去合并</div>
                     </div>
-                </div>-->
+                </div>
                 <!-- 我的企业 -->
                 {{if and (or (not .T.isIosExam) (and .T.isIosExam .T.isEnt)) (or (not .T.isIosExamPhone) (and .T.isIosExamPhone .T.isEnt))}}
                 <div class="menu">

+ 7 - 0
src/jfw/modules/app/src/web/templates/weixin/search/mainSearch.html

@@ -91,6 +91,13 @@
     .tab_item .jy_sprite_home_icon {
         background-image: url({{Cdns .Host "seo" "cdn"|SafeUrl}}/jyapp/images/sprite/home_area.png?v={{Msg "seo" "version"}});
     }
+    .jy_sprite_home_icon_add {
+        background: url({{Cdns .Host "seo" "cdn"|SafeUrl}}/jyapp/images/sprite/home_area_add-2.png?v={{Msg "seo" "version"}}) no-repeat;
+        background-size: 1.76rem 0.88rem;
+        display: inline-block;
+        height: .88rem;
+        width: .88rem;
+    }
 
 </style>
 

+ 13 - 175
src/jfw/modules/common/src/qfw/util/jy/userMerge.go

@@ -1,26 +1,17 @@
 package jy
 
 import (
-	"database/sql"
 	"fmt"
-	"github.com/go-xweb/httpsession"
-	"go.mongodb.org/mongo-driver/bson"
-	"log"
 	. "mongodb"
 	qutil "qfw/util"
 	"qfw/util/mysql"
-	"qfw/util/redis"
 	"strings"
-	"time"
-)
 
-var (
-	aboutTableRemove = []string{"pushspace", "pushspace_entniche", "pushspace_entniche_project", "pushspace_entniche_temp", "pushspace_entniche_wait", "pushspace_fail", "pushspace_project", "pushspace_statistic", "pushspace_temp", "pushspace_vip", "pushspace_fail"}
-	WxField          = []string{"s_appponetype", "s_jpushid", "s_opushid", "s_appversion", "s_unionid", "s_name", "s_nickname", "i_sex", "s_country", "s_province", "s_city", "s_headimageurl", "s_m_openid", "a_m_openid", "i_ispush", "i_applystatus"}
-	PhField          = []string{"s_appponetype", "s_jpushid", "s_opushid", "s_appversion", "s_phone", "s_password"}
+	"github.com/go-xweb/httpsession"
+	"go.mongodb.org/mongo-driver/bson"
 )
 
-//p19 账号合并
+//dev3.7 账号合并
 type UserMerge struct {
 	mysqlDb *mysql.Mysql
 	mg      MongodbSim
@@ -35,11 +26,15 @@ func CreateUserMerge(mg MongodbSim, msql *mysql.Mysql, sess *httpsession.Session
 	}
 }
 
+var (
+	MergeEncrypt = qutil.SimpleEncrypt{Key: "jy_merge_user"}
+)
+
 //查询合并
 //wId 微信用户id
 //pId 手机用户id
 //当wId和pId都为空时 即不需要合并
-func (this *UserMerge) MergeQuery() (wId, pId, wName, bPhone, mT string, err error) {
+func (this *UserMerge) MergeQuery() (wId, pId, bPhone string, err error) {
 	userId, _ := this.sess.Get("userId").(string)
 	if userId == "" {
 		err = fmt.Errorf("未获取到用户身份")
@@ -63,14 +58,11 @@ func (this *UserMerge) MergeQuery() (wId, pId, wName, bPhone, mT string, err err
 			if qutil.ObjToString((*tud)["s_phone"]) == "" {
 				wId = userId
 				pId = BsonIdToSId((*mud)["_id"])
-				wName = qutil.ObjToString((*tud)["s_nickname"])
 				bPhone = qutil.ObjToString((*mud)["s_phone"])
 			} else {
 				pId = userId
 				wId = BsonIdToSId((*mud)["_id"])
-				wName = qutil.ObjToString((*mud)["s_nickname"])
 			}
-			mT = "wxMerge"
 			return
 		}
 	}
@@ -83,8 +75,6 @@ func (this *UserMerge) MergeQuery() (wId, pId, wName, bPhone, mT string, err err
 		if mud != nil && len(*mud) > 0 {
 			wId = BsonIdToSId((*tud)["_id"])
 			pId = BsonIdToSId((*mud)["_id"])
-			wName = qutil.ObjToString((*tud)["s_nickname"])
-			mT = "phoneMerge"
 			return
 		}
 	} else if s_phone != "" { //当前用户为手机号用户;查询对应的微信用户
@@ -92,172 +82,16 @@ func (this *UserMerge) MergeQuery() (wId, pId, wName, bPhone, mT string, err err
 		if mud != nil && len(*mud) > 0 {
 			wId = BsonIdToSId((*mud)["_id"])
 			pId = BsonIdToSId((*tud)["_id"])
-			wName = qutil.ObjToString((*mud)["s_nickname"])
-			mT = "phoneMerge"
 			return
 		}
 	}
 	return
 }
 
-//新用户绑定手机号后 自动合并以手机号账户为主
-//ids[0]=微信id ids[1]=手机号id
-func (this *UserMerge) AutoMerge(ids ...string) (bool, error) {
-	wId, pId := "", ""
-	var err error
-	if len(ids) != 0 {
-		if len(ids) != 2 {
-			err = fmt.Errorf("自动合并传参异常")
-		} else {
-			wId, pId = ids[0], ids[1]
-		}
-	} else { //没有传入合并ids,则查询
-		wId, pId, _, _, _, err = this.MergeQuery()
-	}
-	if err != nil {
-		return false, err
-	}
-	return this.Merge(wId, pId, "22")
-}
-
-//wxid phid 微信id和手机用户id
-//choose 1:保留微信 2:保留手机用户
-//22 自动合并
-func (this *UserMerge) Merge(wId, pId, choose string, noteFunc ...func(...interface{})) (bool, error) {
-	nowId, _ := this.sess.Get("userId").(string)
-	if !(wId == nowId || pId == nowId) || wId == pId || !(choose == "1" || choose == "2" || choose == "22") {
-		return false, fmt.Errorf("%s非法合并操作,wId:%s,pId:%s", nowId, wId, pId)
-	}
-	wxRes, _ := this.mg.FindById("user", wId, nil)
-	phRes, _ := this.mg.FindById("user", pId, nil)
-	if wxRes == nil || len(*wxRes) == 0 || phRes == nil || len(*phRes) == 0 {
-		return false, fmt.Errorf("查询异常")
-	}
-
-	//开始合并流程
-	var backUserErr, orderErr, updateErr error
-	if choose == "1" {
-		upset := map[string]interface{}{}
-		for _, item := range PhField {
-			if value, exists := (*phRes)[item]; exists {
-				if _, ok := (*wxRes)[item]; !ok {
-					upset[item] = value
-					(*wxRes)[item] = value
-				}
-			}
-		}
-		change := map[string]interface{}{
-			"$set": upset,
-		}
-		if (*wxRes)["s_m_phone"] == (*wxRes)["s_phone"] { //s_m_phone和s_phone都存在 保留s_phone
-			change["$unset"] = map[string]interface{}{"s_m_phone": ""}
-		}
-		if !this.mg.UpdateById("user", wId, change) {
-			updateErr = fmt.Errorf("自动合并更新异常")
-		}
-		this.FlushSession(wxRes, "")                        //更新session
-		backUserErr = this.backupsUser(*phRes, choose, wId) //删除用户
-		//orderErr = this.mergeOrder(pId, wId)                //合并订单
-	} else if choose == "2" || choose == "22" {
-		upset := map[string]interface{}{}
-		for _, item := range WxField {
-			if value, exists := (*wxRes)[item]; exists {
-				if _, ok := (*phRes)[item]; !ok {
-					upset[item] = value
-					(*phRes)[item] = value
-				}
-			}
-		}
-		//默认开启所有微信推送
-		for _, item := range []string{"o_jy", "o_vipjy"} {
-			if (*phRes)[item] != nil {
-				upset[fmt.Sprintf("%s.i_wxpush", item)] = 1
-			}
-		}
-		if !this.mg.UpdateById("user", pId, map[string]interface{}{
-			"$set": upset,
-		}) {
-			updateErr = fmt.Errorf("自动合并更新异常")
-		}
-		this.FlushSession(phRes, "")                        //更新session
-		backUserErr = this.backupsUser(*wxRes, choose, pId) //删除用户
-		//orderErr = this.mergeOrder(wId, pId)                //合并订单
-	}
-	if backUserErr != nil || orderErr != nil || updateErr != nil {
-		for _, fuc := range noteFunc { //发送合并异常通知
-			fuc(backUserErr, orderErr, updateErr)
-		}
-	}
-	return true, nil
-}
-
-//备份用户
-func (wum *UserMerge) backupsUser(remove map[string]interface{}, flag, saveId string) error {
-	userId := BsonIdToSId(remove["_id"])
-	now := time.Now().Unix()
-	remove["l_mergeData"] = now
-	remove["s_userId"] = userId //保留账户id
-	remove["s_save_userId"] = saveId
-	if len(flag) == 1 {
-		remove["mergeType"] = "chooseMerge"
-	} else {
-		remove["mergeType"] = "autoMerge"
-	}
-	if wum.mg.Save("user_merge", remove) == "" {
-		log.Println("p19用户合并 保存user_merge失败", remove)
-	}
-	if !wum.mg.Del("user", map[string]interface{}{"_id": StringTOBsonId(userId)}) {
-		log.Println("p19用户合并 删除user信息失败", remove)
-		return fmt.Errorf("p19用户合并 删除user:%s信息失败", userId)
-	}
-	//清除被清除用户session
-	redis.Put("session", fmt.Sprintf("usermerge_delete_%s", userId), saveId, 7*24*60*60)
-	//清除推送表数据
-	for _, tableName := range aboutTableRemove {
-		if !wum.mg.Del(tableName, map[string]interface{}{"userid": userId}) {
-			log.Printf("p19用户合并 删除推送相关数据出错:用户%s,表名%s\n", userId, tableName)
-		}
-	}
-	//user表记录合并 用于统计
-	wum.mg.UpdateById("user", saveId, map[string]interface{}{
-		"$set": map[string]interface{}{
-			"s_merged_id": userId,
-			"l_mergeDate": now,
-		},
-	})
-	return nil
-}
-
-//订单合并
-func (wum *UserMerge) mergeOrder(queryId, setId string) error {
-	//记录备份订单
-	//orderList := wum.mysqlDb.Find("dataexport_order", map[string]interface{}{
-	//	"": "",
-	//}, "", "", -1, -1)
-	//if orderList == nil || len(*orderList) == 0 {
-	//	log.Printf("p19用户合并-订单迁移[无需要迁移订单] %s->%s \n", queryId, setId)
-	//	return
-	//}
-	//wum.mg.SaveBulk("user_merge_order", *orderList...)
-
-	ok := wum.mysqlDb.ExecTx("用户合并-订单转移", func(tx *sql.Tx) bool {
-		//关闭订单
-		ok_1 := wum.mysqlDb.UpdateOrDeleteBySqlByTx(tx, `UPDATE dataexport_order SET order_status = -2 WHERE user_id = ? and  order_status =0`, queryId) != -1
-		//订单转移
-		ok_2 := wum.mysqlDb.UpdateOrDeleteBySqlByTx(tx, `UPDATE dataexport_order SET user_id = ? WHERE user_id = ? `, setId, queryId) != -1
-		return ok_1 && ok_2
-	})
-	log.Printf("p19用户合并-订单迁移%s %s->%s \n", qutil.If(ok, "成功", "失败").(string), queryId, setId)
-	if !ok {
-		return fmt.Errorf("p19用户合并-订单迁移失败 %s->%s", queryId, setId)
-	}
-	return nil
-}
-
 //更新session
 func (this *UserMerge) FlushSession(userData *map[string]interface{}, userId string) {
 	if userData == nil {
-		userData, _ = this.mg.FindById("user", userId, `{"_id":1,"i_shareknow":1,"s_m_openid":1,"s_nickname":1,"s_headimage":1,"s_headimageurl":1,"s_phone":1,"s_jpushid":1,"s_opushid":1,"s_appponetype":1,"s_appversion":1}`)
+		userData, _ = this.mg.FindById("user", userId, `{"_id":1,"i_shareknow":1,"s_m_openid":1,"s_nickname":1,"s_headimage":1,"s_headimageurl":1,"s_phone":1,"s_m_phone":1,"s_jpushid":1,"s_opushid":1,"s_appponetype":1,"s_appversion":1}`)
 	}
 	sessionVal := make(map[string]interface{})
 	sessionVal["user"] = *userData
@@ -287,6 +121,10 @@ func (this *UserMerge) FlushSession(userData *map[string]interface{}, userId str
 	sessionVal["openid"] = sessionVal["s_m_openid"]
 	//app端
 	sessionVal["s_phone"] = phone
+	if phone == "" {
+		phone, _ = (*userData)["s_m_phone"].(string)
+	}
+	sessionVal["phone"] = phone
 	sessionVal["s_headimageurl"] = strings.Replace(avatar, "http://", "https://", 1)
 	sessionVal["s_jpushid"], _ = (*userData)["s_jpushid"].(string)
 	sessionVal["s_opushid"], _ = (*userData)["s_opushid"].(string)

+ 15 - 15
src/jfw/modules/followent/src/web/templates/_error.html

@@ -104,7 +104,7 @@
 	text-align: center;
 	margin-bottom: -6px;
 	margin-top: -16px;
-	
+
 }
 .j-wx-code>.code-wxm>img{
 	width: 200px;
@@ -112,7 +112,7 @@
 	margin-top: -5px;
 }
 .j-wx-code>.code-text{
-	text-align: center;	
+	text-align: center;
 }
 .j-wx-code>.code-bottom{
 	width: 470px;
@@ -166,7 +166,7 @@ $(function(){
 				<input type="hidden" name="searchvalue">
 			</form>
 				</li>
-				
+
 				<li class="j-nav-link" style="cursor:default; width:1px; height:1px; margin-right:99px">
 					<div class='useronline' id="login"></div>
 				</li>
@@ -190,7 +190,7 @@ $(function(){
 						<font>一键订阅关键词</font><br>
 						<span>招标信息自动推送</span>
 					</div>
-					
+
 					</div>
 				</div>
 			</div>
@@ -204,7 +204,7 @@ $(function(){
 						<span>微信扫描登录</span><br>
 						<span>新用户自动注册</span>
 					</div>
-					
+
 					</div>
 				</div>
 			</div>
@@ -333,7 +333,7 @@ $("body").click(function(event){
 	}else{
 		//点击body隐藏
 		$(".infoList").hide();
-	}	
+	}
 })
 
 function openStyle(){
@@ -357,7 +357,7 @@ function commonMouseEvent(){
 		$(this).css({
 			'boxShadow': '0px 0px 10px rgba(0,0,0, .15)'
 		});
-		
+
 	}).mouseout(function(){
 		$(this).css({
 			'boxShadow': 'none'
@@ -367,10 +367,10 @@ function commonMouseEvent(){
 			'color':'#1d1d1d'
 		});
 		//$('.usernameDiv').css({
-		//	'backgroundColor':'#fff'	
+		//	'backgroundColor':'#fff'
 		//});
 		//$('.two').css('border-color','transparent transparent #e0e0e0 transparent')
-		
+
 	})
 }
 function infoListCss(){
@@ -397,7 +397,7 @@ function infoListCss(){
 	    'border-width': '6px',
 	    'border-color': 'transparent transparent #e0e0e0 transparent'
 	})
-		
+
 	$('.two').css({
 		'display': 'inline-block',
 	    'width': '0px',
@@ -525,7 +525,7 @@ function infoListCss(){
 		<div class="jy_QRtext">一键订阅关键词<br>招标信息自动推送</div>
 			<img id=bc_bottoming src="/images/yj-background.png"/>
 			<img style="position:absolute;left:39px;margin-top:6px;width:123px;" id="bottomimg" src="/wxswordfish/images/QRcode.png"/>
-		</div>		
+		</div>
 	</div>
 	<div class="hidden">
 		<div class="j-bottom-t">
@@ -555,13 +555,13 @@ function infoListCss(){
     var myhost = location.host;
     var nowYear = new Date().getFullYear()
 	if(myhost.indexOf("jianyu360.com")>=0){
-		$("#cpinfo").html("©2015-" + nowYear + " jianyu360.com 版权所有 | 京ICP备14030217号-3")
+		$("#cpinfo").html("©2015-" + nowYear + " jianyu360.com 版权所有 | " + '<a style="color: inherit; font-size: inherit;" href="https://beian.miit.gov.cn/" target="_blank">京ICP备14030217号-3</a>')
 	}else if(myhost.indexOf("jianyu360.cn")>=0){
-		$("#cpinfo").html("©2015-" + nowYear + " jianyu360.cn 版权所有 | 京ICP备14030217号-3")
+		$("#cpinfo").html("©2015-" + nowYear + " jianyu360.cn 版权所有 | " + '<a style="color: inherit; font-size: inherit;" href="https://beian.miit.gov.cn/" target="_blank">京ICP备14030217号-3</a>')
 	}else{
 		$("#cpinfo").html("©2015-" + nowYear + " jianyu360.com 版权所有 | 豫ICP备15016539号-2")
 	}
-	
+
 	$(".j-bottom .jy_province font").click(function(){
 		var scope = $(this).text();
 		areasearch(scope);
@@ -624,4 +624,4 @@ function backTopAdjust(){
 </script>
 </div>
 </body>
-</html>
+</html>

+ 2 - 2
src/jfw/modules/subscribepay/src/a/init.go

@@ -50,8 +50,6 @@ func init() {
 	//招投标课程
 	xweb.AddRouter("/jypay", &service.CourseAction{})
 
-	//用户合并
-	xweb.AddRouter("/jypay", &service.UserMerge{})
 	//开发票
 	xweb.AddRouter("/jypay", &service.Invoice{})
 	//大会员
@@ -65,4 +63,6 @@ func init() {
 	xweb.AddRouter("/jypay", &service.Integral{})
 
 	xweb.AddRouter("/jyactive", &active.Active{})
+
+	xweb.AddRouter("/jypay", &service.PhoneCollent{})
 }

+ 2 - 2
src/jfw/modules/subscribepay/src/config.json

@@ -19,7 +19,7 @@
 		"userName": "jyDevGroup",
 		"password": "jy@DevGroup"
 	},
-    "redisaddrs": "other=192.168.3.128:1712,session=192.168.3.128:1712,push=192.168.3.128:1712,pushcache_1=192.168.3.128:5000,pushcache_2_a=192.168.3.128:5001",
+    "redisaddrs": "other=192.168.3.128:1712,session=192.168.3.11:1713,push=192.168.3.128:1712,pushcache_1=192.168.3.128:5000,pushcache_2_a=192.168.3.128:5001",
     "elasticsearch": "http://192.168.3.128:9800",
     "elasticPoolSize": 30,
     "appid": "wx5b1c6e7cc4dac0e4",
@@ -66,5 +66,5 @@
   "profitTitle": "您有%s元佣金可领取!",
   "profitDescript": "您的好友已通过您的分享购买%s成功!您已获得%s元佣金!",
   "termValidity": 60,
-  "autoMergeLimitTime":1611072000
+  "accountMergeOnline":"2021-04-07 12:00:00"
 }

+ 18 - 8
src/jfw/modules/subscribepay/src/config/config.go

@@ -4,6 +4,7 @@ import (
 	qutil "qfw/util"
 	"qfw/util/mail"
 	qrpc "qfw/util/rpc"
+	"time"
 )
 
 type config struct {
@@ -45,14 +46,15 @@ type config struct {
 		Pwd  string
 		User string
 	}
-	ExpireRemind   []int
-	WxTplExpire    string
-	TermValidity   int
-	OrderCountdown interface{}
-	AllPayMoney    int
-	AutoMergeTime  int64
-	ProfitTitle    string
-	ProfitDescript string
+	ExpireRemind       []int
+	WxTplExpire        string
+	TermValidity       int
+	OrderCountdown     interface{}
+	AllPayMoney        int
+	AutoMergeTime      int64
+	ProfitTitle        string
+	ProfitDescript     string
+	AccountMergeOnline string
 }
 type mgoConf struct {
 	Address           string
@@ -232,6 +234,7 @@ var AliPayConf map[string]interface{}
 var WxPayConf map[string]interface{}
 
 var Wxoauth, Wxoauthinfo string
+var AutoMergeTimeStamp int64
 
 func init() {
 	//程序配置文件
@@ -263,4 +266,11 @@ func init() {
 	Wxoauth = `https://open.weixin.qq.com/connect/oauth2/authorize?appid=` + Config.Appid + `&redirect_uri=%s&response_type=code&scope=snsapi_base&state=%s#wechat_redirect`
 	Wxoauthinfo = `https://api.weixin.qq.com/sns/oauth2/access_token?appid=` + Config.Appid + `&secret=` + Config.Appsecret + `&code=%s&grant_type=authorization_code`
 
+	//账户合并
+	time, err := time.ParseInLocation(qutil.Date_Full_Layout, Config.AccountMergeOnline, time.Local)
+	if err != nil {
+		panic(err)
+	}
+	AutoMergeTimeStamp = time.Unix()
+
 }

+ 20 - 2
src/jfw/modules/subscribepay/src/filter/filter.go

@@ -2,9 +2,27 @@ package filter
 
 import (
 	"github.com/go-xweb/xweb"
+	"net/http"
 )
 
 func init() {
-	xweb.AddFilter(&logfilter{App: xweb.RootApp()})
-	xweb.AddFilter(&sessionfilter{App: xweb.RootApp()})
+	xweb.AddFilter(&Filter{})
+}
+
+type Filter struct {
+}
+
+func (f *Filter) Do(w http.ResponseWriter, r *http.Request) bool {
+	session := xweb.RootApp().SessionManager.Session(r, w)
+	getSession := session.GetMultiple()
+	if !(&mergeFilter{w, r, session, getSession}).Do() {
+		return false
+	}
+	if !(&sessionfilter{w, r, getSession}).Do() {
+		return false
+	}
+	if !(&logfilter{w, r, getSession}).Do() {
+		return false
+	}
+	return true
 }

+ 9 - 11
src/jfw/modules/subscribepay/src/filter/logfilter.go

@@ -7,25 +7,23 @@ import (
 	"strings"
 	"time"
 	"util"
-
-	"github.com/go-xweb/httpsession"
-	"github.com/go-xweb/xweb"
 )
 
 //日志过滤器
 type logfilter struct {
-	App *xweb.App
+	W          http.ResponseWriter
+	R          *http.Request
+	SessionMap map[string]interface{}
 }
 
 //继承过滤器方法
-func (l *logfilter) Do(w http.ResponseWriter, req *http.Request) bool {
-	session := l.App.SessionManager.Session(req, w)
-	go addLog(l, session, req)
+func (l *logfilter) Do() bool {
+	go addLog(l.SessionMap, l.R)
 	return true
 }
 
 //用线程处理,增加日志
-func addLog(l *logfilter, session *httpsession.Session, req *http.Request) {
+func addLog(session map[string]interface{}, req *http.Request) {
 	timeNow := time.Now()
 	md, _ := json.Marshal(req.Form)
 	logs := map[string]interface{}{
@@ -42,9 +40,9 @@ func addLog(l *logfilter, session *httpsession.Session, req *http.Request) {
 		"method":     req.Method,
 		"url":        req.RequestURI,
 	}
-	if session.Get("userId") != nil {
-		logs["userid"] = session.Get("userId")
-		logs["nickname"] = session.Get("s_nickname")
+	if session["userId"] != nil {
+		logs["userid"] = session["userId"]
+		logs["nickname"] = session["s_nickname"]
 	}
 	util.MQFW.Save("subscribepay_logs", logs)
 }

+ 34 - 0
src/jfw/modules/subscribepay/src/filter/mergefilter.go

@@ -0,0 +1,34 @@
+package filter
+
+import (
+	"fmt"
+	"log"
+	"net/http"
+	"qfw/util/jy"
+	"qfw/util/redis"
+	"util"
+
+	"github.com/go-xweb/httpsession"
+)
+
+//用户合并删除用户检测
+type mergeFilter struct {
+	W          http.ResponseWriter
+	R          *http.Request
+	Session    *httpsession.Session
+	GetSession map[string]interface{}
+}
+
+func (l *mergeFilter) Do() bool {
+	//账户合并-刷新session
+	if uid := l.GetSession["userId"]; uid != nil && uid != "" {
+		if val := redis.Get("session", fmt.Sprintf("usermerge_delete_%s", uid)); val != nil {
+			if sUid, ok := val.(string); sUid != "" && ok {
+				log.Printf("账户合并 mergeFilter 自动刷新session old:%s new:%s\n", uid, sUid)
+				jy.CreateUserMerge(util.MQFW, util.Mysql, l.Session).FlushSession(nil, sUid)
+				return true
+			}
+		}
+	}
+	return true
+}

+ 7 - 8
src/jfw/modules/subscribepay/src/filter/sessionfilter.go

@@ -3,18 +3,18 @@ package filter
 import (
 	"net/http"
 	"strings"
-
-	"github.com/go-xweb/xweb"
 )
 
 //登录限制
 type sessionfilter struct {
-	App *xweb.App
+	W          http.ResponseWriter
+	R          *http.Request
+	GetSession map[string]interface{}
 }
 
 //继承过滤器方法
-func (l *sessionfilter) Do(w http.ResponseWriter, req *http.Request) bool {
-	rqu := req.URL.Path
+func (l *sessionfilter) Do() bool {
+	rqu := l.R.URL.Path
 	if strings.HasPrefix(rqu, "/jypay/callback/") || //支付回调
 		strings.HasPrefix(rqu, "/jypay/weixin/reward/") || //打赏跳转
 		strings.HasPrefix(rqu, "/jypay/course/free") || //招投标课程
@@ -26,9 +26,8 @@ func (l *sessionfilter) Do(w http.ResponseWriter, req *http.Request) bool {
 		rqu == "/jypay/user/company/association" { //微信js调用参数
 		return true
 	}
-	session := l.App.SessionManager.Session(req, w)
-	if session.Get("userId") == nil {
-		w.Write([]byte("{\"error\":\"需要登录!\"}"))
+	if l.GetSession["userId"] == nil {
+		l.W.Write([]byte("{\"error\":\"需要登录!\"}"))
 		return false
 	}
 	return true

+ 40 - 39
src/jfw/modules/subscribepay/src/service/payCallback.go

@@ -55,55 +55,56 @@ func (this *PayCallBackAction) TestPay() {
 		"",
 		ordercode,
 	}
-	if typeFlag == "大会员" { //大会员
-		if !entity.MemberStruct.PayCallBack(thisParam) {
-			log.Printf("大会员更新执行出错 %+v\n", thisParam)
-			this.Write("大会员更新执行出错")
-			return
+	success := false
+	switch typeFlag {
+	case "大会员":
+		if entity.MemberStruct.PayCallBack(thisParam) {
+			success = true
 		}
-	} else if typeFlag == "历史数据" { //数据导出
-		if !entity.JyDataExportStruct.PayCallBack(thisParam) {
-			log.Printf("数据导出更新执行出错 %+v\n", thisParam)
-			this.Write("数据导出更新执行出错")
-			return
+	case "历史数据":
+		if entity.JyDataExportStruct.PayCallBack(thisParam) {
+			success = true
 		}
-	} else if typeFlag == "数据报告" { //数据报告
-		if !entity.JyDataReportStruct.PayCallBack(thisParam) {
-			log.Printf("数据报告更新执行出错 %+v\n", thisParam)
-			this.Write("数据报告更新执行出错")
-			return
+	case "数据报告":
+		if entity.JyDataReportStruct.PayCallBack(thisParam) {
+			success = true
 		}
-	} else if typeFlag == "VIP订阅" { //vip订阅
-		if !entity.JyVipSubStruct.PayCallBack(thisParam) {
-			log.Printf("vip订阅更新执行出错 %+v\n", thisParam)
-			this.Write("vip订阅更新执行出错")
-			return
+	case "VIP订阅":
+		if entity.JyVipSubStruct.PayCallBack(thisParam) {
+			success = true
 		}
-	} else if typeFlag == "企业商机管理" {
-		if !entity.EntnicheStruct.PayCallBack(thisParam) {
-			log.Printf("企业商机管理管理更新执行出错 %+v\n", thisParam)
-			return
+	case "企业商机管理":
+		if entity.EntnicheStruct.PayCallBack(thisParam) {
+			success = true
 		}
-	} else if typeFlag == "大会员-AI中标预测包" {
-		if !entity.AiForecastPackStruct.PayCallBack(thisParam) {
-			log.Printf("大会员-AI中标预测包更新执行出错 %+v\n", thisParam)
-			return
+	case "大会员-AI中标预测包":
+		if entity.AiForecastPackStruct.PayCallBack(thisParam) {
+			success = true
 		}
-	} else if typeFlag == "大会员-招标文件解读" || typeFlag == "招标文件解读" {
-		if !entity.Bidfile.PayCallBack(thisParam) {
-			log.Printf("招标文件解读更新执行出错 %+v\n", thisParam)
-			return
+	case "大会员-招标文件解读":
+		if entity.Bidfile.PayCallBack(thisParam) {
+			success = true
 		}
-	} else if typeFlag == "剑鱼币" {
-		if !entity.Integral.PayCallBack(thisParam) {
-			log.Printf("剑鱼币更新执行出错 %+v\n", thisParam)
-			return
+	case "招标文件解读":
+		if entity.Bidfile.PayCallBack(thisParam) {
+			success = true
 		}
+	case "剑鱼币":
+		if entity.Integral.PayCallBack(thisParam) {
+			success = true
+		}
+	case "中标必听课":
+		if entity.JyCourseOnline.PayCallBack(thisParam) {
+			success = true
+		}
+	default:
+		typeFlag = "未知类型"
+	}
+	if success {
+		this.Write(fmt.Sprintf("<%s>模拟支付成功", typeFlag))
 	} else {
-		this.Write("未知支付类型" + typeFlag)
+		this.Write(fmt.Sprintf("<%s>模拟支付失败", typeFlag))
 	}
-	log.Printf("%s模拟支付成功\n", ordercode)
-	this.Write("模拟支付成功")
 }
 
 //float元转分

+ 126 - 0
src/jfw/modules/subscribepay/src/service/phoneCollent.go

@@ -0,0 +1,126 @@
+package service
+
+import (
+	. "api"
+	"config"
+	"fmt"
+	qutil "qfw/util"
+	"qfw/util/jy"
+	"time"
+	"util"
+
+	"github.com/go-xweb/httpsession"
+	"github.com/go-xweb/xweb"
+)
+
+type PhoneCollent struct {
+	*xweb.Action
+	//合并 手机手机号
+	collectPhone xweb.Mapper `xweb:"/userMsg/collect"`     //收集手机号
+	neverRemind  xweb.Mapper `xweb:"/userMsg/neverRemind"` //不再提醒
+	needBind     xweb.Mapper `xweb:"/userMsg/needBind"`    //是否需要进入到绑定手机号
+}
+
+func (this *PhoneCollent) CollectPhone() {
+	if !R.CheckReqParam(this.ResponseWriter, this.Request, "phone", "step") {
+		return
+	}
+	userId, _ := this.GetSession("userId").(string)
+	phone := this.GetString("phone")
+	step, _ := this.GetInteger("step")
+	r, msg := func() (interface{}, error) {
+		if step != 1 && step != 2 {
+			return nil, fmt.Errorf("参数异常")
+		}
+		if step == 1 {
+			_, err := phoneStep_coll(this.Session(), step, phone, "")
+			if err != nil {
+				return nil, err
+			}
+		} else if step == 2 {
+			code := this.GetString("code")
+			phone, err := phoneStep_coll(this.Session(), step, phone, code)
+			if err != nil {
+				return nil, err
+			}
+			if !util.CollectPhone(userId, phone) {
+				return nil, fmt.Errorf("更新出错")
+			}
+		}
+		return map[string]interface{}{
+			"status": 1,
+		}, nil
+	}()
+	this.ServeJson(NewResult(r, msg))
+}
+func (this *PhoneCollent) NeverRemind() {
+	if !R.CheckReqParam(this.ResponseWriter, this.Request, "merge_remind") {
+		return
+	}
+	userId := qutil.ObjToString(this.GetSession("userId"))
+	checkout, _ := this.GetBool("merge_remind")
+	if util.MQFW.UpdateById("user", userId, map[string]interface{}{
+		"$set": map[string]interface{}{
+			"b_merge_remind": checkout,
+		},
+	}) {
+		this.ServeJson(NewResult(map[string]interface{}{
+			"status": 1,
+		}, nil))
+	}
+	this.ServeJson(NewResult(nil, fmt.Errorf("保存失败")))
+}
+func (this *PhoneCollent) NeedBind() {
+	r := func() bool {
+		uid, _ := this.GetSession("userId").(string)
+		if uid == "" {
+			return false
+		}
+		if person, ok := util.MQFW.FindById("user", uid, `{"s_phone":1,"s_m_phone":1,"b_merge_remind":1,"l_registedate":1}`); person != nil && len(*person) > 0 && ok {
+			s_phone := qutil.ObjToString((*person)["s_phone"])
+			if s_phone == "" {
+				s_phone = qutil.ObjToString((*person)["s_m_phone"])
+			}
+			if s_phone != "" {
+				return false
+			}
+			regtime := qutil.Int64All((*person)["l_registedate"])
+			reg := time.Unix(regtime, 0)
+			//新用户时间
+			accountMergeOnline := config.Config.AccountMergeOnline
+			onLineTime, _ := time.ParseInLocation(qutil.Date_Full_Layout, accountMergeOnline, time.Local)
+			if remind, _ := (*person)["b_merge_remind"].(bool); remind { //不再提醒
+				return false
+			}
+			if onLineTime.Before(reg) { //新用户
+				return true
+			}
+		}
+		return false
+	}()
+	this.ServeJson(NewResult(r, nil))
+}
+
+//手机号绑定流程
+//绑定=bind 更改=change
+func phoneStep_coll(sess *httpsession.Session, step int, phone, code string) (string, error) {
+	switch step {
+	case 1: //1 发送验证码
+		//校验手机号格式
+		if !jy.PhoneReg.MatchString(phone) {
+			return "", fmt.Errorf("手机号格式不正确")
+		}
+		if !jy.SendPhoneIdentCode(phone, sess) {
+			return "", fmt.Errorf("验证码发送频繁")
+		}
+		return phone, nil
+	case 2: //2 校验验证码
+		vPhone := jy.CheckPhoneIdent(sess, code)
+		if vPhone == "" {
+			return "", fmt.Errorf("验证码错误")
+		}
+		jy.ClearPhoneIdentSession(sess)
+		return vPhone, nil
+	}
+	return "", fmt.Errorf("未知操作")
+}

+ 67 - 32
src/jfw/modules/subscribepay/src/service/userAccountInfo.go

@@ -7,7 +7,11 @@ import (
 	"database/sql"
 	"encoding/base64"
 	"fmt"
+	"github.com/dchest/captcha"
+	"github.com/go-xweb/httpsession"
+	"github.com/go-xweb/xweb"
 	"log"
+	"mongodb"
 	qutil "qfw/util"
 	"qfw/util/elastic"
 	"qfw/util/jy"
@@ -15,10 +19,6 @@ import (
 	"strings"
 	"time"
 	"util"
-
-	"github.com/dchest/captcha"
-	"github.com/go-xweb/httpsession"
-	"github.com/go-xweb/xweb"
 )
 
 type UserAccount struct {
@@ -311,6 +311,7 @@ func (this *UserAccount) PhoneBind() {
 		step, _ := this.GetInteger("step")
 		phone := this.GetString("phone")
 		code := this.GetString("code")
+		mode := this.GetString("mode")
 		if step == 1 {
 			//校验图形验证码
 			if pass, err := imgCaptchaCheck(this.Session(), userId, code); !pass || err != nil {
@@ -330,7 +331,7 @@ func (this *UserAccount) PhoneBind() {
 		}
 		//校验验证码成功【校验是否需要合并】
 		if step == 2 {
-			uData, _ := util.MQFW.FindById("user", userId, `{"s_unionid":1,"s_name":1,"s_nickname":1,"s_headimageurl":1}`)
+			uData, _ := util.MQFW.FindById("user", userId, `{"s_unionid":1,"s_name":1,"s_nickname":1,"s_headimageurl":1,"l_registedate":1,"i_ispush":1,"i_applystatus":1,"i_sex":1,"s_country":1,"s_province":1,"s_city":1,"s_m_openid":1,"a_m_openid":1}`)
 			if uData == nil && len(*uData) == 0 {
 				return nil, DBQUERY_ERROR
 			}
@@ -342,16 +343,47 @@ func (this *UserAccount) PhoneBind() {
 			if exists { //再次校验是否使用
 				return nil, fmt.Errorf("手机号已被绑定")
 			}
-			//建立关联关系
-			if bindErr := jy.NewPhoneUtil(util.MQFW).BindPhone(userId, relationPhoneId, phoneVerify, &map[string]interface{}{
-				"s_unionid":      (*uData)["s_unionid"],
-				"s_name":         (*uData)["s_name"],
-				"s_nickname":     (*uData)["s_nickname"],
-				"s_headimageurl": (*uData)["s_headimageurl"],
-			}); bindErr != nil {
-				return nil, bindErr
+			if mode == "" || relationPhoneId == "" { //主动绑定-建立双向绑定关系||跳转绑定新手机号
+				//建立关联关系
+				if bindErr := jy.NewPhoneUtil(util.MQFW).BindPhone(userId, relationPhoneId, phoneVerify, &map[string]interface{}{
+					"s_unionid":      (*uData)["s_unionid"],
+					"s_name":         (*uData)["s_name"],
+					"s_nickname":     (*uData)["s_nickname"],
+					"s_headimageurl": (*uData)["s_headimageurl"],
+				}); bindErr != nil {
+					return nil, bindErr
+				}
+				jy.CreateUserMerge(util.MQFW, util.Mysql, this.Session()).FlushSession(nil, userId) //刷新session
+			} else if mode == "mergeBind" { //跳转绑定-不合并绑定无效
+				if qutil.Int64All((*uData)["l_registedate"]) > config.AutoMergeTimeStamp { //新微信直接绑定
+					if util.MQFW.UpdateById("user", relationPhoneId, map[string]interface{}{
+						"$set": map[string]interface{}{
+							"s_unionid":      (*uData)["s_unionid"],
+							"s_name":         (*uData)["s_name"],
+							"s_nickname":     (*uData)["s_nickname"],
+							"s_headimageurl": (*uData)["s_headimageurl"],
+							"i_ispush":       (*uData)["i_ispush"],
+							"i_applystatus":  (*uData)["i_applystatus"],
+							"i_sex":          (*uData)["i_sex"],
+							"s_country":      (*uData)["s_country"],
+							"s_province":     (*uData)["s_province"],
+							"s_city":         (*uData)["s_country"],
+							"s_m_openid":     (*uData)["s_m_openid"],
+							"a_m_openid":     (*uData)["a_m_openid"],
+						},
+					}) {
+						util.MQFW.Del("user", map[string]interface{}{"_id": mongodb.StringTOBsonId(userId)})
+						jy.CreateUserMerge(util.MQFW, util.Mysql, this.Session()).FlushSession(nil, relationPhoneId)
+						redis.Put("session", fmt.Sprintf("usermerge_delete_%s", userId), relationPhoneId, 7*24*60*60)
+						return rData, nil
+					}
+					return nil, fmt.Errorf("账号自动合并异常")
+				} else { //老微信用户选择合并
+					go util.CollectPhone(userId, phoneVerify) //增加user表验证手机号
+					rData["state"] = 2                        //跳转合并页面
+					rData["token"] = jy.MergeEncrypt.Encode2Hex(userId + "&&" + relationPhoneId)
+				}
 			}
-			jy.CreateUserMerge(util.MQFW, util.Mysql, this.Session()).FlushSession(nil, userId) //刷新session
 		}
 		return rData, nil
 	}()
@@ -382,7 +414,7 @@ func (this *UserAccount) PhoneChange() {
 				return nil, err
 			}
 			//发送短信验证码前,校验手机号是否存在
-			wId, _, _, _, _, err := jy.CreateUserMerge(util.MQFW, util.Mysql, this.Session()).MergeQuery()
+			wId, _, _, err := jy.CreateUserMerge(util.MQFW, util.Mysql, this.Session()).MergeQuery()
 			if err != nil {
 				return nil, err
 			}
@@ -398,7 +430,7 @@ func (this *UserAccount) PhoneChange() {
 		//校验验证码成功绑定手机号
 		if step == 2 {
 			//更换手机号前,再次校验是否存在手机号
-			wId, _, _, _, _, err := jy.CreateUserMerge(util.MQFW, util.Mysql, this.Session()).MergeQuery()
+			wId, _, _, err := jy.CreateUserMerge(util.MQFW, util.Mysql, this.Session()).MergeQuery()
 			if err != nil {
 				return nil, err
 			}
@@ -414,16 +446,16 @@ func (this *UserAccount) PhoneChange() {
 			if beforePhone == "" {
 				return nil, fmt.Errorf("获取手机号异常")
 			}
+			updateMap := map[string]interface{}{}
 			//商机管理更改手机号逻辑entniche
 			if !util.Mysql.ExecTx("更换管理员老手机号", func(tx *sql.Tx) bool {
-				update_1, update_2, update_3 := true, true, false
+				update_1, update_2 := true, true
 				if util.Mysql.CountBySql("select id from entniche_user where phone=? ", beforePhone) > 0 {
 					update_1 = util.Mysql.UpdateOrDeleteBySqlByTx(tx, `update entniche_user set phone=? where phone=? `, phoneVerify, beforePhone) > -1
 				}
 				if util.Mysql.CountBySql("select id from entniche_info where phone=? ", beforePhone) > 0 {
 					update_2 = util.Mysql.UpdateOrDeleteBySqlByTx(tx, `update entniche_info set phone=? where phone=?`, phoneVerify, beforePhone) > -1
 				}
-				updateMap := map[string]interface{}{}
 				changePhone := map[string]interface{}{}
 				if (*uData)["s_phone"] != nil {
 					changePhone["s_phone"] = phoneVerify
@@ -456,25 +488,28 @@ func (this *UserAccount) PhoneChange() {
 						updateMap["$unset"] = phoneUnset
 					}
 				}
-				//设置新号关联关系
-				if relationPhoneId != "" {
-					upsetMap := map[string]interface{}{
-						"s_unionid":      (*uData)["s_unionid"],
-						"s_name":         (*uData)["s_name"],
-						"s_nickname":     (*uData)["s_nickname"],
-						"s_headimageurl": (*uData)["s_headimageurl"],
-					}
-					if err := jy.NewPhoneUtil(util.MQFW).BindWeixin(relationPhoneId, "", "", &upsetMap, "PhoneChange"); err != nil {
-						log.Printf("%s UserAccount ChangePhone 更改手机号异常 %v \n", userId, err)
-					}
-				}
-				update_3 = util.MQFW.UpdateById("user", userId, updateMap)
 				//记录日志
 				jy.NewPhoneUtil(util.MQFW).Log(userId, "PhoneChange", phoneVerify)
-				return update_1 && update_2 && update_3
+				return update_1 && update_2
 			}) {
 				return nil, fmt.Errorf("商机管理手机号更改出错")
 			}
+			//设置新号关联关系
+			if relationPhoneId != "" {
+				upsetMap := map[string]interface{}{
+					"s_unionid":      (*uData)["s_unionid"],
+					"s_name":         (*uData)["s_name"],
+					"s_nickname":     (*uData)["s_nickname"],
+					"s_headimageurl": (*uData)["s_headimageurl"],
+				}
+				if err := jy.NewPhoneUtil(util.MQFW).BindWeixin(relationPhoneId, "", "", &upsetMap, "PhoneChange"); err != nil {
+					log.Printf("%s UserAccount ChangePhone 更改手机号异常 %v \n", userId, err)
+				}
+			}
+			if !util.MQFW.UpdateById("user", userId, updateMap) {
+				log.Printf("%s UserAccount ChangePhone 数据更改手机号异常 \n", userId)
+				return nil, fmt.Errorf("数据更新异常")
+			}
 			this.Session().Del(phoneAuthPassSessionKey)
 			jy.CreateUserMerge(util.MQFW, util.Mysql, this.Session()).FlushSession(nil, userId) //刷新session
 		}

+ 0 - 145
src/jfw/modules/subscribepay/src/service/userMerge.go

@@ -1,145 +0,0 @@
-package service
-
-import (
-	. "api"
-	"fmt"
-	"github.com/go-xweb/xweb"
-	"log"
-	qutil "qfw/util"
-	"qfw/util/jy"
-	"strings"
-	"time"
-	"util"
-)
-
-//p19.3 用户手动合并
-
-//微信号用户合并
-type UserMerge struct {
-	*xweb.Action
-	mergeQuery  xweb.Mapper `xweb:"/userMsg/query"`    //查询是否可以用户合并【手机号合并及微信合并】
-	mergeStats  xweb.Mapper `xweb:"/usermerge/state"`  //查询合并状态【购买收费服务状态】
-	mergeSubmit xweb.Mapper `xweb:"/usermerge/submit"` //提交用户合并
-}
-
-var (
-	mergeEncrypt = qutil.SimpleEncrypt{Key: "jy_merge_user"}
-)
-
-//查询手机号绑定和合并状态
-func (this *UserMerge) MergeQuery() {
-	userId := qutil.ObjToString(this.GetSession("userId"))
-	rData, errMsg := func() (interface{}, error) {
-		if userId == "" {
-			return nil, fmt.Errorf("身份状态异常")
-		}
-		wxId, phId, _, bPhone, _, err := jy.CreateUserMerge(util.MQFW, util.Mysql, this.Session()).MergeQuery()
-		if err != nil {
-			return nil, err
-		}
-		return map[string]interface{}{"bindPhone": bPhone != "", "needMerge": wxId != phId}, nil
-	}()
-	if errMsg != nil {
-		log.Printf("%s UserMerge MergeQuery 状态查询异常:%s\n", userId, errMsg.Error())
-	}
-	this.ServeJson(NewResult(rData, errMsg))
-}
-
-//查询手机号绑定和合并状态
-func (this *UserMerge) MergeStats() {
-	userId := qutil.ObjToString(this.GetSession("userId"))
-	rData, errMsg := func() (interface{}, error) {
-		weixinId, phoneId, nickName, phone, mergeType, err := jy.CreateUserMerge(util.MQFW, util.Mysql, this.Session()).MergeQuery()
-		if err != nil {
-			return nil, err
-		}
-
-		if weixinId == "" || phoneId == "" {
-			return map[string]interface{}{
-				"needMerge": false,
-			}, nil
-		}
-		go saveGoMergeLog(userId, weixinId, phoneId, nickName, phone, mergeType)
-		return map[string]interface{}{
-			"needMerge": true,
-			"name":      nickName,
-			"phone":     phone,
-			//"wxBuyed":   getBuyedService(*weixinRes),
-			//"phBuyed":   getBuyedService(*phoneRes),
-			"token": mergeEncrypt.EncodeString(weixinId + "&&" + phoneId),
-		}, nil
-	}()
-	if errMsg != nil {
-		log.Printf("%s UserMerge MergeStats 状态查询异常:%s\n", userId, errMsg.Error())
-	}
-	this.ServeJson(NewResult(rData, errMsg))
-}
-
-//超级订阅 大会员 商机管理
-func getBuyedService(uData map[string]interface{}) (services []string) {
-	services = []string{}
-	if uData == nil {
-		return
-	}
-	//超级订阅
-	if qutil.IntAll(uData["i_vip_status"]) > 0 {
-		services = append(services, "超级订阅")
-	}
-	//大会员
-	switch qutil.IntAll(uData["i_member_status"]) {
-	case 1:
-		services = append(services, "大会员专家版")
-	case 2:
-		services = append(services, "大会员智慧版")
-	case 3:
-		services = append(services, "大会员商机版")
-	case 4:
-		services = append(services, "大会员试用版")
-	case 5:
-		services = append(services, "大会员自定义版")
-	}
-	//商机管理
-	phone := qutil.ObjToString(qutil.If(uData["s_phone"] != nil, uData["s_phone"], uData["s_m_phone"]))
-	if phone != "" && util.Mysql.CountBySql("select id from entniche_info where phone=? and status=1", phone) > 0 {
-		services = append(services, "商机管理")
-	}
-	return
-}
-
-//合并提交
-func (this *UserMerge) MergeSubmit() {
-	userId := qutil.ObjToString(this.GetSession("userId"))
-	rData, errMsg := func() (interface{}, error) {
-		if userId == "" {
-			return nil, fmt.Errorf("身份状态异常")
-		}
-		token := this.GetString("token")
-		ids := strings.Split(mergeEncrypt.DecodeString(token), "&&")
-		if len(ids) != 2 {
-			return nil, fmt.Errorf("token校验失败")
-		}
-		wxId, phoneId := ids[0], ids[1]
-		//选择合并
-		choose := this.GetString("choose")
-		if !(choose == "1" || choose == "2") { //1保留微信 2保留手机号
-			return nil, fmt.Errorf("未知操作")
-		}
-		return jy.CreateUserMerge(util.MQFW, util.Mysql, this.Session()).Merge(wxId, phoneId, choose)
-	}()
-	if errMsg != nil {
-		log.Printf("%s UserMerge MergeSubmit 提交合并异常:%s\n", userId, errMsg.Error())
-	}
-	this.ServeJson(NewResult(rData, errMsg))
-}
-
-//保存区合并日志
-func saveGoMergeLog(userId, weixinId, phoneId, nickName, phone, mergeType string) {
-	util.MQFW.Save("user_merge_goInLogs", map[string]interface{}{
-		"s_userId":     userId,
-		"s_merge_ids":  fmt.Sprintf("%s_%s", weixinId, phoneId),
-		"s_nickName":   nickName,
-		"s_phone":      phone,
-		"s_mergeType":  mergeType,
-		"l_createTime": time.Now().Unix(),
-	})
-}

+ 1 - 0
src/jfw/modules/subscribepay/src/service/vipSubscribeTrial.go

@@ -177,6 +177,7 @@ func (t *TrialOrder) SubmitApply() {
 			"i_time":    time.Now().Unix(),
 			"s_source":  "vipsub_trial",
 		})
+		util.CollectPhone(userId, tel) //收集手机号
 		if flag == "" {
 			return false, "稍后重试"
 		}

+ 14 - 0
src/jfw/modules/subscribepay/src/util/public.go

@@ -77,3 +77,17 @@ func GetMyPhone(userId string) string {
 	}
 	return ""
 }
+
+func CollectPhone(userId, phone string) bool {
+	if userId == "" || phone == "" {
+		return false
+	}
+	if !MQFW.UpdateById("user", userId, map[string]interface{}{
+		"$addToSet": map[string]interface{}{
+			"a_collect_phone": phone,
+		},
+	}) {
+		return false
+	}
+	return true
+}

+ 0 - 16
src/jfw/modules/wxUserMergeTask/src/config.json

@@ -1,16 +0,0 @@
-{
-  "mongodbServers": "192.168.3.128:27080",
-  "mongodbPoolSize": 5,
-  "mongodbName": "qfw",
-  "mysql": {
-    "dbName": "jianyu",
-    "address": "192.168.3.11:3366",
-    "userName": "root",
-    "passWord": "Topnet123",
-    "maxOpenConns": 500,
-    "maxIdleConns": 200
-  },
-  "redisConfig":"session=192.168.3.128:1712",
-  "autoRunTime": "0 0 0 10 9 ?",
-  "testUser": []
-}

+ 0 - 122
src/jfw/modules/wxUserMergeTask/src/main.go

@@ -1,122 +0,0 @@
-package main
-
-import (
-	"log"
-	mg "qfw/mongodb"
-	qutil "qfw/util"
-	"qfw/util/jy"
-	"qfw/util/mysql"
-
-	"qfw/util/redis"
-
-	"github.com/cron"
-	"gopkg.in/mgo.v2/bson"
-)
-
-type config struct {
-	MongodbServers  string
-	MongodbPoolSize int
-	MongodbName     string
-	Mysql           struct {
-		DbName       string
-		Address      string
-		UserName     string
-		PassWord     string
-		MaxOpenConns int
-		MaxIdleConns int
-	}
-	RedisConfig string
-	AutoRunTime string
-	TestUser    []string
-}
-
-var Config *config
-var MQFW mg.MongodbSim
-var Mysql *mysql.Mysql
-
-var errUser []string
-
-func init() {
-	qutil.ReadConfig(&Config)
-	MQFW = mg.MongodbSim{
-		MongodbAddr: Config.MongodbServers,
-		Size:        Config.MongodbPoolSize,
-		DbName:      Config.MongodbName,
-	}
-	MQFW.InitPool()
-	Mysql = &mysql.Mysql{
-		Address:      Config.Mysql.Address,
-		UserName:     Config.Mysql.UserName,
-		PassWord:     Config.Mysql.PassWord,
-		DBName:       Config.Mysql.DbName,
-		MaxOpenConns: Config.Mysql.MaxOpenConns,
-		MaxIdleConns: Config.Mysql.MaxIdleConns,
-	}
-	Mysql.Init()
-	if Config.RedisConfig != "" {
-		redis.InitRedisBySize(Config.RedisConfig, 100, 30, 300)
-	}
-	errUser = []string{}
-}
-
-func main() {
-	if len(Config.TestUser) > 0 {
-		tmpJob()
-	} else {
-		if Config.AutoRunTime != "" {
-			log.Println("wx用户合并定时任务启动 ", Config.AutoRunTime)
-			cn := cron.New()
-			cn.AddFunc(Config.AutoRunTime, func() {
-				job()
-			})
-			cn.Start()
-			select {}
-		} else {
-			log.Println("立即执行wx用户合并任务")
-			job()
-		}
-	}
-}
-
-func tmpJob() {
-	for _, unionid := range Config.TestUser {
-		ok, err := jy.CreateWxUserMerge(MQFW, Mysql, nil).Merge(unionid, "")
-		if !ok || err != nil {
-			errUser = append(errUser, unionid)
-			log.Printf("unionid %s合并出错 %v\n", unionid, err)
-		}
-	}
-	log.Printf("tmpJob共合并%d个用户,出错%d个[%v]\n", len(Config.TestUser), len(errUser), errUser)
-}
-
-func job() {
-	sess := MQFW.GetMgoConn()
-	pipeLine := []bson.M{
-		bson.M{"$match": bson.M{"s_unionid": bson.M{"$exists": 1}, "i_appid": 2}},
-		bson.M{"$group": bson.M{"_id": "$s_unionid", "sum": bson.M{"$sum": 1}}},
-		bson.M{"$match": bson.M{"sum": bson.M{"$gt": 1}}},
-	}
-	pipe := sess.DB("qfw").C("user").Pipe(pipeLine).AllowDiskUse()
-	var groupRes []map[string]interface{}
-	err := pipe.All(&groupRes)
-	if err != nil {
-		log.Println("query err", err)
-		return
-	}
-	num := 0
-	for _, v := range groupRes {
-		r := qutil.ObjToMap(v)
-		if r == nil || len(*r) == 0 {
-			log.Println("err map is nil")
-			continue
-		}
-		num++
-		unionid := qutil.ObjToString((*r)["_id"])
-		ok, err := jy.CreateWxUserMerge(MQFW, Mysql, nil).Merge(unionid, "")
-		if !ok || err != nil {
-			errUser = append(errUser, unionid)
-			log.Printf("unionid %s合并出错 %v\n", unionid, err)
-		}
-	}
-	log.Printf("job共合并%d个用户,出错%d个[%v]\n", num, len(errUser), errUser)
-}

+ 18 - 28
src/jfw/public/search.go

@@ -4,7 +4,6 @@ import (
 	"encoding/json"
 	"errors"
 	"fmt"
-	"jfw/config"
 	"log"
 	"math"
 	"qfw/util"
@@ -540,12 +539,12 @@ func formatFloat(value float64) string {
 	return str
 }
 
-func FormatExportDatas(data *[]map[string]interface{}, webdomain string, dataType string, entId int) (*[]map[string]interface{}, int) {
+func FormatExportDatas(data *[]map[string]interface{}, webdomain string, dataType string, entId int) *[]map[string]interface{} {
 	//格式化输出
 	var (
 		entexportPool      = make(chan bool, 20)
 		entexportWaitGroup = &sync.WaitGroup{}
-		newsDatalen        = make(chan bool, 20000)
+		// newsDatalen        = make(chan bool, 20000)
 		// datalock           = sync.RWMutex{}
 	)
 	log.Println("补充信息开始")
@@ -560,13 +559,13 @@ func FormatExportDatas(data *[]map[string]interface{}, webdomain string, dataTyp
 			}()
 			// datalock.Lock()
 			//二次验证
-			id := util.ObjToString(v["_id"])
-			isExist, err := redis.Exists("other", "entexportdata_"+id+"_"+fmt.Sprintln(entId))
-			if err != nil {
-				log.Println("企业搜索数据导出redis判重失败")
-			} else if !isExist {
-				newsDatalen <- true
-			}
+			// id := util.ObjToString(v["_id"])
+			// isExist, err := redis.Exists("other", "entexportdata_"+id+"_"+fmt.Sprintln(entId))
+			// if err != nil {
+			// 	log.Println("企业搜索数据导出redis判重失败")
+			// } else if !isExist {
+			// 	newsDatalen <- true
+			// }
 			//
 			//有中标企业 且 高级字段查询
 			if dataType == "2" {
@@ -661,7 +660,7 @@ func FormatExportDatas(data *[]map[string]interface{}, webdomain string, dataTyp
 	}
 	entexportWaitGroup.Wait()
 	log.Println("补充信息结束")
-	return data, len(newsDatalen)
+	return data
 }
 
 func doSearch(sql string, start, count int, dataType string) *[]map[string]interface{} {
@@ -861,21 +860,12 @@ func GetEntDataExportCount(_id string, entId, entUserId, limitNum, current int,
 		log.Println("企业数据导出错误 ", err)
 		return 0, 0, nil
 	}
-	secondCount := 0
-	if !isFirst {
-		// var EntArr = []string{}
-		// for _, v := range res {
-		// 	//高级字段查询且winner不为空
-		// 	if v["s_winner"] != nil && v["s_winner"] != "" && dataType == "2" {
-		// 		EntArr = append(EntArr, v["s_winner"].(string))
-		// 	}
-		// }
-		res, secondCount = FormatExportDatas(res, config.Sysconfig["webdomain"].(string), dataType, entId)
-	}
-	isOK := true
-	if secondCount > current {
-		isOK = false
-	}
+	// secondCount := 0
+
+	// isOK := true
+	// if secondCount > current {
+	// 	isOK = false
+	// }
 	for _, v := range *res {
 		searchsWaitGroup.Add(1)
 		searchsPool <- true
@@ -893,11 +883,11 @@ func GetEntDataExportCount(_id string, entId, entUserId, limitNum, current int,
 				return
 			}
 			newCountPool <- true
-			if !isFirst && isOK {
+			if !isFirst {
 				redis.Put("other", "entexportdata_"+id+"_"+fmt.Sprintln(entId), 1, -1)
 			}
 		}(id)
-		if !isFirst && isOK {
+		if !isFirst {
 			delete(v, "_id")
 			v["entid"] = entId
 			v["userid"] = entUserId

+ 210 - 0
src/web/staticres/big-member/js/ontrial-commit.js

@@ -0,0 +1,210 @@
+var vNode = {
+    delimiters: ['${', '}'],
+    el: '#v-commit',
+    data: {
+        sessStorageKey: '$data-ontrial-commit',
+        checked: false,
+        price: 2,
+        numberStatus: 0,
+        hasAccountsOrder: true,
+        edition: [
+            {
+                setmeal:"试用版",
+                setmealprice:"¥199"
+            }
+        ],
+        severList:[
+            {listname:'招标订阅推送(可试用7天)'},
+            {listname:'中标企业预测(可试用3个项目)'},
+            {listname:'投标决策分析(可试用10个项目)'},
+            {listname:'潜在竞争对手(可展现7个潜在竞争对手)'},
+            {listname:'潜在客户(可展现7个潜在客户)'}
+        ],
+        // 手机号信息
+        info: {
+            phone: '',
+            code: ''
+        },
+        // 手机号错误提示
+        errorMessage: {
+            phone: '',
+            code: ''
+        },
+        sendCodeButton: {
+            timerId: 0,
+            timeStartDefault: 60,
+            defaultValue: '发送验证码',
+            count: 0
+        },
+    },
+    computed: {
+        confirmDisabled: function () {
+          return this.errorMessage.phone || !this.info.phone || !this.info.code || !this.checked || this.hasAccountsOrder || this.numberStatus > 0
+        },
+        sendCodeButtonText: function () {
+            var dText = this.sendCodeButton.defaultValue
+            return this.sendCodeButton.count <= 0 ? dText : `重新发送(${this.sendCodeButton.count}s)`
+        },
+        sendCodeButtonDisabled: function () {
+            return this.sendCodeButton.count > 0
+        },
+    },
+    created () {
+        var recover = this.recover()
+        this.checkOrder()
+    },
+    methods: {
+        showLoading: function() {
+            var loading = this.$toast.loading({
+                duration: 0,
+                forbidClick: true,
+                message: 'loading...',
+            })
+            return loading
+        },
+        showToast: function (message) {
+            this.$toast({
+                duration: 1500,
+                forbidClick: true,
+                message: message,
+            })
+        },
+        checkOrder:function(){//是否可以支付
+            $.ajax({
+                type:'POST',
+                url:'/jypay/bigmember/createOrderCheck',
+                success:(res)=>{
+                    if(res.error_code===0){
+                        this.numberStatus=res.data.vipStatus;
+                        this.hasAccountsOrder=res.data.hasAccountsOrder;
+                    }
+                    console.log(this.numberStatus,this.hasAccountsOrder)
+                }
+            })
+        },
+        recover: function () {
+            // 不恢复数据列表
+            var excludeKey = ['sessStorageKey', 'numberStatus', 'hasAccountsOrder']
+            var $data = sessionStorage.getItem(this.sessStorageKey)
+            if ($data) {
+                $data = JSON.parse($data)
+                for (var key in $data) {
+                    if (excludeKey.indexOf(key) !== -1) {
+                        continue
+                    }
+                    this.$data[key] = $data[key]
+                }
+                sessionStorage.removeItem(this.sessStorageKey)
+            }
+            return !!$data
+        },
+        onOrder: function () {
+            var _this = this
+            $.ajax({
+                type:'POST',
+                url:'/jypay/bigmember/createOrder',
+                data:{
+                    level:4,
+                    cycle:7,
+                    order_phone: _this.info.phone
+                },
+                success:function(res){
+                    if( res.error_code >= 0 ){
+                        history.replaceState({"flag": "pay"}, '', '/front/wxMyOrder/memberDetail/' + res.data.order_code);
+                        location.href = '/weixin/pay/checkout_member?orderCode='+res.data.order_code
+                    }else {
+                        alert(res.error_msg)
+                    }
+                }
+            })
+        },
+        setStatus:function(){
+            sessionStorage.setItem(this.sessStorageKey, JSON.stringify(this.$data))
+        },
+        // 查看服务清单
+        viewMeau:function(){
+            location.href = './free_contrast_trial'
+        },
+        checkPhoneRegPass: function () {
+            var pass = /^1[3|7|8]\d{9}$|^19[8-9]\d{8}$|^166\d{8}|^15[0-3|5-9]\d{8}|^14[5|7]\d{8}$/.test(this.info.phone)
+            if (this.info.phone) {
+                if (pass) {
+                    this.errorMessage.phone = ''
+                } else {
+                    this.errorMessage.phone = '手机号格式不正确'
+                }
+            } else {
+                this.errorMessage.phone = ''
+            }
+            return pass
+        },
+        // 发送验证码
+        sendVerifyCode: function () {
+            var pass = this.checkPhoneRegPass()
+            if (!pass) return
+            var _this = this
+            var loading = this.showLoading()
+            var data = {
+                phone: _this.info.phone,
+                step: 1
+            }
+            $.ajax({
+                type: 'POST',
+                url: '/jypay/userMsg/collect',
+                data: data,
+                success: function (res) {
+                    loading.clear()
+                    if (res.error_code == 0 && res.data && res.data.status) {
+                        _this.startSendCodeTimer()
+                        _this.showToast('验证码发送成功')
+                    } else {
+                        _this.showToast(res.error_msg || '验证码发送失败')
+                    }
+                }
+            })
+        },
+        startSendCodeTimer: function (t) {
+            var _this = this
+            this.sendCodeButton.count = t || this.sendCodeButton.timeStartDefault
+            this.sendCodeButton.timerId = setInterval(function () {
+                _this.sendCodeButton.count--
+                if (_this.sendCodeButton.count <= 0) {
+                    // 倒计时结束
+                    clearInterval(_this.sendCodeButton.timerId)
+                }
+            }, 1000)
+        },
+        checkVerifyCode: function (callback) {
+            var pass = this.checkPhoneRegPass()
+            if (!pass) return
+        
+            var _this = this
+            var loading = this.showLoading()
+            var data = {
+                phone: this.info.phone,
+                code: this.info.code,
+                step: 2
+            }
+        
+            $.ajax({
+                type: 'POST',
+                url: '/jypay/userMsg/collect',
+                data: data,
+                success: function (res) {
+                    loading.clear()
+                    if (res.error_code == 0 && res.data && res.data.status) {
+                        callback && callback(res.data.status)
+                    } else {
+                        _this.showToast(res.error_msg)
+                    }
+                }
+            })
+        },
+        onSubmit: function () {
+            var pass = this.checkPhoneRegPass()
+            if (!pass) return
+            this.checkVerifyCode(this.onOrder)
+        }
+    }
+}
+var vm = new Vue(vNode)

+ 18 - 0
src/web/staticres/big-member/weixin/css/buy_commit.css

@@ -254,3 +254,21 @@
 .submit-container .j-button-group {
   box-sizing: border-box;
 }
+
+.order-phone-group {
+    margin-top: .16rem;
+  }
+  
+  .order-phone-group .van-field {
+    padding: .3rem .32rem;
+    font-size: .3rem;
+    line-height: .44rem;
+  }
+  
+  .order-phone-group .send-code {
+    height: unset;
+    color: #2ABED1;
+    font-size: .28rem;
+    line-height: .4rem;
+    border: none;
+  }

+ 127 - 116
src/web/staticres/css/userMerge.css

@@ -1,164 +1,175 @@
-.merge-main{
-    flex: 1;
-    height: 100%;
-    display: flex;
-    flex-direction: column;
-    justify-content: space-between;
-    overflow: hidden;
+.icon-tel-phone {
+    background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAARoSURBVHgB7VlNctNKEO7RSMKpeoscQTkBzu4V7zlPXrz3DBvCCbBPQDgBzgkCJ4hzgoQNuGBhQ4BiBzfAN8C7GEszQ49s2WNpJI1kx6GKfFVJ5MxP96fu6e5pA9ziFr83CGwRQetvH0UOUOhI4A8I+ApEvHT6H4ZQETdCANJKICHSC2F6ttP/PIISsOAXAFrDw99dB5zBtNVol1habIGrlu9ZELYDxi/+ePvpK6wB4fu7YS2sMyHqFhAPhf8DhNTTE+HC/kE7ZDgcF+2ZS0Aq7wAbzN6QnEzadv/9GWwQ0wf36sDpESryGFYVGwUQNItcKpNAUvnlgs2TyJInSdAJ3c+zROYZoMD8pPISAkQvbB08hopKTv7/60geZulO6thOfxgpizLPlrLAC2vsPG9PLYGg1RgwCIa4QUc3XpWEDaFHiXUiIxEq9j1sNU6vWn968bh8027/sq2SQPiT+40jMCUwjwK+jAjXQWJ1D2jb4HwLWgfP1P87k+hMjOLPFOBZ0mKZBIgQD+ebe5smIRgfq4opI11pjYUOaAncu6MI2p3WwiMjAqD4vTGJ/xqHYAAXw7Ddv9wLge7J/VQy0hrB/YOT+LPMzqorWYQ80e2ZikLo/0IzKQppFBwfn081u4ztK7pnErdV6COdaMalRTpzL8diGGXiIksQAeOyykvIyBMAbaIAZS1ZnAep7IqVBKQsbWm01SqSSQLnc4s9goqQJDgRL5R/rYRYHHsZPxNC7kIhARAjyECKBCovKGu6r9YrMdyJ/Vz9PHWZvxRKFnsTTV5KERAWvIMcqCSwXtlbV/lIMXS/FVeh3IufLb70CF1itVObYSGFf7QnXt3IIU4dBV/AhiDDJpbUnny2iFi8FDqlw6DGOlnrUlEoqhjvsG84sgs5cPqXW71LZCGdyNCciUOlRVZm3Da0YZSD3YMCZGXGbSPTDbAm6iVr9CQEY/vu2/UP8TrITGSyoMrKCYvFlJ6r1eRNIJNAVFBZ/BhyIKORTdzzmzwPuaWE+/qjTDDDvDmY3+sYtU7hhlBYC2Hl2ClyJTxJh2o5vE0YxXJ5ydFWoUmU6CZE+/57r84oH5ftBakwqkbxmtdD7Y4LJ0pL7PCBycGWtzBC6RebOF8kEaiIUtnUJLTON81ticyukKKrLBiLEIvCCiG5VGduFlpJoZBZdMI3q+myzd62ovxswS6x6aCKJUrXM7NaiQ+w6jMShgJ6nLEXTuCOwhp/IvuflNBDIqwTzeTSlqhUkJUlkRAYuZcNdlu9fSkTSpGoXFH+KiQqd6dlqLR/WM1EE8oI8aUohLCnjW4lzsRGanrsHnS1b7JYeKElQhHs5+WJjXw/gN2DriD8aWHGTsDEEhZ3cq2w0VtVVke7CFmWkO4pe6UFazePKi6VJGGi/Hzd9UBaA1v0XZPMrSgTkXDQbew3l0YNg2u/mC+ICHhY1CiQ4ECO7/Tfd8EQW+0syCYwNgx8QuAuliT1mNC8J4TNMnG2zleut7jF74ifix9Q1ZAZXC0AAAAASUVORK5CYII=) no-repeat center center;
+    background-size: 100% 100%;
+}
+
+/* notice-dialog */
+.notice-dialog {
+    border-radius: 8px;
+}
+.notice-dialog .van-dialog__message{
+    padding: .48rem .6rem .44rem;
+    font-size: .32rem;
+    line-height: .48rem;
+    color: #171826;
+    text-align: justify;
+}
+.notice-dialog .van-dialog__confirm{
+    color: #2ABED1;
 }
-.concat{
+.notice-dialog .van-button__text {
+    font-size: .36rem;
+    line-height: .52rem;
+}
+
+.concat {
     display: flex;
     align-items: center;
     justify-content: space-between;
-    padding: .28rem .3rem;
-    background-color: #FEE9E8;
+    padding: .28rem .32rem;
+    width: 100%;
     white-space: nowrap;
+    font-size: .28rem;
+    color: #2ABED1;
+    background-color: #FEE9E8;
 }
-.content{
-    flex: 1;
-    overflow-y: scroll;
-}
-.service{
+.concat-text {
     flex: 1;
     display: flex;
-    margin-right: .16rem;
     align-items: center;
+    margin: 0 .16rem;
     color: #FB483D;
-    white-space: nowrap;
+    white-space: pre-wrap;
     line-height: .4rem;
-    font-size: .26rem;
-}
-.notice{
-    font-size: .28rem;
-    color: #2ABED1;
-}
-.tel_phone{
-    width: .48rem;
-    height: .48rem;
-    margin-right: .16rem;
-    background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAARoSURBVHgB7VlNctNKEO7RSMKpeoscQTkBzu4V7zlPXrz3DBvCCbBPQDgBzgkCJ4hzgoQNuGBhQ4BiBzfAN8C7GEszQ49s2WNpJI1kx6GKfFVJ5MxP96fu6e5pA9ziFr83CGwRQetvH0UOUOhI4A8I+ApEvHT6H4ZQETdCANJKICHSC2F6ttP/PIISsOAXAFrDw99dB5zBtNVol1habIGrlu9ZELYDxi/+ePvpK6wB4fu7YS2sMyHqFhAPhf8DhNTTE+HC/kE7ZDgcF+2ZS0Aq7wAbzN6QnEzadv/9GWwQ0wf36sDpESryGFYVGwUQNItcKpNAUvnlgs2TyJInSdAJ3c+zROYZoMD8pPISAkQvbB08hopKTv7/60geZulO6thOfxgpizLPlrLAC2vsPG9PLYGg1RgwCIa4QUc3XpWEDaFHiXUiIxEq9j1sNU6vWn968bh8027/sq2SQPiT+40jMCUwjwK+jAjXQWJ1D2jb4HwLWgfP1P87k+hMjOLPFOBZ0mKZBIgQD+ebe5smIRgfq4opI11pjYUOaAncu6MI2p3WwiMjAqD4vTGJ/xqHYAAXw7Ddv9wLge7J/VQy0hrB/YOT+LPMzqorWYQ80e2ZikLo/0IzKQppFBwfn081u4ztK7pnErdV6COdaMalRTpzL8diGGXiIksQAeOyykvIyBMAbaIAZS1ZnAep7IqVBKQsbWm01SqSSQLnc4s9goqQJDgRL5R/rYRYHHsZPxNC7kIhARAjyECKBCovKGu6r9YrMdyJ/Vz9PHWZvxRKFnsTTV5KERAWvIMcqCSwXtlbV/lIMXS/FVeh3IufLb70CF1itVObYSGFf7QnXt3IIU4dBV/AhiDDJpbUnny2iFi8FDqlw6DGOlnrUlEoqhjvsG84sgs5cPqXW71LZCGdyNCciUOlRVZm3Da0YZSD3YMCZGXGbSPTDbAm6iVr9CQEY/vu2/UP8TrITGSyoMrKCYvFlJ6r1eRNIJNAVFBZ/BhyIKORTdzzmzwPuaWE+/qjTDDDvDmY3+sYtU7hhlBYC2Hl2ClyJTxJh2o5vE0YxXJ5ydFWoUmU6CZE+/57r84oH5ftBakwqkbxmtdD7Y4LJ0pL7PCBycGWtzBC6RebOF8kEaiIUtnUJLTON81ticyukKKrLBiLEIvCCiG5VGduFlpJoZBZdMI3q+myzd62ovxswS6x6aCKJUrXM7NaiQ+w6jMShgJ6nLEXTuCOwhp/IvuflNBDIqwTzeTSlqhUkJUlkRAYuZcNdlu9fSkTSpGoXFH+KiQqd6dlqLR/WM1EE8oI8aUohLCnjW4lzsRGanrsHnS1b7JYeKElQhHs5+WJjXw/gN2DriD8aWHGTsDEEhZ3cq2w0VtVVke7CFmWkO4pe6UFazePKi6VJGGi/Hzd9UBaA1v0XZPMrSgTkXDQbew3l0YNg2u/mC+ICHhY1CiQ4ECO7/Tfd8EQW+0syCYwNgx8QuAuliT1mNC8J4TNMnG2zleut7jF74ifix9Q1ZAZXC0AAAAASUVORK5CYII=) no-repeat center center;
-    background-size: 100% 100%;
 }
-.tel-text{
-    flex: 1;
-}
-.system{
-    padding: .48rem .32rem;
+
+.user-info {
+    padding: .32rem;
     background-color: #fff;
-    
 }
-.system-title{
+
+.user-info-title{
     font-size: .36rem;
     line-height: .52rem;
     color: #171826;
 }
-.system-content{
+.user-info-content{
     margin-top: .16rem;
     color: #9B9CA3;
     font-size: .28rem;
     line-height: .4rem;
     text-align: justify;
 }
-.wx-icon{
-    display: inline-block;
-    width: .48rem;
-    height: .48rem;
-    background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAOUSURBVHgB7ZhdTttAEMdn1qGfUpsb1DxUgiA18QlIglqpb3CChBNATpBwAuAETU8APFVqBU5P4IRKBKkP+Ab1E1JpvNNZh9AQvI7jOKIP/klRLM9mPX/vzscGICMjIyMjI+PxQEiAeeTkX76COgEWAbHMk+SJP7dml++7QNAl6Z9cvrc6sEBmErDyxTHFE6OJSJtjDk+Dxci9iw2rDQsgtoBVu7cjCFozOD6JK3/LyuVHy4UUiSWgYJ9/AqI6pIBEqF9Wip8hJcS0AWv2+X5azgcPJGiv2L0apESkgMKpUyei3cn7RHAofVkhkNo3ORrDF8cPHkpwoOIJUiByCxXOelf8ZY7f4wzT6VffVcbG/IKJuGBhJ/2qtamuS7aTvyFx9XDM/XmSol0B9fZhwnkFAsUIYuP16KpbsTwICXyep7zyzSnDnOR0BkSsUbiptKriwofvwoB13mKhzhXsH03yqYcINfW+J3CDcQJK/NWBOdBuobCtMQce14JDKaHD+98jYZgsLJibY8UbSN/9+cHqQgJyEbY0nB86fgNt8SxXM1AeqTqCYyvCQmBJCFg763lEeCxv/L1ZakXUChDMAf/YRZRbBGJ95gJI2L4WfsMdxk8kUWnUhYQo5wcDuQWS2w5OmTNXb6T6CxJOnFSrF0DyBBJCvtxeMowmO7IJyTHFU2GbnIajBmkFcMAdQxKQ2rylzRDneY/LQ03x09nM52QcQdTjooxrZ12bC04ZZuAPSmuJhHqoOX6fHWz0N6yD4bw9h7dV6Z8x6FZboTZGVXRdWx7ZSvhI26AySUzU3s/5gePmpA1B5MfG5XVuhMWLyKG2d5rajRa+OiXICRtiBKJqIThoXa5QO6F2TpP8RJVGy7PYGPeiWlwOm3NqN3qhCsxANW4xshIJl1AvVB2ENA5G2iBkRUdMFaBQIgjl3I3XIoglIGCgfwt3oDTVWRhSRnWuOltUK3EPIYxRU3bXHvCvTU6ZZfb8TTAGhOdL2UUDUoXI1547Yp+JubVwVHG7FnAwrcQnSb86VOz1NQGsiLUC6lDigay4VStWSqUBNSCHDqQAr2gjyp7of6E4rJ46u4hiH+aBgAtcsRU1ZGECFLcimpCgNR+v3FEsVIBixXZMLm4trsSx/4mY5by8cAEjAiESdgVikR1Uvc5oVTwC6vIr7w0rcSDUu0a5HOc88N/x1nZKKuOlceB/VNSKQUZGRkZGxhT+Anbwl4xpcp5vAAAAAElFTkSuQmCC) no-repeat center center;
-    background-size: 100% 100%;
-}
-.phone-icon{
-    display: inline-block;
-    width: .48rem;
-    height: .48rem;
-    background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAFhSURBVHgB7dhBSsNAFAbg/00rddkj1F2Nm+QGLb2A3iCeQDyB9gZ6A71Bdi6kTW6Q1EV0p0fISkQkzzFVqBRKZtIwVN8HA0NJk/xkMpAfEEII8Z8RLHmzNASpMz310UwGLq/zSXADC1YBvHhxAcYltoi5PH+cBFcwZBxgeJcOVE89Y/uKVyoPXsZBYfKnLgzR3tqSKb6HjcHKvL//UZ07gQHzAIT+7x84ysf+KSwczbOYQSM0oLDjJIBrEsA1CeCaBHBNArgmAVyTAK5JANd2PoDxJ+UaptCbL0JYYDQnS2gTZo7wNVrUWoBlUeWf5HqUXFq1FnW0FmC1ZXuyrA3rMA7AXK/EGt6no5951aO2xHgX6nWQvC9D9DcdpzoqPpw9RISy0G1YiBreurroNWT8BDLdXer1Pa1zLBEf1715vadOTXvR6hqwNNTLQhHpep0a1esMTvRuddvmeyKEEOLv+gTP12Vh3HHPrAAAAABJRU5ErkJggg==) no-repeat center center;
-    background-size: 100% 100%;
-}
-.account{
-    padding: 0 .32rem;
-}
-.set{
-    margin: .32rem 0;
-    padding: .3rem;
-    background-color: #fff;
+
+.list-item {
+    margin: 16px;
+    padding: .24rem .32rem;
     border-radius: 8px;
+    background: #fff;
+    box-shadow: 0px 2px 8px 0px rgba(54, 147, 179, 0.051);
+}
+.list-header {
+    margin-bottom: .24rem;
+    color: #1D1D1D;
+    font-size: 16px;
+    line-height: 24px;
 }
-.set-header{
+.list-content-item {
     display: flex;
     align-items: center;
     justify-content: space-between;
+    font-size: 14px;
+    line-height: 20px;
+    color: #686868;
 }
-.set-header-left{
-    display: flex;
-    align-items: center;
+.list-content-item:not(:last-of-type) {
+    margin-bottom: .16rem;
 }
-.set-header-title{
-    margin: 0 .16rem;
-    font-size: .32rem;
-    color: #171826;
+.list-content-item .l-c-i-text {
+    max-width: 75%;
+    flex: 1;
+    color: #999;
+    text-align: right;
 }
-.set-header-pay{
-    display: inline-block;
-    min-width: 1.76rem;
-    height: .4rem;
-    line-height: .4rem;
-    text-align: center;
-    background: #2ABED1;
-    border-radius: 4px;
-    color: #fff;
-    font-size: .24rem;
-    box-sizing: border-box;
+.um-confirm-container {
+    background-color: transparent;
+}
+.um-confirm-container .j-button-confirm {
+    height: .96rem;
+}
+
+.list-item.table {
+    padding: .12rem 0;
 }
-.set-main{
-    margin-top: .32rem;
+.list-item.table .list-tip-row,
+.list-item.table .list-row {
     padding: 0 .32rem;
-    background: #F5F6F7;
-    border-radius: 8px;
 }
-.item-pay{
-    padding: .2rem 0;
+.list-item.table .list-item-header {
+    font-size: .28rem;
+    line-height: .48rem;
+    color: #1D1D1D;
+    font-weight: bold;
+    border: none;
+}
+
+.list-item.table .list-item-content {
     font-size: .28rem;
     line-height: .4rem;
-    color: #5F5E64;
+    color: #686868;
 }
-.set-radio{
-    width: .48rem;
-    height: .48rem;
+
+.list-tip {
+    color: #2CB7CA;
+    font-size: .24rem;
+    line-height: .48rem;
+    text-align: center;
+    border-radius: .24rem;
+    background-color: rgba(44, 183, 202, 0.1);
 }
-.icon-radio-gray{
-    background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAANySURBVHgB7VndUdtAEP5OsvPsDiIqiDMJmWEgg1VBTAVABZAKwBUEKghUEFKB7AmEBwg4FcTpgKc8YKTN7kk2MsPpx5asyUTfjHxne3W7e3u3u7cH1KhRo0aVUCgI3uWlA7/RVcp6BaIOCC0evaX/JNxxfyQPEQ0wfjhz3bURCsDCCngXP3YU0TZ3O8iHIang2F1/d4IFMLcC3rerjlLqM3cd/YPMsqXOyMcAtj/EfXPkuq/vNK1328KLMdPZbfg+v2d9mFoHbBUV9OZVJLcCIozVDA4ItD8VAHSMceNkInCmcULLHSCaAAV1FIytXp4xwvdywPMuHdVsfuFuW2acFPXcjdUjLADv/Gqfhf8UfR3ReOzm2R+ZFYiE9xDOWG5GZY1tZSGSZRNjMCxSeIGMJWPK2MJDrKz3TQZkUkDWPB5nZ6tI4SeIlNgSHvy0I56pSF1C0WYTbwNmsFKG8DP8wuV0y90WxwzXfb/aT6JPtUDkKXjP0seyhRdoS4B6mnfophORaIHY7I86G29XsET0z69/ceNwjNhNihGJFmDh96SVQIMlQ8cWLYO1nURnVEDWIsTfA3eLhvu5wIFRePPTubi5eWkiM1ug2eiGHXWGCiARmQJ8lf79H3/LRGdUQJHalJaUP0BlUH39KRmuAWYLqChJC4NLNfD9Ce+OiSRpEzv6k7NKVIaIN5ExKicpoF/Kmx0WiRjvuRT4J5CkwONhpCLEeBtXQaoC4UmqKkx5j0wURgXYB0/cZxtV4YWteXNU/m0iMVvAIu3CFOxNVAROZSa8+yYaswJc+tAtUbfCfdCdkeUZGBWIUuc+xIU1H3awZEgmjNB9DpPS+EQ3SkqdSsuH7j0sGdNzCNeOkugSFXDX35wg9ACOVA+wJAy+X8uEOcI7LRNODWR8rNuVlq1wEKXYpUJ4sAfUpZos55BUBeRMSgQxo65MlKlErLwC4ZnlHJItlXiwDzFT8iheiVjRzIEs25BnKv6PwpYgVnwaIbTEbREbWzasaugyioM5imZzFXfR8A+VwsS15q4u6zE4tkTu2ZHf9D7jZVNqcXdGiCfV5fASg8vr4RH0+fK6b7eVjU0E1J0pr7OnSytgFa7AE0VkJvMmfX223GllFxxPoT1TU66YuBhAbBV5Zq+YxELskoOfsPmKaa38Kl+NGjVqlI+/zO65Qdp3pJkAAAAASUVORK5CYII=) no-repeat center;
-    background-size: contain;
+
+.list-row {
+    display: flex;
+    align-items: center;
 }
-.icon-radio-success{
-    background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAOuSURBVHgB7ZlPSBRRHMd/762oocUWgmJKIyWsQegePHRyN+nQba276VUhu3kwUA9BxwzqmtI53E5BYeqhk4ddCXRByJFUlKIWS/xDO6/fm3YHXebNvLezs3uZDww7s+/Nm+935r3fe/MbgICAgIBqQqBMRN6ntFAtJBiQbiAkhg2HGW75i2RxX2eM6BRyy7lTSGbuRXUoA54N3FxIDTESekiAxUCNNDBjZq0/OgseKNlA5GMqRkP0Ne5q4A0djUyXakTZgDafCjeEQ5OMscdQRggjzw9pblqPR7NK56lU5v2c1tF53O0Bf9CNEyOuMj6kDeTFL4L3LuOGkgkqU4l3mwqJNy/Hn7K2mArLVJYywPs8VEZ8gZ4Gw7ymK65diIdJIGa0qThGDrvS3eiSUx33J0Co1J3wg3yYdq7jVGje/Qp0nUTLZXOzQctrEFLjVEgIHWPgL6NaM4x0NFvHyb1f58r5LI8/s6LzhU+Ah03mX7w3KRZvB1+idH1euyYqFxoguDADH7G788V33+L4ZEDUjtgAhPrAJ+zET6x/E9YnFFe4AsQGCNPs/m+tr4UPtyPmFmmsB1VUxZswEhMVCQ0wQfTh0eIqmuDbbPQ69DddAllKEv8f4axMVU96hxfdPT419y/WhODFLQ0G25rAjWLxC98PZMULtXCklhJn2UHxQ6mvlgnOeGcrjDpEk2LxmT9H8CQjLd4RJwPCdbmdiREUaWfCTvwwnnvwNwcKCLWUZIDDTdxf2TAFFeAmnna1Wcd8vJRBPEcXFTgMYmMZXPiNQh6gieTeT+u/RMsVeNvbCYPtTWim3frfg3iuZUtURh3OSoMkE+vb8HJz3zqONF6A8Rut1jHvao++bJUkPq9lSVQkfgIUkqDAK33/nIkCu/nxsnNmvKjipEVoIBOP6rgOWQIFuIlnG7vWcTnEI2muRVTouBrNMTZHiXgWtOPN9g9YyR5Cb7jBnDNK7jZ5DMwdOZW7vpF1fVrdJJV9nbTg2bz1O90dTnVcJzKWM4ahSjBMeLnVcTVgvpO6PEY/YAxmMhLZOqmlRC2FKQD5sOoV3nWOqDElU1fKQBrTfQYxBpjDjFguzCw2MeKyKUbpxRwPZbxhP01g22l+DaewWYzSapQ3XEeMqB9jgvf5I0XxnNLT65juwKzFpNcQa3YZjHRuCSwRnj9wcCM42Y1hU0oZDIazPKbo5zLV+sBRTGQxpREDEgRIH7aqYdO4WW9SWXNjKBrYKivjJ6aAgICA6vIPiiaSgW3pn7sAAAAASUVORK5CYII=) no-repeat center;
-    background-size: contain;
+.list-row:not(:last-of-type) {
+    border-bottom: 1px dashed #E0E0E0;
 }
-.merge-dialog {
-    border-radius: 8px;
+.list-row .list-column {
+    padding: .16rem 0;
 }
-.merge-dialog .van-dialog__message{
-    font-size: .32rem;
-    line-height: .48rem;
-    color: #171826;
+.list-row .list-column:nth-of-type(1) {
+    flex: 1;
 }
-.merge-dialog .van-button--large{
-    height: 46px;
-    color: #171826;
-    font-size: .36rem;
-    line-height: .52rem;
+.list-row .list-column:nth-of-type(2),
+.list-row .list-column:nth-of-type(3) {
+    display: inline-block;
+    width: 30%;
+    text-align: center;
 }
-.merge-toast .van-toast__text{
-    font-size: 15px;
+
+.van-radio,
+.van-radio__icon {
+    display: flex;
+    align-items: center;
+    justify-content: center;
 }
-.notice-dialog {
-    border-radius: 8px;
+
+.reminder-container {
+    display: flex;
+    align-items: center;
+    justify-content: flex-end;
+    padding: .24rem .32rem;
 }
-.notice-dialog .van-dialog__message{
-    padding: .48rem .6rem .44rem;
-    font-size: .32rem;
+.reminder-container {
+    font-size: .28rem;
     line-height: .48rem;
-    color: #171826;
-    text-align: justify;
 }
-.notice-dialog .van-dialog__confirm{
-    color: #2ABED1;
-}
+.reminder-container .van-checkbox__label {
+    color: #888;
+}
+.reminder-container  .no-merge {
+    margin-left: .24rem;
+    color: #2CB7CA;
+    text-decoration: underline;
+}

+ 308 - 0
src/web/staticres/frontRouter/pc/merge/index.css

@@ -0,0 +1,308 @@
+/*
+* Prefixed by https://autoprefixer.github.io
+* PostCSS: v7.0.29,
+* Autoprefixer: v9.7.6
+* Browsers: > 1%,IE >=10
+*/
+
+#public-nav {
+    border-bottom: 1px solid #e0e0e0;
+    background: #fff;
+}
+body {
+    background: #F5F5FB;
+}
+body.bg-white .content-group > *{
+    display: none;
+}
+.working {
+    display: flex;
+    flex-direction: column;
+    align-items: center;
+    justify-content: center;
+    display: none;
+}
+body.bg-white .working {
+    display: flex;
+}
+body.bg-white {
+    background: #fff;
+}
+.page--merge--index .page-container {
+    min-width: 704px;
+    min-height: calc(100vh - 364px);
+    padding-top: 67px;
+    padding-bottom: 117px;
+    box-sizing: border-box;
+    max-width: 1200px;
+    margin: 0 auto;
+    display: -ms-flexbox;
+    display: flex;
+    -ms-flex-direction: column;
+    flex-direction: column;
+    -ms-flex-align: center;
+    align-items: center;
+}
+.flex-r-box {
+    display: -ms-flexbox;
+    display: flex;
+    -ms-flex-direction: row;
+    flex-direction: row;
+}
+.title-group {
+    margin-top: 32px;
+    margin-bottom: 16px;
+    font-family: PingFang SC;
+    font-style: normal;
+    font-weight: 500;
+    font-size: 14px;
+    line-height: 20px;
+    color: #9B9CA3;
+}
+.title-group h5 {
+    font-family: Microsoft YaHei;
+    font-style: normal;
+    font-weight: normal;
+    font-size: 18px;
+    line-height: 28px;
+    color: #171826;
+    margin-bottom: 12px;
+}
+.card-group + .card-group {
+    margin-left: 18px;
+}
+.card-group {
+    -ms-flex: 1;
+    flex: 1;
+    background: #FFFFFF;
+    box-shadow: 0px 2px 8px rgba(54, 147, 179, 0.051);
+    border-radius: 8px;
+    padding: 12px 16px;
+    box-sizing: border-box;
+    font-family: PingFang SC;
+    font-style: normal;
+    font-weight: 500;
+    font-size: 14px;
+    line-height: 20px;
+    color: #686868;
+}
+.card-group .text--title {
+    margin-bottom: 12px;
+}
+.card-group.merge-group .flex-r-box + .flex-r-box {
+    margin-top: 0;
+}
+.card-group .flex-r-box + .flex-r-box {
+    margin-top: 4px;
+}
+.card-group .flex-r-box {
+    -ms-flex-pack: justify;
+    justify-content: space-between;
+}
+.text--title {
+    font-family: Microsoft YaHei;
+    font-style: normal;
+    font-weight: normal;
+    font-size: 14px;
+    line-height: 24px;
+    color: #1D1D1D;
+}
+.color--default {
+    color: #2CB7CA;
+}
+.icon-public {
+    cursor: pointer;
+    display: inline-block;
+    background: #FFFFFF;
+    background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAOISURBVHgB7VnRThNBFD2z21VJMKl/UN6M1lAeRHmivFmMMXwB8gWFLwC+APgC+wfEmFjeWJ+I5UGM1Pjm+gXwQkTanfHe1prQnd2d3W4XEnue2tmZnXtm7tw59y4wwQT/NwQyQvn9cVXZfkVYYlEoUaE3F5VCsTeJwLmS8GApDz6+QFru6aunLjLASARK+5+L0/e6dSHU+sDYBBN7EnB9+NvfawseUiIVATb8/lR3Uym1jgyggEZaIokJlA9adRq0lXTFDQzxfIntby/nGwnHmePJwfFOVqseBiXUbvvFsw3T/kYE+r7e2aefVeQBhZPCb2fpZGXuPK6rBQNM3+0cIi/jGQKVbn/BYhFLgN2GX4j8UX188GknrlOkCz1qtt4Qw7e4QSglN9rLz3fDnocSeNg8KjmwDynElXCToEuw8MuZCTsPoS5kw968ceMZFK47U1ebYY+1O8CrX4D9A7cIhUvngW4XtDvAq49bhu6dK+39Y4U0VpETFGsiiT2O/ZEdbVHXNQcI9FRlTr7PxpMGWiL5sH66PD9HTW5E52K5eVQdbg7ugCWryAED468JOEVSO2oMy/QhBAkIaxZjhs54DhyUN7yOHCiCrq07AyXEG9AQ8NfYECREmPEmd46F4OJqXEiVEGmAfNeuza99rS00nEtnLvbwIRvje+NFUMJbmlkidb6Qljf4zXGZVaMJiVGND7PNSI1eg41Vnnjw14REJsaHQHOIEa3BaRV4YlMSmRqvsS1AQCjEJhE8sQmJMay8hzgCFGuNDmUciXG4DUnrn4glAP8jTF8YQWIcPi9kcHGDLiSUcVhkhJEYx4ElleAON2nlNJVOzpCiUNUZlgbIznh2Sbp/Zobb9WHUV3tIPkFgJzLO6lxdo3YHKlRGoarAGVJgUKCyfescjtzJStl24c/oKnehOXH5Q2uXntZxC8Dai+WL7lnoTUyRZCv2UssBf8PxdtjzUAIcSZSUoQPzApXlI4u+kVqoV49RSHygMwPNHVfsNaqNlputfEuL4FsXJ+1+mhkJIzVKJY2VJLo/A7gXLEkMkKi8nktkIrehBN+4hJ8oH+AXy5SpZCz4OxrVQZMY3x+WAnzD2sraEkKsIgNwnL+4dDY8g+8BwxjpI9+ACCnARZEmOVFqrwvZyP0jnw69opO0qpRyzkKKEjln6Z8gJGM5UVKsdHu1H+me1hZcTDDBBCPjD8LC3gjkJkRNAAAAAElFTkSuQmCC");
+    background-repeat: no-repeat;
+    background-size: cover;
+    width: 20px;
+    height: 20px;
+    border-radius: 50%;
+    border: 1px solid #E0E0E0;
+}
+.tip-group {
+    background: rgba(44, 183, 202, 0.1);
+    border-radius: 14px;
+    font-family: Microsoft YaHei;
+    font-style: normal;
+    font-weight: normal;
+    font-size: 12px;
+    line-height: 28px;
+    text-align: center;
+    letter-spacing: 0.1em;
+    color: #2CB7CA;
+}
+.merge-group {
+    padding-left: 0;
+    padding-right: 0;
+}
+.merge-group .text--title {
+    padding: 0 16px;
+    box-sizing: border-box;
+}
+.merge-group .flex-r-box:last-child {
+    border-bottom: none;
+    padding-bottom: 0;
+}
+.merge-group .text--title {
+    margin-bottom: 8px;
+}
+.merge-group .flex-r-box {
+    padding: 8px 16px;
+    box-sizing: border-box;
+    border-bottom: 1px dashed #E0E0E0;
+}
+.pick-group .tip-group {
+    margin: 0 16px;
+}
+.pick-group .flex-r-box:first-child {
+    border-bottom: none;
+}
+.pick-group .flex-r-box > div {
+    display: -ms-flexbox;
+    display: flex;
+    -ms-flex-direction: column;
+    flex-direction: column;
+    -ms-flex-align: center;
+    align-items: center;
+}
+.pick-group .flex-r-box > * {
+    width: 30%;
+}
+.pick-group .flex-r-box > *:first-child {
+    width: 40%;
+    text-align: left;
+}
+.pick-group .text--title {
+    margin-bottom: 0;
+}
+.pick-group .flex-r-box .first-title {
+    -ms-flex-align: start;
+    align-items: flex-start;
+    padding-left: 0;
+}
+.merge-submit:disabled {
+    opacity: 0.65;
+    cursor: no-drop;
+}
+.merge-submit {
+    background: #2CB7CA;
+    border-radius: 6px;
+    font-family: Microsoft YaHei;
+    font-style: normal;
+    font-weight: normal;
+    font-size: 16px;
+    line-height: 21px;
+    text-align: center;
+    color: #FFFFFF;
+    padding: 8px 34px;
+    box-sizing: border-box;
+}
+.footer-group {
+    margin-top: 32px;
+    -ms-flex-pack: justify;
+    justify-content: space-between;
+}
+.merge-skip button:disabled {
+    opacity: 0.65;
+    cursor: no-drop;
+}
+.merge-skip button {
+    background-color: initial;
+    font-family: Microsoft YaHei;
+    font-style: normal;
+    font-weight: normal;
+    font-size: 14px;
+    line-height: 24px;
+    -webkit-text-decoration-line: underline;
+    text-decoration-line: underline;
+    color: #2CB7CA;
+}
+.merge-skip label {
+    cursor: pointer;
+}
+.merge-skip input {
+    -webkit-appearance: auto;
+    margin-left: 12px;
+    line-height: 24px;
+    margin-right: 8px;
+    cursor: pointer;
+}
+.merge-skip {
+    display: -ms-flexbox;
+    display: flex;
+    -ms-flex-direction: row;
+    flex-direction: row;
+    -ms-flex-align: center;
+    align-items: center;
+    font-family: Microsoft YaHei;
+    font-style: normal;
+    font-weight: normal;
+    font-size: 14px;
+    line-height: 24px;
+    color: #888888;
+
+}
+@keyframes van-skeleton-blink {
+    50% {
+        opacity: 0.6;
+    }
+}
+*[data-fill-name] {
+    height: 14px;
+    width: 8em;
+    display: inline-block;
+    background-color: #eaeaea;
+    animation: van-skeleton-blink 1.2s ease-in-out infinite
+}
+.manual-merge-template[data-pick='0'] .icon-one,
+.manual-merge-template[data-pick='1'] .icon-two{
+    width: 24px;
+    height: 24px;
+    border: unset;
+}
+.manual-merge-template[data-pick='1'] .icon-one,
+.manual-merge-template[data-pick='0'] .icon-two{
+    background-image: unset;
+}
+
+.toast_div {
+    display: none;
+    position: fixed;
+    top: 0;
+    right: 0;
+    bottom: 0;
+    left: 0;
+    margin: auto;
+    width: 144px;
+    height: 140px;
+    background: rgba(0, 0, 0, 0.65);
+    border-radius: 12px;
+}
+
+.toast_div .toast_content {
+    display: flex;
+    flex-direction: column;
+    align-items: center;
+    justify-content: center;
+    width: 100%;
+    height: 100%;
+}
+
+.toast_div .toast_content .toast_icon {
+    display: flex;
+    width: 56px;
+    height: 56px;
+    background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADgAAAA4CAYAAACohjseAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAP6SURBVHgB7VqBcdswDERyHcAjsBPEG0TdwBvEGySdIO4EcSdQNkg7gdIJnEwgb+Bs8CVPUgKRoERRlKzc5e941lkgCFAgAIIk+sLnxgVNAABr/XOt27puK9YaHOv2UrfXi4uLF1oqtFKZbg+6nRCPUre8nqBloFasQHocdLuhkYg2UaOY/rnXLRNev1FtdvRhgm/sXWOuiioTvvbwMTjq9kOb75HmgFZshcoUJRT1F11F8t7o9uTh/RDLd4gACtU6sZGbd5QI9TiPwjhlynHsQddwHUiBCR2CZ0LL5GNqhjeCcnc0E/RYO2tsI0tGKVB/uWmYD5ejtOQY9yUFE5luDcTJc4qWB5W3XIxyTC6F9nIxcg33rnBDwWKyC1ShiONhKANlMdjRwqBlurNkzIZ0LlnHAy0UaKeIRWinrTUzis6A2oqKrvUF18NnFMCYz0pOZwA+vGUZQPsY/BWFGVE0M9DOmHrNDq6/yLqIc0b4h2YG3BAQtK4sq9t3EZaMcPRebAgg552hCvKwcfIR2eY57dakPbZvlxLkwVElJfzLv8fsS0bHA/mz3mC+0XwwzkwJ/wdNci0rr+dkzYNPwX80E/Rs+6oCBorC8cqer5qHS+lPas/GZNDKbfTProcmNEXkMr/3+cb+VOx5cvNEFYK6ckgjw2+qajIh4AqupAE5FE0MtEOSjaehTg7teHiSCEZ7UFRFo96+cNNBjh1FwFIQEsEoBXWf27rvAd35oy8kRCvH+HYqyOOIogHQ9PeWoF4l4TfNHY1AiIIlex+8uRWUa1AItNsplKt582ymlAgOjGAbyNQua9jILXqJdk8JgGr9O5PL4yAPlEFf0GQQun3Xjz9JDi3bRkn9e0tu4H7R/VOVH7nMR+ct2iWAsN1xu7+yrIDjCXIBV1EioL2juJMIeLJtHE5sqNghDEmLWEG80fakGUUCbkHIxo4SAu31V3YR7hnhYDO1eElnGaP5esbiJ1J5F2FmCaNoBAQlSyROA+GWLNZ9HYqg2QgXgE9a8ioB2olD/wZZ+IqjnQGqNdlbIYvga3+9sAlETEG1n2fyEgiss5MhHe2vONtZYCjgpohqSH/boxpktBDALZANT/fg5pnxZ3EJAfnMMs78IZ/FKToTMMWBLORYNvtZYe0X7MQhjRyQs5J7mgn4qBbw5bKllIB7CWByk4V8TWz85YOOAX31lBxIfhEoF8YpMYcPgBtCGpikd0MRQOW1N/Bf7DNjDvaWYy7jKf1jshzlIXmm6giguYh3tN4bYY2pXVH7XqnE55fe+T/TOYCqkOSb9TEosKDkonFCj+guQvXBOJB9SsWmvtJsClLGBBW5Zx9Na+6T/p3tTugXPhH+A0I78oMZK5NlAAAAAElFTkSuQmCC) no-repeat;
+    background-size: contain;
+}
+
+.toast_div .toast_content .toast_text {
+    margin-top: 12px;
+    font-size: 16px;
+    line-height: 24px;
+    color: #fff;
+}
+

+ 34 - 7
src/web/staticres/js/login.js

@@ -659,6 +659,14 @@ function loginBtnType(){
 
 // ajax部分匿名函数自执行,防止泄露全局变量
 $(function(){
+  function goBackOrigin (cb) {
+    var backOrigin = $.cookie('article')
+    if (backOrigin) {
+      location.replace(backOrigin)
+    } else {
+      typeof cb === 'function' ? cb() : window.close()
+    }
+  }
 	var Direct = {
         verify: {},
         forge: {},
@@ -804,19 +812,36 @@ $(function(){
                 $.post("/jypay/user/phone/bind",{
                   step: 2,
                   phone: arr[0].value,
-                  code: arr[2].value
+                  code: arr[2].value,
+                  mode: isBindPage ? 'mergeBind' : ''
                 },function(r){
                     e.setAttribute('data-loading', 'false')
                     if (r && r.error_code > -1) {
                         if(r.data.state==1){
+                            if (isBindPage) {
+                              if (history.length === 1) {
+                                goBackOrigin()
+                              } else {
+                                if (document.referrer === location.href) {
+                                  goBackOrigin(function () {
+                                    location.href = '/'
+                                  })
+                                } else {
+                                  history.back()
+                                }
+                              }
+                              return
+                            }
                             if (r.data.needMerge) {
-                              location.href =  '/swordfish/frontPage/userMerge/sess/accountmerge?token=' + r.data.mergeToken
+                              location.href =  '/swordfish/frontPage/userMerge/sess/merge?token=' + r.data.mergeToken
                               return
                             } else {
                               $("#bidLogin").modal("hide")
                               sessionStorage.setItem('bind-phone', arr[0].value.trim())
                               typeof window.callBindPhoneSuccess === 'function' && window.callBindPhoneSuccess(true)
                             }
+                        } else if (r.data.state==2){
+                          location.replace('/swordfish/frontPage/userMerge/sess/merge?token=' + r.data.token)
                         }
                     } else {
                         arr[2].showError(r.error_msg || '绑定错误,请稍后再试')
@@ -895,6 +920,7 @@ $(function(){
     }
   }
   var oldNeedStatus = false
+  window.getBindVerify = getNewVerify
   function getNewVerify (cb) {
 	  if (!oldNeedStatus) {
       toggleNeedVerifyInput(false)
@@ -1277,6 +1303,12 @@ $(function(){
         verifySubmit.init([verifyPhone, verifyCode, verifySms])
         verifySendSms.update(verifyCode.next && verifyPhone.next)
 
+        Direct.verify = {
+          phone: verifyPhone,
+          code: verifyCode,
+          sms: verifySms
+        }
+
         // 密码登录
         var passSubmit = {
             el: 'button[name="pass_submit"]',
@@ -1325,11 +1357,6 @@ $(function(){
             }
         })
         passSubmit.init([passPhone, passPass])
-        Direct.verify = {
-            phone: verifyPhone,
-            code: verifyCode,
-            sms: verifySms
-        }
     }
     function initForgetDirect () {
         // 判断是否需要初始化

+ 1 - 1
src/web/staticres/me/js/mine.js

@@ -65,7 +65,7 @@ var mine = {
         var _this = this
         $.ajax({
             type: 'GET',
-            url: '/jypay/userMsg/query?t=' + Date.now(),
+            url: '/jyMerge/userMsg/query?t=' + Date.now(),
             success: function (res) {
                 if (res.error_code == 0 && res.data) {
                     Object.assign(_this.mergeInfo, res.data)

+ 42 - 11
src/web/staticres/me/js/phone_bind.js

@@ -3,7 +3,10 @@ var vm = new Vue({
     el: '#phone-bind',
     data: {
         type: 'bind',
+        mode: '',  // 是否跳转强制绑定
         from: '',  // 是否通过iframe进入
+        token: '',  // 账号合并需要的token
+        redirectTo: '',
         userInfo: {
             company: ''
         },
@@ -14,6 +17,7 @@ var vm = new Vue({
             picCode: '',
             code: ''
         },
+        needShowEntItem: true, // 需不需要显示填写公司名称
         entListShow: false, // 联想结果列表显示控制
         searchEntList: [], // 联想结果数组
         errorMessage: {
@@ -78,16 +82,29 @@ var vm = new Vue({
         },
         // 如果已经填写过公司,则不显示公司填写部分
         showEntItem: function () {
-            return this.getUserInfoLoaded && !this.userInfo.company
+            return this.getUserInfoLoaded && !this.userInfo.company && this.needShowEntItem
+        },
+        showBottomTip: function () {
+            const filter = ['mergeBind']
+            return filter.indexOf(this.mode) !== -1
         }
     },
     created: function () {
         this.getImgCaptcha()
         this.getType()
         this.from = utils.getParam('from')
+        this.mode = utils.getParam('mode')
+        this.redirectTo = utils.getParam('redirectTo')
+        if (this.redirectTo) {
+            this.redirectTo = decodeURIComponent(this.redirectTo)
+        }
+
         if (this.type === 'bind') {
             this.getUserInfo()
         }
+        if (this.mode === 'mergeBind') {
+            this.needShowEntItem = false
+        }
     },
     methods: {
         getType: function () {
@@ -279,18 +296,26 @@ var vm = new Vue({
             var _this = this
             var loading = this.showLoading()
             var data = {
-                mail: this.info.phone,
+                phone: this.info.phone,
                 code: this.info.code,
                 step: 2
             }
+
+            if (this.mode === 'mergeBind') {
+                data.mode = this.mode
+            }
+
             $.ajax({
                 type: 'POST',
                 url: '/jypay/user/phone/' + _this.type,
                 data: data,
                 success: function (res) {
                     loading.clear()
-                    if (res.error_code == 0 && res.data && res.data.state == 1) {
-                        callback && callback()
+                    if (res.error_code == 0 && res.data && res.data.state) {
+                        if (res.data.token) {
+                            _this.token = res.data.token
+                        }
+                        callback && callback(res.data.state)
                     } else {
                         _this.showToast(res.error_msg || _this.someText.text + '失败')
                     }
@@ -310,6 +335,8 @@ var vm = new Vue({
                         window.parent.postMessage({
                             action: 'success'
                         }, location.origin)
+                    } else if (_this.mode == 'mergeBind' && _this.redirectTo) {
+                        location.replace(_this.redirectTo)
                     } else {
                         history.back()
                     }
@@ -323,13 +350,17 @@ var vm = new Vue({
             var _this = this
             if (this.type === 'bind') {
                 console.log('绑定手机号...')
-                this.setPhone(function () {
-                    // 绑定手机号完成后,如果已经填写过公司。则不发送提交公司的请求
-                    // 可以直接判断计算属性showEntItem,来判断需不需要填写公司
-                    if (_this.showEntItem) {
-                        _this.setCompany(_this.afterSetPhoneSuccess)
-                    } else {
-                        _this.afterSetPhoneSuccess()
+                this.setPhone(function (state) {
+                    if (state == 1) {
+                        // 绑定手机号完成后,如果已经填写过公司。则不发送提交公司的请求
+                        // 可以直接判断计算属性showEntItem,来判断需不需要填写公司
+                        if (_this.showEntItem) {
+                            _this.setCompany(_this.afterSetPhoneSuccess)
+                        } else {
+                            _this.afterSetPhoneSuccess()
+                        }
+                    } else if (state == 2) {
+                        location.replace('/weixin/frontPage/userMerge/free/index?token=' + _this.token)
                     }
                 })
             } else {

+ 8 - 8
src/web/staticres/pccss/index.css

@@ -4,7 +4,7 @@
   width: 100%;
   height: 100vh;
   min-width: 1200px;
-  min-height: 637px;
+  min-height: 100vh;
   background: url(/images/pc/index-bg.png) 0 0 no-repeat;
   background-size: 100% 100%;
   position: relative;
@@ -332,7 +332,7 @@ input:-ms-input-placeholder {
     top: -123px !important;
     background: url(/images/pc/index-hover-bg.png) 0 0 no-repeat !important;
     border: 0px solid #e5e6e9 !important;
-    z-index: 999;   
+    z-index: 999;
     width: 102px !important;
     height: 125px !important;
     background-size: 102px 125px !important;
@@ -342,7 +342,7 @@ input:-ms-input-placeholder {
     -moz-transform: scale(0.5,0.5);
     -webkit-transform: scale(0.5,0.5);
     -o-transform: scale(0.5,0.5);
-    position: absolute;    
+    position: absolute;
 	left: -45px !important;
     top: -44px !important;
     margin: 12px !important;
@@ -359,15 +359,15 @@ input:-ms-input-placeholder {
     width: 100%;
     text-align: center;
 }
-*.modal-open {  
-    overflow-y: hidden !important;  
-    padding-right: 0 !important;  
+*.modal-open {
+    overflow-y: hidden !important;
+    padding-right: 0 !important;
 }
 .modal-open .modal{
 	 overflow-y: hidden !important;
 }
 body{
-	overflow-y:hidden !important;  
+	overflow-y:hidden !important;
 }
 /*.tan {*/
   /*width: 515px;*/
@@ -424,4 +424,4 @@ body{
   /*font-size: 14px;*/
   /*color: #0a74bf;*/
   /*font-weight: bolder;*/
-/*}*/
+/*}*/

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

@@ -569,7 +569,7 @@ function infoListCss(){
 			</div>
 			<div class="jy_renzheng">
 				<div class="jy_otherlink"><a href="/" target="_bank">剑鱼标讯</a>|<a href="/front/subscribe.html">招标订阅</a>|<a href="/jylab/supsearch/index.html">招标搜索</a>|<a  data-toggle="modal" data-target="#bidcommunity">招标社区</a>|<a href="/jyblog/index.html" target="_bank">剑鱼标讯博客</a>|<a href="/front/busicooperation.html" target="_bank">商务合作</a>|<a href="/front/advservices.html" target="_bank">广告服务</a>|<a href="/front/aboutus.html">关于我们</a>|<a href="http://www.qmx.top" target="_bank">企明星</a>|<a href="http://www.qmx.top/front/entCommunity.html" target="_bank">企业社区</a></div>
-				<div style="color: #B9B9BB;" class="copyright" id="cpinfo">©2015-2020 jianyu360.com 版权所有 | 京ICP备14030217号-3</div>
+				<div style="color: #B9B9BB;" class="copyright" id="cpinfo">©2015-2020 jianyu360.com 版权所有 |  <a style="color: inherit; font-size: inherit;" href="https://beian.miit.gov.cn/" target="_blank">京ICP备14030217号-3</a></div>
 			</div>
 		</div>
 		<div style="position:relative" class="jy_imgright">
@@ -591,7 +591,7 @@ function infoListCss(){
 				</span>
 			</form>
 			<div class="jy_otherlink"><a href="/" target="_bank">剑鱼标讯</a>|<a href="/front/subscribe.html">招标订阅</a>|<a href="/jylab/supsearch/index.html">招标搜索</a>|<a  data-toggle="modal" data-target="#bidcommunity">招标社区</a>|<a href="/jyblog/index.html" target="_bank">剑鱼标讯博客</a>|<a href="/front/busicooperation.html" target="_bank">商务合作</a>|<a href="/front/advservices.html" target="_bank">广告服务</a>|<a href="/front/aboutus.html">关于我们</a>|<a href="http://www.qmx.top" target="_bank">企明星</a>|<a href="http://www.qmx.top/front/entCommunity.html" target="_bank">企业社区</a></div>
-			<div class="copyright">©2015-2020 jianyu360.com 版权所有 | 京ICP备14030217号-3</div>
+			<div class="copyright">©2015-2020 jianyu360.com 版权所有 |  <a style="color: inherit; font-size: inherit;" href="https://beian.miit.gov.cn/" target="_blank">京ICP备14030217号-3</a></div>
 		</div>
 		<div class="j-bottom-b">
 			<img src="/front/share/RV8=" alt="剑鱼标讯微信公众号"><br>
@@ -605,7 +605,7 @@ function infoListCss(){
 // ajax部分匿名函数自执行,防止泄露全局变量
 $(function(){
     // 动态设置copyright
-    var copyright = '©2015-' + new Date().getFullYear() + ' jianyu360.com 版权所有 | 京ICP备14030217号-3'
+    var copyright = '©2015-' + new Date().getFullYear() + ' jianyu360.com 版权所有 | ' + '<a style="color: inherit; font-size: inherit;" href="https://beian.miit.gov.cn/" target="_blank">京ICP备14030217号-3</a>'
     $('.copyright').text(copyright)
 
   	$(".j-bottom .jy_province font").click(function(){

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

@@ -39,7 +39,7 @@
 					<!--<span class="movedot"></span>-->
 				</div>
 			</div>
-			
+
 			<div class="animtionBox box-2">
 				<span class="bg"></span>
 				<!--线-->
@@ -51,7 +51,7 @@
 					<!--<span class="movedot"></span>-->
 				</div>
 			</div>
-			
+
 			<div class="animtionBox box-3">
 				<span class="bg"></span>
 				<!--线-->
@@ -63,7 +63,7 @@
 					<!--<span class="movedot"></span>-->
 				</div>
 			</div>
-			
+
 			<!--底部链接-->
 			<div class="links">
 				<ul class="linkul clearfix">
@@ -98,20 +98,20 @@
 					</li>
 					<li class="linksitem">
 						<a href="#">企业社区</a>
-					</li>                                      
+					</li>
 				</ul>
 				<p class="copyright">
                     <!-- ©2015-2019 jianyu360.com 版权所有&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;京ICP备14030217号-3 -->
                 </p>
 			</div>
-			
+
 			<!--推荐好友-->
 			<div class="friends clearfix">
 				<span>推荐给好友</span>
 				<a href="#" class="wx iconfont icon-weixin"></a>
 				<a href="#" class="qq iconfont icon-QQ"></a>
 			</div>
-			
+
 		</section>
 		<script type="text/javascript" src="{{Msg "seo" "cdn"}}/js/public-nav.js"></script>
 		<script type="text/javascript" src="{{Msg "seo" "cdn"}}/js/index_pc.js"></script>
@@ -120,7 +120,7 @@
 $(function(){
     haslogin({{.T.logid}});
     // 动态设置copyright
-    var copyright = '©2015-' + new Date().getFullYear() + ' jianyu360.com 版权所有&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;京ICP备14030217号-3'
+    var copyright = '©2015-' + new Date().getFullYear() + ' jianyu360.com 版权所有&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;' + '<a style="color: inherit; font-size: inherit;" href="https://beian.miit.gov.cn/" target="_blank">京ICP备14030217号-3</a>'
     $('.copyright').html(copyright)
 })
 //
@@ -138,4 +138,4 @@ function zbSeatch(id){
 		},1000)
 	}
 </script>
-</html>
+</html>

+ 113 - 8
src/web/templates/big-member/pc/page_ontrial_commit.html

@@ -63,6 +63,25 @@
             letter-spacing: 0px;
             text-align: left;
             margin-top: 2px;
+            padding-left: 134px;
+        }
+        .order-phone-group.verify {
+            margin-top: 24px;
+        }
+        .order-phone-group.verify input[readonly] {
+            background-color: #f5f5fb;
+        }
+        .order-phone-group.verify label {
+            min-width: 4em;
+        }
+        .order-phone-group.verify button.time {
+            color: #9B9CA3;
+            cursor: not-allowed;
+        }
+        .order-phone-group.verify button {
+            color: #2ABED1;
+            cursor: pointer;
+            background-color: transparent;
         }
     </style>
     <!--E-手机号输入样式-->
@@ -114,6 +133,12 @@
                     <input id='order_phone' autocomplete='off' placeholder='请输入手机号码' maxlength='11' type='tel' />
                     <p>手机号码输入错误</p>
                 </div>
+                <div class='order-phone-group verify' style="display: none">
+                    <label for='order_phone_verify'>验证码&nbsp;&nbsp;</label>
+                    <input style="width: 12em" id='order_phone_verify' autocomplete='off' placeholder='请输入验证码' maxlength='6' type='text' />
+                    <button>发送验证码</button>
+                    <p>验证码输入错误</p>
+                </div>
                 <!--E-手机号输入-->
 
                 <div class="main_footer">
@@ -153,17 +178,81 @@
         _this.OrderPhoneCheck = setTimeout( () => {
           if (_this.result.status) {
             o_parent.removeClass('error')
-            typeof _this.data.success === 'function' && _this.data.success()
+            if (!(_this.result.verifyPhone === _this.result.phone && _this.result.status)) {
+              _this.result.verifyPhone = ''
+              _this.result.verify = false
+              $(".order-phone-group.verify").show().removeClass('error')
+            }
+            changeSubmitStatus(false)
           } else {
             o_parent.addClass('error')
-            typeof _this.data.error === 'function' && _this.data.error()
+            $(".order-phone-group.verify").hide()
+            changeSubmitStatus(true)
           }
         }, _this.data.time || 300)
       })
+      $(".order-phone-group.verify input").on('input propertychange change', function () {
+        clearTimeout(window.verifyT)
+        window.verifyT = setTimeout(function () {
+          if ($("#order_phone_verify").attr('readonly')) {
+            return
+          }
+          var nowVerify = $("#order_phone_verify").val().trim()
+          if (nowVerify.length === 6) {
+            $("#order_phone_verify").attr('readonly', true)
+            $("#order_phone_verify").attr('data-phone', _this.result.phone)
+            $.post('/jypay/userMsg/collect', {
+              phone: _this.result.phone,
+              code: nowVerify,
+              step: 2
+            }).done(function (r) {
+              if (r.error_msg === '') {
+                $(".order-phone-group.verify").removeClass('error')
+                $(".order-phone-group.verify").hide()
+                _this.result.verify = true
+                typeof _this.data.success === 'function' && _this.data.success()
+              } else {
+                $(".order-phone-group.verify").addClass('error')
+                _this.result.verify = false
+                $(".order-phone-group.verify p").text(r.error_msg)
+                typeof _this.data.error === 'function' && _this.data.error()
+              }
+            }).always(function () {
+              setTimeout(function () {
+                $("#order_phone_verify").attr('readonly', false)
+              },500)
+            })
+          }
+        }, 300)
+      })
+      $(".order-phone-group.verify button").on('click', function () {
+        $(this).attr("disabled", true)
+        var setTimeNum = 59
+        $(this).addClass('time')
+        window.timeMsg = setInterval(function () {
+          $(".order-phone-group.verify button").text(setTimeNum-- + 's后重发')
+          if (setTimeNum === 0) {
+            clearTimeout(window.timeMsg)
+            $(".order-phone-group.verify button").attr('disabled', false)
+            $(".order-phone-group.verify button").text('发送验证码').removeClass('time')
+          }
+        }, 1000)
+        _this.result.verifyPhone = _this.result.phone
+        $.post('/jypay/userMsg/collect', {
+          phone: _this.result.phone,
+          step: 1
+        }).done(function (r) {
+            if (r.error_msg === '') {
+              $(".order-phone-group.verify").removeClass('error')
+            } else {
+              $(".order-phone-group.verify").addClass('error').find('p').text(r.error_msg)
+            }
+        })
+      })
     }
     this.check_phone = function (phone) {
       if (phone.trim().length === 0) {
-        return true
+        return false
       }
       var result = /^[1][3-9][0-9]{9}$/.test(phone)
       if (result) {
@@ -176,6 +265,14 @@
         $(this.data.el).val(str)
         this.result.phone = str
         this.result.status = true
+        if (!(this.result.verifyPhone === this.result.phone && this.result.status)) {
+          this.result.verifyPhone = ''
+          this.result.verify = false
+          $(".order-phone-group.verify").show().removeClass('error')
+          if (this.result.verify) {
+            typeof _this.data.success === 'function' && _this.data.success()
+          }
+        }
       }
     }
     this.ajaxPhone = function () {
@@ -218,6 +315,8 @@
     this.result = {
       phone: '',
       status: true,
+      verify: false,
+      verifyPhone: '',
       update: _this.update.bind(_this)
     }
     this.removeCachePhone()
@@ -238,12 +337,17 @@
     }
   })
   function changeSubmitStatus (type, other) {
+    if (!OrderPhoneCheck.status) {
+      type = true
+    }
+    if (!$(".agren_ipt").prop('checked')) {
+      type = true
+    }
+    if (!OrderPhoneCheck.verify) {
+      type = true
+    }
     if (other) {
-      if (type) {
-        $('.pay_btn').attr("disabled", type)
-      } else {
-        $('.pay_btn').attr("disabled", $('.pay_btn').attr('data-disabled') === 'true')
-      }
+      $('.pay_btn').attr("disabled", type)
     } else {
       $('.pay_btn').attr('data-disabled', type)
       $('.pay_btn').attr("disabled", type)
@@ -251,6 +355,7 @@
   }
   // @订单手机号-E
 
+
   $(function () {
         try {
             haslogin({{.T.logid}});

+ 23 - 254
src/web/templates/big-member/wx/page_ontrial_commit.html

@@ -17,53 +17,6 @@
         <link rel="stylesheet" href='{{Msg "seo" "cdn"}}/big-member/weixin/css/public.css?v={{Msg "seo" "version"}}'>
         <link rel="stylesheet" href='{{Msg "seo" "cdn"}}/big-member/weixin/css/j-icons.css?v={{Msg "seo" "version"}}'>
         <link rel="stylesheet" href='{{Msg "seo" "cdn"}}/big-member/weixin/css/buy_commit.css?v={{Msg "seo" "version"}}'>
-            <!--S-手机号输入样式-->
-    <style>
-        .order-phone-group {
-            background: #FFFFFF;
-            color: #5F5E64;
-            font-size: 15px;
-            line-height: 22px;
-            letter-spacing: 0px;
-            text-align: left;
-            padding: 8px 16px;
-            box-sizing: border-box;
-            margin-top: 8px;
-        }
-        .order-phone-group label {
-            display: inline-block;
-            min-width: 80px;
-            padding: 8px 0;
-        }
-        .order-phone-group.error input {
-            color: #FB483D;
-        }
-        .order-phone-group.error p {
-            display: inherit;
-        }
-        .order-phone-group input {
-            padding: 8px 0;
-            color: #5F5E64;
-            font-size: 16px;
-            line-height: 24px;
-            letter-spacing: 0px;
-            text-align: left;
-        }
-        .order-phone-group input::placeholder {
-            color: #C0C4CC;
-        }
-        .order-phone-group p {
-            display: none;
-            color: #FB483D;
-            font-size: 12px;
-            line-height: 18px;
-            letter-spacing: 0px;
-            text-align: left;
-            margin-top: 2px;
-        }
-    </style>
-    <!--E-手机号输入样式-->
-
     </head>
 
 <body>
@@ -94,9 +47,26 @@
                     </div>
                     <!--S-手机号输入-->
                     <div class='order-phone-group'>
-                        <label for='order_phone'>手机号码</label>
-                        <input id='order_phone' autocomplete='off' placeholder='请输入手机号码' maxlength='11' type='tel' />
-                        <p>手机号码输入错误</p>
+                        <van-field
+                            v-model.trim="info.phone"
+                            label="手机号"
+                            type="tel"
+                            maxlength="11"
+                            placeholder="请输入手机号码"
+                            :error-message="errorMessage.phone"
+                            @blur="checkPhoneRegPass"
+                        ></van-field>
+                        <van-field
+                            v-model.trim="info.code"
+                            label="验证码"
+                            maxlength="6"
+                            placeholder="请输入验证码"
+                            :error-message="errorMessage.code"
+                        >
+                            <template #button>
+                                <van-button class="send-code" size="small" :disabled="sendCodeButtonDisabled" @click="sendVerifyCode">${ sendCodeButtonText }</van-button>
+                            </template>
+                        </van-field>
                     </div>
                     <!--E-手机号输入-->
 
@@ -106,12 +76,6 @@
                             <span class="serve_title">权限清单</span>
                         </div>
                         <div class="serve_list">
-                            <!-- <van-cell-group>
-                                <van-cell :title="item.listname" :class="item.addclass"  v-for="(item,index) in severList" />
-                                <template #icon>
-                                    <span class="j-icon icon-root"></span>
-                                </template>
-                            </van-cell-group> -->
                             <div class="viewmeau clickable" @click="viewMeau()">
                                 <span class="meau_text">《大会员试用版功能权限清单》</span>
                                 <span class="j-icon icon-arrow-right"></span>
@@ -121,7 +85,6 @@
                 </div>
                 <div class="j-footer">
                     <div class="submit-container">
-                        <!-- 当 price-top/price-bottom 有一个显示的时候,则price-container显示。否则不显示 -->
                         <div class="price-container">
                             <div class="price-top">
                                 <span class="price-t-label">合计:</span>
@@ -138,8 +101,8 @@
                                 <a href="/front/staticPage/wx-serviceterms.html" @click="setStatus()" class="link highlight-text">《剑鱼标讯线上购买与服务条款》</a>
                             </p>
                         </div>
-                        <div class="j-button-group" @click="onOrder()">
-                            <button data-need-bind-phone id="run-call-buy" class="j-button-confirm"
+                        <div class="j-button-group">
+                            <button data-need-bind-phone @click="onSubmit" id="run-call-buy" class="j-button-confirm"
                                 :disabled="confirmDisabled">提交订单</button>
                         </div>
                     </div>
@@ -153,202 +116,8 @@
     <script src=//cdn.jsdelivr.net/npm/vant@2.8.2/lib/vant.min.js> </script>
     <script src=//cdn.jsdelivr.net/npm/jquery@3.4.1/dist/jquery.min.js></script>
     <script src='{{Msg "seo" "cdn"}}/big-member/js/utils.js?v={{Msg "seo" "version"}}'></script>
+    <script src='{{Msg "seo" "cdn"}}/big-member/js/ontrial-commit.js?v={{Msg "seo" "version"}}'></script>
     <!--<script src='{{Msg "seo" "cdn"}}/js/check-bind-phone.js?v={{Msg "seo" "version"}}'></script>-->
-
-<script>
-  // @订单手机号-S
-  function OrderPhone (data) {
-    this.addListener = function () {
-      var _this = this
-      $(this.data.el).on('input propertychange change',   function () {
-        _this.OrderPhoneCheck && clearTimeout(_this.OrderPhoneCheck)
-        var o_phone = $(this).val()
-        _this.result.phone = o_phone
-        _this.result.status = _this.check_phone(o_phone)
-        var o_parent = $(this).parents()
-        _this.OrderPhoneCheck = setTimeout( () => {
-          if (_this.result.status) {
-            o_parent.removeClass('error')
-            typeof _this.data.success === 'function' && _this.data.success()
-          } else {
-            o_parent.addClass('error')
-            typeof _this.data.error === 'function' && _this.data.error()
-          }
-        }, _this.data.time || 300)
-      })
-    }
-    this.check_phone = function (phone) {
-      if (phone.trim().length === 0) {
-        return true
-      }
-      var result = /^[1][3-9][0-9]{9}$/.test(phone)
-      if (result) {
-        sessionStorage.setItem(_this.OrderPhoneCheckKey, phone)
-      }
-      return result
-    }
-    this.update = function (str) {
-      if (this.check_phone(str)) {
-        $(this.data.el).val(str)
-        this.result.phone = str
-        this.result.status = true
-      }
-    }
-    this.ajaxPhone = function () {
-      var isCache = sessionStorage.getItem(this.OrderPhoneCheckKey)
-      if (isCache) {
-        this.update(isCache)
-      }
-      var _this = this
-      $.get("/jypay/user/getAccountInfo?t=" + new Date().getTime(), function (r) {
-        if (r && r.data && r.data.phone) {
-          _this.update(r.data.phone)
-        }
-      })
-    }
-    this.removeCachePhone = function () {
-      var levelTime = sessionStorage.getItem(_this.OrderPhoneCheckKey + '_level_time') || false
-      if (levelTime) {
-        var nowTime = new Date().getTime()
-        if (nowTime - levelTime > 5 * 60 * 1000) {
-          sessionStorage.removeItem(_this.OrderPhoneCheckKey)
-        }
-      }
-      sessionStorage.setItem(_this.OrderPhoneCheckKey + '_level_time', nowTime)
-      window.addEventListener('pageshow', function(event) {
-        if (event.persisted || window.performance && window.performance.navigation.type != 2) {
-          sessionStorage.removeItem(_this.OrderPhoneCheckKey)
-        }
-      }, false);
-      window.addEventListener('beforeunload', function () {
-        sessionStorage.setItem(_this.OrderPhoneCheckKey + '_level_time', new Date().getTime())
-      })
-    }
-    this.data = data || {
-      el: 'input#order_phone',
-      time: 300
-    }
-    var _this = this
-    this.OrderPhoneCheck = null
-    this.OrderPhoneCheckKey = 'p19.3_order_phone'
-    this.result = {
-      phone: '',
-      status: true,
-      update: _this.update.bind(_this)
-    }
-    this.removeCachePhone()
-    this.addListener()
-    this.ajaxPhone()
-    return this.result
-  }
-  // @订单手机号-E
-
-    var vNode = {
-        delimiters: ['${', '}'],
-        el: '#v-commit',
-        data: {
-            loading: true,
-            checked: false,
-            showPicker: false,
-            // originPrice: 2,
-            // 价格参数
-            price: 2,
-            grades:0,
-            gradeyear:0,
-            beforeall:0,
-            beforeprice:27999,
-            afterprice:21999,
-            numberStatus:999,
-            hasAccountsOrder:true,
-            severList:[
-                {listname:'招标订阅推送(可试用7天)'},
-                {listname:'中标企业预测(可试用3个项目)'},
-                {listname:'投标决策分析(可试用10个项目)'},
-                {listname:'潜在竞争对手(可展现7个潜在竞争对手)'},
-                {listname:'潜在客户(可展现7个潜在客户)'}
-            ],
-            edition: [
-                {
-                    setmeal:"试用版",
-                    setmealprice:"¥199"
-                }
-            ],
-            OrderPhoneCheck: {}
-        },
-        computed: {
-            confirmDisabled: function () {
-              return !this.OrderPhoneCheck.status || !this.checked||this.hasAccountsOrder||this.numberStatus>0
-            }
-        },
-        created () {
-            var recover = this.recover()
-            if(!recover){
-            }
-            this.checkOrder()
-        },
-        methods: {
-            checkOrder:function(){//是否可以支付
-                $.ajax({
-                    type:'POST',
-                    url:'/jypay/bigmember/createOrderCheck',
-                    success:(res)=>{
-                        if(res.error_code===0){
-                            this.numberStatus=res.data.vipStatus;
-                            this.hasAccountsOrder=res.data.hasAccountsOrder;
-                        }
-                        console.log(this.numberStatus,this.hasAccountsOrder)
-                    }
-                })
-            },
-            recover: function () {
-                var excludeKey = ['sessStorageKey']
-                var $data = sessionStorage.getItem(this.sessStorageKey)
-                if ($data) {
-                    $data = JSON.parse($data)
-                    for (var key in $data) {
-                        if (excludeKey.indexOf(key) !== -1) {
-                            continue
-                        }
-                        this.$data[key] = $data[key]
-                    }
-                    sessionStorage.removeItem(this.sessStorageKey)
-                }
-                return !!$data
-            },
-            onOrder: function (e) {
-                var _this = this
-                $.ajax({
-                    type:'POST',
-                    url:'/jypay/bigmember/createOrder',
-                    data:{
-                        level:4,
-                        cycle:7,
-                        order_phone: this.OrderPhoneCheck.phone
-                    },
-                    success:function(res){
-                        if( res.error_code >= 0 ){
-                            history.replaceState({"flag": "pay"}, '', '/front/wxMyOrder/memberDetail/' + res.data.order_code);
-                            location.href = '/weixin/pay/checkout_member?orderCode='+res.data.order_code
-                        }else {
-                            alert(res.error_msg)
-                        }
-                    }
-                })
-            },
-            setStatus:function(){
-                sessionStorage.setItem(this.sessStorageKey, JSON.stringify(this.$data))
-            },
-            // 查看服务清单
-            viewMeau:function(){
-                location.href = './free_contrast_trial'
-            }
-        },
-        mounted () {
-          this.OrderPhoneCheck = new OrderPhone()
-        }
-    }
-    new Vue(vNode)
-    </script>
     {{include "/common/baiducc.html"}}
 </body>
 

+ 3 - 3
src/web/templates/common/mobilebottom.html

@@ -1,13 +1,13 @@
 <div class="j-bottom">
 	<img src="{{Msg "seo" "cdn"}}/images/pc_6.png" class="backTop" id="backTop">
 	<div><span>手机版</span><span>|</span><span onclick="goToPcIndex()">电脑版</span></div>
-	<div id="cpinfo" class="copyright">©2015-2019 jianyu360.com 版权所有 | 京ICP备14030217号-3</div>
+	<div id="cpinfo" class="copyright">©2015-2019 jianyu360.com 版权所有 |  <a style="color: inherit; font-size: inherit;" href="https://beian.miit.gov.cn/" target="_blank">京ICP备14030217号-3</a></div>
 </div>
 
 <script type="text/javascript">
 $(function () {
     // 动态设置copyright
-    var copyright = '©2015-' + new Date().getFullYear() + ' jianyu360.com 版权所有 | 京ICP备14030217号-3'
+    var copyright = '©2015-' + new Date().getFullYear() + ' jianyu360.com 版权所有 | ' + '<a style="color: inherit; font-size: inherit;" href="https://beian.miit.gov.cn/" target="_blank">京ICP备14030217号-3</a>'
     $('.copyright').html(copyright)
 })
 function zbSeatch(id){
@@ -23,4 +23,4 @@ function goToPcIndex(){
 	$("body").append('<form id="goToPcIndexForm" action="/" method="post" class="hide"><input type="hidden" name="ispc" value="1"></form>');
 	$("#goToPcIndexForm").submit();
 }
-</script>
+</script>

+ 8 - 3
src/web/templates/common/pcbottom.html

@@ -99,7 +99,7 @@
 			</div>
 			<div class="jy_renzheng">
 				<div class="jy_otherlink"><a href="/" target="_bank">剑鱼标讯</a>|<a href="/front/subscribe.html">招标订阅</a>|<a href="/jylab/supsearch/index.html">招标搜索</a>|<a  data-toggle="modal" data-target="#bidcommunity">招标社区</a>|<a href="/jyblog/index.html" target="_bank">剑鱼标讯博客</a>|<a href="/front/busicooperation.html" target="_bank">商务合作</a>|<a href="/front/advservices.html" target="_bank">广告服务</a>|<a href="/front/aboutus.html">关于我们</a>|<a href="http://www.qmx.top" target="_bank">企明星</a>|<a href="http://www.qmx.top/front/entCommunity.html" target="_bank">企业社区</a></div>
-				<div style="color: #B9B9BB;font-size:14px;padding-bottom: 24px;" class="copyright" id="cpinfo">©2015-2019 jianyu360.com 版权所有 | 京ICP备14030217号-3</div>
+				<div style="color: #B9B9BB;font-size:14px;padding-bottom: 24px;" class="copyright" id="cpinfo">©2015-2019 jianyu360.com 版权所有 | <a style="color: inherit; font-size: inherit;" href="https://beian.miit.gov.cn/" target="_blank">京ICP备14030217号-3</a></div>
 			</div>
 		</div>
 		<div style="position:relative" class="jy_imgright">
@@ -532,7 +532,12 @@
         $(window).scroll(function () {
             // 侧边栏显示控制
             if (typeof goBackTop_disBottom !== 'number') {
-                goBackTop_disBottom = 484
+                var metaValue = document.getElementsByTagName('meta')['data-backside']
+                if (metaValue) {
+                  goBackTop_disBottom = Number(metaValue.getAttribute('content'))
+                } else {
+                  goBackTop_disBottom = 484
+                }
             }
             var sideDom = $("div[data-backside]")
             if (sideDom.attr('data-backside').length < 1) {
@@ -580,7 +585,7 @@
 <script type="text/javascript">
 (function(){
 	// 动态设置copyright
-    var copyright = '©2015-' + new Date().getFullYear() + ' jianyu360.com 版权所有 | 京ICP备14030217号-3'
+    var copyright = '©2015-' + new Date().getFullYear() + ' jianyu360.com 版权所有 | ' + '<a style="color: inherit; font-size: inherit;" href="https://beian.miit.gov.cn/" target="_blank">京ICP备14030217号-3</a>'
     $('.copyright').html(copyright)
 
 	$(".j-bottom .jy_province font").click(function(){

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

@@ -501,7 +501,7 @@
 					<a href="javascript:" datahref="/front/dataExport/toSieve" id="dataExport">数据导出</a>
 				</li>
                 <li name="数据服务">
-                    <a href="/front/dataService.html">数据服务</a>
+                    <a href="/front/structed/pc_index.html">数据服务</a>
 				</li>
                 <li  name="招标文件解读">
                     <a href="/bid/pc/page/bidfile_landpage">招标文件解读</a>

+ 117 - 0
src/web/templates/frontRouter/pc/entpc/sess/index.html

@@ -0,0 +1,117 @@
+<!DOCTYPE html>
+<html>
+<head>
+    <title>商机管理_剑鱼标讯,全行业招标信息智能推送领导者</title>
+    <meta content="IE=edge,Chrome=1" http-equiv="X-UA-Compatible"/>
+    <meta content="招标订阅,招标项目,中标项目,招标信息,剑鱼标讯" name="Keywords"/>
+    <meta content="使用剑鱼标讯,可以精准匹配招标信息,只需要微信关注剑鱼标讯公众号,然后自行设定所关注的招标关键词和地区,满足订阅需求的招标信息就会在两个小时内自动推送。" name="Description"/>
+    <meta content="webkit" name="renderer">
+    <meta content="telephone=no" name="format-detection"/>
+    <meta content="商机管理" theme="light" name="enable-header">
+    {{include "/common/pnc.html"}}
+    <link href='{{Msg "seo" "cdn"}}/css/reset.css?v={{Msg "seo" "version"}}' rel="stylesheet" type="text/css"/>
+    <link href='{{Msg "seo" "cdn"}}/pccss/reset_pc.css' rel="stylesheet" type="text/css"/>
+    <link href='{{Msg "seo" "cdn"}}/css/pc.css?v={{Msg "seo" "version"}}' rel="stylesheet"/>
+    <link href='{{Msg "seo" "cdn"}}/pccss/public-nav-1200.css?v={{Msg "seo" "version"}}' rel="stylesheet" type="text/css"/>
+    <!-- S-注入  -->
+    <meta name="importmap-type" content="systemjs-importmap">
+    <script>
+      if (String.prototype.startsWith === 'undefined') {
+        String.prototype.startsWith = function (str) {
+          if(str==null||str==""||this.length==0||str.length>this.length)
+            return false;
+          if(this.substr(0,str.length)==str)
+            return true;
+          else
+            return false;
+        }
+      }
+      if (typeof Promise === 'undefined')
+        document.write('<script src="https://cdn.jsdelivr.net/npm/bluebird@3.7.2/js/browser/bluebird.core.min.js"><\/script>');
+      if (typeof fetch === 'undefined')
+        document.write('<script src="https://cdn.jsdelivr.net/npm/whatwg-fetch@3.4.1/dist/fetch.umd.min.js"><\/script>');
+    </script>
+    <script type="systemjs-importmap" crossorigin="anonymous">
+      {
+        "imports": {
+          "entpc": "/page_entpc/js/app.js",
+          "single-spa": "https://cdn.jsdelivr.net/npm/single-spa@4.3.7/lib/system/single-spa.min.js",
+          "vue": "https://cdn.jsdelivr.net/npm/vue@2.6.10/dist/vue.js",
+          "vue-router": "https://cdn.jsdelivr.net/npm/vue-router@3.0.7/dist/vue-router.min.js"
+        }
+      }
+    </script>
+    <link rel="preload" href="https://cdn.jsdelivr.net/npm/single-spa@4.3.7/lib/system/single-spa.min.js" as="script" crossorigin="anonymous" />
+    <link rel="preload" href="https://cdn.jsdelivr.net/npm/vue@2.6.10/dist/vue.js" as="script" crossorigin="anonymous" />
+    <script src="https://cdn.jsdelivr.net/npm/import-map-overrides@2.2.0/dist/import-map-overrides.js"></script>
+    <script src="https://cdn.jsdelivr.net/npm/systemjs@6.8.3/dist/system.min.js"></script>
+    <script src="https://cdn.jsdelivr.net/npm/systemjs@6.8.3/dist/extras/amd.min.js"></script>
+    <script src="https://cdn.jsdelivr.net/npm/systemjs@6.8.3/dist/extras/named-exports.js"></script>
+    <script src="https://cdn.jsdelivr.net/npm/systemjs@6.8.3/dist/extras/named-register.min.js"></script>
+    <script src="https://cdn.jsdelivr.net/npm/systemjs@6.8.3/dist/extras/use-default.min.js"></script>
+    <!-- E-注入  -->
+
+    <style>
+        #public-nav {
+            border-bottom: 1px solid #e0e0e0;
+            background: #fff;
+        }
+        .page--entpc--index .page-container {
+            min-height: calc(100vh - 364px);
+            padding-top: 77px;
+            box-sizing: border-box;
+        }
+        .page--entpc--index .w-box .w1200 {
+            width: 1200px;
+            margin: 0 auto;
+            min-width: 1200px;
+        }
+    </style>
+</head>
+<body class="page--entpc--index">
+{{include "/common/pchead.html"}}
+<!-- S-注入  -->
+<div class="w-box page-container">
+    <div>
+        <div id="single-spa-app"></div>
+    </div>
+</div>
+<!-- See https://github.com/joeldenning/import-map-overrides#user-interface  -->
+<import-map-overrides-full show-when-local-storage="overrides-ui"></import-map-overrides-full>
+<!-- E-注入  -->
+<script>
+  (function() {
+    Promise.all([System.import('single-spa'), System.import('vue'), System.import('vue-router')]).then(function (modules) {
+      var singleSpa = modules[0];
+      var Vue = modules[1];
+      var VueRouter = modules[2];
+
+      Vue.use(VueRouter)
+
+      singleSpa.registerApplication(
+        'entpc',
+        function() {
+          return System.import('entpc')
+        },
+        function (location) {
+          return true
+        }
+      )
+
+      singleSpa.start();
+    })
+  })()
+</script>
+<script src='{{Msg "seo" "cdn"}}/js/jquery.cookie.js?v={{Msg "seo" "version"}}' type="text/javascript"></script>
+<script src='{{Msg "seo" "cdn"}}/js/public-nav.js?v={{Msg "seo" "version"}}' type="text/javascript"></script>
+<script>
+    $(function () {
+      haslogin({{.T.logid}});
+    })
+</script>
+<!--S-百度统计-->
+{{include "/common/pcbottom.html"}}
+{{include "/common/baiducc.html"}}
+<!--E-百度统计-->
+</body>
+</html>

+ 179 - 0
src/web/templates/frontRouter/pc/userMerge/sess/bind.html

@@ -0,0 +1,179 @@
+<html>
+<head>
+    <title>绑定</title>
+    <meta http-equiv="X-UA-Compatible" content="IE=edge,Chrome=1" />
+    <meta name="renderer" content="webkit">
+    <meta content="telephone=no" name="format-detection"/>
+    <meta content="light" theme="light" name="enable-header"/>
+    {{include "/common/pnc.html"}}
+    <link href="{{Msg "seo" "cdn"}}/css/pc.css?v={{Msg "seo" "version"}}" rel="stylesheet">
+    <link href="{{Msg "seo" "cdn"}}/css/dev2/reset_pc.css?v={{Msg "seo" "version"}}" rel="stylesheet">
+    <script src="{{Msg "seo" "cdn"}}/js/jquery.cookie.js"></script>
+  <link rel="stylesheet" type="text/css" href="{{Msg "seo" "cdn"}}/pccss/public-nav.css?v={{Msg "seo" "version"}}" />
+  <link rel="stylesheet" type="text/css" href="{{Msg "seo" "cdn"}}/pccss/public-nav-1200.css?v={{Msg "seo" "version"}}" />
+  <script type="text/javascript" src="{{Msg "seo" "cdn"}}/js/public-nav.js?v={{Msg "seo" "version"}}"></script>
+</head>
+<style>
+    .public-nav{
+        border-bottom: 1px solid #e0e0e0;
+    }
+    .bind_page{
+        padding-top:76px;
+    }
+    .bind_page>.login-dig-phone-bind-box{
+        margin: 20px 0px 50px 0px;
+    }
+    .login-dig-phone-bind-box {
+        display: flex;
+        flex-direction: column;
+        align-items: center;
+        font-family: Microsoft YaHei;
+        padding-bottom: 220px;
+    }
+
+    .login-dig-phone-bind-box .register-step-title {
+        font-size: 14px;
+        line-height: 24px;
+        color: #999999;
+    }
+
+    .login-dig-phone-bind-box .register-step-title div {
+        color: #1D1D1D;
+        font-size: 24px;
+        line-height: 36px;
+        text-align: left;
+        min-width: 340px;
+    }
+
+
+    .login-dig-phone-bind-box  .login-dig-input-box {
+        width: 340px;
+    }
+
+    .login-dig-phone-bind-box  button {
+        width: 340px;
+        margin-top: 32px;
+    }
+    .autocomplete-item {
+        position: relative;
+    }
+    .autocomplete-box {
+        display: none;
+        background: #fff;
+        position: absolute;
+        bottom: -213px;
+        left: 0;
+        width: 100%;
+        height: 205px;
+        max-height: 205px;
+        overflow: hidden;
+        overflow-y: auto;
+        z-index: 666;
+        box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.08);
+        border-radius: 8px;
+    }
+    .autocomplete-box li:hover {
+        background: #F6F6F6;
+    }
+    .autocomplete-box li:last-child {
+        border-bottom: none;
+    }
+    .autocomplete-box li {
+        width: 100%;
+        box-sizing: border-box;
+        color: #1D1D1D;
+        font-family: Microsoft YaHei;
+        font-size: 14px;
+        line-height: 24px;
+        letter-spacing: 0px;
+        text-align: left;
+        padding: 10px 20px;
+        border-bottom: 1px solid rgba(0, 0, 0, 0.05);
+        cursor: pointer;
+    }
+    .login-dig-submit-button:disabled {
+        background: #87DFEA;
+        border-color: #87DFEA;
+    }
+
+    .bind-title-group {
+        width: 100%;
+        display: flex;
+        flex-direction: column;
+        align-items: center;
+    }
+    .bind-title-group p {
+        font-family: Microsoft YaHei;
+        font-style: normal;
+        font-weight: normal;
+        font-size: 14px;
+        line-height: 24px;
+        text-align: center;
+        color: #686868;
+    }
+    .bind-title-group div {
+        margin-top: 67px;
+        margin-bottom: 40px;
+        max-width: 1200px;
+        text-align: center;
+        font-family: Microsoft YaHei;
+        font-style: normal;
+        font-weight: normal;
+        font-size: 16px;
+        line-height: 40px;
+        color: #1D1D1D;
+        width: 100%;
+        border-bottom: 1px solid #EBEBEB;
+    }
+</style>
+<body>
+{{include "/common/pchead.html"}}
+<script>
+  $("div#bidLogin").remove()
+</script>
+<section class="bind_page"  id="bidLogin" data-name="bind-phone">
+    <div class="login-dig-tabbar-navbar" style="display: none"></div>
+    <div class="login-dig-success-toast">
+        <i class="login-dig-icon-success"></i>
+        <span>绑定成功</span>
+    </div>
+    <div class="login-dig-phone-bind-box">
+        <div class="bind-title-group">
+            <div>绑定手机号</div>
+            <p>您好,根据《中华人民共和国网络安全法》及相关法律规定,<br>请您填写正确的手机号进行认证,获取更多网络服务。</p>
+        </div>
+        <div class="login-dig-tabbar-content is-active" data-name="code" style="">
+            <div class="login-dig-input-box" data-error="手机号码输入错误">
+                <i class="login-dig-icon-phone"></i>
+                <input autocomplete="off" name="verify_phone" type="tel" placeholder="输入手机号码" maxlength="11">
+            </div>
+            <div class="login-dig-input-box" data-error="图形验证码输入错误">
+                <i class="login-dig-icon-guard"></i>
+                <input autocomplete="off" name="verify_code" type="text" placeholder="输入图形验证码" maxlength="4">
+                <div class="after-input-box">
+                    <img data-name="verfiy-login" class="verify-img" src="/front/landpage/captcha" alt="verify">
+                </div>
+            </div>
+            <div class="login-dig-input-box" data-error="短信验证码输入错误">
+                <i class="login-dig-icon-guard"></i>
+                <input autocomplete="off" name="verify_sms" type="text" placeholder="输入短信验证码" maxlength="6">
+                <div class="after-input-box">
+                    <span data-name="verify_get_sms" class="l-get-sms is-stop">获取验证码</span>
+                </div>
+            </div>
+            <button class="login-dig-submit-button" name="verify_submit" disabled="true">立即绑定</button>
+        </div>
+    </div>
+</section>
+{{include "/common/pcbottom.html"}}
+{{include "/common/baiducc.html"}}
+<script type="text/javascript">
+  var myPageNavIsNormal = true;
+  $(function(){
+    haslogin({{.T.logid}});
+    window.isBindPage = true
+    window.getBindVerify()
+  });
+</script>
+</body>
+</html>

+ 335 - 0
src/web/templates/frontRouter/pc/userMerge/sess/merge.html

@@ -0,0 +1,335 @@
+<!DOCTYPE html>
+<html>
+<head>
+    <title>账号合并_剑鱼标讯,全行业招标信息智能推送领导者</title>
+    <meta content="IE=edge,Chrome=1" http-equiv="X-UA-Compatible"/>
+    <meta content="招标订阅,招标项目,中标项目,招标信息,剑鱼标讯" name="Keywords"/>
+    <meta content="使用剑鱼标讯,可以精准匹配招标信息,只需要微信关注剑鱼标讯公众号,然后自行设定所关注的招标关键词和地区,满足订阅需求的招标信息就会在两个小时内自动推送。" name="Description"/>
+    <meta content="webkit" name="renderer">
+    <meta content="账号合并" theme="light" name="enable-header"/>
+    <meta content="telephone=no" name="format-detection"/>
+    {{include "/common/pnc.html"}}
+    <link href='{{Msg "seo" "cdn"}}/css/reset.css?v={{Msg "seo" "version"}}' rel="stylesheet" type="text/css"/>
+    <link href='{{Msg "seo" "cdn"}}/pccss/reset_pc.css' rel="stylesheet" type="text/css"/>
+    <link href='{{Msg "seo" "cdn"}}/css/pc.css?v={{Msg "seo" "version"}}' rel="stylesheet"/>
+    <link href='{{Msg "seo" "cdn"}}/pccss/public-nav-1200.css?v={{Msg "seo" "version"}}' rel="stylesheet" type="text/css"/>
+    <link rel="stylesheet" type="text/css" href="{{Msg "seo" "cdn"}}/frontRouter/pc/merge/index.css?v={{Msg "seo" "version"}}" />
+</head>
+<body class="page--merge--index">
+{{include "/common/pchead.html"}}
+<div class="w-box page-container">
+    <div class="page-container" id="merge-page">
+        <div class="content-group" style="width: 100%">
+            <div class="title-group">
+                <h5>系统检测到:</h5>
+                <p>
+                    您同时拥有2个剑鱼标讯账号<span class="color--default">手机号:<span  data-fill-name="phone-name"></span></span>、<span class="color--default">微信号:<span  data-fill-name="wx-name"></span></span>,且都使用了剑鱼标讯中的功能。
+                    <br>
+                    为保证您的正常使用,请根据提示进行账号合并
+                </p>
+            </div>
+            <div class="flex-r-box">
+                <div class="card-group">
+                    <div class="text--title">微信账号</div>
+                    <div class="flex-r-box">
+                        <span>微信昵称:</span>
+                        <span class="color--default" data-fill-name="wx-name"></span>
+                    </div>
+                    <div class="flex-r-box">
+                        <span>注册日期:</span>
+                        <span class="color--default" data-fill-name="wx-rTime"></span>
+                    </div>
+                    <div class="flex-r-box">
+                        <span>上次登录日期:</span>
+                        <span class="color--default"  data-fill-name="wx-lTime"></span>
+                    </div>
+                </div>
+                <div class="card-group">
+                    <div class="text--title">手机账号</div>
+                    <div class="flex-r-box">
+                        <span>手机号:</span>
+                        <span class="color--default" data-fill-name="phone-name"></span>
+                    </div>
+                    <div class="flex-r-box">
+                        <span>注册日期:</span>
+                        <span class="color--default" data-fill-name="phone-rTime"></span>
+                    </div>
+                    <div class="flex-r-box">
+                        <span>上次登录日期:</span>
+                        <span class="color--default" data-fill-name="phone-lTime"></span>
+                    </div>
+                </div>
+            </div>
+
+            <div class="title-group">
+                <h5>账号合并:</h5>
+                <p data-merge-tip>请选择需要保留的功能或设置,合并后,账号将继承此次的选择,请慎重选择。</p>
+            </div>
+
+            <div style="display: none" id="template-box">
+                <div class="flex-r-box manual-merge-template" data-pick="0">
+                    <span>模板</span>
+                    <div><i class="icon-public icon-one"></i></div>
+                    <div><i class="icon-public icon-two"></i></div>
+                </div>
+                <div class="flex-r-box auto-merge-template"><span></span></div>
+            </div>
+
+            <div class="flex-r-box">
+                <div class="card-group merge-group pick-group"  data-merge-name="manual-merge">
+                    <div class="flex-r-box">
+                        <div class="text--title first-title">冲突功能</div>
+                        <div class="text--title">微信账号</div>
+                        <div class="text--title">手机账号</div>
+                    </div>
+                    <div class="tip-group">请选择需要保留的账号内容</div>
+                    <div class="flex-r-box" data-fill>
+                        <span data-fill-name="fill"></span>
+                        <div><span style="width: 2em;" data-fill-name="fill"></span></div>
+                        <div><span style="width: 2em;" data-fill-name="fill"></span></div>
+                    </div>
+                    <div class="flex-r-box" data-fill>
+                        <span data-fill-name="fill"></span>
+                        <div><span style="width: 2em;" data-fill-name="fill"></span></div>
+                        <div><span style="width: 2em;" data-fill-name="fill"></span></div>
+                    </div>
+                </div>
+                <div class="card-group merge-group" data-merge-name="auto-merge">
+                    <div class="text--title">合并内容</div>
+                    <div class="flex-r-box" data-fill><span data-fill-name="fill"></span></div>
+                    <div class="flex-r-box" data-fill><span data-fill-name="fill"></span></div>
+                </div>
+            </div>
+
+            <div class="flex-r-box footer-group">
+                <div class="flex-r-box merge-skip">
+                    <button id="merge-skip">暂不合并</button>
+                    <input type="checkbox" name="merge-tip" id="merge-tip" />
+                    <label for="merge-tip">不再提醒</label>
+                </div>
+                <button class="merge-submit" id="merge-submit">确认合并</button>
+            </div>
+        </div>
+        <!-- toast提示 -->
+        <div class="toast_div">
+            <div class="toast_content">
+                <span class="toast_icon"></span>
+                <span class="toast_text">合并成功</span>
+            </div>
+        </div>
+        <!--进行中提示-->
+        <div class="working">
+            <img style="width: 216px;margin: 45px auto;" src="/images/wx/working.gif">
+            <div style="color:#2cb7ca;">正在进行账号合并,请耐心等待,不要进行其他操作</div>
+        </div>
+    </div>
+</div>
+<script src='{{Msg "seo" "cdn"}}/js/jquery.cookie.js?v={{Msg "seo" "version"}}' type="text/javascript"></script>
+<script src='{{Msg "seo" "cdn"}}/js/public-nav.js?v={{Msg "seo" "version"}}' type="text/javascript"></script>
+<script>
+  $(function () {
+    haslogin({{.T.logid}});
+    (function () {
+        $('#merge-submit').prop('disabled', true)
+        $('#merge-skip').prop('disabled', true)
+        $.post('/jyMerge/usermerge/state?t=' + new Date().getTime(), {
+          token: getUrlParam('token')
+        }).done(function (r) {
+          $('#merge-submit').prop('disabled', false)
+          $('#merge-skip').prop('disabled', false)
+          console.log(r)
+          if (r.error_msg === '') {
+            initMerge(r.data)
+          }
+        }).fail(function () {
+            // getD()
+        })
+
+        function getD () {
+          var t =  {
+            "error_code": 0,
+            "error_msg": "",
+            "data": {
+              "needMerge": true,
+              "token": 'test',
+              "mergeItem": {
+                "普通订阅": 1
+              },
+              "phData": {
+                "phone": "17637190990",
+                "registDate": 1614071517,
+                "lastLogin": 1614071517,
+              },
+              "wxData": {
+                "name": "微ྂ信ྂ",
+                "registDate": 1611730403,
+                "lastLogin": -1,
+              }
+            }
+          }
+          setTimeout(() => {
+            initMerge(t.data)
+          }, parseInt((Math.random() * 4000) + 800))
+        }
+
+        function formatDateStr (number) {
+            if (number === -1) {
+              return '-'
+            } else {
+              return new Date(number * 1000).Format('yyyy-MM-dd')
+            }
+        }
+
+      var manualMerge = {}
+      var mergeToken = ''
+
+      function goBackOrigin (cb) {
+        var backOrigin = $.cookie('article')
+        if (backOrigin) {
+          location.replace(backOrigin)
+        } else {
+          typeof cb === 'function' ? cb() : window.close()
+        }
+      }
+
+      function initMerge(data) {
+          mergeToken = data.token
+          if (!data.needMerge) {
+            if (history.length === 1) {
+              goBackOrigin()
+            } else {
+              history.back()
+            }
+          }
+          // 账号信息展示
+          var info = {
+            wx: {
+              name: data.wxData.name,
+              rTime: formatDateStr(data.wxData.registDate),
+              lTime: formatDateStr(data.wxData.lastLogin)
+            },
+            phone: {
+              name: data.phData.phone,
+              rTime: formatDateStr(data.phData.registDate),
+              lTime: formatDateStr(data.phData.lastLogin)
+            }
+          }
+
+          changeText(info.wx, 'wx')
+          changeText(info.phone, 'phone')
+
+          // 账号合并信息
+          var features = data.mergeItem
+
+          for (var k in features) {
+            var nowV = features[k]
+            var type = 'manual-merge'
+            var tempDom = $('#template-box .manual-merge-template').clone()
+            manualMerge[k] = nowV
+
+            if (nowV === -1) {
+              tempDom = $('#template-box .auto-merge-template').clone()
+              type = 'auto-merge'
+              delete manualMerge[k]
+            }
+
+            tempDom.attr('data-pick', nowV)
+            tempDom.find('span').text(k)
+            $(".merge-group[data-merge-name='"+type+"']").append(tempDom)
+          }
+          initEventListener()
+          // 移除skeleton
+          $(".flex-r-box[data-fill]").remove()
+          // 隐藏区块
+          var autoDom = $(".merge-group[data-merge-name='auto-merge']")
+          if (autoDom.find('.auto-merge-template').length === 0) {
+            autoDom.remove()
+          }
+          var manualDom = $(".merge-group[data-merge-name='manual-merge']")
+          if (manualDom.find('.manual-merge-template').length === 0) {
+            manualDom.remove()
+            $('p[data-merge-tip]').hide()
+          }
+        }
+
+        // 账号信息展示
+        function changeText (obj, before) {
+          for (var k in obj) {
+            var tempDom = $('*[data-fill-name="'+before+'-'+k+'"]')
+            tempDom.text(obj[k]).removeAttr('data-fill-name')
+          }
+        }
+
+        // 选择事件
+        function initEventListener () {
+          $('.manual-merge-template').on('click', 'i', function () {
+            var nowIndex = $(this).parent().index()
+            var nowBox = $(this).parents('.manual-merge-template')
+            manualMerge[nowBox.text().trim()] = nowIndex - 1
+            nowBox.attr('data-pick', nowIndex - 1)
+          })
+        }
+
+        // 暂不合并
+        $('#merge-skip').on('click', ajaxDisable(sendSkip))
+        // 确认合并
+        $('#merge-submit').on('click', ajaxDisable(sendSubmit))
+
+        function ajaxDisable (f) {
+          return function () {
+            $(this).prop('disabled', true)
+            typeof f === 'function' ? f() : null
+          }
+        }
+
+        function sendSkip () {
+          var skipTip = $('#merge-tip').prop('checked')
+          console.log('跳过', skipTip)
+          $.post('/jypay/userMsg/neverRemind', {
+            merge_remind: skipTip
+          }).done(function (r) {
+            if (r.data.status === 1) {
+              if (history.length === 1) {
+                goBackOrigin()
+              } else {
+                history.back()
+              }
+            }
+          })
+        }
+        function sendSubmit () {
+          var params = {
+            token: mergeToken,
+            choose: ''
+          }
+          for (var k in manualMerge) {
+            if (params.choose !== '') {
+              params.choose += '#'
+            }
+            params.choose += k + '=' + manualMerge[k]
+          }
+          console.log('合并', params)
+          $("body").addClass('bg-white')
+          $.post('/jyMerge/usermerge/submit', params).done(function (r) {
+            if (r.data) {
+              $('.toast_div').fadeIn()
+              setTimeout(function(){
+                $('.toast_div').fadeOut()
+                if (history.length === 1) {
+                  goBackOrigin()
+                } else {
+                  history.back()
+                }
+              },2000)
+            }
+          })
+        }
+    })();
+  })
+</script>
+<!--S-百度统计-->
+{{include "/common/pcbottom.html"}}
+{{include "/common/baiducc.html"}}
+<!--E-百度统计-->
+</body>
+</html>

+ 1 - 1
src/web/templates/frontRouter/pc/xspc/sess/index.html

@@ -1,7 +1,7 @@
 <!DOCTYPE html>
 <html>
 <head>
-    <title>剑鱼文库_剑鱼标讯,全行业招标信息智能推送领导者</title>
+    <title>中标必听课_剑鱼标讯,全行业招标信息智能推送领导者</title>
     <meta content="IE=edge,Chrome=1" http-equiv="X-UA-Compatible"/>
     <meta content="招标订阅,招标项目,中标项目,招标信息,剑鱼标讯" name="Keywords"/>
     <meta content="使用剑鱼标讯,可以精准匹配招标信息,只需要微信关注剑鱼标讯公众号,然后自行设定所关注的招标关键词和地区,满足订阅需求的招标信息就会在两个小时内自动推送。" name="Description"/>

+ 267 - 0
src/web/templates/frontRouter/wx/userMerge/free/confirm.html

@@ -0,0 +1,267 @@
+<!DOCTYPE html>
+<html lang="zh-CN">
+
+<head>
+    <meta charset="utf-8">
+    <meta name="keywords" content="剑鱼标讯">
+    <meta name="description" content="剑鱼标讯">
+    <meta name="author" content="剑鱼标讯">
+    <meta http-equiv="X-UA-Compatible" content="IE=edge">
+    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no">
+    <meta name="browsermode" content="application">
+    <meta name="x5-orientation" content="portrait">
+    <meta name="screen-orientation" content="portrait">
+    <meta name="x5-page-mode" content="app">
+    <meta name="apple-mobile-web-app-capable" content="yes">
+    <meta name="apple-mobile-web-app-status-bar-style" content="black">
+    <meta name="format-detection" content="telephone=no">
+    <link rel="icon" href="/favicon.ico">
+    <title>提示</title>
+    <script src="/js/rem.js"></script>
+    <link rel="stylesheet" href=//cdn.jsdelivr.net/npm/reset-css@4.0.1/reset.min.css />
+    <link rel="stylesheet" href=//cdn.jsdelivr.net/npm/vant@2.8.2/lib/index.css />
+    <link rel="stylesheet" href=//cdn.jsdelivr.net/npm/vant@2.8.2/lib/icon/local.css />
+    <link rel="stylesheet" href='{{Msg "seo" "cdn"}}/big-member/weixin/css/public.css?v={{Msg "seo" "version"}}'>
+    <link rel="stylesheet" href='{{Msg "seo" "cdn"}}/big-member/weixin/css/j-icons.css?v={{Msg "seo" "version"}}'>
+    <link rel="stylesheet" href='{{Msg "seo" "cdn"}}/css/userMerge.css?v={{Msg "seo" "version"}}'>
+</head>
+
+<body>
+    <div class="j-container">
+        <div class="j-main" id="merge-confirm" v-cloak>
+            <div class="j-container">
+                <div class="j-header">
+                    <div class="concat">
+                        <span class="j-icon base-icon icon-tel-phone"></span>
+                        <span class="concat-text">如有疑问,请联系客服:400-108-6670</span>
+                        <div class="concat-notice" @click="noticeHandle">合并须知</div>
+                    </div>
+                </div>
+                <div class="j-main">
+                    <div class="user-info">
+                        <h2 class="user-info-title">账号合并:</h2>
+                        <div class="user-info-content">
+                            <span>请选择需要保留的功能或设置,合并后,账号将继承此次的选择,请慎重选择。</span>
+                        </div>
+                    </div>
+                    <div class="account-list">
+                        <!-- 冲突功能 -->
+                        <div class="list-item table" v-show="productions.conflict.length">
+                            <div class="list-row list-item-header">
+                                <div class="list-column">冲突功能</div>
+                                <div class="list-column">微信账号</div>
+                                <div class="list-column">手机账号</div>
+                            </div>
+                            <div class="list-tip-row">
+                                <div class="list-tip">请选择需要保留的账号内容</div>
+                            </div>
+                            <div class="list-item-content">
+                                <van-radio-group class="list-row" v-model="item.checked" class="list-row" v-for="(item, index) in productions.conflict" :key="index">
+                                    <div class="list-column">${item.name}</div>
+                                    <!-- wx=0, app=1 -->
+                                    <van-radio class="list-column" name="0" :checked-color="checkedColor"></van-radio>
+                                    <van-radio class="list-column" name="1" :checked-color="checkedColor"></van-radio>
+                                </van-radio-group>
+                            </div>
+                        </div>
+                        <!-- 合并内容 -->
+                        <div class="list-item table" v-show="productions.autoMerge.length">
+                            <div class="list-row list-item-header">
+                                <div class="list-column">合并内容</div>
+                                <div class="list-column"></div>
+                                <div class="list-column"></div>
+                            </div>
+                            <div class="list-item-content">
+                                <div class="list-row" v-for="(item, index) in productions.autoMerge" :key="index">
+                                    <div class="list-column">${item.name}</div>
+                                </div>
+                            </div>
+                        </div>
+                        <!-- 取消提示 -->
+                        <div class="reminder-container">
+                            <van-checkbox class="no-more-reminders" shape="square" icon-size="18px" :checked-color="checkedColor" v-model="neverRemind">不再提醒</van-checkbox>
+                            <div class="no-merge" @click="noMerge">暂不合并</div>
+                        </div>
+                    </div>
+                </div>
+                <div class="j-footer j-button-group">
+                    <button type="button" class="j-button-cancel" @click="prevStep">上一步</button>
+                    <button type="button" class="j-button-confirm" @click="confirmMerge">确认合并</button>
+                </div>
+            </div>
+        </div>
+    </div>
+
+    <!--S-当前页面的资源-->
+    <script src=//cdn.jsdelivr.net/npm/vue@2.6.11/dist/vue.min.js></script>
+    <script src=//cdn.jsdelivr.net/npm/vant@2.8.2/lib/vant.min.js></script>
+    <script src=//cdn.jsdelivr.net/npm/zepto@1.2.0/dist/zepto.min.js></script>
+    <script src='{{Msg "seo" "cdn"}}/big-member/js/utils.js?v={{Msg "seo" "version"}}'></script>
+    <script>
+        var vConf = {
+            delimiters: ['${', '}'],
+            el: '#merge-confirm',
+            data: {
+                neverRemind: false, // 不再提醒
+                checkedColor: '#2CB7CA',
+                token: '',
+                userName:{
+                    wx:'',
+                    phone:''
+                },
+                productions: {
+                    // checked: wx=0, app=1
+                    conflict: [
+                        // {
+                        //     name: '免费订阅',
+                        //     checked: '0'
+                        // }
+                    ],
+                    autoMerge: [
+                        // {
+                        //     name: '中标必听课'
+                        // }
+                    ]
+                }
+            },
+            created () {
+                this.token = utils.getParam('token')
+                this.getInfo()
+            },
+            methods: {
+                showLoading: function () {
+                    var loading = this.$toast.loading({
+                        duration: 0,
+                        forbidClick: true,
+                        message: 'loading...',
+                    })
+                    return loading
+                },
+                getInfo: function () {
+                    var _this = this
+                    var loading = this.showLoading()
+                    $.ajax({
+                        url: '/jyMerge/usermerge/state?t=' + Date.now(),
+                        type: 'POST',
+                        data: {
+                            token: _this.token
+                        },
+                        success:function (res) {
+                            if (res.error_msg == 0 && res.data) {
+                                if (res.data.needMerge) {
+                                    _this.setPageState(res.data)
+                                }
+                                if (res.data.token) {
+                                    _this.token = res.data.token
+                                }
+                            }
+                        },
+                        complete: function () {
+                            loading.clear()
+                        }
+                    })
+                },
+                neverRemindRequest: function (callback) {
+                    var _this = this
+                    var loading = this.showLoading()
+                    $.ajax({
+                        url: '/jypay/userMsg/neverRemind',
+                        type: 'POST',
+                        data: {
+                            merge_remind: _this.neverRemind
+                        },
+                        success:function (res) {
+                            if (res.error_msg == 0) {
+                                callback && callback()
+                            }
+                        },
+                        complete: function () {
+                            loading.clear()
+                        }
+                    })
+                },
+                confirmRequest: function (callback) {
+                    var _this = this
+                    var loading = this.showLoading()
+                    var choose = this.getSubmitInfo()
+                    $.ajax({
+                        url: '/jyMerge/usermerge/submit',
+                        type: 'POST',
+                        data: {
+                            token: _this.token,
+                            choose: choose.join('#')
+                        },
+                        success:function (res) {
+                            if (res.error_msg == 0) {
+                                callback && callback()
+                            }
+                        },
+                        complete: function () {
+                            loading.clear()
+                        }
+                    })
+                },
+                setPageState: function (data) {
+                    if (!data) return
+                    if (data.mergeItem) {
+                        for (var key in data.mergeItem) {
+                            if (data.mergeItem[key] == 0) {
+                                this.productions.conflict.push({
+                                    name: key,
+                                    checked: '0'
+                                })
+                            } else if (data.mergeItem[key] == 1) {
+                                this.productions.conflict.push({
+                                    name: key,
+                                    checked: '1'
+                                })
+                            } else if (data.mergeItem[key] == -1) {
+                                this.productions.autoMerge.push({
+                                    name: key
+                                })
+                            }
+                        }
+                    }
+                },
+                getSubmitInfo: function () {
+                    var arr = []
+                    this.productions.conflict.forEach(function (item, index) {
+                        arr.push(item.name + '=' + item.checked)
+                    })
+                    return arr
+                },
+                prevStep: function () {
+                    history.back()
+                },
+                noMerge: function () {
+                    // 暂不合并
+                    if (this.neverRemind) {
+                        this.neverRemindRequest(this.successCallback)
+                    } else {
+                        this.successCallback()
+                    }
+                },
+                confirmMerge: function () {
+                    this.confirmRequest(this.successCallback)
+                },
+                successCallback: function () {
+                    history.go(-2)
+                },
+                noticeHandle: function(){
+                    var html = '<p>合并须知:</p><p>1.账号合并为手机号和微信号进行合并绑定,两个账号内功能、剑鱼币、优惠券等均可合并。</p><p>2.账号信息将根据您选择的账号进行保留,未被选择的账号信息将被舍弃,请慎重选择。</p><p>3.账号合并后,您使用微信或手机号进行登录,将看到并使用相同的功能设置,共同使用账号内的功能、剑鱼币、优惠券等。</p><p>4.如您选择确认合并,则默认为您已阅读并同意此须知。</p>'
+                    this.$dialog.alert({
+                        width: 303,
+                        message: html,
+                        messageAlign:'left',
+                        className:'notice-dialog',
+                        confirmButtonText: '我知道了'
+                    })
+                }
+            }
+        }
+        var vm = new Vue(vConf)
+    </script>
+    {{include "/common/baiducc.html"}}
+</body>
+
+</html>

+ 109 - 142
src/web/templates/frontRouter/wx/userMerge/free/index.html

@@ -2,7 +2,6 @@
 <html lang="zh-CN">
 
 <head>
-    <!--引入公共资源头部-->
     <meta charset="utf-8">
     <meta name="keywords" content="剑鱼标讯">
     <meta name="description" content="剑鱼标讯">
@@ -18,7 +17,6 @@
     <meta name="format-detection" content="telephone=no">
     <link rel="icon" href="/favicon.ico">
     <title>提示</title>
-    <!--S-当前页面的css资源-->
     <script src="/js/rem.js"></script>
     <link rel="stylesheet" href=//cdn.jsdelivr.net/npm/reset-css@4.0.1/reset.min.css />
     <link rel="stylesheet" href=//cdn.jsdelivr.net/npm/vant@2.8.2/lib/index.css />
@@ -32,44 +30,39 @@
     <div class="j-container">
         <div class="j-main" id="merge-prompt" v-cloak>
             <div class="j-container">
-                <div class="j-main merge-main">
+                <div class="j-header">
                     <div class="concat">
-                        <div class="service">
-                            <span class="tel_phone"></span>
-                            <span class="tel-text">如有疑问,请联系客服:400-108-6670</span>
+                        <span class="j-icon base-icon icon-tel-phone"></span>
+                        <span class="concat-text">如有疑问,请联系客服:400-108-6670</span>
+                        <div class="concat-notice" @click="noticeHandle">合并须知</div>
+                    </div>
+                </div>
+                <div class="j-main">
+                    <div class="user-info">
+                        <h2 class="user-info-title">系统检测到:</h2>
+                        <div class="user-info-content">
+                            <span>您同时拥有<em>2</em>个剑鱼标讯账号</span>
+                            <span class="highlight-text">手机号:${userName.phone}</span>、
+                            <span class="highlight-text">微信号:${userName.wx}</span>
+                            <span>且都使用了剑鱼标讯中的功能。<br>为保证您的正常使用,请您根据提示进行账号合并。</span>
                         </div>
-                        <div class="notice" @click="noticeHandle">合并须知</div>
                     </div>
-                    <div class="content">
-                        <div class="system">
-                            <h2 class="system-title">系统检测到:</h2>
-                            <div class="system-content">
-                                您同时拥有<em>2</em>个剑鱼标讯账号<span style="color: #2ABED1;">手机号:${userName.phone}、微信号:${userName.wx}</span>,且都使用了剑鱼标讯中的功能。<br>为保证您的正常使用,请您选择保留任一账号中的设置信息。
-                            </div>
-                        </div> 
-                        <div class="account">
-                            <div class="set" v-for="item in account">
-                                <div class="set-header">
-                                    <div class="set-header-left">
-                                        <span :class="item.icon"></span>
-                                        <span class="set-header-title">${item.title}</span>
-                                        <span class="set-header-pay" v-show="item.isPay">存在付费功能</span>
-                                    </div>
-                                    <div class="set-radio" :class="item.isSelected ? 'icon-radio-success' : 'icon-radio-gray'" @click="selectedHandle(item)"></div>
+                    <div class="account-list">
+                        <div class="list-item" v-for="item in account" :key="item.id">
+                            <p class="list-header">${item.title}</p>
+                            <div class="list-content">
+                                <div class="list-content-item" v-for="(iitem, iindex) in item.info">
+                                    <span class="l-c-i-label">${iitem.label}:</span>
+                                    <span class="l-c-i-text ellipsis" :class="iindex == 0 ? 'highlight-text' : ''">${iitem.text}</span>
                                 </div>
-                                <ul class="set-main">
-                                    <li class="item-pay" v-for="sItem in item.list">${sItem}</li>
-                                </ul>
                             </div>
                         </div>
                     </div>
-                </div>
-                <div class="j-footer j-button-group">
-                    <button class="j-button-cancel" @click="cancelHandle">取消</button>
-                    <button class="j-button-confirm" @click="confirmHandle">立即合并</button>
+                    <div class="j-button-group um-confirm-container">
+                        <button type="button" class="j-button-confirm" @click="nextStep">下一步</button>
+                    </div>
                 </div>
             </div>
-            
         </div>
         
     </div>
@@ -80,11 +73,11 @@
     <script src=//cdn.jsdelivr.net/npm/zepto@1.2.0/dist/zepto.min.js></script>
     <script src='{{Msg "seo" "cdn"}}/big-member/js/utils.js?v={{Msg "seo" "version"}}'></script>
     <script>
-        var successIcon ='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAF1SURBVHgB7dfhjcIwDAVgj8AIHYFR2OBuBDaADXobtBswQkdghIzQEXyumkgook5BJCXu+6T+QhA/06YxEQAAAAAAAABAxZj5JJfj2SBXQ3vhw8cG2gMJepRrfNIAJuum2/zhto/dybJEeGd6D0iEH62HPyTCH8kqH/7Oy05kmQS8KeHPZJkE7JTwV8rB33Ktf+aGrZ4vWfdSPLxfuIsWG0s/Z5uF94sv+aECEuF7yo31HTfrpjM1WVn7RiXwfM52SiEXyoCfDzfB9KccqBTWT10fbwIrww1vdcQt1QS/zneFj4pzuZrANQw3K5rQ0hu4puHGF6u9HboXf6++4YbTQ8l0Zk/u1FzzcOOL14aT5OuKLQw3UmifaEKz8L1O+d6VaiIF/ylhXNwE3vJ8n8tU+JommAwfrGhCq3zekwWJJiwpM9yU8mITyg43pUio84rwzmT4QML9JsI3ZB3Ps/24y/ABzzN+OPIOuwoPAAAAAAAAAF/lHxGmEQRUlMs+AAAAAElFTkSuQmCC';
-        var vNode = {
+        var vConf = {
             delimiters: ['${', '}'],
             el: '#merge-prompt',
             data: {
+                token: '',
                 userName:{
                     wx:'',
                     phone:''
@@ -92,34 +85,48 @@
                 account:[
                     {
                         id: 1,
-                        icon:'wx-icon',
-                        title:'保留微信账号设置',
-                        list:[],
-                        isPay: false,
-                        isSelected:false,
+                        title:'微信账号',
+                        info: [
+                            {
+                                label: '微信昵称',
+                                text: ''
+                            },
+                            {
+                                label: '注册日期',
+                                text: ''
+                            },
+                            {
+                                label: '上次登录日期',
+                                text: ''
+                            }
+                        ]
                     },
                     {
                         id: 2,
-                        icon:'phone-icon',
-                        title:'保留手机账号设置',
-                        list:[],
-                        isPay: false,
-                        isSelected:false
+                        title:'手机账号',
+                        info: [
+                            {
+                                label: '手机号',
+                                text: ''
+                            },
+                            {
+                                label: '注册日期',
+                                text: ''
+                            },
+                            {
+                                label: '上次登录日期',
+                                text: ''
+                            }
+                        ]
                     }
-                ],
-                
-                token:''
-            },
-            computed: {
-                showKF:function() {
-                    return this.account.every(function(v){return v.isPay})
-                }
+                ]
             },
             created () {
-                this.getState()
+                this.token = utils.getParam('token')
+                this.getInfo()
             },
             methods: {
-                showLoading: function() {
+                showLoading: function () {
                     var loading = this.$toast.loading({
                         duration: 0,
                         forbidClick: true,
@@ -127,116 +134,76 @@
                     })
                     return loading
                 },
-                getState:function(){
+                getInfo: function () {
                     var _this = this;
-                    var data = utils.getParam('token') ? {
-                        token: utils.getParam('token')
-                    } : {}
+                    var loading = this.showLoading()
                     $.ajax({
-                        url:'/jypay/usermerge/state?t=' + Date.now(),
+                        url:'/jyMerge/usermerge/state?t=' + Date.now(),
                         type:'POST',
-                        data: data,
-                        success:function(res){
-                            if(res.data && res.data.needMerge){
-                                _this.userName.wx = res.data.name;
-                                _this.userName.phone = res.data.phone;
-                                _this.token = res.data.token;
-                                if(res.data.wxBuyed && res.data.wxBuyed.length > 0) {
-                                    _this.account[0].isPay = true
-                                    _this.account[0].list = res.data.wxBuyed
-                                }
-                                if(res.data.phBuyed && res.data.phBuyed.length > 0) {
-                                    _this.account[1].isPay = true
-                                    _this.account[1].list = res.data.phBuyed
+                        data: {
+                            token: _this.token
+                        },
+                        success:function (res) {
+                            if (res.error_msg == 0 && res.data) {
+                                if (res.data.needMerge) {
+                                    _this.setPageState(res.data)
                                 }
-                                // 两个账号都有付费业务,默认选中第一个;若只有一个账号有付费服务,选中有付费业务的
-                                if(_this.account[1].isPay && !_this.account[0].isPay) {
-                                    _this.account[1].isSelected = true
-                                } else {
-                                    _this.account[0].isSelected = true
+                                if (res.data.token) {
+                                    _this.token = res.data.token
                                 }
                             }
+                        },
+                        complete: function () {
+                            loading.clear()
                         }
                     })
                 },
-                selectedHandle: function(item) {
-                    var _this = this;
-                    if(item.isSelected) {
-                        return
+                setPageState: function (data) {
+                    if (!data) return
+                    this.userName.phone = data.phData.phone
+                    this.userName.wx = data.wxData.name
+                    // 微信信息
+                    if (data.wxData) {
+                        this.account[0].info[0].text = data.wxData.name
+                        this.account[0].info[1].text = new Date(data.wxData.registDate * 1000).pattern('yyyy-MM-dd')
+                        // lastLogin首次登录为-1
+                        if (data.wxData.lastLogin < 0) {
+                            this.account[0].info[2].text = ' - '
+                        } else {
+                            this.account[0].info[2].text = new Date(data.wxData.lastLogin * 1000).pattern('yyyy-MM-dd')
+                        }
+                    }
+                    // 手机号信息
+                    if (data.phData) {
+                        this.account[1].info[0].text = data.phData.phone
+                        this.account[1].info[1].text = new Date(data.phData.registDate * 1000).pattern('yyyy-MM-dd')
+                        if (data.phData.lastLogin < 0) {
+                            this.account[1].info[2].text = ' - '
+                        } else {
+                            this.account[1].info[2].text = new Date(data.phData.lastLogin * 1000).pattern('yyyy-MM-dd')
+                        }
                     }
-                    item.isSelected = true;
-                    item.id == 1 ? _this.account[1].isSelected = false : _this.account[0].isSelected = false;
-                },
-                cancelHandle: function() {
-                    window.history.back();
                 },
-                confirmHandle: function() {
-                    var _this = this;
-                    var _this = this;
-                    var title = _this.account[0].isSelected ? '微信账号' : '手机账号';
-                    var html = '<span style="color:#2ABED1">' + title + '</span>'
-                    _this.$dialog.confirm({
-                        className:'merge-dialog',
-                        width:303,
-                        message: '已阅读并认同合并须知,确定保留' + html  + '信息。',
-                        confirmButtonColor:'#2ABED1',
-                        confirmButtonText:'确定'
-                    })
-                    .then(function() {
-                        var loading = _this.showLoading()
-                        $.ajax({
-                            url:'/jypay/usermerge/submit',
-                            type:'post',
-                            data:{
-                                choose: _this.account[0].isSelected ? 1 : 2,
-                                token: _this.token
-                            },
-                            success: function(res) {
-                                if(res.data) {
-                                    loading.clear()
-                                    _this.$toast({
-                                        className:'merge-toast',
-                                        message: '合并成功',
-                                        icon: successIcon,
-                                        onClose:function() {
-                                            if(utils.getParam('from') == 'iframe') {
-                                                window.parent.postMessage({
-                                                    action: 'success'
-                                                }, location.origin)
-                                            } else {
-                                                history.back();
-                                            }
-                                        }
-                                    })
-                                } else {
-                                    loading.clear()
-                                    _this.$toast({
-                                        className:'merge-toast',
-                                        message: res.error_msg,
-                                    })
-                                }
-                            }
-                        })
-                    })
-                    .catch(function(){
-                        // on cancel
-                    })
+                nextStep: function () {
+                    var url = './confirm'
+                    if (this.token) {
+                        url = './confirm?token=' + this.token
+                    }
+                    location.href = url
                 },
-                noticeHandle: function(){
-                    var html = `合并须知:\n1.账号合并仅为手机号和微信进行合并绑定,两个账号信息、功能、积分、优惠券等不做合并。\n2.账号信息将根据您选择的账号进行保留,未被选择的账号信息将被舍弃,其账号内信息将无法找回,请慎重选择。\n3.账号合并后,您使用微信或手机号进行登录,将看到并使用相同的功能设置,共同使用账号内的权限、积分等。\n4.如您选择立即合并,则默认为您已阅读并同意此须知。`
+                noticeHandle: function () {
+                    var html = '<p>合并须知:</p><p>1.账号合并为手机号和微信号进行合并绑定,两个账号内功能、剑鱼币、优惠券等均可合并。</p><p>2.账号信息将根据您选择的账号进行保留,未被选择的账号信息将被舍弃,请慎重选择。</p><p>3.账号合并后,您使用微信或手机号进行登录,将看到并使用相同的功能设置,共同使用账号内的功能、剑鱼币、优惠券等。</p><p>4.如您选择确认合并,则默认为您已阅读并同意此须知。</p>'
                     this.$dialog.alert({
                         width: 303,
                         message: html,
                         messageAlign:'left',
                         className:'notice-dialog',
                         confirmButtonText: '我知道了'
-                    }).then(() => {
-                    // on close
-                    });
+                    })
                 }
             }
         }
-        var userMerge = new Vue(vNode)
+        var vm = new Vue(vConf)
     </script>
     {{include "/common/baiducc.html"}}
 </body>

+ 196 - 0
src/web/templates/login/bind.html

@@ -0,0 +1,196 @@
+<html>
+<head>
+    <title>注册</title>
+    <meta http-equiv="X-UA-Compatible" content="IE=edge,Chrome=1" />
+    <meta name="renderer" content="webkit">
+    <meta content="telephone=no" name="format-detection"/>
+    <meta content="light" theme="light" name="enable-header"/>
+    {{include "/common/pnc.html"}}
+    <link href="{{Msg "seo" "cdn"}}/css/pc.css?v={{Msg "seo" "version"}}" rel="stylesheet">
+    <link href="{{Msg "seo" "cdn"}}/css/dev2/reset_pc.css?v={{Msg "seo" "version"}}" rel="stylesheet">
+    <script src="{{Msg "seo" "cdn"}}/js/jquery.cookie.js"></script>
+  <link rel="stylesheet" type="text/css" href="{{Msg "seo" "cdn"}}/pccss/public-nav.css?v={{Msg "seo" "version"}}" />
+  <link rel="stylesheet" type="text/css" href="{{Msg "seo" "cdn"}}/pccss/public-nav-1200.css?v={{Msg "seo" "version"}}" />
+  <script type="text/javascript" src="{{Msg "seo" "cdn"}}/js/public-nav.js?v={{Msg "seo" "version"}}"></script>
+</head>
+<style>
+    .public-nav{
+        border-bottom: 1px solid #e0e0e0;
+    }
+    .register_page{
+        padding-top:76px;
+    }
+    .register_page>.login-dig-register-pass-box{
+        margin: 20px 0px 50px 0px;
+    }
+    .login-dig-register-pass-box {
+        display: flex;
+        flex-direction: column;
+        align-items: center;
+        font-family: Microsoft YaHei;
+        padding-bottom: 220px;
+    }
+
+    .login-dig-register-pass-box .register-step-title {
+        font-size: 14px;
+        line-height: 24px;
+        color: #999999;
+    }
+
+    .login-dig-register-pass-box .register-step-title div {
+        color: #1D1D1D;
+        font-size: 24px;
+        line-height: 36px;
+        text-align: left;
+        min-width: 340px;
+    }
+
+    .login-dig-register-pass-box .register-form-box {
+        margin-top: 32px;
+    }
+
+    .login-dig-register-pass-box .register-form-box .login-dig-input-box {
+        width: 340px;
+    }
+
+    .login-dig-register-pass-box .register-form-box button {
+        width: 340px;
+        margin-top: 32px;
+    }
+    .autocomplete-item {
+        position: relative;
+    }
+    .autocomplete-box {
+        display: none;
+        background: #fff;
+        position: absolute;
+        bottom: -213px;
+        left: 0;
+        width: 100%;
+        height: 205px;
+        max-height: 205px;
+        overflow: hidden;
+        overflow-y: auto;
+        z-index: 666;
+        box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.08);
+        border-radius: 8px;
+    }
+    .autocomplete-box li:hover {
+        background: #F6F6F6;
+    }
+    .autocomplete-box li:last-child {
+        border-bottom: none;
+    }
+    .autocomplete-box li {
+        width: 100%;
+        box-sizing: border-box;
+        color: #1D1D1D;
+        font-family: Microsoft YaHei;
+        font-size: 14px;
+        line-height: 24px;
+        letter-spacing: 0px;
+        text-align: left;
+        padding: 10px 20px;
+        border-bottom: 1px solid rgba(0, 0, 0, 0.05);
+        cursor: pointer;
+    }
+    .login-dig-submit-button:disabled {
+      background: #87DFEA;
+      border-color: #87DFEA;
+    }
+</style>
+<body>
+{{include "/common/pchead.html"}}
+<section class="register_page">
+    <div class="login-dig-success-toast">
+        <i class="login-dig-icon-success"></i>
+        <span>注册成功</span>
+    </div>
+    <div class="login-dig-register-pass-box">
+        <div class="register-step-title">
+            <div>注册</div>
+        </div>
+        <div class="login-dig-tabbar-content is-active" data-name="code" style="">
+            <div class="login-dig-input-box" data-error="手机号码输入错误">
+                <i class="login-dig-icon-phone"></i>
+                <input autocomplete="off" name="verify_phone" type="tel" placeholder="输入手机号码" maxlength="11">
+            </div>
+            <div class="login-dig-input-box" data-error="图形验证码输入错误">
+                <i class="login-dig-icon-guard"></i>
+                <input autocomplete="off" name="verify_code" type="text" placeholder="输入图形验证码" maxlength="4">
+                <div class="after-input-box">
+                    <img data-name="verfiy-login" class="verify-img" src="/front/landpage/captcha" alt="verify">
+                </div>
+            </div>
+            <div class="login-dig-input-box" data-error="短信验证码输入错误">
+                <i class="login-dig-icon-guard"></i>
+                <input autocomplete="off" name="verify_sms" type="text" placeholder="输入短信验证码" maxlength="6">
+                <div class="after-input-box">
+                    <span data-name="verify_get_sms" class="l-get-sms is-stop">获取验证码</span>
+                </div>
+            </div>
+            <button class="login-dig-submit-button" name="verify_submit" disabled="true">登录</button>
+        </div>
+    </div>
+</section>
+{{include "/common/pcbottom.html"}}
+{{include "/common/baiducc.html"}}
+<script type="text/javascript">
+  var myPageNavIsNormal = true;
+  $(function(){
+    haslogin({{.T.logid}});
+    /* S-企业联想 */
+    var beforeAjaxTime = null
+    var beforeName = ''
+    function ajaxMoreEntName (name) {
+      if (name === beforeName) {
+        return
+      }
+      beforeName = name
+      toggleShowAutoBox(true)
+      clearTimeout(beforeAjaxTime)
+      $(".autocomplete-box ul").html('<li>'+name+'</li>')
+      beforeAjaxTime = setTimeout(function () {
+        $.post('/jypay/user/company/association', {name: name}).done(function (r) {
+          console.log(r)
+          if (r && r.data) {
+            r.data.unshift(name)
+          } else {
+            r.data = [name]
+          }
+          $(".autocomplete-box ul").html( r.data.map(function (v) {
+            return '<li>'+v+'</li>'
+          }).join(''))
+        })
+      }, 300)
+    }
+    function toggleShowAutoBox (type) {
+      if (type) {
+        $(".autocomplete-box").show()
+      } else {
+        $(".autocomplete-box").hide()
+      }
+    }
+    $(".autocomplete-box ul").on('click', 'li', function () {
+      $("#register_entname").val($(this).text()).focus()
+      toggleShowAutoBox(false)
+    }).hover(function () {
+      $(this).addClass('is-hover')
+    }, function () {
+      $(this).removeClass('is-hover')
+    })
+    $("#register_entname").on('input', function () {
+      var e_input = $(this).val()
+      ajaxMoreEntName(e_input)
+    }).on('blur', function () {
+      setTimeout(function () {
+        if (!$(".autocomplete-box ul").hasClass('is-hover')) {
+          toggleShowAutoBox(false)
+        }
+      }, 300)
+    })
+    /* E-企业联想 */
+  });
+</script>
+</body>
+</html>

+ 30 - 21
src/web/templates/pc/createOrderPage.html

@@ -1,11 +1,11 @@
 <html lang="en">
 <head>
     <meta charset="UTF-8">
-    <meta name="viewport"
-          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
+    <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
     <meta http-equiv="X-UA-Compatible" content="ie=edge">
-    <link rel="stylesheet"
-          href="{{Msg "seo" "cdn"}}/dataExport/css/font_624651_bjdvktmum68.css?v={{Msg "seo" "version"}}">
+    <meta content="数据导出" theme="light" name="enable-header"/>
+    <meta content="615" name="data-backside"/>
+    <link rel="stylesheet" href="{{Msg "seo" "cdn"}}/dataExport/css/font_624651_bjdvktmum68.css?v={{Msg "seo" "version"}}">
     <link rel="stylesheet" href="{{Msg "seo" "cdn"}}/dataExport/css/reset_pc.css?v={{Msg "seo" "version"}}">
     <link rel="stylesheet" href="{{Msg "seo" "cdn"}}/dataExport/css/payment_order.css?v={{Msg "seo" "version"}}">
     <link rel="stylesheet" href="https://at.alicdn.com/t/font_624651_wz9gl1vebtf.css">
@@ -20,7 +20,6 @@
     <script src="//cdn.bootcss.com/jquery-confirm/3.1.0/jquery-confirm.min.js"></script>
     <script type="text/javascript" src="{{Msg "seo" "cdn"}}/js/public-nav.js?v={{Msg "seo" "version"}}"></script>
     <title>支付订单</title>
-    <meta content="数据导出" theme="light" name="enable-header"/>
     <style>
       #bidLogin.modal.in .modal-dialog {
          height: auto;
@@ -672,22 +671,7 @@
                                     $('#limitNum').modal('show');
                                     return
                                 }
-                                if (r.xlsxUrl.indexOf(".xlsx") > -1) {
-                                    $('#loadings').modal('hide');
-                                    // window.open(r.xlsxUrl);
-                                    var link = document.createElement("a");
-                                    link.href = r.xlsxUrl;
-                                    link.download = "搜索数据导出.xlsx";
-                                    document.body.appendChild(link);
-                                    link.click();
-                                    document.body.removeChild(link);
-                                    setTimeout(function(){
-                                         history.back();
-                                    },1000)
-                                }else{
-                                    alert("响应超时,请刷新后重试");
-                                    history.back();
-                                }
+                                exportXlsx()
                             },
                             error: function(){
                                 alert("系统响应超时,请刷新后重试");
@@ -856,6 +840,31 @@
         }
         return parseInt(Number(s1.replace(".", "")) * Number(s2.replace(".", "")) / Math.pow(10, m).toString() * 100) / Math.pow(10, 2);
     }
+    
+    //计时
+    var interval;
+    
+    function exportXlsx() {
+        if (interval) {
+            clearInterval(interval);
+        }
+        interval = setInterval(function () {
+            $.post("/front/entExportAuth/isEntExportSuccess", {}, function (r) {
+                console.log(r)
+                if (r.state) {
+                   var link = document.createElement("a");
+                   link.href = r.xlsxUrl;
+                   link.download = "搜索数据导出.xlsx";
+                   document.body.appendChild(link);
+                   link.click();
+                   document.body.removeChild(link);
+                   setTimeout(function(){
+                        history.back();
+                   },1000)
+                }
+            })
+        }, 3000);
+    }
 
         /******* 获取url参数(正则)********/
     function getParam(name) {

+ 3 - 1
src/web/templates/pc/index.html

@@ -247,8 +247,10 @@
 	</body>
 <script>
 $(function () {
+    // 处理低高度屏幕下无法显示下方文字
+    $('#index').css('min-height', document.documentElement.clientHeight + 'px')
     // 动态设置copyright
-    var copyright = '©2015-' + new Date().getFullYear() + ' jianyu360.com 版权所有&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;京ICP备14030217号-3'
+    var copyright = '©2015-' + new Date().getFullYear() + ' jianyu360.com 版权所有&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;' + '<a style="color: inherit; font-size: inherit;" href="https://beian.miit.gov.cn/" target="_blank">京ICP备14030217号-3</a>'
     $('.copyright').html(copyright)
     //弹窗
     if (times<1604505600000&&times>1604246400000){

+ 1 - 2
src/web/templates/pc/supsearch.html

@@ -7,6 +7,7 @@
 <meta name="renderer" content="webkit">
 <meta content="telephone=no" name="format-detection"/>
 <meta content="招标搜索" theme="light" name="enable-header"/>
+<meta content="330" name="data-backside"/>
 {{include "/common/pnc.html"}}
 <link href="{{Msg "seo" "cdn"}}/css/pc.css?v={{Msg "seo" "version"}}" rel="stylesheet">
 <link href="{{Msg "seo" "cdn"}}/css/dev2/reset_pc.css?v={{Msg "seo" "version"}}" rel="stylesheet">
@@ -989,8 +990,6 @@ $(function(){
 {{include "/common/pcbottom.html"}}
 {{include "/common/baiducc.html"}}
 <script type="text/javascript">
-// 侧边客服距离底部位置
-window.goBackTop_disBottom = 600
 $(function(){
     $(".shade_table .more").on('click', toPaydataExport)
 	$(".control-tabBtn>a").hover(function(){

+ 1 - 1
src/web/templates/structuredata/pc/index.html

@@ -2,7 +2,7 @@
 <head>
   <meta charset="UTF-8">
   <title>结构化数据_剑鱼标讯,全行业招标信息智能推送领导者!</title>
-    <meta content="数据" theme="light" name="enable-header"/>
+  <meta content="数据服务" theme="light" name="enable-header"/>
   {{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"}}" />

+ 11 - 0
src/web/templates/weixin/me/account/phone_bind.html

@@ -79,6 +79,14 @@
         .j-button-confirm {
             height: .92rem;
         }
+        .tip-text {
+            margin-top: .1rem;
+            padding: 0 .32rem;
+            text-align: center;
+            color: #5F5E64;
+            font-size: 12px;
+            line-height: 18px;
+        }
     </style>
 </head>
 <body>
@@ -146,6 +154,9 @@
                 <!-- <button class="j-button-cancel" @click="onCancel">取消</button> -->
                 <button class="j-button-confirm" @click="onSubmit" :disabled="confirmButtonDisabled">立即绑定</button>
             </div>
+            <div class="tip-text" v-if="showBottomTip">
+                您好,根据《中华人民共和国网络安全法》及相关法律规定,<br />请您填写正确的手机号进行认证,获取更多网络服务。
+            </div>
         </div>
         <div class="j-footer"></div>
     </div>

+ 2 - 2
src/web/templates/weixin/my.html

@@ -83,14 +83,14 @@
               </div>
             </div>
             <div class="main-list">
-<!--                <div class="menu-list" id="account-merge-box" style="display: none;">
+               <div class="menu-list" id="account-merge-box" style="display: none;">
                     <div class="menu-list-item account-merge">
                         <div class="m-l-i-left">
                             <span class="m-l-i-label">账号数据合并</span>
                         </div>
                         <a class="m-l-i-right clickable" href="/weixin/frontPage/userMerge/free/index">去合并</a>
                     </div>
-                </div>-->
+                </div>
                 <div class="menu-list">
                     <div class="menu-list-item clickable" id="vip-sub">
                         <div class="m-l-i-left">