index.vue 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  1. <template>
  2. <u-popup :show="payShow" @close="payShow=false">
  3. <view class="details_pay">
  4. <view class="title">
  5. <text>请选择</text>
  6. <image :src="imgBase+'remind_close.png'" @tap="cancelPay"></image>
  7. </view>
  8. <view class="wechat_pay">
  9. <view class="wp_left">
  10. <image :src="imgBase+'img_pay.jpg'"></image>
  11. <text>微信支付</text>
  12. </view>
  13. <image :src="imgBase+'selected.png'"></image>
  14. </view>
  15. <view class="zt_btn" @tap="confirmPay">确定</view>
  16. </view>
  17. </u-popup>
  18. </template>
  19. <script>
  20. export default {
  21. options: {
  22. styleIsolation: 'shared' //样式分离,使组件/deep/下的样式生效
  23. },
  24. data() {
  25. return {
  26. payShow: false
  27. }
  28. },
  29. methods: {
  30. cancelPay(){
  31. uni.showModal({
  32. title:'温馨提示',
  33. content:'您的订单尚未完成支付,确定要离开?',
  34. success: (res) => {
  35. if(res.confirm){
  36. this.payShow = false;
  37. this.$emit('cancelPay');
  38. }
  39. }
  40. })
  41. },
  42. confirmPay() {
  43. this.$emit('confirmPay');
  44. }
  45. }
  46. }
  47. </script>
  48. <style lang="less">
  49. /deep/.u-popup__content {
  50. border-radius: 32rpx 32rpx 0 0;
  51. }
  52. .details_pay {
  53. padding: 40rpx 30rpx 55rpx;
  54. min-height: 400rpx;
  55. border-radius: 32rpx 32rpx 0 0;
  56. background: #F6F6F6;
  57. .title {
  58. position: relative;
  59. text-align: center;
  60. text {
  61. font-size: 36rpx;
  62. font-family: PingFang-SC-Bold, PingFang-SC;
  63. font-weight: bold;
  64. color: #333333;
  65. }
  66. image {
  67. width: 36rpx;
  68. height: 36rpx;
  69. position: absolute;
  70. right: 10rpx;
  71. top: 50%;
  72. margin-top: -18rpx;
  73. }
  74. }
  75. .wechat_pay {
  76. display: flex;
  77. align-items: center;
  78. justify-content: space-between;
  79. margin-top: 83rpx;
  80. background: #FFFFFF;
  81. border-radius: 24rpx 24rpx 0rpx 0rpx;
  82. padding: 41rpx 24rpx;
  83. .wp_left {
  84. display: flex;
  85. align-items: center;
  86. image {
  87. width: 54rpx;
  88. height: 54rpx;
  89. }
  90. text {
  91. font-size: 32rpx;
  92. font-family: PingFangSC-Regular, PingFang SC;
  93. font-weight: 400;
  94. color: #333333;
  95. margin-left: 24rpx;
  96. }
  97. }
  98. &>image {
  99. width: 48rpx;
  100. height: 48rpx;
  101. }
  102. }
  103. .zt_btn {
  104. margin-top: 59rpx;
  105. }
  106. }
  107. </style>