order.vue 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733
  1. <template>
  2. <view>
  3. <view class="head">
  4. <view class="status"></view>
  5. <view class="search" @click="goSearch">
  6. <i class="hxicon-search"></i>
  7. <text class="tit">搜索我的订单</text>
  8. </view>
  9. </view>
  10. <view class="tabs-box">
  11. <view class="hx-tabs">
  12. <view class="hx-tabs-item" v-for="(item,i) in tabs" :key="i" :class="{'hx-tabs-active': swiperCurrent == i}" @click="swiperChange(i)" :style="{transition: transtionTime + 'ms'}">
  13. <text>{{item.name}}</text>
  14. </view>
  15. <view class="hx-tabs-slider-box" :style="{width: (100/tabs.length) + '%',transition: transtionTime + 'ms',left:swiperCurrentSliderLeft + '%'}">
  16. <view class="hx-tabs-slider"></view>
  17. </view>
  18. </view>
  19. </view>
  20. <view class="main" :style="{height: mainHeight}" >
  21. <swiper
  22. id="mainSwiper"
  23. style="height: 100%;"
  24. :current="swiperCurrent"
  25. :duration="transtionTime"
  26. @animationfinish="animationfinish">
  27. <swiper-item class="swiper-item" >
  28. <view class="scroll-items">
  29. <scroll-view
  30. style="height: 100%;width: 100%;"
  31. scroll-with-animation
  32. :scroll-y="true"
  33. refresher-background="#eee"
  34. :refresher-enabled="reloadDown"
  35. :refresher-triggered="triggered"
  36. :refresher-threshold="100"
  37. @refresherrefresh="onRefresh"
  38. @refresherrestore="onRestore" >
  39. <!-- 标签为全部时,有推广图 -->
  40. <view class=" bannerimg-box">
  41. <swiper circular duration="400" interval="10000" autoplay >
  42. <swiper-item class="swiper-item bannerImg" v-for="(banner,k) in bannerData" :key="k" v-if="banner">
  43. <!-- 图片尺寸为 750*250 -->
  44. <image :src="banner.src" class="loaded" mode="widthFix"></image>
  45. </swiper-item>
  46. </swiper>
  47. </view>
  48. <view class="nullOrder" v-if="tabs[0].data && tabs[0].data.length == 0 && tabs[4].hide_load">
  49. <image src="../../static/img/order_icon.png" mode=""></image>
  50. <text class="tit">暂无订单</text>
  51. </view>
  52. <block v-for="(order,j) in tabs[0].data" :key="j" v-else>
  53. <view class="order-item" v-if="order">
  54. <view class="item-top">
  55. <image :src="order.tag" mode=""></image>
  56. <view class="tit">
  57. <text>{{order.store_name}}</text>
  58. <text v-if="order.community">({{order.community}})</text>
  59. <i class="hxicon-right"></i>
  60. </view>
  61. <view class="right" v-if="order.status == 1"><text>已取消</text></view>
  62. <view class="right" v-else-if="order.status == 2"><text>待支付</text></view>
  63. <view class="right" v-else-if="order.status == 3"><text>待收取</text></view>
  64. <view class="right" v-else-if="order.status == 4"><text>待评价</text></view>
  65. <view class="right" v-else-if="order.status == 5"><text>已完成</text></view>
  66. <view class="right" v-else-if="order.status == 6"><text>退款中</text></view>
  67. <view class="right" v-else-if="order.status == 7"><text>退款成功</text></view>
  68. </view>
  69. <view class="item-center">
  70. <image :src="order.avatar" mode=""></image>
  71. <view class="right">
  72. <view class="row" v-if="order.goods_name">
  73. <text>{{order.goods_name}}</text>
  74. </view>
  75. <view class="row">
  76. <text>下单时间:{{order.create_time}}</text>
  77. </view>
  78. <view class="row">
  79. <text>总价:¥{{order.total}}</text>
  80. </view>
  81. </view>
  82. </view>
  83. <view class="item-bottom">
  84. <view class="left"></view>
  85. <view class="btn" v-if="order.status == 1 || order.status == 5" @click="goStore(order.id)">再来一单</view>
  86. <view class="btn bg-yellow" v-else-if="order.status == 2" @click="goPay(order.id)">去支付</view>
  87. <view class="btn" v-else-if="order.status == 3" @click="goOrderInfo(order.id)">查看</view>
  88. <view class="btn bg-yellow" v-else-if="order.status == 4" @click="goComment(order.id)">去评价</view>
  89. <view class="btn" v-else-if="order.status == 6 || order.status == 7" @click="goRefund(order.id)">退款进度</view>
  90. </view>
  91. </view>
  92. </block>
  93. </scroll-view>
  94. </view>
  95. </swiper-item>
  96. <swiper-item class="swiper-item" >
  97. <view class="scroll-items">
  98. <scroll-view
  99. style="height: 100%;width: 100%;"
  100. scroll-with-animation
  101. :scroll-y="true"
  102. refresher-background="#eee"
  103. :refresher-enabled="reloadDown"
  104. :refresher-triggered="triggered"
  105. :refresher-threshold="100"
  106. @refresherrefresh="onRefresh"
  107. @refresherrestore="onRestore" >
  108. <view class="nullOrder" v-if="tabs[1].data && tabs[1].data.length == 0 && tabs[4].hide_load">
  109. <image src="../../static/img/order_icon.png" mode=""></image>
  110. <text class="tit">暂无订单</text>
  111. </view>
  112. <block v-for="(order,j) in tabs[1].data" :key="j" v-else>
  113. <view class="order-item" v-if="order">
  114. <view class="item-top">
  115. <image :src="order.tag" mode=""></image>
  116. <view class="tit">
  117. <text>{{order.store_name}}</text>
  118. <text v-if="order.community">({{order.community}})</text>
  119. <i class="hxicon-right"></i>
  120. </view>
  121. <view class="right" v-if="order.status == 1"><text>已取消</text></view>
  122. <view class="right" v-else-if="order.status == 2"><text>待支付</text></view>
  123. <view class="right" v-else-if="order.status == 3"><text>待收取</text></view>
  124. <view class="right" v-else-if="order.status == 4"><text>待评价</text></view>
  125. <view class="right" v-else-if="order.status == 5"><text>已完成</text></view>
  126. <view class="right" v-else-if="order.status == 6"><text>退款中</text></view>
  127. <view class="right" v-else-if="order.status == 7"><text>退款成功</text></view>
  128. </view>
  129. <view class="item-center">
  130. <image :src="order.avatar" mode=""></image>
  131. <view class="right">
  132. <view class="row" v-if="order.goods_name">
  133. <text>{{order.goods_name}}</text>
  134. </view>
  135. <view class="row">
  136. <text>下单时间:{{order.create_time}}</text>
  137. </view>
  138. <view class="row">
  139. <text>总价:¥{{order.total}}</text>
  140. </view>
  141. </view>
  142. </view>
  143. <view class="item-bottom">
  144. <view class="left"></view>
  145. <view class="btn" v-if="order.status == 1 || order.status == 5" @click="goStore(order.store_id,order.id)">再来一单</view>
  146. <view class="btn bg-yellow" v-else-if="order.status == 2" @click="goPay(order.id)">去支付</view>
  147. <view class="btn" v-else-if="order.status == 3" @click="goOrderInfo(order.id)">查看</view>
  148. <view class="btn bg-yellow" v-else-if="order.status == 4" @click="goComment(order.id)">去评价</view>
  149. <view class="btn" v-else-if="order.status == 6 || order.status == 7" @click="goRefund(order.id)">退款进度</view>
  150. </view>
  151. </view>
  152. </block>
  153. </scroll-view>
  154. </view>
  155. </swiper-item>
  156. <swiper-item class="swiper-item" >
  157. <view class="scroll-items">
  158. <scroll-view
  159. style="height: 100%;width: 100%;"
  160. scroll-with-animation
  161. :scroll-y="true"
  162. refresher-background="#eee"
  163. :refresher-enabled="reloadDown"
  164. :refresher-triggered="triggered"
  165. :refresher-threshold="100"
  166. @refresherrefresh="onRefresh"
  167. @refresherrestore="onRestore" >
  168. <view class="nullOrder" v-if="tabs[2].data && tabs[2].data.length == 0 && tabs[4].hide_load">
  169. <image src="../../static/img/order_icon.png" mode=""></image>
  170. <text class="tit">暂无订单</text>
  171. </view>
  172. <block v-for="(order,j) in tabs[2].data" :key="j" v-else>
  173. <view class="order-item" v-if="order">
  174. <view class="item-top">
  175. <image :src="order.tag" mode=""></image>
  176. <view class="tit">
  177. <text>{{order.store_name}}</text>
  178. <text v-if="order.community">({{order.community}})</text>
  179. <i class="hxicon-right"></i>
  180. </view>
  181. <view class="right" v-if="order.status == 1"><text>已取消</text></view>
  182. <view class="right" v-else-if="order.status == 2"><text>待支付</text></view>
  183. <view class="right" v-else-if="order.status == 3"><text>待收取</text></view>
  184. <view class="right" v-else-if="order.status == 4"><text>待评价</text></view>
  185. <view class="right" v-else-if="order.status == 5"><text>已完成</text></view>
  186. <view class="right" v-else-if="order.status == 6"><text>退款中</text></view>
  187. <view class="right" v-else-if="order.status == 7"><text>退款成功</text></view>
  188. </view>
  189. <view class="item-center">
  190. <image :src="order.avatar" mode=""></image>
  191. <view class="right">
  192. <view class="row" v-if="order.goods_name">
  193. <text>{{order.goods_name}}</text>
  194. </view>
  195. <view class="row">
  196. <text>下单时间:{{order.create_time}}</text>
  197. </view>
  198. <view class="row">
  199. <text>总价:¥{{order.total}}</text>
  200. </view>
  201. </view>
  202. </view>
  203. <view class="item-bottom">
  204. <view class="left"></view>
  205. <view class="btn" v-if="order.status == 1 || order.status == 5" @click="goStore(order.id)">再来一单</view>
  206. <view class="btn bg-yellow" v-else-if="order.status == 2" @click="goPay(order.id)">去支付</view>
  207. <view class="btn" v-else-if="order.status == 3" @click="goOrderInfo(order.id)">查看</view>
  208. <view class="btn bg-yellow" v-else-if="order.status == 4" @click="goComment(order.id)">去评价</view>
  209. <view class="btn" v-else-if="order.status == 6 || order.status == 7" @click="goRefund(order.id)">退款进度</view>
  210. </view>
  211. </view>
  212. </block>
  213. </scroll-view>
  214. </view>
  215. </swiper-item>
  216. <swiper-item class="swiper-item" >
  217. <view class="scroll-items">
  218. <scroll-view
  219. style="height: 100%;width: 100%;"
  220. scroll-with-animation
  221. :scroll-y="true"
  222. refresher-background="#eee"
  223. :refresher-enabled="reloadDown"
  224. :refresher-triggered="triggered"
  225. :refresher-threshold="100"
  226. @refresherrefresh="onRefresh"
  227. @refresherrestore="onRestore" >
  228. <view class="nullOrder" v-if="tabs[3].data && tabs[3].data.length == 0 && tabs[4].hide_load">
  229. <image src="../../static/img/order_icon.png" mode=""></image>
  230. <text class="tit">暂无订单</text>
  231. </view>
  232. <block v-for="(order,j) in tabs[3].data" :key="j" v-else>
  233. <view class="order-item" v-if="order">
  234. <view class="item-top">
  235. <image :src="order.tag" mode=""></image>
  236. <view class="tit">
  237. <text>{{order.store_name}}</text>
  238. <text v-if="order.community">({{order.community}})</text>
  239. <i class="hxicon-right"></i>
  240. </view>
  241. <view class="right" v-if="order.status == 1"><text>已取消</text></view>
  242. <view class="right" v-else-if="order.status == 2"><text>待支付</text></view>
  243. <view class="right" v-else-if="order.status == 3"><text>待收取</text></view>
  244. <view class="right" v-else-if="order.status == 4"><text>待评价</text></view>
  245. <view class="right" v-else-if="order.status == 5"><text>已完成</text></view>
  246. <view class="right" v-else-if="order.status == 6"><text>退款中</text></view>
  247. <view class="right" v-else-if="order.status == 7"><text>退款成功</text></view>
  248. </view>
  249. <view class="item-center">
  250. <image :src="order.avatar" mode=""></image>
  251. <view class="right">
  252. <view class="row" v-if="order.goods_name">
  253. <text>{{order.goods_name}}</text>
  254. </view>
  255. <view class="row">
  256. <text>下单时间:{{order.create_time}}</text>
  257. </view>
  258. <view class="row">
  259. <text>总价:¥{{order.total}}</text>
  260. </view>
  261. </view>
  262. </view>
  263. <view class="item-bottom">
  264. <view class="left"></view>
  265. <view class="btn" v-if="order.status == 1 || order.status == 5" @click="goStore(order.id)">再来一单</view>
  266. <view class="btn bg-yellow" v-else-if="order.status == 2" @click="goPay(order.id)">去支付</view>
  267. <view class="btn" v-else-if="order.status == 3" @click="goOrderInfo(order.id)">查看</view>
  268. <view class="btn bg-yellow" v-else-if="order.status == 4" @click="goComment(order.id)">去评价</view>
  269. <view class="btn" v-else-if="order.status == 6 || order.status == 7" @click="goRefund(order.id)">退款进度</view>
  270. </view>
  271. </view>
  272. </block>
  273. </scroll-view>
  274. </view>
  275. </swiper-item>
  276. <swiper-item class="swiper-item" >
  277. <view class="scroll-items">
  278. <scroll-view
  279. style="height: 100%;width: 100%;"
  280. scroll-with-animation
  281. :scroll-y="true"
  282. refresher-background="#eee"
  283. :refresher-enabled="reloadDown"
  284. :refresher-triggered="triggered"
  285. :refresher-threshold="100"
  286. @refresherrefresh="onRefresh"
  287. @refresherrestore="onRestore" >
  288. <view class="nullOrder" v-if="tabs[4].data && tabs[4].data.length == 0 && tabs[4].hide_load">
  289. <image src="/static/img/order_icon.png" mode=""></image>
  290. <text class="tit">暂无订单</text>
  291. </view>
  292. <block v-for="(order,j) in tabs[4].data" :key="j" v-else>
  293. <view class="order-item" v-if="order">
  294. <view class="item-top">
  295. <image :src="order.tag" mode=""></image>
  296. <view class="tit">
  297. <text>{{order.store_name}}</text>
  298. <text v-if="order.community">({{order.community}})</text>
  299. <i class="hxicon-right"></i>
  300. </view>
  301. <view class="right" v-if="order.status == 1"><text>已取消</text></view>
  302. <view class="right" v-else-if="order.status == 2"><text>待支付</text></view>
  303. <view class="right" v-else-if="order.status == 3"><text>待收取</text></view>
  304. <view class="right" v-else-if="order.status == 4"><text>待评价</text></view>
  305. <view class="right" v-else-if="order.status == 5"><text>已完成</text></view>
  306. <view class="right" v-else-if="order.status == 6"><text>退款中</text></view>
  307. <view class="right" v-else-if="order.status == 7"><text>退款成功</text></view>
  308. </view>
  309. <view class="item-center">
  310. <image :src="order.avatar" mode=""></image>
  311. <view class="right">
  312. <view class="row" v-if="order.goods_name">
  313. <text>{{order.goods_name}}</text>
  314. </view>
  315. <view class="row">
  316. <text>下单时间:{{order.create_time}}</text>
  317. </view>
  318. <view class="row">
  319. <text>总价:¥{{order.total}}</text>
  320. </view>
  321. </view>
  322. </view>
  323. <view class="item-bottom">
  324. <view class="left"></view>
  325. <view class="btn" v-if="order.status == 1 || order.status == 5">再来一单</view>
  326. <view class="btn bg-yellow" v-else-if="order.status == 2">去支付</view>
  327. <view class="btn" v-else-if="order.status == 3">查看</view>
  328. <view class="btn bg-yellow" v-else-if="order.status == 4">去评价</view>
  329. <view class="btn" v-else-if="order.status == 6 || order.status == 7">退款进度</view>
  330. </view>
  331. </view>
  332. </block>
  333. </scroll-view>
  334. </view>
  335. </swiper-item>
  336. </swiper>
  337. </view>
  338. </view>
  339. </template>
  340. <script>
  341. var sysInfo = uni.getSystemInfoSync();
  342. var statusBarHeight = uni.getSystemInfoSync().statusBarHeight;
  343. //引入测试数据
  344. import testData from "@/common/testdata.js";
  345. export default {
  346. data() {
  347. return {
  348. mainHeight: 0,
  349. statusBarHeight,
  350. tabs: [
  351. {name:'全部', data:[], api:'',load: false},
  352. {name:'待付款', data:[], api:'', load: false},
  353. {name:'待使用', data:[], api:'', load: false},
  354. {name:'待评价', data:[], api:'', load: false},
  355. {name:'退款', data:[], api:'', load: false},
  356. ],
  357. bannerData:[
  358. {page: '/pages/product/product?id=457', src: '//imgs.1op.cn/i/hxshop/banner/banner.jpg'},
  359. {page: '/pages/product/product?id=57', src:'//imgs.1op.cn/i/hxshop/banner/banner.jpg'},
  360. {page: '/pages/product/product?id=95', src:'//imgs.1op.cn/i/hxshop/banner/banner.jpg'},
  361. {page: '/pages/product/product?id=45', src:'//imgs.1op.cn/i/hxshop/banner/banner.jpg'}
  362. ],
  363. swiperCurrent: 0,
  364. transtionTime:100,
  365. swiperCurrentSliderLeft: 0,
  366. orderData: [
  367. //1,2,3,4,5,6,7,8,9,10
  368. ],
  369. triggered: true,
  370. //下拉刷新
  371. reloadDown: false,
  372. }
  373. },
  374. onLoad(option) {
  375. this.mainHeight = sysInfo.screenHeight - statusBarHeight - 50 - 60 - 50 + 'px';
  376. this._freshing = false;
  377. if(option.state){
  378. this.swiperChange(option.state)
  379. console.log(option.state);
  380. }else{
  381. // 全部订单 index为0
  382. this.tabs[0].data= testData.ordersData
  383. }
  384. },
  385. mounted() {
  386. },
  387. methods: {
  388. animationfinish({detail: { current }}) {
  389. /* this.$refs.tabs.setFinishCurrent(current); */
  390. this.swiperCurrent = current;
  391. this.current = current;
  392. this.swiperChange(current);
  393. },
  394. swiperChange(index) {
  395. this.swiperCurrent = index;
  396. this.swiperCurrentSliderLeft= (100/this.tabs.length) * index;
  397. let url = this.tabs[index].api;
  398. // index 0全部,1待支付,2待收货,3待评价,4退款
  399. // 假如滑动了tab则 去获取对应的数据
  400. if(this.tabs[index].data.length == 0){
  401. // 只获取一次数据
  402. this.getOrderData(index)
  403. }
  404. },
  405. getOrderData(index){
  406. var orderData = []
  407. //------------------------------------------
  408. //--------------------------------------------
  409. // 假如这为请求
  410. for(let i in testData.ordersData){
  411. if(!testData.ordersData[i]){
  412. console.log("不存在:"+i)
  413. }
  414. if(index == 1 && testData.ordersData[i].status == 2){
  415. orderData.push(testData.ordersData[i]);
  416. }else if(index == 2 && testData.ordersData[i].status == 3){
  417. orderData.push(testData.ordersData[i]);
  418. }else if(index == 3 && testData.ordersData[i].status == 4){
  419. orderData.push(testData.ordersData[i]);
  420. }else if(index == 4 && (testData.ordersData[i].status == 6 || testData.ordersData[i].status == 7)){
  421. orderData.push(testData.ordersData[i]);
  422. }
  423. }
  424. //--------------------------------------------
  425. //--------------------------------------------
  426. uni.showLoading()
  427. // 假如 orderData 为返回的数据,我们吧数据赋给对应的index 即可
  428. setTimeout(()=>{
  429. this.tabs[index].data= orderData
  430. this.tabs[index].hide_load = true
  431. uni.hideLoading()
  432. },1000)
  433. },
  434. // 下拉刷新
  435. onRefresh() {
  436. if (this._freshing) return;
  437. this._freshing = true;
  438. setTimeout(() => {
  439. this.triggered = false;
  440. this._freshing = false;
  441. }, 1500)
  442. },
  443. onRestore() {
  444. this.triggered = 'restore'; // 需要重置
  445. console.log("重置刷新");
  446. },
  447. //去支付
  448. goPay(orderId){
  449. uni.redirectTo({
  450. url: '/pages/order/pay?id=' + orderId
  451. });
  452. },
  453. //去门店
  454. goStore(storeId,orderId){
  455. uni.redirectTo({
  456. url: '/pages/store/index?sid=' + storeId + '&oid=' + orderId
  457. });
  458. },
  459. //去订单详情
  460. goOrderInfo(orderId){
  461. uni.redirectTo({
  462. url: '/pages/map/location?id=' + orderId
  463. });
  464. },
  465. //去评论
  466. goComment(orderId){
  467. // uni.redirectTo({
  468. // url: '/pages/order/pay?id=' + orderId
  469. // });
  470. },
  471. //查看退款详情
  472. goRefund(orderId){
  473. // uni.redirectTo({
  474. // url: '/pages/order/pay?id=' + orderId
  475. // });
  476. },
  477. //搜索
  478. goSearch(){
  479. uni.navigateTo({
  480. url: '/pages/search/search?type=order'
  481. })
  482. }
  483. }
  484. }
  485. </script>
  486. <style lang="scss">
  487. .head{
  488. background: linear-gradient(100deg, #FFEB3B, #FFC107);
  489. padding-bottom: 10px;
  490. padding-top: 10px;
  491. .status{
  492. height: var(--status-bar-height);
  493. }
  494. .search{
  495. height: 40px;
  496. background-color: #fff;
  497. border-radius: 10px;
  498. margin: 0 15px;
  499. display: flex;
  500. align-items: center;
  501. padding: 0 15px;
  502. font-size: 14px;
  503. color: #888;
  504. i{
  505. font-weight: bold;
  506. font-size: 16px;
  507. }
  508. .tit{
  509. margin-left: 6px;
  510. }
  511. }
  512. }
  513. .tabs-box{
  514. display: flex;
  515. justify-content: center;
  516. align-items: center;
  517. width: 100%;
  518. position: sticky;
  519. top: calc(44px + var(--status-bar-height));
  520. z-index: 10;
  521. background-color: white;
  522. height: 50px;
  523. padding-bottom: 10px;
  524. .hx-tabs{
  525. position: relative;
  526. display: flex;
  527. height:100%;
  528. width: 100%;
  529. justify-content: space-evenly;
  530. &-item{
  531. display: flex;
  532. flex: 1;
  533. flex-direction: row;
  534. justify-content: center;
  535. align-items: center;
  536. width: 70px;
  537. color:#666666;
  538. text{
  539. font-size: 16px;
  540. }
  541. }
  542. &-active{
  543. color:#333333;
  544. font-weight: bold;
  545. }
  546. &-slider-box{
  547. position: absolute;
  548. display: flex;
  549. justify-content: center;
  550. bottom: 0;
  551. width: 20%;
  552. }
  553. &-slider{
  554. display: flex;
  555. background: #f6d200;
  556. width: 30px;
  557. height: 3px;
  558. }
  559. }
  560. }
  561. .main{
  562. position: relative;
  563. background-color: #ffffff;
  564. #mainSwiper{
  565. background-color: #eeeeee;
  566. height: 100%;
  567. width: 100%;
  568. .bannerimg-box{
  569. border-bottom-left-radius:10upx;
  570. border-bottom-right-radius:10upx;
  571. padding: 15px 24rpx 7px;
  572. swiper{
  573. height: 233rpx;
  574. width: 699rpx;
  575. }
  576. .swiper-item {
  577. display: flex;
  578. justify-content: center;
  579. align-content: center;
  580. overflow: hidden;
  581. width: 100%;
  582. height: 100%;
  583. image {
  584. border-radius: 8px;
  585. width: 100%;
  586. }
  587. }
  588. }
  589. .nullOrder{
  590. display: flex;
  591. flex-direction: column;
  592. justify-content: center;
  593. align-items: center;
  594. margin: 40px auto;
  595. image{
  596. width: 283px;
  597. height: 200px;
  598. }
  599. .tit{
  600. display: flex;
  601. flex-direction: column;
  602. font-size: 16px;
  603. font-weight: bold;
  604. color: #555;
  605. margin-top: 6px;
  606. }
  607. }
  608. .scroll-items{
  609. height: 100%;
  610. .order-item{
  611. display: flex;
  612. flex-direction: column;
  613. background-color: #fff;
  614. margin: 8px 15px;
  615. border-radius: 10px;
  616. padding: 0 15px;
  617. .item-top{
  618. display: flex;
  619. flex-direction: row;
  620. align-items: center;
  621. padding: 12px 0;
  622. border-bottom: 1px solid #f5f5f5;
  623. image{
  624. border-radius: 50%;
  625. width: 24px;
  626. height: 24px;
  627. }
  628. .tit{
  629. flex: 1;
  630. margin-left: 6px;
  631. font-size: 16px;
  632. font-weight: bold;
  633. color: #333;
  634. padding-right: 40px;
  635. display: flex;
  636. align-items: center;
  637. flex-wrap: wrap;
  638. flex-direction: row;
  639. }
  640. .right{
  641. font-size: 14px;
  642. color: #666;
  643. }
  644. }
  645. .item-center{
  646. display: flex;
  647. flex-direction: row;
  648. margin-top: 12px;
  649. color: #666;
  650. font-size: 14px;
  651. image{
  652. border-radius: 6px;
  653. height: 60px;
  654. width: 60px;
  655. }
  656. .right{
  657. flex: 1;
  658. margin-left: 10px;
  659. }
  660. }
  661. .item-bottom{
  662. display: flex;
  663. flex-direction: row;
  664. margin-top: 12px;
  665. margin-bottom: 15px;
  666. .left{
  667. flex: 1;
  668. }
  669. .btn{
  670. padding: 7px 14px;
  671. border: 1px solid #cdcdcd;
  672. font-size: 14px;
  673. color: #555;
  674. border-radius: 10px;
  675. transition: all 0.2s;
  676. background: #fff;
  677. }
  678. .btn:active{
  679. color: #888;
  680. background: #f1f1f1;
  681. }
  682. .bg-yellow{
  683. background: linear-gradient(100deg, #FFEB3B, #FFC107);
  684. border-color: #ffe635;
  685. font-weight: bold;
  686. }
  687. .bg-yellow:active{
  688. background: linear-gradient(100deg, #e8d536, #dda809);
  689. }
  690. }
  691. }
  692. }
  693. // position: sticky;
  694. //top: calc(50px + 44px + var(--status-bar-height));
  695. }
  696. }
  697. </style>