apply.vue 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  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.wechat">
  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.wechat"
  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. wechat:'',
  40. remark:'',
  41. }
  42. }
  43. },
  44. methods: {
  45. handelApply(){
  46. uni.showToast({
  47. title: '提交成功',
  48. icon: 'success',
  49. duration: 1500
  50. });
  51. }
  52. },
  53. computed:{
  54. btnStyle() {
  55. let background = 'linear-gradient(90deg, rgba(196,146,68,1) 0%, rgba(225,193,117,1) 100%, rgba(225,193,117,1) 100%)';
  56. if(!this.form.name || !this.form.wechat){
  57. background = '#ccc !important'
  58. }
  59. return {
  60. border:'none',
  61. background: background,
  62. width: '600rpx',
  63. padding: '36rpx 0',
  64. height: '100rpx',
  65. fontSize: '36rpx',
  66. fontWeight: 600
  67. };
  68. }
  69. }
  70. }
  71. </script>
  72. <style lang="scss" scoped>
  73. .button[disabled]{
  74. background: #ccc !important;
  75. }
  76. .input-group{
  77. width: 700rpx;
  78. .input-item{
  79. position: relative;
  80. margin: 32rpx 0;
  81. padding: 24rpx 32rpx;
  82. font-size: 32rpx;
  83. z-index: 1;
  84. &:after{
  85. content: "";
  86. position: absolute;
  87. top: 0;
  88. left: 0;
  89. width: 200%;
  90. height: 200%;
  91. border: 1px solid #979797;
  92. transform: scale(.5);
  93. -webkit-transform-origin: 0 0;
  94. transform-origin: 0 0;
  95. z-index: -1;
  96. border-radius: 16rpx;
  97. }
  98. .label{
  99. width: 120rpx;
  100. color: #666666;
  101. letter-spacing: .15em;
  102. }
  103. input{
  104. font-size: 32rpx;
  105. font-weight: 500;
  106. color: #333333;
  107. }
  108. }
  109. }
  110. </style>