bankCardDetails.vue 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. <template>
  2. <view class="wallet-main">
  3. <view class="bank-box">
  4. <view v-for="item in bankList" :key="item.cardCode"
  5. :style="`background: ${item.color};border-radius: 8px;`">
  6. <BankItem bankCode="ABC" bankName="中国农业银行" cardType="储蓄卡" cardCode="5106365986893" />
  7. </view>
  8. <up-button type="primary" text="解除绑定" @click="onSubmit"></up-button>
  9. </view>
  10. </view>
  11. </template>
  12. <script setup>
  13. import { ref } from 'vue';
  14. import BankItem from '../../components/bank-item/bank-item.vue';
  15. const bankList = ref([
  16. {
  17. bankCode: 'ABC',
  18. bankName: '中国农业银行',
  19. cardType: '储蓄卡',
  20. cardCode: '5106365986893',
  21. color: 'red'
  22. },
  23. ])
  24. const onSubmit = () => {
  25. uni.showModal({
  26. title: '提示',
  27. content: '是否要解绑银行卡',
  28. success(res) {
  29. console.log('11');
  30. }
  31. });
  32. }
  33. </script>
  34. <style lang="scss" scoped>
  35. .card-box {
  36. border-radius: 8px;
  37. background: rgba(255, 255, 255, 1);
  38. padding: 20px;
  39. margin-bottom: 12px;
  40. }
  41. .bank-box {
  42. border-radius: 8px;
  43. margin-bottom: 12px;
  44. }
  45. .wallet-main {
  46. position: fixed;
  47. top: 0px;
  48. left: 0px;
  49. right: 0px;
  50. bottom: 0px;
  51. background: rgba(245, 245, 245, 1);
  52. padding: 12px;
  53. overflow: auto;
  54. }
  55. </style>