index.vue 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. <template>
  2. <view class="">
  3. <view style="display: flex;justify-content: center;align-items: flex-end;margin-top: 100rpx;">
  4. <text>
  5. </text>
  6. <text style="font-size: 80rpx;line-height:80rpx;">
  7. 0.01
  8. </text>
  9. </view>
  10. <view style="display: flex;justify-content: center;margin-top: 20rpx;">
  11. <text style="color: #8f939c;">
  12. 待支付金额
  13. </text>
  14. </view>
  15. <view style="display: flex;justify-content:space-between;margin: 20rpx 30rpx;">
  16. <text>
  17. 商品名称
  18. </text>
  19. <text>
  20. 商品名称
  21. </text>
  22. </view>
  23. <view style="display: flex;justify-content:space-between;margin: 20rpx 30rpx;">
  24. <text>
  25. 商品金额
  26. </text>
  27. <text>
  28. ¥0.01
  29. </text>
  30. </view>
  31. <view style="margin: 0 30rpx">
  32. <text style="color: #8f939c;">
  33. 请选择支付方式
  34. </text>
  35. </view>
  36. <uni-card style="margin: 10rpx 30rpx;border-radius: 20rpx;">
  37. <view style="display: flex;justify-content: space-between;margin:20rpx 0;">
  38. <view style="display: flex;align-items: center;">
  39. <image style="height: 50rpx;width: 50rpx;" src="/static/images/pay/wxpay.png" mode="scaleToFill">
  40. </image>
  41. <text style="color: #3a3a3a;margin-left: 20rpx;">
  42. 微信支付
  43. </text>
  44. </view>
  45. <view style="display: flex;align-items: center;width: 40rpx;">
  46. <uni-data-checkbox v-model="payType" :localdata="[{'value':'wxpay'}]"></uni-data-checkbox>
  47. </view>
  48. </view>
  49. <view style="background-color:#e5e5e5;height:1rpx;"></view>
  50. <view style="display: flex;justify-content: space-between;margin:20rpx 0;">
  51. <view style="display: flex;align-items: center;">
  52. <image style="height: 50rpx;width: 50rpx;" src="/static/images/pay/alipay.png" mode="scaleToFill">
  53. </image>
  54. <text style="color: #3a3a3a;margin-left: 20rpx;">
  55. 支付宝
  56. </text>
  57. </view>
  58. <view style="display: flex;align-items: center;width: 40rpx;">
  59. <uni-data-checkbox v-model="payType" :localdata="[{'value':'alipay'}]"></uni-data-checkbox>
  60. </view>
  61. </view>
  62. </uni-card>
  63. <view style="position: fixed;bottom: 30rpx;width: 100%;">
  64. <view style="margin:0 30rpx;">
  65. <debounce-button bgColor='#03803B' @click="goPay">确认支付</debounce-button>
  66. </view>
  67. </view>
  68. </view>
  69. </template>
  70. <script>
  71. import {
  72. v4 as uuidv4
  73. } from 'uuid';
  74. import {
  75. getPhoneVerifyCode
  76. } from '@/api/user.js'
  77. export default {
  78. data() {
  79. return {
  80. payType: null,
  81. };
  82. },
  83. onLoad() {},
  84. methods: {
  85. goPay(){
  86. if(!this.payType){
  87. uni.showToast({
  88. title: "请选择支付方式",
  89. icon: "none",
  90. mask: true
  91. });
  92. return
  93. }
  94. }
  95. }
  96. };
  97. </script>
  98. <style lang="scss" scoped>
  99. </style>