order.vue 26 KB

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