index.vue 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. <template>
  2. <view class="search-container">
  3. <uni-search-bar v-model="query.keyword" placeholder="请填写预约姓名或者手机号码" @confirm="onSearch" />
  4. <view class="res-list">
  5. <block v-for="(it,index) in dataList">
  6. <view class="item">
  7. <view class="no1">预约姓名:{{it.user.nickname}}</view>
  8. <view class="no1">手机号码:{{it.user.mobile}}</view>
  9. <view class="no1">预约编号:{{it.code}}</view>
  10. <view class="no1">预约时间:{{it.reqDate}}</view>
  11. <view class="no1">核销码:{{it.userTicket?it.userTicket.hxCode:""}}</view>
  12. </view>
  13. </block>
  14. </view>
  15. </view>
  16. </template>
  17. <script>
  18. export default {
  19. data() {
  20. return {
  21. query:{
  22. page:1,
  23. pageSize:10,
  24. keyword:'',
  25. storeId:0,
  26. },
  27. dataList:[],
  28. };
  29. },
  30. onLoad(){
  31. this.onSearch();
  32. },
  33. methods:{
  34. onSearch(){
  35. let _this=this;
  36. let url="zc/searchUser";
  37. let data=_this.query;
  38. this.request({
  39. url,
  40. data,
  41. }).then(res => {
  42. if (res.code == 200 ) {
  43. _this.dataList=res.data.list;
  44. }
  45. }).catch((err)=>{})
  46. }
  47. }
  48. }
  49. </script>
  50. <style lang="scss">
  51. @import "./index.scss"
  52. </style>