developer.vue 10 KB

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