order.vue 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289
  1. <template>
  2. <view class="container">
  3. <view class="header-box">
  4. <view class="search-box">
  5. <u-search
  6. v-model="searchForm.keyword"
  7. :clearabled="true"
  8. bg-color="#E5E5E5"
  9. :input-style="searchInputStyle"
  10. placeholder="搜索您想要的内容"
  11. ></u-search>
  12. </view>
  13. <view class="tab-box">
  14. <u-tabs
  15. name="label"
  16. :list="searchType"
  17. :is-scroll="true"
  18. v-model="searchForm.type"
  19. @change="onSearchTypeChange"
  20. font-size="24"
  21. :bold="false"
  22. inactive-color="#000000"
  23. active-color="#000000"
  24. :bar-style="{'background-color': '#2979ff'}"
  25. :gutter="26"
  26. height="45"
  27. ></u-tabs>
  28. </view>
  29. </view>
  30. <view class="list-box">
  31. <view class="list-item-box" v-for="item in list" :key="item.id">
  32. <view class="title-box">
  33. {{item.title}}
  34. </view>
  35. <view class="main-box">
  36. <view class="info-box">
  37. <view class="info-item-box">
  38. <view class="label">
  39. 订单编号:
  40. </view>
  41. <view class="text">
  42. {{item.number}}
  43. </view>
  44. </view>
  45. <view class="info-item-box">
  46. <view class="label">
  47. 订单时间:
  48. </view>
  49. <view class="text">
  50. {{item.time}}
  51. </view>
  52. </view>
  53. </view>
  54. <view class="price-box">
  55. <view class="text" v-if="item.status === 1">
  56. 实付款:&nbsp;¥{{item.price}}元
  57. </view>
  58. <view class="button" v-if="item.status === 0">
  59. 已关闭
  60. </view>
  61. </view>
  62. </view>
  63. </view>
  64. </view>
  65. </view>
  66. </template>
  67. <script setup>
  68. import { ref } from 'vue'
  69. import { onLoad } from '@dcloudio/uni-app'
  70. const searchInputStyle = {
  71. backgroundColor: '#E5E5E5'
  72. }
  73. const searchType = [
  74. {
  75. label: '全部',
  76. value: 0
  77. },
  78. {
  79. label: '市场研究',
  80. value: 1
  81. },
  82. {
  83. label: '继续教育',
  84. value: 2
  85. },
  86. {
  87. label: '会费',
  88. value: 3
  89. },
  90. {
  91. label: '业务水平认证考试',
  92. value: 4
  93. },
  94. ]
  95. const searchForm = ref({
  96. keyword: '',
  97. type: 0
  98. })
  99. function onSearchTypeChange(val) {
  100. console.log('搜索表单', searchForm.value)
  101. }
  102. const list = ref([
  103. {
  104. id: '01',
  105. title: '【市场研究】2024年11月广州市中介促成二手住宅市场交易简报',
  106. number: '123456789987654321',
  107. time: '2023年8月8日',
  108. price: '9.9',
  109. status: 1
  110. },
  111. {
  112. id: '02',
  113. title: '【市场研究】2024年11月广州市中介促成二手住宅市场交易简报',
  114. number: '123456789987654321',
  115. time: '2023年8月8日',
  116. price: '9.9',
  117. status: 0
  118. },
  119. {
  120. id: '03',
  121. title: '【市场研究】2024年11月广州市中介促成二手住宅市场交易简报',
  122. number: '123456789987654321',
  123. time: '2023年8月8日',
  124. price: '9.9',
  125. status: 1
  126. },
  127. {
  128. id: '04',
  129. title: '【市场研究】2024年11月广州市中介促成二手住宅市场交易简报',
  130. number: '123456789987654321',
  131. time: '2023年8月8日',
  132. price: '9.9',
  133. status: 1
  134. },
  135. {
  136. id: '05',
  137. title: '【市场研究】2024年11月广州市中介促成二手住宅市场交易简报',
  138. number: '123456789987654321',
  139. time: '2023年8月8日',
  140. price: '9.9',
  141. status: 1
  142. },
  143. {
  144. id: '06',
  145. title: '【市场研究】2024年11月广州市中介促成二手住宅市场交易简报',
  146. number: '123456789987654321',
  147. time: '2023年8月8日',
  148. price: '9.9',
  149. status: 1
  150. },
  151. {
  152. id: '07',
  153. title: '【市场研究】2024年11月广州市中介促成二手住宅市场交易简报',
  154. number: '123456789987654321',
  155. time: '2023年8月8日',
  156. price: '9.9',
  157. status: 1
  158. },
  159. {
  160. id: '08',
  161. title: '【市场研究】2024年11月广州市中介促成二手住宅市场交易简报',
  162. number: '123456789987654321',
  163. time: '2023年8月8日',
  164. price: '9.9',
  165. status: 1
  166. },
  167. {
  168. id: '09',
  169. title: '【市场研究】2024年11月广州市中介促成二手住宅市场交易简报',
  170. number: '123456789987654321',
  171. time: '2023年8月8日',
  172. price: '9.9',
  173. status: 1
  174. },
  175. {
  176. id: '10',
  177. title: '【市场研究】2024年11月广州市中介促成二手住宅市场交易简报',
  178. number: '123456789987654321',
  179. time: '2023年8月8日',
  180. price: '9.9',
  181. status: 1
  182. },
  183. {
  184. id: '11',
  185. title: '【市场研究】2024年11月广州市中介促成二手住宅市场交易简报',
  186. number: '123456789987654321',
  187. time: '2023年8月8日',
  188. price: '9.9',
  189. status: 1
  190. },
  191. {
  192. id: '12',
  193. title: '【市场研究】2024年11月广州市中介促成二手住宅市场交易简报',
  194. number: '123456789987654321',
  195. time: '2023年8月8日',
  196. price: '9.9',
  197. status: 1
  198. },
  199. ])
  200. onLoad(() => {
  201. console.log('onLoad')
  202. })
  203. </script>
  204. <style lang="scss" scoped>
  205. .container {
  206. height: 100vh;
  207. width: 100vw;
  208. background-color: $uni-text-color-inverse;
  209. padding: 0 20rpx;
  210. .header-box {
  211. background-color: $uni-text-color-inverse;
  212. @include topMagnet();
  213. }
  214. .search-box {
  215. margin-bottom: 20rpx;
  216. ::v-deep(.u-search) {
  217. background-color: #e5e5e5;
  218. border-radius: 50rpx;
  219. .u-action {
  220. width: 18%;
  221. background-color: $uni-color-primary;
  222. border-radius: 50rpx;
  223. color: $uni-text-color-inverse;
  224. margin-right: 8rpx;
  225. font-size: 28rpx;
  226. line-height: 50rpx;
  227. letter-spacing: 3rpx;
  228. text-align: center;
  229. }
  230. }
  231. }
  232. .list-box {
  233. .list-item-box {
  234. padding: 20rpx;
  235. border-bottom: 5rpx solid #E6E6E6;
  236. &:active {
  237. background-color: $uni-bg-color-hover;
  238. }
  239. .title-box {
  240. font-size: $uni-title-font-size-3;
  241. font-weight: bold;
  242. margin-bottom: 20rpx;
  243. @include text-overflow()
  244. }
  245. .main-box {
  246. display: flex;
  247. justify-content: space-between;
  248. padding-left: 20rpx;
  249. .info-box {
  250. width: 50%;
  251. .info-item-box {
  252. display: flex;
  253. font-size: $uni-font-size-3;
  254. color: $uni-text-color-grey;
  255. line-height: 30rpx;
  256. .label {
  257. width: 80rpx;
  258. }
  259. }
  260. }
  261. .price-box {
  262. display: flex;
  263. align-items: flex-end;
  264. text-align: right;
  265. color: $uni-color-error;
  266. font-size: $uni-title-font-size-3;
  267. font-weight: bold;
  268. .button {
  269. background-color: #CCCCCC;
  270. color: $uni-text-color-inverse;
  271. padding: 6rpx 25rpx;
  272. border-radius: $uni-card-border-radius;
  273. }
  274. }
  275. }
  276. }
  277. }
  278. }
  279. </style>