SecurityCode.vue 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. <template>
  2. <view class="SecurityCode">
  3. <view class="top">
  4. <input class="uni-input" v-model="keyword" placeholder="请输入"/>
  5. <view class="btn">搜索</view>
  6. </view>
  7. <view class="bom" v-if="data">
  8. <view class="box">
  9. 瓶码: {{data.bottleId}}
  10. </view>
  11. <view class="box">
  12. 箱码: {{data.boxId}}
  13. </view>
  14. <view class="box">
  15. 配送单号: {{data.sendId}}
  16. </view>
  17. </view>
  18. </view>
  19. </template>
  20. <script>
  21. import {verify} from '../../api/bazaar.js'
  22. export default {
  23. data() {
  24. return {
  25. keyword: '',
  26. data: ''
  27. };
  28. },
  29. created() {
  30. },
  31. methods:{
  32. async getData(){
  33. if(this.keyword){
  34. const res = await verify({
  35. verifyCode: this.keyword
  36. })
  37. console.log(res);
  38. this.data = res.data.list
  39. }
  40. }
  41. }
  42. }
  43. </script>
  44. <style lang="scss">
  45. .SecurityCode{
  46. height: 100%;
  47. .top {
  48. height: 100rpx;
  49. display: flex;
  50. padding: 10rpx;
  51. border-bottom: 1rpx solid #dfdfdf;
  52. .uni-input{
  53. flex: 1;
  54. height: 100%;
  55. padding-left: 20rpx;
  56. }
  57. .btn{
  58. width: 20%;
  59. height: 100%;
  60. line-height: 100rpx;
  61. text-align: center;
  62. font-size: 30rpx;
  63. background-color: #f4f4f4;
  64. }
  65. }
  66. .bom{
  67. height: calc(100% - 100rpx);
  68. padding: 20rpx;
  69. .box{
  70. padding: 10rpx 0;
  71. border-bottom: 1rpx solid #dfdfdf;
  72. &:last-child{
  73. border-bottom: 0;
  74. }
  75. }
  76. }
  77. }
  78. </style>