|
@@ -250,19 +250,44 @@ export default {
|
|
|
}
|
|
}
|
|
|
this.$toast.loading('请不要离开当前页面');
|
|
this.$toast.loading('请不要离开当前页面');
|
|
|
|
|
|
|
|
- return this.$http
|
|
|
|
|
- .post('/mintOrder/create', {
|
|
|
|
|
- assets: this.assets,
|
|
|
|
|
- mintActivityId: this.activityId,
|
|
|
|
|
- addressId: this.addressInfo.id,
|
|
|
|
|
- invitor: sessionStorage.getItem('invitor')
|
|
|
|
|
- })
|
|
|
|
|
- .then(res => {
|
|
|
|
|
- return Promise.resolve(res);
|
|
|
|
|
- })
|
|
|
|
|
- .catch(e => {
|
|
|
|
|
- return Promise.reject(e);
|
|
|
|
|
- });
|
|
|
|
|
|
|
+ if (this.$route.query.test) {
|
|
|
|
|
+ return this.$http
|
|
|
|
|
+ .post('/mintOrder/testCreate', {
|
|
|
|
|
+ assets: this.assets,
|
|
|
|
|
+ mintActivityId: this.activityId,
|
|
|
|
|
+ addressId: this.addressInfo.id,
|
|
|
|
|
+ invitor: sessionStorage.getItem('invitor')
|
|
|
|
|
+ })
|
|
|
|
|
+ .then(res => {
|
|
|
|
|
+ this.$toast.clear();
|
|
|
|
|
+ this.$dialog
|
|
|
|
|
+ .alert({
|
|
|
|
|
+ message: res
|
|
|
|
|
+ })
|
|
|
|
|
+ .then(() => {
|
|
|
|
|
+ this.$router.back();
|
|
|
|
|
+ });
|
|
|
|
|
+ return Promise.reject();
|
|
|
|
|
+ })
|
|
|
|
|
+ .catch(e => {
|
|
|
|
|
+ this.$toast.clear();
|
|
|
|
|
+ return Promise.reject(e);
|
|
|
|
|
+ });
|
|
|
|
|
+ } else {
|
|
|
|
|
+ return this.$http
|
|
|
|
|
+ .post('/mintOrder/create', {
|
|
|
|
|
+ assets: this.assets,
|
|
|
|
|
+ mintActivityId: this.activityId,
|
|
|
|
|
+ addressId: this.addressInfo.id,
|
|
|
|
|
+ invitor: sessionStorage.getItem('invitor')
|
|
|
|
|
+ })
|
|
|
|
|
+ .then(res => {
|
|
|
|
|
+ return Promise.resolve(res);
|
|
|
|
|
+ })
|
|
|
|
|
+ .catch(e => {
|
|
|
|
|
+ return Promise.reject(e);
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
},
|
|
},
|
|
|
submit() {
|
|
submit() {
|
|
|
if (!this.payType) {
|
|
if (!this.payType) {
|