select-currency.vue 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122
  1. <template>
  2. <view class="">
  3. <!-- 头部 -->
  4. <headContent>&#xe642;
  5. <template #left>
  6. <reverse-back />
  7. </template>
  8. <template #content>
  9. <view class="haed-title">
  10. 选择币种
  11. </view>
  12. </template>
  13. <template #right>
  14. <view @click.stop="lookRecord()" class="head-record iconfont">&#xe642;</view>
  15. </template>
  16. </headContent>
  17. <view class="currency-box">
  18. <block v-for="(item , index) in currencyList" :key="`currency_${index}`">
  19. <view class="currency-item" @click.stop="topUp(item.name)">
  20. <image class="currency-icon" :src="item.icon" mode="aspectFit"></image>
  21. <text class="currency-name">{{ item.name }}</text>
  22. </view>
  23. </block>
  24. </view>
  25. </view>
  26. </template>
  27. <script>
  28. import reverseBack from "@/components/headModules/reverse-back.vue"
  29. import { Api_getBiTypeList , Api_getFlashRecord , Api_getSubmit} from "@/api/index.js"
  30. export default {
  31. name: 'selectCurrency',
  32. components: {
  33. reverseBack
  34. },
  35. data() {
  36. return {
  37. currencyList: [{
  38. icon: require('@/static/images/bi/bi_01.png'),
  39. name: 'BTC'
  40. },
  41. {
  42. icon: require('@/static/images/bi/bi_02.png'),
  43. name: 'BTC'
  44. },
  45. {
  46. icon: require('@/static/images/bi/bi_03.png'),
  47. name: 'BTC'
  48. },
  49. {
  50. icon: require('@/static/images/bi/bi_03.png'),
  51. name: 'BTC'
  52. }
  53. ]
  54. };
  55. },
  56. onLoad() {
  57. this.getBiTypeList();
  58. },
  59. methods:{
  60. getBiTypeList(){
  61. Api_getBiTypeList().then(res => {
  62. console.log('Api_getBiTypeList = ' , res)
  63. }).catch(err => {
  64. console.log('Api_getBiTypeList = ' , err)
  65. })
  66. },
  67. // pages/content/top-up
  68. topUp(name){
  69. uni.navigateTo({
  70. url:`/pages/content/top-up?name=${name}`
  71. })
  72. },
  73. // 查看充值记录
  74. lookRecord(){
  75. uni.navigateTo({
  76. url:'/pages/content/charge-record'
  77. })
  78. }
  79. }
  80. }
  81. </script>
  82. <style>
  83. page {
  84. background-color: #f5f5f5;
  85. }
  86. </style>
  87. <style lang="scss" scoped>
  88. .head-record{
  89. font-size: 60rpx;
  90. }
  91. .currency-box {
  92. width: 100%;
  93. padding: 40rpx $pages-padding 0;
  94. .currency-item{
  95. width: 100%;
  96. display: flex;
  97. align-items: center;
  98. padding: 30rpx 0;
  99. .currency-icon{
  100. width: 46rpx;
  101. height: 46rpx;
  102. flex-shrink: 0;
  103. }
  104. .currency-name{
  105. font-size: 28rpx;
  106. padding-left: 7px;
  107. font-weight: 700;
  108. }
  109. }
  110. // <view class="currency-box">
  111. // <block v-for="(item , index) in currencyList" :key="`currency_${index}`">
  112. // <view class="currency-item">
  113. // <image class="currency-icon" :src="item.icon" mode="aspectFit"></image>
  114. // <text class="currency-name">{{ item.name }}</text>
  115. // </view>
  116. // </block>
  117. // </view>
  118. }
  119. </style>