开收据调整
This commit is contained in:
parent
37c8d6560f
commit
86ca43d214
|
@ -193,7 +193,6 @@ Page({
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
async onChangePage(e) {
|
async onChangePage(e) {
|
||||||
console.log('e', e)
|
|
||||||
const page = e.detail.currentIndex;
|
const page = e.detail.currentIndex;
|
||||||
const that = this;
|
const that = this;
|
||||||
this.setData({
|
this.setData({
|
||||||
|
@ -284,7 +283,6 @@ Page({
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
case "day":
|
case "day":
|
||||||
console.log('day')
|
|
||||||
this.setData({
|
this.setData({
|
||||||
yearMonthDay: time,
|
yearMonthDay: time,
|
||||||
yearMonthDayStamp: new Date(time).getTime(),
|
yearMonthDayStamp: new Date(time).getTime(),
|
||||||
|
|
|
@ -90,7 +90,6 @@ Component({
|
||||||
},
|
},
|
||||||
//更改页码点击事件
|
//更改页码点击事件
|
||||||
onChangePage: function (e) {
|
onChangePage: function (e) {
|
||||||
//console.log("更改页码事件:",e);
|
|
||||||
this.setData({
|
this.setData({
|
||||||
pageMask: false,
|
pageMask: false,
|
||||||
index: e.currentTarget.dataset.index //点击的页数
|
index: e.currentTarget.dataset.index //点击的页数
|
||||||
|
|
|
@ -44,7 +44,6 @@ Component({
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
jumpToDetail(e) {
|
jumpToDetail(e) {
|
||||||
console.log('e', e)
|
|
||||||
wx.navigateTo({
|
wx.navigateTo({
|
||||||
url: `/pages/encyclopediaDetail/index?id=${e.currentTarget.dataset.data.id}`,
|
url: `/pages/encyclopediaDetail/index?id=${e.currentTarget.dataset.data.id}`,
|
||||||
})
|
})
|
||||||
|
|
|
@ -65,7 +65,6 @@ Page({
|
||||||
},
|
},
|
||||||
getPhoneNumber(e) {
|
getPhoneNumber(e) {
|
||||||
const { errno, code: phoneCode } = e.detail;
|
const { errno, code: phoneCode } = e.detail;
|
||||||
console.log('e', e)
|
|
||||||
switch(errno) {
|
switch(errno) {
|
||||||
case 103:
|
case 103:
|
||||||
alertInfo("已拒绝");
|
alertInfo("已拒绝");
|
||||||
|
|
|
@ -61,7 +61,6 @@ Page({
|
||||||
alertInfo("文件不能大于1M")
|
alertInfo("文件不能大于1M")
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// console.log('res', res)
|
|
||||||
loadingFunc(async () => {
|
loadingFunc(async () => {
|
||||||
await this.upload(res)
|
await this.upload(res)
|
||||||
})
|
})
|
||||||
|
@ -93,7 +92,9 @@ Page({
|
||||||
confirmButtonText: "联系客服",
|
confirmButtonText: "联系客服",
|
||||||
cancelButtonText: "关闭"
|
cancelButtonText: "关闭"
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
|
wx.switchTab({
|
||||||
|
url: '/pages/home/index',
|
||||||
|
})
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
wx.redirectTo({
|
wx.redirectTo({
|
||||||
url: '/pages/rechargeRecord/index',
|
url: '/pages/rechargeRecord/index',
|
||||||
|
|
|
@ -33,9 +33,18 @@ Page({
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
record() {
|
record() {
|
||||||
|
const { detail } = this.data;
|
||||||
|
if (detail.orderStatus === 1) {
|
||||||
|
alertInfo("审核中的充值不能开收据")
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (detail.orderStatus === 2) {
|
||||||
|
alertInfo("已退回的充值不能开收据")
|
||||||
|
return;
|
||||||
|
}
|
||||||
const handleDownload = () => {
|
const handleDownload = () => {
|
||||||
return new Promise((resolve, rej) => {
|
return new Promise((resolve, rej) => {
|
||||||
const { detail } = this.data;
|
|
||||||
const result = wx.getAccountInfoSync();
|
const result = wx.getAccountInfoSync();
|
||||||
const { envVersion } = result.miniProgram;
|
const { envVersion } = result.miniProgram;
|
||||||
let api = ""
|
let api = ""
|
||||||
|
@ -55,11 +64,9 @@ Page({
|
||||||
api = `https://zgd.hbhcbn.com/recharge-print-api`;
|
api = `https://zgd.hbhcbn.com/recharge-print-api`;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
console.log("api", `${api}/${detail.id}`)
|
|
||||||
wx.downloadFile({
|
wx.downloadFile({
|
||||||
url: `${api}/${detail.id}`,
|
url: `${api}/${detail.id}`,
|
||||||
success: (res) => {
|
success: (res) => {
|
||||||
console.log('res', res)
|
|
||||||
if (res.statusCode === 200) {
|
if (res.statusCode === 200) {
|
||||||
if (!res.tempFilePath) {
|
if (!res.tempFilePath) {
|
||||||
alertError("获取文件失败")
|
alertError("获取文件失败")
|
||||||
|
|
Loading…
Reference in New Issue
Block a user