enterprise.vue 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510
  1. <template>
  2. <div class="wrapper" v-if="vipList.length>0">
  3. <div class="title">企业会员</div>
  4. <div class="subtitle">新人技术人力解决方案</div>
  5. <div class="content">
  6. <div class="explain">
  7. <div class="explain-title">权益内容</div>
  8. <div class="explain-content">
  9. <p>雇佣服务</p>
  10. <p>雇佣直通车</p>
  11. <p>程序员聊一聊</p>
  12. <p>平台服务费减免</p>
  13. <p>企业认证</p>
  14. <p>技术背调</p>
  15. <p>驻场招聘</p>
  16. </div>
  17. </div>
  18. <div class="ordinary">
  19. <div class="ordinary-title">普通企业方</div>
  20. <div class="ordinary-avatar">
  21. <img src="@/assets/img/vip/ordinary_avatar.png" alt="">
  22. </div>
  23. <div class="ordinary-content">
  24. <p>{{vipList[3].userHire || 0}}次/天</p>
  25. <p>无</p>
  26. <p>{{vipList[3].userChat || 0}}人次/天</p>
  27. <p>无</p>
  28. <p>免费</p>
  29. <p>无</p>
  30. <p>无</p>
  31. </div>
  32. </div>
  33. <div class="newly">
  34. <div class="newly-title">初创版</div>
  35. <div class="newly-avatar">
  36. <img src="@/assets/img/vip/newly_avatar.png" alt="">
  37. </div>
  38. <div class="newly-content">
  39. <p>{{this.vipList[0]['hire_times']}}次/天</p>
  40. <p>敬请期待</p>
  41. <p>{{this.vipList[0]['chat_times']}}人次/天</p>
  42. <p>整包服务减免<span>{{this.vipList[0]['project_reduction_rate']}}%</span><br/>云端服务减免<span>{{this.vipList[0]['job_reduction_rate']}}%</span></p>
  43. <p>免费</p>
  44. <p>无</p>
  45. <p>无</p>
  46. </div>
  47. <div class="newly-price"><span>¥{{this.vipList[0]['monthly_real_price']}}</span>/月</div>
  48. <div class="newly-btn" @click="clickPay('com')">{{vipDetail.user_info && vipDetail.user_info.vip_type===2?'立即续费':'立即开通'}}</div>
  49. </div>
  50. <div class="enterprise">
  51. <div class="enterprise-title">企业版</div>
  52. <div class="enterprise-avatar">
  53. <img src="@/assets/img/vip/enterprise_avatar.png" alt="">
  54. </div>
  55. <div class="newly-content">
  56. <p>{{this.vipList[2]['hire_times']}}次/天</p>
  57. <p>敬请期待</p>
  58. <p>不限次</p>
  59. <p>整包服务减免<span>{{this.vipList[2]['project_reduction_rate']}}%</span><br/>云端服务减免<span>{{this.vipList[2]['job_reduction_rate']}}%</span></p>
  60. <p>免费</p>
  61. <p>敬请期待</p>
  62. <p>敬请期待</p>
  63. </div>
  64. <div class="enterprise-price"><span>¥{{this.vipList[2]['monthly_real_price']}}</span>/月</div>
  65. <div class="enterprise-btn" @click="clickPay('pre')">{{vipDetail.user_info && vipDetail.user_info.vip_type===3?'立即续费':'立即开通'}}</div>
  66. </div>
  67. </div>
  68. <div class="tips">
  69. <div class="tips-title">说明</div>
  70. <div class="tips-content">
  71. <p>1.最低支持购买3个月,每个月按31天算;</p>
  72. <p>2.开通会员即代表您已同意<span>《程序员客栈会员服务条款》</span>;</p>
  73. <p> 3.如有任何问题,欢迎咨询在线客服,或拨打热线:0571-28120931 转1</p>
  74. </div>
  75. </div>
  76. <buy-dialog
  77. :handleClose="handleClose"
  78. :buyDialog="buyDialog"
  79. :gotoPay="gotoPay"
  80. :type="type"
  81. :item="item"
  82. :vipDetail="vipDetail"
  83. :pricePrefix="pricePrefix"
  84. ></buy-dialog>
  85. </div>
  86. </template>
  87. <script>
  88. import buyDialog from "@/components/type/vip/buy-dialog";
  89. export default {
  90. data() {
  91. return {
  92. buyDialog: false,
  93. pricePrefix: "",
  94. type: "com", // com: 企业会员, dev: 开发者会员
  95. vipList: [],
  96. vipDetail: {},
  97. item:{}
  98. }
  99. },
  100. components: {
  101. buyDialog
  102. },
  103. async mounted() {
  104. await this.getList();
  105. await this.getVipDetail();
  106. },
  107. methods: {
  108. async getList() {
  109. let extraHeaders = {};
  110. if (this.deviceType === "ios") {
  111. extraHeaders = this.getSign();
  112. }
  113. let res = await this.$axios.$post(`/api/vip/getList`, extraHeaders);
  114. this.vipList = res.data;
  115. },
  116. async getVipDetail() {
  117. let res = await this.$axios.$post("/api/vip/getVipUserDetail");
  118. this.vipDetail = res && res.data ? res.data : {};
  119. },
  120. clickPay(type) {
  121. switch (type) {
  122. case 'com':
  123. this.item = this.vipList[0];
  124. this.type='com';
  125. break;
  126. case 'pre':
  127. this.item = this.vipList[2];
  128. this.type='pre';
  129. break;
  130. }
  131. this.buyDialog = true;
  132. },
  133. handleClose() {
  134. this.buyDialog = false;
  135. },
  136. gotoPay(number) {
  137. const item = this.item;
  138. location.href = `/vip/pay?product_id=${item.id}&number=${number}&next=/type/vip/`;
  139. },
  140. // 点击会员计划
  141. clickProject(index) {
  142. let vip = this.vipList[index];
  143. window.open(recommend.seo_uri);
  144. }
  145. }
  146. }
  147. </script>
  148. <style lang="scss" scope>
  149. .wrapper {
  150. overflow: hidden;
  151. }
  152. .title {
  153. margin-top: 54px;
  154. line-height: 45px;
  155. text-align: center;
  156. font-weight: 600;
  157. font-size: 32px;
  158. color: #222222;
  159. }
  160. .subtitle {
  161. margin-top: 4px;
  162. line-height: 22px;
  163. text-align: center;
  164. font-size: 16px;
  165. color: #999999;
  166. }
  167. .content {
  168. margin: 49px auto 0;
  169. width: 100%;
  170. display: flex;
  171. justify-content: center;
  172. }
  173. .explain {
  174. overflow: hidden;
  175. width: 226px;
  176. height: 740px;
  177. border-radius: 2px;
  178. background-color: #FFFFFF;
  179. border: 1px solid #D6DBE3;
  180. box-shadow: 0px 4px 20px 0px rgba(0, 21, 53, 0.05);
  181. text-align: center;
  182. }
  183. .explain-title {
  184. margin-top: 88px;
  185. line-height: 28px;
  186. font-weight: 600;
  187. font-size: 20px;
  188. color: #666666;
  189. }
  190. .explain-content {
  191. overflow: hidden;
  192. line-height: 20px;
  193. font-size: 14px;
  194. color: #222222;
  195. }
  196. .explain-content p:nth-child(1) {
  197. margin-top: 85px;
  198. }
  199. .explain-content p:nth-child(2) {
  200. margin-top: 43px;
  201. }
  202. .explain-content p:nth-child(3) {
  203. margin-top: 43px;
  204. }
  205. .explain-content p:nth-child(4) {
  206. margin-top: 33px;
  207. }
  208. .explain-content p:nth-child(5) {
  209. margin-top: 33px;
  210. }
  211. .explain-content p:nth-child(6) {
  212. margin-top: 23px;
  213. }
  214. .explain-content p:nth-child(7) {
  215. margin-top: 23px;
  216. }
  217. .ordinary {
  218. overflow: hidden;
  219. width: 260px;
  220. height: 740px;
  221. border-radius: 2px;
  222. background-color: #FFFFFF;
  223. border: 1px solid #D6DBE3;
  224. box-shadow: 0px 4px 20px 0px rgba(0, 21, 53, 0.05);
  225. text-align: center;
  226. }
  227. .ordinary-title {
  228. margin-top: 40px;
  229. line-height: 28px;
  230. font-weight: 600;
  231. font-size: 20px;
  232. color: #666666;
  233. }
  234. .ordinary-avatar {
  235. margin: 21px auto 0;
  236. width: 66px;
  237. height: 66px;
  238. }
  239. .ordinary-avatar img {
  240. width: 100%;
  241. height: 100%;
  242. }
  243. .ordinary-content {
  244. overflow: hidden;
  245. line-height: 20px;
  246. font-size: 14px;
  247. color: #666666;
  248. }
  249. .ordinary-content p:nth-child(1) {
  250. margin-top: 46px;
  251. }
  252. .ordinary-content p:nth-child(2) {
  253. margin-top: 43px;
  254. }
  255. .ordinary-content p:nth-child(3) {
  256. margin-top: 43px;
  257. }
  258. .ordinary-content p:nth-child(4) {
  259. margin-top: 33px;
  260. }
  261. .ordinary-content p:nth-child(5) {
  262. margin-top: 33px;
  263. }
  264. .ordinary-content p:nth-child(6) {
  265. margin-top: 23px;
  266. }
  267. .ordinary-content p:nth-child(7) {
  268. margin-top: 23px;
  269. }
  270. .newly {
  271. overflow: hidden;
  272. width: 260px;
  273. height: 740px;
  274. border-radius: 2px;
  275. background-color: #F6FAFF;
  276. border: 1px solid #308EFF;
  277. box-shadow: 0px 4px 20px 0px rgba(48, 142, 255, 0.15);
  278. text-align: center;
  279. }
  280. .newly-title {
  281. margin-top: 40px;
  282. line-height: 28px;
  283. font-weight: 600;
  284. font-size: 20px;
  285. color: #308EFF;
  286. }
  287. .newly-avatar {
  288. margin: 21px auto 0;
  289. width: 66px;
  290. height: 66px;
  291. }
  292. .newly-avatar img {
  293. width: 100%;
  294. height: 100%;
  295. }
  296. .newly-content {
  297. overflow: hidden;
  298. line-height: 20px;
  299. font-size: 14px;
  300. color: #111111;
  301. }
  302. .newly-content p:nth-child(1) {
  303. margin-top: 46px;
  304. }
  305. .newly-content p:nth-child(2) {
  306. margin-top: 43px;
  307. }
  308. .newly-content p:nth-child(3) {
  309. margin-top: 43px;
  310. }
  311. .newly-content p:nth-child(4) {
  312. margin-top: 23px;
  313. }
  314. .newly-content p:nth-child(4) span {
  315. color: #308EFF;
  316. }
  317. .newly-content p:nth-child(5) {
  318. margin-top: 23px;
  319. }
  320. .newly-content p:nth-child(6) {
  321. margin-top: 23px;
  322. }
  323. .newly-content p:nth-child(7) {
  324. margin-top: 23px;
  325. }
  326. .newly-price {
  327. margin-top: 52px;
  328. font-size: 15px;
  329. color: #222222;
  330. }
  331. .newly-price span {
  332. line-height: 40px;
  333. font-weight: 600;
  334. font-size: 28px;
  335. color: #222222;
  336. }
  337. .newly-btn {
  338. margin: 21px auto 0;
  339. width: 195px;
  340. height: 44px;
  341. background-color: #308EFF;
  342. line-height: 44px;
  343. text-align: center;
  344. font-weight: 500;
  345. font-size: 14px;
  346. color: #FFFFFF;
  347. cursor: pointer;
  348. }
  349. .enterprise {
  350. overflow: hidden;
  351. width: 260px;
  352. height: 740px;
  353. border-radius: 2px;
  354. background-color: #F3FFFA;
  355. border: 1px solid #00C469;
  356. box-shadow: 0px 4px 20px 0px rgba(0, 196, 105, 0.14);
  357. text-align: center;
  358. }
  359. .enterprise-title {
  360. margin-top: 40px;
  361. line-height: 28px;
  362. font-weight: 600;
  363. font-size: 20px;
  364. color: #00C469;
  365. }
  366. .enterprise-avatar {
  367. margin: 21px auto 0;
  368. width: 66px;
  369. height: 66px;
  370. }
  371. .enterprise-avatar img {
  372. width: 100%;
  373. height: 100%;
  374. }
  375. .enterprise-content {
  376. overflow: hidden;
  377. line-height: 20px;
  378. font-size: 14px;
  379. color: #111111;
  380. }
  381. .enterprise-content p:nth-child(1) {
  382. margin-top: 46px;
  383. }
  384. .enterprise-content p:nth-child(2) {
  385. margin-top: 23px;
  386. }
  387. .enterprise-content p:nth-child(3) {
  388. margin-top: 23px;
  389. }
  390. .enterprise-content p:nth-child(4) {
  391. margin-top: 23px;
  392. }
  393. .enterprise-content p:nth-child(4) span {
  394. color: #00C469;
  395. }
  396. .enterprise-content p:nth-child(5) {
  397. margin-top: 23px;
  398. }
  399. .enterprise-content p:nth-child(6) {
  400. margin-top: 23px;
  401. }
  402. .enterprise-content p:nth-child(7) {
  403. margin-top: 23px;
  404. }
  405. .enterprise-price {
  406. margin-top: 52px;
  407. font-size: 15px;
  408. color: #222222;
  409. }
  410. .enterprise-price span {
  411. line-height: 40px;
  412. font-weight: 600;
  413. font-size: 28px;
  414. color: #222222;
  415. }
  416. .enterprise-btn {
  417. margin: 21px auto 0;
  418. width: 195px;
  419. height: 44px;
  420. background-color: #00C469;
  421. line-height: 44px;
  422. text-align: center;
  423. font-weight: 500;
  424. font-size: 14px;
  425. color: #FFFFFF;
  426. cursor: pointer;
  427. }
  428. .tips {
  429. margin-top: 38px;
  430. }
  431. .tips-title {
  432. line-height: 20px;
  433. font-weight: 600;
  434. font-size: 14px;
  435. color: #666666;
  436. }
  437. .tips-content {
  438. margin-top: 3px;
  439. line-height: 28px;
  440. font-size: 14px;
  441. color: #919AA7;
  442. }
  443. .tips-content span {
  444. color: #308EFF;
  445. }
  446. </style>