Showing
4 changed files
with
49 additions
and
32 deletions
@@ -3,6 +3,7 @@ | @@ -3,6 +3,7 @@ | ||
3 | <transition name="action-sheet-mask"> | 3 | <transition name="action-sheet-mask"> |
4 | <div | 4 | <div |
5 | class="yoho-popup-mask" | 5 | class="yoho-popup-mask" |
6 | + @touchmove.prevent | ||
6 | @click="maskClick" | 7 | @click="maskClick" |
7 | v-if="mask && isVisible" | 8 | v-if="mask && isVisible" |
8 | ></div> | 9 | ></div> |
@@ -21,9 +22,10 @@ | @@ -21,9 +22,10 @@ | ||
21 | </template> | 22 | </template> |
22 | 23 | ||
23 | <script> | 24 | <script> |
24 | -import { mapState } from "vuex"; | 25 | +import { mapState } from 'vuex'; |
26 | + | ||
25 | export default { | 27 | export default { |
26 | - name: "YohoActionSheet", | 28 | + name: 'YohoActionSheet', |
27 | props: { | 29 | props: { |
28 | maskClosable: { | 30 | maskClosable: { |
29 | type: Boolean, | 31 | type: Boolean, |
@@ -56,7 +58,7 @@ export default { | @@ -56,7 +58,7 @@ export default { | ||
56 | mounted() { | 58 | mounted() { |
57 | this.maxHeight = document.documentElement.clientHeight; | 59 | this.maxHeight = document.documentElement.clientHeight; |
58 | this.$watch( | 60 | this.$watch( |
59 | - "visible", | 61 | + 'visible', |
60 | newVal => { | 62 | newVal => { |
61 | if (newVal) { | 63 | if (newVal) { |
62 | this.show(); | 64 | this.show(); |
@@ -70,9 +72,9 @@ export default { | @@ -70,9 +72,9 @@ export default { | ||
70 | ); | 72 | ); |
71 | }, | 73 | }, |
72 | computed: { | 74 | computed: { |
73 | - ...mapState(["yoho"]), | 75 | + ...mapState(['yoho']), |
74 | actionCls() { | 76 | actionCls() { |
75 | - return [{ "yoho-action-sheet": this.full }]; | 77 | + return [{ 'yoho-action-sheet': this.full }]; |
76 | }, | 78 | }, |
77 | contentHeight() { | 79 | contentHeight() { |
78 | let { statusBarHeight, statusBarStatus } = this.yoho.window || {}; | 80 | let { statusBarHeight, statusBarStatus } = this.yoho.window || {}; |
@@ -81,7 +83,7 @@ export default { | @@ -81,7 +83,7 @@ export default { | ||
81 | statusBarHeight = 0; | 83 | statusBarHeight = 0; |
82 | } | 84 | } |
83 | 85 | ||
84 | - return this.full ? `${this.maxHeight - 20 - statusBarHeight}px` : "auto"; | 86 | + return this.full ? `${this.maxHeight - 20 - statusBarHeight}px` : 'auto'; |
85 | } | 87 | } |
86 | }, | 88 | }, |
87 | methods: { | 89 | methods: { |
@@ -91,7 +93,7 @@ export default { | @@ -91,7 +93,7 @@ export default { | ||
91 | 93 | ||
92 | cancel() { | 94 | cancel() { |
93 | this.hide(); | 95 | this.hide(); |
94 | - this.$emit("cancel"); | 96 | + this.$emit('cancel'); |
95 | }, | 97 | }, |
96 | 98 | ||
97 | show() { | 99 | show() { |
1 | <template> | 1 | <template> |
2 | <LayoutApp :show-back="true" title="确认订单" :back-action="backAction"> | 2 | <LayoutApp :show-back="true" title="确认订单" :back-action="backAction"> |
3 | <div class="body"> | 3 | <div class="body"> |
4 | + <Scroll :options="scrollOption"> | ||
4 | <AddressInfo :data="address" class="order-item" :show-tip="false"></AddressInfo> | 5 | <AddressInfo :data="address" class="order-item" :show-tip="false"></AddressInfo> |
5 | <ProductInfo :data="productDetail" class="product-info order-item"></ProductInfo> | 6 | <ProductInfo :data="productDetail" class="product-info order-item"></ProductInfo> |
6 | <Coupon class="order-item" v-if="couponList.length > 0" :data="orderDetail.recommendedCouponInfo" | 7 | <Coupon class="order-item" v-if="couponList.length > 0" :data="orderDetail.recommendedCouponInfo" |
@@ -13,6 +14,7 @@ | @@ -13,6 +14,7 @@ | ||
13 | <div class="tip order-item" v-if="orderDetail.damagesDesc" v-html="replaceBr(orderDetail.damagesDesc)"></div> | 14 | <div class="tip order-item" v-if="orderDetail.damagesDesc" v-html="replaceBr(orderDetail.damagesDesc)"></div> |
14 | <OrderInfo class="order-item" v-if="orderDetail.paymentWay" :pay-way="orderDetail.paymentWay" | 15 | <OrderInfo class="order-item" v-if="orderDetail.paymentWay" :pay-way="orderDetail.paymentWay" |
15 | :delivery-way="orderDetail.deliveryWay"></OrderInfo> | 16 | :delivery-way="orderDetail.deliveryWay"></OrderInfo> |
17 | + </Scroll> | ||
16 | </div> | 18 | </div> |
17 | 19 | ||
18 | <OrderFooter class="footer" :amount="orderDetail.amount" @click="onPayAction"></OrderFooter> | 20 | <OrderFooter class="footer" :amount="orderDetail.amount" @click="onPayAction"></OrderFooter> |
@@ -30,6 +32,7 @@ import OrderFooter from './components/confirm/buyer-order-footer'; | @@ -30,6 +32,7 @@ import OrderFooter from './components/confirm/buyer-order-footer'; | ||
30 | import Coupon from './components/confirm/buyer-coupon'; | 32 | import Coupon from './components/confirm/buyer-coupon'; |
31 | import Promotion from './components/confirm/buyer-promotion'; | 33 | import Promotion from './components/confirm/buyer-promotion'; |
32 | import { Types, UserType } from 'store/order/order-confirm'; | 34 | import { Types, UserType } from 'store/order/order-confirm'; |
35 | +import { Scroll } from 'cube-ui'; | ||
33 | import { get } from 'lodash'; | 36 | import { get } from 'lodash'; |
34 | 37 | ||
35 | import { createNamespacedHelpers, mapState } from 'vuex'; | 38 | import { createNamespacedHelpers, mapState } from 'vuex'; |
@@ -41,7 +44,10 @@ export default { | @@ -41,7 +44,10 @@ export default { | ||
41 | props: ['productId', 'storageId'], | 44 | props: ['productId', 'storageId'], |
42 | data() { | 45 | data() { |
43 | return { | 46 | return { |
44 | - isActive: false | 47 | + isActive: false, |
48 | + scrollOption: { | ||
49 | + bounce: false | ||
50 | + } | ||
45 | }; | 51 | }; |
46 | }, | 52 | }, |
47 | components: { | 53 | components: { |
@@ -52,7 +58,8 @@ export default { | @@ -52,7 +58,8 @@ export default { | ||
52 | OrderInfo, | 58 | OrderInfo, |
53 | OrderFooter, | 59 | OrderFooter, |
54 | Coupon, | 60 | Coupon, |
55 | - Promotion | 61 | + Promotion, |
62 | + Scroll | ||
56 | }, | 63 | }, |
57 | activated() { | 64 | activated() { |
58 | this.init(); | 65 | this.init(); |
@@ -3,7 +3,7 @@ | @@ -3,7 +3,7 @@ | ||
3 | :title="$route.params.owner === 'sell' ? '我的出售' : '我的订单'" | 3 | :title="$route.params.owner === 'sell' ? '我的出售' : '我的订单'" |
4 | class="list-page" | 4 | class="list-page" |
5 | > | 5 | > |
6 | - <status-nav :status="status" :owner="owner" @select="onStatusChange" /> | 6 | + <status-nav :status="status" :owner="owner" @select="onStatusChange"/> |
7 | <div class="content-wrapper"> | 7 | <div class="content-wrapper"> |
8 | <scroll | 8 | <scroll |
9 | @pulling-up="fetchData" | 9 | @pulling-up="fetchData" |
@@ -15,11 +15,11 @@ | @@ -15,11 +15,11 @@ | ||
15 | > | 15 | > |
16 | <ul class="list-wrapper"> | 16 | <ul class="list-wrapper"> |
17 | <li v-for="order in viewOrderList" :key="order.orderCode"> | 17 | <li v-for="order in viewOrderList" :key="order.orderCode"> |
18 | - <order-item-header :order="order" /> | ||
19 | - <order-item :order="order" /> | 18 | + <order-item-header :order="order"/> |
19 | + <order-item :order="order"/> | ||
20 | <!-- 订单操作 --> | 20 | <!-- 订单操作 --> |
21 | <div class="footer-wrapper"> | 21 | <div class="footer-wrapper"> |
22 | - <count-down :leftTime="order.leftTime" /> | 22 | + <count-down :leftTime="order.leftTime"/> |
23 | <order-actions | 23 | <order-actions |
24 | class="actions" | 24 | class="actions" |
25 | pageName="list" | 25 | pageName="list" |
@@ -54,24 +54,24 @@ | @@ -54,24 +54,24 @@ | ||
54 | </template> | 54 | </template> |
55 | 55 | ||
56 | <script> | 56 | <script> |
57 | -import { Scroll } from "cube-ui"; | ||
58 | -import { createNamespacedHelpers } from "vuex"; | 57 | +import { Scroll } from 'cube-ui'; |
58 | +import { createNamespacedHelpers } from 'vuex'; | ||
59 | 59 | ||
60 | -import OrderItem from "./components/order-item"; | ||
61 | -import StatusNav from "./components/status-nav"; | ||
62 | -import OrderItemHeader from "./components/order-item-header"; | ||
63 | -import VideoPlayer from "./components/video-player"; | 60 | +import OrderItem from './components/order-item'; |
61 | +import StatusNav from './components/status-nav'; | ||
62 | +import OrderItemHeader from './components/order-item-header'; | ||
63 | +import VideoPlayer from './components/video-player'; | ||
64 | 64 | ||
65 | -import EmptyList from "components//ufo-no-item"; | 65 | +import EmptyList from 'components//ufo-no-item'; |
66 | 66 | ||
67 | -import OrderActions from "../components/order-actions"; | ||
68 | -import CountDown from "../components/count-down"; | 67 | +import OrderActions from '../components/order-actions'; |
68 | +import CountDown from '../components/count-down'; | ||
69 | 69 | ||
70 | -import orderActionMixin from "../mixin/order-action"; | ||
71 | -import orderInSaleActionMixin from "../mixin/order-in-sale-action"; | ||
72 | -import { orderStatusKey, getOrderStatus } from "constants/order-constants"; | 70 | +import orderActionMixin from '../mixin/order-action'; |
71 | +import orderInSaleActionMixin from '../mixin/order-in-sale-action'; | ||
72 | +import { orderStatusKey, getOrderStatus } from 'constants/order-constants'; | ||
73 | 73 | ||
74 | -const STORE_PATH = "order/orderList"; | 74 | +const STORE_PATH = 'order/orderList'; |
75 | 75 | ||
76 | const { mapActions, mapState, mapMutations } = createNamespacedHelpers( | 76 | const { mapActions, mapState, mapMutations } = createNamespacedHelpers( |
77 | STORE_PATH | 77 | STORE_PATH |
@@ -95,7 +95,7 @@ export default { | @@ -95,7 +95,7 @@ export default { | ||
95 | status: Number | 95 | status: Number |
96 | }, | 96 | }, |
97 | computed: { | 97 | computed: { |
98 | - ...mapState(["orderListByType"]), | 98 | + ...mapState(['orderListByType']), |
99 | orderStatus() { | 99 | orderStatus() { |
100 | return this.orderListByType[orderStatusKey(this.owner, this.status)]; | 100 | return this.orderListByType[orderStatusKey(this.owner, this.status)]; |
101 | }, | 101 | }, |
@@ -110,7 +110,7 @@ export default { | @@ -110,7 +110,7 @@ export default { | ||
110 | // if (this.$refs.scroll && this.$refs.scroll.scroll) { | 110 | // if (this.$refs.scroll && this.$refs.scroll.scroll) { |
111 | options.pullDownRefresh = this.orderStatus.isShowEmpty | 111 | options.pullDownRefresh = this.orderStatus.isShowEmpty |
112 | ? false | 112 | ? false |
113 | - : { txt: "更新成功" }; | 113 | + : { txt: '更新成功' }; |
114 | // } | 114 | // } |
115 | 115 | ||
116 | return options; | 116 | return options; |
@@ -119,7 +119,7 @@ export default { | @@ -119,7 +119,7 @@ export default { | ||
119 | 119 | ||
120 | // 获取订单数据 | 120 | // 获取订单数据 |
121 | asyncData({ store, router }) { | 121 | asyncData({ store, router }) { |
122 | - let { owner, status } = router.params; | 122 | + let { owner, status } = router.params; |
123 | 123 | ||
124 | status = getOrderStatus(owner, status); | 124 | status = getOrderStatus(owner, status); |
125 | 125 | ||
@@ -127,8 +127,8 @@ export default { | @@ -127,8 +127,8 @@ export default { | ||
127 | return store.dispatch(`${STORE_PATH}/fetchOrderList`, { owner, status }); | 127 | return store.dispatch(`${STORE_PATH}/fetchOrderList`, { owner, status }); |
128 | }, | 128 | }, |
129 | methods: { | 129 | methods: { |
130 | - ...mapActions(["fetchOrderList", "confirmReceipt"]), | ||
131 | - ...mapMutations(["resetData"]), | 130 | + ...mapActions(['fetchOrderList', 'confirmReceipt']), |
131 | + ...mapMutations(['resetData']), | ||
132 | fetchData() { | 132 | fetchData() { |
133 | this.fetchOrderList({ | 133 | this.fetchOrderList({ |
134 | owner: this.owner, | 134 | owner: this.owner, |
@@ -203,6 +203,7 @@ export default { | @@ -203,6 +203,7 @@ export default { | ||
203 | .video-wrapper { | 203 | .video-wrapper { |
204 | overflow: hidden; | 204 | overflow: hidden; |
205 | } | 205 | } |
206 | + | ||
206 | .video-player { | 207 | .video-player { |
207 | display: block; | 208 | display: block; |
208 | height: 40px; | 209 | height: 40px; |
1 | <template> | 1 | <template> |
2 | <LayoutApp :show-back="true" title="出售" :back-action="backAction"> | 2 | <LayoutApp :show-back="true" title="出售" :back-action="backAction"> |
3 | <div class="body"> | 3 | <div class="body"> |
4 | + <Scroll :options="scrollOption"> | ||
4 | <ProductInfo :data="productDetail" class="product-info"></ProductInfo> | 5 | <ProductInfo :data="productDetail" class="product-info"></ProductInfo> |
5 | <InputPrice @input="changePrice" | 6 | <InputPrice @input="changePrice" |
6 | :num="num" :value="price" | 7 | :num="num" :value="price" |
@@ -11,6 +12,7 @@ | @@ -11,6 +12,7 @@ | ||
11 | <OrderMargin class="order-item order-margin" :data="fee" :super-sell="superSell"></OrderMargin> | 12 | <OrderMargin class="order-item order-margin" :data="fee" :super-sell="superSell"></OrderMargin> |
12 | <OrderFee class="order-item" :data="fee"></OrderFee> | 13 | <OrderFee class="order-item" :data="fee"></OrderFee> |
13 | <AddressInfo :data="address" class="order-item"></AddressInfo> | 14 | <AddressInfo :data="address" class="order-item"></AddressInfo> |
15 | + </Scroll> | ||
14 | </div> | 16 | </div> |
15 | <div class="footer"> | 17 | <div class="footer"> |
16 | <OrderAgree :value="agree" @input="changeAgree" class="agree-wrapper" :desc="agreeDesc" :url="url"></OrderAgree> | 18 | <OrderAgree :value="agree" @input="changeAgree" class="agree-wrapper" :desc="agreeDesc" :url="url"></OrderAgree> |
@@ -31,6 +33,7 @@ import OrderMargin from './components/confirm/order-margin'; | @@ -31,6 +33,7 @@ import OrderMargin from './components/confirm/order-margin'; | ||
31 | import OrderFee from './components/confirm/order-fee'; | 33 | import OrderFee from './components/confirm/order-fee'; |
32 | import OrderAgree from './components/confirm/agree'; | 34 | import OrderAgree from './components/confirm/agree'; |
33 | import { Types, UserType } from 'store/order/order-confirm'; | 35 | import { Types, UserType } from 'store/order/order-confirm'; |
36 | +import { Scroll } from 'cube-ui'; | ||
34 | import { get } from 'lodash'; | 37 | import { get } from 'lodash'; |
35 | 38 | ||
36 | import { createNamespacedHelpers, mapState } from 'vuex'; | 39 | import { createNamespacedHelpers, mapState } from 'vuex'; |
@@ -41,6 +44,7 @@ export default { | @@ -41,6 +44,7 @@ export default { | ||
41 | name: 'SellOrderConfirm', | 44 | name: 'SellOrderConfirm', |
42 | props: ['productId', 'storageId'], | 45 | props: ['productId', 'storageId'], |
43 | components: { | 46 | components: { |
47 | + Scroll, | ||
44 | ProductInfo, | 48 | ProductInfo, |
45 | AddressInfo, | 49 | AddressInfo, |
46 | InputPrice, | 50 | InputPrice, |
@@ -56,7 +60,10 @@ export default { | @@ -56,7 +60,10 @@ export default { | ||
56 | agreeDesc: '有货卖家协议', | 60 | agreeDesc: '有货卖家协议', |
57 | url: 'https://activity.yoho.cn/feature/6773.html?share_id=9479&title=%E9%97%B2%E9%B1%BC%E6%BD%AE%E5%8D%96%E5%AE%B6%E5%8D%8F%E8%AE%AE', | 61 | url: 'https://activity.yoho.cn/feature/6773.html?share_id=9479&title=%E9%97%B2%E9%B1%BC%E6%BD%AE%E5%8D%96%E5%AE%B6%E5%8D%8F%E8%AE%AE', |
58 | superSell: false, | 62 | superSell: false, |
59 | - addNumError: false | 63 | + addNumError: false, |
64 | + scrollOption: { | ||
65 | + bounce: false | ||
66 | + } | ||
60 | }; | 67 | }; |
61 | }, | 68 | }, |
62 | activated() { | 69 | activated() { |
-
Please register or login to post a comment