passwordRecharge.vue 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. <template>
  2. <view class="deposit">
  3. <view class="deposit_head">
  4. <view class="deposit_head_main">
  5. <view class="deposit_head_txt">输入卡密</view>
  6. <view class="deposit_head_ipt flexs">
  7. <input type="digit" v-model="password" placeholder="请输入卡密" placeholder-style="color:#999999" />
  8. </view>
  9. <view class="deposit_main_txt"><u-parse :content="message"></u-parse></view>
  10. </view>
  11. </view>
  12. <button class="deposit_btn" hover-class="hover-view" @click="submit">提交</button>
  13. </view>
  14. </template>
  15. <script>
  16. export default {
  17. data() {
  18. return {
  19. password:'',
  20. message:'',
  21. };
  22. },
  23. methods:{
  24. submit () {
  25. if (!this.password) return uni.showToast({title:'请输入卡密',icon:'none'})
  26. this.$api.carpassDeposit({password:this.password}).then(res=>{
  27. if (res.code === 1) {
  28. this.password = ''
  29. uni.showToast({title:res.msg})
  30. }
  31. })
  32. },
  33. getMessage () {
  34. this.$api.agreement({name:'kamichongzhi'}).then(res=>{
  35. if (res.code === 1) {
  36. this.message = res.data.content
  37. }
  38. })
  39. }
  40. },
  41. onLoad() {
  42. this.getMessage()
  43. }
  44. }
  45. </script>
  46. <style lang="scss">
  47. .deposit {
  48. padding: 0 35rpx 0 25rpx;
  49. .deposit_head {
  50. .deposit_head_name {
  51. font-size: 32rpx;
  52. padding: 30rpx 0 20rpx 20rpx;
  53. }
  54. .deposit_head_main {
  55. margin-top: 15px;
  56. background: #FFFFFF;
  57. padding: 30rpx 30rpx 58rpx 20rpx;
  58. .deposit_head_txt {
  59. font-size: 28rpx;
  60. margin-bottom: 30rpx;
  61. }
  62. .deposit_head_ipt {
  63. padding: 20rpx 0;
  64. border-bottom: 2rpx solid #EBEBEB;
  65. text {
  66. font-size: 36rpx;
  67. margin-right: 20rpx;
  68. }
  69. input {
  70. color: #F6AF32;
  71. font-size: 36rpx;
  72. }
  73. }
  74. }
  75. }
  76. }
  77. .deposit_main_txt {
  78. padding: 30rpx 0;
  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>