out.vue 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. <template>
  2. <view class="deposit">
  3. <view class="deposit_head">
  4. <view class="deposit_head_name">转出金额</view>
  5. <view class="deposit_head_main">
  6. <view class="deposit_head_txt">输入金额</view>
  7. <view class="deposit_head_ipt flexs">
  8. <text>¥</text>
  9. <input type="digit" v-model="amount" placeholder="请输入" placeholder-style="color:#999999" />
  10. </view>
  11. </view>
  12. </view>
  13. <view class="deposit_main">
  14. <view class="deposit_main_txt"><u-parse :content="message"></u-parse></view>
  15. </view>
  16. <button class="deposit_btn" hover-class="hover-view" @click="submit">提交</button>
  17. </view>
  18. </template>
  19. <script>
  20. export default {
  21. data() {
  22. return {
  23. amount:'',
  24. message:'',
  25. };
  26. },
  27. methods:{
  28. submit () {
  29. if (!this.amount) return uni.showToast({title:'请输入金额',icon:'none'})
  30. this.$api.moneyToCoin({amount:this.amount}).then(res=>{
  31. if (res.code === 1) {
  32. this.amount = ''
  33. uni.showToast({title:res.msg})
  34. }
  35. })
  36. },
  37. getMessage () {
  38. this.$api.agreement({name:'balance_to_wallet_instruction'}).then(res=>{
  39. if (res.code === 1) {
  40. this.message = res.data.content
  41. }
  42. })
  43. }
  44. },
  45. onLoad() {
  46. this.getMessage()
  47. }
  48. }
  49. </script>
  50. <style lang="scss">
  51. .deposit {
  52. padding: 0 35rpx 0 25rpx;
  53. .deposit_head {
  54. .deposit_head_name {
  55. font-size: 32rpx;
  56. padding: 30rpx 0 20rpx 20rpx;
  57. }
  58. .deposit_head_main {
  59. background: #FFFFFF;
  60. padding: 30rpx 30rpx 58rpx 20rpx;
  61. .deposit_head_txt {
  62. font-size: 28rpx;
  63. margin-bottom: 30rpx;
  64. }
  65. .deposit_head_ipt {
  66. padding: 20rpx 0;
  67. border-bottom: 2rpx solid #EBEBEB;
  68. text {
  69. font-size: 36rpx;
  70. margin-right: 20rpx;
  71. }
  72. input {
  73. color: #F6AF32;
  74. font-size: 36rpx;
  75. }
  76. }
  77. }
  78. }
  79. }
  80. .deposit_main {
  81. .deposit_main_txt {
  82. padding: 20rpx 0;
  83. }
  84. }
  85. .deposit_btn {
  86. height: 98rpx;
  87. color: #333333;
  88. font-size: 30rpx;
  89. margin-top: 480rpx;
  90. background: #FFFFFF;
  91. box-shadow: 0rpx 0rpx 12rpx 0rpx rgba(220, 220, 220, 0.2);
  92. border-radius: 20rpx;
  93. }
  94. </style>