enterprise.vue 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513
  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>10次/天</p>
  25. <p>无</p>
  26. <p>5人次/天</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. if (res) {
  115. this.vipList = res.data;
  116. }
  117. },
  118. async getVipDetail() {
  119. let res = await this.$axios.$post("/api/vip/getVipUserDetail");
  120. this.vipDetail = res && res.data ? res.data : {};
  121. },
  122. clickPay(type) {
  123. switch (type) {
  124. case 'com':
  125. this.item = this.vipList[0];
  126. this.type='com';
  127. break;
  128. case 'pre':
  129. this.item = this.vipList[2];
  130. this.type='pre';
  131. break;
  132. }
  133. this.buyDialog = true;
  134. // location.href = `/vip/pay?product_id=${item.id}&number=3&next=/type/vip/`;
  135. },
  136. handleClose() {
  137. this.buyDialog = false;
  138. },
  139. gotoPay(number) {
  140. const item = this.item;
  141. location.href = `/vip/pay?product_id=${item.id}&number=${number}&next=/type/vip/`;
  142. },
  143. // 点击会员计划
  144. clickProject(index) {
  145. let vip = this.vipList[index];
  146. window.open(recommend.seo_uri);
  147. }
  148. }
  149. }
  150. </script>
  151. <style lang="scss" scope>
  152. .wrapper {
  153. overflow: hidden;
  154. }
  155. .title {
  156. margin-top: 54px;
  157. line-height: 45px;
  158. text-align: center;
  159. font-weight: 600;
  160. font-size: 32px;
  161. color: #222222;
  162. }
  163. .subtitle {
  164. margin-top: 4px;
  165. line-height: 22px;
  166. text-align: center;
  167. font-size: 16px;
  168. color: #999999;
  169. }
  170. .content {
  171. margin: 49px auto 0;
  172. width: 100%;
  173. display: flex;
  174. justify-content: center;
  175. }
  176. .explain {
  177. overflow: hidden;
  178. width: 226px;
  179. height: 740px;
  180. border-radius: 2px;
  181. background-color: #FFFFFF;
  182. border: 1px solid #D6DBE3;
  183. box-shadow: 0px 4px 20px 0px rgba(0, 21, 53, 0.05);
  184. text-align: center;
  185. }
  186. .explain-title {
  187. margin-top: 88px;
  188. line-height: 28px;
  189. font-weight: 600;
  190. font-size: 20px;
  191. color: #666666;
  192. }
  193. .explain-content {
  194. overflow: hidden;
  195. line-height: 20px;
  196. font-size: 14px;
  197. color: #222222;
  198. }
  199. .explain-content p:nth-child(1) {
  200. margin-top: 85px;
  201. }
  202. .explain-content p:nth-child(2) {
  203. margin-top: 43px;
  204. }
  205. .explain-content p:nth-child(3) {
  206. margin-top: 43px;
  207. }
  208. .explain-content p:nth-child(4) {
  209. margin-top: 33px;
  210. }
  211. .explain-content p:nth-child(5) {
  212. margin-top: 33px;
  213. }
  214. .explain-content p:nth-child(6) {
  215. margin-top: 23px;
  216. }
  217. .explain-content p:nth-child(7) {
  218. margin-top: 23px;
  219. }
  220. .ordinary {
  221. overflow: hidden;
  222. width: 260px;
  223. height: 740px;
  224. border-radius: 2px;
  225. background-color: #FFFFFF;
  226. border: 1px solid #D6DBE3;
  227. box-shadow: 0px 4px 20px 0px rgba(0, 21, 53, 0.05);
  228. text-align: center;
  229. }
  230. .ordinary-title {
  231. margin-top: 40px;
  232. line-height: 28px;
  233. font-weight: 600;
  234. font-size: 20px;
  235. color: #666666;
  236. }
  237. .ordinary-avatar {
  238. margin: 21px auto 0;
  239. width: 66px;
  240. height: 66px;
  241. }
  242. .ordinary-avatar img {
  243. width: 100%;
  244. height: 100%;
  245. }
  246. .ordinary-content {
  247. overflow: hidden;
  248. line-height: 20px;
  249. font-size: 14px;
  250. color: #666666;
  251. }
  252. .ordinary-content p:nth-child(1) {
  253. margin-top: 46px;
  254. }
  255. .ordinary-content p:nth-child(2) {
  256. margin-top: 43px;
  257. }
  258. .ordinary-content p:nth-child(3) {
  259. margin-top: 43px;
  260. }
  261. .ordinary-content p:nth-child(4) {
  262. margin-top: 33px;
  263. }
  264. .ordinary-content p:nth-child(5) {
  265. margin-top: 33px;
  266. }
  267. .ordinary-content p:nth-child(6) {
  268. margin-top: 23px;
  269. }
  270. .ordinary-content p:nth-child(7) {
  271. margin-top: 23px;
  272. }
  273. .newly {
  274. overflow: hidden;
  275. width: 260px;
  276. height: 740px;
  277. border-radius: 2px;
  278. background-color: #F6FAFF;
  279. border: 1px solid #308EFF;
  280. box-shadow: 0px 4px 20px 0px rgba(48, 142, 255, 0.15);
  281. text-align: center;
  282. }
  283. .newly-title {
  284. margin-top: 40px;
  285. line-height: 28px;
  286. font-weight: 600;
  287. font-size: 20px;
  288. color: #308EFF;
  289. }
  290. .newly-avatar {
  291. margin: 21px auto 0;
  292. width: 66px;
  293. height: 66px;
  294. }
  295. .newly-avatar img {
  296. width: 100%;
  297. height: 100%;
  298. }
  299. .newly-content {
  300. overflow: hidden;
  301. line-height: 20px;
  302. font-size: 14px;
  303. color: #111111;
  304. }
  305. .newly-content p:nth-child(1) {
  306. margin-top: 46px;
  307. }
  308. .newly-content p:nth-child(2) {
  309. margin-top: 43px;
  310. }
  311. .newly-content p:nth-child(3) {
  312. margin-top: 43px;
  313. }
  314. .newly-content p:nth-child(4) {
  315. margin-top: 23px;
  316. }
  317. .newly-content p:nth-child(4) span {
  318. color: #308EFF;
  319. }
  320. .newly-content p:nth-child(5) {
  321. margin-top: 23px;
  322. }
  323. .newly-content p:nth-child(6) {
  324. margin-top: 23px;
  325. }
  326. .newly-content p:nth-child(7) {
  327. margin-top: 23px;
  328. }
  329. .newly-price {
  330. margin-top: 52px;
  331. font-size: 15px;
  332. color: #222222;
  333. }
  334. .newly-price span {
  335. line-height: 40px;
  336. font-weight: 600;
  337. font-size: 28px;
  338. color: #222222;
  339. }
  340. .newly-btn {
  341. margin: 21px auto 0;
  342. width: 195px;
  343. height: 44px;
  344. background-color: #308EFF;
  345. line-height: 44px;
  346. text-align: center;
  347. font-weight: 500;
  348. font-size: 14px;
  349. color: #FFFFFF;
  350. cursor: pointer;
  351. }
  352. .enterprise {
  353. overflow: hidden;
  354. width: 260px;
  355. height: 740px;
  356. border-radius: 2px;
  357. background-color: #F3FFFA;
  358. border: 1px solid #00C469;
  359. box-shadow: 0px 4px 20px 0px rgba(0, 196, 105, 0.14);
  360. text-align: center;
  361. }
  362. .enterprise-title {
  363. margin-top: 40px;
  364. line-height: 28px;
  365. font-weight: 600;
  366. font-size: 20px;
  367. color: #00C469;
  368. }
  369. .enterprise-avatar {
  370. margin: 21px auto 0;
  371. width: 66px;
  372. height: 66px;
  373. }
  374. .enterprise-avatar img {
  375. width: 100%;
  376. height: 100%;
  377. }
  378. .enterprise-content {
  379. overflow: hidden;
  380. line-height: 20px;
  381. font-size: 14px;
  382. color: #111111;
  383. }
  384. .enterprise-content p:nth-child(1) {
  385. margin-top: 46px;
  386. }
  387. .enterprise-content p:nth-child(2) {
  388. margin-top: 23px;
  389. }
  390. .enterprise-content p:nth-child(3) {
  391. margin-top: 23px;
  392. }
  393. .enterprise-content p:nth-child(4) {
  394. margin-top: 23px;
  395. }
  396. .enterprise-content p:nth-child(4) span {
  397. color: #00C469;
  398. }
  399. .enterprise-content p:nth-child(5) {
  400. margin-top: 23px;
  401. }
  402. .enterprise-content p:nth-child(6) {
  403. margin-top: 23px;
  404. }
  405. .enterprise-content p:nth-child(7) {
  406. margin-top: 23px;
  407. }
  408. .enterprise-price {
  409. margin-top: 52px;
  410. font-size: 15px;
  411. color: #222222;
  412. }
  413. .enterprise-price span {
  414. line-height: 40px;
  415. font-weight: 600;
  416. font-size: 28px;
  417. color: #222222;
  418. }
  419. .enterprise-btn {
  420. margin: 21px auto 0;
  421. width: 195px;
  422. height: 44px;
  423. background-color: #00C469;
  424. line-height: 44px;
  425. text-align: center;
  426. font-weight: 500;
  427. font-size: 14px;
  428. color: #FFFFFF;
  429. cursor: pointer;
  430. }
  431. .tips {
  432. margin-top: 38px;
  433. }
  434. .tips-title {
  435. line-height: 20px;
  436. font-weight: 600;
  437. font-size: 14px;
  438. color: #666666;
  439. }
  440. .tips-content {
  441. margin-top: 3px;
  442. line-height: 28px;
  443. font-size: 14px;
  444. color: #919AA7;
  445. }
  446. .tips-content span {
  447. color: #308EFF;
  448. }
  449. </style>