developer.vue 9.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403
  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. <BuyDevDialog
  72. :handleClose="handleClose"
  73. :showDialog="showDialog"
  74. :item="item"
  75. :vipDetail="vipDetail"></BuyDevDialog>
  76. </div>
  77. </template>
  78. <script>
  79. import BuyDevDialog from "@/components/type/vip/buy-dev-dialog";
  80. export default {
  81. data() {
  82. return {
  83. showDialog: false,
  84. pricePrefix: "",
  85. type: "dev", // com: 企业会员, dev: 开发者会员
  86. vipList: [],
  87. vipDetail: {},
  88. item: {}
  89. };
  90. },
  91. async mounted() {
  92. await this.getList();
  93. await this.getVipDetail();
  94. },
  95. components: {
  96. BuyDevDialog
  97. },
  98. computed: {},
  99. methods: {
  100. async getList() {
  101. let extraHeaders = {};
  102. if (this.deviceType === "ios") {
  103. extraHeaders = this.getSign();
  104. }
  105. let res = await this.$axios.$post(`/api/vip/getList`, extraHeaders);
  106. this.vipList = res.data;
  107. },
  108. /**
  109. * 点击支付
  110. */
  111. clickPay(type) {
  112. this.type = type;
  113. this.item = this.vipList[1];
  114. this.showDialog = true;
  115. },
  116. handleClose() {
  117. this.showDialog = false;
  118. },
  119. gotoPay(number) {
  120. const item = this.item;
  121. location.href = `/vip/pay?product_id=${item.id}&number=${number}&next=/type/vip/`;
  122. },
  123. // 点击会员计划
  124. clickProject(index) {
  125. let vip = this.vipList[index];
  126. window.open(recommend.seo_uri);
  127. },
  128. async getVipDetail() {
  129. let res = await this.$axios.$post("/api/vip/get_vip_user_detail");
  130. this.vipDetail = res && res.data ? res.data : {};
  131. }
  132. }
  133. }
  134. </script>
  135. <style lang="scss" scope>
  136. .wrapper {
  137. overflow: hidden;
  138. }
  139. .title {
  140. margin-top: 54px;
  141. line-height: 45px;
  142. text-align: center;
  143. font-weight: 600;
  144. font-size: 32px;
  145. color: #222222;
  146. }
  147. .subtitle {
  148. margin-top: 4px;
  149. line-height: 22px;
  150. text-align: center;
  151. font-size: 16px;
  152. color: #999999;
  153. }
  154. .content {
  155. margin: 49px auto 0;
  156. width: 100%;
  157. display: flex;
  158. justify-content: center;
  159. }
  160. .explain {
  161. overflow: hidden;
  162. width: 304px;
  163. height: 606px;
  164. border-radius: 2px;
  165. background-color: #FFFFFF;
  166. border: 1px solid #D6DBE3;
  167. box-shadow: 0px 4px 20px 0px rgba(0, 21, 53, 0.05);
  168. text-align: center;
  169. }
  170. .explain-title {
  171. margin-top: 45px;
  172. line-height: 28px;
  173. font-weight: 600;
  174. font-size: 20px;
  175. color: #8E5B15;
  176. }
  177. .explain-content {
  178. overflow: hidden;
  179. line-height: 20px;
  180. font-size: 14px;
  181. color: #222222;
  182. }
  183. .explain-content p:nth-child(1) {
  184. margin-top: 125px;
  185. }
  186. .explain-content p:nth-child(2) {
  187. margin-top: 30px;
  188. }
  189. .explain-content p:nth-child(3) {
  190. margin-top: 30px;
  191. }
  192. .explain-content p:nth-child(4) {
  193. margin-top: 30px;
  194. }
  195. .explain-content p:nth-child(5) {
  196. margin-top: 30px;
  197. }
  198. .explain-content p {
  199. display: flex;
  200. align-items: center;
  201. justify-content: center;
  202. }
  203. .explain-content img {
  204. margin-left: 5px;
  205. width: 13px;
  206. height: 13px;
  207. }
  208. .ordinary {
  209. overflow: hidden;
  210. width: 315px;
  211. height: 606px;
  212. border-radius: 2px;
  213. background-color: #FFFFFF;
  214. border: 1px solid #D6DBE3;
  215. box-shadow: 0px 4px 20px 0px rgba(0, 21, 53, 0.05);
  216. text-align: center;
  217. }
  218. .ordinary-title {
  219. margin-top: 45px;
  220. line-height: 28px;
  221. font-weight: 600;
  222. font-size: 20px;
  223. color: #666666;
  224. }
  225. .ordinary-avatar {
  226. margin: 16px auto 0;
  227. width: 66px;
  228. height: 66px;
  229. }
  230. .ordinary-avatar img {
  231. width: 100%;
  232. height: 100%;
  233. }
  234. .ordinary-content {
  235. overflow: hidden;
  236. line-height: 20px;
  237. font-size: 14px;
  238. color: #666666;
  239. }
  240. .ordinary-content p:nth-child(1) {
  241. margin-top: 43px;
  242. }
  243. .ordinary-content p:nth-child(2) {
  244. margin-top: 30px;
  245. }
  246. .ordinary-content p:nth-child(3) {
  247. margin-top: 30px;
  248. }
  249. .ordinary-content p:nth-child(4) {
  250. margin-top: 30px;
  251. }
  252. .ordinary-content p:nth-child(5) {
  253. margin-top: 30px;
  254. }
  255. .developer {
  256. overflow: hidden;
  257. width: 326px;
  258. height: 606px;
  259. border-radius: 2px;
  260. background-color: #FFF9ED;
  261. border: 1px solid #C89A29;
  262. box-shadow: 0px 4px 20px 0px rgba(199, 160, 61, 0.13);
  263. text-align: center;
  264. }
  265. .developer-title {
  266. margin-top: 47px;
  267. }
  268. .developer-title img {
  269. width: 156px;
  270. height: 23px;
  271. }
  272. .developer-avatar {
  273. margin: 19px auto 0;
  274. width: 66px;
  275. height: 66px;
  276. }
  277. .developer-avatar img {
  278. width: 100%;
  279. height: 100%;
  280. }
  281. .developer-content {
  282. overflow: hidden;
  283. line-height: 20px;
  284. font-weight: 600;
  285. font-size: 14px;
  286. color: #9E733A;
  287. }
  288. .developer-content p:nth-child(1) {
  289. margin-top: 43px;
  290. }
  291. .developer-content p:nth-child(2) {
  292. margin-top: 30px;
  293. }
  294. .developer-content p:nth-child(3) {
  295. margin-top: 30px;
  296. }
  297. .developer-content p:nth-child(4) {
  298. margin-top: 30px;
  299. }
  300. .developer-content p:nth-child(5) {
  301. margin-top: 30px;
  302. }
  303. .developer-price-wrapper {
  304. margin-top: 52px;
  305. display: flex;
  306. justify-content: center;
  307. }
  308. .developer-price {
  309. font-size: 15px;
  310. color: #222222;
  311. }
  312. .developer-price span {
  313. line-height: 40px;
  314. font-weight: 600;
  315. font-size: 28px;
  316. color: #222222;
  317. }
  318. .original-price {
  319. margin-top: 15px;
  320. margin-left: 5px;
  321. line-height: 17px;
  322. font-size: 12px;
  323. color: #666666;
  324. text-decoration: line-through;
  325. }
  326. .developer-btn {
  327. margin: 21px auto 0;
  328. width: 195px;
  329. height: 44px;
  330. background-color: #D4AB4C;
  331. line-height: 44px;
  332. text-align: center;
  333. font-weight: 500;
  334. font-size: 14px;
  335. color: #0E0E0E;
  336. cursor: pointer;
  337. }
  338. .tips {
  339. margin-top: 38px;
  340. }
  341. .tips-title {
  342. line-height: 20px;
  343. font-weight: 600;
  344. font-size: 14px;
  345. color: #666666;
  346. }
  347. .tips-content {
  348. margin-top: 3px;
  349. line-height: 28px;
  350. font-size: 14px;
  351. color: #919AA7;
  352. }
  353. .tips-content span {
  354. color: #308EFF;
  355. }
  356. </style>