orderSetting.vue 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218
  1. <!-- 接单设置 -->
  2. <template>
  3. <s-layout class="homepage-wrap ss-w-100 box-sizing" title="订单" navbar="custom"
  4. tabbar="/pages/XDHomePage/orderInfoList/orderInfoList">
  5. <view class="body" :style="'padding-top:' + bottomHeight">
  6. <!-- 导航 -->
  7. <view class="ss-flex-2 ss-col-center ss-margin-width2" style="position: relative">
  8. <view class="ss-flex-2 ss-col-center">
  9. <text class="textIcon icon-fanhui icon-navigation" @click="backPage"></text>
  10. <view style="margin-left: 15rpx; color: #3D444E; font-size: 28rpx">订单设置</view>
  11. </view>
  12. <view class="ss-flex-1"></view>
  13. <text class="textIcon icon-kefu2 icon-navigation"></text>
  14. </view>
  15. <!-- 客户性别选择 -->
  16. <view class="sex-box">
  17. <view style="font-size: 26rpx;color: #3D444D;font-weight: 550;">接单用户性别</view>
  18. <view class="ss-flex-2 ss-col-center" style="margin-top: 20rpx;">
  19. <view class="sex-item-box" @click="onClick(item)" v-for="item in sexData" :key="item.value" :style="item.value==onClickIndex?'background-color: #649DFD;color: #fff;border: none;':''">{{item.text}}</view>
  20. </view>
  21. </view>
  22. <view class="time-box ss-flex-2 ss-col-center" @click="jumpChooseTime">
  23. <view>选择可以接单的时间</view>
  24. <view class="ss-flex-1"></view>
  25. <view>去设置</view>
  26. <text class="textIcon icon-gengduo icon-navigation" style="margin-left:10rpx;"></text>
  27. </view>
  28. <!-- 服务半径 -->
  29. <view class="sex-box">
  30. <view style="font-size: 26rpx;color: #3D444D;font-weight: 550;">服务用户距离半径(公里/km)</view>
  31. <slider style="margin-top: 50rpx;" block-size="24" @change="sliderChange" step="1" min="3" max="50" show-value :value="sliderInfo"/>
  32. </view>
  33. <!-- 服务半径 -->
  34. <view class="time-box ss-flex-2 ss-col-center">
  35. <view>技师固定接单地址</view>
  36. <view class="ss-flex-1"></view>
  37. <view>去设置</view>
  38. <text class="textIcon icon-gengduo icon-navigation" style="margin-left:10rpx;"></text>
  39. </view>
  40. <!-- 中部 -->
  41. <view class="list-wrap">
  42. <scroll-view scroll-y="true" class="list">
  43. <view class="list-scroll-view">
  44. </view>
  45. </scroll-view>
  46. </view>
  47. </view>
  48. </s-layout>
  49. </template>
  50. <script setup>
  51. import {
  52. reactive,
  53. ref
  54. } from 'vue';
  55. import {
  56. computed
  57. } from 'vue';
  58. import {
  59. onLoad,
  60. onPageScroll,
  61. onPullDownRefresh,
  62. onReady,
  63. onReachBottom,
  64. onShow,
  65. } from '@dcloudio/uni-app';
  66. import sheep from '@/sheep';
  67. import $share from '@/sheep/platform/share';
  68. // 隐藏原生tabBar
  69. // uni.hideTabBar();
  70. //跳转到时间选择
  71. const jumpChooseTime=async()=>{
  72. uni.navigateTo({
  73. url:'/pages/Technician/other/chooseTime/chooseTime'
  74. })
  75. }
  76. //选择服务半径
  77. const sliderInfo=ref(3)
  78. const sliderChange=async(e)=>{
  79. console.log(e,'服务半径')
  80. sliderInfo.value=e.detail.value
  81. }
  82. const sexData = ref([{
  83. text: '不限',
  84. value: 1
  85. },
  86. {
  87. text: '男士',
  88. value: 2
  89. },
  90. {
  91. text: '女士',
  92. value: 3
  93. }
  94. ])
  95. const onClickIndex=ref(1)
  96. const onClick=async(item)=>{
  97. onClickIndex.value=item.value
  98. }
  99. // 返回首页
  100. const backPage = async () => {
  101. uni.reLaunch({
  102. url: '/pages/Technician/other/orderSetting/orderSetting',
  103. });
  104. };
  105. const bottomHeight = ref('0rpx');
  106. // #ifdef APP-PlUS
  107. //获取顶部安全距离
  108. const app = uni.getSystemInfoSync();
  109. const bottomHeightOne = app.statusBarHeight + 'rpx';
  110. bottomHeight.value = bottomHeightOne
  111. // #endif
  112. </script>
  113. <style scoped lang="scss">
  114. .time-box{
  115. width: 95%;
  116. min-height: 50rpx;
  117. margin-top: 20rpx;
  118. margin-left: 2.5%;
  119. font-weight: 550;
  120. box-sizing: border-box;
  121. border-radius: 10rpx;
  122. padding: 20rpx 40rpx;
  123. background-color: #fff;
  124. }
  125. .sex-item-box {
  126. padding: 10rpx 50rpx;
  127. box-sizing: border-box;
  128. border-radius: 20rpx;
  129. font-size: 24rpx;
  130. font-weight: 550;
  131. border: 1rpx solid #D6D8DA;
  132. margin-right: 40rpx;
  133. }
  134. .sex-box {
  135. width: 95%;
  136. min-height: 100rpx;
  137. margin-top: 20rpx;
  138. margin-left: 2.5%;
  139. box-sizing: border-box;
  140. border-radius: 10rpx;
  141. padding: 20rpx 40rpx;
  142. background-color: #fff;
  143. }
  144. .icon-navigation {
  145. font-size: 32rpx;
  146. color: #3D444E;
  147. font-weight: 700;
  148. }
  149. // 上中下布局样式
  150. .body {
  151. display: flex;
  152. flex-direction: column;
  153. background-color: #EEEEF0;
  154. height: calc(100vh - 50px);
  155. box-sizing: border-box;
  156. }
  157. .head {
  158. text-align: center;
  159. }
  160. // 中部滚动
  161. .list-wrap {
  162. flex-grow: 1;
  163. position: relative;
  164. width: 95%;
  165. margin-left: 2.5%;
  166. box-sizing: border-box;
  167. }
  168. .list {
  169. position: absolute;
  170. top: 0;
  171. left: 0;
  172. right: 0;
  173. bottom: 50rpx;
  174. padding: 10rpx;
  175. border-radius: 15rpx;
  176. box-sizing: border-box;
  177. }
  178. .list-scroll-view {
  179. width: 100%;
  180. margin-bottom: 20rpx;
  181. box-sizing: border-box;
  182. }
  183. .course-card {
  184. width: 47vw;
  185. margin-top: 10px;
  186. margin-bottom: 10px;
  187. }
  188. // 底部
  189. .tools {
  190. display: flex;
  191. flex-direction: row;
  192. justify-content: space-between;
  193. }
  194. .tools-item {
  195. width: 45px;
  196. text-align: center;
  197. font-size: 14px;
  198. padding: 20px;
  199. }
  200. </style>