apply.vue 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  1. <template>
  2. <app-layout>
  3. <view class="container dir-top-wrap cross-center">
  4. <view class="input-group">
  5. <view class="input-item main-left cross-center">
  6. <view class="label">姓名</view>
  7. <input type="text" placeholder="请输入正确的姓名" v-model="form.name">
  8. </view>
  9. <view class="input-item main-left cross-center">
  10. <view class="label">账号</view>
  11. <input type="text" placeholder="请输入正确微信账号" v-model="form.account">
  12. </view>
  13. <view class="input-item main-left cross-center" >
  14. <view class="label">备注</view>
  15. <input type="text" placeholder="选填" v-model="form.remark">
  16. </view>
  17. </view>
  18. <u-button shape="circle"
  19. class="button"
  20. type="success"
  21. hover-class="none"
  22. :custom-style="btnStyle"
  23. @click="handelApply"
  24. :disabled="!form.name || !form.account"
  25. >提交申请</u-button>
  26. </view>
  27. </app-layout>
  28. </template>
  29. <script>
  30. import appLayout from "@/components/app-layout"
  31. export default {
  32. components:{
  33. appLayout,
  34. },
  35. data() {
  36. return {
  37. form:{
  38. name:'',
  39. account:'',
  40. remark:'',
  41. }
  42. }
  43. },
  44. methods: {
  45. handelApply(){
  46. this.$u.api.withdrawApply(this.form).then(res => {
  47. uni.showToast({
  48. title: '提交成功',
  49. icon: 'success',
  50. duration: 1500
  51. });
  52. setTimeout(() => {
  53. this.$jump({url:'/pages/price/index',type:'redirect'})
  54. },1500)
  55. })
  56. }
  57. },
  58. computed:{
  59. btnStyle() {
  60. let background = 'linear-gradient(90deg, rgba(196,146,68,1) 0%, rgba(225,193,117,1) 100%, rgba(225,193,117,1) 100%)';
  61. if(!this.form.name || !this.form.account){
  62. background = '#ccc !important'
  63. }
  64. return {
  65. border:'none',
  66. background: background,
  67. width: '600rpx',
  68. padding: '36rpx 0',
  69. height: '100rpx',
  70. fontSize: '36rpx',
  71. fontWeight: 600
  72. };
  73. }
  74. }
  75. }
  76. </script>
  77. <style lang="scss" scoped>
  78. .button[disabled]{
  79. background: #ccc !important;
  80. }
  81. .input-group{
  82. width: 700rpx;
  83. .input-item{
  84. position: relative;
  85. margin: 32rpx 0;
  86. padding: 24rpx 32rpx;
  87. font-size: 32rpx;
  88. z-index: 1;
  89. &:after{
  90. content: "";
  91. position: absolute;
  92. top: 0;
  93. left: 0;
  94. width: 200%;
  95. height: 200%;
  96. border: 1px solid #979797;
  97. transform: scale(.5);
  98. -webkit-transform-origin: 0 0;
  99. transform-origin: 0 0;
  100. z-index: -1;
  101. border-radius: 16rpx;
  102. }
  103. .label{
  104. width: 120rpx;
  105. color: #666666;
  106. letter-spacing: .15em;
  107. }
  108. input{
  109. font-size: 32rpx;
  110. font-weight: 500;
  111. color: #333333;
  112. }
  113. }
  114. }
  115. </style>