index.vue 9.4 KB

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