调整样式,新增发票打印复制链接

This commit is contained in:
qiaomu 2024-06-18 17:34:17 +08:00
parent 75713f1e97
commit e3ad9ea30a
5 changed files with 60 additions and 12 deletions

View File

@ -30,7 +30,8 @@
}
.notLoginWrapper, .logined {
padding: 30rpx 32rpx;
padding: 24rpx 32rpx;
padding-left: 50rpx;
background-color: var(--middle-green);
display: flex;
align-items: center;
@ -46,11 +47,11 @@
}
.card {
margin-top: 1vh;
margin-top: 0rpx;
margin-left: 46rpx;
margin-right: 46rpx;
border-radius: 30rpx;
padding: 28rpx 30rpx;
padding: 22rpx 30rpx;
/* background-color: rgb(173, 217, 203); */
background: linear-gradient(to bottom right, rgb(212, 240, 231), rgb(145, 206, 185));
}
@ -78,6 +79,10 @@
font-size: 32rpx;
}
.cardItem:last-child {
margin-bottom: 12rpx;
}
.cardItemValue {
display: flex;
flex: 1;
@ -91,17 +96,17 @@
.recharge {
background: #fff;
padding: 20rpx 30rpx;
margin-top: 30rpx;
margin-top: 24rpx;
margin-left: 46rpx;
margin-right: 46rpx;
margin-bottom: 40rpx;
margin-bottom: 30rpx;
border-radius: 30rpx;
}
.operate {
margin-left: 46rpx;
margin-right: 46rpx;
margin-bottom: 40rpx;
margin-bottom: 24rpx;
}
.welcome {
@ -128,13 +133,13 @@
}
.moneyInput {
margin-top: 30rpx;
margin-bottom: 30rpx;
margin-top: 24rpx;
margin-bottom: 24rpx;
}
.others {
margin-left: 46rpx;
margin-right: 46rpx;
margin-top: 40rpx;
margin-top: 10rpx;
margin-bottom: 40rpx;
}

View File

@ -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();

View File

@ -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>

View File

@ -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;
}

View File

@ -21,7 +21,9 @@
<view class="wrapper" wx:if="{{list.length}}">
<view class="recordsWrapper">
<view class="recordsItem border" wx:for="{{list}}" wx:key="index" bind:tap="jumpToDetail" data-id="{{item.id}}">
<view class="type"> 充值 </view>
<view class="type" wx:if="{{item.type === 1}}"> 冲正 </view>
<view class="type" wx:if="{{item.type === 2}}"> 退费 </view>
<view class="type" wx:else> 充值 </view>
<view class="codeTime">
<view class="code"> {{ item.meter.address }} </view>
<view class="time"> {{ item.time }} </view>