order.vue 26 KB

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