pay.vue 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  1. <template>
  2. <div class="pay">
  3. <el-dialog
  4. :visible.sync="dialogVisible"
  5. :before-close='hClose'>
  6. <div>
  7. <div class="title">扫码付费阅读</div>
  8. <div class="content">
  9. <div class="left">
  10. <!-- <img src="@/assets/code.png" alt=""> -->
  11. <img src="@/assets/yl/code.jpg" alt="">
  12. </div>
  13. <div class="right">
  14. <p>微信扫描二维码</p>
  15. <!-- <p>支付宝扫描二维码</p> -->
  16. <p>支付3元即可解锁精彩资讯内容</p>
  17. <div class="btn">
  18. <el-button type="primary" @click="hSubmit">确 定</el-button>
  19. <el-button type="danger" @click="hClose">取 消</el-button>
  20. </div>
  21. </div>
  22. </div>
  23. </div>
  24. </el-dialog>
  25. </div>
  26. </template>
  27. <script>
  28. export default {
  29. name: 'pay',
  30. props: {
  31. dialogVisible: {
  32. type: Boolean,
  33. require: true
  34. },
  35. new: {
  36. type: String
  37. }
  38. },
  39. data () {
  40. return {
  41. isPay: true
  42. }
  43. },
  44. methods: {
  45. hClose () {
  46. this.$emit('close', false)
  47. },
  48. hSubmit () {
  49. if (this.isPay) {
  50. this.$router.push(this.new)
  51. this.hClose()
  52. }
  53. }
  54. }
  55. }
  56. </script>
  57. <style lang="less" scoped>
  58. /deep/.el-dialog__body {
  59. padding: 30px 50px;
  60. padding-left: 80px;
  61. }
  62. /deep/.el-dialog {
  63. border-radius: 20px;
  64. width: 680px;
  65. height: 340px;
  66. }
  67. /deep/.el-button--primary {
  68. background-color: #639CFF;
  69. border-color: #639CFF;
  70. margin-right: 10px;
  71. }
  72. /deep/.el-dialog__headerbtn .el-dialog__close {
  73. font-size:30px;
  74. }
  75. .title {
  76. font-size: 22px;
  77. color: #333;
  78. margin-bottom: 20px;
  79. margin-left: 10px;
  80. }
  81. .content>div {
  82. display: inline-block;
  83. height: 160px;
  84. vertical-align: middle;
  85. }
  86. .content {
  87. width: 520px;
  88. }
  89. .content .left {
  90. margin-right: 20px;
  91. width: 160px;
  92. img {
  93. width: 100%;
  94. }
  95. }
  96. .content .right {
  97. position: relative;
  98. width: 300px;
  99. p {
  100. font-size: 18px;
  101. margin-bottom: 20px;
  102. }
  103. .btn {
  104. position: absolute;
  105. bottom: 0;
  106. max-width: 100%;
  107. }
  108. }
  109. .el-button {
  110. width: 140px;
  111. }
  112. </style>