developer.vue 9.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398
  1. <template>
  2. <div class="wrapper" v-if="vipList[1]">
  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>确认接单次数<img src="@/assets/img/vip/icon_explain.png" alt=""></p>
  10. <p>同时接单数量<img src="@/assets/img/vip/icon_explain.png" alt=""></p>
  11. <p>Ping(接单意愿)权重
  12. <el-tooltip class="item" effect="dark" content="程序员列表、搜索结果页、兼职推荐开发者会员每天最多可ping5次" placement="top-end">
  13. <img src="@/assets/img/vip/icon_explain.png" alt="" title="">
  14. </el-tooltip>
  15. </p>
  16. <p>资质认证申请<img src="@/assets/img/vip/icon_explain.png" alt=""></p>
  17. <p>平台服务费减免<img src="@/assets/img/vip/icon_explain.png" alt=""></p>
  18. </div>
  19. </div>
  20. <div class="ordinary">
  21. <div class="ordinary-title">普通开发者</div>
  22. <div class="ordinary-avatar">
  23. <img src="@/assets/img/vip/ordinary_avatar.png" alt="">
  24. </div>
  25. <div class="ordinary-content">
  26. <p>每月最多确认接单{{vipList[3].devAcceptTimes}}次</p>
  27. <p>仅1单</p>
  28. <p>普通权重</p>
  29. <p>无折扣</p>
  30. <p>无减免</p>
  31. </div>
  32. </div>
  33. <div class="developer">
  34. <div class="developer-title">
  35. <img src="@/assets/img/vip/developer_title.png" alt="">
  36. </div>
  37. <div class="developer-avatar">
  38. <img src="@/assets/img/vip/ordinary_avatar.png" alt="">
  39. </div>
  40. <div class="developer-content">
  41. <p>不限次数</p>
  42. <p>会员+认证自由工作者可接{{vipList[1]['accept_count']}}单</p>
  43. <p>比普通权重高30%</p>
  44. <p>低至3-6折</p>
  45. <p>整包项目减免{{vipList[1]['project_reduction_rate']}}%、云端项目减免{{vipList[1]['job_reduction_rate']}}%</p>
  46. </div>
  47. <div class="developer-price-wrapper">
  48. <div class="developer-price"><span>¥{{vipList[1]['monthly_real_price']}}</span>/月</div>
  49. <div class="original-price">原价¥{{vipList[1]['monthly_origin_price']}}/月</div>
  50. </div>
  51. <div class="developer-btn" @click="clickPay('dev')">立即开通</div>
  52. </div>
  53. </div>
  54. <div class="tips">
  55. <div class="tips-title">说明</div>
  56. <div class="tips-content">
  57. <p>1.最低支持购买3个月,每个月按31天算;</p>
  58. <p>2.开通会员即代表您已同意<span>《程序员客栈会员服务条款》</span>;</p>
  59. <p> 3.如有任何问题,欢迎咨询在线客服,或拨打热线:0571-28120931 转1</p>
  60. </div>
  61. </div>
  62. <buy-dialog
  63. :handleClose="handleClose"
  64. :buyDialog="buyDialog"
  65. :gotoPay="gotoPay"
  66. :type="type"
  67. :item="item"
  68. :vipDetail="vipDetail"
  69. :pricePrefix="pricePrefix"
  70. ></buy-dialog>
  71. </div>
  72. </template>
  73. <script>
  74. import buyDialog from "@/components/type/vip/buy-dialog";
  75. export default {
  76. data() {
  77. return {
  78. buyDialog: false,
  79. pricePrefix: "",
  80. type: "dev", // com: 企业会员, dev: 开发者会员
  81. vipList: [],
  82. vipDetail: {},
  83. item: {}
  84. };
  85. },
  86. async mounted() {
  87. await this.getList();
  88. await this.getVipDetail();
  89. },
  90. components: {
  91. buyDialog
  92. },
  93. computed: {},
  94. methods: {
  95. async getList() {
  96. let extraHeaders = {};
  97. if (this.deviceType === "ios") {
  98. extraHeaders = this.getSign();
  99. }
  100. let res = await this.$axios.$post(`/api/vip/getList`, extraHeaders);
  101. this.vipList = res.data;
  102. },
  103. /**
  104. * 点击支付
  105. */
  106. clickPay(type) {
  107. this.type = type;
  108. this.item = this.vipList[1];
  109. this.buyDialog = true;
  110. },
  111. handleClose() {
  112. this.buyDialog = false;
  113. },
  114. gotoPay(number) {
  115. const item = this.item;
  116. location.href = `/vip/pay?product_id=${item.id}&number=${number}&next=/type/vip/`;
  117. },
  118. // 点击会员计划
  119. clickProject(index) {
  120. let vip = this.vipList[index];
  121. window.open(recommend.seo_uri);
  122. },
  123. async getVipDetail() {
  124. let res = await this.$axios.$post("/api/vip/get_vip_user_detail");
  125. this.vipDetail = res && res.data ? res.data : {};
  126. }
  127. }
  128. }
  129. </script>
  130. <style lang="scss" scope>
  131. .wrapper {
  132. overflow: hidden;
  133. }
  134. .title {
  135. margin-top: 54px;
  136. line-height: 45px;
  137. text-align: center;
  138. font-weight: 600;
  139. font-size: 32px;
  140. color: #222222;
  141. }
  142. .subtitle {
  143. margin-top: 4px;
  144. line-height: 22px;
  145. text-align: center;
  146. font-size: 16px;
  147. color: #999999;
  148. }
  149. .content {
  150. margin: 49px auto 0;
  151. width: 100%;
  152. display: flex;
  153. justify-content: center;
  154. }
  155. .explain {
  156. overflow: hidden;
  157. width: 304px;
  158. height: 606px;
  159. border-radius: 2px;
  160. background-color: #FFFFFF;
  161. border: 1px solid #D6DBE3;
  162. box-shadow: 0px 4px 20px 0px rgba(0, 21, 53, 0.05);
  163. text-align: center;
  164. }
  165. .explain-title {
  166. margin-top: 45px;
  167. line-height: 28px;
  168. font-weight: 600;
  169. font-size: 20px;
  170. color: #8E5B15;
  171. }
  172. .explain-content {
  173. overflow: hidden;
  174. line-height: 20px;
  175. font-size: 14px;
  176. color: #222222;
  177. }
  178. .explain-content p:nth-child(1) {
  179. margin-top: 125px;
  180. }
  181. .explain-content p:nth-child(2) {
  182. margin-top: 30px;
  183. }
  184. .explain-content p:nth-child(3) {
  185. margin-top: 30px;
  186. }
  187. .explain-content p:nth-child(4) {
  188. margin-top: 30px;
  189. }
  190. .explain-content p:nth-child(5) {
  191. margin-top: 30px;
  192. }
  193. .explain-content p {
  194. display: flex;
  195. align-items: center;
  196. justify-content: center;
  197. }
  198. .explain-content img {
  199. margin-left: 5px;
  200. width: 13px;
  201. height: 13px;
  202. }
  203. .ordinary {
  204. overflow: hidden;
  205. width: 315px;
  206. height: 606px;
  207. border-radius: 2px;
  208. background-color: #FFFFFF;
  209. border: 1px solid #D6DBE3;
  210. box-shadow: 0px 4px 20px 0px rgba(0, 21, 53, 0.05);
  211. text-align: center;
  212. }
  213. .ordinary-title {
  214. margin-top: 45px;
  215. line-height: 28px;
  216. font-weight: 600;
  217. font-size: 20px;
  218. color: #666666;
  219. }
  220. .ordinary-avatar {
  221. margin: 16px auto 0;
  222. width: 66px;
  223. height: 66px;
  224. }
  225. .ordinary-avatar img {
  226. width: 100%;
  227. height: 100%;
  228. }
  229. .ordinary-content {
  230. overflow: hidden;
  231. line-height: 20px;
  232. font-size: 14px;
  233. color: #666666;
  234. }
  235. .ordinary-content p:nth-child(1) {
  236. margin-top: 43px;
  237. }
  238. .ordinary-content p:nth-child(2) {
  239. margin-top: 30px;
  240. }
  241. .ordinary-content p:nth-child(3) {
  242. margin-top: 30px;
  243. }
  244. .ordinary-content p:nth-child(4) {
  245. margin-top: 30px;
  246. }
  247. .ordinary-content p:nth-child(5) {
  248. margin-top: 30px;
  249. }
  250. .developer {
  251. overflow: hidden;
  252. width: 326px;
  253. height: 606px;
  254. border-radius: 2px;
  255. background-color: #FFF9ED;
  256. border: 1px solid #C89A29;
  257. box-shadow: 0px 4px 20px 0px rgba(199, 160, 61, 0.13);
  258. text-align: center;
  259. }
  260. .developer-title {
  261. margin-top: 47px;
  262. }
  263. .developer-title img {
  264. width: 156px;
  265. height: 23px;
  266. }
  267. .developer-avatar {
  268. margin: 19px auto 0;
  269. width: 66px;
  270. height: 66px;
  271. }
  272. .developer-avatar img {
  273. width: 100%;
  274. height: 100%;
  275. }
  276. .developer-content {
  277. overflow: hidden;
  278. line-height: 20px;
  279. font-weight: 600;
  280. font-size: 14px;
  281. color: #9E733A;
  282. }
  283. .developer-content p:nth-child(1) {
  284. margin-top: 43px;
  285. }
  286. .developer-content p:nth-child(2) {
  287. margin-top: 30px;
  288. }
  289. .developer-content p:nth-child(3) {
  290. margin-top: 30px;
  291. }
  292. .developer-content p:nth-child(4) {
  293. margin-top: 30px;
  294. }
  295. .developer-content p:nth-child(5) {
  296. margin-top: 30px;
  297. }
  298. .developer-price-wrapper {
  299. margin-top: 52px;
  300. display: flex;
  301. justify-content: center;
  302. }
  303. .developer-price {
  304. font-size: 15px;
  305. color: #222222;
  306. }
  307. .developer-price span {
  308. line-height: 40px;
  309. font-weight: 600;
  310. font-size: 28px;
  311. color: #222222;
  312. }
  313. .original-price {
  314. margin-top: 15px;
  315. margin-left: 5px;
  316. line-height: 17px;
  317. font-size: 12px;
  318. color: #666666;
  319. text-decoration: line-through;
  320. }
  321. .developer-btn {
  322. margin: 21px auto 0;
  323. width: 195px;
  324. height: 44px;
  325. background-color: #D4AB4C;
  326. line-height: 44px;
  327. text-align: center;
  328. font-weight: 500;
  329. font-size: 14px;
  330. color: #0E0E0E;
  331. cursor: pointer;
  332. }
  333. .tips {
  334. margin-top: 38px;
  335. }
  336. .tips-title {
  337. line-height: 20px;
  338. font-weight: 600;
  339. font-size: 14px;
  340. color: #666666;
  341. }
  342. .tips-content {
  343. margin-top: 3px;
  344. line-height: 28px;
  345. font-size: 14px;
  346. color: #919AA7;
  347. }
  348. .tips-content span {
  349. color: #308EFF;
  350. }
  351. </style>