order.vue 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312
  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="25"
  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 class="button-box">
  66. <view class="button">
  67. 申请发票
  68. </view>
  69. </view>
  70. </view>
  71. </template>
  72. <script setup>
  73. import { ref } from 'vue'
  74. import { onLoad } from '@dcloudio/uni-app'
  75. const searchInputStyle = {
  76. backgroundColor: '#E5E5E5'
  77. }
  78. const searchType = [
  79. {
  80. label: '全部',
  81. value: 0
  82. },
  83. {
  84. label: '市场研究',
  85. value: 1
  86. },
  87. {
  88. label: '继续教育',
  89. value: 2
  90. },
  91. {
  92. label: '会费',
  93. value: 3
  94. },
  95. {
  96. label: '业务水平认证考试',
  97. value: 4
  98. },
  99. ]
  100. const searchForm = ref({
  101. keyword: '',
  102. type: 0
  103. })
  104. function onSearchTypeChange(val) {
  105. console.log('搜索表单', searchForm.value)
  106. }
  107. const list = ref([
  108. {
  109. id: '01',
  110. title: '【市场研究】2024年11月广州市中介促成二手住宅市场交易简报',
  111. number: '123456789987654321',
  112. time: '2023年8月8日',
  113. price: '9.9',
  114. status: 1
  115. },
  116. {
  117. id: '02',
  118. title: '【市场研究】2024年11月广州市中介促成二手住宅市场交易简报',
  119. number: '123456789987654321',
  120. time: '2023年8月8日',
  121. price: '9.9',
  122. status: 0
  123. },
  124. {
  125. id: '03',
  126. title: '【市场研究】2024年11月广州市中介促成二手住宅市场交易简报',
  127. number: '123456789987654321',
  128. time: '2023年8月8日',
  129. price: '9.9',
  130. status: 1
  131. },
  132. {
  133. id: '04',
  134. title: '【市场研究】2024年11月广州市中介促成二手住宅市场交易简报',
  135. number: '123456789987654321',
  136. time: '2023年8月8日',
  137. price: '9.9',
  138. status: 1
  139. },
  140. {
  141. id: '05',
  142. title: '【市场研究】2024年11月广州市中介促成二手住宅市场交易简报',
  143. number: '123456789987654321',
  144. time: '2023年8月8日',
  145. price: '9.9',
  146. status: 1
  147. },
  148. {
  149. id: '06',
  150. title: '【市场研究】2024年11月广州市中介促成二手住宅市场交易简报',
  151. number: '123456789987654321',
  152. time: '2023年8月8日',
  153. price: '9.9',
  154. status: 1
  155. },
  156. {
  157. id: '07',
  158. title: '【市场研究】2024年11月广州市中介促成二手住宅市场交易简报',
  159. number: '123456789987654321',
  160. time: '2023年8月8日',
  161. price: '9.9',
  162. status: 1
  163. },
  164. {
  165. id: '08',
  166. title: '【市场研究】2024年11月广州市中介促成二手住宅市场交易简报',
  167. number: '123456789987654321',
  168. time: '2023年8月8日',
  169. price: '9.9',
  170. status: 1
  171. },
  172. {
  173. id: '09',
  174. title: '【市场研究】2024年11月广州市中介促成二手住宅市场交易简报',
  175. number: '123456789987654321',
  176. time: '2023年8月8日',
  177. price: '9.9',
  178. status: 1
  179. },
  180. {
  181. id: '10',
  182. title: '【市场研究】2024年11月广州市中介促成二手住宅市场交易简报',
  183. number: '123456789987654321',
  184. time: '2023年8月8日',
  185. price: '9.9',
  186. status: 1
  187. },
  188. {
  189. id: '11',
  190. title: '【市场研究】2024年11月广州市中介促成二手住宅市场交易简报',
  191. number: '123456789987654321',
  192. time: '2023年8月8日',
  193. price: '9.9',
  194. status: 1
  195. },
  196. {
  197. id: '12',
  198. title: '【市场研究】2024年10月广州市中介促成二手住宅市场交易简报',
  199. number: '123456789987654321',
  200. time: '2023年8月1日',
  201. price: '9.9',
  202. status: 1
  203. },
  204. ])
  205. onLoad(() => {
  206. console.log('onLoad')
  207. })
  208. </script>
  209. <style lang="scss" scoped>
  210. .container {
  211. height: 100vh;
  212. width: 100vw;
  213. background-color: $uni-text-color-inverse;
  214. padding: 0 20rpx;
  215. .header-box {
  216. background-color: $uni-text-color-inverse;
  217. @include topMagnet();
  218. }
  219. .search-box {
  220. margin-bottom: 20rpx;
  221. ::v-deep(.u-search) {
  222. background-color: #e5e5e5;
  223. border-radius: 50rpx;
  224. .u-action {
  225. width: 18%;
  226. background-color: $uni-color-primary;
  227. border-radius: 50rpx;
  228. color: $uni-text-color-inverse;
  229. margin-right: 8rpx;
  230. font-size: 28rpx;
  231. line-height: 50rpx;
  232. letter-spacing: 3rpx;
  233. text-align: center;
  234. }
  235. }
  236. }
  237. .list-box {
  238. .list-item-box {
  239. padding: 20rpx;
  240. border-bottom: 5rpx solid #E6E6E6;
  241. &:active {
  242. background-color: $uni-bg-color-hover;
  243. }
  244. .title-box {
  245. font-size: $uni-title-font-size-3;
  246. font-weight: bold;
  247. margin-bottom: 20rpx;
  248. @include text-overflow()
  249. }
  250. .main-box {
  251. display: flex;
  252. justify-content: space-between;
  253. padding-left: 20rpx;
  254. .info-box {
  255. width: 50%;
  256. .info-item-box {
  257. display: flex;
  258. font-size: $uni-font-size-3;
  259. color: $uni-text-color-grey;
  260. line-height: 30rpx;
  261. .label {
  262. width: 80rpx;
  263. }
  264. }
  265. }
  266. .price-box {
  267. display: flex;
  268. align-items: flex-end;
  269. text-align: right;
  270. color: $uni-color-error;
  271. font-size: $uni-title-font-size-3;
  272. font-weight: bold;
  273. .button {
  274. background-color: #CCCCCC;
  275. color: $uni-text-color-inverse;
  276. padding: 6rpx 25rpx;
  277. border-radius: $uni-card-border-radius;
  278. }
  279. }
  280. }
  281. }
  282. }
  283. .button-box {
  284. text-align: center;
  285. font-size: $uni-font-size-1;
  286. background-color: $uni-bg-color-grey;
  287. @include bottomMagnet();
  288. .button {
  289. width: 100%;
  290. height: 80rpx;
  291. line-height: 80rpx;
  292. color: $uni-color-primary;
  293. letter-spacing: 2rpx;
  294. border: 1rpx solid #E9E9E9;
  295. &:active {
  296. background-color: $uni-bg-color-hover;
  297. }
  298. }
  299. }
  300. }
  301. </style>