order.vue 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906
  1. <template>
  2. <view class="content">
  3. <view class="order-title">
  4. <text>我的订单</text>
  5. <view class="roder-content">
  6. <view class="left" :class="{ current: currentIndex === index }" :key="index" v-for="(item, index) in maiList" @click="navGo(index)">{{ item.title }}</view>
  7. <!-- <view class="left">
  8. 我的卖单
  9. </view> -->
  10. </view>
  11. </view>
  12. <view class="navbar" v-show="currentIndex == 0">
  13. <view v-for="(item, index) in navList" :key="index" class="nav-item" :class="{ current: tabCurrentIndex === index }" @click="tabClick(index, 0)">{{ item.text }}</view>
  14. </view>
  15. <view class="navbar" v-show="currentIndex == 1">
  16. <view v-for="(item, index) in navList1" :key="index" class="nav-item" :class="{ current: tabCurrentIndex1 === index }" @click="tabClick(index, 1)">
  17. {{ item.text }}
  18. </view>
  19. </view>
  20. <swiper :current="currentAuto" class="swiper-box-one" duration="0" @change="changeTab">
  21. <swiper-item class="tab-content" v-for="(tabItem, tabIndex) in navList" :key="tabIndex" v-if="currentIndex == 0">
  22. <scroll-view class="list-scroll-content" scroll-y @scrolltolower="loadData">
  23. <!-- 空白页 -->
  24. <empty v-if="tabItem.loaded === true && tabItem.orderList.length === 0"></empty>
  25. <!-- 订单列表 -->
  26. <view @click="goToOrderDetail(item)" v-for="(item, index) in tabItem.orderList" :key="index" class="order-item">
  27. <view class="i-top b-b">
  28. <text class="time">{{ item.order_id }}</text>
  29. <text class="state" :style="{ color: item.stateTipColor }">{{ item.stateTip }}</text>
  30. <text v-if="item.status === 4" class="del-btn iconfont icondelete" @click="deleteOrder(index)"></text>
  31. </view>
  32. <view class="goods-box-single">
  33. <image class="goods-img" :src="item.image" mode="aspectFill"></image>
  34. <view class="right">
  35. <text class="title clamp">{{ item.name }}</text>
  36. <text class="attr-box">x1</text>
  37. <text class="price">{{ moneyNum(item.price) }}</text>
  38. </view>
  39. </view>
  40. <view class="price-box">
  41. <text class="num">1</text>
  42. 件商品 邮费
  43. <text class="price">0</text>
  44. 实付款
  45. <text class="price">{{ moneyNum(item.price) }}</text>
  46. </view>
  47. <view class="action-box b-t" v-if="item.stateTip == '待支付'"><button @click.stop="orderPay(item)" class="action-btn recom">立即支付</button></view>
  48. </view>
  49. <uni-load-more :status="tabItem.loadingType"></uni-load-more>
  50. </scroll-view>
  51. </swiper-item>
  52. <swiper-item class="tab-content" v-for="(tabItem, tabIndex) in navList1" :key="tabIndex" v-if="currentIndex == 1">
  53. <scroll-view class="list-scroll-content" scroll-y @scrolltolower="loadData">
  54. <!-- 空白页 -->
  55. <empty v-if="tabItem.loaded === true && tabItem.orderList.length === 0"></empty>
  56. <!-- 订单列表 -->
  57. <view @click="goToOrderDetail(item)" v-for="(item, index) in tabItem.orderList" :key="index" class="order-item">
  58. <view class="i-top b-b">
  59. <text class="time">{{ item._add_time }}</text>
  60. <text class="state" :style="{ color: item.stateTipColor }">{{ item._status._title }}</text>
  61. <text v-if="item.status === 4" class="del-btn iconfont icondelete" @click="deleteOrder(index)"></text>
  62. </view>
  63. <scroll-view v-if="item.cartInfo.length > 1" class="goods-box" scroll-x>
  64. <view v-for="(goodsItem, goodsIndex) in item.cartInfo" :key="goodsIndex" class="goods-item">
  65. <image class="goods-img" :src="goodsItem.productInfo.image" mode="aspectFill"></image>
  66. </view>
  67. </scroll-view>
  68. <!-- <view v-if="item.cartInfo.length === 1" class="goods-box-single" v-for="(goodsItem, goodsIndex) in item.cartInfo" :key="goodsIndex">
  69. <image class="goods-img" :src="goodsItem.productInfo.image" mode="aspectFill"></image>
  70. <view class="right">
  71. <text class="title clamp">{{ goodsItem.productInfo.store_name }}</text>
  72. <text class="attr-box">{{ goodsItem.attrInfo ? goodsItem.attrInfo.suk : '' }} x {{ goodsItem.cart_num }}</text>
  73. <text class="price">{{ moneyNum(goodsItem.productInfo.price)}}</text>
  74. </view>
  75. </view> -->
  76. <view class="goods-box-single" v-for="(goodsItem, goodsIndex) in item.cartInfo" :key="goodsIndex">
  77. <image class="goods-img" :src="goodsItem.productInfo.image" mode="scaleToFill"></image>
  78. <view class="right">
  79. <view class="flex-start">
  80. <text class="title clamp">{{ goodsItem.productInfo.store_name }}</text>
  81. <text class="price">{{ goodsItem.productInfo.price | moneyNum }}</text>
  82. </view>
  83. <view class="row flex">
  84. <text class="row_title">{{ goodsItem.productInfo.attrInfo ? goodsItem.productInfo.attrInfo.suk : '' }}</text>
  85. <text class="attr-box">x {{ goodsItem.cart_num }}</text>
  86. </view>
  87. </view>
  88. </view>
  89. <view class="price-box">
  90. <text class="num">{{ item.cartInfo.length }}</text>
  91. 件商品 邮费
  92. <text class="price">{{ moneyNum(item.pay_postage) }}</text>
  93. 实付款
  94. <text class="price">{{ moneyNum(item.pay_price) }}</text>
  95. </view>
  96. <view class="action-box b-t">
  97. <button v-if="item.stateTip == '待支付'" @click.stop="orderPay(item)" class="action-btn recom">立即支付</button>
  98. <!-- <button v-if="item._status._title == '待收货'" @click.stop="orderTake(item, index)" class="action-btn">确认收货</button> -->
  99. </view>
  100. </view>
  101. <uni-load-more :status="tabItem.loadingType"></uni-load-more>
  102. </scroll-view>
  103. </swiper-item>
  104. </swiper>
  105. <!-- <u-tabbar activeColor="#f42b4e" v-model="current" :list="tabbar" :mid-button="true"></u-tabbar> -->
  106. </view>
  107. </template>
  108. <script>
  109. import uniLoadMore from '@/components/uni-load-more/uni-load-more.vue';
  110. import empty from '@/components/empty';
  111. import { orderList, orderCancel, orderDel, orderTake, adopt, user_auction_order } from '@/api/order.js';
  112. import { tabbar } from '@/utils/tabbar.js';
  113. export default {
  114. components: {
  115. uniLoadMore,
  116. empty
  117. },
  118. data() {
  119. return {
  120. height: '', //第一层swiper高度
  121. tabbar: tabbar,
  122. current: 1, //底部tabar选中的icon对象
  123. currentIndex: 0, //当前选中的第一级0为我要买单,1我要卖单
  124. tabCurrentIndex: 0, //当前选中的第二级别我要买单选中项
  125. tabCurrentIndex1: 0, //当前选中的第二级别我要卖单选中项
  126. maiList: [
  127. {
  128. title: '我的买单'
  129. },
  130. {
  131. title: '我的卖单'
  132. }
  133. ],
  134. navList: [
  135. {
  136. state: 0,
  137. text: '已过期',
  138. loadingType: 'more',
  139. orderList: [],
  140. page: 1, //当前页数
  141. limit: 10 //每次信息条数
  142. },
  143. {
  144. state: 1,
  145. text: '待支付',
  146. loadingType: 'more',
  147. orderList: [],
  148. page: 1, //当前页数
  149. limit: 10 //每次信息条数
  150. },
  151. {
  152. state: 2,
  153. text: '待审核',
  154. loadingType: 'more',
  155. orderList: [],
  156. page: 1, //当前页数
  157. limit: 10 //每次信息条数
  158. },
  159. {
  160. state: 3,
  161. text: '已完成',
  162. loadingType: 'more',
  163. orderList: [],
  164. page: 1, //当前页数
  165. limit: 10 //每次信息条数
  166. }
  167. ],
  168. navList1: [
  169. {
  170. state: 0,
  171. text: '全部',
  172. loadingType: 'more',
  173. orderList: [],
  174. page: 1, //当前页数
  175. limit: 10 //每次信息条数
  176. },
  177. {
  178. state: 1,
  179. text: '售卖中',
  180. loadingType: 'more',
  181. orderList: [],
  182. page: 1, //当前页数
  183. limit: 10 //每次信息条数
  184. },
  185. {
  186. state: 2,
  187. text: '待支付',
  188. loadingType: 'more',
  189. orderList: [],
  190. page: 1, //当前页数
  191. limit: 10 //每次信息条数
  192. },
  193. {
  194. state: 3,
  195. text: '待放货',
  196. loadingType: 'more',
  197. orderList: [],
  198. page: 1, //当前页数
  199. limit: 10 //每次信息条数
  200. },
  201. {
  202. state: 4,
  203. text: '已完成',
  204. loadingType: 'more',
  205. orderList: [],
  206. page: 1, //当前页数
  207. limit: 10 //每次信息条数
  208. }
  209. ]
  210. };
  211. },
  212. computed: {
  213. currentAuto() {
  214. if (this.currentIndex == 0) {
  215. return this.tabCurrentIndex;
  216. }
  217. if (this.currentIndex == 1) {
  218. return this.tabCurrentIndex1;
  219. }
  220. }
  221. },
  222. onLoad(options) {
  223. /**
  224. * 修复app端点击除全部订单外的按钮进入时不加载数据的问题
  225. * 替换onLoad下代码即可
  226. */
  227. this.tabCurrentIndex = +options.state || 0;
  228. // #ifndef MP
  229. this.loadData();
  230. // #endif
  231. // #ifdef MP
  232. if (options.state == 0) {
  233. this.loadData();
  234. }
  235. // #endif
  236. },
  237. // #ifdef APP-PLUS || H5
  238. onBackPress(e) {
  239. uni.switchTab({
  240. url: '/pages/user/user'
  241. });
  242. return true;
  243. },
  244. // #endif
  245. filters: {
  246. moneyNum(value) {
  247. return +value;
  248. }
  249. },
  250. // 页面加载完获取swiper高度
  251. onReady(res) {
  252. var obj = this;
  253. uni.getSystemInfo({
  254. success: resu => {
  255. const query = uni.createSelectorQuery();
  256. query.select('.swiper-box-one').boundingClientRect();
  257. query.exec(function(res) {
  258. console.log(res, 'ddddddddddddd');
  259. obj.height = resu.windowHeight - res[0].top + 'px';
  260. console.log('打印页面的剩余高度', obj.height);
  261. });
  262. },
  263. fail: res => {}
  264. });
  265. },
  266. methods: {
  267. //顶部tab点击
  268. tabClick(index, type) {
  269. if (type == 0) {
  270. this.tabCurrentIndex = index;
  271. }
  272. if (type == 1) {
  273. this.tabCurrentIndex1 = index;
  274. }
  275. },
  276. navGo(index) {
  277. this.currentIndex = index;
  278. console.log(this.currentIndex, '点击');
  279. },
  280. // 转换金额为数字
  281. moneyNum(value) {
  282. return +value;
  283. },
  284. // 确认收货
  285. orderTake(item, index) {
  286. let obj = this;
  287. uni.showModal({
  288. title: '是否确认收货?',
  289. success: () => {
  290. orderTake({
  291. uni: item.order_id
  292. })
  293. .then(e => {
  294. obj.navList[obj.tabCurrentIndex].orderList.splice(index, 1);
  295. uni.showToast({
  296. title: '收货成功'
  297. });
  298. })
  299. .catch(e => {
  300. console.log(e);
  301. });
  302. }
  303. });
  304. },
  305. //跳转到订单详情
  306. goToOrderDetail(e) {
  307. uni.navigateTo({
  308. url: '/pages/order/orderDetail?id=' + e.order_id
  309. });
  310. },
  311. // 申请退款
  312. orderRefund(e) {
  313. uni.navigateTo({
  314. url: '/pages/order/orderRefund?id=' + e.order_id
  315. });
  316. },
  317. // 订单支付
  318. orderPay(e) {
  319. uni.navigateTo({
  320. url: '/pages/hall/hallpay?ordid=' + e.order_id
  321. });
  322. },
  323. //获取订单列表
  324. loadData(source) {
  325. //这里是将订单挂载到tab列表下
  326. let index, navItem;
  327. if (this.currentIndex == 0) {
  328. index = this.tabCurrentIndex;
  329. navItem = this.navList[index];
  330. }
  331. if (this.currentIndex == 1) {
  332. index = this.tabCurrentIndex1;
  333. navItem = this.navList1[index];
  334. }
  335. let state = navItem.state;
  336. if (source === 'tabChange' && navItem.loaded === true) {
  337. //tab切换只有第一次需要加载数据
  338. return;
  339. }
  340. if (navItem.loadingType === 'loading') {
  341. //防止重复加载
  342. return;
  343. }
  344. if (navItem.loadingType === 'noMore') {
  345. //防止重复加载
  346. return;
  347. }
  348. // 修改当前对象状态为加载中
  349. navItem.loadingType = 'loading';
  350. user_auction_order({
  351. type: state,
  352. page: navItem.page,
  353. limit: navItem.limit
  354. })
  355. .then(({ data }) => {
  356. console.log(data);
  357. let arr = data.map(e => {
  358. let b = this.orderStateExp(e.status);
  359. e.stateTip = b.stateTip;
  360. e.stateTipColor = b.stateTipColor;
  361. return e;
  362. });
  363. navItem.orderList = navItem.orderList.concat(arr);
  364. // console.log(navItem.orderList);
  365. navItem.page++;
  366. if (navItem.limit == data.length) {
  367. //判断是否还有数据, 有改为 more, 没有改为noMore
  368. navItem.loadingType = 'more';
  369. return;
  370. } else {
  371. //判断是否还有数据, 有改为 more, 没有改为noMore
  372. navItem.loadingType = 'noMore';
  373. }
  374. uni.hideLoading();
  375. this.$set(navItem, 'loaded', true);
  376. })
  377. .catch(e => {
  378. console.log(e);
  379. });
  380. },
  381. //swiper 切换
  382. changeTab(e) {
  383. if (this.currentIndex == 0) {
  384. this.tabCurrentIndex = e.target.current;
  385. }
  386. if (this.currentIndex == 1) {
  387. this.tabCurrentIndex1 = e.target.current;
  388. }
  389. this.loadData('tabChange');
  390. },
  391. //删除订单
  392. deleteOrder(index) {
  393. uni.showLoading({
  394. title: '请稍后'
  395. });
  396. setTimeout(() => {
  397. this.navList[this.tabCurrentIndex].orderList.splice(index, 1);
  398. uni.hideLoading();
  399. }, 600);
  400. },
  401. //取消订单
  402. cancelOrder(item) {
  403. uni.showModal({
  404. title: '订单取消',
  405. content: '是否取消订单?',
  406. success: e => {
  407. if (e.confirm) {
  408. uni.showLoading({
  409. title: '请稍后'
  410. });
  411. orderCancel({
  412. id: item.order_id
  413. })
  414. .then(e => {
  415. uni.showToast({
  416. title: '取消成功',
  417. duration: 2000,
  418. position: 'top'
  419. });
  420. })
  421. .catch(e => {
  422. console.log(e);
  423. });
  424. //取消订单后删除待付款中该项
  425. let list = this.navList[this.tabCurrentIndex].orderList;
  426. let index = list.findIndex(val => val.id === item.id);
  427. index !== -1 && list.splice(index, 1);
  428. uni.hideLoading();
  429. }
  430. }
  431. });
  432. },
  433. //订单状态文字和颜色
  434. orderStateExp(state) {
  435. let stateTip = '',
  436. stateTipColor = '#fa436a';
  437. switch (+state) {
  438. case 0:
  439. stateTip = '已过期';
  440. break;
  441. case 1:
  442. stateTip = '待支付';
  443. break;
  444. case 2:
  445. stateTip = '待审核';
  446. break;
  447. case 3:
  448. stateTip = '已完成';
  449. break;
  450. case 9:
  451. stateTip = '订单已关闭';
  452. stateTipColor = '#909399';
  453. break;
  454. //更多自定义
  455. }
  456. return {
  457. stateTip,
  458. stateTipColor
  459. };
  460. }
  461. }
  462. };
  463. </script>
  464. <style lang="scss">
  465. page,
  466. .content {
  467. background: $page-color-base;
  468. height: 100%;
  469. }
  470. .order-title {
  471. width: 750rpx;
  472. height: 135px;
  473. // background: linear-gradient(-41deg, rgba(60, 237, 237, 0.99), #04B8FF, #375AFE);
  474. background: url(../../static/img/order99.png) repeat-x 0;
  475. display: flex;
  476. flex-direction: column;
  477. // padding: 50rpx 0;
  478. text-align: center;
  479. text {
  480. margin: 30px 0;
  481. font-size: 17px;
  482. font-family: PingFang SC;
  483. font-weight: bold;
  484. color: #ffffff;
  485. }
  486. .roder-content {
  487. display: flex;
  488. justify-content: space-around;
  489. .left {
  490. width: 168px;
  491. height: 40px;
  492. line-height: 40px;
  493. border: 1px solid #ffffff;
  494. border-radius: 5px;
  495. text-align: center;
  496. font-size: 15px;
  497. font-family: PingFang SC;
  498. font-weight: bold;
  499. color: #ffffff;
  500. background: #dc262b;
  501. }
  502. .current {
  503. color: #dc262b;
  504. background: #ffffff;
  505. }
  506. }
  507. }
  508. .swiper-box {
  509. background: red;
  510. }
  511. .list-scroll-content {
  512. height: 100%;
  513. }
  514. .uni-swiper-item {
  515. height: auto;
  516. }
  517. .navbar {
  518. display: flex;
  519. height: 40px;
  520. padding: 0 5px;
  521. background: #fff;
  522. box-shadow: 0 1px 5px rgba(0, 0, 0, 0.06);
  523. position: relative;
  524. z-index: 10;
  525. .nav-item {
  526. flex: 1;
  527. display: flex;
  528. justify-content: center;
  529. align-items: center;
  530. height: 100%;
  531. font-size: 15px;
  532. color: $font-color-dark;
  533. position: relative;
  534. &.current {
  535. color: $base-color;
  536. &:after {
  537. content: '';
  538. position: absolute;
  539. left: 50%;
  540. bottom: 0;
  541. transform: translateX(-50%);
  542. width: 44px;
  543. height: 0;
  544. border-bottom: 2px solid $base-color;
  545. }
  546. }
  547. }
  548. }
  549. .order-item {
  550. display: flex;
  551. flex-direction: column;
  552. background: #fff;
  553. margin-top: 16rpx;
  554. .i-top {
  555. display: flex;
  556. align-items: center;
  557. height: 80rpx;
  558. font-size: $font-base;
  559. color: $font-color-dark;
  560. position: relative;
  561. padding: 0 30rpx;
  562. .time {
  563. flex: 1;
  564. }
  565. .state {
  566. color: $base-color;
  567. }
  568. .del-btn {
  569. padding: 10rpx 0 10rpx 36rpx;
  570. font-size: $font-lg;
  571. color: $font-color-light;
  572. position: relative;
  573. &:after {
  574. content: '';
  575. width: 0;
  576. height: 30rpx;
  577. border-left: 1px solid $border-color-dark;
  578. position: absolute;
  579. left: 20rpx;
  580. top: 50%;
  581. transform: translateY(-50%);
  582. }
  583. }
  584. }
  585. /* 多条商品 */
  586. .goods-box {
  587. height: 160rpx;
  588. padding: 20rpx 0;
  589. white-space: nowrap;
  590. .goods-item {
  591. width: 120rpx;
  592. height: 120rpx;
  593. display: inline-block;
  594. margin-right: 24rpx;
  595. }
  596. .goods-img {
  597. display: block;
  598. width: 100%;
  599. height: 100%;
  600. }
  601. }
  602. /* 单条商品 */
  603. .goods-box-single {
  604. display: flex;
  605. padding: 20rpx 30rpx;
  606. background: #f7f7f7;
  607. .goods-img {
  608. display: block;
  609. width: 120rpx;
  610. height: 120rpx;
  611. }
  612. .right {
  613. flex: 1;
  614. display: flex;
  615. flex-direction: column;
  616. padding: 0 0 0 24rpx;
  617. overflow: hidden;
  618. .row {
  619. margin-top: 10rpx;
  620. }
  621. .row_title {
  622. padding: 5rpx 10rpx;
  623. background-color: #dddddd;
  624. border-radius: 10rpx;
  625. font-size: 22rpx;
  626. color: #ffffff;
  627. }
  628. .title {
  629. font-size: $font-base + 2rpx;
  630. color: $font-color-dark;
  631. line-height: 1;
  632. width: 80%;
  633. }
  634. .attr-box {
  635. display: flex;
  636. justify-content: flex-end;
  637. font-size: $font-sm + 2rpx;
  638. color: $font-color-light;
  639. }
  640. .price {
  641. display: inline;
  642. font-size: $font-base + 2rpx;
  643. color: $font-color-dark;
  644. &:before {
  645. content: '¥';
  646. font-size: $font-sm;
  647. }
  648. }
  649. }
  650. }
  651. .price-box {
  652. display: flex;
  653. justify-content: flex-end;
  654. align-items: baseline;
  655. padding: 20rpx 30rpx ;
  656. font-size: $font-sm + 2rpx;
  657. color: $font-color-light;
  658. .num {
  659. margin: 0 8rpx;
  660. color: $font-color-dark;
  661. }
  662. .price {
  663. font-size: $font-lg;
  664. color: $font-color-dark;
  665. &:before {
  666. content: '¥';
  667. font-size: $font-sm;
  668. margin: 0 2rpx 0 8rpx;
  669. }
  670. }
  671. }
  672. .action-box {
  673. padding: 0 30rpx;
  674. display: flex;
  675. justify-content: flex-end;
  676. align-items: center;
  677. height: 100rpx;
  678. position: relative;
  679. }
  680. .action-btn {
  681. width: 160rpx;
  682. height: 60rpx;
  683. margin: 0;
  684. margin-left: 24rpx;
  685. padding: 0;
  686. text-align: center;
  687. line-height: 60rpx;
  688. font-size: $font-sm + 2rpx;
  689. color: $font-color-dark;
  690. background: #fff;
  691. border-radius: 100px;
  692. border: 2rpx solid #FD3B39;
  693. border-radius: 28px;
  694. &:after {
  695. border-radius: 100px;
  696. }
  697. &.recom {
  698. color: $base-color;
  699. &:after {
  700. border-color: $base-color;
  701. }
  702. }
  703. &.evaluate {
  704. color: $color-yellow;
  705. &:after {
  706. border-color: $color-yellow;
  707. }
  708. }
  709. }
  710. }
  711. /* load-more */
  712. .uni-load-more {
  713. display: flex;
  714. flex-direction: row;
  715. height: 80rpx;
  716. align-items: center;
  717. justify-content: center;
  718. }
  719. .uni-load-more__text {
  720. font-size: 28rpx;
  721. color: #999;
  722. }
  723. .uni-load-more__img {
  724. height: 24px;
  725. width: 24px;
  726. margin-right: 10px;
  727. }
  728. .uni-load-more__img > view {
  729. position: absolute;
  730. }
  731. .uni-load-more__img > view view {
  732. width: 6px;
  733. height: 2px;
  734. border-top-left-radius: 1px;
  735. border-bottom-left-radius: 1px;
  736. background: #999;
  737. position: absolute;
  738. opacity: 0.2;
  739. transform-origin: 50%;
  740. animation: load 1.56s ease infinite;
  741. }
  742. .uni-load-more__img > view view:nth-child(1) {
  743. transform: rotate(90deg);
  744. top: 2px;
  745. left: 9px;
  746. }
  747. .uni-load-more__img > view view:nth-child(2) {
  748. transform: rotate(180deg);
  749. top: 11px;
  750. right: 0;
  751. }
  752. .uni-load-more__img > view view:nth-child(3) {
  753. transform: rotate(270deg);
  754. bottom: 2px;
  755. left: 9px;
  756. }
  757. .uni-load-more__img > view view:nth-child(4) {
  758. top: 11px;
  759. left: 0;
  760. }
  761. .load1,
  762. .load2,
  763. .load3 {
  764. height: 24px;
  765. width: 24px;
  766. }
  767. .load2 {
  768. transform: rotate(30deg);
  769. }
  770. .load3 {
  771. transform: rotate(60deg);
  772. }
  773. .load1 view:nth-child(1) {
  774. animation-delay: 0s;
  775. }
  776. .load2 view:nth-child(1) {
  777. animation-delay: 0.13s;
  778. }
  779. .load3 view:nth-child(1) {
  780. animation-delay: 0.26s;
  781. }
  782. .load1 view:nth-child(2) {
  783. animation-delay: 0.39s;
  784. }
  785. .load2 view:nth-child(2) {
  786. animation-delay: 0.52s;
  787. }
  788. .load3 view:nth-child(2) {
  789. animation-delay: 0.65s;
  790. }
  791. .load1 view:nth-child(3) {
  792. animation-delay: 0.78s;
  793. }
  794. .load2 view:nth-child(3) {
  795. animation-delay: 0.91s;
  796. }
  797. .load3 view:nth-child(3) {
  798. animation-delay: 1.04s;
  799. }
  800. .load1 view:nth-child(4) {
  801. animation-delay: 1.17s;
  802. }
  803. .load2 view:nth-child(4) {
  804. animation-delay: 1.3s;
  805. }
  806. .load3 view:nth-child(4) {
  807. animation-delay: 1.43s;
  808. }
  809. @-webkit-keyframes load {
  810. 0% {
  811. opacity: 1;
  812. }
  813. 100% {
  814. opacity: 0.2;
  815. }
  816. }
  817. .swiper-box-one {
  818. height: calc(100% - 175px);
  819. }
  820. </style>