Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
xianyu-ufo-app-web
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
0
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Email Patches
Plain Diff
Browse Files
Authored by
TaoHuang
5 years ago
Commit
62e896221e371b54f7147121ad16321bba3c9cb7
1 parent
afab4eb9
add alipay url
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
51 additions
and
13 deletions
apps/components/order-pay-type/pay-type.vue
apps/config/index.js
apps/pages/order/index.js
apps/pages/order/pay.vue
apps/pages/order/seller-confirm.vue
apps/components/order-pay-type/pay-type.vue
View file @
62e8962
...
...
@@ -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
}
});
}
...
...
apps/config/index.js
View file @
62e8962
...
...
@@ -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'
},
};
...
...
apps/pages/order/index.js
View file @
62e8962
...
...
@@ -19,6 +19,7 @@ export default [
props
:
route
=>
({
orderCode
:
route
.
query
.
orderCode
,
payParams
:
route
.
query
.
payParams
,
extra
:
route
.
query
.
extra
}),
},
{
...
...
apps/pages/order/pay.vue
View file @
62e8962
<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>
...
...
apps/pages/order/seller-confirm.vue
View file @
62e8962
...
...
@@ -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);
}
...
...
Please
register
or
login
to post a comment