searchOrder.vue 27 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045
  1. <template>
  2. <view class="search-container">
  3. <!-- 搜索框 -->
  4. <view class="search-header">
  5. <view class="cancel-btn" @click="goBack">
  6. <uni-icons type="left" size="22" color="#1F1F1F"></uni-icons>
  7. </view>
  8. <view class="search-box">
  9. <!-- <uni-icons type="search" size="16" color="#999"></uni-icons> -->
  10. <input type="text" v-model="searchKeyword" placeholder="请输入关键词" confirm-type="search" @confirm="onSearch"
  11. @input="handleInput" />
  12. <uni-icons v-if="searchKeyword" type="clear" size="16" color="#999" @click="clearKeyword"></uni-icons>
  13. <view class="searchImgBox" @click="onSearch">
  14. <image class="image" src="@/static/home/sy_icon_sousuo.png"></image>
  15. </view>
  16. </view>
  17. </view>
  18. <view class="reserveASeat" :style="{ height: reserveASeatHeight + 'px' }"></view>
  19. <!-- 搜索历史 -->
  20. <view class="search-history" v-if="searchStatus && historyList.length > 0">
  21. <view class="history-header">
  22. <text class="title">搜索历史</text>
  23. <image @click="clearHistory" style="width: 32rpx;height: 32rpx;" class="deleteAll"
  24. src="@/static/home/sy_icon_shanchu.png"></image>
  25. </view>
  26. <view class="history-list">
  27. <view class="history-item" v-for="(item, index) in displayedHistoryList" :key="index"
  28. @click="useHistoryKeyword(item)">
  29. <view>
  30. <uni-icons type="clock" size="14" color="#999"></uni-icons>
  31. <view class="history-text">
  32. <image src="@/static/home/sy_icon_lishijilu.png"></image> {{ item }}
  33. </view>
  34. </view>
  35. <image class="deleteBtn" @click.stop="deleteHistoryItem(item)" src="@/static/icon/close.png"></image>
  36. </view>
  37. <view class="expandBtn" @click="toggleHistory">
  38. <view v-if="!isExpanded">
  39. <template v-if="historyList.length > 5">
  40. 查看全部
  41. <image src="@/static/home/sy_icon_chakanquanbu.png"></image>
  42. </template>
  43. </view>
  44. <view v-else class="fold">
  45. 折叠历史记录
  46. <image src="@/static/home/sy_icon_chakanquanbu.png"></image>
  47. </view>
  48. </view>
  49. </view>
  50. </view>
  51. <!-- 搜索结果 -->
  52. <view class="search-result" v-if="!searchStatus">
  53. <!-- Tab导航 -->
  54. <view class="tabs-section" :style="{ height: tabsSectionHeight + 'px' }">
  55. <scroll-view
  56. scroll-x
  57. class="tabs-scroll-view"
  58. :show-scrollbar="false"
  59. :scroll-into-view="'tab-' + (currentTab - 1)"
  60. scroll-with-animation
  61. >
  62. <view class="tabs-wrapper">
  63. <view
  64. v-for="(tab, index) in tabs"
  65. :key="index"
  66. :id="'tab-' + index"
  67. :class="['tab-item', currentTab === index ? 'active' : '']"
  68. @click="switchTab(index)"
  69. >
  70. <view class="tab" :class="{ active: currentTab === index }">
  71. <text class="left">{{ tab.name }}</text>
  72. <view class="line"></view>
  73. </view>
  74. </view>
  75. </view>
  76. </scroll-view>
  77. </view>
  78. <!-- <view class="tabs-reserveaseat"></view> -->
  79. <block v-if="searchResult.length > 0">
  80. <swiper
  81. :current="currentTab"
  82. @change="onSwiperChange"
  83. class="order-swiper"
  84. :style="'height:' + swiperHeight + 'px'"
  85. >
  86. <swiper-item v-for="tab in tabs" :key="tab.type">
  87. <view class="order-list">
  88. <view
  89. class="order-card"
  90. v-for="order in getOrdersByTab(tab.type)"
  91. :key="order.id"
  92. >
  93. <view class="order-header">
  94. <text class="project-title one-omit">{{ order.projectTitle }}</text>
  95. <text class="tag-initiator" v-if="order.isInitiator">发起人</text>
  96. <text
  97. class="order-status"
  98. :class="'status-' + order.statusType"
  99. >{{ order.statusText }}</text
  100. >
  101. </view>
  102. <view class="order-main" @click="goToOrderDetail(order)">
  103. <image class="order-img" :src="order.img" />
  104. <view class="order-info">
  105. <view class="order-title">{{ order.title }}</view>
  106. <view class="order-spec">{{ order.spec }}</view>
  107. </view>
  108. <view class="order-price">
  109. <view>¥{{ order.price }}</view>
  110. <view class="order-count">x{{ order.count }}</view>
  111. </view>
  112. </view>
  113. <view class="order-actions">
  114. <!-- 1. 支付失败 -->
  115. <template v-if="order.statusType === 'payFail'">
  116. <view class="btn btn-delete" @click="deleteOrder(order)"
  117. >删除订单</view
  118. >
  119. </template>
  120. <!-- 2. 待支付 -->
  121. <template v-else-if="order.statusType === 'waitPay'">
  122. <view class="btn btn-pay" @click="pay(order)">立即支付</view>
  123. <view class="btn btn-cancel" @click="cancelOrder(order)"
  124. >取消订单</view
  125. >
  126. </template>
  127. <!-- 3. 已付款待发货 -->
  128. <template v-else-if="order.statusType === 'paid'">
  129. <view class="btn btn-cancel" @click="cancelOrder(order)"
  130. >取消订单</view
  131. >
  132. </template>
  133. <!-- 4. 商品已发货 -->
  134. <template v-else-if="order.statusType === 'waitReceive'">
  135. <view class="btn btn-confirm" @click="confirmReceive(order)"
  136. >确认收货</view
  137. >
  138. </template>
  139. <!-- 5. 交易完成 -->
  140. <template v-else-if="order.statusType === 'finish'">
  141. <!-- <view class="btn btn-comment" @click="commentOrder(order)">去评价</view> -->
  142. <view class="btn btn-delete" @click="deleteOrder(order)"
  143. >删除订单</view
  144. >
  145. </template>
  146. <!-- 6. 已退款 -->
  147. <template v-else-if="order.statusType === 'refund'">
  148. <view class="btn btn-delete" @click="deleteOrder(order)"
  149. >删除订单</view
  150. >
  151. </template>
  152. </view>
  153. </view>
  154. </view>
  155. </swiper-item>
  156. </swiper>
  157. </block>
  158. <view class="no-data" v-else-if="!isLoading">
  159. <text>暂无数据</text>
  160. </view>
  161. </view>
  162. <DialogBox ref="DialogBox"></DialogBox>
  163. </view>
  164. </template>
  165. <script>
  166. import CrowdFundingItem from './components/CrowdFundingItem/CrowdFundingItem.vue';
  167. const HISTORY_KEY = 'search_history';
  168. const MAX_HISTORY = 20;
  169. export default {
  170. components: { CrowdFundingItem },
  171. data() {
  172. return {
  173. searchKeyword: '', // 搜索关键词
  174. historyList: [], // 搜索历史
  175. searchResult: [],
  176. page: 1,
  177. pageSize: 20,
  178. hasMore: true,
  179. isLoading: false,
  180. isExpanded: false, // 添加展开/折叠状态变量
  181. searchStatus: true,//显示搜索历史 false显示搜索结果
  182. currentTab: 0,
  183. tabs: [
  184. { name: "全部", type: "all" },
  185. { name: "待支付", type: "waitPay" },
  186. // { name: "已付款", type: "paid" },
  187. { name: "待发货", type: "waitSend" },
  188. { name: "待收货", type: "waitReceive" },
  189. { name: "交易完成", type: "finish" },
  190. { name: "退款中", type: "refund" },
  191. { name: "已关闭", type: "payFail" },
  192. ],
  193. searchResult: [],
  194. swiperHeight: 600, // 默认高度,后续可动态调整
  195. reserveASeatHeight: 0, // 预留空间高度
  196. tabsSectionHeight: 0, // 标签栏高度
  197. }
  198. },
  199. onLoad() {
  200. // 加载历史记录
  201. this.loadHistory();
  202. },
  203. onPullDownRefresh() {
  204. this.onSearch(true);
  205. uni.stopPullDownRefresh();
  206. },
  207. onReachBottom() {
  208. this.onSearch(false);
  209. },
  210. computed: {
  211. // 添加计算属性以控制显示的历史记录数量
  212. displayedHistoryList() {
  213. return this.isExpanded ? this.historyList : this.historyList.slice(0, 5);
  214. }
  215. },
  216. methods: {
  217. // 加载历史记录
  218. loadHistory() {
  219. try {
  220. const history = uni.getStorageSync(HISTORY_KEY);
  221. this.historyList = history ? JSON.parse(history) : [];
  222. } catch (e) {
  223. console.error('Failed to load search history:', e);
  224. this.historyList = [];
  225. }
  226. },
  227. // 保存历史记录
  228. saveHistory() {
  229. try {
  230. // 将当前搜索词添加到历史记录开头
  231. if (this.searchKeyword && !this.historyList.includes(this.searchKeyword)) {
  232. console.log(this.historyList, 11111);
  233. this.historyList.unshift(this.searchKeyword);
  234. console.log(this.historyList, 11111);
  235. // 限制历史记录数量
  236. if (this.historyList.length > MAX_HISTORY) {
  237. this.historyList = this.historyList.slice(0, MAX_HISTORY);
  238. }
  239. uni.setStorageSync(HISTORY_KEY, JSON.stringify(this.historyList));
  240. }
  241. } catch (e) {
  242. console.error('Failed to save search history:', e);
  243. }
  244. },
  245. // 清空历史记录
  246. clearHistory() {
  247. this.$refs['DialogBox'].confirm({
  248. title: '提示',
  249. content: '确定要清空搜索历史吗?',
  250. DialogType: 'inquiry',
  251. btn1: '否',
  252. btn2: '是',
  253. animation: 0
  254. }).then((res) => {
  255. if (res.isConfirm) {
  256. this.historyList = [];
  257. uni.setStorageSync(HISTORY_KEY, '[]');
  258. }
  259. })
  260. },
  261. // 清空单个历史记录
  262. deleteHistoryItem(item) {
  263. console.log(item, '删除历史记录');
  264. this.$refs['DialogBox'].confirm({
  265. title: '提示',
  266. content: '确定要删除搜索历史吗?',
  267. DialogType: 'inquiry',
  268. btn1: '否',
  269. btn2: '是',
  270. animation: 0
  271. }).then((res) => {
  272. if (res.isConfirm) {
  273. const index = this.historyList.indexOf(item);
  274. if (index !== -1) {
  275. this.historyList.splice(index, 1);
  276. }
  277. uni.setStorageSync(HISTORY_KEY, JSON.stringify(this.historyList));
  278. }
  279. })
  280. },
  281. // 使用历史记录中的关键词
  282. useHistoryKeyword(keyword) {
  283. this.searchKeyword = keyword;
  284. this.onSearch();
  285. },
  286. // 处理搜索
  287. async onSearch(isRefresh = true) {
  288. if (!this.searchKeyword.trim()) return;
  289. if (isRefresh) {
  290. this.page = 1;
  291. this.hasMore = true;
  292. this.searchResult = [];
  293. }
  294. if (!this.hasMore || this.isLoading) return;
  295. this.isLoading = true;
  296. try {
  297. const [err, res] = await uni.request({
  298. url: this.$apiHost + '/Order/getlist?type=buyCrowdfund',
  299. method: 'GET',
  300. data: {
  301. offset: this.page,
  302. keyword: this.searchKeyword,
  303. uuid: getApp().globalData.uuid,
  304. skey: getApp().globalData.skey,
  305. }
  306. });
  307. if (!err && res && res.data && res.data.list) {
  308. var list = res.data.list;
  309. list = res.data.list.map(order => {
  310. let statusType = '';
  311. let statusText = '';
  312. switch (order.status) {
  313. case 0:
  314. statusType = 'waitPay';
  315. statusText = '待支付';
  316. break;
  317. case 1:
  318. statusType = 'waitSend';
  319. statusText = '待发货';
  320. break;
  321. case 2:
  322. statusType = 'waitReceive';
  323. statusText = '商品已发货';
  324. break;
  325. case 3:
  326. statusType = 'finish';
  327. statusText = '已收货';
  328. break;
  329. case 5:
  330. statusType = 'finish';
  331. statusText = '交易完成';
  332. break;
  333. case 6:
  334. statusType = 'refund';
  335. statusText = '退款中';
  336. break;
  337. case 8:
  338. statusType = 'payFail';
  339. statusText = '已关闭';
  340. break;
  341. case 9:
  342. statusType = 'finish';
  343. statusText = '已完成';
  344. break;
  345. default:
  346. statusType = 'waitPay';
  347. statusText = '待支付';
  348. }
  349. return {
  350. ...order,
  351. statusType,
  352. statusText,
  353. projectTitle: order.name,
  354. title: order.name,
  355. spec: order.name2,
  356. img: order.image,
  357. price: order.money,
  358. count: order.num,
  359. isInitiator: false
  360. };
  361. });
  362. console.log(list, "搜索结果2");
  363. if (isRefresh) {
  364. this.searchResult = list;
  365. } else {
  366. this.searchResult = [...this.searchResult, ...list];
  367. }
  368. this.hasMore = this.searchResult.length < (res.data.data.total || 0);
  369. this.page++;
  370. } else {
  371. this.hasMore = false;
  372. }
  373. } catch (e) {
  374. this.hasMore = false;
  375. }
  376. this.isLoading = false;
  377. // 保存历史记录
  378. this.saveHistory();
  379. this.searchStatus = false;
  380. },
  381. // 清空搜索框
  382. clearKeyword() {
  383. this.searchKeyword = '';
  384. },
  385. // 处理输入
  386. handleInput(e) {
  387. this.searchKeyword = e.detail.value;
  388. if (this.searchKeyword.trim() == '') {
  389. this.searchStatus = true;
  390. }
  391. console.log(this.historyList, e.detail.value);
  392. },
  393. // 返回上一页
  394. goBack() {
  395. uni.navigateBack();
  396. },
  397. // 添加展开/折叠方法
  398. toggleHistory() {
  399. this.isExpanded = !this.isExpanded;
  400. },
  401. goToDetail(id) {
  402. uni.navigateTo({ url: '/pages/crowdFunding/crowdfundingDetails?id=' + id });
  403. },
  404. handleSearch() {
  405. if (!this.searchKeyword.trim()) return;
  406. // 保存到历史记录
  407. this.saveHistory();
  408. this.searchStatus = false;
  409. // 加载搜索结果
  410. this.queryList();
  411. },
  412. goPages(url) {
  413. uni.navigateTo({
  414. url: url,
  415. });
  416. },
  417. goBack() {
  418. uni.navigateBack();
  419. },
  420. switchTab(index) {
  421. this.currentTab = index;
  422. // 切换标签时刷新数据
  423. this.onSearch();
  424. },
  425. onSwiperChange(e) {
  426. this.currentTab = e.detail.current;
  427. this.$nextTick(() => {
  428. this.updateSwiperHeight();
  429. });
  430. },
  431. getOrdersByTab(type) {
  432. if (type === "all") return this.searchResult;
  433. return this.searchResult.filter((o) => o.statusType === type);
  434. },
  435. updateSwiperHeight() {
  436. // 动态获取当前swiper-item内容高度
  437. this.$nextTick(() => {
  438. const query = uni.createSelectorQuery().in(this);
  439. query
  440. .selectAll(".reserveASeat, .tabs-section")
  441. .boundingClientRect((rects) => {
  442. if (rects && rects.length >= 2) {
  443. this.reserveASeatHeight = rects[0].height || 0;
  444. this.tabsSectionHeight = rects[1].height || 0;
  445. // 计算swiper高度 = 视窗高度 - 预留空间高度 - 标签栏高度 - 状态栏高度
  446. const windowHeight = uni.getSystemInfoSync().windowHeight;
  447. this.swiperHeight = windowHeight - this.reserveASeatHeight - this.tabsSectionHeight;
  448. }
  449. })
  450. .exec();
  451. });
  452. },
  453. goToOrderDetail(order) {
  454. uni.navigateTo({
  455. url: "/pages/crowdFunding/orderDetail?orderId=" + order.id,
  456. });
  457. },
  458. pay(order) {
  459. uni.navigateTo({
  460. url: "/pages/crowdFunding/orderDetail?orderId=" + order.id,
  461. });
  462. /* 支付逻辑 */
  463. },
  464. deleteOrder(order) {
  465. /* 删除逻辑 */
  466. uni.navigateTo({
  467. url: "/pages/crowdFunding/orderDetail?orderId=" + order.id,
  468. });
  469. },
  470. cancelOrder(order) {
  471. /* 取消/退款逻辑 */
  472. uni.navigateTo({
  473. url: "/pages/crowdFunding/orderDetail?orderId=" + order.id,
  474. });
  475. },
  476. confirmReceive(order) {
  477. /* 确认收货逻辑 */
  478. uni.navigateTo({
  479. url: "/pages/crowdFunding/orderDetail?orderId=" + order.id,
  480. });
  481. },
  482. commentOrder(order) {
  483. /* 评价逻辑 */
  484. uni.navigateTo({
  485. url: "/pages/crowdFunding/orderDetail?orderId=" + order.id,
  486. });
  487. },
  488. },
  489. mounted() {
  490. this.updateSwiperHeight();
  491. },
  492. watch: {
  493. currentTab() {
  494. this.$nextTick(() => {
  495. this.updateSwiperHeight();
  496. });
  497. },
  498. },
  499. }
  500. </script>
  501. <style lang="scss">
  502. .search-container {
  503. background-color: #f2f6f2;
  504. min-height: 100vh;
  505. width: 100%;
  506. overflow-x: hidden;
  507. position: relative;
  508. .search-header {
  509. background-color: #ffffff;
  510. padding: 16rpx 30rpx;
  511. display: flex;
  512. align-items: center;
  513. padding-top: calc(16rpx + var(--status-bar-height));
  514. padding-left: 40rpx;
  515. padding-right: 28rpx;
  516. padding-bottom: 16rpx;
  517. position: fixed;
  518. left: 0;
  519. top: 0;
  520. z-index: 9;
  521. width: 100%;
  522. box-sizing: border-box;
  523. .search-box {
  524. flex: 1;
  525. height: 72rpx;
  526. background-color: #f1f1f1;
  527. border-radius: 36rpx;
  528. display: flex;
  529. align-items: center;
  530. padding: 0 24rpx;
  531. padding-left: 14rpx;
  532. width: 622rpx;
  533. height: 72rpx;
  534. background: #FFFFFF;
  535. border-radius: 36rpx;
  536. border: 6rpx solid #000000;
  537. position: relative;
  538. left: 0;
  539. top: 0;
  540. box-sizing: border-box;
  541. max-width: calc(100% - 60rpx);
  542. input {
  543. flex: 1;
  544. height: 100%;
  545. margin: 0 16rpx;
  546. font-size: 24rpx;
  547. font-family: 'PingFang SC-Medium';
  548. width: auto;
  549. min-width: 0;
  550. }
  551. .searchImgBox {
  552. width: 88rpx;
  553. height: 56rpx;
  554. background: #1F1F1F;
  555. border-radius: 32rpx;
  556. display: flex;
  557. align-items: center;
  558. justify-content: center;
  559. position: absolute;
  560. top: 50%;
  561. right: 6rpx;
  562. transform: translateY(-50%);
  563. flex-shrink: 0;
  564. .image {
  565. width: 36rpx;
  566. height: 36rpx;
  567. }
  568. }
  569. }
  570. .cancel-btn {
  571. color: #1f1f1f;
  572. width: 36rpx;
  573. height: 100%;
  574. margin-right: 24rpx;
  575. font-weight: 700;
  576. flex-shrink: 0;
  577. }
  578. }
  579. .reserveASeat {
  580. width: 100%;
  581. min-height: calc(108rpx + var(--status-bar-height));
  582. }
  583. .search-history {
  584. background-color: #ffffff;
  585. padding: 30rpx;
  586. padding-top: 15rpx;
  587. width: 100%;
  588. box-sizing: border-box;
  589. .history-header {
  590. display: flex;
  591. justify-content: space-between;
  592. align-items: center;
  593. margin-bottom: 15rpx;
  594. width: 100%;
  595. box-sizing: border-box;
  596. .title {
  597. font-size: 30rpx;
  598. color: #333;
  599. font-weight: bold;
  600. }
  601. }
  602. .history-list {
  603. transition: all 1s;
  604. overflow: hidden;
  605. width: 100%;
  606. box-sizing: border-box;
  607. .history-item {
  608. display: flex;
  609. align-items: center;
  610. padding: 18rpx 0;
  611. justify-content: space-between;
  612. width: 100%;
  613. box-sizing: border-box;
  614. .history-text {
  615. font-size: 28rpx;
  616. color: #666;
  617. display: flex;
  618. align-items: center;
  619. justify-content: flex-start;
  620. font-weight: 400;
  621. color: #1F1F1F;
  622. margin-left: 6rpx;
  623. font-family: 'PingFang SC-Bold';
  624. flex: 1;
  625. overflow: hidden;
  626. min-width: 0;
  627. image {
  628. width: 32rpx;
  629. height: 32rpx;
  630. margin-right: 16rpx;
  631. flex-shrink: 0;
  632. }
  633. }
  634. .deleteBtn {
  635. width: 30rpx;
  636. height: 30rpx;
  637. flex-shrink: 0;
  638. }
  639. }
  640. }
  641. }
  642. .search-result {
  643. background-color: #f6faf6;
  644. height: calc(100vh - 108rpx - var(--status-bar-height) );
  645. width: 100%;
  646. box-sizing: border-box;
  647. display: flex;
  648. flex-direction: column;
  649. }
  650. .no-data {
  651. display: flex;
  652. flex-direction: column;
  653. align-items: center;
  654. justify-content: center;
  655. padding: 60rpx 0;
  656. // background-color: #fff;
  657. width: 100%;
  658. box-sizing: border-box;
  659. text {
  660. color: #808080;
  661. font-size: 28rpx;
  662. }
  663. }
  664. }
  665. .expandBtn {
  666. view {
  667. font-family: 'PingFang SC-Bold';
  668. color: #999999;
  669. display: flex;
  670. align-items: center;
  671. justify-content: center;
  672. &.fold {
  673. image {
  674. transform: rotate(180deg) translateY(-2rpx);
  675. }
  676. }
  677. image {
  678. width: 28rpx;
  679. height: 28rpx;
  680. }
  681. }
  682. }
  683. .items-grid {
  684. display: grid;
  685. grid-template-columns: repeat(2, 1fr);
  686. gap: 24rpx 12rpx;
  687. padding: 16rpx 12rpx 0 12rpx;
  688. background: #f2f6f2;
  689. }
  690. .loading-more { text-align: center; color: #999; font-size: 26rpx; padding: 24rpx 0; }
  691. .no-more { text-align: center; color: #ccc; font-size: 24rpx; padding: 20rpx 0; }
  692. .search-result {
  693. background: #f6faf6;
  694. .custom-navbar {
  695. display: flex;
  696. flex-direction: row;
  697. align-items: center;
  698. justify-content: space-between;
  699. height: 90rpx;
  700. padding: 0 20rpx;
  701. padding-top: var(--status-bar-height);
  702. background-color: #ffffff;
  703. position: sticky;
  704. top: 0;
  705. height: calc(90rpx + var(--status-bar-height));
  706. z-index: 100;
  707. .navbar-left {
  708. height: 80rpx;
  709. display: flex;
  710. align-items: center;
  711. justify-content: center;
  712. .fa-angle-left {
  713. font-size: 48rpx;
  714. color: #333;
  715. }
  716. }
  717. .navbar-center {
  718. .navbar-title {
  719. max-width: 450rpx;
  720. font-family: "PingFang SC-Bold";
  721. font-weight: 400;
  722. font-size: 32rpx;
  723. color: #1f1f1f;
  724. padding-left: 20rpx;
  725. }
  726. }
  727. .navbar-right {
  728. width: 80rpx;
  729. height: 80rpx;
  730. display: flex;
  731. justify-content: center;
  732. align-items: center;
  733. .fa-ellipsis-h {
  734. font-size: 36rpx;
  735. color: #333;
  736. }
  737. }
  738. }
  739. .tabs-reserveaseat{
  740. width: 100vw;
  741. height: 72rpx;
  742. }
  743. .tabs-section {
  744. background: #fff;
  745. border-bottom: 6rpx solid #f6faf6;
  746. z-index: 100;
  747. min-height: 72rpx;
  748. .tabs-scroll-view {
  749. width: 100vw;
  750. box-sizing: border-box;
  751. padding-left: 50rpx;
  752. .tabs-wrapper {
  753. display: flex;
  754. flex-direction: row;
  755. align-items: center;
  756. height: 72rpx;
  757. .tab {
  758. position: relative;
  759. width: auto;
  760. height: 48rpx;
  761. font-size: 32rpx;
  762. font-family: "PingFang SC-Bold";
  763. color: #999;
  764. font-weight: 400;
  765. transition: all 0.5s;
  766. margin-right: 40rpx;
  767. .left {
  768. white-space: nowrap;
  769. display: inline-block;
  770. }
  771. ::after {
  772. content: "";
  773. position: absolute;
  774. right: -15rpx;
  775. top: 0;
  776. width: 96rpx;
  777. height: 48rpx;
  778. background-image: url("../../static/me/wd_img_qiehuan.png");
  779. background-size: auto 100%;
  780. background-repeat: no-repeat;
  781. opacity: 0;
  782. }
  783. &.active {
  784. color: #1f1f1f;
  785. text {
  786. font-family: "PingFang SC-Bold";
  787. }
  788. ::after {
  789. opacity: 0.7;
  790. }
  791. }
  792. }
  793. }
  794. }
  795. }
  796. .order-list {
  797. padding: 0 0 32rpx 0;
  798. height: calc(100vh - 180rpx - var(--status-bar-height));
  799. overflow-y: auto;
  800. -webkit-overflow-scrolling: touch;
  801. .order-card {
  802. background: #fff;
  803. border-radius: 18rpx;
  804. margin: 32rpx 24rpx 0 24rpx;
  805. padding: 24rpx;
  806. .order-header {
  807. display: flex;
  808. align-items: center;
  809. margin-bottom: 12rpx;
  810. .project-title {
  811. font-size: 28rpx;
  812. font-weight: bold;
  813. color: #1f1f1f;
  814. margin-right: 40rpx;
  815. }
  816. .tag-initiator {
  817. font-size: 20rpx;
  818. color: #b6ff4b;
  819. background: #1f1f1f;
  820. border-radius: 8rpx;
  821. padding: 2rpx 12rpx;
  822. margin-right: 12rpx;
  823. }
  824. .order-status {
  825. font-size: 24rpx;
  826. margin-left: auto;
  827. white-space: nowrap;
  828. &.status-waitPay {
  829. color: #888;
  830. }
  831. &.status-paid {
  832. color: #1f1f1f;
  833. }
  834. &.status-waitSend {
  835. color: #888;
  836. }
  837. &.status-waitReceive {
  838. color: #888;
  839. }
  840. &.status-waitComment {
  841. color: #ff9900;
  842. }
  843. &.status-refund {
  844. color: #1f1f1f;
  845. }
  846. &.status-finish {
  847. color: #888;
  848. }
  849. }
  850. }
  851. .order-main {
  852. display: flex;
  853. align-items: center;
  854. margin-bottom: 12rpx;
  855. .order-img {
  856. width: 120rpx;
  857. height: 120rpx;
  858. border-radius: 12rpx;
  859. margin-right: 18rpx;
  860. }
  861. .order-info {
  862. flex: 1;
  863. .order-title {
  864. font-size: 28rpx;
  865. color: #1f1f1f;
  866. font-weight: bold;
  867. margin-bottom: 8rpx;
  868. }
  869. .order-spec {
  870. font-size: 24rpx;
  871. color: #888;
  872. }
  873. }
  874. .order-price {
  875. text-align: right;
  876. view {
  877. font-size: 28rpx;
  878. color: #1f1f1f;
  879. }
  880. .order-count {
  881. font-size: 22rpx;
  882. color: #888;
  883. }
  884. }
  885. }
  886. .order-actions {
  887. display: flex;
  888. align-items: center;
  889. justify-content: flex-end;
  890. gap: 18rpx;
  891. .btn {
  892. min-width: 120rpx;
  893. height: 56rpx;
  894. line-height: 56rpx;
  895. border-radius: 32rpx;
  896. text-align: center;
  897. font-size: 26rpx;
  898. padding: 0 24rpx;
  899. background: #f6faf6;
  900. color: #1f1f1f;
  901. border: 2rpx solid #e5e5e5;
  902. &.btn-pay {
  903. background: #1f1f1f;
  904. color: #acf934;
  905. border: none;
  906. }
  907. &.btn-delete {
  908. background: #f6faf6;
  909. color: #888;
  910. border: 2rpx solid #e5e5e5;
  911. }
  912. &.btn-cancel {
  913. background: #f6faf6;
  914. color: #888;
  915. border: 2rpx solid #e5e5e5;
  916. }
  917. &.btn-remind {
  918. background: #fffbe6;
  919. color: #1f1f1f;
  920. border: 2rpx solid #ffe58f;
  921. }
  922. &.btn-confirm {
  923. background: #1f1f1f;
  924. color: #acf934;
  925. border: none;
  926. }
  927. &.btn-comment {
  928. background: #fff;
  929. color: #1f1f1f;
  930. border: 2rpx solid #e5e5e5;
  931. }
  932. &.btn-refund {
  933. background: #fff;
  934. color: #1f1f1f;
  935. border: 2rpx solid #e5e5e5;
  936. }
  937. }
  938. }
  939. }
  940. }
  941. .order-swiper {
  942. width: 100vw;
  943. background: transparent;
  944. transition: height 0.3s;
  945. flex: 1;
  946. }
  947. }
  948. </style>