调整样式,新增发票打印复制链接
This commit is contained in:
@@ -32,6 +32,45 @@ Page({
|
||||
detail: { ...data, way: getRechargeOperateWay(data.way), type: getRechargeOperateType(data.type) }
|
||||
})
|
||||
},
|
||||
record() {
|
||||
const { detail } = this.data;
|
||||
wx.showModal({
|
||||
title: '提示',
|
||||
content: '为了您更好的体验,请复制链接,通过电脑浏览器打开下载',
|
||||
showCancel: true,
|
||||
cancelText: '关闭',
|
||||
confirmText: '复制链接',
|
||||
|
||||
complete: (res) => {
|
||||
if (res.confirm) {
|
||||
const result = wx.getAccountInfoSync();
|
||||
const { envVersion } = result.miniProgram;
|
||||
let api = ""
|
||||
switch (envVersion) {
|
||||
// 开发版
|
||||
case 'develop':
|
||||
wx.setClipboardData({
|
||||
data: `https://zgd.hbhcbn.com/print/?id=${detail.serialNumber}`,
|
||||
})
|
||||
break;
|
||||
// 体验版
|
||||
case 'trial':
|
||||
wx.setClipboardData({
|
||||
data: `https://zgd.hbhcbn.com/h5/?report=${id}&tenement=${tenement}`,
|
||||
})
|
||||
break;
|
||||
// 正式版
|
||||
case 'release':
|
||||
wx.setClipboardData({
|
||||
data: `https://zgd.hbhcbn.com/reporth5/?report=${id}&tenement=${tenement}`,
|
||||
})
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
back() {
|
||||
// wx.navigateBack({ delta: 1 });
|
||||
wx.navigateBack();
|
||||
|
@@ -86,5 +86,6 @@
|
||||
</van-cell-group>
|
||||
|
||||
<view class="operate">
|
||||
<van-button type="default" block bind:tap="back">返回</van-button>
|
||||
<van-button type="info" block bind:tap="record" style="flex: 1; margin-right: 20rpx;">收据</van-button>
|
||||
<van-button type="default" block bind:tap="back" style="flex: 1;">返回</van-button>
|
||||
</view>
|
@@ -1,8 +1,9 @@
|
||||
/* pages/rechargeDetail/index.wxss */
|
||||
.operate {
|
||||
margin-top: 60rpx;
|
||||
margin-top: 20rpx;
|
||||
margin-left: 36rpx;
|
||||
margin-right: 36rpx;
|
||||
padding-bottom: 50rpx;
|
||||
display: flex;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user