index.vue 9.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281
  1. <template>
  2. <view class="page">
  3. <view class="flex-row tuni">
  4. <image class="profile" src="/static/my/fuwuNmber.png"></image>
  5. <view class="tuniMsg flex-col">
  6. <text class="name">托老师</text>
  7. <view class="flex-row dizi">
  8. <u-icon name="/static/index/dizi.png" size="18"></u-icon>
  9. <text>娇骄儿白云店</text>
  10. </view>
  11. </view>
  12. <view class="flex-col ">
  13. <view class="flex-row justify-center dakaIcon">
  14. <u-icon name="/static/index/saoma.png" size="25"></u-icon>
  15. </view>
  16. <view class="flex-row justify-center dakaText">
  17. <text>报道打卡</text>
  18. </view>
  19. </view>
  20. </view>
  21. <view class="flex-row justify-center">
  22. <view class="tab flex-row">
  23. <view class="tabs" :class="{selectTabs: tabIndex === 0}" @click="clickTab(0)">
  24. <text>服务中</text>
  25. </view>
  26. <view class="tabs" :class="{selectTabs: tabIndex === 1}" @click="clickTab(1)">
  27. <text>待服务</text>
  28. </view>
  29. </view>
  30. </view>
  31. <view v-if="tabIndex === 0" class="flex-row justify-center">
  32. <view class="serviceMsg " v-if="true">
  33. <view class="flex-row serviceInfo ">
  34. <image class="serviceProfile" src="/static/my/fuwuNmber.png"></image>
  35. <view class="flex-col justify-end">
  36. <view class="flex-row" >
  37. <text class="servicename">张某某</text>
  38. <view class="flex-row justify-center tag">
  39. <text>切换</text>
  40. <u-icon name="/static/index/qiehuan.png" size="18"></u-icon>
  41. </view>
  42. </view>
  43. </view>
  44. </view>
  45. <view :style="{'height':'110rpx'}"></view>
  46. <view class="flex-row justify-center ">
  47. <view class="flex-row hintView">
  48. <view class="hint">
  49. <text>!</text>
  50. </view>
  51. <view class="hintCentent">
  52. <text>娇宝,提前10分钟到哟,一人一号过号需</text>
  53. </view>
  54. </view>
  55. </view>
  56. <view class="flex-row justify-center ">
  57. <view class="flex-col itemView">
  58. <view class="flex-row item">
  59. <u-icon name="/static/index/jiandao.png" size="20"></u-icon>
  60. <text class="key">服务项目:</text>
  61. <text class="value">理发</text>
  62. </view>
  63. <view class="flex-row item">
  64. <u-icon name="/static/index/riqi.png" size="20"></u-icon>
  65. <text class="key">服务日期:</text>
  66. <text class="value">2023年12月6日</text>
  67. </view>
  68. <view class="flex-row item">
  69. <view class="flex-row">
  70. <u-icon name="/static/index/aixin.png" size="20"></u-icon>
  71. <text class="key">服务人员:</text>
  72. <text class="value">姜欣欣</text>
  73. </view>
  74. <view class="flex-row leftBord">
  75. <text class="key">预约费用:</text>
  76. <text class="value2">¥24.00</text>
  77. </view>
  78. </view>
  79. <view class="flex-row item">
  80. <view class="flex-row">
  81. <u-icon name="/static/index/shiduan.png" size="20"></u-icon>
  82. <text class="key">服务时段:</text>
  83. <text class="value">11:45</text>
  84. </view>
  85. <view class="flex-row leftBord">
  86. <text class="key">服务费用:</text>
  87. <text class="value2">¥24.00</text>
  88. </view>
  89. </view>
  90. </view>
  91. </view>
  92. <view class="flex-row justify-center">
  93. <view class="flex-col itemView">
  94. <view class="flex-row justify-between">
  95. <view class="flex-col justify-center">
  96. <view class="flex-row">
  97. <text class="key1">服务总金额:</text>
  98. <text class="value1">¥24.00</text>
  99. </view>
  100. </view>
  101. <view class="flex-row justify-center tag1">
  102. <u-icon name="/static/index/qianbao.png" size="18"></u-icon>
  103. <text>去结算</text>
  104. </view>
  105. </view>
  106. </view>
  107. </view>
  108. <view class="flex-row justify-center">
  109. <view class="flex-row justify-around grid">
  110. <view>
  111. <u-icon name="/static/index/jiaojieban.png" size="40"></u-icon>
  112. <text class="grid-text">服务交接</text>
  113. </view>
  114. <view>
  115. <u-icon name="/static/index/jiandao.png" size="40"></u-icon>
  116. <text class="grid-text">添加服务</text>
  117. </view>
  118. <view >
  119. <u-icon name="/static/index/xiayige.png" size="40"></u-icon>
  120. <text class="grid-text">下一位</text>
  121. </view>
  122. <view >
  123. <u-icon name="/static/index/yijiuwei.png" size="40"></u-icon>
  124. <text class="grid-text">已就位</text>
  125. </view>
  126. </view>
  127. </view>
  128. <view class="flex-row justify-center start">
  129. <text>开始服务</text>
  130. </view>
  131. </view>
  132. <view class="flex-col" :style="{'height':sysHeight}" v-else>
  133. <view class="flex-row justify-center">
  134. <image class="dataNull" src="/static/index/dataNull.png"></image>
  135. </view>
  136. <view class="flex-row justify-center dataNullText">
  137. <text>暂无服务项目</text>
  138. </view>
  139. </view>
  140. </view>
  141. <view v-if="tabIndex === 1" :style="{'height':sysHeight}">
  142. <mescroll-uni v-if="true" ref="mescrollRef" @init="mescrollInit" :height="sysHeight" :down="downOption" @down="downCallback"
  143. :up="upOption" @up="upCallback" @emptyclick="emptyClick">
  144. <view class="listItem flex-row justify-between ">
  145. <view class="flex-row">
  146. <image class="listItemProfile" src="/static/my/fuwuNmber.png"></image>
  147. <text class="listItemName">张某某</text>
  148. </view>
  149. <view class="flex-row">
  150. <u-icon name="/static/index/shiduan.png" size="20"></u-icon>
  151. <text class="listItemkey">服务时段:</text>
  152. <text class="listItemValue">11:45</text>
  153. </view>
  154. </view>
  155. </mescroll-uni>
  156. <view :style="{'height':sysHeight}" v-else>
  157. <view class="flex-row justify-center">
  158. <image class="dataNull" src="/static/index/dataNull.png"></image>
  159. </view>
  160. <view class="flex-row justify-center dataNullText">
  161. <text>暂无服务项目</text>
  162. </view>
  163. </view>
  164. </view>
  165. </view>
  166. </template>
  167. <script>
  168. import MescrollMixin from "@/uni_modules/mescroll-uni/components/mescroll-uni/mescroll-mixins.js";
  169. import MescrollMoreItemMixin from "@/uni_modules/mescroll-uni/components/mescroll-uni/mixins/mescroll-more-item.js"
  170. export default {
  171. mixins: [MescrollMixin, MescrollMoreItemMixin], // 注意此处还需使用MescrollMoreItemMixin (必须写在MescrollMixin后面)
  172. data() {
  173. return {
  174. downOption: {
  175. auto: false // 不自动加载 (mixin已处理第一个tab触发downCallback)
  176. },
  177. upOption: {
  178. auto: false, // 不自动加载
  179. // page: {
  180. // num: 0, // 当前页码,默认0,回调之前会加1,即callback(page)会从1开始
  181. // size: 10 // 每页数据的数量
  182. // },
  183. noMoreSize: 4, //如果列表已无数据,可设置列表的总数量要大于半页才显示无更多数据;避免列表数据过少(比如只有一条数据),显示无更多数据会不好看; 默认5
  184. empty: {
  185. icon: '/static/imageIcon/empty.png',
  186. tip: '暂无内容', // 提示
  187. // btnText: '去看看'
  188. },
  189. textNoMore: '没有更多了'
  190. },
  191. tabIndex:0,
  192. sysHeight:'',
  193. group1: [
  194. {thumb: '/static/my/idcard.png', title: '个人信息', rightText: '', to: '/myPages/aboutOur/index'}
  195. ],
  196. }
  197. },
  198. onLoad(){
  199. let sysInfo = uni.getSystemInfoSync()
  200. this.sysHeight = sysInfo.windowHeight - (sysInfo.windowWidth/750) * 354 + 'px'
  201. console.log(this.sysHeight)
  202. uni.getLocation({
  203. success:(e)=>{
  204. console.log(e)
  205. }
  206. })
  207. },
  208. methods: {
  209. clickTab(e){
  210. this.tabIndex = e
  211. },
  212. /*下拉刷新的回调 */
  213. downCallback() {
  214. // 这里加载你想下拉刷新的数据, 比如刷新轮播数据
  215. // loadSwiper();
  216. // 下拉刷新的回调,默认重置上拉加载列表为第一页 (自动执行 page.num=1, 再触发upCallback方法 )
  217. this.mescroll.resetUpScroll()
  218. },
  219. /*上拉加载的回调: 其中page.num:当前页 从1开始, page.size:每页数据条数,默认10 */
  220. upCallback(page) {
  221. let status = this.index
  222. if (this.index === 3){
  223. status = 4
  224. }
  225. //联网加载数据
  226. let httpData = {
  227. pageNum: page.num,
  228. pageSize: 10,
  229. orderType:'SERVICE',
  230. status:status
  231. }
  232. // this.$api.getOrderList(httpData).then((res) => {
  233. // //联网成功的回调,隐藏下拉刷新和上拉加载的状态;
  234. // this.mescroll.endSuccess(res.data.rows.length, res.data.rows.length === 10);
  235. // //设置列表数据
  236. // if (page.num === 1) this.list = []; //如果是第一页需手动制空列表
  237. // this.list = this.list.concat(res.data.rows); //追加新数据
  238. // console.log(this.list)
  239. // }).catch((err) => {
  240. // //联网失败, 结束加载
  241. // this.mescroll.endErr();
  242. // })
  243. },
  244. //点击空布局按钮的回调
  245. emptyClick() {
  246. uni.showToast({
  247. title: '点击了按钮,具体逻辑自行实现'
  248. })
  249. },
  250. }
  251. }
  252. </script>
  253. <style lang="scss" scoped>
  254. @import './index.rpx.css';
  255. </style>