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