|
@@ -20,9 +20,6 @@ export default {
|
|
},
|
|
},
|
|
created() {
|
|
created() {
|
|
this.order = JSON.parse(this.$route.query.order);
|
|
this.order = JSON.parse(this.$route.query.order);
|
|
- // this.order = {
|
|
|
|
- // mailbox: '1212'
|
|
|
|
- // }
|
|
|
|
this.getEmail()
|
|
this.getEmail()
|
|
},
|
|
},
|
|
mounted() {
|
|
mounted() {
|
|
@@ -55,77 +52,21 @@ export default {
|
|
});
|
|
});
|
|
}
|
|
}
|
|
},
|
|
},
|
|
- pushAgain: async function (id) {
|
|
|
|
- const self = this;
|
|
|
|
- // if (self.setTime >= 0 && self.timer) {
|
|
|
|
- // uni.showToast({
|
|
|
|
- // title: '邮件已发送,请于1分钟后再试',
|
|
|
|
- // icon: 'none',
|
|
|
|
- // });
|
|
|
|
- // return false;
|
|
|
|
- // }
|
|
|
|
- // if (self.timer && self.setTime < 0) {
|
|
|
|
- // clearTimeout(self.timer);
|
|
|
|
- // self.timer = null;
|
|
|
|
- // }
|
|
|
|
- // self.timer = setTimeout(() => {
|
|
|
|
- // self.setTime--;
|
|
|
|
- // }, 1000);
|
|
|
|
- // const data = {
|
|
|
|
- // attachments: [
|
|
|
|
- // {
|
|
|
|
- // name: '嘉里停车发票.pdf',
|
|
|
|
- // invoiceId: self.order.id,
|
|
|
|
- // url: url,
|
|
|
|
- // },
|
|
|
|
- // ],
|
|
|
|
- // html: true,
|
|
|
|
- // sendTo: 'string',
|
|
|
|
- // sendTos: [self.order.mailbox],
|
|
|
|
- // subject: self.order.invoiceTitleName + '的电子发票',
|
|
|
|
- // text: '停车发票',
|
|
|
|
- // };
|
|
|
|
- // self.$md(data);
|
|
|
|
|
|
+ pushAgain: async function () {
|
|
|
|
+ const id = this.order.id
|
|
try {
|
|
try {
|
|
- const res = await invoicesAgainSandEmail(id)
|
|
|
|
- uni.showToast({
|
|
|
|
- title: '邮件已发送邮箱,请注意查收',
|
|
|
|
- icon: 'none',
|
|
|
|
- duration: 2000
|
|
|
|
- });
|
|
|
|
|
|
+ await invoicesAgainSandEmail(id)
|
|
|
|
+ uni.showToast({
|
|
|
|
+ title: '邮件已发送邮箱,请注意查收',
|
|
|
|
+ icon: 'none',
|
|
|
|
+ duration: 2000
|
|
|
|
+ });
|
|
} catch {
|
|
} catch {
|
|
uni.showToast({
|
|
uni.showToast({
|
|
title: '服务器开小差了呢,请您稍后再试',
|
|
title: '服务器开小差了呢,请您稍后再试',
|
|
icon: 'none',
|
|
icon: 'none',
|
|
});
|
|
});
|
|
}
|
|
}
|
|
- // uni.request({
|
|
|
|
- // url: self.$baseURL + 'sms/email',
|
|
|
|
- // method: 'POST',
|
|
|
|
- // data: data,
|
|
|
|
- // header: JSON.parse(uni.getStorageSync('handleUser')),
|
|
|
|
- // success: (res) => {
|
|
|
|
- // console.log('推送', res.data);
|
|
|
|
- // if (res.data.code === 0) {
|
|
|
|
- // uni.showToast({
|
|
|
|
- // title: '邮件已发送邮箱,请注意查收',
|
|
|
|
- // icon: 'none',
|
|
|
|
- // });
|
|
|
|
- // } else {
|
|
|
|
- // uni.showToast({
|
|
|
|
- // title: res.data.msg,
|
|
|
|
- // duration: 2000,
|
|
|
|
- // icon: 'none',
|
|
|
|
- // });
|
|
|
|
- // }
|
|
|
|
- // },
|
|
|
|
- // fail: () => {
|
|
|
|
- // uni.showToast({
|
|
|
|
- // title: '服务器开小差了呢,请您稍后再试',
|
|
|
|
- // icon: 'none',
|
|
|
|
- // });
|
|
|
|
- // },
|
|
|
|
- // });
|
|
|
|
},
|
|
},
|
|
},
|
|
},
|
|
};
|
|
};
|