order-details.vue 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305
  1. <template>
  2. <view>
  3. <view class="location">
  4. <view class="contacts">
  5. <view class="name">
  6. 刘亦菲
  7. </view>
  8. <view class="phone">
  9. 86-18112512562
  10. </view>
  11. </view>
  12. <view class="address">
  13. 广东省广州市花都区合成村2街5号
  14. </view>
  15. </view>
  16. <view class="order">
  17. <view class="order-head">
  18. <view class="factory-name">{{order.factory}}</view>
  19. <view v-if="order.status === 0" class="order-status">待付款</view>
  20. <view v-if="order.status === 2" class="order-status">待收货</view>
  21. </view>
  22. <view class="order-info">
  23. <view class="product-item" v-for="product in order.products">
  24. <view class="product-image">
  25. <image class="image" :src="product.image" mode="scaleToFill"></image>
  26. </view>
  27. <view class="product-info">
  28. <view class="row">
  29. <view class="name">{{product.name}}</view>
  30. <view class="price">¥{{product.price}}</view>
  31. </view>
  32. <view class="row">
  33. <view class="spec">{{product.specs_name}}</view>
  34. <view class="num">×{{product.specs_num}}</view>
  35. </view>
  36. </view>
  37. </view>
  38. </view>
  39. <view class="total-price">
  40. 总价 <text class="warning">¥{{order.total}}</text>
  41. </view>
  42. </view>
  43. <view class="info">
  44. <view class="title">订单信息</view>
  45. <view class="row">
  46. <view class="label">订单编号</view>
  47. <view>264545121255151212</view>
  48. </view>
  49. <view class="row">
  50. <view class="label">支付宝交易号</view>
  51. <view>456451512316545113215645</view>
  52. </view>
  53. <view class="row">
  54. <view class="label">创建时间</view>
  55. <view>2021-03-14 01:25:01</view>
  56. </view>
  57. <view class="row">
  58. <view class="label">付款时间</view>
  59. <view>2021-03-14 01:25:01</view>
  60. </view>
  61. <view class="row">
  62. <view class="label">发货时间</view>
  63. <view>2021-03-15 01:05:01</view>
  64. </view>
  65. <view v-if="false" class="option">
  66. <view class="option-item">
  67. <uni-icons class="icon" color="#666666" type="chatboxes-filled"></uni-icons>
  68. 联系卖家
  69. </view>
  70. <view class="option-item">
  71. <uni-icons class="icon" color="#666666" type="phone-filled"></uni-icons>
  72. 拨打电话
  73. </view>
  74. </view>
  75. </view>
  76. <view class="footer">
  77. <view class="option">
  78. <button v-if="order.status === 0" class="pay-btn" type="default">立即支付</button>
  79. <button v-if="order.status === 2" class="confirm-btn" type="default">确认收货</button>
  80. </view>
  81. </view>
  82. </view>
  83. </template>
  84. <script>
  85. export default {
  86. data() {
  87. return {
  88. order: {
  89. factory: '省心二号工厂',
  90. products: [{
  91. name: '【三只松鼠】元宵送礼坚果礼盒1498g',
  92. image: 'https://img.alicdn.com/i4/880734502/O1CN01tA7hal1j7xjnwHQZC_!!880734502.jpg',
  93. price: 9.52,
  94. specs_name: "白色",
  95. specs_num: 5
  96. },
  97. {
  98. name: '泰国Mistine小黄帽防晒霜',
  99. image: 'https://img.alicdn.com/i4/2929053804/O1CN01RSromv1dyHBcuS4I6_!!2929053804.jpg',
  100. price: 9.52,
  101. specs_name: "白色",
  102. specs_num: 5
  103. }
  104. ],
  105. status: 0,
  106. total: '58.51'
  107. }
  108. }
  109. },
  110. methods: {
  111. }
  112. }
  113. </script>
  114. <style lang="scss" scoped>
  115. .location {
  116. padding: 40upx 20upx;
  117. background: white url(../../static/images/location.png) no-repeat;
  118. // background-color: white;
  119. background-size: 75upx 75upx;
  120. background-position: 30upx;
  121. .contacts {
  122. display: flex;
  123. align-items: center;
  124. margin-left: 100upx;
  125. .name {
  126. margin-right: 20upx;
  127. font-size: 28upx;
  128. }
  129. .phone {
  130. font-size: 24upx;
  131. color: #999999;
  132. }
  133. }
  134. .address {
  135. margin-left: 100upx;
  136. font-size: 28upx;
  137. margin-top: 10upx;
  138. }
  139. }
  140. .order {
  141. background: white;
  142. margin-top: 20upx;
  143. padding: 20upx;
  144. // border-radius: 20upx;
  145. .order-head {
  146. display: flex;
  147. justify-content: space-between;
  148. margin-bottom: 20upx;
  149. .order-status {
  150. color: $primary-color;
  151. font-size: 24upx;
  152. }
  153. }
  154. .factory-name {
  155. font-size: 28upx;
  156. font-weight: bold;
  157. }
  158. .product-item {
  159. display: flex;
  160. .product-image {
  161. width: 120upx;
  162. height: 120upx;
  163. margin-right: 20upx;
  164. margin-top: 10upx;
  165. .image {
  166. width: 120upx;
  167. height: 120upx;
  168. }
  169. }
  170. .product-info {
  171. flex-grow: 1;
  172. font-size: 28upx;
  173. .name {
  174. font-size: 28upx;
  175. white-space: normal;
  176. display: -webkit-box;
  177. -webkit-box-orient: vertical;
  178. -webkit-line-clamp: 2;
  179. overflow: hidden;
  180. }
  181. .num {
  182. color: #999999;
  183. }
  184. .spec {
  185. font-size: 26upx;
  186. background: #CCCCCC;
  187. color: white;
  188. padding: 0 10upx;
  189. border-radius: 10upx;
  190. }
  191. }
  192. .row {
  193. display: flex;
  194. justify-content: space-between;
  195. margin-bottom: 10upx;
  196. }
  197. }
  198. .total-price {
  199. text-align: right;
  200. font-size: 28upx;
  201. padding: 10upx 0;
  202. .warning {
  203. color: $primary-color;
  204. font-weight: bold;
  205. }
  206. }
  207. }
  208. .info {
  209. background: white;
  210. margin-top: 20upx;
  211. padding: 20upx;
  212. .title {
  213. font-size: 30upx;
  214. margin-bottom: 20upx;
  215. font-weight: bold;
  216. }
  217. .row {
  218. display: flex;
  219. font-size: 26upx;
  220. margin: 10upx 0;
  221. & .label {
  222. width: 200upx;
  223. }
  224. }
  225. .option{
  226. display: flex;
  227. justify-content: space-around;
  228. text-align: center;
  229. padding: 20upx 0 0 0;
  230. border-top: 2upx solid #EEEEEE;
  231. color: #666666;
  232. margin-top: 40upx;
  233. .icon{
  234. margin-right: 10upx;
  235. }
  236. .option-item{
  237. flex: 1;
  238. }
  239. .option-item:first-child{
  240. border-right: 2upx solid #EEEEEE;
  241. }
  242. }
  243. }
  244. .footer {
  245. height: 80upx;
  246. background: white;
  247. position: fixed;
  248. bottom: 0;
  249. width: 100%;
  250. box-shadow: 0 0 10upx #EEEEEE;
  251. .option {
  252. text-align: right;
  253. margin: 15upx;
  254. .pay-btn,
  255. .confirm-btn {
  256. background: white;
  257. border: 2upx solid $primary-color;
  258. display: inline-block;
  259. line-height: normal;
  260. font-size: 28upx;
  261. color: $primary-color;
  262. border-radius: 40upx;
  263. padding: 5upx 10upx;
  264. }
  265. }
  266. }
  267. </style>