order.vue 21 KB

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