Browse Source

Merge branch 'dev2.8.5' of http://192.168.3.207:10080/qmx/jy into dev2.8.5

wangshan 5 years ago
parent
commit
4d1c5a5421
36 changed files with 2118 additions and 944 deletions
  1. 359 348
      src/jfw/modules/app/src/web/staticres/jyapp/vipsubscribe/css/choose_area_new.css
  2. 29 21
      src/jfw/modules/app/src/web/staticres/jyapp/vipsubscribe/js/editArea.js
  3. 14 0
      src/jfw/modules/app/src/web/templates/vipsubscribe/choose_area.html
  4. 31 4
      src/jfw/modules/app/src/web/templates/vipsubscribe/vip_purchase.html
  5. 58 0
      src/jfw/modules/subscribepay/README.md
  6. 4 3
      src/jfw/modules/subscribepay/src/config.json
  7. 30 14
      src/jfw/modules/subscribepay/src/config/config.go
  8. 62 3
      src/jfw/modules/subscribepay/src/message.json
  9. 28 13
      src/jfw/modules/subscribepay/src/service/orderListDetails.go
  10. 5 2
      src/jfw/modules/subscribepay/src/service/vipRenewUpgrade.go
  11. 1 0
      src/jfw/modules/subscribepay/src/service/vipSubscribePay.go
  12. 6 1
      src/jfw/modules/subscribepay/src/timetask.json
  13. 56 27
      src/jfw/modules/subscribepay/src/timetask/timetask.go
  14. 228 0
      src/jfw/modules/subscribepay/src/util/msgremind.go
  15. 3 1
      src/jfw/modules/subscribepay/src/util/public.go
  16. 2 2
      src/jfw/modules/weixin/src/jrpc/jrpc.go
  17. 407 0
      src/web/staticres/css/subscribe.css
  18. BIN
      src/web/staticres/images/subscribe/QR_code.png
  19. BIN
      src/web/staticres/images/subscribe/banner.png
  20. BIN
      src/web/staticres/images/subscribe/free.png
  21. BIN
      src/web/staticres/images/subscribe/line.png
  22. BIN
      src/web/staticres/images/subscribe/mengban.png
  23. BIN
      src/web/staticres/images/subscribe/vip-logo.png
  24. BIN
      src/web/staticres/images/subscribe/vip.png
  25. BIN
      src/web/staticres/images/subscribe/vip_tanchuang.png
  26. 360 348
      src/web/staticres/vipsubscribe/css/choose_area_new.css
  27. 29 21
      src/web/staticres/vipsubscribe/js/editArea.js
  28. 136 0
      src/web/templates/pc/subscribe_new.html
  29. 208 112
      src/web/templates/weixin/dataExport/dataExport_toMyOrder.html
  30. 16 2
      src/web/templates/weixin/vipsubscribe/choose_area.html
  31. 1 0
      src/web/templates/weixin/vipsubscribe/choose_industry_upgrade.html
  32. 3 1
      src/web/templates/weixin/vipsubscribe/edit_subscribe_success.html
  33. 10 3
      src/web/templates/weixin/vipsubscribe/renew_notice.html
  34. 22 14
      src/web/templates/weixin/vipsubscribe/vip_order_detail.html
  35. 5 4
      src/web/templates/weixin/vipsubscribe/vip_purchase.html
  36. 5 0
      src/web/templates/weixin/vipsubscribe/vip_upgrade.html

+ 359 - 348
src/jfw/modules/app/src/web/staticres/jyapp/vipsubscribe/css/choose_area_new.css

@@ -1,608 +1,619 @@
 @charset "UTF-8";
 .main {
-  width: 100%;
-  overflow: scroll;
+    width: 100%;
+    overflow: scroll;
 }
 
 .main::-webkit-scrollbar {
-  display: none;
+    display: none;
 }
 
 .layout_top-bottom {
-  display: flex;
-  flex-direction: column;
-  justify-content: space-between;
-  height: 100%;
+    display: flex;
+    flex-direction: column;
+    justify-content: space-between;
+    height: 100%;
 }
 
 .layout_top-bottom .layou_top {
-  flex: 1;
-  overflow: scroll;
+    flex: 1;
+    overflow: scroll;
 }
 
 .bottom_button {
-  display: flex;
-  justify-content: space-between;
-  align-items: center;
-  width: 100%;
-  height: .94rem;
+    display: flex;
+    justify-content: space-between;
+    align-items: center;
+    width: 100%;
+    height: .94rem;
 }
 
 .bottom_button .left_btn,
 .bottom_button .right_btn {
-  flex: 1;
-  height: 100%;
-  font-size: .34rem;
+    flex: 1;
+    height: 100%;
+    font-size: .34rem;
 }
 
 .bottom_button .left_btn {
-  color: #2cb7ca;
-  background-color: #fff;
-  border-top: 1px solid #e0e0e0;
+    color: #2cb7ca;
+    background-color: #fff;
+    border-top: 1px solid #e0e0e0;
 }
 
 .bottom_button .right_btn {
-  color: #fff;
-  background-color: #2cb7ca;
-  border-top: 1px solid #2cb7ca;
+    color: #fff;
+    background-color: #2cb7ca;
+    border-top: 1px solid #2cb7ca;
 }
 
 .bottom_button button[disabled] {
-  opacity: .5;
+    opacity: .5;
 }
 
 .public_btn {
-  width: 100%;
-  height: .94rem;
-  line-height: .94rem;
-  text-align: center;
-  background: #2CB7CA;
-  color: #fff;
-  border-radius: 0.06rem;
-  font-size: .34rem;
+    width: 100%;
+    height: .94rem;
+    line-height: .94rem;
+    text-align: center;
+    background: #2CB7CA;
+    color: #fff;
+    border-radius: 0.06rem;
+    font-size: .34rem;
 }
 
 .tips_btn {
-  display: flex;
-  position: relative;
-  flex-direction: column;
-  align-items: center;
-  justify-content: space-between;
+    display: flex;
+    position: relative;
+    flex-direction: column;
+    align-items: center;
+    justify-content: space-between;
 }
 
 .tips_btn .tips_discount {
-  width: 100%;
+    width: 100%;
 }
 
 .tips_btn .tips_discount .tips_d_money {
-  display: none;
-  position: absolute;
-  left: 50%;
-  top: -.2rem;
-  padding: 0 .4rem;
-  height: .64rem;
-  line-height: .64rem;
-  color: #2CB7CA;
-  font-size: .32rem;
-  background-color: #fff;
-  border-radius: .32rem;
-  transform: translate(-50%, -100%);
-  box-shadow: 0px 3px 6px rgba(0, 0, 0, 0.16);
+    display: none;
+    position: absolute;
+    left: 50%;
+    top: -.2rem;
+    padding: 0 .4rem;
+    height: .64rem;
+    line-height: .64rem;
+    color: #2CB7CA;
+    font-size: .32rem;
+    background-color: #fff;
+    border-radius: .32rem;
+    transform: translate(-50%, -100%);
+    box-shadow: 0px 3px 6px rgba(0, 0, 0, 0.16);
 }
 
 .tips_btn .tips_discount .tips_d_text {
-  display: none;
-  height: .72rem;
-  line-height: .72rem;
-  color: #fff;
-  font-size: .28rem;
-  text-align: center;
-  background-color: #FFB901;
+    display: none;
+    height: .72rem;
+    line-height: .72rem;
+    color: #fff;
+    font-size: .28rem;
+    text-align: center;
+    background-color: #FFB901;
 }
 
 .tips_btn .btns {
-  display: flex;
-  align-items: center;
-  justify-content: space-between;
-  width: 100%;
-  height: .94rem;
-  line-height: .94rem;
-  color: #fff;
-  font-size: .34rem;
+    display: flex;
+    align-items: center;
+    justify-content: space-between;
+    width: 100%;
+    height: .94rem;
+    line-height: .94rem;
+    color: #fff;
+    font-size: .34rem;
 }
 
 .tips_btn .btns .save-btn,
 .tips_btn .btns .reset-btn {
-  flex: 1;
-  width: 50%;
-  text-align: center;
-  height: 100%;
-  font-size: .34rem;
+    flex: 1;
+    width: 50%;
+    text-align: center;
+    height: 100%;
+    font-size: .34rem;
 }
 
 .tips_btn .btns .reset-btn {
-  background: #fff;
-  color: #2cb7ca;
-  border-top: 1px solid #e0e0e0;
+    background: #fff;
+    color: #2cb7ca;
+    border-top: 1px solid #e0e0e0;
 }
 
 .tips_btn .btns .save-btn {
-  background: #2cb7ca;
-  color: #fff;
-  border-top: 1px solid #2cb7ca;
+    background: #2cb7ca;
+    color: #fff;
+    border-top: 1px solid #2cb7ca;
 }
 
 .tips_btn .btns button[disabled] {
-  opacity: .5;
+    opacity: .5;
 }
 
 .jy_icon {
-  position: relative;
-  width: 100%;
-  height: 100%;
+    position: relative;
+    width: 100%;
+    height: 100%;
 }
 
 .jy_icon.decrease:before,
 .jy_icon.increase:before,
 .jy_icon.increase:after {
-  position: absolute;
-  left: 50%;
-  top: 50%;
-  content: '';
-  width: 0.4rem;
-  height: 0.04rem;
-  background-color: #686868;
-  transform: translate(-50%, -50%);
+    position: absolute;
+    left: 50%;
+    top: 50%;
+    content: '';
+    width: 0.4rem;
+    height: 0.04rem;
+    background-color: #686868;
+    transform: translate(-50%, -50%);
 }
 
 .jy_icon.increase:after {
-  transform: translate(-50%, -50%) rotate(90deg);
+    transform: translate(-50%, -50%) rotate(90deg);
 }
 
 /*禁止长按复制 加给body*/
 .no-touch {
-  -webkit-touch-callout: none;
-  -webkit-user-select: none;
-  -khtml-user-select: none;
-  -moz-user-select: none;
-  -ms-user-select: none;
-  user-select: none;
+    -webkit-touch-callout: none;
+    -webkit-user-select: none;
+    -khtml-user-select: none;
+    -moz-user-select: none;
+    -ms-user-select: none;
+    user-select: none;
 }
 
 /* 弹性盒子布局 */
 .flex_alginC {
-  display: flex;
-  align-items: center;
+    display: flex;
+    align-items: center;
 }
 
 .flex_alginC_justB {
-  display: flex;
-  align-items: center;
-  justify-content: space-between;
+    display: flex;
+    align-items: center;
+    justify-content: space-between;
 }
 
 .flex_alginC_justC {
-  display: flex;
-  align-items: center;
-  justify-content: center;
+    display: flex;
+    align-items: center;
+    justify-content: center;
 }
 
 .flex_column {
-  display: flex;
-  flex-direction: column;
+    display: flex;
+    flex-direction: column;
 }
 
 .flex_column_alignC {
-  display: flex;
-  flex-direction: column;
-  align-items: center;
+    display: flex;
+    flex-direction: column;
+    align-items: center;
 }
 
 /* 自定义弹窗*/
 @-webkit-keyframes c {
-  0% {
-    opacity: 0;
-  }
-  to {
-    opacity: 1;
-  }
+    0% {
+        opacity: 0;
+    }
+    to {
+        opacity: 1;
+    }
 }
 
 @keyframes c {
-  0% {
-    opacity: 0;
-  }
-  to {
-    opacity: 1;
-  }
+    0% {
+        opacity: 0;
+    }
+    to {
+        opacity: 1;
+    }
 }
 
 .custom-dialog .weui-animate-fade-in {
-  -webkit-animation: c ease 0s forwards;
-  animation: c ease 0s forwards;
+    -webkit-animation: c ease 0s forwards;
+    animation: c ease 0s forwards;
 }
 
 @-webkit-keyframes d {
-  0% {
-    opacity: 1;
-  }
-  to {
-    opacity: 0;
-  }
+    0% {
+        opacity: 1;
+    }
+    to {
+        opacity: 0;
+    }
 }
 
 @keyframes d {
-  0% {
-    opacity: 1;
-  }
-  to {
-    opacity: 0;
-  }
+    0% {
+        opacity: 1;
+    }
+    to {
+        opacity: 0;
+    }
 }
 
 .custom-dialog .weui-animate-fade-out {
-  -webkit-animation: d ease 0s forwards;
-  animation: d ease 0s forwards;
+    -webkit-animation: d ease 0s forwards;
+    animation: d ease 0s forwards;
 }
 
 .custom-dialog .weui-dialog__hd {
-  background: #F5F4F9;
-  padding: .17rem 0;
-  color: #000;
-  font-size: .34rem;
-  text-align: center;
+    background: #F5F4F9;
+    padding: .17rem 0;
+    color: #000;
+    font-size: .34rem;
+    text-align: center;
 }
 
 .custom-dialog .weui-dialog__bd {
-  padding: .37rem 0;
-  color: #1D1D1D;
-  font-size: .32rem;
-  text-align: center;
+    padding: .37rem 0;
+    color: #1D1D1D;
+    font-size: .32rem;
+    text-align: center;
 }
 
 .custom-dialog .weui-dialog__ft:after {
-  border: 0;
+    border: 0;
 }
 
 .custom-dialog .weui-dialog__btn:after {
-  border: 0;
+    border: 0;
 }
 
 .custom-dialog .weui-dialog__ft {
-  display: flex;
-  align-items: center;
-  justify-content: center;
-  padding-bottom: .38rem;
-  box-sizing: border-box;
-  text-align: center;
+    display: flex;
+    align-items: center;
+    justify-content: center;
+    padding-bottom: .38rem;
+    box-sizing: border-box;
+    text-align: center;
 }
 
 .custom-dialog .weui-dialog__btn {
-  display: block;
-  width: 1.72rem;
-  height: .72rem;
-  line-height: .72rem;
-  color: #fff;
-  padding: 0;
-  flex: none;
-  text-align: center;
-  border-radius: 3px;
+    display: block;
+    width: 1.72rem;
+    height: .72rem;
+    line-height: .72rem;
+    color: #fff;
+    padding: 0;
+    flex: none;
+    text-align: center;
+    border-radius: 3px;
 }
 
 .custom-dialog .weui-dialog__btn_primary {
-  background-color: #2CB7CA;
-  margin-right: 1rem;
+    background-color: #2CB7CA;
+    margin-right: 1rem;
 }
 
 .custom-dialog .weui-dialog__btn_default {
-  background-color: #BFBFC3;
+    background-color: #BFBFC3;
 }
 
 /* 自定义switch按钮 */
 .custom-switch {
-  position: relative;
-  width: 52px;
-  height: 32px;
-  border: 1px solid #dfdfdf;
-  outline: 0;
-  border-radius: 16px;
-  box-sizing: border-box;
-  background-color: #dfdfdf;
-  -webkit-transition: background-color .1s,border .1s;
-  transition: background-color .1s,border .1s;
-  -webkit-appearance: none;
+    position: relative;
+    width: 52px;
+    height: 32px;
+    border: 1px solid #dfdfdf;
+    outline: 0;
+    border-radius: 16px;
+    box-sizing: border-box;
+    background-color: #dfdfdf;
+    -webkit-transition: background-color .1s, border .1s;
+    transition: background-color .1s, border .1s;
+    -webkit-appearance: none;
 }
 
 .custom-switch:before {
-  content: " ";
-  position: absolute;
-  top: 0;
-  left: 0;
-  width: 50px;
-  height: 30px;
-  border-radius: 15px;
-  background-color: #fdfdfd;
-  -webkit-transition: -webkit-transform 0.35s cubic-bezier(0.45, 1, 0.4, 1);
-  transition: -webkit-transform 0.35s cubic-bezier(0.45, 1, 0.4, 1);
-  transition: transform 0.35s cubic-bezier(0.45, 1, 0.4, 1);
-  transition: transform 0.35s cubic-bezier(0.45, 1, 0.4, 1), -webkit-transform 0.35s cubic-bezier(0.45, 1, 0.4, 1);
+    content: " ";
+    position: absolute;
+    top: 0;
+    left: 0;
+    width: 50px;
+    height: 30px;
+    border-radius: 15px;
+    background-color: #fdfdfd;
+    -webkit-transition: -webkit-transform 0.35s cubic-bezier(0.45, 1, 0.4, 1);
+    transition: -webkit-transform 0.35s cubic-bezier(0.45, 1, 0.4, 1);
+    transition: transform 0.35s cubic-bezier(0.45, 1, 0.4, 1);
+    transition: transform 0.35s cubic-bezier(0.45, 1, 0.4, 1), -webkit-transform 0.35s cubic-bezier(0.45, 1, 0.4, 1);
 }
 
 .custom-switch:after {
-  content: " ";
-  position: absolute;
-  top: 0;
-  left: 0;
-  width: 30px;
-  height: 30px;
-  border-radius: 15px;
-  background-color: #fff;
-  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
-  -webkit-transition: -webkit-transform 0.35s cubic-bezier(0.4, 0.4, 0.25, 1.35);
-  transition: -webkit-transform 0.35s cubic-bezier(0.4, 0.4, 0.25, 1.35);
-  transition: transform 0.35s cubic-bezier(0.4, 0.4, 0.25, 1.35);
-  transition: transform 0.35s cubic-bezier(0.4, 0.4, 0.25, 1.35), -webkit-transform 0.35s cubic-bezier(0.4, 0.4, 0.25, 1.35);
+    content: " ";
+    position: absolute;
+    top: 0;
+    left: 0;
+    width: 30px;
+    height: 30px;
+    border-radius: 15px;
+    background-color: #fff;
+    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
+    -webkit-transition: -webkit-transform 0.35s cubic-bezier(0.4, 0.4, 0.25, 1.35);
+    transition: -webkit-transform 0.35s cubic-bezier(0.4, 0.4, 0.25, 1.35);
+    transition: transform 0.35s cubic-bezier(0.4, 0.4, 0.25, 1.35);
+    transition: transform 0.35s cubic-bezier(0.4, 0.4, 0.25, 1.35), -webkit-transform 0.35s cubic-bezier(0.4, 0.4, 0.25, 1.35);
 }
 
 .custom-switch.checked {
-  border-color: #04be02;
-  background-color: #04be02;
+    border-color: #04be02;
+    background-color: #04be02;
 }
 
 .custom-switch.checked:before {
-  transform: scale(0);
+    transform: scale(0);
 }
 
 .custom-switch.checked:after {
-  transform: translateX(20px);
+    transform: translateX(20px);
 }
 
 .custom-toast .weui-toast {
-  font-size: .3rem;
-  padding: 0.2rem;
-  width: auto;
-  max-width: 6rem;
-  min-height: 0;
-  height: auto;
-  top: 50%;
-  left: 50%;
-  margin-left: 0;
-  margin-top: -0.47rem;
-  transform: translateX(-50%) translateY(-50%);
+    font-size: .3rem;
+    padding: 0.2rem;
+    width: auto;
+    max-width: 6rem;
+    min-height: 0;
+    height: auto;
+    top: 50%;
+    left: 50%;
+    margin-left: 0;
+    margin-top: -0.47rem;
+    transform: translateX(-50%) translateY(-50%);
 }
 
 .custom-toast .weui-icon_toast {
-  display: none;
+    display: none;
 }
 
 .custom-toast .weui-toast__content {
-  margin: 0;
+    margin: 0;
 }
 
 .jymobile-tab-triangle {
-  position: relative;
+    position: relative;
 }
 
 .jymobile-tab-triangle:after {
-  content: '';
-  position: absolute;
-  top: 50%;
-  right: 0;
-  width: 0;
-  height: 0;
-  font-size: 0;
-  line-height: 0;
-  border-style: solid;
-  border-width: .1rem;
-  border-color: #aaa transparent transparent transparent;
-  transform: translate(140%, -30%);
+    content: '';
+    position: absolute;
+    top: 50%;
+    right: 0;
+    width: 0;
+    height: 0;
+    font-size: 0;
+    line-height: 0;
+    border-style: solid;
+    border-width: .1rem;
+    border-color: #aaa transparent transparent transparent;
+    transform: translate(140%, -30%);
 }
 
 .jymobile-tab-triangle.active:after {
-  border-color: transparent transparent #2cb7ca transparent;
-  transform: translate(140%, -70%);
+    border-color: transparent transparent #2cb7ca transparent;
+    transform: translate(140%, -70%);
 }
 
 .jymobile-tab-triangle.current {
-  color: #2cb7ca;
+    color: #2cb7ca;
 }
 
 .jymobile-tab-triangle.current:after {
-  border-color: #2cb7ca transparent transparent transparent;
+    border-color: #2cb7ca transparent transparent transparent;
 }
 
 #choose_area {
-  display: flex;
-  justify-content: space-between;
-  flex-direction: column;
-  overflow: hidden;
-  height: 100%;
+    display: flex;
+    justify-content: space-between;
+    flex-direction: column;
+    overflow: hidden;
+    height: 100%;
 }
 
 #choose_area .form {
-  flex: 1;
-  overflow-y: scroll;
+    flex: 1;
+    overflow-y: scroll;
 }
 
 #choose_area .optional_count, #choose_area .all_area {
-  height: .88rem;
-  line-height: .88rem;
-  padding: 0 .3rem;
-  font-size: .3rem;
-  color: #1d1d1d;
+    height: .88rem;
+    line-height: .88rem;
+    padding: 0 .3rem;
+    font-size: .3rem;
+    color: #1d1d1d;
 }
 
 #choose_area .optional_count em, #choose_area .all_area em {
-  color: #2cb7ca;
+    color: #2cb7ca;
 }
 
 #choose_area .result {
-  position: relative;
-  padding: .2rem .3rem;
-  font-size: .26rem;
-  text-align: justify;
+    position: relative;
+    padding: .2rem .3rem;
+    font-size: .26rem;
+    text-align: justify;
 }
 
 #choose_area .result .result_text {
-  position: relative;
-  min-height: 19px;
+    position: relative;
+    min-height: 19px;
 }
 
 #choose_area .result .line_two {
-  text-overflow: ellipsis;
-  overflow: hidden;
-  text-overflow: ellipsis;
-  display: -webkit-box;
-  -webkit-line-clamp: 2;
-  line-clamp: 2;
-  -webkit-box-orient: vertical;
+    text-overflow: ellipsis;
+    overflow: hidden;
+    text-overflow: ellipsis;
+    display: -webkit-box;
+    -webkit-line-clamp: 2;
+    line-clamp: 2;
+    -webkit-box-orient: vertical;
 }
 
 #choose_area .result .detail, #choose_area .result .packup {
-  display: inline-block;
-  width: 1.5rem;
-  padding-right: 0.1rem;
-  text-align: right;
-  color: #2cb7ca;
-  font-size: .26rem;
-  z-index: 999;
+    display: inline-block;
+    width: 1.5rem;
+    padding-right: 0.1rem;
+    text-align: right;
+    color: #2cb7ca;
+    font-size: .26rem;
+    z-index: 999;
 }
 
 #choose_area .result .detail {
-  position: absolute;
-  right: 0;
-  bottom: 0;
-  background: linear-gradient(90deg, rgba(245, 244, 249, 0) 0%, rgba(245, 244, 249, 0.96) 36%, #f5f4f9 100%);
+    position: absolute;
+    right: 0;
+    bottom: 0;
+    background: linear-gradient(90deg, rgba(245, 244, 249, 0) 0%, rgba(245, 244, 249, 0.96) 36%, #f5f4f9 100%);
 }
 
 #choose_area .result .packup {
-  position: absolute;
-  right: 0.3rem;
-  bottom: 0;
-  margin-top: .1rem;
+    position: absolute;
+    right: 0.3rem;
+    bottom: 0;
+    margin-top: .1rem;
 }
 
 #choose_area .select-area-box {
-  padding-bottom: .94rem;
+    padding-bottom: .94rem;
 }
 
 #choose_area .select-area-box .tab {
-  display: flex;
-  align-items: center;
-  justify-content: space-between;
-  color: #1d1d1d;
-  background: #fff;
-  font-size: .3rem;
-  padding: .2rem .5rem;
-  border-bottom: 1px solid #e0e0e0;
-  box-sizing: border-box;
+    display: flex;
+    align-items: center;
+    justify-content: space-between;
+    color: #1d1d1d;
+    background: #fff;
+    font-size: .3rem;
+    padding: .2rem .5rem;
+    border-bottom: 1px solid #e0e0e0;
+    box-sizing: border-box;
 }
 
 #choose_area .select-area-box .tab .province {
-  display: flex;
-  align-items: center;
+    display: flex;
+    align-items: center;
 }
 
 #choose_area .select-area-box .tab .province .checkbox {
-  width: .4rem;
-  height: .4rem;
-  border: 1px solid #ddd;
-  border-radius: 50%;
-  margin-right: .2rem;
-  -webkit-appearance: none;
-  background: #fff;
+    width: .4rem;
+    height: .4rem;
+    border: 1px solid #ddd;
+    border-radius: 50%;
+    margin-right: .2rem;
+    -webkit-appearance: none;
+    background: #fff;
 }
 
 #choose_area .select-area-box .tab .province .checkbox:checked {
-  border: 0;
-  background: url(/jyapp/vipsubscribe/image/xuanzhong.png) no-repeat center center;
-  background-size: 100% 100%;
+    border: 0;
+    background: url(/jyapp/vipsubscribe/image/xuanzhong.png) no-repeat center center;
+    background-size: 100% 100%;
 }
 
 #choose_area .select-area-box .tab .province .checkbox[disabled] {
-  border: 0;
-  background: url(/jyapp/vipsubscribe/image/active_disabled.png) no-repeat center center;
-  background-size: 100% 100%;
+    border: 0;
+    background: url(/jyapp/vipsubscribe/image/active_disabled.png) no-repeat center center;
+    background-size: 100% 100%;
+    opacity: 1;
 }
 
 #choose_area .select-area-box .tab .province .checkbox.half {
-  border: 0 !important;
-  background: url(/jyapp/vipsubscribe/image/banxuan.png) no-repeat center center !important;
-  background-size: cover !important;
+    border: 0 !important;
+    background: url(/jyapp/vipsubscribe/image/banxuan.png) no-repeat center center !important;
+    background-size: cover !important;
 }
 
 #choose_area .select-area-box .tab .province .checkbox.half[disabled] {
-  border: 0 !important;
-  background: url(/jyapp/vipsubscribe/image/banxuan.png) no-repeat center center !important;
-  background-size: cover !important;
+    border: 0 !important;
+    background: url(/jyapp/vipsubscribe/image/banxuan.png) no-repeat center center !important;
+    background-size: cover !important;
+    opacity: 1 !important;
 }
 
 #choose_area .select-area-box .tab .optional {
-  color: #2CB7CA;
-  font-size: 0.28rem;
-  margin-left: -2.8rem;
+    color: #2CB7CA;
+    font-size: 0.28rem;
+    margin-left: -2.8rem;
 }
 
 #choose_area .select-area-box label::after {
-  font-size: 14px;
-  float: right;
-  margin-right: 15px;
+    font-size: 14px;
+    float: right;
+    margin-right: 15px;
 }
 
 #choose_area .select-area-box .tab_content {
-  display: none;
-  font-size: .28rem;
-  padding: .1rem .3rem;
-  text-align: center;
+    display: none;
+    font-size: .28rem;
+    padding: .1rem .3rem;
+    text-align: center;
 }
 
 #choose_area .select-area-box .tab_content .city {
-  float: left;
-  padding: .1rem .2rem;
-  background: #fff;
-  margin: .1rem 0 .1rem .1rem;
-  border-radius: 0.04rem;
-  font-size: .28rem;
+    float: left;
+    padding: .1rem .2rem;
+    background: #fff;
+    margin: .1rem 0 .1rem .1rem;
+    border-radius: 0.04rem;
+    font-size: .28rem;
 }
 
 #choose_area .select-area-box .tab_content .active {
-  background: #2cb7ca;
-  color: #fff;
+    background: #2cb7ca;
+    color: #fff;
 }
 
 #choose_area .select-area-box .tab_content .active[disabled] {
-  background: #BFBFC3;
-  color: #fff;
+    background: #BFBFC3;
+    color: #fff;
 }
 
 #choose_area .select-area-box .tab_content .city[disabled] {
-  background: #BFBFC3;
-  color: #fff;
+    background: #BFBFC3;
+    color: #fff;
 }
 
 #choose_area .select-area-box .index {
-  padding: .3rem .3rem .1rem .3rem;
-  font-size: .32rem;
+    padding: .3rem .3rem .1rem .3rem;
+    font-size: .32rem;
 }
 
 #choose_area .slide {
-  background: transparent;
-  position: fixed;
-  right: 0;
-  top: 50%;
-  height: 8.5rem;
-  width: .4rem;
-  font-size: .26rem;
-  text-align: center;
-  display: flex;
-  flex-direction: column;
-  justify-content: center;
-  padding: .1rem 0;
-  align-items: center;
-  margin-top: -4.25rem;
-  z-index: 9999;
+    background: transparent;
+    position: fixed;
+    right: 0;
+    top: 50%;
+    height: 8.5rem;
+    width: .4rem;
+    font-size: .26rem;
+    text-align: center;
+    display: flex;
+    flex-direction: column;
+    justify-content: center;
+    padding: .1rem 0;
+    align-items: center;
+    margin-top: -4.25rem;
+    z-index: 9999;
 }
 
 #choose_area .slide a {
-  margin-bottom: .1rem;
+    margin-bottom: .1rem;
+}
+
+.icon.iconfont {
+    display: inline-block;
 }
+
+.icon.iconfont.up {
+    display: inline-block;
+    transform: rotate(-180deg);
+}

+ 29 - 21
src/jfw/modules/app/src/web/staticres/jyapp/vipsubscribe/js/editArea.js

@@ -54,18 +54,28 @@ function createMoreCity(arr) {
     return tempHtml
 }
 
+var animatedRuning = false;
+
+function checkAnimatedRuning() {
+    if (animatedRuning) {
+        return true
+    }
+    animatedRuning = true;
+    setTimeout(function () {
+        animatedRuning = false;
+    }, 500);
+    return false
+}
+
 // 省下拉市事件
 function slideFun(obj) {
+    if (checkAnimatedRuning()) {
+        return
+    }
     if (obj.next('.tab_content:not(:animated)').css("display") == "block") {
-        obj.children().children('i').css({
-            "display": "inline-block",
-            "transform": "rotate(0)"
-        })
+        obj.children().children('i').removeClass("up");
     } else {
-        obj.children().children('i').css({
-            "display": "inline-block",
-            "transform": "rotate(-180deg)"
-        })
+        obj.children().children('i').addClass("up");
     }
     obj.toggleClass('selected').next('.tab_content:not(:animated)').slideToggle(500)
     obj.parent().siblings().children('.tab').removeClass('selected');
@@ -169,7 +179,7 @@ function initResult() {
                     // 如果购买的是全省,则不可点击下拉事件(不可修改城市)
                     if (isAll != -1) {
                         $(this).parent().siblings().children('.city').addClass('active').attr('disabled', true);
-                        $(this).parent('.tab').parent('li').siblings().find('.checkbox:not(.half)').parents('.tab').unbind('click')
+                        $(this).parent('.tab').unbind('click').parent('li').siblings().find('.checkbox:not(.half)').parents('.tab').unbind('click')
                     } else {
                         $(this).parent().siblings().children('.city').addClass('active').removeAttr('disabled')
                     }
@@ -189,7 +199,7 @@ function initResult() {
                         that.bind('click', function () {
                             slideFun($(this));
                         })
-                        $(this).addClass('active').parent().siblings('.tab').find('input').addClass('half');
+                        $(this).addClass('active').removeAttr('disabled').parent().siblings('.tab').find('input').addClass('half');
                         return;
                     }
                 })
@@ -233,18 +243,15 @@ function initResult() {
 $(function () {
     // 省下拉事件
     $('.tab:not(.municipality)').on('click', function () {
+        if (checkAnimatedRuning()) {
+            return
+        }
         if ($(this).next('.tab_content:not(:animated)').css("display") == "block") {
-            $(this).children().children('i').css({
-                "display": "inline-block",
-                "transform": "rotate(0)"
-            })
+            $(this).children().children('i').removeClass("up");
         } else {
-            $(this).children().children('i').css({
-                "display": "inline-block",
-                "transform": "rotate(-180deg)"
-            })
+            $(this).children().children('i').addClass("up");
         }
-        $(this).toggleClass('selected').next('.tab_content:not(:animated)').slideToggle(500)
+        $(this).toggleClass('selected').next('.tab_content:not(:animated)').slideToggle(500);
         $(this).parent().siblings().children('.tab').removeClass('selected');
     });
     getData();
@@ -358,7 +365,8 @@ $(function () {
         $('.checkbox').prop('checked', false).removeAttr('disabled');
         $('.city').removeClass('active');
         $('.tab_content').slideUp();
-        $('.optional').remove()
+        $('.optional').remove();
+        $('.tab').find('i').removeClass("up");
         init();
     })
     // 确定修改事件
@@ -380,4 +388,4 @@ function theSameAs(select) {
     let tmp1 = getAreaClassArr(select);
     let tmp2 = getAreaClassArr(areaData.data.area);
     return (JSON.stringify(tmp1[0].sort()) === JSON.stringify(tmp2[0].sort())) && (JSON.stringify(tmp1[1].sort()) === JSON.stringify(tmp2[1].sort()));
-}
+}

+ 14 - 0
src/jfw/modules/app/src/web/templates/vipsubscribe/choose_area.html

@@ -658,6 +658,9 @@
                 document.querySelector('#' + s).scrollIntoView({block: 'center'});
             })
             $(".select-area-box .tab:not(.municipality)").on('click', function (event) {
+                if (AreaChoose.checkAnimatedRuning()) {
+                    return
+                }
                 if ($(this).next('.tab_content:not(:animated)').css("display") == "block") {
                     $(this).children().children('i').css({
                         "display": "inline-block",
@@ -766,6 +769,17 @@
                 $('.tips_d_money').text('¥' + price);
             }
 
+        },
+        animatedRuning: false,
+        checkAnimatedRuning: function () {
+            if (AreaChoose.animatedRuning) {
+                return true
+            }
+            AreaChoose.animatedRuning = true;
+            setTimeout(function () {
+                AreaChoose.animatedRuning = false;
+            }, 500);
+            return false
         }
     };
 

+ 31 - 4
src/jfw/modules/app/src/web/templates/vipsubscribe/vip_purchase.html

@@ -295,6 +295,7 @@
                     this.industrySelect = JSON.parse(sessionStorage.getItem("vipSubSelectIndustry"));
                 }
                 {{if eq .T.orderType 5 }}
+                $('#payHandle').text("立即续费");
                 //即将到期 回显已购买
                 if (!sessionStorage.getItem("vipSubSelectArea") || !sessionStorage.getItem("vipSubSelectIndustry")) {
                     $DoPost("/subscribepay/editSub/getSubBuyMsg", {}, function (r) {
@@ -315,7 +316,33 @@
                     }, false)
                 }
                 {{end}}
+                {{if .T.again}}    //再次购买回显
+                {{if eq .T.again 1 }}
+                var orderCode = getParam("orderCode")
+                if (!sessionStorage.getItem("vipSubSelectArea") || !sessionStorage.getItem("vipSubSelectIndustry")) {
+                    $DoPost("/subscribepay/orderListDetails/getVipOrderInfo", {"orderCode": orderCode}, function (r) {
+                        if (!$.isEmptyObject(r.data.area)) {
+                            purchase.areaSelect = r.data.area
+                        } else {
+                            purchase.areaSelect = {"全国": []}
+                        }
+                        if (r.data.industry.length != 0) {
+                            purchase.industrySelect = r.data.industry
+                        } else {
+                            purchase.industrySelect = ["全部行业"]
+                        }
+//                          if (r.timeSelect!=undefined&&r.company!=undefined){
+//                         		purchase.timeSelect=[r.timeSelect,r.company];
+//                          }
+                        $(".weui-icon-checked").click();
+                        sessionStorage.setItem("vipSubSelectArea", JSON.stringify(purchase.areaSelect));
+                        sessionStorage.setItem("vipSubSelectIndustry", JSON.stringify(purchase.industrySelect));
+                        //sessionStorage.setItem("vipSubSelectTime", JSON.stringify(purchase.timeSelect));
 
+                    }, false)
+                }
+                {{end}}
+                {{end}}
                 if (sessionStorage.getItem("vipSubSelectTime")) {
                     this.timeSelect = JSON.parse(sessionStorage.getItem("vipSubSelectTime"));
                 }
@@ -363,9 +390,9 @@
                 }
                 $(".choose_area").val(tipTxt);
                 //$(".add_tips.area").text(tipTxt).css("display", "");
-            }else if(!$.isEmptyObject(this.areaSelect) && this.areaSelect["全国"] ){
+            } else if (!$.isEmptyObject(this.areaSelect) && this.areaSelect["全国"]) {
                 $(".choose_area").val("全国");
-            }else {
+            } else {
                 $(".choose_area").val("");
             }
         },
@@ -396,9 +423,9 @@
             }*/
             if (this.industrySelect.length > 0 && this.industrySelect[0] != "全部行业" && this.industrySelect[0] != "一个行业") { //选择有行业信息
                 $(".choose_industry").val("已选择 " + this.industrySelect.length + " 个行业");
-            }else if(this.industrySelect.length > 0 && this.industrySelect[0] == "全部行业"){
+            } else if (this.industrySelect.length > 0 && this.industrySelect[0] == "全部行业") {
                 $(".choose_industry").val("全部行业");
-            }else{
+            } else {
                 $(".choose_industry").val("");
             }
         },

+ 58 - 0
src/jfw/modules/subscribepay/README.md

@@ -0,0 +1,58 @@
+/**************************微信模板消息**************************/
+模版ID
+owspgSN6Tn3z0Olx4odQTLqg9JfiMi30SlZBPDrxlOc
+开发者调用模版消息接口时需提供模版ID
+标题
+续费提醒
+行业
+IT科技 - 互联网|电子商务
+详细内容
+{{first.DATA}}
+账号名:{{keyword1.DATA}}
+用户ID:{{keyword2.DATA}}
+服务项目:{{keyword3.DATA}}
+过期时间:{{keyword4.DATA}}
+{{remark.DATA}}
+
+模版ID
+tI13Li1FN0K6YY3fSn527-HcYIKfgrQ-k0qYxsESM3k
+开发者调用模版消息接口时需提供模版ID
+标题
+订单未支付提醒
+行业
+IT科技 - 互联网|电子商务
+详细内容
+{{first.DATA}}
+下单时间:{{keyword1.DATA}}
+订单号:{{keyword2.DATA}}
+待付金额:{{keyword3.DATA}}
+订单信息:{{keyword4.DATA}}
+{{remark.DATA}}
+
+模版ID
+xDdO4kzp5_zv-QXqr4L38RWjzp1RJLzJCTxwmutXqQA
+开发者调用模版消息接口时需提供模版ID
+标题
+购买成功通知
+行业
+IT科技 - 互联网|电子商务
+详细内容
+{{first.DATA}}
+商品名称:{{keyword1.DATA}}
+订单编号:{{keyword2.DATA}}
+购买时间:{{keyword3.DATA}}
+到期时间:{{keyword4.DATA}}
+{{remark.DATA}}
+
+模版ID
+6SMSSwz5c26YjMac71CD4PbDA_GB-MTtRxmC7BdeWRk
+开发者调用模版消息接口时需提供模版ID
+标题
+试用版到期提醒
+行业
+IT科技 - 互联网|电子商务
+详细内容
+{{first.DATA}}
+账号:{{keyword1.DATA}}
+到期时间:{{keyword2.DATA}}
+{{remark.DATA}}

+ 4 - 3
src/jfw/modules/subscribepay/src/config.json

@@ -1,6 +1,6 @@
 {
 	"mongodbServers": "192.168.3.128:27080",
-    "mongodbPoolSize": 25,
+    "mongodbPoolSize": 5,
     "mongodbName": "qfw",
     "redisaddrs": "other=192.168.3.128:1712,session=192.168.3.128:1712,push=192.168.3.128:1712",
     "elasticsearch": "http://192.168.3.128:9800",
@@ -30,7 +30,7 @@
         "passWord": "Topnet123"
     },
 	"appPushServiceRpc": "127.0.0.1:5566",
-    "webdomain": "http://web-jydev-ws.jianyu360.cn",
+    "webdomain": "http://web-jydev-zxl.jianyu360.cn",
     "mail": [
         {
             "addr": "smtp.exmail.qq.com",
@@ -44,5 +44,6 @@
             "pwd": "ue9Rg9Sf4CVtdm5a",
             "user": "public03@topnet.net.cn"
         }
-    ]
+    ],
+	"orderCountdown":"48h"
 }

+ 30 - 14
src/jfw/modules/subscribepay/src/config/config.go

@@ -35,25 +35,41 @@ type config struct {
 		Pwd  string
 		User string
 	}
-	ExpireRemind []int
-	WxTplExpire  string
+	ExpireRemind   []int
+	WxTplExpire    string
+	OrderCountdown interface{}
 }
-type timetaskConfig struct {
-	ExpireRemind   string
-	SyncVipUpgrade string
-	CheckIsExpire  string
+type timeTaskConfig struct {
+	ExpireRemind   string   //到期提醒
+	SyncVipUpgrade string   //同步未及时生效的数据
+	CheckIsExpire  string   //定时更新用户vip状态
+	UnpaidRemind   struct { //未支付订单提醒
+		AfterOrder   int64 //下单后n小时提醒
+		BeforeExpire int64 //n小时自动关闭提醒
+		Duration     int   //定时任务时间间隔
+	}
 }
 type messageConfig struct {
-	WxTplExpire struct {
-		Id       string
-		First    *qrpc.TmplItem
-		Keyword2 *qrpc.TmplItem
-		Keyword3 *qrpc.TmplItem
-	}
+	WxTpl_OnTrial_SoonExpire *WxTplMsg //试用即将到期
+	WxTpl_OnTrial_Expired    *WxTplMsg //试用已到期
+	WxTpl_SoonExpire         *WxTplMsg //即将到期
+	WxTpl_Expired            *WxTplMsg //已到期
+	WxTpl_Unpaid             *WxTplMsg //未支付订单
+	WxTpl_PaySuccess         *WxTplMsg //支付成功
+}
+
+type WxTplMsg struct {
+	Id       string
+	First    *qrpc.TmplItem
+	Keyword1 *qrpc.TmplItem
+	Keyword2 *qrpc.TmplItem
+	Keyword3 *qrpc.TmplItem
+	Keyword4 *qrpc.TmplItem
+	Remark   *qrpc.TmplItem
 }
 
 var Config *config
-var TimetaskConfig *timetaskConfig
+var TimeTaskConfig *timeTaskConfig
 var MessageConfig *messageConfig
 
 //发送邮件邮箱
@@ -69,7 +85,7 @@ var Wxoauth, Wxoauthinfo string
 func init() {
 	//程序配置文件
 	qutil.ReadConfig(&Config)
-	qutil.ReadConfig("./timetask.json", &TimetaskConfig)
+	qutil.ReadConfig("./timetask.json", &TimeTaskConfig)
 	qutil.ReadConfig("./message.json", &MessageConfig)
 	for _, v := range Config.Mail {
 		mail := &mail.GmailAuth{

+ 62 - 3
src/jfw/modules/subscribepay/src/message.json

@@ -1,15 +1,74 @@
 {
-	"wxTplExpire": {
+	"WxTpl_OnTrial_SoonExpire": {
+		"id": "_2qGuk_KkOQtiO8oV_7ZOCWfjX2FQjs6pUDYBHkpygI",
+		"first":{
+			"value":"您试用的VIP订阅服务即将到期,如需获取更多精准招标信息,请及时购买。"
+		},
+		"remark": {
+			"value":"感谢您的试用,如已购买,请忽略此信息。"
+		}
+	},
+	"WxTpl_OnTrial_Expired": {
+		"id": "_2qGuk_KkOQtiO8oV_7ZOCWfjX2FQjs6pUDYBHkpygI",
+		"first":{
+			"value":"您试用的VIP订阅服务已到期,如需获取更多精准招标信息,请及时购买。"
+		},
+		"remark": {
+			"value":"感谢您的试用,如已购买,请忽略此信息。"
+		}
+	},
+	"WxTpl_SoonExpire": {
+		"id": "3_VPNbD7fmfd8BsdjLW-a7FOP4wIhEGV7Jx-11-9c7g",
+		"first":{
+			"value":"您的VIP订阅服务即将到期,为了不影响您所获取更全面的招标信息,请您及时续费。"
+		},
+		"keyword2": {
+			"value":"-"
+		},
+		"keyword3": {
+			"value":"VIP订阅"
+		},
+		"remark": {
+			"value":"如已续费,请忽略此信息。"
+		}
+	},
+	"WxTpl_Expired": {
 		"id": "3_VPNbD7fmfd8BsdjLW-a7FOP4wIhEGV7Jx-11-9c7g",
 		"first":{
-			"value":"您的VIP订阅服务%s到期,为不影响您的使用。请立即续费",
-			"color":"#FF0000"
+			"value":"您的VIP订阅服务已到期,如需获取更多精准招标信息,请再次购买。"
 		},
 		"keyword2": {
 			"value":"-"
 		},
 		"keyword3": {
 			"value":"VIP订阅"
+		},
+		"remark": {
+			"value":"如已续费,请忽略此信息。"
+		}
+	},
+	"WxTpl_Unpaid": {
+		"id": "9oRmG95lUQZMH-ZVTryoKpAuZTDQWVEsJBhZmJp_41c",
+		"first":{
+			"value":"您的订单 %s 处于未支付状态,为了使您获取更多招标信息,请您及时付款。"
+		},
+		"keyword3": {
+			"value":"%s元"
+		},
+		"keyword4": {
+			"value":"VIP订阅%s"
+		},
+		"remark": {
+			"value":"订单将在%.0f小时后自动关闭,请及时支付。"
+		}
+	},
+	"WxTpl_PaySuccess": {
+		"id": "Pr6QjYUit1Tc7GMHhziU5pnfYAiKsa11l2NMGdHO-NU",
+		"first":{
+			"value":"您的订单 %s 已支付成功,剑鱼标讯将为您提供更多精准招标信息,感谢您的购买!"
+		},
+		"keyword1": {
+			"value":"VIP订阅%s"
 		}
 	}
 }

+ 28 - 13
src/jfw/modules/subscribepay/src/service/orderListDetails.go

@@ -58,6 +58,15 @@ func (this *OrderListDetails) GetOrderPayAllMsg() {
 			//"order_status": 1,
 		}
 		oData := util.Mysql.FindOne(tableName_order, query, "prepay_time,create_time,pay_time,pay_way,original_price,applybill_status,out_trade_no,filter,product_type,order_status,applybill_type,applybill_taxnum,applybill_company,vip_starttime,vip_endtime,vip_type", "")
+
+		//配置订单到期时间
+		order_countdown := config.Config.OrderCountdown //配置文件读取
+		if strings.Contains(qutil.ObjToString(order_countdown), "h") {
+			(*oData)["order_countdown"] = qutil.ObjToString(order_countdown)
+		} else {
+			(*oData)["order_countdown"] = qutil.IntAll(order_countdown)
+		}
+
 		//查询订单信息
 		if oData == nil || len(*oData) == 0 {
 			return &entity.FuncResult{false, errors.New("未找到此订单"), nil}
@@ -113,7 +122,9 @@ func (o *OrderListDetails) MyOrder() error {
 		queryM["order_status"] = map[string]interface{}{"ne": orderStatus_deleted}
 	}
 	//总数
-	haveNextPage, res, _ := o.Datas(queryM, 1)
+	page_size := o.GetString("page_size")
+	i_page_size, _ := strconv.Atoi(page_size)
+	haveNextPage, res, _ := o.Datas(queryM, 1, i_page_size)
 	if res != nil {
 		o.SetRes(res, queryM)
 	}
@@ -151,7 +162,7 @@ func (o *OrderListDetails) MyOrderPaging() error {
 	} else {
 		queryM["order_status"] = map[string]interface{}{"ne": orderStatus_deleted}
 	}
-	haveNextPage, res, _ := o.Datas(queryM, pageNum)
+	haveNextPage, res, _ := o.Datas(queryM, pageNum, 10)
 	if res != nil {
 		o.SetRes(res, queryM)
 	}
@@ -189,7 +200,7 @@ func (o *OrderListDetails) DeleteOrder() error {
 		} else {
 			queryM["order_status"] = map[string]interface{}{"ne": orderStatus_deleted}
 		}
-		haveNextPage, res, _ := o.Datas(queryM, pageNum)
+		haveNextPage, res, _ := o.Datas(queryM, pageNum, 10)
 		if len(res) > 0 {
 			res = res[0:1]
 			//用于删除订单后 判断新增的订单之后 是否有下一页
@@ -415,22 +426,26 @@ func (o *OrderListDetails) SetRes(res []map[string]interface{}, queryM map[strin
 	queryM["product_type"] = "VIP订阅"
 	lastbuy := *util.Mysql.Find(tableName_order, queryM, "order_code,pay_time", "pay_time desc", -1, 0)
 	lastbuy_code := ""
+	var create_time_stamp int64 = 0
 	if len(lastbuy) > 0 && lastbuy != nil {
 		lastbuy_code = qutil.ObjToString(lastbuy[0]["order_code"])
 	}
 	delete(queryM, "product_type")
 	for _, v := range res {
-		//获取单号 如果是vip 48小时取消
+		//获取单号 如果是vip xx小时取消
 		order_code := qutil.ObjToString(v["order_code"])
 		create_time_str := qutil.ObjToString(v["create_time"])
 		//创建时间戳
 		create_time, _ := time.ParseInLocation(qutil.Date_Full_Layout, create_time_str, time.Local)
-		//48小时后的时间戳
-		//create_time_stamp_48 := create_time.AddDate(0, 0, 2).Unix()
-		//测试暂时改成1h
-		onehour, _ := time.ParseDuration("1h")
-		create_time_stamp := create_time.Add(onehour).Unix()
-		//当前时间时间戳
+
+		order_countdown := config.Config.OrderCountdown //配置文件读取
+		if strings.Contains(qutil.ObjToString(order_countdown), "h") {
+			onehour, _ := time.ParseDuration(qutil.ObjToString(order_countdown))
+			create_time_stamp = create_time.Add(onehour).Unix()
+		} else {
+			i_countdown := qutil.IntAll(order_countdown)
+			create_time_stamp = create_time.AddDate(0, 0, i_countdown).Unix()
+		}
 		now_time_stamp := time.Now().Unix()
 		if create_time_stamp < now_time_stamp && qutil.ObjToString(v["product_type"]) == "VIP订阅" {
 			if v["order_status"] != nil {
@@ -481,8 +496,8 @@ func (o *OrderListDetails) SetRes(res []map[string]interface{}, queryM map[strin
 }
 
 //查询数据
-func (o *OrderListDetails) Datas(queryM map[string]interface{}, pageNum int) (haveNextPage bool, result []map[string]interface{}, err error) {
-	res := *util.Mysql.Find(tableName_order, queryM, "id,order_code,filter_publishtime,create_time,data_spec,filter_id,filter_keys,order_money,data_count,order_status,pay_way,product_type,filter,pay_time,vip_starttime,vip_endtime,applybill_status,applybill_type,applybill_taxnum,applybill_company", "create_time desc", -1, 0)
+func (o *OrderListDetails) Datas(queryM map[string]interface{}, pageNum, pagesize_max int) (haveNextPage bool, result []map[string]interface{}, err error) {
+	res := *util.Mysql.Find(tableName_order, queryM, "id,order_code,filter_publishtime,create_time,data_spec,filter_id,filter_keys,order_money,data_count,order_status,pay_way,product_type,filter,pay_time,vip_starttime,vip_endtime,applybill_status,applybill_type,applybill_taxnum,applybill_company,vip_type", "create_time desc", -1, 0)
 	if len(res) > 0 {
 		start := (pageNum - 1) * pagesize_max
 		end := pageNum * pagesize_max
@@ -526,7 +541,7 @@ func getPayTransactionId(payWay, tradeNo string) (transaction_id string) {
 	return
 }
 
-//检查vip订单是否到期,如果到期 订单取消48h
+//检查vip订单是否到期,如果到期 订单取消
 func FortyEightHoursCancel(order string, create_time_stamp, now_time_stamp int64) {
 	//查询vip订单条件
 	queryM := map[string]interface{}{

+ 5 - 2
src/jfw/modules/subscribepay/src/service/vipRenewUpgrade.go

@@ -49,7 +49,7 @@ func (this *RenewUpgrade) GetBuyMsg() {
 		orderdata := util.Mysql.FindOne("dataexport_order", map[string]interface{}{
 			"user_id":      userId,
 			"order_status": 1,
-		}, "filter", "create_time desc")
+		}, "filter,order_code", "create_time desc")
 		vmsg := entity.VipSimpleMsg{}
 		if len(*orderdata) > 0 && *orderdata != nil {
 			filterStr := qutil.ObjToString((*orderdata)["filter"])
@@ -73,6 +73,7 @@ func (this *RenewUpgrade) GetBuyMsg() {
 				"buyset":      buyset,
 				"allarea":     allArea,
 				"allindustry": allIndustry,
+				"orderCode":   (*orderdata)["order_code"],
 			}
 			this.ServeJson(dataArr)
 		}
@@ -381,7 +382,7 @@ func (this *RenewUpgrade) GetExprie() {
 	orderdata := util.Mysql.FindOne("dataexport_order", map[string]interface{}{
 		"id":      orderId,
 		"user_id": userId,
-	}, "filter", "")
+	}, "filter,order_code", "")
 	vmsg := entity.VipSimpleMsg{}
 	if orderdata != nil && len(*orderdata) > 0 {
 		filterStr := qutil.ObjToString((*orderdata)["filter"])
@@ -392,8 +393,10 @@ func (this *RenewUpgrade) GetExprie() {
 		dataArr := map[string]interface{}{
 			"area":       vmsg.Area,
 			"buyerclass": vmsg.Industry,
+			"orderCode":  (*orderdata)["order_code"],
 			"vipStatus":  vipStatus,
 		}
+		log.Println(dataArr)
 		this.ServeJson(dataArr)
 	}
 }

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

@@ -138,6 +138,7 @@ func (this *SubVipPayOrder) CreateOrder() {
 			timeStamp := qutil.Int64All((*userData)["l_vip_endtime"])
 			startTime := time.Unix(timeStamp, 0)
 			endTime := util.GetDATE(filter.Cycleunit, filter.Cyclecount, timeStamp)
+			insertMap["vip_type"] = 1
 			insertMap["vip_starttime"] = qutil.FormatDate(&startTime, qutil.Date_Full_Layout)
 			insertMap["vip_endtime"] = qutil.FormatDate(&endTime, qutil.Date_Full_Layout)
 		}

+ 6 - 1
src/jfw/modules/subscribepay/src/timetask.json

@@ -1,5 +1,10 @@
 {
 	"expireRemind": "10:00",
 	"syncVipUpgrade": "00:00",
-	"checkIsExpire": "00:00"
+	"checkIsExpire": "00:00",
+	"unpaidRemind": {
+		"afterOrder": 7200,
+		"beforeExpire": 7200,
+		"duration": 10
+	}
 }

+ 56 - 27
src/jfw/modules/subscribepay/src/timetask/timetask.go

@@ -16,8 +16,6 @@ const (
 	threeday = 259200
 )
 
-var Se = qutil.SimpleEncrypt{Key: "topnet"}
-
 func Run() {
 	go syncVipUpgrade()
 	go checkIsExpire()
@@ -26,7 +24,7 @@ func Run() {
 
 //vip升级 下个月生效 同步
 func syncVipUpgrade() {
-	crontab(true, TimetaskConfig.SyncVipUpgrade, func() {
+	crontab(true, TimeTaskConfig.SyncVipUpgrade, func() {
 		log.Println("定时任务,开始同步vip升级数据")
 		sess := util.MQFW.GetMgoConn()
 		defer util.MQFW.DestoryMongoConn(sess)
@@ -73,7 +71,7 @@ func syncVipUpgrade() {
 
 //每天0点 检查试用、vip服务是否到期
 func checkIsExpire() {
-	crontab(true, TimetaskConfig.CheckIsExpire, func() {
+	crontab(true, TimeTaskConfig.CheckIsExpire, func() {
 		log.Println("定时任务,开始更新vip状态")
 		now_unix := time.Now().Unix()
 		sess := util.MQFW.GetMgoConn()
@@ -103,16 +101,15 @@ func checkIsExpire() {
 				delSess := util.MQFW.GetMgoConn()
 				defer util.MQFW.DestoryMongoConn(delSess)
 				for _, pushColl := range []string{"pushspace", "pushspace_temp", "pushspace_vip", "pushspace_fail", "pushspace_project"} {
-					log.Println("用户", _id, "已到期开始删除", pushColl, "表数据。。。")
 					_, err := delSess.DB("qfw").C(pushColl).RemoveAll(map[string]interface{}{"userid": _id})
 					if err != nil {
 						log.Println("用户", _id, "已到期删除", pushColl, "表数据出错", err)
 					} else {
-						log.Println("用户", _id, "已到期删除", pushColl, "表数据结束。。。")
+						log.Println("用户", _id, "已到期删除", pushColl, "表数据")
 					}
 				}
 				log.Println("用户", _id, i_vip_status, l_vip_endtime, "修改已到期状态")
-			} else if l_vip_endtime-now_unix <= threeday && i_vip_expire_tip != 1 && i_vip_expire_tip != -1 {
+			} else if l_vip_endtime-now_unix <= threeday && i_vip_expire_tip != 1 {
 				updateOk := util.MQFW.UpdateById("user", _id, map[string]interface{}{
 					"$set": map[string]interface{}{
 						"i_vip_expire_tip": 1,
@@ -128,8 +125,8 @@ func checkIsExpire() {
 
 //即将到期或者已到期发推送消息
 func expireRemind() {
-	crontab(false, TimetaskConfig.ExpireRemind, func() {
-		log.Println("定时任务,开始推送消息")
+	crontab(true, TimeTaskConfig.ExpireRemind, func() {
+		log.Println("定时任务,到期提醒,开始推送消息")
 		sess := util.MQFW.GetMgoConn()
 		defer util.MQFW.DestoryMongoConn(sess)
 		it := sess.DB("qfw").C("user").Find(map[string]interface{}{
@@ -142,7 +139,6 @@ func expireRemind() {
 			"s_jpushid":        1,
 			"s_opushid":        1,
 			"s_appponetype":    1,
-			"i_applystatus":    1,
 			"s_nickname":       1,
 			"i_ispush":         1,
 			"i_vip_status":     1,
@@ -152,19 +148,17 @@ func expireRemind() {
 		}).Iter()
 		for m := make(map[string]interface{}); it.Next(&m); {
 			_id := qutil.BsonIdToSId(m["_id"])
-			i_vip_expire_tip := qutil.Int64All(m["i_vip_expire_tip"])
+			i_vip_status := qutil.IntAll(m["i_vip_status"])
+			i_vip_expire_tip := qutil.IntAll(m["i_vip_expire_tip"])
 			wxPushOk, appPushOk := false, false
 			if i_vip_expire_tip == 1 || i_vip_expire_tip == 2 {
 				tp := "will"
-				tpMsg := "即将"
 				if i_vip_expire_tip == 2 {
 					tp = "exprie"
-					tpMsg = "已"
 				}
 				l_vip_starttime := qutil.Int64All(m["l_vip_starttime"])
 				l_vip_endtime := qutil.Int64All(m["l_vip_endtime"])
 				s_m_openid := qutil.ObjToString(m["s_m_openid"])
-				i_applystatus := qutil.IntAll(m["i_applystatus"])
 				isPushWx := qutil.IntAllDef(m["i_ispush"], 1)
 				s_jpushid := qutil.ObjToString(m["s_jpushid"])
 				s_opushid := qutil.ObjToString(m["s_opushid"])
@@ -178,45 +172,80 @@ func expireRemind() {
 				if order != nil && len(*order) > 0 {
 					orderId = fmt.Sprint((*order)["id"])
 				}
-				log.Println("推送消息", _id, "i_vip_status", m["i_vip_status"], "orderId", orderId, "l_vip_starttime", l_vip_starttime, "l_vip_endtime", l_vip_endtime, "i_vip_expire_tip", i_vip_expire_tip, "s_m_openid", s_m_openid, "isPushWx", isPushWx, "i_applystatus", i_applystatus, "s_appponetype", s_appponetype, "s_jpushid", s_jpushid, "s_opushid", s_opushid)
-				if isPushWx == 1 && i_applystatus == 1 && s_m_openid != "" {
+				log.Println("到期提醒,推送消息", _id, "i_vip_status", i_vip_status, "orderId", orderId, "l_vip_starttime", l_vip_starttime, "l_vip_endtime", l_vip_endtime, "i_vip_expire_tip", i_vip_expire_tip, "s_m_openid", s_m_openid, "isPushWx", isPushWx, "s_appponetype", s_appponetype, "s_jpushid", s_jpushid, "s_opushid", s_opushid)
+				if isPushWx == 1 && s_m_openid != "" {
+					tplId, first_value, keyword1_value, keyword2_value, keyword3_value, keyword4_value, remark := "", "", "", "", "", "", ""
+					switch i_vip_status {
+					case 1, -1:
+						if i_vip_expire_tip == 1 {
+							tplId = MessageConfig.WxTpl_OnTrial_SoonExpire.Id
+							first_value = MessageConfig.WxTpl_OnTrial_SoonExpire.First.Value
+							remark = MessageConfig.WxTpl_OnTrial_SoonExpire.Remark.Value
+						} else if i_vip_expire_tip == 2 {
+							tplId = MessageConfig.WxTpl_OnTrial_Expired.Id
+							first_value = MessageConfig.WxTpl_OnTrial_Expired.First.Value
+							remark = MessageConfig.WxTpl_OnTrial_Expired.Remark.Value
+						}
+						keyword1_value = qutil.ObjToString(m["s_nickname"])
+						keyword2_value = qutil.FormatDateByInt64(&l_vip_endtime, qutil.Date_Short_Layout)
+						break
+					case 2, -2:
+						if i_vip_expire_tip == 1 {
+							tplId = MessageConfig.WxTpl_SoonExpire.Id
+							first_value = MessageConfig.WxTpl_SoonExpire.First.Value
+							keyword2_value = MessageConfig.WxTpl_SoonExpire.Keyword2.Value
+							keyword3_value = MessageConfig.WxTpl_SoonExpire.Keyword3.Value
+							remark = MessageConfig.WxTpl_SoonExpire.Remark.Value
+						} else if i_vip_expire_tip == 2 {
+							tplId = MessageConfig.WxTpl_Expired.Id
+							first_value = MessageConfig.WxTpl_Expired.First.Value
+							keyword2_value = MessageConfig.WxTpl_Expired.Keyword2.Value
+							keyword3_value = MessageConfig.WxTpl_Expired.Keyword3.Value
+							remark = MessageConfig.WxTpl_Expired.Remark.Value
+						}
+						keyword1_value = qutil.ObjToString(m["s_nickname"])
+						keyword4_value = qutil.FormatDateByInt64(&l_vip_endtime, qutil.Date_Short_Layout)
+						break
+					}
 					tmplData := map[string]*qrpc.TmplItem{
 						"first": &qrpc.TmplItem{
-							Value: fmt.Sprintf(MessageConfig.WxTplExpire.First.Value, tpMsg),
-							Color: MessageConfig.WxTplExpire.First.Color,
+							Value: first_value,
 						},
 						"keyword1": &qrpc.TmplItem{
-							Value: qutil.ObjToString(m["s_nickname"]),
+							Value: keyword1_value,
 						},
 						"keyword2": &qrpc.TmplItem{
-							Value: MessageConfig.WxTplExpire.Keyword2.Value,
+							Value: keyword2_value,
 						},
 						"keyword3": &qrpc.TmplItem{
-							Value: MessageConfig.WxTplExpire.Keyword3.Value,
+							Value: keyword3_value,
 						},
 						"keyword4": &qrpc.TmplItem{
-							Value: qutil.FormatDateByInt64(&l_vip_endtime, qutil.Date_Short_Layout),
+							Value: keyword4_value,
+						},
+						"remark": &qrpc.TmplItem{
+							Value: remark,
 						},
 					}
 					wxPushOk, _ = qrpc.WxSendTmplMsg(Config.Weixinrpc, &qrpc.WxTmplMsg{
 						OpenId:   s_m_openid,
-						TplId:    MessageConfig.WxTplExpire.Id,
+						TplId:    tplId,
 						TmplData: tmplData,
-						Url:      Config.WebDomain + "/front/sess/" + Se.EncodeString(s_m_openid+",uid,"+strconv.Itoa(int(time.Now().Unix()))+",expireTip") + "__" + tp + "__" + fmt.Sprint(orderId) + "__" + fmt.Sprint(l_vip_starttime) + "__" + fmt.Sprint(l_vip_endtime),
+						Url:      Config.WebDomain + "/front/sess/" + util.Se_Topnet.EncodeString(s_m_openid+",uid,"+strconv.Itoa(int(time.Now().Unix()))+",msgremind") + "__" + fmt.Sprint("type=%s&orderid=%d", tp, orderId),
 					})
-					log.Println("微信推送", _id, wxPushOk)
+					log.Println("到期提醒,微信推送", _id, wxPushOk)
 				}
 			}
 			if wxPushOk || appPushOk {
 				util.MQFW.UpdateById("user", _id, map[string]interface{}{
 					"$set": map[string]interface{}{
-						"i_vip_expire_tip": -i_vip_expire_tip,
+						"i_vip_expire_tip": 0,
 					},
 				})
 			}
 			m = make(map[string]interface{})
 		}
-		log.Println("定时任务,推送消息结束")
+		log.Println("定时任务,到期提醒,推送消息结束")
 	})
 }
 

+ 228 - 0
src/jfw/modules/subscribepay/src/util/msgremind.go

@@ -0,0 +1,228 @@
+//未支付订单提醒
+package util
+
+import (
+	. "config"
+	"fmt"
+	"log"
+	"math"
+	"qfw/util"
+	qrpc "qfw/util/rpc"
+	"strconv"
+	"strings"
+	"sync"
+	"time"
+)
+
+var MsgRemind = &msgRemind{
+	unpaidOrders: &sync.Map{},
+}
+
+type msgRemind struct {
+	unpaidOrders *sync.Map
+}
+
+type unpaidOrder struct {
+	orderId      int    //订单id
+	orderCode    string //订单编号
+	userId       string //用户id
+	createTime   int64  //下单时间
+	remindStatus int    //1-下单时间2小时提醒 2-剩余2小时自动关闭时再次提醒
+	vipType      int    //-1:直接购买 0:试用 1:续费 2:升级
+	orderMoney   int    //订单金额
+}
+
+/*新的订单存库以后,再存入内存中
+ *@param orderId 订单id
+ *@param orderMoney 订单金额
+ *@param vipType -1:直接购买 0:试用 1:续费 2:升级
+ *@param remindStatus 1-下单时间2小时提醒 2-剩余2小时自动关闭时再次提醒
+ *@param orderCode 订单编号
+ *@param userId 用户id
+ *@param createTime 购买时间
+ */
+func (m *msgRemind) Add(orderId, orderMoney, vipType, remindStatus int, orderCode, userId string, createTime int64) {
+	log.Println("未支付待提醒订单加入", orderId, orderCode, userId, createTime)
+	m.unpaidOrders.Store(orderId, &unpaidOrder{
+		orderCode:    orderCode,
+		userId:       userId,
+		createTime:   createTime,
+		orderId:      orderId,
+		orderMoney:   orderMoney,
+		vipType:      vipType,
+		remindStatus: remindStatus,
+	})
+}
+
+/*
+ *订单支付成功以后,消息通知处理
+ *@param orderId 订单id
+ *@param orderCode 订单编号
+ *@param userId 用户id
+ *@param createTime 购买时间
+ *@param vipType -1:直接购买 0:试用 1:续费 2:升级
+ */
+func (m *msgRemind) PaySuccess(orderId int, orderCode, userId, createTime string, vipType int) {
+	go func() {
+		defer util.Catch()
+		log.Println("支付成功以后,消息提醒处理", orderId, orderCode, userId, createTime)
+		m.unpaidOrders.Delete(orderId)
+		user, ok := MQFW.FindById("user", userId, `{"s_m_openid":1,"s_jpushid":1,"s_opushid":1,"s_appponetype":1,"i_ispush":1,"l_vip_endtime":1}`)
+		if !ok || user == nil || len(*user) == 0 {
+			return
+		}
+		isPushWx := util.IntAllDef((*user)["i_ispush"], 1)
+		s_m_openid, _ := (*user)["s_m_openid"].(string)
+		s_jpushid, _ := (*user)["s_jpushid"].(string)
+		s_opushid, _ := (*user)["s_opushid"].(string)
+		s_appponetype, _ := (*user)["s_appponetype"].(string)
+		log.Println("支付成功,推送消息", userId, "s_m_openid", s_m_openid, "s_jpushid", s_jpushid, "s_opushid", s_opushid, "s_appponetype", s_appponetype)
+		if isPushWx == 1 {
+			l_vip_endtime := (*user)["l_vip_endtime"]
+			expireTime := util.FormatDateWithObj(&l_vip_endtime, util.Date_Short_Layout)
+			wxPushOk, _ := qrpc.WxSendTmplMsg(Config.Weixinrpc, &qrpc.WxTmplMsg{
+				OpenId: s_m_openid,
+				TplId:  MessageConfig.WxTpl_PaySuccess.Id,
+				TmplData: map[string]*qrpc.TmplItem{
+					"first": &qrpc.TmplItem{
+						Value: fmt.Sprintf(MessageConfig.WxTpl_PaySuccess.First.Value, orderCode),
+					},
+					"keyword1": &qrpc.TmplItem{
+						Value: fmt.Sprintf(MessageConfig.WxTpl_PaySuccess.Keyword1.Value, m.getVipType(vipType)),
+					},
+					"keyword2": &qrpc.TmplItem{
+						Value: orderCode,
+					},
+					"keyword3": &qrpc.TmplItem{
+						Value: strings.Split(createTime, " ")[0],
+					},
+					"keyword4": &qrpc.TmplItem{
+						Value: expireTime,
+					},
+				},
+				Url: Config.WebDomain + "/front/sess/" + Se_Topnet.EncodeString(s_m_openid+",uid,"+strconv.Itoa(int(time.Now().Unix()))+",msgremind") + "__" + fmt.Sprintf("type=paid&orderid=%d", orderId),
+			})
+			log.Println("支付成功,微信推送", userId, wxPushOk)
+		}
+	}()
+}
+
+func (m *msgRemind) getVipType(vipType int) string {
+	switch vipType {
+	case 0:
+		return "(试用)"
+	case 1:
+		return "(续费)"
+	case 2:
+		return "(升级)"
+	}
+	return ""
+}
+
+func (m *msgRemind) run() {
+	duration := time.Duration(TimeTaskConfig.UnpaidRemind.Duration) * time.Minute
+	log.Println("未支付订单定时任务run after", duration)
+	time.AfterFunc(duration, func() {
+		defer util.Catch()
+		m.unpaidOrders.Range(func(k interface{}, v interface{}) bool {
+			orderId, _ := k.(int)
+			unpaidOrder, _ := v.(*unpaidOrder)
+			now_unix := time.Now().Unix()
+			remind_status := 0
+			//剩余2小时
+			if unpaidOrder.remindStatus != 2 && now_unix >= unpaidOrder.createTime+259200-TimeTaskConfig.UnpaidRemind.BeforeExpire {
+				remind_status = 2
+			} else if unpaidOrder.remindStatus == 0 && now_unix > unpaidOrder.createTime+TimeTaskConfig.UnpaidRemind.AfterOrder { //下单时间后2小时未支付
+				remind_status = 1
+			}
+			if remind_status == 0 {
+				return true
+			}
+			user, ok := MQFW.FindById("user", unpaidOrder.userId, `{"s_m_openid":1,"s_jpushid":1,"s_opushid":1,"s_appponetype":1,"i_ispush":1}`)
+			if !ok || user == nil || len(*user) == 0 {
+				return true
+			}
+			isPushWx := util.IntAllDef((*user)["i_ispush"], 1)
+			s_m_openid, _ := (*user)["s_m_openid"].(string)
+			s_jpushid, _ := (*user)["s_jpushid"].(string)
+			s_opushid, _ := (*user)["s_opushid"].(string)
+			s_appponetype, _ := (*user)["s_appponetype"].(string)
+			log.Println("未支付订单,推送消息", unpaidOrder.userId, "remind_status", remind_status, "i_ispush", isPushWx, "s_m_openid", s_m_openid, "s_jpushid", s_jpushid, "s_opushid", s_opushid, "s_appponetype", s_appponetype)
+			wxPushOk, appPushOk := false, false
+			if isPushWx == 1 {
+				tmplData := map[string]*qrpc.TmplItem{
+					"first": &qrpc.TmplItem{
+						Value: fmt.Sprintf(MessageConfig.WxTpl_Unpaid.First.Value, unpaidOrder.orderCode),
+					},
+					"keyword1": &qrpc.TmplItem{
+						Value: util.FormatDateByInt64(&unpaidOrder.createTime, util.Date_Short_Layout),
+					},
+					"keyword2": &qrpc.TmplItem{
+						Value: unpaidOrder.orderCode,
+					},
+					"keyword3": &qrpc.TmplItem{
+						Value: fmt.Sprintf(MessageConfig.WxTpl_Unpaid.Keyword3.Value, fmt.Sprintf("%.2f", float64(unpaidOrder.orderMoney)/100)),
+					},
+					"keyword4": &qrpc.TmplItem{
+						Value: fmt.Sprintf(MessageConfig.WxTpl_Unpaid.Keyword4.Value, m.getVipType(unpaidOrder.vipType)),
+					},
+				}
+				if remind_status == 2 {
+					tmplData["remark"] = &qrpc.TmplItem{
+						Value: fmt.Sprintf(MessageConfig.WxTpl_Unpaid.Remark.Value, math.Ceil(float64(TimeTaskConfig.UnpaidRemind.BeforeExpire)/3600)),
+					}
+				}
+				wxPushOk, _ = qrpc.WxSendTmplMsg(Config.Weixinrpc, &qrpc.WxTmplMsg{
+					OpenId:   s_m_openid,
+					TplId:    MessageConfig.WxTpl_Unpaid.Id,
+					TmplData: tmplData,
+					Url:      Config.WebDomain + "/front/sess/" + Se_Topnet.EncodeString(s_m_openid+",uid,"+strconv.Itoa(int(time.Now().Unix()))+",msgremind") + "__" + fmt.Sprintf("type=unpaid&orderid=%d", orderId),
+				})
+				log.Println("未支付订单,微信推送", unpaidOrder.userId, wxPushOk)
+			}
+			if wxPushOk || appPushOk {
+				if remind_status == 2 {
+					m.unpaidOrders.Delete(orderId)
+				} else {
+					unpaidOrder.remindStatus = 1
+					m.unpaidOrders.Store(orderId, unpaidOrder)
+				}
+				Mysql.Update("dataexport_order", map[string]interface{}{
+					"id": orderId,
+				}, map[string]interface{}{
+					"remind_status": remind_status,
+				})
+			}
+			return true
+		})
+		m.run()
+	})
+}
+
+func init() {
+	go func() {
+		log.Println("开始加载72小时内的订单到内存中。。。")
+		startTime := time.Now().Local().AddDate(0, 0, -3).Format(util.Date_Full_Layout)
+		list := Mysql.SelectBySql("select id,order_code,order_money,user_id,create_time,remind_status,vip_type from dataexport_order where create_time>=? and product_type='VIP订阅' and order_status=0 and (remind_status<>2 or remind_status is null)", startTime)
+		if list == nil {
+			log.Println("加载72小时内的订单到内存中失败")
+			return
+		}
+		for _, v := range *list {
+			order_code, _ := v["order_code"].(string)
+			user_id, _ := v["user_id"].(string)
+			create_time, _ := v["create_time"].(string)
+			if order_code == "" || user_id == "" || create_time == "" {
+				continue
+			}
+			createTime, err := time.ParseInLocation(util.Date_Full_Layout, create_time, time.Local)
+			if err != nil {
+				continue
+			}
+			orderId := util.IntAll(v["id"])
+			MsgRemind.Add(orderId, util.IntAll(v["order_money"]), util.IntAllDef(v["vip_type"], -1), util.IntAll(v["remind_status"]), order_code, user_id, createTime.Unix())
+		}
+		log.Println("加载72小时内的订单到内存中结束。。。", len(*list))
+	}()
+	MsgRemind.run()
+}

+ 3 - 1
src/jfw/modules/subscribepay/src/util/public.go

@@ -1,10 +1,13 @@
 package util
 
 import (
+	qutil "qfw/util"
 	"qfw/util/sms"
 	"strings"
 )
 
+var Se_Topnet = qutil.SimpleEncrypt{Key: "topnet"}
+
 //根据模板发送短信,模板是运营商设定的。
 //第三个参数是可变参数,可以传入多个,但要和模板相匹配
 func SendSMS(tplcode /*模板代码*/, mobile /*手机号码*/ string, param map[string]string) {
@@ -15,4 +18,3 @@ func SendSMS(tplcode /*模板代码*/, mobile /*手机号码*/ string, param map
 	text := strings.Join(tmp, "&")
 	sms.SendSms(mobile, tplcode, text)
 }
-

+ 2 - 2
src/jfw/modules/weixin/src/jrpc/jrpc.go

@@ -40,7 +40,7 @@ func (w *WeiXinRpc) SubscribePush(param *qrpc.NotifyMsg, ret *qrpc.RpcResult) er
 			"first":    weixin.TmplItem{param.Title, util.If(param.Color != "", param.Color, "#0987FF").(string)},
 			"keyword1": weixin.TmplItem{param.Detail, ""},
 			"keyword2": weixin.TmplItem{param.Service, ""},
-			"remark":   weixin.TmplItem{param.Remark, util.If(param.Color != "", param.DetailColor, "#0987FF").(string)},
+			"remark":   weixin.TmplItem{param.Remark, util.If(param.DetailColor != "", param.DetailColor, "#0987FF").(string)},
 		})
 	if err != nil {
 		*ret = qrpc.RpcResult(err.Error())
@@ -58,7 +58,7 @@ func (w *WeiXinRpc) SendPushMsg(param *qrpc.NotifyMsg, ret *qrpc.RpcResult) erro
 			"first":    weixin.TmplItem{param.Title, util.If(param.Color != "", param.Color, "#0987FF").(string)},
 			"keyword1": weixin.TmplItem{param.Detail, ""},
 			"keyword2": weixin.TmplItem{param.Service, ""},
-			"remark":   weixin.TmplItem{param.Remark, util.If(param.Color != "", param.DetailColor, "#0987FF").(string)},
+			"remark":   weixin.TmplItem{param.Remark, util.If(param.DetailColor != "", param.DetailColor, "#0987FF").(string)},
 		})
 	if err != nil {
 		*ret = qrpc.RpcResult(err.Error())

+ 407 - 0
src/web/staticres/css/subscribe.css

@@ -0,0 +1,407 @@
+/* banner图板块 */
+.tender-1{
+    width: 100%;
+    height: 475px;
+}
+.tender-1 .imgauto{
+    width: 100%;
+    height: 100%;
+    /* margin: 0 auto; */
+}
+.tender-1 .imgauto img{
+    width: 100%;
+    z-index: 1;
+}
+
+/* 订阅模式选择板块 */
+
+.subscription{
+    width: 100%;
+    height: 268px;
+    margin-top: 30px;
+}
+.subscription .sub-center{
+    width: 840px;
+    height: 268px;
+    margin: 0 auto;
+    display: flex;
+}
+.subscription .sub-center .sub-free{
+    width: 354px;
+    height: 214px;
+    padding: 27px;
+    background: url('/images/subscribe/free.png') no-repeat;
+}
+.subscription .sub-center .sub-free .free-title{
+    width: 100%;
+    height: 26px;
+    margin-top: 28px;
+    text-align: center;
+    font-size:20px;
+    font-family:Microsoft YaHei;
+    font-weight:400;
+    line-height:26px;
+    color:rgba(255,255,255,1);
+    opacity:1;
+}
+.subscription .sub-center .sub-free .free-btn{
+    width:180px;
+    height:46px;
+    background:rgba(44,183,202,1);
+    opacity:1;
+    border-radius:6px;
+    margin: 76px auto;
+    display: block;
+    text-align: center;
+    font-size:18px;
+    font-family:Microsoft YaHei;
+    font-weight:400;
+    line-height:46px;
+    color:rgba(255,255,255,1);
+    opacity:1;
+}
+.subscription .sub-center .sub-vip{
+    width: 354px;
+    height: 214px;
+    padding: 27px;
+    background: url('/images/subscribe/vip.png') no-repeat;
+}
+
+.subscription .sub-center .sub-vip .vip-logo{
+    width: 100%;
+    height: 38px;
+    margin-top: 22px;
+    display: flex;
+    justify-content: center;
+    align-items: center;
+}
+.subscription .sub-center .sub-vip .vip-logo img{
+    width: 38px;
+    height: 38px;
+    margin-right: 10px;
+}
+.subscription .sub-center .sub-vip .vip-logo .vip-title{
+    font-size:20px;
+    font-family:Microsoft YaHei;
+    font-weight:400;
+    line-height:26px;
+    color:rgba(255,218,177,1);
+    opacity:1;
+}
+.subscription .sub-center .sub-vip .vip-btn{
+    width:180px;
+    height:46px;
+    background:rgba(52,53,90,1);
+    margin: 69px auto;
+    opacity:1;
+    border-radius:6px;
+    display: block;
+    text-align: center;
+    font-size:18px;
+    font-family:Microsoft YaHei;
+    font-weight:400;
+    line-height:46px;
+    color:rgba(255,218,177,1);
+}
+/* 订阅模式对比板块 */
+.sub-contrast{
+    width: 100%;
+    height: 666px;
+    margin-top: 79px;
+}
+.sub-contrast .contrast-header{
+    width: 100%;
+    height: 31px;
+}
+.sub-contrast .contrast-header .header-title{
+    width: 331px;
+    height: 31px;
+    line-height: 31px;
+    margin: 0 auto;
+    background: url('/images/subscribe/line.png') no-repeat;
+    font-size:24px;
+    font-family:Microsoft YaHei;
+    font-weight:400;
+    color:rgba(29,29,29,1);
+    opacity:1;
+    text-align: center;
+    background-position: center;
+}
+.sub-contrast .contrast-main{
+    width: 100%;
+    height: 422px;
+    margin-top: 85px;
+}
+.sub-contrast .contrast-main .contrast-main-center{
+    width: 960px;
+    height: 422px;
+    margin: 0 auto;
+    display: flex;
+    border: 1px solid rgba(224,224,224,1);
+}
+/* 功能/价格 */
+/* li+li表示选中除第一个li其他所有的li */
+.sub-contrast .contrast-main .contrast-main-center .center-left{
+    width: 201px;
+    height: 422px;
+}
+.sub-contrast .contrast-main .contrast-main-center .center-left>ul{
+    width: 201px;
+    height: 422px;
+    margin: 0;
+}
+.sub-contrast .contrast-main .contrast-main-center .center-left>ul li+li{
+    width: 200px;
+    height: 58px;
+    text-align: center;
+    line-height: 60px;
+    font-size:16px;
+    font-family:Microsoft YaHei;
+    font-weight:400;
+    color:rgba(29,29,29,1);
+    opacity:1;
+    border-bottom: 1px solid rgba(224,224,224,1);
+    border-right: 1px solid rgba(224,224,224,1);
+}
+/* 免费版 */
+.sub-contrast .contrast-main .contrast-main-center .center-center{
+    width: 259px;
+    height: 422px;
+    transition:all 0.5s;
+}
+.sub-contrast .contrast-main .contrast-main-center .center-center>ul{
+    width: 259px;
+    transition:all 0.5s;
+    height: 422px;
+    margin: 0;
+}
+
+.sub-contrast .contrast-main .contrast-main-center .center-center>ul li+li{
+    transition:all 0.5s;
+    width: 258px;
+    height: 58px;
+    text-align: center;
+    line-height: 60px;
+    font-size:16px;
+    font-family:Microsoft YaHei;
+    font-weight:400;
+    color:rgba(29,29,29,1);
+    opacity:1;
+    border-bottom: 1px solid rgba(224,224,224,1);
+    border-right: 1px solid rgba(224,224,224,1);
+}
+.sub-contrast .contrast-main .contrast-main-center .center-center>ul li:nth-child(7){
+    background-color: rgba(246, 246, 246, 1);
+    border-right: 1px solid rgba(224,224,224,1) ;
+    display: flex;
+    transition:all 0.5s;
+    justify-content: center;
+    align-items: center;
+}
+.sub-contrast .contrast-main .contrast-main-center .center-center ul li:nth-child(7) .btn-free{
+    display: block;
+    cursor: pointer;
+    transition:all 0.5s;
+    width:90px;
+    height:30px;
+    background:rgba(246,246,246,1);
+    opacity:1;
+    border-radius:4px;
+    font-size:16px;
+    font-family:Microsoft YaHei;
+    font-weight:400;
+    line-height:26px;
+    color:rgba(104,104,104,1);
+}
+/* 免费版滑过特效 */
+.sub-contrast .contrast-main .contrast-main-center .center-center:hover ul{
+    height: 463px;
+    /* transform: scaleY(1.1); */
+    transition: 0.5s;
+    box-shadow: 0px 0px 20px rgba(0,0,0,0.2);
+    margin-top: -22px;
+}
+.sub-contrast .contrast-main .contrast-main-center .center-center:hover ul .modify-center{
+    height: 90px;
+    line-height: 90px;
+    transition: 0.5s;
+}
+.sub-contrast .contrast-main .contrast-main-center .center-center:hover ul li:nth-child(7){
+    height: 80px;
+    width: 258px;
+    transition: 0.5s;
+    line-height: 80px;
+    display: flex;
+    justify-content: center;
+    align-items: center;
+}
+.sub-contrast .contrast-main .contrast-main-center .center-center:hover ul li:nth-child(7) .btn-free{
+    transition: 0.5s;
+    background:rgba(44,183,202,1);
+    color: white;
+}
+/* VIP订阅专属服务 */
+.sub-contrast .contrast-main .contrast-main-center .center-right{
+    width: 500px;
+    height: 422px;
+    transition:all 0.5s;
+}
+.sub-contrast .contrast-main .contrast-main-center .center-right>ul{
+    width: 500px;
+    height: 422px;
+    margin: 0;
+    transition:all 0.5s;
+}
+.sub-contrast .contrast-main .contrast-main-center .center-right>ul li+li{
+    width: 500px;
+    height: 58px;
+    text-align: center;
+    transition:all 0.5s;
+    line-height: 60px;
+    font-size:16px;
+    font-family:Microsoft YaHei;
+    font-weight:400;
+    color:rgba(29,29,29,1);
+    opacity:1;
+    border-bottom: 1px solid rgba(224,224,224,1);
+}
+.sub-contrast .contrast-main .contrast-main-center .center-right>ul li:nth-child(7){
+    background-color: #FBF2EA;
+    display: flex;
+    justify-content: center;
+    align-items: center;
+    transition:all 0.5s;
+}
+.sub-contrast .contrast-main .contrast-main-center .center-right>ul li:nth-child(7) .On-trial{
+    width:90px;
+    height:30px;
+    border:1px solid rgba(207,173,137,1);
+    transition:all 0.5s;
+    opacity:1;
+    border-radius:4px;
+    display: block;
+    text-align: center;
+    line-height: 30px;
+    font-size:14px;
+    font-family:MicrosoftYaHei;
+    color:rgba(207,173,137,1);
+    margin-left: 16px;
+}
+/* VIP订阅滑过特效 */
+.sub-contrast .contrast-main .contrast-main-center .center-right:hover ul{
+    height: 463px;
+    margin-top: -22px;
+    box-shadow: 0px 0px 20px rgba(0,0,0,0.2);
+    transition:all 0.5s;
+}
+.sub-contrast .contrast-main .contrast-main-center .center-right:hover ul .modify-right{
+    height: 90px;
+    line-height: 90px;
+    transition:all 0.5s;
+}
+.sub-contrast .contrast-main .contrast-main-center .center-right:hover ul li:nth-child(7){
+    height:80px;
+    line-height: 80px;
+    transition:all 0.5s;
+}
+.sub-contrast .contrast-main .contrast-main-center .center-right:hover ul li:nth-child(7) .On-trial{
+    background:#34355A;
+    font-size:14px;
+    font-family:MicrosoftYaHei;
+    line-height:30px;
+    color:rgba(255,218,177,1);
+    transition:all 0.5s;
+    opacity:1;
+    text-decoration: none;
+}
+.sub-contrast .contrast-main .contrast-main-center ul .top-title{
+    height: 68px;
+    text-align: center;
+    transition:all 0.5s;
+    line-height: 68px;
+    font-size:20px;
+    font-family:Microsoft YaHei;
+    font-weight:400;
+    color:rgba(29,29,29,1);
+    opacity:1;
+    border-bottom: 1px solid rgba(224,224,224,1);
+    border-right: 1px solid rgba(224,224,224,1);
+}
+/* 选中免费版 */
+.sub-contrast .contrast-main .contrast-main-center ul .modify-center{
+    background: rgba(238, 238, 238, 1);
+}
+/* 选中VIP订阅专属服务 */
+.sub-contrast .contrast-main .contrast-main-center ul .modify-right{
+    background:rgba(52,53,90,1);
+    color:rgba(255,218,177,1);
+    position: relative;
+    border-right: 0;
+}
+.sub-contrast .contrast-main .contrast-main-center ul .modify-right img{
+    background:rgba(52,53,90,1);
+    color:rgba(255,218,177,1);
+    position: absolute;
+    right: 0;
+    bottom: 0;
+    width: 174px;
+}
+/* 选中关键词设置颜色 */
+.sub-contrast .contrast-main .contrast-main-center ul li>span{
+    color: #CFAD89;
+}
+
+/* VIP弹窗 */
+
+.hide{
+    display:none;
+}
+.modal{
+    position:fixed;
+    left:50%;
+    top:50%;
+    width:335px;
+    height:395px;
+    margin-left:-200px;
+    margin-top:-250px;
+    z-index:10;
+    background-color:white;
+}
+.modal .modal-dialog{
+    width: 335px;
+    height: 395px;
+    position: relative;
+}
+.modal .modal-dialog img{
+    margin-top: -48px;
+}
+.modal .modal-dialog .vip-code{
+    position: absolute;
+    width: 170px;
+    height: 197px;
+    left: 30%;
+    bottom: 0%;
+}
+.modal .modal-dialog .vip-code .vip-text{
+    width:170px;
+    height:21px;
+    font-size:16px;
+    font-family:MicrosoftYaHei;
+    line-height:24px;
+    color:rgba(59,33,5,1);
+    opacity:1;
+    margin: 20px 0 0 -15px;
+}
+.shade{
+    position:fixed;
+    left:0;
+    right:0;
+    top:0;
+    bottom:0;
+    opacity:0.6;
+    background-color:black;
+    z-index:9;
+}
+.vip-text{
+    text-align:center;
+}

BIN
src/web/staticres/images/subscribe/QR_code.png


BIN
src/web/staticres/images/subscribe/banner.png


BIN
src/web/staticres/images/subscribe/free.png


BIN
src/web/staticres/images/subscribe/line.png


BIN
src/web/staticres/images/subscribe/mengban.png


BIN
src/web/staticres/images/subscribe/vip-logo.png


BIN
src/web/staticres/images/subscribe/vip.png


BIN
src/web/staticres/images/subscribe/vip_tanchuang.png


+ 360 - 348
src/web/staticres/vipsubscribe/css/choose_area_new.css

@@ -1,608 +1,620 @@
 @charset "UTF-8";
 .main {
-  width: 100%;
-  overflow: scroll;
+    width: 100%;
+    overflow: scroll;
 }
 
 .main::-webkit-scrollbar {
-  display: none;
+    display: none;
 }
 
 .layout_top-bottom {
-  display: flex;
-  flex-direction: column;
-  justify-content: space-between;
-  height: 100%;
+    display: flex;
+    flex-direction: column;
+    justify-content: space-between;
+    height: 100%;
 }
 
 .layout_top-bottom .layou_top {
-  flex: 1;
-  overflow: scroll;
+    flex: 1;
+    overflow: scroll;
 }
 
 .bottom_button {
-  display: flex;
-  justify-content: space-between;
-  align-items: center;
-  width: 100%;
-  height: .94rem;
+    display: flex;
+    justify-content: space-between;
+    align-items: center;
+    width: 100%;
+    height: .94rem;
 }
 
 .bottom_button .left_btn,
 .bottom_button .right_btn {
-  flex: 1;
-  height: 100%;
-  font-size: .34rem;
+    flex: 1;
+    height: 100%;
+    font-size: .34rem;
 }
 
 .bottom_button .left_btn {
-  color: #2cb7ca;
-  background-color: #fff;
-  border-top: 1px solid #e0e0e0;
+    color: #2cb7ca;
+    background-color: #fff;
+    border-top: 1px solid #e0e0e0;
 }
 
 .bottom_button .right_btn {
-  color: #fff;
-  background-color: #2cb7ca;
-  border-top: 1px solid #2cb7ca;
+    color: #fff;
+    background-color: #2cb7ca;
+    border-top: 1px solid #2cb7ca;
 }
 
 .bottom_button button[disabled] {
-  opacity: .5;
+    opacity: .5;
 }
 
 .public_btn {
-  width: 100%;
-  height: .94rem;
-  line-height: .94rem;
-  text-align: center;
-  background: #2CB7CA;
-  color: #fff;
-  border-radius: 0.06rem;
-  font-size: .34rem;
+    width: 100%;
+    height: .94rem;
+    line-height: .94rem;
+    text-align: center;
+    background: #2CB7CA;
+    color: #fff;
+    border-radius: 0.06rem;
+    font-size: .34rem;
 }
 
 .tips_btn {
-  display: flex;
-  position: relative;
-  flex-direction: column;
-  align-items: center;
-  justify-content: space-between;
+    display: flex;
+    position: relative;
+    flex-direction: column;
+    align-items: center;
+    justify-content: space-between;
 }
 
 .tips_btn .tips_discount {
-  width: 100%;
+    width: 100%;
 }
 
 .tips_btn .tips_discount .tips_d_money {
-  display: none;
-  position: absolute;
-  left: 50%;
-  top: -.2rem;
-  padding: 0 .4rem;
-  height: .64rem;
-  line-height: .64rem;
-  color: #2CB7CA;
-  font-size: .32rem;
-  background-color: #fff;
-  border-radius: .32rem;
-  transform: translate(-50%, -100%);
-  box-shadow: 0px 3px 6px rgba(0, 0, 0, 0.16);
+    display: none;
+    position: absolute;
+    left: 50%;
+    top: -.2rem;
+    padding: 0 .4rem;
+    height: .64rem;
+    line-height: .64rem;
+    color: #2CB7CA;
+    font-size: .32rem;
+    background-color: #fff;
+    border-radius: .32rem;
+    transform: translate(-50%, -100%);
+    box-shadow: 0px 3px 6px rgba(0, 0, 0, 0.16);
 }
 
 .tips_btn .tips_discount .tips_d_text {
-  display: none;
-  height: .72rem;
-  line-height: .72rem;
-  color: #fff;
-  font-size: .28rem;
-  text-align: center;
-  background-color: #FFB901;
+    display: none;
+    height: .72rem;
+    line-height: .72rem;
+    color: #fff;
+    font-size: .28rem;
+    text-align: center;
+    background-color: #FFB901;
 }
 
 .tips_btn .btns {
-  display: flex;
-  align-items: center;
-  justify-content: space-between;
-  width: 100%;
-  height: .94rem;
-  line-height: .94rem;
-  color: #fff;
-  font-size: .34rem;
+    display: flex;
+    align-items: center;
+    justify-content: space-between;
+    width: 100%;
+    height: .94rem;
+    line-height: .94rem;
+    color: #fff;
+    font-size: .34rem;
 }
 
 .tips_btn .btns .save-btn,
 .tips_btn .btns .reset-btn {
-  flex: 1;
-  width: 50%;
-  text-align: center;
-  height: 100%;
-  font-size: .34rem;
+    flex: 1;
+    width: 50%;
+    text-align: center;
+    height: 100%;
+    font-size: .34rem;
 }
 
 .tips_btn .btns .reset-btn {
-  background: #fff;
-  color: #2cb7ca;
-  border-top: 1px solid #e0e0e0;
+    background: #fff;
+    color: #2cb7ca;
+    border-top: 1px solid #e0e0e0;
 }
 
 .tips_btn .btns .save-btn {
-  background: #2cb7ca;
-  color: #fff;
-  border-top: 1px solid #2cb7ca;
+    background: #2cb7ca;
+    color: #fff;
+    border-top: 1px solid #2cb7ca;
 }
 
 .tips_btn .btns button[disabled] {
-  opacity: .5;
+    opacity: .5;
 }
 
 .jy_icon {
-  position: relative;
-  width: 100%;
-  height: 100%;
+    position: relative;
+    width: 100%;
+    height: 100%;
 }
 
 .jy_icon.decrease:before,
 .jy_icon.increase:before,
 .jy_icon.increase:after {
-  position: absolute;
-  left: 50%;
-  top: 50%;
-  content: '';
-  width: 0.4rem;
-  height: 0.04rem;
-  background-color: #686868;
-  transform: translate(-50%, -50%);
+    position: absolute;
+    left: 50%;
+    top: 50%;
+    content: '';
+    width: 0.4rem;
+    height: 0.04rem;
+    background-color: #686868;
+    transform: translate(-50%, -50%);
 }
 
 .jy_icon.increase:after {
-  transform: translate(-50%, -50%) rotate(90deg);
+    transform: translate(-50%, -50%) rotate(90deg);
 }
 
 /*禁止长按复制 加给body*/
 .no-touch {
-  -webkit-touch-callout: none;
-  -webkit-user-select: none;
-  -khtml-user-select: none;
-  -moz-user-select: none;
-  -ms-user-select: none;
-  user-select: none;
+    -webkit-touch-callout: none;
+    -webkit-user-select: none;
+    -khtml-user-select: none;
+    -moz-user-select: none;
+    -ms-user-select: none;
+    user-select: none;
 }
 
 /* 弹性盒子布局 */
 .flex_alginC {
-  display: flex;
-  align-items: center;
+    display: flex;
+    align-items: center;
 }
 
 .flex_alginC_justB {
-  display: flex;
-  align-items: center;
-  justify-content: space-between;
+    display: flex;
+    align-items: center;
+    justify-content: space-between;
 }
 
 .flex_alginC_justC {
-  display: flex;
-  align-items: center;
-  justify-content: center;
+    display: flex;
+    align-items: center;
+    justify-content: center;
 }
 
 .flex_column {
-  display: flex;
-  flex-direction: column;
+    display: flex;
+    flex-direction: column;
 }
 
 .flex_column_alignC {
-  display: flex;
-  flex-direction: column;
-  align-items: center;
+    display: flex;
+    flex-direction: column;
+    align-items: center;
 }
 
 /* 自定义弹窗*/
 @-webkit-keyframes c {
-  0% {
-    opacity: 0;
-  }
-  to {
-    opacity: 1;
-  }
+    0% {
+        opacity: 0;
+    }
+    to {
+        opacity: 1;
+    }
 }
 
 @keyframes c {
-  0% {
-    opacity: 0;
-  }
-  to {
-    opacity: 1;
-  }
+    0% {
+        opacity: 0;
+    }
+    to {
+        opacity: 1;
+    }
 }
 
 .custom-dialog .weui-animate-fade-in {
-  -webkit-animation: c ease 0s forwards;
-  animation: c ease 0s forwards;
+    -webkit-animation: c ease 0s forwards;
+    animation: c ease 0s forwards;
 }
 
 @-webkit-keyframes d {
-  0% {
-    opacity: 1;
-  }
-  to {
-    opacity: 0;
-  }
+    0% {
+        opacity: 1;
+    }
+    to {
+        opacity: 0;
+    }
 }
 
 @keyframes d {
-  0% {
-    opacity: 1;
-  }
-  to {
-    opacity: 0;
-  }
+    0% {
+        opacity: 1;
+    }
+    to {
+        opacity: 0;
+    }
 }
 
 .custom-dialog .weui-animate-fade-out {
-  -webkit-animation: d ease 0s forwards;
-  animation: d ease 0s forwards;
+    -webkit-animation: d ease 0s forwards;
+    animation: d ease 0s forwards;
 }
 
 .custom-dialog .weui-dialog__hd {
-  background: #F5F4F9;
-  padding: .17rem 0;
-  color: #000;
-  font-size: .34rem;
-  text-align: center;
+    background: #F5F4F9;
+    padding: .17rem 0;
+    color: #000;
+    font-size: .34rem;
+    text-align: center;
 }
 
 .custom-dialog .weui-dialog__bd {
-  padding: .37rem 0;
-  color: #1D1D1D;
-  font-size: .32rem;
-  text-align: center;
+    padding: .37rem 0;
+    color: #1D1D1D;
+    font-size: .32rem;
+    text-align: center;
 }
 
 .custom-dialog .weui-dialog__ft:after {
-  border: 0;
+    border: 0;
 }
 
 .custom-dialog .weui-dialog__btn:after {
-  border: 0;
+    border: 0;
 }
 
 .custom-dialog .weui-dialog__ft {
-  display: flex;
-  align-items: center;
-  justify-content: center;
-  padding-bottom: .38rem;
-  box-sizing: border-box;
-  text-align: center;
+    display: flex;
+    align-items: center;
+    justify-content: center;
+    padding-bottom: .38rem;
+    box-sizing: border-box;
+    text-align: center;
 }
 
 .custom-dialog .weui-dialog__btn {
-  display: block;
-  width: 1.72rem;
-  height: .72rem;
-  line-height: .72rem;
-  color: #fff;
-  padding: 0;
-  flex: none;
-  text-align: center;
-  border-radius: 3px;
+    display: block;
+    width: 1.72rem;
+    height: .72rem;
+    line-height: .72rem;
+    color: #fff;
+    padding: 0;
+    flex: none;
+    text-align: center;
+    border-radius: 3px;
 }
 
 .custom-dialog .weui-dialog__btn_primary {
-  background-color: #2CB7CA;
-  margin-right: 1rem;
+    background-color: #2CB7CA;
+    margin-right: 1rem;
 }
 
 .custom-dialog .weui-dialog__btn_default {
-  background-color: #BFBFC3;
+    background-color: #BFBFC3;
 }
 
 /* 自定义switch按钮 */
 .custom-switch {
-  position: relative;
-  width: 52px;
-  height: 32px;
-  border: 1px solid #dfdfdf;
-  outline: 0;
-  border-radius: 16px;
-  box-sizing: border-box;
-  background-color: #dfdfdf;
-  -webkit-transition: background-color .1s,border .1s;
-  transition: background-color .1s,border .1s;
-  -webkit-appearance: none;
+    position: relative;
+    width: 52px;
+    height: 32px;
+    border: 1px solid #dfdfdf;
+    outline: 0;
+    border-radius: 16px;
+    box-sizing: border-box;
+    background-color: #dfdfdf;
+    -webkit-transition: background-color .1s, border .1s;
+    transition: background-color .1s, border .1s;
+    -webkit-appearance: none;
 }
 
 .custom-switch:before {
-  content: " ";
-  position: absolute;
-  top: 0;
-  left: 0;
-  width: 50px;
-  height: 30px;
-  border-radius: 15px;
-  background-color: #fdfdfd;
-  -webkit-transition: -webkit-transform 0.35s cubic-bezier(0.45, 1, 0.4, 1);
-  transition: -webkit-transform 0.35s cubic-bezier(0.45, 1, 0.4, 1);
-  transition: transform 0.35s cubic-bezier(0.45, 1, 0.4, 1);
-  transition: transform 0.35s cubic-bezier(0.45, 1, 0.4, 1), -webkit-transform 0.35s cubic-bezier(0.45, 1, 0.4, 1);
+    content: " ";
+    position: absolute;
+    top: 0;
+    left: 0;
+    width: 50px;
+    height: 30px;
+    border-radius: 15px;
+    background-color: #fdfdfd;
+    -webkit-transition: -webkit-transform 0.35s cubic-bezier(0.45, 1, 0.4, 1);
+    transition: -webkit-transform 0.35s cubic-bezier(0.45, 1, 0.4, 1);
+    transition: transform 0.35s cubic-bezier(0.45, 1, 0.4, 1);
+    transition: transform 0.35s cubic-bezier(0.45, 1, 0.4, 1), -webkit-transform 0.35s cubic-bezier(0.45, 1, 0.4, 1);
 }
 
 .custom-switch:after {
-  content: " ";
-  position: absolute;
-  top: 0;
-  left: 0;
-  width: 30px;
-  height: 30px;
-  border-radius: 15px;
-  background-color: #fff;
-  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
-  -webkit-transition: -webkit-transform 0.35s cubic-bezier(0.4, 0.4, 0.25, 1.35);
-  transition: -webkit-transform 0.35s cubic-bezier(0.4, 0.4, 0.25, 1.35);
-  transition: transform 0.35s cubic-bezier(0.4, 0.4, 0.25, 1.35);
-  transition: transform 0.35s cubic-bezier(0.4, 0.4, 0.25, 1.35), -webkit-transform 0.35s cubic-bezier(0.4, 0.4, 0.25, 1.35);
+    content: " ";
+    position: absolute;
+    top: 0;
+    left: 0;
+    width: 30px;
+    height: 30px;
+    border-radius: 15px;
+    background-color: #fff;
+    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
+    -webkit-transition: -webkit-transform 0.35s cubic-bezier(0.4, 0.4, 0.25, 1.35);
+    transition: -webkit-transform 0.35s cubic-bezier(0.4, 0.4, 0.25, 1.35);
+    transition: transform 0.35s cubic-bezier(0.4, 0.4, 0.25, 1.35);
+    transition: transform 0.35s cubic-bezier(0.4, 0.4, 0.25, 1.35), -webkit-transform 0.35s cubic-bezier(0.4, 0.4, 0.25, 1.35);
 }
 
 .custom-switch.checked {
-  border-color: #04be02;
-  background-color: #04be02;
+    border-color: #04be02;
+    background-color: #04be02;
 }
 
 .custom-switch.checked:before {
-  transform: scale(0);
+    transform: scale(0);
 }
 
 .custom-switch.checked:after {
-  transform: translateX(20px);
+    transform: translateX(20px);
 }
 
 .custom-toast .weui-toast {
-  font-size: .3rem;
-  padding: 0.2rem;
-  width: auto;
-  max-width: 6rem;
-  min-height: 0;
-  height: auto;
-  top: 50%;
-  left: 50%;
-  margin-left: 0;
-  margin-top: -0.47rem;
-  transform: translateX(-50%) translateY(-50%);
+    font-size: .3rem;
+    padding: 0.2rem;
+    width: auto;
+    max-width: 6rem;
+    min-height: 0;
+    height: auto;
+    top: 50%;
+    left: 50%;
+    margin-left: 0;
+    margin-top: -0.47rem;
+    transform: translateX(-50%) translateY(-50%);
 }
 
 .custom-toast .weui-icon_toast {
-  display: none;
+    display: none;
 }
 
 .custom-toast .weui-toast__content {
-  margin: 0;
+    margin: 0;
 }
 
 .jymobile-tab-triangle {
-  position: relative;
+    position: relative;
 }
 
 .jymobile-tab-triangle:after {
-  content: '';
-  position: absolute;
-  top: 50%;
-  right: 0;
-  width: 0;
-  height: 0;
-  font-size: 0;
-  line-height: 0;
-  border-style: solid;
-  border-width: .1rem;
-  border-color: #aaa transparent transparent transparent;
-  transform: translate(140%, -30%);
+    content: '';
+    position: absolute;
+    top: 50%;
+    right: 0;
+    width: 0;
+    height: 0;
+    font-size: 0;
+    line-height: 0;
+    border-style: solid;
+    border-width: .1rem;
+    border-color: #aaa transparent transparent transparent;
+    transform: translate(140%, -30%);
 }
 
 .jymobile-tab-triangle.active:after {
-  border-color: transparent transparent #2cb7ca transparent;
-  transform: translate(140%, -70%);
+    border-color: transparent transparent #2cb7ca transparent;
+    transform: translate(140%, -70%);
 }
 
 .jymobile-tab-triangle.current {
-  color: #2cb7ca;
+    color: #2cb7ca;
 }
 
 .jymobile-tab-triangle.current:after {
-  border-color: #2cb7ca transparent transparent transparent;
+    border-color: #2cb7ca transparent transparent transparent;
 }
 
 #choose_area {
-  display: flex;
-  justify-content: space-between;
-  flex-direction: column;
-  overflow: hidden;
-  height: 100%;
+    display: flex;
+    justify-content: space-between;
+    flex-direction: column;
+    overflow: hidden;
+    height: 100%;
 }
 
 #choose_area .form {
-  flex: 1;
-  overflow-y: scroll;
+    flex: 1;
+    overflow-y: scroll;
 }
 
 #choose_area .optional_count, #choose_area .all_area {
-  height: .88rem;
-  line-height: .88rem;
-  padding: 0 .3rem;
-  font-size: .3rem;
-  color: #1d1d1d;
+    height: .88rem;
+    line-height: .88rem;
+    padding: 0 .3rem;
+    font-size: .3rem;
+    color: #1d1d1d;
 }
 
 #choose_area .optional_count em, #choose_area .all_area em {
-  color: #2cb7ca;
+    color: #2cb7ca;
 }
 
 #choose_area .result {
-  position: relative;
-  padding: .2rem .3rem;
-  font-size: .26rem;
-  text-align: justify;
+    position: relative;
+    padding: .2rem .3rem;
+    font-size: .26rem;
+    text-align: justify;
 }
 
 #choose_area .result .result_text {
-  position: relative;
-  min-height: 19px;
+    position: relative;
+    min-height: 19px;
 }
 
 #choose_area .result .line_two {
-  text-overflow: ellipsis;
-  overflow: hidden;
-  text-overflow: ellipsis;
-  display: -webkit-box;
-  -webkit-line-clamp: 2;
-  line-clamp: 2;
-  -webkit-box-orient: vertical;
+    text-overflow: ellipsis;
+    overflow: hidden;
+    text-overflow: ellipsis;
+    display: -webkit-box;
+    -webkit-line-clamp: 2;
+    line-clamp: 2;
+    -webkit-box-orient: vertical;
 }
 
 #choose_area .result .detail, #choose_area .result .packup {
-  display: inline-block;
-  width: 1.5rem;
-  padding-right: 0.1rem;
-  text-align: right;
-  color: #2cb7ca;
-  font-size: .26rem;
-  z-index: 999;
+    display: inline-block;
+    width: 1.5rem;
+    padding-right: 0.1rem;
+    text-align: right;
+    color: #2cb7ca;
+    font-size: .26rem;
+    z-index: 999;
 }
 
 #choose_area .result .detail {
-  position: absolute;
-  right: 0;
-  bottom: 0;
-  background: linear-gradient(90deg, rgba(245, 244, 249, 0) 0%, rgba(245, 244, 249, 0.96) 36%, #f5f4f9 100%);
+    position: absolute;
+    right: 0;
+    bottom: 0;
+    background: linear-gradient(90deg, rgba(245, 244, 249, 0) 0%, rgba(245, 244, 249, 0.96) 36%, #f5f4f9 100%);
 }
 
 #choose_area .result .packup {
-  position: absolute;
-  right: 0.3rem;
-  bottom: 0;
-  margin-top: .1rem;
+    position: absolute;
+    right: 0.3rem;
+    bottom: 0;
+    margin-top: .1rem;
 }
 
 #choose_area .select-area-box {
-  padding-bottom: .94rem;
+    padding-bottom: .94rem;
 }
 
 #choose_area .select-area-box .tab {
-  display: flex;
-  align-items: center;
-  justify-content: space-between;
-  color: #1d1d1d;
-  background: #fff;
-  font-size: .3rem;
-  padding: .2rem .5rem;
-  border-bottom: 1px solid #e0e0e0;
-  box-sizing: border-box;
+    display: flex;
+    align-items: center;
+    justify-content: space-between;
+    color: #1d1d1d;
+    background: #fff;
+    font-size: .3rem;
+    padding: .2rem .5rem;
+    border-bottom: 1px solid #e0e0e0;
+    box-sizing: border-box;
 }
 
 #choose_area .select-area-box .tab .province {
-  display: flex;
-  align-items: center;
+    display: flex;
+    align-items: center;
 }
 
 #choose_area .select-area-box .tab .province .checkbox {
-  width: .4rem;
-  height: .4rem;
-  border: 1px solid #ddd;
-  border-radius: 50%;
-  margin-right: .2rem;
-  -webkit-appearance: none;
-  background: #fff;
+    width: .4rem;
+    height: .4rem;
+    border: 1px solid #ddd;
+    border-radius: 50%;
+    margin-right: .2rem;
+    -webkit-appearance: none;
+    background: #fff;
 }
 
 #choose_area .select-area-box .tab .province .checkbox:checked {
-  border: 0;
-  background: url(/vipsubscribe/image/xuanzhong.png) no-repeat center center;
-  background-size: 100% 100%;
+    border: 0;
+    background: url(/vipsubscribe/image/xuanzhong.png) no-repeat center center;
+    background-size: 100% 100%;
 }
 
 #choose_area .select-area-box .tab .province .checkbox[disabled] {
-  border: 0;
-  background: url(/vipsubscribe/image/active_disabled.png) no-repeat center center;
-  background-size: 100% 100%;
+    border: 0;
+    background: url(/vipsubscribe/image/active_disabled.png) no-repeat center center;
+    background-size: 100% 100%;
+    opacity: 1;
 }
 
 #choose_area .select-area-box .tab .province .checkbox.half {
-  border: 0 !important;
-  background: url(/vipsubscribe/image/banxuan.png) no-repeat center center !important;
-  background-size: cover !important;
+    border: 0 !important;
+    background: url(/vipsubscribe/image/banxuan.png) no-repeat center center !important;
+    background-size: cover !important;
 }
 
 #choose_area .select-area-box .tab .province .checkbox.half[disabled] {
-  border: 0 !important;
-  background: url(/vipsubscribe/image/banxuan.png) no-repeat center center !important;
-  background-size: cover !important;
+    border: 0 !important;
+    background: url(/vipsubscribe/image/banxuan.png) no-repeat center center !important;
+    background-size: cover !important;
+    opacity: 1 !important;
 }
 
 #choose_area .select-area-box .tab .optional {
-  color: #2CB7CA;
-  font-size: 0.28rem;
-  margin-left: -2.8rem;
+    color: #2CB7CA;
+    font-size: 0.28rem;
+    margin-left: -2.8rem;
 }
 
 #choose_area .select-area-box label::after {
-  font-size: 14px;
-  float: right;
-  margin-right: 15px;
+    font-size: 14px;
+    float: right;
+    margin-right: 15px;
 }
 
 #choose_area .select-area-box .tab_content {
-  display: none;
-  font-size: .28rem;
-  padding: .1rem .3rem;
-  text-align: center;
+    display: none;
+    font-size: .28rem;
+    padding: .1rem .3rem;
+    text-align: center;
 }
 
 #choose_area .select-area-box .tab_content .city {
-  float: left;
-  padding: .1rem .2rem;
-  background: #fff;
-  margin: .1rem 0 .1rem .1rem;
-  border-radius: 0.04rem;
-  font-size: .28rem;
+    float: left;
+    padding: .1rem .2rem;
+    background: #fff;
+    margin: .1rem 0 .1rem .1rem;
+    border-radius: 0.04rem;
+    font-size: .28rem;
 }
 
 #choose_area .select-area-box .tab_content .active {
-  background: #2cb7ca;
-  color: #fff;
+    background: #2cb7ca;
+    color: #fff;
 }
 
 #choose_area .select-area-box .tab_content .active[disabled] {
-  background: #BFBFC3;
-  color: #fff;
+    background: #BFBFC3;
+    color: #fff;
 }
 
 #choose_area .select-area-box .tab_content .city[disabled] {
-  background: #BFBFC3;
-  color: #fff;
+    background: #BFBFC3;
+    color: #fff;
 }
 
 #choose_area .select-area-box .index {
-  padding: .3rem .3rem .1rem .3rem;
-  font-size: .32rem;
+    padding: .3rem .3rem .1rem .3rem;
+    font-size: .32rem;
 }
 
 #choose_area .slide {
-  background: transparent;
-  position: fixed;
-  right: 0;
-  top: 50%;
-  height: 8.5rem;
-  width: .4rem;
-  font-size: .26rem;
-  text-align: center;
-  display: flex;
-  flex-direction: column;
-  justify-content: center;
-  padding: .1rem 0;
-  align-items: center;
-  margin-top: -4.25rem;
-  z-index: 9999;
+    background: transparent;
+    position: fixed;
+    right: 0;
+    top: 50%;
+    height: 8.5rem;
+    width: .4rem;
+    font-size: .26rem;
+    text-align: center;
+    display: flex;
+    flex-direction: column;
+    justify-content: center;
+    padding: .1rem 0;
+    align-items: center;
+    margin-top: -4.25rem;
+    z-index: 9999;
 }
 
 #choose_area .slide a {
-  margin-bottom: .1rem;
+    margin-bottom: .1rem;
 }
+
+.icon.iconfont {
+    display: inline-block;
+}
+
+.icon.iconfont.up {
+    display: inline-block;
+    transform: rotate(-180deg);
+}
+

+ 29 - 21
src/web/staticres/vipsubscribe/js/editArea.js

@@ -54,18 +54,28 @@ function createMoreCity(arr) {
     return tempHtml
 }
 
+var animatedRuning = false;
+
+function checkAnimatedRuning() {
+    if (animatedRuning) {
+        return true
+    }
+    animatedRuning = true;
+    setTimeout(function () {
+        animatedRuning = false;
+    }, 500);
+    return false
+}
+
 // 省下拉市事件
 function slideFun(obj) {
+    if (checkAnimatedRuning()) {
+        return
+    }
     if (obj.next('.tab_content:not(:animated)').css("display") == "block") {
-        obj.children().children('i').css({
-            "display": "inline-block",
-            "transform": "rotate(0)"
-        })
+        obj.children().children('i').removeClass("up");
     } else {
-        obj.children().children('i').css({
-            "display": "inline-block",
-            "transform": "rotate(-180deg)"
-        })
+        obj.children().children('i').addClass("up");
     }
     obj.toggleClass('selected').next('.tab_content:not(:animated)').slideToggle(500)
     obj.parent().siblings().children('.tab').removeClass('selected');
@@ -169,7 +179,7 @@ function initResult() {
                     // 如果购买的是全省,则不可点击下拉事件(不可修改城市)
                     if (isAll != -1) {
                         $(this).parent().siblings().children('.city').addClass('active').attr('disabled', true);
-                        $(this).parent('.tab').parent('li').siblings().find('.checkbox:not(.half)').parents('.tab').unbind('click')
+                        $(this).parent('.tab').unbind('click').parent('li').siblings().find('.checkbox:not(.half)').parents('.tab').unbind('click')
                     } else {
                         $(this).parent().siblings().children('.city').addClass('active').removeAttr('disabled')
                     }
@@ -189,7 +199,7 @@ function initResult() {
                         that.bind('click', function () {
                             slideFun($(this));
                         })
-                        $(this).addClass('active').parent().siblings('.tab').find('input').addClass('half');
+                        $(this).addClass('active').removeAttr('disabled').parent().siblings('.tab').find('input').addClass('half');
                         return;
                     }
                 })
@@ -233,18 +243,15 @@ function initResult() {
 $(function () {
     // 省下拉事件
     $('.tab:not(.municipality)').on('click', function () {
+        if (checkAnimatedRuning()) {
+            return
+        }
         if ($(this).next('.tab_content:not(:animated)').css("display") == "block") {
-            $(this).children().children('i').css({
-                "display": "inline-block",
-                "transform": "rotate(0)"
-            })
+            $(this).children().children('i').removeClass("up");
         } else {
-            $(this).children().children('i').css({
-                "display": "inline-block",
-                "transform": "rotate(-180deg)"
-            })
+            $(this).children().children('i').addClass("up");
         }
-        $(this).toggleClass('selected').next('.tab_content:not(:animated)').slideToggle(500)
+        $(this).toggleClass('selected').next('.tab_content:not(:animated)').slideToggle(500);
         $(this).parent().siblings().children('.tab').removeClass('selected');
     });
     getData();
@@ -358,7 +365,8 @@ $(function () {
         $('.checkbox').prop('checked', false).removeAttr('disabled');
         $('.city').removeClass('active');
         $('.tab_content').slideUp();
-        $('.optional').remove()
+        $('.optional').remove();
+        $('.tab').find('i').removeClass("up");
         init();
     })
     // 确定修改事件
@@ -380,4 +388,4 @@ function theSameAs(select) {
     let tmp1 = getAreaClassArr(select);
     let tmp2 = getAreaClassArr(areaData.data.area);
     return (JSON.stringify(tmp1[0].sort()) === JSON.stringify(tmp2[0].sort())) && (JSON.stringify(tmp1[1].sort()) === JSON.stringify(tmp2[1].sort()));
-}
+}

+ 136 - 0
src/web/templates/pc/subscribe_new.html

@@ -0,0 +1,136 @@
+<html>
+<head>
+    <title>招标订阅_剑鱼标讯,全行业招标信息智能推送领导者</title>
+    <meta http-equiv="X-UA-Compatible" content="IE=edge,Chrome=1"/>
+    <meta name="Keywords" content="招标订阅,招标项目,中标项目,招标信息,剑鱼标讯"/>
+    <meta name="Description" content="使用剑鱼标讯,可以精准匹配招标信息,只需要微信关注剑鱼标讯公众号,然后自行设定所关注的招标关键词和地区,满足订阅需求的招标信息就会在两个小时内自动推送。"/>
+    <meta name="renderer" content="webkit">
+    <meta content="telephone=no" name="format-detection"/>
+    {{include "/common/pnc.html"}}
+    <link rel="stylesheet" type="text/css" href="{{Msg "seo" "cdn"}}/css/reset.css?v={{Msg "seo" "version"}}"/>
+    <link rel="stylesheet" type="text/css" href="{{Msg "seo" "cdn"}}/css/subscribe.css?v={{Msg "seo" "version"}}"/>
+    <link rel="stylesheet" type="text/css" href="{{Msg "seo" "cdn"}}/pccss/reset_pc.css"/>
+    {{/*<link rel="stylesheet" type="text/css" href="{{Msg "seo" "cdn"}}/pccss/zhaobiao.css"/>*/}}
+    <link href="{{Msg "seo" "cdn"}}/css/pc.css?v={{Msg "seo" "version"}}" rel="stylesheet">
+    <link rel="stylesheet" type="text/css"
+          href="{{Msg "seo" "cdn"}}/pccss/public-nav-1200.css?v={{Msg "seo" "version"}}"/>
+    <script type="text/javascript" src="{{Msg "seo" "cdn"}}/js/public-nav.js?v={{Msg "seo" "version"}}"></script>
+    <script src="{{Msg "seo" "cdn"}}/js/jquery.cookie.js"></script>
+    <script>
+        $(function () {
+            $(window).scroll(function () {
+                if ($(this).scrollTop() > 0) {
+                    $("#backTop").show();
+                } else {
+                    $("#backTop").hide();
+                }
+            });
+        });
+    </script>
+<body>
+{{include "/common/pchead.html"}}
+<!--内容-->
+<!-- banner图板块 -->
+<div class="tender-1">
+    <div class="imgauto">
+        <img src="/images/subscribe/banner.png" alt="">
+    </div>
+</div>
+<!-- 订阅模式选择板块 -->
+<div class="subscription">
+    <div class="sub-center">
+        <div class="sub-free">
+            <h3 class="free-title">免费版订阅</h3>
+            <button class="free-btn">立即免费订阅</button>
+        </div>
+        <div class="sub-vip">
+            <div class="vip-logo">
+                <img src="/images/subscribe/vip-logo.png" alt="">
+                <h3 class="vip-title">VIP订阅</h3>
+            </div>
+            <button class="vip-btn btn btn-primary">免费试用</button>
+        </div>
+    </div>
+</div>
+<!-- VIP弹窗 -->
+<div class="modal hide">
+    <div class="modal-dialog">
+        <img src="/images/subscribe/vip_tanchuang.png" alt="">
+        <div class="vip-code">
+            <img src="/images/subscribe/QR_code.png" alt="">
+            <p class="vip-text">扫描二维码体验VIP订阅</p>
+        </div>
+    </div>
+</div>
+<div class="shade hide"></div>
+<!-- 订阅模式对比板块 -->
+<div class="sub-contrast">
+    <div class="contrast-header">
+        <div class="header-title">
+            对比
+        </div>
+    </div>
+    <div class="contrast-main">
+        <div class="contrast-main-center">
+            <div class="center-left">
+                <ul>
+                    <li class="top-title modify-left">功能/价格</li>
+                    <li>项目匹配</li>
+                    <li>行业订阅</li>
+                    <li>关键词</li>
+                    <li>匹配方式</li>
+                    <li>订阅区域</li>
+                    <li>价格</li>
+                </ul>
+            </div>
+            <div class="center-center">
+                <ul>
+                    <li class="top-title modify-center">免费版</li>
+                    <li>匹配单次公告信息</li>
+                    <li>—</li>
+                    <li>10组关键词</li>
+                    <li>仅支持标题匹配</li>
+                    <li>订阅区域精确到省</li>
+                    <li><i class="btn-free">免费</i></li>
+                </ul>
+            </div>
+            <div class="center-right">
+                <ul>
+                    <li class="top-title modify-right">
+                        VIP订阅专属服务
+                        <img src="/images/subscribe/mengban.png" alt="">
+                    </li>
+                    <li><span>匹配项目信息</span>,为你推送所匹配项目后续的全部动态</li>
+                    <li>按采购单位类型订阅,无需繁琐关键词设置</li>
+                    <li><span>300组</span>关键词,获取招标信息更全面</li>
+                    <li>支持<span>标题匹配+全文匹配</span>,信息筛选更灵活</li>
+                    <li>订阅区域<span>精确到地级市</span>,只看你最关注的</li>
+                    <li>低至5.8元/月
+                        <a href="javascript:;" class="On-trial vip-btn">免费试用</a>
+                    </li>
+                </ul>
+            </div>
+        </div>
+    </div>
+</div>
+<!--内容-->
+
+
+<!--百度统计start-->
+{{include "/common/pcbottom.html"}}
+{{include "/common/baiducc.html"}}
+<!--百度统计end-->
+
+<script>
+    $('.vip-btn').click(function () {
+        $('.hide').fadeIn(300);
+        $('.modal,.shade').slideDown(300);
+        // $('.hide').removeClass('hide');
+    })
+    $('.shade').click(function () {
+        $('.hide').fadeOut(300);
+        $('.modal,.shade').slideUp(300);
+    })
+</script>
+</body>
+</html>

+ 208 - 112
src/web/templates/weixin/dataExport/dataExport_toMyOrder.html

@@ -599,7 +599,9 @@
 			}
 			
 			function setSessionStorage(){
+				sessionStorage.orderScrollTop=$(".main")[0].scrollTop;
 				sessionStorage.orderTabActive=$("ul .active").index();
+				sessionStorage.orderPageNum=parseInt(pageIndex)-1;
 			}
 			
 			function onceMore(e){
@@ -715,7 +717,7 @@
 			                                   					 }else{
 			                                   					 	$(obj).parent().parent().remove();
 																	$(".card_lists").empty();
-			                                   					 	queryOrder($("ul .active").index());
+			                                   					 	queryOrder($("ul .active").index(),10);
 			                                   					 }
 			                                   					
 			                                                }
@@ -754,8 +756,10 @@
 				sessionStorage.removeItem("applysuccess");
 				sessionStorage.removeItem("companyName");
 				sessionStorage.removeItem("taxNumer");
-				$("body").scroll(function(){
-					scrollTop=$("body").scrollTop()
+				$("#order_list").on('scroll' ,function(){
+					scrollTop=$(".main")[0].scrollTop
+					console.log(scrollTop)
+					console.log(this)
 				});
 				//var i=0
 				$(".buttons-tab .tab-link").each(function() {
@@ -769,8 +773,7 @@
 						$(".tabs>.tab").eq(index).show().siblings().hide();
 						typ=$("ul .active").index();
 						$(".card_lists").empty();
-						$("body").scrollTop(0);
-						queryOrder(index);
+						queryOrder(index,10);
 					})
 				})
 
@@ -786,22 +789,37 @@
 				}
 				if(sessionStorage.orderTabActive){
 					$(".buttons-tab .tab-link").eq(sessionStorage.orderTabActive).addClass("active").siblings().removeClass("active");
-					queryOrder(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{
-					queryOrder();
+					queryOrder(0,10);
 				}
 			})
 			
 				//查询订单ajax
 				//typ  0全部 1未支付 2已支付
-				function queryOrder(typ,objD){
+				function queryOrder(typ,page_size){
 					var result = true;
-					$.post("/subscribepay/orderListDetails/myOrder",{"type":typ},function(data){
+					$.post("/subscribepay/orderListDetails/myOrder",{"type":typ,"page_size":page_size},function(data){
 							$(".loading_").hide();
 							var list=data.res;
 							dataCache =data.res;
-							pageIndex=2;
+							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);	
@@ -824,21 +842,21 @@
 								        scrollArea : $(".main"),
 								        loadDownFn : function(me){
 											$.post('/subscribepay/orderListDetails/myOrderPaging', {"pageNum": pageIndex,"type":typ},function(data){
-													//没有数据
-													if(data.res==null||data.res.length==0){
-														noMoreData(me);
+												//没有数据
+												if(data.res==null||data.res.length==0){
+													noMoreData(me);
+												}else{
+													dataCache=dataCache.concat(data.res);
+													pageIndex++;
+													structureHtml(data.res);
+													if(data.hasNextPage){
+														// 每次数据插入,必须重置
+														me.resetload();
 													}else{
-														dataCache=dataCache.concat(data.res);
-														pageIndex++;
-														structureHtml(data.res);
-														if(data.hasNextPage){
-															// 每次数据插入,必须重置
-															me.resetload();
-														}else{
-															noMoreData(me);
-														}
+														noMoreData(me);
 													}
-												});
+												}
+											});
 										}
 									});
 								}else{
@@ -1004,87 +1022,143 @@
 	                        createTime_vip =createTime_vip.replace(/-/g,".")
 	                        //筛选条件
 	                        var filter_vip = JSON.parse(obj.filter);
-	                        //地区
-							var region_vipArr = filter_vip.area;
-	                        var region_vip=""
-	                        var province_length=0;
-	                        var city_length=0;
-							if(JSON.stringify(region_vipArr) != JSON.stringify({})){
-								for(i in region_vipArr){
-									if(region_vipArr[i].length==0){
-										province_length++;
-									}else{
-										city_length+=region_vipArr[i].length;
+	                        //判断该订单是否是升级订单
+	                        var vip_type = obj.vip_type;
+	                       if (vip_type != 2){
+		                       	 //地区
+								var region_vipArr = filter_vip.area;
+		                        var region_vip=""
+		                        var province_length=0;
+		                        var city_length=0;
+								if(JSON.stringify(region_vipArr) != JSON.stringify({})){
+									for(i in region_vipArr){
+										if(region_vipArr[i].length==0){
+											province_length++;
+										}else{
+											city_length+=region_vipArr[i].length;
+										}
 									}
+								}else{
+									region_vip="全国";
 								}
-							}else{
-								region_vip="全国";
-							}
-							if((province_length!=0)&&(city_length!=0)){
-	                      	  region_vip=province_length+"个省级区域、"+city_length+"个地市";
-							}else if((province_length==0)&&(city_length!=0)){
-	                      	  region_vip=city_length+"个地市";
-							}else if((province_length!=0)&&(city_length==0)){
-	                      	  region_vip=province_length+"个省级区域";
-							}
-	                        //行业
-	                        var industry_vip = filter_vip.industry.length;	//数组
-	                        if(industry_vip==0){
-	                        	industry_vip="全";
-	                        }else{
-	                        	industry_vip=industry_vip+"个";
-	                        }
-	                        var cyclecount_vip = filter_vip.cyclecount;	//时长
-	                        var cycleunit_vip = filter_vip.cycleunit;//单位 1:年 2:月 3:天
-	                        //订阅周期
-	                        var effectiveduration_vip=""
-	                        if((obj.vip_starttime!=undefined)&&(obj.vip_endtime!=undefined)){
-					       		var start_time_vip = obj.vip_starttime;
-					       		var end_time_vip = obj.vip_endtime;
-					       		var start_time_arr = start_time_vip.split(" ")[0].split("-")
-					       		var end_time_arr = end_time_vip.split(" ")[0].split("-")
-					       		var start_year=start_time_arr[0];
-					       		var start_month=start_time_arr[1];
-					       		var end_year=end_time_arr[0];
-					       		var end_month=end_time_arr[1];
-					       		
-					       		var year = 0;
-								var month = 0;
-								if(end_year > start_year){
-						    		if(end_month > start_month){
-					    				year = end_year - start_year;
-					    				month = end_month - start_month;
-						    		}else{
-					    				year = end_year - start_year-1;
-					    				month = 12+Number(end_month)-start_month;
-					    				if (month==12){
-					    					year=Number(year)+1;
-					    					month=0;
-					    				}
-						    		}
-						    	}else if(end_year == start_year){
-					    			month = end_month - start_month;
-						    	}
-						    	
-						    	if(year != 0 && month !=0){
-						    		effectiveduration_vip=year+"年"+month+"个月";
-						    	}else if(year !== 0&& month ===0){
-						    		effectiveduration_vip=year+"年";
-						    	}else if(year === 0&& month !==0){
-						    		effectiveduration_vip=month+"个月";
-						    	}
-						    	if(cycleunit_vip==3){
-						    		effectiveduration_vip=cyclecount_vip+"天";	 
-						    	}
-					      	}else{
-						       	if(cycleunit_vip==1){
-		                        	effectiveduration_vip=cyclecount_vip+"年";
-		                        }else if(cycleunit_vip==2){
-		                        	effectiveduration_vip=cyclecount_vip+"个月"
-		                        }else if(cycleunit_vip==3){
-		                        	effectiveduration_vip=cyclecount_vip+"天";	                    
+								if((province_length!=0)&&(city_length!=0)){
+		                      	  region_vip=province_length+"个省级区域、"+city_length+"个地市";
+								}else if((province_length==0)&&(city_length!=0)){
+		                      	  region_vip=city_length+"个地市";
+								}else if((province_length!=0)&&(city_length==0)){
+		                      	  region_vip=province_length+"个省级区域";
+								}
+		                        //行业
+		                        var industry_vip = filter_vip.industry.length;	//数组
+		                        if(industry_vip==0){
+		                        	industry_vip="全";
+		                        }else{
+		                        	industry_vip=industry_vip+"个";
 		                        }
-						    }
+		                        var cyclecount_vip = filter_vip.cyclecount;	//时长
+		                        var cycleunit_vip = filter_vip.cycleunit;//单位 1:年 2:月 3:天
+		                        //订阅周期
+		                        var effectiveduration_vip=""
+		                        if((obj.vip_starttime!=undefined)&&(obj.vip_endtime!=undefined)){
+						       		var start_time_vip = obj.vip_starttime;
+						       		var end_time_vip = obj.vip_endtime;
+						       		var start_time_arr = start_time_vip.split(" ")[0].split("-")
+						       		var end_time_arr = end_time_vip.split(" ")[0].split("-")
+						       		var start_year=start_time_arr[0];
+						       		var start_month=start_time_arr[1];
+						       		var end_year=end_time_arr[0];
+						       		var end_month=end_time_arr[1];
+						       		
+						       		var year = 0;
+									var month = 0;
+									if(end_year > start_year){
+							    		if(end_month > start_month){
+						    				year = end_year - start_year;
+						    				month = end_month - start_month;
+							    		}else{
+						    				year = end_year - start_year-1;
+						    				month = 12+Number(end_month)-start_month;
+						    				if (month==12){
+						    					year=Number(year)+1;
+						    					month=0;
+						    				}
+							    		}
+							    	}else if(end_year == start_year){
+						    			month = end_month - start_month;
+							    	}
+							    	
+							    	if(year != 0 && month !=0){
+							    		effectiveduration_vip=year+"年"+month+"个月";
+							    	}else if(year !== 0&& month ===0){
+							    		effectiveduration_vip=year+"年";
+							    	}else if(year === 0&& month !==0){
+							    		effectiveduration_vip=month+"个月";
+							    	}
+							    	if(cycleunit_vip==3){
+							    		effectiveduration_vip=cyclecount_vip+"天";	 
+							    	}
+						      	}else{
+							       	if(cycleunit_vip==1){
+			                        	effectiveduration_vip=cyclecount_vip+"年";
+			                        }else if(cycleunit_vip==2){
+			                        	effectiveduration_vip=cyclecount_vip+"个月"
+			                        }else if(cycleunit_vip==3){
+			                        	effectiveduration_vip=cyclecount_vip+"天";	                    
+			                        }
+							    }
+	                       }else{
+	                       		//区域
+	                       		var filterObj =filter_vip;
+	                       		var region_vip ="";
+	                       		//升级订单 单独处理
+					         	if(!$.isEmptyObject(filterObj.addarea)){
+					              var cityNum_u=0;
+					              var provinceNum_u=0;
+					         	for(var i in filterObj.addarea) {
+					                let citys_u=filterObj.addarea[i];
+					                if (citys_u=="no"){
+					                	 region_vip="无"
+					                }else{
+					                	 if (citys_u.length>0){
+						                	cityNum_u+=citys_u.length;
+						                }else{
+						                	provinceNum_u++;
+						                }
+						                if(provinceNum_u>0) region_vip= region_vip + provinceNum_u+"个省级区域";
+						                if(cityNum_u>0){
+						                  if(provinceNum_u>0) region_vip= region_vip+"、"
+						                  region_vip = region_vip+ cityNum_u+"个地市";
+						                }
+					              	}
+					              }
+					         	}else {
+					         		region_vip="全国";
+					         	}
+					         	//行业
+					         	var industry_vip="";
+					         	if(!$.isEmptyObject(filterObj.addindustry)) {
+					         		if(filterObj.addindustry[0]=="no"){
+						         		industry_vip="无";
+						         	}else{
+						         		if(filterObj.addindustry.length==0){
+						         			industry_vip="全";
+						         		}else{
+						         			industry_vip=filterObj.addindustry.length+"个";
+						         		}
+						         	}
+					         	}
+					         	//延长周期
+					         	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==-1){
+							        effectiveduration_vip="不延期";
+							    }
+	                       }
 	                        
 	                        var vip_status =obj.i_vip_status;	// 1:试用 2:正式 -1:试用到期 -2:正式到期
 	                        //订单状态 0待支付 1已完成 -1删除  
@@ -1159,11 +1233,21 @@
 													+'<div class="media-img">'
 														+'<img src="/vipsubscribe/image/vip_order.png">'
 													+'</div>'
-													+'<div class="media-info">'
-														+'<p class="item-ifo ellipsis">区域:'+ region_vip+'</p>'
-														+'<p class="item-ifo ellipsis">行业:'+ industry_vip +'行业</p>'
-														+'<p class="item-ifo ellipsis">订阅周期:'+effectiveduration_vip+'</p>'
-													+'</div>'
+													+'<div class="media-info">';
+														if (vip_type==1){//续费
+															listhtml+='<p class="item-ifo ellipsis">续费区域:'+ region_vip+'</p>'
+															+'<p class="item-ifo ellipsis">续费行业:'+ industry_vip +'行业</p>'
+															+'<p class="item-ifo ellipsis">续费周期:'+effectiveduration_vip+'</p>';
+														}else if (vip_type ==2){//升级
+															listhtml+='<p class="item-ifo ellipsis">升级区域:'+ region_vip+'</p>'
+															+'<p class="item-ifo ellipsis">升级行业:'+ industry_vip +'行业</p>'
+															+'<p class="item-ifo ellipsis">延长周期:'+effectiveduration_vip+'</p>';
+														}else{
+															listhtml+='<p class="item-ifo ellipsis">区域:'+ region_vip+'</p>'
+															+'<p class="item-ifo ellipsis">行业:'+ industry_vip +'行业</p>'
+															+'<p class="item-ifo ellipsis">订阅周期:'+effectiveduration_vip+'</p>';
+														}
+													listhtml+='</div>'
 												+'</a>'
 												+'<div class="price">'
 													+'<strong class="current">¥'+orderMoney_vip+'</strong>'
@@ -1189,12 +1273,24 @@
 															+'<div class="media-img">'
 																+'<img src="/vipsubscribe/image/vip_order.png">'
 															+'</div>'
-															+'<div class="media-info">'
-																+'<p class="item-ifo ellipsis">区域:'+ region_vip+'</p>'
-																+'<p class="item-ifo ellipsis">行业:'+ industry_vip +'行业</p>'
-																+'<p class="item-ifo ellipsis">订阅周期:'+effectiveduration_vip+'</p>'
-																+'<p class="item-ifo ellipsis">有效日期:'+effectivetime_vip+'</p>'
-															+'</div>'
+															+'<div class="media-info">';
+																if(vip_type==1){ //续费
+																	listhtml+='<p class="item-ifo ellipsis">续费区域:'+ region_vip+'</p>'
+																			 +'<p class="item-ifo ellipsis">续费行业:'+ industry_vip +'行业</p>'
+																			 +'<p class="item-ifo ellipsis">续费周期:'+effectiveduration_vip+'</p>'
+																			 +'<p class="item-ifo ellipsis">有效日期:'+effectivetime_vip+'</p>';
+																}else if (vip_type==2){ //升级
+																	listhtml+='<p class="item-ifo ellipsis">升级区域:'+ region_vip+'</p>'
+																			 +'<p class="item-ifo ellipsis">升级行业:'+ industry_vip +'行业</p>'
+																			 +'<p class="item-ifo ellipsis">延长周期:'+effectiveduration_vip+'</p>'
+																			 +'<p class="item-ifo ellipsis">有效日期:'+effectivetime_vip+'</p>';
+																}else {
+																	listhtml+='<p class="item-ifo ellipsis">区域:'+ region_vip+'</p>'
+																			 +'<p class="item-ifo ellipsis">行业:'+ industry_vip +'行业</p>'
+																			 +'<p class="item-ifo ellipsis">订阅周期:'+effectiveduration_vip+'</p>'
+																			 +'<p class="item-ifo ellipsis">有效日期:'+effectivetime_vip+'</p>';
+																}
+															listhtml+='</div>'
 														+'</a>'
 														+'<div class="price">'
 															+'<strong class="current">¥'+orderMoney_vip+'</strong>'

+ 16 - 2
src/web/templates/weixin/vipsubscribe/choose_area.html

@@ -653,6 +653,9 @@
                 document.querySelector('#' + s).scrollIntoView({block: 'center'});
             })
             $(".select-area-box .tab:not(.municipality)").on('click', function (event) {
+                if (AreaChoose.checkAnimatedRuning()) {
+                    return
+                }
                 if ($(this).next('.tab_content:not(:animated)').css("display") == "block") {
                     $(this).children().children('i').css({
                         "display": "inline-block",
@@ -761,11 +764,22 @@
                 $('.tips_d_money').text('¥' + price);
             }
 
+        },
+        animatedRuning: false,
+        checkAnimatedRuning: function () {
+            if (AreaChoose.animatedRuning) {
+                return true
+            }
+            AreaChoose.animatedRuning = true;
+            setTimeout(function () {
+                AreaChoose.animatedRuning = false;
+            }, 500);
+            return false
         }
-    }
+    };
 
     $(function () {
-        AreaChoose.isOpen()
+        AreaChoose.isOpen();
         AreaChoose.inintData(); //初始化 已选择和已购买数据
         AreaChoose.inintPage(); //初始化城市数据
 

+ 1 - 0
src/web/templates/weixin/vipsubscribe/choose_industry_upgrade.html

@@ -421,6 +421,7 @@
 				$('.select-area-box .list button').removeClass('active');
                 showSelect(buyIndustry,false);
                 findSelectedIndustry();
+                sessionStorage.removeItem("vipSubSelectIndustryAdd");
                 sessionStorage.removeItem("vipSubSelectIndustryUpgrade");
                 $('.tips_btn .btns button').removeAttr('disabled');
             })

+ 3 - 1
src/web/templates/weixin/vipsubscribe/edit_subscribe_success.html

@@ -20,8 +20,10 @@
         </div>
         <script src="/vipsubscribe/js/jquery-2.1.4.js?v={{Msg "seo" "version"}}"></script>
         <script>
-
+			
             $(function(){
+            	sessionStorage.removeItem("vipSubSelectArea");
+            	sessionStorage.removeItem("vipSubSelectIndustry");
 //              timer($('.time'),()=>{
 //                  window.history.go(-1); 
 //              })

+ 10 - 3
src/web/templates/weixin/vipsubscribe/renew_notice.html

@@ -60,7 +60,7 @@
             </div>
 			<div class="renew_box">
                 <button style="display: none;" class="renew_service">续费</button>
-                <button style="display: none;" class="aginBuy" onclick="window.location.href='/weixin/pay/vipsubscribe_willExpire'">再次购买</button>
+                <button style="display: none;" class="aginBuy">再次购买</button>
                 <button style="display: none;" class="free_service" onclick="window.location.href='/swordfish/historypush'">使用免费订阅</button>
             </div>
 		</div>
@@ -73,6 +73,7 @@
 			var orderId = {{.T.orderId}};
 			var starts = {{.T.startTime}};
 			var ends = {{.T.endTime}};
+			var orderCode = "";
 //			console.log("orderId",orderId)
 //			console.log("starts",starts)
 //			console.log("ends",ends)
@@ -84,6 +85,8 @@
 						var buyerclass = r.buyerclass
 						var exprie = {{.T.exprie}};
 						var vipStatus = Number(r.vipStatus);
+						orderCode = r.orderCode;
+						//
 						var areaHtml = "";
 					    var provinceArr = [];
 					    var cityArr = [];
@@ -147,7 +150,7 @@
 					  	  	$(".free_service").show();
 					    }
 					}
-				});
+				},false);
 			}else{
 				$DoPost("/subscribepay/renewUpgrade/getBuyMsg", {}, function (data) {
 					if(data){
@@ -157,6 +160,7 @@
 					    var endTime = data.end;
 					    var exprie = {{.T.exprie}};
 					    var vipStatus = Number(data.vipStatus);
+					    orderCode = data.orderCode;
 					    //
 					    var areaHtml = "";
 					    var provinceArr = [];
@@ -222,7 +226,7 @@
 					    	$(".free_service").show();
 					    }
 					}
-				});	
+				},false);	
 			}
 			
 			$(".renew_service").on("click",function(){
@@ -232,6 +236,9 @@
 				};
 				window.location.href = "/weixin/pay/renewPayPage";
 			});
+			$(".aginBuy").on("click",function(){
+				window.location.href = "/weixin/pay/vipsubscribe_new?orderCode="+orderCode;
+			});
 	        //
 		    function checkObj(obj) {
 			    //检验数组

+ 22 - 14
src/web/templates/weixin/vipsubscribe/vip_order_detail.html

@@ -268,19 +268,20 @@ try{
                 let citys_u=filterObj.addarea[i];
                 if (citys_u=="no"){
                 	$(".areaNum").text("无");
-                }
-                if (citys_u.length>0){
-                	cityNum_u+=citys_u.length;
                 }else{
-                	provinceNum_u++;
-                }
-                var areaText_u="";//1个省级区域、4个地市
-                if(provinceNum_u>0) areaText_u= areaText_u + provinceNum_u+"个省级区域";
-                if(cityNum_u>0){
-                  if(provinceNum_u>0) areaText_u= areaText_u+"、"
-                  areaText_u = areaText_u+ cityNum_u+"个地市";
-                }
-              $(".areaNum").text(areaText_u);
+                	 if (citys_u.length>0){
+	                	cityNum_u+=citys_u.length;
+	                }else{
+	                	provinceNum_u++;
+	                }
+	                var areaText_u="";//1个省级区域、4个地市
+	                if(provinceNum_u>0) areaText_u= areaText_u + provinceNum_u+"个省级区域";
+	                if(cityNum_u>0){
+	                  if(provinceNum_u>0) areaText_u= areaText_u+"、"
+	                  areaText_u = areaText_u+ cityNum_u+"个地市";
+	                }
+              		$(".areaNum").text(areaText_u);
+              	}
               }
          	}else {
          		$(".areaNum").text("全国");
@@ -476,8 +477,15 @@ try{
 	    	//倒计时 未购买
 			var create_time=r.data.order.create_time;
 			create_time=create_time.replace(/-/g,'/')
-			//var clock_end = +new Date(create_time) + 172800000;
-			var clock_end = +new Date(create_time) + 3600000;
+			var h;
+			var order_countdown = r.data.order.order_countdown;
+      		if(!(typeof order_countdown=="number")){	//精确小时
+      			var countdown = order_countdown.slice(0,(order_countdown.length-1));
+      			h=countdown*3600000;
+      		}else{	//精确天 
+      			h=order_countdown*86400000;
+      		}
+  			var clock_end = +new Date(create_time) + h;
 			setTimeFunc(clock_end); 
 			setInterval(function(){
 				setTimeFunc(clock_end);

+ 5 - 4
src/web/templates/weixin/vipsubscribe/vip_purchase.html

@@ -347,6 +347,7 @@
                         this.industrySelect = JSON.parse(sessionStorage.getItem("vipSubSelectIndustry"));
                     }
                     {{if eq .T.orderType 5 }}
+                    $('#payHandle').text("立即续费");
                     //即将到期 回显已购买
                     if (!sessionStorage.getItem("vipSubSelectArea") || !sessionStorage.getItem("vipSubSelectIndustry")) {
                         $DoPost("/subscribepay/editSub/getSubBuyMsg", {}, function (r) {
@@ -439,9 +440,9 @@
                     }
                     $(".choose_area").val(tipTxt);
                     //$(".add_tips.area").text(tipTxt).css("display", "");
-                }else if(!$.isEmptyObject(this.areaSelect) && this.areaSelect["全国"] ){
+                } else if (!$.isEmptyObject(this.areaSelect) && this.areaSelect["全国"]) {
                     $(".choose_area").val("全国");
-                }else {
+                } else {
                     $(".choose_area").val("");
                 }
             },
@@ -467,9 +468,9 @@
                 }*/
                 if (this.industrySelect.length > 0 && this.industrySelect[0] != "全部行业" && this.industrySelect[0] != "一个行业") { //选择有行业信息
                     $(".choose_industry").val("已选择 " + this.industrySelect.length + " 个行业");
-                }else if(this.industrySelect.length > 0 && this.industrySelect[0] == "全部行业"){
+                } else if (this.industrySelect.length > 0 && this.industrySelect[0] == "全部行业") {
                     $(".choose_industry").val("全部行业");
-                }else{
+                } else {
                     $(".choose_industry").val("");
                 }
             },

+ 5 - 0
src/web/templates/weixin/vipsubscribe/vip_upgrade.html

@@ -437,6 +437,11 @@
 	        	sessionStorage.removeItem("vipSubSelectIndustryUpgrade");
 	        }
         }
+        if(sessionStorage.vipSubSelectIndustryAdd!==undefined&&sessionStorage.vipSubSelectIndustryAdd!==""){
+        	if(checkObj(JSON.parse(sessionStorage.vipSubSelectIndustryAdd))){
+	        	sessionStorage.removeItem("vipSubSelectIndustryAdd");
+	        }
+        }
         //
 		var monthPrice = "";
         var yearPrice = "";