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.

390 lines
7.3 KiB

8 months ago
8 months ago
8 months ago
8 months ago
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="configList.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. let queryParams = {
  114. id: this.$route.query.id
  115. }
  116. if(this.$store.state.selectArea.id){
  117. queryParams.county = this.$store.state.selectArea.id
  118. }
  119. this.$api('getProjectDetail', queryParams, res => {
  120. if (res.code == 200) {
  121. this.projectDetail = res.result.details;
  122. this.technicianList = res.result.tenPageList;
  123. }
  124. })
  125. },
  126. //返回
  127. back() {
  128. if (this.$route.query.r == '1') {
  129. uni.switchTab({
  130. url: '/pages/index/index'
  131. })
  132. } else {
  133. uni.navigateBack(-1)
  134. }
  135. },
  136. //跳转选择技师页面
  137. selectTechnician() {
  138. uni.navigateTo({
  139. url: `/pages/technician/selectTechnician?serviceId=${this.projectDetail.id}`
  140. })
  141. sessionStorage.setItem('technicianList',JSON.stringify(this.technicianList))
  142. },
  143. //获取配置
  144. getConfig() {
  145. this.$api('getConfig', {} ,res => {
  146. if(res.code == 200){
  147. res.result.forEach(item => {
  148. if(item.keyValue == 'orderInstructions'){
  149. this.orderInstructions = item.content;
  150. }
  151. })
  152. }
  153. })
  154. },
  155. //返回首页
  156. leftClick() {
  157. uni.switchTab({
  158. url: '/pages/index/index'
  159. })
  160. },
  161. }
  162. }
  163. </script>
  164. <style lang="scss" scoped>
  165. .jies{
  166. padding: 20px;
  167. background-color: #fff;
  168. }
  169. .sub-sctibes-server {
  170. background: #F5F5F5;
  171. width: 750rpx;
  172. margin: 0 auto;
  173. padding-bottom: 80rpx;
  174. .box-s {
  175. box-sizing: border-box;
  176. }
  177. .mar-10 {
  178. margin: 20rpx 0rpx;
  179. }
  180. .bg-w {
  181. background: white;
  182. }
  183. .image-box {
  184. // height: 500rpx;
  185. width: 750rpx;
  186. .icon {
  187. position: absolute;
  188. z-index: 1000;
  189. left: 10rpx;
  190. top: 10rpx;
  191. width: 60rpx;
  192. height: 60rpx;
  193. }
  194. .projectImage {
  195. width: 100%;
  196. }
  197. }
  198. .door {
  199. padding: 20rpx;
  200. .call {
  201. display: flex;
  202. align-items: center;
  203. background: #F8F8F8;
  204. border-radius: 10rpx;
  205. height: 60rpx;
  206. padding: 0rpx 10rpx;
  207. image {
  208. width: 25rpx;
  209. height: 25rpx;
  210. }
  211. .rush-door {
  212. font-size: 32rpx;
  213. color: black;
  214. font-family: 'PangMenZhengDao';
  215. font-weight: 600;
  216. margin-left: 5rpx;
  217. .rush {
  218. color: #49B369;
  219. }
  220. }
  221. .desc {
  222. font-size: 26rpx;
  223. color: #666666;
  224. margin-left: 20rpx;
  225. }
  226. }
  227. .server-list {
  228. margin-top: 20rpx;
  229. .server-item {
  230. display: flex;
  231. flex-direction: column;
  232. justify-content: space-around;
  233. background: #E4FEF1;
  234. width: 300rpx;
  235. height: 120rpx;
  236. border-radius: 15rpx;
  237. padding: 10rpx 20rpx;
  238. border: 1px solid #49B369;
  239. .server-name {
  240. font-size: 24rpx;
  241. }
  242. .price-and-time {
  243. display: flex;
  244. align-items: flex-end;
  245. height: 40rpx;
  246. .price {
  247. color: #FFB300;
  248. font-size: 32rpx;
  249. font-weight: 600;
  250. .unit {
  251. font-size: 24rpx;
  252. }
  253. .time {
  254. font-size: 20rpx;
  255. color: #9CADA5;
  256. }
  257. }
  258. }
  259. }
  260. }
  261. }
  262. .guarantee-and-coupon {
  263. .item {
  264. height: 80rpx;
  265. padding: 0rpx 20rpx;
  266. display: flex;
  267. align-items: center;
  268. .title {
  269. font-size: 28rpx;
  270. }
  271. .guarantee,
  272. .coupon-list {
  273. display: flex;
  274. font-size: 24rpx;
  275. color: #333333;
  276. .guarantee-item {
  277. margin-left: 20rpx;
  278. image {
  279. width: 25rpx;
  280. height: 25rpx;
  281. vertical-align: middle;
  282. }
  283. }
  284. .coupon-item {
  285. background: #F29E45;
  286. margin-left: 20rpx;
  287. color: white;
  288. padding: 5rpx 18rpx;
  289. border-radius: 3.5rpx;
  290. }
  291. }
  292. }
  293. }
  294. .project-detail-img{
  295. width: 100%;
  296. }
  297. /* md表格 */
  298. .md-doc {
  299. // height: 750rpx;
  300. background: #fff;
  301. .pack-up {
  302. text-align: center;
  303. font-size: 26rpx;
  304. position: absolute;
  305. bottom: 0;
  306. width: 100%;
  307. }
  308. }
  309. .select-button {
  310. position: fixed;
  311. display: flex;
  312. align-items: center;
  313. bottom: 0;
  314. left: 0;
  315. height: 100rpx;
  316. width: 750rpx;
  317. margin: 0 auto;
  318. box-shadow: -2px -2px 10px rgba(0, 0, 0, .1);
  319. .btn {
  320. display: flex;
  321. align-items: center;
  322. justify-content: center;
  323. width: 90%;
  324. height: 80rpx;
  325. margin: 0 auto;
  326. background: #49B369;
  327. border-radius: 42.5rpx;
  328. color: white;
  329. font-size: 28rpx;
  330. }
  331. }
  332. }
  333. @media all and (min-width: 961px) {
  334. .select-button {
  335. left: 50% !important;
  336. transform: translateX(-50%);
  337. }
  338. }
  339. </style>