order.vue 21 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016
  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="orderPay(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">13245678911</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. orderPay(e) {
  308. console.log(e);
  309. adopt({order_id: e.order_id}).then(({data}) =>{
  310. this.loadData()
  311. })
  312. },
  313. //获取订单列表
  314. loadData(source) {
  315. //这里是将订单挂载到tab列表下
  316. let index, navItem;
  317. if (this.currentIndex == 0) {
  318. index = this.tabCurrentIndex;
  319. navItem = this.navList[index];
  320. }
  321. if (this.currentIndex == 1) {
  322. index = this.tabCurrentIndex1;
  323. navItem = this.navList1[index];
  324. }
  325. let state = navItem.state;
  326. if (source === 'tabChange' && navItem.loaded === true) {
  327. //tab切换只有第一次需要加载数据
  328. return;
  329. }
  330. if (navItem.loadingType === 'loading') {
  331. //防止重复加载
  332. return;
  333. }
  334. if (navItem.loadingType === 'noMore') {
  335. //防止重复加载
  336. return;
  337. }
  338. // 修改当前对象状态为加载中
  339. navItem.loadingType = 'loading';
  340. if (this.currentIndex == 0) {
  341. user_auction_order({
  342. type: state,
  343. page: navItem.page,
  344. limit: navItem.limit
  345. })
  346. .then(({ data }) => {
  347. console.log(data);
  348. let arr = data.map(e => {
  349. let b = this.orderStateExp(e.status);
  350. e.stateTip = b.stateTip;
  351. e.stateTipColor = b.stateTipColor;
  352. return e;
  353. });
  354. navItem.orderList = navItem.orderList.concat(arr);
  355. // console.log(navItem.orderList);
  356. navItem.page++;
  357. if (navItem.limit == data.length) {
  358. //判断是否还有数据, 有改为 more, 没有改为noMore
  359. navItem.loadingType = 'more';
  360. return;
  361. } else {
  362. //判断是否还有数据, 有改为 more, 没有改为noMore
  363. navItem.loadingType = 'noMore';
  364. }
  365. uni.hideLoading();
  366. this.$set(navItem, 'loaded', true);
  367. })
  368. .catch(e => {
  369. console.log(e);
  370. });
  371. }
  372. if (this.currentIndex == 1) {
  373. seller({
  374. type: state,
  375. page: navItem.page,
  376. limit: navItem.limit
  377. })
  378. .then(({ data }) => {
  379. console.log(data);
  380. let arr = data.map(e => {
  381. let b = this.orderStateExp(e.status);
  382. e.stateTip = b.stateTip;
  383. e.stateTipColor = b.stateTipColor;
  384. return e;
  385. });
  386. navItem.orderList = navItem.orderList.concat(arr);
  387. // console.log(navItem.orderList);
  388. navItem.page++;
  389. if (navItem.limit == data.length) {
  390. //判断是否还有数据, 有改为 more, 没有改为noMore
  391. navItem.loadingType = 'more';
  392. return;
  393. } else {
  394. //判断是否还有数据, 有改为 more, 没有改为noMore
  395. navItem.loadingType = 'noMore';
  396. }
  397. uni.hideLoading();
  398. this.$set(navItem, 'loaded', true);
  399. })
  400. .catch(e => {
  401. console.log(e);
  402. });
  403. }
  404. },
  405. //swiper 切换
  406. changeTab(e) {
  407. if (this.currentIndex == 0) {
  408. this.tabCurrentIndex = e.target.current;
  409. }
  410. if (this.currentIndex == 1) {
  411. this.tabCurrentIndex1 = e.target.current;
  412. }
  413. this.loadData('tabChange');
  414. },
  415. //删除订单
  416. deleteOrder(index) {
  417. uni.showLoading({
  418. title: '请稍后'
  419. });
  420. setTimeout(() => {
  421. this.navList[this.tabCurrentIndex].orderList.splice(index, 1);
  422. uni.hideLoading();
  423. }, 600);
  424. },
  425. //取消订单
  426. cancelOrder(item) {
  427. uni.showModal({
  428. title: '订单取消',
  429. content: '是否取消订单?',
  430. success: e => {
  431. if (e.confirm) {
  432. uni.showLoading({
  433. title: '请稍后'
  434. });
  435. orderCancel({
  436. id: item.order_id
  437. })
  438. .then(e => {
  439. uni.showToast({
  440. title: '取消成功',
  441. duration: 2000,
  442. position: 'top'
  443. });
  444. })
  445. .catch(e => {
  446. console.log(e);
  447. });
  448. //取消订单后删除待付款中该项
  449. let list = this.navList[this.tabCurrentIndex].orderList;
  450. let index = list.findIndex(val => val.id === item.id);
  451. index !== -1 && list.splice(index, 1);
  452. uni.hideLoading();
  453. }
  454. }
  455. });
  456. },
  457. //订单状态文字和颜色
  458. orderStateExp(state) {
  459. let stateTip = '',
  460. stateTipColor = '#fa436a';
  461. switch (+state) {
  462. case 0:
  463. stateTip = '已过期';
  464. break;
  465. case 1:
  466. stateTip = '待支付';
  467. break;
  468. case 2:
  469. stateTip = '待审核';
  470. break;
  471. case 3:
  472. stateTip = '已完成';
  473. break;
  474. case 9:
  475. stateTip = '订单已关闭';
  476. stateTipColor = '#909399';
  477. break;
  478. //更多自定义
  479. }
  480. return {
  481. stateTip,
  482. stateTipColor
  483. };
  484. }
  485. }
  486. };
  487. </script>
  488. <style lang="scss">
  489. page,
  490. .content {
  491. background: $page-color-base;
  492. height: 100%;
  493. }
  494. .order-title {
  495. width: 750rpx;
  496. height: 135px;
  497. // background: linear-gradient(-41deg, rgba(60, 237, 237, 0.99), #04B8FF, #375AFE);
  498. background: url(../../static/img/order99.png) repeat-x 0;
  499. display: flex;
  500. flex-direction: column;
  501. // padding: 50rpx 0;
  502. text-align: center;
  503. text {
  504. margin: 30px 0;
  505. font-size: 17px;
  506. font-family: PingFang SC;
  507. font-weight: bold;
  508. color: #ffffff;
  509. }
  510. .roder-content {
  511. display: flex;
  512. justify-content: space-around;
  513. .left {
  514. width: 168px;
  515. height: 40px;
  516. line-height: 40px;
  517. border: 1px solid #ffffff;
  518. border-radius: 5px;
  519. text-align: center;
  520. font-size: 15px;
  521. font-family: PingFang SC;
  522. font-weight: bold;
  523. color: #ffffff;
  524. background: #dc262b;
  525. }
  526. .current {
  527. color: #dc262b;
  528. background: #ffffff;
  529. }
  530. }
  531. }
  532. .swiper-box {
  533. background: red;
  534. }
  535. .list-scroll-content {
  536. height: 100%;
  537. }
  538. .uni-swiper-item {
  539. height: auto;
  540. }
  541. .navbar {
  542. display: flex;
  543. height: 40px;
  544. padding: 0 5px;
  545. background: #fff;
  546. box-shadow: 0 1px 5px rgba(0, 0, 0, 0.06);
  547. position: relative;
  548. z-index: 10;
  549. .nav-item {
  550. flex: 1;
  551. display: flex;
  552. justify-content: center;
  553. align-items: center;
  554. height: 100%;
  555. font-size: 15px;
  556. color: $font-color-dark;
  557. position: relative;
  558. &.current {
  559. color: $base-color;
  560. &:after {
  561. content: '';
  562. position: absolute;
  563. left: 50%;
  564. bottom: 0;
  565. transform: translateX(-50%);
  566. width: 44px;
  567. height: 0;
  568. border-bottom: 2px solid $base-color;
  569. }
  570. }
  571. }
  572. }
  573. .order-item {
  574. display: flex;
  575. flex-direction: column;
  576. background: #fff;
  577. margin-top: 16rpx;
  578. .i-top {
  579. display: flex;
  580. align-items: center;
  581. height: 80rpx;
  582. font-size: $font-base;
  583. color: $font-color-dark;
  584. position: relative;
  585. padding: 0 30rpx;
  586. .time {
  587. flex: 1;
  588. }
  589. .state {
  590. color: $base-color;
  591. }
  592. .del-btn {
  593. padding: 10rpx 0 10rpx 36rpx;
  594. font-size: $font-lg;
  595. color: $font-color-light;
  596. position: relative;
  597. &:after {
  598. content: '';
  599. width: 0;
  600. height: 30rpx;
  601. border-left: 1px solid $border-color-dark;
  602. position: absolute;
  603. left: 20rpx;
  604. top: 50%;
  605. transform: translateY(-50%);
  606. }
  607. }
  608. }
  609. /* 多条商品 */
  610. .goods-box {
  611. height: 160rpx;
  612. padding: 20rpx 0;
  613. white-space: nowrap;
  614. .goods-item {
  615. width: 120rpx;
  616. height: 120rpx;
  617. display: inline-block;
  618. margin-right: 24rpx;
  619. }
  620. .goods-img {
  621. display: block;
  622. width: 100%;
  623. height: 100%;
  624. }
  625. }
  626. /* 单条商品 */
  627. .goods-box-single {
  628. display: flex;
  629. padding: 20rpx 30rpx;
  630. background: #f7f7f7;
  631. .goods-img {
  632. display: block;
  633. width: 120rpx;
  634. height: 120rpx;
  635. }
  636. .right {
  637. flex: 1;
  638. display: flex;
  639. flex-direction: column;
  640. padding: 0 0 0 24rpx;
  641. overflow: hidden;
  642. .row {
  643. margin-top: 10rpx;
  644. }
  645. .row_title {
  646. padding: 5rpx 10rpx;
  647. background-color: #dddddd;
  648. border-radius: 10rpx;
  649. font-size: 22rpx;
  650. color: #ffffff;
  651. }
  652. .title {
  653. font-size: $font-base + 2rpx;
  654. color: $font-color-dark;
  655. line-height: 1;
  656. width: 80%;
  657. }
  658. .attr-box {
  659. display: flex;
  660. justify-content: flex-end;
  661. font-size: $font-sm + 2rpx;
  662. color: $font-color-light;
  663. }
  664. .price {
  665. display: inline;
  666. font-size: $font-base + 2rpx;
  667. color: $font-color-dark;
  668. &:before {
  669. content: '¥';
  670. font-size: $font-sm;
  671. }
  672. }
  673. }
  674. }
  675. .buy-box {
  676. height: 84rpx;
  677. padding: 0 22rpx;
  678. background-color: #ffffff;
  679. .buy-info {
  680. height: 100%;
  681. display: flex;
  682. align-items: center;
  683. .font {
  684. font-size: 32rpx;
  685. font-family: PingFang SC;
  686. font-weight: 500;
  687. color: #333333;
  688. }
  689. .avter {
  690. margin-left: 10rpx;
  691. width: 46rpx;
  692. height: 46rpx;
  693. border-radius: 50%;
  694. }
  695. .buy-name {
  696. margin-left: 10rpx;
  697. font-size: 32rpx;
  698. font-family: PingFang SC;
  699. font-weight: bold;
  700. color: #333333;
  701. }
  702. .phone {
  703. margin-left: 12rpx;
  704. font-size: 24rpx;
  705. font-family: PingFang SC;
  706. font-weight: 500;
  707. color: #999999;
  708. }
  709. }
  710. }
  711. .upimg {
  712. padding-left: 20rpx;
  713. padding-top: 10rpx;
  714. padding-bottom: 10rpx;
  715. display: flex;
  716. .up-tit {
  717. display: inline-block;
  718. font-size: 26rpx;
  719. font-family: PingFang SC;
  720. font-weight: 500;
  721. color: #6d7c88;
  722. }
  723. .img-wrap {
  724. width: 153rpx;
  725. height: 152rpx;
  726. border-radius: 20rpx;
  727. image {
  728. border-radius: 20rpx;
  729. width: 153rpx;
  730. height: 152rpx;
  731. background-color: #ccc;
  732. }
  733. }
  734. }
  735. .price-box {
  736. display: flex;
  737. justify-content: flex-end;
  738. align-items: baseline;
  739. padding: 20rpx 30rpx;
  740. font-size: $font-sm + 2rpx;
  741. color: $font-color-light;
  742. .num {
  743. margin: 0 8rpx;
  744. color: $font-color-dark;
  745. }
  746. .price {
  747. font-size: $font-lg;
  748. color: $font-color-dark;
  749. &:before {
  750. content: '¥';
  751. font-size: $font-sm;
  752. margin: 0 2rpx 0 8rpx;
  753. }
  754. }
  755. }
  756. .action-box {
  757. padding: 0 30rpx;
  758. display: flex;
  759. justify-content: flex-end;
  760. align-items: center;
  761. height: 100rpx;
  762. position: relative;
  763. }
  764. .refuse {
  765. margin: 0;
  766. padding: 0;
  767. width: 160rpx;
  768. height: 60rpx;
  769. border: 2rpx solid #ebebeb;
  770. border-radius: 28rpx;
  771. text-align: center;
  772. line-height: 60rpx;
  773. font-size: 26rpx;
  774. font-family: PingFang SC;
  775. font-weight: 500;
  776. color: #999999;
  777. &:after {
  778. border-radius: 100px;
  779. }
  780. &.recom {
  781. color: #999999;
  782. &:after {
  783. border-color: #999999;
  784. }
  785. }
  786. }
  787. .action-btn {
  788. width: 160rpx;
  789. height: 60rpx;
  790. margin: 0;
  791. margin-left: 24rpx;
  792. padding: 0;
  793. text-align: center;
  794. line-height: 60rpx;
  795. font-size: $font-sm + 2rpx;
  796. color: $font-color-dark;
  797. background: #fff;
  798. border-radius: 100px;
  799. border: 2rpx solid #fd3b39;
  800. border-radius: 28px;
  801. &:after {
  802. border-radius: 100px;
  803. }
  804. &.recom {
  805. color: $base-color;
  806. &:after {
  807. border-color: $base-color;
  808. }
  809. }
  810. &.evaluate {
  811. color: $color-yellow;
  812. &:after {
  813. border-color: $color-yellow;
  814. }
  815. }
  816. }
  817. }
  818. /* load-more */
  819. .uni-load-more {
  820. display: flex;
  821. flex-direction: row;
  822. height: 80rpx;
  823. align-items: center;
  824. justify-content: center;
  825. }
  826. .uni-load-more__text {
  827. font-size: 28rpx;
  828. color: #999;
  829. }
  830. .uni-load-more__img {
  831. height: 24px;
  832. width: 24px;
  833. margin-right: 10px;
  834. }
  835. .uni-load-more__img > view {
  836. position: absolute;
  837. }
  838. .uni-load-more__img > view view {
  839. width: 6px;
  840. height: 2px;
  841. border-top-left-radius: 1px;
  842. border-bottom-left-radius: 1px;
  843. background: #999;
  844. position: absolute;
  845. opacity: 0.2;
  846. transform-origin: 50%;
  847. animation: load 1.56s ease infinite;
  848. }
  849. .uni-load-more__img > view view:nth-child(1) {
  850. transform: rotate(90deg);
  851. top: 2px;
  852. left: 9px;
  853. }
  854. .uni-load-more__img > view view:nth-child(2) {
  855. transform: rotate(180deg);
  856. top: 11px;
  857. right: 0;
  858. }
  859. .uni-load-more__img > view view:nth-child(3) {
  860. transform: rotate(270deg);
  861. bottom: 2px;
  862. left: 9px;
  863. }
  864. .uni-load-more__img > view view:nth-child(4) {
  865. top: 11px;
  866. left: 0;
  867. }
  868. .load1,
  869. .load2,
  870. .load3 {
  871. height: 24px;
  872. width: 24px;
  873. }
  874. .load2 {
  875. transform: rotate(30deg);
  876. }
  877. .load3 {
  878. transform: rotate(60deg);
  879. }
  880. .load1 view:nth-child(1) {
  881. animation-delay: 0s;
  882. }
  883. .load2 view:nth-child(1) {
  884. animation-delay: 0.13s;
  885. }
  886. .load3 view:nth-child(1) {
  887. animation-delay: 0.26s;
  888. }
  889. .load1 view:nth-child(2) {
  890. animation-delay: 0.39s;
  891. }
  892. .load2 view:nth-child(2) {
  893. animation-delay: 0.52s;
  894. }
  895. .load3 view:nth-child(2) {
  896. animation-delay: 0.65s;
  897. }
  898. .load1 view:nth-child(3) {
  899. animation-delay: 0.78s;
  900. }
  901. .load2 view:nth-child(3) {
  902. animation-delay: 0.91s;
  903. }
  904. .load3 view:nth-child(3) {
  905. animation-delay: 1.04s;
  906. }
  907. .load1 view:nth-child(4) {
  908. animation-delay: 1.17s;
  909. }
  910. .load2 view:nth-child(4) {
  911. animation-delay: 1.3s;
  912. }
  913. .load3 view:nth-child(4) {
  914. animation-delay: 1.43s;
  915. }
  916. @-webkit-keyframes load {
  917. 0% {
  918. opacity: 1;
  919. }
  920. 100% {
  921. opacity: 0.2;
  922. }
  923. }
  924. .swiper-box-one {
  925. height: calc(100% - 175px);
  926. }
  927. </style>