addbank.vue 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135
  1. <template>
  2. <view class="content">
  3. <form @submit="add">
  4. <navigator url="bank" class="list ft28 box-pack-between bgf flex-y-center border-b">
  5. <text>银行</text>
  6. <view class="flex-center">
  7. <text>{{bank}}</text>
  8. <text class="iconfont icongengduo"></text>
  9. </view>
  10. </navigator>
  11. <view class="list ft28 box-pack-between bgf flex-y-center border-b">
  12. <text>姓名</text>
  13. <input class="tr flex-grow-1" name="card_name" type="text" placeholder="请输入名字" value="" placeholder-class="placeholder-class" />
  14. </view>
  15. <view class="list ft28 box-pack-between bgf flex-y-center border-b">
  16. <text>银行卡号</text>
  17. <input class="tr flex-grow-1" name="card_num" type="number" placeholder="请填写正确的银行卡号" value="" placeholder-class="placeholder-class" />
  18. </view>
  19. <view class="list ft28 box-pack-between bgf flex-y-center border-b">
  20. <text>银行预留手机号</text>
  21. <input class="tr flex-grow-1" name="bank_tel"
  22. type="number" maxlength="11" placeholder="请填写正确的预留手机号" value="" placeholder-class="placeholder-class" />
  23. </view>
  24. <view class="desc">
  25. 预防提现失败,请填写正确的信息!
  26. </view>
  27. <view class="hg100px">
  28. </view>
  29. <button class="login-btn flex-center" formType="submit">立即添加</button>
  30. </form>
  31. </view>
  32. </template>
  33. <script>
  34. export default {
  35. data() {
  36. return {
  37. list: [],
  38. page: 1,
  39. bank: "",
  40. }
  41. },
  42. onReachBottom(e) {
  43. // this.http()
  44. },
  45. onLoad(e) {
  46. // this.http();
  47. },
  48. onShow() {
  49. this.bank = uni.getStorageSync("bank-name") || "";
  50. },
  51. onShareAppMessage(e) {
  52. },
  53. methods: {
  54. add(e) {
  55. let data = e.detail.value;
  56. data.bank_name = this.bank;
  57. data.token = uni.getStorageSync("token");
  58. this.request({
  59. url: "Advertiser/addcard",
  60. data,
  61. }).then(res => {
  62. console.log(res, "res")
  63. if (res.code === '200') {
  64. uni.showToast({
  65. title: "提交成功"
  66. })
  67. setTimeout(()=>{
  68. uni.navigateBack({
  69. delta:1
  70. })
  71. },2000)
  72. }
  73. }).catch((res)=>{
  74. uni.showToast({
  75. title: res.message,
  76. icon:"none"
  77. })
  78. });
  79. }
  80. }
  81. }
  82. </script>
  83. <style lang="scss">
  84. @import url("@/static/css/header.css");
  85. .list {
  86. width: 100%;
  87. height: 100rpx;
  88. padding: 0 30rpx;
  89. }
  90. .login-btn {
  91. width: 630rpx;
  92. height: 90rpx;
  93. background: linear-gradient(132deg, #3387FF 0%, #3387FF 100%);
  94. box-shadow: 0px 2rpx 12rpx #3387FF;
  95. opacity: 1;
  96. border-radius: 45rpx;
  97. margin: 0 auto;
  98. color: #FFFFFF;
  99. font-size: 30rpx;
  100. font-family: Source Han Sans CN;
  101. font-weight: 500;
  102. opacity: 1;
  103. }
  104. .desc {
  105. width: 100%;
  106. padding: 0 30rpx;
  107. font-size: 24rpx;
  108. font-weight: 400;
  109. line-height: 33px;
  110. color: rgba(153, 153, 153, 1);
  111. opacity: 1;
  112. margin-top: 30rpx;
  113. }.hg100px{
  114. height: 100rpx;
  115. }
  116. </style>