Authored by Tao

add news

... ... @@ -68,7 +68,7 @@
checked="model.is_default"
v-model="model.is_default"
></Radio>
<div v-if="isUpdate" class="del-address" @click="delAddress">删除地址</div>
<div v-if="isUpdate && !isSeller" class="del-address" @click="delAddress">删除地址</div>
</div>
</div>
<div :class="submitClass" @touchend="onSubmit">确 认</div>
... ... @@ -116,6 +116,7 @@ export default {
},
isShowProvince: false,
isUpdate: false,
isSeller: false,
updateMobileNum: '',
isMobileNumEdit: false,
title: '',
... ... @@ -317,8 +318,10 @@ export default {
activated() {
let addressInfo = this.updateAddressInfo;
this.isUpdate =
addressInfo.isUpdate && this.$route.query.fromPage !== 'OrderSellConfirm';
//判断是否是出售订单,出售订单不显示“删除地址”
this.isSeller = this.$route.query.fromPage === 'OrderSellConfirm' ? true : false;
this.isUpdate = addressInfo.isUpdate;
this.orderCode = addressInfo.orderCode;
this.title = addressInfo.isUpdate ? '编辑地址' : '添加地址';
... ...
... ... @@ -3,7 +3,7 @@
<div v-if="validStatus === 1">
<div class="account">
<p class="account-tip">支付宝账号</p>
<p class="account-name">{{alipayAccount}}</p>
<p class="account-name">{{alipayAccount?alipayAccount:nickName}}</p>
</div>
<p class="tip"><i class="cubeic-warn"></i><span>已绑定的支付宝账号暂无法提供系统换绑和解除,如
需要帮助可致电<a class="phone" href="tel:400-8890-9646"> 400-8890-9646 </a>联系电话客服</span></p>
... ... @@ -26,7 +26,7 @@ export default {
this.fetchUserAliPayAccount()
},
computed: {
...mapState(['alipayAccount','certName', 'validStatus'])
...mapState(['alipayAccount','certName', 'validStatus','nickName'])
},
methods: {
...mapActions(['fetchUserAliPayAccount']),
... ...
... ... @@ -35,7 +35,7 @@
</div>
</template>
<script>
import {createNamespacedHelpers} from 'vuex';
import {mapState, createNamespacedHelpers} from 'vuex';
const {mapActions} = createNamespacedHelpers('list');
... ... @@ -67,6 +67,9 @@ export default {
activated() {
let params = this.$route.query;
if (this.yoho.direction === 'forword') {
Object.assign(this.$data, this.$options.data());
}
if (Object.keys(params).length && params.listType) {
this.listType = params.listType;
delete params.listType;
... ... @@ -79,6 +82,11 @@ export default {
!params.order && (params.order = 'sale_desc');
this.fetchData(params);
},
computed: {
...mapState(['yoho'])
},
methods: {
...mapActions(['fetchFilterData']),
clear() {
... ... @@ -215,7 +223,7 @@ export default {
justify-content: space-between;
.cancel {
font-size: 38px;
font-size: 36px;
color: #888;
}
}
... ...
<template>
<div>
<div class="tip" v-if="superSell">需支付保证金:<span class="red">{{data.earnestMoneyStr || '¥0'}}</span><i v-if="!hiddenIcon"
<div class="tip" v-if="!superSell">需支付保证金:<span class="red">{{data.earnestMoneyStr || '¥0'}}</span><i v-if="!hiddenIcon"
class="iconfont iconquestion icon-class"
@click="onClick"></i></div>
<div class="tip2">所有商品必须为国内现货,且承诺36小时内发货,交易成功后将自动退还保证金</div>
... ... @@ -28,10 +28,17 @@ export default {
default() {
return false;
}
},
url: {
type: String,
default: ''
}
},
methods: {
onClick() {
if (this.url) {
this.$xianyu.goXianyuNewPage({url: this.url});
}
}
}
};
... ...
... ... @@ -43,7 +43,7 @@ import { createNamespacedHelpers } from "vuex";
import InputUfo from "../price-change/components/input-ufo";
import { debounce } from "lodash";
const { mapActions, mapMutations } = createNamespacedHelpers("order/orderList");
const { mapActions } = createNamespacedHelpers("order/orderList");
export default {
components: { InputUfo },
props: {
... ... @@ -58,6 +58,10 @@ export default {
orderCode: {
type: Number,
default: 0
},
onChangePrice: {
type: Function,
default: () => {}
}
},
data() {
... ... @@ -81,8 +85,7 @@ export default {
this.inputChange = debounce(this.onChange.bind(this), 500);
},
methods: {
...mapActions(["computeChangePrice", "changePrice"]),
...mapMutations(["setChangePrice"]),
...mapActions(["computeChangePrice"]),
async onChange(price) {
if (this.checkPrice(price)) {
const res = await this.computeChangePrice({
... ... @@ -91,13 +94,13 @@ export default {
});
if (typeof res === "string") {
this.errorTip = res;
this.setChangePrice(0);
this.onChangePrice(0);
} else {
this.computePrice = res;
this.setChangePrice(price);
this.onChangePrice(price);
}
} else {
this.setChangePrice(0);
this.onChangePrice(0);
}
},
checkPrice(price) {
... ...
... ... @@ -135,7 +135,7 @@ export default {
this.$router.push({
name: 'addressEdit',
query: {
fromPage: 'order-list'
fromPage: 'OrderList'
}
});
break;
... ...
... ... @@ -2,19 +2,17 @@
/* eslint-disable space-before-function-paren */
import { orderActionsMap, ownType } from 'constants/order-constants';
import { createNamespacedHelpers } from 'vuex';
import DialogConfirmInfo from '../../components/dialog-confirm-info';
import DialogChangeBidPrice from '../../components/dialog-change-bid-price';
import DialogConfirmInfo from '../components/dialog-confirm-info';
import DialogChangeBidPrice from '../components/dialog-change-bid-price';
const { mapActions, mapMutations, mapState } = createNamespacedHelpers(
'order/orderList',
);
const { mapMutations: inSaleMapMutations } = createNamespacedHelpers(
'order/inSaleOrderList',
);
const { mapActions, mapMutations } = createNamespacedHelpers('order/orderList');
export default {
computed: {
...mapState(['changePrice']),
data() {
return {
// 求购调价
changePrice: 0,
};
},
methods: {
...mapActions([
... ... @@ -25,16 +23,15 @@ export default {
'confirmChangePrice',
]),
...mapMutations(['filterOrderList', 'resetData']),
...inSaleMapMutations(['filterInSaleOrderList']),
// 订单列表
async onAction({ action, order }) {
async onAction({ action, order, isDetail = false } = {}) {
const { owner = ownType.SELL } = this.$route.params;
const {
orderCode,
realPrice = '',
bidDepositInfo = {},
goodsInfo = {},
priceInfo = {},
} = order;
switch (action.name) {
... ... @@ -50,7 +47,11 @@ export default {
});
if (isOk) {
this.filterOrderList(orderCode);
if (isDetail) {
this.$router.back();
} else {
this.filterOrderList(orderCode);
}
}
const txt = isOk ? '删除成功' : '删除失败';
... ... @@ -68,9 +69,14 @@ export default {
if (Array.isArray(confirmInfo)) {
confirmInfo = { confirmDesc: '确定取消求购' };
}
const confirmBtnText = confirmInfo.needPenalty
? '赔付并取消订单'
: '取消订单';
this.$createConfirmDialog(
{
confirmBtn: { text: '取消订单', style: { color: '#D0021B' } },
confirmBtn: { text: confirmBtnText, style: { color: '#D0021B' } },
cancelBtn: { text: '保留订单', active: true },
onConfirm: async () => {
const isOk = await this.cancelTrade({
... ... @@ -79,8 +85,12 @@ export default {
});
if (isOk) {
this.resetData();
this.fetchData(this.$route.params);
if (isDetail) {
this.fetchOrderDetail(this.$route.params);
} else {
this.resetData();
this.fetchData(this.$route.params);
}
}
const txt = isOk ? '取消成功' : '取消失败';
... ... @@ -100,15 +110,23 @@ export default {
}
case orderActionsMap.NOW_BUY.name: {
let price = realPrice,
pageBackName = 'OrderList';
if (isDetail) {
price = priceInfo.realPayPrice;
pageBackName = 'buyOrderDetail';
}
this.$createOrderPayType({
orderCode,
price: parseFloat(realPrice),
price: parseFloat(price || ''),
desc: '',
extra: JSON.stringify({
forward: {
name: 'OrderList',
back: {
name: pageBackName,
params: {
owner: 'buy',
owner,
orderCode,
},
},
}),
... ... @@ -145,12 +163,13 @@ export default {
});
if (isOk) {
this.resetData();
this.fetchData(this.$route.params);
if (isDetail) {
this.fetchOrderDetail(this.$route.params);
} else {
this.resetData();
this.fetchData(this.$route.params);
}
}
// const txt = isOk ? "收货成功" : "收货失败";
// this.$createToast({ txt, type: "txt" }).show();
},
}).show();
break;
... ... @@ -181,14 +200,25 @@ export default {
if (!this.changePrice) {
return;
}
const isOk = await this.confirmChangePrice({
const { isOk, errMsg = '' } = await this.confirmChangePrice({
price: this.changePrice,
orderCode,
});
if (isOk) {
this.resetData();
this.fetchData(this.$route.params);
if (isDetail) {
this.fetchOrderDetail(this.$route.params);
} else {
this.resetData();
this.fetchData(this.$route.params);
}
} else {
if (errMsg) {
this.$createToast({
type: 'alert',
txt: errMsg,
});
}
}
},
},
... ... @@ -199,6 +229,7 @@ export default {
computePriceInfo,
goodsInfo,
orderCode,
onChangePrice: v => (this.changePrice = v),
},
slot: 'content',
}),
... ... @@ -207,111 +238,6 @@ export default {
).show();
break;
}
case orderActionsMap.NOT_SOLD.name: {
const confirmInfo = await this.cancelTradeConfirmInfo({
orderCode,
owner,
});
const confirmBtnText = confirmInfo.needPenalty
? '赔付并取消订单'
: '不卖了';
this.$createConfirmDialog(
{
confirmBtn: { text: confirmBtnText, style: { color: '#D0021B' } },
cancelBtn: { text: '继续出售', active: true },
onConfirm: async () => {
const isOk = await this.cancelTrade({
orderCode,
owner,
});
if (isOk) {
this.resetData();
this.fetchData(this.$route.params);
}
// const txt = isOk ? "取消成功" : "取消失败";
// this.$createToast({ txt, type: "txt" }).show();
},
},
createElement => {
return [
createElement(DialogConfirmInfo, {
props: { info: confirmInfo },
slot: 'content',
}),
];
},
).show();
break;
}
default:
return;
}
},
// 出售中订单列表
async onInsaleOrderAction({ action, order }) {
const { owner = ownType.SELL } = this.$route.params;
const { orderCode, earnestMoney = 0 } = order;
switch (action.name) {
case orderActionsMap.NOT_SOLD.name: {
const confirmInfo = await this.cancelTradeConfirmInfo({
orderCode,
owner,
});
const confirmBtnText = confirmInfo.needPenalty
? '赔付并取消订单'
: '不卖了';
this.$createConfirmDialog(
{
confirmBtn: { text: confirmBtnText, style: { color: '#D0021B' } },
cancelBtn: { text: '继续出售', active: true },
onConfirm: async () => {
const isOk = await this.cancelTrade({
orderCode,
owner,
});
if (isOk) {
this.filterInSaleOrderList(orderCode);
}
// const txt = isOk ? "取消成功" : "取消失败";
// this.$createToast({ txt, type: "txt" }).show();
},
},
createElement => {
return [
createElement(DialogConfirmInfo, {
props: { info: confirmInfo },
slot: 'content',
}),
];
},
).show();
break;
}
case orderActionsMap.PAY_EARNESTMONEY.name: {
this.$createOrderPayType({
orderCode,
price: earnestMoney,
desc: '保证金',
// 支付成功会跳route
extra: JSON.stringify({
forward: {
name: 'InSaleOrderList',
},
}),
}).show();
break;
}
default:
return;
}
... ...
/* eslint-disable operator-linebreak */
/* eslint-disable space-before-function-paren */
import { orderActionsMap, ownType } from 'constants/order-constants';
import { createNamespacedHelpers } from 'vuex';
import DialogConfirmInfo from '../components/dialog-confirm-info';
const { mapActions } = createNamespacedHelpers('order/orderList');
const { mapMutations: inSaleMapMutations } = createNamespacedHelpers(
'order/inSaleOrderList',
);
export default {
methods: {
...mapActions(['cancelTradeConfirmInfo', 'cancelTrade']),
...inSaleMapMutations(['filterInSaleOrderList']),
async onInSaleOrderAction({ action, order, isDetail = false } = {}) {
const { owner = ownType.SELL } = this.$route.params;
const { orderCode, earnestMoney = 0 } = order;
switch (action.name) {
case orderActionsMap.NOT_SOLD.name: {
const confirmInfo = await this.cancelTradeConfirmInfo({
orderCode,
owner,
});
const confirmBtnText = confirmInfo.needPenalty
? '赔付并取消订单'
: '不卖了';
this.$createConfirmDialog(
{
confirmBtn: { text: confirmBtnText, style: { color: '#D0021B' } },
cancelBtn: { text: '继续出售', active: true },
onConfirm: async () => {
const isOk = await this.cancelTrade({
orderCode,
owner,
});
if (isOk) {
if (isDetail) {
this.fetchOrderDetail(this.$route.params);
} else {
this.filterInSaleOrderList(orderCode);
}
}
},
},
createElement => {
return [
createElement(DialogConfirmInfo, {
props: { info: confirmInfo },
slot: 'content',
}),
];
},
).show();
break;
}
case orderActionsMap.PAY_EARNESTMONEY.name: {
const pageBackName = isDetail ? 'sellOrderDetail' : 'InSaleOrderList';
this.$createOrderPayType({
orderCode,
price: earnestMoney,
desc: '保证金',
// 支付成功会跳route
extra: JSON.stringify({
forward: {
name: pageBackName,
},
}),
}).show();
break;
}
default:
return;
}
},
},
};
... ...
... ... @@ -26,7 +26,7 @@
<order-item-info class="item-wrapper" />
<!-- 鉴定视频 -->
<div class="video-img" v-if="orderDetail.appraiseVideoUrl" @click="() => onVideoHandler()"></div>
<div ref="videoWrapper" class="video-wrapper">
<div class="video-wrapper">
<VideoPlayer
ref="videoPlayer"
class="video-player"
... ... @@ -93,17 +93,6 @@
</p>
</div>
</div>
<!-- 操作 -->
<!-- <detail-footer>
<template #tip="{orderDetail, statusDetail}">
<div v-if="statusDetail.status === 0">
<p class="real-pay-price">
¥{{ orderDetail.priceInfo.realPayPrice }}
</p>
<p>实付金额</p>
</div>
</template>
</detail-footer>-->
<div v-if="actionList.length > 0" class="footer-wrapper">
<div v-if="statusDetail.status === 0">
... ... @@ -114,7 +103,7 @@
class="detail-actions"
:order="orderDetail"
@on-action="
action => onBuyerOrderAction({ action, order: orderDetail })
action => onAction({ action, order: orderDetail, isDetail: true })
"
/>
</div>
... ... @@ -135,7 +124,7 @@ import DetailFooter from "./components//detail-footer";
import OrderActions from "../components/order-actions";
import VideoPlayer from "../order-list/components/video-player";
import orderActionMixin from "./mixins/order-action";
import orderActionMixin from "../mixin/order-action";
const STORE_PATH = "order/orderDetail";
... ... @@ -222,12 +211,13 @@ export default {
}
.video-img {
display: block;
margin-top: 40px;
margin-left: -15px;
width: calc(100% + 20px);
width: 100%;
height: 378px;
background: url("~statics/image/order/video-big@3x.png");
background: url("~statics/image/order/video-big@3x.png") no-repeat;
background-size: cover;
background-position: center;
}
.video-wrapper {
... ... @@ -236,7 +226,7 @@ export default {
.video-player {
display: block;
height: 30px;
height: 40px;
opacity: 0;
}
... ...
... ... @@ -55,17 +55,22 @@ export default {
...mapGetters(["userAddress", "appraiseAddress"])
},
activated() {
this.copyBtn = new Clipboard(this.$refs.copy, {
text: () => {
const { addressName, address, mobile } = this.appraiseAddress;
return `${addressName} ${address} ${mobile}`;
this.$nextTick(() => {
if (!this.$refs.copy) {
return;
}
});
this.copyBtn.on("success", () => {
this.$createToast({
txt: "复制成功",
type: "txt"
}).show();
this.copyBtn = new Clipboard(this.$refs.copy, {
text: () => {
const { addressName, address, mobile } = this.appraiseAddress;
return `${addressName} ${address} ${mobile}`;
}
});
this.copyBtn.on("success", () => {
this.$createToast({
txt: "复制成功",
type: "txt"
}).show();
});
});
}
};
... ...
/* eslint-disable operator-linebreak */
/* eslint-disable space-before-function-paren */
import { createNamespacedHelpers } from 'vuex';
const { mapActions, mapState } = createNamespacedHelpers('order/orderList');
import { orderActionsMap, ownType } from 'constants/order-constants';
import DialogConfirmInfo from '../../components/dialog-confirm-info';
import DialogChangeBidPrice from '../../components/dialog-change-bid-price';
export default {
data() {
return {
isMixin: true,
};
},
computed: {
...mapState(['changePrice']),
},
methods: {
...mapActions([
'cancelTradeConfirmInfo',
'cancelTrade',
'deleteOrder',
'computeChangePrice',
'confirmChangePrice',
]),
async onSellerOrderAction({ action, order }) {
const { owner = ownType.SELL } = this.$route.params;
const { orderCode, earnestMoney } = order;
switch (action.name) {
case orderActionsMap.DEL_ORDER.name: {
this.deleteOrderConfirmDialog({ orderCode, owner });
break;
}
case orderActionsMap.NOT_SOLD.name: {
const confirmInfo = await this.cancelTradeConfirmInfo({
orderCode,
owner,
});
const confirmBtnText = confirmInfo.needPenalty
? '赔付并取消订单'
: '不卖了';
this.$createConfirmDialog(
{
confirmBtn: {
text: confirmBtnText,
style: { color: '#D0021B' },
},
cancelBtn: { text: '继续出售', active: true },
onConfirm: async () => {
const isOk = await this.cancelTrade({
orderCode,
owner,
});
if (isOk) {
this.fetchOrderDetail(this.$route.params);
}
// const txt = isOk ? "取消成功" : "取消失败";
// this.$createToast({ txt, type: "txt" }).show();
},
},
createElement => {
return [
createElement(DialogConfirmInfo, {
props: { info: confirmInfo },
slot: 'content',
}),
];
},
).show();
break;
}
case orderActionsMap.PAY_EARNESTMONEY.name: {
this.$createOrderPayType({
orderCode,
price: earnestMoney,
desc: '保证金',
// 支付成功会跳route
extra: JSON.stringify({
back: {
name: 'sellOrderDetail',
params: { owner, orderCode },
},
}),
}).show();
break;
}
default:
return;
}
},
async onBuyerOrderAction({ action, order }) {
const { owner = ownType.SELL } = this.$route.params;
const {
orderCode,
priceInfo = {},
bidDepositInfo = {},
goodsInfo,
} = order;
switch (action.name) {
case orderActionsMap.DEL_ORDER.name: {
this.deleteOrderConfirmDialog({ orderCode, owner });
break;
}
case orderActionsMap.PAY_DEPOSIT.name: {
this.$createOrderPayType({
orderCode,
price: parseFloat(bidDepositInfo.depositAmount),
desc: '支付定金',
extra: JSON.stringify({
forward: {
name: 'OrderList',
params: {
owner: 'buy',
},
},
}),
}).show();
break;
}
case orderActionsMap.CHANGE_BID_PRICE.name: {
const { goodPrice } = goodsInfo;
const computePriceInfo = await this.computeChangePrice({
orderCode,
price: goodPrice,
});
if (typeof computePriceInfo === 'string') {
this.$createToast({
type: 'alert',
txt: computePriceInfo,
mask: true,
}).show();
return;
}
this.$createDialog(
{
type: 'prompt',
confirmBtn: { text: '调整求购价' },
cancelBtn: { active: true },
onConfirm: async () => {
if (!this.changePrice) {
return;
}
const isOk = await this.confirmChangePrice({
price: this.changePrice,
orderCode,
});
if (isOk) {
this.fetchOrderDetail(this.$route.params);
}
},
},
createElement => {
return [
createElement(DialogChangeBidPrice, {
props: {
computePriceInfo,
goodsInfo,
orderCode,
},
slot: 'content',
}),
];
},
).show();
break;
}
case orderActionsMap.CANCEL_ORDER.name: {
let confirmInfo = await this.cancelTradeConfirmInfo({
orderCode,
owner,
});
if (Array.isArray(confirmInfo)) {
confirmInfo = { confirmDesc: '确定取消求购' };
}
this.$createConfirmDialog(
{
confirmBtn: { text: '取消订单', style: { color: '#D0021B' } },
cancelBtn: { text: '保留订单', active: true },
onConfirm: async () => {
const isOk = await this.cancelTrade({
orderCode,
owner,
});
if (isOk) {
this.fetchOrderDetail(this.$route.params);
}
const txt = isOk ? '取消成功' : '取消失败';
this.$createToast({ txt, type: 'txt' }).show();
},
},
createElement => {
return [
createElement(DialogConfirmInfo, {
props: { info: confirmInfo },
slot: 'content',
}),
];
},
).show();
break;
}
case orderActionsMap.NOW_BUY.name: {
this.$createOrderPayType({
orderCode,
price: parseFloat(priceInfo.realPayPrice || ''),
desc: '',
extra: JSON.stringify({
back: {
name: 'buyOrderDetail',
params: {
owner,
orderCode,
},
},
}),
}).show();
break;
}
case orderActionsMap.CONFIRM_DELIVERY.name: {
this.$createConfirmDialog({
content: '确认收货?',
confirmBtn: { style: { color: '#D0021B' } },
cancelBtn: { active: true },
onConfirm: async () => {
const isOk = await this.confirmReceipt({
orderCode,
owner,
});
if (isOk) {
this.fetchOrderDetail(this.$route.params);
}
// const txt = isOk ? "收货成功" : "收货失败";
// this.$createToast({ txt, type: "txt" }).show();
},
}).show();
break;
}
default:
return;
}
},
// 删除订单
deleteOrderConfirmDialog({ orderCode, owner }) {
this.$createConfirmDialog({
type: 'confirm',
content: '确认删除订单?',
confirmBtn: { style: { color: '#D0021B' } },
onConfirm: async () => {
const isOk = await this.deleteOrder({
orderCode,
owner,
});
if (isOk) {
this.$router.back();
}
// const txt = isOk ? "删除成功" : "删除失败";
// this.$createToast({ txt, type: "txt" }).show();
},
}).show();
},
},
};
... ... @@ -35,7 +35,7 @@
<p class="delivery-fee">
<span class="label"
>银行转账费({{
parseInt(platformFee.payChannelPercentage || 0)
parseInt(platformFee.goodsPaymentRatePercent || 0)
}}%):</span
>
<span>{{ orderDetail.bankTransferFee }}</span>
... ... @@ -78,7 +78,14 @@
class="detail-actions"
:order="orderDetail"
@on-action="
action => onSellerOrderAction({ action, order: orderDetail })
action => {
onInSaleOrderAction({
action,
order: orderDetail,
isDetail: true
});
onAction({ action, order: orderDetail, isDetail: true });
}
"
/>
</div>
... ... @@ -98,7 +105,9 @@ import DetailFooter from "./components//detail-footer";
import OrderActions from "../components/order-actions";
import orderActionMixin from "./mixins/order-action";
import orderActionMixin from "../mixin/order-action";
import orderInSaleActionMixin from "../mixin/order-in-sale-action";
import PlatformFeeInfo from "../components/platform-fee-info";
const STORE_PATH = "order/orderDetail";
... ... @@ -108,7 +117,7 @@ const { mapActions, mapState, mapGetters } = createNamespacedHelpers(
);
export default {
mixins: [orderActionMixin],
mixins: [orderActionMixin, orderInSaleActionMixin],
components: {
AddressInfo,
OrderItemInfo,
... ... @@ -121,16 +130,18 @@ export default {
return store.dispatch(`${STORE_PATH}/fetchOrderDetail`, router.params);
},
activated() {
this.copyBtn = new Clipboard(this.$refs.copy, {
text: () => {
return this.orderDetail.orderCode;
}
});
this.copyBtn.on("success", () => {
this.$createToast({
txt: "复制成功",
type: "txt"
}).show();
this.$nextTick(() => {
this.copyBtn = new Clipboard(this.$refs.copy, {
text: () => {
return this.orderDetail.orderCode;
}
});
this.copyBtn.on("success", () => {
this.$createToast({
txt: "复制成功",
type: "txt"
}).show();
});
});
},
computed: {
... ...
... ... @@ -122,7 +122,7 @@ export default {
}
},
mounted() {
this.showPlayer();
// this.showPlayer();
},
beforeDestroy() {
if (this.player) {
... ... @@ -130,19 +130,28 @@ export default {
}
},
methods: {
parentHandleclick() {
this.showVideo = true;
async parentHandleclick() {
this.showPlayer();
await this.delay(1000);
this.player.play();
const timeId = setTimeout(() => {
this.player.requestFullscreen();
clearTimeout(timeId);
});
},
delay(ns) {
return new Promise(resolve => {
setTimeout(resolve, ns);
});
},
showPlayer() {
if (this.showVideo || !this.source) {
return;
}
this.showVideo = true;
this.$nextTick(() => {
this.initPlayer();
});
... ... @@ -187,14 +196,6 @@ export default {
this.voiceBtn.removeClass(noVioceClass);
}
});
// setTimeout(() => {
// this.$yoho.getNetStatus({}, res => {
// if (res && +res.wifi === 1) {
// this.player.autoplay("muted");
// }
// });
// }, 1000);
},
getTime() {
return new Date().getTime();
... ...
... ... @@ -3,6 +3,7 @@
<div class="content-wrapper">
<scroll
@pulling-up="fetchData"
@pulling-down="onRefresh"
:options="options"
:data="orderList"
class="order-list-scroll-wrap"
... ... @@ -17,7 +18,7 @@
<order-actions
class="actions"
:order="order"
@on-action="action => onInsaleOrderAction({ action, order })"
@on-action="action => onInSaleOrderAction({ action, order })"
/>
</div>
</li>
... ... @@ -43,7 +44,7 @@ import EmptyList from "components//ufo-no-item";
import OrderActions from "../components/order-actions";
import CountDown from "../components/count-down";
import orderActionMixin from "./mixins/order-action";
import orderInSaleActionMixin from "../mixin/order-in-sale-action";
const IN_SALE_STORE_PATH = "order/inSaleOrderList";
... ... @@ -56,7 +57,7 @@ const {
export default {
// 订单操作
mixins: [orderActionMixin],
mixins: [orderInSaleActionMixin],
components: {
Scroll,
OrderItem,
... ... @@ -88,6 +89,11 @@ export default {
},
methods: {
...mapActions(["fetchEntryOrderList", "fetchNotEntryOrderList"]),
...mapMutations(["resetData"]),
onRefresh() {
this.resetData();
this.fetchData();
},
fetchData() {
if (this.isFetchEntryOrder) {
this.fetchEntryOrderList();
... ...
... ... @@ -4,6 +4,7 @@
<div class="content-wrapper">
<scroll
@pulling-up="fetchData"
@pulling-down="onRefresh"
:options="options"
:data="orderList"
class="order-list-scroll-wrap"
... ... @@ -20,11 +21,16 @@
class="actions"
pageName="list"
:order="order"
@on-action="action => onAction({ action, order })"
@on-action="
action => {
onAction({ action, order });
onInSaleOrderAction({ action, order });
}
"
@on-video="params => onVideoHandle(params)"
/>
</div>
<div ref="videoWrapper" class="video-wrapper">
<div class="video-wrapper">
<VideoPlayer
:ref="order.orderCode"
class="video-player"
... ... @@ -36,6 +42,7 @@
</scroll>
<empty-list
@touch.prevent
class="empty-wrapper"
tip="这里什么都没有..."
v-show="isShowEmpty"
... ... @@ -58,15 +65,18 @@ import EmptyList from "components//ufo-no-item";
import OrderActions from "../components/order-actions";
import CountDown from "../components/count-down";
import orderActionMixin from "./mixins/order-action";
import orderActionMixin from "../mixin/order-action";
import orderInSaleActionMixin from "../mixin/order-in-sale-action";
const STORE_PATH = "order/orderList";
const { mapActions, mapState } = createNamespacedHelpers(STORE_PATH);
const { mapActions, mapState, mapMutations } = createNamespacedHelpers(
STORE_PATH
);
export default {
// 订单操作
mixins: [orderActionMixin],
mixins: [orderActionMixin, orderInSaleActionMixin],
components: {
Scroll,
OrderItem,
... ... @@ -97,9 +107,14 @@ export default {
methods: {
...mapActions(["fetchOrderList", "confirmReceipt"]),
...mapMutations(["resetData"]),
fetchData() {
this.fetchOrderList(this.$route.params);
},
onRefresh() {
this.resetData();
this.fetchData();
},
onVideoHandle({ videoUrl, orderCode }) {
if (!videoUrl) {
return;
... ... @@ -109,15 +124,6 @@ export default {
$video.parentHandleclick();
}
}
},
mounted() {
if (this.$yoho.isAndroid) {
this.$refs.videoWrapper.forEach($vnode => {
$vnode.style.position = "absolute";
$vnode.style.top = "-1000px";
});
}
}
};
</script>
... ...
... ... @@ -241,7 +241,10 @@ export default {
activated() {
this.$nextTick(() => {
const { stage } = this.logisticInfo;
this.stageImgUrl = require(`../../statics/image/order/logistics_progress_${stage}@3x.png`);
if (stage) {
this.stageImgUrl = require(`../../statics/image/order/logistics_progress_${stage}@3x.png`);
}
});
if (this.$refs.copy) {
this.copyBtn = new Clipboard(this.$refs.copy, {
... ...
... ... @@ -20,6 +20,9 @@
下架商品保证金会被释放
</p>
</div>
<div class="change-price-modal" v-else>
<p class="modal-title">您确定不卖此商品吗?</p>
</div>
</Modal>
</template>
... ... @@ -46,6 +49,7 @@ export default {
},
methods: {
show({skc}) {
console.log(skc);
this.skc = skc;
this.unStockNum = 1;
this.storageNum = skc.storageNum;
... ...
... ... @@ -136,7 +136,6 @@ export default {
}
},
onClickProduct() {
console.log(this.productInfo);
this.$router.push({
name: 'ProductDetail',
params: {
... ... @@ -150,7 +149,7 @@ export default {
onNoSale(skc) {
this.$refs.modalUnstock.show({skc});
},
async onNoSaleSure({skc, num}) {
async onNoSaleSure({skc, num}) { // 商品下架确认
console.log(skc, num);
const result = await this.postNoSale({
product_id: this.productInfo.productId,
... ...
... ... @@ -10,7 +10,7 @@
</span>
<span class="wordText">{{price}}</span>
</div>
<OrderMargin class="order-item order-margin" :data="computeTip" :hiddenIcon="hiddenIcon"></OrderMargin>
<OrderMargin class="order-item order-margin" :data="computeTip" :url="url" :superSell="isEntry" ></OrderMargin>
<OrderFee class="order-item" :data="computeTip"></OrderFee>
<AddressInfo :data="addressInfo" class="order-item"></AddressInfo>
</div>
... ... @@ -32,7 +32,7 @@ import TitleComp from './components/confirm/title';
import OrderMargin from './components/confirm/order-margin';
import OrderFee from './components/confirm/order-fee';
import OrderAgree from './components/confirm/agree';
import {get} from 'lodash'
import {get} from 'lodash';
import { createNamespacedHelpers} from 'vuex';
const { mapState, mapActions, mapMutations, mapGetters} = createNamespacedHelpers(
... ... @@ -61,7 +61,7 @@ export default {
isAgreeTerms: false,
hiddenIcon: true,
agreeDesc: '有货卖家协议',
url: `http://m.yohobuy.com/activity/student/detail/renzhen?openby:yohobuy={\"action\":\"go.h5\",\"params\":{\"url\":\"https://activity.yoho.cn/feature/3187.html?title=卖家协议\"}}`,
url: 'http://m.yohobuy.com/activity/student/detail/renzhen?openby:yohobuy={\"action\":\"go.h5\",\"params\":{\"url\":\"https://activity.yoho.cn/feature/3187.html?title=卖家协议\"}}',
isEntry: false,
};
},
... ... @@ -84,14 +84,14 @@ export default {
},
mounted() {
this.isEntry = false
this.isEntry = false;
this.fetchSellerEntryStatus({})
.then((res)=> {
console.log(res)
console.log(res);
if (res) {
this.isEntry = get(res, 'entrySellerType', 0) !== 0
this.isEntry = get(res, 'entrySellerType', 0) !== 0;
}
})
});
this.fetchSellerOrderCount({tabType: 'sell'});// 19268
this.sellerCompute({price: this.price, skup: this.skup});
... ... @@ -101,7 +101,7 @@ export default {
isShowTip(val) {
if (val) {
this.showToast()
this.showToast();
}
}
},
... ... @@ -138,14 +138,25 @@ export default {
},
onConfirm: () => {
this.sellerPublish({price: this.price, skup: this.skup, address_id: this.addressInfo.address_id})
.then(() => {
this.$createToast({
time: 1000,
type: 'txt',
txt: '出售成功'
}).show();
.then((res) => {
if (res && res.data && res.data.code == 200) {
this.$createToast({
time: 1000,
type: 'txt',
txt: '出售成功'
}).show();
this.$router.go(-1);
} else {
this.$createToast({
time: 1000,
type: 'txt',
txt: res.message
}).show();
}
this.$router.go(-1);
});
},
onCancel: () => {
... ... @@ -188,7 +199,7 @@ export default {
},
showToast() {
this.SELLER_ASK_SET_IS_SHOWTOAST(false)
this.SELLER_ASK_SET_IS_SHOWTOAST(false);
this.$createToast({
time: 1000,
type: 'txt',
... ...
... ... @@ -177,6 +177,8 @@ export default {
type: 'txt'
}).show();
await this.delay(1500);
this.$router.replace({
name: 'ProductDetail',
params: {
... ... @@ -221,7 +223,12 @@ export default {
},
onNumChange(count) {
this[Types.CHANGE_SELL_NUM](count);
}
},
delay(ns) {
return new Promise(resolve => {
setTimeout(resolve, ns);
});
},
}
};
</script>
... ...
... ... @@ -6,8 +6,7 @@
:hasBorderRadius="false"
:emulateMask="true">
<div class="buy-sheet">
<!-- 临时链接示例 -->
<a class="header" href="http://m.yohobuy.com">求购<i class="cubeic-question"></i></a>
<a class="header" href="https://activity.yoho.cn/feature/6761.html?share_id=9467&title=UFO求购功能说明">求购<i class="cubeic-question"></i></a>
<div class="title">
<div class="title-thumbnail">
<square-img :src="imageUrl" :width="300" :height="300"/>
... ...
... ... @@ -5,6 +5,7 @@ export default function() {
state: {
alipayAccount: '',
certName: '',
nickName: '',
validStatus: 0
},
mutations: {
... ... @@ -12,10 +13,12 @@ export default function() {
let {
alipayAccount,
certName,
nickName,
validStatus
} = data;
state.alipayAccount = maskAccount(alipayAccount);
state.nickName = nickName || '';
state.certName = certName;
state.validStatus = validStatus;
}
... ...
... ... @@ -10,9 +10,6 @@ const initailData = () => ({
currentStatus: null,
routeParamStatus: null,
isShowEmpty: false,
// 求购调价
changePrice: 0,
});
export default function() {
... ... @@ -52,17 +49,16 @@ export default function() {
state.pagetotal = 0;
state.pullUpLoad = true;
},
setChangePrice(state, price) {
state.changePrice = price;
},
resetData(state) {
const s = initailData();
const keyList = Object.keys(s);
const keyBlackList = ['currentStatus', 'routeParamStatus'];
Object.keys(s).forEach(key => {
if (key !== 'currentStatus') {
for (const key of keyList) {
if (!keyBlackList.includes(key)) {
state[key] = s[key];
}
});
}
},
},
actions: {
... ... @@ -85,7 +81,7 @@ export default function() {
const { owner } = param;
const res = await this.$api.get('/api/order/list', {
tabType: owner,
type: currentStatus || routeParamStatus,
type: currentStatus || routeParamStatus || 1,
page,
});
... ... @@ -178,16 +174,17 @@ export default function() {
},
// 买家调价
async confirmChangePrice({ commit }, { orderCode, price }) {
async confirmChangePrice(_, { orderCode, price }) {
const res = await this.$api.post('/api/order/buyerask/changeprice', {
orderCode: `${orderCode}`,
price: +price,
});
if (res.code) {
commit('setChangePrice', 0);
if (res.code === 200) {
return { errMsg: '', isOk: true };
} else {
return { errMsg: res.message, isOk: false };
}
return res.code === 200 ? res.data : null;
},
},
getters: {},
... ...
... ... @@ -210,9 +210,14 @@ export default function() {
} else {
commit(SELLER_ASK_PUBLISH_FAILURE, result.message);
}
return result;
}, error => {
console.log(error);
commit(SELLER_ASK_PUBLISH_FAILURE, TIP);
return {
code: 400,
message: TIP
};
});
}
},
... ...
{
"name": "xianyu-ufo-app-web",
"version": "0.0.2-beta-23",
"version": "0.0.2-beta-25",
"private": true,
"description": "Xianyu Project With Express",
"repository": {
... ...