浏览代码

refactor: 订单列表

cuiyalong 4 年之前
父节点
当前提交
c83f36f245

文件差异内容过多而无法显示
+ 11 - 324
src/jfw/modules/app/src/web/templates/commonPay/myOrder.html


文件差异内容过多而无法显示
+ 327 - 0
src/jfw/modules/app/src/web/templates/commonPay/myOrderOld.html


+ 296 - 0
src/web/staticres/common-module/order-list/css/order-list.css

@@ -0,0 +1,296 @@
+.order-list-container .van-tabs__wrap {
+  height: .96rem;
+}
+.order-list-container .van-tabs__line {
+  bottom: .36rem;
+}
+.order-list-container .van-tab__pane {
+  height: 100%;
+}
+.order-list-container .van-tabs__content {
+  flex: 1;
+  overflow-y: scroll;
+  overflow-x: hidden;
+}
+.order-list-container .van-tabs {
+  width: 100%;
+}
+.order-list-container .van-tab {
+  font-size: .32rem;
+  line-height: .4rem;
+}
+
+/* vant-reset */
+.van-dialog {
+  width: 6rem;
+  border-radius: .16rem;
+}
+.van-dialog__header {
+  font-weight: 700;
+  font-size: 18px;
+  line-height: 26px;
+  color: #171826;
+}
+.van-dialog__content {
+  padding: .16rem .6rem;
+}
+.van-dialog__message {
+  padding-left: 0;
+  padding-right: 0;
+  font-size: .3rem;
+  line-height: .44rem;
+  color: #5F5E64;
+}
+.van-dialog .van-button {
+  font-size: 18px;
+  line-height: 26px;
+}
+
+.van-dialog  .van-button--default {
+  color: #171826;
+}
+
+.van-toast {
+  max-width: 4.2rem;
+  line-height: 1.6;
+}
+
+/* vant-custom */
+.j-confirm-dialog {
+  border-radius: 8px;
+}
+.j-confirm-dialog .van-dialog__message {
+  font-size: .32rem;
+  color: #171826;
+  line-height: .48rem;
+  text-align: left;
+}
+.j-confirm-dialog.text-center .van-dialog__message {
+  text-align: center;
+}
+.j-confirm-dialog .van-button {
+  font-size: .36rem;
+  color: #171826;
+  line-height: .52rem;
+}
+
+/* vant-reset上拉加载下拉刷新 */
+.van-pull-refresh {
+  flex: 1;
+}
+
+/* empty */
+.empty-container {
+  display: flex;
+  flex-direction: column;
+  align-items: center;
+  justify-content: center;
+  flex: 1;
+  height: 80%;
+  padding: .32rem;
+  box-sizing: border-box;
+  background-color: rgba(245, 244, 249, 1);
+}
+.empty-main,
+.empty-content-position {
+  display: flex;
+  align-items: center;
+  flex-direction: column;
+  justify-content: center;
+}
+
+.empty-content-position {
+  margin-top: -1rem;
+}
+
+.empty-container .tip-text {
+  margin-top: .2rem;
+  color: #5F5E64;
+  font-size: .28rem;
+  line-height: .4rem;
+  text-align: center;
+}
+
+.empty-container .tip-sub-text {
+  color: #9B9CA3;
+  font-size: .26rem;
+  line-height: .4rem;
+  margin-top: .12rem;
+  text-align: center;
+}
+
+.empty-container .image {
+  width: 3.2rem;
+  height: 3.2rem;
+}
+.empty-container .image > img {
+  width: 100%;
+  height: 100%;
+}
+
+
+/* 订单列表卡片部分 */
+.click-active:active {
+  background-color: rgba(0,0,0,.02);
+}
+.j-order-card {
+  border-radius: .16rem;
+  background-color: #fff;
+}
+.order-list {
+  border-top: 1px solid transparent;
+}
+.order-list-item {
+  display: flex;
+  flex-direction: column;
+  justify-content: space-between;
+  margin: .32rem;
+  overflow: hidden;
+}
+.order-list-item:not(:last-of-type) {
+  margin-bottom: 0;
+}
+.order-item-header,
+.order-item-content,
+.order-item-footer {
+  display: flex;
+  padding: 0 .32rem;
+}
+.order-item-header {
+  align-items: center;
+  justify-content: space-between;
+  height: .84rem;
+  border-bottom: 1px solid rgba(0,0,0,.05);
+}
+.order-item-content {
+  padding-top: .24rem;
+  padding-bottom: .24rem;
+  min-height: 1.92rem;
+  flex: 1;
+}
+.order-item-footer {
+  flex-direction: column;
+}
+
+.o-i-h-left {
+  display: flex;
+  align-items: center;
+  color: #9B9CA3;
+  font-size: .28rem;
+  line-height: .4rem;
+}
+.o-i-h-right {
+  display: flex;
+  align-items: center;
+}
+.o-i-h-right .van-icon {
+  font-size: .32rem;
+}
+.order-state-text {
+  display: flex;
+  align-items: center;
+  margin-right: .2rem;
+  font-size: .3rem;
+  white-space: nowrap;
+}
+.notpay {
+  color: #ffb900;
+}
+.refund {
+  color: #FE737A;
+}
+.finish {
+  color: #2ABED1;
+}
+.cancel {
+  color: #686868;
+}
+
+.o-i-price-container {
+  display: flex;
+  align-items: center;
+  justify-content: flex-end;
+  flex-wrap: wrap;
+  min-height: .64rem;
+}
+.o-i-price-container [class$=price] {
+  display: flex;
+  align-items: center;
+  margin-left: .1rem;
+  white-space: nowrap;
+}
+.discount-info {
+  height: .34rem;
+  padding: 0 .12rem;
+  font-size: .2rem;
+  color: #5F5E64;
+  border: 1px solid rgba(0,0,0,.1);
+  border-radius: .16rem;
+}
+.o-i-price-container .discount-price {
+  border-color: rgba(251, 72, 61, 0.1);
+  color: #FB483D;
+  background-color: rgba(251, 72, 61, 0.1);
+}
+.pay-price {
+  color: #171826;
+  font-size: .36rem;
+  font-weight: 700;
+}
+.pay-price .text {
+  margin-right: .04rem;
+  font-size: .24rem;
+  font-weight: 500;
+}
+
+.o-i-f-button-group {
+  display: flex;
+  align-items: center;
+  justify-content: flex-end;
+  flex-wrap: wrap;
+  padding-bottom: .32rem;
+}
+.o-i-f-button-group .order-action-button {
+  margin-top: .32rem;
+  margin-left: .24rem;
+}
+.o-i-f-button-group .order-action-button:first-of-type {
+  margin-left: 0;
+}
+.order-action-button {
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  padding: 0 .4rem;
+  height: .64rem;
+  font-size: .3rem;
+  line-height: .44rem;
+  color: #5F5E64;
+  border: 1px solid rgba(0, 0, 0, 0.1);
+  border-radius: .36rem;
+  background-color: transparent;
+  white-space: nowrap;
+}
+.order-action-button.main-color {
+  color: #2ABED1;
+  border-color: #2ABED1;
+}
+.order-item-content .img-container {
+  width: 1.15rem;
+  height: 1.15rem;
+  margin-right: .2rem;
+}
+.img-container > img {
+  display: block;
+  width: 100%;
+}
+
+.content-list {
+  flex: 1;
+  max-width: 72%;
+  font-size: .24rem;
+  line-height: .4rem;
+}
+.content-list-item {
+  flex: 1;
+}

+ 253 - 0
src/web/staticres/common-module/order-list/js/order-list-config-app.js

@@ -0,0 +1,253 @@
+var assetsConf = {
+  platform: 'app',
+  getPlatform: function () {
+    var platform = 'app'
+    try {
+      platform = utils.isWeiXinBrowser ? 'wx' : 'app'
+    } catch (error) {}
+    this.platform = platform
+    console.log('platform: ' + this.platform)
+  },
+  // 开发票
+  invokeLink: {
+    invoke: { // 开发票
+      wx: '/front/invoice/showpage',
+      app: '/jyapp/front/invoice/showpage'
+    },
+    cantInvoke: {  // 开发票超时(不能开发票)
+      wx: '/front/invoice/cantInvoice',
+      app: '/jyapp/front/invoice/cantInvoice'
+    },
+    lookInvoice: {
+      wx: '/front/invoice/check_invoice.html',
+      app: '/jyapp/front/invoice/check_invoice.html'
+    }
+  },
+  // 数据导出(历史数据)
+  dataExportLink: {
+    pay: {
+      wx: '/weixin/pay/checkout_dataexport',
+      app: '/jyapp/pay/checkout_dataexport'
+    },
+    buyAgain: {
+      wx: '/front/wx_dataExport/toSieve',
+      app: '/jyapp/front/dataExport/toSieve'
+    },
+    orderDetail: {
+      wx: '/front/wx_dataExport/wxToOrderDetail',
+      app: '/jyapp/front/dataExport/toOrderDetail'
+    },
+    imgMap: {
+      headerImg: {
+        wx: '/dataExport/image/dataOutput.png',
+        app: '/jyapp/images/myorder/dataOutput.png'
+      }
+    }
+  },
+  // VIP订阅
+  vipSubLink: {
+    pay: {
+      wx: '/weixin/pay/checkout_subvip',
+      app: '/jyapp/pay/checkout_subvip'
+    },
+    renew: {
+      wx: '/front/vipsubscribe/vipsubscribe_renew',
+      app: '/jyapp/vipsubscribe/vipsubscribe_renew'
+    },
+    buyAgain: {
+      wx: '/front/vipsubscribe/vipsubscribe_new',
+      app: '/jyapp/vipsubscribe/vipsubscribe_new'
+    },
+    orderDetail: {
+      wx: '/front/vipsubscribe/toOrderDetailPage',
+      app: '/jyapp/vipsubscribe/toOrderDetailPage'
+    },
+    imgMap: {
+      headerImg: {
+        wx: '/vipsubscribe/image/vipBook.png',
+        app: '/jyapp/vipsubscribe/image/vipBook.png'
+      }
+    }
+  },
+  // 中标必听课
+  courseLink: {
+    pay: {
+      wx: '/weixin/pay/checkout_onlineCourse',
+      app: '/jyapp/pay/checkout_onlineCourse'
+    },
+    orderDetail: {
+      wx: '/weixin/pay/xs_payNow',
+      app: '/jyxsapp/orderMsg'
+    },
+    imgMap: {
+      headerImg: {
+        wx: '/course/image/lessonsOnline.png',
+        app: '/jyapp/course/image/lessonsOnline.png'
+      }
+    }
+  },
+  // 数据报告
+  dataReportLink: {
+    pay: {
+      wx: '/weixin/pay/datareport',
+      app: '/datareport/page/pay'
+    },
+    orderDetail: {
+      wx: '/datareport/page/order/detail',
+      app: '/datareport/page/order/detail'
+    },
+    imgMap: {
+      headerImg: {
+        wx: '/images/pc/report_icon.png',
+        app: '/jyapp/me/images/report_icon.png'
+      }
+    }
+  },
+  // 企业商机管理(仅app)
+  entnicheLink: {
+    pay: {
+      app: '/jyapp/pay/checkout_entniche'
+    },
+    orderDetail: {
+      app: '/jyapp/front/myorder/toEntnicheDetail'
+    },
+    buyAgain: {
+      app: '/page_entniche/page/buy_production/renew_production.html'
+    },
+    imgMap: {
+      headerImg: {
+        app: '/jyapp/entniche/image/enterprise.png'
+      }
+    }
+  },
+  // 大会员
+  bigMemberLink: {
+    pay: {
+      wx: '/weixin/pay/checkout_member',
+      app: '/jyapp/pay/checkout_member'
+    },
+    orderDetail: {
+      wx: '/front/wxMyOrder/memberDetail', // url+ '/' +  orderCode 拼参数
+      app: '/jyapp/big/page/orderdetail_member'
+    },
+    imgMap: {
+      // 专家版
+      1: {
+        wx: '/order/image/dahuiyuan1.png',
+        app: '/jyapp/big-member/image/dahuiyuan1.png'
+      },
+      // 智慧版
+      2: {
+        wx: '/order/image/dahuiyuan3.png',
+        app: '/jyapp/big-member/image/dahuiyuan3.png'
+      },
+      // 商机版
+      3: {
+        wx: '/order/image/dahuiyuan2.png',
+        app: '/jyapp/big-member/image/dahuiyuan2.png'
+      },
+      // 试用版
+      4: {
+        wx: '/order/image/dahuiyuan4.png',
+        app: '/jyapp/big-member/image/dahuiyuan4.png'
+      },
+      // 自定义
+      5: {
+        wx: '/order/image/dahuiyuan1.png',
+        app: '/jyapp/big-member/image/dahuiyuan1.png'
+      }
+    }
+  },
+  // 大会员-补充包/大会员-AI中标预测包/大会员-招标文件解读(仅app)
+  bigMemberSupplyPackLink: {
+    // 大会员-补充包/大会员-AI中标预测包
+    pay: {
+      wx: '/weixin/pay/checkout_aiForecastPack',
+      app: '/jyapp/pay/checkout_aiForecastPack'
+    },
+    // 大会员-招标文件解读支付
+    pay2: {
+      wx: '/weixin/pay/checkout_bidfile',
+      app: '/jyapp/pay/checkout_bidfile'
+    },
+    orderDetail: {
+      wx: '/front/wxMyOrder/aiForecastPackdetail',  // url+ '/' +  orderCode 拼参数
+      app: '/jyapp/big/page/orderdetail_aiForecastPack'
+    },
+    imgMap: {
+      headerImg: {
+        wx: '/order/image/buchongbao.png',
+        app: '/jyapp/big-member/image/buchongbao.png'
+      }
+    }
+  },
+  // 子账号
+  bigMemberSubAccountLink: {
+    pay: {
+      wx: '/weixin/pay/checkout_member',
+      app: '/jyapp/pay/checkout_member'
+    },
+    orderDetail: {
+      wx: '/front/wxMyOrder/subAccountDetail',  // url+ '/' +  orderCode 拼参数
+      app: '/jyapp/big/page/orderdetail_subAccount'
+    },
+    imgMap: {
+      // 专家版
+      1: {
+        wx: '/order/image/zizhanghao1.png',
+        app: '/jyapp/big-member/image/zizhanghao1.png'
+      },
+      // 智慧版
+      2: {
+        wx: '/order/image/zizhanghao3.png',
+        app: '/jyapp/big-member/image/zizhanghao3.png'
+      },
+      // 商机版
+      3: {
+        wx: '/order/image/zizhanghao2.png',
+        app: '/jyapp/big-member/image/zizhanghao2.png'
+      },
+      // 自定义
+      5: {
+        wx: '/order/image/zizhanghao1.png',
+        app: '/jyapp/big-member/image/dahuiyuan1.png'
+      }
+    }
+  },
+  // 招标文件解读
+  zbFileAnalysisLink: {
+    pay: {
+      wx: '/weixin/pay/checkout_bidfile',
+      app: '/jyapp/pay/checkout_bidfile'
+    },
+    orderDetail: {
+      wx: '/front/wxMyOrder/bidfileDetail', // url+ '/' +  orderCode 拼参数
+      app: '/jyapp/front/myorder/toBidfileDetail'
+    },
+    imgMap: {
+      headerImg: {
+        wx: '/order/image/zbwjjd_new.png',
+        app: '/jyapp/commonPay/image/zbwjjd_new.png'
+      }
+    }
+  },
+  // 剑鱼币
+  jianyuCoinLink: {
+    pay: {
+      wx: '/weixin/pay/checkout_integral',
+      app: '/jyapp/pay/checkout_integral'
+    },
+    orderDetail: {
+      wx: '/front/wxMyOrder/integralDetail', // url+ '/' +  orderCode 拼参数
+      app: '/jyapp/front/myorder/tointegralDetail'
+    },
+    imgMap: {
+      headerImg: {
+        wx: '/order/image/jianyubi.png',
+        app: '/jyapp/commonPay/image/jianyubi.png'
+      }
+    }
+  }
+}
+
+// assetsConf.getPlatform() 

+ 253 - 0
src/web/staticres/common-module/order-list/js/order-list-config-wx.js

@@ -0,0 +1,253 @@
+var assetsConf = {
+  platform: 'wx',
+  getPlatform: function () {
+    var platform = 'app'
+    try {
+      platform = utils.isWeiXinBrowser ? 'wx' : 'app'
+    } catch (error) {}
+    this.platform = platform
+    console.log('platform: ' + this.platform)
+  },
+  // 开发票
+  invokeLink: {
+    invoke: { // 开发票
+      wx: '/front/invoice/showpage',
+      app: '/jyapp/front/invoice/showpage'
+    },
+    cantInvoke: {  // 开发票超时(不能开发票)
+      wx: '/front/invoice/cantInvoice',
+      app: '/jyapp/front/invoice/cantInvoice'
+    },
+    lookInvoice: {
+      wx: '/front/invoice/check_invoice.html',
+      app: '/jyapp/front/invoice/check_invoice.html'
+    }
+  },
+  // 数据导出(历史数据)
+  dataExportLink: {
+    pay: {
+      wx: '/weixin/pay/checkout_dataexport',
+      app: '/jyapp/pay/checkout_dataexport'
+    },
+    buyAgain: {
+      wx: '/front/wx_dataExport/toSieve',
+      app: '/jyapp/front/dataExport/toSieve'
+    },
+    orderDetail: {
+      wx: '/front/wx_dataExport/wxToOrderDetail',
+      app: '/jyapp/front/dataExport/toOrderDetail'
+    },
+    imgMap: {
+      headerImg: {
+        wx: '/dataExport/image/dataOutput.png',
+        app: '/jyapp/images/myorder/dataOutput.png'
+      }
+    }
+  },
+  // VIP订阅
+  vipSubLink: {
+    pay: {
+      wx: '/weixin/pay/checkout_subvip',
+      app: '/jyapp/pay/checkout_subvip'
+    },
+    renew: {
+      wx: '/front/vipsubscribe/vipsubscribe_renew',
+      app: '/jyapp/vipsubscribe/vipsubscribe_renew'
+    },
+    buyAgain: {
+      wx: '/front/vipsubscribe/vipsubscribe_new',
+      app: '/jyapp/vipsubscribe/vipsubscribe_new'
+    },
+    orderDetail: {
+      wx: '/front/vipsubscribe/toOrderDetailPage',
+      app: '/jyapp/vipsubscribe/toOrderDetailPage'
+    },
+    imgMap: {
+      headerImg: {
+        wx: '/vipsubscribe/image/vipBook.png',
+        app: '/jyapp/vipsubscribe/image/vipBook.png'
+      }
+    }
+  },
+  // 中标必听课
+  courseLink: {
+    pay: {
+      wx: '/weixin/pay/checkout_onlineCourse',
+      app: '/jyapp/pay/checkout_onlineCourse'
+    },
+    orderDetail: {
+      wx: '/weixin/pay/xs_payNow',
+      app: '/jyxsapp/orderMsg'
+    },
+    imgMap: {
+      headerImg: {
+        wx: '/course/image/lessonsOnline.png',
+        app: '/jyapp/course/image/lessonsOnline.png'
+      }
+    }
+  },
+  // 数据报告
+  dataReportLink: {
+    pay: {
+      wx: '/weixin/pay/datareport',
+      app: '/datareport/page/pay'
+    },
+    orderDetail: {
+      wx: '/datareport/page/order/detail',
+      app: '/datareport/page/order/detail'
+    },
+    imgMap: {
+      headerImg: {
+        wx: '/images/pc/report_icon.png',
+        app: '/jyapp/me/images/report_icon.png'
+      }
+    }
+  },
+  // 企业商机管理(仅app)
+  entnicheLink: {
+    pay: {
+      app: '/jyapp/pay/checkout_entniche'
+    },
+    orderDetail: {
+      app: '/jyapp/front/myorder/toEntnicheDetail'
+    },
+    buyAgain: {
+      app: '/page_entniche/page/buy_production/renew_production.html'
+    },
+    imgMap: {
+      headerImg: {
+        app: '/jyapp/entniche/image/enterprise.png'
+      }
+    }
+  },
+  // 大会员
+  bigMemberLink: {
+    pay: {
+      wx: '/weixin/pay/checkout_member',
+      app: '/jyapp/pay/checkout_member'
+    },
+    orderDetail: {
+      wx: '/front/wxMyOrder/memberDetail', // url+ '/' +  orderCode 拼参数
+      app: '/jyapp/big/page/orderdetail_member'
+    },
+    imgMap: {
+      // 专家版
+      1: {
+        wx: '/order/image/dahuiyuan1.png',
+        app: '/jyapp/big-member/image/dahuiyuan1.png'
+      },
+      // 智慧版
+      2: {
+        wx: '/order/image/dahuiyuan3.png',
+        app: '/jyapp/big-member/image/dahuiyuan3.png'
+      },
+      // 商机版
+      3: {
+        wx: '/order/image/dahuiyuan2.png',
+        app: '/jyapp/big-member/image/dahuiyuan2.png'
+      },
+      // 试用版
+      4: {
+        wx: '/order/image/dahuiyuan4.png',
+        app: '/jyapp/big-member/image/dahuiyuan4.png'
+      },
+      // 自定义
+      5: {
+        wx: '/order/image/dahuiyuan1.png',
+        app: '/jyapp/big-member/image/dahuiyuan1.png'
+      }
+    }
+  },
+  // 大会员-补充包/大会员-AI中标预测包/大会员-招标文件解读(仅app)
+  bigMemberSupplyPackLink: {
+    // 大会员-补充包/大会员-AI中标预测包
+    pay: {
+      wx: '/weixin/pay/checkout_aiForecastPack',
+      app: '/jyapp/pay/checkout_aiForecastPack'
+    },
+    // 大会员-招标文件解读支付
+    pay2: {
+      wx: '/weixin/pay/checkout_bidfile',
+      app: '/jyapp/pay/checkout_bidfile'
+    },
+    orderDetail: {
+      wx: '/front/wxMyOrder/aiForecastPackdetail',  // url+ '/' +  orderCode 拼参数
+      app: '/jyapp/big/page/orderdetail_aiForecastPack'
+    },
+    imgMap: {
+      headerImg: {
+        wx: '/order/image/buchongbao.png',
+        app: '/jyapp/big-member/image/buchongbao.png'
+      }
+    }
+  },
+  // 子账号
+  bigMemberSubAccountLink: {
+    pay: {
+      wx: '/weixin/pay/checkout_member',
+      app: '/jyapp/pay/checkout_member'
+    },
+    orderDetail: {
+      wx: '/front/wxMyOrder/subAccountDetail',  // url+ '/' +  orderCode 拼参数
+      app: '/jyapp/big/page/orderdetail_subAccount'
+    },
+    imgMap: {
+      // 专家版
+      1: {
+        wx: '/order/image/zizhanghao1.png',
+        app: '/jyapp/big-member/image/zizhanghao1.png'
+      },
+      // 智慧版
+      2: {
+        wx: '/order/image/zizhanghao3.png',
+        app: '/jyapp/big-member/image/zizhanghao3.png'
+      },
+      // 商机版
+      3: {
+        wx: '/order/image/zizhanghao2.png',
+        app: '/jyapp/big-member/image/zizhanghao2.png'
+      },
+      // 自定义
+      5: {
+        wx: '/order/image/zizhanghao1.png',
+        app: '/jyapp/big-member/image/dahuiyuan1.png'
+      }
+    }
+  },
+  // 招标文件解读
+  zbFileAnalysisLink: {
+    pay: {
+      wx: '/weixin/pay/checkout_bidfile',
+      app: '/jyapp/pay/checkout_bidfile'
+    },
+    orderDetail: {
+      wx: '/front/wxMyOrder/bidfileDetail', // url+ '/' +  orderCode 拼参数
+      app: '/jyapp/front/myorder/toBidfileDetail'
+    },
+    imgMap: {
+      headerImg: {
+        wx: '/order/image/zbwjjd_new.png',
+        app: '/jyapp/commonPay/image/zbwjjd_new.png'
+      }
+    }
+  },
+  // 剑鱼币
+  jianyuCoinLink: {
+    pay: {
+      wx: '/weixin/pay/checkout_integral',
+      app: '/jyapp/pay/checkout_integral'
+    },
+    orderDetail: {
+      wx: '/front/wxMyOrder/integralDetail', // url+ '/' +  orderCode 拼参数
+      app: '/jyapp/front/myorder/tointegralDetail'
+    },
+    imgMap: {
+      headerImg: {
+        wx: '/order/image/jianyubi.png',
+        app: '/jyapp/commonPay/image/jianyubi.png'
+      }
+    }
+  }
+}
+
+// assetsConf.getPlatform()

+ 1899 - 0
src/web/staticres/common-module/order-list/js/order-list.js

@@ -0,0 +1,1899 @@
+var vm = new Vue({
+  delimiters: ['${', '}'],
+  el: '#app',
+  data: {
+    platform: assetsConf.platform,
+    sessStorageKey: '$data-order_list',
+    tabActiveName: 'payOrderAll',
+    productTypeList: [
+      '历史数据',
+      'VIP订阅',
+      '中标必听课',
+      '数据报告',
+      '企业商机管理',
+      '大会员',
+      '大会员-补充包',
+      '大会员-AI中标预测包',
+      '大会员-招标文件解读',
+      '大会员-子账号',
+      '招标文件解读',
+      '剑鱼币'
+    ],
+    prodConf: {
+      // 支持再次购买的产品product_type
+      canBuyAgain: [
+        '历史数据'
+      ],
+      // 支持开发票的产品product_type
+      canInvoke: [
+        '历史数据',
+        '超级订阅',
+        '中标必听课',
+        '数据报告',
+        '企业商机管理',
+        '大会员',
+        '大会员-补充包',
+        '大会员-AI中标预测包',
+        '大会员-招标文件解读',
+        '大会员-子账号',
+        '招标文件解读',
+        '剑鱼币'
+      ],
+      // 销售渠道产品product_type
+      transformProductions: [
+        '大会员',
+        '大会员-补充包',
+        '大会员-AI中标预测包',
+        '大会员-招标文件解读',
+        '大会员-子账号',
+      ]
+    },
+    tabList: [
+      {
+        label: '全部',
+        name: 'payOrderAll',
+        type: 0
+      },
+      {
+        label: '待付款',
+        name: 'payWaiting',
+        type: 1
+      },
+      {
+        label: '已完成',
+        name: 'paySuccess',
+        type: 2
+      },
+      {
+        label: '已取消',
+        name: 'payCancel',
+        type: 3
+      }
+    ],
+    tabConf: {
+      titleActiveColor: '#2ABED1',
+      titleInactiveColor: '#5F5E64',
+      lineWidth: '24',
+      color: '#2ABED1'
+    },
+    // 列表数据
+    tabStateMap: {
+      // 全部订单
+      payOrderAll: {
+        refreshing: false, // 是否正在刷新
+        loaded: false, // 是否已经完成加载
+        loading: false, // 是否正在请求
+        finished: false,
+        pageNum: 1, // 当前页码
+        pageSize: 10, // 每页多少条数据
+        offset: 80,
+        scrollTop: 0,
+        list: []
+      },
+      // 待付款
+      payWaiting: {
+        refreshing: false,
+        loaded: false,
+        loading: false,
+        finished: false,
+        pageNum: 1,
+        pageSize: 10,
+        offset: 80,
+        scrollTop: 0,
+        list: []
+      },
+      // 已完成
+      paySuccess: {
+        refreshing: false,
+        loaded: false,
+        loading: false,
+        finished: false,
+        pageNum: 1,
+        pageSize: 10,
+        offset: 80,
+        scrollTop: 0,
+        list: []
+      },
+      // 已完成
+      payCancel: {
+        refreshing: false,
+        loaded: false,
+        loading: false,
+        finished: false,
+        pageNum: 1,
+        pageSize: 10,
+        offset: 80,
+        scrollTop: 0,
+        list: []
+      }
+    }
+  },
+  computed: {
+    tabState: function () {
+      return this.tabStateMap[this.tabActiveName]
+    },
+    tabActive: function () {
+      var _this = this
+      var active = {}
+      this.tabList.some(function (item) {
+        var findThis = item.name === _this.tabActiveName
+        if (findThis)  {
+          active = item
+          return findThis
+        }
+      })
+      return active
+    }
+  },
+  watch: {
+    tabActiveName: function () {
+      this.setScrollTop(this.tabState.scrollTop)
+      this.setUrlQuery()
+    }
+  },
+  created: function () {
+    var active = utils.getParam('active')
+    var tab = utils.getParam('tab')
+    if (active !== '' && active < this.tabList.length) {
+      this.tabActiveName = this.tabList[active].name
+    } else if (tab !== '' && tab < this.tabList.length) {
+      this.tabActiveName = this.tabList[tab].name
+    }
+
+    this.reStoreState()
+  },
+  mounted: function () {
+    utils.iosBackRefresh()
+  },
+  methods: {
+    setUrlQuery: function () {
+      var index = this.tabActive.type
+      var active = utils.getParam('active')
+      var tab = utils.getParam('tab')
+      var url = ''
+      if (tab !== '') {
+        url = '?tab=' + index
+      } else {
+        url = '?active=' + index
+      }
+      history.replaceState({ info: 'change query' }, null, url)
+    },
+    showLoading: function () {
+      return this.$toast.loading({
+        duration: 0,
+        forbidClick: true,
+        message: 'loading...',
+      })
+    },
+    showToast: function (message) {
+      return this.$toast({
+        duration: 1500,
+        forbidClick: true,
+        message: message,
+      })
+    },
+    showDialog: function (conf) {
+      var defaultConf = {
+        title: '提示',
+        message: 'message',
+        className: 'j-confirm-dialog',
+        showConfirmButton: true,
+        showCancelButton: true,
+        confirmButtonText: '确定',
+        confirmButtonColor: '#2abed1'
+      }
+      if (conf) {
+        Object.assign(defaultConf, conf)
+      }
+      return this.$dialog.confirm(defaultConf)
+    },
+    // 客服电话
+    showCustomPhone: function (conf) {
+      return this.showDialog({
+        title: '',
+        message: '客服电话400-108-6670',
+        className: 'j-confirm-dialog text-center',
+        showCancelButton: false,
+        confirmButtonText: '我知道了'
+      })
+    },
+    resetState: function (type) {
+      var rState = {
+        refreshing: false,
+        loaded: false,
+        loading: false,
+        finished: false,
+        pageNum: 1,
+        pageSize: 10,
+        scrollTop: 0,
+        list: []
+      }
+
+      if (type === 0) {
+        Object.assign(this.tabStateMap.payOrderAll, rState)
+      } else if (type === 1) {
+        Object.assign(this.tabStateMap.payWaiting, rState)
+      } else if (type === 2) {
+        Object.assign(this.tabStateMap.paySuccess, rState)
+      } else if (type === 3) {
+        Object.assign(this.tabStateMap.payCancel, rState)
+      } else if (type === -1) {
+        this.resetState(0)
+        this.resetState(1)
+        this.resetState(2)
+        this.resetState(3)
+      }
+    },
+    onLoad: function () {
+      var _this = this
+      var t = this.tabState
+      var query = {
+        fromPage: this.platform,
+        pageNum: t.pageNum,
+        page_size: t.pageSize,
+        type: this.tabActive.type  // 0全部 1未支付 2已支付 3已取消
+      }
+      console.log('查询参数:', query)
+
+      t.loading = true
+
+      $.ajax({
+        type: 'POST',
+        url: '/subscribepay/orderListDetails/myOrder?t=' + Date.now(),
+        data: query,
+        success: function (res) {
+          if (res) {
+            // 判断是否为刷新
+            if (t.refreshing) {
+              t.list = []
+              t.refreshing = false
+            }
+
+            // 列表赋值
+            var list = res.res
+            if (Array.isArray(list)) {
+              _this.preSortList(list)
+              t.list = t.list.concat(list)
+            }
+
+            // 加载状态结束
+            t.loaded = true
+            t.loading = false
+
+            // 翻页
+            if (res.hasNextPage) {
+              t.pageNum++
+            } else {
+              t.finished = true
+            }
+          } else {
+            t.loaded = true
+            t.loading = false
+            t.finished = true
+            _this.$toast('请求失败')
+          }
+        },
+        error: function (error) {
+          console.log(error)
+        }
+      })
+    },
+    onRefresh: function () {
+      // 重置数据
+      this.tabState.pageNum = 0
+      // 解除加载完成状态
+      this.tabState.finished = false
+      // 重新加载数据
+      // 将 loading 设置为 true,表示处于加载状态
+      this.tabState.loading = true
+      // 请求数据
+      this.onLoad()
+    },
+    // 预处理订单列表内容
+    preSortList: function (list) {
+      var _this = this
+      var tList = []
+      if (!Array.isArray(list)) return tList
+      list.forEach(function (item) {
+        if (item.product_type === 'vip订阅') {
+          // item.product_type = item.product_type.toUpperCase()
+          item.product_type = 'VIP订阅'
+        }
+
+        // 计算订单状态和订单状态文字对应的className
+        var calcOrderState = _this.calcOrderState(item)
+        // 计算卡片金额和展示信息
+        var calcContentInfo = _this.calcOrderContentInfo(item)
+        // 卡片底部按钮显示隐藏
+        item.buttonConf = _this.orderItemBottomButton(item)
+        item.stateClassName = calcOrderState.className
+        item.stateText = calcOrderState.stateText
+        if (calcContentInfo) {
+          for (var key in calcContentInfo) {
+            item[key] = calcContentInfo[key]
+          }
+        }
+      })
+    },
+    setScrollTop: function (scrollTop) {
+      this.$nextTick(function () {
+        var wrapper = document.querySelector('.van-tabs__content')
+        wrapper.scrollTop = scrollTop
+      })
+    },
+    saveScrollTop: function () {
+      var wrapper = document.querySelector('.van-tabs__content')
+      if (wrapper.scrollTop) {
+        this.tabState.scrollTop = parseInt(wrapper.scrollTop)
+      }
+    },
+    beforeTabChange: function () {
+      this.saveScrollTop()
+      return true
+    },
+    // 保存页面状态
+    saveState: function () {
+      this.saveScrollTop()
+      var $data = {
+        tabActiveName: this.tabActiveName,
+        tabStateMap: this.tabStateMap
+      }
+      sessionStorage.setItem(this.sessStorageKey, JSON.stringify($data))
+    },
+    reStoreState: function () {
+      var $data = sessionStorage.getItem(this.sessStorageKey)
+      if ($data) {
+        $data = JSON.parse($data)
+        this.tabActiveName = $data.tabActiveName || 0
+        Object.assign(this.tabStateMap, $data.tabStateMap)
+        sessionStorage.removeItem(this.sessStorageKey)
+      }
+
+      return $data
+    },
+    // 删除订单
+    delThisOrder: function (order, index) {
+      var _this = this
+      this.showDialog({
+        title: '确定删除订单',
+        message: '确定删除订单,删除后无法恢复',
+        confirmButtonColor: '#FB483D',
+        className: 'j-confirm-dialog text-center',
+      }).then(function () {
+        console.log('确认删除订单')
+        _this.delThisOrderConfirmed(order, index)
+      })
+      .catch(function() {
+        console.log('取消删除订单')
+      })
+    },
+    // 删除订单确认
+    delThisOrderConfirmed: function (order, index) {
+      var _this = this
+      var data = {
+        fromPage: this.platform,
+        id: order.id,
+        pageNum: this.tabState.pageNum,
+        type: this.tabActive.type
+      }
+      $.ajax({
+        type: 'POST',
+        url: '/subscribepay/orderListDetails/deleteOrder',
+        data: data,
+        success: function (res) {
+          if (res.success) {
+            // 将该数据从列表删除
+            _this.tabState.list.splice(index, 1)
+            if (_this.tabActive.type === 0) {
+              _this.resetState(1)
+              _this.resetState(2)
+              _this.resetState(3)
+            } else {
+              _this.resetState(0)
+            }
+            _this.showToast('删除成功')
+          } else {
+            _this.showToast('删除失败,请联系管理员')
+          }
+        }
+      })
+    },
+    // 取消订单
+    cancelThisOrder: function (order, index) {
+      var _this = this
+      this.showDialog({
+        title: '确定取消订单',
+        message: '确定取消订单,取消后无法恢复',
+        confirmButtonColor: '#FB483D',
+        className: 'j-confirm-dialog text-center',
+      }).then(function () {
+        console.log('确认取消订单')
+        _this.cancelThisOrderConfirmed(order, index)
+      })
+      .catch(function() {})
+    },
+    // 取消订单确认
+    cancelThisOrderConfirmed: function (order, index) {
+      var _this = this
+      var data = {
+        fromPage: this.platform,
+        id: order.id,
+        pageNum: this.tabState.pageNum,
+        type: this.tabActive.type,
+        cancel: 'cancel'
+      }
+      $.ajax({
+        type: 'POST',
+        url: '/subscribepay/orderListDetails/deleteOrder',
+        data: data,
+        success: function (res) {
+          if (res.success) {
+            _this.tabState.list.splice(index, 1)
+            if (_this.tabActive.type === 0) {
+              _this.resetState(1)
+              _this.resetState(3)
+            } else if (_this.tabActive.type === 1) {
+              _this.resetState(0)
+              _this.resetState(3)
+            }
+            // 取消成功,分页从第一页开始
+            _this.showToast('取消成功')
+          } else {
+            _this.showToast('取消失败,请联系管理员')
+          }
+        }
+      })
+    },
+    // 格式化订单创建时间
+    calcTime: function (item) {
+      if (!item.create_time) return ''
+      var createTime = item.create_time
+      createTime = createTime.replace(/-/g, '/')
+      return new Date(createTime).pattern('yyyy.MM.dd HH:mm:ss')
+    },
+    // 计算订单状态和订单状态文字对应的className
+    calcOrderState: function (order) {
+      var orderStatus = order.order_status
+      var productType = order.product_type
+      var filterInfo = JSON.parse(order.filter)
+      var customPayProduction = [
+        '大会员',
+        '大会员-补充包',
+        '大会员-AI中标预测包',
+        '大会员-招标文件解读',
+        '大会员-子账号'
+      ]
+      var orderStateMap = {
+        0: '待付款',
+        1: '已完成',
+        '-2': '已取消',
+        '-3': '已取消'
+      }
+      var classNameMap = {
+        0: 'notpay',
+        1: 'finish',
+        '-2': 'cancel',
+        '-3': 'cancel'
+      }
+
+      var stateText = orderStateMap[orderStatus]
+      var className = classNameMap[orderStatus]
+
+      if (orderStatus === 0) {
+        if (order.pay_way === 'transferAccounts') {
+          className = 'refund'
+          if (order.course_status === 2) {
+            stateText = '转账审核中'
+          } else if (order.course_status === 3) {
+            stateText = '未收到转账'
+          }
+        }
+      } else if (orderStatus === 1) {
+        if (customPayProduction.indexOf(productType) !== -1) {
+          var customIsAll = 0
+          if (filterInfo.isAll) {
+            customIsAll = filterInfo.isAll
+          }
+          if (customIsAll === 2){
+            stateText = '待付款'
+            className = 'notpay'
+          }else if (customIsAll == 3) {
+            stateText = '待付完'
+            className = 'notpay'
+          }
+        }
+      }
+
+      return {
+        className: className,
+        stateText: stateText
+      }
+    },
+    // 计算卡片金额和展示信息
+    calcOrderContentInfo: function (order) {
+      var productType = order.product_type
+      // 订单状态 0待支付 1已完成 -1删除
+      // 已完成订单 开发票判断  0未申请  1已申请
+      var orderStatus = order.order_status
+      var platform = this.platform
+      var info = {
+        contentImgUrl: '',
+        contentList: [],
+        totalPrice: '', // 总价格(使用优惠券订单显示)
+        discountPrice: '', // 优惠金额(使用优惠券订单显示)
+        payPrice: '' // 实付金额
+      }
+
+      // 优惠金额计算
+      if ((orderStatus === 0 || orderStatus === 1) && order.discount_price > 0) {
+        info.discountPrice = order.discount_price
+        info.totalPrice = Number(order.order_money) + Number(order.discount_price)
+      }
+      info.payPrice = utils.formatMoney(order.order_money)
+
+      switch (productType) {
+        case '历史数据': {
+          try {
+            info.contentImgUrl = assetsConf.dataExportLink.imgMap.headerImg[platform]
+            info.contentList = this.getHistoryDataInfoList(order)
+          } catch (error) {
+            info.contentList = []
+            console.log(error)
+          }
+          break
+        }
+        case 'VIP订阅': {
+          var filter_vip = JSON.parse(order.filter)
+          try {
+            info.contentImgUrl = assetsConf.vipSubLink.imgMap.headerImg[platform]
+            info.contentList = this.getVipSubInfoList(order)
+          } catch (error) {
+            info.contentList = []
+            console.log(error)
+          }
+
+          // 金额计算
+          var liveActive = order.isLiveActive
+          var originalPrice = filter_vip.original_price
+          if (originalPrice) {
+            info.totalPrice = ''
+            info.discountPrice = ''
+            // 是否有购买超级订阅直接赠送订阅周期的情况
+            info.payPrice = utils.formatMoney(originalPrice / 100)
+          } else if (liveActive) {
+            // 直播活动订单
+            info.totalPrice = ''
+            info.discountPrice = ''
+            info.payPrice = utils.formatMoney(originalPrice / 0.6)
+          }
+          break
+        }
+        case '中标必听课': {
+          try {
+            info.contentImgUrl = assetsConf.courseLink.imgMap.headerImg[platform]
+            info.contentList = this.getCourseInfo(order)
+          } catch (error) {
+            info.contentList = []
+            console.log(error)
+          }
+          break
+        }
+        case '数据报告': {
+          try {
+            info.contentImgUrl = assetsConf.dataReportLink.imgMap.headerImg[platform]
+            info.contentList = this.getDataReportInfo(order)
+          } catch (error) {
+            info.contentList = []
+            console.log(error)
+          }
+          break
+        }
+        case '企业商机管理': {
+          try {
+            info.contentImgUrl = assetsConf.entnicheLink.imgMap.headerImg[platform]
+            info.contentList = this.getEntnicheInfo(order)
+          } catch (error) {
+            info.contentList = []
+            console.log(error)
+          }
+          break
+        }
+        case '大会员': {
+          var filterInfo = JSON.parse(order.filter)
+          var level = filterInfo.level
+          try {
+            info.contentImgUrl = assetsConf.bigMemberLink.imgMap[level][platform]
+            info.contentList = this.getBigMemberInfo(order)
+          } catch (error) {
+            info.contentList = []
+            console.log(error)
+          }
+          break
+        }
+        case '大会员-补充包': {
+          try {
+            info.contentImgUrl = assetsConf.bigMemberSupplyPackLink.imgMap.headerImg[platform]
+            info.contentList = this.getBigMemberExInfo(order)
+          } catch (error) {
+            info.contentList = []
+            console.log(error)
+          }
+          break
+        }
+        case '大会员-AI中标预测包': {
+          try {
+            info.contentImgUrl = assetsConf.bigMemberSupplyPackLink.imgMap.headerImg[platform]
+            info.contentList = this.getBigMemberExInfo(order)
+          } catch (error) {
+            info.contentList = []
+            console.log(error)
+          }
+          break
+        }
+        case '大会员-招标文件解读': {
+          try {
+            info.contentImgUrl = assetsConf.bigMemberSupplyPackLink.imgMap.headerImg[platform]
+            info.contentList = this.getBigMemberExInfo(order)
+          } catch (error) {
+            info.contentList = []
+            console.log(error)
+          }
+          break
+        }
+        case '大会员-子账号': {
+          var filterInfo = JSON.parse(order.filter)
+          var level = filterInfo.level
+          try {
+            info.contentImgUrl = assetsConf.bigMemberSubAccountLink.imgMap[level][platform]
+            info.contentList = this.getBigMemberSubCountInfo(order)
+          } catch (error) {
+            info.contentList = []
+            console.log(error)
+          }
+          break
+        }
+        case '招标文件解读': {
+          try {
+            info.contentImgUrl = assetsConf.zbFileAnalysisLink.imgMap.headerImg[platform]
+            info.contentList = this.getZBFileAnalysisInfo(order)
+          } catch (error) {
+            info.contentList = []
+            console.log(error)
+          }
+          break
+        }
+        case '剑鱼币': {
+          try {
+            info.contentImgUrl = assetsConf.jianyuCoinLink.imgMap.headerImg[platform]
+            info.contentList = this.getJianyuCoinInfo(order)
+          } catch (error) {
+            info.contentList = []
+            console.log(error)
+          }
+          break
+        }
+        default: {
+          console.log('没有找到此类型')
+          break
+        }
+      }
+      return info
+    },
+    // 卡片底部按钮显示隐藏
+    orderItemBottomButton: function (order) {
+      var orderStatus = order.order_status
+      var productType = order.product_type
+      var state = {
+        cancelOrderShow: false, // 取消订单按钮是否显示
+        payConfirmShow: false, // 去支付按钮是否显示
+        payConfirmText: '去支付', // 去支付按钮文字
+        invokeButtonShow: false, // 开发票(查看发票)按钮是否显示
+        invokeButtonText: '开发票', // 开发票(查看发票)按钮是否显示
+        bugAgainShow: false, // 再次购买(购买/续费/升级)按钮是否显示
+        bugAgainText: '再次购买', // 再次购买(购买/续费/升级)按钮是否显示
+      }
+      // 支持再次购买的产品product_type
+      var canBuyAgain = this.prodConf.canBuyAgain
+      // 支持开发票的产品product_type
+      var canInvoke = this.prodConf.canInvoke
+      // 销售渠道产品product_type
+      var transformProductions = this.prodConf.transformProductions
+
+      if (orderStatus === 0) {
+        // 待支付订单
+        // 显示取消订单和去支付按钮
+        state.cancelOrderShow = true
+        state.payConfirmShow = true
+
+        if (order.pay_way === 'transferAccounts') {
+          if (order.course_status === 3) {
+            state.payConfirmText = '再次支付'
+          }
+
+          // 不支持取消订单
+          if (courseStatus === 2 || courseStatus === 4) {
+            state.cancelOrderShow = false
+          }
+        }
+
+      } else if (orderStatus === 1) {
+        // 已完成订单
+        // 再次购买判断
+        if (canBuyAgain.indexOf(productType) !== -1) {
+          state.bugAgainShow = true
+          state.bugAgainText = '再次购买'
+        }
+        // 判断开发票
+        if (canInvoke.indexOf(productType) !== -1) {
+          state.invokeButtonShow = true
+        }
+
+        // 已完成订单 开发票判断  0未申请  1/2已申请
+        if (order.applybill_status === 1 || order.applybill_status === 2) {
+          // 查看发票
+          state.invokeButtonText = '查看发票'
+        }
+
+      } else if (orderStatus === -2 || orderStatus === -3) {
+        // 已取消或者已删除订单
+        // 再次购买判断
+        if (canBuyAgain.indexOf(productType) !== -1) {
+          state.bugAgainShow = true
+        }
+      }
+
+      // 不同产品的定制
+      var cbConf = this.buttonConfProductCustom(order)
+      if (cbConf) {
+        Object.assign(state, cbConf)
+      }
+      return state
+    },
+    // 底部按钮状态不同产品的定制
+    buttonConfProductCustom: function (order) {
+      var orderStatus = order.order_status // 订单状态 0待支付 1已完成 -1/-2删除
+      var productType = order.product_type
+      var orderCode = order.order_code
+      var filterInfo = JSON.parse(order.filter)
+      
+      // cancelOrderShow: false, // 取消订单按钮是否显示
+      // payConfirmShow: false, // 去支付按钮是否显示
+      // payConfirmText: '去支付', // 去支付按钮文字
+      // invokeButtonShow: false, // 开发票(查看发票)按钮是否显示
+      // invokeButtonText: '开发票', // 开发票(查看发票)按钮是否显示
+      // bugAgainShow: false, // 再次购买(购买/续费/升级)按钮是否显示
+      // bugAgainText: '再次购买', // 再次购买(购买/续费/升级)按钮是否显示
+
+      var state = {}
+      
+      switch (productType) {
+        case 'VIP订阅': {
+          if (orderStatus === 1) {
+            // 1. 开发票的判断
+            // 2. 续费升级的判断(再次购买按钮值修改)
+            var vipStatus = order.i_vip_status
+            var way = order.pay_way
+            if (vipStatus === -2 && order.lastbuy_code) {
+              // 查看发票+再次购买
+              state.bugAgainShow = true
+              state.bugAgainText = '再次购买'
+              // 按钮状态:1续费 2再次购买
+              state.buyState = 2
+            } else if (vipStatus === 2 && order.lastbuy_code) {
+              if (way === 'trial') {
+                // 超级订阅试用
+                state.bugAgainShow = false
+                state.invokeButtonShow = false
+              } else {
+                state.bugAgainShow = true
+                state.bugAgainText = '续费'
+                state.buyState = 1
+              }
+            } else if (vipStatus === -2 && !order.lastbuy_code) {
+              state.bugAgainShow = false
+            } else if (vipStatus === 2 && !order.lastbuy_code) {
+              if (way === 'trial') {
+                // 超级订阅试用
+                state.bugAgainShow = false
+                state.invokeButtonShow = false
+              }
+            }
+          }
+          break
+        }
+        case '企业商机管理': {
+          if (orderStatus === 1 && this.platform === 'app') {
+            // 是否显示续费按钮
+            var ent_status = order[orderCode]
+            var ent_name = filterInfo.entname
+            if (ent_name) {
+              state.entName = ent_name
+            }
+            if (ent_status === false) {
+              // 显示续费按钮
+              state.bugAgainShow = true
+              state.bugAgainText = '再次购买'
+              state.entBuyState = 1
+            } else if (ent_status === true) {
+              // 显示续费按钮
+              state.bugAgainShow = true
+              state.bugAgainText = '续费'
+              state.entBuyState = 2
+            }
+          }
+          break
+        }
+        default: {
+          break
+        }
+      }
+
+      return state
+    },
+    // 开发票和查看发票
+    clickInvoke: function (order) {
+      var _this = this
+      var platform = this.platform
+      var orderCode = order.order_code
+       // 发票状态  1:已开线上发票 2:已开线下发票
+      var applybill_status = order.applybill_status
+      var productType = order.product_type
+
+      // 中标必听课开发票逻辑
+      if (productType === '中标必听课') {
+        var filterInfo = JSON.parse(order.filter)
+        var drawer = filterInfo.i_drawer
+        if (drawer === 1) {
+          // 继续往下走
+        } else {
+          // 线上课程私有页面
+          if (applybill_status === 0) {
+            return _this.goToLink('/jyxsapp/invoice?code=' + orderCode)
+          } else if (applybill_status === 1 || applybill_status === 2) {
+            return _this.goToLink('/jyxsapp/invoiceDetail?code=' + orderCode + '&id=' + order.id)
+          }
+        }
+      }
+
+      // 已开发票情况(查看发票)
+      if (applybill_status === 1) {
+        var href = assetsConf.invokeLink.lookInvoice[platform]
+        if (href) {
+          _this.goToLink(`${href}?order_code=${orderCode}`)
+        }
+        return
+      } else if (applybill_status === 2) {
+        return this.showDialog({
+          title: '',
+          message: '您已开具发票<br>如有问题请联系客服<br>400-108-6670',
+          className: 'j-confirm-dialog text-center',
+          showCancelButton: false,
+          confirmButtonText: '我知道了'
+        })
+      }
+
+      var loading = this.showLoading()
+      $.ajax({
+        type: 'POST',
+        url: '/subscribepay/orderListDetails/isOver',
+        data: {
+          order_code: orderCode
+        },
+        success: function (res) {
+          loading && loading.clear()
+          if (res.status === 1) {
+            // 开发票跳转
+            var href = assetsConf.invokeLink.invoke[platform]
+            if (href) {
+              _this.goToLink(`${href}?order_code=${orderCode}`)
+            }
+          } else {
+            // 不能开发票跳转
+            var href = assetsConf.cantInvoke.canPage[platform]
+            if (href) {
+              _this.goToLink(`${href}?order_code=${orderCode}`)
+            }
+          }
+        },
+        error: function (err) {
+          loading && loading.clear()
+        }
+      })
+    },
+    // 去支付
+    clickPayConfirm: function (order) {
+      var productType = order.product_type
+      var orderCode = order.order_code
+      var platform = this.platform
+      switch (productType) {
+        case '历史数据': {
+          var href = assetsConf.dataExportLinkLink.pay[platform]
+          if (href) {
+            this.goToLink(`${href}?orderCode=${orderCode}`)
+          }
+          break
+        }
+        case 'VIP订阅': {
+          // vipType 0试用用户、1续费、2升级、3购买
+          var vipType = 0
+          var vip_type = order.vip_type
+          if (!vip_type) {
+            if (order.order_money > 0) {
+              vipType = 3
+            }
+          } else {
+            vipType = vip_type
+          }
+          var href = assetsConf.vipSubLink.pay[platform]
+          if (href) {
+            this.goToLink(`${href}?orderCode=${orderCode}&t=${vipType}`)
+          }
+          break
+        }
+        case '中标必听课': {
+          var href = assetsConf.courseLink.pay[platform]
+          if (href) {
+            this.goToLink(`${href}?orderCode=${orderCode}`)
+          }
+          break
+        }
+        case '数据报告': {
+          var href = assetsConf.dataReportLink.pay[platform]
+          if (href) {
+            this.goToLink(`${href}?ordercode=${orderCode}`)
+          }
+          break
+        }
+        case '企业商机管理': {
+          var href = assetsConf.entnicheLink.pay[platform]
+          if (href) {
+            this.goToLink(`${href}?orderCode=${orderCode}`)
+          }
+          break
+        }
+        case '大会员': {
+          var href = assetsConf.bigMemberLink.pay[platform]
+          if (href) {
+            this.goToLink(`${href}?orderCode=${orderCode}`)
+          }
+          break
+        }
+        case '大会员-补充包': {
+          var href = assetsConf.bigMemberSupplyPackLink.pay[platform]
+          if (href) {
+            this.goToLink(`${href}?orderCode=${orderCode}`)
+          }
+          break
+        }
+        case '大会员-AI中标预测包': {
+          var href = assetsConf.bigMemberSupplyPackLink.pay[platform]
+          if (href) {
+            this.goToLink(`${href}?orderCode=${orderCode}`)
+          }
+          break
+        }
+        case '大会员-招标文件解读': {
+          var href = assetsConf.bigMemberSupplyPackLink.pay2[platform]
+          if (href) {
+            this.goToLink(`${href}?orderCode=${orderCode}&b=1`)
+          }
+          break
+        }
+        case '大会员-子账号': {
+          var href = assetsConf.bigMemberSubAccountLink.pay2[platform]
+          if (href) {
+            this.goToLink(`${href}?orderCode=${orderCode}`)
+          }
+          break
+        }
+        case '招标文件解读': {
+          var href = assetsConf.zbFileAnalysisLink.pay[platform]
+          if (href) {
+            this.goToLink(`${href}?orderCode=${orderCode}`)
+          }
+          break
+        }
+        case '剑鱼币': {
+          var href = assetsConf.zbFileAnalysisLink.pay[platform]
+          if (href) {
+            this.goToLink(`${href}?orderCode=${orderCode}`)
+          }
+          break
+        }
+        default: {
+          break
+        }
+      }
+    },
+    // 再次购买(续费)
+    clickBuyAgain: function (order, bConf) {
+      var _this = this
+      var productType = order.product_type
+      var orderCode = order.order_code
+      var platform = this.platform
+
+      switch (productType) {
+        case '历史数据': {
+          var href = assetsConf.dataExportLink.buyAgain[platform]
+          if (href) {
+            this.goToLink(`${href}?orderCode=${orderCode}`)
+          }
+          break
+        }
+        case 'VIP订阅': {
+          // buyState  1续费 2升级
+          var buyState = bConf.buyState
+          if (buyState === 1) {
+            // 续费
+            var href = assetsConf.vipSubLink.renew[platform]
+            if (href) {
+              this.goToLink(`${href}?orderCode=${orderCode}`)
+            }
+          } else if (buyState === 2) {
+            // 升级
+            var href = assetsConf.vipSubLink.buyAgain[platform]
+            if (href) {
+              this.goToLink(`${href}?orderCode=${orderCode}`)
+            }
+          }
+          break
+        }
+        case '企业商机管理': {
+          // entBuyState  1再次购买 2续费
+          var entBuyState = bConf.entBuyState
+          var entName = bConf.entName
+          // 再次购买
+          if (entBuyState === 1) {
+            $.ajax({
+              type: 'POST',
+              url: '/subscribepay/orderListDetails/entIsCanBuy',
+              data: { entname: entName },
+              success: function (res) {
+                if (res.status === 0) {
+                  _this.showDialog({
+                    title: '',
+                    message: '企业已被购买',
+                    className: 'j-confirm-dialog text-center',
+                    showCancelButton: false,
+                    confirmButtonText: '我知道了'
+                  })
+                } else {
+                  var href = assetsConf.entnicheLink.buyAgain[platform]
+                  if (href) {
+                    this.goToLink(`${href}?ordercode=${orderCode}&renew=0`)
+                  }
+                }
+              }
+            })
+          } else {
+            var href = assetsConf.entnicheLink.buyAgain[platform]
+            if (href) {
+              this.goToLink(`${href}?ordercode=${orderCode}&renew=1`)
+            }
+          }
+          break
+        }
+        default: {
+          break
+        }
+      }
+    },
+    // 去订单详情页面
+    toOrderDetail: function (order) {
+      var productType = order.product_type
+      var orderCode = order.order_code
+      var platform = this.platform
+      // 不同产品进行判断
+      switch (productType) {
+        case '历史数据': {
+          var href = assetsConf.dataExportLink.orderDetail[platform]
+          if (href) {
+            this.goToLink(`${href}?orderCode=${orderCode}`)
+          }
+          break
+        }
+        case 'VIP订阅': {
+          var href = assetsConf.vipSubLink.orderDetail[platform]
+          if (href) {
+            this.goToLink(`${href}?orderCode=${orderCode}`)
+          }
+          break
+        }
+        case '中标必听课': {
+          var href = assetsConf.courseLink.orderDetail[platform]
+          if (href) {
+            this.goToLink(`${href}?code=${orderCode}`)
+          }
+          break
+        }
+        case '数据报告': {
+          var href = assetsConf.dataReportLink.orderDetail[platform]
+          if (href) {
+            this.goToLink(`${href}/${orderCode}`)
+          }
+          break
+        }
+        case '企业商机管理': {
+          var href = assetsConf.entnicheLink.orderDetail[platform]
+          if (href) {
+            this.goToLink(`${href}?order_code=${orderCode}`)
+          }
+          break
+        }
+        case '大会员': {
+          var href = assetsConf.bigMemberLink.orderDetail[platform]
+          if (this.platform === 'wx') {
+            this.goToLink(`${href}/${orderCode}`)
+          } else {
+            this.goToLink(`${href}?order_code=${orderCode}`)
+          }
+          break
+        }
+        case '大会员-补充包': {
+          var href = assetsConf.bigMemberSupplyPackLink.orderDetail[platform]
+          if (this.platform === 'wx') {
+            this.goToLink(`${href}/${orderCode}`)
+          } else {
+            this.goToLink(`${href}?order_code=${orderCode}`)
+          }
+          break
+        }
+        case '大会员-AI中标预测包': {
+          var href = assetsConf.bigMemberSupplyPackLink.orderDetail[platform]
+          if (this.platform === 'wx') {
+            this.goToLink(`${href}/${orderCode}`)
+          } else {
+            this.goToLink(`${href}?order_code=${orderCode}`)
+          }
+          break
+        }
+        case '大会员-招标文件解读': {
+          var href = assetsConf.bigMemberSupplyPackLink.orderDetail[platform]
+          if (this.platform === 'wx') {
+            this.goToLink(`${href}/${orderCode}`)
+          } else {
+            this.goToLink(`${href}?order_code=${orderCode}`)
+          }
+          break
+        }
+        case '大会员-子账号': {
+          var href = assetsConf.bigMemberSubAccountLink.orderDetail[platform]
+          if (this.platform === 'wx') {
+            this.goToLink(`${href}/${orderCode}`)
+          } else {
+            this.goToLink(`${href}?order_code=${orderCode}`)
+          }
+          break
+        }
+        case '招标文件解读': {
+          var href = assetsConf.zbFileAnalysisLink.orderDetail[platform]
+          if (this.platform === 'wx') {
+            this.goToLink(`${href}/${orderCode}`)
+          } else {
+            this.goToLink(`${href}?order_code=${orderCode}`)
+          }
+          break
+        }
+        case '剑鱼币': {
+          var href = assetsConf.jianyuCoinLink.orderDetail[platform]
+          if (this.platform === 'wx') {
+            this.goToLink(`${href}/${orderCode}`)
+          } else {
+            this.goToLink(`${href}?order_code=${orderCode}`)
+          }
+          break
+        }
+        default: {
+          break
+        }
+      }
+    },
+    getHistoryDataInfoList: function (order) {
+      var infoList = []
+      // 关键词项
+      var keywordValue = order.filter_keys
+      var publishTime = order.filter_publishtime
+      if (keywordValue) {
+        keywordValue = keywordValue.replace(/\s+/g, ' ')
+        keywordValue = keywordValue.replace(/,/g, ' ')
+      }
+      if (!publishTime) {
+        publishTime = '全部'
+      } else {
+        if (publishTime.indexOf('_') !== -1) {
+          var pbt = publishTime.join('_')
+          if (pbt[0] && !pbt[1]) {
+            publishTime = new Date(pbt[0] * 1000).pattern('yyyy.MM.dd')
+            publishTime = publishTime + '-'
+          } else if (!pbt[0] && !pbt[0]) {
+            publishTime = new Date(pbt[1] * 1000).pattern('yyyy.MM.dd')
+            publishTime = publishTime + '前全部'
+          }
+        }
+      }
+      
+      var keyword = {
+        label: '关键词',
+        split: ':',
+        text: keywordValue
+      }
+      var dataCount = {
+        label: '数据量',
+        split: ':',
+        text: order.data_count + '条'
+      }
+      // 1标准字段包 2高级字段包
+      var dataType = {
+        label: '数据规格',
+        split: ':',
+        text: order.data_spec
+      }
+      var date = {
+        label: '筛选日期',
+        split: ':',
+        text: publishTime
+      }
+      infoList = [keyword, dataCount, dataType, date]
+      return infoList 
+    },
+    getVipSubInfoList: function (order) {
+      var infoList = []
+      var info = this.getVipSubInfo(order)
+      var filter_vip = JSON.parse(order.filter)
+      // 赠送有效日期
+      var giveCycle = filter_vip.give_cycle
+      var giveHTML = ''
+      if (giveCycle) {
+        giveHTML = `<span style="color: #2ABED1;margin-left:.1rem">赠送${giveCycle}个月</span>`
+      }
+      // 计算有效日期
+      var dateText = ''
+      if (order.order_status === 1) {
+        // 完成订单才会有有效期
+        var start = order.vip_starttime
+        var end = order.vip_endtime
+        start = start.split(' ')[0].replace(/-/g, '.')
+        end = end.split(' ')[0].replace(/-/g, '.')
+        dateText = start + ' - ' + end
+      }
+
+      var area = {
+        label: '区域',
+        split: ':',
+        text: info.region
+      }
+      var ind = {
+        label: '行业',
+        split: ':',
+        text: info.industry
+      }
+      var duration = {
+        label: '订阅周期',
+        split: ':',
+        text: info.duration + giveHTML
+      }
+      var date = {
+        label: '有效日期',
+        split: ':',
+        text: dateText
+      }
+      infoList = [area, ind, duration]
+      if (date.text) {
+        infoList.push(date)
+      }
+      return infoList 
+    },
+    getVipSubInfo: function (order) {
+      // 筛选条件
+      var obj = order
+      var filter_vip = JSON.parse(order.filter)
+      // 判断该订单是否是升级订单
+      var vip_type = order.vip_type
+      // 升级续费逻辑修改后的判断条件
+      var newbuyset = filter_vip.newBuyset
+      var region_vip = ''
+      var industry_vip = ''
+
+      // 计算订阅周期
+      var cyclecount_vip = filter_vip.cyclecount	// 时长
+      var cycleunit_vip = filter_vip.cycleunit // 单位 1:年 2:月 3:天
+
+      if ((vip_type !== 2) && (vip_type !== 1)) {
+        //地区
+        var region_vipArr = filter_vip.area
+        var province_length = 0
+        var city_length = 0
+        if (!$.isEmptyObject(newbuyset)) {
+          var val = this.getnewbuyset(newbuyset)
+          region_vip = val[0]
+          industry_vip = val[1]
+        } else {
+          if ($.isEmptyObject(region_vipArr)) {
+            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 + '个省级区域'
+          }
+
+          industry_vip = filter_vip.industry
+          if (industry_vip.length === 0) {
+            industry_vip = '全行业'
+          } else {
+            industry_vip = industry_vip + '个行业'
+          }
+        }
+
+        // 订阅周期
+        var effectiveduration_vip = ''
+        if (order.vip_starttime && order.vip_endtime) {
+          var start_time_vip = order.vip_starttime
+          var end_time_vip = order.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 === 4) {
+            effectiveduration_vip = cyclecount_vip + "季"
+          }
+
+          if (!$.isEmptyObject(newbuyset)) {
+            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 + "天"
+            } else if (cycleunit_vip === 4) {
+              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 + "天"
+          } else if (cycleunit_vip === 4) {
+            effectiveduration_vip = cyclecount_vip + "季"
+          }
+        }
+      } else if (vip_type === 2) {
+        // 新增全部行业:-1  新增部分行业:123   		无新增:0
+        // 新增全国{"province":0,"city":0}  无新增:{}
+        // 升级订单 单独处理
+        // 区域
+        var filterObj = filter_vip
+        if (!$.isEmptyObject(newbuyset)) {
+          var val = this.getnewbuyset(newbuyset);
+          region_vip = val[0];
+          industry_vip = val[1];
+        } else {
+          if (!$.isEmptyObject(filterObj.addareacount)) {
+            if ((filterObj.addareacount.province === 0) && (filterObj.addareacount.city === 0)) {
+              region_vip = "全国";
+            }
+            if ((filterObj.addareacount.province !== 0) && (filterObj.addareacount.city === 0)) {
+              region_vip = filterObj.addareacount.province + "个省级区域";
+            }
+            if ((filterObj.addareacount.province === 0) && (filterObj.addareacount.city !== 0)) {
+              region_vip = filterObj.addareacount.city + "个地市";
+            }
+            if ((filterObj.addareacount.province !== 0) && (filterObj.addareacount.city !== 0)) {
+              region_vip = filterObj.addareacount.province + "个省级区域、" + filterObj.addareacount.city + "个地市";
+            }
+          } else {
+            region_vip = "无";
+          }
+          //行业
+          var industry_vip = "";
+          industry_vip = filterObj.addbuyerclasscount + "个行业";
+          if (filterObj.addbuyerclasscount === 0) {
+            industry_vip = "无";
+          }
+          if (filterObj.addbuyerclasscount === -1) {
+            industry_vip = "全行业";
+          }
+        }
+
+        //延长周期
+        var effectiveduration_vip = "";
+        if (filterObj.cycleunit === 1) {
+          effectiveduration_vip = filterObj.cyclecount + "年";
+        } else if (filterObj.cycleunit === 2) {
+          effectiveduration_vip = filterObj.cyclecount + "个月";
+        } else if (filterObj.cycleunit === 3) {
+          effectiveduration_vip = filterObj.cyclecount + "天";
+        } else if (filterObj.cycleunit === 4) {
+          effectiveduration_vip = filterObj.cyclecount + "季";
+        } else if (filterObj.cycleunit === -1) {
+          effectiveduration_vip = "不延期";
+        }
+        //续费升级逻辑修改后判断是否不延期
+        if (filterObj.cycleunit === 0 && filterObj.cyclecount === 0) {
+          effectiveduration_vip = "不延期";
+        }
+      } else if (vip_type === 1) {
+        var renewal_market = 0 // 续费市级地区
+        var buyset = filter_vip.buyset
+        if (!$.isEmptyObject(newbuyset)) {
+          var val = this.getnewbuyset(newbuyset);
+          region_vip = val[0];
+          industry_vip = val[1];
+        } else {
+          if (!$.isEmptyObject(buyset)) {
+            if (buyset.areacount === -1) {
+              region_vip = "全国";
+            } else {
+              if (!$.isEmptyObject(buyset.citys)) {
+                for (var key in buyset.citys) {
+                  renewal_market += (buyset.citys[key]);
+                }
+              }
+
+              if ((buyset.areacount !== 0) && (renewal_market !== 0)) {
+                region_vip = buyset.areacount + "个省级地区、" + renewal_market + "个地市";
+              } else if ((buyset.areacount === 0) && (renewal_market !== 0)) {
+                region_vip = renewal_market + "个地市";
+              } else if ((buyset.areacount !== 0) && (renewal_market === 0)) {
+                region_vip = buyset.areacount + "个省级地区";
+              }
+            }
+            if (buyset.buyerclasscount === -1) {
+              industry_vip = "全行业";
+            } else {
+              industry_vip = buyset.buyerclasscount + "个行业";
+            }
+          } else {
+            industry_vip = ""
+            region_vip = ""
+          }
+        }
+
+        // 订阅周期
+        var effectiveduration_vip = ""
+        if (order.vip_starttime && order.vip_endtime) {
+          var start_time_vip = order.vip_starttime;
+          var end_time_vip = order.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 (effectiveduration_vip === "") {
+            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 + "天";
+            } else if (cycleunit_vip === 4) {
+              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 + "天";
+          } else if (cycleunit_vip === 4) {
+            effectiveduration_vip = cyclecount_vip + "季";
+          }
+        }
+      }
+
+      if (filter_vip.cyclecount && filter_vip.cycleunit) {
+        if (parseInt(filter_vip.cycleunit) === 1) {
+          effectiveduration_vip = filter_vip.cyclecount + "年"
+        } else if (parseInt(filter_vip.cycleunit) === 2) {
+          effectiveduration_vip = filter_vip.cyclecount + "个月"
+        }  else if (parseInt(filter_vip.cycleunit) === 4) {
+          effectiveduration_vip = filter_vip.cyclecount + "季"
+        } else {
+          effectiveduration_vip = "7天"
+        }
+      }
+      if (filter_vip.cycleunit === 0 && filter_vip.cyclecount === 0) {
+        effectiveduration_vip = "不延期";
+      }
+
+      return {
+        region: region_vip,
+        industry: industry_vip,
+        duration: effectiveduration_vip
+      }
+    },
+    // 超级订阅获取购买数量
+    getnewbuyset: function (newbuyset) {
+      var region_vip = ''
+      if (newbuyset.areacount !== -1) {
+        var newcitys = newbuyset.newcitys
+        var citynum = 0
+        for (var k in newcitys) {
+          citynum += newcitys[k]
+        }
+        if (newbuyset.areacount > 0) {
+            region_vip = newbuyset.areacount + '个省级区域'
+            if (citynum !== 0) {
+              region_vip += "、" + citynum + '个地市'
+            }
+        } else {
+          region_vip += citynum + '个地市'
+        }
+      } else {
+        region_vip = '全国'
+      }
+      var buyerclasscount = newbuyset.buyerclasscount;
+      if (buyerclasscount > 3) {
+          buyerclasscount = filterObj.industry.length;
+          industry_vip = '全行业(' + buyerclasscount + '个行业)'
+      } else {
+          industry_vip = buyerclasscount + '个行业'
+      }
+      if (buyerclasscount === -1) {
+          industry_vip = '全行业'
+      }
+      return [region_vip, industry_vip]
+    },
+    getCourseInfo: function (order) {
+      var infoList = []
+      var filterInfo = JSON.parse(order.filter)
+      
+      var courseName = {
+        label: '课程名称',
+        split: ':',
+        text: filterInfo.s_name
+      }
+      var courseType = {
+        label: '课程类型',
+        split: ':',
+        text: order.product_type
+      }
+      var courseDuration = {
+        label: '课程时长',
+        split: ':',
+        text: filterInfo.s_courseDate
+      }
+      var courseJieShu = {
+        label: '课程节数',
+        split: ':',
+        text: '共' + !filterInfo.i_num ? 1 : filterInfo.i_num + '节'
+      }
+      var date = {
+        label: '有效日期',
+        split: ':',
+        text: filterInfo.l_endtime ? new Date(filterInfo.l_endtime*1000).pattern('yyyy/MM/dd') + '到期' : ''
+      }
+      infoList = [courseName, courseType, courseDuration, courseJieShu]
+      if (date.text) {
+        infoList.push(date)
+      }
+      return infoList 
+    },
+    getDataReportInfo: function (order) {
+      var infoList = []
+      var filterInfo = JSON.parse(order.filter)
+      
+      var reportName = {
+        label: '报告名称',
+        split: ':',
+        text: filterInfo.report_name
+      }
+      var date = {
+        label: '发布日期',
+        split: ':',
+        text: filterInfo.l_pushtime ? new Date(filterInfo.l_pushtime*1000).pattern('yyyy/MM/dd') : ''
+      }
+      infoList = [reportName]
+      if (date.text) {
+        infoList.push(date)
+      }
+      return infoList 
+    },
+    getEntnicheInfo: function (order) {
+      var filterInfo = JSON.parse(order.filter)
+      
+      var entName = {
+        label: '企业名称',
+        split: ':',
+        text: filterInfo.entname
+      }
+      var teamCount = {
+        label: '团队人数',
+        split: ':',
+        text: filterInfo.personnum + '人'
+      }
+      var userDate = {
+        label: '使用周期',
+        split: ':',
+        text: filterInfo.cycle + '年'
+      }
+      
+      return [entName, teamCount, userDate] 
+    },
+    getBigMemberInfo: function (order) {
+      var filterInfo = JSON.parse(order.filter)
+      var level = filterInfo.level
+      var nameLevelMap = {
+        1: '专家版',
+        2: '智慧版',
+        3: '商机版',
+        4: '试用版',
+        5: '自定义'
+      }
+      
+      var levelInfo = {
+        label: '会员套餐',
+        split: ':',
+        text: nameLevelMap[level]
+      }
+      var duration = {
+        label: '订阅周期',
+        split: ':',
+        text: ''
+      }
+      var userDate = {
+        label: '有效日期',
+        split: ':',
+        text: '-'
+      }
+      // 订阅周期计算
+      if (level === 4) {
+        duration.text = filterInfo.cycle + '天'
+      } else {
+        duration.text = filterInfo.cycle + '年'
+        if (filterInfo.createType) {
+          duration.text = filterInfo.cycle + '个月'
+        }
+      }
+
+      // 有效日期计算
+      var end = filterInfo.vip_endtime
+      if (order.order_status === 1 && end) {
+        userDate.text = new Date(end.replace(/(\.|-)/g, '/')).pattern('yyyy/MM/dd') + ' 到期'
+      }
+      
+      return [levelInfo, duration, userDate] 
+    },
+    getBigMemberExInfo: function (order) {
+      var productType = order.product_type
+      var filterInfo = JSON.parse(order.filter)
+      var infoList = []
+
+      // 大会员-补充包
+      // 大会员-AI中标预测包
+      // 大会员-招标文件解读
+      var title = {
+        label: '服务列表',
+        split: ':',
+        text: ''
+      }
+      infoList.push(title)
+      var date = {
+        label: '有效日期',
+        split: ':',
+        text: '-'
+      }
+      if (productType === '大会员-补充包') {
+        var supplys = filterInfo.supplys
+        if (supplys) {
+          for (var i = 0; i < supplys.length; i++) {
+            var serviceUnit = '个'
+            if (i > 3) {
+              infoList.push({
+                label: '···',
+                split: '',
+                text: ''
+              })
+              break;
+            }
+            if (supplys[i]['id'] == '15' || supplys[i]['id'] == '6') {
+              serviceUnit = '次'
+            }
+            infoList.push({
+              label: '·',
+              split: ' ',
+              text: supplys[i]['name'] + '(' + supplys[i]['count'] + serviceUnit + ')'
+            })
+          }
+        }
+        if (order.vip_endtime && order.order_status == 1) {
+          date.text = new Date(order.vip_endtime.replace(/(\.|-)/g, '/')).pattern('yyyy/MM/dd') + '到期'
+          infoList.push(date)
+        }
+      } else if (productType === '大会员-AI中标预测包') {
+        infoList.push({
+          label: '·',
+          split: ' ',
+          text: '中标企业预测' + '(' + filterInfo.count*10 + '次)'
+        })
+        date.text = filterInfo.effective_date
+        infoList.push(date)
+      } else if (productType === '大会员-招标文件解读') {
+        infoList.push({
+          label: '·',
+          split: ' ',
+          text: '招标文件解读' + '(' + filterInfo.count + '次)'
+        })
+        date.text = '2021/11/15'
+        infoList.push(date)
+      }
+      
+      return infoList
+    },
+    getBigMemberSubCountInfo: function (order) {
+      var filterInfo = JSON.parse(order.filter)
+      var level = filterInfo.level
+      var nameLevelMap = {
+        1: '专家版',
+        2: '智慧版',
+        3: '商机版',
+        4: '试用版',
+        5: '自定义'
+      }
+      
+      var levelInfo = {
+        label: '会员套餐',
+        split: ':',
+        text: nameLevelMap[level]
+      }
+      var date = {
+        label: '有效日期',
+        split: ':',
+        text: '-'
+      }
+      var payCount = {
+        label: '付费账号',
+        split: ':',
+        text: filterInfo.pay_sub_num + ' 个'
+      }
+      var freeCount = {
+        label: '免费账号',
+        split: ':',
+        text: filterInfo.free_sub_num + ' 个'
+      }
+
+      if (order.vip_endtime && order.order_status == 1) {
+        date.text = new Date(order.vip_endtime.replace(/(\.|-)/g, '/')).pattern('yyyy/MM/dd') + '到期'
+      }
+
+      return [levelInfo, date, payCount, freeCount]
+    },
+    getZBFileAnalysisInfo: function (order) {
+      var filterInfo = JSON.parse(order.filter)
+      var prodType = {
+        label: '产品类型',
+        split: ':',
+        text: order.product_type
+      }
+      var buyCount = {
+        label: '购买次数',
+        split: ':',
+        text: filterInfo.count + '次'
+      }
+      var date = {
+        label: '有效日期',
+        split: ':',
+        text: '2021/11/15到期'
+      }
+      return [prodType, buyCount, date] 
+    },
+    getJianyuCoinInfo: function (order) {
+      var filterInfo = JSON.parse(order.filter)
+      var prodType = {
+        label: '产品类型',
+        split: ':',
+        text: order.product_type
+      }
+      var buyCount = {
+        label: '数量',
+        split: ':',
+        text: utils.formatMoney(filterInfo.score) + '枚'
+      }
+      var date = {
+        label: '有效日期',
+        split: ':',
+        text: '永久'
+      }
+      return [prodType, buyCount, date] 
+    },
+    goToLink: function (href) {
+      this.saveState()
+      location.href = href
+    }
+  }
+})

+ 139 - 2162
src/web/templates/weixin/commonPay/myOrder.html

@@ -1,2167 +1,144 @@
-<html>
-<head>
-    <title>我的订单</title>
-    <meta name="viewport" content="width=device-width,initial-scale=1.0">
-    <meta HTTP-EQUIV="pragma" CONTENT="no-cache">
-    <meta HTTP-EQUIV="Cache-Control" CONTENT="no-cache, must-revalidate">
-    <meta HTTP-EQUIV="expires" CONTENT="0">
-    <script src="{{Msg "seo" "cdn"}}/js/rem.js?v={{Msg "seo" "version"}}"></script>
-    <script src="https://cdn-common.jianyu360.com/cdn/lib/jquery/3.6.0/jquery.min.js"></script>
-    <script src="{{Msg "seo" "cdn"}}/js/dropload.js?v={{Msg "seo" "version"}}"></script>
-    <script src="//cdn.bootcss.com/jquery-confirm/3.1.0/jquery-confirm.min.js"></script>
-    <script src="{{Msg "seo" "cdn"}}/wxswordfish/share.js?v={{Msg "seo" "version"}}"></script>
-    {{include "/common/weixin.html"}}
-    <script src="{{Msg "seo" "cdn"}}/vipsubscribe/js/common.js"></script>
-    <script src="{{Msg "seo" "cdn"}}/vipsubscribe/js/weui.min.js?v={{Msg "seo" "version"}}"></script>
-    <link rel="stylesheet" href="{{Msg "seo" "cdn"}}/wxCommonPay/css/weui.min.css?v={{Msg "seo" "version"}}">
-    <link rel="stylesheet" type="text/css"
-          href="{{Msg "seo" "cdn"}}/wx_dataExport/css/base_myorder.css?v={{Msg "seo" "version"}}"/>
-    <link rel="stylesheet" type="text/css"
-          href="{{Msg "seo" "cdn"}}/wxCommonPay/iconfont/iconfont.css?v={{Msg "seo" "version"}}"/>
-    <link rel="stylesheet" href="{{Msg "seo" "cdn"}}/css/dropload.css?v={{Msg "seo" "version"}}">
-    <link href="//cdn.bootcss.com/jquery-confirm/3.1.0/jquery-confirm.min.css" rel="stylesheet">
-    <!--2.8.8-->
-    <link rel="stylesheet" href="{{Msg "seo" "cdn"}}/wxCommonPay/css/order_list.css?v={{Msg "seo" "version"}}">
-    <style>
-        #order_list .main .tabs .card .card-content .price {
-            margin-bottom: 0;
-        }
-
-        /* vip订阅原价 */
-        .origin-price-container {
-            display: inline-block;
-            margin-top: .06rem;
-            margin-right: .1rem;
-            color: #9B9CA3;
-            font-size: .22rem;
-        }
-
-        .origin-price-container .origin-price {
-            text-decoration: line-through;
-        }
-
-        .ellipsis {
-            overflow: hidden;
-            text-overflow: ellipsis;
-            white-space: nowrap;
-        }
-
-        /* 超过2行省略号显示 */
-        .ellipsis-2 {
-            overflow: hidden;
-            text-overflow: ellipsis;
-            display: -webkit-box;
-            -webkit-line-clamp: 2;
-            -webkit-box-orient: vertical;
-        }
-
-        /* 统一弹框头部样式 android ios*/
-        .weui-dialog__title {
-            font-weight: 600 !important;
-            font-size: 18px !important;
-        }
-
-        .weui-dialog__hd {
-            text-align: center !important;
-        }
-
-        .weui-dialog__bd {
-            line-height: 24px;
-            font-weight: normal !important;
-        }
-
+<!DOCTYPE html>
+<html lang="zh-CN">
 
-        .media-info .buchongbao:before {
-            content: '';
-            display: inline-block;
-            width: 2px;
-            height: 2px;
-            background-color: #5F5E64;
-            vertical-align: middle;
-            margin-right: 7px;
-            border-radius: 4px;
-        }
-        .discount .current{
-          font-size:.2rem !important;
-          margin-right: .1rem;
-          line-height: .28rem;
-        }
-        .discount .current:nth-child(1){
-          border: 1px solid rgba(0, 0, 0, 0.1);
-          border-radius: 8px;
-          padding: .02rem .16rem;
-        }
-        .discount .current:nth-child(2){
-          border: 1px solid rgba(251,72,61,0.10);
-          border-radius: 12px;
-          padding: .02rem .16rem;
-          background: rgba(251,72,61,0.10);
-          color: #FB483D;
-        }
-    </style>
+<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">
+  <title>我的订单</title>
+  <!--S-当前页面的css资源-->
+  <link rel="stylesheet" href=//cdn-common.jianyu360.com/cdn/lib/reset-css/5.0.1/reset.min.css />
+  <link rel="stylesheet" href=//cdn-common.jianyu360.com/cdn/lib/vant/2.12.24/lib/index.css />
+  <link rel="stylesheet" href=//cdn-common.jianyu360.com/cdn/lib/vant/2.12.24/lib/icon/local.css />
+  <link rel="stylesheet" href='{{Msg "seo" "cdn"}}/big-member/css/j-icons.css?v={{Msg "seo" "version"}}'>
+  <link rel="stylesheet" href='{{Msg "seo" "cdn"}}/big-member/css/public.css?v={{Msg "seo" "version"}}'>
+  <link rel="stylesheet"
+    href='{{Msg "seo" "cdn"}}/common-module/order-list/css/order-list.css?v={{Msg "seo" "version"}}' />
 </head>
+
 <body>
-<!-- 加载数据-->
-<div class="loading_">
-    <p><span></span></p>
-</div>
-<div id="order_list" class="j-container">
-    <main class="main j-body">
-        <div class="buttons-tab">
-            <ul>
-                <li class="tab-link active">全部</li>
-                <li class="tab-link ">待付款</li>
-                <li class="tab-link ">已完成</li>
-                <li class="tab-link ">已取消</li>
-            </ul>
-        </div>
-        <div class="tabs">
-            <div class="tab active">
-                <div class="card_lists">
+    <div class="j-container order-list-container" id="app" v-cloak>
+        <van-tabs
+            :title-active-color="tabConf.titleActiveColor"
+            :title-inactive-color="tabConf.titleInactiveColor"
+            :line-width="tabConf.lineWidth"
+            :color="tabConf.color"
+            :before-change="beforeTabChange"
+            v-model="tabActiveName"
+            class="j-container"
+        >
+            <van-tab
+                v-for="(item, index) in tabList"
+                :key="index"
+                :title="item.label"
+                :name="item.name">
+                <van-pull-refresh v-model="tabState.refreshing" @refresh="onRefresh">
+                    <van-list
+                        v-model="tabState.loading"
+                        :finished="tabState.finished"
+                        :offset="tabState.offset"
+                        :finished-text="tabState.list.length === 0 ? '' : '没有更多了'"
+                        @load="onLoad"
+                        class="more-list"
+                        ref="vanList">
+                        <div class="order-list">
+                            <div
+                                class="j-order-card order-list-item"
+                                v-for="(item, index) in tabState.list"
+                                :order-id="item.order_code"
+                                :key="item.order_code + '-' +tabActiveName">
+                                <div class="order-item-header">
+                                    <div class="o-i-h-left">${ calcTime(item) }</div>
+                                    <div class="o-i-h-right">
+                                        <div class="order-state-text" :class="item.stateClassName">${ item.stateText }</div>
+                                        <van-icon name="delete-o" @click="delThisOrder(item, index)"></van-icon>
+                                    </div>
+                                </div>
+                                <div class="order-item-content click-active" @click="toOrderDetail(item)">
+                                    <div class="img-container">
+                                        <img :src="item.contentImgUrl" />
+                                    </div>
+                                    <div class="content-list" v-if="item.contentList">
+                                        <div
+                                            class="content-list-item ellipsis"
+                                            v-for="(k, i) in item.contentList"
+                                            :key="i"
+                                            v-html="k.label + k.split + k.text"
+                                        ></div>
+                                    </div>
+                                </div>
+                                <div class="order-item-footer">
+                                    <div class="o-i-price-container">
+                                        <div class="discount-info total-price" v-if="item.totalPrice">
+                                            <div class="text">商品总价:</div>
+                                            <div class="t-num">&yen; ${ item.totalPrice }</div>
+                                        </div>
+                                        <div class="discount-info discount-price" v-if="item.discountPrice">
+                                            <div class="text">优惠金额:</div>
+                                            <div class="d-num">&yen; ${ item.discountPrice }</div>
+                                        </div>
+                                        <div class="pay-price">
+                                            <!-- 已完成订单才有实付价格 -->
+                                            <div class="text" v-if="item.order_status === 1">实付:</div>
+                                            <div class="p-num">&yen; ${ item.payPrice }</div>
+                                        </div>
+                                    </div>
+                                    <div class="o-i-f-button-group">
+                                        <button
+                                            class="order-action-button click-active cancel-order"
+                                            v-if="item.buttonConf.cancelOrderShow"
+                                            @click="cancelThisOrder(item, index)">取消订单</button>
+                                        <!-- 已完成订单才能开发票 -->
+                                        <button
+                                            class="order-action-button click-active invoke"
+                                            v-if="item.buttonConf.invokeButtonShow"
+                                            @click="clickInvoke(item)">${ item.buttonConf.invokeButtonText }</button>
+                                        <button
+                                            class="order-action-button click-active pay"
+                                            v-if="item.buttonConf.payConfirmShow"
+                                            @click="clickPayConfirm(item)">${ item.buttonConf.payConfirmText }</button>
+                                        <button
+                                            class="order-action-button click-active repay"
+                                            v-if="item.buttonConf.bugAgainShow"
+                                            @click="clickBuyAgain(item, item.buttonConf)">${ item.buttonConf.bugAgainText }</button>
+                                    </div>
+                                </div>
+                            </div>
+                        </div>
+                    </van-list>
+                </van-pull-refresh>
+                <div class="empty-container" v-show="tabState.list.length === 0 && tabState.loaded && !tabState.loading">
+                    <div class="empty-content-position">
+                        <div class="image">
+                            <img src="/jyapp/big-member/image/img-empty.png">
+                        </div>
+                        <div class="empty-main tip-text">暂无数据</div>
+                    </div>
                 </div>
-            </div>
-        </div>
-    </main>
-</div>
-<script src="https://cdn-common.jianyu360.com/cdn/lib/zepto/1.2.0/zepto.min.js"></script>
-<script>
-    //ios进入详情页后退不会刷新页面导致orderTabActive没有清,再次进入其他类型订单 展示不对问题
-    window.addEventListener('pageshow', function (event) {
-        if (event.persisted) {
-            location.reload();
-        }
-    }, false);
-
-    var hasNextPage = false;
-    var pageIndex = 1;
-    var wxflag = "";
-    var scrollTop = 0;
-    var dataCache = new Array();
-    var count = 0;
-    var typ = 0;
-    var deleteIndex = 0;
-    var totalName = "商品总价:"
-    var discountName = "优惠金额:"
-    var isPayName =  "实付:"
-
-    initShare({{.T.signature}},{{.T.openid}}, 2, "jy_wxmyorder",{{.T.nickname}},{{.T.avatar}});
-
-    //时间格式化
-    function timestampToTime(timestamp) {
-        var date = new Date(timestamp * 1000);
-        Y = date.getFullYear() + '.';
-        M = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1) + '.';
-        D = date.getDate();
-        return Y + M + D;
-    }
-
-    //格式化数字
-    function toThousands(num) {
-        var num = (num || 0).toString(), result = '';
-        while (num.length > 3) {
-            result = ',' + num.slice(-3) + result;
-            num = num.slice(0, num.length - 3);
-        }
-        if (num) {
-            result = num + result;
-        }
-        return result;
-    }
-
-    function appendList(listhtml) {
-        $(".card_lists").append(listhtml);
-    }
-
-
-    function setSessionStorage() {
-        sessionStorage.orderScrollTop = $(".main")[0].scrollTop;
-        sessionStorage.orderTabActive = $("ul .active").index();
-        sessionStorage.orderPageNum = parseInt(pageIndex) - 1;
-        sessionStorage.course_order_href = "true";
-    }
-
-    function onceMore(e) {
-        setSessionStorage();
-        var orderCode = $(e).parent(".card-footer").prev(".card-content").find("a").attr("eid");
-        window.location.href = "/front/wx_dataExport/toSieve?orderCode=" + orderCode;
-    }
-
-    //续费 1 再次购买 2
-    function renewalOrBuyAgain(pattern, e) {
-        setSessionStorage();
-        var orderCode = $(e).parent(".card-footer").prev(".card-content").find("a").attr("eid");
-        if (pattern === 1) {
-            window.location.href = "/front/vipsubscribe/vipsubscribe_renew?orderCode" + orderCode;
-        } else if (pattern === 2) {
-            window.location.href = "/front/vipsubscribe/vipsubscribe_new?orderCode=" + orderCode;
-        }
-    }
-
-    function deleteOrder(id, obj) {
-        typ = $("ul .active").index()
-        weui.dialog({
-            title: '确定删除订单',
-            content: '确定删除订单,删除后无法恢复',
-            className: 'custom-dialog',
-            buttons: [{
-                label: '取消',
-                type: 'default',
-                onClick: function () {
-                }
-            }, {
-                label: '确定',
-                type: 'primary',
-                onClick: function () {
-                    $(".loading_").show();
-                    $.post("/subscribepay/orderListDetails/deleteOrder", {
-                        "id": id,
-                        "pageNum": pageIndex,
-                        "type": typ,
-                        "fromPage": "wx"
-                    }, function (data) {
-                        $(".loading_").hide();
-                        if (data && data["success"]) {
-                            var self = $(obj).parent().parent();
-                            var parent = self.parent();
-                            if (self.next().find("a").attr("courseOrder") == "true") {
-                                self.parent().remove();
-                            } else {
-                                deleteIndex = self.index();
-                                dataCache.splice(deleteIndex, 1)
-                                //删除索引存入缓存
-                                sessionStorage.setItem("deleteIndex", deleteIndex);
-                                if (data.res != null) {
-                                    dataCache.push(data.res[0])
-                                    //hasNextPage=data.hasNextPage;
-                                    hasNextPage = data.nextPage;
-                                }
-                                self.parent().remove();
-                            }
-                            weui.toast('删除成功', {
-                                duration: 1500,
-                                className: 'j-toast',
-                                callback: function () {
-                                    $(".loading_").show();
-                                    if ($(".card_lists").children("div").length == 0) {
-                                        nodataHtml = ""
-                                        nodataHtml += '<div style="text-align:center;">';
-                                        nodataHtml += '<img src="/wx_dataExport/images/fish.png" style="width: 2.8rem;height: 2.8rem;margin-top: 45%;">'
-                                        nodataHtml += '<div style="color: #888;font-size: .32rem;text-align:center;">暂无数据</div></div>'
-                                        $(".card_lists").append(nodataHtml);
-                                        $(".dropload-down").hide();
-                                    } else {//删除一条数据 往后铺一条数据
-                                        structureHtml(data.res, typ);
-                                    }//铺数据 end
-                                    if (parent.children("div").length < 10) {
-                                        $(".dropload-refresh").text("没有更多了");
-                                    }
-                                    $(".loading_").hide();
-                                }
-                            })
-                        } else {
-                            alertS("删除失败,请联系管理员!");
-                        }
-                    })
-                }
-            }]
-        });
-    }//delete end
-
-    //取消订单
-    function cancelOrder(id, obj) {
-        typ = $("ul .active").index()
-        weui.dialog({
-            title: '确定取消订单',
-            content: '确定取消订单,取消后无法恢复',
-            className: 'custom-dialog',
-            buttons: [{
-                label: '取消',
-                type: 'default',
-                onClick: function () {
-                }
-            }, {
-                label: '确定',
-                type: 'primary',
-                onClick: function () {
-                    $(".loading_").show();
-                    $.post("/subscribepay/orderListDetails/deleteOrder", {
-                        "id": id,
-                        "pageNum": pageIndex,
-                        "type": typ,
-                        "cancel": "cancel",
-                        "fromPage": "wx"
-                    }, function (data) {
-                        $(".loading_").hide();
-                        if (data && data["success"]) {
-                            weui.toast('取消成功', {
-                                duration: 1500,
-                                className: 'j-toast',
-                                callback: function () {
-                                    $(".loading_").show();
-                                    if (typ === 1) {
-                                        var self = $(obj).parent().parent();
-                                        self.remove();
-                                    }
-                                    $(obj).parent(".card-footer").prev(".card-content").find(".discount").html("");
-                                    var self = $(obj).parent(".card-footer").prev(".card-content").prev(".card-header").children(".notpay");
-                                    self.css("color", "#686868");
-                                    var isVipOrder = $(obj).parent(".card-footer").prev(".card-content").children(".media").attr("isvipOrder");
-                                    var courseOrder = $(obj).parent(".card-footer").prev(".card-content").children(".media").attr("courseOrder");
-                                    var courseOnlineOrder = $(obj).parent(".card-footer").prev(".card-content").children(".media").attr("courseOnlineOrder");
-                                    var courseId = $(obj).parent(".card-footer").prev(".card-content").find("a").attr("eid");
-                                    var isDataReport = $(obj).parent(".card-footer").prev(".card-content").children(".media").attr("datareportOrder");
-                                    //vip订单取消了没有再次购买
-                                    if (isVipOrder != "true") {
-                                        if (courseOrder != "true") {
-                                            self.children().remove();
-                                            self.removeClass("notpay").addClass("cancel_text").append('<span class="status-text">已取消</span><a class="delete_icon" title="删除订单" onclick="deleteOrder(' + id + ',this)"></a>');
-                                            if (courseOnlineOrder == "true" || isDataReport == "true") {
-                                                $(obj).parent(".card-footer").remove();
-                                            } else {
-                                                $(obj).parent(".card-footer").html('<a  onclick="onceMore(this)" class="btn cancle">再次购买</a>')
-                                            }
-                                        } else {
-                                            $(obj).parent(".card-footer").html('<a href="/swordfish/course/detail/' + courseId + '" class="btn cancle">再次购买</a>')
-                                            self.children().remove()
-                                            self.removeClass("notpay").addClass("cancel_text").append('<span class="status-text">已取消</span><a class="delete_icon" title="删除订单" onclick="deleteOrder(' + id + ',this)"></a>');
-                                        }
-                                        if ($(".card_lists").children("div").length === 0) {
-                                            nodataHtml = ""
-                                            nodataHtml += '<div style="text-align:center;">';
-                                            nodataHtml += '<img src="/wx_dataExport/images/fish.png?v=51430" style="width: 2.8rem;height: 2.8rem;margin-top: 45%;">'
-                                            nodataHtml += '<div style="color: #888;font-size: .32rem;text-align:center;">暂无数据</div></div>'
-                                            $(".card_lists").append(nodataHtml);
-                                            $(".dropload-down").hide();
-                                        }
-                                    } else {
-                                        $(obj).parent().parent().remove();
-                                        $(".card_lists").empty();
-                                        queryOrder($("ul .active").index(), 10);
-                                    }
-                                    $(".loading_").hide();
-                                }
-                            })
-                        } else {
-                            alertS("取消失败,请联系管理员!");
-                        }
-                    });
-                }
-            }]
-        });
-    }
-
-    function alertS(content) {
-        $.alert({
-            title: "",
-            content: content,
-            buttons: {
-                ok: {
-                    text: '确定',
-                    btnClass: 'btn-primary-2'
-                }
-            }
-        });
-    }
-
-    clickFlag = true;
-    $(function () {
-        sessionStorage.removeItem("applysuccess");
-        sessionStorage.removeItem("companyName");
-        sessionStorage.removeItem("taxNumer");
-
-        $(".buttons-tab .tab-link").each(function () {
-            $(".loading_").hide();
-            var index = $(this).index();
-            $(".buttons-tab .tab-link").eq(0).addClass("active");
-            //
-            $(this).click(function () {
-                $(".loading_").show();
-                $(this).addClass("active").siblings().removeClass("active");
-                $(".tabs>.tab").eq(index).show().siblings().hide();
-                typ = $("ul .active").index();
-                $(".card_lists").empty();
-                queryOrder(index, 10);
-            })
-        })
-
-
-        //解决苹果手机里面的网页返回不刷新页面的问题
-        var browserRule = /^.*((iPhone)|(iPad)|(Safari))+.*$/;
-        if (browserRule.test(navigator.userAgent)) {
-            window.onpageshow = function (event) {
-                if (event.persisted) {
-                    window.location.reload()
-                }
-            };
-        }
-        if (sessionStorage.orderTabActive) {
-            $(".buttons-tab .tab-link").eq(sessionStorage.orderTabActive).addClass("active").siblings().removeClass("active");
-            typ = Number(sessionStorage.orderTabActive);
-            var orderPageNum = parseInt(sessionStorage.orderPageNum);
-            queryOrder(sessionStorage.orderTabActive, orderPageNum * 10);
-            sessionStorage.removeItem("orderPageNum");
-            sessionStorage.removeItem("orderTabActive");
-            if (sessionStorage.orderScrollTop) {
-                setTimeout(function () {
-                    $(".main")[0].scrollTop = parseInt(sessionStorage.orderScrollTop);
-                }, 500)
-                setTimeout(function () {
-                    sessionStorage.removeItem("orderScrollTop");
-                }, 2000)
-            }
-        } else {
-            //后续版本用
-            var active = getParam("active");
-            if (active) {
-                $(".buttons-tab .tab-link").eq(active).addClass("active").siblings().removeClass("active");
-                $(".tabs>.tab").eq(active).show().siblings().hide();
-                $(".card_lists").empty();
-                queryOrder(active, 10);
-            } else {
-                queryOrder(0, 10);
-            }
-        }
-    })
-
-    //查询订单ajax
-    //typ  0全部 1未支付 2已支付
-    function queryOrder(typ, page_size) {
-        var result = true;
-        $.post("/subscribepay/orderListDetails/myOrder", {
-            "type": typ,
-            "page_size": page_size,
-            "fromPage": "wx"
-        }, function (data) {
-            console.log(data)
-            $(".loading_").hide();
-            var list = data.res;
-            dataCache = data.res;
-            if (page_size != 10) {
-                pageIndex = parseInt(page_size / 10) + 1;
-            } else {
-                pageIndex = 2;
-            }
-            hasNextPage = data.hasNextPage;
-            if (data.res && data.res.length > 0) {
-                structureHtml(data.res, typ);
-            }
-            if ($(".card_lists .card").length === 0) {
-                result = false;
-                nodataHtml = ""
-                nodataHtml += '<div style="text-align:center;">';
-                nodataHtml += '<img src="/wx_dataExport/images/fish.png" style="width: 2.8rem;height: 2.8rem;margin-top: 45%;">'
-                nodataHtml += '<div style="color: #888;font-size: .32rem;text-align:center;">暂无数据</div></div>'
-                $(".card_lists").append(nodataHtml);
-            }
-
-            if (!result) {
-                $(".dropload-down").hide()
-                return
-            }
-            if (hasNextPage) {
-                wxflag = $(' .main').dropload({
-                    scrollArea: $(".main"),
-                    loadDownFn: function (me) {
-                        $.post('/subscribepay/orderListDetails/myOrder', {
-                            "pageNum": pageIndex,
-                            "type": typ,
-                            "fromPage": "wx"
-                        }, function (data) {
-                            //没有数据
-                            if (data.res == null || data.res.length == 0) {
-                                noMoreData(me);
-                            } else {
-                                dataCache = dataCache.concat(data.res);
-                                pageIndex++;
-                                structureHtml(data.res, typ);
-                                if (data.hasNextPage) {
-                                    // 每次数据插入,必须重置
-                                    me.resetload();
-                                } else {
-                                    noMoreData(me);
-                                }
-                            }
-                        });
-                    }
-                });
-            } else {
-                wxflag = $('.main').dropload({
-                    scrollArea: window,
-                    loadDownFn: function (me) {
-                        if (wxflag == null) {
-                            wxflag = me;
-                        }
-                        noMoreData(me);
-                    }
-                });
-                noMoreData(wxflag);
-            }
-            //},500)
-        })
-    }
-
-    var orderHtml = "";
-    var iconHtml = "";
-
-    function structureHtml(object, typ) {
-        var listhtml = '';
-        var psss = 0;
-        for (var index in object) {
-            var obj = object[index];
-            var isLiveActive = false;
-            if (obj.isLiveActive) {
-                isLiveActive = true;
-            }
-            if (typ === 1 || $(".tab-link.active").index() === 1) {	//待付款订单列表页
-                if (obj.order_status === -2) {
-                    continue;
-                }
-            }
-            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) !== "_") {
-                            publishTime = timestampToTime(publishTime.slice(0, 10));
-                            publishTime = publishTime + "-";
-                        } else {
-                            publishTime = timestampToTime(publishTime.slice(1, 11));
-                            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 (sessionStorage.orderTabActive === 1 && orderStatus === 1) {
-                        gopayIndex = index;
-                        psss = obj.order_code;
-                        continue;
-                    } else {
-                        sessionStorage.removeItem("paySuccess_" + obj.order_code);
-                    }
-                }
-                //优惠
-                var discountHtml = ""
-                if ((orderStatus === 0||orderStatus === 1)&&obj.discount_price>0){
-                  var totalPrice = Number(obj.order_money) + Number(obj.discount_price)
-                  discountHtml = '<p class="discount"><span class="current">'+totalName+'¥' + formatMoney(totalPrice) + '</span>'
-                                + '<span class="current">'+discountName+'¥' + formatMoney(obj.discount_price) + '</span>'
-                }
-                if (orderStatus === 0) {
-                    orderStatus = "待付款"
-                    orderHtml = "";
-                    orderHtml += '<span class="status notpay">'
-                    orderHtml += '<span class="status-text">' + orderStatus + '</span>'
-                    orderHtml += "<span class=\"delete_icon\" title=\"删除订单\" onclick=\"deleteOrder(" + id + ",this)\"></span></span>";
-                    iconHtml = ""
-                    iconHtml += '<div class="card-footer">'
-                        + '<a class="btn cancle gray-btn" onclick="cancelOrder(' + id + ',this)">取消订单</a>'
-                        + '<a href="javascript:void(0)" onclick="window.location.href =\'' + "/weixin/pay/checkout_dataexport?orderCode=" + orderCode + '\'" class="btn  green-btn">去支付</a>'
-                        + '</div>'
-                } else if (orderStatus === 1) {
-                    orderStatus = "已完成";
-                    orderHtml = ""
-                    orderHtml += ' <span class="status finish">'
-                    orderHtml += '<span class="status-text">' + orderStatus + '</span>'
-                    orderHtml += "<a class=\"delete_icon\" title=\"删除订单\" onclick=\"deleteOrder(" + id + ",this)\"></a></span>";
-
-                    iconHtml = ""
-                    iconHtml += '<div class="card-footer">'
-                    //已完成订单 开发票判断  0未申请  1已申请
-                    var applybill_status = obj.applybill_status;
-                    if (applybill_status === 0) {
-                        iconHtml += '<a  onclick="invoiceAdd(this)" class="btn  gray-btn">开发票</a>'
-                        iconHtml += '<a  onclick="onceMore(this)" class="btn cancle green-btn">再次购买</a>'
-                    } else if (applybill_status === 1 || applybill_status === 2) {
-                        iconHtml += '<a  onclick="checkinvoice(this,' + applybill_status + ')" class="btn  gray-btn">查看发票</a>'
-                        iconHtml += '<a  onclick="onceMore(this)" class="btn cancle green-btn">再次购买</a>'
-                    }
-                    iconHtml += '</div>'
-                    discountHtml +='<span>'+isPayName+'</span>'
-                } else if (orderStatus === -2 || orderStatus === -3) {
-                    orderStatus = "已取消";
-                    orderHtml = "";
-                    orderHtml += '<span class="status cancel_text">'
-                    orderHtml += '<span class="status-text">' + orderStatus + '</span>'
-                    orderHtml += "<span class=\"delete_icon\" title=\"删除订单\" onclick=\"deleteOrder(" + id + ",this)\"></span></span>";
-                    iconHtml = "";
-                    iconHtml += '<div class="card-footer">'
-                        + '<a onclick="onceMore(this)" class="btn cancle green-btn">再次购买</a>'
-                        + '</div>'
-                }
-                discountHtml +='</p>'
-                //关键词
-                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] + "&nbsp</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 onclick="setSessionStorage()" eid=' + orderCode + ' href="/front/wx_dataExport/wxToOrderDetail?orderCode=' + orderCode + '" class="media">'
-                    + '<div class="media-img">'
-                    + '<img src="/dataExport/image/dataOutput.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">'
-                    + discountHtml
-                    + '<strong class="current">¥' + orderMoney + '</strong>'
-                    + '</div>'
-                    + '</div>'
-                    + iconHtml
-                    + '</div>'
-            } else if ((obj.product_type === "vip订阅") || (obj.product_type === "VIP订阅")) {
-                if (typ === 1) {	//待付款订单列表页
-                    if (obj.order_status === -2) {
-                        continue;
-                    }
-                }
-                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 newbuyset = filter_vip.newBuyset;
-                //判断该订单是否是升级订单
-                var vip_type = obj.vip_type;
-                var region_vip = ""
-                if ((vip_type !== 2) && (vip_type !== 1)) {
-                    //地区
-                    if (!$.isEmptyObject(newbuyset)) {	//不为空
-                        if (newbuyset.areacount !== -1) {
-                            var newcitys = newbuyset.newcitys;
-                            var scatter = newcitys.length;//分布
-                            var citynum = 0;
-                            for (var k in newcitys) {
-                                citynum += newcitys[k];
-                            }
-                            if (newbuyset.areacount > 0) {
-                                region_vip = newbuyset.areacount + "个省级区域";
-                                if (citynum !== 0) {
-                                    region_vip += "、" + citynum + "个地市";
-                                }
-                            } else {
-                                region_vip += citynum + "个地市";
-                            }
-                        } else {
-                            region_vip = "全国";
-                        }
-                        //行业
-                        var industry_vip = newbuyset.buyerclasscount;	//数组
-                        if (industry_vip === -1) {
-                            industry_vip = "全行业";
-                        } else {
-                            industry_vip = industry_vip + "个行业";
-                        }
-                    } else {
-                        var region_vipArr = filter_vip.area;
-                        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:天 4:季
-                    //订阅周期
-                    var effectiveduration_vip = ""
-                    if ((obj.vip_starttime) && (obj.vip_endtime)) {
-                        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 === 4) {
-                            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 + "天";
-                        } else if (cycleunit_vip === 4) {
-                            effectiveduration_vip = cyclecount_vip + "季";
-                        }
-                    }
-                    //试用用户生成订单 周期
-                    if (effectiveduration_vip === "") {
-                        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 + "天";
-                        } else if (cycleunit_vip === 4) {
-                            effectiveduration_vip = cyclecount_vip + "季";
-                        }
-                    }
-                } else if (vip_type === 2) {
-                    //新增全部行业:-1  新增部分行业:123   		无新增:0
-                    //新增全国{"province":0,"city":0}  无新增:{}
-                    //区域
-                    var filterObj = filter_vip;
-                    if (!$.isEmptyObject(newbuyset)) {	//不为空
-                        if (newbuyset.areacount !== -1) {
-                            var newcitys = newbuyset.newcitys;
-                            var scatter = newcitys.length;//分布
-                            var citynum = 0;
-                            for (var k in newcitys) {
-                                citynum += newcitys[k];
-                            }
-                            if (newbuyset.areacount > 0) {
-                                region_vip = newbuyset.areacount + "个省级区域";
-                                if (citynum != 0) {
-                                    region_vip += "、" + citynum + "个地市";
-                                }
-                            } else {
-                                region_vip += citynum + "个地市";
-                            }
-                        } else {
-                            region_vip = "全国";
-                        }
-                        var buyerclasscount = newbuyset.buyerclasscount;
-                        if (buyerclasscount > 3) {
-                            buyerclasscount = filterObj.industry.length;
-                            industry_vip = "全行业(" + buyerclasscount + "个行业)";
-                        } else {
-                            industry_vip = buyerclasscount + "个行业";
-                        }
-                        if (buyerclasscount === -1) {
-                            industry_vip = "全行业";
-                        }
-                    } else {
-                        if (!$.isEmptyObject(filterObj.addareacount)) {
-                            if ((filterObj.addareacount.province === 0) && (filterObj.addareacount.city === 0)) {
-                                region_vip = "全国";
-                            }
-                            if ((filterObj.addareacount.province !== 0) && (filterObj.addareacount.city === 0)) {
-                                region_vip = filterObj.addareacount.province + "个省级区域";
-                            }
-                            if ((filterObj.addareacount.province === 0) && (filterObj.addareacount.city !== 0)) {
-                                region_vip = filterObj.addareacount.city + "个地市";
-                            }
-                            if ((filterObj.addareacount.province !== 0) && (filterObj.addareacount.city !== 0)) {
-                                region_vip = filterObj.addareacount.province + "个省级区域、" + filterObj.addareacount.city + "个地市";
-                            }
-                        } else {
-                            region_vip = "无";
-                        }
-                        //行业
-                        var industry_vip = "";
-                        industry_vip = filterObj.addbuyerclasscount + "个行业";
-                        if (filterObj.addbuyerclasscount === 0) {
-                            industry_vip = "无";
-                        }
-                        if (filterObj.addbuyerclasscount === -1) {
-                            industry_vip = "全行业";
-                        }
-                    }
-                    //延长周期
-                    var effectiveduration_vip = "";
-                    if (filterObj.cycleunit === 1) {
-                        effectiveduration_vip = filterObj.cyclecount + "年";
-                    } else if (filterObj.cycleunit === 2) {
-                        effectiveduration_vip = filterObj.cyclecount + "个月";
-                    } else if (filterObj.cycleunit === 3) {
-                        effectiveduration_vip = filterObj.cyclecount + "天";
-                    } else if (filterObj.cycleunit === 4) {
-                        effectiveduration_vip = filterObj.cyclecount + "季";
-                    } else if (filterObj.cycleunit === -1) {
-                        effectiveduration_vip = "不延期";
-                    } else {
-                        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 === 4) {
-                                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 + "天";
-                            } else if (cycleunit_vip === 4) {
-                                effectiveduration_vip = cyclecount_vip + "季";
-                            }
-                        }
-                    }
-                    //续费升级逻辑修改后判断是否不延期
-                    if (filterObj.cycleunit === 0 && filterObj.cyclecount === 0) {
-                        effectiveduration_vip = "不延期";
-                    }
-                } else if (vip_type === 1) {
-                    filter_vip = JSON.parse(obj.filter);
-                    var renewal_market = 0; //续费市级地区
-                    var buyset = filter_vip.buyset;
-                    if ($.isEmptyObject(newbuyset)) {
-                        //续费订单根据buyset 中ciyts判断 老订单为citys 新订单为newcitys  续费以外根据newbuyset判断
-                        if (buyset.ciyts !== undefined) {
-                            if (buyset.areacount === -1) {
-                                region_vip = "全国";
-                            } else {
-                                if (!$.isEmptyObject(buyset.citys)) {
-                                    for (var key in buyset.citys) {
-                                        renewal_market += (buyset.citys[key]);
-                                    }
-                                }
-                                //
-                                var areaText = "";
-                                if ((buyset.areacount !== 0) && (renewal_market !== 0)) {
-                                    region_vip = buyset.areacount + "个省级地区、" + renewal_market + "个地市";
-                                } else if ((buyset.areacount === 0) && (renewal_market !== 0)) {
-                                    region_vip = renewal_market + "个地市";
-                                } else if ((buyset.areacount !== 0) && (renewal_market === 0)) {
-                                    region_vip = buyset.areacount + "个省级地区";
-                                }
-                            }
-                            if (buyset.buyerclasscount === -1) {
-                                industry_vip = "全行业";
-                            } else {
-                                industry_vip = buyset.buyerclasscount + "个行业";
-                            }
-                        }
-                    } else {
-                        if (newbuyset.areacount !== -1) {
-                            var newcitys = newbuyset.newcitys;
-                            var scatter = newcitys.length;//分布
-                            var citynum = 0;
-                            for (var k in newcitys) {
-                                citynum += newcitys[k];
-                            }
-                            if (newbuyset.areacount > 0) {
-                                region_vip = newbuyset.areacount + "个省级区域";
-                                if (citynum !== 0) {
-                                    region_vip += "、" + citynum + "个地市";
-                                }
-                            } else {
-                                if (citynum !== 0) {
-                                    region_vip += citynum + "个地市";
-                                }
-                            }
-                        } else {
-                            region_vip = "全国";
-                        }
-                        if (newbuyset.buyerclasscount !== -1) {
-                            industry_vip = newbuyset.buyerclasscount + "个行业";
-                        } else {
-                            industry_vip = "全行业";
-                        }
-                    }
-                    //订阅周期
-                    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 === 4) {
-                            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 + "天";
-                        } else if (cycleunit_vip === 4) {
-                            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;
-                var orginsPrices = obj.order_money;
-                var can1111 = filter_vip && filter_vip.original_price
-                if (can1111) {
-                    orginsPrices = filter_vip.original_price;
-                }
-                var giveCycle = filter_vip.give_cycle;
-                //金额格式化 小数点前 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;
-                }
-                //0试用用户、1续费、2升级、3购买
-                var vipType = 0
-                if (!vip_type) {
-                    if (obj.order_money > 0) {
-                        vipType = 3
-                    }
-                } else {
-                    vipType = vip_type
-                }
-                //优惠
-                var discountHtml = ""
-                if ((orderStatus_vip === 0||orderStatus_vip === 1)&&obj.discount_price>0){
-                  var totalPrice = Number(obj.order_money) + Number(obj.discount_price)
-                  discountHtml = '<p class="discount"><span class="current">'+totalName+'¥' + formatMoney(totalPrice) + '</span>'
-                                + '<span class="current">'+discountName+'¥' + formatMoney(obj.discount_price) + '</span>'
-                }
-                if (orderStatus_vip === 0) {
-                    orderStatus_vip = "待付款"
-                    orderHtml = ""
-                    orderHtml += '<span class="status notpay">'
-                    orderHtml += '<span class="status-text">' + orderStatus_vip + '</span>'
-                    orderHtml += "<a class=\"delete_icon\" title=\"删除订单\" onclick=\"deleteOrder(" + id_vip + ",this)\"></a></span>";
-                    iconHtml = ""
-                    iconHtml += '<div class="card-footer">'
-                        + '<a  class="btn cancle" onclick="cancelOrder(' + id_vip + ',this)">取消订单</a>'
-                        + '<a href="javascript:void(0)" onclick="window.location.href =\'' + "/weixin/pay/checkout_subvip?orderCode=" + obj.order_code + "&t=" + vipType + '\'" class="btn  green-btn">去支付</a>'
-                        + '</div>'
-                } else if (orderStatus_vip === 1) {
-                    orderStatus_vip = "已完成";
-                    orderHtml = ""
-                    orderHtml += '<span class="status finish">'
-                    orderHtml += '<span class="status-text">' + orderStatus_vip + '</span>'
-                    orderHtml += "<a class=\"delete_icon\" title=\"删除订单\" onclick=\"deleteOrder(" + id_vip + ",this)\"></a></span>";
-                    iconHtml = ""
-                    //最后一次购买完 1:试用 2:正式 -1:试用到期 -2:正式到期
-                    if ((vip_status === -2) && (obj.lastbuy_code !== undefined)) {
-                        iconHtml += '<div class="card-footer">'
-                        if (obj.applybill_status === 0) {
-                            iconHtml += '<a  onclick="invoiceAdd(this)" class="btn  gray-btn">开发票</a>'
-                        } else if (obj.applybill_status === 1 || obj.applybill_status === 2) {
-                            iconHtml += '<a  onclick="checkinvoice(this,' + obj.applybill_status + ')" class="btn  gray-btn">查看发票</a>'
-                        }
-                        iconHtml += '<a  onclick="renewalOrBuyAgain(2,this)" class="btn  green-btn">再次购买</a></div>'
-                    } else if ((vip_status === 2) && (obj.lastbuy_code !== undefined)) {
-                        if (obj.pay_way !== "trial") {
-                            iconHtml += '<div class="card-footer">'
-                            if (obj.applybill_status === 0) {
-                                iconHtml += '<a  onclick="invoiceAdd(this)" class="btn  gray-btn">开发票</a>'
-                            } else if (obj.applybill_status === 1 || obj.applybill_status === 2) {
-                                iconHtml += '<a  onclick="checkinvoice(this,' + obj.applybill_status + ')" class="btn  gray-btn">查看发票</a>'
-                            }
-                            iconHtml += '<a  onclick="renewalOrBuyAgain(1,this)" class="btn green-btn">续费</a></div>'
-                        }
-                    } else if ((vip_status === -2) && (obj.lastbuy_code === undefined)) {
-                        iconHtml += '<div class="card-footer">'
-                        if (obj.applybill_status === 0) {
-                            iconHtml += '<a  onclick="invoiceAdd(this)" class="btn  gray-btn">开发票</a></div>'
-                        } else if (obj.applybill_status === 1 || obj.applybill_status === 2) {
-                            iconHtml += '<a  onclick="checkinvoice(this,' + obj.applybill_status + ')" class="btn  gray-btn">查看发票</a></div>'
-                        }
-                    } else if ((vip_status === 2) && (obj.lastbuy_code === undefined)) {
-                        if (obj.pay_way !== "trial") {
-                            iconHtml += '<div class="card-footer">'
-                            if (obj.applybill_status === 0) {
-                                iconHtml += '<a  onclick="invoiceAdd(this)" class="btn  gray-btn">开发票</a></div>'
-                            } else if (obj.applybill_status === 1 || obj.applybill_status === 2) {
-                                iconHtml += '<a  onclick="checkinvoice(this,' + obj.applybill_status + ')" class="btn  gray-btn">查看发票</a></div>'
-                            }
-                        }
-                    }
-                    discountHtml +='<span>'+isPayName+'</span>'
-                } else if (orderStatus_vip === -2 || orderStatus_vip === -3) {
-                    orderStatus_vip = "已取消";
-                    orderHtml = "<span class=\"status cancel_text\">";
-                    orderHtml += '<span class="status-text">' + orderStatus_vip + '</span>'
-                    orderHtml += "<a class=\"delete_icon\" title=\"删除订单\" onclick=\"deleteOrder(" + id_vip + ",this)\"></a></span>";
-                    iconHtml = "";
-                    iconHtml += '<div class="card-footer">'
-                        + '</div>'
-                }
-                discountHtml +='</p>'
-                if (filter_vip.cyclecount !== undefined && filter_vip.cyclecount !== "" && filter_vip.cycleunit !== undefined && filter_vip.cycleunit !== "") {
-                    if (parseInt(filter_vip.cycleunit) === 1) {
-                        effectiveduration_vip = filter_vip.cyclecount + "年"
-                    } else if (parseInt(filter_vip.cycleunit) === 2) {
-                        effectiveduration_vip = filter_vip.cyclecount + "个月"
-                    } else if (parseInt(filter_vip.cycleunit) === 4) {
-                        effectiveduration_vip = filter_vip.cyclecount + "季"
-                    } else {
-                        effectiveduration_vip = "7天"
-                    }
-                }
-                if (filter_vip.cycleunit === 0 && filter_vip.cyclecount === 0) {
-                    effectiveduration_vip = "不延期";
-                }
-                if (obj.isUsedActiveCode) {
-                    effectiveduration_vip = effectiveduration_vip + '<span class="discount-container"><span> + </span><span class="highlight-text">赠送30天</span></span>'
-                }
-                //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 onclick="setSessionStorage()" eid=' + orderCode_vip + ' href="/front/vipsubscribe/toOrderDetailPage?orderCode=' + orderCode_vip + '" class="media" isvipOrder="true">'
-                        + '<div class="media-img">'
-                        + '<img src="/vipsubscribe/image/vipBook.png?v={{Msg "seo" "version"}}">'
-                        + '</div>'
-                        + '<div class="media-info">';
-                    listhtml += '<p class="item-ifo ellipsis">区域:' + region_vip + '</p>'
-                        + '<p class="item-ifo ellipsis">行业:' + industry_vip + '</p>'
-                        + '<p class="item-ifo ellipsis">订阅周期:' + effectiveduration_vip
-                        + (can1111 ? ('&nbsp;+&nbsp;' + '<span style="color: #2ABED1;">赠送' + (giveCycle < 12 ? (giveCycle + '个月') : '1年') + '</span>') : '')
-                        + '</p>'
-                        + '</div>'
-                        + '</a>'
-                    listhtml += '<div class="price">'
-                    if (can1111 || isLiveActive) {
-                        var originPrice = formatMoney(parseFloat(orginsPrices) / parseFloat(0.6));
-                        if (can1111) {
-                            originPrice = formatMoney(parseFloat(orginsPrices) / 100)
-                        }
-                        listhtml += '<span class="origin-price-container">'
-                            + '<span>原价:¥</span>'
-                            + '<span class="origin-price">' + originPrice + '</span>'
-                            + '</span>'
-                    }else{
-                      listhtml += discountHtml
-                    }
-                    listhtml += '<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  onclick="setSessionStorage()" eid=' + orderCode_vip + ' href="/front/vipsubscribe/toOrderDetailPage?orderCode=' + orderCode_vip + '" class="media" isvipOrder="true">'
-                        + '<div class="media-img">'
-                        + '<img src="/vipsubscribe/image/vipBook.png?v={{Msg "seo" "version"}}">'
-                        + '</div>'
-                        + '<div class="media-info">';
-                    listhtml += '<p class="item-ifo ellipsis">区域:' + region_vip + '</p>'
-                        + '<p class="item-ifo ellipsis">行业:' + industry_vip + '</p>'
-                        + '<p class="item-ifo ellipsis">订阅周期:' + effectiveduration_vip
-                        + (can1111 ? ('&nbsp;+&nbsp;' + '<span style="color: #2ABED1;">赠送' + (giveCycle < 12 ? (giveCycle + '个月') : '1年') + '</span>') : '')
-                        + '</p>'
-                      if (effectiveduration_vip != "不延期"){
-                        listhtml += '<p class="item-ifo ellipsis">有效日期:' + effectivetime_vip + '</p>';
-                      }
-                    //}
-                    listhtml += '</div></a>'
-                    listhtml += '<div class="price">'
-                    if (can1111 || isLiveActive) {
-                        var originPrice = formatMoney(parseFloat(orginsPrices) / parseFloat(0.6));
-                        if (can1111) {
-                            originPrice = formatMoney(parseFloat(orginsPrices) / 100)
-                        }
-
-                        listhtml += '<span class="origin-price-container">'
-                            + '<span>原价:¥</span>'
-                            + '<span class="origin-price">' + originPrice + '</span>'
-                            + '</span>'
-                    }else{
-                      listhtml += discountHtml
-                    }
-                    listhtml += '<strong class="current">¥' + orderMoney_vip + '</strong>'
-                        + '</div>'
-                        + '</div>'
-                        + iconHtml
-                        + '</div>'
-                }
-
-            } else if (obj.product_type === "中标必听课") {
-                count++;
-                var id = obj.id;
-                //订单编号
-                var orderCode = obj.order_code;
-                //创建时间
-                var createTime = obj.create_time;
-                createTime = createTime.replace(/-/g, ".")
-                var payWay = obj.pay_way
-                var filterObj = JSON.parse(obj.filter);
-                var courseName = filterObj.s_name;
-                var courseLength = filterObj.s_courseDate;
-                var courseEndTimeStamp = filterObj.l_endtime;
-                var courseId = filterObj._id;
-                var orderStatus = obj.order_status;
-                var orderStatusHtml = "";
-                var orderStatusHtmls = "";
-                var orderMoney = obj.order_money;
-                var applybill_status = obj.applybill_status;
-
-                var courseEndTime = new Date(courseEndTimeStamp * 1000)
-
-                var lastHtml = "";
-                var orderUrl = "/weixin/pay/xs_payNow?code=" + orderCode;
-                var helpHtml = "";
-
-                if (orderStatus === 0) {
-                    orderStatusHtml = "待付款";
-                    orderStatusHtmls = "notpay";
-                    lastHtml = '<div class="card-footer">'
-                        + '<a class="btn cancle" onclick="cancelOrder(' + id + ',this)">取消订单</a>'
-                        + '<a onclick="window.location.href =\'' + "/weixin/pay/checkout_onlineCourse?orderCode=" + orderCode + '\'" class="btn green-btn">去支付</a>'
-                        + '</div>'
-                } else if (orderStatus === 1) {
-                    orderStatusHtml = "已完成";
-                    if (filterObj.i_drawer === 1) {
-                        if (applybill_status === 0) {
-                            lastHtml = '<div class="card-footer">'
-                                + '<a onclick="setSessionStorage()" href="/front/invoice/showpage?order_code=' + orderCode + '" class="btn cancle">开发票</a>'
-                                + '</div>'
-                        } else if (applybill_status === 1 || applybill_status === 2) {
-                            lastHtml = '<div class="card-footer">'
-                                + '<a onclick="checkinvoice(this,' + applybill_status + ')" class="btn cancle">查看发票</a>'
-                                + '</div>'
-                        }
-                    } else {
-                        if (applybill_status === 0) {
-                            lastHtml = '<div class="card-footer">'
-                                + '<a onclick="setSessionStorage()" href="/jyxsapp/invoice?code=' + orderCode + '" class="btn cancle">开发票</a>'
-                                + '</div>'
-                        } else if (applybill_status === 1 || applybill_status === 2) {
-                            var toHref = "/jyxsapp/invoiceDetail?code=" + orderCode + "&id=" + id
-                            lastHtml = '<div class="card-footer">'
-                                + '<a onclick="checkinvoice(this,' + applybill_status + ',\'' + toHref + '\')"  class="btn cancle">查看发票</a>'
-                                + '</div>'
-                        }
-                    }
-                } else {
-                    orderStatusHtml = "已取消";
-                }
-
-                listhtml += '<div class="card">'
-                    + '<div class="card-header">'
-                    + '<span class="time">' + createTime + '</span>'
-                    + '<span class="status ' + orderStatusHtmls + '">'
-                    + helpHtml
-                    + '<span class="status-text">' + orderStatusHtml + '</span>'
-                    + '<a class="delete_icon" title="删除订单" onclick="deleteOrder(' + id + ',this)"></a>'
-                    + '</span>'
-                    + '</div>'
-                    + '<div class="card-content">'
-                    + '<a onclick="setSessionStorage()" href="' + orderUrl + '" eid="' + orderCode + '" vid="' + orderCode + '" class="media" courseOnlineOrder="true">'
-                    + '<div class="media-img">'
-                    + '<img src="/course/image/lessonsOnline.png">'
-                    + '</div>'
-                    + '<div class="media-info">'
-                    + '<p class="item-ifo ellipsis-2">课程名称:' + courseName + '</p>'
-                    + '<p class="item-ifo ellipsis">课程类型:中标必听课</p>'
-                    + '<p class="item-ifo ellipsis">课程时长:' + courseLength + '</p>'
-                    + '<p class="item-ifo ellipsis">课程节数:共' + (!filterObj.i_num ? 1 : filterObj.i_num) + '节</p>'
-                    + '<p class="item-ifo ellipsis">有效日期:' + courseEndTime.getFullYear() + '/' + (courseEndTime.getMonth() + 1) + '/' + courseEndTime.getDate() + ' 到期</p>'
-                    + '</div>'
-                    + '</a>'
-                    + '<div class="price">'
-                    + '<strong class="current">¥' + formatMoney(orderMoney) + '</strong>'
-                    + '</div>'
-                    + '</div>'
-                    + lastHtml
-                    + '</div>'
-            } else if (obj.product_type === "数据报告") {
-                if (typ === 1 || $(".tab-link.active").index() === 1) {	//待付款订单列表页
-                    if (obj.order_status === -2) {
-                        continue;
-                    }
-                }
-                count++;
-                var id = obj.id;
-                //订单编号
-                var orderCode = obj.order_code;
-                //创建时间
-                var createTime = obj.create_time;
-                createTime = createTime.replace(/-/g, ".")
-                var filterObj = JSON.parse(obj.filter);
-                var reportName = filterObj.report_name;
-                var pushTimeStamp = filterObj.l_pushtime;
-
-                var orderStatus = obj.order_status;
-                var orderStatusHtml = "";
-                var orderStatusHtmls = "";
-                var orderMoney = obj.order_money;
-                var applybill_status = obj.applybill_status;
-
-                var pushTime = new Date(pushTimeStamp * 1000)
-
-                var lastHtml = "";
-                var orderUrl = "/datareport/page/order/detail/" + orderCode;
-                var helpHtml = "";
-
-                if (orderStatus === 0) {
-                    orderStatusHtml = "待付款";
-                    orderStatusHtmls = "notpay";
-                    lastHtml = '<div class="card-footer">'
-                        + '<a class="btn cancle" onclick="cancelOrder(' + id + ',this)">取消订单</a>'
-                        + '<a onclick="window.location.href=\'' + '/weixin/pay/datareport?ordercode=' + orderCode + '\'" class="btn green-btn">去支付</a>'
-                        + '</div>';
-                } else if (orderStatus === 1) {
-                    orderStatusHtml = "已完成";
-                    if (applybill_status === 0) {
-                        lastHtml = '<div class="card-footer">'
-                            + '<a onclick="invoiceAdd(this)" class="btn  gray-btn">开发票</a>'
-                            + '</div>'
-                    } else if (applybill_status === 1 || applybill_status === 2) {
-                        lastHtml = '<div class="card-footer">'
-                            + '<a onclick="checkinvoice(this,' + applybill_status + ')" class="btn  gray-btn">查看发票</a>'
-                            + '</div>'
-                    }
-                } else {
-                    orderStatusHtml = "已取消";
-                }
-
-                listhtml += '<div class="card">'
-                    + '<div class="card-header">'
-                    + '<span class="time">' + createTime + '</span>'
-                    + '<span class="status ' + orderStatusHtmls + '">'
-                    + helpHtml
-                    + '<span class="status-text">' + orderStatusHtml + '</span>'
-                    + '<a class="delete_icon" title="删除订单" onclick="deleteOrder(\'' + id + '\',this)"></a>'
-                    + '</span>'
-                    + '</div>'
-                    + '<div class="card-content">'
-                    + '<a onclick="setSessionStorage()" href="' + orderUrl + '" eid="' + orderCode + '" class="media" datareportOrder="true">'
-                    + '<div class="media-img">'
-                    + '<img src="/images/pc/report_icon.png">'
-                    + '</div>'
-                    + '<div class="media-info">'
-                    + '<p class="item-ifo ellipsis">报告名称:' + reportName + '</p>'
-                    + '<p class="item-ifo ellipsis">发布日期:' + pushTime.getFullYear() + '/' + (pushTime.getMonth() + 1) + '/' + pushTime.getDate() + '</p>'
-                    + '</div>'
-                    + '</a>'
-                    + '<div class="price">'
-                    + '<strong class="current">¥' + formatMoney(orderMoney) + '</strong>'
-                    + '</div>'
-                    + '</div>'
-                    + lastHtml
-                    + '</div>'
-            } else if (obj.product_type === "大会员") {
-                if (typ === 1 || $(".tab-link.active").index() === 1) {	//待付款订单列表页
-                    if (obj.order_status === -2) {
-                        continue;
-                    }
-                }
-                count++;
-                var id = obj.id;
-                //订单编号
-                var orderCode = obj.order_code;
-                //创建时间
-                var createTime = obj.create_time;
-                createTime = createTime.replace(/-/g, ".")
-                var filterObj = JSON.parse(obj.filter);
-                var source = "";
-                if(filterObj.source){
-                  source = filterObj.source;
-                }
-                var level = filterObj.level;
-                var cycle = filterObj.cycle;
-                var level_map = new Map();
-                var expert = new Map();
-
-                expert.set("img", "/order/image/dahuiyuan1.png");
-                expert.set("level", "专家版");
-                var smart = new Map();
-                smart.set("img", "/order/image/dahuiyuan3.png");
-                smart.set("level", "智慧版");
-                var niche = new Map();
-                niche.set("img", "/order/image/dahuiyuan2.png");
-                niche.set("level", "商机版");
-                var trial = new Map();
-                trial.set("img", "/order/image/dahuiyuan4.png");
-                trial.set("level", "试用版");
-                var custom = new Map();
-                custom.set("img", "/order/image/dahuiyuan1.png");
-                custom.set("level", "自定义");
-                level_map.set(1, expert);
-                level_map.set(2, smart);
-                level_map.set(3, niche);
-                level_map.set(4, trial);
-                level_map.set(5, custom);
-                var imgurl = level_map.get(filterObj.level).get("img");
-                var member_endtime = "-";
-                if (obj.vip_endtime != null && obj.order_status == 1) {
-                    member_endtime = formatTime(obj.vip_endtime).replace(/\./g, "/") + " 到期";
-                }
-                var member_cycle = filterObj.cycle;
-                if (filterObj.level == 4) {
-                    member_cycle += "天"
-                } else {
-                  var createType = filterObj.createType
-                  if (createType){
-                    member_cycle+="个月";
-                  }else{
-                    member_cycle+="年"
-                  }
-                }
-                var member_level=level_map.get(filterObj.level).get("level");
-                //if(filterObj.combo!=null&&filterObj.combo!=undefined&&filterObj.combo!=""){
-                //  member_level="自定义-"+filterObj.combo;
-                // }
-                var orderStatus = obj.order_status;
-                var orderStatusHtml = "";
-                var orderStatusHtmls = "";
-                var orderMoney = obj.order_money;
-                var applybill_status = obj.applybill_status;
-                var pushTime = new Date(pushTimeStamp * 1000)
-
-                var lastHtml = "";
-                var orderUrl = "/front/wxMyOrder/memberDetail/" + orderCode;
-
-                if (orderStatus === 0) {
-                    var payNameTmp = "去支付"
-                    if (obj.pay_way === "transferAccounts") {
-                        orderStatusHtmls = "refund";
-                        if (obj.course_status === 2) {
-                            orderStatusHtml = "转账审核中";
-                        } else if (obj.course_status === 3) {
-                            orderStatusHtml = "未收到转账";
-                            payNameTmp = "再次支付"
-                        }
-                    } else {
-                        orderStatusHtml = "待付款";
-                        orderStatusHtmls = "notpay";
-                    }
-                    if (!(obj.pay_way === "transferAccounts" && (obj.course_status === 2 || obj.course_status === 4))) {
-                        lastHtml = '<div class="card-footer">'
-                            + '<a class="btn cancle" onclick="cancelOrder(' + id + ',this)">取消订单</a>'
-                            + '<a onclick="window.location.href=\'' + '/weixin/pay/checkout_member?orderCode=' + orderCode + '\'" class="btn green-btn">' + payNameTmp + '</a>'
-                            + '</div>';
-                    }
-                } else if (orderStatus === 1) {
-                    orderStatusHtml = "已完成";
-                    orderStatusHtmls = "finish";
-                    var customIsAll = 0
-                    if (filterObj.isAll){
-                      customIsAll=filterObj.isAll
-                    }
-                    if (customIsAll == 2){
-                      orderStatusHtml = "待付款";
-                      orderStatusHtmls = "notpay";
-                    }else if (customIsAll == 3){
-                      orderStatusHtml = "待付完";
-                      orderStatusHtmls = "notpay";
-                    }
-                    if (source===""){
-                      if (applybill_status === 0) {
-                          lastHtml = '<div class="card-footer">'
-                              + '<a onclick="invoiceAdd(this)" class="btn  gray-btn">开发票</a>'
-                              + '</div>'
-                      } else if (applybill_status === 1 || applybill_status === 2) {
-                          lastHtml = '<div class="card-footer">'
-                              + '<a onclick="checkinvoice(this,' + applybill_status + ')" class="btn  gray-btn">查看发票</a>'
-                              + '</div>'
-                      }
-                    }
-                } else {
-                    orderStatusHtml = "已取消";
-                    orderStatusHtmls = "status-text";
-                }
-                listhtml += '<div class="card">'
-                    + '<div class="card-header">'
-                    + '<span class="time" style="color:#888888">' + createTime + '</span>'
-                    + '<span class="status ' + orderStatusHtmls + '">'
-                    + '<span class="status-text">' + orderStatusHtml + '</span>'
-                    + '<a class="delete_icon" title="删除订单" onclick="deleteOrder(\'' + id + '\',this)"></a>'
-                    + '</span>'
-                    + '</div>'
-                    + '<div class="card-content">'
-                    + '<a onclick="setSessionStorage()" href="' + orderUrl + '" eid="' + orderCode + '" class="media" datareportOrder="true">'
-                    + '<div class="media-img">'
-                    + '<img src="' + imgurl + '">'
-                    + '</div>'
-                    + '<div class="media-info">'
-                    + '<p class="item-ifo ellipsis">会员套餐:' + member_level + '</p>'
-                    + '<p class="item-ifo ellipsis">订阅周期:' + member_cycle + ' </p>'
-                    + '<p class="item-ifo ellipsis">有效日期:' + member_endtime + '</p>'
-                    + '</div>'
-                    + '</a>'
-                    + '<div class="price">'
-                    + '<strong class="current">¥' + formatMoney(orderMoney) + '</strong>'
-                    + '</div>'
-                    + '</div>'
-                    + lastHtml
-                    + '</div>'
-            }else if (obj.product_type === "大会员-子账号") {
-                if (typ === 1 || $(".tab-link.active").index() === 1) {	//待付款订单列表页
-                    if (obj.order_status === -2) {
-                        continue;
-                    }
-                }
-                count++;
-                var id = obj.id;
-                //订单编号
-                var orderCode = obj.order_code;
-                //创建时间
-                var createTime = obj.create_time;
-                createTime = createTime.replace(/-/g, ".")
-                var filterObj = JSON.parse(obj.filter);
-                var source = "";
-                if(filterObj.source){
-                  source = filterObj.source;
-                }
-                var level = filterObj.level;
-                var level_map = new Map();
-                var expert = new Map();
-
-                expert.set("img", "/order/image/zizhanghao1.png");
-                expert.set("level", "专家版");
-                var smart = new Map();
-                smart.set("img", "/order/image/zizhanghao3.png");
-                smart.set("level", "智慧版");
-                var niche = new Map();
-                niche.set("img", "/order/image/zizhanghao2.png");
-                niche.set("level", "商机版");
-                var custom = new Map();
-                custom.set("level", "自定义");
-                custom.set("img", "/order/image/zizhanghao1.png");
-                level_map.set(1, expert);
-                level_map.set(2, smart);
-                level_map.set(3, niche);
-                level_map.set(5, custom);
-                var imgurl = level_map.get(filterObj.level).get("img");
-                var member_endtime = "-";
-                if (obj.vip_endtime != null && obj.order_status == 1) {
-                    member_endtime = formatTime(obj.vip_endtime).replace(/\./g, "/") + " 到期";
-                }
-                var orderStatus = obj.order_status;
-                var orderStatusHtml = "";
-                var orderStatusHtmls = "";
-                var orderMoney = obj.order_money;
-                var applybill_status = obj.applybill_status;
-                var pushTime = new Date(pushTimeStamp * 1000)
-
-                var lastHtml = "";
-                var orderUrl = "/front/wxMyOrder/subAccountDetail/" + orderCode;
-
-                if (orderStatus === 0) {
-                    var payNameTmp = "去支付"
-                    if (obj.pay_way === "transferAccounts") {
-                        orderStatusHtmls = "refund";
-                        if (obj.course_status === 2) {
-                            orderStatusHtml = "转账审核中";
-                        } else if (obj.course_status === 3) {
-                            orderStatusHtml = "未收到转账";
-                            payNameTmp = "再次支付"
-                        }
-                    } else {
-                        orderStatusHtml = "待付款";
-                        orderStatusHtmls = "notpay";
-                    }
-                    if (!(obj.pay_way === "transferAccounts" && (obj.course_status === 2 || obj.course_status === 4))) {
-                        lastHtml = '<div class="card-footer">'
-                            + '<a class="btn cancle" onclick="cancelOrder(' + id + ',this)">取消订单</a>'
-                            + '<a onclick="window.location.href=\'' + '/weixin/pay/checkout_member?orderCode=' + orderCode + '\'" class="btn green-btn">' + payNameTmp + '</a>'
-                            + '</div>';
-                    }
-                } else if (orderStatus === 1) {
-                    orderStatusHtml = "已完成";
-                    orderStatusHtmls = "finish";
-                    var customIsAll = 0
-                    if (filterObj.isAll){
-                      customIsAll=filterObj.isAll
-                    }
-                    if (customIsAll == 2){
-                      orderStatusHtml = "待付款";
-                      orderStatusHtmls = "notpay";
-                    }else if (customIsAll == 3){
-                      orderStatusHtml = "待付完";
-                      orderStatusHtmls = "notpay";
-                    }
-                    //非企明星后台可开发票
-                    if (source === "" && applybill_status === 0) {
-                        lastHtml = '<div class="card-footer">'
-                            + '<a onclick="invoiceAdd(this)" class="btn  gray-btn">开发票</a>'
-                            + '</div>'
-                    } else if (applybill_status === 1 || applybill_status === 2) {
-                        lastHtml = '<div class="card-footer">'
-                            + '<a onclick="checkinvoice(this,' + applybill_status + ')" class="btn  gray-btn">查看发票</a>'
-                            + '</div>'
-                    }
-                } else {
-                    orderStatusHtml = "已取消";
-                    orderStatusHtmls = "status-text";
-                }
-                listhtml += '<div class="card">'
-                    + '<div class="card-header">'
-                    + '<span class="time" style="color:#888888">' + createTime + '</span>'
-                    + '<span class="status ' + orderStatusHtmls + '">'
-                    + '<span class="status-text">' + orderStatusHtml + '</span>'
-                    + '<a class="delete_icon" title="删除订单" onclick="deleteOrder(\'' + id + '\',this)"></a>'
-                    + '</span>'
-                    + '</div>'
-                    + '<div class="card-content">'
-                    + '<a onclick="setSessionStorage()" href="' + orderUrl + '" eid="' + orderCode + '" class="media" datareportOrder="true">'
-                    + '<div class="media-img">'
-                    + '<img src="' + imgurl + '">'
-                    + '</div>'
-                    + '<div class="media-info">'
-                    + '<p class="item-ifo ellipsis">会员套餐:' + level_map.get(filterObj.level).get("level") + '</p>'
-                    + '<p class="item-ifo ellipsis">有效日期:' + member_endtime + '</p>'
-                    + '<p class="item-ifo ellipsis">付费账号:' + filterObj.pay_sub_num + ' 个</p>'
-                    + '<p class="item-ifo ellipsis">免费账号:' + filterObj.free_sub_num + ' 个</p>'
-                    + '</div>'
-                    + '</a>'
-                    + '<div class="price">'
-                    + '<strong class="current">¥' + formatMoney(orderMoney) + '</strong>'
-                    + '</div>'
-                    + '</div>'
-                    + lastHtml
-                    + '</div>'
-            }else if (obj.product_type === "大会员-补充包"||obj.product_type === "大会员-AI中标预测包"||obj.product_type === "大会员-招标文件解读") {
-                if (typ === 1 || $(".tab-link.active").index() === 1) {	//待付款订单列表页
-                    if (obj.order_status === -2) {
-                        continue;
-                    }
-                }
-                count++;
-                var buchongbaoHtml = '';
-                var id = obj.id;
-                //订单编号
-                var orderCode = obj.order_code;
-                //创建时间
-                var createTime = obj.create_time;
-                createTime = createTime.replace(/-/g, ".")
-                var filterObj = JSON.parse(obj.filter);
-                var source = "";
-                if(filterObj.source){
-                  source = filterObj.source;
-                }
-                var member_endtime = "-";
-                if (obj.product_type === "大会员-补充包"){
-                  var checkout_aiForecastPack="checkout_aiForecastPack";
-                  var bigmemberBid="";
-                  if (obj.vip_endtime != null && obj.order_status == 1) {
-                      member_endtime = formatTime(obj.vip_endtime).replace(/\./g, "/");
-                  }
-                  var supplys = filterObj.supplys;
-                  if (supplys){
-                    for (var i = 0; i < supplys.length; i++) {
-                        var serviceUnit = '个'
-                        if (i > 3) {
-                            buchongbaoHtml += '<p class="item-ifo ellipsis">...</p>';
-                            break;
-                        }
-                        if (supplys[i]["id"] == "15" || supplys[i]["id"] == "6") {
-                            serviceUnit = "次"
-                        }
-                        buchongbaoHtml += '<p class="item-ifo ellipsis buchongbao">' + supplys[i]["name"] + '(' + supplys[i]["count"] + serviceUnit + ')' + '</p>'
-                    }
-                  }
-                }else if (obj.product_type === "大会员-AI中标预测包"){
-                  member_endtime = filterObj.effective_date;
-                  buchongbaoHtml += '<p class="item-ifo ellipsis buchongbao">中标企业预测(' + filterObj.count*10 + ')次' + '</p>'
-                }else if (obj.product_type === "大会员-招标文件解读"){
-                  checkout_aiForecastPack="checkout_bidfile"
-                  bigmemberBid="&b=1";
-                  member_endtime ="2021/11/15";
-                  buchongbaoHtml += '<p class="item-ifo ellipsis buchongbao">招标文件解读(' + filterObj.count + ')次' + '</p>'
-                }
-                var level = filterObj.level;
-                var level_map = new Map();
-                var expert = new Map();
-                expert.set("level", "专家版");
-                var smart = new Map();
-                smart.set("level", "智慧版");
-                var entniche = new Map();
-                entniche.set("level", "商机版");
-                var custom = new Map();
-                custom.set("level", "自定义");
-                level_map.set(1, expert);
-                level_map.set(2, smart);
-                level_map.set(3, entniche);
-                level_map.set(5, custom);
-                var imgurl = "/order/image/buchongbao.png";
-                var orderStatus = obj.order_status;
-                var orderMoney = obj.order_money;
-                var applybill_status = obj.applybill_status;
-                var pushTime = new Date(pushTimeStamp * 1000)
-                var lastHtml = "";
-                var orderUrl = "/front/wxMyOrder/aiForecastPackdetail/" + orderCode;
-                var orderStatusHtml = "";
-                var orderStatusHtmls = "";
-                if (orderStatus === 0) {
-                    var payNameTmp = "去支付"
-                    if (obj.pay_way === "transferAccounts") {
-                        orderStatusHtmls = "refund";
-                        if (obj.course_status === 2) {
-                            orderStatusHtml = "转账审核中";
-                        } else if (obj.course_status === 3) {
-                            orderStatusHtml = "未收到转账";
-                            payNameTmp = "再次支付"
-                        }
-                    } else {
-                        orderStatusHtml = "待付款";
-                        orderStatusHtmls = "notpay";
-                    }
-                    if (!(obj.pay_way === "transferAccounts" && (obj.course_status === 2 || obj.course_status === 4))) {
-                        lastHtml = '<div class="card-footer">'
-                            + '<a class="btn cancle" onclick="cancelOrder(' + id + ',this)">取消订单</a>'
-                            + '<a onclick="window.location.href=\'' + '/weixin/pay/'+checkout_aiForecastPack+'?orderCode=' + orderCode + bigmemberBid+ '\'" class="btn green-btn">' + payNameTmp + '</a>'
-                            + '</div>';
-                    }
-                } else if (orderStatus === 1) {
-                    orderStatusHtml = "已完成";
-                    orderStatusHtmls = "finish";
-                    var customIsAll = 0
-                    if (filterObj.isAll){
-                      customIsAll=filterObj.isAll
-                    }
-                    if (customIsAll == 2){
-                      orderStatusHtml = "待付款";
-                      orderStatusHtmls = "notpay";
-                    }else if (customIsAll == 3){
-                      orderStatusHtml = "待付完";
-                      orderStatusHtmls = "notpay";
-                    }
-                    if (source===""){
-                      if (applybill_status === 0) {
-                          lastHtml = '<div class="card-footer">'
-                              + '<a onclick="invoiceAdd(this)" class="btn  gray-btn">开发票</a>'
-                              + '</div>'
-                      } else if (applybill_status === 1 || applybill_status === 2) {
-                          lastHtml = '<div class="card-footer">'
-                              + '<a onclick="checkinvoice(this,' + applybill_status + ')" class="btn  gray-btn">查看发票</a>'
-                              + '</div>'
-                      }
-                    }
-                } else {
-                    orderStatusHtml = "已取消";
-                    orderStatusHtmls = "status-text";
-                }
-                listhtml += '<div class="card">'
-                    + '<div class="card-header">'
-                    + '<span class="time">' + createTime + '</span>'
-                    + '<span class="status ' + orderStatusHtmls + '">' + orderStatusHtml
-                    + '<a class="shanchu iconfont  icon-shanchu" title="删除订单" onclick="deleteOrder(' + id + ',this)"></a>'
-                    + '</span>'
-                    + '</div>'
-                    + '<div class="card-content">'
-                    + '<a onclick="setSessionStorage()" href="' + orderUrl + '" eid="' + orderCode + '" class="media" datareportOrder="true">'
-                    + '<div class="media-img">'
-                    + '<img src="' + imgurl + '">'
-                    + '</div>'
-                    + '<div class="media-info">'
-                    + '<p class="item-ifo ellipsis">服务列表:</p>'
-                    + buchongbaoHtml
-                    + '<p class="item-ifo ellipsis">有效日期:' + member_endtime + '到期</p>'
-                    + '</div>'
-                    + '</a>'
-                    + '<div class="price">'
-                    + '<strong class="current">¥' + formatMoney(orderMoney) + '</strong>'
-                    + '</div>'
-                    + '</div>'
-                    + lastHtml
-                    + '</div>'
-            } else if (obj.product_type === "招标文件解读") {
-                if (typ === 1 || $(".tab-link.active").index() === 1) {	//待付款订单列表页
-                    if (obj.order_status === -2) {
-                        continue;
-                    }
-                }
-                count++;
-                var id = obj.id;
-                //订单编号
-                var orderCode = obj.order_code;
-                //创建时间
-                var createTime = obj.create_time;
-                createTime = createTime.replace(/-/g, ".")
-                var filterObj = JSON.parse(obj.filter);
-                var level = filterObj.level;
-                var level_map = new Map();
-                var expert = new Map();
-                var imgurl = "/order/image/zbwjjd_new.png";
-                var orderStatus = obj.order_status;
-                var orderStatusHtml = "";
-                var orderStatusHtmls = "";
-                var orderMoney = obj.order_money;
-                var applybill_status = obj.applybill_status;
-                var pushTime = new Date(pushTimeStamp * 1000)
-
-                var lastHtml = "";
-                var orderUrl = "/front/wxMyOrder/bidfileDetail/" + orderCode;
-
-                if (orderStatus === 0) {
-                    var payNameTmp = "去支付"
-                    if (obj.pay_way === "transferAccounts") {
-                        orderStatusHtmls = "refund";
-                        if (obj.course_status === 2) {
-                            orderStatusHtml = "转账审核中";
-                        } else if (obj.course_status === 3) {
-                            orderStatusHtml = "未收到转账";
-                            payNameTmp = "再次支付"
-                        }
-                    } else {
-                        orderStatusHtml = "待付款";
-                        orderStatusHtmls = "notpay";
-                    }
-                    if (!(obj.pay_way === "transferAccounts" && (obj.course_status === 2 || obj.course_status === 4))) {
-                        lastHtml = '<div class="card-footer">'
-                            + '<a class="btn cancle" onclick="cancelOrder(' + id + ',this)">取消订单</a>'
-                            + '<a onclick="window.location.href=\'' + '/weixin/pay/checkout_bidfile?orderCode=' + orderCode + '\'" class="btn green-btn">' + payNameTmp + '</a>'
-                            + '</div>';
-                    }
-                } else if (orderStatus === 1) {
-                    orderStatusHtml = "已完成";
-                    orderStatusHtmls = "finish";
-
-                    if (applybill_status === 0) {
-                        lastHtml = '<div class="card-footer">'
-                            + '<a onclick="invoiceAdd(this)" class="btn  gray-btn">开发票</a>'
-                            + '</div>'
-                    } else if (applybill_status === 1 || applybill_status === 2) {
-                        lastHtml = '<div class="card-footer">'
-                            + '<a onclick = "checkinvoice(this,' + applybill_status + ')" class="btn  gray-btn">查看发票</a>'
-                            + '</div>'
-                    }
-                } else {
-                    orderStatusHtml = "已取消";
-                    orderStatusHtmls = "status-text";
-                }
-                listhtml += '<div class="card">'
-                    + '<div class="card-header">'
-                    + '<span class="time" style="color:#888888">' + createTime + '</span>'
-                    + '<span class="status ' + orderStatusHtmls + '">'
-                    + '<span class="status-text">' + orderStatusHtml + '</span>'
-                    + '<a class="delete_icon" title="删除订单" onclick="deleteOrder(\'' + id + '\',this)"></a>'
-                    + '</span>'
-                    + '</div>'
-                    + '<div class="card-content">'
-                    + '<a onclick="setSessionStorage()" href="' + orderUrl + '" eid="' + orderCode + '" class="media" datareportOrder="true">'
-                    + '<div class="media-img">'
-                    + '<img src="' + imgurl + '">'
-                    + '</div>'
-                    + '<div class="media-info">'
-                    + '<p class="item-ifo ellipsis">产品类型:招标文件解读</p>'
-                    + '<p class="item-ifo ellipsis">购买次数:' + filterObj.count + '次</p>'
-                    + '<p class="item-ifo ellipsis">有效日期:' + "2021/11/15" + ' 到期</p>'
-                    + '</div>'
-                    + '</a>'
-                    + '<div class="price">'
-                    + '<strong class="current">¥' + formatMoney(orderMoney) + '</strong>'
-                    + '</div>'
-                    + '</div>'
-                    + lastHtml
-                    + '</div>'
-            }else if (obj.product_type === "剑鱼币") {
-                if (typ === 1 || $(".tab-link.active").index() === 1) {	//待付款订单列表页
-                    if (obj.order_status === -2) {
-                        continue;
-                    }
-                }
-                count++;
-                var id = obj.id;
-                //订单编号
-                var orderCode = obj.order_code;
-                //创建时间
-                var createTime = obj.create_time;
-                createTime = createTime.replace(/-/g, ".")
-                var filterObj = JSON.parse(obj.filter);
-                var level = filterObj.level;
-                var level_map = new Map();
-                var expert = new Map();
-                var imgurl = "/order/image/jianyubi.png";
-                var orderStatus = obj.order_status;
-                var orderStatusHtml = "";
-                var orderStatusHtmls = "";
-                var orderMoney = obj.order_money;
-                var applybill_status = obj.applybill_status;
-                var pushTime = new Date(pushTimeStamp * 1000)
-
-                var lastHtml = "";
-                var orderUrl = "/front/wxMyOrder/integralDetail/" + orderCode;
-                //优惠
-                var discountHtml = ""
-                if ((orderStatus === 0||orderStatus === 1)&&obj.discount_price>0){
-                  var totalPrice = Number(obj.order_money) + Number(obj.discount_price)
-                  discountHtml = '<p class="discount"><span class="current">'+totalName+'¥' + formatMoney(totalPrice) + '</span>'
-                                + '<span class="current">'+discountName+'¥' + formatMoney(obj.discount_price) + '</span>'
-                }
-                if (orderStatus === 0) {
-                    var payNameTmp = "去支付"
-                    if (obj.pay_way === "transferAccounts") {
-                        orderStatusHtmls = "refund";
-                        if (obj.course_status === 2) {
-                            orderStatusHtml = "转账审核中";
-                        } else if (obj.course_status === 3) {
-                            orderStatusHtml = "未收到转账";
-                            payNameTmp = "再次支付"
-                        }
-                    } else {
-                        orderStatusHtml = "待付款";
-                        orderStatusHtmls = "notpay";
-                    }
-                    if (!(obj.pay_way === "transferAccounts" && (obj.course_status === 2 || obj.course_status === 4))) {
-                        lastHtml = '<div class="card-footer">'
-                            + '<a class="btn cancle" onclick="cancelOrder(' + id + ',this)">取消订单</a>'
-                            + '<a onclick="window.location.href=\'' + '/weixin/pay/checkout_integral?orderCode=' + orderCode + '\'" class="btn green-btn">' + payNameTmp + '</a>'
-                            + '</div>';
-                    }
-                } else if (orderStatus === 1) {
-                    orderStatusHtml = "已完成";
-                    orderStatusHtmls = "finish";
-                    if (applybill_status === 0) {
-                        lastHtml = '<div class="card-footer">'
-                            + '<a onclick="invoiceAdd(this)" class="btn  gray-btn">开发票</a>'
-                            + '</div>'
-                    } else if (applybill_status === 1 || applybill_status === 2) {
-                        lastHtml = '<div class="card-footer">'
-                            + '<a onclick = "checkinvoice(this,' + applybill_status + ')" class="btn  gray-btn">查看发票</a>'
-                            + '</div>'
-                    }
-                    discountHtml +='<span>'+isPayName+'</span>'
-                } else {
-                    orderStatusHtml = "已取消";
-                    orderStatusHtmls = "status-text";
-                }
-                discountHtml +='</p>'
-                var jianyubiCount =filterObj.score;
-                listhtml += '<div class="card">'
-                    + '<div class="card-header">'
-                    + '<span class="time" style="color:#888888">' + createTime + '</span>'
-                    + '<span class="status ' + orderStatusHtmls + '">'
-                    + '<span class="status-text">' + orderStatusHtml + '</span>'
-                    + '<a class="delete_icon" title="删除订单" onclick="deleteOrder(\'' + id + '\',this)"></a>'
-                    + '</span>'
-                    + '</div>'
-                    + '<div class="card-content">'
-                    + '<a onclick="setSessionStorage()" href="' + orderUrl + '" eid="' + orderCode + '" class="media" datareportOrder="true">'
-                    + '<div class="media-img">'
-                    + '<img src="' + imgurl + '">'
-                    + '</div>'
-                    + '<div class="media-info">'
-                    + '<p class="item-ifo ellipsis">产品类型:剑鱼币</p>'
-                    + '<p class="item-ifo ellipsis">数量:' + formatMoney(jianyubiCount)+ '枚</p>'
-                    + '<p class="item-ifo ellipsis">有效日期:永久</p>'
-                    + '</div>'
-                    + '</a>'
-                    + '<div class="price">'
-                    + discountHtml
-                    + '<strong class="current">¥' + formatMoney(orderMoney) + '</strong>'
-                    + '</div>'
-                    + '</div>'
-                    + lastHtml
-                    + '</div>'
-            }
-        }
-        appendList($(listhtml));
-    }
-
-    function noMoreData(me) {
-        if (me == null) {
-            return;
-        }
-        wxflag = me;
-        hasNextPage = false;
-        // 锁定
-        me.lock();
-        // 无数据
-        me.noData();
-        // 即使加载出错,也得重置
-        me.resetload();
-    }
-
-    // 退款按钮
-    function show_more(e) {
-        $this = $(e)
-        $tooltip = $(e).siblings('.tooltip-text')
-        if ($tooltip.is(':hidden')) {
-            $tooltip.show()
-        } else {
-            $tooltip.hide()
-        }
-    }
-
-    // 格式化金钱的函数
-    // s: 金额(number) 必传
-    // n: 保留小数的位数(int:0-100)
-    function formatMoney(s, n) {
-        if (n === undefined) {
-            n = -1
-        } else {
-            n = n > 0 && n <= 20 ? n : 2;
-        }
-        var intS = parseInt(s)
-        var point = '.'
-        var left;
-        var right;
-        s = parseFloat((s + '').replace(/[^\d\.-]/g, ''))
-        // 没传n,默认(如果为整数,则不保留小数。如果为浮点数,则保留两位小数)
-        if (n === -1) {
-            if (s === intS) {
-                n = 0
-                right = ''
-                point = ''
-            } else {
-                n = 2
-                s = s.toFixed(n);
-                right = s.split('.')[1];
-            }
-            s = s + ''
-            left = s.split('.')[0].split("").reverse();
-        } else {
-            s = parseFloat((s + '').replace(/[^\d\.-]/g, '')).toFixed(n) + '';
-            left = s.split('.')[0].split('').reverse();
-            right = s.split('.')[1];
-        }
-
-        t = "";
-        for (i = 0; i < left.length; i++) {
-            t += left[i] + ((i + 1) % 3 == 0 && (i + 1) != left.length ? ',' : '');
-        }
-
-        var money = t.split('').reverse().join('') + point + right;
-        return money;
-    }
-
-    // 客服电话弹窗
-    function phoneShow() {
-        weui.alert('客服电话400-108-6670', {
-            buttons: [{
-                label: '我知道了',
-                type: 'primary'
-            }]
-        });
-    }
-
-    //开发票
-    function invoiceAdd(e) {
-        setSessionStorage()
-        var orderCode = $(e).parent(".card-footer").prev(".card-content").find("a").attr("eid");
-        $.post("/subscribepay/orderListDetails/isOver", {"order_code": orderCode}, function (data) {
-            if (data.status == 1) {
-                window.location.href = "/front/invoice/showpage?order_code=" + orderCode;
-            } else {
-                window.location.href = "/front/invoice/cantInvoice";
-            }
-            ;
-        })
-    }
-
-    //查看发票flag 1:已开线上发票 2:已开线下发票
-    function checkinvoice(e, flag, otherHref) {
-        if (flag === 2) {
-            weui.alert('您已开具发票<br>如有问题请联系客服<br>400-108-6670', {
-                buttons: [{
-                    label: '我知道了',
-                    type: 'primary'
-                }]
-            });
-            return
-        }
-        setSessionStorage()
-        if (!otherHref) {
-            var orderCode = $(e).parent(".card-footer").prev(".card-content").find("a").attr("eid");
-            otherHref = "/front/invoice/check_invoice.html?order_code=" + orderCode
-        }
-        window.location.href = otherHref
-    }
-
-    function formatTime(t) {
-        try {
-            return t.substring(0, 10).replace(/\-/g, ".")
-        } catch (e) {
-            if (t === null) {
-                t = "";
-            }
-            return t
-        }
-    }
-</script>
-{{include "/common/baiducc.html"}}
+            </van-tab>
+        </van-tabs>
+    </div>
+  <!--S-当前页面的资源-->
+  <script src="/big-member/js/rem.js"></script>
+  <script src=//cdn-common.jianyu360.com/cdn/lib/vue/2.6.11/vue.min.js></script>
+  <script src=//cdn-common.jianyu360.com/cdn/lib/vant/2.12.24/lib/vant.min.js></script>
+  <script src=//cdn-common.jianyu360.com/cdn/lib/jquery/3.6.0/jquery.min.js></script>
+  <!--E-当前页面的资源-->
+  <script src='{{Msg "seo" "cdn"}}/big-member/js/utils.js?v={{Msg "seo" "version"}}'></script>
+  <script src='{{Msg "seo" "cdn"}}/common-module/order-list/js/order-list-config-wx.js?v={{Msg "seo" "version"}}'></script>
+  <script src='{{Msg "seo" "cdn"}}/common-module/order-list/js/order-list.js?v={{Msg "seo" "version"}}'></script>
+  {{include "/common/baiducc.html"}}
 </body>
-</html>
+
+</html>

+ 2167 - 0
src/web/templates/weixin/commonPay/myOrderOld.html

@@ -0,0 +1,2167 @@
+<html>
+<head>
+    <title>我的订单</title>
+    <meta name="viewport" content="width=device-width,initial-scale=1.0">
+    <meta HTTP-EQUIV="pragma" CONTENT="no-cache">
+    <meta HTTP-EQUIV="Cache-Control" CONTENT="no-cache, must-revalidate">
+    <meta HTTP-EQUIV="expires" CONTENT="0">
+    <script src="{{Msg "seo" "cdn"}}/js/rem.js?v={{Msg "seo" "version"}}"></script>
+    <script src="https://cdn-common.jianyu360.com/cdn/lib/jquery/3.6.0/jquery.min.js"></script>
+    <script src="{{Msg "seo" "cdn"}}/js/dropload.js?v={{Msg "seo" "version"}}"></script>
+    <script src="//cdn.bootcss.com/jquery-confirm/3.1.0/jquery-confirm.min.js"></script>
+    <script src="{{Msg "seo" "cdn"}}/wxswordfish/share.js?v={{Msg "seo" "version"}}"></script>
+    {{include "/common/weixin.html"}}
+    <script src="{{Msg "seo" "cdn"}}/vipsubscribe/js/common.js"></script>
+    <script src="{{Msg "seo" "cdn"}}/vipsubscribe/js/weui.min.js?v={{Msg "seo" "version"}}"></script>
+    <link rel="stylesheet" href="{{Msg "seo" "cdn"}}/wxCommonPay/css/weui.min.css?v={{Msg "seo" "version"}}">
+    <link rel="stylesheet" type="text/css"
+          href="{{Msg "seo" "cdn"}}/wx_dataExport/css/base_myorder.css?v={{Msg "seo" "version"}}"/>
+    <link rel="stylesheet" type="text/css"
+          href="{{Msg "seo" "cdn"}}/wxCommonPay/iconfont/iconfont.css?v={{Msg "seo" "version"}}"/>
+    <link rel="stylesheet" href="{{Msg "seo" "cdn"}}/css/dropload.css?v={{Msg "seo" "version"}}">
+    <link href="//cdn.bootcss.com/jquery-confirm/3.1.0/jquery-confirm.min.css" rel="stylesheet">
+    <!--2.8.8-->
+    <link rel="stylesheet" href="{{Msg "seo" "cdn"}}/wxCommonPay/css/order_list.css?v={{Msg "seo" "version"}}">
+    <style>
+        #order_list .main .tabs .card .card-content .price {
+            margin-bottom: 0;
+        }
+
+        /* vip订阅原价 */
+        .origin-price-container {
+            display: inline-block;
+            margin-top: .06rem;
+            margin-right: .1rem;
+            color: #9B9CA3;
+            font-size: .22rem;
+        }
+
+        .origin-price-container .origin-price {
+            text-decoration: line-through;
+        }
+
+        .ellipsis {
+            overflow: hidden;
+            text-overflow: ellipsis;
+            white-space: nowrap;
+        }
+
+        /* 超过2行省略号显示 */
+        .ellipsis-2 {
+            overflow: hidden;
+            text-overflow: ellipsis;
+            display: -webkit-box;
+            -webkit-line-clamp: 2;
+            -webkit-box-orient: vertical;
+        }
+
+        /* 统一弹框头部样式 android ios*/
+        .weui-dialog__title {
+            font-weight: 600 !important;
+            font-size: 18px !important;
+        }
+
+        .weui-dialog__hd {
+            text-align: center !important;
+        }
+
+        .weui-dialog__bd {
+            line-height: 24px;
+            font-weight: normal !important;
+        }
+
+
+        .media-info .buchongbao:before {
+            content: '';
+            display: inline-block;
+            width: 2px;
+            height: 2px;
+            background-color: #5F5E64;
+            vertical-align: middle;
+            margin-right: 7px;
+            border-radius: 4px;
+        }
+        .discount .current{
+          font-size:.2rem !important;
+          margin-right: .1rem;
+          line-height: .28rem;
+        }
+        .discount .current:nth-child(1){
+          border: 1px solid rgba(0, 0, 0, 0.1);
+          border-radius: 8px;
+          padding: .02rem .16rem;
+        }
+        .discount .current:nth-child(2){
+          border: 1px solid rgba(251,72,61,0.10);
+          border-radius: 12px;
+          padding: .02rem .16rem;
+          background: rgba(251,72,61,0.10);
+          color: #FB483D;
+        }
+    </style>
+</head>
+<body>
+<!-- 加载数据-->
+<div class="loading_">
+    <p><span></span></p>
+</div>
+<div id="order_list" class="j-container">
+    <main class="main j-body">
+        <div class="buttons-tab">
+            <ul>
+                <li class="tab-link active">全部</li>
+                <li class="tab-link ">待付款</li>
+                <li class="tab-link ">已完成</li>
+                <li class="tab-link ">已取消</li>
+            </ul>
+        </div>
+        <div class="tabs">
+            <div class="tab active">
+                <div class="card_lists">
+                </div>
+            </div>
+        </div>
+    </main>
+</div>
+<script src="https://cdn-common.jianyu360.com/cdn/lib/zepto/1.2.0/zepto.min.js"></script>
+<script>
+    //ios进入详情页后退不会刷新页面导致orderTabActive没有清,再次进入其他类型订单 展示不对问题
+    window.addEventListener('pageshow', function (event) {
+        if (event.persisted) {
+            location.reload();
+        }
+    }, false);
+
+    var hasNextPage = false;
+    var pageIndex = 1;
+    var wxflag = "";
+    var scrollTop = 0;
+    var dataCache = new Array();
+    var count = 0;
+    var typ = 0;
+    var deleteIndex = 0;
+    var totalName = "商品总价:"
+    var discountName = "优惠金额:"
+    var isPayName =  "实付:"
+
+    initShare({{.T.signature}},{{.T.openid}}, 2, "jy_wxmyorder",{{.T.nickname}},{{.T.avatar}});
+
+    //时间格式化
+    function timestampToTime(timestamp) {
+        var date = new Date(timestamp * 1000);
+        Y = date.getFullYear() + '.';
+        M = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1) + '.';
+        D = date.getDate();
+        return Y + M + D;
+    }
+
+    //格式化数字
+    function toThousands(num) {
+        var num = (num || 0).toString(), result = '';
+        while (num.length > 3) {
+            result = ',' + num.slice(-3) + result;
+            num = num.slice(0, num.length - 3);
+        }
+        if (num) {
+            result = num + result;
+        }
+        return result;
+    }
+
+    function appendList(listhtml) {
+        $(".card_lists").append(listhtml);
+    }
+
+
+    function setSessionStorage() {
+        sessionStorage.orderScrollTop = $(".main")[0].scrollTop;
+        sessionStorage.orderTabActive = $("ul .active").index();
+        sessionStorage.orderPageNum = parseInt(pageIndex) - 1;
+        sessionStorage.course_order_href = "true";
+    }
+
+    function onceMore(e) {
+        setSessionStorage();
+        var orderCode = $(e).parent(".card-footer").prev(".card-content").find("a").attr("eid");
+        window.location.href = "/front/wx_dataExport/toSieve?orderCode=" + orderCode;
+    }
+
+    //续费 1 再次购买 2
+    function renewalOrBuyAgain(pattern, e) {
+        setSessionStorage();
+        var orderCode = $(e).parent(".card-footer").prev(".card-content").find("a").attr("eid");
+        if (pattern === 1) {
+            window.location.href = "/front/vipsubscribe/vipsubscribe_renew?orderCode" + orderCode;
+        } else if (pattern === 2) {
+            window.location.href = "/front/vipsubscribe/vipsubscribe_new?orderCode=" + orderCode;
+        }
+    }
+
+    function deleteOrder(id, obj) {
+        typ = $("ul .active").index()
+        weui.dialog({
+            title: '确定删除订单',
+            content: '确定删除订单,删除后无法恢复',
+            className: 'custom-dialog',
+            buttons: [{
+                label: '取消',
+                type: 'default',
+                onClick: function () {
+                }
+            }, {
+                label: '确定',
+                type: 'primary',
+                onClick: function () {
+                    $(".loading_").show();
+                    $.post("/subscribepay/orderListDetails/deleteOrder", {
+                        "id": id,
+                        "pageNum": pageIndex,
+                        "type": typ,
+                        "fromPage": "wx"
+                    }, function (data) {
+                        $(".loading_").hide();
+                        if (data && data["success"]) {
+                            var self = $(obj).parent().parent();
+                            var parent = self.parent();
+                            if (self.next().find("a").attr("courseOrder") == "true") {
+                                self.parent().remove();
+                            } else {
+                                deleteIndex = self.index();
+                                dataCache.splice(deleteIndex, 1)
+                                //删除索引存入缓存
+                                sessionStorage.setItem("deleteIndex", deleteIndex);
+                                if (data.res != null) {
+                                    dataCache.push(data.res[0])
+                                    //hasNextPage=data.hasNextPage;
+                                    hasNextPage = data.nextPage;
+                                }
+                                self.parent().remove();
+                            }
+                            weui.toast('删除成功', {
+                                duration: 1500,
+                                className: 'j-toast',
+                                callback: function () {
+                                    $(".loading_").show();
+                                    if ($(".card_lists").children("div").length == 0) {
+                                        nodataHtml = ""
+                                        nodataHtml += '<div style="text-align:center;">';
+                                        nodataHtml += '<img src="/wx_dataExport/images/fish.png" style="width: 2.8rem;height: 2.8rem;margin-top: 45%;">'
+                                        nodataHtml += '<div style="color: #888;font-size: .32rem;text-align:center;">暂无数据</div></div>'
+                                        $(".card_lists").append(nodataHtml);
+                                        $(".dropload-down").hide();
+                                    } else {//删除一条数据 往后铺一条数据
+                                        structureHtml(data.res, typ);
+                                    }//铺数据 end
+                                    if (parent.children("div").length < 10) {
+                                        $(".dropload-refresh").text("没有更多了");
+                                    }
+                                    $(".loading_").hide();
+                                }
+                            })
+                        } else {
+                            alertS("删除失败,请联系管理员!");
+                        }
+                    })
+                }
+            }]
+        });
+    }//delete end
+
+    //取消订单
+    function cancelOrder(id, obj) {
+        typ = $("ul .active").index()
+        weui.dialog({
+            title: '确定取消订单',
+            content: '确定取消订单,取消后无法恢复',
+            className: 'custom-dialog',
+            buttons: [{
+                label: '取消',
+                type: 'default',
+                onClick: function () {
+                }
+            }, {
+                label: '确定',
+                type: 'primary',
+                onClick: function () {
+                    $(".loading_").show();
+                    $.post("/subscribepay/orderListDetails/deleteOrder", {
+                        "id": id,
+                        "pageNum": pageIndex,
+                        "type": typ,
+                        "cancel": "cancel",
+                        "fromPage": "wx"
+                    }, function (data) {
+                        $(".loading_").hide();
+                        if (data && data["success"]) {
+                            weui.toast('取消成功', {
+                                duration: 1500,
+                                className: 'j-toast',
+                                callback: function () {
+                                    $(".loading_").show();
+                                    if (typ === 1) {
+                                        var self = $(obj).parent().parent();
+                                        self.remove();
+                                    }
+                                    $(obj).parent(".card-footer").prev(".card-content").find(".discount").html("");
+                                    var self = $(obj).parent(".card-footer").prev(".card-content").prev(".card-header").children(".notpay");
+                                    self.css("color", "#686868");
+                                    var isVipOrder = $(obj).parent(".card-footer").prev(".card-content").children(".media").attr("isvipOrder");
+                                    var courseOrder = $(obj).parent(".card-footer").prev(".card-content").children(".media").attr("courseOrder");
+                                    var courseOnlineOrder = $(obj).parent(".card-footer").prev(".card-content").children(".media").attr("courseOnlineOrder");
+                                    var courseId = $(obj).parent(".card-footer").prev(".card-content").find("a").attr("eid");
+                                    var isDataReport = $(obj).parent(".card-footer").prev(".card-content").children(".media").attr("datareportOrder");
+                                    //vip订单取消了没有再次购买
+                                    if (isVipOrder != "true") {
+                                        if (courseOrder != "true") {
+                                            self.children().remove();
+                                            self.removeClass("notpay").addClass("cancel_text").append('<span class="status-text">已取消</span><a class="delete_icon" title="删除订单" onclick="deleteOrder(' + id + ',this)"></a>');
+                                            if (courseOnlineOrder == "true" || isDataReport == "true") {
+                                                $(obj).parent(".card-footer").remove();
+                                            } else {
+                                                $(obj).parent(".card-footer").html('<a  onclick="onceMore(this)" class="btn cancle">再次购买</a>')
+                                            }
+                                        } else {
+                                            $(obj).parent(".card-footer").html('<a href="/swordfish/course/detail/' + courseId + '" class="btn cancle">再次购买</a>')
+                                            self.children().remove()
+                                            self.removeClass("notpay").addClass("cancel_text").append('<span class="status-text">已取消</span><a class="delete_icon" title="删除订单" onclick="deleteOrder(' + id + ',this)"></a>');
+                                        }
+                                        if ($(".card_lists").children("div").length === 0) {
+                                            nodataHtml = ""
+                                            nodataHtml += '<div style="text-align:center;">';
+                                            nodataHtml += '<img src="/wx_dataExport/images/fish.png?v=51430" style="width: 2.8rem;height: 2.8rem;margin-top: 45%;">'
+                                            nodataHtml += '<div style="color: #888;font-size: .32rem;text-align:center;">暂无数据</div></div>'
+                                            $(".card_lists").append(nodataHtml);
+                                            $(".dropload-down").hide();
+                                        }
+                                    } else {
+                                        $(obj).parent().parent().remove();
+                                        $(".card_lists").empty();
+                                        queryOrder($("ul .active").index(), 10);
+                                    }
+                                    $(".loading_").hide();
+                                }
+                            })
+                        } else {
+                            alertS("取消失败,请联系管理员!");
+                        }
+                    });
+                }
+            }]
+        });
+    }
+
+    function alertS(content) {
+        $.alert({
+            title: "",
+            content: content,
+            buttons: {
+                ok: {
+                    text: '确定',
+                    btnClass: 'btn-primary-2'
+                }
+            }
+        });
+    }
+
+    clickFlag = true;
+    $(function () {
+        sessionStorage.removeItem("applysuccess");
+        sessionStorage.removeItem("companyName");
+        sessionStorage.removeItem("taxNumer");
+
+        $(".buttons-tab .tab-link").each(function () {
+            $(".loading_").hide();
+            var index = $(this).index();
+            $(".buttons-tab .tab-link").eq(0).addClass("active");
+            //
+            $(this).click(function () {
+                $(".loading_").show();
+                $(this).addClass("active").siblings().removeClass("active");
+                $(".tabs>.tab").eq(index).show().siblings().hide();
+                typ = $("ul .active").index();
+                $(".card_lists").empty();
+                queryOrder(index, 10);
+            })
+        })
+
+
+        //解决苹果手机里面的网页返回不刷新页面的问题
+        var browserRule = /^.*((iPhone)|(iPad)|(Safari))+.*$/;
+        if (browserRule.test(navigator.userAgent)) {
+            window.onpageshow = function (event) {
+                if (event.persisted) {
+                    window.location.reload()
+                }
+            };
+        }
+        if (sessionStorage.orderTabActive) {
+            $(".buttons-tab .tab-link").eq(sessionStorage.orderTabActive).addClass("active").siblings().removeClass("active");
+            typ = Number(sessionStorage.orderTabActive);
+            var orderPageNum = parseInt(sessionStorage.orderPageNum);
+            queryOrder(sessionStorage.orderTabActive, orderPageNum * 10);
+            sessionStorage.removeItem("orderPageNum");
+            sessionStorage.removeItem("orderTabActive");
+            if (sessionStorage.orderScrollTop) {
+                setTimeout(function () {
+                    $(".main")[0].scrollTop = parseInt(sessionStorage.orderScrollTop);
+                }, 500)
+                setTimeout(function () {
+                    sessionStorage.removeItem("orderScrollTop");
+                }, 2000)
+            }
+        } else {
+            //后续版本用
+            var active = getParam("active");
+            if (active) {
+                $(".buttons-tab .tab-link").eq(active).addClass("active").siblings().removeClass("active");
+                $(".tabs>.tab").eq(active).show().siblings().hide();
+                $(".card_lists").empty();
+                queryOrder(active, 10);
+            } else {
+                queryOrder(0, 10);
+            }
+        }
+    })
+
+    //查询订单ajax
+    //typ  0全部 1未支付 2已支付
+    function queryOrder(typ, page_size) {
+        var result = true;
+        $.post("/subscribepay/orderListDetails/myOrder", {
+            "type": typ,
+            "page_size": page_size,
+            "fromPage": "wx"
+        }, function (data) {
+            console.log(data)
+            $(".loading_").hide();
+            var list = data.res;
+            dataCache = data.res;
+            if (page_size != 10) {
+                pageIndex = parseInt(page_size / 10) + 1;
+            } else {
+                pageIndex = 2;
+            }
+            hasNextPage = data.hasNextPage;
+            if (data.res && data.res.length > 0) {
+                structureHtml(data.res, typ);
+            }
+            if ($(".card_lists .card").length === 0) {
+                result = false;
+                nodataHtml = ""
+                nodataHtml += '<div style="text-align:center;">';
+                nodataHtml += '<img src="/wx_dataExport/images/fish.png" style="width: 2.8rem;height: 2.8rem;margin-top: 45%;">'
+                nodataHtml += '<div style="color: #888;font-size: .32rem;text-align:center;">暂无数据</div></div>'
+                $(".card_lists").append(nodataHtml);
+            }
+
+            if (!result) {
+                $(".dropload-down").hide()
+                return
+            }
+            if (hasNextPage) {
+                wxflag = $(' .main').dropload({
+                    scrollArea: $(".main"),
+                    loadDownFn: function (me) {
+                        $.post('/subscribepay/orderListDetails/myOrder', {
+                            "pageNum": pageIndex,
+                            "type": typ,
+                            "fromPage": "wx"
+                        }, function (data) {
+                            //没有数据
+                            if (data.res == null || data.res.length == 0) {
+                                noMoreData(me);
+                            } else {
+                                dataCache = dataCache.concat(data.res);
+                                pageIndex++;
+                                structureHtml(data.res, typ);
+                                if (data.hasNextPage) {
+                                    // 每次数据插入,必须重置
+                                    me.resetload();
+                                } else {
+                                    noMoreData(me);
+                                }
+                            }
+                        });
+                    }
+                });
+            } else {
+                wxflag = $('.main').dropload({
+                    scrollArea: window,
+                    loadDownFn: function (me) {
+                        if (wxflag == null) {
+                            wxflag = me;
+                        }
+                        noMoreData(me);
+                    }
+                });
+                noMoreData(wxflag);
+            }
+            //},500)
+        })
+    }
+
+    var orderHtml = "";
+    var iconHtml = "";
+
+    function structureHtml(object, typ) {
+        var listhtml = '';
+        var psss = 0;
+        for (var index in object) {
+            var obj = object[index];
+            var isLiveActive = false;
+            if (obj.isLiveActive) {
+                isLiveActive = true;
+            }
+            if (typ === 1 || $(".tab-link.active").index() === 1) {	//待付款订单列表页
+                if (obj.order_status === -2) {
+                    continue;
+                }
+            }
+            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) !== "_") {
+                            publishTime = timestampToTime(publishTime.slice(0, 10));
+                            publishTime = publishTime + "-";
+                        } else {
+                            publishTime = timestampToTime(publishTime.slice(1, 11));
+                            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 (sessionStorage.orderTabActive === 1 && orderStatus === 1) {
+                        gopayIndex = index;
+                        psss = obj.order_code;
+                        continue;
+                    } else {
+                        sessionStorage.removeItem("paySuccess_" + obj.order_code);
+                    }
+                }
+                //优惠
+                var discountHtml = ""
+                if ((orderStatus === 0||orderStatus === 1)&&obj.discount_price>0){
+                  var totalPrice = Number(obj.order_money) + Number(obj.discount_price)
+                  discountHtml = '<p class="discount"><span class="current">'+totalName+'¥' + formatMoney(totalPrice) + '</span>'
+                                + '<span class="current">'+discountName+'¥' + formatMoney(obj.discount_price) + '</span>'
+                }
+                if (orderStatus === 0) {
+                    orderStatus = "待付款"
+                    orderHtml = "";
+                    orderHtml += '<span class="status notpay">'
+                    orderHtml += '<span class="status-text">' + orderStatus + '</span>'
+                    orderHtml += "<span class=\"delete_icon\" title=\"删除订单\" onclick=\"deleteOrder(" + id + ",this)\"></span></span>";
+                    iconHtml = ""
+                    iconHtml += '<div class="card-footer">'
+                        + '<a class="btn cancle gray-btn" onclick="cancelOrder(' + id + ',this)">取消订单</a>'
+                        + '<a href="javascript:void(0)" onclick="window.location.href =\'' + "/weixin/pay/checkout_dataexport?orderCode=" + orderCode + '\'" class="btn  green-btn">去支付</a>'
+                        + '</div>'
+                } else if (orderStatus === 1) {
+                    orderStatus = "已完成";
+                    orderHtml = ""
+                    orderHtml += ' <span class="status finish">'
+                    orderHtml += '<span class="status-text">' + orderStatus + '</span>'
+                    orderHtml += "<a class=\"delete_icon\" title=\"删除订单\" onclick=\"deleteOrder(" + id + ",this)\"></a></span>";
+
+                    iconHtml = ""
+                    iconHtml += '<div class="card-footer">'
+                    //已完成订单 开发票判断  0未申请  1已申请
+                    var applybill_status = obj.applybill_status;
+                    if (applybill_status === 0) {
+                        iconHtml += '<a  onclick="invoiceAdd(this)" class="btn  gray-btn">开发票</a>'
+                        iconHtml += '<a  onclick="onceMore(this)" class="btn cancle green-btn">再次购买</a>'
+                    } else if (applybill_status === 1 || applybill_status === 2) {
+                        iconHtml += '<a  onclick="checkinvoice(this,' + applybill_status + ')" class="btn  gray-btn">查看发票</a>'
+                        iconHtml += '<a  onclick="onceMore(this)" class="btn cancle green-btn">再次购买</a>'
+                    }
+                    iconHtml += '</div>'
+                    discountHtml +='<span>'+isPayName+'</span>'
+                } else if (orderStatus === -2 || orderStatus === -3) {
+                    orderStatus = "已取消";
+                    orderHtml = "";
+                    orderHtml += '<span class="status cancel_text">'
+                    orderHtml += '<span class="status-text">' + orderStatus + '</span>'
+                    orderHtml += "<span class=\"delete_icon\" title=\"删除订单\" onclick=\"deleteOrder(" + id + ",this)\"></span></span>";
+                    iconHtml = "";
+                    iconHtml += '<div class="card-footer">'
+                        + '<a onclick="onceMore(this)" class="btn cancle green-btn">再次购买</a>'
+                        + '</div>'
+                }
+                discountHtml +='</p>'
+                //关键词
+                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] + "&nbsp</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 onclick="setSessionStorage()" eid=' + orderCode + ' href="/front/wx_dataExport/wxToOrderDetail?orderCode=' + orderCode + '" class="media">'
+                    + '<div class="media-img">'
+                    + '<img src="/dataExport/image/dataOutput.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">'
+                    + discountHtml
+                    + '<strong class="current">¥' + orderMoney + '</strong>'
+                    + '</div>'
+                    + '</div>'
+                    + iconHtml
+                    + '</div>'
+            } else if ((obj.product_type === "vip订阅") || (obj.product_type === "VIP订阅")) {
+                if (typ === 1) {	//待付款订单列表页
+                    if (obj.order_status === -2) {
+                        continue;
+                    }
+                }
+                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 newbuyset = filter_vip.newBuyset;
+                //判断该订单是否是升级订单
+                var vip_type = obj.vip_type;
+                var region_vip = ""
+                if ((vip_type !== 2) && (vip_type !== 1)) {
+                    //地区
+                    if (!$.isEmptyObject(newbuyset)) {	//不为空
+                        if (newbuyset.areacount !== -1) {
+                            var newcitys = newbuyset.newcitys;
+                            var scatter = newcitys.length;//分布
+                            var citynum = 0;
+                            for (var k in newcitys) {
+                                citynum += newcitys[k];
+                            }
+                            if (newbuyset.areacount > 0) {
+                                region_vip = newbuyset.areacount + "个省级区域";
+                                if (citynum !== 0) {
+                                    region_vip += "、" + citynum + "个地市";
+                                }
+                            } else {
+                                region_vip += citynum + "个地市";
+                            }
+                        } else {
+                            region_vip = "全国";
+                        }
+                        //行业
+                        var industry_vip = newbuyset.buyerclasscount;	//数组
+                        if (industry_vip === -1) {
+                            industry_vip = "全行业";
+                        } else {
+                            industry_vip = industry_vip + "个行业";
+                        }
+                    } else {
+                        var region_vipArr = filter_vip.area;
+                        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:天 4:季
+                    //订阅周期
+                    var effectiveduration_vip = ""
+                    if ((obj.vip_starttime) && (obj.vip_endtime)) {
+                        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 === 4) {
+                            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 + "天";
+                        } else if (cycleunit_vip === 4) {
+                            effectiveduration_vip = cyclecount_vip + "季";
+                        }
+                    }
+                    //试用用户生成订单 周期
+                    if (effectiveduration_vip === "") {
+                        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 + "天";
+                        } else if (cycleunit_vip === 4) {
+                            effectiveduration_vip = cyclecount_vip + "季";
+                        }
+                    }
+                } else if (vip_type === 2) {
+                    //新增全部行业:-1  新增部分行业:123   		无新增:0
+                    //新增全国{"province":0,"city":0}  无新增:{}
+                    //区域
+                    var filterObj = filter_vip;
+                    if (!$.isEmptyObject(newbuyset)) {	//不为空
+                        if (newbuyset.areacount !== -1) {
+                            var newcitys = newbuyset.newcitys;
+                            var scatter = newcitys.length;//分布
+                            var citynum = 0;
+                            for (var k in newcitys) {
+                                citynum += newcitys[k];
+                            }
+                            if (newbuyset.areacount > 0) {
+                                region_vip = newbuyset.areacount + "个省级区域";
+                                if (citynum != 0) {
+                                    region_vip += "、" + citynum + "个地市";
+                                }
+                            } else {
+                                region_vip += citynum + "个地市";
+                            }
+                        } else {
+                            region_vip = "全国";
+                        }
+                        var buyerclasscount = newbuyset.buyerclasscount;
+                        if (buyerclasscount > 3) {
+                            buyerclasscount = filterObj.industry.length;
+                            industry_vip = "全行业(" + buyerclasscount + "个行业)";
+                        } else {
+                            industry_vip = buyerclasscount + "个行业";
+                        }
+                        if (buyerclasscount === -1) {
+                            industry_vip = "全行业";
+                        }
+                    } else {
+                        if (!$.isEmptyObject(filterObj.addareacount)) {
+                            if ((filterObj.addareacount.province === 0) && (filterObj.addareacount.city === 0)) {
+                                region_vip = "全国";
+                            }
+                            if ((filterObj.addareacount.province !== 0) && (filterObj.addareacount.city === 0)) {
+                                region_vip = filterObj.addareacount.province + "个省级区域";
+                            }
+                            if ((filterObj.addareacount.province === 0) && (filterObj.addareacount.city !== 0)) {
+                                region_vip = filterObj.addareacount.city + "个地市";
+                            }
+                            if ((filterObj.addareacount.province !== 0) && (filterObj.addareacount.city !== 0)) {
+                                region_vip = filterObj.addareacount.province + "个省级区域、" + filterObj.addareacount.city + "个地市";
+                            }
+                        } else {
+                            region_vip = "无";
+                        }
+                        //行业
+                        var industry_vip = "";
+                        industry_vip = filterObj.addbuyerclasscount + "个行业";
+                        if (filterObj.addbuyerclasscount === 0) {
+                            industry_vip = "无";
+                        }
+                        if (filterObj.addbuyerclasscount === -1) {
+                            industry_vip = "全行业";
+                        }
+                    }
+                    //延长周期
+                    var effectiveduration_vip = "";
+                    if (filterObj.cycleunit === 1) {
+                        effectiveduration_vip = filterObj.cyclecount + "年";
+                    } else if (filterObj.cycleunit === 2) {
+                        effectiveduration_vip = filterObj.cyclecount + "个月";
+                    } else if (filterObj.cycleunit === 3) {
+                        effectiveduration_vip = filterObj.cyclecount + "天";
+                    } else if (filterObj.cycleunit === 4) {
+                        effectiveduration_vip = filterObj.cyclecount + "季";
+                    } else if (filterObj.cycleunit === -1) {
+                        effectiveduration_vip = "不延期";
+                    } else {
+                        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 === 4) {
+                                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 + "天";
+                            } else if (cycleunit_vip === 4) {
+                                effectiveduration_vip = cyclecount_vip + "季";
+                            }
+                        }
+                    }
+                    //续费升级逻辑修改后判断是否不延期
+                    if (filterObj.cycleunit === 0 && filterObj.cyclecount === 0) {
+                        effectiveduration_vip = "不延期";
+                    }
+                } else if (vip_type === 1) {
+                    filter_vip = JSON.parse(obj.filter);
+                    var renewal_market = 0; //续费市级地区
+                    var buyset = filter_vip.buyset;
+                    if ($.isEmptyObject(newbuyset)) {
+                        //续费订单根据buyset 中ciyts判断 老订单为citys 新订单为newcitys  续费以外根据newbuyset判断
+                        if (buyset.ciyts !== undefined) {
+                            if (buyset.areacount === -1) {
+                                region_vip = "全国";
+                            } else {
+                                if (!$.isEmptyObject(buyset.citys)) {
+                                    for (var key in buyset.citys) {
+                                        renewal_market += (buyset.citys[key]);
+                                    }
+                                }
+                                //
+                                var areaText = "";
+                                if ((buyset.areacount !== 0) && (renewal_market !== 0)) {
+                                    region_vip = buyset.areacount + "个省级地区、" + renewal_market + "个地市";
+                                } else if ((buyset.areacount === 0) && (renewal_market !== 0)) {
+                                    region_vip = renewal_market + "个地市";
+                                } else if ((buyset.areacount !== 0) && (renewal_market === 0)) {
+                                    region_vip = buyset.areacount + "个省级地区";
+                                }
+                            }
+                            if (buyset.buyerclasscount === -1) {
+                                industry_vip = "全行业";
+                            } else {
+                                industry_vip = buyset.buyerclasscount + "个行业";
+                            }
+                        }
+                    } else {
+                        if (newbuyset.areacount !== -1) {
+                            var newcitys = newbuyset.newcitys;
+                            var scatter = newcitys.length;//分布
+                            var citynum = 0;
+                            for (var k in newcitys) {
+                                citynum += newcitys[k];
+                            }
+                            if (newbuyset.areacount > 0) {
+                                region_vip = newbuyset.areacount + "个省级区域";
+                                if (citynum !== 0) {
+                                    region_vip += "、" + citynum + "个地市";
+                                }
+                            } else {
+                                if (citynum !== 0) {
+                                    region_vip += citynum + "个地市";
+                                }
+                            }
+                        } else {
+                            region_vip = "全国";
+                        }
+                        if (newbuyset.buyerclasscount !== -1) {
+                            industry_vip = newbuyset.buyerclasscount + "个行业";
+                        } else {
+                            industry_vip = "全行业";
+                        }
+                    }
+                    //订阅周期
+                    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 === 4) {
+                            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 + "天";
+                        } else if (cycleunit_vip === 4) {
+                            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;
+                var orginsPrices = obj.order_money;
+                var can1111 = filter_vip && filter_vip.original_price
+                if (can1111) {
+                    orginsPrices = filter_vip.original_price;
+                }
+                var giveCycle = filter_vip.give_cycle;
+                //金额格式化 小数点前 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;
+                }
+                //0试用用户、1续费、2升级、3购买
+                var vipType = 0
+                if (!vip_type) {
+                    if (obj.order_money > 0) {
+                        vipType = 3
+                    }
+                } else {
+                    vipType = vip_type
+                }
+                //优惠
+                var discountHtml = ""
+                if ((orderStatus_vip === 0||orderStatus_vip === 1)&&obj.discount_price>0){
+                  var totalPrice = Number(obj.order_money) + Number(obj.discount_price)
+                  discountHtml = '<p class="discount"><span class="current">'+totalName+'¥' + formatMoney(totalPrice) + '</span>'
+                                + '<span class="current">'+discountName+'¥' + formatMoney(obj.discount_price) + '</span>'
+                }
+                if (orderStatus_vip === 0) {
+                    orderStatus_vip = "待付款"
+                    orderHtml = ""
+                    orderHtml += '<span class="status notpay">'
+                    orderHtml += '<span class="status-text">' + orderStatus_vip + '</span>'
+                    orderHtml += "<a class=\"delete_icon\" title=\"删除订单\" onclick=\"deleteOrder(" + id_vip + ",this)\"></a></span>";
+                    iconHtml = ""
+                    iconHtml += '<div class="card-footer">'
+                        + '<a  class="btn cancle" onclick="cancelOrder(' + id_vip + ',this)">取消订单</a>'
+                        + '<a href="javascript:void(0)" onclick="window.location.href =\'' + "/weixin/pay/checkout_subvip?orderCode=" + obj.order_code + "&t=" + vipType + '\'" class="btn  green-btn">去支付</a>'
+                        + '</div>'
+                } else if (orderStatus_vip === 1) {
+                    orderStatus_vip = "已完成";
+                    orderHtml = ""
+                    orderHtml += '<span class="status finish">'
+                    orderHtml += '<span class="status-text">' + orderStatus_vip + '</span>'
+                    orderHtml += "<a class=\"delete_icon\" title=\"删除订单\" onclick=\"deleteOrder(" + id_vip + ",this)\"></a></span>";
+                    iconHtml = ""
+                    //最后一次购买完 1:试用 2:正式 -1:试用到期 -2:正式到期
+                    if ((vip_status === -2) && (obj.lastbuy_code !== undefined)) {
+                        iconHtml += '<div class="card-footer">'
+                        if (obj.applybill_status === 0) {
+                            iconHtml += '<a  onclick="invoiceAdd(this)" class="btn  gray-btn">开发票</a>'
+                        } else if (obj.applybill_status === 1 || obj.applybill_status === 2) {
+                            iconHtml += '<a  onclick="checkinvoice(this,' + obj.applybill_status + ')" class="btn  gray-btn">查看发票</a>'
+                        }
+                        iconHtml += '<a  onclick="renewalOrBuyAgain(2,this)" class="btn  green-btn">再次购买</a></div>'
+                    } else if ((vip_status === 2) && (obj.lastbuy_code !== undefined)) {
+                        if (obj.pay_way !== "trial") {
+                            iconHtml += '<div class="card-footer">'
+                            if (obj.applybill_status === 0) {
+                                iconHtml += '<a  onclick="invoiceAdd(this)" class="btn  gray-btn">开发票</a>'
+                            } else if (obj.applybill_status === 1 || obj.applybill_status === 2) {
+                                iconHtml += '<a  onclick="checkinvoice(this,' + obj.applybill_status + ')" class="btn  gray-btn">查看发票</a>'
+                            }
+                            iconHtml += '<a  onclick="renewalOrBuyAgain(1,this)" class="btn green-btn">续费</a></div>'
+                        }
+                    } else if ((vip_status === -2) && (obj.lastbuy_code === undefined)) {
+                        iconHtml += '<div class="card-footer">'
+                        if (obj.applybill_status === 0) {
+                            iconHtml += '<a  onclick="invoiceAdd(this)" class="btn  gray-btn">开发票</a></div>'
+                        } else if (obj.applybill_status === 1 || obj.applybill_status === 2) {
+                            iconHtml += '<a  onclick="checkinvoice(this,' + obj.applybill_status + ')" class="btn  gray-btn">查看发票</a></div>'
+                        }
+                    } else if ((vip_status === 2) && (obj.lastbuy_code === undefined)) {
+                        if (obj.pay_way !== "trial") {
+                            iconHtml += '<div class="card-footer">'
+                            if (obj.applybill_status === 0) {
+                                iconHtml += '<a  onclick="invoiceAdd(this)" class="btn  gray-btn">开发票</a></div>'
+                            } else if (obj.applybill_status === 1 || obj.applybill_status === 2) {
+                                iconHtml += '<a  onclick="checkinvoice(this,' + obj.applybill_status + ')" class="btn  gray-btn">查看发票</a></div>'
+                            }
+                        }
+                    }
+                    discountHtml +='<span>'+isPayName+'</span>'
+                } else if (orderStatus_vip === -2 || orderStatus_vip === -3) {
+                    orderStatus_vip = "已取消";
+                    orderHtml = "<span class=\"status cancel_text\">";
+                    orderHtml += '<span class="status-text">' + orderStatus_vip + '</span>'
+                    orderHtml += "<a class=\"delete_icon\" title=\"删除订单\" onclick=\"deleteOrder(" + id_vip + ",this)\"></a></span>";
+                    iconHtml = "";
+                    iconHtml += '<div class="card-footer">'
+                        + '</div>'
+                }
+                discountHtml +='</p>'
+                if (filter_vip.cyclecount !== undefined && filter_vip.cyclecount !== "" && filter_vip.cycleunit !== undefined && filter_vip.cycleunit !== "") {
+                    if (parseInt(filter_vip.cycleunit) === 1) {
+                        effectiveduration_vip = filter_vip.cyclecount + "年"
+                    } else if (parseInt(filter_vip.cycleunit) === 2) {
+                        effectiveduration_vip = filter_vip.cyclecount + "个月"
+                    } else if (parseInt(filter_vip.cycleunit) === 4) {
+                        effectiveduration_vip = filter_vip.cyclecount + "季"
+                    } else {
+                        effectiveduration_vip = "7天"
+                    }
+                }
+                if (filter_vip.cycleunit === 0 && filter_vip.cyclecount === 0) {
+                    effectiveduration_vip = "不延期";
+                }
+                if (obj.isUsedActiveCode) {
+                    effectiveduration_vip = effectiveduration_vip + '<span class="discount-container"><span> + </span><span class="highlight-text">赠送30天</span></span>'
+                }
+                //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 onclick="setSessionStorage()" eid=' + orderCode_vip + ' href="/front/vipsubscribe/toOrderDetailPage?orderCode=' + orderCode_vip + '" class="media" isvipOrder="true">'
+                        + '<div class="media-img">'
+                        + '<img src="/vipsubscribe/image/vipBook.png?v={{Msg "seo" "version"}}">'
+                        + '</div>'
+                        + '<div class="media-info">';
+                    listhtml += '<p class="item-ifo ellipsis">区域:' + region_vip + '</p>'
+                        + '<p class="item-ifo ellipsis">行业:' + industry_vip + '</p>'
+                        + '<p class="item-ifo ellipsis">订阅周期:' + effectiveduration_vip
+                        + (can1111 ? ('&nbsp;+&nbsp;' + '<span style="color: #2ABED1;">赠送' + (giveCycle < 12 ? (giveCycle + '个月') : '1年') + '</span>') : '')
+                        + '</p>'
+                        + '</div>'
+                        + '</a>'
+                    listhtml += '<div class="price">'
+                    if (can1111 || isLiveActive) {
+                        var originPrice = formatMoney(parseFloat(orginsPrices) / parseFloat(0.6));
+                        if (can1111) {
+                            originPrice = formatMoney(parseFloat(orginsPrices) / 100)
+                        }
+                        listhtml += '<span class="origin-price-container">'
+                            + '<span>原价:¥</span>'
+                            + '<span class="origin-price">' + originPrice + '</span>'
+                            + '</span>'
+                    }else{
+                      listhtml += discountHtml
+                    }
+                    listhtml += '<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  onclick="setSessionStorage()" eid=' + orderCode_vip + ' href="/front/vipsubscribe/toOrderDetailPage?orderCode=' + orderCode_vip + '" class="media" isvipOrder="true">'
+                        + '<div class="media-img">'
+                        + '<img src="/vipsubscribe/image/vipBook.png?v={{Msg "seo" "version"}}">'
+                        + '</div>'
+                        + '<div class="media-info">';
+                    listhtml += '<p class="item-ifo ellipsis">区域:' + region_vip + '</p>'
+                        + '<p class="item-ifo ellipsis">行业:' + industry_vip + '</p>'
+                        + '<p class="item-ifo ellipsis">订阅周期:' + effectiveduration_vip
+                        + (can1111 ? ('&nbsp;+&nbsp;' + '<span style="color: #2ABED1;">赠送' + (giveCycle < 12 ? (giveCycle + '个月') : '1年') + '</span>') : '')
+                        + '</p>'
+                      if (effectiveduration_vip != "不延期"){
+                        listhtml += '<p class="item-ifo ellipsis">有效日期:' + effectivetime_vip + '</p>';
+                      }
+                    //}
+                    listhtml += '</div></a>'
+                    listhtml += '<div class="price">'
+                    if (can1111 || isLiveActive) {
+                        var originPrice = formatMoney(parseFloat(orginsPrices) / parseFloat(0.6));
+                        if (can1111) {
+                            originPrice = formatMoney(parseFloat(orginsPrices) / 100)
+                        }
+
+                        listhtml += '<span class="origin-price-container">'
+                            + '<span>原价:¥</span>'
+                            + '<span class="origin-price">' + originPrice + '</span>'
+                            + '</span>'
+                    }else{
+                      listhtml += discountHtml
+                    }
+                    listhtml += '<strong class="current">¥' + orderMoney_vip + '</strong>'
+                        + '</div>'
+                        + '</div>'
+                        + iconHtml
+                        + '</div>'
+                }
+
+            } else if (obj.product_type === "中标必听课") {
+                count++;
+                var id = obj.id;
+                //订单编号
+                var orderCode = obj.order_code;
+                //创建时间
+                var createTime = obj.create_time;
+                createTime = createTime.replace(/-/g, ".")
+                var payWay = obj.pay_way
+                var filterObj = JSON.parse(obj.filter);
+                var courseName = filterObj.s_name;
+                var courseLength = filterObj.s_courseDate;
+                var courseEndTimeStamp = filterObj.l_endtime;
+                var courseId = filterObj._id;
+                var orderStatus = obj.order_status;
+                var orderStatusHtml = "";
+                var orderStatusHtmls = "";
+                var orderMoney = obj.order_money;
+                var applybill_status = obj.applybill_status;
+
+                var courseEndTime = new Date(courseEndTimeStamp * 1000)
+
+                var lastHtml = "";
+                var orderUrl = "/weixin/pay/xs_payNow?code=" + orderCode;
+                var helpHtml = "";
+
+                if (orderStatus === 0) {
+                    orderStatusHtml = "待付款";
+                    orderStatusHtmls = "notpay";
+                    lastHtml = '<div class="card-footer">'
+                        + '<a class="btn cancle" onclick="cancelOrder(' + id + ',this)">取消订单</a>'
+                        + '<a onclick="window.location.href =\'' + "/weixin/pay/checkout_onlineCourse?orderCode=" + orderCode + '\'" class="btn green-btn">去支付</a>'
+                        + '</div>'
+                } else if (orderStatus === 1) {
+                    orderStatusHtml = "已完成";
+                    if (filterObj.i_drawer === 1) {
+                        if (applybill_status === 0) {
+                            lastHtml = '<div class="card-footer">'
+                                + '<a onclick="setSessionStorage()" href="/front/invoice/showpage?order_code=' + orderCode + '" class="btn cancle">开发票</a>'
+                                + '</div>'
+                        } else if (applybill_status === 1 || applybill_status === 2) {
+                            lastHtml = '<div class="card-footer">'
+                                + '<a onclick="checkinvoice(this,' + applybill_status + ')" class="btn cancle">查看发票</a>'
+                                + '</div>'
+                        }
+                    } else {
+                        if (applybill_status === 0) {
+                            lastHtml = '<div class="card-footer">'
+                                + '<a onclick="setSessionStorage()" href="/jyxsapp/invoice?code=' + orderCode + '" class="btn cancle">开发票</a>'
+                                + '</div>'
+                        } else if (applybill_status === 1 || applybill_status === 2) {
+                            var toHref = "/jyxsapp/invoiceDetail?code=" + orderCode + "&id=" + id
+                            lastHtml = '<div class="card-footer">'
+                                + '<a onclick="checkinvoice(this,' + applybill_status + ',\'' + toHref + '\')"  class="btn cancle">查看发票</a>'
+                                + '</div>'
+                        }
+                    }
+                } else {
+                    orderStatusHtml = "已取消";
+                }
+
+                listhtml += '<div class="card">'
+                    + '<div class="card-header">'
+                    + '<span class="time">' + createTime + '</span>'
+                    + '<span class="status ' + orderStatusHtmls + '">'
+                    + helpHtml
+                    + '<span class="status-text">' + orderStatusHtml + '</span>'
+                    + '<a class="delete_icon" title="删除订单" onclick="deleteOrder(' + id + ',this)"></a>'
+                    + '</span>'
+                    + '</div>'
+                    + '<div class="card-content">'
+                    + '<a onclick="setSessionStorage()" href="' + orderUrl + '" eid="' + orderCode + '" vid="' + orderCode + '" class="media" courseOnlineOrder="true">'
+                    + '<div class="media-img">'
+                    + '<img src="/course/image/lessonsOnline.png">'
+                    + '</div>'
+                    + '<div class="media-info">'
+                    + '<p class="item-ifo ellipsis-2">课程名称:' + courseName + '</p>'
+                    + '<p class="item-ifo ellipsis">课程类型:中标必听课</p>'
+                    + '<p class="item-ifo ellipsis">课程时长:' + courseLength + '</p>'
+                    + '<p class="item-ifo ellipsis">课程节数:共' + (!filterObj.i_num ? 1 : filterObj.i_num) + '节</p>'
+                    + '<p class="item-ifo ellipsis">有效日期:' + courseEndTime.getFullYear() + '/' + (courseEndTime.getMonth() + 1) + '/' + courseEndTime.getDate() + ' 到期</p>'
+                    + '</div>'
+                    + '</a>'
+                    + '<div class="price">'
+                    + '<strong class="current">¥' + formatMoney(orderMoney) + '</strong>'
+                    + '</div>'
+                    + '</div>'
+                    + lastHtml
+                    + '</div>'
+            } else if (obj.product_type === "数据报告") {
+                if (typ === 1 || $(".tab-link.active").index() === 1) {	//待付款订单列表页
+                    if (obj.order_status === -2) {
+                        continue;
+                    }
+                }
+                count++;
+                var id = obj.id;
+                //订单编号
+                var orderCode = obj.order_code;
+                //创建时间
+                var createTime = obj.create_time;
+                createTime = createTime.replace(/-/g, ".")
+                var filterObj = JSON.parse(obj.filter);
+                var reportName = filterObj.report_name;
+                var pushTimeStamp = filterObj.l_pushtime;
+
+                var orderStatus = obj.order_status;
+                var orderStatusHtml = "";
+                var orderStatusHtmls = "";
+                var orderMoney = obj.order_money;
+                var applybill_status = obj.applybill_status;
+
+                var pushTime = new Date(pushTimeStamp * 1000)
+
+                var lastHtml = "";
+                var orderUrl = "/datareport/page/order/detail/" + orderCode;
+                var helpHtml = "";
+
+                if (orderStatus === 0) {
+                    orderStatusHtml = "待付款";
+                    orderStatusHtmls = "notpay";
+                    lastHtml = '<div class="card-footer">'
+                        + '<a class="btn cancle" onclick="cancelOrder(' + id + ',this)">取消订单</a>'
+                        + '<a onclick="window.location.href=\'' + '/weixin/pay/datareport?ordercode=' + orderCode + '\'" class="btn green-btn">去支付</a>'
+                        + '</div>';
+                } else if (orderStatus === 1) {
+                    orderStatusHtml = "已完成";
+                    if (applybill_status === 0) {
+                        lastHtml = '<div class="card-footer">'
+                            + '<a onclick="invoiceAdd(this)" class="btn  gray-btn">开发票</a>'
+                            + '</div>'
+                    } else if (applybill_status === 1 || applybill_status === 2) {
+                        lastHtml = '<div class="card-footer">'
+                            + '<a onclick="checkinvoice(this,' + applybill_status + ')" class="btn  gray-btn">查看发票</a>'
+                            + '</div>'
+                    }
+                } else {
+                    orderStatusHtml = "已取消";
+                }
+
+                listhtml += '<div class="card">'
+                    + '<div class="card-header">'
+                    + '<span class="time">' + createTime + '</span>'
+                    + '<span class="status ' + orderStatusHtmls + '">'
+                    + helpHtml
+                    + '<span class="status-text">' + orderStatusHtml + '</span>'
+                    + '<a class="delete_icon" title="删除订单" onclick="deleteOrder(\'' + id + '\',this)"></a>'
+                    + '</span>'
+                    + '</div>'
+                    + '<div class="card-content">'
+                    + '<a onclick="setSessionStorage()" href="' + orderUrl + '" eid="' + orderCode + '" class="media" datareportOrder="true">'
+                    + '<div class="media-img">'
+                    + '<img src="/images/pc/report_icon.png">'
+                    + '</div>'
+                    + '<div class="media-info">'
+                    + '<p class="item-ifo ellipsis">报告名称:' + reportName + '</p>'
+                    + '<p class="item-ifo ellipsis">发布日期:' + pushTime.getFullYear() + '/' + (pushTime.getMonth() + 1) + '/' + pushTime.getDate() + '</p>'
+                    + '</div>'
+                    + '</a>'
+                    + '<div class="price">'
+                    + '<strong class="current">¥' + formatMoney(orderMoney) + '</strong>'
+                    + '</div>'
+                    + '</div>'
+                    + lastHtml
+                    + '</div>'
+            } else if (obj.product_type === "大会员") {
+                if (typ === 1 || $(".tab-link.active").index() === 1) {	//待付款订单列表页
+                    if (obj.order_status === -2) {
+                        continue;
+                    }
+                }
+                count++;
+                var id = obj.id;
+                //订单编号
+                var orderCode = obj.order_code;
+                //创建时间
+                var createTime = obj.create_time;
+                createTime = createTime.replace(/-/g, ".")
+                var filterObj = JSON.parse(obj.filter);
+                var source = "";
+                if(filterObj.source){
+                  source = filterObj.source;
+                }
+                var level = filterObj.level;
+                var cycle = filterObj.cycle;
+                var level_map = new Map();
+                var expert = new Map();
+
+                expert.set("img", "/order/image/dahuiyuan1.png");
+                expert.set("level", "专家版");
+                var smart = new Map();
+                smart.set("img", "/order/image/dahuiyuan3.png");
+                smart.set("level", "智慧版");
+                var niche = new Map();
+                niche.set("img", "/order/image/dahuiyuan2.png");
+                niche.set("level", "商机版");
+                var trial = new Map();
+                trial.set("img", "/order/image/dahuiyuan4.png");
+                trial.set("level", "试用版");
+                var custom = new Map();
+                custom.set("img", "/order/image/dahuiyuan1.png");
+                custom.set("level", "自定义");
+                level_map.set(1, expert);
+                level_map.set(2, smart);
+                level_map.set(3, niche);
+                level_map.set(4, trial);
+                level_map.set(5, custom);
+                var imgurl = level_map.get(filterObj.level).get("img");
+                var member_endtime = "-";
+                if (obj.vip_endtime != null && obj.order_status == 1) {
+                    member_endtime = formatTime(obj.vip_endtime).replace(/\./g, "/") + " 到期";
+                }
+                var member_cycle = filterObj.cycle;
+                if (filterObj.level == 4) {
+                    member_cycle += "天"
+                } else {
+                  var createType = filterObj.createType
+                  if (createType){
+                    member_cycle+="个月";
+                  }else{
+                    member_cycle+="年"
+                  }
+                }
+                var member_level=level_map.get(filterObj.level).get("level");
+                //if(filterObj.combo!=null&&filterObj.combo!=undefined&&filterObj.combo!=""){
+                //  member_level="自定义-"+filterObj.combo;
+                // }
+                var orderStatus = obj.order_status;
+                var orderStatusHtml = "";
+                var orderStatusHtmls = "";
+                var orderMoney = obj.order_money;
+                var applybill_status = obj.applybill_status;
+                var pushTime = new Date(pushTimeStamp * 1000)
+
+                var lastHtml = "";
+                var orderUrl = "/front/wxMyOrder/memberDetail/" + orderCode;
+
+                if (orderStatus === 0) {
+                    var payNameTmp = "去支付"
+                    if (obj.pay_way === "transferAccounts") {
+                        orderStatusHtmls = "refund";
+                        if (obj.course_status === 2) {
+                            orderStatusHtml = "转账审核中";
+                        } else if (obj.course_status === 3) {
+                            orderStatusHtml = "未收到转账";
+                            payNameTmp = "再次支付"
+                        }
+                    } else {
+                        orderStatusHtml = "待付款";
+                        orderStatusHtmls = "notpay";
+                    }
+                    if (!(obj.pay_way === "transferAccounts" && (obj.course_status === 2 || obj.course_status === 4))) {
+                        lastHtml = '<div class="card-footer">'
+                            + '<a class="btn cancle" onclick="cancelOrder(' + id + ',this)">取消订单</a>'
+                            + '<a onclick="window.location.href=\'' + '/weixin/pay/checkout_member?orderCode=' + orderCode + '\'" class="btn green-btn">' + payNameTmp + '</a>'
+                            + '</div>';
+                    }
+                } else if (orderStatus === 1) {
+                    orderStatusHtml = "已完成";
+                    orderStatusHtmls = "finish";
+                    var customIsAll = 0
+                    if (filterObj.isAll){
+                      customIsAll=filterObj.isAll
+                    }
+                    if (customIsAll == 2){
+                      orderStatusHtml = "待付款";
+                      orderStatusHtmls = "notpay";
+                    }else if (customIsAll == 3){
+                      orderStatusHtml = "待付完";
+                      orderStatusHtmls = "notpay";
+                    }
+                    if (source===""){
+                      if (applybill_status === 0) {
+                          lastHtml = '<div class="card-footer">'
+                              + '<a onclick="invoiceAdd(this)" class="btn  gray-btn">开发票</a>'
+                              + '</div>'
+                      } else if (applybill_status === 1 || applybill_status === 2) {
+                          lastHtml = '<div class="card-footer">'
+                              + '<a onclick="checkinvoice(this,' + applybill_status + ')" class="btn  gray-btn">查看发票</a>'
+                              + '</div>'
+                      }
+                    }
+                } else {
+                    orderStatusHtml = "已取消";
+                    orderStatusHtmls = "status-text";
+                }
+                listhtml += '<div class="card">'
+                    + '<div class="card-header">'
+                    + '<span class="time" style="color:#888888">' + createTime + '</span>'
+                    + '<span class="status ' + orderStatusHtmls + '">'
+                    + '<span class="status-text">' + orderStatusHtml + '</span>'
+                    + '<a class="delete_icon" title="删除订单" onclick="deleteOrder(\'' + id + '\',this)"></a>'
+                    + '</span>'
+                    + '</div>'
+                    + '<div class="card-content">'
+                    + '<a onclick="setSessionStorage()" href="' + orderUrl + '" eid="' + orderCode + '" class="media" datareportOrder="true">'
+                    + '<div class="media-img">'
+                    + '<img src="' + imgurl + '">'
+                    + '</div>'
+                    + '<div class="media-info">'
+                    + '<p class="item-ifo ellipsis">会员套餐:' + member_level + '</p>'
+                    + '<p class="item-ifo ellipsis">订阅周期:' + member_cycle + ' </p>'
+                    + '<p class="item-ifo ellipsis">有效日期:' + member_endtime + '</p>'
+                    + '</div>'
+                    + '</a>'
+                    + '<div class="price">'
+                    + '<strong class="current">¥' + formatMoney(orderMoney) + '</strong>'
+                    + '</div>'
+                    + '</div>'
+                    + lastHtml
+                    + '</div>'
+            }else if (obj.product_type === "大会员-子账号") {
+                if (typ === 1 || $(".tab-link.active").index() === 1) {	//待付款订单列表页
+                    if (obj.order_status === -2) {
+                        continue;
+                    }
+                }
+                count++;
+                var id = obj.id;
+                //订单编号
+                var orderCode = obj.order_code;
+                //创建时间
+                var createTime = obj.create_time;
+                createTime = createTime.replace(/-/g, ".")
+                var filterObj = JSON.parse(obj.filter);
+                var source = "";
+                if(filterObj.source){
+                  source = filterObj.source;
+                }
+                var level = filterObj.level;
+                var level_map = new Map();
+                var expert = new Map();
+
+                expert.set("img", "/order/image/zizhanghao1.png");
+                expert.set("level", "专家版");
+                var smart = new Map();
+                smart.set("img", "/order/image/zizhanghao3.png");
+                smart.set("level", "智慧版");
+                var niche = new Map();
+                niche.set("img", "/order/image/zizhanghao2.png");
+                niche.set("level", "商机版");
+                var custom = new Map();
+                custom.set("level", "自定义");
+                custom.set("img", "/order/image/zizhanghao1.png");
+                level_map.set(1, expert);
+                level_map.set(2, smart);
+                level_map.set(3, niche);
+                level_map.set(5, custom);
+                var imgurl = level_map.get(filterObj.level).get("img");
+                var member_endtime = "-";
+                if (obj.vip_endtime != null && obj.order_status == 1) {
+                    member_endtime = formatTime(obj.vip_endtime).replace(/\./g, "/") + " 到期";
+                }
+                var orderStatus = obj.order_status;
+                var orderStatusHtml = "";
+                var orderStatusHtmls = "";
+                var orderMoney = obj.order_money;
+                var applybill_status = obj.applybill_status;
+                var pushTime = new Date(pushTimeStamp * 1000)
+
+                var lastHtml = "";
+                var orderUrl = "/front/wxMyOrder/subAccountDetail/" + orderCode;
+
+                if (orderStatus === 0) {
+                    var payNameTmp = "去支付"
+                    if (obj.pay_way === "transferAccounts") {
+                        orderStatusHtmls = "refund";
+                        if (obj.course_status === 2) {
+                            orderStatusHtml = "转账审核中";
+                        } else if (obj.course_status === 3) {
+                            orderStatusHtml = "未收到转账";
+                            payNameTmp = "再次支付"
+                        }
+                    } else {
+                        orderStatusHtml = "待付款";
+                        orderStatusHtmls = "notpay";
+                    }
+                    if (!(obj.pay_way === "transferAccounts" && (obj.course_status === 2 || obj.course_status === 4))) {
+                        lastHtml = '<div class="card-footer">'
+                            + '<a class="btn cancle" onclick="cancelOrder(' + id + ',this)">取消订单</a>'
+                            + '<a onclick="window.location.href=\'' + '/weixin/pay/checkout_member?orderCode=' + orderCode + '\'" class="btn green-btn">' + payNameTmp + '</a>'
+                            + '</div>';
+                    }
+                } else if (orderStatus === 1) {
+                    orderStatusHtml = "已完成";
+                    orderStatusHtmls = "finish";
+                    var customIsAll = 0
+                    if (filterObj.isAll){
+                      customIsAll=filterObj.isAll
+                    }
+                    if (customIsAll == 2){
+                      orderStatusHtml = "待付款";
+                      orderStatusHtmls = "notpay";
+                    }else if (customIsAll == 3){
+                      orderStatusHtml = "待付完";
+                      orderStatusHtmls = "notpay";
+                    }
+                    //非企明星后台可开发票
+                    if (source === "" && applybill_status === 0) {
+                        lastHtml = '<div class="card-footer">'
+                            + '<a onclick="invoiceAdd(this)" class="btn  gray-btn">开发票</a>'
+                            + '</div>'
+                    } else if (applybill_status === 1 || applybill_status === 2) {
+                        lastHtml = '<div class="card-footer">'
+                            + '<a onclick="checkinvoice(this,' + applybill_status + ')" class="btn  gray-btn">查看发票</a>'
+                            + '</div>'
+                    }
+                } else {
+                    orderStatusHtml = "已取消";
+                    orderStatusHtmls = "status-text";
+                }
+                listhtml += '<div class="card">'
+                    + '<div class="card-header">'
+                    + '<span class="time" style="color:#888888">' + createTime + '</span>'
+                    + '<span class="status ' + orderStatusHtmls + '">'
+                    + '<span class="status-text">' + orderStatusHtml + '</span>'
+                    + '<a class="delete_icon" title="删除订单" onclick="deleteOrder(\'' + id + '\',this)"></a>'
+                    + '</span>'
+                    + '</div>'
+                    + '<div class="card-content">'
+                    + '<a onclick="setSessionStorage()" href="' + orderUrl + '" eid="' + orderCode + '" class="media" datareportOrder="true">'
+                    + '<div class="media-img">'
+                    + '<img src="' + imgurl + '">'
+                    + '</div>'
+                    + '<div class="media-info">'
+                    + '<p class="item-ifo ellipsis">会员套餐:' + level_map.get(filterObj.level).get("level") + '</p>'
+                    + '<p class="item-ifo ellipsis">有效日期:' + member_endtime + '</p>'
+                    + '<p class="item-ifo ellipsis">付费账号:' + filterObj.pay_sub_num + ' 个</p>'
+                    + '<p class="item-ifo ellipsis">免费账号:' + filterObj.free_sub_num + ' 个</p>'
+                    + '</div>'
+                    + '</a>'
+                    + '<div class="price">'
+                    + '<strong class="current">¥' + formatMoney(orderMoney) + '</strong>'
+                    + '</div>'
+                    + '</div>'
+                    + lastHtml
+                    + '</div>'
+            }else if (obj.product_type === "大会员-补充包"||obj.product_type === "大会员-AI中标预测包"||obj.product_type === "大会员-招标文件解读") {
+                if (typ === 1 || $(".tab-link.active").index() === 1) {	//待付款订单列表页
+                    if (obj.order_status === -2) {
+                        continue;
+                    }
+                }
+                count++;
+                var buchongbaoHtml = '';
+                var id = obj.id;
+                //订单编号
+                var orderCode = obj.order_code;
+                //创建时间
+                var createTime = obj.create_time;
+                createTime = createTime.replace(/-/g, ".")
+                var filterObj = JSON.parse(obj.filter);
+                var source = "";
+                if(filterObj.source){
+                  source = filterObj.source;
+                }
+                var member_endtime = "-";
+                if (obj.product_type === "大会员-补充包"){
+                  var checkout_aiForecastPack="checkout_aiForecastPack";
+                  var bigmemberBid="";
+                  if (obj.vip_endtime != null && obj.order_status == 1) {
+                      member_endtime = formatTime(obj.vip_endtime).replace(/\./g, "/");
+                  }
+                  var supplys = filterObj.supplys;
+                  if (supplys){
+                    for (var i = 0; i < supplys.length; i++) {
+                        var serviceUnit = '个'
+                        if (i > 3) {
+                            buchongbaoHtml += '<p class="item-ifo ellipsis">...</p>';
+                            break;
+                        }
+                        if (supplys[i]["id"] == "15" || supplys[i]["id"] == "6") {
+                            serviceUnit = "次"
+                        }
+                        buchongbaoHtml += '<p class="item-ifo ellipsis buchongbao">' + supplys[i]["name"] + '(' + supplys[i]["count"] + serviceUnit + ')' + '</p>'
+                    }
+                  }
+                }else if (obj.product_type === "大会员-AI中标预测包"){
+                  member_endtime = filterObj.effective_date;
+                  buchongbaoHtml += '<p class="item-ifo ellipsis buchongbao">中标企业预测(' + filterObj.count*10 + ')次' + '</p>'
+                }else if (obj.product_type === "大会员-招标文件解读"){
+                  checkout_aiForecastPack="checkout_bidfile"
+                  bigmemberBid="&b=1";
+                  member_endtime ="2021/11/15";
+                  buchongbaoHtml += '<p class="item-ifo ellipsis buchongbao">招标文件解读(' + filterObj.count + ')次' + '</p>'
+                }
+                var level = filterObj.level;
+                var level_map = new Map();
+                var expert = new Map();
+                expert.set("level", "专家版");
+                var smart = new Map();
+                smart.set("level", "智慧版");
+                var entniche = new Map();
+                entniche.set("level", "商机版");
+                var custom = new Map();
+                custom.set("level", "自定义");
+                level_map.set(1, expert);
+                level_map.set(2, smart);
+                level_map.set(3, entniche);
+                level_map.set(5, custom);
+                var imgurl = "/order/image/buchongbao.png";
+                var orderStatus = obj.order_status;
+                var orderMoney = obj.order_money;
+                var applybill_status = obj.applybill_status;
+                var pushTime = new Date(pushTimeStamp * 1000)
+                var lastHtml = "";
+                var orderUrl = "/front/wxMyOrder/aiForecastPackdetail/" + orderCode;
+                var orderStatusHtml = "";
+                var orderStatusHtmls = "";
+                if (orderStatus === 0) {
+                    var payNameTmp = "去支付"
+                    if (obj.pay_way === "transferAccounts") {
+                        orderStatusHtmls = "refund";
+                        if (obj.course_status === 2) {
+                            orderStatusHtml = "转账审核中";
+                        } else if (obj.course_status === 3) {
+                            orderStatusHtml = "未收到转账";
+                            payNameTmp = "再次支付"
+                        }
+                    } else {
+                        orderStatusHtml = "待付款";
+                        orderStatusHtmls = "notpay";
+                    }
+                    if (!(obj.pay_way === "transferAccounts" && (obj.course_status === 2 || obj.course_status === 4))) {
+                        lastHtml = '<div class="card-footer">'
+                            + '<a class="btn cancle" onclick="cancelOrder(' + id + ',this)">取消订单</a>'
+                            + '<a onclick="window.location.href=\'' + '/weixin/pay/'+checkout_aiForecastPack+'?orderCode=' + orderCode + bigmemberBid+ '\'" class="btn green-btn">' + payNameTmp + '</a>'
+                            + '</div>';
+                    }
+                } else if (orderStatus === 1) {
+                    orderStatusHtml = "已完成";
+                    orderStatusHtmls = "finish";
+                    var customIsAll = 0
+                    if (filterObj.isAll){
+                      customIsAll=filterObj.isAll
+                    }
+                    if (customIsAll == 2){
+                      orderStatusHtml = "待付款";
+                      orderStatusHtmls = "notpay";
+                    }else if (customIsAll == 3){
+                      orderStatusHtml = "待付完";
+                      orderStatusHtmls = "notpay";
+                    }
+                    if (source===""){
+                      if (applybill_status === 0) {
+                          lastHtml = '<div class="card-footer">'
+                              + '<a onclick="invoiceAdd(this)" class="btn  gray-btn">开发票</a>'
+                              + '</div>'
+                      } else if (applybill_status === 1 || applybill_status === 2) {
+                          lastHtml = '<div class="card-footer">'
+                              + '<a onclick="checkinvoice(this,' + applybill_status + ')" class="btn  gray-btn">查看发票</a>'
+                              + '</div>'
+                      }
+                    }
+                } else {
+                    orderStatusHtml = "已取消";
+                    orderStatusHtmls = "status-text";
+                }
+                listhtml += '<div class="card">'
+                    + '<div class="card-header">'
+                    + '<span class="time">' + createTime + '</span>'
+                    + '<span class="status ' + orderStatusHtmls + '">' + orderStatusHtml
+                    + '<a class="shanchu iconfont  icon-shanchu" title="删除订单" onclick="deleteOrder(' + id + ',this)"></a>'
+                    + '</span>'
+                    + '</div>'
+                    + '<div class="card-content">'
+                    + '<a onclick="setSessionStorage()" href="' + orderUrl + '" eid="' + orderCode + '" class="media" datareportOrder="true">'
+                    + '<div class="media-img">'
+                    + '<img src="' + imgurl + '">'
+                    + '</div>'
+                    + '<div class="media-info">'
+                    + '<p class="item-ifo ellipsis">服务列表:</p>'
+                    + buchongbaoHtml
+                    + '<p class="item-ifo ellipsis">有效日期:' + member_endtime + '到期</p>'
+                    + '</div>'
+                    + '</a>'
+                    + '<div class="price">'
+                    + '<strong class="current">¥' + formatMoney(orderMoney) + '</strong>'
+                    + '</div>'
+                    + '</div>'
+                    + lastHtml
+                    + '</div>'
+            } else if (obj.product_type === "招标文件解读") {
+                if (typ === 1 || $(".tab-link.active").index() === 1) {	//待付款订单列表页
+                    if (obj.order_status === -2) {
+                        continue;
+                    }
+                }
+                count++;
+                var id = obj.id;
+                //订单编号
+                var orderCode = obj.order_code;
+                //创建时间
+                var createTime = obj.create_time;
+                createTime = createTime.replace(/-/g, ".")
+                var filterObj = JSON.parse(obj.filter);
+                var level = filterObj.level;
+                var level_map = new Map();
+                var expert = new Map();
+                var imgurl = "/order/image/zbwjjd_new.png";
+                var orderStatus = obj.order_status;
+                var orderStatusHtml = "";
+                var orderStatusHtmls = "";
+                var orderMoney = obj.order_money;
+                var applybill_status = obj.applybill_status;
+                var pushTime = new Date(pushTimeStamp * 1000)
+
+                var lastHtml = "";
+                var orderUrl = "/front/wxMyOrder/bidfileDetail/" + orderCode;
+
+                if (orderStatus === 0) {
+                    var payNameTmp = "去支付"
+                    if (obj.pay_way === "transferAccounts") {
+                        orderStatusHtmls = "refund";
+                        if (obj.course_status === 2) {
+                            orderStatusHtml = "转账审核中";
+                        } else if (obj.course_status === 3) {
+                            orderStatusHtml = "未收到转账";
+                            payNameTmp = "再次支付"
+                        }
+                    } else {
+                        orderStatusHtml = "待付款";
+                        orderStatusHtmls = "notpay";
+                    }
+                    if (!(obj.pay_way === "transferAccounts" && (obj.course_status === 2 || obj.course_status === 4))) {
+                        lastHtml = '<div class="card-footer">'
+                            + '<a class="btn cancle" onclick="cancelOrder(' + id + ',this)">取消订单</a>'
+                            + '<a onclick="window.location.href=\'' + '/weixin/pay/checkout_bidfile?orderCode=' + orderCode + '\'" class="btn green-btn">' + payNameTmp + '</a>'
+                            + '</div>';
+                    }
+                } else if (orderStatus === 1) {
+                    orderStatusHtml = "已完成";
+                    orderStatusHtmls = "finish";
+
+                    if (applybill_status === 0) {
+                        lastHtml = '<div class="card-footer">'
+                            + '<a onclick="invoiceAdd(this)" class="btn  gray-btn">开发票</a>'
+                            + '</div>'
+                    } else if (applybill_status === 1 || applybill_status === 2) {
+                        lastHtml = '<div class="card-footer">'
+                            + '<a onclick = "checkinvoice(this,' + applybill_status + ')" class="btn  gray-btn">查看发票</a>'
+                            + '</div>'
+                    }
+                } else {
+                    orderStatusHtml = "已取消";
+                    orderStatusHtmls = "status-text";
+                }
+                listhtml += '<div class="card">'
+                    + '<div class="card-header">'
+                    + '<span class="time" style="color:#888888">' + createTime + '</span>'
+                    + '<span class="status ' + orderStatusHtmls + '">'
+                    + '<span class="status-text">' + orderStatusHtml + '</span>'
+                    + '<a class="delete_icon" title="删除订单" onclick="deleteOrder(\'' + id + '\',this)"></a>'
+                    + '</span>'
+                    + '</div>'
+                    + '<div class="card-content">'
+                    + '<a onclick="setSessionStorage()" href="' + orderUrl + '" eid="' + orderCode + '" class="media" datareportOrder="true">'
+                    + '<div class="media-img">'
+                    + '<img src="' + imgurl + '">'
+                    + '</div>'
+                    + '<div class="media-info">'
+                    + '<p class="item-ifo ellipsis">产品类型:招标文件解读</p>'
+                    + '<p class="item-ifo ellipsis">购买次数:' + filterObj.count + '次</p>'
+                    + '<p class="item-ifo ellipsis">有效日期:' + "2021/11/15" + ' 到期</p>'
+                    + '</div>'
+                    + '</a>'
+                    + '<div class="price">'
+                    + '<strong class="current">¥' + formatMoney(orderMoney) + '</strong>'
+                    + '</div>'
+                    + '</div>'
+                    + lastHtml
+                    + '</div>'
+            }else if (obj.product_type === "剑鱼币") {
+                if (typ === 1 || $(".tab-link.active").index() === 1) {	//待付款订单列表页
+                    if (obj.order_status === -2) {
+                        continue;
+                    }
+                }
+                count++;
+                var id = obj.id;
+                //订单编号
+                var orderCode = obj.order_code;
+                //创建时间
+                var createTime = obj.create_time;
+                createTime = createTime.replace(/-/g, ".")
+                var filterObj = JSON.parse(obj.filter);
+                var level = filterObj.level;
+                var level_map = new Map();
+                var expert = new Map();
+                var imgurl = "/order/image/jianyubi.png";
+                var orderStatus = obj.order_status;
+                var orderStatusHtml = "";
+                var orderStatusHtmls = "";
+                var orderMoney = obj.order_money;
+                var applybill_status = obj.applybill_status;
+                var pushTime = new Date(pushTimeStamp * 1000)
+
+                var lastHtml = "";
+                var orderUrl = "/front/wxMyOrder/integralDetail/" + orderCode;
+                //优惠
+                var discountHtml = ""
+                if ((orderStatus === 0||orderStatus === 1)&&obj.discount_price>0){
+                  var totalPrice = Number(obj.order_money) + Number(obj.discount_price)
+                  discountHtml = '<p class="discount"><span class="current">'+totalName+'¥' + formatMoney(totalPrice) + '</span>'
+                                + '<span class="current">'+discountName+'¥' + formatMoney(obj.discount_price) + '</span>'
+                }
+                if (orderStatus === 0) {
+                    var payNameTmp = "去支付"
+                    if (obj.pay_way === "transferAccounts") {
+                        orderStatusHtmls = "refund";
+                        if (obj.course_status === 2) {
+                            orderStatusHtml = "转账审核中";
+                        } else if (obj.course_status === 3) {
+                            orderStatusHtml = "未收到转账";
+                            payNameTmp = "再次支付"
+                        }
+                    } else {
+                        orderStatusHtml = "待付款";
+                        orderStatusHtmls = "notpay";
+                    }
+                    if (!(obj.pay_way === "transferAccounts" && (obj.course_status === 2 || obj.course_status === 4))) {
+                        lastHtml = '<div class="card-footer">'
+                            + '<a class="btn cancle" onclick="cancelOrder(' + id + ',this)">取消订单</a>'
+                            + '<a onclick="window.location.href=\'' + '/weixin/pay/checkout_integral?orderCode=' + orderCode + '\'" class="btn green-btn">' + payNameTmp + '</a>'
+                            + '</div>';
+                    }
+                } else if (orderStatus === 1) {
+                    orderStatusHtml = "已完成";
+                    orderStatusHtmls = "finish";
+                    if (applybill_status === 0) {
+                        lastHtml = '<div class="card-footer">'
+                            + '<a onclick="invoiceAdd(this)" class="btn  gray-btn">开发票</a>'
+                            + '</div>'
+                    } else if (applybill_status === 1 || applybill_status === 2) {
+                        lastHtml = '<div class="card-footer">'
+                            + '<a onclick = "checkinvoice(this,' + applybill_status + ')" class="btn  gray-btn">查看发票</a>'
+                            + '</div>'
+                    }
+                    discountHtml +='<span>'+isPayName+'</span>'
+                } else {
+                    orderStatusHtml = "已取消";
+                    orderStatusHtmls = "status-text";
+                }
+                discountHtml +='</p>'
+                var jianyubiCount =filterObj.score;
+                listhtml += '<div class="card">'
+                    + '<div class="card-header">'
+                    + '<span class="time" style="color:#888888">' + createTime + '</span>'
+                    + '<span class="status ' + orderStatusHtmls + '">'
+                    + '<span class="status-text">' + orderStatusHtml + '</span>'
+                    + '<a class="delete_icon" title="删除订单" onclick="deleteOrder(\'' + id + '\',this)"></a>'
+                    + '</span>'
+                    + '</div>'
+                    + '<div class="card-content">'
+                    + '<a onclick="setSessionStorage()" href="' + orderUrl + '" eid="' + orderCode + '" class="media" datareportOrder="true">'
+                    + '<div class="media-img">'
+                    + '<img src="' + imgurl + '">'
+                    + '</div>'
+                    + '<div class="media-info">'
+                    + '<p class="item-ifo ellipsis">产品类型:剑鱼币</p>'
+                    + '<p class="item-ifo ellipsis">数量:' + formatMoney(jianyubiCount)+ '枚</p>'
+                    + '<p class="item-ifo ellipsis">有效日期:永久</p>'
+                    + '</div>'
+                    + '</a>'
+                    + '<div class="price">'
+                    + discountHtml
+                    + '<strong class="current">¥' + formatMoney(orderMoney) + '</strong>'
+                    + '</div>'
+                    + '</div>'
+                    + lastHtml
+                    + '</div>'
+            }
+        }
+        appendList($(listhtml));
+    }
+
+    function noMoreData(me) {
+        if (me == null) {
+            return;
+        }
+        wxflag = me;
+        hasNextPage = false;
+        // 锁定
+        me.lock();
+        // 无数据
+        me.noData();
+        // 即使加载出错,也得重置
+        me.resetload();
+    }
+
+    // 退款按钮
+    function show_more(e) {
+        $this = $(e)
+        $tooltip = $(e).siblings('.tooltip-text')
+        if ($tooltip.is(':hidden')) {
+            $tooltip.show()
+        } else {
+            $tooltip.hide()
+        }
+    }
+
+    // 格式化金钱的函数
+    // s: 金额(number) 必传
+    // n: 保留小数的位数(int:0-100)
+    function formatMoney(s, n) {
+        if (n === undefined) {
+            n = -1
+        } else {
+            n = n > 0 && n <= 20 ? n : 2;
+        }
+        var intS = parseInt(s)
+        var point = '.'
+        var left;
+        var right;
+        s = parseFloat((s + '').replace(/[^\d\.-]/g, ''))
+        // 没传n,默认(如果为整数,则不保留小数。如果为浮点数,则保留两位小数)
+        if (n === -1) {
+            if (s === intS) {
+                n = 0
+                right = ''
+                point = ''
+            } else {
+                n = 2
+                s = s.toFixed(n);
+                right = s.split('.')[1];
+            }
+            s = s + ''
+            left = s.split('.')[0].split("").reverse();
+        } else {
+            s = parseFloat((s + '').replace(/[^\d\.-]/g, '')).toFixed(n) + '';
+            left = s.split('.')[0].split('').reverse();
+            right = s.split('.')[1];
+        }
+
+        t = "";
+        for (i = 0; i < left.length; i++) {
+            t += left[i] + ((i + 1) % 3 == 0 && (i + 1) != left.length ? ',' : '');
+        }
+
+        var money = t.split('').reverse().join('') + point + right;
+        return money;
+    }
+
+    // 客服电话弹窗
+    function phoneShow() {
+        weui.alert('客服电话400-108-6670', {
+            buttons: [{
+                label: '我知道了',
+                type: 'primary'
+            }]
+        });
+    }
+
+    //开发票
+    function invoiceAdd(e) {
+        setSessionStorage()
+        var orderCode = $(e).parent(".card-footer").prev(".card-content").find("a").attr("eid");
+        $.post("/subscribepay/orderListDetails/isOver", {"order_code": orderCode}, function (data) {
+            if (data.status == 1) {
+                window.location.href = "/front/invoice/showpage?order_code=" + orderCode;
+            } else {
+                window.location.href = "/front/invoice/cantInvoice";
+            }
+            ;
+        })
+    }
+
+    //查看发票flag 1:已开线上发票 2:已开线下发票
+    function checkinvoice(e, flag, otherHref) {
+        if (flag === 2) {
+            weui.alert('您已开具发票<br>如有问题请联系客服<br>400-108-6670', {
+                buttons: [{
+                    label: '我知道了',
+                    type: 'primary'
+                }]
+            });
+            return
+        }
+        setSessionStorage()
+        if (!otherHref) {
+            var orderCode = $(e).parent(".card-footer").prev(".card-content").find("a").attr("eid");
+            otherHref = "/front/invoice/check_invoice.html?order_code=" + orderCode
+        }
+        window.location.href = otherHref
+    }
+
+    function formatTime(t) {
+        try {
+            return t.substring(0, 10).replace(/\-/g, ".")
+        } catch (e) {
+            if (t === null) {
+                t = "";
+            }
+            return t
+        }
+    }
+</script>
+{{include "/common/baiducc.html"}}
+</body>
+</html>

部分文件因为文件数量过多而无法显示