珠宝小程序前端代码
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.

631 lines
12 KiB

5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
4 months ago
5 months ago
4 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
4 months ago
5 months ago
5 months ago
  1. <template>
  2. <view>
  3. <navbar title="订单详情" leftClick @leftClick="$utils.navigateBack" />
  4. <!-- <view class="">
  5. <view class="controls">
  6. <view class="title">
  7. <image src="../static/order/icon.png" mode=""></image>
  8. 服务完成
  9. </view>
  10. <view class="tips">
  11. 待送回
  12. </view>
  13. <view class="btns">
  14. <view class="btn1">
  15. 快递寄回
  16. </view>
  17. <view class="btn2">
  18. 线下配送
  19. </view>
  20. </view>
  21. </view>
  22. <view class="steps">
  23. <uv-steps
  24. activeColor="#FD5100"
  25. :current="stepsCurrent" dot>
  26. <uv-steps-item :title="item"
  27. :key="index"
  28. v-for="(item, index) in steps"></uv-steps-item>
  29. </uv-steps>
  30. </view>
  31. </view> -->
  32. <view class="info">
  33. <view class="flex" style="display: flex;">
  34. <view style="width: 8rpx;height: 30rpx;
  35. background: #E3441A;border-radius: 6rpx;" />
  36. <view class="head-title">订单详情</view>
  37. </view>
  38. <view class="flex">
  39. <view class="server-item" :key="index" v-for="(good, index) in order.commonOrderSkuList">
  40. <view class="img-box">
  41. <image :src="good.image && good.image.split(',')[0]" mode="aspectFill"></image>
  42. </view>
  43. <view class="server-info">
  44. <view class="server-title">
  45. {{good.title}}
  46. <!-- <view class="coupon">领券立减</view> -->
  47. </view>
  48. <!-- <view class="current-price">
  49. <text class="unit"></text>{{good.price}}
  50. </view>
  51. <view class="sales-volume" style="margin-top: 5px;">
  52. <view class="desc">规格{{good.sku}}</view>
  53. </view> -->
  54. <view class="texture">
  55. 产品材质{{ good.subText }}
  56. </view>
  57. <view class="num">
  58. 产品数量{{good.num}}
  59. </view>
  60. <view class="total-price">
  61. <div class="total-title">总价格</div>
  62. <view class="price">
  63. <text class="unit"></text>
  64. {{ good.price }}
  65. </view>
  66. </view>
  67. <!-- <view class="time-coupon">
  68. <view class="flex">
  69. <image src="@/static/home/time-icon.png"></image>
  70. <view class="time">{{order.useTime}}分钟</view>
  71. </view>
  72. <view class="sales-volume">
  73. <image src="@/static/icons/icon1.png"></image>
  74. <view class="desc">已售出{{msgShop.payNum}}+</view>
  75. </view>
  76. </view> -->
  77. </view>
  78. </view>
  79. </view>
  80. <!-- <view class="line min_tips">
  81. <view class="head-div flex">
  82. <view style="width: 118rpx;height: 118rpx;border-radius: 50%;overflow: hidden;">
  83. <image style="width: 118rpx;" :src="msgTechnician.image" mode="widthFix"></image>
  84. </view>
  85. <view style="padding: 10rpx 34rpx;display: flex;flex-direction: column;justify-content: space-around;">
  86. <view class="nickname">
  87. {{msgTechnician.title}}
  88. <view v-if="msgTechnician.isVip" class="tag">
  89. <image src="@/static/order/s.png" mode="aspectFit"></image>
  90. <view class="auth">官方认证</view>
  91. </view>
  92. </view>
  93. <view class="days">
  94. <van-rate v-model="msgTechnician.score" :size="10" readonly color="#ffb54c" void-icon="star"
  95. void-color="#eee" />
  96. <view class="">
  97. 好评{{msgTechnician.pinNum}}
  98. </view>
  99. </view>
  100. </view>
  101. </view>
  102. <view @click="gototechnicianDetail(msgTechnician)" class="btn-x">
  103. 服务技师
  104. </view>
  105. </view> -->
  106. <view class="line address">
  107. <view class="addressDetail">
  108. <view class="address-line">
  109. <view class="main">{{order.name}} {{order.phone}}</view>
  110. <view @click="copy(order.name + ' ' + order.phone)" class="copy">复制</view>
  111. </view>
  112. <view class="address-line">
  113. <view class="main">{{order.address}} {{order.addressDetails}}</view>
  114. <view @click="copy(order.address + ' ' + order.addressDetails)" class="copy">复制</view>
  115. </view>
  116. </view>
  117. </view>
  118. <!-- <view class="line">
  119. <view class="t min_tips">
  120. <view class="">
  121. 实付款
  122. </view>
  123. <view class="current-price">
  124. {{ order.price }}
  125. </view>
  126. </view>
  127. </view> -->
  128. <!-- 订单信息 -->
  129. <view class="line">
  130. <view class="t min_tips">
  131. <view class="">
  132. 订单信息
  133. </view>
  134. </view>
  135. <view class="min_tips">
  136. <view class="">
  137. 订单编号
  138. </view>
  139. <view class="">
  140. {{order.id}}
  141. </view>
  142. </view>
  143. <view class="min_tips">
  144. <view class="">
  145. 下单时间
  146. </view>
  147. <view class="">
  148. {{order.createTime}}
  149. </view>
  150. </view>
  151. </view>
  152. <!-- 下单须知 -->
  153. <view class="line">
  154. <view class="t min_tips">
  155. <view class="">
  156. 下单须知
  157. </view>
  158. </view>
  159. <view class="min_tips" style="line-height: 40rpx;">
  160. {{ order.orderDetails }}
  161. </view>
  162. <view class="btns">
  163. <button open-type="contact" class="btn">
  164. 联系客服
  165. </button>
  166. </view>
  167. </view>
  168. </view>
  169. <customerServicePopup ref="customerServicePopup" />
  170. </view>
  171. </template>
  172. <script>
  173. import customerServicePopup from '@/components/config/customerServicePopup.vue'
  174. import {
  175. mapState
  176. } from 'vuex'
  177. export default {
  178. components: {
  179. customerServicePopup
  180. },
  181. computed: {},
  182. data() {
  183. return {
  184. stepsCurrent: 0,
  185. steps: [
  186. '接单',
  187. '检查',
  188. '开始清洗',
  189. '服务完成',
  190. ],
  191. order: {},
  192. id: 0,
  193. }
  194. },
  195. onLoad(args) {
  196. this.id = args.id
  197. },
  198. onShow() {
  199. this.getOrderDetail()
  200. },
  201. onPullDownRefresh() {
  202. this.getOrderDetail()
  203. },
  204. methods: {
  205. getOrderDetail() {
  206. this.$api('getOrderDetail', {
  207. id: this.id
  208. }, res => {
  209. uni.stopPullDownRefresh()
  210. if (res.code == 200) {
  211. this.order = res.result
  212. }
  213. })
  214. },
  215. //复制内容
  216. copy(content) {
  217. uni.setClipboardData({
  218. data: content,
  219. success: () => {
  220. uni.showToast({
  221. title: '复制成功',
  222. icon: 'none'
  223. })
  224. }
  225. })
  226. },
  227. }
  228. }
  229. </script>
  230. <style scoped lang="scss">
  231. .order {
  232. background: linear-gradient(#4899a6, #6fc6ad, #6fc6ad);
  233. padding-bottom: 10px;
  234. }
  235. .controls {
  236. margin: 20rpx;
  237. background-color: #fff;
  238. height: 400rpx;
  239. display: flex;
  240. flex-direction: column;
  241. width: 710rpx;
  242. border-radius: 20rpx;
  243. justify-content: center;
  244. align-items: center;
  245. .title {
  246. display: flex;
  247. justify-content: center;
  248. align-items: center;
  249. font-size: 40rpx;
  250. image {
  251. width: 100rpx;
  252. height: 100rpx;
  253. margin-right: 20rpx;
  254. }
  255. }
  256. .tips {
  257. font-size: 26rpx;
  258. color: #FD5100;
  259. margin-top: 10rpx;
  260. }
  261. .btns {
  262. margin-top: 50rpx;
  263. display: flex;
  264. view {
  265. margin: 0 20rpx;
  266. display: flex;
  267. justify-content: center;
  268. align-items: center;
  269. color: #fff;
  270. background-color: $uni-color;
  271. padding: 15rpx 40rpx;
  272. border-radius: 40rpx;
  273. }
  274. .btn2 {
  275. background-color: #FFFFFF;
  276. border: 1px solid #A7A7A7;
  277. color: #A7A7A7;
  278. }
  279. }
  280. }
  281. .steps {
  282. margin: 20rpx;
  283. background-color: #fff;
  284. display: flex;
  285. flex-direction: column;
  286. width: 710rpx;
  287. border-radius: 20rpx;
  288. padding: 70rpx 0;
  289. /deep/ .uv-text__value {
  290. font-size: 22rpx !important;
  291. }
  292. }
  293. .box {
  294. padding: 20px;
  295. .btns {
  296. display: flex;
  297. justify-content: center;
  298. align-items: center;
  299. margin-top: 10px;
  300. .btn {
  301. color: #fff;
  302. padding: 10rpx 50rpx;
  303. background-color: #ffb300;
  304. border-radius: 30rpx;
  305. font-size: 25rpx;
  306. margin-right: 10rpx;
  307. }
  308. .btc {
  309. background: #ccc;
  310. }
  311. }
  312. }
  313. .info {
  314. margin: 10px;
  315. padding: 20rpx;
  316. background-color: #fff;
  317. width: calc(100% - 40px);
  318. border-radius: 10px;
  319. .head-title {
  320. font-family: PingFang SC, PingFang SC-Bold;
  321. color: #2f2e2e;
  322. line-height: 30rpx;
  323. margin-left: 10rpx;
  324. }
  325. .server-item {
  326. display: flex;
  327. flex-wrap: wrap;
  328. align-items: center;
  329. justify-content: space-between;
  330. background: white;
  331. border-radius: 15rpx;
  332. box-sizing: border-box;
  333. margin: 20rpx 0rpx;
  334. width: 100%;
  335. .img-box {
  336. width: 180rpx;
  337. height: 180rpx;
  338. border-radius: 10rpx;
  339. overflow: hidden;
  340. box-sizing: border-box;
  341. image {
  342. width: 100%;
  343. height: 100%;
  344. border-radius: 10rpx;
  345. }
  346. }
  347. .server-info {
  348. display: flex;
  349. flex-direction: column;
  350. justify-content: space-around;
  351. width: calc(100% - 180rpx);
  352. box-sizing: border-box;
  353. padding: 20rpx 15rpx;
  354. .server-title {
  355. display: flex;
  356. font-weight: bold;
  357. }
  358. .texture,
  359. .num {
  360. font-size: 24rpx;
  361. color: #717171;
  362. }
  363. .total-price {
  364. display: flex;
  365. justify-content: space-between;
  366. .price {
  367. color: #F85023;
  368. }
  369. }
  370. .coupon {
  371. display: flex;
  372. justify-content: center;
  373. align-items: center;
  374. background: #F29E45;
  375. color: white;
  376. width: 120rpx;
  377. height: 40rpx;
  378. border-radius: 10rpx;
  379. margin-left: 10rpx;
  380. font-size: 22rpx;
  381. }
  382. .time-coupon,
  383. .price {
  384. display: flex;
  385. flex-wrap: wrap;
  386. align-items: center;
  387. }
  388. .time-coupon {
  389. margin: 10rpx 0rpx;
  390. font-size: 26rpx;
  391. justify-content: space-between;
  392. width: 100%;
  393. .flex {
  394. justify-content: center;
  395. align-items: center;
  396. }
  397. image {
  398. width: 25rpx;
  399. height: 25rpx;
  400. }
  401. .time {
  402. color: #B8B8B8;
  403. margin-left: 6rpx;
  404. }
  405. }
  406. .sales-volume {
  407. display: flex;
  408. align-items: center;
  409. color: #B8B8B8;
  410. font-size: 24rpx;
  411. image {
  412. width: 25rpx;
  413. height: 25rpx;
  414. }
  415. }
  416. }
  417. }
  418. .address {
  419. .address-top {
  420. display: flex;
  421. justify-content: space-between;
  422. align-items: center;
  423. image {
  424. width: 30rpx;
  425. height: 30rpx;
  426. }
  427. }
  428. .addressDetail {
  429. color: #777;
  430. font-size: 22rpx;
  431. padding: 5px 0;
  432. .address-line {
  433. display: flex;
  434. flex-wrap: wrap;
  435. align-items: center;
  436. .main {
  437. width: 88%;
  438. box-sizing: border-box;
  439. padding-right: 20rpx;
  440. overflow: hidden; // 超出的文本隐藏
  441. text-overflow: ellipsis; // 溢出用省略号显示
  442. display: -webkit-box; // 将对象作为弹性伸缩盒子模型显示。
  443. -webkit-line-clamp: 2; // 这个属性不是css的规范属性,需要组合上面两个属性,表示显示的行数。
  444. -webkit-box-orient: vertical; // 从上到下垂直排列子元素(设置伸缩盒子的子元素排列方式)
  445. }
  446. .copy {
  447. width: 12%;
  448. background: #FEBC3A;
  449. color: white;
  450. font-size: 20rpx;
  451. border-radius: 20rpx;
  452. display: flex;
  453. align-items: center;
  454. justify-content: center;
  455. height: 40rpx;
  456. }
  457. }
  458. }
  459. text {
  460. background-color: #F29E45;
  461. padding: 8rpx 10rpx;
  462. color: #fff;
  463. font-size: 20rpx;
  464. margin-left: 10px;
  465. border-radius: 5px;
  466. }
  467. }
  468. .min_tips {
  469. font-size: 22rpx;
  470. color: #777;
  471. display: flex;
  472. justify-content: space-between;
  473. padding: 5px 0;
  474. align-items: center;
  475. }
  476. .current-price {
  477. font-size: 30rpx;
  478. color: #FD5100;
  479. }
  480. .line {
  481. border-top: 2px dotted #00000011;
  482. padding: 20rpx 0;
  483. .t {
  484. padding: 5px 0;
  485. color: #000;
  486. font-size: 26rpx;
  487. }
  488. }
  489. .head-div {
  490. .nickname {
  491. font-size: 30rpx;
  492. font-weight: 600;
  493. text-align: left;
  494. line-height: 42rpx;
  495. display: flex;
  496. align-items: center;
  497. .tag {
  498. position: relative;
  499. display: flex;
  500. align-items: center;
  501. image {
  502. height: 45rpx;
  503. width: 90rpx;
  504. vertical-align: middle;
  505. }
  506. .auth {
  507. position: absolute;
  508. white-space: nowrap;
  509. color: #FF6200;
  510. left: 23rpx;
  511. font-size: 17rpx;
  512. }
  513. }
  514. }
  515. .days {
  516. font-size: 20rpx;
  517. font-weight: 400;
  518. text-align: left;
  519. line-height: 56rpx;
  520. display: flex;
  521. align-items: center;
  522. view {
  523. padding-left: 5px;
  524. }
  525. }
  526. }
  527. .btn-x {
  528. color: #6fc6ad;
  529. border: 1px solid #6fc6ad;
  530. padding: 10rpx 20rpx;
  531. border-radius: 30rpx;
  532. }
  533. .btns {
  534. display: flex;
  535. justify-content: center;
  536. margin-top: 100rpx;
  537. .btn {
  538. color: #A9A7A7;
  539. border: 1px solid #A9A7A7;
  540. padding: 10rpx 20rpx;
  541. border-radius: 30rpx;
  542. background-color: transparent;
  543. font-size: 24rpx;
  544. margin: 0;
  545. &::after{
  546. border: 0;
  547. }
  548. }
  549. }
  550. }
  551. </style>