You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

383 lines
7.1 KiB

8 months ago
8 months ago
8 months ago
  1. <template>
  2. <view class="sub-sctibes-server">
  3. <mNavbar title="服务详情" :leftClick="leftClick"></mNavbar>
  4. <view class="image-box b-relative">
  5. <!-- <image @click="back" src="@/static/technician/back.png" mode="aspectFill" class="icon"></image> -->
  6. <image :src="projectDetail.image" mode="aspectFill" class="projectImage"></image>
  7. </view>
  8. <view class="door box-s bg-w">
  9. <view class="call box-s">
  10. <image src="@/static/technician/lightning-icon.png" mode="aspectFill"></image>
  11. <view class="rush-door">
  12. <text class="rush">急速</text>上门
  13. </view>
  14. <view class="desc">
  15. 随叫随到 最快30分钟上门
  16. </view>
  17. </view>
  18. <view class="server-list">
  19. <view class="server-item box-s">
  20. <view class="server-name">{{ projectDetail.title }}</view>
  21. <view class="select-box"></view>
  22. <view class="price-and-time">
  23. <view class="price">
  24. <text class="unit"></text>
  25. <text>{{ projectDetail.price }}</text>
  26. <text class="time">
  27. /{{ projectDetail.times }}分钟
  28. </text>
  29. </view>
  30. </view>
  31. </view>
  32. </view>
  33. </view>
  34. <view class="guarantee-and-coupon mar-10 bg-w box-s">
  35. <view class="item">
  36. <view class="title">保障</view>
  37. <view class="guarantee">
  38. <view class="guarantee-item">
  39. <image src="@/static/icons/icon7.png"></image>
  40. 安全可靠
  41. </view>
  42. <view class="guarantee-item">
  43. <image src="@/static/icons/icon7.png"></image>
  44. 无额外收费
  45. </view>
  46. </view>
  47. </view>
  48. <!-- <view class="item">
  49. <view class="title">
  50. 领券
  51. </view>
  52. <view class="coupon-list">
  53. <view class="coupon-item">
  54. {{ projectDetail.subTitle }}
  55. </view>
  56. <view class="coupon-item">
  57. 满299减20
  58. </view>
  59. </view>
  60. </view> -->
  61. </view>
  62. <van-tabs v-model:active="active">
  63. <van-tab title="项目介绍">
  64. <img class="project-detail-img" width="100%" :src="projectDetail.projectSub" alt="项目介绍图片" />
  65. </van-tab>
  66. <van-tab title="下单说明">
  67. <view v-html="orderInstructions" class="jies"></view>
  68. </van-tab>
  69. </van-tabs>
  70. <view class="md-doc mar-10 b-relative">
  71. <view class="pack-up">
  72. <!-- 收起
  73. <van-icon name="arrow-up" /> -->
  74. </view>
  75. </view>
  76. <view class="select-button bg-white">
  77. <view @click="selectTechnician" class="btn">
  78. 下单选择技师
  79. </view>
  80. </view>
  81. </view>
  82. </template>
  83. <script>
  84. import mNavbar from '@/components/base/m-navbar.vue'
  85. export default {
  86. components: {
  87. mNavbar
  88. },
  89. data() {
  90. return {
  91. active: 0,
  92. projectDetail: {},
  93. reviewList : [],
  94. orderInstructions : '', //下单说明
  95. technicianList : [] ,
  96. queryParams : {
  97. projectId : this.$route.query.id,
  98. pageNo : 1,
  99. pageSize : 10,
  100. fraction : 0
  101. },
  102. loading : false,
  103. finished : false
  104. }
  105. },
  106. onShow() {
  107. this.getProjectDetail()
  108. this.getConfig()
  109. },
  110. methods: {
  111. //获取项目详情
  112. getProjectDetail() {
  113. this.$api('getProjectDetail', {
  114. id: this.$route.query.id
  115. }, res => {
  116. if (res.code == 200) {
  117. this.projectDetail = res.result.details;
  118. this.technicianList = res.result.tenPageList;
  119. }
  120. })
  121. },
  122. //返回
  123. back() {
  124. if (this.$route.query.r == '1') {
  125. uni.switchTab({
  126. url: '/pages/index/index'
  127. })
  128. } else {
  129. uni.navigateBack(-1)
  130. }
  131. },
  132. //跳转选择技师页面
  133. selectTechnician() {
  134. uni.navigateTo({
  135. url: `/pages/technician/selectTechnician?serviceId=${this.projectDetail.id}`
  136. })
  137. sessionStorage.setItem('technicianList',JSON.stringify(this.technicianList))
  138. },
  139. //获取配置
  140. getConfig() {
  141. this.$api('getConfig', {} ,res => {
  142. if(res.code == 200){
  143. res.result.forEach(item => {
  144. if(item.keyValue == 'orderInstructions'){
  145. this.orderInstructions = item.content;
  146. }
  147. })
  148. }
  149. })
  150. },
  151. //返回首页
  152. leftClick() {
  153. uni.switchTab({
  154. url: '/pages/index/index'
  155. })
  156. },
  157. }
  158. }
  159. </script>
  160. <style lang="scss" scoped>
  161. .jies{
  162. padding: 20px;
  163. background-color: #fff;
  164. }
  165. .sub-sctibes-server {
  166. background: #F5F5F5;
  167. width: 750rpx;
  168. margin: 0 auto;
  169. padding-bottom: 80rpx;
  170. .box-s {
  171. box-sizing: border-box;
  172. }
  173. .mar-10 {
  174. margin: 20rpx 0rpx;
  175. }
  176. .bg-w {
  177. background: white;
  178. }
  179. .image-box {
  180. // height: 500rpx;
  181. width: 750rpx;
  182. .icon {
  183. position: absolute;
  184. z-index: 1000;
  185. left: 10rpx;
  186. top: 10rpx;
  187. width: 60rpx;
  188. height: 60rpx;
  189. }
  190. .projectImage {
  191. width: 100%;
  192. }
  193. }
  194. .door {
  195. padding: 20rpx;
  196. .call {
  197. display: flex;
  198. align-items: center;
  199. background: #F8F8F8;
  200. border-radius: 10rpx;
  201. height: 60rpx;
  202. padding: 0rpx 10rpx;
  203. image {
  204. width: 25rpx;
  205. height: 25rpx;
  206. }
  207. .rush-door {
  208. font-size: 32rpx;
  209. color: black;
  210. font-family: 'PangMenZhengDao';
  211. font-weight: 600;
  212. margin-left: 5rpx;
  213. .rush {
  214. color: #49B369;
  215. }
  216. }
  217. .desc {
  218. font-size: 26rpx;
  219. color: #666666;
  220. margin-left: 20rpx;
  221. }
  222. }
  223. .server-list {
  224. margin-top: 20rpx;
  225. .server-item {
  226. display: flex;
  227. flex-direction: column;
  228. justify-content: space-around;
  229. background: #E4FEF1;
  230. width: 300rpx;
  231. height: 120rpx;
  232. border-radius: 15rpx;
  233. padding: 10rpx 20rpx;
  234. border: 1px solid #49B369;
  235. .server-name {
  236. font-size: 24rpx;
  237. }
  238. .price-and-time {
  239. display: flex;
  240. align-items: flex-end;
  241. height: 40rpx;
  242. .price {
  243. color: #FFB300;
  244. font-size: 32rpx;
  245. font-weight: 600;
  246. .unit {
  247. font-size: 24rpx;
  248. }
  249. .time {
  250. font-size: 20rpx;
  251. color: #9CADA5;
  252. }
  253. }
  254. }
  255. }
  256. }
  257. }
  258. .guarantee-and-coupon {
  259. .item {
  260. height: 80rpx;
  261. padding: 0rpx 20rpx;
  262. display: flex;
  263. align-items: center;
  264. .title {
  265. font-size: 28rpx;
  266. }
  267. .guarantee,
  268. .coupon-list {
  269. display: flex;
  270. font-size: 24rpx;
  271. color: #333333;
  272. .guarantee-item {
  273. margin-left: 20rpx;
  274. image {
  275. width: 25rpx;
  276. height: 25rpx;
  277. vertical-align: middle;
  278. }
  279. }
  280. .coupon-item {
  281. background: #F29E45;
  282. margin-left: 20rpx;
  283. color: white;
  284. padding: 5rpx 18rpx;
  285. border-radius: 3.5rpx;
  286. }
  287. }
  288. }
  289. }
  290. .project-detail-img{
  291. width: 100%;
  292. }
  293. /* md表格 */
  294. .md-doc {
  295. // height: 750rpx;
  296. background: #fff;
  297. .pack-up {
  298. text-align: center;
  299. font-size: 26rpx;
  300. position: absolute;
  301. bottom: 0;
  302. width: 100%;
  303. }
  304. }
  305. .select-button {
  306. position: fixed;
  307. display: flex;
  308. align-items: center;
  309. bottom: 0;
  310. left: 0;
  311. height: 100rpx;
  312. width: 750rpx;
  313. margin: 0 auto;
  314. box-shadow: -2px -2px 10px rgba(0, 0, 0, .1);
  315. .btn {
  316. display: flex;
  317. align-items: center;
  318. justify-content: center;
  319. width: 90%;
  320. height: 80rpx;
  321. margin: 0 auto;
  322. background: #49B369;
  323. border-radius: 42.5rpx;
  324. color: white;
  325. font-size: 28rpx;
  326. }
  327. }
  328. }
  329. @media all and (min-width: 961px) {
  330. .select-button {
  331. left: 50% !important;
  332. transform: translateX(-50%);
  333. }
  334. }
  335. </style>