order.vue 25 KB

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