调整接口地址
This commit is contained in:
parent
883461c852
commit
cfad35ec52
|
@ -59,12 +59,13 @@ Page({
|
|||
// 开发版
|
||||
case 'develop':
|
||||
// api = `http://localhost:9001`;
|
||||
// api = `https://zgd.hbhcbn.com/recharge-print-api`;
|
||||
api = `https://zgd.hbhcbn.com/recharge-print-api-test`;
|
||||
// api = `https://zgd.hbhcbn.com/recharge-print-api-test`;
|
||||
break;
|
||||
// 体验版
|
||||
case 'trial':
|
||||
api = `https://zgd.hbhcbn.com/recharge-print-api-test`;
|
||||
// api = `https://zgd.hbhcbn.com/recharge-print-api`;
|
||||
break;
|
||||
// 正式版
|
||||
case 'release':
|
||||
|
@ -84,14 +85,14 @@ Page({
|
|||
alertInfo("下载文件失败")
|
||||
return;
|
||||
}
|
||||
const fs = wx.getFileSystemManager()
|
||||
const newPath = `${wx.env.USER_DATA_PATH}/收据-${detail.time.slice(0, 10)}.pdf`
|
||||
fs.rename({
|
||||
oldPath: res.tempFilePath,
|
||||
newPath: newPath,
|
||||
success(r) {
|
||||
// const fs = wx.getFileSystemManager()
|
||||
// const newPath = `${wx.env.USER_DATA_PATH}/收据-${detail.time.slice(0, 10)}.pdf`
|
||||
// fs.rename({
|
||||
// oldPath: res.tempFilePath,
|
||||
// newPath: newPath,
|
||||
// success(r) {
|
||||
wx.openDocument({
|
||||
filePath: newPath,
|
||||
filePath: res.tempFilePath,
|
||||
fileType: [ "pdf"], // 3. 这个必须写合法类型,不然下载不了 !!!
|
||||
success: function (res) {
|
||||
resolve()
|
||||
|
@ -101,13 +102,13 @@ Page({
|
|||
console.log('打开失败错误为', e)
|
||||
rej()
|
||||
}
|
||||
});
|
||||
},
|
||||
fail(res) {
|
||||
console.error(res)
|
||||
alertInfo("下载失败")
|
||||
rej()
|
||||
}
|
||||
// });
|
||||
// },
|
||||
// fail(res) {
|
||||
// console.error(res)
|
||||
// alertInfo("下载失败")
|
||||
// rej()
|
||||
// }
|
||||
})
|
||||
|
||||
|
||||
|
|
|
@ -54,6 +54,7 @@ export function getConfigByEnv() {
|
|||
// 体验版
|
||||
case 'trial':
|
||||
api = "https://zgd.hbhcbn.com/wxApi"
|
||||
// api = "https://zgd.hbhcbn.com/api3"
|
||||
break;
|
||||
// 正式版
|
||||
case 'release':
|
||||
|
|
Loading…
Reference in New Issue
Block a user