order.vue 18 KB

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