order.vue 20 KB

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