Authored by TaoHuang

fix by huangtao

... ... @@ -3,6 +3,7 @@
<transition name="action-sheet-mask">
<div
class="yoho-popup-mask"
@touchmove.prevent
@click="maskClick"
v-if="mask && isVisible"
></div>
... ... @@ -21,9 +22,10 @@
</template>
<script>
import { mapState } from "vuex";
import { mapState } from 'vuex';
export default {
name: "YohoActionSheet",
name: 'YohoActionSheet',
props: {
maskClosable: {
type: Boolean,
... ... @@ -56,7 +58,7 @@ export default {
mounted() {
this.maxHeight = document.documentElement.clientHeight;
this.$watch(
"visible",
'visible',
newVal => {
if (newVal) {
this.show();
... ... @@ -70,9 +72,9 @@ export default {
);
},
computed: {
...mapState(["yoho"]),
...mapState(['yoho']),
actionCls() {
return [{ "yoho-action-sheet": this.full }];
return [{ 'yoho-action-sheet': this.full }];
},
contentHeight() {
let { statusBarHeight, statusBarStatus } = this.yoho.window || {};
... ... @@ -81,7 +83,7 @@ export default {
statusBarHeight = 0;
}
return this.full ? `${this.maxHeight - 20 - statusBarHeight}px` : "auto";
return this.full ? `${this.maxHeight - 20 - statusBarHeight}px` : 'auto';
}
},
methods: {
... ... @@ -91,7 +93,7 @@ export default {
cancel() {
this.hide();
this.$emit("cancel");
this.$emit('cancel');
},
show() {
... ...
<template>
<LayoutApp :show-back="true" title="确认订单" :back-action="backAction">
<div class="body">
<Scroll :options="scrollOption">
<AddressInfo :data="address" class="order-item" :show-tip="false"></AddressInfo>
<ProductInfo :data="productDetail" class="product-info order-item"></ProductInfo>
<Coupon class="order-item" v-if="couponList.length > 0" :data="orderDetail.recommendedCouponInfo"
... ... @@ -13,6 +14,7 @@
<div class="tip order-item" v-if="orderDetail.damagesDesc" v-html="replaceBr(orderDetail.damagesDesc)"></div>
<OrderInfo class="order-item" v-if="orderDetail.paymentWay" :pay-way="orderDetail.paymentWay"
:delivery-way="orderDetail.deliveryWay"></OrderInfo>
</Scroll>
</div>
<OrderFooter class="footer" :amount="orderDetail.amount" @click="onPayAction"></OrderFooter>
... ... @@ -30,6 +32,7 @@ import OrderFooter from './components/confirm/buyer-order-footer';
import Coupon from './components/confirm/buyer-coupon';
import Promotion from './components/confirm/buyer-promotion';
import { Types, UserType } from 'store/order/order-confirm';
import { Scroll } from 'cube-ui';
import { get } from 'lodash';
import { createNamespacedHelpers, mapState } from 'vuex';
... ... @@ -41,7 +44,10 @@ export default {
props: ['productId', 'storageId'],
data() {
return {
isActive: false
isActive: false,
scrollOption: {
bounce: false
}
};
},
components: {
... ... @@ -52,7 +58,8 @@ export default {
OrderInfo,
OrderFooter,
Coupon,
Promotion
Promotion,
Scroll
},
activated() {
this.init();
... ...
... ... @@ -3,7 +3,7 @@
:title="$route.params.owner === 'sell' ? '我的出售' : '我的订单'"
class="list-page"
>
<status-nav :status="status" :owner="owner" @select="onStatusChange" />
<status-nav :status="status" :owner="owner" @select="onStatusChange"/>
<div class="content-wrapper">
<scroll
@pulling-up="fetchData"
... ... @@ -15,11 +15,11 @@
>
<ul class="list-wrapper">
<li v-for="order in viewOrderList" :key="order.orderCode">
<order-item-header :order="order" />
<order-item :order="order" />
<order-item-header :order="order"/>
<order-item :order="order"/>
<!-- 订单操作 -->
<div class="footer-wrapper">
<count-down :leftTime="order.leftTime" />
<count-down :leftTime="order.leftTime"/>
<order-actions
class="actions"
pageName="list"
... ... @@ -54,24 +54,24 @@
</template>
<script>
import { Scroll } from "cube-ui";
import { createNamespacedHelpers } from "vuex";
import { Scroll } from 'cube-ui';
import { createNamespacedHelpers } from 'vuex';
import OrderItem from "./components/order-item";
import StatusNav from "./components/status-nav";
import OrderItemHeader from "./components/order-item-header";
import VideoPlayer from "./components/video-player";
import OrderItem from './components/order-item';
import StatusNav from './components/status-nav';
import OrderItemHeader from './components/order-item-header';
import VideoPlayer from './components/video-player';
import EmptyList from "components//ufo-no-item";
import EmptyList from 'components//ufo-no-item';
import OrderActions from "../components/order-actions";
import CountDown from "../components/count-down";
import OrderActions from '../components/order-actions';
import CountDown from '../components/count-down';
import orderActionMixin from "../mixin/order-action";
import orderInSaleActionMixin from "../mixin/order-in-sale-action";
import { orderStatusKey, getOrderStatus } from "constants/order-constants";
import orderActionMixin from '../mixin/order-action';
import orderInSaleActionMixin from '../mixin/order-in-sale-action';
import { orderStatusKey, getOrderStatus } from 'constants/order-constants';
const STORE_PATH = "order/orderList";
const STORE_PATH = 'order/orderList';
const { mapActions, mapState, mapMutations } = createNamespacedHelpers(
STORE_PATH
... ... @@ -95,7 +95,7 @@ export default {
status: Number
},
computed: {
...mapState(["orderListByType"]),
...mapState(['orderListByType']),
orderStatus() {
return this.orderListByType[orderStatusKey(this.owner, this.status)];
},
... ... @@ -110,7 +110,7 @@ export default {
// if (this.$refs.scroll && this.$refs.scroll.scroll) {
options.pullDownRefresh = this.orderStatus.isShowEmpty
? false
: { txt: "更新成功" };
: { txt: '更新成功' };
// }
return options;
... ... @@ -119,7 +119,7 @@ export default {
// 获取订单数据
asyncData({ store, router }) {
let { owner, status } = router.params;
let { owner, status } = router.params;
status = getOrderStatus(owner, status);
... ... @@ -127,8 +127,8 @@ export default {
return store.dispatch(`${STORE_PATH}/fetchOrderList`, { owner, status });
},
methods: {
...mapActions(["fetchOrderList", "confirmReceipt"]),
...mapMutations(["resetData"]),
...mapActions(['fetchOrderList', 'confirmReceipt']),
...mapMutations(['resetData']),
fetchData() {
this.fetchOrderList({
owner: this.owner,
... ... @@ -203,6 +203,7 @@ export default {
.video-wrapper {
overflow: hidden;
}
.video-player {
display: block;
height: 40px;
... ...
<template>
<LayoutApp :show-back="true" title="出售" :back-action="backAction">
<div class="body">
<Scroll :options="scrollOption">
<ProductInfo :data="productDetail" class="product-info"></ProductInfo>
<InputPrice @input="changePrice"
:num="num" :value="price"
... ... @@ -11,6 +12,7 @@
<OrderMargin class="order-item order-margin" :data="fee" :super-sell="superSell"></OrderMargin>
<OrderFee class="order-item" :data="fee"></OrderFee>
<AddressInfo :data="address" class="order-item"></AddressInfo>
</Scroll>
</div>
<div class="footer">
<OrderAgree :value="agree" @input="changeAgree" class="agree-wrapper" :desc="agreeDesc" :url="url"></OrderAgree>
... ... @@ -31,6 +33,7 @@ import OrderMargin from './components/confirm/order-margin';
import OrderFee from './components/confirm/order-fee';
import OrderAgree from './components/confirm/agree';
import { Types, UserType } from 'store/order/order-confirm';
import { Scroll } from 'cube-ui';
import { get } from 'lodash';
import { createNamespacedHelpers, mapState } from 'vuex';
... ... @@ -41,6 +44,7 @@ export default {
name: 'SellOrderConfirm',
props: ['productId', 'storageId'],
components: {
Scroll,
ProductInfo,
AddressInfo,
InputPrice,
... ... @@ -56,7 +60,10 @@ export default {
agreeDesc: '有货卖家协议',
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',
superSell: false,
addNumError: false
addNumError: false,
scrollOption: {
bounce: false
}
};
},
activated() {
... ...