开收据调整
This commit is contained in:
@@ -33,9 +33,18 @@ Page({
|
||||
})
|
||||
},
|
||||
record() {
|
||||
const { detail } = this.data;
|
||||
if (detail.orderStatus === 1) {
|
||||
alertInfo("审核中的充值不能开收据")
|
||||
return;
|
||||
}
|
||||
if (detail.orderStatus === 2) {
|
||||
alertInfo("已退回的充值不能开收据")
|
||||
return;
|
||||
}
|
||||
const handleDownload = () => {
|
||||
return new Promise((resolve, rej) => {
|
||||
const { detail } = this.data;
|
||||
|
||||
const result = wx.getAccountInfoSync();
|
||||
const { envVersion } = result.miniProgram;
|
||||
let api = ""
|
||||
@@ -55,11 +64,9 @@ Page({
|
||||
api = `https://zgd.hbhcbn.com/recharge-print-api`;
|
||||
break;
|
||||
}
|
||||
console.log("api", `${api}/${detail.id}`)
|
||||
wx.downloadFile({
|
||||
url: `${api}/${detail.id}`,
|
||||
success: (res) => {
|
||||
console.log('res', res)
|
||||
if (res.statusCode === 200) {
|
||||
if (!res.tempFilePath) {
|
||||
alertError("获取文件失败")
|
||||
|
Reference in New Issue
Block a user