vinInput.vue 743 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. <template>
  2. <view style="width: 100%;">
  3. <xt-verify-code v-model="verifyCode" inputType='text' size="17" @confirm="confirm"></xt-verify-code>
  4. <view class="confirm-button">
  5. <u-button @click="ok" type="primary" shape="circle">确认输入</u-button>
  6. </view>
  7. </view>
  8. </template>
  9. <script>
  10. export default {
  11. data() {
  12. return {
  13. verifyCode: ''
  14. }
  15. },
  16. methods: {
  17. confirm(code){
  18. console.log(code)
  19. this.verifyCode = code
  20. },
  21. ok(){
  22. if(this.verifyCode==''){
  23. uni.showToast({
  24. title: "请输入VIN码",
  25. icon:"none"
  26. })
  27. }else{
  28. uni.redirectTo({
  29. url: "/pages/vinInput/confirmVin"
  30. })
  31. }
  32. }
  33. }
  34. }
  35. </script>
  36. <style lang="less">
  37. .confirm-button{
  38. padding: 50rpx;
  39. }
  40. </style>