order.vue 21 KB

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