驾考受理查询支付宝小程序、网页
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

130 lines
2.1 KiB

6 months ago
  1. <template>
  2. <view class="content">
  3. <view class="title">
  4. 受理凭证查询
  5. </view>
  6. <view class="search-bar">
  7. <view class="search-bar-box">
  8. <input type="text"
  9. v-model="userName"
  10. placeholder="请输入姓名"
  11. class="search-text"
  12. focus />
  13. <button class="search-btn"
  14. @click="search">搜索</button>
  15. </view>
  16. </view>
  17. <!-- <view class="info">
  18. 输入名称查询驾考受理信息
  19. </view> -->
  20. </view>
  21. </template>
  22. <script>
  23. import api from '@/plugins/api.js'
  24. export default {
  25. data() {
  26. return {
  27. userName : '',
  28. isSearch : false,
  29. }
  30. },
  31. onShow() {
  32. this.$store.commit('getConfList')
  33. },
  34. methods: {
  35. search(){
  36. if(this.isSearch){
  37. return
  38. }
  39. this.isSearch = true
  40. api('getUserInfo', {
  41. userName : this.userName
  42. }, res => {
  43. this.isSearch = false
  44. if(res.code == 200){
  45. this.$store.state.info = res.result
  46. uni.navigateTo({
  47. url: '/pages/index/index'
  48. })
  49. }
  50. })
  51. },
  52. }
  53. }
  54. </script>
  55. <style scoped lang="scss">
  56. .content {
  57. color: #000;
  58. line-height: 50rpx;
  59. padding: 15rpx;
  60. padding-bottom: 50rpx;
  61. display: flex;
  62. flex-direction: column;
  63. align-items: center;
  64. .title {
  65. text-align: center;
  66. padding: 60rpx 0;
  67. font-size: 36rpx;
  68. font-weight: 900;
  69. }
  70. .info{
  71. font-size: 26rpx;
  72. color: #7f7f81;
  73. }
  74. // 搜索框
  75. .search-bar {
  76. width: 100%;
  77. height: 100rpx;
  78. margin-top: 2%;
  79. }
  80. .search-bar-box {
  81. display: flex;
  82. margin: 0 auto;
  83. width: 620rpx;
  84. height: 70rpx;
  85. border: 5rpx solid #2e64ac;
  86. border-radius: 50rpx;
  87. background-color: #fff;
  88. }
  89. .search-span {
  90. width: 100rpx;
  91. height: 56rpx;
  92. margin-top: 6rpx;
  93. margin-left: 30rpx;
  94. }
  95. .search-text {
  96. width: 100%;
  97. margin-top: 10rpx;
  98. margin-left: 20rpx;
  99. font-size: 30rpx;
  100. color: #7f7f81;
  101. }
  102. .search-btn {
  103. background-color: #2e64ac;
  104. /* Green */
  105. color: white;
  106. text-align: center;
  107. display: inline-block;
  108. font-size: 35rpx;
  109. width: 240rpx;
  110. height: 70rpx;
  111. line-height: 65rpx;
  112. border-radius: 30rpx;
  113. letter-spacing: 3rpx;
  114. }
  115. }
  116. </style>