index.vue 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721
  1. <template>
  2. <view>
  3. <view class="my-order">
  4. <view class="list" @click="goOrderDetails()">
  5. <view class="myclient_list">
  6. <view class="myclient_list_name">
  7. <view class="nl">
  8. 重磅集合!花王系列、宝洁洗衣液等好物全重磅集合!
  9. </view>
  10. <view class="status">
  11. 发布中
  12. </view>
  13. </view>
  14. <view class="myclient_list_content">
  15. <view class="subtitle">我是副标题我是副标题</view>
  16. <view class="phone">
  17. <image referrerpolicy="no-referrer" src="http://www.gzzzyd.com/groupon/home_slices/日期@2x.png" />
  18. <text>
  19. 团购日期:04/26 10:15 至 04/26
  20. </text>
  21. </view>
  22. <view class="time">
  23. <image referrerpolicy="no-referrer" src="http://www.gzzzyd.com/groupon/home_slices/时间@2x.png" />
  24. <text>
  25. 提货时间:05/01 10:15 至 05/13
  26. </text>
  27. </view>
  28. </view>
  29. </view>
  30. <view class="self-pickup-point">
  31. <view class="a-b">
  32. <view class="a-b1">
  33. 自提点:
  34. <text class="red">
  35. 上海市浦东新区秀浦路29号三层303室
  36. </text>
  37. </view>
  38. <view class="a-b2">
  39. </view>
  40. </view>
  41. </view>
  42. </view>
  43. <view class="good_info">
  44. <view class="myclient_list_name">
  45. <view class="nv">
  46. 团购商品
  47. </view>
  48. <view class="status">
  49. 共4件商品
  50. </view>
  51. </view>
  52. <view class="all-products-body">
  53. <view class="all-products-item" @click="addGoodPopupShow = true">
  54. <image
  55. src="https://lanhu-dds-backend.oss-cn-beijing.aliyuncs.com/merge_image/imgs/38e693de009644aa9de2dc6d6f7e747a_mergeImage.png"
  56. mode="scaleToFill" />
  57. <view class="all-products-item-content">
  58. <view class="all-products-item-content-t">
  59. 宫中秘策(GOONGBE)进口儿童韩国进口儿童防晒霜80g
  60. </view>
  61. <view class="all-products-item-content-b">
  62. <view style="display:flex;">
  63. <text class="red"> ¥48.00</text>
  64. </view>
  65. </view>
  66. </view>
  67. </view>
  68. <view class="all-products-item" @click="addGoodPopupShow = true">
  69. <image
  70. src="https://lanhu-dds-backend.oss-cn-beijing.aliyuncs.com/merge_image/imgs/38e693de009644aa9de2dc6d6f7e747a_mergeImage.png"
  71. mode="scaleToFill" />
  72. <view class="all-products-item-content">
  73. <view class="all-products-item-content-t">
  74. 宫中秘策(GOONGBE)进口儿童韩国进口儿童防晒霜80g
  75. </view>
  76. <view class="all-products-item-content-b">
  77. <view style="display:flex;">
  78. <text class="red"> ¥48.00</text>
  79. </view>
  80. </view>
  81. </view>
  82. </view>
  83. <view class="all-products-item" @click="addGoodPopupShow = true">
  84. <image
  85. src="https://lanhu-dds-backend.oss-cn-beijing.aliyuncs.com/merge_image/imgs/38e693de009644aa9de2dc6d6f7e747a_mergeImage.png"
  86. mode="scaleToFill" />
  87. <view class="all-products-item-content">
  88. <view class="all-products-item-content-t">
  89. 宫中秘策(GOONGBE)进口儿童韩国进口儿童防晒霜80g
  90. </view>
  91. <view class="all-products-item-content-b">
  92. <view style="display:flex;">
  93. <text class="red"> ¥48.00</text>
  94. </view>
  95. </view>
  96. </view>
  97. </view>
  98. </view>
  99. </view>
  100. </view>
  101. <!-- #ifndef MP -->
  102. <home></home>
  103. <!-- #endif -->
  104. </view>
  105. </template>
  106. <script>
  107. import {
  108. getUserOrderPage,
  109. postUserOrderCancel,
  110. postUserOrderRefund
  111. } from '@/api/home.js';
  112. import {
  113. getOrderList,
  114. orderData,
  115. orderCancel,
  116. orderDel,
  117. orderPay
  118. } from '@/api/order.js';
  119. import {
  120. getUserInfo
  121. } from '@/api/user.js';
  122. import {
  123. openOrderSubscribe
  124. } from '@/utils/SubscribeMessage.js';
  125. import home from '@/components/home';
  126. import payment from '@/components/payment';
  127. import {
  128. toLogin
  129. } from '@/libs/login.js';
  130. import {
  131. mapGetters
  132. } from 'vuex';
  133. // #ifdef MP
  134. import authorize from '@/components/Authorize';
  135. // #endif
  136. import emptyPage from '@/components/emptyPage.vue';
  137. import colors from '@/mixins/color.js';
  138. export default {
  139. components: {
  140. payment,
  141. home,
  142. emptyPage,
  143. // #ifdef MP
  144. authorize
  145. // #endif
  146. },
  147. mixins: [colors],
  148. data () {
  149. return {
  150. loading: false, //是否加载中
  151. loadend: false, //是否加载完毕
  152. loadTitle: this.$t(`加载更多`), //提示语
  153. orderList: [], //订单数组
  154. orderData: {}, //订单详细统计
  155. orderStatus: 0, //订单状态
  156. page: 1,
  157. limit: 20,
  158. pay_close: false,
  159. pay_order_id: '',
  160. pay_orderId: '',
  161. totalPrice: '0',
  162. isAuto: false, //没有授权的不会自动授权
  163. isShowAuth: false //是否隐藏授权
  164. };
  165. },
  166. computed: mapGetters(['isLogin']),
  167. onShow () {
  168. },
  169. methods: {
  170. onLoadFun () {
  171. this.getOrderData();
  172. this.getUserInfo();
  173. },
  174. // 授权关闭
  175. authColse: function (e) {
  176. this.isShowAuth = e;
  177. },
  178. /**
  179. * 事件回调
  180. *
  181. */
  182. onChangeFun: function (e) {
  183. let opt = e;
  184. let action = opt.action || null;
  185. let value = opt.value != undefined ? opt.value : null;
  186. action && this[action] && this[action](value);
  187. },
  188. /**
  189. * 获取用户信息
  190. *
  191. */
  192. getUserInfo: function () {
  193. let that = this;
  194. getUserInfo().then(res => {
  195. that.payMode[2].number = res.data.now_money;
  196. that.$set(that, 'payMode', that.payMode);
  197. });
  198. },
  199. /**
  200. * 关闭支付组件
  201. *
  202. */
  203. payClose: function () {
  204. this.pay_close = false;
  205. },
  206. /**
  207. * 生命周期函数--监听页面加载
  208. */
  209. onLoad: function (options) {
  210. if (options.status) this.orderStatus = options.status;
  211. },
  212. /**
  213. * 去订单详情
  214. */
  215. goOrderDetails: function (order_id, order) {
  216. uni.navigateTo({
  217. url: '/pages/groupbuying_details/order_details_list/index?order_id= + order_id'
  218. });
  219. // let that = this;
  220. // if (!order_id)
  221. // return that.$util.Tips({
  222. // title: that.$t(`缺少订单号无法查看订单详情`)
  223. // });
  224. // uni.showLoading({
  225. // title: that.$t(`正在加载中`)
  226. // });
  227. // openOrderSubscribe()
  228. // .then(() => {
  229. // uni.hideLoading();
  230. // uni.navigateTo({
  231. // url: '/pages/goods/order_details/index?order_id=' + order_id
  232. // // +'&order='+JSON.stringify(order)
  233. // // +'&goods='+encodeURIComponent(JSON.stringify(order.orderGoods))
  234. // })
  235. // })
  236. // .catch(err => {
  237. // uni.hideLoading();
  238. // });
  239. },
  240. /**
  241. * 获取订单列表
  242. */
  243. getOrderList: function () {
  244. // let that = this;
  245. // if (that.loadend) return;
  246. // if (that.loading) return;
  247. // that.loading = true;
  248. // that.loadTitle = that.$t(`加载更多`);
  249. // getUserOrderPage({
  250. // userId: this.$store.state.app.uid,
  251. // current: that.page,
  252. // size: that.limit,
  253. // payFlag: this.orderStatus
  254. // })
  255. // .then(res => {
  256. // let list = res.data || [];
  257. // let loadend = list.length < that.limit;
  258. // that.orderList = that.$util.SplitArray(list, that.orderList);
  259. // that.$set(that, 'orderList', that.orderList);
  260. // that.loadend = loadend;
  261. // that.loading = false;
  262. // that.loadTitle = loadend ? that.$t(`没有更多内容啦~`) : that.$t(`加载更多`);
  263. // that.page = that.page + 1;
  264. // })
  265. // .catch(err => {
  266. // that.loading = false;
  267. // that.loadTitle = that.$t(`加载更多`);
  268. // });
  269. },
  270. },
  271. onReachBottom: function () {
  272. this.getOrderList();
  273. }
  274. };
  275. </script>
  276. <style scoped lang="scss">
  277. .my-order .nav {
  278. background-color: #F9F9F9;
  279. width: 100%;
  280. // height: 140rpx;
  281. }
  282. .my-order .nav .item {
  283. text-align: center;
  284. font-size: 26rpx;
  285. color: #282828;
  286. padding: 27rpx 0;
  287. border-bottom: 5rpx solid transparent;
  288. }
  289. .my-order .nav .item.on {
  290. /* #ifdef H5 || MP */
  291. font-weight: bold;
  292. /* #endif */
  293. /* #ifdef APP-PLUS */
  294. color: #000;
  295. /* #endif */
  296. border-color: var(--view-theme);
  297. }
  298. .my-order .nav .item .num {
  299. margin-top: 18rpx;
  300. }
  301. .list {
  302. width: 100%;
  303. background: white;
  304. margin: 14rpx auto 0 auto;
  305. padding-bottom: 30rpx;
  306. }
  307. .noCart {
  308. margin-top: 171rpx;
  309. padding-top: 0.1rpx;
  310. }
  311. .noCart .pictrue {
  312. width: 414rpx;
  313. height: 336rpx;
  314. margin: 78rpx auto 56rpx auto;
  315. }
  316. .noCart .pictrue image {
  317. width: 100%;
  318. height: 100%;
  319. }
  320. .my-order .list .item .item-info .text .money .return {
  321. // color: var(--view-priceColor);
  322. margin-top: 10rpx;
  323. font-size: 24rpx;
  324. }
  325. .myclient_list {
  326. padding: 30rpx;
  327. background: #FFFFFF;
  328. .myclient_list_name {
  329. margin-bottom: 15rpx;
  330. min-height: 44rpx;
  331. font-size: 28rpx;
  332. font-weight: 500;
  333. color: #111111;
  334. line-height: 44rpx;
  335. display: flex;
  336. .nv {
  337. flex-grow: 1;
  338. }
  339. .status {
  340. width: 300rpx;
  341. text-align: right;
  342. margin-left: 30rpx;
  343. color: #75BE00;
  344. }
  345. }
  346. .myclient_list_content {
  347. .subtitle {
  348. height: 44rpx;
  349. margin: 20rpx 0;
  350. font-size: 28rpx;
  351. font-weight: 400;
  352. color: #666666;
  353. line-height: 44rpx;
  354. }
  355. image {
  356. width: 24rpx;
  357. height: 24rpx;
  358. margin-right: 20rpx;
  359. }
  360. .phone {
  361. margin-bottom: 15rpx;
  362. height: 44rpx;
  363. font-size: 24rpx;
  364. font-weight: 400;
  365. color: #999999;
  366. line-height: 44rpx;
  367. }
  368. .time {
  369. height: 44rpx;
  370. font-size: 24rpx;
  371. font-weight: 400;
  372. color: #999999;
  373. line-height: 44rpx;
  374. }
  375. }
  376. }
  377. .all-products-body {
  378. background: white;
  379. .all-products-item {
  380. display: flex;
  381. margin-bottom: 20rpx;
  382. image {
  383. width: 128rpx;
  384. height: 128rpx;
  385. margin-right: 20rpx;
  386. border: 2rpx solid #FFFFFF;
  387. }
  388. .all-products-item-content {
  389. flex-grow: 1;
  390. display: flex;
  391. flex-direction: column;
  392. .all-products-item-content-t {
  393. flex: 1;
  394. font-size: 24rpx;
  395. font-weight: 400;
  396. color: #333333;
  397. line-height: 40rpx;
  398. }
  399. .all-products-item-content-b {
  400. flex: 1;
  401. font-size: 28rpx;
  402. font-weight: 500;
  403. line-height: 80rpx;
  404. display: flex;
  405. justify-content: space-between;
  406. .red {
  407. display: block;
  408. font-size: 28rpx;
  409. font-weight: 500;
  410. color: #B22338 !important;
  411. margin-right: 10rpx;
  412. }
  413. .line-thr {
  414. display: block;
  415. font-size: 28rpx;
  416. font-weight: 400;
  417. color: #999999;
  418. text-decoration: line-through;
  419. }
  420. .count {
  421. font-size: 24rpx;
  422. font-weight: 400;
  423. color: #999999;
  424. margin-right: 30rpx;
  425. }
  426. }
  427. }
  428. }
  429. }
  430. .a-t {
  431. padding: 0 30rpx;
  432. display: flex;
  433. justify-content: space-between;
  434. height: 44rpx;
  435. margin-bottom: 20rpx;
  436. }
  437. .a-m {
  438. padding: 0 30rpx;
  439. .am1 {
  440. display: flex;
  441. justify-content: space-between;
  442. margin-bottom: 20rpx;
  443. .am1-1 {
  444. height: 40rpx;
  445. font-size: 28rpx;
  446. font-weight: 400;
  447. color: #111111;
  448. line-height: 40rpx;
  449. }
  450. .am1-2 {
  451. height: 36rpx;
  452. font-size: 20rpx;
  453. font-weight: 400;
  454. color: #666666;
  455. line-height: 36rpx;
  456. image {
  457. margin-left: 30rpx;
  458. vertical-align: middle;
  459. height: 34rpx;
  460. width: 34rpx;
  461. }
  462. }
  463. }
  464. .am2 {
  465. margin-bottom: 20rpx;
  466. height: 34rpx;
  467. font-size: 24rpx;
  468. font-weight: 400;
  469. color: #999999;
  470. line-height: 34rpx;
  471. }
  472. }
  473. .a-b {
  474. padding: 0 30rpx;
  475. width: 100%;
  476. background: #FFF7F8;
  477. border: 1px solid dashed #333333;
  478. height: 60rpx;
  479. line-height: 60rpx;
  480. display: flex;
  481. justify-content: space-between;
  482. .a-b1 {
  483. font-size: 20rpx;
  484. font-weight: 400;
  485. color: #666666;
  486. .red {
  487. font-size: 20rpx;
  488. font-weight: 500;
  489. color: #B22338;
  490. }
  491. }
  492. .a-b2 {
  493. image {
  494. vertical-align: middle;
  495. margin-right: 30rpx;
  496. margin-left: 30rpx;
  497. height: 34rpx;
  498. width: 34rpx;
  499. }
  500. }
  501. }
  502. .self-pickup-point {
  503. background: #FFF7F8;
  504. margin: 0 30rpx;
  505. }
  506. .op-area {
  507. height: 120rpx;
  508. display: flex;
  509. justify-content: flex-end;
  510. line-height: 120rpx;
  511. padding: 20rpx 0;
  512. text-align: right;
  513. .action-btn {
  514. min-width: 200rpx;
  515. background: #FFF7F8;
  516. border-radius: 32rpx;
  517. border: 2rpx solid #B22338;
  518. margin-right: 30rpx;
  519. height: 64rpx;
  520. font-size: 24rpx;
  521. font-weight: 400;
  522. color: #B22338;
  523. line-height: 64rpx;
  524. }
  525. .info-btn {
  526. width: 200rpx;
  527. background: #F5F5F5;
  528. border-radius: 32rpx;
  529. margin-right: 30rpx;
  530. height: 64rpx;
  531. font-size: 24rpx;
  532. font-weight: 400;
  533. color: #666666;
  534. line-height: 64rpx;
  535. }
  536. }
  537. .Ended {
  538. color: #666666 !important;
  539. }
  540. .Refused {
  541. color: #B42A3E !important;
  542. }
  543. .publish {
  544. position: fixed;
  545. bottom: 0;
  546. height: 100rpx;
  547. width: 100%;
  548. background: #F9F9F9;
  549. button {
  550. width: 90%;
  551. height: 84rpx;
  552. background: #B42A3E;
  553. border-radius: 8rpx;
  554. position: relative;
  555. top: 0;
  556. margin: auto;
  557. font-size: 28rpx;
  558. font-weight: 400;
  559. color: #FFFFFF;
  560. line-height: 84rpx;
  561. }
  562. }
  563. .all-products-body {
  564. background: white;
  565. .all-products-item {
  566. display: flex;
  567. margin-bottom: 20rpx;
  568. image {
  569. width: 128rpx;
  570. height: 128rpx;
  571. margin-right: 20rpx;
  572. border: 2rpx solid #FFFFFF;
  573. }
  574. .all-products-item-content {
  575. flex-grow: 1;
  576. display: flex;
  577. flex-direction: column;
  578. .all-products-item-content-t {
  579. flex: 1;
  580. font-size: 24rpx;
  581. font-weight: 400;
  582. color: #333333;
  583. line-height: 40rpx;
  584. }
  585. .all-products-item-content-b {
  586. flex: 1;
  587. font-size: 28rpx;
  588. font-weight: 500;
  589. line-height: 80rpx;
  590. display: flex;
  591. justify-content: space-between;
  592. .red {
  593. display: block;
  594. font-size: 28rpx;
  595. font-weight: 500;
  596. color: #B22338 !important;
  597. margin-right: 10rpx;
  598. }
  599. .line-thr {
  600. display: block;
  601. font-size: 28rpx;
  602. font-weight: 400;
  603. color: #999999;
  604. text-decoration: line-through;
  605. }
  606. .count {
  607. font-size: 24rpx;
  608. font-weight: 400;
  609. color: #999999;
  610. margin-right: 30rpx;
  611. }
  612. }
  613. }
  614. }
  615. }
  616. .good_info{
  617. background: #FFFFFF;
  618. padding: 30rpx;
  619. margin-bottom: 20rpx;
  620. .myclient_list_name {
  621. margin-bottom: 15rpx;
  622. min-height: 44rpx;
  623. font-size: 28rpx;
  624. font-weight: 500;
  625. color: #111111;
  626. line-height: 44rpx;
  627. display: flex;
  628. .nv {
  629. flex-grow: 1;
  630. }
  631. .status {
  632. width: 300rpx;
  633. text-align: right;
  634. margin-left: 30rpx;
  635. color: #999999;
  636. }
  637. }
  638. }
  639. </style>