order.vue 25 KB

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