|
@@ -257,24 +257,11 @@
|
|
|
function(r){
|
|
|
if(r.err_msg == "get_brand_wcpay_request:ok"){
|
|
|
if(typ==1){
|
|
|
-// $(e).parent(".card-footer").parent(".card").remove();
|
|
|
-// if (gopayIndex>-1){
|
|
|
-// getOneMore(gopayIndex);
|
|
|
-// }
|
|
|
$(".buttons-tab .tab-link").eq(typ).addClass("active").siblings().removeClass("active");
|
|
|
}else{
|
|
|
//typ=0 更改 显示已完成
|
|
|
$(e).parent(".card-footer").parent(".card").children(".card-header").children(".status").html('<span class=" " style="color:#1d1d1d">已完成</span>');
|
|
|
$(e).parent(".card-footer").html('<a onclick="onceMore(this)" 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));
|
|
|
-// }
|
|
|
}
|
|
|
setSessionStorage();
|
|
|
setTimeout(function(){
|
|
@@ -294,7 +281,6 @@
|
|
|
var gopayIndex = 0;
|
|
|
function goPay(e){
|
|
|
var filterid = $(e).attr("filterid");
|
|
|
- console.log(filterid)
|
|
|
var token = $(e).attr("token");
|
|
|
var testid=$(e).parent().parent().children(".card-content").children(".media").attr("eid");
|
|
|
var id = $(e).attr("id");
|
|
@@ -357,7 +343,6 @@
|
|
|
+'</div></div><div class="card-footer">'
|
|
|
+'<a class="btn cancle" onclick="deleteOrder('+res.id+',this)">取消订单</a>'
|
|
|
+'<a href="javascript:void(0)" onclick="goPay(this)" class="btn pay" filterid="'+res.filter_id+'" token="'+res.token+'" id="'+res.id+'">去支付</a></div></div>'
|
|
|
- // $(".card_lists").append(oneMHtml);
|
|
|
appendList($(oneMHtml));
|
|
|
}
|
|
|
});
|
|
@@ -411,8 +396,6 @@
|
|
|
|
|
|
//格式化数字
|
|
|
function toThousands(num) {
|
|
|
- //TODO if 截取
|
|
|
- console.log(num)
|
|
|
var num = (num || 0).toString(), result = '';
|
|
|
while (num.length > 3) {
|
|
|
result = ',' + num.slice(-3) + result;
|
|
@@ -427,25 +410,23 @@
|
|
|
function appendList(listhtml){
|
|
|
listhtml.children(".card-content").on("click", function(event){
|
|
|
var eid = $(this).find(".media").attr("eid");
|
|
|
- beforeJump(eid);
|
|
|
+ var isVipOrder =$(this).find(".media").attr("isvipOrder");
|
|
|
+ beforeJump(eid,isVipOrder);
|
|
|
});
|
|
|
$(".card_lists").append(listhtml);
|
|
|
}
|
|
|
|
|
|
- function beforeJump(eid){
|
|
|
+ function beforeJump(eid,isVipOrder){
|
|
|
setSessionStorage();
|
|
|
- window.location.href="/weixin/pay/wxToOrderDetail?orderCode="+eid;
|
|
|
+ if (isVipOrder=="true"){
|
|
|
+ window.location.href="/front/vipsubscribe/toOrderDetailPage?orderCode="+eid;
|
|
|
+ }else{
|
|
|
+ window.location.href="/weixin/pay/wxToOrderDetail?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();
|
|
|
- //}
|
|
|
+ sessionStorage.orderTabActive=$("ul .active").index();
|
|
|
}
|
|
|
|
|
|
function onceMore(e){
|
|
@@ -644,7 +625,6 @@
|
|
|
text: '确定',
|
|
|
btnClass: 'btn-primary-2',
|
|
|
action: function() {
|
|
|
- console.log(typ+"===========")
|
|
|
if (typ==1){
|
|
|
var self = $(obj).parent().parent();
|
|
|
self.remove();
|
|
@@ -704,96 +684,11 @@
|
|
|
$(".tabs>.tab").eq(index).show().siblings().hide();
|
|
|
typ=$("ul .active").index();
|
|
|
$(".card_lists").empty();
|
|
|
- console.log(typ)
|
|
|
$("body").scrollTop(0);
|
|
|
queryOrder(index)
|
|
|
})
|
|
|
})
|
|
|
|
|
|
-// 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;
|
|
|
-// typ = orderTabActive;
|
|
|
-// $(".card_lists").empty();
|
|
|
-// structureHtml(dataCache);
|
|
|
-// //我的订单 全部 更新样式 (不更新缓存)
|
|
|
-// 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="/front/wx_dataExport/toSieve" class="btn cancle">再次购买</a>');
|
|
|
-// }
|
|
|
-// //重新存一下 新索引
|
|
|
-// sessionStorage.setItem("payMsg",JSON.stringify(payOrderArr));
|
|
|
-// }
|
|
|
-// $(".buttons-tab .tab-link").eq(orderTabActive).addClass("active").siblings().removeClass("active");
|
|
|
-// if(hasNextPage){
|
|
|
-// //setTimeout(function(){
|
|
|
-// wxflag = $('#order_list > .main > .tabs').dropload({
|
|
|
-// scrollArea : window,
|
|
|
-// loadDownFn : function(me){
|
|
|
-//// if(wxflag == null){
|
|
|
-//// wxflag = me;
|
|
|
-//// }
|
|
|
-// $.ajax({
|
|
|
-// type: 'post',
|
|
|
-// url: '/front/wxMyOrder/myOrder/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);
|
|
|
-// }
|
|
|
-// });
|
|
|
-// }
|
|
|
-// });
|
|
|
-// // },500);
|
|
|
-// }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{
|
|
|
- //查看全部
|
|
|
|
|
|
//解决苹果手机里面的网页返回不刷新页面的问题
|
|
|
var browserRule = /^.*((iPhone)|(iPad)|(Safari))+.*$/;
|
|
@@ -811,7 +706,6 @@
|
|
|
}else{
|
|
|
queryOrder();
|
|
|
}
|
|
|
-// }
|
|
|
})
|
|
|
|
|
|
//查询订单ajax
|
|
@@ -885,134 +779,278 @@
|
|
|
var psss = 0;
|
|
|
for(var index in object){
|
|
|
var obj=object[index];
|
|
|
- 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+"前全部";
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- //1标准字段包 2高级字段包
|
|
|
- var spec = obj.data_spec;
|
|
|
- if(spec==1){
|
|
|
- spec ="标准字段包";
|
|
|
- }else if(spec ==2){
|
|
|
- spec="高级字段包";
|
|
|
- }
|
|
|
- //订单总数
|
|
|
- var data_count=obj.data_count;
|
|
|
- //订单金额
|
|
|
- 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;
|
|
|
- }
|
|
|
- //
|
|
|
- var token = obj.token;
|
|
|
- //订单状态 0待支付 1已完成 -1删除
|
|
|
- var orderStatus = obj.order_status;
|
|
|
- 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);
|
|
|
+ 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+"前全部";
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
- }
|
|
|
- if(orderStatus==0){
|
|
|
- orderStatus="待付款"
|
|
|
- orderHtml=""
|
|
|
- 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 href="javascript:void(0)" onclick="goPay(this)" class="btn pay" filterid="'+obj.filter_id+'" token="'+token+'" id="'+id+'">去支付</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 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>'
|
|
|
+ //1标准字段包 2高级字段包
|
|
|
+ var spec = obj.data_spec;
|
|
|
+ if(spec==1){
|
|
|
+ spec ="标准字段包";
|
|
|
+ }else if(spec ==2){
|
|
|
+ spec="高级字段包";
|
|
|
+ }
|
|
|
+ //订单总数
|
|
|
+ var data_count=obj.data_count;
|
|
|
+ //订单金额
|
|
|
+ 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;
|
|
|
+ }
|
|
|
+ //
|
|
|
+ var token = obj.token;
|
|
|
+ //订单状态 0待支付 1已完成 -1删除
|
|
|
+ var orderStatus = obj.order_status;
|
|
|
+ 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);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if(orderStatus==0){
|
|
|
+ orderStatus="待付款"
|
|
|
+ orderHtml=""
|
|
|
+ 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 href="javascript:void(0)" onclick="goPay(this)" class="btn pay" filterid="'+obj.filter_id+'" token="'+token+'" id="'+id+'">去支付</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 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>'
|
|
|
+ }
|
|
|
+ //关键词
|
|
|
+ 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" style="color:#888888">'+createTime+'</span>'
|
|
|
+ +orderHtml
|
|
|
+ +'</div>'
|
|
|
+ +'<div class="card-content">'
|
|
|
+ +'<a eid='+orderCode+' class="media">'
|
|
|
+ +'<div class="media-img">'
|
|
|
+ +'<img src="/dataExport/image/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>'
|
|
|
+ +'</div>'
|
|
|
+ +iconHtml
|
|
|
+'</div>'
|
|
|
- }
|
|
|
- //关键词
|
|
|
- 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 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=""
|
|
|
+ for( i in region_vipArr){
|
|
|
+ region_vip+=i;
|
|
|
+ region_vip+=region_vipArr[i];
|
|
|
+ region_vip+=" ";
|
|
|
+ }
|
|
|
+ region_vip=region_vip.replace(/(\s*$)/g, "");
|
|
|
+ //行业
|
|
|
+ var industry_vip = filter_vip.industry+""; //数组
|
|
|
+ industry_vip=industry_vip.replace(/,/g,"、")
|
|
|
+ var cyclecount_vip = filter_vip.cyclecount; //时长
|
|
|
+ var cycleunit_vip = filter_vip.cycleunit; //单位 1:年 2:月
|
|
|
+ //订阅周期
|
|
|
+ var effectiveduration_vip=""
|
|
|
+ if(cycleunit_vip==1){
|
|
|
+ effectiveduration_vip=cyclecount_vip+"年";
|
|
|
+ }else if(cycleunit_vip==2){
|
|
|
+ effectiveduration_vip=cyclecount_vip+"个月"
|
|
|
}
|
|
|
- }else{
|
|
|
- keysHtml=""
|
|
|
- }
|
|
|
-
|
|
|
- listhtml+='<div class="card">'
|
|
|
- +'<div class="card-header">'
|
|
|
- +'<span class="time" style="color:#888888">'+createTime+'</span>'
|
|
|
- +orderHtml
|
|
|
+ if(obj.i_vip_status=="1"){ //试用
|
|
|
+ effectiveduration_vip="7天";
|
|
|
+ }
|
|
|
+ //订单状态 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;
|
|
|
+ }
|
|
|
+ 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="goPay(this)" class="btn pay" filterid="'+obj.filter_id+'" token="'+token_vip+'" id="'+id_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=""
|
|
|
+ iconHtml+='<div class="card-footer">'
|
|
|
+ +'<a onclick="onceMore(this)" class="btn cancle">再次购买</a>'
|
|
|
+'</div>'
|
|
|
- +'<div class="card-content">'
|
|
|
- +'<a eid='+orderCode+' class="media">'
|
|
|
- +'<div class="media-img">'
|
|
|
- +'<img src="/dataExport/image/historical_data.png">'
|
|
|
+ }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">'
|
|
|
+ +'<a onclick="onceMore(this)" class="btn cancle">再次购买</a>'
|
|
|
+ +'</div>'
|
|
|
+ }
|
|
|
+ //vip状态 0不是vip 1试用 2正式
|
|
|
+ var status_vip = obj.i_vip_status;
|
|
|
+ if (status_vip==0){
|
|
|
+ //未支付 或 已取消
|
|
|
+ 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 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>'
|
|
|
+ +iconHtml
|
|
|
+ +'</div>'
|
|
|
+ }else{
|
|
|
+ //有效时间
|
|
|
+ var starttime_vip= obj.l_vip_starttime;
|
|
|
+ var endtime_vip= obj.l_vip_endtime;
|
|
|
+ starttime_vip = timestampToTime(starttime_vip)
|
|
|
+ endtime_vip = timestampToTime(endtime_vip)
|
|
|
+ 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>'
|
|
|
- +'</a>'
|
|
|
- +'<div class="price">'
|
|
|
- +'<strong class="current">¥'+orderMoney+'</strong>'
|
|
|
+'</div>'
|
|
|
- +'</div>'
|
|
|
- +iconHtml
|
|
|
- +'</div>'
|
|
|
+ +iconHtml
|
|
|
+ +'</div>'
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
+ }
|
|
|
appendList($(listhtml));
|
|
|
-// if(sessionStorage&&sessionStorage.getItem("paySuccess_"+psss)!=null&&orderTabActive==1){
|
|
|
-// sessionStorage.removeItem("paySuccess_"+psss);
|
|
|
-// getOneMore(gopayIndex);
|
|
|
-// }
|
|
|
}
|
|
|
|
|
|
function noMoreData(me){
|