orderDetail.vue 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430
  1. <template>
  2. <view class="order-detail-page">
  3. <!-- 顶部导航栏 -->
  4. <view class="custom-navbar">
  5. <view class="navbar-left">
  6. <text class="fa fa-angle-left" @click="goBack"></text>
  7. </view>
  8. <view
  9. class="navbar-right scale-tap"
  10. @click="goPages('/pages/crowdFunding/customerService')"
  11. >
  12. <image
  13. src="@/static/crowdFunding/customer-service-btn.png"
  14. style="width: 60rpx; height: 60rpx"
  15. mode="widthFix"
  16. ></image>
  17. </view>
  18. </view>
  19. <!-- 状态栏 -->
  20. <view class="status-bar">
  21. <!-- <image v-if="statusIcon" :src="statusIcon" class="status-icon"/> -->
  22. <image :src="'../../static/crowdFunding/fail.png'" class="status-icon" />
  23. <text class="status-title">{{ statusTitle }}</text>
  24. </view>
  25. <!-- 收货信息 -->
  26. <view
  27. class="address-card scale-tap"
  28. @click="goPages('/pages/crowdFunding/receivingAddress')"
  29. >
  30. <view class="row">
  31. <text class="name">{{ address.name }}</text>
  32. <text class="mobile">{{ address.mobile }}</text>
  33. <text class="default" v-if="address.isDefault">默认</text>
  34. </view>
  35. <view class="address">{{ address.fullAddress }}</view>
  36. </view>
  37. <!-- 商品卡片 -->
  38. <view class="product-card">
  39. <view class="product-top">
  40. <image class="product-img" :src="product.img" />
  41. <view class="product-info">
  42. <view class="product-title"
  43. ><text>{{ product.title }} </text>
  44. <image
  45. class="arrow"
  46. mode="widthFix"
  47. src="@/static/crowdFunding/right.png"
  48. /></view>
  49. <view class="product-desc">
  50. {{ product.desc }}
  51. </view>
  52. </view></view
  53. >
  54. <view class="product-bom">
  55. <view class="product-spec"
  56. >回报档:¥{{ product.price }}{{ product.spec }}
  57. <text class="count">x{{ product.count }}</text></view
  58. >
  59. <view class="product-time">
  60. 预计发货时间:{{ product.deliveryTime }}
  61. </view>
  62. <view class="product-tip">{{ product.tip }}</view>
  63. </view>
  64. <!-- 费用明细 -->
  65. <view class="fee-row">
  66. <text>运费</text>
  67. <text>包邮</text>
  68. </view>
  69. <view class="fee-row total">
  70. <text>实付金额</text>
  71. <text class="total-price">¥{{ product.total }}</text>
  72. </view>
  73. </view>
  74. <!-- 订单信息 -->
  75. <view class="order-info-card">
  76. <view class="info-row">
  77. <text>订单编号</text>
  78. <view><text>{{ order.orderNo }}</text>
  79. <text class="copy-btn" @click="copy(order.orderNo)">复制</text></view>
  80. </view>
  81. <view class="info-row">
  82. <text>下单时间</text>
  83. <text>{{ order.createTime }}</text>
  84. </view>
  85. <view class="info-row">
  86. <text>付款时间</text>
  87. <text>{{ order.payTime }}</text>
  88. </view>
  89. </view>
  90. <!-- 底部操作栏 -->
  91. <view class="order-bottom">
  92. <template v-if="statusType === 'waitPay'">
  93. <view class="btn scale-tap btn-cancel" @click="cancelOrder">取消订单</view>
  94. <view class="btn scale-tap btn-pay" @click="payOrder">立即支付</view>
  95. </template>
  96. <template v-else-if="statusType === 'waitSend'">
  97. <view class="btn scale-tap btn-refund" @click="refundOrder">申请退款</view>
  98. </template>
  99. <template v-else-if="statusType === 'finish'">
  100. <view class="btn scale-tap btn-delete" @click="deleteOrder">删除订单</view>
  101. <view class="btn scale-tap btn-comment" @click="commentOrder">去评价</view>
  102. </template>
  103. <template v-else-if="statusType === 'waitComment'">
  104. <view class="btn scale-tap btn-delete" @click="deleteOrder">删除订单</view>
  105. <view class="btn scale-tap btn-comment" @click="commentOrder">去评价</view>
  106. </template>
  107. <template v-else>
  108. <view class="btn scale-tap btn-delete" @click="deleteOrder">删除订单</view>
  109. </template>
  110. </view>
  111. </view>
  112. </template>
  113. <script>
  114. export default {
  115. data() {
  116. return {
  117. statusType: "waitPay", // waitPay, waitSend, finish, waitComment, fail
  118. statusTitle: "支付失败", // 根据statusType动态切换
  119. statusIcon: "loading", // 可根据状态切换icon loading fail success
  120. address: {
  121. name: "戴驿宸",
  122. mobile: "17788196551",
  123. isDefault: true,
  124. fullAddress: "浙江省杭州市滨江区西兴街道启悦府1202212121212211212",
  125. },
  126. product: {
  127. img: "/static/crowdFunding/top-img.png",
  128. title: "【Woh】灯塔 塔罗牌 治愈风泛伟特系卡牌设计",
  129. desc: "",
  130. spec: "灯塔MINI版",
  131. price: 398,
  132. count: 1,
  133. deliveryTime: "2025年8月份",
  134. tip: "温馨提示:该链接仅购买线下实物卡片!不含线上卡牌壁纸",
  135. total: 398,
  136. },
  137. order: {
  138. orderNo: "12201544521215415415",
  139. createTime: "2025-05-27 09:35:30",
  140. payTime: "2025-05-27 09:35:30",
  141. },
  142. };
  143. },
  144. methods: {
  145. goBack() {
  146. uni.navigateBack();
  147. },
  148. goPages(url) {
  149. uni.navigateTo({ url });
  150. },
  151. copy(val) {
  152. uni.setClipboardData({ data: val });
  153. },
  154. cancelOrder() {},
  155. payOrder() {},
  156. refundOrder() {},
  157. deleteOrder() {},
  158. commentOrder() {},
  159. },
  160. mounted() {
  161. // 可根据实际订单状态设置statusType/statusTitle/statusIcon
  162. // 例如:this.statusType = 'waitPay'; this.statusTitle = '待支付';
  163. },
  164. };
  165. </script>
  166. <style lang="scss">
  167. .order-detail-page {
  168. min-height: 100vh;
  169. background: #f2f6f2;
  170. .custom-navbar {
  171. display: flex;
  172. flex-direction: row;
  173. align-items: center;
  174. justify-content: space-between;
  175. height: 90rpx;
  176. padding: 0 40rpx;
  177. padding-right: 30rpx;
  178. padding-top: var(--status-bar-height);
  179. background-color: transparent;
  180. position: sticky;
  181. top: 0;
  182. height: calc(90rpx + var(--status-bar-height));
  183. z-index: 100;
  184. .navbar-left {
  185. height: 80rpx;
  186. display: flex;
  187. align-items: center;
  188. justify-content: center;
  189. .fa-angle-left {
  190. font-size: 48rpx;
  191. color: #333;
  192. }
  193. }
  194. .navbar-right {
  195. width: 60rpx;
  196. height: 60rpx;
  197. display: flex;
  198. justify-content: center;
  199. align-items: center;
  200. }
  201. }
  202. .status-bar {
  203. display: flex;
  204. align-items: center;
  205. padding: 32rpx 32rpx 0 32rpx;
  206. .status-icon {
  207. width: 40rpx;
  208. height: 40rpx;
  209. margin-right: 12rpx;
  210. }
  211. .status-title {
  212. font-size: 36rpx;
  213. font-weight: bold;
  214. color: #1F1F1F;
  215. }
  216. }
  217. .address-card {
  218. background: #fff;
  219. border-radius: 16rpx;
  220. margin: 24rpx 16rpx 0 16rpx;
  221. padding: 24rpx;
  222. background: url("../../static/crowdFunding/order-detail-card-bg.png")
  223. no-repeat top right / auto 100%,
  224. #fff;
  225. .row {
  226. display: flex;
  227. align-items: center;
  228. margin-bottom: 8rpx;
  229. .name {
  230. font-size: 30rpx;
  231. font-weight: bold;
  232. margin-right: 18rpx;
  233. }
  234. .mobile {
  235. font-size: 30rpx;
  236. margin-right: 18rpx;
  237. }
  238. .default {
  239. font-size: 22rpx;
  240. color: #acf934;
  241. background: #1f1f1f;
  242. border-radius: 8rpx;
  243. padding: 2rpx 12rpx;
  244. margin-right: 12rpx;
  245. }
  246. }
  247. .address {
  248. font-size: 26rpx;
  249. color: #666;
  250. }
  251. }
  252. .product-card {
  253. background: #fff;
  254. border-radius: 16rpx;
  255. margin: 24rpx 16rpx 0 16rpx;
  256. padding: 24rpx;
  257. .product-top {
  258. display: flex;
  259. align-items: center;
  260. .product-img {
  261. width: 120rpx;
  262. height: 120rpx;
  263. border-radius: 12rpx;
  264. margin-right: 18rpx;
  265. }
  266. .product-info {
  267. flex: 1;
  268. .product-title {
  269. font-size: 28rpx;
  270. font-weight: bold;
  271. color: #1f1f1f;
  272. display: flex;
  273. align-items: center;
  274. .arrow {
  275. width: 60rpx;
  276. height: 60rpx;
  277. margin-left: 140rpx;
  278. }
  279. }
  280. .product-desc {
  281. font-size: 24rpx;
  282. color: #1F1F1F;
  283. margin: 8rpx 0;
  284. }
  285. }
  286. }
  287. .product-bom {
  288. padding-top: 15rpx;
  289. .product-spec {
  290. font-size: 26rpx;
  291. color: #1F1F1F;
  292. margin: 8rpx 0;
  293. display: flex;
  294. align-items: center;
  295. justify-content: space-between;
  296. .count {
  297. color: #888;
  298. font-size: 22rpx;
  299. margin-top: 16rpx;
  300. margin-top: 8rpx;
  301. }
  302. }
  303. .product-time {
  304. font-size: 24rpx;
  305. color: #b2b2b2;
  306. margin-bottom: 8rpx;
  307. }
  308. .product-tip {
  309. font-size: 26rpx;
  310. color: #b2b2b2;
  311. background: #f6faf6;
  312. border-radius: 8rpx;
  313. padding: 8rpx 12rpx;
  314. }
  315. }
  316. .arrow {
  317. width: 32rpx;
  318. height: 32rpx;
  319. margin-left: 8rpx;
  320. }
  321. }
  322. .fee-row {
  323. display: flex;
  324. justify-content: space-between;
  325. align-items: center;
  326. padding: 0;
  327. height: 64rpx;
  328. font-size: 28rpx;
  329. color: #1F1F1F;
  330. text:first-child {
  331. color: #999;
  332. }
  333. &.total {
  334. font-weight: bold;
  335. color: #1f1f1f;
  336. justify-content: flex-end;
  337. text:first-child {
  338. color: #1f1f1f;
  339. }
  340. .total-price {
  341. color: #ff5500;
  342. font-size: 32rpx;
  343. }
  344. }
  345. }
  346. .order-info-card {
  347. background: #fff;
  348. border-radius: 16rpx;
  349. margin: 24rpx 16rpx 0 16rpx;
  350. padding: 24rpx;
  351. .info-row {
  352. display: flex;
  353. align-items: center;
  354. justify-content: space-between;
  355. height: 56rpx;
  356. font-size: 26rpx;
  357. >text:first-child {
  358. color: #999;
  359. }
  360. .copy-btn {
  361. color: #1f1f1f;
  362. background: #f6faf6;
  363. border-radius: 8rpx;
  364. font-size: 24rpx;
  365. margin-left: 18rpx;
  366. padding: 2rpx 16rpx;
  367. }
  368. }
  369. }
  370. .order-bottom {
  371. position: fixed;
  372. left: 0;
  373. right: 0;
  374. bottom: 0;
  375. background: #fff;
  376. display: flex;
  377. align-items: center;
  378. justify-content: flex-end;
  379. padding: 0 32rpx;
  380. height: 110rpx;
  381. box-shadow: 0 -2rpx 8rpx rgba(0, 0, 0, 0.04);
  382. z-index: 10;
  383. .btn {
  384. min-width: 180rpx;
  385. height: 72rpx;
  386. line-height: 72rpx;
  387. border-radius: 44rpx;
  388. text-align: center;
  389. font-size: 30rpx;
  390. padding: 0 32rpx;
  391. margin-left: 24rpx;
  392. &.btn-pay {
  393. background: #1f1f1f;
  394. color: #acf934;
  395. }
  396. &.btn-cancel {
  397. background: #fff;
  398. color: #1f1f1f;
  399. border: 2rpx solid #e5e5e5;
  400. }
  401. &.btn-refund {
  402. background: #1f1f1f;
  403. color: #acf934;
  404. }
  405. &.btn-delete {
  406. background: #fff;
  407. color: #1f1f1f;
  408. border: 2rpx solid #e5e5e5;
  409. }
  410. &.btn-comment {
  411. background: #1f1f1f;
  412. color: #acf934;
  413. }
  414. }
  415. }
  416. }
  417. </style>