调整分包,完成隐私协议(样式待优化)

This commit is contained in:
2024-07-18 14:18:05 +08:00
parent 765b3ad111
commit 00384d7382
1045 changed files with 34254 additions and 98 deletions

View File

@@ -1,67 +0,0 @@
// pages/agreements/index.js
Page({
/**
* 页面的初始数据
*/
data: {
url: ""
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
const { url } = options;
this.setData({ url });
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
}
})

View File

@@ -1,3 +0,0 @@
{
"usingComponents": {}
}

View File

@@ -1,2 +0,0 @@
<!--pages/agreements/index.wxml-->
<web-view src="https://support.weixin.qq.com/cgi-bin/mmsupport-bin/readtemplate?check=false&nav=faq&t=weixin_agreement"/>

View File

@@ -1 +0,0 @@
/* pages/agreements/index.wxss */

View File

@@ -1,202 +0,0 @@
import { getReportDetail } from "../../service/report";
import { alertInfo, getPixelRatio } from "../../utils/index";
import request from '../../utils/request'
import * as echarts from '../../components/echarts/echarts';
const { OK } = request
// pages/billDetail/index.js
Page({
/**
* 页面的初始数据
*/
data: {
id: "",
time: "",
detail: {},
meters: [],
header1: [
{ key: 'address', title: '电表地址' },
{ title: '起码',renderBody: (item) => { return item?.startNumber } },
{ title: '止码',renderBody: (item) => { return item?.endNumber } },
{ title: '倍率',renderBody: (item) => { return item?.displayRatio } },
],
header2: [
{ title: '用电量', renderBody: (item) => item?.overall?.amount },
{ title: '线损电量',renderBody: (item) => item?.loss?.amount },
{ title: '公摊电量',renderBody: (item) => item?.publicAmount },
{ title: '合计电量',renderBody: (item) => {
} },
]
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
const { id = "R00053677580943361", time = "2023-10" } = options;
this.init(id, time);
},
async init(id, time) {
const { code, message, detail } = await getReportDetail(id)
if (code !== OK) {
alertInfo(message)
return;
}
this.setData({
id, time, detail, meters: detail?.meters?.map(item => {
const finalAmount = Number(item?.overall?.amount || 0) + Number(item?.loss?.amount || 0) + Number(item?.publicAmount || 0)
item.finalAmount = Number(finalAmount).toFixed(2)
return item;
})
})
const option = {
tooltip: {
trigger: 'item'
},
legend: {
top: 10,
left: 'center'
},
label: {
alignTo: 'edge',
formatter: '{name|{b}}\n{value|{c} }',
minMargin: 5,
edgeDistance: 10,
lineHeight: 15,
rich: {
time: {
fontSize: 10,
color: '#999'
}
}
},
series: [
{
type: 'pie',
radius: '50%',
data: [
{ value: 18.3, name: '本期线损电量', itemStyle: { color: 'rgb(104,187,196)' } },
{ value: 187.56, name: '本期用电量', itemStyle: { color: 'rgb(80,135,236)' } },
],
}
]
};
this.init_pieCharts(option);
const that = this;
wx.getSystemInfo({
success: function (res) {
that.setData({
statusBarHeight : res.statusBarHeight,
navBarHeight : res.statusBarHeight , // 顶部导航栏高度为 44px
jiaonangheight: wx.getMenuButtonBoundingClientRect().height, // 胶囊高度
jiaonangwidth:wx.getMenuButtonBoundingClientRect().width,
})
},
})
},
init_pieCharts: function(options) {
this.selectComponent('#echarts').init((canvas, width, height) => {
// 初始化图表
const pieChart = echarts.init(canvas, null, {
width: width,
height: height,
devicePixelRatio: getPixelRatio(),
});
pieChart.setOption(options);
// 注意这里一定要返回 chart 实例,否则会影响事件处理等
return pieChart;
});
},
download() {
const { id: tenement } = wx.getStorageSync('tenement')
const { id } = 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/user-report/?report=${id}&tenement=${tenement}`,
})
break;
// 体验版
case 'trial':
wx.setClipboardData({
data: `https://zgd.hbhcbn.com/user-report/?report=${id}&tenement=${tenement}`,
})
break;
// 正式版
case 'release':
wx.setClipboardData({
data: `https://zgd.hbhcbn.com/user-report-h5/?report=${id}&tenement=${tenement}`,
})
break;
}
}
}
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
}
})

View File

@@ -1,12 +0,0 @@
{
"usingComponents": {
"navigator": "/components/navigator/index",
"avatar": "/components/avatar/index",
"van-row": "@vant/weapp/row/index",
"van-col": "@vant/weapp/col/index",
"echarts": "/components/echarts/ec-canvas",
"table": "/components/table/table",
"van-button": "@vant/weapp/button/index"
},
"navigationStyle": "custom"
}

View File

@@ -1,109 +0,0 @@
<!--pages/billDetail/index.wxml-->
<navigator title="{{ time }}电费账单" canBack="{{true}}" />
<view class="title" style="top: {{statusBarHeight + 46}}px">
<avatar text="{{detail.tenement.shortName}}" />
<view class="titleContent">
<view class="park">
<view class="label">
所属园区:
</view>
<view class="value"> {{ detail.park.name }} </view>
</view>
<view class="address">
<view class="label">
用电地址:
</view>
<view class="value"> {{ detail.tenement.address }} </view>
</view>
<view class="time">
<view class="label">
账单周期:
</view>
<view class="value"> {{ detail.comprehensive.startDate }} 至 {{ detail.comprehensive.endDate }} </view>
</view>
</view>
<van-button type="info" size="small" class="download" bind:click="download">下载</van-button>
</view>
<view class="wrapper">
<view class="line"></view>
<view class="contentTitle"> 本期账单 </view>
<van-row gutter="10">
<van-col span="8">
<view class="colContent">
<view class="colContentTitle">本期用电量</view>
<view class="colContentValue"> {{ detail.comprehensive.consumption }} 千瓦时 </view>
</view>
</van-col>
<van-col span="8">
<view class="colContent">
<view class="colContentTitle">本期电单价</view>
<view class="colContentValue"> {{ detail.comprehensive.price }} 元 </view>
</view>
</van-col>
<van-col span="8">
<view class="colContent">
<view class="colContentTitle">本期电费</view>
<view class="colContentValue"> {{ detail.comprehensive.total }} 元 </view>
</view>
</van-col>
</van-row>
<view class="line"></view>
<view class="contentTitle"> 电费构成 </view>
<echarts
style="width:200rpx;height:180rpx;"
id="echarts"
class='mychart-bar'
canvas-id="mychart-bar"
ec="{{ ec }}"
forceUseOldCanvas="{{false}}"
>
</echarts>
<view class="tooltip">
(本月电量+本月线损电量)*电单价+摊薄公摊电费+摊薄调整电费
</view>
<view class="line"></view>
<view class="contentTitle"> 电量明细 </view>
<view class="tableWrapper" wx:for="{{meters}}">
<view style="margin: 20rpx 0; background-color: #fff;">
<van-row custom-style="height: 100%;display: flex;flex-direction: column;overflow: hidden;">
<van-col span="6">
<view class="tableTitle"> 电表地址 </view>
<view class="tableContent"> {{item.address}} </view>
</van-col>
<van-col span="6">
<view class="tableTitle"> 起码 </view>
<view class="tableContent"> {{item.startNumber}} </view>
</van-col>
<van-col span="6">
<view class="tableTitle"> 止码 </view>
<view class="tableContent"> {{item.endNumber}} </view>
</van-col>
<van-col span="6">
<view class="tableTitle"> 倍率 </view>
<view class="tableContent"> {{item.displayRatio}} </view>
</van-col>
</van-row>
<van-row>
<van-col span="6">
<view class="tableTitle"> 用电量 </view>
<view class="tableContent"> {{item.overall.amount}} </view>
</van-col>
<van-col span="6">
<view class="tableTitle"> 线损电量 </view>
<view class="tableContent"> {{item.loss.amount}} </view>
</van-col>
<van-col span="6">
<view class="tableTitle"> 公摊电量 </view>
<view class="tableContent"> {{item.publicAmount}} </view>
</van-col>
<van-col span="6">
<view class="tableTitle"> 合计电量 </view>
<view class="tableContent"> {{item.finalAmount}} </view>
</van-col>
</van-row>
</view>
</view>
</view>
<view style="height: 20rpx;"></view>

View File

@@ -1,96 +0,0 @@
/* pages/billDetail/index.wxss */
.title {
padding: 30rpx;
box-sizing: border-box;
background: linear-gradient(to bottom, rgb(76,151,131), rgb(167,203,193) );
display: flex;
align-items: center;
position: sticky;
z-index: 99 !important;
}
.titleContent {
margin-left: 30rpx;
font-size: 32rpx;
}
.titleContent .park, .titleContent .address, .titleContent .time {
display: flex;
}
.titleContent .address, .titleContent .time {
margin-top: 20rpx;
}
.titleContent .label {
width: 170rpx;
}
.titleContent .value {
flex: 1;
}
.line {
height: 0.5rpx;
background-color: rgba(5, 5, 5, 0.06);
margin-top: 30rpx;
margin-bottom: 20rpx;
}
page {
background-color: var(--transparent-green);
}
.contentTitle {
font-size: 34rpx;
font-weight: 600;
margin-top: 10rpx;
margin-bottom: 30rpx;
}
.colContent {
background-color: #fff;
border-radius: 24rpx;
font-size: 30rpx;
}
.colContentTitle {
padding: 30rpx 0;
text-align: center;
font-weight: 500;
}
.colContentValue {
padding-bottom: 30rpx;
text-align: center;
overflow: hidden;
}
.tooltip {
font-size: 30rpx;
color: rgb(136, 132, 132);
}
.tableTitle {
background-color: rgb(242,242,242);
font-size: 30rpx;
text-align: center;
padding: 6rpx 0;
width: 100%;
box-sizing: border-box;
}
.tableContent {
font-size: 30rpx;
text-align: center;
padding: 6rpx 10rpx;
width: 100%;
background-color: #fff;
box-sizing: border-box;
flex: 1;
}
.download {
position: absolute;
top: 20rpx;
right: 20rpx;
}

View File

@@ -34,7 +34,7 @@ Page({
jumpToDetail(e) {
const { id: report } = e.currentTarget.dataset
wx.navigateTo({
url: '/pages/billDetail/index?id=' + report,
url: '/childPackage/pages/billDetail/index?id=' + report,
})
},
/**

View File

@@ -17,7 +17,3 @@ page {
flex: 1;
text-indent: 40rpx;
}
.operate {
}

View File

@@ -1,24 +0,0 @@
// pages/electricQuery/components/accountingCard/index.js
Component({
/**
* 组件的属性列表
*/
properties: {
data: Object
},
/**
* 组件的初始数据
*/
data: {
},
/**
* 组件的方法列表
*/
methods: {
}
})

View File

@@ -1,7 +0,0 @@
{
"component": true,
"usingComponents": {
"van-row": "@vant/weapp/row/index",
"van-col": "@vant/weapp/col/index"
}
}

View File

@@ -1,33 +0,0 @@
<!--pages/electricQuery/components/accountingCard/index.wxml-->
<view class="wrapper">
<view class="title">
{{data.meter.address}}
</view>
<van-row>
<van-col span="6">
<view class="tableTitle"> 初始余额 </view>
</van-col>
<van-col span="7">
<view class="tableTitle"> 储值累计金额 </view>
</van-col>
<van-col span="5">
<view class="tableTitle"> 电费 </view>
</van-col>
<van-col span="6">
<view class="tableTitle"> 账务余额 </view>
</van-col>
<van-col span="6">
<view class="tableContent"> {{data.startMoney}} </view>
</van-col>
<van-col span="7">
<view class="tableContent"> {{data.rechargeMoney}} </view>
</van-col>
<van-col span="5">
<view class="tableContent"> {{data.electricMoney}} </view>
</van-col>
<van-col span="6">
<view class="tableContent"> {{data.currentMoney}} </view>
</van-col>
</van-row>
</view>

View File

@@ -1,24 +0,0 @@
/* pages/electricQuery/components/accountingCard/index.wxss */
.wrapper {
background-color: #fff;
margin-top: 30rpx;
}
.title {
padding: 20rpx;
border-bottom: 1rpx solid #ccc;
font-size: 34rpx;
}
.tableTitle {
font-size: 32rpx;
margin: 20rpx 0 14rpx;
text-align: center;
}
.tableContent {
margin-top: 10rpx;
margin-bottom: 20rpx;
text-align: center;
font-size: 32rpx;
}

View File

@@ -1,325 +0,0 @@
// pages/electricQuery/index.js
import { exportElectricityList, getAccountingList, getElectricityList, getMeterReadingList } from "../../service/accounting";
import { getTenementMeterList } from "../../service/meter";
import dayjs from "../../utils/dayjs";
import request from '../../utils/request';
import * as echarts from '../../components/echarts/echarts';
import { alertInfo, getPixelRatio, loadingFunc } from "../../utils/index";
const { OK } = request;
Page({
/**
* 页面的初始数据
*/
data: {
queryType: 0,
timeType: 0,
show: false,
columns: [],
meterList: [],
meterCode: "",
meterId: "",
year: dayjs().format('YYYY'),
yearMonth: dayjs().format("YYYY-MM"),
yearMonthDay: dayjs().format("YYYY-MM-DD"),
yearStamp: new Date().getTime(),
yearMonthStamp: new Date().getTime(),
yearMonthDayStamp: new Date().getTime(),
header: [
{ key: 'address', title: '电表地址', renderBody: (item) => item.meter?.address },
{ title: '时间',renderBody: (item) => { return item.time } },
{ key: 'number', title: '耗量' },
],
meterReadingHeader: [
{ key: 'address', title: '电表地址', renderBody: (item) => item.meter?.address },
{ title: '倍率', key: 'ratio' },
{ key: 'number', title: '抄表记录' },
],
list: [],
visible: false,
meterReadingList: [],
accountingList: [],
electricNumber: 0,
meterNumber: 0,
},
changeQueryType(e) {
const { type } = e.currentTarget.dataset
this.setData({ queryType: type },() => {
switch(type) {
case 0:
this.init()
break;
case 1:
this.getReadingList();
break;
case 2:
this.getAccountingBalanceList();
break;
}
})
},
clickTime() {
const { timeType } = this.data;
this.setData({
timePickerType: timeType === 0 ? "day" : (timeType === 1 ? 'month' : 'year'),
visible: true
})
},
changeTimeType(e) {
const { type } = e.currentTarget.dataset
this.setData({ timeType: type }, () => {
this.init()
})
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
this.init()
},
async init() {
const { queryType, timeType, meterId, year, yearMonth, yearMonthDay } = this.data;
let time;
switch(timeType) {
case 1:
time = yearMonth;
break;
case 2:
time = year;
break;
default:
time = yearMonthDay;
break;
}
const { code, message, data, electricNumber, meterNumber } = await getElectricityList({ type: timeType, meter: meterId, time: time })
if (code !== OK) {
alertInfo(message)
return;
}
this.setData({ list: data, electricNumber, meterNumber })
if (!data?.length) {
return;
}
this.selectComponent('#echarts').init((canvas, width, height) => {
// 初始化图表
const pieChart = echarts.init(canvas, null, {
width: width,
height: height,
devicePixelRatio: getPixelRatio(),
});
const ids = [...new Set(data?.map(item => item?.meter?.id))]
const options = {
tooltip: {
trigger: 'axis'
},
legend: {
data: data?.map(item => item?.meter?.address),
},
grid: {
left: '3%',
right: '4%',
bottom: '3%',
containLabel: true
},
xAxis: {
type: 'category',
boundaryGap: false,
data: [...new Set(data?.map(item => item.time))]
},
yAxis: {
type: 'value'
},
series: ids?.map(item => {
const element = data?.find(i => i?.meter?.id === item)
return {
name: element?.meter?.address,
type: 'line',
stack: 'Total',
data: data?.filter(ele => ele?.meter?.id === item).map(item => item.number)
}})
};
pieChart.setOption(options);
// 注意这里一定要返回 chart 实例,否则会影响事件处理等
return pieChart;
});
},
async getReadingList() {
const { meterId } = this.data;
const { code, message, data } = await getMeterReadingList(meterId)
if (code !== OK) {
alertInfo(message)
return;
}
this.setData({ meterReadingList: data })
},
async export() {
loadingFunc(async () => {
const { queryType, timeType, meterId, year, yearMonth, yearMonthDay } = this.data;
let time;
switch(timeType) {
case 1:
time = yearMonth;
break;
case 2:
time = year;
break;
default:
time = yearMonthDay;
break;
}
const data = await exportElectricityList({ type: timeType, meter: meterId, time: time })
// if (code !== OK) {
// alertInfo(message)
// return;
// }
wx.openDocument({
filePath: data.tempFilePath,
fileType: ['xlsx'],
success() {
},
fail(err) {
}
})
})
},
async getAccountingBalanceList() {
const { meterId } = this.data;
const { code, message, data } = await getAccountingList(meterId)
if (code !== OK) {
alertInfo(message)
return;
}
this.setData({ accountingList: data })
},
async getMeters() {
const { id } = wx.getStorageSync('tenement')
const { code, message, data } = await getTenementMeterList(id);
if (code !== OK) {
alertInfo(message)
return;
}
this.setData({
meterList: data || [],
})
},
clickMeter() {
this.setData({
type: "meter",
columns: [{ id: "", name: "全部", code: "" }, ...this.data.meterList.map(item => ({ id: item.id, name: `${item.code}-${item.address}`, code: item.code }))],
show: true,
title: "表计"
})
},
onCancel() {
this.setData({
type: "meter",
columns: [],
show: false,
title: "",
})
},
onOk(e) {
const { id, code } = e.detail.value;
this.setData({
// year: currentYear,
meterId: id,
meterCode: code,
type: "",
show: false,
title: ""
}, () => {
const { queryType, } = this.data;
switch(queryType) {
case 1:
this.getReadingList();
break;
case 2:
this.getAccountingBalanceList();
break;
default:
this.init();
break;
}
})
},
onTimeClose() {
this.setData({ visible: false })
},
onTimeCancel() {
this.setData({ visible: false })
},
onTimeConfirm(e) {
const { type, time } = e.detail;
switch(type) {
case "year":
this.setData({ year: time, visible: false, }, () => {
this.init();
});
break;
case "month":
const [year, month] = time.split("-")
this.setData({ yearMonth: time, yearMonthStamp: new Date(Number(year), Number(month) - 1, 1).getTime(), visible: false }, () => {
this.init();
});
break;
case "day":
this.setData({ yearMonthDay: time, yearMonthDayStamp: new Date(time).getTime(), visible: false }, () => {
this.init();
})
break;
}
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
this.getMeters()
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
}
})

View File

@@ -1,16 +0,0 @@
{
"usingComponents": {
"navigator": "/components/navigator/index",
"van-icon": "@vant/weapp/icon/index",
"custom-picker": "/components/picker/index",
"van-row": "@vant/weapp/row/index",
"van-col": "@vant/weapp/col/index",
"van-button": "@vant/weapp/button/index",
"table": "/components/table/table",
"empty": "/components/empty/index",
"timePicker": "/components/timePicker/index",
"accountingCard": "./components/accountingCard/index",
"echarts": "/components/echarts/ec-canvas"
},
"navigationStyle": "custom"
}

View File

@@ -1,125 +0,0 @@
<!--pages/electricQuery/index.wxml-->
<navigator title="用电查询" canBack="{{true}}" />
<view class="wrapper">
<view class="queryWrapper">
<view class="label">
选择电表
</view>
<view class="select" bind:tap="clickMeter">
<view class="selectContent">
{{ meterCode === "" ? '全部' : meterCode }}
</view>
<van-icon name="arrow-down" />
</view>
</view>
<view class="query">
<view class="typeQuery">
<van-row>
<van-col span="8">
<view class="typeQueryText" style="color: {{queryType === 0 ? '#0958d9' : '#000'}}" bind:tap="changeQueryType" data-type="{{0}}"> 电量查询 </view>
</van-col>
<van-col span="8">
<view class="typeQueryText" style="color: {{queryType === 1 ? '#0958d9' : '#000'}}" bind:tap="changeQueryType" data-type="{{1}}"> 抄表记录 </view>
</van-col>
<van-col span="8">
<view class="typeQueryText" style="color: {{queryType === 2 ? '#0958d9' : '#000'}}" bind:tap="changeQueryType" data-type="{{2}}"> 账务余额 </view>
</van-col>
</van-row>
</view>
<view class="timeQuery" wx:if="{{queryType === 0}}">
<van-row>
<van-col span="8">
<view class="timeQueryText" style="color: {{timeType === 0 ? '#0958d9' : '#000'}}" bind:tap="changeTimeType" data-type="{{0}}"> 日耗量 </view>
</van-col>
<van-col span="8">
<view class="timeQueryText" style="color: {{timeType === 1 ? '#0958d9' : '#000'}}" bind:tap="changeTimeType" data-type="{{1}}"> 月耗量 </view>
</van-col>
<van-col span="8">
<view class="timeQueryText" style="color: {{timeType === 2 ? '#0958d9' : '#000'}}" bind:tap="changeTimeType" data-type="{{2}}"> 年耗量 </view>
</van-col>
</van-row>
</view>
</view>
<view wx:if="{{queryType === 0}}">
<view class="tooltip">
不包括线损电量,显示为电表实际消耗电量。仅供参考,实际能耗电量以电费账单为主。如有疑问,请联系客服。
</view>
<view class="timeChooseWrapper">
<view> 选择时间 </view>
<view class="time" bind:tap="clickTime">
<view class="timeText" wx:if="{{timeType === 0}}"> {{yearMonthDay}} </view>
<view class="timeText" wx:elif="{{timeType === 1}}"> {{yearMonth}} </view>
<view class="timeText" wx:else> {{year}} </view>
<van-icon name="arrow-down" />
</view>
<van-button type="info" size="small" bind:click="export"> 导出 </van-button>
</view>
</view>
<view wx:elif="{{queryType === 1}}">
<view class="tooltip">
显示为最新的一条抄表记录。电表更新数据有延迟,仅供参考,实际以电表上显示为准。
</view>
</view>
<view wx:elif="{{queryType === 2}}">
<view class="tooltip">
账务余额更新时间为:每次预存电费后,每次账单发布后,剩余的实际金额。电表余额与账务余额相差较大的用户,每半年统一处理一次。
</view>
</view>
</view>
<view wx:if="{{queryType === 0}}">
<view style="margin: 30rpx;">
<table header="{{header}}" list="{{list}}" wx:if="{{list.length}}" />
<empty bind:refresh="init" wx:else />
</view>
<view class="sum">
合计:表计数量:{{meterNumber}},耗电量:{{electricNumber}}
</view>
</view>
<view wx:if="{{queryType === 1}}">
<view style="margin: 30rpx;">
<table header="{{meterReadingHeader}}" list="{{meterReadingList}}" wx:if="{{meterReadingList.length}}" />
<empty bind:refresh="getReadingList" wx:else />
</view>
</view>
<view wx:if="{{queryType === 2}}">
<view style="margin: 30rpx;">
<view wx:if="{{accountingList.length}}">
<accountingCard wx:for="{{accountingList}}" data="{{item}}" />
</view>
<!-- <table header="{{meterReadingHeader}}" list="{{accountingList}}" wx:if="{{accountingList.length}}" /> -->
<empty bind:refresh="getAccountingBalanceList" wx:else />
</view>
</view>
<echarts
style="width:200rpx;height:180rpx;"
id="echarts"
class='mychart-bar'
canvas-id="mychart-bar"
ec="{{ ec }}"
forceUseOldCanvas="{{false}}"
wx:if="{{list.length}}"
>
</echarts>
<custom-picker
title="{{title}}"
show="{{show}}"
valueKey="name"
columns="{{columns}}"
bind:ok="onOk"
bind:cancel="onCancel"
type="{{type}}"
/>
<timePicker
type="{{timePickerType}}"
year="{{year}}"
month="{{yearMonthStamp}}"
day="{{yearMonthDayStamp}}"
show="{{visible}}"
bind:cancel="onTimeCancel"
bind:close="onTimeClose"
bind:confirm="onTimeConfirm"
/>

View File

@@ -1,93 +0,0 @@
/* pages/electricQuery/index.wxss */
page {
background-color: var(--transparent-green);
}
.queryWrapper {
margin: 20rpx 0rpx;
background-color: #fff;
padding:15rpx 20rpx;
box-sizing: border-box;
border-radius: 20rpx;
display: flex;
align-items: center;
font-size: 32rpx;
}
.label {
width: 180rpx;
font-size: 32rpx;
}
.sum {
margin-bottom: 30rpx;
margin-left: 30rpx;
margin-right: 30rpx;
padding-bottom: 50rpx;
}
.query {
margin: 20rpx 0rpx;
}
.typeQueryText {
text-align: center;
padding: 20rpx;
background-color: var(--light-green);
font-size: 32rpx;
}
.select {
border: 1rpx solid #ccc;
padding: 12rpx;
border-radius: 12rpx;
flex: 1;
display: flex;
justify-content: space-between;
font-size: 30rpx;
}
.timeQueryText {
text-align: center;
padding: 20rpx;
background-color: rgb(242,248,246);
font-size: 30rpx;
}
.wrapper {
margin-left: 30rpx;
margin-right: 30rpx;
padding: 0;
}
.tooltip {
margin: 20rpx 0;
font-size: 28rpx;
color: rgb(97, 93, 93);
}
.timeChooseWrapper {
display: flex;
align-items: center;
font-size: 30rpx;
}
.time {
flex: 1;
margin-left: 30rpx;
margin-right: 30rpx;
display: flex;
padding: 10rpx 20rpx;
border-radius: 12rpx;
border: 1rpx solid #ccc;
background-color: #fff;
}
.timeText {
flex: 1;
}
.mychart-bar::after{
content:"";
display:block;
clear:both
}

View File

@@ -252,7 +252,7 @@ Page({
},
jumpToElectric() {
wx.navigateTo({
url: '/pages/electricQuery/index',
url: '/childPackage/pages/electricQuery/index',
})
},
async setUser() {

View File

@@ -1,4 +1,4 @@
import { login } from "../../service/user";
import { getPrivaciList, login } from "../../service/user";
import { alertError, alertInfo, alertSuccess, loadingFunc, wxLogin } from "../../utils/index";
import request from "../../utils/request";
import Dialog from '@vant/weapp/dialog/dialog';
@@ -14,6 +14,7 @@ Page({
input: "",
disabled: false,
show: false,
privacyList: [],
},
/**
@@ -33,8 +34,16 @@ Page({
// wx.switchTab({
// url: '/pages/home/index',
// })
this.getPrivacy();
},
async getPrivacy() {
const { code, message, data } = await getPrivaciList()
if (code !== OK) {
alertError(message)
return;
}
this.setData({ privacyList: data })
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
@@ -109,9 +118,10 @@ Page({
// on cancel
});
},
jumpToUserAgreement() {
jumpToUserAgreement(e) {
const { url } = e.currentTarget.dataset
wx.navigateTo({
url: '/pages/agreements/index',
url: '/childPackage/pages/agreements/index?url=' + url,
})
},
jumpToLoginAgreement() {

View File

@@ -6,12 +6,28 @@
<view class="logoBtn">
<van-button type="info" block disabled="{{!agree}}" open-type="getPhoneNumber" bind:getphonenumber="getPhoneNumber">手机号快速登录</van-button>
</view>
<view class="agreement">
<view class="checkbox">
<van-checkbox value="{{ agree }}" bind:change="onChangeAgree"></van-checkbox>
</view>
<view>
使用本系统,代表您已阅读并同意 <text class="agreementText" bind:tap="jumpToUserAgreement">《用电管理服务条款》</text>、<text class="agreementText" bind:tap="jumpToLoginAgreement">《用电管理登录政策》</text><text bind:tap="jumpToSecret" class="agreementText">《隐私政策》</text>。
<view style="display: flex; flex-wrap: wrap;">
<view style="word-break: break-all;">
使用本系统,代表您已阅读并同意
<text wx:for="{{privacyList}}" wx:key="index">
<text wx:if="{{index === 0}}"></text>
<text class="agreementText" bind:tap="jumpToUserAgreement" data-url="{{item.content}}">《 {{item.name}} 》 </text>
</text> 。
</view>
</view>
</view>
</view>

View File

@@ -10,6 +10,8 @@ page {
.agreementText {
color: rgb(211, 155, 52);
display: inline-block;
word-break: break-all;
}
.logo {