we-chat.vue 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134
  1. <template>
  2. <view class="form-box">
  3. <en-nav title="" :title-color="'#333'" :right-show="true" :right-type="2" >
  4. <template v-slot:right>
  5. <text class="nav-right sys-weight-600 sys-color-white" @click="setNextStep">保存</text>
  6. </template>
  7. </en-nav>
  8. <view class="login-box" >
  9. <view class="login-top">
  10. <view class="login-title">
  11. <text class="title-item sys-color-black sys-weight-600">上传微信,赚取奖励</text>
  12. </view>
  13. <view class="login-from">
  14. <view class="from-title">
  15. <view class="title-circle sys-background-black" :class="{'sys-background-green':weChat!==''}"></view>
  16. <view class="title-text sys-color-black">添加微信</view>
  17. </view>
  18. <view class="from-text from-item" :class="{'apply-shake':isShakeBut}">
  19. <input type="text" class="from-input sys-color-gray-3" max="11" v-model="weChat" placeholder="请输入微信"></input>
  20. </view>
  21. </view>
  22. </view>
  23. </view>
  24. </view>
  25. </template>
  26. <script>
  27. import EnNav from "@/components/en-utils/en-nav/en-nav";
  28. import tools from "@/service/tools";
  29. export default {
  30. components: {EnNav},
  31. data() {
  32. return {
  33. 'weChat':'',
  34. 'isShakeBut':false
  35. }
  36. },
  37. watch: {
  38. 'weChat': function () {
  39. this.verifyIsOK()
  40. },
  41. },
  42. methods: {
  43. setNextStep() {
  44. if (this.isOK) {
  45. uni.navigateBack()
  46. } else {
  47. tools.error('请输入微信号')
  48. this.isShakeBut = true
  49. setTimeout(() => {
  50. this.isShakeBut = false
  51. }, 500)
  52. }
  53. },
  54. verifyIsOK() {
  55. this.isOK = this.weChat !== '';
  56. },
  57. }
  58. }
  59. </script>
  60. <style scoped lang="scss">
  61. @import "/static/css/shake.css";
  62. .form-box{
  63. padding: 0 32rpx;
  64. .nav-right{
  65. font-size: 28rpx;
  66. line-height: 44rpx;
  67. color: #333;
  68. }
  69. .login-box{
  70. padding: 82rpx 0 0 0;
  71. box-sizing: border-box;
  72. position: relative;
  73. .login-top{
  74. .login-title{
  75. padding-bottom: 60rpx;
  76. .title-item{
  77. font-size: 48rpx;
  78. }
  79. }
  80. .login-from{
  81. .from-title{
  82. display: flex;
  83. justify-content: flex-start;
  84. height: 44rpx;
  85. .title-circle{
  86. width: 16rpx;
  87. height: 16rpx;
  88. border-radius: 50%;
  89. margin-top: 14rpx;
  90. margin-right: 8rpx;
  91. }
  92. }
  93. .from-text{
  94. width: 100%;
  95. padding-bottom: 40rpx;
  96. border-bottom: 1rpx solid #E0E0E0;
  97. .from-input{
  98. font-size: 32rpx;
  99. height: 44rpx;
  100. line-height: 44rpx;
  101. }
  102. .from-input::placeholder{
  103. color: #999999;
  104. }
  105. }
  106. .from-item{
  107. margin-top: 60rpx;
  108. }
  109. }
  110. .login-but{
  111. margin-top: 120rpx;
  112. }
  113. .local-txt{
  114. padding-top: 32rpx;
  115. font-size: 24rpx;
  116. text-align: center;
  117. }
  118. }
  119. }
  120. }
  121. </style>