appointList.vue 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. <template>
  2. <view class="appointList">
  3. <view v-for="item in appointList" :key="item.id" class="appoint">
  4. <view class="fl-flex fl-justify-between">
  5. <view>
  6. {{ item.mobile }}
  7. <text class="f-s-22" style="color: #999999"> (预留手机) </text>
  8. </view>
  9. <u-icon name="phone" color="#2979ff" size="24" @click="handlerMakePhone(item.mobile)" />
  10. </view>
  11. <view class="line"></view>
  12. <view class="fl-flex fl-align-center">
  13. <image
  14. :src="item.simpleMerchantVO.logo"
  15. mode="scaleToFill"
  16. style="width: 200rpx; height: 200rpx"
  17. v-if="item.simpleMerchantVO.logo"
  18. />
  19. <image
  20. src="/static/QR57a.jpg"
  21. v-else
  22. mode="scaleToFill"
  23. style="width: 200rpx; height: 200rpx"
  24. />
  25. <view class="u-p-l-10">
  26. <view class="f-s-32" style="font-weight: bold">服务名称服务</view>
  27. <view style="margin: 10rpx 0">{{ $u.timeFormat(item.appointTime) || '--' }}</view>
  28. <view>{{ item.simpleMerchantVO.address || '--' }}</view>
  29. </view>
  30. </view>
  31. </view>
  32. </view>
  33. </template>
  34. <script>
  35. import { getAppointListApi } from '@/api/merchant/order';
  36. export default {
  37. data() {
  38. return {
  39. params: {
  40. offset: 1,
  41. size: 10,
  42. },
  43. appointList: [],
  44. list: {},
  45. };
  46. },
  47. onShow() {
  48. let { merchant } = this.$store.state.data.merchantInfo;
  49. this.list = merchant;
  50. setTimeout(() => {
  51. this.getAppointList();
  52. }, 300);
  53. },
  54. methods: {
  55. async getAppointList() {
  56. let result = Object.assign({}, { ...this.params }, { merchantId: this.list.id });
  57. console.log(result, '0000000');
  58. let res = await getAppointListApi({ ...result });
  59. if (res.code === 'OK') {
  60. this.appointList = res.data;
  61. }
  62. },
  63. handlerMakePhone() {
  64. uni.makePhoneCall({
  65. phoneNumber: '114', //仅为示例
  66. });
  67. },
  68. },
  69. };
  70. </script>
  71. <style lang="scss" scoped>
  72. .appointList {
  73. .appoint {
  74. margin: 0 20rpx;
  75. padding: 20rpx;
  76. background-color: #fff;
  77. margin-bottom: 20rpx;
  78. border-radius: 20rpx;
  79. .line {
  80. height: 2rpx;
  81. width: 100%;
  82. background-color: #eee;
  83. margin: 5rpx 0;
  84. }
  85. }
  86. }
  87. </style>