lushuncheng %!s(int64=5) %!d(string=hai) anos
pai
achega
6a578baef7
Modificáronse 63 ficheiros con 6008 adicións e 2284 borrados
  1. 2 1
      .nuxtignore
  2. 37 10
      assets/css/job/_post_id.scss
  3. 170 0
      assets/css/otherpage/money/index.scss
  4. 154 0
      assets/css/otherpage/money/introduce.scss
  5. 131 0
      assets/css/otherpage/money/uploadInvoice.scss
  6. 282 0
      assets/css/otherpage/money/withdraw.scss
  7. BIN=BIN
      assets/img/other/money/close@2x.png
  8. BIN=BIN
      assets/img/other/money/intro_bg@2x.png
  9. BIN=BIN
      assets/img/other/money/invoice_bg@2x.png
  10. BIN=BIN
      assets/img/other/money/selected_none@2x.png
  11. BIN=BIN
      assets/img/other/money/selected_ok@2x.png
  12. BIN=BIN
      assets/img/other/money/step1@2x.png
  13. BIN=BIN
      assets/img/other/money/step2@2x.png
  14. BIN=BIN
      assets/img/other/money/tabbar_icon_1_nor@2x.png
  15. BIN=BIN
      assets/img/other/money/tabbar_icon_1_sel@2x.png
  16. BIN=BIN
      assets/img/other/money/tabbar_icon_2_nor@2x.png
  17. BIN=BIN
      assets/img/other/money/tabbar_icon_2_sel@2x.png
  18. 10 8
      components/header.vue
  19. 69 69
      components/job/bottomBanner.vue
  20. 147 78
      components/job/dealSeoFooter.js
  21. 164 59
      components/job/dealSeoIndex.js
  22. 14 14
      components/kaifain/dealSeoFooter.js
  23. 85 34
      components/kaifain/dealSeoIndex.js
  24. 116 0
      components/otherpage/money/bottom.vue
  25. 25 24
      components/sign/works.vue
  26. 108 0
      layouts/invited.html
  27. 1 10
      middleware/SeoRouter/kaifain.js
  28. 54 11
      middleware/initialize.js
  29. 107 30
      nuxt.config.js
  30. 12 9
      package.json
  31. 0 0
      pages/404.vue
  32. 508 442
      pages/job/detail/_id.vue
  33. 382 278
      pages/job/index.vue
  34. 452 401
      pages/kaifain/add/index.vue
  35. 5 2
      pages/kaifain/detail/_tid/index.vue
  36. 254 203
      pages/kaifain/index.vue
  37. 106 98
      pages/kaifain/preview.vue
  38. 86 84
      pages/kaifain/previewCase.vue
  39. 14 11
      pages/otherpage/companyComplete/index.vue
  40. 8 6
      pages/otherpage/companyVerifyInput/index.vue
  41. 1 2
      pages/otherpage/index.vue
  42. 28 27
      pages/otherpage/kaifain/createInWeb.vue
  43. 11 7
      pages/otherpage/kaifain/myKaifain.vue
  44. 12 11
      pages/otherpage/kaifain/myKaifainData/_type.vue
  45. 3 2
      pages/otherpage/kaifain/viewHistory.vue
  46. 100 0
      pages/otherpage/money/index.vue
  47. 64 0
      pages/otherpage/money/introduce.vue
  48. 109 0
      pages/otherpage/money/uploadInvoice.vue
  49. 126 0
      pages/otherpage/money/withdraw.vue
  50. 195 0
      pages/otherpage/proto/lingxin.vue
  51. 14 14
      pages/otherpage/report/_uid.vue
  52. 27 26
      pages/otherpage/user/addConnect.vue
  53. 4 4
      pages/otherpage/user/card.vue
  54. 2 2
      pages/otherpage/user/collection/index.vue
  55. 1 1
      pages/otherpage/user/scanLogin.vue
  56. 2 2
      pages/otherpage/userSetting/show.vue
  57. 1 1
      pages/user/_id/_type.vue
  58. 0 0
      plugins/genHashId.js
  59. 52 0
      plugins/replace-html-styles/index.js
  60. 145 6
      plugins/router.js
  61. 46 57
      plugins/seoRouter.js
  62. 11 3
      store/index.js
  63. 1551 237
      yarn.lock

+ 2 - 1
.nuxtignore

@@ -1 +1,2 @@
-node_modules
+node_modules/*
+.nuxt/*

+ 37 - 10
assets/css/job/_post_id.scss

@@ -295,7 +295,7 @@
       .publish-info {
         margin: pxtovw(17) auto 0;
         width: pxtovw(355);
-        height: pxtovw(50);
+        height: pxtovw(60);
         font-size: pxtovw(14);
         border-top: pxtovw(1) solid #ededed;
         display: flex;
@@ -343,15 +343,42 @@
           }
           .r {
             margin-left: pxtovw(10);
-            width: pxtovw(150);
-            height: pxtovw(28);
-            font-size: pxtovw(14);
-            font-weight: 400;
-            color: rgba(68, 68, 68, 1);
-            line-height: pxtovw(28);
-            overflow: hidden;
-            white-space: nowrap;
-            text-overflow: ellipsis;
+            display: flex;
+            flex-direction: column;
+            justify-content: center;
+            .pName {
+              width: pxtovw(150);
+              height: pxtovw(18);
+              font-size: pxtovw(13);
+              font-weight: 400;
+              color: #222222;
+              line-height: pxtovw(18);
+              overflow: hidden;
+              white-space: nowrap;
+              text-overflow: ellipsis;
+            }
+            .pTips {
+              display: flex;
+              transform-origin: left center;
+              transform: scale(0.917);
+              .tips1 {
+                height: pxtovw(17);
+                font-size: pxtovw(11);
+                font-weight: 400;
+                text-align: left;
+                color: #999999;
+                line-height: pxtovw(16);
+              }
+              .tips2 {
+                margin-left: pxtovw(5);
+                height: pxtovw(17);
+                font-size: pxtovw(11);
+                font-weight: 400;
+                text-align: left;
+                color: #ff3f19;
+                line-height: pxtovw(16);
+              }
+            }
           }
         }
 

+ 170 - 0
assets/css/otherpage/money/index.scss

@@ -0,0 +1,170 @@
+@import "../../scssCommon.scss";
+
+.main {
+  margin-top: 0;
+}
+
+.index {
+  overflow-x: hidden;
+  overflow-y: hidden;
+  margin: 0;
+  width: 100vw;
+  height: 100vh;
+  position: relative;
+
+  .contentInfo {
+    background-color: #fff;
+
+    .titleInfo {
+      height: pxtovw(84);
+      display: flex;
+      justify-content: center;
+      align-items: center;
+      flex-direction: column;
+      .stitle {
+        height: pxtovw(24);
+        font-size: pxtovw(17);
+        font-weight: 500;
+        text-align: center;
+        color: #222222;
+        line-height: pxtovw(24);
+      }
+      .sdesc {
+        margin-top: pxtovw(2);
+        height: pxtovw(17);
+        font-size: pxtovw(12);
+        font-weight: 400;
+        text-align: center;
+        color: #999999;
+        line-height: pxtovw(17);
+      }
+    }
+    .line {
+      width: 321px;
+      height: 2px;
+      background-color: rgba(#979797, 0.1);
+      margin: 0 auto;
+    }
+    .moneyInfo {
+      background-color: #fff;
+
+      height: pxtovw(208);
+      box-sizing: border-box;
+      padding: pxtovw(55) pxtovw(15);
+      .normal {
+        display: flex;
+        align-items: center;
+        .label {
+          margin-left: pxtovw(75);
+          height: pxtovw(21);
+          font-size: pxtovw(15);
+          font-weight: 400;
+          text-align: right;
+          color: #999999;
+          line-height: pxtovw(21);
+        }
+        .nums {
+          margin-left: pxtovw(4);
+          height: pxtovw(28);
+          font-size: pxtovw(20);
+          font-weight: 600;
+          text-align: left;
+          color: #222222;
+          line-height: pxtovw(28);
+        }
+
+        &.freeze {
+          margin-top: pxtovw(20);
+        }
+      }
+    }
+    .submitArea {
+      background-color: #fff;
+
+      box-sizing: border-box;
+      padding: pxtovw(24);
+
+      .agreeInfo {
+        display: flex;
+        justify-content: center;
+        align-items: center;
+        .choose {
+          width: pxtovw(20);
+          height: pxtovw(20);
+          background-repeat: no-repeat;
+          background-size: cover;
+          background-image: url('~@/assets/img/other/money/selected_none@2x.png');
+          &.ok {
+            background-image: url('~@/assets/img/other/money/selected_ok@2x.png');
+          }
+        }
+        .word {
+          height: pxtovw(18);
+          font-size: pxtovw(13);
+          font-weight: 400;
+          text-align: center;
+          color: #999999;
+          line-height: pxtovw(18);
+        }
+        .word1 {
+          display: block;
+          height: pxtovw(18);
+          font-size: pxtovw(13);
+          font-weight: 400;
+          text-align: left;
+          color: #308eff;
+          line-height: pxtovw(18);
+        }
+      }
+      .agreeBtn {
+        margin: pxtovw(20) auto pxtovw(5) auto;
+        width: pxtovw(274);
+        height: pxtovw(44);
+        background: #308eff;
+        border-radius: pxtovw(4);
+        box-shadow: 0 pxtovw(2) pxtovw(6) 0 rgba(48,142,255,0.3);
+        display: flex;
+        justify-content: center;
+        align-items: center;
+        p {
+          height: pxtovw(21);
+          font-size: pxtovw(15);
+          font-weight: 500;
+          text-align: center;
+          color: #ffffff;
+          line-height: pxtovw(21);
+        }
+      }
+    }
+
+  }
+
+  .connect {
+    position: absolute;
+    bottom: pxtovw(60);
+    left: 50%;
+    transform: translateX(-50%);
+    height: pxtovw(18);
+    font-size: pxtovw(13);
+    font-weight: 400;
+    text-align: center;
+    color: #999999;
+    line-height: pxtovw(18);
+    width: fit-content;
+    span {
+      height: pxtovw(18);
+      font-size: pxtovw(13);
+      font-weight: 400;
+      text-align: center;
+      color: #308EFF;
+      line-height: pxtovw(18);
+    }
+  }
+
+  .bottomArea {
+    position: absolute;
+    bottom: 0;
+    left: 0;
+    height: pxtovw(50);
+  }
+}

+ 154 - 0
assets/css/otherpage/money/introduce.scss

@@ -0,0 +1,154 @@
+@import "../../scssCommon.scss";
+
+.main {
+  margin-top: 0;
+}
+
+.introduce {
+  overflow-x: hidden;
+  overflow-y: hidden;
+  margin: 0;
+  width: 100vw;
+  height: 100vh;
+  position: relative;
+
+  .topContent {
+    width: 100%;
+    height: pxtovw(169);
+    background: url('../../../assets/img/other/money/intro_bg@2x.png') no-repeat;
+    background-size: cover;
+    box-sizing: border-box;
+    padding: pxtovw(15);
+    display: flex;
+    flex-direction: column;
+    justify-content: center;
+    .title {
+      height: pxtovw(37);
+      font-size: pxtovw(26);
+      font-weight: 600;
+      text-align: left;
+      color: #ffffff;
+      line-height: pxtovw(37);
+      letter-spacing: 0;
+    }
+    .desc {
+      margin-top: pxtovw(2);
+      height: pxtovw(17);
+      font-size: pxtovw(12);
+      font-weight: 400;
+      text-align: left;
+      color: #ffffff;
+      line-height: pxtovw(17);
+      letter-spacing: 0;
+    }
+  }
+  .bodyIntro {
+    box-sizing: border-box;
+    padding: pxtovw(15);
+    background-color: #fff;
+
+    .desc {
+      width: pxtovw(342);
+      height: pxtovw(75);
+      font-size: pxtovw(14);
+      font-weight: 400;
+      text-align: left;
+      color: #333333;
+      line-height: pxtovw(25);
+    }
+
+    &:first-child {
+      align-items:center;
+    }
+
+    .step {
+      display: flex;
+      align-items: flex-start;
+
+      &.step1 {
+        margin-top: pxtovw(20);
+        align-items:center;
+      }
+      &.step2 {
+        margin-top: pxtovw(17);
+        align-items:flex-start;
+      }
+
+      .iconStep {
+        flex-shrink: 0;
+        width: pxtovw(26);
+        height: pxtovw(26);
+        background-repeat: no-repeat;
+        background-size: cover;
+      }
+
+      .icon1 {
+        background-image: url('../../../assets/img/other/money/step1@2x.png');
+      }
+      .icon2 {
+        background-image: url('../../../assets/img/other/money/step2@2x.png');
+      }
+      .stepDesc {
+        margin-left: pxtovw(10);
+        font-size: pxtovw(14);
+        font-weight: 600;
+        text-align: left;
+        color: #222222;
+        line-height: pxtovw(20);
+        max-height: pxtovw(40);
+        word-break: break-all;
+        white-space: normal;
+      }
+    }
+    .useBtn {
+      margin: pxtovw(33) auto;
+      width: pxtovw(345);
+      height: pxtovw(44);
+      background: #308eff;
+      border-radius: pxtovw(4);
+      box-shadow: 0px pxtovw(2) pxtovw(6) 0px rgba(48,142,255,0.3);
+      display: flex;
+      justify-content: center;
+      align-items: center;
+
+      p {
+        height: pxtovw(21);
+        font-size: pxtovw(15);
+        font-weight: 500;
+        text-align: center;
+        color: #ffffff;
+        line-height: pxtovw(21);
+      }
+    }
+  }
+
+  .connect {
+    position: absolute;
+    bottom: pxtovw(60);
+    left: 50%;
+    transform: translateX(-50%);
+    height: pxtovw(18);
+    font-size: pxtovw(13);
+    font-weight: 400;
+    text-align: center;
+    color: #999999;
+    line-height: pxtovw(18);
+    width: fit-content;
+    span {
+      height: pxtovw(18);
+      font-size: pxtovw(13);
+      font-weight: 400;
+      text-align: center;
+      color: #308EFF;
+      line-height: pxtovw(18);
+    }
+  }
+
+  .bottomArea {
+    position: absolute;
+    bottom: 0;
+    left: 0;
+    height: pxtovw(50);
+  }
+}
+

+ 131 - 0
assets/css/otherpage/money/uploadInvoice.scss

@@ -0,0 +1,131 @@
+@import "../../scssCommon.scss";
+
+.main {
+  margin-top: 0;
+}
+
+.uploadInvoice {
+  .ruleIntro {
+    background-color: #fff;
+    box-sizing: border-box;
+    padding: pxtovw(22) pxtovw(15);
+    width: 100%;
+
+    .stitle {
+      font-size: pxtovw(13);
+      font-weight: 500;
+      text-align: left;
+      color: #222222;
+      line-height: pxtovw(20);
+    }
+    .sdesc {
+      font-size: pxtovw(13);
+      font-weight: 500;
+      text-align: left;
+      color: #222222;
+      line-height: pxtovw(20);
+    }
+  }
+  .imageUpload {
+    margin-top: pxtovw(10);
+    background-color: #fff;
+    box-sizing: border-box;
+    padding: pxtovw(17) pxtovw(15) pxtovw(25) pxtovw(15);
+    width: 100%;
+
+    .stitle {
+      height: pxtovw(20);
+      font-size: pxtovw(14);
+      font-weight: 500;
+      text-align: left;
+      color: #2c343e;
+      line-height: pxtovw(20);
+    }
+    .uploadInfo {
+      display: flex;
+      margin: pxtovw(22) auto 0 auto;
+      width: pxtovw(255);
+      height: pxtovw(157);
+      flex-shrink: 0;
+      overflow: hidden;
+      position: relative;
+      background: #fff;
+      .el-icon-delete {
+        display: none;
+      }
+      .avatar-uploader .el-upload {
+        width: pxtovw(255);
+        height: pxtovw(157);
+        border: 1px dashed #6f6c6f;
+        cursor: pointer;
+        position: relative;
+        overflow: hidden;
+        img {
+          width: 100%;
+          height: auto;
+          object-fit: contain;
+          object-position: top left;
+        }
+      }
+      .avatar-uploader .el-upload:hover {
+        border-color: #409eff;
+        .el-icon-delete {
+          display: block;
+        }
+      }
+      .avatar-uploader-icon {
+        position: absolute;
+        top: 0;
+        left: 0;
+        font-size: 44px;
+        color: #6f6c6f;;
+        width: pxtovw(255);
+        height: pxtovw(157);
+        line-height: pxtovw(157);
+        text-align: center;
+      }
+      .avatar {
+        width: pxtovw(255);
+        height: pxtovw(157);
+        display: block;
+      }
+      .noneImage {
+        width: pxtovw(255);
+        height: pxtovw(157);
+        background: url('~@/assets/img/other/money/invoice_bg@2x.png') no-repeat;
+        background-size: cover;
+      }
+      .title {
+        position: absolute;
+        left: 50%;
+        bottom: 40px;
+        transform: translateX(-50%);
+        font-size: 13px;
+        font-weight: 500;
+        color: #409eff;
+        line-height: 18px;
+        text-decoration: underline;
+      }
+      //invoice_bg@2x.png
+    }
+  }
+  .button {
+    margin: pxtovw(38) auto 0 auto;
+    width: pxtovw(345);
+    height: pxtovw(46);
+    background: #308eff;
+    border-radius: pxtovw(4);
+    box-shadow: 0 pxtovw(2) pxtovw(6) 0 rgba(48, 142, 255, 0.3);
+    display: flex;
+    justify-content: center;
+    align-items: center;
+    p {
+      height: pxtovw(21);
+      font-size: pxtovw(15);
+      font-weight: 500;
+      text-align: center;
+      color: #ffffff;
+      line-height: pxtovw(21);
+    }
+  }
+}

+ 282 - 0
assets/css/otherpage/money/withdraw.scss

@@ -0,0 +1,282 @@
+@import "../../scssCommon.scss";
+
+.main {
+  margin-top: 0;
+}
+
+.withdraw {
+  .tabBankCard {
+    background-color: #fff;
+    width: 100%;
+    height: pxtovw(55);
+    padding: 0 pxtovw(15);
+    display: flex;
+    justify-content: space-between;
+    align-items: center;
+    .left {
+      height: pxtovw(22);
+      font-size: pxtovw(16);
+      font-weight: 400;
+      text-align: left;
+      color: #333333;
+      line-height: pxtovw(22);
+    }
+    .right {
+      display: flex;
+      justify-content: flex-end;
+      align-items: center;
+      .word {
+        height: pxtovw(22);
+        font-size: pxtovw(16);
+        font-weight: 400;
+        text-align: right;
+        color: #acacac;
+        line-height: pxtovw(22);
+        letter-spacing: 0;
+      }
+      .iconRight {
+        margin-left: pxtovw(10);
+        flex-shrink: 0;
+        height: pxtovw(14);
+        width: pxtovw(8);
+        background: url('~@/assets/img/credit/rightIcon.png') no-repeat;
+        background-size: cover;
+      }
+    }
+  }
+  .setAmount {
+    background-color: #fff;
+    margin-top: pxtovw(10);
+    box-sizing: border-box;
+    padding: pxtovw(15) pxtovw(10) 0 pxtovw(10);
+    .stitle {
+      height: pxtovw(18);
+      font-size: pxtovw(13);
+      font-weight: 400;
+      text-align: left;
+      color: #666666;
+      line-height: pxtovw(18);
+    }
+    .amountArea {
+      display: flex;
+      justify-content: space-between;
+      align-items: center;
+      height: pxtovw(68);
+      .left {
+        display: flex;
+        align-items: flex-start;
+        .pre {
+          margin-top: pxtovw(10);
+          font-size: pxtovw(20);
+          font-weight: 700;
+          text-align: left;
+          color: #333333;
+        }
+        .nums {
+          margin-left: pxtovw(6);
+          max-width: pxtovw(200);
+          height: pxtovw(37);
+          font-size: pxtovw(32);
+          font-weight: 700;
+          text-align: left;
+          color: #333333;
+          line-height: pxtovw(37);
+        }
+      }
+      .rightClose {
+        width: pxtovw(24);
+        height: pxtovw(24);
+        margin-right: pxtovw(5);
+        background: url('~@/assets/img/other/money/close@2x.png') no-repeat;
+        background-size: cover;
+      }
+    }
+    .line {
+      width: pxtovw(355);
+      margin: 0 auto;
+      height: pxtovw(1);
+      background: #f3f3f3
+    }
+    .amountBottom {
+      height: pxtovw(40);
+      display: flex;
+      justify-content: space-between;
+      align-items: center;
+      box-sizing: border-box;
+      padding: 0 pxtovw(5);
+      .leftMoney {
+        font-size: pxtovw(13);
+        font-weight: 400;
+        text-align: left;
+        color: #999999;
+        line-height: pxtovw(18);
+        letter-spacing: 0;
+        height: pxtovw(18);
+        span {
+          height: pxtovw(20);
+          font-size: pxtovw(14);
+          font-family: PingFangSC, PingFangSC-Semibold;
+          font-weight: 600;
+          text-align: left;
+          color: #333333;
+          line-height: pxtovw(20);
+        }
+      }
+      .rightBtn {
+        height: pxtovw(20);
+        font-size: pxtovw(14);
+        font-weight: 600;
+        text-align: right;
+        color: #308eff;
+        line-height: pxtovw(20);
+      }
+    }
+  }
+  .taxScheme {
+    background-color: #fff;
+    margin-top: pxtovw(10);
+    box-sizing: border-box;
+    padding: pxtovw(15) pxtovw(15) 0 pxtovw(15);
+    .stitle {
+      height: pxtovw(24);
+      font-size: pxtovw(17);
+      font-weight: 500;
+      text-align: left;
+      color: #222222;
+      line-height: pxtovw(24);
+    }
+    .sdesc {
+      height: pxtovw(17);
+      font-size: pxtovw(12);
+      font-weight: 400;
+      text-align: left;
+      color: #999999;
+      line-height: pxtovw(17);
+      margin-top: pxtovw(2);
+      margin-bottom: pxtovw(9);
+    }
+    .schemeList {
+      .cell {
+        width: pxtovw(345);
+        height: pxtovw(74);
+        background: #ffffff;
+        box-shadow: 0 0 0 0 #f3f3f3 inset;
+        display: flex;
+        justify-content: flex-start;
+        align-items: flex-start;
+        .leftChoose {
+          width: pxtovw(24);
+          height: pxtovw(24);
+          background-repeat: no-repeat;
+          background-size: cover;
+          background-image: url('~@/assets/img/other/money/selected_none@2x.png');
+          &.ok {
+            background-image: url('~@/assets/img/other/money/selected_ok@2x.png');
+          }
+        }
+        .rightContent {
+          margin-left: pxtovw(10);
+          width: 100%;
+          .taxTop {
+            display: flex;
+            justify-content: space-between;
+            align-items: center;
+            width: 100%;
+            .topLeft {
+              height: pxtovw(22);
+              font-size: pxtovw(16);
+              font-weight: 600;
+              text-align: left;
+              color: #333333;
+              line-height: pxtovw(22);
+            }
+            .topRight {
+              height: pxtovw(14);
+              font-size: pxtovw(10);
+              font-weight: 400;
+              text-align: right;
+              color: #999999;
+              line-height: pxtovw(14);
+              letter-spacing: 0;
+              a {
+                height: pxtovw(14);
+                font-size: pxtovw(10);
+                font-weight: 400;
+                text-align: right;
+                color: #308eff;
+                line-height: pxtovw(14);
+                letter-spacing: 0;
+              }
+            }
+          }
+          .taxContent {
+            margin-top: pxtovw(2);
+            height: pxtovw(17);
+            font-size: pxtovw(12);
+            font-weight: 400;
+            text-align: left;
+            color: #999999;
+            line-height: pxtovw(17);
+            letter-spacing: 0;
+          }
+        }
+      }
+    }
+  }
+  .submitBtn {
+    margin: pxtovw(18) auto 0 auto;
+    width: pxtovw(345);
+    height: pxtovw(46);
+    background: #308eff;
+    border-radius: pxtovw(4);
+    box-shadow: 0 pxtovw(2) pxtovw(6) 0 rgba(48,142,255,0.3);
+    display: flex;
+    justify-content: center;
+    align-items: center;
+    p {
+      height: pxtovw(21);
+      font-size: pxtovw(15);
+      font-weight: 500;
+      text-align: center;
+      color: #ffffff;
+      line-height: pxtovw(21);
+    }
+  }
+  .wTips {
+    margin: pxtovw(14) auto 0 auto;
+    height: pxtovw(18);
+    font-size: pxtovw(13);
+    font-weight: 400;
+    text-align: center;
+    color: #222222;
+    line-height: pxtovw(18);
+  }
+  .intro {
+    margin-top: pxtovw(28);
+    width: 100%;
+    box-sizing: border-box;
+    padding: 0 pxtovw(15);
+
+    .stitle {
+      font-size: pxtovw(14);
+      font-weight: 600;
+      text-align: left;
+      color: #222222;
+      line-height: pxtovw(20);
+    }
+    .sdesc {
+      font-size: pxtovw(14);
+      font-weight: 400;
+      text-align: left;
+      color: #999999;
+      line-height: pxtovw(24);
+      a {
+        font-size: pxtovw(14);
+        font-weight: 400;
+        text-align: left;
+        color: #308EFF;
+        line-height: pxtovw(24);
+      }
+    }
+  }
+}

BIN=BIN
assets/img/other/money/close@2x.png


BIN=BIN
assets/img/other/money/intro_bg@2x.png


BIN=BIN
assets/img/other/money/invoice_bg@2x.png


BIN=BIN
assets/img/other/money/selected_none@2x.png


BIN=BIN
assets/img/other/money/selected_ok@2x.png


BIN=BIN
assets/img/other/money/step1@2x.png


BIN=BIN
assets/img/other/money/step2@2x.png


BIN=BIN
assets/img/other/money/tabbar_icon_1_nor@2x.png


BIN=BIN
assets/img/other/money/tabbar_icon_1_sel@2x.png


BIN=BIN
assets/img/other/money/tabbar_icon_2_nor@2x.png


BIN=BIN
assets/img/other/money/tabbar_icon_2_sel@2x.png


+ 10 - 8
components/header.vue

@@ -16,7 +16,7 @@
           <el-dropdown-item>
             <a
               class="workstation"
-              :href="baseUrl+'/job/'"
+              :href="jobUrl+'/?from=top_nav'"
               style="display: flex; align-items: center;"
             >
               <img
@@ -46,7 +46,7 @@
           <el-dropdown-item>
             <a
               class="workstation"
-              :href="baseUrl+'/kaifain'"
+              :href="kaifainUrl+'/'"
               style="display: flex; align-items: center;"
             >
               <img
@@ -263,12 +263,13 @@ export default {
       baseUrl: "",
       jishuBaseUrl: "",
       kaifainUrl: "",
+      jobUrl: "",
       // 搜索的关键词
       keywork: "",
       // 消息数量
       messageCount: {},
       WhiteLogo,
-      loginUrl: ""
+      loginUrl: "",
     };
   },
   computed: {
@@ -276,7 +277,7 @@ export default {
       let userinfo = this.$store.state.userinfo;
       return {
         id: userinfo.vip_type_id,
-        endDate: userinfo.vip_end_date
+        endDate: userinfo.vip_end_date,
       };
     },
     myInfo() {
@@ -330,7 +331,7 @@ export default {
         default:
           return "";
       }
-    }
+    },
   },
   mounted() {
     if (this.myInfo && this.myInfo.nickname) {
@@ -349,7 +350,7 @@ export default {
       location.href = this.baseUrl + url;
     },
     clickInputEnter() {
-      window.location.href = this.baseUrl + "/kaifain/?keyword=" + this.keywork;
+      window.location.href = this.kaifainUrl + "/?keyword=" + this.keywork;
     },
     async getMessageCount() {
       let res = await this.$axios.$get(
@@ -360,13 +361,14 @@ export default {
       if (res) {
         this.messageCount = res.data;
       }
-    }
+    },
   },
   created() {
     this.baseUrl = this.$store.state.domainConfig.siteUrl;
     this.jishuBaseUrl = this.$store.state.domainConfig.jishuinUrl;
     this.kaifainUrl = this.$store.state.domainConfig.kaifainUrl;
-  }
+    this.jobUrl = this.$store.state.domainConfig.jobUrl;
+  },
 };
 </script>
 

+ 69 - 69
components/job/bottomBanner.vue

@@ -14,89 +14,89 @@
 </template>
 
 <script>
-  export default {
-    props: [],
-    components: {},
-    data() {
-      return {
-        mobile: false,
-      }
+export default {
+  props: [],
+  components: {},
+  data() {
+    return {
+      mobile: false,
+    };
+  },
+  computed: {},
+  mounted() {},
+  methods: {
+    /** banner挑战 **/
+    jumpToCatHandler() {
+      location.href = this.$store.state.domainConfig.jobUrl + "/?from=top_nav";
     },
-    computed: {},
-    mounted() {
+    needFindJobHandler() {
+      this.$message.warning("请前往程序员客栈APP,发布兼职招聘");
     },
-    methods: {
-      /** banner挑战 **/
-      jumpToCatHandler() {
-        location.href = "/job/?from=top_nav"
-      },
-      needFindJobHandler() {
-        this.$message.warning('请前往程序员客栈APP,发布兼职招聘')
-      }
-    }
-  };
+  },
+};
 </script>
 
 <style lang="scss">
-  @import "~@/assets/css/scssCommon.scss";
+@import "~@/assets/css/scssCommon.scss";
 
-  .bottomBanner {
-    width: 1000px;
-    height: 250px;
+.bottomBanner {
+  width: 1000px;
+  height: 250px;
+  display: flex;
+  justify-content: center;
+  align-items: center;
+  flex-direction: column;
+  background: url("~@/assets/img/job/banner_bottom.png") no-repeat;
+  background-size: contain;
+  margin: 10px auto;
+
+  .title {
+    height: 72px;
+    font-size: 41px;
+    font-weight: 600;
+    color: rgba(255, 255, 255, 1);
+    line-height: 72px;
+    letter-spacing: 2px;
+  }
+  .desc {
+    height: 26px;
+    font-size: 19px;
+    font-weight: 400;
+    color: rgba(255, 255, 255, 1);
+    line-height: 26px;
+  }
+  .btnList {
+    width: 100%;
+    margin-top: 20px;
     display: flex;
     justify-content: center;
     align-items: center;
-    flex-direction: column;
-    background: url("~@/assets/img/job/banner_bottom.png") no-repeat;
-    background-size: contain;
-    margin: 10px auto;
-
-    .title {
-      height:72px;
-      font-size:41px;
-      font-weight:600;
-      color:rgba(255,255,255,1);
-      line-height:72px;
-      letter-spacing:2px;
-    }
-    .desc {
-      height:26px;
-      font-size:19px;
-      font-weight:400;
-      color:rgba(255,255,255,1);
-      line-height:26px;
-    }
-    .btnList {
-      width: 100%;
-      margin-top: 20px;
+    .left,
+    .right {
+      width: 165px;
+      height: 43px;
+      background: rgba(255, 255, 255, 1);
+      border-radius: 2px;
       display: flex;
       justify-content: center;
       align-items: center;
-      .left, .right {
-        width:165px;
-        height:43px;
-        background:rgba(255,255,255,1);
-        border-radius:2px;
-        display: flex;
-        justify-content: center;
-        align-items: center;
-        cursor: pointer;
-        p {
-          height:22px;
-          font-size:16px;
-          font-weight:500;
-          color:rgba(61,108,255,1);
-          line-height:22px;
-        }
+      cursor: pointer;
+      p {
+        height: 22px;
+        font-size: 16px;
+        font-weight: 500;
+        color: rgba(61, 108, 255, 1);
+        line-height: 22px;
       }
-      .right {
-        margin-left: 20px;
-        border:1px solid rgba(255,255,255,1);
-        background: transparent;
-        p {
-          color:rgba(255,255,255,1);
-        }
+    }
+    .right {
+      margin-left: 20px;
+      border: 1px solid rgba(255, 255, 255, 1);
+      background: transparent;
+      p {
+        color: rgba(255, 255, 255, 1);
       }
     }
   }
+}
 </style>

+ 147 - 78
components/job/dealSeoFooter.js

@@ -1,9 +1,16 @@
 export default class DealSeoData {
-  constructor({ $axios, req, app, redirect }, recruitData) {
+  constructor({
+    $axios,
+    req,
+    app,
+    redirect,
+    store,
+  }, recruitData) {
     this.$axios = $axios
     this.req = req
     this.app = app
     this.redirect = redirect
+    this.store = store
     this.selected = {
       city: 0,
       direction: 0, //职业角色 大
@@ -12,16 +19,24 @@ export default class DealSeoData {
     }
     this.recruitData = recruitData
   }
-  
+
   async dealData() {
-    let { name, path, params, fullPath } = this.app.context.route
-  
+    let {
+      name,
+      path,
+      params,
+      fullPath
+    } = this.app.context.route
+
     let typeList = await this.getTypeList()
     this.typeList = typeList
-    
-    let list = [], keys = []
+
+    let list = [],
+      keys = [];
     switch (name) {
       case "JobListSeoIndex":
+      case "job_$":
+      case "JobListSeoIndex_$":
         let match = params.pathMatch || ''
         list = match.split('/').map(item => item.toLocaleLowerCase())
         list.length = Math.min(list.length, 3) //防止url超出
@@ -32,44 +47,44 @@ export default class DealSeoData {
     }
     //3 * 3 * n的循环 n < 100
     list.forEach(item => {
-      keys.forEach(keys => {
-        typeList[ keys ].list.forEach(typeItem => {
+      keys.forEach(key => {
+        typeList[key].list.forEach(typeItem => {
           if (typeItem.slug === item) {
-            this.selected[ keys ] = typeItem.id
-            this.selected[ keys + 'Name' ] = typeItem.name
-            this.selected[ keys + 'Slug' ] = typeItem.slug
-            if (keys === 'city') {
-              this.selected[ "provice" ] = typeItem.prov_id
+            this.selected[key] = typeItem.id
+            this.selected[key + 'Name'] = typeItem.name
+            this.selected[key + 'Slug'] = typeItem.slug
+            if (key === 'city') {
+              this.selected["provice"] = typeItem.prov_id
             }
-            if (keys === "direction" && typeItem.children && typeItem.children.length > 1) {
-              typeList[ keys ].smallList = typeItem.children
-              this.selected[ 'directionSmall' ] = 0
-              this.selected[ 'directionSmallName' ] = "全部"
+            if (key === "direction" && typeItem.children && typeItem.children.length > 1) {
+              typeList[key].smallList = typeItem.children
+              this.selected['directionSmall'] = 0
+              this.selected['directionSmallName'] = "全部"
             }
           }
-          if (keys === "direction" && Array.isArray(typeItem.children)) { //查询是否在子分类
+          if (key === "direction" && Array.isArray(typeItem.children)) { //查询是否在子分类
             typeItem.children.forEach(child => {
               if (child.slug === item) {
-                this.selected[ 'direction' ] = typeItem.id
-                this.selected[ 'directionName' ] = typeItem.name
-                this.selected[ 'directionSlug' ] = typeItem.slug
-                this.selected[ 'directionSmall' ] = child.id
-                this.selected[ 'directionSmallName' ] = child.name
-                this.selected[ 'directionSmallSlug' ] = child.slug
-                typeList[ keys ].smallList = typeItem.children
+                this.selected['direction'] = typeItem.id
+                this.selected['directionName'] = typeItem.name
+                this.selected['directionSlug'] = typeItem.slug
+                this.selected['directionSmall'] = child.id
+                this.selected['directionSmallName'] = child.name
+                this.selected['directionSmallSlug'] = child.slug
+                typeList[key].smallList = typeItem.children
               }
             })
           }
         })
       })
     })
-    
     return {
+      selected: this.selected,
       footer: await this.getFooterData(),
     }
   }
-  
-  
+
+
   async getTypeList() {
     let res = await this.$axios.get('/api/recruit/get_options')
     let typeList = {
@@ -84,19 +99,26 @@ export default class DealSeoData {
       },
       workType: {
         title: '工作方式',
-        list: [ { id: 0, name: "全部" }, { id: 1, name: "远程", slug: "yuancheng" }, {
+        list: [{
+          id: 0,
+          name: "全部"
+        }, {
+          id: 1,
+          name: "远程",
+          slug: "yuancheng"
+        }, {
           id: 2,
           name: "驻场",
           slug: "zhuchang"
-        } ]
+        }]
       }
     }
-    
+
     if (Number(res.data.status) === 1) {
       // res.data.data.direction.unshift({ id: 0, name: "全部" })
       // res.data.data.cities.unshift({ id: 0, name: "全部" })
       Object.keys(res.data.data).forEach(key => {
-        let item = res.data.data[ key ]
+        let item = res.data.data[key]
         if (Array.isArray(item)) {
           item.forEach(ii => {
             ii.name = ii.name || ii.occupation_name || ""
@@ -110,93 +132,141 @@ export default class DealSeoData {
           })
         }
       })
-      typeList.direction.list = [ ...res.data.data.direction ]
-      typeList.city.list = [ ...res.data.data.cities ]
+      typeList.direction.list = [...res.data.data.direction]
+      typeList.city.list = [...res.data.data.cities]
     }
     return typeList
   }
-  
+
   async getFooterData() {
     //设置底部link列表
     const typeList = this.typeList
-    const { city, citySlug, cityName = "", direction, directionName = "", directionSlug, directionSmall, directionSmallName = "", directionSmallSlug } = this.selected
+    const {
+      city,
+      citySlug,
+      cityName = "",
+      direction,
+      directionName = "",
+      directionSlug,
+      directionSmall,
+      directionSmallName = "",
+      directionSmallSlug
+    } = this.selected
     let job = directionSmall || direction
-    let jobName = directionSmallName === "全部" ?  directionName : (directionSmallName || directionName)
+    let jobName = directionSmallName === "全部" ? directionName : (directionSmallName || directionName)
     let jobSlug = directionSmallSlug || directionSlug
-    const { headers: { host } } = this.req
+
+    let baseUrl = this.store.state.domainConfig.siteUrl;
+    let jishuBaseUrl = this.store.state.domainConfig.jishuinUrl;
+    let kaifainUrl = this.store.state.domainConfig.kaifainUrl;
+    let jobUrl = this.store.state.domainConfig.jobUrl;
     let footer = {
-      baseLink: "", link: [
-        { name: "", data: [] }, { name: "", data: [] },
-      ],
-    }
-    //设置baseLink
-    if (host.indexOf('local') !== -1) {
-      footer.baseLink = 'http://' + host
-    } else {
-      footer.baseLink = 'https://' + host
+      baseLink: baseUrl,
+      link: [{
+        name: "",
+        data: []
+      }, {
+        name: "",
+        data: []
+      }, ],
     }
     if (city && job) {
       //兼职城市&岗位页  ${jobName}兼职招聘>${cityName}${jobName}兼职招聘,并赋予对应的url
-      footer.link[ 0 ].name = `热门城市${jobName}兼职招聘`
-      footer.link[ 0 ].data = typeList.city.list.map((item) => {
-        return { name: `${item.name}${jobName}兼职招聘`, url: `/job/${jobSlug}/${item.slug}/` }
+      footer.link[0].name = `热门城市${jobName}兼职招聘`
+      footer.link[0].data = typeList.city.list.map((item) => {
+        return {
+          name: `${item.name}${jobName}兼职招聘`,
+          url: `${jobUrl}/${jobSlug}/${item.slug}/`
+        }
       })
-      footer.link[ 1 ].name = `${cityName}热门岗位兼职招聘`
-      footer.link[ 1 ].data = []
+      footer.link[1].name = `${cityName}热门岗位兼职招聘`
+      footer.link[1].data = []
       typeList.direction.list.forEach((item) => {
-        footer.link[ 1 ].data.push({ name: `${cityName}${item.name}兼职招聘`, url: `/job/${citySlug}/${item.slug}/` })
+        footer.link[1].data.push({
+          name: `${cityName}${item.name}兼职招聘`,
+          url: `${jobUrl}/${citySlug}/${item.slug}/`
+        })
         if (Array.isArray(item.children)) {
           item.children.forEach(item1 => {
-            footer.link[ 1 ].data.push({ name: `${cityName}${item1.name}兼职招聘`, url: `/job/${citySlug}/${item1.slug}/` })
+            footer.link[1].data.push({
+              name: `${cityName}${item1.name}兼职招聘`,
+              url: `${jobUrl}/${citySlug}/${item1.slug}/`
+            })
           })
         }
       })
     } else if (city && !job) {
       //兼职城市
-      footer.link[ 0 ].name = "热门城市兼职招聘"
-      footer.link[ 0 ].data = typeList.city.list.map((item) => {
-        return { name: `${item.name}兼职招聘`, url: `/job/${item.slug}/` }
+      footer.link[0].name = "热门城市兼职招聘"
+      footer.link[0].data = typeList.city.list.map((item) => {
+        return {
+          name: `${item.name}兼职招聘`,
+          url: `${jobUrl}/${item.slug}/`
+        }
       })
-      footer.link[ 1 ].name = `${cityName}热门岗位兼职招聘`
-      footer.link[ 1 ].data = []
+      footer.link[1].name = `${cityName}热门岗位兼职招聘`
+      footer.link[1].data = []
       typeList.direction.list.forEach((item) => {
-        footer.link[ 1 ].data.push({ name: `${cityName}${item.name}兼职招聘`, url: `/job/${citySlug}/${item.slug}/` })
+        footer.link[1].data.push({
+          name: `${cityName}${item.name}兼职招聘`,
+          url: `${jobUrl}/${citySlug}/${item.slug}/`
+        })
         if (Array.isArray(item.children)) {
           item.children.forEach(item1 => {
-            footer.link[ 1 ].data.push({ name: `${cityName}${item1.name}兼职招聘`, url: `/job/${citySlug}/${item1.slug}/` })
+            footer.link[1].data.push({
+              name: `${cityName}${item1.name}兼职招聘`,
+              url: `${jobUrl}/${citySlug}/${item1.slug}/`
+            })
           })
         }
       })
-    }
-    else if (!city && job) {
+    } else if (!city && job) {
       //岗位页
-      footer.link[ 0 ].name = "热门岗位兼职招聘"
-      footer.link[ 0 ].data = []
+      footer.link[0].name = "热门岗位兼职招聘"
+      footer.link[0].data = []
       typeList.direction.list.forEach((item) => {
-        footer.link[ 0 ].data.push({ name: `${item.name}兼职招聘`, url: `/job/${item.slug}/` })
+        footer.link[0].data.push({
+          name: `${item.name}兼职招聘`,
+          url: `${jobUrl}/${item.slug}/`
+        })
         if (Array.isArray(item.children)) {
           item.children.forEach(item1 => {
-            footer.link[ 0 ].data.push({ name: `${item1.name}兼职招聘`, url: `/job/${item1.slug}/` })
+            footer.link[0].data.push({
+              name: `${item1.name}兼职招聘`,
+              url: `${jobUrl}/${item1.slug}/`
+            })
           })
         }
       })
-      footer.link[ 1 ].name = `热门城市${jobName}兼职招聘`
-      footer.link[ 1 ].data = typeList.city.list.map((item) => {
-        return { name: `${item.name}${jobName}兼职招聘`, url: `/job/${jobSlug}/${item.slug}/` }
+      footer.link[1].name = `热门城市${jobName}兼职招聘`
+      footer.link[1].data = typeList.city.list.map((item) => {
+        return {
+          name: `${item.name}${jobName}兼职招聘`,
+          url: `${jobUrl}/${jobSlug}/${item.slug}/`
+        }
       })
     } else {
       //非特定的url
-      footer.link[ 0 ].name = "热门城市兼职招聘"
-      footer.link[ 0 ].data = typeList.city.list.map((item) => {
-        return { name: `${item.name}兼职招聘`, url: `/job/${item.slug}/` }
+      footer.link[0].name = "热门城市兼职招聘"
+      footer.link[0].data = typeList.city.list.map((item) => {
+        return {
+          name: `${item.name}兼职招聘`,
+          url: `${jobUrl}/${item.slug}/`
+        }
       })
-      footer.link[ 1 ].name = "热门岗位兼职招聘"
-      footer.link[ 1 ].data = []
+      footer.link[1].name = "热门岗位兼职招聘"
+      footer.link[1].data = []
       typeList.direction.list.forEach((item) => {
-        footer.link[ 1 ].data.push({ name: `${item.name}兼职招聘`, url: `/job/${item.slug}/` })
+        footer.link[1].data.push({
+          name: `${item.name}兼职招聘`,
+          url: `${jobUrl}/${item.slug}/`
+        })
         if (Array.isArray(item.children)) {
           item.children.forEach(item1 => {
-            footer.link[ 1 ].data.push({ name: `${item1.name}兼职招聘`, url: `/job/${item1.slug}/` })
+            footer.link[1].data.push({
+              name: `${item1.name}兼职招聘`,
+              url: `${jobUrl}/${item1.slug}/`
+            })
           })
         }
       })
@@ -204,4 +274,3 @@ export default class DealSeoData {
     return footer
   }
 }
-

+ 164 - 59
components/job/dealSeoIndex.js

@@ -1,5 +1,11 @@
 export default class DealSeoData {
-  constructor({ $axios, req, app, redirect, error }) {
+  constructor({
+    $axios,
+    req,
+    app,
+    redirect,
+    error
+  }) {
     this.$axios = $axios
     this.req = req
     this.app = app
@@ -24,18 +30,28 @@ export default class DealSeoData {
   }
 
   async dealData() {
-    let { name, query: { page = 1, c_d = [], keyword='' }, path, params, fullPath } = this.app.context.route
+    let {
+      name,
+      query: {
+        page = 1,
+        c_d = [],
+        keyword = ''
+      },
+      path,
+      params,
+      fullPath
+    } = this.app.context.route
     this.page.page = page
     this.page.keyword = keyword
 
     //兼容APP 如果是带有 ${id}.html的,跳转到详情页
     let endStr = path.split('/').pop()
     if (/([0-9]*\.html)/.test(endStr)) {
-      this.redirect(301, "/job/detail/"+endStr)
+      this.redirect(301, "/job/detail/" + endStr)
       return
     }
 
-    if (path && path[ path.length - 1 ] !== '/') {
+    if (path && path[path.length - 1] !== '/') {
       let reditUrl = fullPath
       reditUrl = reditUrl.replace(path, path + '/')
     }
@@ -59,32 +75,32 @@ export default class DealSeoData {
           //3 * 3 * n的循环 n < 100
           list.forEach(item => {
             keys.forEach(keys => {
-              typeList[ keys ].list.forEach(typeItem => {
+              typeList[keys].list.forEach(typeItem => {
                 if (typeItem.slug === item) {
                   urlCheck += item
-                  this.selected[ keys ] = typeItem.id
-                  this.selected[ keys + 'Name' ] = typeItem.name
-                  this.selected[ keys + 'Slug' ] = typeItem.slug
+                  this.selected[keys] = typeItem.id
+                  this.selected[keys + 'Name'] = typeItem.name
+                  this.selected[keys + 'Slug'] = typeItem.slug
                   if (keys === 'city') {
-                    this.selected[ "provice" ] = typeItem.prov_id
+                    this.selected["provice"] = typeItem.prov_id
                   }
                   if (keys === "direction" && typeItem.children && typeItem.children.length > 1) {
-                    typeList[ keys ].smallList = typeItem.children
-                    this.selected[ 'directionSmall' ] = 0
-                    this.selected[ 'directionSmallName' ] = "全部"
+                    typeList[keys].smallList = typeItem.children
+                    this.selected['directionSmall'] = 0
+                    this.selected['directionSmallName'] = "全部"
                   }
                 }
                 if (keys === "direction" && Array.isArray(typeItem.children)) { //查询是否在子分类
                   typeItem.children.forEach(child => {
                     if (child.slug === item) {
                       urlCheck += item
-                      this.selected[ 'direction' ] = typeItem.id
-                      this.selected[ 'directionName' ] = typeItem.name
-                      this.selected[ 'directionSlug' ] = typeItem.slug
-                      this.selected[ 'directionSmall' ] = child.id
-                      this.selected[ 'directionSmallName' ] = child.name
-                      this.selected[ 'directionSmallSlug' ] = child.slug
-                      typeList[ keys ].smallList = typeItem.children
+                      this.selected['direction'] = typeItem.id
+                      this.selected['directionName'] = typeItem.name
+                      this.selected['directionSlug'] = typeItem.slug
+                      this.selected['directionSmall'] = child.id
+                      this.selected['directionSmallName'] = child.name
+                      this.selected['directionSmallSlug'] = child.slug
+                      typeList[keys].smallList = typeItem.children
                     }
                   })
                 }
@@ -92,15 +108,18 @@ export default class DealSeoData {
             })
           })
           if (urlCheck !== list.join("")) {
-            this.error({ statusCode: 404, message: "您要访问的页面不存在" })
+            this.error({
+              statusCode: 404,
+              message: "您要访问的页面不存在"
+            })
             return
           }
 
-          if (this.selected[ "provice" ]) {
-            let item = this.provinces.filter(item => item.id === this.selected[ "provice" ])[ 0 ]
-            this.selected[ "proviceName" ] = item && item.name
+          if (this.selected["provice"]) {
+            let item = this.provinces.filter(item => item.id === this.selected["provice"])[0]
+            this.selected["proviceName"] = item && item.name
           }
-        } catch ( e ) {
+        } catch (e) {
           console.log("解决方案列表", e)
         }
         break
@@ -136,18 +155,41 @@ export default class DealSeoData {
       },
       workType: {
         title: '工作方式',
-        list: [ { id: 0, name: "全部",  value: 0, text: "全部方式",  },
-          { id: 1, name: "远程", value: 1, text: "远程",  slug: "yuancheng" }, {
-          id: 2, name: "驻场", value: 2, text: "驻场", slug: "zhuchang"
-        } ]
+        list: [{
+            id: 0,
+            name: "全部",
+            value: 0,
+            text: "全部方式",
+          },
+          {
+            id: 1,
+            name: "远程",
+            value: 1,
+            text: "远程",
+            slug: "yuancheng"
+          }, {
+            id: 2,
+            name: "驻场",
+            value: 2,
+            text: "驻场",
+            slug: "zhuchang"
+          }
+        ]
       }
     }
 
     if (Number(res.data.status) === 1) {
-      res.data.data.direction.unshift({ id: 0, name: "全部", children:[] })
-      res.data.data.cities.unshift({ id: 0, name: "全部" })
+      res.data.data.direction.unshift({
+        id: 0,
+        name: "全部",
+        children: []
+      })
+      res.data.data.cities.unshift({
+        id: 0,
+        name: "全部"
+      })
       Object.keys(res.data.data).forEach(key => {
-        let item = res.data.data[ key ]
+        let item = res.data.data[key]
         if (Array.isArray(item)) {
           item.forEach(ii => {
             ii.name = ii.name || ii.occupation_name || ""
@@ -162,23 +204,44 @@ export default class DealSeoData {
                 jj.value = jj.id
               })
               if (ii.children) {
-                ii.children.unshift({ id: 0, name: "全部", value: 0, text: "全部", })
+                ii.children.unshift({
+                  id: 0,
+                  name: "全部",
+                  value: 0,
+                  text: "全部",
+                })
               }
             }
           })
         }
       })
       //单独设置百度app 选择器文案
-      res.data.data.direction[0] = {...res.data.data.direction[0], text: "全部职业", value: 0, }
-      res.data.data.cities[0] = {...res.data.data.cities[0], text: "全部地区", value: 0}
-      typeList.direction.list = [ ...res.data.data.direction ]
-      typeList.city.list = [ ...res.data.data.cities ]
+      res.data.data.direction[0] = {
+        ...res.data.data.direction[0],
+        text: "全部职业",
+        value: 0,
+      }
+      res.data.data.cities[0] = {
+        ...res.data.data.cities[0],
+        text: "全部地区",
+        value: 0
+      }
+      typeList.direction.list = [...res.data.data.direction]
+      typeList.city.list = [...res.data.data.cities]
     }
     return typeList
   }
 
   async getList() {
-    const { page, selected: {city, direction, directionSmall, workType} } = this
+    const {
+      page,
+      selected: {
+        city,
+        direction,
+        directionSmall,
+        workType
+      }
+    } = this
     let p = {
       city: city,
       ...page
@@ -193,7 +256,7 @@ export default class DealSeoData {
       let data = res.data.data
       this.page.total = data.total
       let dataList = data.list || []
-      this.dataList = [ ...dataList ]
+      this.dataList = [...dataList]
       this.page.page += 1
       this.page.current = Number(data.page)
       if (this.page.total <= this.dataList.length) {
@@ -204,23 +267,42 @@ export default class DealSeoData {
 
   dealThisMeta() {
     const {
-      city, cityName = "",
-      direction, directionName = "",
-      directionSmall, directionSmallName,
-      workType, workTypeName, proviceName,
+      city,
+      cityName = "",
+      direction,
+      directionName = "",
+      directionSmall,
+      directionSmallName,
+      workType,
+      workTypeName,
+      proviceName,
     } = this.selected
-    const { headers: { host }, url } = this.req
+
     let job = directionSmall || direction
-    let jobName = directionSmallName === "全部" ?  directionName : (directionSmallName || directionName)
+    let jobName = directionSmallName === "全部" ? directionName : (directionSmallName || directionName)
 
     let head = {
-      title: "", keyword: "", descrption: "", h1: "", canonical: "", metaLocation: ""
+      title: "",
+      keyword: "",
+      descrption: "",
+      h1: "",
+      canonical: "",
+      metaLocation: ""
     }
-    //拼接canonical
-    if (host.indexOf('local') !== -1) {
-      head.canonical = 'http://' + host + url
-    } else {
-      head.canonical = 'https://' + host + url
+    if (this.req) {
+      const {
+        headers: {
+          host
+        },
+        url
+      } = this.req
+
+      //拼接canonical
+      if (host.indexOf('local') !== -1) {
+        head.canonical = 'http://' + host + url
+      } else {
+        head.canonical = 'https://' + host + url
+      }
     }
     if (city && !job) {
       //只有城市的
@@ -251,30 +333,53 @@ export default class DealSeoData {
 
   /** 处理面包屑导航 **/
   dealBreadcrumbList() {
-    let list = [
-      { name: '首页', url: "/" },
-      { name: '兼职招聘', url: "/job/" },
+    let list = [{
+        name: '首页',
+        url: "/"
+      },
+      {
+        name: '兼职招聘',
+        url: "/job/"
+      },
     ]
-    const { city, citySlug, cityName = "", direction, directionName = "", directionSlug, directionSmall, directionSmallName = "", directionSmallSlug } = this.selected
+    const {
+      city,
+      citySlug,
+      cityName = "",
+      direction,
+      directionName = "",
+      directionSlug,
+      directionSmall,
+      directionSmallName = "",
+      directionSmallSlug
+    } = this.selected
     let job = directionSmall || direction
-    let jobName = directionSmallName === "全部" ?  directionName : (directionSmallName || directionName)
+    let jobName = directionSmallName === "全部" ? directionName : (directionSmallName || directionName)
     let jobSlug = directionSmallSlug || directionSlug
 
     if (city && job) {
       //兼职城市&岗位页  ${jobName}兼职招聘>${cityName}${jobName}兼职招聘,并赋予对应的url
-      list.push({ name: `${jobName}兼职招聘`, url: `/job/${jobSlug}/` })
+      list.push({
+        name: `${jobName}兼职招聘`,
+        url: `/job/${jobSlug}/`
+      })
       list.push({
         name: `${cityName}${jobName}兼职招聘`,
         url: `/job/${jobSlug}/${citySlug}/`
       })
     } else if (city && !job) {
       //兼职城市
-      list.push({ name: `${cityName}兼职招聘`, url: `/job/${citySlug}/` })
+      list.push({
+        name: `${cityName}兼职招聘`,
+        url: `/job/${citySlug}/`
+      })
     } else if (!city && job) {
       //岗位页
-      list.push({ name: `${jobName}兼职招聘`, url: `/job/${jobSlug}/` })
+      list.push({
+        name: `${jobName}兼职招聘`,
+        url: `/job/${jobSlug}/`
+      })
     }
     return list
   }
 }
-

+ 14 - 14
components/kaifain/dealSeoFooter.js

@@ -70,10 +70,10 @@ export default class DealSeoData {
       footer.link[ 0 ].name = "热门城市技术解决方案"
       footer.link[ 1 ].name = `${cityName}技术解决方案`
       footer.link[ 0 ].data = typeList.city.map((item) => {
-        return { name: `${item.name}技术解决方案`, url: `/kaifain/${item.slug}/` }
+        return { name: `${item.name}技术解决方案`, url: `${kaifainUrl}/${item.slug}/` }
       })
       footer.link[ 1 ].data = typeList.industry.map((item) => {
-        return { name: `${cityName}${item.name}技术解决方案`, url: `/kaifain/${city}/${item.slug}/` }
+        return { name: `${cityName}${item.name}技术解决方案`, url: `${kaifainUrl}/${city}/${item.slug}/` }
       })
     } else if (!city && industry && !techType) {
       //只有行业的
@@ -81,60 +81,60 @@ export default class DealSeoData {
       
       footer.link[ 1 ].name = `热门城市${industryName}技术解决方案`
       footer.link[ 0 ].data = typeList.industry.map((item) => {
-        return { name: `${item.name}技术解决方案`, url: `/kaifain/${item.slug}/` }
+        return { name: `${item.name}技术解决方案`, url: `${kaifainUrl}/${item.slug}/` }
       })
       footer.link[ 1 ].data = typeList.city.map((item) => {
-        return { name: `${item.name}${industryName}技术解决方案`, url: `/kaifain/${item.slug}/${industry}/` }
+        return { name: `${item.name}${industryName}技术解决方案`, url: `${kaifainUrl}/${item.slug}/${industry}/` }
       })
     } else if (!city && !industry && techType) {
       //只有技术分类
       footer.link[ 0 ].name = `其他行业领域${techTypeName}技术解决方案`
       footer.link[ 1 ].name = `热门城市${techTypeName}技术解决方案`
       footer.link[ 0 ].data = typeList.industry.map((item) => {
-        return { name: `${item.name}${techTypeName}技术解决方案`, url: `/kaifain/${item.slug}/${techType}/` }
+        return { name: `${item.name}${techTypeName}技术解决方案`, url: `${kaifainUrl}/${item.slug}/${techType}/` }
       })
       footer.link[ 1 ].data = typeList.city.map((item) => {
-        return { name: `${item.name}${techTypeName}技术解决方案`, url: `/kaifain/${techType}/${item.slug}/` }
+        return { name: `${item.name}${techTypeName}技术解决方案`, url: `${kaifainUrl}/${techType}/${item.slug}/` }
       })
     } else if (city && industry && !techType) {
       //${cityName}${industryName}
       footer.link[ 0 ].name = `热门城市技术解决方案`
       footer.link[ 1 ].name = `其他行业领域技术解决方案`
       footer.link[ 0 ].data = typeList.city.map((item) => {
-        return { name: `${item.name}技术解决方案`, url: `/kaifain/${item.slug}/` }
+        return { name: `${item.name}技术解决方案`, url: `${kaifainUrl}/${item.slug}/` }
       })
       footer.link[ 1 ].data = typeList.industry.map((item) => {
-        return { name: `${item.name}技术解决方案`, url: `/kaifain/${item.slug}/` }
+        return { name: `${item.name}技术解决方案`, url: `${kaifainUrl}/${item.slug}/` }
       })
     } else if (city && !industry && techType) {
       //${cityName}${techTypeName}
       footer.link[ 0 ].name = `热门城市技术解决方案`
       footer.link[ 1 ].name = `其他行业领域技术解决方案`
       footer.link[ 0 ].data = typeList.city.map((item) => {
-        return { name: `${item.name}技术解决方案`, url: `/kaifain/${item.slug}/` }
+        return { name: `${item.name}技术解决方案`, url: `${kaifainUrl}/${item.slug}/` }
       })
       footer.link[ 1 ].data = typeList.industry.map((item) => {
-        return { name: `${item.name}技术解决方案`, url: `/kaifain/${item.slug}/` }
+        return { name: `${item.name}技术解决方案`, url: `${kaifainUrl}/${item.slug}/` }
       })
     } else if (!city && industry && techType) {
       //${industryName}${techTypeName}
       footer.link[ 0 ].name = `其他行业领域技术解决方案`
       footer.link[ 1 ].name = `其他行业技术分类${industryName}技术解决方案`
       footer.link[ 0 ].data = typeList.industry.map((item) => {
-        return { name: `${item.name}技术解决方案`, url: `/kaifain/${item.slug}/` }
+        return { name: `${item.name}技术解决方案`, url: `${kaifainUrl}/${item.slug}/` }
       })
       footer.link[ 1 ].data = typeList.techType.map((item) => {
-        return { name: `${industryName}${item.name}技术解决方案`, url: `/kaifain/${industry}/${item.slug}/` }
+        return { name: `${industryName}${item.name}技术解决方案`, url: `${kaifainUrl}/${industry}/${item.slug}/` }
       })
     } else {
       //非特定的url
       footer.link[ 0 ].name = "热门城市技术解决方案"
       footer.link[ 1 ].name = "行业领域技术解决方案"
       footer.link[ 0 ].data = typeList.city.map((item) => {
-        return { name: `${item.name}技术解决方案`, url: `/kaifain/${item.slug}/` }
+        return { name: `${item.name}技术解决方案`, url: `${kaifainUrl}/${item.slug}/` }
       })
       footer.link[ 1 ].data = typeList.industry.map((item) => {
-        return { name: `${item.name}技术解决方案`, url: `/kaifain/${item.slug}/` }
+        return { name: `${item.name}技术解决方案`, url: `${kaifainUrl}/${item.slug}/` }
       })
     }
     return footer

+ 85 - 34
components/kaifain/dealSeoIndex.js

@@ -1,5 +1,11 @@
 export default class DealSeoData {
-  constructor({ $axios, req, app, redirect, error}) {
+  constructor({
+    $axios,
+    req,
+    app,
+    redirect,
+    error
+  }) {
     this.$axios = $axios
     this.req = req
     this.app = app
@@ -22,14 +28,23 @@ export default class DealSeoData {
   }
 
   async dealData() {
-    let { name, query: { page = 1, keyword='' }, path, params, fullPath } = this.app.context.route
+    let {
+      name,
+      query: {
+        page = 1,
+        keyword = ''
+      },
+      path,
+      params,
+      fullPath
+    } = this.app.context.route
     this.page.page = page
     this.page.keyword = keyword
-    if (path && path[path.length-1] !== '/') {
-      let reditUrl = fullPath
-      reditUrl = reditUrl.replace(path, path+'/')
-      this.redirect(301, reditUrl)
-    }
+    // if (path && path[path.length-1] !== '/') {
+    //   let reditUrl = fullPath
+    //   reditUrl = reditUrl.replace(path, path+'/')
+    //   this.redirect(301, reditUrl)
+    // }
     let isSeoList = false
     let typeList = await this.getTypeList()
     switch (name) {
@@ -47,14 +62,14 @@ export default class DealSeoData {
           let urlCheck = ""
           let keys = Object.keys(typeList)
           //3 * 3 * n的循环 n < 100
-          list.forEach(item=>{
+          list.forEach(item => {
             keys.forEach(keys => {
               typeList[keys].list.forEach(typeItem => {
                 if (typeItem.slug === item) {
                   urlCheck += item
                   this.selected[keys] = typeItem.id
-                  this.selected[keys+'Name'] = typeItem.name
-                  this.selected[keys+'Slug'] = typeItem.slug
+                  this.selected[keys + 'Name'] = typeItem.name
+                  this.selected[keys + 'Slug'] = typeItem.slug
                   if (keys === 'city') {
                     this.selected["provice"] = typeItem.prov_id
                   }
@@ -63,12 +78,15 @@ export default class DealSeoData {
             })
           })
           if (urlCheck !== list.join("")) {
-            this.error({statusCode: 404, message: "您要访问的页面不存在"})
+            this.error({
+              statusCode: 404,
+              message: "您要访问的页面不存在"
+            })
             return
           }
 
           if (this.selected["provice"]) {
-            let item = this.provinces.filter(item=>item.id===this.selected["provice"])[0]
+            let item = this.provinces.filter(item => item.id === this.selected["provice"])[0]
             this.selected["proviceName"] = item && item.name
           }
         } catch (e) {
@@ -83,7 +101,7 @@ export default class DealSeoData {
     return {
       typeList,
       isSeoList, //是否是 /kaifain/s/页面进入
-      dataList:this.dataList, //首次获取的数据
+      dataList: this.dataList, //首次获取的数据
       mobile: this.app.$deviceType.isMobile(),
       selected: this.selected,
       page: this.page,
@@ -109,11 +127,20 @@ export default class DealSeoData {
       }
     }
     if (Number(res.data.status) === 1) {
-      res.data.data.cities.unshift({ id: 0, name: "全部地区" })
-      res.data.data.industries.unshift({ id: 0, name: "全部行业" })
-      res.data.data.tech_types.unshift({ id: 0, name: "全部分类" })
+      res.data.data.cities.unshift({
+        id: 0,
+        name: "全部地区"
+      })
+      res.data.data.industries.unshift({
+        id: 0,
+        name: "全部行业"
+      })
+      res.data.data.tech_types.unshift({
+        id: 0,
+        name: "全部分类"
+      })
       Object.keys(res.data.data).forEach(key => {
-        let item = res.data.data[ key ]
+        let item = res.data.data[key]
         if (Array.isArray(item)) {
           item.forEach(ii => {
             ii.text = ii.name
@@ -121,16 +148,19 @@ export default class DealSeoData {
           })
         }
       })
-      typeList.city.list = [ ...res.data.data.cities ]
-      typeList.industry.list = [ ...res.data.data.industries ]
-      typeList.techType.list = [ ...res.data.data.tech_types ]
-      this.provinces = [] = [ ...res.data.data.provinces ]
+      typeList.city.list = [...res.data.data.cities]
+      typeList.industry.list = [...res.data.data.industries]
+      typeList.techType.list = [...res.data.data.tech_types]
+      this.provinces = [] = [...res.data.data.provinces]
     }
     return typeList
   }
 
   async getList() {
-    const { page, selected } = this
+    const {
+      page,
+      selected
+    } = this
     let p = {
       city: selected.city,
       tech_type: selected.techType,
@@ -144,16 +174,16 @@ export default class DealSeoData {
       this.page.total = data.total
       let dataList = data.providers || []
       dataList.forEach(item => {
-        item[ 'successCase' ] = ''
+        item['successCase'] = ''
         if (Array.isArray(item.successful_case)) {
           let tem = item.successful_case.map(item => item.title)
-          item[ 'successCase' ] = tem.join('、')
+          item['successCase'] = tem.join('、')
         }
       })
       if (this.page.page === 1) {
         this.dataList = [...data.providers]
       } else {
-        this.dataList = [ ...this.dataList, ...data.providers ]
+        this.dataList = [...this.dataList, ...data.providers]
       }
       this.page.page += 1
       if (this.page.total <= this.dataList.length) {
@@ -163,17 +193,39 @@ export default class DealSeoData {
   }
 
   dealThisMeta(isSeoList) {
-    let { city, industry, techType, cityName="", industryName="", techTypeName="", proviceName} = this.selected
-    const {headers: {host}, url} = this.req
+    let {
+      city,
+      industry,
+      techType,
+      cityName = "",
+      industryName = "",
+      techTypeName = "",
+      proviceName
+    } = this.selected
+
 
     let head = {
-      title:"", keyword: "", descrption: "", h1: "", canonical: "", metaLocation: ""
+      title: "",
+      keyword: "",
+      descrption: "",
+      h1: "",
+      canonical: "",
+      metaLocation: ""
     }
-    //拼接canonical
-    if (host.indexOf('local') !== -1) {
-      head.canonical = 'http://' + host + url
-    } else {
-      head.canonical = 'https://' + host + url
+    if (this.req) {
+      const {
+        headers: {
+          host
+        },
+        url
+      } = this.req
+
+      //拼接canonical
+      if (host.indexOf('local') !== -1) {
+        head.canonical = 'http://' + host + url
+      } else {
+        head.canonical = 'https://' + host + url
+      }
     }
     if (techTypeName) {
       techTypeName = techTypeName.replace("定制化", "")
@@ -238,4 +290,3 @@ export default class DealSeoData {
     return head
   }
 }
-

+ 116 - 0
components/otherpage/money/bottom.vue

@@ -0,0 +1,116 @@
+<template>
+  <div class="introduceBottom">
+    <div class="cell intro" @click="onJumpToIntro" :class="{selected: step === 1}">
+      <div class="icon"></div>
+      <div class="word">服务介绍</div>
+    </div>
+    <div class="cell index" @click="onJumpToIndex" :class="{selected: step === 2}">
+      <div class="icon"></div>
+      <div class="word">薪酬福利</div>
+    </div>
+  </div>
+</template>
+
+<script>
+export default {
+  name: "introduceBottom",
+  props: {
+    mobile: {
+      type: Boolean,
+      default: true
+    },
+    step: {
+      type: Number,
+      default: 1
+    }
+  },
+  components: {},
+  data() {
+    return {
+
+    }
+  },
+  methods: {
+    onJumpToIntro() {
+      this.$router.push(`/otherpage/money/introduce`);
+    },
+    onJumpToIndex() {
+      this.$router.push(`/otherpage/money/`);
+    }
+  }
+}
+</script>
+
+<style lang="scss" scoped>
+  /*tabbar_icon_1_sel@2x.png*/
+  /*tabbar_icon_2_nor@2x.png*/
+  @import "../../../assets/css/scssCommon";
+  .introduceBottom {
+    width: 100vw;
+    height: pxtovw(50);
+    background-color: #fff;
+
+    display: flex;
+    justify-content: center;
+    align-items: center;
+
+    .cell {
+      width: pxtovw(60);
+      height: 100%;
+      display: flex;
+      flex-direction: column;
+      align-items: center;
+      justify-content: center;
+
+      &:nth-child(2) {
+        margin-left: pxtovw(120);
+      }
+      .icon {
+        width: pxtovw(27);
+        height: pxtovw(27);
+        background-repeat: no-repeat;
+        background-size: cover;
+      }
+      .word {
+        width: pxtovw(48);
+        height: pxtovw(16.8);
+        font-size: pxtovw(12);
+        font-weight: 600;
+        text-align: center;
+        color: #929aa4;
+        line-height: pxtovw(16.8);
+        transform-origin: center top;
+        transform: scale(0.833);
+      }
+
+      &.intro{
+        .icon {
+          background-image: url('../../../assets/img/other/money/tabbar_icon_1_nor@2x.png');
+        }
+      }
+
+      &.index {
+        .icon {
+          background-image: url('../../../assets/img/other/money/tabbar_icon_2_nor@2x.png');
+        }
+      }
+      &.selected {
+        .word {
+          color: #308eff
+        }
+        &.intro{
+          .icon {
+            background-image: url('../../../assets/img/other/money/tabbar_icon_1_sel@2x.png');
+          }
+        }
+
+        &.index {
+          .icon {
+            background-image: url('../../../assets/img/other/money/tabbar_icon_2_sel@2x.png');
+          }
+        }
+      }
+    }
+  }
+
+</style>

+ 25 - 24
components/sign/works.vue

@@ -57,20 +57,20 @@ export default {
         duty: "",
         description: "",
         url: "",
-        image_list: []
+        image_list: [],
       },
       works: [],
       current: null,
       originWorks: [],
       industries: [],
-      functions: []
+      functions: [],
     };
   },
   components: {
-    workForm
+    workForm,
   },
   computed: {
-    ...mapState(["userinfo"])
+    ...mapState(["userinfo"]),
   },
   watch: {},
   async mounted() {
@@ -89,7 +89,7 @@ export default {
         function_ops: work.function_ops.join(","), //是多个ID,用英文逗号分割,关键功能
         industry_id: parseInt(work.industry_id[1]), //id,是int类型啊,不是文字
         // url: "https://a.com",
-        image_list: work.image_list.map(it => it.url).join(",") //是图片地址,多个图片用逗号分割,
+        image_list: work.image_list.map((it) => it.url).join(","), //是图片地址,多个图片用逗号分割,
       };
       const res = await this.$axios.$post(`/api/user_works/save`, queryParams);
       if (res.status === 1) {
@@ -101,7 +101,7 @@ export default {
           duty: "",
           description: "",
           url: "",
-          image_list: []
+          image_list: [],
         };
         this.editingItem = [];
         this.getData();
@@ -110,13 +110,13 @@ export default {
     async getData() {
       const res = await this.$axios.$post("/api/user_works/get_list");
       const data = !res.data ? [] : res.data;
-      this.works = data.map(it => {
+      this.works = data.map((it) => {
         const image_list = it.image_list
-          ? it.image_list.split(",").map(it => ({ name: it, url: it }))
+          ? it.image_list.split(",").map((it) => ({ name: it, url: it }))
           : [];
         let industry_id;
-        this.industries.map(item1 => {
-          return item1.children.map(item2 => {
+        this.industries.map((item1) => {
+          return item1.children.map((item2) => {
             if (item2.value == it.industry_id) {
               industry_id = [item1.value, item2.value];
             }
@@ -127,29 +127,29 @@ export default {
           ...it,
           industry_id,
           function_ops: it.function_ops ? it.function_ops.split(",") : [],
-          image_list
+          image_list,
         };
       });
     },
     async getIndustry() {
       const res = await this.$axios.$post("/api/user_works/get_industry");
       const data = !res.data ? [] : res.data;
-      this.industries = data.map(it => ({
+      this.industries = data.map((it) => ({
         label: it.name,
         value: it.id,
-        children: it.child.map(it => ({
+        children: it.child.map((it) => ({
           label: it.name,
-          value: it.id
-        }))
+          value: it.id,
+        })),
       }));
       return this.industries;
     },
     async getFunction() {
       const res = await this.$axios.$post("/api/user_works/get_function");
       const data = !res.data ? [] : res.data;
-      this.functions = data.map(it => ({
+      this.functions = data.map((it) => ({
         label: it.outsourcefunc_name,
-        value: it.outsourcefunc_id
+        value: it.outsourcefunc_id,
       }));
     },
     async fetchWork(keyword) {
@@ -178,7 +178,7 @@ export default {
       const deleteComplete = () => {
         this.$message({
           type: "success",
-          message: "删除成功!"
+          message: "删除成功!",
         });
         this.works.splice(idx, 1);
         this.editingItem = [];
@@ -186,12 +186,12 @@ export default {
       this.$confirm("确认删除该作品?", "提示", {
         confirmButtonText: "确定",
         cancelButtonText: "取消",
-        type: "warning"
+        type: "warning",
       })
         .then(async () => {
           if (work.wid) {
             const res = await this.$axios.$post(`/api/user_works/delete`, {
-              id: work.wid
+              id: work.wid,
             });
             if (res.status === 1) {
               deleteComplete();
@@ -202,11 +202,11 @@ export default {
             deleteComplete();
           }
         })
-        .catch(err => {
+        .catch((err) => {
           console.log(err);
           this.$message({
             type: "info",
-            message: "已取消删除"
+            message: "已取消删除",
           });
         });
     },
@@ -218,8 +218,8 @@ export default {
     },
     editItem(idx) {
       this.editingItem = [idx];
-    }
-  }
+    },
+  },
 };
 </script>
 
@@ -253,6 +253,7 @@ export default {
       margin-right: 10px;
       width: 100px;
       height: 100px;
+      overflow: hidden;
     }
     .des {
       flex: 1;

+ 108 - 0
layouts/invited.html

@@ -0,0 +1,108 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
+  <title>邮箱招聘要求</title>
+  <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
+</head>
+
+<body style="width: 100vw;">
+
+<!-- 为了邮件客户端兼容性,CSS必须内嵌,且不允许使用position定位,宽度为600px; img标签可能兼容性不太好。  -->
+<div class="content"
+  style=" width: 600px;background-color: #fff;border: 1px solid rgba(0,0,0,0.06); border-radius: 7px; margin-left: auto;margin-right: auto;">
+  <div class="header" style="width: 100%; height: 53px;display: flex;align-items: center;">
+    <img src="https://stacdn.proginn.com/image/email/logo@2x.png" alt="logo"
+      style="height: 30px;width: 113px;margin-left: 20px;">
+  </div>
+  <div class="bodyy">
+    <div class="jobInfo" style="
+    background: url('https://stacdn.proginn.com/image/email/banner@2x.png') no-repeat;
+    background-size: cover;
+    width:100%; height: 172px; display: inline-block; box-sizing:
+    border-box; padding-left: 47px; padding-right: 47px;padding-top: 47px; padding-bottom: 47px">
+      <div style="display: flex;">
+        <div style="height: 35px;font-size: 25px;font-weight: 600;text-align: left;color: #ffffff;line-height: 35px;">
+          产品经理-全职
+        </div>
+        <div style="width: fit-content;height: 34px;margin-left: 80px; border: 2px solid #ffcb5f;border-radius: 3px;
+        box-sizing: content-box;padding-left: 14px;padding-right: 14px;
+font-size: 22px;font-weight: 700;text-align: center;color: #ffcb5f;line-height: 34px;
+word-break: keep-all;white-space: nowrap">
+          20-15K/月
+        </div>
+      </div>
+      <div class="desc"
+        style="margin-top:12px; width: 300px;height: 31px;opacity: 0.8;font-size: 11px;font-weight: 400;text-align:
+        left;color:
+        #ffffff;line-height: 15px; display: -webkit-box;overflow: hidden;text-overflow: ellipsis;-webkit-box-orient: vertical;-webkit-line-clamp: 2;">
+        这是岗位描述,这是岗位描述这是岗位描述这是岗位描述,这是岗位描述这是岗位描述
+      </div>
+    </div>
+
+    <div class="dataInfo" style="width: 100%; height: 47px;box-sizing: border-box;
+    display: flex;align-items: center;padding-left: 17px;font-size: 13px;font-weight: 600;color: #222222;text-align:
+    left; border-bottom: 1px solid rgba(0,0,0,0.06);">
+      <div style="color: #222222;">招聘数据:</div>
+      <div style="color: #999999;">已投递</div>
+      <div style="color: #1E84FF;margin-left: 2px">210</div>
+      <div style="color: #999999;margin-left: 10px">浏览量</div>
+      <div style="color: #1E84FF;margin-left: 2px">210</div>
+    </div>
+
+    <div class="list">
+      <div class="cell" style="width: calc(100% - 60px); height: 86px;box-sizing: border-box; margin-left: 30px;
+      margin-right:
+      30px;display: flex; align-items: center; justify-content: space-between;border-bottom: 1px solid rgba(0,0,0,0.06);">
+        <div class="left" style="display: flex; align-items: center">
+          <div class="userImg">
+            <img src="" alt="头像" style="width: 53px;height: 53px;border-radius: 50%;"></div>
+          <div class="userInfo" style="margin-left: 11px;">
+            <div class="ttt"
+              style="height: 18px;font-size: 14px;font-weight: 600;text-align: left;color: #222222;line-height: 18px;">产品经理-3年工作经验-背景
+            </div>
+            <div class="time"
+              style="height: 20px;margin-top: 2px;font-size: 12px;font-weight: 400;text-align: left;color: #666666;line-height: 20px;">2020-07-06 19:19 已投递简历
+            </div>
+          </div>
+        </div>
+        <div class="right">
+          <a href="#/showDetail" target="_blank" style="text-decoration:none;
+                width: 100px;display: inline-block; height: 31px; border: 1px solid #308eff;border-radius: 3px;font-size: 12px;
+                font-weight: 500;text-align: center;color: #308eff;line-height: 31px;">查看TA的简历</a>
+        </div>
+      </div>
+
+    </div>
+  </div>
+  <div class="footer" style="display: flex; flex-direction: column; align-items: center;margin-top: 30px;">
+    <div class="stitle" style="height: 18px;font-size: 13px;font-weight: 400;text-align: center;color: #222222;">
+      立即激活账号登录
+      <span style="color: #308EFF;">程序员客栈APP</span>
+      直接和程序员沟通
+    </div>
+    <a href="" target="_blank" class="rightBtn"
+      style="width: 213px;height: 38px;background: #308eff;border-radius: 3px;text-decoration:none;box-shadow: 0px 2px 5px 0px;display: block;margin-top: 27px;margin-bottom: 27px;
+font-size: 13px;font-weight: 500;text-align: center;color: #ffffff;line-height: 38px;">
+      立即激活
+    </a>
+    <div class="logo">
+      <img src="https://stacdn.proginn.com/image/common/qrcode/download.png?v=1" alt="下载二维码" style="width:
+      70px;height: 70px;">
+    </div>
+    <div class="tipsWord" style="margin-top: 8px;margin-bottom: 30px;height: 29px;
+   font-size: 10px;font-weight: 400;text-align: center;color: #999999;line-height: 15px;">
+      <p style="margin-top: 0; margin-bottom: 0;">扫码下载程序员客栈APP</p>
+      <p style="margin-top: 0; margin-bottom: 0;">了解更多招聘详情!</p>
+    </div>
+  </div>
+</div>
+<div
+  style="margin-top: 10px;margin-left: auto;margin-right: auto;height: 15px;font-size: 12px;font-weight: 400;text-align: center;color: #999999;line-height: 15px;">
+  如果您不想再收到此类邮件,请点击<a href="" target="_blank" style="text-decoration:none;">这里退订</a>
+</div>
+</body>
+</html>
+
+

+ 1 - 10
middleware/SeoRouter/kaifain.js

@@ -1,12 +1,3 @@
 export default function (context) {
-  if (!process.server) {
-    return
-  }
-  const {kaifainUrl} = context.store.state.domainConfig
-  const { req:{headers:{host}} } = context;
-  
-  console.log("********", host, kaifainUrl)
-  if (kaifainUrl.indexOf(host) !== -1) {
-  
-  }
+
 }

+ 54 - 11
middleware/initialize.js

@@ -5,10 +5,12 @@ export default function (context) {
   let cookies = "";
   // Server-side
   if (process.server) {
-    console.log("server side............");
     const {
-      req
+      req,
+      redirect
     } = context;
+    console.log(req.url)
+
     let host = req.headers.host;
     console.log("initialize...........req.............header");
     let proto = "https";
@@ -21,6 +23,7 @@ export default function (context) {
     }
     url = proto + "://" + host;
     cookies = req.headers.cookie;
+    // console.log("server", req.headers)
   }
   // Client-side
   if (process.client) {
@@ -31,11 +34,12 @@ export default function (context) {
       proto = "https";
     }
     cookies = document.cookie;
+    console.log("client", document.location)
   }
   let groups = {}
   try {
     let regx = new RegExp(
-      "((?<branch>[a-z0-9_\\-]+)\\.)?(?<env>(www|prod|test|local|test-rooter|test-jishuin|prod-rooter|prod-jishuin|rooter|jishuin|app|test-kaifain|prod-kaifain|kaifain))\\.proginn\\.com(\\:(?<port>\\d+))?",
+      "((?<branch>[a-z0-9_\\-]+)\\.)?(?<env>(www|prod|test|local|test-rooter|test-jishuin|prod-rooter|prod-jishuin|rooter|jishuin|app|test-kaifain|prod-kaifain|kaifain|test-job|job|prod-job|local-rooter|local-job|local-jishuin|local-kaifain))\\.proginn\\.com(\\:(?<port>\\d+))?",
       "gim"
     );
     console.log(regx);
@@ -43,7 +47,9 @@ export default function (context) {
     groups = regx.exec(url).groups;
   } catch (e) {
     //失败默认设置为线上环境
-    const {app} = context.app.$deviceType
+    const {
+      app
+    } = context.app.$deviceType
     if (app) {
       groups = {
         env: "app"
@@ -54,11 +60,13 @@ export default function (context) {
       }
     }
   }
-  let api = "";
-  let jishuinUrl = "";
-  let rooterUrl = "";
-  let siteUrl = "";
-  let kaifainUrl = "";
+  let api = "",
+    jishuinUrl = "",
+    rooterUrl = "",
+    siteUrl = "",
+    kaifainUrl = "",
+    jobUrl = "",
+    urlType = "";
   console.log(groups);
   if (groups) {
     let {
@@ -73,14 +81,17 @@ export default function (context) {
         jishuinUrl = "https://jishuin.proginn.com";
         kaifainUrl = "https://kaifain.proginn.com";
         rooterUrl = "https://rooter.proginn.com";
+        jobUrl = "https://job.proginn.com";
         break;
       case "jishuin":
       case "kaifain":
+      case "job":
         api = "https://jishuin.proginn.com";
         siteUrl = "https://www.proginn.com";
         jishuinUrl = "https://jishuin.proginn.com";
         kaifainUrl = "https://kaifain.proginn.com";
         rooterUrl = "https://rooter.proginn.com";
+        jobUrl = "https://job.proginn.com";
         break;
       case "app":
         api = "https://app.proginn.com";
@@ -88,41 +99,52 @@ export default function (context) {
         jishuinUrl = "https://jishuin.proginn.com";
         kaifainUrl = "https://kaifain.proginn.com";
         rooterUrl = "https://rooter.proginn.com";
+        jobUrl = "https://job.proginn.com";
         break;
       case "test":
       case "test-jishuin":
       case "test-rooter":
       case "test-kaifain":
+      case "test-job":
         api = "https://" + branch + ".test.proginn.com";
         siteUrl = "https://" + branch + ".test.proginn.com";
         jishuinUrl = "https://" + branch + ".test-jishuin.proginn.com";
         kaifainUrl = "https://" + branch + ".test-kaifain.proginn.com";
         rooterUrl = "https://" + branch + ".test-rooter.proginn.com";
+        jobUrl = "https://" + branch + ".test-job.proginn.com";
         break;
       case "local":
+      case "local-job":
+      case "local-kaifain":
+      case "local-jishuin":
+      case "local-rooter":
         if (port && port != "80") {
           api = "http://local.proginn.com";
           siteUrl = "http://local.proginn.com:" + port;
           jishuinUrl = "http://jishuin.local.proginn.com";
           kaifainUrl = "http://kaifain.local.proginn.com";
           rooterUrl = "http://rooter.local.proginn.com";
+          jobUrl = "http://job.local.proginn.com";
         } else {
           api = "http://local.proginn.com";
           siteUrl = "http://local.proginn.com";
           jishuinUrl = "http://jishuin.local.proginn.com";
           kaifainUrl = "http://kaifain.local.proginn.com";
           rooterUrl = "http://rooter.local.proginn.com";
+          jobUrl = "http://job.local.proginn.com";
         }
         break;
       case "prod":
       case "prod-jishuin":
       case "prod-rooter":
       case "prod-kaifain":
+      case "prod-job":
         api = "https://" + branch + ".prod.proginn.com";
         siteUrl = "https://" + branch + ".prod.proginn.com";
         jishuinUrl = "https://" + branch + ".prod-jishuin.proginn.com";
         kaifainUrl = "https://" + branch + ".prod-kaifain.proginn.com";
         rooterUrl = "https://" + branch + ".prod-rooter.proginn.com";
+        jobUrl = "https://" + branch + ".prod-job.proginn.com";
         break;
       default:
         // 按生产处理
@@ -131,6 +153,7 @@ export default function (context) {
         jishuinUrl = "https://jishuin.proginn.com";
         kaifainUrl = "https://kaifain.proginn.com";
         rooterUrl = "https://rooter.proginn.com";
+        jobUrl = "https://job.proginn.com";
         break;
     }
   } else {
@@ -140,15 +163,35 @@ export default function (context) {
     jishuinUrl = "https://jishuin.proginn.com";
     kaifainUrl = "https://kaifain.proginn.com";
     rooterUrl = "https://rooter.proginn.com";
+    jobUrl = "https://job.proginn.com";
   }
   context.store.commit("updateDomainConfig", {
     api: api,
-    siteUrl: siteUrl,
+    siteUrl,
     jishuinUrl: jishuinUrl,
     kaifainUrl: kaifainUrl,
-    rooterUrl: rooterUrl
+    rooterUrl: rooterUrl,
+    jobUrl: jobUrl,
+    urlType
   });
   context.store.commit("updateDeviceType", context.app.$deviceType || {});
   context.store.commit("updateIsPC", context.app.$deviceType.pc || false);
   context.store.commit("updateIsWeixin", context.app.$deviceType.wx || false);
+  // 301
+  // Server-side
+  if (process.server) {
+    console.log("server side redirect 301............");
+    const {
+      req,
+      redirect
+    } = context;
+    let reqUrl = new URL(req.url, url);
+    if (reqUrl.pathname.indexOf('/job/') === 0 && url.indexOf('job.') === -1) {
+      redirect(301, jobUrl + reqUrl.pathname.replace('/job/', '/') + reqUrl.search)
+    }
+    if (reqUrl.pathname.indexOf('/kaifain/') === 0 && url.indexOf('kaifain.') === -1) {
+      redirect(301, kaifainUrl + reqUrl.pathname.replace('/kaifain/', '/') + reqUrl.search)
+    }
+    // console.log("server", req.headers)
+  }
 }

+ 107 - 30
nuxt.config.js

@@ -2,13 +2,25 @@ const seoRouter = require("./plugins/seoRouter");
 const pkg = require("./package");
 
 if (process.env.NODE_ENV) {
-  require('events').EventEmitter.defaultMaxListeners = 50;
+  require("events").EventEmitter.defaultMaxListeners = 50;
 }
 
+const modifyHtml = html => {
+  let htmlRegx = new RegExp("<style(([\\s\\S])*?)<\\/style>", "igm");
+  let match = html.match(htmlRegx);
+  if (match) {
+    html = html.replace(htmlRegx, "");
+    match.forEach((item, index) => {
+      html = html.replace(/<\/body>/, item + "</body>");
+    });
+  }
+  return html;
+};
+
 module.exports = {
   mode: "universal",
   watchers: {
-    ignored: ['.nuxt/**', 'node_modules/**']
+    ignored: [".nuxt/**", "node_modules/**"]
   },
   vue: {
     config: {
@@ -31,7 +43,16 @@ module.exports = {
    * 打包文件
    */
   build: {
-    vendor: ["element-ui"]
+    extractCSS: true,
+    resourceHints: true
+  },
+  hooks: {
+    // This hook is called before rendering the html to the browser
+    "render:route": (url, page, { req, res }) => {
+      // console.log(page.html.substring(page.html.indexOf("</body>") - 100));
+      page.html = modifyHtml(page.html);
+      // console.log(page.html.substring(page.html.indexOf("</body>") - 100));
+    }
   },
 
   server: {
@@ -45,24 +66,58 @@ module.exports = {
   head: {
     title: "程序员客栈",
     meta: [
-      { charset: "utf-8" },
-      { name: "viewport", content: "width=device-width, initial-scale=1" },
-      { name: "applicable-device", content: "pc, mobile " },
-      { name: "baidu-site-verification", content: "7IbkIN9Kwp" },
-      { "http-equiv": "X-UA-Compatible", content: "IE=edge,chrome=1" },
+      {
+        charset: "utf-8"
+      },
+      {
+        name: "viewport",
+        content: "width=device-width, initial-scale=1"
+      },
+      {
+        name: "applicable-device",
+        content: "pc, mobile "
+      },
+      {
+        name: "baidu-site-verification",
+        content: "7IbkIN9Kwp"
+      },
+      {
+        "http-equiv": "X-UA-Compatible",
+        content: "IE=edge,chrome=1"
+      },
       // hid: 'x', 可在页面内覆盖这里
-      { name: "robots", content: "noindex,follow" },
-      { name: "description", content: pkg.description },
-      { "http-equiv": "Cache-Control", content: "no-transform" },
-      { "http-equiv": "Cache-Control", content: "no-siteapp" }
+      {
+        name: "robots",
+        content: "noindex,follow"
+      },
+      {
+        name: "description",
+        content: pkg.description
+      },
+      {
+        "http-equiv": "Cache-Control",
+        content: "no-transform"
+      },
+      {
+        "http-equiv": "Cache-Control",
+        content: "no-siteapp"
+      }
     ],
-    link: [{ rel: "icon", type: "image/x-icon", href: "/favicon.ico" }]
+    link: [
+      {
+        rel: "icon",
+        type: "image/x-icon",
+        href: "/favicon.ico"
+      }
+    ]
   },
 
   /*
    ** Customize the progress-bar color
    */
-  loading: { color: "#fff" },
+  loading: {
+    continuous: true
+  },
 
   /*
    ** Global CSS
@@ -124,42 +179,64 @@ module.exports = {
    */
   proxy: [
     // ["/api", { target: "https://web.test.proginn.com", changeOrigin: true }],
-    ["/api", { target: "https:/dev.test.proginn.com", changeOrigin: true }],
-	["/list", { target: "https://dev.test-jishuin.proginn.com", changeOrigin: true }],
+    [
+      "/api",
+      {
+        target: "https:/dev.test.proginn.com",
+        changeOrigin: true
+      }
+    ],
+    [
+      "/list",
+      {
+        target: "https://dev.test-jishuin.proginn.com",
+        changeOrigin: true
+      }
+    ],
     [
       "/file/proxyUpload",
-      { target: "https://dev.test.proginn.com", changeOrigin: true }
+      {
+        target: "https://dev.test.proginn.com",
+        changeOrigin: true
+      }
     ],
     [
       "/file/prepareUpload",
-      { target: "https://dev.test.proginn.com", changeOrigin: true }
+      {
+        target: "https://dev.test.proginn.com",
+        changeOrigin: true
+      }
     ],
     [
       "/file/uploadCallback",
-      { target: "https://dev.test.proginn.com", changeOrigin: true }
+      {
+        target: "https://dev.test.proginn.com",
+        changeOrigin: true
+      }
     ],
     // [ '/programmerinnfile', { target: 'https://v0.api.upyun.com', changeOrigin: true } ],
     [
       "/upload_image",
-      { target: "http://dev.test.proginn.com", changeOrigin: true }
+      {
+        target: "http://dev.test.proginn.com",
+        changeOrigin: true
+      }
     ],
-    ["/image", { target: "https://stacdn.proginn.com", changeOrigin: true }]
+    [
+      "/image",
+      {
+        target: "https://stacdn.proginn.com",
+        changeOrigin: true
+      }
+    ]
   ],
 
   /*
    ** Nuxt.js modules
    */
   modules: ["@nuxtjs/axios", "@nuxtjs/proxy"],
-
-  /*
-   ** Build configuration
-   */
-  build: {
-  
-  },
-
   router: {
-    middleware: ["initialize", 'SeoRouter/kaifain'],
+    middleware: ["initialize"],
     ...seoRouter
   }
 };

+ 12 - 9
package.json

@@ -5,6 +5,7 @@
   "author": "proginn",
   "private": true,
   "scripts": {
+    "xf": "rm -rf .nuxt && npm rebuild node-sass && npm run dev",
     "build_release": "cross-env nuxt build",
     "dev": "cross-env nuxt",
     "build": "cross-env nuxt build",
@@ -28,7 +29,7 @@
     "jspdf": "^1.5.3",
     "mint-ui": "^2.2.13",
     "moment": "^2.24.0",
-    "nuxt": "^2.6.3",
+    "nuxt": "^2.14.0",
     "qrcode": "^1.4.4",
     "qs": "^6.8.0",
     "vant": "^2.5.2",
@@ -39,6 +40,14 @@
     "vuescroll": "^4.15.0"
   },
   "devDependencies": {
+    "@babel/compat-data": "^7.10.1",
+    "@babel/core": "^7.10.1",
+    "@babel/plugin-proposal-object-rest-spread": "^7.10.1",
+    "@babel/plugin-transform-runtime": "^7.10.1",
+    "@babel/preset-env": "^7.10.1",
+    "@babel/preset-react": "^7.10.1",
+    "babel-loader": "^8.1.0",
+    "babel-preset-mobx": "^2.0.0",
     "cheerio": "^1.0.0-rc.3",
     "cross-env": "^5.2.0",
     "css-loader": "^3.4.0",
@@ -50,14 +59,8 @@
     "style-loader": "^0.23.1",
     "t2css": "^0.1.6",
     "webpack": "^4.43.0",
-    "@babel/core": "^7.10.1",
-    "@babel/compat-data": "^7.10.1",
-    "@babel/plugin-proposal-object-rest-spread": "^7.10.1",
-    "@babel/plugin-transform-runtime": "^7.10.1",
-    "@babel/preset-env": "^7.10.1",
-    "@babel/preset-react": "^7.10.1",
-    "babel-loader": "^8.1.0",
-    "babel-preset-mobx": "^2.0.0"
+    "html-webpack-plugin": "^4.3.0",
+    "extract-css-chunks-webpack-plugin": "^4.7.5"
   },
   "resolutions": {
     "jspdf/file-saver": "1.3.8"

pages/index.vue → pages/404.vue


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 508 - 442
pages/job/detail/_id.vue


+ 382 - 278
pages/job/index.vue

@@ -7,11 +7,18 @@
         </div>
         <div class="contentArea">
           <div class="selectArea" v-if="!isSeoList">
-            <div class="selectContent" v-for="(key, i) in Object.keys(typeList)" :key="i + 'selectContent'">
+            <div
+              class="selectContent"
+              v-for="(key, i) in Object.keys(typeList)"
+              :key="i + 'selectContent'"
+            >
               <div class="content">
-                <div class="left"><p>{{typeList[key].title}}</p></div>
+                <div class="left">
+                  <p>{{typeList[key].title}}</p>
+                </div>
                 <div class="right">
-                  <div class="cell"
+                  <div
+                    class="cell"
                     v-for="(item, ii) in typeList[key].list"
                     :class="{selected: item.id === selected[key], noneClick: !canSelectCity && key === 'city'}"
                     @click="changeIndexSeo(key, item)"
@@ -21,43 +28,52 @@
                     <p>{{item.name}}</p>
                   </div>
                 </div>
-                <div class="more" @click="changeExpansion(key)" v-if="typeList[key].list.length > 8">
-                  {{expansion[key] ? "收起" : "更多"}}
-                </div>
+                <div
+                  class="more"
+                  @click="changeExpansion(key)"
+                  v-if="typeList[key].list.length > 8"
+                >{{expansion[key] ? "收起" : "更多"}}</div>
               </div>
-              <div class="smallContent"
+              <div
+                class="smallContent"
                 v-if="key === 'direction' && typeList[key].smallList.length > 0"
               >
-                <div class="cell"
-                  v-for="(item) in typeList[key].smallList"
+                <div
+                  class="cell"
+                  v-for="(item,ii) in typeList[key].smallList"
                   :class="{selected: item.id === selected.directionSmall}"
                   @click="changeIndexSeo('directionSmall', item)"
+                  :key="ii+key+item.id"
                 >
                   <p>{{item.name}}</p>
                 </div>
               </div>
             </div>
           </div>
-          <div class="breadcrumb"  v-if="!page.keyword">
+          <div class="breadcrumb" v-if="!page.keyword">
             <a
               v-for="(item, index) in breadcrumbList"
               :key="'breadcrumb'+index"
               :href="item.url"
               :title="item.name"
             >
-              <p v-if="index!==breadcrumbList.length-1">{{item.name}} <span>&nbsp;>&nbsp;</span></p>
+              <p v-if="index!==breadcrumbList.length-1">
+                {{item.name}}
+                <span>&nbsp;>&nbsp;</span>
+              </p>
               <h1 v-else>{{item.name}}</h1>
             </a>
           </div>
-          <div class="breadcrumb"   v-else>
+          <div class="breadcrumb" v-else>
             <h1>搜索包含"{{page.keyword}}"的兼职招聘</h1>
           </div>
           <div class="listArea">
             <div class="list" v-loading="loading">
-              <nuxt-link class="cell"
+              <nuxt-link
+                class="cell"
                 v-for="item in dataList"
                 :key="item.id"
-                :to="`/job/detail/${item.hashId}`"
+                :to="`/d/${item.hashId}`"
                 target="_blank"
                 :title="item.name"
               >
@@ -67,15 +83,21 @@
                 </div>
                 <div class="workDesc">{{item.description}}</div>
                 <div class="labelList">
-                  <div class="label" v-for="skill in (item.skills || [])"><p>{{skill.name}}</p></div>
-                  <div class="label"><p>{{item.experienceName}}</p></div>
+                  <div class="label" v-for="skill in (item.skills || [])">
+                    <p>{{skill.name}}</p>
+                  </div>
+                  <div class="label">
+                    <p>{{item.experienceName}}</p>
+                  </div>
                 </div>
                 <div class="bottomArea">
                   <div class="companyInfo">
                     <div class="logo">
-                      <img :src="item.companyInfo.logo" alt=""/>
+                      <img :src="item.companyInfo.logo" alt />
                     </div>
-                    <div class="companyName">{{item.companyInfo.shortName || item.companyInfo.name }}</div>
+                    <div
+                      class="companyName"
+                    >{{item.companyInfo.shortName || item.companyInfo.name }}</div>
                   </div>
                   <div class="publishTime">{{item.createdAtFormat}}</div>
                 </div>
@@ -86,32 +108,49 @@
             </div>
           </div>
           <div class="pagination">
-            <el-pagination v-if="!isSeoList" background layout="prev, pager, next" :total="page.total"
-              :page-size="page.pageSize" @current-change="pageChange" :current-page="Number(page.current
-            )"></el-pagination>
+            <el-pagination
+              v-if="!isSeoList"
+              background
+              layout="prev, pager, next"
+              :total="page.total"
+              :page-size="page.pageSize"
+              @current-change="pageChange"
+              :current-page="Number(page.current
+            )"
+            ></el-pagination>
             <div v-else>
               <div class="list">
-                <nuxt-link v-for="(item,index) in new Array(Math.ceil(page.total / page.size))"
-                  :to="`/job/?page=${index+1}`"
+                <nuxt-link
+                  v-for="(item,index) in new Array(Math.ceil(page.total / page.size))"
+                  :to="`/?page=${index+1}`"
                   :key="(page)+index"
-                >
-                  {{index+1}}
-                </nuxt-link>
+                >{{index+1}}</nuxt-link>
               </div>
             </div>
           </div>
           <BottomBanner></BottomBanner>
         </div>
       </div>
-      <SeoFooter style="" :data="footer"/>
+      <SeoFooter style :data="footer" />
     </div>
     <div v-else class="jobListMobile">
       <div class="topSelect">
         <van-dropdown-menu>
           <!--方式-->
-          <van-dropdown-item v-model="selected['workType']" :options="typeList['workType'].list" key="workType" @change="changeIndex('workType')"/>
+          <van-dropdown-item
+            v-model="selected['workType']"
+            :options="typeList['workType'].list"
+            key="workType"
+            @change="changeIndex('workType')"
+          />
           <!--地区-->
-          <van-dropdown-item v-model="selected['city']" :options="typeList['city'].list" key="city"  @change="changeIndex('city')" :disabled="selected.workType===1"/>
+          <van-dropdown-item
+            v-model="selected['city']"
+            :options="typeList['city'].list"
+            key="city"
+            @change="changeIndex('city')"
+            :disabled="selected.workType===1"
+          />
           <!--职业-->
           <van-dropdown-item :title="calcName.text" key="direction" ref="directionSelect">
             <van-tree-select
@@ -124,7 +163,12 @@
         </van-dropdown-menu>
       </div>
       <h1>{{calcH1()}}</h1>
-      <van-pull-refresh v-model="refreshing" @refresh="onRefresh" class="listArea" :class="{noneInWx: !$deviceType.app}">
+      <van-pull-refresh
+        v-model="refreshing"
+        @refresh="onRefresh"
+        class="listArea"
+        :class="{noneInWx: !$deviceType.app}"
+      >
         <div style="text-align: center" v-if="firstLoading">
           <van-loading size="24px">加载中...</van-loading>
         </div>
@@ -137,10 +181,11 @@
           :immediate-check="false"
           class="list"
         >
-          <nuxt-link class="cell"
+          <nuxt-link
+            class="cell"
             v-for="item in dataList"
             :key="item.id"
-            :to="`/job/detail/${item.hashId}`"
+            :to="`/d/${item.hashId}`"
             target="_blank"
             :title="item.name"
           >
@@ -150,11 +195,13 @@
             </div>
             <div class="workDesc">{{item.description}}</div>
             <div class="labelList">
-              <div class="label" v-for="skill in (item.skills || [])"><p>{{skill.name}}</p></div>
+              <div class="label" v-for="skill in (item.skills || [])">
+                <p>{{skill.name}}</p>
+              </div>
             </div>
             <div class="companyInfo" @click.stop="jumpToCompanyInfo(item)">
               <div class="logo">
-                <img :src="item.companyInfo.logo" alt=""/>
+                <img :src="item.companyInfo.logo" alt />
               </div>
               <div class="companyName">{{item.companyInfo.shortName || item.companyInfo.name}}</div>
             </div>
@@ -166,275 +213,332 @@
 </template>
 
 <script>
-  import ConnectUs from "@/components/common/connectUs"
-  import BindMobile from "@/components/common/bindMobile"
-  import DealSeoData from "@/components/job/dealSeoIndex"
-  import DealSeoFooter from "@/components/job/dealSeoFooter"
-  import BottomBanner from "@/components/job/bottomBanner"
-  import SeoFooter from "@/components/SeoFooter"
-
-  export default {
-    name: "JobListSeoIndex",
-    // layout: "opacity_header",
-    showCommonFooter: false,
-    components: { ConnectUs, BindMobile, SeoFooter, BottomBanner },
-    head() {
-      const { title = "", keyword = "", descrption = "", h1 = "", canonical = "", metaLocation } = this.head || {}
-      let obj = {
-        title: title,
-        meta: [
-          {
-            'name': 'keywords',
-            'content': keyword
-          }, {
-            'name': 'descrption',
-            'content': descrption
-          }, {
-            'name': 'h1',
-            'content': h1
-          }
-        ],
-        link: [
-          { rel: 'canonical', href: canonical },
-        ]
-      }
-      if (metaLocation) {
-        obj.meta.push({ 'name': 'location', 'content': metaLocation })
-      }
-      return obj
-    },
-    async asyncData({ ...params }) {
-      try {
-        params.store.commit("updateNoneCommonFooter", true)
-      } catch ( e ) {
-        console.log("updateNoneCommonFooter", e)
-      }
-      let dealDataObj = new DealSeoData(params)
-      let ans = await dealDataObj.dealData()
+import ConnectUs from "@/components/common/connectUs";
+import BindMobile from "@/components/common/bindMobile";
+import DealSeoData from "@/components/job/dealSeoIndex";
+import DealSeoFooter from "@/components/job/dealSeoFooter";
+import BottomBanner from "@/components/job/bottomBanner";
+import SeoFooter from "@/components/SeoFooter";
 
-      let dealSeoFooterObj = new DealSeoFooter(params)
-      let footer = await dealSeoFooterObj.dealData()
-      return {
-        ...ans,
-        ...footer
-      }
-    },
-    data() {
-      return {
-        expansion: {
-          direction: 0,
-          city: 0,
+export default {
+  name: "JobListSeoIndex",
+  // layout: "opacity_header",
+  showCommonFooter: false,
+  components: { ConnectUs, BindMobile, SeoFooter, BottomBanner },
+  head() {
+    const {
+      title = "",
+      keyword = "",
+      descrption = "",
+      h1 = "",
+      canonical = "",
+      metaLocation,
+    } = this.head || {};
+    let obj = {
+      title: title,
+      meta: [
+        {
+          name: "keywords",
+          content: keyword,
         },
-        isShowToast: false,
-        name: '',
-        phone: '',
-        loading: false,
-        refreshing: false,
-        firstLoading: false, //移动端加载loading
-        isLoading: false
-      }
-    },
-    watch: {
+        {
+          name: "descrption",
+          content: descrption,
+        },
+        {
+          name: "h1",
+          content: h1,
+        },
+      ],
+      link: [{ rel: "canonical", href: canonical }],
+    };
+    if (metaLocation) {
+      obj.meta.push({ name: "location", content: metaLocation });
+    }
+    return obj;
+  },
+  async asyncData({ ...params }) {
+    console.log(params);
+    try {
+      params.store.commit("updateNoneCommonFooter", true);
+    } catch (e) {
+      console.log("updateNoneCommonFooter", e);
+    }
+    console.log("asyncdata..............");
+    let dealDataObj = new DealSeoData(params);
+    let ans = await dealDataObj.dealData();
 
-    },
-    computed: {
-      canSelectCity() {
-        //远程无法选中地区
-        return this.selected.workType !== 1
+    let dealSeoFooterObj = new DealSeoFooter(params);
+    let { footer, selected } = await dealSeoFooterObj.dealData();
+    console.log(footer, selected);
+    if (this) {
+      this.selected = selected;
+    }
+    return {
+      selected: selected,
+      ...ans,
+      ...footer,
+    };
+  },
+  data() {
+    return {
+      expansion: {
+        direction: 0,
+        city: 0,
       },
-      calcName() {
-        const {direction, directionSmall, directionName = "", directionSmallName = "", } = this.selected
-        let job = directionSmall || direction
-        let jobName = directionSmallName === "全部" ?  directionName : (directionSmallName || directionName)
+      isShowToast: false,
+      name: "",
+      phone: "",
+      loading: false,
+      refreshing: false,
+      firstLoading: false, //移动端加载loading
+      isLoading: false,
+      selected: {},
+    };
+  },
+  watch: {},
+  computed: {
+    canSelectCity() {
+      //远程无法选中地区
+      return this.selected.workType !== 1;
+    },
+    calcName() {
+      const {
+        direction,
+        directionSmall,
+        directionName = "",
+        directionSmallName = "",
+      } = this.selected;
+      let job = directionSmall || direction;
+      let jobName =
+        directionSmallName === "全部"
+          ? directionName
+          : directionSmallName || directionName;
 
-        return {
-          text: jobName || '全部职业',
-          value: job
+      return {
+        text: jobName || "全部职业",
+        value: job,
+      };
+    },
+  },
+  created() {
+    console.log("created................", this.selected, this.typeList);
+    // this.firstLoading = true
+  },
+  mounted() {
+    console.log("mounted................", this.selected, this.typeList);
+    // this.getList()
+    if (this.mobile) {
+      document.body.style = "overflow:hidden;";
+    }
+  },
+  methods: {
+    //移动端选择器
+    changeIndex(key, item) {
+      //级联选择 特殊处理一下
+      console.log(this.selected, this.typeList);
+      if (key === "directionSmall") {
+        //当右侧选择的不是"全部"选项的时候,将大选项初始化
+        if (item.id) {
+          this.selected["direction"] = 0;
+          this.selected["directionName"] = "";
+          this.selected["directionSlug"] = "";
+          this.selected[key] = item.id;
+          this.selected[key + "Name"] = item.name;
+          this.selected[key + "Slug"] = item.slug;
+        } else {
+          //当右侧选择的是"全部"选项的时候, 将右侧数据初始化,只保留左侧数据
+          //左侧更改时 直接更改的是索引index,故这里要转换一下
+          let myItem = this.typeList.direction.list[
+            this.selected.directionIndex
+          ];
+          this.selected["direction"] = myItem.id;
+          this.selected["directionName"] = myItem.name;
+          this.selected["directionSlug"] = myItem.slug;
+          this.selected[key] = 0;
+          this.selected[key + "Name"] = "";
+          this.selected[key + "Slug"] = "";
         }
       }
-    },
-    created() {
-      // this.firstLoading = true
-    },
-    mounted() {
-      // this.getList()
-      if (this.mobile) {
-        document.body.style = "overflow:hidden;"
+      //如果选中的工作方式是远程,则初始化 城市选择
+      if (key === "workType" && this.selected.workType === 1) {
+        this.selected.city = 0;
+        this.selected.cityName = "";
       }
-    },
-    methods: {
-      //移动端选择器
-      changeIndex(key, item) {
-        //级联选择 特殊处理一下
-        console.log(this.selected, this.typeList)
-        if (key === 'directionSmall') {
-          //当右侧选择的不是"全部"选项的时候,将大选项初始化
-          if (item.id) {
-            this.selected[ 'direction'] = 0
-            this.selected[ 'directionName'] = ''
-            this.selected[ 'directionSlug'] = ''
-            this.selected[ key] = item.id
-            this.selected[ key + 'Name' ] = item.name
-            this.selected[ key + 'Slug' ] = item.slug
-          } else {
-            //当右侧选择的是"全部"选项的时候, 将右侧数据初始化,只保留左侧数据
-            //左侧更改时 直接更改的是索引index,故这里要转换一下
-            let myItem = this.typeList.direction.list[this.selected.directionIndex]
-            this.selected[ 'direction'] = myItem.id
-            this.selected[ 'directionName'] = myItem.name
-            this.selected[ 'directionSlug'] = myItem.slug
-            this.selected[ key] = 0
-            this.selected[ key + 'Name' ] = ''
-            this.selected[ key + 'Slug' ] = ''
-          }
-        }
-        //如果选中的工作方式是远程,则初始化 城市选择
-        if (key === 'workType' && this.selected.workType === 1) {
-          this.selected.city = 0
-          this.selected.cityName = ''
-        }
 
-        this.page.page = 1
-        this.page.total = 0
-        this.firstLoading = true
-        this.getList()
-        this.$refs.directionSelect.toggle(false);
-      },
-      //web的选择器
-      changeIndexSeo(key, item) {
-        console.log("key:", key, "item:", item, "selected:", this.selected)
+      this.page.page = 1;
+      this.page.total = 0;
+      this.firstLoading = true;
+      this.getList();
+      this.$refs.directionSelect.toggle(false);
+    },
+    //web的选择器
+    changeIndexSeo(key, item) {
+      console.log("hhhahahahahhhhhhhhhhhhhhhhh");
+      console.log("key:", key, "item:", item, "selected:", this.selected);
 
-        //远程无法选中地区
-        if (!this.canSelectCity && key === 'city') {
-          return
-        }
+      //远程无法选中地区
+      if (!this.canSelectCity && key === "city") {
+        return;
+      }
 
-        // 如果选中了远程工作,重置城市选择
-        if (key === "workType" && item.id === 1) {
-          this.selected.city = 0
-          this.selected.cityName = ""
-          this.selected.citySlug= ""
-        }
+      // 如果选中了远程工作,重置城市选择
+      if (key === "workType" && item.id === 1) {
+        this.selected.city = 0;
+        this.selected.cityName = "";
+        this.selected.citySlug = "";
+      }
 
-        this.selected[ key ] = item.id
-        this.selected[ key + 'Slug' ] = item.slug
-        //大工作分类时,先显示子分类
-        if (key === 'direction') {
-          if (item.id === 0) {
-            this.selected[ 'directionSmall' ] = item.id
-            this.selected[ 'directionSmallSlug' ] = item.slug
-          } else {
-            let list = this.typeList.direction.list.filter(item => item.id === this.selected.direction)[0]
-            if (list.children && list.children.length > 1) {
-              this.selected[ 'directionSmall' ] = -1
-              this.typeList[key].smallList = [...(list && list.children || [])]
-              return
-            }
+      this.selected[key] = item.id;
+      this.selected[key + "Slug"] = item.slug;
+      //大工作分类时,先显示子分类
+      if (key === "direction") {
+        if (item.id === 0) {
+          this.selected["directionSmall"] = item.id;
+          this.selected["directionSmallSlug"] = item.slug;
+        } else {
+          let list = this.typeList.direction.list.filter(
+            (item) => item.id === this.selected.direction
+          )[0];
+          if (list.children && list.children.length > 1) {
+            this.selected["directionSmall"] = -1;
+            this.typeList[key].smallList = [...((list && list.children) || [])];
+            return;
           }
         }
-        let { citySlug, directionSlug, directionSmallSlug, workTypeSlug} = this.selected
-        let url = "/job/"
-        if (citySlug) {
-          url += citySlug + '/'
-        }
-        if (directionSmallSlug || directionSlug) {
-          url += (directionSmallSlug || directionSlug) + '/'
-        }
-        //驻场方式 不放到url里面
-        if (key === "workType" ) {
-          this.page.page = 1
-          this.page.total = 0
-          this.getList()
-          return
-        }
-        location.href = url
-      },
-      changeExpansion(key) {
-        this.expansion[ key ] = !this.expansion[ key ]
-      },
-      getList() {
-        const { page, selected: {city, direction, directionSmall, workType} } = this
-        let p = {
-          cityId: city,
-          ...page
-        }
-        direction && (p.occupationId = direction) //一级
-        workType && (p.workType = workType)
-        directionSmall > 0 && (p.directionId = directionSmall)  //耳二级
-        if (this.isLoading) {
-          return
-        }
-        this.loading = true
-        this.isLoading = true
-        this.$axios.post('/api/recruit/search', p).then(res => {
+      }
+      let {
+        citySlug,
+        directionSlug,
+        directionSmallSlug,
+        workTypeSlug,
+      } = this.selected;
+      let url = "/";
+      if (citySlug) {
+        url += citySlug + "/";
+      }
+      if (directionSmallSlug || directionSlug) {
+        url += (directionSmallSlug || directionSlug) + "/";
+      }
+      //驻场方式 不放到url里面
+      if (key === "workType") {
+        this.page.page = 1;
+        this.page.total = 0;
+        this.getList();
+        return;
+      }
+      location.href = url;
+    },
+    changeExpansion(key) {
+      this.expansion[key] = !this.expansion[key];
+    },
+    getList() {
+      const {
+        page,
+        selected: { city, direction, directionSmall, workType },
+      } = this;
+      let p = {
+        cityId: city,
+        ...page,
+      };
+      direction && (p.occupationId = direction); //一级
+      workType && (p.workType = workType);
+      directionSmall > 0 && (p.directionId = directionSmall); //耳二级
+      if (this.isLoading) {
+        return;
+      }
+      this.loading = true;
+      this.isLoading = true;
+      this.$axios
+        .post("/api/recruit/search", p)
+        .then((res) => {
           if (Number(res.data.status) === 1) {
-            let data = res.data.data
-            this.page.total = data.total
+            let data = res.data.data;
+            this.page.total = data.total;
             if (this.page.page === 1 || !this.mobile) {
-              this.dataList = [...data.list]
+              this.dataList = [...data.list];
             } else {
-              this.dataList = [ ...this.dataList, ...data.list]
+              this.dataList = [...this.dataList, ...data.list];
             }
-            this.page.page += 1
-            this.page.current = Number(data.page)
+            this.page.page += 1;
+            this.page.current = Number(data.page);
             if (this.page.total <= this.dataList.length) {
-              this.finished = true
+              this.finished = true;
             }
           }
-        }).finally(() => {
-          this.firstLoading = false
-          this.refreshing = false
-          this.isLoading = false
-          this.$nextTick(()=>{
-            this.loading = false
-          })
-          console.log("this.finished", this.finished)
         })
-      },
-      pageChange(i) {
-        this.page.page = i
-        this.getList()
-      },
-      jumpToCompanyInfo(item) {
-        const {companyInfo:{uid}} = item
-        window.open(`/wo/${uid}`, `targetCompany${uid}`)
-      },
-      /** 移动端下拉刷新 **/
-      onRefresh() {
-        // 清空列表数据
-        this.finished = false;
-        console.log('onRefresh')
-        this.onLoad();
-      },
-      onLoad() {
-        console.log('onLoad')
-        this.getList()
-      },
-      calcH1() {
-        const { city, cityName = "", direction, directionName = "", directionSmall, directionSmallName = "" } = this.selected
-        let job = directionSmall || direction
-        let jobName = directionSmallName === "全部" ?  directionName : (directionSmallName || directionName)
-        let title = "兼职招聘"
-        if (city && job) {
-          title = `${cityName}${jobName}兼职招聘`
-        } else if (city && !job) {
-          //兼职城市
-          title = `${cityName}兼职招聘`
-        } else if (!city && job) {
-          //岗位页
-          title = `${jobName}兼职招聘`
-        }
-        return title
-      },
-    }
-  }
+        .finally(() => {
+          this.firstLoading = false;
+          this.refreshing = false;
+          this.isLoading = false;
+          this.$nextTick(() => {
+            this.loading = false;
+          });
+          console.log(
+            "this.finished................................",
+            this.finished
+          );
+        });
+    },
+    pageChange(i) {
+      this.page.page = i;
+      this.getList();
+    },
+    jumpToCompanyInfo(item) {
+      const {
+        companyInfo: { uid },
+      } = item;
+      window.open(
+        this.$store.state.domainConfig.baseUrl + `/wo/${uid}`,
+        `targetCompany${uid}`
+      );
+    },
+    /** 移动端下拉刷新 **/
+    onRefresh() {
+      // 清空列表数据
+      this.finished = false;
+      console.log("onRefresh");
+      this.onLoad();
+    },
+    onLoad() {
+      console.log("onLoad");
+      this.getList();
+    },
+    calcH1() {
+      const {
+        city,
+        cityName = "",
+        direction,
+        directionName = "",
+        directionSmall,
+        directionSmallName = "",
+      } = this.selected;
+      let job = directionSmall || direction;
+      let jobName =
+        directionSmallName === "全部"
+          ? directionName
+          : directionSmallName || directionName;
+      let title = "兼职招聘";
+      if (city && job) {
+        title = `${cityName}${jobName}兼职招聘`;
+      } else if (city && !job) {
+        //兼职城市
+        title = `${cityName}兼职招聘`;
+      } else if (!city && job) {
+        //岗位页
+        title = `${jobName}兼职招聘`;
+      }
+      return title;
+    },
+  },
+};
 </script>
 
 <style scope lang="scss">
-  @import "../../assets/css/job/index.scss";
+@import "../../assets/css/job/index.scss";
 </style>
 <style lang="scss">
-  .van-dropdown-menu__title {
-    color: #666;
-  }
+.van-dropdown-menu__title {
+  color: #666;
+}
 </style>

+ 452 - 401
pages/kaifain/add/index.vue

@@ -4,13 +4,11 @@
       <div class="title">
         添加解决方案,成为合作伙伴
         <div class="backBox" @click="jumpTo()">
-          <p class="backIcon"/>
+          <p class="backIcon" />
           <p class="backWord">企业信息</p>
         </div>
       </div>
-      <div class="line">
-
-      </div>
+      <div class="line"></div>
     </div>
     <div class="bodyArea">
       <div class="statusBox" :class="{none: !(statusObj.isOk)}">
@@ -29,8 +27,8 @@
               v-for="item in industryList"
               :key="item.id"
               :label="item.name"
-              :value="item.id">
-            </el-option>
+              :value="item.id"
+            ></el-option>
           </el-select>
         </div>
         <div class="right">
@@ -40,8 +38,8 @@
               v-for="item in techTypeList"
               :key="item.id"
               :label="item.name"
-              :value="item.id">
-            </el-option>
+              :value="item.id"
+            ></el-option>
           </el-select>
         </div>
       </div>
@@ -57,9 +55,12 @@
               accept="image/png, image/jpeg"
               :before-upload="(file) => handleFileChange(file, 'images')"
             >
-              <i v-if="data.images" class="el-icon-delete avatar-uploader-icon"
-                @click.stop="(file) => handleDeleteFile('images')"></i>
-              <img v-if="data.images" :src="data.images" class="avatar"/>
+              <i
+                v-if="data.images"
+                class="el-icon-delete avatar-uploader-icon"
+                @click.stop="(file) => handleDeleteFile('images')"
+              ></i>
+              <img v-if="data.images" :src="data.images" class="avatar" />
               <div v-else class="noneImage">
                 <i class="el-icon-plus avatar-uploader-icon"></i>
                 <span class="title">上传照片</span>
@@ -77,9 +78,13 @@
         <el-input v-model="data.description" placeholder="请用一句话来介绍您的方案,10-50字符"></el-input>
       </div>
       <div class="intro">
-        <div class="stitle">方案介绍<span @click="jumpToOther">查看参考示例</span></div>
+        <div class="stitle">
+          方案介绍
+          <span @click="jumpToOther">查看参考示例</span>
+        </div>
         <div class="editor">
-          <editor :content="data.detail"
+          <editor
+            :content="data.detail"
             @change="(val) => data.detail = val"
             :haveVideo="true"
             placeholder="支持图文混排,请至少添加:【文字描述】【方案视频】【方案介绍图片】【架构图片】【架构说明】等模块;可添加方案截图/PDF文档转图片,不低于500字"
@@ -91,17 +96,20 @@
         <div class="stitle">成功案例</div>
         <div class="list">
           <div class="titleCell">
-            <div class="tt1"><p>品牌logo</p></div>
+            <div class="tt1">
+              <p>品牌logo</p>
+            </div>
             <div class="tt2">案例描述</div>
             <div class="tt3">附件</div>
             <div class="tt4">操作</div>
           </div>
-          <div class="cell"
+          <div
+            class="cell"
             v-for="(item, index) in data.successful_case"
             @click="openEditCase(item)"
           >
             <div class="img">
-              <img :src="item.logo" alt="">
+              <img :src="item.logo" alt />
             </div>
             <div class="content">
               <p>【{{data.title}}】帮助【{{item.title}}】提供解决方案</p>
@@ -161,9 +169,12 @@
                   accept="image/png, image/jpeg"
                   :before-upload="(file) => handleFileChange(file, 'logo')"
                 >
-                  <i v-if="dataItem.logo" class="el-icon-delete avatar-uploader-icon"
-                    @click.stop="() => handleDeleteFile('logo') "></i>
-                  <img v-if="dataItem.logo" :src="dataItem.logo" class="avatar"/>
+                  <i
+                    v-if="dataItem.logo"
+                    class="el-icon-delete avatar-uploader-icon"
+                    @click.stop="() => handleDeleteFile('logo') "
+                  ></i>
+                  <img v-if="dataItem.logo" :src="dataItem.logo" class="avatar" />
                   <div v-else class="noneImage">
                     <i class="el-icon-plus avatar-uploader-icon"></i>
                   </div>
@@ -198,439 +209,479 @@
         <div class="taskDesc">
           <div class="name">案例描述</div>
           <div class="value">
-            <editor :content="dataItem.description"
+            <editor
+              :content="dataItem.description"
               @change="(val) => dataItem.description = val"
               :haveVideo="true"
               placeholder="支持图文混排,请至少添加不低于100字成功案例描述"
             ></editor>
           </div>
         </div>
-
       </div>
       <div class="dialog-footer">
         <div class="preview" @click="previewCase">
           <p>预览</p>
         </div>
-        <div class="submit" @click="addCase"><p>提交</p></div>
-        <div class="cancle" @click="dialogVisible=false"><p>取消</p></div>
+        <div class="submit" @click="addCase">
+          <p>提交</p>
+        </div>
+        <div class="cancle" @click="dialogVisible=false">
+          <p>取消</p>
+        </div>
       </div>
     </el-dialog>
-    <KaifainFooter style="margin-top: 30px;" :data="footer"/>
-
+    <KaifainFooter style="margin-top: 30px;" :data="footer" />
   </div>
 </template>
 
 <script>
-  import editor from "@/components/editor";
-  import uploadFile from "@/mixins/uploadFile";
-  import DealSeoFooter from "@/components/kaifain/dealSeoFooter"
-  import KaifainFooter from "@/components/SeoFooter"
+import editor from "@/components/editor";
+import uploadFile from "@/mixins/uploadFile";
+import DealSeoFooter from "@/components/kaifain/dealSeoFooter";
+import KaifainFooter from "@/components/SeoFooter";
 
-  export default {
-    name: 'userSetting',
-    components: {
-      editor, KaifainFooter
+export default {
+  name: "userSetting",
+  components: {
+    editor,
+    KaifainFooter,
+  },
+  data() {
+    return {
+      lastId: 0,
+      data: {
+        city: 1,
+        industry: null, //所处行业的ID
+        title: "", //服务名称
+        description: "", //简单描述
+        images: "", //封面图片,缩略图的地址URL
+        detail: "", //具体的描述
+        tech_type: null, //技术类型
+        successful_case: [],
+        status: 0,
+      },
+      tempData: {},
+      industryList: [],
+      techTypeList: [],
+      dialogVisible: false,
+      dataItem: {
+        provider_id: 0, //服务商ID
+        title: "", //成功案例1
+        logo: "", //http://www.baidu.com,URL
+        description: "", //描述一下啊啥的发啊的算法
+        file: "", //https://www.baidu.com,用户上传的PDF,格式必须为PDF,URL
+      },
+      fileList: [],
+      kaifainUrl: ""
+    };
+  },
+  async asyncData({ ...params }) {
+    try {
+      params.store.commit("updateNoneCommonFooter", true);
+    } catch (e) {
+      console.log("updateNoneCommonFooter", e);
+    }
+    let dealSeoFooterObj = new DealSeoFooter(params);
+    let footer = await dealSeoFooterObj.dealData();
+    let domainConfig = params.store.state.domainConfig;
+    return {
+      ...domainConfig,
+      ...footer,
+      mobile: params.app.$deviceType.isMobile(),
+    };
+  },
+  mixins: [uploadFile],
+  computed: {
+    statusObj() {
+      let status = Number(this.data.status || 0);
+      let nameList = ["未申请", "审核中", "已入驻", "拒绝"];
+      let o = {
+        isOk: status === 2,
+        name: nameList[status],
+      };
+      return o;
     },
-    data() {
-      return {
-        lastId: 0,
-        data: {
-          city: 1,
-          industry: null, //所处行业的ID
-          title: '', //服务名称
-          description: '', //简单描述
-          images: '', //封面图片,缩略图的地址URL
-          detail: '',//具体的描述
-          tech_type: null,//技术类型
-          successful_case: [],
-          status: 0
-        },
-        tempData: {},
-        industryList: [],
-        techTypeList: [],
-        dialogVisible: false,
-        dataItem: {
-          provider_id: 0,//服务商ID
-          title: '', //成功案例1
-          logo: '',//http://www.baidu.com,URL
-          description: '', //描述一下啊啥的发啊的算法
-          file: '', //https://www.baidu.com,用户上传的PDF,格式必须为PDF,URL
-        },
-        fileList: [],
-      }
+    isDis() {
+      let status = Number(this.data.status || 0);
+      return status === 1;
     },
-    async asyncData({ ...params}) {
-      try {
-        params.store.commit("updateNoneCommonFooter", true)
-      } catch (e) {
-        console.log("updateNoneCommonFooter", e)
-      }
-      let dealSeoFooterObj = new DealSeoFooter(params)
-      let footer = await dealSeoFooterObj.dealData()
-
-      return {
-        ...footer,
-        mobile: params.app.$deviceType.isMobile()
-      };
+  },
+  created() {
+    const {kaifainUrl, jishuBaseUrl} = this.$store.state.domainConfig;
+    this.kaifainUrl = kaifainUrl
+  },
+  async mounted() {
+    this.needLogin();
+    let query = new URLSearchParams(location.search);
+    this.lastId = query.get("lastId") || 0;
+    //如果存在ID,则优先获取ID
+    if (this.lastId) {
+      this.getLastDetail();
+    } else {
+      this.getDraftInfo();
+    }
+    this.getTypeList();
+  },
+  methods: {
+    jumpTo() {
+      location.href = "/otherpage/companyComplete";
     },
-    mixins: [uploadFile],
-    computed: {
-      statusObj() {
-        let status = Number(this.data.status || 0)
-        let nameList = ['未申请', '审核中', '已入驻', '拒绝']
-        let o = {
-          isOk: status === 2,
-          name: nameList[status]
-        }
-        return o
-      },
-      isDis() {
-        let status = Number(this.data.status || 0)
-        return status === 1
+    /** 图片文件上传 **/
+    handleFileChange(file, type) {
+      const isJPG = file.type === "image/jpeg";
+      const isPNG = file.type === "image/png";
+      const isLt2M = file.size / 1024 / 1024 < 2;
+      if (!isJPG && !isPNG) {
+        this.$message.error("上传头像图片只能是 JPG/PNG 格式!");
+        return;
       }
-    },
-    async mounted() {
-      this.needLogin();
-      let query = new URLSearchParams(location.search)
-      this.lastId = query.get('lastId') || 0
-      //如果存在ID,则优先获取ID
-      if (this.lastId) {
-        this.getLastDetail()
-      } else {
-        this.getDraftInfo()
+      if (!isLt2M) {
+        this.$message.error("上传头像图片大小不能超过 2MB!");
+        return;
       }
-      this.getTypeList()
-    },
-    methods: {
-      jumpTo() {
-        location.href = "/otherpage/companyComplete";
-      },
-      /** 图片文件上传 **/
-      handleFileChange(file, type) {
-        const isJPG = file.type === 'image/jpeg';
-        const isPNG = file.type === 'image/png';
-        const isLt2M = file.size / 1024 / 1024 < 2;
-        if (!isJPG && !isPNG) {
-          this.$message.error('上传头像图片只能是 JPG/PNG 格式!');
-          return
-        }
-        if (!isLt2M) {
-          this.$message.error('上传头像图片大小不能超过 2MB!');
-          return
-        }
-        const formData = new FormData();
-        formData.append("file", file);
-        formData.append("original_filename", file.name);
-        this.uploading = true;
-        this.$axios
-          .$post(`/upload_image`, formData, {
-            headers: { "Content-Type": "multipart/form-data" }
-          })
-          .then(res => {
-            if (type === 'images') {
-              this.data.images = res.filename
-            } else if (type === 'logo') {
-              this.dataItem.logo = res.filename
-            }
-            console.log('type', type, this.data, this.dataItem)
-          })
-          .finally(() => {
-            this.uploading = false;
-          });
-      },
-      /** 删除问及爱你 **/
-      handleDeleteFile(type) {
-        if (type === 'images') {
-          this.data.images = ''
-        } else if (type === 'logo') {
-          this.dataItem.logo = ''
-        }
-      },
-      /** pdf上传  **/
-      handlePDFFileChange(file, type) {
-        console.log(file)
-        const isPDF = file.type === 'application/pdf';
-        const isLt2M = file.size / 1024 / 1024 < 2;
-        if (!isPDF) {
-          this.$message.error('上传文件只能是 JPG/PNG 格式!');
-          return
-        }
-        // if (!isLt2M) {
-          // this.$message.error('上传文件大小不能超过 2MB!');
-          // return
-        // }
-        const formData = new FormData();
-        formData.append("file", file);
-        formData.append("original_filename", file.name);
-        this.uploading = true;
-        this.apiPrepareUpload(file, (res)=>{
-          if (res.data && res.data.status === 1) {
-            let url = res.data.data.url
-            this.dataItem.file = url
-            this.fileList = [{name:file.name, url: url}]
-          } else {
-            this.$message.error('上传失败')
-          }
+      const formData = new FormData();
+      formData.append("file", file);
+      formData.append("original_filename", file.name);
+      this.uploading = true;
+      this.$axios
+        .$post(`/upload_image`, formData, {
+          headers: { "Content-Type": "multipart/form-data" },
         })
-        return false
-      },
-      /** pdf删除 **/
-      handlePDFFileRemove() {
-        this.fileList = []
-        this.dataItem.file = ""
-      },
-      /** 弹窗逻辑 **/
-      submitChange() {
-      },
-      /** 获取选择信息 **/
-      getTypeList() {
-        this.$axios.get('/api/kaifawu/get_options').then(res => {
-          if (Number(res.data.status) === 1) {
-            this.industryList = res.data.data.industries
-            this.techTypeList = res.data.data.tech_types
+        .then((res) => {
+          if (type === "images") {
+            this.data.images = res.filename;
+          } else if (type === "logo") {
+            this.dataItem.logo = res.filename;
           }
+          console.log("type", type, this.data, this.dataItem);
         })
-      },
-      /** 点击添加生成案例 **/
-      async addSuccessInfo() {
-        let res = null
-        if (!this.data.id) {
-          res = await this.saveDraft()
+        .finally(() => {
+          this.uploading = false;
+        });
+    },
+    /** 删除问及爱你 **/
+    handleDeleteFile(type) {
+      if (type === "images") {
+        this.data.images = "";
+      } else if (type === "logo") {
+        this.dataItem.logo = "";
+      }
+    },
+    /** pdf上传  **/
+    handlePDFFileChange(file, type) {
+      console.log(file);
+      const isPDF = file.type === "application/pdf";
+      const isLt2M = file.size / 1024 / 1024 < 2;
+      if (!isPDF) {
+        this.$message.error("上传文件只能是 JPG/PNG 格式!");
+        return;
+      }
+      // if (!isLt2M) {
+      // this.$message.error('上传文件大小不能超过 2MB!');
+      // return
+      // }
+      const formData = new FormData();
+      formData.append("file", file);
+      formData.append("original_filename", file.name);
+      this.uploading = true;
+      this.apiPrepareUpload(file, (res) => {
+        if (res.data && res.data.status === 1) {
+          let url = res.data.data.url;
+          this.dataItem.file = url;
+          this.fileList = [{ name: file.name, url: url }];
+        } else {
+          this.$message.error("上传失败");
         }
-        if (this.data.id || res) {
-          this.dialogVisible = true
-          this.dataItem = {
-            provider_id: '',//服务商ID
-            title: '', //成功案例1
-            logo: '',//http://www.baidu.com,URL
-            description: '', //描述一下啊啥的发啊的算法
-            file: '', //https://www.baidu.com,用户上传的PDF,格式必须为PDF,URL
-          }
+      });
+      return false;
+    },
+    /** pdf删除 **/
+    handlePDFFileRemove() {
+      this.fileList = [];
+      this.dataItem.file = "";
+    },
+    /** 弹窗逻辑 **/
+    submitChange() {},
+    /** 获取选择信息 **/
+    getTypeList() {
+      this.$axios.get("/api/kaifawu/get_options").then((res) => {
+        if (Number(res.data.status) === 1) {
+          this.industryList = res.data.data.industries;
+          this.techTypeList = res.data.data.tech_types;
         }
-      },
-      /** 删除案例 **/
-      deleteCase(item) {
-        this.$confirm('此操作将直接删除该成功案例, 是否继续?', '提示', {
-          confirmButtonText: '确定',
-          cancelButtonText: '取消',
-          type: 'warning'
-        }).then(() => {
-          this.$axios.post('/api/kaifawu/delete_case', {
-            id: item.id
-          }).then(res => {
-            if (Number(res.data.status) === 1) {
-              this.$message({
-                type: 'success',
-                message: '删除成功!'
-              });
-            }
-          })
-        }).catch(() => {
+      });
+    },
+    /** 点击添加生成案例 **/
+    async addSuccessInfo() {
+      let res = null;
+      if (!this.data.id) {
+        res = await this.saveDraft();
+      }
+      if (this.data.id || res) {
+        this.dialogVisible = true;
+        this.dataItem = {
+          provider_id: "", //服务商ID
+          title: "", //成功案例1
+          logo: "", //http://www.baidu.com,URL
+          description: "", //描述一下啊啥的发啊的算法
+          file: "", //https://www.baidu.com,用户上传的PDF,格式必须为PDF,URL
+        };
+      }
+    },
+    /** 删除案例 **/
+    deleteCase(item) {
+      this.$confirm("此操作将直接删除该成功案例, 是否继续?", "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+      })
+        .then(() => {
+          this.$axios
+            .post("/api/kaifawu/delete_case", {
+              id: item.id,
+            })
+            .then((res) => {
+              if (Number(res.data.status) === 1) {
+                this.$message({
+                  type: "success",
+                  message: "删除成功!",
+                });
+              }
+            });
+        })
+        .catch(() => {
           this.$message({
-            type: 'info',
-            message: '已取消删除'
+            type: "info",
+            message: "已取消删除",
           });
         });
-      },
-      /** 添加案例 **/
-      async addCase() {
-        let p = {}
-        let keyList = ['id', 'provider_id', 'title', 'logo', 'description', 'file']
-        for (let key of keyList) {
-          if (this.dataItem[key]) {
-            p[key] = this.dataItem[key]
-          }
-        }
-        p.provider_id = this.data.id
-        let isEdit = !!p.id
-        if (!p.title || p.title.length < 2 || p.title.length > 20) {
-          this.$message.warning('请填写2-20字符的案例名称!')
-          return
-        }
-        if (!p.logo) {
-          this.$message.warning('请上传品牌logo')
-          return
-        }
-        if (!p.description || p.description.length < 100) {
-          this.$message.warning('请填写100字符的案例描述')
-          return
+    },
+    /** 添加案例 **/
+    async addCase() {
+      let p = {};
+      let keyList = [
+        "id",
+        "provider_id",
+        "title",
+        "logo",
+        "description",
+        "file",
+      ];
+      for (let key of keyList) {
+        if (this.dataItem[key]) {
+          p[key] = this.dataItem[key];
         }
-        // if (!p.file) {
-        //   this.$message.warning('请上传案例附件')
-        //   return
-        // }
-        let url = isEdit ? '/api/kaifawu/update_case' : '/api/kaifawu/store_case'
-        this.$axios.post(url, p).then(res => {
-          if (Number(res.data.status) === 1) {
-            this.dataItem.id = 4
-            if (!isEdit) {
-              this.data.successful_case.push(this.dataItem)
-            } else {
-              this.getDraftInfo()
-            }
-            this.dataItem = {
-              provider_id: 0, title: '', logo: '', description: '', file: '',
-            }
-            this.dialogVisible = false
-            this.fileList = []
-            this.$message.success(isEdit ? '更新成功' : '添加成功')
+      }
+      p.provider_id = this.data.id;
+      let isEdit = !!p.id;
+      if (!p.title || p.title.length < 2 || p.title.length > 20) {
+        this.$message.warning("请填写2-20字符的案例名称!");
+        return;
+      }
+      if (!p.logo) {
+        this.$message.warning("请上传品牌logo");
+        return;
+      }
+      if (!p.description || p.description.length < 100) {
+        this.$message.warning("请填写100字符的案例描述");
+        return;
+      }
+      // if (!p.file) {
+      //   this.$message.warning('请上传案例附件')
+      //   return
+      // }
+      let url = isEdit ? "/api/kaifawu/update_case" : "/api/kaifawu/store_case";
+      this.$axios.post(url, p).then((res) => {
+        if (Number(res.data.status) === 1) {
+          this.dataItem.id = 4;
+          if (!isEdit) {
+            this.data.successful_case.push(this.dataItem);
+          } else {
+            this.getDraftInfo();
           }
-        })
-      },
-      openEditCase(item) {
-        this.dataItem = {
-          ...item
-        }
-        if (item.file) {
-          this.fileList = [ {
-            name: '成功案例.pdf',
-            url: item.file
-          } ]
-        } else {
-          this.fileList = []
+          this.dataItem = {
+            provider_id: 0,
+            title: "",
+            logo: "",
+            description: "",
+            file: "",
+          };
+          this.dialogVisible = false;
+          this.fileList = [];
+          this.$message.success(isEdit ? "更新成功" : "添加成功");
         }
+      });
+    },
+    openEditCase(item) {
+      this.dataItem = {
+        ...item,
+      };
+      if (item.file) {
+        this.fileList = [
+          {
+            name: "成功案例.pdf",
+            url: item.file,
+          },
+        ];
+      } else {
+        this.fileList = [];
+      }
 
-        this.dialogVisible = true
-        console.log('openEditCase', this)
-      },
-      /** 获取草稿 **/
-      getDraftInfo(isPreview) {
-        this.$axios.get('/api/kaifawu/get_draft').then(res => {
-          if (Number(res.data.status) == 1 && res.data.data) {
-            let data = res.data.data
-            if (!Array.isArray(data.successful_case)) {
-              if (data.successful_case && typeof data.successful_case === "object") {
-                data.successful_case = [ data.successful_case ]
-              } else {
-                data.successful_case = []
-              }
+      this.dialogVisible = true;
+      console.log("openEditCase", this);
+    },
+    /** 获取草稿 **/
+    getDraftInfo(isPreview) {
+      this.$axios.get("/api/kaifawu/get_draft").then((res) => {
+        if (Number(res.data.status) == 1 && res.data.data) {
+          let data = res.data.data;
+          if (!Array.isArray(data.successful_case)) {
+            if (
+              data.successful_case &&
+              typeof data.successful_case === "object"
+            ) {
+              data.successful_case = [data.successful_case];
+            } else {
+              data.successful_case = [];
             }
-
-            data.city = Number(data.city)
-            data.industry = Number(data.industry)
-            data.tech_type = Number(data.tech_type)
-            this.data = data
           }
-        })
-      },
-      /** 传入id后处理 **/
-      getLastDetail() {
-        this.$axios.post('/api/kaifawu/get_provider', {
+
+          data.city = Number(data.city);
+          data.industry = Number(data.industry);
+          data.tech_type = Number(data.tech_type);
+          this.data = data;
+        }
+      });
+    },
+    /** 传入id后处理 **/
+    getLastDetail() {
+      this.$axios
+        .post("/api/kaifawu/get_provider", {
           id: this.lastId,
           self: 1,
-        }).then(res=>{
+        })
+        .then((res) => {
           if (Number(res.data.status) === 1) {
-            let data = res.data.data
-            data.city = Number(data.city)
-            data.industry = Number(data.industry)
-            data.tech_type = Number(data.tech_type)
+            let data = res.data.data;
+            data.city = Number(data.city);
+            data.industry = Number(data.industry);
+            data.tech_type = Number(data.tech_type);
             if (!Array.isArray(data.successful_case)) {
-              if (data.successful_case && typeof data.successful_case === "object") {
-                data.successful_case = [ data.successful_case ]
+              if (
+                data.successful_case &&
+                typeof data.successful_case === "object"
+              ) {
+                data.successful_case = [data.successful_case];
               } else {
-                data.successful_case = []
+                data.successful_case = [];
               }
             }
-            this.data =  data
+            this.data = data;
           }
-        })
-      },
+        });
+    },
 
-      /** 存储草稿 **/
-      async saveDraft(isPublish, isPreview) {
-        let url = '/api/kaifawu/store'
-        if (this.data.id) {
-          url = '/api/kaifawu/publish'
-        }
-        let p = {
-          ...this.data,
-          publish: isPublish ? 1 : 0
-        }
-        //服务名称
-        if (!p.title) {
-          this.$message.warning('请填写正确的服务名称(2-10字符)')
-          return
-        }
-        //所处行业
-        if (!p.industry) {
-          this.$message.warning('请选择所处行业')
-          return
-        }
-        //技术类型
-        if (!p.tech_type) {
-          this.$message.warning('请选择技术类型')
-          return
-        }
-        //缩略图
-        if (!p.images) {
-          this.$message.warning('请上传缩略图')
-          return
-        }
-        //方案简介
-        if (!p.description || p.description.length < 10 || p.description.length > 50) {
-          this.$message.warning('请填写正确的方案简介(10-50字符)')
-          return
-        }
-        //方案简介
-        if (!p.detail) {
-          this.$message.warning('请填写方案介绍')
-          return
-        }
-        // 更改已有的时候发布,校验状态
-        if (p.publish === 1 && this.lastId && Number(this.data.status) === 2) {
-          this.$message.warning('该解决方案已发布,暂不允许修改')
-          return
-        }
-        let res = await this.$axios.post(url, p)
-        if (Number(res.data.status) === 1) {
-          if (!isPublish) {
-            this.getDraftInfo(isPreview)
-            this.$message.success('保存草稿成功')
-          } else {
-            this.$message.success('您已提交申请入驻,请耐心等待审核结果')
-            setTimeout(()=>{
-              location.href = "/company/" + this.$store.state.userinfo.uid
-            }, 1000)
-          }
-          return true
-        }
-      },
-      /** 确认提交 **/
-      submitAll() {
-        this.saveDraft(true)
-      },
-      /** 预览 **/
-      preview() {
-        try {
-          localStorage.setItem('kaifainPreviewData', JSON.stringify(this.data))
-          window.open(`/kaifain/preview`, '_black')
-        } catch (e) {
-          console.log('')
-        }
-      },
-      /** 预览 **/
-      previewCase() {
-        try {
-          localStorage.setItem('kaifainPreviewCaseData', JSON.stringify(this.dataItem))
-          window.open(`/kaifain/previewCase`, '_black')
-        } catch (e) {
-          console.log('')
+    /** 存储草稿 **/
+    async saveDraft(isPublish, isPreview) {
+      let url = "/api/kaifawu/store";
+      if (this.data.id) {
+        url = "/api/kaifawu/publish";
+      }
+      let p = {
+        ...this.data,
+        publish: isPublish ? 1 : 0,
+      };
+      //服务名称
+      if (!p.title) {
+        this.$message.warning("请填写正确的服务名称(2-10字符)");
+        return;
+      }
+      //所处行业
+      if (!p.industry) {
+        this.$message.warning("请选择所处行业");
+        return;
+      }
+      //技术类型
+      if (!p.tech_type) {
+        this.$message.warning("请选择技术类型");
+        return;
+      }
+      //缩略图
+      if (!p.images) {
+        this.$message.warning("请上传缩略图");
+        return;
+      }
+      //方案简介
+      if (
+        !p.description ||
+        p.description.length < 10 ||
+        p.description.length > 50
+      ) {
+        this.$message.warning("请填写正确的方案简介(10-50字符)");
+        return;
+      }
+      //方案简介
+      if (!p.detail) {
+        this.$message.warning("请填写方案介绍");
+        return;
+      }
+      // 更改已有的时候发布,校验状态
+      if (p.publish === 1 && this.lastId && Number(this.data.status) === 2) {
+        this.$message.warning("该解决方案已发布,暂不允许修改");
+        return;
+      }
+      let res = await this.$axios.post(url, p);
+      if (Number(res.data.status) === 1) {
+        if (!isPublish) {
+          this.getDraftInfo(isPreview);
+          this.$message.success("保存草稿成功");
+        } else {
+          this.$message.success("您已提交申请入驻,请耐心等待审核结果");
+          setTimeout(() => {
+            location.href = "/company/" + this.$store.state.userinfo.uid;
+          }, 1000);
         }
-      },
-      openNewUrl(item) {
-        window.open(item.file, '__black')
-      },
-      jumpToOther() {
-        let url = "https://kaifain.proginn.com/kaifain/s/10"
-        window.open(url, '__black')
+        return true;
       }
     },
-
-  }
+    /** 确认提交 **/
+    submitAll() {
+      this.saveDraft(true);
+    },
+    /** 预览 **/
+    preview() {
+      try {
+        localStorage.setItem("kaifainPreviewData", JSON.stringify(this.data));
+        window.open(`/kaifain/preview`, "_black");
+      } catch (e) {
+        console.log("");
+      }
+    },
+    /** 预览 **/
+    previewCase() {
+      try {
+        localStorage.setItem(
+          "kaifainPreviewCaseData",
+          JSON.stringify(this.dataItem)
+        );
+        window.open(`${this.kaifainUrl}/previewCase`, '_black')
+      } catch (e) {
+        console.log("");
+      }
+    },
+    openNewUrl(item) {
+      window.open(item.file, "__black");
+    },
+    jumpToOther() {
+      let url = "https://kaifain.proginn.com/s/10";
+      window.open(url, "__black");
+    },
+  },
+};
 </script>
 <style lang="scss" scoped>
-  @import '../../../assets/css/kaifain/kaifainAdd.scss';
+@import "../../../assets/css/kaifain/kaifainAdd.scss";
 </style>
 <style lang="scss">
-  @import '../../../assets/css/kaifain/kaifainAddNoScoped.scss';
+@import "../../../assets/css/kaifain/kaifainAddNoScoped.scss";
 </style>

+ 5 - 2
pages/kaifain/detail/_tid/index.vue

@@ -73,7 +73,7 @@
             class="cell"
             v-for="item in detail.successful_case"
             :key="item.id"
-            :to="`/kaifain/case/${item.hash_id}`"
+            :to="`${kaifainUrl}/d/${item.hash_id}`"
             target="_blank"
             :title="item.name"
           >
@@ -232,10 +232,13 @@ export default {
       isShowToast: false,
       isShowToastChange: false, //是否展示更换image
       jishuBaseUrl: "",
+      kaifainUrl: "",
     };
   },
   created() {
-    this.jishuBaseUrl = this.$store.state.domainConfig.jishuinUrl;
+    const { kaifainUrl, jishuBaseUrl } = this.$store.state.domainConfig;
+    this.kaifainUrl = kaifainUrl;
+    this.jishuBaseUrl = jishuBaseUrl;
   },
   mounted() {
     if (!this.detail || !this.detail.id) {

+ 254 - 203
pages/kaifain/index.vue

@@ -3,25 +3,33 @@
     <div v-if="!mobile" class="kaifain">
       <div class="topArea">
         <div class="bgImage">
-          <img src="~@/assets/img/kaifain/banner_bj@2x.png" alt="">
+          <img src="~@/assets/img/kaifain/banner_bj@2x.png" alt />
         </div>
         <div class="topContent">
           <div class="wordImg">
-            <img src="~@/assets/img/kaifain/top_name@2x.png" alt="">
+            <img src="~@/assets/img/kaifain/top_name@2x.png" alt />
           </div>
           <div class="btnList">
-            <div class="freeSubmit" @click="isShowToast = true"><p>免费发布需求</p></div>
-            <div class="bePartner" @click="handleApplyBtnClick"><p>申请入驻</p></div>
+            <div class="freeSubmit" @click="isShowToast = true">
+              <p>免费发布需求</p>
+            </div>
+            <div class="bePartner" @click="handleApplyBtnClick">
+              <p>申请入驻</p>
+            </div>
           </div>
         </div>
       </div>
       <div class="contentArea">
         <div class="selectArea" v-if="!isSeoList">
-          <div class="content" v-for="(key, i) in Object.keys(typeList)">
-            <div class="left"><p>{{typeList[key].title}}</p></div>
+          <div class="content" :key="key" v-for="(key, i) in Object.keys(typeList)">
+            <div class="left">
+              <p>{{typeList[key].title}}</p>
+            </div>
             <div class="right">
-              <div class="cell"
+              <div
+                class="cell"
                 v-for="(item, ii) in typeList[key].list"
+                :key="item.id"
                 :class="{selected: item.id === selected[key]}"
                 @click="changeIndexSeo(key, item)"
                 v-if="ii < 8 || expansion[key]"
@@ -29,24 +37,27 @@
                 <p>{{item.name}}</p>
               </div>
             </div>
-            <div class="more" @click="changeExpansion(key)" v-if="typeList[key].list.length > 8">
-              {{expansion[key] ? "收起" : "更多"}}
-            </div>
+            <div
+              class="more"
+              @click="changeExpansion(key)"
+              v-if="typeList[key].list.length > 8"
+            >{{expansion[key] ? "收起" : "更多"}}</div>
           </div>
         </div>
         <div class="listArea">
           <h1 class="sTitle" v-if="!page.keyword">{{head.h1 || '解决方案'}}</h1>
           <h1 class="sTitle" v-else>搜索包含"{{page.keyword}}"的解决方案</h1>
           <div class="list" v-loading="loading">
-            <nuxt-link class="cell"
+            <nuxt-link
+              class="cell"
               v-for="item in dataList"
               :key="item.id"
-              :to="`/kaifain/s/${item.hash_id}`"
+              :to="`/s/${item.hash_id}`"
               target="_blank"
               :title="item.name"
             >
               <div class="left">
-                <img :src="item.images" alt="解决方案images">
+                <img :src="item.images" alt="解决方案images" />
               </div>
               <div class="right">
                 <div class="top">
@@ -69,7 +80,11 @@
                 </div>
                 <div class="bottom">
                   <div class="icon">
-                    <img :src="item.company_logo" alt="" onerror="this.src='https://stacdn.proginn.com/image/uCenter/company_logo.png'">
+                    <img
+                      :src="item.company_logo"
+                      alt
+                      onerror="this.src='https://stacdn.proginn.com/image/uCenter/company_logo.png'"
+                    />
                   </div>
                   <p class="word">{{item.company_name || '' }}</p>
                   <p class="status" v-if="item.company_verify_status == 2">{{"已认证"}}</p>
@@ -82,16 +97,21 @@
           </div>
         </div>
         <div class="pagination">
-          <el-pagination v-if="!isSeoList" background layout="prev, pager, next" :total="page.total"
-            :page-size="page.size" @current-change="pageChange"></el-pagination>
+          <el-pagination
+            v-if="!isSeoList"
+            background
+            layout="prev, pager, next"
+            :total="page.total"
+            :page-size="page.size"
+            @current-change="pageChange"
+          ></el-pagination>
           <div v-else>
             <div class="list">
-              <nuxt-link v-for="(item,index) in new Array(Math.ceil(page.total / page.size))"
-                :to="`/kaifain/s/?page=${index+1}`"
+              <nuxt-link
+                v-for="(item,index) in new Array(Math.ceil(page.total / page.size))"
+                :to="`/s/?page=${index+1}`"
                 :key="(page)+index"
-              >
-                {{index+1}}
-              </nuxt-link>
+              >{{index+1}}</nuxt-link>
             </div>
           </div>
         </div>
@@ -100,11 +120,21 @@
     <div class="kaifainMobile" v-else>
       <div class="topSelect" v-if="!isSeoList">
         <van-dropdown-menu>
-          <van-dropdown-item v-for="(key, i) in Object.keys(typeList)" v-model="selected[key]"
-            :options="typeList[key].list" :key="key+i" @change="changeIndex"/>
+          <van-dropdown-item
+            v-for="(key, i) in Object.keys(typeList)"
+            v-model="selected[key]"
+            :options="typeList[key].list"
+            :key="key+i"
+            @change="changeIndex"
+          />
         </van-dropdown-menu>
       </div>
-      <van-pull-refresh v-model="refreshing" @refresh="onRefresh" class="listArea" :class="{noneInWx: !$deviceType.app}">
+      <van-pull-refresh
+        v-model="refreshing"
+        @refresh="onRefresh"
+        class="listArea"
+        :class="{noneInWx: !$deviceType.app}"
+      >
         <div style="text-align: center" v-if="firstLoading">
           <van-loading size="24px">加载中...</van-loading>
         </div>
@@ -116,15 +146,16 @@
           @load="onLoad"
           :immediate-check="false"
         >
-          <nuxt-link class="cell"
+          <nuxt-link
+            class="cell"
             v-for="item in dataList"
             :key="item.id"
-            :to="`/kaifain/s/${item.hash_id}`"
+            :to="`/s/${item.hash_id}`"
             target="_blank"
           >
             <div class="bodyCont">
               <div class="left">
-                <img :src="item.images" alt="">
+                <img :src="item.images" alt />
               </div>
               <div class="right">
                 <div class="cellTitle">{{item.title}}</div>
@@ -144,208 +175,228 @@
         </van-list>
       </van-pull-refresh>
     </div>
-    <ConnectUs :source="'开发屋'" :isShowToast="isShowToast" @close="isShowToast=false" v-if="!isSeoList"></ConnectUs>
+    <ConnectUs
+      :source="'开发屋'"
+      :isShowToast="isShowToast"
+      @close="isShowToast=false"
+      v-if="!isSeoList"
+    ></ConnectUs>
     <BindMobile ref="bindMobile" v-if="!isSeoList"></BindMobile>
-    <KaifainFooter style="margin-top: 30px;" :data="footer"/>
+    <KaifainFooter style="margin-top: 30px;" :data="footer" />
   </div>
 </template>
 
 <script>
-  import ConnectUs from "@/components/common/connectUs"
-  import BindMobile from "@/components/common/bindMobile"
-  import DealSeoData from "@/components/kaifain/dealSeoIndex"
-  import DealSeoFooter from "@/components/kaifain/dealSeoFooter"
-  import KaifainFooter from "@/components/SeoFooter"
+import ConnectUs from "@/components/common/connectUs";
+import BindMobile from "@/components/common/bindMobile";
+import DealSeoData from "@/components/kaifain/dealSeoIndex";
+import DealSeoFooter from "@/components/kaifain/dealSeoFooter";
+import KaifainFooter from "@/components/SeoFooter";
 
-  export default {
-    layout: "opacity_header",
-    showCommonFooter: false,
-    components: { ConnectUs, BindMobile, KaifainFooter },
-    head() {
-      let { title = "", keyword = "", descrption = "", h1 = "", canonical="", metaLocation } = this.head || {}
-      if (this.$deviceType.app) {
-        title = "开发屋-解决方案"
-      }
-      let obj = {
-        title: title,
-        meta: [
-          {
-            'name': 'keywords',
-            'content': keyword
-          }, {
-            'name': 'descrption',
-            'content': descrption
-          }, {
-            'name': 'h1',
-            'content': h1
-          }
-        ],
-        link: [
-          { rel: 'canonical', href: canonical },
-        ]
-      }
-      if (metaLocation) {
-        obj.meta.push({'name': 'location', 'content': metaLocation })
-      }
-      return obj
-    },
-    async asyncData({ ...params }) {
-      try {
-        params.store.commit("updateNoneCommonFooter", true)
-      } catch (e) {
-        console.log("updateNoneCommonFooter", e)
-      }
-      let dealDataObj = new DealSeoData(params)
-      let ans = await dealDataObj.dealData()
+export default {
+  layout: "opacity_header",
+  showCommonFooter: false,
+  components: { ConnectUs, BindMobile, KaifainFooter },
+  head() {
+    let {
+      title = "",
+      keyword = "",
+      descrption = "",
+      h1 = "",
+      canonical = "",
+      metaLocation,
+    } = this.head || {};
+    if (this.$deviceType.app) {
+      title = "开发屋-解决方案";
+    }
+    let obj = {
+      title: title,
+      meta: [
+        {
+          name: "keywords",
+          content: keyword,
+        },
+        {
+          name: "descrption",
+          content: descrption,
+        },
+        {
+          name: "h1",
+          content: h1,
+        },
+      ],
+      link: [{ rel: "canonical", href: canonical }],
+    };
+    if (metaLocation) {
+      obj.meta.push({ name: "location", content: metaLocation });
+    }
+    return obj;
+  },
+  async asyncData({ ...params }) {
+    try {
+      params.store.commit("updateNoneCommonFooter", true);
+    } catch (e) {
+      console.log("updateNoneCommonFooter", e);
+    }
+    let dealDataObj = new DealSeoData(params);
+    let ans = await dealDataObj.dealData();
 
-      let dealSeoFooterObj = new DealSeoFooter(params)
-      let footer = await dealSeoFooterObj.dealData()
+    let dealSeoFooterObj = new DealSeoFooter(params);
+    let footer = await dealSeoFooterObj.dealData();
+    let domainConfig = params.store.state.domainConfig;
 
-      return {
-        ...ans,
-        ...footer
+    return {
+      ...domainConfig,
+      ...ans,
+      ...footer,
+    };
+  },
+  data() {
+    return {
+      kaifainUrl: "",
+      expansion: {
+        city: 0,
+        industry: 0,
+        techType: 0,
+      },
+      isShowToast: false,
+      name: "",
+      phone: "",
+      loading: false,
+      refreshing: false,
+      firstLoading: false, //移动端加载loading
+    };
+  },
+  created() {
+    const { kaifainUrl } = this.$store.state.domainConfig;
+    this.kaifainUrl = kaifainUrl;
+  },
+  mounted() {
+    if (this.mobile) {
+      document.body.style = "overflow:hidden;";
+    }
+    console.log(this.dataList);
+  },
+  methods: {
+    changeIndex(key, item) {
+      this.page.page = 1;
+      this.page.total = 0;
+      this.firstLoading = true;
+      if (item) {
+        this.selected[key] = item.id;
+        this.getList();
+      } else {
+        this.getList();
       }
     },
-    data() {
-      return {
-        expansion: {
-          city: 0,
-          industry: 0,
-          techType: 0,
-        },
-        isShowToast: false,
-        name: '',
-        phone: '',
-        loading: false,
-        refreshing: false,
-        firstLoading: false, //移动端加载loading
+    changeIndexSeo(key, item) {
+      console.log("key:", key, "item:", item, "selected:", this.selected);
+
+      this.selected[key] = item.id;
+      this.selected[key + "Slug"] = item.slug;
+      let { citySlug, industrySlug, techTypeSlug } = this.selected;
+      let url = this.kaifainUrl + "/";
+      if (citySlug) {
+        url += citySlug + "/";
       }
-    },
-    created() {
-      // this.firstLoading = true
-    },
-    mounted() {
-      if (this.mobile) {
-        document.body.style = "overflow:hidden;"
+      if (industrySlug) {
+        url += industrySlug + "/";
+      }
+      if (techTypeSlug) {
+        url += techTypeSlug + "/";
       }
-      console.log(this.dataList)
+      location.href = url;
     },
-    methods: {
-      changeIndex(key, item) {
-        this.page.page = 1
-        this.page.total = 0
-        this.firstLoading = true
-        if (item) {
-          this.selected[ key ] = item.id
-          this.getList()
-        } else {
-          this.getList()
-        }
-      },
-      changeIndexSeo(key, item) {
-        console.log("key:", key, "item:", item, "selected:", this.selected)
-
-        this.selected[ key ] = item.id
-        this.selected[key + 'Slug'] = item.slug
-        let {citySlug, industrySlug, techTypeSlug} = this.selected
-        let url = "/kaifain/"
-        if (citySlug) {
-          url += citySlug + '/'
-        }
-        if (industrySlug) {
-          url += industrySlug + '/'
-        }
-        if (techTypeSlug) {
-          url += techTypeSlug + '/'
-        }
-        location.href = url
-      },
-      changeExpansion(key) {
-        this.expansion[ key ] = !this.expansion[ key ]
-      },
-      getList() {
-        const { page, selected } = this
-        let p = {
-          city: selected.city,
-          tech_type: selected.techType,
-          industry: selected.industry,
-          ...page
-        }
-        this.loading = true
-        // let params = new URLSearchParams(p).toString()
-        this.$axios.post('/api/kaifawu/index', p).then(res => {
+    changeExpansion(key) {
+      this.expansion[key] = !this.expansion[key];
+    },
+    getList() {
+      const { page, selected } = this;
+      let p = {
+        city: selected.city,
+        tech_type: selected.techType,
+        industry: selected.industry,
+        ...page,
+      };
+      this.loading = true;
+      // let params = new URLSearchParams(p).toString()
+      this.$axios
+        .post("/api/kaifawu/index", p)
+        .then((res) => {
           if (Number(res.data.status) === 1) {
-            let data = res.data.data
-            this.page.total = data.total
-            let dataList = data.providers || []
-            dataList.forEach(item => {
-              item[ 'successCase' ] = ''
+            let data = res.data.data;
+            this.page.total = data.total;
+            let dataList = data.providers || [];
+            dataList.forEach((item) => {
+              item["successCase"] = "";
               if (Array.isArray(item.successful_case)) {
-                let tem = item.successful_case.map(item => item.title)
-                item[ 'successCase' ] = tem.join('、')
+                let tem = item.successful_case.map((item) => item.title);
+                item["successCase"] = tem.join("、");
               }
-            })
+            });
             if (this.page.page === 1 || !this.mobile) {
-              this.dataList = [...dataList]
+              this.dataList = [...dataList];
             } else {
-              this.dataList = [ ...this.dataList, ...dataList]
+              this.dataList = [...this.dataList, ...dataList];
             }
-            this.page.page += 1
+            this.page.page += 1;
             if (this.page.total <= this.dataList.length) {
-              this.finished = true
+              this.finished = true;
             }
           }
-        }).finally(() => {
-          this.firstLoading = false
-          this.refreshing = false
-          this.loading = false
-          console.log("this.finished", this.finished)
         })
-      },
-      pageChange(i) {
-        this.page.page = i
-        this.getList()
-      },
-      handleApplyBtnClick() {
-        const { userinfo } = this.$store.state || {}
-        //检查登录
-        if (!userinfo || !userinfo.uid) {
-          this.$message.info('请先登录!')
-          location.href = '/?loginbox=show&next=' + encodeURIComponent(location.href)
-          return
-        }
-        //去绑定手机号
-        if (!userinfo.mobile) {
-          this.$message.info('请先绑定手机号')
-          this.$refs.bindMobile.open()
-          return
-        }
-        //判断是否是首次入驻 非首次入驻 跳转到企业主页
-        if (Number(userinfo.has_attend_service_provider) !== 0) {
-          location.href = "/company/" + userinfo.uid
-          return
-        }
-        location.href = "/otherpage/companyComplete";
-      },
-      /** 移动端下拉刷新 **/
-      onRefresh() {
-        // 清空列表数据
-        this.finished = false;
-        this.loading = true;
-        this.onLoad();
-      },
-      onLoad() {
-        this.getList()
-      },
-    }
-  }
+        .finally(() => {
+          this.firstLoading = false;
+          this.refreshing = false;
+          this.loading = false;
+          console.log("this.finished", this.finished);
+        });
+    },
+    pageChange(i) {
+      this.page.page = i;
+      this.getList();
+    },
+    handleApplyBtnClick() {
+      const { userinfo } = this.$store.state || {};
+      //检查登录
+      if (!userinfo || !userinfo.uid) {
+        this.$message.info("请先登录!");
+        location.href =
+          "/?loginbox=show&next=" + encodeURIComponent(location.href);
+        return;
+      }
+      //去绑定手机号
+      if (!userinfo.mobile) {
+        this.$message.info("请先绑定手机号");
+        this.$refs.bindMobile.open();
+        return;
+      }
+      //判断是否是首次入驻 非首次入驻 跳转到企业主页
+      if (Number(userinfo.has_attend_service_provider) !== 0) {
+        location.href = "/company/" + userinfo.uid;
+        return;
+      }
+      location.href = "/otherpage/companyComplete";
+    },
+    /** 移动端下拉刷新 **/
+    onRefresh() {
+      // 清空列表数据
+      this.finished = false;
+      this.loading = true;
+      this.onLoad();
+    },
+    onLoad() {
+      this.getList();
+    },
+  },
+};
 </script>
 
 <style scope lang="scss">
-  @import "../../assets/css/kaifain/index.scss";
+@import "../../assets/css/kaifain/index.scss";
 </style>
 <style lang="scss">
-  .van-dropdown-menu__title {
-    color: #666;
-  }
+.van-dropdown-menu__title {
+  color: #666;
+}
 </style>

+ 106 - 98
pages/kaifain/preview.vue

@@ -10,39 +10,33 @@
         <div class="companyInfo">
           <div class="left">
             <div class="userImage">
-              <img :src="detail.company_info && detail.company_info.logo" alt=""/>
+              <img :src="detail.company_info && detail.company_info.logo" alt />
             </div>
-            <p class="cname"
-              :class="{status: detail.company_info && Number(detail.company_info.company_verify) === 2}">
-              {{detail.company_info && detail.company_info.name}}
-            </p>
+            <p
+              class="cname"
+              :class="{status: detail.company_info && Number(detail.company_info.company_verify) === 2}"
+            >{{detail.company_info && detail.company_info.name}}</p>
           </div>
           <div class="right">
             <div class="icon"></div>
           </div>
         </div>
       </div>
-      <div class="bgChange" @click="isShowToastChange=true" v-if="isSelf">
-
-      </div>
+      <div class="bgChange" @click="isShowToastChange=true" v-if="isSelf"></div>
     </div>
 
     <div class="contentArea">
       <div class="bannerSelect">
         <div class="cell selected">方案首页</div>
-        <a class="cell" href="#">
-          文章({{detail.jishuin && detail.jishuin.topics_count || 0}})</a>
-        <a class="cell"  href="#">
-          视频({{detail.jishuin && detail.jishuin.videos_count || 0}})</a>
+        <a class="cell" href="#">文章({{detail.jishuin && detail.jishuin.topics_count || 0}})</a>
+        <a class="cell" href="#">视频({{detail.jishuin && detail.jishuin.videos_count || 0}})</a>
       </div>
       <div class="introArea">
         <div class="title" v-if="!mobile">
           <p class="word">方案介绍</p>
           <p class="line"></p>
         </div>
-        <div class="introContent ql-editor" v-html="detail.detail" style="padding-left: 0;">
-
-        </div>
+        <div class="introContent ql-editor" v-html="detail.detail" style="padding-left: 0;"></div>
       </div>
 
       <div class="caseListArea" v-if="haveCase">
@@ -51,16 +45,16 @@
           <p class="line"></p>
         </div>
         <div class="list">
-
-          <nuxt-link class="cell"
+          <nuxt-link
+            class="cell"
             v-for="item in detail.successful_case"
             :key="item.id"
-            :to="`/kaifain/d/${item.hash_id}`"
+            :to="`${kaifainUrl}/d/${item.hash_id}`"
             target="_blank"
             :title="item.name"
           >
             <div class="left">
-              <img :src="item.logo" alt="">
+              <img :src="item.logo" alt />
             </div>
             <div class="right">
               <div class="top">
@@ -68,7 +62,7 @@
                 <div class="bStitle">【{{detail.title}}】帮助【{{item.title}}】提供解决方案</div>
               </div>
               <div class="bottom" @click="openPDF(item)" v-if="!mobile">
-                <div class="icon"/>
+                <div class="icon" />
                 <div class="word">{{item.title}}.pdf</div>
               </div>
             </div>
@@ -82,94 +76,108 @@
       </div>
     </div>
 
-    <ConnectUs :source="'开发屋详情'" :isShowToast="isShowToast" @close="isShowToast=false" :sourceId="tid"></ConnectUs>
-    <KaifainFooter style="margin-top: 30px;" :data="footer"/>
+    <ConnectUs
+      :source="'开发屋详情'"
+      :isShowToast="isShowToast"
+      @close="isShowToast=false"
+      :sourceId="tid"
+    ></ConnectUs>
+    <KaifainFooter style="margin-top: 30px;" :data="footer" />
   </div>
 </template>
 <script>
-  import "quill/dist/quill.core.css";
-  import "quill/dist/quill.snow.css";
-  import ConnectUs from "@/components/common/connectUs";
-  import DealSeoFooter from "@/components/kaifain/dealSeoFooter"
-  import KaifainFooter from "@/components/SeoFooter"
+import "quill/dist/quill.core.css";
+import "quill/dist/quill.snow.css";
+import ConnectUs from "@/components/common/connectUs";
+import DealSeoFooter from "@/components/kaifain/dealSeoFooter";
+import KaifainFooter from "@/components/SeoFooter";
 
-  export default {
-    layout: "opacity_header",
-    components: { ConnectUs, KaifainFooter },
-    head() {
-      return {
-        title: '开发屋-提供定制化SaaS、PasS、IaaS等各大行业技术开发解决方案',
-        meta: [ {
-          'name': 'keywords',
-          'content': '定制化Saas、PasS、API、行业技术解决方案'
-        }, {
-          'name': 'descrption',
-          'content': '开发屋为企业提供行业内领先的技术解决方案,包括行业定制化SaaS、PasS、API数据接口服务以及技术组织,保障企业在降低人力开发成本的同时,得到优质的项目开发实力。'
-        }, {
-          'name': 'h1',
-          'content': '开发屋'
-        } ]
-      }
+export default {
+  layout: "opacity_header",
+  components: { ConnectUs, KaifainFooter },
+  head() {
+    return {
+      title: "开发屋-提供定制化SaaS、PasS、IaaS等各大行业技术开发解决方案",
+      meta: [
+        {
+          name: "keywords",
+          content: "定制化Saas、PasS、API、行业技术解决方案",
+        },
+        {
+          name: "descrption",
+          content:
+            "开发屋为企业提供行业内领先的技术解决方案,包括行业定制化SaaS、PasS、API数据接口服务以及技术组织,保障企业在降低人力开发成本的同时,得到优质的项目开发实力。",
+        },
+        {
+          name: "h1",
+          content: "开发屋",
+        },
+      ],
+    };
+  },
+  async asyncData({ ...params }) {
+    try {
+      params.store.commit("updateNoneCommonFooter", true);
+    } catch (e) {
+      console.log("updateNoneCommonFooter", e);
+    }
+    let dealSeoFooterObj = new DealSeoFooter(params);
+    let footer = await dealSeoFooterObj.dealData();
+    let domainConfig = params.store.state.domainConfig;
+    return {
+      ...domainConfig,
+      ...footer,
+      mobile: params.app.$deviceType.isMobile(),
+    };
+  },
+  data() {
+    return {
+      detail: {},
+      tid: 0,
+      isShowToast: false,
+      jishuBaseUrl: "",
+      kaifainUrl: ""
+    };
+  },
+
+  created() {
+    const {kaifainUrl, jishuBaseUrl} = this.$store.state.domainConfig;
+    this.kaifainUrl = kaifainUrl
+    this.jishuBaseUrl = jishuBaseUrl
+  },
+  created() {
+    this.tid = this.$route.params.tid || 0;
+    this.getDetail();
+  },
+  mounted() {
+    window.οnbefοreunlοad = () => {
+      localStorage.removeItem("kaifainPreviewData");
+    };
+  },
+  computed: {
+    haveCase() {
+      const { successful_case = [] } = this.detail;
+      return successful_case.length > 0;
     },
-    async asyncData({ ...params }) {
+  },
+  methods: {
+    getDetail() {
       try {
-        params.store.commit("updateNoneCommonFooter", true)
-      } catch ( e ) {
-        console.log("updateNoneCommonFooter", e)
+        let data = localStorage.getItem("kaifainPreviewData");
+        data = JSON.parse(data);
+        this.detail = data;
+      } catch (e) {
+        this.$message.error("解析预览数据失败,请重新点击预览!");
       }
-      let dealSeoFooterObj = new DealSeoFooter(params)
-      let footer = await dealSeoFooterObj.dealData()
-
-      return {
-        ...footer,
-        mobile: params.app.$deviceType.isMobile()
-      };
     },
-    data() {
-      return {
-        detail: {},
-        tid: 0,
-        isShowToast: false,
-        jishuBaseUrl: ""
-      };
+    openPDF(item) {
+      const { file } = item;
+      window.open(file, "pdf" + Math.random());
     },
-
-    created() {
-      this.jishuBaseUrl = this.$store.state.domainConfig.jishuinUrl;
-    },
-    created() {
-      this.tid = this.$route.params.tid || 0;
-      this.getDetail();
-    },
-    mounted() {
-      window.οnbefοreunlοad = () => {
-        localStorage.removeItem("kaifainPreviewData");
-      };
-    },
-    computed: {
-      haveCase() {
-        const { successful_case = [] } = this.detail;
-        return successful_case.length > 0;
-      }
-    },
-    methods: {
-      getDetail() {
-        try {
-          let data = localStorage.getItem("kaifainPreviewData");
-          data = JSON.parse(data);
-          this.detail = data;
-        } catch ( e ) {
-          this.$message.error("解析预览数据失败,请重新点击预览!");
-        }
-      },
-      openPDF(item) {
-        const { file } = item;
-        window.open(file, "pdf" + Math.random());
-      }
-    }
-  };
+  },
+};
 </script>
 
 <style scope lang="scss">
-  @import "../../assets/css/kaifain/detail.scss";
+@import "../../assets/css/kaifain/detail.scss";
 </style>

+ 86 - 84
pages/kaifain/previewCase.vue

@@ -2,7 +2,7 @@
   <div class="kaifainPreviewCase" :class="{isMobile: mobile}">
     <div class="topArea">
       <div class="bannerBg">
-        <img src="~@/assets/img/kaifain/detail/banner@2x.png" alt="">
+        <img src="~@/assets/img/kaifain/detail/banner@2x.png" alt />
       </div>
       <div class="topContent">
         <div class="left">
@@ -13,102 +13,104 @@
     </div>
 
     <div class="contentArea">
-     <div class="introArea">
-       <!--<div class="title">-->
-         <!--<p class="word">案例介绍</p>-->
-         <!--<p class="line"></p>-->
-       <!--</div>-->
-       <div class="introContent ql-editor"  v-html="detail.description">
-
-       </div>
-     </div>
+      <div class="introArea">
+        <!--<div class="title">-->
+        <!--<p class="word">案例介绍</p>-->
+        <!--<p class="line"></p>-->
+        <!--</div>-->
+        <div class="introContent ql-editor" v-html="detail.description"></div>
+      </div>
     </div>
-    <KaifainFooter style="margin-top: 30px;" :data="footer"/>
-
+    <KaifainFooter style="margin-top: 30px;" :data="footer" />
   </div>
 </template>
 
 <script>
-  import "quill/dist/quill.core.css";
-  import "quill/dist/quill.snow.css";
-  import ConnectUs from "@/components/common/connectUs"
-  import DealSeoFooter from "@/components/kaifain/dealSeoFooter"
-  import KaifainFooter from "@/components/SeoFooter"
+import "quill/dist/quill.core.css";
+import "quill/dist/quill.snow.css";
+import ConnectUs from "@/components/common/connectUs";
+import DealSeoFooter from "@/components/kaifain/dealSeoFooter";
+import KaifainFooter from "@/components/SeoFooter";
 
-  export default {
-    layout: "opacity_header",
-    components: {ConnectUs, KaifainFooter},
-    head() {
-      return {
-        title: '开发屋-提供定制化SaaS、PasS、IaaS等各大行业技术开发解决方案',
-        meta: [ {
-          'name': 'keywords',
-          'content': '定制化Saas、PasS、API、行业技术解决方案'
-        }, {
-          'name': 'descrption',
-          'content': '开发屋为企业提供行业内领先的技术解决方案,包括行业定制化SaaS、PasS、API数据接口服务以及技术组织,保障企业在降低人力开发成本的同时,得到优质的项目开发实力。'
-        }, {
-          'name': 'h1',
-          'content': '开发屋'
-        } ]
-      }
+export default {
+  layout: "opacity_header",
+  components: { ConnectUs, KaifainFooter },
+  head() {
+    return {
+      title: "开发屋-提供定制化SaaS、PasS、IaaS等各大行业技术开发解决方案",
+      meta: [
+        {
+          name: "keywords",
+          content: "定制化Saas、PasS、API、行业技术解决方案",
+        },
+        {
+          name: "descrption",
+          content:
+            "开发屋为企业提供行业内领先的技术解决方案,包括行业定制化SaaS、PasS、API数据接口服务以及技术组织,保障企业在降低人力开发成本的同时,得到优质的项目开发实力。",
+        },
+        {
+          name: "h1",
+          content: "开发屋",
+        },
+      ],
+    };
+  },
+  async asyncData({ ...params }) {
+    try {
+      params.store.commit("updateNoneCommonFooter", true);
+    } catch (e) {
+      console.log("updateNoneCommonFooter", e);
+    }
+    let dealSeoFooterObj = new DealSeoFooter(params);
+    let footer = await dealSeoFooterObj.dealData();
+    let domainConfig = params.store.state.domainConfig;
+    return {
+      ...domainConfig,
+      ...footer,
+      mobile: params.app.$deviceType.isMobile(),
+    };
+  },
+  data() {
+    return {
+      detail: {},
+      tid: 0,
+      isShowToast: false,
+    };
+  },
+  created() {
+    this.tid = this.$route.params.tid || 0;
+    this.getDetail();
+  },
+  mounted() {
+    window.οnbefοreunlοad = () => {
+      localStorage.removeItem("kaifainPreviewCaseData");
+    };
+  },
+  computed: {
+    haveCase() {
+      const { successful_case = [] } = this.detail;
+      return successful_case.length > 0;
     },
-    async asyncData({ ...params }) {
+  },
+  methods: {
+    getDetail() {
       try {
-        params.store.commit("updateNoneCommonFooter", true)
+        let data = localStorage.getItem("kaifainPreviewCaseData");
+        data = JSON.parse(data);
+        this.detail = data;
+        console.log("解析预览数据", this.detail);
       } catch (e) {
-        console.log("updateNoneCommonFooter", e)
-      }
-      let dealSeoFooterObj = new DealSeoFooter(params)
-      let footer = await dealSeoFooterObj.dealData()
-
-      return {
-        ...footer,
-        mobile: params.app.$deviceType.isMobile(),
+        this.$message.error("解析预览数据失败,请重新点击预览!");
       }
     },
-    data() {
-      return {
-        detail: {
-        },
-        tid: 0,
-        isShowToast: false
-      }
-    },
-    created() {
-      this.tid = this.$route.params.tid || 0
-      this.getDetail()
-    },
-    mounted() {
-      window.οnbefοreunlοad = () => {
-        localStorage.removeItem('kaifainPreviewCaseData')
-      }
+    openPDF(item) {
+      const { file } = item;
+      window.open(file, "pdf" + Math.random());
     },
-    computed: {
-      haveCase() {
-        const {successful_case = []} = this.detail
-        return successful_case.length > 0
-      }
-    },
-    methods: {
-      getDetail() {
-        try {
-          let data = localStorage.getItem('kaifainPreviewCaseData')
-          data = JSON.parse(data)
-          this.detail = data
-          console.log("解析预览数据", this.detail)
-        } catch (e) {
-          this.$message.error("解析预览数据失败,请重新点击预览!")
-        }
-      },
-      openPDF(item) {
-        const {file} = item
-        window.open(file, 'pdf' + Math.random())
-      }
-    }
-  }
+  },
+};
 </script>
 
 <style scope lang="scss">
-  @import "../../assets/css/kaifain/previewCase.scss";
+@import "../../assets/css/kaifain/previewCase.scss";
 </style>

+ 14 - 11
pages/otherpage/companyComplete/index.vue

@@ -50,8 +50,8 @@
         <div class="inputArea">
           <div class="inputBox" v-for="item in inputList" :key="item.name">
             <p class="name">{{item.title}}</p>
-            <input type="text" placeholder="请输入" v-model="item.value"  v-if="item.type==='text'"/>
-            <textarea  placeholder="请输入" v-model="item.value"  v-if="item.type==='textarea'" cols="50" rows="10"/>
+            <input type="text" placeholder="请输入" v-model="item.value" v-if="item.type==='text'"/>
+            <textarea placeholder="请输入" v-model="item.value" v-if="item.type==='textarea'" cols="50" rows="10"/>
           </div>
         </div>
 
@@ -74,10 +74,10 @@
       return {
         typeList: [],
         inputList: [
-          { name: 'name', title: '公司全称', value: '', type: "text"  },
-          { name: 'short_name', title: '公司简称', value: '', type: "text"  },
+          { name: 'name', title: '公司全称', value: '', type: "text" },
+          { name: 'short_name', title: '公司简称', value: '', type: "text" },
           { name: 'website', title: '公司链接', value: '', type: "text" },
-          { name: 'description', title: '公司简介', value: '', type: "textarea"},
+          { name: 'description', title: '公司简介', value: '', type: "textarea" },
         ],
         imageUrl: '',
         dataInfo: {},
@@ -99,7 +99,7 @@
     },
     methods: {
       /** 获取展示状态 */
-      getInfo(isRefresh=false) {
+      getInfo(isRefresh = false) {
         this.$axios.post('/api/kaifawu/get_current_step').then(res => {
           if (res.data.status === 1) {
             this.dataInfo = res.data.data.com_info || {}
@@ -110,9 +110,10 @@
                 item.value = value
               }
             })
-            const {step} = this.dataInfo
+            const { step } = this.dataInfo
             if (step === 2) {
-              location.href = "/kaifain/add"
+              const { kaifainUrl } = this.$store.state.domainConfig;
+              location.href = kaifainUrl + "/add"
             } else if (step === 1) {
 
             }
@@ -120,7 +121,7 @@
             this.imageUrl = this.dataInfo.logo || ''
             console.log('ist', this.inputList)
           }
-        }).finally(()=>{
+        }).finally(() => {
           this.loadingStatus && this.loadingStatus.close()
         })
       },
@@ -163,7 +164,7 @@
               // if (this.$deviceType.app) {
               //   history.back()
               // } else {
-                location.href = '/kaifain/add'
+              location.href = '/kaifain/add'
               // }
             }, 1000)
           } else {
@@ -192,7 +193,7 @@
           .then(res => {
             console.log(res)
             this.imageUrl = res.filename
-          }).catch((e)=>{
+          }).catch((e) => {
             this.$message.error("上传失败:" + e.message)
           })
           .finally(() => {
@@ -212,6 +213,7 @@
 
 <style lang="scss">
   @import '../../../assets/css/scssCommon.scss';
+
   .el-upload {
     width: 80px;
     height: 80px;
@@ -233,6 +235,7 @@
       }
     }
   }
+
   .companyCompleteMobile {
     .el-upload {
       width: pxtovw(80);

+ 8 - 6
pages/otherpage/companyVerifyInput/index.vue

@@ -39,7 +39,7 @@
               </div>
             </el-upload>
             <p class="tipps">
-             (图片大小最大2M)
+              (图片大小最大2M)
             </p>
           </div>
         </div>
@@ -109,7 +109,7 @@
     },
     methods: {
       /** 获取展示状态 */
-      getInfo(isRefresh=false) {
+      getInfo(isRefresh = false) {
         this.$axios.get('/api/remote/get_company_verify_info_for_apply').then(res => {
           if (res.data.status === 1) {
             this.dataInfo = res.data.data
@@ -120,7 +120,7 @@
                 item.value = value
               }
             })
-            const {need_pay, verify_status} = res.data.data
+            const { need_pay, verify_status } = res.data.data
             if (res.data.data && (Number(need_pay) !== 1 || verify_status) && isRefresh) {
               this.$message.success("您已提交企业认证,请耐心等待审核结果!")
               clearInterval(this.interval)
@@ -183,7 +183,7 @@
                 console.log('跳转到移动端支付...', url)
                 location.href = appUrl
               }
-              setTimeout(()=>{
+              setTimeout(() => {
                 this.loadingStatus = this.$loading({ fullscreen: true, text: '正在查询支付状态...' });
                 this.getPayStatus()
               }, 1500)
@@ -223,7 +223,7 @@
           .then(res => {
             console.log(res)
             this.imageUrl = res.filename
-          }).catch((e)=>{
+          }).catch((e) => {
             this.$message.error("上传失败:" + e.message)
           })
           .finally(() => {
@@ -235,7 +235,7 @@
       },
       async getPayStatus() {
         let maxTime = 30
-        this.interval = setInterval(()=>{
+        this.interval = setInterval(() => {
           this.getInfo(true)
           maxTime--
           if (maxTime < 0) {
@@ -256,6 +256,7 @@
 
 <style lang="scss">
   @import '../../../assets/css/scssCommon.scss';
+
   .el-upload {
     width: 184px;
     height: 136px;
@@ -277,6 +278,7 @@
       }
     }
   }
+
   .companyVerifyInputMobile {
     .el-upload {
       width: pxtovw(184);

+ 1 - 2
pages/otherpage/index.vue

@@ -3,8 +3,7 @@
 </template>
 
 <script>
-export default {
-}
+  export default {}
 </script>
 
 <style>

+ 28 - 27
pages/otherpage/kaifain/createInWeb.vue

@@ -55,11 +55,12 @@
 
 <style lang="scss" scoped>
   @import "../../../assets/css/scssCommon";
+
   .createInWeb {
     width: 100vw;
     height: 100vh;
     overflow: hidden;
-    background:rgba(244,245,249,1);
+    background: rgba(244, 245, 249, 1);
     display: flex;
     justify-content: center;
     align-items: center;
@@ -76,19 +77,19 @@
     }
     .tips {
       margin-top: pxtovw(22);
-      height:pxtovw(22);
-      font-size:pxtovw(16);
-      font-weight:600;
-      color:rgba(34,34,34,1);
-      line-height:pxtovw(22);
+      height: pxtovw(22);
+      font-size: pxtovw(16);
+      font-weight: 600;
+      color: rgba(34, 34, 34, 1);
+      line-height: pxtovw(22);
     }
     .urls {
       margin-top: pxtovw(6);
-      min-height:pxtovw(20);
-      font-size:pxtovw(14);
-      font-weight:400;
-      color:rgba(146,154,164,1);
-      line-height:pxtovw(20);
+      min-height: pxtovw(20);
+      font-size: pxtovw(14);
+      font-weight: 400;
+      color: rgba(146, 154, 164, 1);
+      line-height: pxtovw(20);
       text-align: center;
       word-break: break-all;
       white-space: pre-wrap;
@@ -97,29 +98,29 @@
     }
     .copyWord {
       margin-top: pxtovw(6);
-      height:pxtovw(21);
-      font-size:pxtovw(15);
-      font-weight:400;
-      color:rgba(48,142,255,1);
-      line-height:pxtovw(21);
+      height: pxtovw(21);
+      font-size: pxtovw(15);
+      font-weight: 400;
+      color: rgba(48, 142, 255, 1);
+      line-height: pxtovw(21);
     }
     .btn {
       margin-top: pxtovw(29);
-      width:pxtovw(149);
-      height:pxtovw(42);
-      background:rgba(48,142,255,1);
-      box-shadow:0px pxtovw(2) pxtovw(6) 0px rgba(48,142,255,0.3);
-      border-radius:pxtovw(2);
+      width: pxtovw(149);
+      height: pxtovw(42);
+      background: rgba(48, 142, 255, 1);
+      box-shadow: 0px pxtovw(2) pxtovw(6) 0px rgba(48, 142, 255, 0.3);
+      border-radius: pxtovw(2);
       display: flex;
       justify-content: center;
       align-items: center;
       p {
-        height:pxtovw(20);
-        font-size:pxtovw(14);
-        font-family:PingFangSC-Medium,PingFang SC;
-        font-weight:500;
-        color:rgba(255,255,255,1);
-        line-height:pxtovw(20);
+        height: pxtovw(20);
+        font-size: pxtovw(14);
+        font-family: PingFangSC-Medium, PingFang SC;
+        font-weight: 500;
+        color: rgba(255, 255, 255, 1);
+        line-height: pxtovw(20);
       }
     }
   }

+ 11 - 7
pages/otherpage/kaifain/myKaifain.vue

@@ -44,7 +44,8 @@
             <div class="bottomArea">
               <div class="companyInfo">
                 <div class="companyImg">
-                  <img :src="item.companyInfo.logo" onerror="this.src='https://stacdn.proginn.com/image/uCenter/company_logo.png'"
+                  <img :src="item.companyInfo.logo"
+                    onerror="this.src='https://stacdn.proginn.com/image/uCenter/company_logo.png'"
                     alt="">
                 </div>
                 <div class="companyName">{{item.companyInfo.name}}</div>
@@ -55,7 +56,7 @@
             </div>
 
             <div class="detailInfo" v-if="Number(item.status) === 2">
-              <div class="baseInfoNoSelected" v-if="showDetailIndex !== index" >
+              <div class="baseInfoNoSelected" v-if="showDetailIndex !== index">
                 <div class="leftBase">
                   <div class="collectArea">
                     <p class="nums">{{item.data.base.collectCount || 0}}</p>
@@ -88,7 +89,8 @@
                         <p class="nums">{{item.data.base.collectCount || 0}}</p>
                         <p class="ww">收藏量</p>
                       </div>
-                      <div class="dataCell"@click.stop="jumpTo('/otherpage/kaifain/myKaifainData/viewed?providerId='+item.id)">
+                      <div class="dataCell"
+                        @click.stop="jumpTo('/otherpage/kaifain/myKaifainData/viewed?providerId='+item.id)">
                         <p class="nums">{{item.data.base.pv || 0}}</p>
                         <p class="ww">浏览量(PV)</p>
                       </div>
@@ -100,7 +102,8 @@
                       <div class="vipTips" :class="calcUserVip">企业会员专享权益</div>
                     </div>
                     <div class="dataDetail">
-                      <div class="dataCell" @click.stop="jumpTo('/otherpage/kaifain/myKaifainData/asked?providerId='+item.id)">
+                      <div class="dataCell"
+                        @click.stop="jumpTo('/otherpage/kaifain/myKaifainData/asked?providerId='+item.id)">
                         <p class="nums link">{{item.data.senior.contact || 0}}</p>
                         <p class="ww">咨询次数</p>
                       </div>
@@ -276,8 +279,9 @@
         location.href = url
       },
       jumpToDetail(item) {
-        const {id} = item
-        location.href = '/kaifain/s/' + id + '.html'
+        const { id, hash_id } = item
+        const { kaifainUrl } = this.$store.state.domainConfig;
+        location.href = kaifainUrl + '/s/' + hash_id
       },
       showDetail(index) {
         const { is_vip, vip_type_id } = this.$store.state.userinfo || {}
@@ -292,7 +296,7 @@
       openToast() {
         this.$dialog.confirm({
             title: '开通会员',
-            message:'开通企业会员,即可查看更多解决方案高级数据。',
+            message: '开通企业会员,即可查看更多解决方案高级数据。',
             showCancelButton: true,
             confirmButtonText: '立即开通',
             cancelButtonText: '不了谢谢',

+ 12 - 11
pages/otherpage/kaifain/myKaifainData/_type.vue

@@ -36,7 +36,7 @@
             <div class="userInfo">
               <div class="name">客户: {{item.userInfo.nickname}}</div>
               <div class="line"></div>
-              <div class="phoneNote">电话: </div>
+              <div class="phoneNote">电话:</div>
               <div class="phone" v-if="Number(item.platformContact)">{{item.mobile}}</div>
               <div class="getPhone" v-else @click.stop="toastPhoneFn(item)">获取电话</div>
             </div>
@@ -55,15 +55,15 @@
     ASKED: 'asked', //咨询客户页
   }
   const Title = {
-    [Type.VIEWED]: "浏览用户列表",
-    [Type.COLLECTED]: "收藏用户列表",
-    [Type.ASKED]: "咨询用户列表",
+    [ Type.VIEWED ]: "浏览用户列表",
+    [ Type.COLLECTED ]: "收藏用户列表",
+    [ Type.ASKED ]: "咨询用户列表",
     "Detault": "程序员客栈",
   }
   const URLS = {
-    [Type.VIEWED]: "/api/kaifawu/getViewUsers",
-    [Type.COLLECTED]: "/api/kaifawu/getCollectUsers",
-    [Type.ASKED]: "/api/kaifawu/getContactList",
+    [ Type.VIEWED ]: "/api/kaifawu/getViewUsers",
+    [ Type.COLLECTED ]: "/api/kaifawu/getCollectUsers",
+    [ Type.ASKED ]: "/api/kaifawu/getContactList",
   }
   /** 咨询的客户--解决方案 **/
   export default {
@@ -71,7 +71,7 @@
     showCommonFooter: false,
     components: {},
     head() {
-      let title = Title[this.type]
+      let title = Title[ this.type ]
       let obj = {
         title: title,
         meta: [
@@ -123,7 +123,7 @@
     methods: {
       getList() {
         const { page, selectedTypeIndex } = this
-        let url = URLS[this.type]
+        let url = URLS[ this.type ]
         if (this.isLoading) {
           return
         }
@@ -183,10 +183,10 @@
       jumpTo(item) {
         //1企业  2个人
         let userInfo = item.user || item.userInfo || {}
-        const {homePageType, uid} = userInfo
+        const { homePageType, uid } = userInfo
         if (Number(homePageType) === 1) {
           location.href = '/company/' + uid
-        } else if (Number(homePageType) === 0){
+        } else if (Number(homePageType) === 0) {
           location.href = '/wo/' + uid
         }
       },
@@ -216,5 +216,6 @@
   .delete-button {
     height: 100%;
   }
+
   @import "@/assets/css/otherpage/kaifain/myKaifainData";
 </style>

+ 3 - 2
pages/otherpage/kaifain/viewHistory.vue

@@ -166,8 +166,9 @@
         this.getList()
       },
       jumpToKaifain(item) {
-        const {provider: {id, hash_id} = {}} = item
-        location.href = `/kaifain/s/${hash_id}`
+        const { provider: { id, hash_id } = {} } = item
+        const { kaifainUrl } = this.$store.state.domainConfig;
+        location.href = kaifainUrl + `/kaifain/s/${hash_id}`
       }
     }
   }

+ 100 - 0
pages/otherpage/money/index.vue

@@ -0,0 +1,100 @@
+<template>
+  <div class="index">
+
+    <div class="contentInfo">
+      <div class="titleInfo">
+        <div class="stitle">个人资金账户</div>
+        <div class="sdesc">来自程序员客栈</div>
+      </div>
+
+      <div class="line"></div>
+
+      <div class="moneyInfo">
+        <div class="normal">
+          <div class="label">薪资账户余额</div>
+          <div class="nums">¥{{bankInfo.incomeTaxBalance || 0 }}元</div>
+        </div>
+        <div class="normal freeze">
+          <div class="label">冻结账户余额</div>
+          <div class="nums">¥{{bankInfo.frozenBalance || 0 }}元</div>
+        </div>
+      </div>
+
+      <div class="line"></div>
+
+      <div class="submitArea">
+        <div class="agreeInfo" @click="onAgreeProto">
+          <div class="choose" :class="{ok: agreeProto}"></div>
+          <div class="word">确认并同意</div>
+          <a href="/otherpage/proto/lingxin" class="word1" @click.stop="()=>{}">《领薪宝服务协议》</a>
+        </div>
+        <div class="agreeBtn" @click="onWithdrawBtn">
+          <p>提现</p>
+        </div>
+      </div>
+    </div>
+
+    <div class="connect">
+      商务合作请联系: <span>0571-28120931</span>
+    </div>
+
+    <div class="bottomArea">
+      <IBottom :step="2"></IBottom>
+    </div>
+  </div>
+</template>
+
+<script>
+  import IBottom from '../../../components/otherpage/money/bottom'
+
+  export default {
+    name: "MoneyIndex",
+    components: { IBottom },
+    head() {
+      let obj = {
+        title: "领薪宝",
+      }
+      return obj
+    },
+    async asyncData({ app }) {
+      return {
+        mobile: app.$deviceType.isMobile()
+      }
+    },
+    data() {
+      return {
+        agreeProto: false,
+        bankInfo: {}
+      }
+    },
+    created() {
+      this.getAccountBankInfo()
+    },
+    methods: {
+      onWithdrawBtn() {
+        if (!this.agreeProto) {
+          this._toast('请先同意协议')
+          return false
+        }
+        location.href = '/otherpage/money/withdraw'
+      },
+      onAgreeProto() {
+        this.agreeProto = !this.agreeProto
+      },
+      getAccountBankInfo() {
+        this.$axios.post('/api/account/getBalance').then(res => {
+          if (Number(res.data.status) === 1) {
+            let data = res.data.data
+            this.bankInfo = data
+          }
+        }).catch(e => {
+          console.log(e)
+        })
+      }
+    }
+  }
+</script>
+
+<style lang="scss" scoped>
+  @import "../../../assets/css/otherpage/money/index";
+</style>

+ 64 - 0
pages/otherpage/money/introduce.vue

@@ -0,0 +1,64 @@
+<template>
+  <div class="introduce">
+    <div class="topContent">
+      <div class="title">领薪宝</div>
+      <div class="desc">平台级财税结算SaaS方案提供商</div>
+    </div>
+    <div class="bodyIntro">
+      <div class="desc">领薪宝是由杭州势行网络科技有限公司,开发的一款解决项目开发立项-费用托管-过程管理-薪资结算问题的全套服务应用,主要提供以下服务:</div>
+      <div class="step step1">
+        <div class="iconStep icon1"></div>
+        <div class="stepDesc">灵活用工平台,自由工作者代缴税服务</div>
+      </div>
+      <div class="step step2">
+        <div class="iconStep icon2"></div>
+        <div class="stepDesc">项目开发,线上交易担保、代码托管、纠纷仲裁服、阶段性验收服务</div>
+      </div>
+      <div class="useBtn" @click="jumpToUse">
+        <p>立即使用</p>
+      </div>
+    </div>
+    <div class="connect">
+      商务合作请联系: <span>0571-28120931</span>
+    </div>
+    <div class="bottomArea">
+      <IBottom :step="1"></IBottom>
+    </div>
+  </div>
+</template>
+
+<script>
+  import IBottom from '../../../components/otherpage/money/bottom'
+
+  export default {
+    name: "MoneyIntroduce",
+    showCommonFooter: false,
+    components: { IBottom },
+    head() {
+      let obj = {
+        title: "领薪宝",
+      }
+      return obj
+    },
+    async asyncData({ app }) {
+      return {
+        mobile: app.$deviceType.isMobile()
+      }
+    },
+    data() {
+      return {}
+    },
+    created() {
+
+    },
+    methods: {
+      jumpToUse() {
+        location.href = '/otherpage/money/'
+      }
+    }
+  }
+</script>
+
+<style lang="scss" scoped>
+  @import "../../../assets/css/otherpage/money/introduce";
+</style>

+ 109 - 0
pages/otherpage/money/uploadInvoice.vue

@@ -0,0 +1,109 @@
+<template>
+  <div class="uploadInvoice">
+    <div class="ruleIntro">
+      <div class="stitle">规则说明:</div>
+      <div class="sdesc">1.开发宝当前只接受专票</div>
+      <div class="sdesc">2.发票票面额度必须和提现额度一致</div>
+      <div class="sdesc">3.发票图片审核中,不能重新发起提现,审核失败/审核通过后才能重新发起提现</div>
+      <div class="sdesc">4.发票图片审核通过后,请按照系统消息、邮件消息、短信通知,按相应提示,邮寄纸质发票</div>
+    </div>
+
+    <div class="imageUpload">
+      <div class="stitle">发票图片(不超过2MB)</div>
+      <div class="uploadInfo">
+        <el-upload
+          class="avatar-uploader"
+          action="#"
+          :show-file-list="false"
+          :multiple="false"
+          accept="image/png, image/jpeg"
+          :before-upload="(file) => handleFileChange(file, 'invoiceImg')"
+        >
+          <i v-if="invoiceImg" class="el-icon-delete avatar-uploader-icon"
+            @click.stop="() => handleDeleteFile('bg') "></i>
+          <img v-if="invoiceImg" :src="invoiceImg" class="avatar"/>
+          <div v-else class="noneImage">
+          </div>
+        </el-upload>
+      </div>
+    </div>
+
+    <div class="button" @click="onSubmit">
+      <p>提交审核</p>
+    </div>
+
+  </div>
+</template>
+
+<script>
+  export default {
+    name: "uploadInvoice",
+    showCommonFooter: false,
+    head() {
+      let obj = {
+        title: "领薪宝",
+      }
+      return obj
+    },
+    async asyncData({ app }) {
+      return {
+        mobile: app.$deviceType.isMobile()
+      }
+    },
+    data() {
+      return {
+        invoiceImg: '',
+        uploading: false
+      }
+    },
+    created() {
+      const {coins=1} = this.$route.query || {}
+      this.coins = Number(coins) || 0
+    },
+    methods: {
+      /** 图片文件上传 **/
+      handleFileChange(file) {
+        const isJPG = file.type === 'image/jpeg';
+        const isPNG = file.type === 'image/png';
+        const isLt2M = file.size / 1024 / 1024 < 2;
+        if (!isJPG && !isPNG) {
+          this.$message.error('上传头像图片只能是 JPG/PNG 格式!');
+          return
+        }
+        if (!isLt2M) {
+          this.$message.error('上传头像图片大小不能超过 2MB!');
+          return
+        }
+        const formData = new FormData();
+        formData.append("file", file);
+        formData.append("original_filename", file.name);
+        this.uploading = true;
+        this.$axios
+          .$post(`/upload_image`, formData, {
+            headers: { "Content-Type": "multipart/form-data" }
+          })
+          .then(res => {
+            this.invoiceImg = res.filename
+          })
+          .finally(() => {
+            this.uploading = false;
+          });
+      },
+      /** 删除问及爱你 **/
+      handleDeleteFile() {
+        this.invoiceImg = ""
+      },
+      onSubmit() {
+        if (!this.invoiceImg) {
+          this._toast('请上传发票', 'error')
+          return
+        }
+        location.href = `/otherpage/money/withdraw?coins=${this.coins}&fpUrl=${encodeURIComponent(this.invoiceImg)}`
+      }
+    }
+  }
+</script>
+
+<style lang="scss" scoped>
+  @import "../../../assets/css/otherpage/money/uploadInvoice";
+</style>

+ 126 - 0
pages/otherpage/money/withdraw.vue

@@ -0,0 +1,126 @@
+<template>
+  <div class="withdraw">
+    <div class="tabBankCard">
+      <div class="left">提现到</div>
+      <div class="right">
+        <div class="word">银行卡尾号(4656)</div>
+        <div class="iconRight"></div>
+      </div>
+    </div>
+
+    <div class="setAmount">
+      <div class="stitle">提现金额</div>
+      <div class="amountArea">
+        <div class="left">
+          <div class="pre">¥</div>
+          <input class="nums" v-model="vCoins" placeholder="最少提现10元,每日上限3万元" type="text"/>
+        </div>
+        <div class="rightClose"></div>
+      </div>
+      <div class="line"></div>
+      <div class="amountBottom">
+        <div class="leftMoney">余额 <span>¥{{bankInfo.incomeTaxBalance || 0}}</span></div>
+        <div class="rightBtn" @click="onSetAllMoney">全部提现</div>
+      </div>
+    </div>
+
+    <div class="taxScheme">
+      <div class="stitle">选择缴税方案</div>
+      <div class="sdesc">已默认为您选择最低费率缴税方案</div>
+      <div class="schemeList">
+        <div class="cell">
+          <div class="leftChoose ok"></div>
+          <div class="rightContent">
+            <div class="taxTop">
+              <div class="topLeft">青团宝</div>
+              <div class="topRight">选则扣税方式即表示您同意 <a href="">《青团宝服务协议》</a></div>
+            </div>
+            <div class="taxContent">代缴综合费率7.5%, 预计到账¥8888.88元</div>
+          </div>
+        </div>
+      </div>
+    </div>
+
+    <div class="submitBtn">
+      <p>确认提现</p>
+    </div>
+
+    <div class="wTips">
+      预计3-5个工作日到账
+    </div>
+
+    <div class="intro">
+      <div class="stitle">提现说明</div>
+      <div class="sdesc">1.自行提供发票,只支持上传电子发票</div>
+      <div class="sdesc">2.请确认银行卡账号和实名认证信息保持一致,如需修改银 行卡账号,请前往 <a href="">设置银行卡信息</a></div>
+      <div class="sdesc">3.提现成功后,会在3-5个工作日内到账,节假日可能会稍有 延时,请耐心等待,如长时间未到账( 超过5个工作日),可联系 <a href="">在线客服</a></div>
+    </div>
+  </div>
+</template>
+
+<script>
+  export default {
+    name: "Withdraw",
+    showCommonFooter: false,
+    head() {
+      let obj = {
+        title: "领薪宝",
+      }
+      return obj
+    },
+    async asyncData({ app }) {
+      return {
+        mobile: app.$deviceType.isMobile()
+      }
+    },
+    data() {
+      return {
+        bankInfo: {},
+        vCoins: 0
+      }
+    },
+    created() {
+      this.getAccountBankInfo()
+      this.getWithdrawType()
+    },
+    methods: {
+      getWithdrawType() {
+        this.$axios.post('/api/kaifabao/getBuckleConfigList').then(res => {
+
+        }).catch(e => {
+          console.log(e)
+        })
+      },
+      getAccountBankInfo() {
+        this.$axios.post('/api/account/getBalance').then(res => {
+          if (Number(res.data.status) === 1) {
+            let data = res.data.data
+            this.bankInfo = data
+          }
+        }).catch(e => {
+          console.log(e)
+        })
+      },
+      onSetAllMoney() {
+        this.vCoins = this.bankInfo.incomeTaxBalance
+      },
+      onJumpToUpload() {
+        location.href = '/otherpage/money/uploadInvoice?coins=' + this.vCoins || 0
+      },
+      submitCommit() {
+        this.$axios.post('/api/recruit/addInvoiceWithdrawalApply', {
+          auth_code: '',
+          coins: this.coins,
+          invoice_url: this.invoiceImg
+        }).then(res=>{
+          this.invoiceImg = ""
+          this._toast('上传成功')
+        })
+      },
+    }
+  }
+</script>
+
+<style lang="scss" scoped>
+  @import "../../../assets/css/otherpage/money/withdraw";
+</style>

A diferenza do arquivo foi suprimida porque é demasiado grande
+ 195 - 0
pages/otherpage/proto/lingxin.vue


+ 14 - 14
pages/otherpage/report/_uid.vue

@@ -84,7 +84,7 @@
     async created() {
 
     },
-    async  mounted() {
+    async mounted() {
       await this.needLogin()
       this.getTypeList()
       this.getBeReportUserInfo()
@@ -92,19 +92,19 @@
     methods: {
       /** 获取类型 */
       getTypeList() {
-        this.$axios.get('/api/report/get_report_type').then(res=>{
+        this.$axios.get('/api/report/get_report_type').then(res => {
           console.log(res, res.data)
           if (res.data.status === 1) {
             //处理将 data数组转换一下
-            let typeListData = [...(res && res.data && res.data.data || []) ]
+            let typeListData = [ ...(res && res.data && res.data.data || []) ]
             let list = []
-            for (let  i = 0; i < typeListData.length; i++) {
+            for (let i = 0; i < typeListData.length; i++) {
               list.push({
-                name: typeListData[i],
-                selected: i===0 ? true : false
+                name: typeListData[ i ],
+                selected: i === 0 ? true : false
               })
             }
-            this.typeList = [...list]
+            this.typeList = [ ...list ]
           }
         })
       },
@@ -115,11 +115,11 @@
           return
         }
         this.beReportUserId = uid
-        this.$axios.get(`/api/user/getUserInfo?id=${uid}`).then(res=>{
+        this.$axios.get(`/api/user/getUserInfo?id=${uid}`).then(res => {
           let data = res.data
           if (data.status === 1) {
             this.beReportUser = data.data.info
-          } else if (data.status){
+          } else if (data.status) {
             console.log('res.status', data.status)
             this.$message.closeAll()
             this.$message.error(data.status.message || errMsg.getUserWrong)
@@ -132,7 +132,7 @@
 
       /** 提交 **/
       submitForm() {
-        const {typeList, detail, beReportUserId, beReportUser={}} = this
+        const { typeList, detail, beReportUserId, beReportUser = {} } = this
         if (!this.beReportUser.nickname) {
           this.$message.warning(errMsg.noneUser)
           return
@@ -160,19 +160,19 @@
           reported_uid: beReportUserId,
           type: typeData,
           detail,
-          from:'web端主页'
+          from: 'web端主页'
         }
-        this.$axios.post('/api/report/create', p).then(res=>{
+        this.$axios.post('/api/report/create', p).then(res => {
           let data = res.data
           if (data.status === 1) {
             this.$message.success('提交成功,客栈将在7日内联系处理')
-            setTimeout(()=>{
+            setTimeout(() => {
               history.back()
             }, 1000)
           } else {
             this.$message.error('提交失败')
           }
-        }).catch(e=> {
+        }).catch(e => {
           console.log(e)
           this.$message.error('提交失败')
         })

+ 27 - 26
pages/otherpage/user/addConnect.vue

@@ -7,7 +7,7 @@
           type="text"
           v-model="item.value"
           :placeholder="item.placeholder"
-          v-if="item.type === 'text'" />
+          v-if="item.type === 'text'"/>
         <el-select v-model="item.value" :placeholder="item.placeholder" v-else-if="item.type==='select'">
           <el-option
             v-for="option in item.options"
@@ -33,31 +33,31 @@
   import MintUI from 'mint-ui';
   import "mint-ui/lib/style.css";
 
-  const mix =  {
+  const mix = {
     data() {
       return {
         // 详情id
         detailID: this.$route.params.detail,
       }
     },
-    methods: {
-
-    }
+    methods: {}
   }
   //联系方式展示 0 不展示 1 电话 2网址 3 微信
   export default {
     name: 'UserAddConnect',
-    mixins: [mix],
+    mixins: [ mix ],
     data() {
       return {
         userData: [
-          { title: '联系电话', type:"text", name: 'contact', value: '', placeholder: "请输入您的联系电话(选填)" },
-          { title: '微信号',  type:"text",name: 'wechat', value: '', placeholder: "请输入您的微信号(选填)"  },
-          { title: '企业官网',  type:"text", name: 'website', value: '', placeholder: "请输入您的企业官网链接,需以http://开头(选填)"},
+          { title: '联系电话', type: "text", name: 'contact', value: '', placeholder: "请输入您的联系电话(选填)" },
+          { title: '微信号', type: "text", name: 'wechat', value: '', placeholder: "请输入您的微信号(选填)" },
+          { title: '企业官网', type: "text", name: 'website', value: '', placeholder: "请输入您的企业官网链接,需以http://开头(选填)" },
           {
-            title: '展示信息设置',  type:"select", name: 'contactDisplay', value: '', placeholder:  "选择您需要展示的联系方式",
-            options: [{label: "不展示", value: 0},{label: "联系电话", value: 1},{label: "微信号", value: 3},{label: "企业官网",
-              value: 2},]
+            title: '展示信息设置', type: "select", name: 'contactDisplay', value: '', placeholder: "选择您需要展示的联系方式",
+            options: [ { label: "不展示", value: 0 }, { label: "联系电话", value: 1 }, { label: "微信号", value: 3 }, {
+              label: "企业官网",
+              value: 2
+            }, ]
           },
         ],
         loading: true,
@@ -75,11 +75,11 @@
         this.loading = true
         this.$axios.post('/api/company_info/get_home_page_info', {}).then(res => {
           if (res.data.status === 1) {
-            const { contactDisplay, website, wechat, contact} = res.data.data && res.data.data.base
-            this.userData[0].value = contact || ""
-            this.userData[1].value = wechat || ""
-            this.userData[2].value = website || ""
-            this.userData[3].value = Number(contactDisplay) || 0
+            const { contactDisplay, website, wechat, contact } = res.data.data && res.data.data.base
+            this.userData[ 0 ].value = contact || ""
+            this.userData[ 1 ].value = wechat || ""
+            this.userData[ 2 ].value = website || ""
+            this.userData[ 3 ].value = Number(contactDisplay) || 0
           } else {
             this.$message.error('查询失败:' + res.info)
           }
@@ -112,9 +112,9 @@
 
       checkSubmit() {
         let p = {}
-        this.userData.forEach(v=>{
-          const {name, value} = v
-          p[name] = value
+        this.userData.forEach(v => {
+          const { name, value } = v
+          p[ name ] = value
         })
         this.$axios.post('/api/companyInfo/updateContactInfo', p).then(res => {
           if (res.data.status === 1) {
@@ -133,7 +133,8 @@
 </script>
 <style lang="scss">
   @import "../../../assets/css/scssCommon";
-  .el-select  {
+
+  .el-select {
     width: 100%;
     .el-input__inner {
       margin-top: pxtovw(2);
@@ -141,17 +142,17 @@
       height: pxtovw(44);
       background: rgba(255, 255, 255, 1);
       border-radius: pxtovw(3);
-      border:pxtovw(1) solid rgba(146,154,164,0.2);
+      border: pxtovw(1) solid rgba(146, 154, 164, 0.2);
       padding: pxtovw(15) pxtovw(10);
     }
   }
 
   input::placeholder {
     color: #AFB9C4;
-    height:pxtovw(14);
-    font-size:pxtovw(14);
-    font-weight:400;
-    line-height:pxtovw(14);
+    height: pxtovw(14);
+    font-size: pxtovw(14);
+    font-weight: 400;
+    line-height: pxtovw(14);
   }
 </style>
 

+ 4 - 4
pages/otherpage/user/card.vue

@@ -84,7 +84,7 @@
   import MintUI from 'mint-ui';
   import "mint-ui/lib/style.css";
 
-  const mix =  {
+  const mix = {
     data() {
       return {
         // 详情id
@@ -105,7 +105,7 @@
 
   export default {
     name: 'UserCard',
-    mixins: [mix],
+    mixins: [ mix ],
     data() {
       return {
         userList: [],
@@ -211,7 +211,7 @@
       },
       deleteItem(item) {
         console.log(item)
-        const { nameCardId=0, nickname} = item
+        const { nameCardId = 0, nickname } = item
         MessageBox.confirm(`将从您的名片夹中移除 ${nickname} 的名片`).then(action => {
           let loading = this.$loading({
             title: "删除中..."
@@ -229,7 +229,7 @@
           }).catch((e) => {
             loading && loading.close()
           })
-        }).catch(e=>{
+        }).catch(e => {
 
         });
       },

+ 2 - 2
pages/otherpage/user/collection/index.vue

@@ -22,7 +22,7 @@
         <div class="list" v-if="dataList.length">
           <div class="cell" v-for="(item, index) in dataList" :key="item.id" @click="jumpToDetail(item)">
             <div class="left">
-              <img :src="item.cover_url || linkImg" alt=""  @error="defaultImg">
+              <img :src="item.cover_url || linkImg" alt="" @error="defaultImg">
             </div>
             <div class="right">
               <div class="ctitle">{{item.title}}</div>
@@ -82,7 +82,7 @@
           class="cell"
           v-for="(item, index) in dataList" :key="'dataList' + index"
         >
-          <div class="cellContent"  @click="jumpToDetail(item)">
+          <div class="cellContent" @click="jumpToDetail(item)">
             <div class="left">
               <img :src="item.cover_url || linkImg" alt="" @error="defaultImg">
             </div>

+ 1 - 1
pages/otherpage/user/scanLogin.vue

@@ -40,7 +40,7 @@
           if (Number(res.status) === 1) {
             this.$toast('登录成功')
             setTimeout(() => {
-             this.appBackHandler()
+              this.appBackHandler()
             }, 500)
           }
         })

+ 2 - 2
pages/otherpage/userSetting/show.vue

@@ -64,7 +64,7 @@
             this.typeList.forEach(item => {
               item.status = Number(data[ item.key ])
             })
-            this.typeList = [...this.typeList]
+            this.typeList = [ ...this.typeList ]
           }
         })
       },
@@ -74,7 +74,7 @@
         const { typeList } = this
         let p = {}
         typeList.forEach(item => {
-          p[item.key] = Number(item.status)
+          p[ item.key ] = Number(item.status)
         })
         this.$axios.post('/api/user_info_show/setting', p).then(res => {
           let data = res.data

+ 1 - 1
pages/user/_id/_type.vue

@@ -430,7 +430,7 @@
         if (this.mobile) {
           Toast("请前往程序员客栈,添加解决方案")
         } else {
-          window.open(this.kaifainUrl + '/kaifain/add')
+          window.open(this.kaifainUrl + '/add')
         }
       },
       async addVideo() {

+ 0 - 0
plugins/genHashId.js


+ 52 - 0
plugins/replace-html-styles/index.js

@@ -0,0 +1,52 @@
+function ReplaceHtmlStyles() {
+  this.replace = function(htmlPluginData, callback) {
+    //console.log(htmlPluginData);
+    let html = htmlPluginData.html;
+    //     //console.log(html);
+    let htmlRegx = new RegExp("\\<style[^\\>]*\\>.*?\\<\\/style\\>", "g");
+    let match = html.match(htmlRegx);
+    if (match) {
+      //console.log(match)
+      html = html.replace(htmlRegx, "");
+      //console.log(html)
+      match.forEach((item, index) => {
+        html = html.replace(/<\/body>/, item + "</body>");
+      });
+      htmlPluginData.html = html;
+    }
+
+    callback(null, htmlPluginData);
+  };
+}
+
+ReplaceHtmlStyles.prototype.apply = function(compiler) {
+  if (compiler.hooks) {
+    compiler.hooks.compilation.tap("ReplaceHtmlStyles", compilation => {
+      if (compilation.hooks.htmlWebpackPluginAfterHtmlProcessing) {
+        compilation.hooks.htmlWebpackPluginAfterHtmlProcessing.tapAsync(
+          "ReplaceHtmlStyles",
+          this.replace
+        );
+      } else {
+        var HtmlWebpackPlugin = require("html-webpack-plugin");
+
+        if (!HtmlWebpackPlugin) {
+          throw new Error(
+            "Please ensure that `html-webpack-plugin` was placed before `replace-html-styles` in your Webpack config if you were working with Webpack 4.x!"
+          );
+        }
+
+        HtmlWebpackPlugin.getHooks(compilation).beforeEmit.tapAsync(
+          "ReplaceHtmlStyles",
+          this.replace
+        );
+      }
+    });
+  } else {
+    compiler.plugin("compilation", compilation => {
+      compilation.plugin("html-webpack-plugin-beforeEmit", this.replace);
+    });
+  }
+};
+
+module.exports = ReplaceHtmlStyles;

+ 145 - 6
plugins/router.js

@@ -1,8 +1,147 @@
-export default ({app, store}) => {
-  app.router.beforeEach((to, from, next)=> {
-    if (process.client) {
-      console.log("location.href", to, from)
+export default ({
+  app,
+  context,
+  req,
+  store
+}) => {
+
+  if (process.client) {
+    const {
+      host
+    } = location || {}
+    const isKaifain = host.indexOf('kaifain') !== -1
+    const isJishuin = host.indexOf('jishuin') !== -1
+    const isJob = host.indexOf('job') !== -1
+    console.log("app.router.options.routes", app.router.options.routes)
+    if (isKaifain) {
+      window.__NUXT__.routePath = app.context.route.path.replace(/^\/kaifain/, '')
+      let kaifainIndex = app.router.options.routes.filter(v => v.name === 'kaifain')[0]
+      let kaifainDetail = app.router.options.routes.filter(v => v.name === 'kaifain-detail-tid')[0]
+      let kaifainCaseDetail = app.router.options.routes.filter(v => v.name === 'kaifain-case-tid')[0]
+      let kaifainAdd = app.router.options.routes.filter(v => v.name === 'kaifain-add')[0]
+      let kaifainPreview = app.router.options.routes.filter(v => v.name === 'kaifain-preview')[0]
+      let kaifainPreviewCase = app.router.options.routes.filter(v => v.name === 'kaifain-previewCase')[0]
+      let kaifainIndexNow = {
+        name: 'kaifain_$',
+        path: '/*',
+        component: kaifainIndex.component
+      }
+      let kaifainDetailNow = {
+        name: 'kaifainSeoDetails_$',
+        path: '/s/:tid',
+        component: kaifainDetail.component
+      }
+      let kaifainCaseDetailNow = {
+        name: 'kaifainCaseSeoDetails_$',
+        path: '/d/:tid',
+        component: kaifainCaseDetail.component
+      }
+      let kaifainAddNow = {
+        name: 'kaifainAdd_$',
+        path: '/add',
+        component: kaifainAdd.component
+      }
+      let kaifainPreviewNow = {
+        name: 'kaifainPreview_$',
+        path: '/preview',
+        component: kaifainPreview.component
+      }
+      let kaifainPreviewCaseNow = {
+        name: 'kaifainPreviewCase_$',
+        path: '/previewCase',
+        component: kaifainPreviewCase.component
+      }
+      try {
+        app.router.options.routes.unshift(
+          kaifainPreviewCaseNow,
+          kaifainPreviewNow,
+          kaifainAddNow,
+          kaifainCaseDetailNow,
+          kaifainDetailNow,
+          kaifainIndexNow)
+        app.router.matcher.addRoutes([
+          kaifainIndexNow, kaifainDetailNow, kaifainCaseDetailNow,
+          kaifainAddNow, kaifainPreviewNow, kaifainPreviewCaseNow
+        ])
+      } catch (e) {
+        console.log(e)
+      }
     }
-    next()
-  })
+
+    if (isJishuin) {
+      window.__NUXT__.routePath = app.context.route.path.replace(/^\/jishuin/, '')
+      let jishuinCIndex = app.router.options.routes.filter(v => v.name === "user-collect_article-id-type")[0]
+      let jishuinCType = app.router.options.routes.filter(v => v.name === "user-collect_article-id-type")[0]
+      let jishuinUIndex = app.router.options.routes.filter(v => v.name === "user-id-type")[0]
+      let jishuinUType = app.router.options.routes.filter(v => v.name === "user-id-type")[0]
+      let jishuinU = {
+        name: 'jishuinSeoU_$',
+        path: '/u/:id',
+        component: jishuinUIndex.component
+      }
+      let jishuinUT = {
+        name: 'jishuinSeoUType_$',
+        path: '/u/:id/:type',
+        component: jishuinUType.component
+      }
+      let jishuinC = {
+        name: 'jishuinSeoC_$',
+        path: '/c/:id',
+        component: jishuinCIndex.component
+      }
+      let jishuinCT = {
+        name: 'jishuinSeoCT_$',
+        path: '/c/:id/:type',
+        component: jishuinCType.component
+      }
+      try {
+        app.router.options.routes.unshift(jishuinU)
+        app.router.options.routes.unshift(jishuinUT)
+        app.router.options.routes.unshift(jishuinC)
+        app.router.options.routes.unshift(jishuinCT)
+        app.router.matcher.addRoutes([jishuinU, jishuinUT, jishuinC, jishuinCT])
+      } catch (e) {
+        console.log(e)
+      }
+    }
+
+    if (isJob) {
+      window.__NUXT__.routePath = app.context.route.path.replace(/^\/job/, '')
+      let jobIndex = app.router.options.routes.filter(v => v.name === 'job')[0]
+      let jobDetail = app.router.options.routes.filter(v => v.name === 'job-detail-id')[0]
+      let jobIndexNow = {
+        name: 'job_$',
+        path: '/*',
+        component: jobIndex.component
+      }
+      let jobDetailNow = {
+        name: 'jobSeoDetails_$',
+        path: '/d/:tid',
+        component: jobDetail.component
+      }
+      try {
+        app.router.options.routes.unshift(jobIndexNow)
+        app.router.options.routes.unshift(jobDetailNow)
+        app.router.matcher.addRoutes([jobIndexNow, jobDetailNow])
+      } catch (e) {
+        console.log(e)
+      }
+    }
+
+    console.log('router', app.router)
+
+    app.router.beforeEach((to, from, next) => {
+      console.log("beforeEach", to, from)
+      next()
+    })
+  }
+}
+
+function getMatchedComponents(route, matches = false, prop = 'components') {
+  return Array.prototype.concat.apply([], route.matched.map((m, index) => {
+    return Object.keys(m[prop]).map((key) => {
+      matches && matches.push(index)
+      return m[prop][key]
+    })
+  }))
 }

+ 46 - 57
plugins/seoRouter.js

@@ -1,16 +1,16 @@
 const extendRoutes = (routes, resolve) => {
-  /** 解决方案SEO优化 start **/
+  // /** 解决方案SEO优化 start **/
   routes.push({
     name: 'kaifainSeoIndex',
     path: '/kaifain/*',
     component: resolve(__dirname, '../pages/kaifain/index.vue')
   })
-  routes.unshift({
-    name: 'kaifainSeoAll',
-    path: '/kaifain/s',
-    component: resolve(__dirname, '../pages/kaifain/index.vue')
-  })
-  
+  // routes.unshift({
+  //   name: 'kaifainSeoAll',
+  //   path: '/kaifain/s',
+  //   component: resolve(__dirname, '../pages/kaifain/index.vue')
+  // })
+  //
   routes.unshift({
     name: 'kaifainSeoDetail',
     path: '/kaifain/s/:tid',
@@ -21,61 +21,50 @@ const extendRoutes = (routes, resolve) => {
     path: '/kaifain/d/:tid',
     component: resolve(__dirname, '../pages/kaifain/case/_tid.vue')
   })
-  /** 解决方案SEO优化 end **/
-  
-  /** 兼职招聘SEO优化 start**/
+  // /** 解决方案SEO优化 end **/
+  //
+  // /** 兼职招聘SEO优化 start**/
   routes.push({
     name: 'JobListSeoIndex',
     path: '/job/*',
     component: resolve(__dirname, '../pages/job/index.vue')
   })
-  /** 兼职招聘SEO优化 end**/
-  
-  
-  /*** 技术圈SEO sd改动 start **/
-  //合集
-  routes.unshift({
-    name: 'jishuinCollectedC',
-    path: '/c/:id',
-    component: resolve(__dirname, '../pages/user/collect_article/_id/_type.vue')
-  })
-  routes.unshift({
-    name: 'jishuinCollectedCID',
-    path: '/c/:id/:type',
-    component: resolve(__dirname, '../pages/user/collect_article/_id/_type.vue')
-  })
-  routes.unshift({
-    name: 'jishuinCollectedC1',
-    path: '/jishuin/c/:id',
-    component: resolve(__dirname, '../pages/user/collect_article/_id/_type.vue')
-  })
-  routes.unshift({
-    name: 'jishuinCollectedCID1',
-    path: '/jishuin/c/:id/:type',
-    component: resolve(__dirname, '../pages/user/collect_article/_id/_type.vue')
-  })
-  //用户
-  routes.unshift({
-    name: 'jishuinUserU',
-    path: '/u/:id',
-    component: resolve(__dirname, '../pages/user/_id/_type.vue')
-  })
-  routes.unshift({
-    name: 'jishuinUserUID',
-    path: '/u/:id/:type',
-    component: resolve(__dirname, '../pages/user/_id/_type.vue')
-  })
-  routes.unshift({
-    name: 'jishuinUserU1',
-    path: '/jishuin/u/:id',
-    component: resolve(__dirname, '../pages/user/_id/_type.vue')
-  })
-  routes.unshift({
-    name: 'jishuinUserUID1',
-    path: '/jishuin/u/:id/:type',
-    component: resolve(__dirname, '../pages/user/_id/_type.vue')
+  // /** 兼职招聘SEO优化 end**/
+  //
+  //
+  // /*** 技术圈SEO sd改动 start **/
+  // routes.unshift({
+  //   name: 'jishuinCollectedC1',
+  //   path: '/jishuin/c/:id',
+  //   component: resolve(__dirname, '../pages/user/collect_article/_id/_type.vue')
+  // })
+  // routes.unshift({
+  //   name: 'jishuinCollectedCID1',
+  //   path: '/jishuin/c/:id/:type',
+  //   component: resolve(__dirname, '../pages/user/collect_article/_id/_type.vue')
+  // })
+  // //用户
+  // routes.unshift({
+  //   name: 'jishuinUserU1',
+  //   path: '/jishuin/u/:id',
+  //   component: resolve(__dirname, '../pages/user/_id/_type.vue')
+  // })
+  // routes.unshift({
+  //   name: 'jishuinUserUID1',
+  //   path: '/jishuin/u/:id/:type',
+  //   component: resolve(__dirname, '../pages/user/_id/_type.vue')
+  // })
+  // /*** 技术圈SEO sd改动 end  **/
+  /**
+   * 404
+   */
+  routes.push({
+    name: 'all-404',
+    path: '*',
+    component: resolve(__dirname, '../pages/404.vue')
   })
-  /*** 技术圈SEO sd改动 end  **/
 }
 
-module.exports = { extendRoutes }
+module.exports = {
+  extendRoutes
+}

+ 11 - 3
store/index.js

@@ -12,7 +12,9 @@ export const state = () => ({
     siteUrl: "",
     rooterUrl: "",
     jishuinUrl: "",
-    kaifainUrl: ""
+    kaifainUrl: "",
+    jobUrl: "",
+    urlType: ""
   },
   noneCommonFooter: false
 });
@@ -30,7 +32,9 @@ export const mutations = {
       siteUrl: config.siteUrl,
       jishuinUrl: config.jishuinUrl,
       rooterUrl: config.rooterUrl,
-      kaifainUrl: config.kaifainUrl
+      kaifainUrl: config.kaifainUrl,
+      jobUrl: config.jobUrl,
+      urlType: config.urlType
     };
   },
   updateUserinfo(state, payload) {
@@ -56,7 +60,11 @@ export const mutations = {
   }
 };
 export const actions = {
-  async nuxtServerInit({ commit }, { app }) {
+  async nuxtServerInit({
+    commit
+  }, {
+    app
+  }) {
     commit("updateDeviceType", app.$deviceType || {});
   }
 };

A diferenza do arquivo foi suprimida porque é demasiado grande
+ 1551 - 237
yarn.lock