Authored by lea guo

Merge branch 'develop' of git.yoho.cn:fe/xianyu-ufo-app-web into develop

... ... @@ -53,10 +53,12 @@ export default {
default: ''
},
extra: {
type: Object,
default() {
return {};
}
type: String,
default: '{}'
},
replace: {
type: Boolean,
default: false
}
},
components: {
... ... @@ -125,11 +127,12 @@ export default {
this.hide();
this.$emit('paySuccess');
this.$router.push({
this.$router.replace({
name: 'OrderPay',
query: {
orderCode: this.orderCode,
payParams: result.data.payParams
payParams: result.data.payParams,
extra: this.extra
}
});
}
... ...
... ... @@ -3,11 +3,13 @@ const config = {
axiosBaseUrl: '/xianyu',
axiosResponseType: 'json',
reportUrl: '//badjs.yoho.cn/apm/yas2.gif',
alipayUrl: 'https://openapi.alipaydev.com/gateway.do',
},
production: {
axiosBaseUrl: '/xianyu',
axiosResponseType: 'json',
reportUrl: '//badjs.yoho.cn/apm/yas2.gif',
alipayUrl: 'https://openapi.alipay.com/gateway.do'
},
};
... ...
... ... @@ -19,6 +19,7 @@ export default [
props: route => ({
orderCode: route.query.orderCode,
payParams: route.query.payParams,
extra: route.query.extra
}),
},
{
... ...
<template>
<div>
{{orderCode}} <====>
{{payParams}}
</div>
<LayoutApp :show-back="true">
<div>{{count}} 秒</div>
<div>支付成功跳转成功页</div>
<div>支付失败返回上一层</div>
</LayoutApp>
</template>
<script>
const ALIPAY_DOMAIN = 'https://openapi.alipay.com/gateway.do';
import config from 'config';
export default {
name: 'PayPage',
props: ['orderCode', 'payParams', 'extra'],
data() {
return {
count: 60
};
},
mounted() {
if (this.payParams) {
const url = ALIPAY_DOMAIN + '?' + this.payParams;
const url = config.alipayUrl + '?' + this.payParams;
window.location.href = url;
}
this.setCount();
},
methods: {}
methods: {
setCount() {
if (this.count > 0) {
setTimeout(() => {
this.count = this.count - 1;
this.setCount();
}, 1000);
}
}
}
};
</script>
... ...
... ... @@ -6,7 +6,7 @@
@on-change-price="onChangePrice"
@on-no-sale="onNoSale"></ProductItem>
</div>
<UfoNoItem :tip="`暂无数据`" v-else></UfoNoItem>
<UfoNoItem :tip="`暂无数据`" class="no-item-margin" v-else></UfoNoItem>
</template>
<script>
... ... @@ -41,4 +41,8 @@ export default {
overflow: hidden;
}
.no-item-margin {
margin-top: 30%;
}
</style>
... ...
... ... @@ -50,30 +50,32 @@
</div>
<div class="submit-container">
<div class="agree-container">
<div class="checkbox">
<!--<div class="checkbox">
<Checkbox :option="labelOption" shape="square" v-model="isAgree"></Checkbox>
</div>
<a @click="showAgreement">卖家协议</a>
<a @click="showAgreement">卖家协议</a>-->
<OrderCheck v-model="isAgree" :desc="`卖家协议`" :url="agreementURL"></OrderCheck>
</div>
<div :class="['submit-button', (isAgree && calced) ? 'active' : '']">
<button @click="changePrice">提交</button>
</div>
</div>
<!--平台费用问号点击弹框-->
<Modal v-model="platformFeeModalVisible" :transfer="true" cancel-text="我知道了">
<div class="fee-dialog-container">
<p class="modal-title">平台费用</p>
<p class="fee-line">
<span class="fee-title">商品鉴定费</span>
<span class="fee-title">商品鉴定费</span>
<span class="fee-price">{{platformFee.appraiseFee}}</span>
</p>
<p class="fee-line">
<span class="fee-title">商品包装费</span>
<span class="fee-title">商品包装费</span>
<span class="fee-price">{{platformFee.packageFee}}</span>
</p>
<p class="fee-line total">
<span class="fee-title">平台服务费</span>
<span class="fee-title">平台服务费({{platformFee.goodsPaymentRatePercent}})</span>
<span class="fee-price">{{platformFee.serviceFee}}</span>
</p>
</div>
... ... @@ -90,21 +92,25 @@ import InputUfo from './components/input-ufo';
import {Checkbox} from 'cube-ui';
import {get} from 'lodash';
import Modal from './components/modal';
import OrderCheck from '../components/confirm/agree';
const {mapState, mapActions} = createNamespacedHelpers('order/priceChange');
export default {
name: 'noEntryDetail',
components: {Modal, InputUfo, ScrollView, LayoutApp, ImgSize, Checkbox},
components: {OrderCheck, Modal, InputUfo, ScrollView, LayoutApp, ImgSize, Checkbox},
data() {
return {
title: '调价',
agreementURL: 'https://activity.yoho.cn/feature/3187.html?share_id=5851&title=ufo-%E5%8D%96%E5%AE%B6%E5%8D%8F%E8%AE%AE',
platformFeeModalVisible: false,
platformFee: {
amount: '-¥0',
appraiseFee: '¥0.00',
packageFee: '¥0.00',
serviceFee: '¥0.00'
serviceFee: '¥0.00',
goodsPaymentRatePercent: '0.00%',
payChannelPercentage: '0.00%'
},
bankTransferFee: '-¥0',
income: '¥0',
... ... @@ -126,19 +132,24 @@ export default {
// this.inputChange = debounce(this.onChange.bind(this), 500);
},
computed: {
...mapState(['noEntryOrderInfo', 'fetching']),
postLoading() {
return this.fetchingChangePrice || !this.calced;
}
...mapState(['noEntryOrderInfo'])
},
watch: {
chgPrice() {
this.calced = false;
this.platformFee = '-¥0';
this.platformFee = {
amount: '-¥0',
appraiseFee: '¥0.00',
packageFee: '¥0.00',
serviceFee: '¥0.00',
goodsPaymentRatePercent: '0.00%',
payChannelPercentage: '0.00%'
};
this.bankTransferFee = '-¥0';
this.income = '¥0';
this.earnestMoney = '¥0';
}
},
methods: {
...mapActions(['fetchOrder', 'postNoEntryCalcPrice', 'postNoEntryChangePrice']),
... ... @@ -226,9 +237,7 @@ export default {
showEarnestQuestion() { // 跳转保证金页面
console.log('showEarnest');
},
showAgreement() { // 跳转卖家协议
console.log('showAgreement');
},
/**
... ... @@ -498,11 +507,11 @@ export default {
display: flex;
.fee-title {
width: 50%;
width: 55%;
}
.fee-price {
width: 50%;
width: 45%;
text-align: right;
}
}
... ... @@ -517,9 +526,9 @@ export default {
.agree-container {
width: 100%;
height: 80px;
border-top: 1px solid #f0f0f0;
background-color: #fff;
padding: 20px 48px;
a {
display: inline-block;
... ...
... ... @@ -145,6 +145,21 @@ export default {
price: this.fee.earnestMoneyStr,
desc: '保证金',
orderCode: orderResult.data.orderCode,
extra: JSON.stringify({
type: UserType.sell,
back: {
name: 'ProductDetail',
params: {
productId: this.productId
}
},
forward: {
name: 'SellPayOk',
query: {
orderCode: orderResult.data.orderCode
}
}
}),
onCloseAction() {
vm.onClose(orderResult.data.orderCode);
}
... ...
... ... @@ -64,7 +64,7 @@ export default {
orderCode,
tabType: 'sell'
});
console.log('fetchOrder= ', result);
console.log('fetchOrder= ', result.data);
if (result && result.code === 200) {
commit(Types.FETCH_NOENTRY_ORDER_PRODUCT_SUCCESS, {
... ... @@ -132,6 +132,7 @@ export default {
zipCode: '' } },
md5: '6ae15b6dee1a7ac6ba39244894671ad5',
message: '订单详情' };
commit(Types.FETCH_NOENTRY_ORDER_PRODUCT_SUCCESS, {
order: result
});
... ...