zhangxinlei1996 5 lat temu
rodzic
commit
e779e28505

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

@@ -322,6 +322,12 @@ func (w *WsDataExport) ToCreateOrderPage() error {
 	w.T["PreviewData"] = util.IntAll(redis.Get("other", incurKey))
 
 	w.T["signature"] = wx.SignJSSDK(w.Site() + w.Url())
+	//字段包
+	spec := w.GetString("dataspec")
+	if spec != "" {
+		w.T["dataspec"] = spec
+	}
+
 	w.Render("/weixin/dataExport/dataExport_payOrder.html", &w.T)
 	return nil
 }

+ 10 - 1
src/jfw/front/wx_dataExport.go

@@ -52,7 +52,7 @@ func (w *WxDataExport) ToSieve() error {
 			"user_id":    myUserId,
 		}
 		if orderCode != "" {
-			orderDetail = *public.Mysql.FindOne("dataexport_order", queryMap, "filter", "")
+			orderDetail = *public.Mysql.FindOne("dataexport_order", queryMap, "filter,data_spec", "")
 		}
 		if orderDetail["filter"] != nil {
 			err := json.Unmarshal([]byte(orderDetail["filter"].(string)), &filter)
@@ -62,6 +62,15 @@ func (w *WxDataExport) ToSieve() error {
 				log.Println("筛选条件-关键词-结构体反序列化-错误", err)
 			}
 		}
+		//记录用户上次选择的字段包   1 标准 2 高级
+		if orderDetail["data_spec"] != nil {
+			if orderDetail["data_spec"] == "标准字段包" {
+				orderDetail["data_spec"] = "1"
+			} else if orderDetail["data_spec"] == "高级字段包" {
+				orderDetail["data_spec"] = "2"
+			}
+		}
+
 		w.T["orderDetail"] = orderDetail
 	}
 	//分享

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

@@ -51,7 +51,7 @@ func (w *WxDataExport) ToSieve() error {
 			"user_id":    myUserId,
 		}
 		if orderCode != "" {
-			orderDetail = *public.Mysql.FindOne("dataexport_order", queryMap, "filter,pay_way", "")
+			orderDetail = *public.Mysql.FindOne("dataexport_order", queryMap, "filter,pay_way,data_spec", "")
 		}
 		log.Println("-:", orderDetail)
 		if orderDetail["filter"] != nil {
@@ -71,6 +71,14 @@ func (w *WxDataExport) ToSieve() error {
 				orderDetail["pay_way"] = "ali"
 			}
 		}
+		//记录用户上次选择的字段包   1 标准 2 高级
+		if orderDetail["data_spec"] != nil {
+			if orderDetail["data_spec"] == "标准字段包" {
+				orderDetail["data_spec"] = "1"
+			} else if orderDetail["data_spec"] == "高级字段包" {
+				orderDetail["data_spec"] = "2"
+			}
+		}
 		w.T["orderDetail"] = orderDetail
 	}
 	if myUserId == "" {

+ 5 - 0
src/jfw/modules/app/src/app/front/ws_dataExport.go

@@ -305,6 +305,11 @@ func (w *WsDataExport) ToCreateOrderPage() error {
 	if payway != "" {
 		w.T["payway"] = payway
 	}
+	//字段包
+	spec := w.GetString("dataspec")
+	if spec != "" {
+		w.T["dataspec"] = spec
+	}
 	w.T["_id"] = w.GetString("id")
 	w.T["msgCount"] = msgCount                                                                                      //信息总量
 	w.T["msgMaxCount"] = public.ExConf.MsgMaxCount                                                                  //规定信息最大总量

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

@@ -914,7 +914,7 @@
                 dataType: 'json',
                 success: function(data){
                     if(data._id!==""){
-                        window.location.href="/jyapp/front/dataExport/toCreateOrderPage?id="+data._id+"&source=d&payway="+onceDetail["pay_way"];
+                        window.location.href="/jyapp/front/dataExport/toCreateOrderPage?id="+data._id+"&source=d&payway="+onceDetail["pay_way"]+"&dataspec="+onceDetail["data_spec"];
                     }
                 }
             })

+ 14 - 0
src/jfw/modules/app/src/web/templates/dataExport/dataExport_payOrder.html

@@ -254,6 +254,7 @@
 			var previewDataTime = {{.T.PreviewData}}
 			var phone_lastInput = {{.T.phone}}
 			var payway ={{.T.payway}}
+			var dataspec={{.T.dataspec}}
 			//可以支付
 			var canpay = true;
 			//订单编号
@@ -338,6 +339,19 @@
 						sessionStorage.pay_way="wx_app"
 					}
 				}
+				//记录用户上次选择的字段包  1标准2高级
+				if(dataspec){
+					if(dataspec=="1"){
+						$(".choose").children().eq(0).addClass("active");
+						$(".choose").children().eq(1).removeClass("active");
+						dataType=1;
+					}else if(dataspec=="2"){
+						$(".choose").children().eq(1).addClass("active");
+						$(".choose").children().eq(0).removeClass("active");
+						dataType=2;
+					}
+					ChangePayMoney();
+				}
 				
 				if(sessionStorage.index=="1"){
             		$(".choose .choose-item").eq(sessionStorage.index).addClass("active").siblings().removeClass("active");

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

@@ -855,7 +855,7 @@
                 dataType: 'json',
                 success: function(data){
                     if(data._id!==""){
-                        window.location.href="/weixin/pay/dataexport?id="+data._id+"&source=d"
+                        window.location.href="/weixin/pay/dataexport?id="+data._id+"&source=d&dataspec="+onceDetail["data_spec"];
                     }
                 }
             })

+ 18 - 1
src/web/templates/weixin/dataExport/dataExport_payOrder.html

@@ -256,6 +256,7 @@
 			var email_lastVerity={{.T.timeSpaceing}}
 			var previewDataTime={{.T.PreviewData}}
 			var phone_lastInput={{.T.phone}}
+			var dataspec={{.T.dataspec}}
 			//可以支付
 			var canpay=true;
 			//订单编号
@@ -305,8 +306,24 @@
 				}
 				window.location.href="/front/staticPage/wx-serviceterms.html";
 			}
+			
+			
 			//
-            $(function() {			
+            $(function() {		
+            	//记录用户上次选择的字段包  1标准2高级
+				if(dataspec){
+					if(dataspec=="1"){
+						$(".choose").children().eq(0).addClass("active");
+						$(".choose").children().eq(1).removeClass("active");
+						dataType=1;
+					}else if(dataspec=="2"){
+						$(".choose").children().eq(1).addClass("active");
+						$(".choose").children().eq(0).removeClass("active");
+						dataType=2;
+					}
+					ChangePayMoney();
+				}
+            	
             	if(sessionStorage.index=="1"){
             		$(".choose .choose-item").eq(sessionStorage.index).addClass("active").siblings().removeClass("active");
             		dataType=2;