order.vue 26 KB

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