|
@@ -219,14 +219,14 @@ export default {
|
|
|
tradeCode: this.password
|
|
tradeCode: this.password
|
|
|
})
|
|
})
|
|
|
.then(() => {
|
|
.then(() => {
|
|
|
- this.$http
|
|
|
|
|
- .post('/asset/gift', {
|
|
|
|
|
- assetId: this.$route.query.id,
|
|
|
|
|
- toUserId: this.$route.query.toUserId
|
|
|
|
|
- })
|
|
|
|
|
- .then(res => {
|
|
|
|
|
- this.orderId = res.id;
|
|
|
|
|
- if (Number(this.gas)) {
|
|
|
|
|
|
|
+ if (Number(this.gas)) {
|
|
|
|
|
+ this.$http
|
|
|
|
|
+ .post('/asset/gift', {
|
|
|
|
|
+ assetId: this.$route.query.id,
|
|
|
|
|
+ toUserId: this.$route.query.toUserId
|
|
|
|
|
+ })
|
|
|
|
|
+ .then(res => {
|
|
|
|
|
+ this.orderId = res.id;
|
|
|
this.$nextTick(() => {
|
|
this.$nextTick(() => {
|
|
|
if (this.payType === 'ALIPAY') {
|
|
if (this.payType === 'ALIPAY') {
|
|
|
// document.location.replace(
|
|
// document.location.replace(
|
|
@@ -304,18 +304,30 @@ export default {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
|
- } else {
|
|
|
|
|
|
|
+ })
|
|
|
|
|
+ .catch(e => {
|
|
|
|
|
+ if (e) {
|
|
|
|
|
+ this.$toast(e.error);
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ } else {
|
|
|
|
|
+ this.$http
|
|
|
|
|
+ .post('/asset/giftWithoutGasFee', {
|
|
|
|
|
+ assetId: this.$route.query.id,
|
|
|
|
|
+ toUserId: this.$route.query.toUserId
|
|
|
|
|
+ })
|
|
|
|
|
+ .then(res => {
|
|
|
this.$toast.success('转赠成功');
|
|
this.$toast.success('转赠成功');
|
|
|
setTimeout(() => {
|
|
setTimeout(() => {
|
|
|
this.$router.go(-2);
|
|
this.$router.go(-2);
|
|
|
}, 1500);
|
|
}, 1500);
|
|
|
- }
|
|
|
|
|
- })
|
|
|
|
|
- .catch(e => {
|
|
|
|
|
- if (e) {
|
|
|
|
|
- this.$toast(e.error);
|
|
|
|
|
- }
|
|
|
|
|
- });
|
|
|
|
|
|
|
+ })
|
|
|
|
|
+ .catch(e => {
|
|
|
|
|
+ if (e) {
|
|
|
|
|
+ this.$toast(e.error);
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
})
|
|
})
|
|
|
.catch(e => {
|
|
.catch(e => {
|
|
|
if (e) {
|
|
if (e) {
|