|
@@ -330,6 +330,16 @@
|
|
|
text-align: center;
|
|
|
display: none;
|
|
|
}
|
|
|
+ .gopay_btn{
|
|
|
+ width: 2.18rem;
|
|
|
+ height: .72rem;
|
|
|
+ line-height: .73rem;
|
|
|
+ text-align: center;
|
|
|
+ border-radius: 0.05rem;
|
|
|
+ font-size: .28rem;
|
|
|
+ background:#2cb7ca;
|
|
|
+ color:#fff;
|
|
|
+ }
|
|
|
</style>
|
|
|
<!-- 加载数据-->
|
|
|
<div class="loading_">
|
|
@@ -394,6 +404,7 @@
|
|
|
<div style="display: none;" class="param_dataType"></div>
|
|
|
<div style="display: none;" class="param_id"></div>
|
|
|
<div style="display: none;" class="this"></div>
|
|
|
+ <div style="display: none;" class="order_code_vip"></div>
|
|
|
</div>
|
|
|
<!--确认支付 -->
|
|
|
<div class="surePay">
|
|
@@ -439,23 +450,23 @@
|
|
|
function appendList(listhtml){
|
|
|
listhtml.children(".card-content").on("click", function(event){
|
|
|
var eid = $(this).find(".media").attr("eid");
|
|
|
- beforeJump(eid,this);
|
|
|
+ var isVipOrder =$(this).find(".media").attr("isvipOrder");
|
|
|
+ beforeJump(eid,isVipOrder);
|
|
|
});
|
|
|
$(".card_lists").append(listhtml);
|
|
|
}
|
|
|
|
|
|
- function beforeJump(eid,e){
|
|
|
+ function beforeJump(eid,isVipOrder){
|
|
|
setSessionStorage();
|
|
|
- window.location.href="/jyapp/front/myOrder/toOrderDetail?orderCode="+eid;
|
|
|
+ if (isVipOrder=="true"){
|
|
|
+ window.location.href="/weixin/pay/toOrderDetailPage?orderCode="+eid;
|
|
|
+ }else{
|
|
|
+ window.location.href="/jyapp/front/myOrder/toOrderDetail?orderCode="+eid;
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
function setSessionStorage(){
|
|
|
if(sessionStorage){
|
|
|
-// sessionStorage.orderDataCache = JSON.stringify(dataCache);
|
|
|
-// sessionStorage.orderPageIndexCache = pageIndex;
|
|
|
-// sessionStorage.orderHasNextPage = hasNextPage;
|
|
|
-// sessionStorage.orderCount = count;
|
|
|
-// sessionStorage.orderScrollTop =scrollTop;
|
|
|
sessionStorage.orderTabActive=$("ul .active").index();
|
|
|
}
|
|
|
}
|
|
@@ -479,7 +490,7 @@
|
|
|
action: function() {
|
|
|
$.ajax({
|
|
|
type: "post",
|
|
|
- url: "/jyapp/front/myorder/deleteOrder",
|
|
|
+ url: "/subscribepay/orderListDetails/deleteOrder",
|
|
|
data: {"id":id,"pageNum":pageIndex,"type":typ},
|
|
|
dataType: 'json',
|
|
|
success: function(data){
|
|
@@ -516,6 +527,7 @@
|
|
|
$(".card_lists").append(nodataHtml);
|
|
|
$(".dropload-down").hide();
|
|
|
}else{//删除一条数据 往后铺一条数据
|
|
|
+ /*
|
|
|
var listhtml=""
|
|
|
var oneD=data.res;
|
|
|
for(var index in oneD){
|
|
@@ -596,9 +608,6 @@
|
|
|
var keysLen = keysArr.length;for(var j=0;j<keysLen;j++){
|
|
|
keysHtml += "<span>" + keysArr[j] + " </span>";
|
|
|
}
|
|
|
-// if(keysArr.length>2){
|
|
|
-// keysHtml += "<span>...</span>";
|
|
|
-// }
|
|
|
}else{
|
|
|
keysHtml=""
|
|
|
}
|
|
@@ -628,9 +637,10 @@
|
|
|
+'</div>'
|
|
|
|
|
|
}
|
|
|
- //$(".card_lists").append(listhtml);
|
|
|
+ */
|
|
|
+ structureHtml(data.res);
|
|
|
//删除完成后补的订单仍可点击
|
|
|
- appendList($(listhtml))
|
|
|
+ //appendList($(listhtml))
|
|
|
}
|
|
|
|
|
|
}
|
|
@@ -669,11 +679,10 @@
|
|
|
action: function() {
|
|
|
$.ajax({
|
|
|
type: "post",
|
|
|
- url: "/jyapp/front/myorder/deleteOrder",
|
|
|
+ url: "/subscribepay/orderListDetails/deleteOrder",
|
|
|
data: {"id":id,"pageNum":pageIndex,"type":typ,"cancel":"cancel"},
|
|
|
dataType: 'json',
|
|
|
success: function(data){
|
|
|
- console.log(typ)
|
|
|
if(data && data["success"]){
|
|
|
$.alert({
|
|
|
title:"提示信息",
|
|
@@ -690,7 +699,16 @@
|
|
|
var self = $(obj).parent(".card-footer").prev(".card-content").prev(".card-header").children(".notpay");
|
|
|
self.text("已取消");
|
|
|
self.css("color","black");
|
|
|
- $(obj).parent(".card-footer").html('<a href="/jyapp/front/dataExport/toSieve" class="btn cancle">再次购买</a>')
|
|
|
+ var isVipOrder =$(obj).parent(".card-footer").prev(".card-content").children(".media").attr("isvipOrder");
|
|
|
+ console.log(isVipOrder)
|
|
|
+ if(isVipOrder!="true"){
|
|
|
+ $(obj).parent(".card-footer").html('<a href="/jyapp/front/dataExport/toSieve" class="btn cancle">再次购买</a>')
|
|
|
+ }else {
|
|
|
+ $(obj).parent().parent().remove();
|
|
|
+ $(".card_lists").empty();
|
|
|
+ queryOrder($("ul .active").index());
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -772,37 +790,56 @@
|
|
|
//确认支付
|
|
|
$(".surePay").on("click", function() {
|
|
|
$(".loading_").show();
|
|
|
- canpay = false;
|
|
|
- var param = {};
|
|
|
- var dataType=$(".param_dataType").text();
|
|
|
- param.pay_way = pay_way;
|
|
|
- param.data_spec = dataType == "2" ? "senior" : "standard";
|
|
|
- param.id = $(".param_id").text();
|
|
|
- param.sourcePage = "weixin"
|
|
|
- //先去创建预支付订单
|
|
|
- $.post("/jypay/dataExport/app/createOrder", param, function(data) {
|
|
|
- if (data.success){
|
|
|
- try {
|
|
|
- console.log(typ)
|
|
|
- if(pay_way=="wx_app"){
|
|
|
- JyObj.wxPay(data.data)
|
|
|
- }else{
|
|
|
- JyObj.aliPay(data.data)
|
|
|
- }
|
|
|
- $('.pay_way').hide(200)
|
|
|
- checkPaySuccess(data.order);
|
|
|
- } catch (e) {
|
|
|
- alert(e)
|
|
|
+ let isvip_order=$(".media").attr("isviporder");
|
|
|
+ //vip支付;
|
|
|
+ if (isvip_order=="true"){
|
|
|
+ var orderCode =$(e).attr("orderCode");
|
|
|
+ if(!canpay)return
|
|
|
+ canpay=false;
|
|
|
+ $.post("/subscribepay/vipsubscribe/orderToPay",{"orderCode":orderCode},function(r){
|
|
|
+ if(r.success){
|
|
|
+ if(pay_way=="wx_app"){
|
|
|
+ JyObj.wxPay(r.data.res);
|
|
|
+ }else{
|
|
|
+ JyObj.aliPay(r.data.res);
|
|
|
+ }
|
|
|
+ $('.pay_way').hide(200)
|
|
|
+ checkPaySuccess_vip(data.order);
|
|
|
+ }else{
|
|
|
+ canpay=true;
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }else{ //移动端数据导出支付;
|
|
|
+ //canpay = false;
|
|
|
+ var param = {};
|
|
|
+ var dataType=$(".param_dataType").text();
|
|
|
+ param.pay_way = pay_way;
|
|
|
+ param.data_spec = dataType == "2" ? "senior" : "standard";
|
|
|
+ param.id = $(".param_id").text();
|
|
|
+ param.sourcePage = "weixin"
|
|
|
+ //先去创建预支付订单
|
|
|
+ $.post("/jypay/dataExport/app/createOrder", param, function(data) {
|
|
|
+ if (data.success){
|
|
|
+ try {
|
|
|
+ if(pay_way=="wx_app"){
|
|
|
+ JyObj.wxPay(data.data)
|
|
|
+ }else{
|
|
|
+ JyObj.aliPay(data.data)
|
|
|
+ }
|
|
|
+ $('.pay_way').hide(200)
|
|
|
+ checkPaySuccess(data.order);
|
|
|
+ } catch (e) {
|
|
|
+ alert(e)
|
|
|
+ }
|
|
|
}
|
|
|
- }
|
|
|
- $(".loading_").hide();
|
|
|
- canpay = true;
|
|
|
- })
|
|
|
-
|
|
|
+ $(".loading_").hide();
|
|
|
+ //canpay = true;
|
|
|
+ })
|
|
|
+ }
|
|
|
})
|
|
|
|
|
|
var interval
|
|
|
- //支付完成跳转
|
|
|
+ //支付完成跳转 --移动端数据导出
|
|
|
function checkPaySuccess(orderCode){
|
|
|
if(interval){
|
|
|
clearInterval(interval);
|
|
@@ -828,111 +865,28 @@
|
|
|
},3000)
|
|
|
$(".loading_").hide();
|
|
|
}
|
|
|
+
|
|
|
+ var interval_vip
|
|
|
+ //支付完成跳转 VIP订单
|
|
|
+ function checkPaySuccess_vip(order_vipcode){
|
|
|
+ if(interval_vip){
|
|
|
+ clearInterval(interval_vip)
|
|
|
+ }
|
|
|
+ $(".loading_").show();
|
|
|
+ interval_vip=setInterval(function(){
|
|
|
+ $.post("jyapp/isPaySuccess",{code:order_vipcode},function(r){
|
|
|
+ if(r.success){
|
|
|
+ clearInterval(interval_vip);
|
|
|
+ $(".loading_").hide();
|
|
|
+ setSessionStorage();
|
|
|
+ window.location.href="/jyapp/vipsubscribe/toPaySuccessPage?orderCode="+order_vipcode;
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },3000)
|
|
|
+ $(".loading_").hide();
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
-
|
|
|
-// //缓存
|
|
|
-// if(sessionStorage && sessionStorage.orderScrollTop && sessionStorage.orderDataCache){
|
|
|
-// pageIndex = sessionStorage.orderPageIndexCache;
|
|
|
-// hasNextPage = sessionStorage.orderHasNextPage=="true"?true:false;
|
|
|
-// scrollTop = sessionStorage.orderScrollTop;
|
|
|
-// dataCache = JSON.parse(sessionStorage.orderDataCache);
|
|
|
-// orderTabActive=sessionStorage.orderTabActive;
|
|
|
-// $(".card_lists").empty();
|
|
|
-// structureHtml(dataCache);
|
|
|
-// //app 我的订单 全部 更新样式 (不更新缓存)
|
|
|
-// if(sessionStorage.getItem("payMsg")){
|
|
|
-// var payOrderArr = JSON.parse(sessionStorage.getItem("payMsg"));
|
|
|
-// var deleteId =sessionStorage.getItem("deleteIndex");
|
|
|
-// for (var i=0;i< payOrderArr.length;i++){
|
|
|
-// if(sessionStorage.getItem("deleteIndex")){
|
|
|
-// if(deleteId<payOrderArr[i]){
|
|
|
-// payOrderArr[i]=payOrderArr[i]-1;
|
|
|
-// }
|
|
|
-// }
|
|
|
-// $(".card").eq(payOrderArr[i]).children(".card-header").children(".status").html('<span class="status " style="color:#1d1d1d">已完成</span>');
|
|
|
-// $(".card").eq(payOrderArr[i]).children(".card-footer").html('<a href="/jyapp/front/dataExport/toSieve" class="btn cancle">再次购买</a>');
|
|
|
-// }
|
|
|
-// //重新存一下 新索引
|
|
|
-// sessionStorage.setItem("payMsg",JSON.stringify(payOrderArr));
|
|
|
-// }
|
|
|
-// //订单详情页 获取到id(订单编号) 如果有 进行操作 改变样式
|
|
|
-// if(sessionStorage.getItem("payoffId")){
|
|
|
-// if(orderTabActive==0){
|
|
|
-// $(".media").each(function(){
|
|
|
-// if($(this).attr("eid")==sessionStorage.getItem("payoffId")){
|
|
|
-// $(this).parents(".card").children(".card-header").children(".status").html('<span class="status " style="color:#1d1d1d">已完成</span>');
|
|
|
-// $(this).parents(".card").children(".card-footer").html('<a href="/jyapp/front/dataExport/toSieve" class="btn cancle">再次购买</a>');
|
|
|
-// }
|
|
|
-// });
|
|
|
-// }else if(orderTabActive==1){
|
|
|
-// $(".media").each(function(){
|
|
|
-// if($(this).attr("eid")==sessionStorage.getItem("payoffId")){
|
|
|
-// $(this).parents(".card").remove();
|
|
|
-// var payoffIdIndex=$(this).parents(".card").index();
|
|
|
-// typ=1;
|
|
|
-// getOneMore(payoffIdIndex);
|
|
|
-// }
|
|
|
-// });
|
|
|
-// }
|
|
|
-//
|
|
|
-//
|
|
|
-// }
|
|
|
-// $(".buttons-tab .tab-link").eq(orderTabActive).addClass("active").siblings().removeClass("active");
|
|
|
-// if(hasNextPage){
|
|
|
-// wxflag = $('#order_list > .main > .tabs').dropload({
|
|
|
-// scrollArea : window,
|
|
|
-// loadUpFn:function(me){
|
|
|
-// reloadFirstPage(me,orderTabActive);
|
|
|
-// },
|
|
|
-// loadDownFn : function(me){
|
|
|
-// $.ajax({
|
|
|
-// type: 'post',
|
|
|
-// url: '/jyapp/front/myOrder/queryMyOrder/myOrderPaging',
|
|
|
-// data: {"pageNum": pageIndex,"type":orderTabActive},
|
|
|
-// dataType: 'json',
|
|
|
-// success: function(data){
|
|
|
-// //没有数据
|
|
|
-// if(data.res==null||data.res.length==0){
|
|
|
-// noMoreData(me);
|
|
|
-// }else{
|
|
|
-// //dataCache =data.res;
|
|
|
-// dataCache=dataCache.concat(data.res);
|
|
|
-// pageIndex++;
|
|
|
-// structureHtml(data.res);
|
|
|
-// if(data.hasNextPage){
|
|
|
-// // 每次数据插入,必须重置
|
|
|
-// me.resetload();
|
|
|
-// }else{
|
|
|
-// noMoreData(me);
|
|
|
-// }
|
|
|
-// }
|
|
|
-// },
|
|
|
-// error: function(xhr, type){
|
|
|
-// noMoreData(me);
|
|
|
-// }
|
|
|
-// });
|
|
|
-// }
|
|
|
-// });
|
|
|
-// }else{
|
|
|
-// wxflag = $('.tabs').dropload({
|
|
|
-// scrollArea : window,
|
|
|
-// loadDownFn : function(me){
|
|
|
-// if(wxflag == null){
|
|
|
-// wxflag = me;
|
|
|
-// }
|
|
|
-// noMoreData(me);
|
|
|
-// }
|
|
|
-// });
|
|
|
-// noMoreData(wxflag);
|
|
|
-// }
|
|
|
-// $("body").scrollTop(scrollTop);
|
|
|
-// sessionStorage.removeItem("orderPageIndexCache");
|
|
|
-// sessionStorage.removeItem("orderHasNextPage");
|
|
|
-// sessionStorage.removeItem("orderScrollTop");
|
|
|
-// sessionStorage.removeItem("orderDataCache");
|
|
|
-// sessionStorage.removeItem("orderCount");
|
|
|
-// sessionStorage.removeItem("orderTabActive");
|
|
|
-// }else{
|
|
|
if(sessionStorage.orderTabActive){
|
|
|
$(".buttons-tab .tab-link").eq(sessionStorage.orderTabActive).addClass("active").siblings().removeClass("active");
|
|
|
queryOrder(sessionStorage.orderTabActive);
|
|
@@ -940,19 +894,18 @@
|
|
|
}else{
|
|
|
queryOrder();
|
|
|
}
|
|
|
-
|
|
|
- //}
|
|
|
+
|
|
|
+ })
|
|
|
+
|
|
|
+
|
|
|
/*------------------------------------------------------------------*/
|
|
|
//查询订单ajax
|
|
|
//typ 0全部 1未支付 2已支付3已取消
|
|
|
function queryOrder(typ){
|
|
|
-// sessionStorage.removeItem("payMsg");
|
|
|
-// sessionStorage.removeItem("deleteIndex");
|
|
|
-// sessionStorage.removeItem("payoffId");
|
|
|
var result = true;
|
|
|
$.ajax({
|
|
|
type:"post",
|
|
|
- url:"/jyapp/front/myOrder/queryMyOrder",
|
|
|
+ url:"/subscribepay/orderListDetails/myOrder",
|
|
|
data:{
|
|
|
"type":typ
|
|
|
},
|
|
@@ -989,7 +942,7 @@
|
|
|
loadDownFn : function(me){
|
|
|
$.ajax({
|
|
|
type: 'post',
|
|
|
- url: '/jyapp/front/myOrder/queryMyOrder/myOrderPaging',
|
|
|
+ url: '/subscribepay/orderListDetails/myOrderPaging',
|
|
|
data: {"pageNum": pageIndex,"type":typ},
|
|
|
dataType: 'json',
|
|
|
success: function(data){
|
|
@@ -997,7 +950,6 @@
|
|
|
if(data.res==null||data.res.length==0){
|
|
|
noMoreData(me);
|
|
|
}else{
|
|
|
- console.log(data.res)
|
|
|
dataCache=dataCache.concat(data.res);
|
|
|
pageIndex++;
|
|
|
structureHtml(data.res);
|
|
@@ -1032,9 +984,77 @@
|
|
|
}
|
|
|
|
|
|
}
|
|
|
+
|
|
|
+ var this_e=""
|
|
|
+ //选择
|
|
|
+ function choosePayWay(orderMoney,param_dataType,param_id,e){
|
|
|
+ $(".pay_way").show();
|
|
|
+ $(".money_pay").text("¥"+orderMoney);
|
|
|
+ $(".param_dataType").text(param_dataType);
|
|
|
+ $(".param_id").text(param_id);
|
|
|
+ if(localStorage.getItem(param_id)=="wx"){
|
|
|
+ $("#wx").prop("checked",true);
|
|
|
+ $("#zfb").prop("checked",false);
|
|
|
+ pay_way="wx_app";
|
|
|
+ }else if(localStorage.getItem(param_id)=="ali"){
|
|
|
+ pay_way="ali_app";
|
|
|
+ $("#zfb").prop("checked",true);
|
|
|
+ $("#wx").prop("checked",false);
|
|
|
+ }else{
|
|
|
+ //不是在app生成的订单 默认为微信
|
|
|
+ $("#wx").prop("checked",true);
|
|
|
+ $("#zfb").prop("checked",false);
|
|
|
+ pay_way="wx_app";
|
|
|
+ }
|
|
|
+ this_e=e;
|
|
|
+ }
|
|
|
+ //vip付款 弹窗
|
|
|
+ function choosePayWay_vip(orderMoney,orderCode,e){
|
|
|
+ $(".pay_way").show();
|
|
|
+ $(".money_pay").text("¥"+orderMoney);
|
|
|
+ $(".order_code_vip").text(orderCode)
|
|
|
|
|
|
-
|
|
|
- function noMoreData(me){
|
|
|
+ $("#wx").prop("checked",true);
|
|
|
+ $("#zfb").prop("checked",false);
|
|
|
+ pay_way="wx_app";
|
|
|
+ this_e=e;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ //提示框
|
|
|
+ var EasyAlert = {
|
|
|
+ timeout: null,
|
|
|
+ waitTime: 1000,
|
|
|
+ show: function(text, css, waitTime) {
|
|
|
+ if (this.timeout != null) {
|
|
|
+ clearTimeout(this.timeout);
|
|
|
+ this.hide();
|
|
|
+ this.timeout = null;
|
|
|
+ }
|
|
|
+ var thisClass = this;
|
|
|
+ this.timeout = setTimeout(function() {
|
|
|
+ thisClass.hide();
|
|
|
+ thisClass.timeout = null;
|
|
|
+ }, waitTime ? waitTime : this.waitTime);
|
|
|
+ $("body").append('<div class="easyalert" id="easyAlert">' + text + '</div>');
|
|
|
+ $("#easyAlert").css({
|
|
|
+ "left": "50%",
|
|
|
+ "margin-top": -($("#easyAlert").outerHeight() / 2),
|
|
|
+ "margin-left": -($("#easyAlert").outerWidth() / 2)
|
|
|
+ }).show();
|
|
|
+ },
|
|
|
+ hide: function() {
|
|
|
+ $("#easyAlert").remove();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ //
|
|
|
+ function showToast (content) {
|
|
|
+ EasyAlert.show(content,"",3000);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ function noMoreData(me){
|
|
|
if(me == null){
|
|
|
return;
|
|
|
}
|
|
@@ -1052,131 +1072,336 @@
|
|
|
var listhtml='';
|
|
|
for(var index in object){
|
|
|
var obj=object[index];
|
|
|
-// var objstr="\""+JSON.stringify(obj);
|
|
|
-// objstr=objstr+"\""
|
|
|
- count++;
|
|
|
- var id = obj.id;
|
|
|
- //订单编号
|
|
|
- var orderCode = obj.order_code;
|
|
|
- //创建时间
|
|
|
- var createTime=obj.create_time;
|
|
|
- createTime=createTime.replace(/-/g,".")
|
|
|
- //选择时间
|
|
|
- var publishTime = obj.filter_publishtime;
|
|
|
- console.log(publishTime)
|
|
|
- if(!publishTime){
|
|
|
- publishTime = "全部";
|
|
|
- }else{
|
|
|
- if(publishTime.length==11){
|
|
|
- if(publishTime.slice(0,1)!="_"){
|
|
|
- var publishtime_=publishTime.slice(0,10);
|
|
|
- publishTime=timestampToTime(publishtime_);
|
|
|
- publishTime=publishTime+"-";
|
|
|
- }else{
|
|
|
- var publishtime_=publishTime.slice(1,11);
|
|
|
- publishTime=timestampToTime(publishtime_);
|
|
|
- publishTime=publishTime+"前全部";
|
|
|
- }
|
|
|
- }else{
|
|
|
- //publishTime= publishTime.replace(/\./g,"/")
|
|
|
- }
|
|
|
- }
|
|
|
- //订单金额
|
|
|
- var orderMoney = obj.order_money;
|
|
|
- //金额格式化 小数点前 1,000
|
|
|
- orderMoney=orderMoney+"";
|
|
|
- orderMoney_1=toThousands(orderMoney.split(".")[0]);
|
|
|
- orderMoney_2=orderMoney.split(".")[1];
|
|
|
- if(orderMoney_2){
|
|
|
- orderMoney=orderMoney_1+"."+orderMoney_2;
|
|
|
- }else{
|
|
|
- orderMoney=orderMoney_1;
|
|
|
- }
|
|
|
- console.log(orderMoney+"+++++++")
|
|
|
- //1标准字段包 2高级字段包
|
|
|
- var spec = obj.data_spec;
|
|
|
- if(spec=="标准字段包"){
|
|
|
- spec_=1;
|
|
|
- }else if(spec =="高级字段包"){
|
|
|
- spec_=2;
|
|
|
- }
|
|
|
- var filter_id =obj.filter_id;
|
|
|
-
|
|
|
- //订单状态 0待支付 1已完成 -1删除
|
|
|
- //+'<span class="status notpay">'+orderStatus+'</span>'
|
|
|
- var orderStatus = obj.order_status;
|
|
|
- if(orderStatus==0){
|
|
|
- orderHtml=""
|
|
|
- orderStatus="待付款"
|
|
|
- orderHtml+='<span class="status notpay">'+orderStatus+'</span>'
|
|
|
- orderHtml+="<a class=\"shanchu iconfont icon-shanchu\" title=\"删除订单\" onclick=\"deleteOrder(" + id +",this)\"></a>";
|
|
|
- iconHtml=""
|
|
|
- iconHtml+='<div class="card-footer">'
|
|
|
- +'<a class="btn cancle" onclick="cancelOrder('+id+',this)">取消订单</a>'
|
|
|
- +'<a class="btn pay_" onclick="choosePayWay(\''+orderMoney+'\','+spec_+',"'+obj.filter_id+'",this)" >去支付</a>'
|
|
|
- +'</div>'
|
|
|
- }else if(orderStatus==1){
|
|
|
- orderStatus="已完成";
|
|
|
- orderHtml=""
|
|
|
- orderHtml+='<span class="status">'+orderStatus+'</span>'
|
|
|
- orderHtml+="<a class=\"shanchu iconfont icon-shanchu\" title=\"删除订单\" onclick=\"deleteOrder(" + id +",this)\"></a>";
|
|
|
- iconHtml=""
|
|
|
- iconHtml+='<div class="card-footer">'
|
|
|
- //+'<a href="/jyapp/front/dataExport/toSieve" class="btn cancle">再次购买</a>'
|
|
|
- +'<a onclick="onceMore(this)" class="btn cancle">再次购买</a>'
|
|
|
- +'</div>'
|
|
|
- }else if(orderStatus==-2){
|
|
|
- orderStatus="已取消";
|
|
|
- orderHtml="";
|
|
|
- orderHtml+='<span class="status">'+orderStatus+'</span>'
|
|
|
- orderHtml+="<a class=\"shanchu iconfont icon-shanchu\" title=\"删除订单\" onclick=\"deleteOrder(" + id +",this)\"></a>";
|
|
|
- iconHtml="";
|
|
|
- iconHtml+='<div class="card-footer">'
|
|
|
- +'<a onclick="onceMore(this)" class="btn cancle">再次购买</a>'
|
|
|
- +'</div>'
|
|
|
- }
|
|
|
- //订单总数
|
|
|
- var data_count=obj.data_count;
|
|
|
- //
|
|
|
- var token = obj.token;
|
|
|
- //关键词
|
|
|
- if(obj.filter_keys && obj.filter_keys.split(",").length>0){
|
|
|
- var keysHtml="";
|
|
|
- var keysArr = obj.filter_keys.split(",");
|
|
|
- var keysLen = keysArr.length;for(var j=0;j<keysLen;j++){
|
|
|
- keysHtml += "<span>" + keysArr[j] + " </span>";
|
|
|
+ if(obj.product_type=="历史数据"){
|
|
|
+ count++;
|
|
|
+ var id = obj.id;
|
|
|
+ //订单编号
|
|
|
+ var orderCode = obj.order_code;
|
|
|
+ //创建时间
|
|
|
+ var createTime=obj.create_time;
|
|
|
+ createTime=createTime.replace(/-/g,".")
|
|
|
+ //选择时间
|
|
|
+ var publishTime = obj.filter_publishtime;
|
|
|
+ if(!publishTime){
|
|
|
+ publishTime = "全部";
|
|
|
+ }else{
|
|
|
+ if(publishTime.length==11){
|
|
|
+ if(publishTime.slice(0,1)!="_"){
|
|
|
+ var publishtime_=publishTime.slice(0,10);
|
|
|
+ publishTime=timestampToTime(publishtime_);
|
|
|
+ publishTime=publishTime+"-";
|
|
|
+ }else{
|
|
|
+ var publishtime_=publishTime.slice(1,11);
|
|
|
+ publishTime=timestampToTime(publishtime_);
|
|
|
+ publishTime=publishTime+"前全部";
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ //publishTime= publishTime.replace(/\./g,"/")
|
|
|
+ }
|
|
|
}
|
|
|
-// if(keysArr.length>2){
|
|
|
-// keysHtml += "<span>...</span>";
|
|
|
-// }
|
|
|
- }else{
|
|
|
- keysHtml=""
|
|
|
- }
|
|
|
-
|
|
|
- listhtml+='<div class="card">'
|
|
|
- +'<div class="card-header">'
|
|
|
- +'<span class="time">'+createTime+'</span>'
|
|
|
- +orderHtml
|
|
|
+ //订单金额
|
|
|
+ var orderMoney = obj.order_money;
|
|
|
+ //金额格式化 小数点前 1,000
|
|
|
+ orderMoney=orderMoney+"";
|
|
|
+ orderMoney_1=toThousands(orderMoney.split(".")[0]);
|
|
|
+ orderMoney_2=orderMoney.split(".")[1];
|
|
|
+ if(orderMoney_2){
|
|
|
+ orderMoney=orderMoney_1+"."+orderMoney_2;
|
|
|
+ }else{
|
|
|
+ orderMoney=orderMoney_1;
|
|
|
+ }
|
|
|
+ //1标准字段包 2高级字段包
|
|
|
+ var spec = obj.data_spec;
|
|
|
+ if(spec=="标准字段包"){
|
|
|
+ spec_=1;
|
|
|
+ }else if(spec =="高级字段包"){
|
|
|
+ spec_=2;
|
|
|
+ }
|
|
|
+ var filter_id =obj.filter_id;
|
|
|
+
|
|
|
+ //订单状态 0待支付 1已完成 -1删除
|
|
|
+ //+'<span class="status notpay">'+orderStatus+'</span>'
|
|
|
+ var orderStatus = obj.order_status;
|
|
|
+ if(orderStatus==0){
|
|
|
+ orderHtml=""
|
|
|
+ orderStatus="待付款"
|
|
|
+ orderHtml+='<span class="status notpay">'+orderStatus+'</span>'
|
|
|
+ orderHtml+="<a class=\"shanchu iconfont icon-shanchu\" title=\"删除订单\" onclick=\"deleteOrder(" + id +",this)\"></a>";
|
|
|
+ iconHtml=""
|
|
|
+ iconHtml+='<div class="card-footer">'
|
|
|
+ +'<a class="btn cancle" onclick="cancelOrder('+id+',this)">取消订单</a>'
|
|
|
+ +'<a class="btn pay_" onclick="choosePayWay(\''+orderMoney+'\','+spec_+',"'+obj.filter_id+'",this)" >去支付</a>'
|
|
|
+'</div>'
|
|
|
- +'<div class="card-content">'
|
|
|
- +'<a eid='+orderCode+' class="media" id="'+orderCode+'">'
|
|
|
- +'<div class="media-img">'
|
|
|
- +'<img src="/jyapp/images/myorder/historical_data.png">'
|
|
|
- +'</div>'
|
|
|
- +'<div class="media-info">'
|
|
|
- +'<p class="item-ifo ellipsis">关键词:'+ keysHtml+'</p>'
|
|
|
- +'<p class="item-ifo ellipsis">数据量:'+ data_count +'条</p>'
|
|
|
- +'<p class="item-ifo ellipsis">数据规格:'+spec+'</p>'
|
|
|
- +'<p class="item-ifo ellipsis">筛选日期:'+publishTime+'</p>'
|
|
|
+ }else if(orderStatus==1){
|
|
|
+ orderStatus="已完成";
|
|
|
+ orderHtml=""
|
|
|
+ orderHtml+='<span class="status">'+orderStatus+'</span>'
|
|
|
+ orderHtml+="<a class=\"shanchu iconfont icon-shanchu\" title=\"删除订单\" onclick=\"deleteOrder(" + id +",this)\"></a>";
|
|
|
+ iconHtml=""
|
|
|
+ iconHtml+='<div class="card-footer">'
|
|
|
+ +'<a onclick="onceMore(this)" class="btn cancle">再次购买</a>'
|
|
|
+ +'</div>'
|
|
|
+ }else if(orderStatus==-2){
|
|
|
+ orderStatus="已取消";
|
|
|
+ orderHtml="";
|
|
|
+ orderHtml+='<span class="status">'+orderStatus+'</span>'
|
|
|
+ orderHtml+="<a class=\"shanchu iconfont icon-shanchu\" title=\"删除订单\" onclick=\"deleteOrder(" + id +",this)\"></a>";
|
|
|
+ iconHtml="";
|
|
|
+ iconHtml+='<div class="card-footer">'
|
|
|
+ +'<a onclick="onceMore(this)" class="btn cancle">再次购买</a>'
|
|
|
+ +'</div>'
|
|
|
+ }
|
|
|
+ //订单总数
|
|
|
+ var data_count=obj.data_count;
|
|
|
+ //
|
|
|
+ var token = obj.token;
|
|
|
+ //关键词
|
|
|
+ if(obj.filter_keys && obj.filter_keys.split(",").length>0){
|
|
|
+ var keysHtml="";
|
|
|
+ var keysArr = obj.filter_keys.split(",");
|
|
|
+ var keysLen = keysArr.length;for(var j=0;j<keysLen;j++){
|
|
|
+ keysHtml += "<span>" + keysArr[j] + " </span>";
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ keysHtml=""
|
|
|
+ }
|
|
|
+
|
|
|
+ listhtml+='<div class="card">'
|
|
|
+ +'<div class="card-header">'
|
|
|
+ +'<span class="time">'+createTime+'</span>'
|
|
|
+ +orderHtml
|
|
|
+ +'</div>'
|
|
|
+ +'<div class="card-content">'
|
|
|
+ +'<a eid='+orderCode+' class="media" id="'+orderCode+'">'
|
|
|
+ +'<div class="media-img">'
|
|
|
+ +'<img src="/jyapp/images/myorder/historical_data.png">'
|
|
|
+ +'</div>'
|
|
|
+ +'<div class="media-info">'
|
|
|
+ +'<p class="item-ifo ellipsis">关键词:'+ keysHtml+'</p>'
|
|
|
+ +'<p class="item-ifo ellipsis">数据量:'+ data_count +'条</p>'
|
|
|
+ +'<p class="item-ifo ellipsis">数据规格:'+spec+'</p>'
|
|
|
+ +'<p class="item-ifo ellipsis">筛选日期:'+publishTime+'</p>'
|
|
|
+ +'</div>'
|
|
|
+ +'</a>'
|
|
|
+ +'<div class="price">'
|
|
|
+ +'<strong class="current">¥'+orderMoney+'</strong>'
|
|
|
+'</div>'
|
|
|
- +'</a>'
|
|
|
- +'<div class="price">'
|
|
|
- +'<strong class="current">¥'+orderMoney+'</strong>'
|
|
|
+'</div>'
|
|
|
+ +iconHtml
|
|
|
+ +'</div>'
|
|
|
+
|
|
|
+ }else if(obj.product_type=="VIP订阅"){
|
|
|
+ count++;
|
|
|
+ var id_vip = obj.id;
|
|
|
+ //订单编号
|
|
|
+ var orderCode_vip = obj.order_code;
|
|
|
+ //创建时间
|
|
|
+ var createTime_vip=obj.create_time;
|
|
|
+ createTime_vip =createTime_vip.replace(/-/g,".")
|
|
|
+ //筛选条件
|
|
|
+ var filter_vip = JSON.parse(obj.filter);
|
|
|
+ //地区
|
|
|
+ var region_vipArr = filter_vip.area;
|
|
|
+ var region_vip=""
|
|
|
+ var province_length=0;
|
|
|
+ var city_length=0;
|
|
|
+ if(JSON.stringify(region_vipArr) != JSON.stringify({})){
|
|
|
+ for(i in region_vipArr){
|
|
|
+ if(region_vipArr[i].length==0){
|
|
|
+ province_length++;
|
|
|
+ }else{
|
|
|
+ city_length+=region_vipArr[i].length;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ region_vip="全国";
|
|
|
+ }
|
|
|
+ if((province_length!=0)&&(city_length!=0)){
|
|
|
+ region_vip=province_length+"个省级区域、"+city_length+"个地市";
|
|
|
+ }else if((province_length==0)&&(city_length!=0)){
|
|
|
+ region_vip=city_length+"个地市";
|
|
|
+ }else if((province_length!=0)&&(city_length==0)){
|
|
|
+ region_vip=province_length+"个省级区域";
|
|
|
+ }
|
|
|
+ //行业
|
|
|
+ var industry_vip = filter_vip.industry.length; //数组
|
|
|
+ if(industry_vip==0){
|
|
|
+ industry_vip="全";
|
|
|
+ }else{
|
|
|
+ industry_vip=industry_vip+"个";
|
|
|
+ }
|
|
|
+ var cyclecount_vip = filter_vip.cyclecount; //时长
|
|
|
+ var cycleunit_vip = filter_vip.cycleunit;//单位 1:年 2:月 3:天
|
|
|
+ //订阅周期
|
|
|
+ var effectiveduration_vip=""
|
|
|
+ if((obj.vip_starttime!=undefined)&&(obj.vip_endtime!=undefined)){
|
|
|
+ var start_time_vip = obj.vip_starttime;
|
|
|
+ var end_time_vip = obj.vip_endtime;
|
|
|
+ var start_time_arr = start_time_vip.split(" ")[0].split("-")
|
|
|
+ var end_time_arr = end_time_vip.split(" ")[0].split("-")
|
|
|
+ var start_year=start_time_arr[0];
|
|
|
+ var start_month=start_time_arr[1];
|
|
|
+ var end_year=end_time_arr[0];
|
|
|
+ var end_month=end_time_arr[1];
|
|
|
+
|
|
|
+ var year = 0;
|
|
|
+ var month = 0;
|
|
|
+ if(end_year > start_year){
|
|
|
+ if(end_month > start_month){
|
|
|
+ year = end_year - start_year;
|
|
|
+ month = end_month - start_month;
|
|
|
+ }else{
|
|
|
+ year = end_year - start_year-1;
|
|
|
+ month = 12+Number(end_month)-start_month;
|
|
|
+ if (month==12){
|
|
|
+ year=Number(year)+1;
|
|
|
+ month=0;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }else if(end_year == start_year){
|
|
|
+ month = end_month - start_month;
|
|
|
+ }
|
|
|
+
|
|
|
+ if(year != 0 && month !=0){
|
|
|
+ effectiveduration_vip=year+"年"+month+"个月";
|
|
|
+ }else if(year !== 0&& month ===0){
|
|
|
+ effectiveduration_vip=year+"年";
|
|
|
+ }else if(year === 0&& month !==0){
|
|
|
+ effectiveduration_vip=month+"个月";
|
|
|
+ }
|
|
|
+ if(cycleunit_vip==3){
|
|
|
+ effectiveduration_vip=cyclecount_vip+"天";
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ if(cycleunit_vip==1){
|
|
|
+ effectiveduration_vip=cyclecount_vip+"年";
|
|
|
+ }else if(cycleunit_vip==2){
|
|
|
+ effectiveduration_vip=cyclecount_vip+"个月"
|
|
|
+ }else if(cycleunit_vip==3){
|
|
|
+ effectiveduration_vip=cyclecount_vip+"天";
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ var vip_status =obj.i_vip_status; // 1:试用 2:正式 -1:试用到期 -2:正式到期
|
|
|
+ //订单状态 0待支付 1已完成 -1删除
|
|
|
+ var orderStatus_vip = obj.order_status;
|
|
|
+ var token_vip = obj.token;
|
|
|
+ if(sessionStorage&&sessionStorage.getItem("paySuccess_"+obj.order_code)!=null){
|
|
|
+ orderStatus = sessionStorage.getItem("paySuccess_"+obj.order_code);
|
|
|
+ if (orderTabActive==1&&orderStatus==1){
|
|
|
+ gopayIndex = index;
|
|
|
+ psss=obj.order_code;
|
|
|
+ continue;
|
|
|
+ }else{
|
|
|
+ sessionStorage.removeItem("paySuccess_"+obj.order_code);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ //订单金额
|
|
|
+ var orderMoney_vip = obj.order_money;
|
|
|
+ //金额格式化 小数点前 1,000
|
|
|
+ orderMoney_vip=orderMoney_vip+"";
|
|
|
+ orderMoney_vip1=toThousands(orderMoney_vip.split(".")[0]);
|
|
|
+ orderMoney_vip2=orderMoney_vip.split(".")[1];
|
|
|
+ if(orderMoney_vip2){
|
|
|
+ orderMoney_vip=orderMoney_vip1+"."+orderMoney_vip2;
|
|
|
+ }else{
|
|
|
+ orderMoney_vip=orderMoney_vip1;
|
|
|
+ }
|
|
|
+ console.log(orderMoney_vip)
|
|
|
+ if(orderStatus_vip==0){
|
|
|
+ orderStatus_vip="待付款"
|
|
|
+ orderHtml=""
|
|
|
+ orderHtml+='<span class="status notpay">'+orderStatus_vip+'</span>'
|
|
|
+ orderHtml+="<a class=\"shanchu iconfont icon-shanchu\" title=\"删除订单\" onclick=\"deleteOrder(" + id_vip +",this)\"></a>";
|
|
|
+ iconHtml=""
|
|
|
+ iconHtml+='<div class="card-footer">'
|
|
|
+ +'<a class="btn cancle" onclick="cancelOrder('+id_vip+',this)">取消订单</a>'
|
|
|
+ +'<a href="javascript:void(0)" onclick="choosePayWay_vip(\''+orderMoney_vip+'\','+orderMoney+',"'+orderMoney+'",this)" class="gopay_btn pay" filterid="'+obj.filter_id+'" token="'+token_vip+'" id="'+id_vip+'" orderCode='+orderCode_vip+'>去支付</a>'
|
|
|
+ +'</div>'
|
|
|
+ }else if(orderStatus_vip==1){
|
|
|
+ orderStatus_vip="已完成";
|
|
|
+ orderHtml=""
|
|
|
+ orderHtml+='<span class="status">'+orderStatus_vip+'</span>'
|
|
|
+ orderHtml+="<a class=\"shanchu iconfont icon-shanchu\" title=\"删除订单\" onclick=\"deleteOrder(" + id_vip +",this)\"></a>";
|
|
|
+ iconHtml=""
|
|
|
+ //最后一次购买完 1:试用 2:正式 -1:试用到期 -2:正式到期
|
|
|
+ console.log(obj.lastbuy_code)
|
|
|
+ if((vip_status=="-2")&&(obj.lastbuy_code!=undefined)){
|
|
|
+ iconHtml+='<div class="card-footer">'
|
|
|
+ +'<a onclick="renewalOrBuyAgain(2,this)" class="btn cancle">再次购买</a>'
|
|
|
+ +'</div>'
|
|
|
+ }else if((vip_status=="2")&&(obj.lastbuy_code!=undefined)){
|
|
|
+ iconHtml+='<div class="card-footer">'
|
|
|
+ +'<a onclick="renewalOrBuyAgain(1,this)" class="btn cancle">续费</a>'
|
|
|
+'</div>'
|
|
|
- +iconHtml
|
|
|
+ }
|
|
|
+ }else if(orderStatus_vip==-2){
|
|
|
+ orderStatus_vip="已取消";
|
|
|
+ orderHtml="";
|
|
|
+ orderHtml+='<span class="status">'+orderStatus_vip+'</span>'
|
|
|
+ orderHtml+="<a class=\"shanchu iconfont icon-shanchu\" title=\"删除订单\" onclick=\"deleteOrder(" + id_vip +",this)\"></a>";
|
|
|
+ iconHtml="";
|
|
|
+ iconHtml+='<div class="card-footer">'
|
|
|
+ +'</div>'
|
|
|
+ }
|
|
|
+ //vip状态 0不是vip 1试用 2正式
|
|
|
+ if (orderStatus_vip!="已完成"){
|
|
|
+ //未支付 或 已取消
|
|
|
+ listhtml+='<div class="card">'
|
|
|
+ +'<div class="card-header">'
|
|
|
+ +'<span class="time" style="color:#888888">'+createTime_vip+'</span>'
|
|
|
+ +orderHtml
|
|
|
+ +'</div>'
|
|
|
+ +'<div class="card-content">'
|
|
|
+ +'<a eid='+orderCode_vip+' class="media" isvipOrder="true">'
|
|
|
+ +'<div class="media-img">'
|
|
|
+ +'<img src="/vipsubscribe/image/vip_order.png">'
|
|
|
+ +'</div>'
|
|
|
+ +'<div class="media-info">'
|
|
|
+ +'<p class="item-ifo ellipsis">区域:'+ region_vip+'</p>'
|
|
|
+ +'<p class="item-ifo ellipsis">行业:'+ industry_vip +'行业</p>'
|
|
|
+ +'<p class="item-ifo ellipsis">订阅周期:'+effectiveduration_vip+'</p>'
|
|
|
+ +'</div>'
|
|
|
+ +'</a>'
|
|
|
+ +'<div class="price">'
|
|
|
+ +'<strong class="current">¥'+orderMoney_vip+'</strong>'
|
|
|
+ +'</div>'
|
|
|
+ +'</div>'
|
|
|
+ +iconHtml
|
|
|
+'</div>'
|
|
|
-
|
|
|
+ }else{
|
|
|
+ //有效时间
|
|
|
+ var starttime_vip= obj.vip_starttime+"";
|
|
|
+ var endtime_vip= obj.vip_endtime+"";
|
|
|
+ starttime_vip= starttime_vip.split(" ")[0].replace(/-/g,".")
|
|
|
+ endtime_vip= endtime_vip.split(" ")[0].replace(/-/g,".")
|
|
|
+ var effectivetime_vip =starttime_vip+"-"+endtime_vip;
|
|
|
+ //已完成
|
|
|
+ listhtml+='<div class="card">'
|
|
|
+ +'<div class="card-header">'
|
|
|
+ +'<span class="time" style="color:#888888">'+createTime_vip+'</span>'
|
|
|
+ +orderHtml
|
|
|
+ +'</div>'
|
|
|
+ +'<div class="card-content">'
|
|
|
+ +'<a eid='+orderCode_vip+' class="media" isvipOrder="true">'
|
|
|
+ +'<div class="media-img">'
|
|
|
+ +'<img src="/vipsubscribe/image/vip_order.png">'
|
|
|
+ +'</div>'
|
|
|
+ +'<div class="media-info">'
|
|
|
+ +'<p class="item-ifo ellipsis">区域:'+ region_vip+'</p>'
|
|
|
+ +'<p class="item-ifo ellipsis">行业:'+ industry_vip +'行业</p>'
|
|
|
+ +'<p class="item-ifo ellipsis">订阅周期:'+effectiveduration_vip+'</p>'
|
|
|
+ +'<p class="item-ifo ellipsis">有效日期:'+effectivetime_vip+'</p>'
|
|
|
+ +'</div>'
|
|
|
+ +'</a>'
|
|
|
+ +'<div class="price">'
|
|
|
+ +'<strong class="current">¥'+orderMoney_vip+'</strong>'
|
|
|
+ +'</div>'
|
|
|
+ +'</div>'
|
|
|
+ +iconHtml
|
|
|
+ +'</div>'
|
|
|
+ }
|
|
|
+ } //else if ..end
|
|
|
}
|
|
|
|
|
|
appendList($(listhtml));
|
|
@@ -1221,121 +1446,6 @@
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
-
|
|
|
-
|
|
|
- })
|
|
|
-
|
|
|
- var this_e=""
|
|
|
- //选择
|
|
|
- function choosePayWay(orderMoney,param_dataType,param_id,e){
|
|
|
- console.log(orderMoney+"----------------")
|
|
|
- $(".pay_way").show();
|
|
|
- $(".money_pay").text("¥"+orderMoney);
|
|
|
- $(".param_dataType").text(param_dataType);
|
|
|
- $(".param_id").text(param_id);
|
|
|
- if(localStorage.getItem(param_id)=="wx"){
|
|
|
- $("#wx").prop("checked",true);
|
|
|
- $("#zfb").prop("checked",false);
|
|
|
- pay_way="wx_app";
|
|
|
- }else if(localStorage.getItem(param_id)=="ali"){
|
|
|
- pay_way="ali_app";
|
|
|
- $("#zfb").prop("checked",true);
|
|
|
- $("#wx").prop("checked",false);
|
|
|
- }else{
|
|
|
- //不是在app生成的订单 默认为微信
|
|
|
- $("#wx").prop("checked",true);
|
|
|
- $("#zfb").prop("checked",false);
|
|
|
- pay_way="wx_app";
|
|
|
- }
|
|
|
- this_e=e;
|
|
|
- }
|
|
|
-
|
|
|
-// var payArr=new Array();
|
|
|
-// function changeCache(e){
|
|
|
-// var gopayIndex = $(e).parent().parent().index();
|
|
|
-// if(typ==1){
|
|
|
-// $(e).parent(".card-footer").parent(".card").remove();
|
|
|
-// getOneMore(gopayIndex);
|
|
|
-// }else{
|
|
|
-// //typ=0 更改 显示已完成
|
|
|
-// $(e).parent(".card-footer").parent(".card").children(".card-header").children(".status").html('<span class="status " style="color:#1d1d1d">已完成</span>');
|
|
|
-// $(e).parent(".card-footer").html('<a href="/jyapp/front/dataExport/toSieve" class="btn cancle">再次购买</a>');
|
|
|
-// //支付过的订单 存入缓存 便于 更新数据
|
|
|
-// if(JSON.parse(sessionStorage.getItem("payMsg"))){
|
|
|
-// var pa =JSON.parse(sessionStorage.getItem("payMsg"));
|
|
|
-// pa.push(gopayIndex);
|
|
|
-// sessionStorage.setItem("payMsg",JSON.stringify(pa));
|
|
|
-// }else{
|
|
|
-// payArr.push(gopayIndex);
|
|
|
-// sessionStorage.setItem("payMsg",JSON.stringify(payArr));
|
|
|
-// }
|
|
|
-// }
|
|
|
-// }
|
|
|
-
|
|
|
- /*
|
|
|
- function getOneMore(gopayIndex){
|
|
|
- $.post("/jyapp/front/myorder/getOneMore",{"pageNum":pageIndex,"tabType":typ},function(data){
|
|
|
- console.log(gopayIndex)
|
|
|
- //更改缓存
|
|
|
- dataCache.splice(gopayIndex,1)
|
|
|
- if(data.res!=null){
|
|
|
- dataCache.push(data.res[0])
|
|
|
- hasNextPage=data.nextPage;
|
|
|
- }
|
|
|
- if(data.res!=""){
|
|
|
- var res = data.res[0]
|
|
|
- var oneMHtml = '<div class="card"><div class="card-header">'
|
|
|
- +'<span class="time" style="color:#888888">'+res.create_time+'</span>'
|
|
|
- +'<span class="status notpay">待付款</span></div>'
|
|
|
- +'<a class=\"shanchu iconfont icon-shanchu\" title=\"删除订单\" onclick=\"deleteOrder(" + id +",this)\"></a>';
|
|
|
- +'<div class="card-content"><a eid="'+res.order_code+'" class="media">'
|
|
|
- +'<div class="media-img"><img src="/jyapp/images/myorder/historical_data.png"></div>'
|
|
|
- +'<div class="media-info">'
|
|
|
- +'<p class="item-ifo ellipsis">关键词:<span>'+res.filter_keys+' </span>'
|
|
|
- +'</p><p class="item-ifo ellipsis">数据量:'+res.data_count+'条</p>'
|
|
|
- +'<p class="item-ifo ellipsis">数据规格:'+res.data_spec+'</p>'
|
|
|
- +'<p class="item-ifo ellipsis">筛选日期:'+res.filter_publishtime+'</p></div></a>'
|
|
|
- +'<div class="price"><strong class="current">¥'+res.order_money+'</strong>'
|
|
|
- +'</div></div><div class="card-footer">'
|
|
|
- +'<a class="btn cancle" onclick="cancelOrder('+res.id+',this)">取消订单</a>'
|
|
|
- +'<a href="javascript:void(0)" onclick="goPay(this)" class="btn pay_" filterid="'+res.filter_id+'" token="'+res.token+'">去支付</a></div></div>'
|
|
|
- // $(".card_lists").append(oneMHtml);
|
|
|
- appendList($(oneMHtml));
|
|
|
- }
|
|
|
- });
|
|
|
- }
|
|
|
- */
|
|
|
-
|
|
|
- //提示框
|
|
|
- var EasyAlert = {
|
|
|
- timeout: null,
|
|
|
- waitTime: 1000,
|
|
|
- show: function(text, css, waitTime) {
|
|
|
- if (this.timeout != null) {
|
|
|
- clearTimeout(this.timeout);
|
|
|
- this.hide();
|
|
|
- this.timeout = null;
|
|
|
- }
|
|
|
- var thisClass = this;
|
|
|
- this.timeout = setTimeout(function() {
|
|
|
- thisClass.hide();
|
|
|
- thisClass.timeout = null;
|
|
|
- }, waitTime ? waitTime : this.waitTime);
|
|
|
- $("body").append('<div class="easyalert" id="easyAlert">' + text + '</div>');
|
|
|
- $("#easyAlert").css({
|
|
|
- "left": "50%",
|
|
|
- "margin-top": -($("#easyAlert").outerHeight() / 2),
|
|
|
- "margin-left": -($("#easyAlert").outerWidth() / 2)
|
|
|
- }).show();
|
|
|
- },
|
|
|
- hide: function() {
|
|
|
- $("#easyAlert").remove();
|
|
|
- }
|
|
|
- }
|
|
|
- //
|
|
|
- function showToast (content) {
|
|
|
- EasyAlert.show(content,"",3000);
|
|
|
- }
|
|
|
</script>
|
|
|
<!--百度统计end-->
|
|
|
{{include "/common/baiducc.html"}}
|