order.vue 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038
  1. <template>
  2. <view :class="[AppTheme]" class="content">
  3. <!-- #ifdef APP-PLUS || MP-WEIXIN -->
  4. <u-sticky offsetTop="0" style="z-index: 10;">
  5. <!-- #endif -->
  6. <!-- #ifdef H5 -->
  7. <u-sticky offsetTop="-44" style="z-index: 10;">
  8. <!-- #endif -->
  9. <view class="navbar">
  10. <u-tabs ref="uTabs" :list="navList" :activeStyle="{
  11. color: primary,
  12. transform: 'scale(1.05)'
  13. }" :inactiveStyle="{
  14. color: '#606266',
  15. transform: 'scale(1)'
  16. }" lineWidth="30" :scrollable="false" :lineColor="primary" :current="current" @click="tabClick">
  17. </u-tabs>
  18. </view>
  19. </u-sticky>
  20. <swiper :current="tabCurrentIndex" class="swiper-box" @change="changeTab">
  21. <swiper-item class="tab-content" v-for="(tabItem, tabIndex) in navList" :key="tabIndex"
  22. @touchmove.stop="">
  23. <scroll-view class="list-scroll-content" :refresher-enabled="true" :refresher-triggered="triggered"
  24. @refresherrefresh="refresh" scroll-y @scrolltolower="handle">
  25. <view v-for="(item, index) in orderList" :key="index" class="order-item">
  26. <view class="i-top b-b">
  27. <text class="time">订单编号:{{ item.oid }}</text>
  28. <text class="state" :style="{ color: item.stateTipColor }">{{ item.stateTip }}</text>
  29. <text v-if="item.state === 9" class="del-btn yticon icon-iconfontshanchu1"
  30. @click="deleteOrder(index)"></text>
  31. </view>
  32. <scroll-view v-if="item.items.length > 1" class="goods-box"
  33. :class="[item.type === 5 ? 'goods-box2' : 'goods-box']" scroll-x>
  34. <view v-for="(goodsItem, goodsIndex) in item.items" :key="goodsIndex" class="goods-item"
  35. :class="[item.type === 5 ? 'goods-item2' : 'goods-item']">
  36. <image class="goods-img" mode="aspectFit"
  37. :class="[item.type === 5 ? 'goods-img2' : 'goods-img']" :src=" goodsItem.pic">
  38. </image>
  39. <view class="right_mess" v-if="item.type === 5">
  40. <view class="right_mess_p1">{{ goodsItem.name }}×{{ goodsItem.num }}</view>
  41. <view class="right_mess_p2"></view>
  42. <view class="right_mess_p3 text-neutral">金额:{{ goodsItem.price }}元</view>
  43. </view>
  44. </view>
  45. </scroll-view>
  46. <view v-if="item.items.length === 1" class="goods-box-single"
  47. v-for="(goodsItem, goodsIndex) in item.items" :key="goodsIndex">
  48. <image class="goods-img" :src=" goodsItem.pic" mode="aspectFill"></image>
  49. <view class="right">
  50. <text class="title clamp">{{ goodsItem.name }}</text>
  51. <text class="attr-box">x {{ goodsItem.num }}</text>
  52. <text class="price text-neutral">{{ goodsItem.price }}</text>
  53. </view>
  54. </view>
  55. <view class="price-box">
  56. <text class="num">{{ item.totalnum }}</text>
  57. 件商品 运费
  58. <text class="num price text-neutral">{{ item.yf }}</text>
  59. 实付款
  60. <text class="price text-neutral">{{ Number(item.payprice) }}</text>
  61. </view>
  62. <view class="action-box b-t">
  63. <button class="action-btn" @click="cancelOrder(item)"
  64. v-if="item.status == 1 && item.type != 4">取消订单</button>
  65. <button class="action-btn recom text-primary border-primary"
  66. @click="goOrderDetail(item)">查看订单{{item.sid}}</button>
  67. <button class="action-btn recom text-primary border-primary" @click="pay(item)"
  68. v-if="item.status == 1 && item.type != 4">去付款</button>
  69. <button class="action-btn recom text-primary border-primary"
  70. @click="orderTuikuan(item,index)"
  71. v-if="item.status == 2 && item.type != 3 && item.type != 4 && item.type != 5">
  72. 我要退款
  73. </button>
  74. <button class="action-btn recom text-primary border-primary"
  75. @click="orderTuihuo(item,index)"
  76. v-if="item.status == 3 && info.isth == 1 && item.type != 3 && item.type != 5">
  77. 我要退货
  78. </button>
  79. <button class="action-btn recom text-primary border-primary"
  80. @click="orderPickupSuccess(item)"
  81. v-if="item.status == 3 && item.delivery == 'since' && item.type != 4">
  82. 确认自提
  83. </button>
  84. <button class="action-btn recom text-primary border-primary" @click="logistics(item)"
  85. v-if="item.status == 3 && item.delivery != 'since'">查看物流</button>
  86. <button class="action-btn recom text-primary border-primary"
  87. @click="orderOK(item,index)"
  88. v-if="item.status == 3 && item.delivery != 'since'">确认收货</button>
  89. </view>
  90. </view>
  91. <u-loadmore style="margin-top: 30rpx;" :status="loadingType" />
  92. </scroll-view>
  93. </swiper-item>
  94. </swiper>
  95. <!-- 退款弹出层 -->
  96. <u-popup :show="show_tk" mode="center" round="10" width="700rpx" height="300px" @close="close_tuikuan">
  97. <view style="padding: 10px;">
  98. <view class="i-top b-b"><text class="time" style="text-align: center;font-size: 36rpx;">退款原因</text>
  99. </view>
  100. <view class="b-b">
  101. <!-- <view class=" illustrate">退款说明:</view> -->
  102. <view class="box-conter">
  103. <textarea style=" color: #303133; padding:10rpx; width: 100%;" :auto-height="true"
  104. v-model="tuikuan_explain" placeholder="请输入退款理由或货品名称" auto-height />
  105. </view>
  106. </view>
  107. <view class="tui-wrap">
  108. <view class="tui-btn" style="background: #Ccc !important; box-shadow: none;border: none;"
  109. @click="close_tk">取消</view>
  110. <view class="tui-btn bg-linear-gradient" @click="tuikuan_btn()">确认退款</view>
  111. </view>
  112. </view>
  113. </u-popup>
  114. <!-- 退货弹出层 -->
  115. <u-popup :show="show_th" mode="center" round="10" width="700rpx" height="450px" @close="close_tuihuo">
  116. <view style="padding: 10px;">
  117. <view class="tuihuo">
  118. <text style="text-align: center;font-size: 36rpx;">退货申请表</text>
  119. </view>
  120. <view class="i-top b-b">
  121. <text class="time">退货金额:</text>
  122. <u-input v-model="tuihuo_money" :trim="true" :clearable="false" style="flex-grow: 1;"
  123. type="digit" placeholder="必填" />
  124. </view>
  125. <view class="i-top b-b">
  126. <text class="time">快递公司:</text>
  127. <u-input v-model="tuihuo_gs" :trim="true" :clearable="false" style="flex-grow: 1;" type="text"
  128. placeholder="必填" />
  129. </view>
  130. <view class="i-top b-b">
  131. <text class="time">快递单号:</text>
  132. <u-input v-model="tuihuo_order" :trim="true" :clearable="false" style="flex-grow: 1;"
  133. type="digit" placeholder="必填" />
  134. </view>
  135. <view class="i-top b-b">
  136. <text class="time">退货说明:</text>
  137. <u-input v-model="tuihuo_explain" :trim="true" :clearable="false" style="flex-grow: 1;"
  138. type="text" placeholder="请输入退货理由或货品名称" />
  139. </view>
  140. <view class="tui-wrap">
  141. <view class="tui-btn" style="background: #Ccc !important; box-shadow: none;border: none;"
  142. @click="close_th">取消</view>
  143. <view class="tui-btn bg-linear-gradient" @click="tuihuo_btn()">确认退货</view>
  144. </view>
  145. </view>
  146. </u-popup>
  147. <payment ref="payment" :channel="1" :alipay="true" :weixinpay="true" :zhtpay="true"></payment>
  148. </view>
  149. </template>
  150. <script>
  151. import order from '@/api/order/index.js';
  152. import mall from '@/api/mall/index.js';
  153. export default {
  154. data() {
  155. return {
  156. _freshing: false,
  157. triggered: true,
  158. primary: this.$theme.primary,
  159. current: 0,
  160. info: {},
  161. settingFile: getApp().globalData.siteinfo,
  162. tabCurrentIndex: 0,
  163. orderList: [],
  164. page: 1,
  165. pagesize: 5,
  166. ifOnShow: false,
  167. show_tk: false,
  168. show_th: false,
  169. loadingType: 'more',
  170. tuihuo_money: '', //退货金额
  171. tuihuo_gs: '', //快递公司
  172. tuihuo_order: '', //快递单号
  173. tuihuo_explain: '', //退货说明
  174. tuikuan_explain: '', //退款说明
  175. th_info: '',
  176. tk_info: '',
  177. navList: [{
  178. state: 0,
  179. name: '全部',
  180. loadingType: 'more'
  181. },
  182. {
  183. state: 1,
  184. name: '待付款',
  185. loadingType: 'more'
  186. },
  187. {
  188. state: 2,
  189. name: '待发货',
  190. loadingType: 'more'
  191. },
  192. {
  193. state: 3,
  194. name: '待收货',
  195. loadingType: 'more'
  196. },
  197. {
  198. state: 4,
  199. name: '已完成',
  200. loadingType: 'more'
  201. }
  202. ],
  203. orderIndex: 0
  204. };
  205. },
  206. onLoad(options) {
  207. this.page = 1;
  208. this.tabCurrentIndex = +options.state;
  209. this.current = options.state
  210. this.orderType(options.state);
  211. },
  212. methods: {
  213. refresh() { //自定义下拉刷新
  214. console.log('下拉刷新了')
  215. if (this._freshing) return;
  216. this._freshing = true;
  217. //调用获取数据的函数
  218. // this.getData();
  219. if (!this.triggered)
  220. //界面下拉触发,triggered可能不是true,要设为true
  221. this.triggered = true;
  222. setTimeout(() => {
  223. this.triggered = false;
  224. this._freshing = false;
  225. uni.stopPullDownRefresh()
  226. }, 2000);
  227. },
  228. /* 查看物流 */
  229. logistics(item) {
  230. uni.navigateTo({
  231. url: '/pagesD/pages/order/logistics/logistics?id=' + item.id + '&sid=' + item.sid
  232. });
  233. },
  234. /* 监听退款 清空输入过的信息 */
  235. close_tuikuan() {
  236. (this.tuikuan_explain = ''), //退款说明
  237. console.log('关闭了退款');
  238. },
  239. /* 关闭退款窗口 */
  240. close_tk() {
  241. this.show_tk = false;
  242. },
  243. /* 退款 */
  244. tuikuan_btn() {
  245. let that = this;
  246. let tmplIdsone = that.$config.temlist;
  247. if (tmplIdsone) {
  248. that.$until.requestSubscribeMessage([
  249. tmplIdsone['returnReminder']
  250. ], tmplIdsone, function() {
  251. that.orderTuikuanSave();
  252. });
  253. } else {
  254. that.orderTuikuanSave();
  255. }
  256. },
  257. orderTuikuanSave() {
  258. let that = this;
  259. let item = that.tk_info;
  260. order.orderTuikuanSave({
  261. sid: item.sid,
  262. orderid: item.id,
  263. tuikuanmsg: encodeURI(this.tuikuan_explain)
  264. })
  265. .then(res => {
  266. uni.hideLoading();
  267. this.$api.msg(res.msg);
  268. if (res.status == 200) {
  269. this.show_tk = false;
  270. this.orderList[this.orderIndex].status = 0
  271. }
  272. });
  273. },
  274. /* 监听退货 清空输入过的信息 */
  275. close_tuihuo() {
  276. (this.tuihuo_money = ''), //退货金额
  277. (this.tuihuo_gs = ''), //快递公司
  278. (this.tuihuo_order = ''), //快递单号
  279. (this.tuihuo_explain = ''), //退货说明
  280. console.log('关闭了退货');
  281. },
  282. /* 关闭退货窗口 */
  283. close_th() {
  284. this.show_th = false;
  285. },
  286. /* 退货 */
  287. tuihuo_btn() {
  288. let that = this;
  289. let item = that.th_info;
  290. if (!that.tuihuo_money) {
  291. that.$api.msg('请输入退货金额');
  292. return;
  293. }
  294. if (!that.tuihuo_gs) {
  295. that.$api.msg('请输入快递公司');
  296. return;
  297. }
  298. if (!that.tuihuo_order) {
  299. that.$api.msg('请输入快递单号');
  300. return;
  301. }
  302. let tmplIdsone = that.$config.temlist;
  303. if (tmplIdsone) {
  304. that.$until.requestSubscribeMessage([tmplIdsone['returnReminder']], tmplIdsone, function() {
  305. that.orderTuihuo();
  306. });
  307. } else {
  308. that.orderTuihuo();
  309. }
  310. },
  311. orderTuihuo() {
  312. let that = this;
  313. order
  314. .orderTuihuo({
  315. sid: item.sid,
  316. orderid: item.id,
  317. tuihuoprice: that.tuihuo_money,
  318. tuihuokd: encodeURI(that.tuihuo_gs),
  319. tuihuokdnum: that.tuihuo_order,
  320. tuihuomsg: encodeURI(that.tuihuo_explain)
  321. })
  322. .then(res => {
  323. that.$api.msg(res.msg);
  324. if (res.status == 200) {
  325. that.show_th = false;
  326. that.orderList[that.orderIndex].status = 4
  327. }
  328. });
  329. },
  330. goOrderDetail(item) {
  331. uni.navigateTo({
  332. url: `orderDetail?sid=${item.sid}&id=${item.id}`
  333. });
  334. },
  335. handle() {
  336. console.log('上拉加载了')
  337. this.orderType(this.tabCurrentIndex);
  338. },
  339. getOrderList(type) {
  340. this.loadingType = 'loading';
  341. order
  342. .orderList({
  343. type,
  344. p: this.page
  345. })
  346. .then(res => {
  347. if (res.status == 200) {
  348. if (res.data.cache.length >= this.pagesize) {
  349. this.loadingType = 'more';
  350. this.page++;
  351. } else {
  352. this.page++;
  353. this.loadingType = 'nomore';
  354. }
  355. this.orderList = this.orderList.concat(res.data.cache);
  356. this.info = res.data.shopset;
  357. }
  358. });
  359. },
  360. changeTab(e) {},
  361. animationfinish(e) {
  362. let current = e.detail.current;
  363. this.swiperCurrent = current;
  364. this.current = current;
  365. },
  366. //顶部tab点击
  367. tabClick(e) {
  368. console.log(e, "eeeee")
  369. this.page = 1;
  370. this.orderList = [];
  371. this.tabCurrentIndex = e.index;
  372. this.orderType(e.index);
  373. // this.getOrderList(type);
  374. },
  375. //删除订单
  376. deleteOrder(index) {
  377. uni.showLoading({
  378. title: '请稍后'
  379. });
  380. setTimeout(() => {
  381. this.navList[this.tabCurrentIndex].orderList.splice(index, 1);
  382. uni.hideLoading();
  383. }, 600);
  384. },
  385. //取消订单
  386. cancelOrder(item) {
  387. uni.showLoading({
  388. title: '请稍后'
  389. });
  390. order
  391. .orderCancel({
  392. sid: item.sid,
  393. orderid: item.id
  394. })
  395. .then(res => {
  396. uni.hideLoading();
  397. this.$api.msg(res.msg);
  398. if (res.status == 200) {
  399. setTimeout(() => {
  400. this.orderList = this.orderList.filter(olditem => {
  401. return olditem.id != item.id;
  402. });
  403. }, 500);
  404. }
  405. });
  406. },
  407. pay(item) {
  408. console.log('pay', item);
  409. let that = this;
  410. that.$refs.payment.payopen({
  411. orderid: item.id,
  412. djqid: item.djqid,
  413. money: item.payprice
  414. });
  415. },
  416. orderTuikuan(item, index) {
  417. this.orderIndex = index
  418. /* 跳转退款界面*/
  419. this.show_tk = true;
  420. this.tk_info = item;
  421. },
  422. orderTuihuo(item, index) {
  423. this.orderIndex = index
  424. /* 跳转退货界面*/
  425. this.show_th = true;
  426. this.th_info = item;
  427. },
  428. orderPickupSuccess(item) {
  429. uni.showLoading({
  430. title: '请稍后'
  431. });
  432. order
  433. .orderPickupSuccess({
  434. sid: item.sid,
  435. orderid: item.id,
  436. pagesize: this.pagesize
  437. })
  438. .then(res => {
  439. uni.hideLoading();
  440. if (res.status == 200) {
  441. this.$api.msg(res.msg);
  442. this.orderType(this.tabCurrentIndex);
  443. }
  444. });
  445. },
  446. orderOK(item, index) {
  447. this.orderIndex = index
  448. uni.showModal({
  449. content: '确认已收到货?',
  450. cancelColor: '#ccc',
  451. confirmColor: '#000000',
  452. success: e => {
  453. if (e.confirm) {
  454. order
  455. .orderOK({
  456. sid: item.sid,
  457. orderid: item.id
  458. })
  459. .then(res => {
  460. this.$api.msg(res.msg);
  461. if (res.status == 200) {
  462. setTimeout(() => {
  463. this.orderList[this.orderIndex].status = 4
  464. }, 500);
  465. }
  466. });
  467. }
  468. }
  469. });
  470. },
  471. //订单状态文字和颜色
  472. orderStateExp(state) {
  473. let stateTip = '',
  474. stateTipColor = '#fa436a';
  475. switch (+state) {
  476. case 1:
  477. stateTip = '待付款';
  478. break;
  479. case 2:
  480. stateTip = '待发货';
  481. break;
  482. case 9:
  483. stateTip = '订单已关闭';
  484. stateTipColor = '#909399';
  485. break;
  486. //更多自定义
  487. }
  488. return {
  489. stateTip,
  490. stateTipColor
  491. };
  492. },
  493. orderType(state) {
  494. let stateTip = 0;
  495. let that = this;
  496. switch (Number(state)) {
  497. case 0:
  498. stateTip = 4;
  499. that.getOrderList(stateTip);
  500. break;
  501. case 1:
  502. stateTip = 1;
  503. that.getOrderList(stateTip);
  504. break;
  505. case 2:
  506. stateTip = 5;
  507. that.getOrderList(stateTip);
  508. break;
  509. case 3:
  510. stateTip = 2;
  511. that.getOrderList(stateTip);
  512. break;
  513. case 4:
  514. stateTip = 3;
  515. that.getOrderList(stateTip);
  516. break;
  517. }
  518. return stateTip;
  519. }
  520. },
  521. onReachBottom() {
  522. console.log('到底了');
  523. },
  524. onPullDownRefresh() {
  525. console.log('上拉加载了')
  526. this.orderList = [];
  527. this.page = 1;
  528. this.orderType(this.tabCurrentIndex);
  529. setTimeout(() => {
  530. uni.stopPullDownRefresh();
  531. }, 600);
  532. }
  533. };
  534. </script>
  535. <style lang="scss">
  536. page,
  537. .content {
  538. background: $page-color-base;
  539. height: 100%;
  540. box-sizing: border-box;
  541. }
  542. .swiper-box {
  543. height: calc(100vh - 44px);
  544. }
  545. .list-scroll-content {
  546. height: 100%;
  547. }
  548. .navbar {
  549. background: #fff;
  550. box-shadow: 0 1px 5px rgba(0, 0, 0, 0.06);
  551. .nav-item {
  552. flex: 1;
  553. display: flex;
  554. justify-content: center;
  555. align-items: center;
  556. height: 100%;
  557. font-size: 15px;
  558. color: $tab-color-1;
  559. position: relative;
  560. &.current {
  561. color: $tab-color-1;
  562. &:after {
  563. content: '';
  564. position: absolute;
  565. left: 50%;
  566. bottom: 0;
  567. transform: translateX(-50%);
  568. width: 44px;
  569. height: 0;
  570. border-bottom: 2px solid $tab-color-2;
  571. }
  572. }
  573. }
  574. }
  575. .tuihuo {
  576. line-height: 70rpx;
  577. text-align: center;
  578. .text {
  579. text-align: center;
  580. }
  581. }
  582. .i-top {
  583. display: flex;
  584. align-items: center;
  585. flex-wrap: wrap;
  586. height: 126upx;
  587. padding: 0 0upx;
  588. font-size: $font-base;
  589. color: $font-color-dark;
  590. position: relative;
  591. .time {
  592. // flex: 1;
  593. // flex-grow: 1;
  594. }
  595. .state {
  596. color: $base-color;
  597. }
  598. .del-btn {
  599. padding: 10upx 0 10upx 36upx;
  600. font-size: $font-lg;
  601. color: $font-color-light;
  602. position: relative;
  603. &:after {
  604. content: '';
  605. width: 0;
  606. height: 30upx;
  607. border-left: 1px solid $border-color-dark;
  608. position: absolute;
  609. left: 20upx;
  610. top: 50%;
  611. transform: translateY(-50%);
  612. }
  613. }
  614. }
  615. .b-b {
  616. margin: 0 0rpx;
  617. .illustrate {
  618. margin-bottom: 20rpx;
  619. }
  620. .box-conter {
  621. height: 230rpx;
  622. width: 600rpx;
  623. border: 1rpx solid #cccccc;
  624. }
  625. }
  626. .uni-swiper-item {
  627. height: auto;
  628. }
  629. .f-tui {
  630. width: 100%;
  631. min-height: 270rpx;
  632. background: #fff;
  633. margin-top: 16rpx;
  634. padding-left: 30rpx;
  635. padding-bottom: 30rpx;
  636. }
  637. .tui-wrap {
  638. margin: 15rpx 0;
  639. display: flex;
  640. justify-content: space-around;
  641. .tui-btn {
  642. left: 520rpx;
  643. width: 40%;
  644. height: 68rpx;
  645. display: flex;
  646. justify-content: center;
  647. align-items: center;
  648. border-radius: 15rpx;
  649. border-width: 1px;
  650. border-style: solid;
  651. margin-top: 20rpx;
  652. color: #fff;
  653. }
  654. }
  655. .order-item {
  656. display: flex;
  657. flex-direction: column;
  658. padding-left: 30upx;
  659. background: #fff;
  660. margin-top: 16upx;
  661. .i-top {
  662. display: flex;
  663. align-items: center;
  664. height: 80upx;
  665. padding-right: 30upx;
  666. font-size: $font-base;
  667. color: $font-color-dark;
  668. position: relative;
  669. .time {
  670. flex: 1;
  671. font-weight: bold;
  672. }
  673. .state {
  674. color: $base-color;
  675. }
  676. .del-btn {
  677. padding: 10upx 0 10upx 36upx;
  678. font-size: $font-lg;
  679. color: $font-color-light;
  680. position: relative;
  681. &:after {
  682. content: '';
  683. width: 0;
  684. height: 30upx;
  685. border-left: 1px solid $border-color-dark;
  686. position: absolute;
  687. left: 20upx;
  688. top: 50%;
  689. transform: translateY(-50%);
  690. }
  691. }
  692. }
  693. /* 多条商品 */
  694. .goods-box {
  695. height: 160upx;
  696. padding: 20upx 0;
  697. white-space: nowrap;
  698. .goods-item {
  699. width: 120upx;
  700. height: 120upx;
  701. display: inline-block;
  702. margin-right: 24upx;
  703. }
  704. .goods-item2 {
  705. width: 100%;
  706. height: 160rpx;
  707. display: flex;
  708. justify-content: flex-start;
  709. align-items: center;
  710. margin-right: 0;
  711. }
  712. .goods-img {
  713. display: block;
  714. width: 100%;
  715. height: 100%;
  716. }
  717. .goods-img2 {
  718. display: block;
  719. width: 160rpx;
  720. height: 120rpx;
  721. }
  722. }
  723. .right_mess {
  724. width: auto;
  725. margin-left: 15rpx;
  726. }
  727. .right_mess_p1 {
  728. font-size: 28rpx;
  729. color: #000;
  730. letter-spacing: 5rpx;
  731. }
  732. .right_mess_p2 {
  733. font-size: 26rpx;
  734. color: #000;
  735. margin: 15rpx 0;
  736. letter-spacing: 5rpx;
  737. }
  738. .right_mess_p3 {
  739. font-size: 26rpx;
  740. letter-spacing: 5rpx;
  741. }
  742. .goods-box2 {
  743. height: auto;
  744. }
  745. /* 单条商品 */
  746. .goods-box-single {
  747. display: flex;
  748. padding: 20upx 0;
  749. .goods-img {
  750. display: block;
  751. width: 120upx;
  752. height: 120upx;
  753. }
  754. .right {
  755. flex: 1;
  756. display: flex;
  757. flex-direction: column;
  758. padding: 0 30upx 0 24upx;
  759. overflow: hidden;
  760. .title {
  761. font-size: $font-base + 2upx;
  762. color: $font-color-dark;
  763. line-height: 1;
  764. line-height: 40rpx;
  765. height: 40rpx;
  766. text-overflow: ellipsis;
  767. overflow: hidden;
  768. white-space: nowrap;
  769. }
  770. .attr-box {
  771. font-size: $font-sm + 2upx;
  772. color: $font-color-light;
  773. padding: 10upx 12upx;
  774. }
  775. .price {
  776. font-size: $font-base + 2upx;
  777. &:before {
  778. content: '¥';
  779. font-size: $font-sm;
  780. margin: 0 2upx 0 8upx;
  781. }
  782. }
  783. }
  784. }
  785. .price-box {
  786. display: flex;
  787. justify-content: flex-end;
  788. align-items: baseline;
  789. padding: 20upx 30upx;
  790. font-size: $font-sm + 2upx;
  791. color: $font-color-light;
  792. .num {
  793. margin: 0 8upx;
  794. }
  795. .price {
  796. font-size: $font-lg;
  797. &:before {
  798. content: '¥';
  799. font-size: $font-sm;
  800. margin: 0 2upx 0 8upx;
  801. }
  802. }
  803. }
  804. .action-box {
  805. display: flex;
  806. justify-content: flex-end;
  807. align-items: center;
  808. height: 100upx;
  809. position: relative;
  810. padding-right: 30upx;
  811. }
  812. .action-btn {
  813. width: 160upx;
  814. height: 60upx;
  815. margin: 0;
  816. margin-left: 24upx;
  817. padding: 0;
  818. text-align: center;
  819. line-height: 60upx;
  820. font-size: $font-sm + 2upx;
  821. background: #fff;
  822. border-radius: 100px;
  823. &:after {
  824. border-radius: 100px;
  825. }
  826. &.recom {
  827. background: #fff9f9;
  828. border-width: 1rpx;
  829. border-style: solid;
  830. }
  831. }
  832. }
  833. /* load-more */
  834. .uni-load-more {
  835. display: flex;
  836. flex-direction: row;
  837. height: 80upx;
  838. align-items: center;
  839. justify-content: center;
  840. background-color: transparent;
  841. }
  842. .uni-load-more__text {
  843. font-size: 28upx;
  844. color: #999;
  845. }
  846. .uni-load-more__img {
  847. height: 24px;
  848. width: 24px;
  849. margin-right: 10px;
  850. }
  851. .uni-load-more__img>view {
  852. position: absolute;
  853. }
  854. .uni-load-more__img>view view {
  855. width: 6px;
  856. height: 2px;
  857. border-top-left-radius: 1px;
  858. border-bottom-left-radius: 1px;
  859. background: #999;
  860. position: absolute;
  861. opacity: 0.2;
  862. transform-origin: 50%;
  863. animation: load 1.56s ease infinite;
  864. }
  865. .uni-load-more__img>view view:nth-child(1) {
  866. transform: rotate(90deg);
  867. top: 2px;
  868. left: 9px;
  869. }
  870. .uni-load-more__img>view view:nth-child(2) {
  871. transform: rotate(180deg);
  872. top: 11px;
  873. right: 0;
  874. }
  875. .uni-load-more__img>view view:nth-child(3) {
  876. transform: rotate(270deg);
  877. bottom: 2px;
  878. left: 9px;
  879. }
  880. .uni-load-more__img>view view:nth-child(4) {
  881. top: 11px;
  882. left: 0;
  883. }
  884. .load1,
  885. .load2,
  886. .load3 {
  887. height: 24px;
  888. width: 24px;
  889. }
  890. .load2 {
  891. transform: rotate(30deg);
  892. }
  893. .load3 {
  894. transform: rotate(60deg);
  895. }
  896. .load1 view:nth-child(1) {
  897. animation-delay: 0s;
  898. }
  899. .load2 view:nth-child(1) {
  900. animation-delay: 0.13s;
  901. }
  902. .load3 view:nth-child(1) {
  903. animation-delay: 0.26s;
  904. }
  905. .load1 view:nth-child(2) {
  906. animation-delay: 0.39s;
  907. }
  908. .load2 view:nth-child(2) {
  909. animation-delay: 0.52s;
  910. }
  911. .load3 view:nth-child(2) {
  912. animation-delay: 0.65s;
  913. }
  914. .load1 view:nth-child(3) {
  915. animation-delay: 0.78s;
  916. }
  917. .load2 view:nth-child(3) {
  918. animation-delay: 0.91s;
  919. }
  920. .load3 view:nth-child(3) {
  921. animation-delay: 1.04s;
  922. }
  923. .load1 view:nth-child(4) {
  924. animation-delay: 1.17s;
  925. }
  926. .load2 view:nth-child(4) {
  927. animation-delay: 1.3s;
  928. }
  929. .load3 view:nth-child(4) {
  930. animation-delay: 1.43s;
  931. }
  932. @-webkit-keyframes load {
  933. 0% {
  934. opacity: 1;
  935. }
  936. 100% {
  937. opacity: 0.2;
  938. }
  939. }
  940. </style>