pc.vue 7.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279
  1. <template>
  2. <section class="vip">
  3. <section class="vips">
  4. <section v-if="com" class="vip-box">
  5. <img class="vip-back" src="~@/assets/img/vip/back_com.png" alt="back_com" />
  6. <div class="price">
  7. ¥{{com.monthly_real_price}}
  8. <sub>/月</sub>
  9. <span v-if="com.is_month_discount" class="price-warning">原价{{com.monthly_origin_price}}/月</span>
  10. </div>
  11. <div class="prices">
  12. 按季付费
  13. <span style="margin-left: 5px;">¥{{com.quarterly_real_price}}</span>
  14. </div>
  15. <button
  16. class="apply"
  17. :class="{death: !com.is_btn_can_click}"
  18. @click="clickPay('com')"
  19. >{{com.btn_name}}</button>
  20. <ul class="services">
  21. <li class="service-item">
  22. <span>· 整包项目-平台服务费(减免{{com.project_reduction_rate}}%)</span>
  23. <section class="service-status">{{com.project_discount}}折</section>
  24. </li>
  25. <li class="service-item">
  26. <span>· 云端工作-平台服务费(减免{{com.job_reduction_rate}}%)</span>
  27. <section class="service-status">{{com.job_discount}}折</section>
  28. </li>
  29. <li class="service-item">
  30. <span>· 每天50次程序员聊天次数</span>
  31. <section class="service-check"></section>
  32. </li>
  33. <li class="service-item">
  34. <span>· 优先推荐对接优质的开发者</span>
  35. <section class="service-check"></section>
  36. </li>
  37. </ul>
  38. </section>
  39. <section v-if="dev" class="vip-box vip-dev">
  40. <img class="vip-back" src="~@/assets/img/vip/back.png" alt="back_com" />
  41. <div class="price">
  42. ¥{{dev.monthly_real_price}}
  43. <sub>/月</sub>
  44. <span v-if="dev.is_month_discount" class="price-warning">原价{{dev.monthly_origin_price}}/月</span>
  45. </div>
  46. <div class="prices">
  47. 按季付费
  48. <span style="margin-left: 5px;">¥{{dev.quarterly_real_price}}</span>
  49. </div>
  50. <button
  51. class="apply"
  52. :class="{death: !dev.is_btn_can_click}"
  53. @click="clickPay('dev')"
  54. >{{dev.btn_name}}</button>
  55. <ul class="services">
  56. <li class="service-item">
  57. <span>· 整包项目-平台服务费(减免{{dev.project_reduction_rate}}%)</span>
  58. <section class="service-status">{{dev.project_discount}}折</section>
  59. </li>
  60. <li class="service-item">
  61. <span>· 云端工作-平台服务费(减免{{dev.job_reduction_rate}}%)</span>
  62. <section class="service-status">{{dev.job_discount}}折</section>
  63. </li>
  64. <li class="service-item">
  65. <span>· 认证的自由开发者可同时接2单</span>
  66. <section class="service-check"></section>
  67. </li>
  68. <li class="service-item">
  69. <span>· Ping接单意愿权重更高</span>
  70. <section class="service-check"></section>
  71. </li>
  72. </ul>
  73. </section>
  74. </section>
  75. <ul class="reminds">
  76. <h3>会员说明</h3>
  77. <li class="remind">1.购买会员按季付费;</li>
  78. <li class="remind">2.开通会员即代表您已同意《程序员客栈会员服务条款》;</li>
  79. <li class="remind">3.如有任何问题,欢迎咨询在线客服,或拨打热线:0571-28120931 转1。</li>
  80. </ul>
  81. <buy-dialog
  82. :handleClose="handleClose"
  83. :buyDialog="buyDialog"
  84. :gotoPay="gotoPay"
  85. :type="type"
  86. :item="item"
  87. :vipDetail="vipDetail"
  88. :pricePrefix="pricePrefix"
  89. ></buy-dialog>
  90. </section>
  91. </template>
  92. <script>
  93. import buyDialog from "./buy-dialog";
  94. export default {
  95. props: ["com", "dev",'premium', "vipDetail", "isCom"],
  96. data() {
  97. return {
  98. buyDialog: false,
  99. pricePrefix: "",
  100. type: "com" // com: 企业会员, dev: 开发者会员
  101. };
  102. },
  103. components: {
  104. buyDialog
  105. },
  106. computed: {
  107. item: function() {
  108. return this[this.type] || {};
  109. }
  110. },
  111. mounted() {
  112. //console.log(this.com, this.dev);
  113. },
  114. methods: {
  115. /**
  116. * 点击支付
  117. */
  118. clickPay(type) {
  119. this.type = type;
  120. this.buyDialog = true;
  121. // location.href = `/vip/pay?product_id=${item.id}&number=3&next=/type/vip/`;
  122. },
  123. handleClose() {
  124. this.buyDialog = false;
  125. },
  126. gotoPay(number) {
  127. const item = this[this.type];
  128. location.href = `/vip/pay?product_id=${item.id}&number=${number}&next=/type/vip/`;
  129. },
  130. // 点击会员计划
  131. clickProject(index) {
  132. let vip = this.vipList[index];
  133. window.open(recommend.seo_uri);
  134. }
  135. }
  136. };
  137. </script>
  138. <style scoped lang="scss">
  139. .vip {
  140. display: flex;
  141. flex-direction: column;
  142. justify-content: space-between;
  143. width: 1000px;
  144. height: 810px;
  145. margin: 10px 0 0 0;
  146. padding: 70px 0 0 0;
  147. background: white;
  148. }
  149. .vips {
  150. display: flex;
  151. justify-content: center;
  152. }
  153. .vip-box {
  154. position: relative;
  155. display: flex;
  156. flex-direction: column;
  157. align-items: center;
  158. width: 394px;
  159. height: 464px;
  160. border: 1px solid #cae6ff;
  161. margin: 0 20px;
  162. }
  163. .vip-back {
  164. position: absolute;
  165. top: 0;
  166. left: 0;
  167. width: 100%;
  168. height: auto;
  169. }
  170. .price {
  171. position: relative;
  172. margin: 118px 0 0 0;
  173. font-size: 28px;
  174. color: #222;
  175. }
  176. .prices {
  177. position: relative;
  178. font-size: 14px;
  179. font-family: PingFangSC-Regular;
  180. color: #333;
  181. margin: 4px 0;
  182. }
  183. .price-warning {
  184. position: absolute;
  185. top: 18px;
  186. right: -70px;
  187. text-decoration: line-through;
  188. font-size: 12px;
  189. }
  190. .apply {
  191. width: 210px;
  192. height: 42px;
  193. background: #1994ff;
  194. border-radius: 2px;
  195. font-size: 14px;
  196. font-family: PingFangSC-Medium;
  197. font-weight: 500;
  198. color: rgba(255, 255, 255, 1);
  199. outline: none;
  200. margin: 24px 0 33px;
  201. cursor: pointer;
  202. border: 0;
  203. z-index: 1;
  204. }
  205. .services {
  206. display: flex;
  207. flex-direction: column;
  208. justify-content: space-around;
  209. width: 100%;
  210. height: 160px;
  211. margin: 0;
  212. padding: 0;
  213. list-style: none;
  214. box-sizing: border-box;
  215. padding: 20px;
  216. color: #1d2a3a;
  217. font-size: 14px;
  218. }
  219. .service-item {
  220. display: flex;
  221. justify-content: space-between;
  222. align-items: center;
  223. height: 23px;
  224. }
  225. .service-status {
  226. display: flex;
  227. justify-content: center;
  228. align-items: center;
  229. width: 55px;
  230. height: 23px;
  231. background: url(~@/assets/img/vip/arrow_com.png) 0 0 / 100% 100% no-repeat;
  232. font-size: 12px;
  233. color: #1994ff;
  234. padding: 0 6px 0 0;
  235. }
  236. .service-check {
  237. width: 16px;
  238. height: 11px;
  239. background: url(~@/assets/img/vip/check_com.png) 0 0 / 100% 100% no-repeat;
  240. margin: 0 21px 0 0;
  241. }
  242. #vip sub {
  243. bottom: 0;
  244. font-size: 60%;
  245. }
  246. .vip-dev {
  247. border: 1px solid rgba(251, 218, 157, 1);
  248. }
  249. .vip-dev .apply {
  250. background: #e1a83f;
  251. }
  252. .vip-dev .service-status {
  253. background: url(~@/assets/img/vip/arrow.png) 0 0 / 100% 100% no-repeat;
  254. color: #e1a83f;
  255. }
  256. .vip-dev .service-check {
  257. background: url(~@/assets/img/vip/check.png) 0 0 / 100% 100% no-repeat;
  258. }
  259. .reminds {
  260. list-style: none;
  261. padding: 0;
  262. margin: 0 0 60px 86px;
  263. }
  264. h3 {
  265. margin: 20px 0 40px;
  266. }
  267. .remind {
  268. margin: 20px 0 0 0;
  269. }
  270. .death,
  271. .vip-dev .death {
  272. background: #eee;
  273. color: #666;
  274. cursor: not-allowed;
  275. }
  276. </style>