mine.vue 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140
  1. <template>
  2. <view class="order">
  3. <view class="order_detail" v-for="(list,index) in ordeListMessage" :key=index>
  4. <view class="fish_pond">
  5. <text class="name">{{list.company.name}}</text><text class="time">{{list.created_at_text}}</text>
  6. </view>
  7. <view class="fish_list">
  8. <view class="fish_list1">
  9. <text class="fish_name">预约时间</text><text class="fish_time">{{list.subscribe_day}}</text>
  10. </view>
  11. <view class="fish_list2">
  12. <text class="fish_name">预约区域</text><text class="fish_time">{{list.seat.name}}</text>
  13. </view>
  14. <view class="fish_list1" v-for="(item,index1) in list.subscribes" :key=index1>
  15. <text class="order_name">预约坐席</text><text class="order_time">{{item.seat_no}}</text>
  16. </view>
  17. </view>
  18. <view class="order-footer">
  19. <text class="order-money">¥{{list.seats_money}}</text><text class="order-state">{{list.status_text}}</text>
  20. </view>
  21. </view>
  22. </view>
  23. </template>
  24. <script>
  25. export default({
  26. data(){
  27. return{
  28. ordeListMessage:''
  29. }
  30. },
  31. onLoad() {
  32. var that=this
  33. wx.request({
  34. url:'https://yutang.web.ximengnaikang.com/api/orders',
  35. method:'GET',
  36. header:{
  37. 'content-type':'application/json' ,// 默认值
  38. 'Authorization':getApp().globalData.token,
  39. },
  40. success:function(res){
  41. // console.log(getApp().globalData.no,'这是预约成功发')
  42. that.ordeListMessage=res.data.data.data
  43. console.log(that.ordeListMessage,'这是预约')
  44. }
  45. })
  46. }
  47. })
  48. </script>
  49. <style>
  50. page{
  51. background-color: #fcfbfc;
  52. }
  53. .order_detail{
  54. margin: 20rpx 0;
  55. padding: 0 20rpx;
  56. background-color:white;
  57. }
  58. .fish_pond{
  59. margin: 0 20rpx;
  60. height: 80rpx;
  61. line-height: 80rpx;
  62. border-radius: 6rpx;
  63. }
  64. .name,.time{
  65. display: inline-block;
  66. }
  67. .name{
  68. width: 75%;
  69. font-weight: 600;
  70. font-size: 40rpx;
  71. }
  72. .time{
  73. width: 25%;
  74. color: red;
  75. }
  76. .fish_list{
  77. padding: 0 20rpx;
  78. border-top: solid 1px #d1d0d1;
  79. border-bottom: solid 1px #d1d0d1;
  80. }
  81. .fish_list1,.fish_list2{
  82. height: 80rpx;
  83. line-height: 80rpx;
  84. }
  85. .fish_list2{
  86. border-bottom: dashed 1px #d1d0d1;
  87. border-top: dashed 1px #d1d0d1;
  88. }
  89. .fish_name{
  90. width: 70%;
  91. display: inline-block;
  92. }
  93. .fish_time{
  94. width: 30%;
  95. display: inline-block;
  96. }
  97. .order_time{
  98. vertical-align: top;
  99. display: inline-block;
  100. height: 60rpx;
  101. line-height: 60rpx;
  102. text-align: center;
  103. color: white;
  104. width: 60rpx;
  105. background-color: red;
  106. margin-left: 60rpx;
  107. margin-top: 10rpx;
  108. border-radius: 6rpx;
  109. }
  110. .order-footer{
  111. height: 120rpx;
  112. }
  113. .order-money{
  114. line-height: 120rpx;
  115. font-size: 36rpx;
  116. }
  117. .order-state{
  118. margin-right: 40rpx;
  119. margin-top: 30rpx;
  120. display: inline-block;
  121. width: 150rpx;
  122. height: 60rpx;
  123. border-radius: 12rpx;
  124. line-height: 60rpx;
  125. font-size: 26rpx;
  126. text-align: center;
  127. border: solid 1rpx #d1d0d1;
  128. float: right;
  129. }
  130. </style>