order.vue 18 KB

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