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

633 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. <kefu></kefu>
  170. <customerServicePopup ref="customerServicePopup" />
  171. </view>
  172. </template>
  173. <script>
  174. import customerServicePopup from '@/components/config/customerServicePopup.vue'
  175. import {
  176. mapState
  177. } from 'vuex'
  178. export default {
  179. components: {
  180. customerServicePopup
  181. },
  182. computed: {},
  183. data() {
  184. return {
  185. stepsCurrent: 0,
  186. steps: [
  187. '接单',
  188. '检查',
  189. '开始清洗',
  190. '服务完成',
  191. ],
  192. order: {},
  193. id: 0,
  194. }
  195. },
  196. onLoad(args) {
  197. this.id = args.id
  198. },
  199. onShow() {
  200. this.getOrderDetail()
  201. },
  202. onPullDownRefresh() {
  203. this.getOrderDetail()
  204. },
  205. methods: {
  206. getOrderDetail() {
  207. this.$api('getOrderDetail', {
  208. id: this.id
  209. }, res => {
  210. uni.stopPullDownRefresh()
  211. if (res.code == 200) {
  212. this.order = res.result
  213. }
  214. })
  215. },
  216. //复制内容
  217. copy(content) {
  218. uni.setClipboardData({
  219. data: content,
  220. success: () => {
  221. uni.showToast({
  222. title: '复制成功',
  223. icon: 'none'
  224. })
  225. }
  226. })
  227. },
  228. }
  229. }
  230. </script>
  231. <style scoped lang="scss">
  232. .order {
  233. background: linear-gradient(#4899a6, #6fc6ad, #6fc6ad);
  234. padding-bottom: 10px;
  235. }
  236. .controls {
  237. margin: 20rpx;
  238. background-color: #fff;
  239. height: 400rpx;
  240. display: flex;
  241. flex-direction: column;
  242. width: 710rpx;
  243. border-radius: 20rpx;
  244. justify-content: center;
  245. align-items: center;
  246. .title {
  247. display: flex;
  248. justify-content: center;
  249. align-items: center;
  250. font-size: 40rpx;
  251. image {
  252. width: 100rpx;
  253. height: 100rpx;
  254. margin-right: 20rpx;
  255. }
  256. }
  257. .tips {
  258. font-size: 26rpx;
  259. color: #FD5100;
  260. margin-top: 10rpx;
  261. }
  262. .btns {
  263. margin-top: 50rpx;
  264. display: flex;
  265. view {
  266. margin: 0 20rpx;
  267. display: flex;
  268. justify-content: center;
  269. align-items: center;
  270. color: #fff;
  271. background-color: $uni-color;
  272. padding: 15rpx 40rpx;
  273. border-radius: 40rpx;
  274. }
  275. .btn2 {
  276. background-color: #FFFFFF;
  277. border: 1px solid #A7A7A7;
  278. color: #A7A7A7;
  279. }
  280. }
  281. }
  282. .steps {
  283. margin: 20rpx;
  284. background-color: #fff;
  285. display: flex;
  286. flex-direction: column;
  287. width: 710rpx;
  288. border-radius: 20rpx;
  289. padding: 70rpx 0;
  290. /deep/ .uv-text__value {
  291. font-size: 22rpx !important;
  292. }
  293. }
  294. .box {
  295. padding: 20px;
  296. .btns {
  297. display: flex;
  298. justify-content: center;
  299. align-items: center;
  300. margin-top: 10px;
  301. .btn {
  302. color: #fff;
  303. padding: 10rpx 50rpx;
  304. background-color: #ffb300;
  305. border-radius: 30rpx;
  306. font-size: 25rpx;
  307. margin-right: 10rpx;
  308. }
  309. .btc {
  310. background: #ccc;
  311. }
  312. }
  313. }
  314. .info {
  315. margin: 10px;
  316. padding: 20rpx;
  317. background-color: #fff;
  318. width: calc(100% - 40px);
  319. border-radius: 10px;
  320. .head-title {
  321. font-family: PingFang SC, PingFang SC-Bold;
  322. color: #2f2e2e;
  323. line-height: 30rpx;
  324. margin-left: 10rpx;
  325. }
  326. .server-item {
  327. display: flex;
  328. flex-wrap: wrap;
  329. align-items: center;
  330. justify-content: space-between;
  331. background: white;
  332. border-radius: 15rpx;
  333. box-sizing: border-box;
  334. margin: 20rpx 0rpx;
  335. width: 100%;
  336. .img-box {
  337. width: 180rpx;
  338. height: 180rpx;
  339. border-radius: 10rpx;
  340. overflow: hidden;
  341. box-sizing: border-box;
  342. image {
  343. width: 100%;
  344. height: 100%;
  345. border-radius: 10rpx;
  346. }
  347. }
  348. .server-info {
  349. display: flex;
  350. flex-direction: column;
  351. justify-content: space-around;
  352. width: calc(100% - 180rpx);
  353. box-sizing: border-box;
  354. padding: 20rpx 15rpx;
  355. .server-title {
  356. display: flex;
  357. font-weight: bold;
  358. }
  359. .texture,
  360. .num {
  361. font-size: 24rpx;
  362. color: #717171;
  363. }
  364. .total-price {
  365. display: flex;
  366. justify-content: space-between;
  367. .price {
  368. color: #F85023;
  369. }
  370. }
  371. .coupon {
  372. display: flex;
  373. justify-content: center;
  374. align-items: center;
  375. background: #F29E45;
  376. color: white;
  377. width: 120rpx;
  378. height: 40rpx;
  379. border-radius: 10rpx;
  380. margin-left: 10rpx;
  381. font-size: 22rpx;
  382. }
  383. .time-coupon,
  384. .price {
  385. display: flex;
  386. flex-wrap: wrap;
  387. align-items: center;
  388. }
  389. .time-coupon {
  390. margin: 10rpx 0rpx;
  391. font-size: 26rpx;
  392. justify-content: space-between;
  393. width: 100%;
  394. .flex {
  395. justify-content: center;
  396. align-items: center;
  397. }
  398. image {
  399. width: 25rpx;
  400. height: 25rpx;
  401. }
  402. .time {
  403. color: #B8B8B8;
  404. margin-left: 6rpx;
  405. }
  406. }
  407. .sales-volume {
  408. display: flex;
  409. align-items: center;
  410. color: #B8B8B8;
  411. font-size: 24rpx;
  412. image {
  413. width: 25rpx;
  414. height: 25rpx;
  415. }
  416. }
  417. }
  418. }
  419. .address {
  420. .address-top {
  421. display: flex;
  422. justify-content: space-between;
  423. align-items: center;
  424. image {
  425. width: 30rpx;
  426. height: 30rpx;
  427. }
  428. }
  429. .addressDetail {
  430. color: #777;
  431. font-size: 22rpx;
  432. padding: 5px 0;
  433. .address-line {
  434. display: flex;
  435. flex-wrap: wrap;
  436. align-items: center;
  437. .main {
  438. width: 88%;
  439. box-sizing: border-box;
  440. padding-right: 20rpx;
  441. overflow: hidden; // 超出的文本隐藏
  442. text-overflow: ellipsis; // 溢出用省略号显示
  443. display: -webkit-box; // 将对象作为弹性伸缩盒子模型显示。
  444. -webkit-line-clamp: 2; // 这个属性不是css的规范属性,需要组合上面两个属性,表示显示的行数。
  445. -webkit-box-orient: vertical; // 从上到下垂直排列子元素(设置伸缩盒子的子元素排列方式)
  446. }
  447. .copy {
  448. width: 12%;
  449. background: #FEBC3A;
  450. color: white;
  451. font-size: 20rpx;
  452. border-radius: 20rpx;
  453. display: flex;
  454. align-items: center;
  455. justify-content: center;
  456. height: 40rpx;
  457. }
  458. }
  459. }
  460. text {
  461. background-color: #F29E45;
  462. padding: 8rpx 10rpx;
  463. color: #fff;
  464. font-size: 20rpx;
  465. margin-left: 10px;
  466. border-radius: 5px;
  467. }
  468. }
  469. .min_tips {
  470. font-size: 22rpx;
  471. color: #777;
  472. display: flex;
  473. justify-content: space-between;
  474. padding: 5px 0;
  475. align-items: center;
  476. }
  477. .current-price {
  478. font-size: 30rpx;
  479. color: #FD5100;
  480. }
  481. .line {
  482. border-top: 2px dotted #00000011;
  483. padding: 20rpx 0;
  484. .t {
  485. padding: 5px 0;
  486. color: #000;
  487. font-size: 26rpx;
  488. }
  489. }
  490. .head-div {
  491. .nickname {
  492. font-size: 30rpx;
  493. font-weight: 600;
  494. text-align: left;
  495. line-height: 42rpx;
  496. display: flex;
  497. align-items: center;
  498. .tag {
  499. position: relative;
  500. display: flex;
  501. align-items: center;
  502. image {
  503. height: 45rpx;
  504. width: 90rpx;
  505. vertical-align: middle;
  506. }
  507. .auth {
  508. position: absolute;
  509. white-space: nowrap;
  510. color: #FF6200;
  511. left: 23rpx;
  512. font-size: 17rpx;
  513. }
  514. }
  515. }
  516. .days {
  517. font-size: 20rpx;
  518. font-weight: 400;
  519. text-align: left;
  520. line-height: 56rpx;
  521. display: flex;
  522. align-items: center;
  523. view {
  524. padding-left: 5px;
  525. }
  526. }
  527. }
  528. .btn-x {
  529. color: #6fc6ad;
  530. border: 1px solid #6fc6ad;
  531. padding: 10rpx 20rpx;
  532. border-radius: 30rpx;
  533. }
  534. .btns {
  535. display: flex;
  536. justify-content: center;
  537. margin-top: 100rpx;
  538. .btn {
  539. color: #A9A7A7;
  540. border: 1px solid #A9A7A7;
  541. padding: 10rpx 20rpx;
  542. border-radius: 30rpx;
  543. background-color: transparent;
  544. font-size: 24rpx;
  545. margin: 0;
  546. &::after{
  547. border: 0;
  548. }
  549. }
  550. }
  551. }
  552. </style>