order.vue 20 KB

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