From deebccdd98713ec3ab12e90a4cf4a878fa752412 Mon Sep 17 00:00:00 2001
From: "3321822538@qq.com" <3321822538@qq.com>
Date: Tue, 3 Dec 2024 14:40:32 +0800
Subject: [PATCH] 111
---
page_components/eletj.vue | 31 ++-
page_components/fuwu/index.vue | 59 +++-
page_fenbao/hehuoren/addhehuo.vue | 12 +-
page_fenbao/hehuoren/index.vue | 10 +-
page_fenbao/hehuoren/shouye.vue | 121 +++++---
.../statulist/myshop/shopdetail/index.vue | 14 +-
pages/index/index.vue | 51 ++--
pages/my.vue | 4 +-
pages/tj.vue | 263 ++++++++++++------
9 files changed, 377 insertions(+), 188 deletions(-)
diff --git a/page_components/eletj.vue b/page_components/eletj.vue
index cdffbda..d4c3942 100644
--- a/page_components/eletj.vue
+++ b/page_components/eletj.vue
@@ -200,12 +200,13 @@
- 立即支付
- 结束订单
+ 立即支付
+ 结束订单
- 立即支付
- 结束订单
+ 续单
+ 立即支付
+ 结束订单
@@ -375,6 +376,8 @@
}
},
onShow() {
+ clearInterval(this.timerIds);
+ this.timeday = ''
setTimeout(() => {
this.startTimers()
this.gethuidaio()
@@ -404,6 +407,12 @@
}
},
methods: {
+ // 点击续单 跳转到重新下单
+ btnxudan(){
+ uni.navigateTo({
+ url:'/page_components/fuwu/index?id=' + this.sbobj.deviceNo
+ })
+ },
start() {
this.timerIds = setInterval(() => {
// 首先处理秒数的递减
@@ -567,7 +576,8 @@
// 点击进行强刷数据
shuaxin(txt){
- // this.timeday = ''
+ clearInterval(this.timerIds);
+ this.timeday = ''
this.$u.get(`/app/device/${this.sbid}/refreshIot`).then((res) => {
if(res.code == 200){
this.getDevice()
@@ -1108,7 +1118,6 @@
this.getprice()
let dateTimeString = res.data.suitStartTime // 示例时间字符串
this.timeDifferenceString = this.calculateTimeDifference(dateTimeString); // 调用函数
- // console.log(timeDifferenceString);
if (res.data.suitGearAmount.length > 0) {
this.newArr = []
for (let i = 0; i < res.data.suitGearTime.length; i++) {
@@ -1120,11 +1129,13 @@
let du = Number(this.detaobj.suitEndEle) - Number(this.detaobj.deviceTotalEle)
this.du = du.toFixed(2)
}
- if (this.detaobj.suitExpireTime == null) {
+ if (res.data.deviceExpireTime == null) {
this.timeday = 0
+ console.log(res.data.deviceExpireTime,'000');
} else {
+ console.log(res.data.deviceExpireTime,'111');
let expireTimeStr = ''
- expireTimeStr = this.detaobj.suitExpireTime
+ expireTimeStr = res.data.deviceExpireTime
let expireTimeParts = expireTimeStr.split(" ")
let expireDateParts = expireTimeParts[0].split("-")
let expireTimePartsTime = expireTimeParts[1].split(":")
@@ -1411,9 +1422,9 @@
.jieshu {
width: 558rpx;
height: 90rpx;
-
+ display: flex;
text {
- width: 558rpx;
+ width: 200rpx;
height: 90rpx;
display: block;
}
diff --git a/page_components/fuwu/index.vue b/page_components/fuwu/index.vue
index 103a8fc..cf4ad23 100644
--- a/page_components/fuwu/index.vue
+++ b/page_components/fuwu/index.vue
@@ -50,8 +50,9 @@
-
- 选择服务
+
+ 选择服务
+
{
+ xBlufi.notifyStartDiscoverBle({
+ 'isStart': false
+ })
+ if (that.devicesList.length > 0) {
+ xBlufi.notifyConnectBle({
+ isStart: true,
+ deviceId: that.deviceId,
+ name: that.name
+ })
+ }
+ }, 2000)
+ // 蓝牙连接中
+ setTimeout(()=>{
+ if(that.ver_data == ''){
+ // 重新进行连接
+ that.imglanya = 'https://api.ccttiot.com/smartmeter/img/static/ulbuqIwcbhuCYGHZPAiL'
+ }else{
+ that.imglanya = 'https://api.ccttiot.com/smartmeter/img/static/uzmkQ6a3gBrJ7SjbfmmU'
+ }
+ },10000)
+ }
+ },
gettaoc() {
this.$u.get(`/app/device/${this.id}/withSuitList`).then((res) => {
if (res.code == 200) {
@@ -564,16 +605,6 @@
that.$u.post('/app/bill/recharge', data).then((res) => {
if (res.code == 200) {
that.orderno = res.data
- // console.log(this.prices);
- // if(this.prices == 0){
- // 0元购
- // that.$u.put(`/app/bill/${that.orderno}/refreshPayResult`).then(res => {})
- // // 支付成功逻辑
- // uni.reLaunch({
- // url: '/pages/shouye/index'
- // })
- // uni.setStorageSync('time', that.expireTimeStr)
- // }
if(this.suitFeeType == 3 || this.suitFeeType == 4){
let data = {
billNo:that.orderno,
@@ -1391,7 +1422,7 @@
this.czflag = false
this.zhifuflag = false
uni.hideLoading()
-
+ this.imglanya = 'https://api.ccttiot.com/smartmeter/img/static/uzmkQ6a3gBrJ7SjbfmmU'
if (!this.hasCalledGetczly) {
this.getczly()
this.hasCalledGetczly = true
diff --git a/page_fenbao/hehuoren/addhehuo.vue b/page_fenbao/hehuoren/addhehuo.vue
index 3bcf064..8ef2b55 100644
--- a/page_fenbao/hehuoren/addhehuo.vue
+++ b/page_fenbao/hehuoren/addhehuo.vue
@@ -15,11 +15,11 @@
-
+
商户权限
@@ -73,10 +73,12 @@
agentLevel:'',
storeId:'',
employId:'',
- tit:'创建合伙人'
+ tit:'创建合伙人',
+ storeId:''
}
},
onLoad(option) {
+ this.storeId = option.storeId
if(option.employId){
this.tit = '编辑合伙人'
this.employId = option.employId
@@ -89,7 +91,7 @@
getedit(){
this.$u.get(`/mch/storeStaff/${this.employId}`).then(res => {
if (res.code == 200) {
- this.storeId = res.data.storeId
+ this.storeId = this.storeId
this.ratio = res.data.point
this.level = res.data.remark
this.arrqx = res.data.permissions
@@ -111,7 +113,7 @@
// 请求所有店铺
getlist() {
- this.$u.get(`/app/store/list?isDefault=true&pageNum=1&pageSize=990&keyword=`).then(res => {
+ this.$u.get(`/app/store/list?pageNum=1&pageSize=990&keyword=`).then(res => {
if (res.code == 200) {
this.arr = res.rows.map(item => ({ label: item.name, value: item.storeId }))
}
diff --git a/page_fenbao/hehuoren/index.vue b/page_fenbao/hehuoren/index.vue
index 3377fa0..8421cd7 100644
--- a/page_fenbao/hehuoren/index.vue
+++ b/page_fenbao/hehuoren/index.vue
@@ -85,9 +85,13 @@
keyword:'',
showflag: false,
tabindex:-1,
- imgflag:false
+ imgflag:false,
+ storeId:''
}
},
+ onLoad(option) {
+ this.storeId = option.storeId
+ },
onShow() {
this.pagenum = 1
this.wateringList = []
@@ -162,7 +166,7 @@
// 点击跳转编辑合伙人
btnedit(employId){
uni.navigateTo({
- url:'/page_fenbao/hehuoren/addhehuo?employId=' + employId
+ url:'/page_fenbao/hehuoren/addhehuo?employId=' + employId + '&storeId=' + this.storeId
})
},
@@ -175,7 +179,7 @@
},
btnadd(){
uni.navigateTo({
- url:'/page_fenbao/hehuoren/addhehuo'
+ url:'/page_fenbao/hehuoren/addhehuo?storeId='+ this.storeId
})
},
getlist() {
diff --git a/page_fenbao/hehuoren/shouye.vue b/page_fenbao/hehuoren/shouye.vue
index 3a1e176..e4d02b3 100644
--- a/page_fenbao/hehuoren/shouye.vue
+++ b/page_fenbao/hehuoren/shouye.vue
@@ -2,18 +2,20 @@
-
-
+ {{item.key}}
- {{item.recharge}}元
+ {{item.value}}元
@@ -40,7 +43,7 @@
- {{yeartime.year + '年' + yeartime.month + '月'}}
+ {{yeartime.year + '年' + yeartime.month + '月' + yeartime.day + '日'}}
本月用电量(度)
@@ -51,10 +54,10 @@
- -->
-
+
@@ -82,7 +85,7 @@
params: {
year: true,
month: true,
- day: false,
+ day: true,
hour: false,
minute: false,
second: false
@@ -94,7 +97,13 @@
show: false,
yeartime: {
year: '',
- month: ''
+ month: '',
+ day:''
+ },
+ yeartimes: {
+ year: '',
+ month: '',
+ day:''
},
timelist: '',
quantity: 0, //电量
@@ -108,7 +117,10 @@
timelists:'',
monthdui:'',
employId:'',
- sceneValue:''
+ sceneValue:'',
+ kstime:'',
+ jstime:'',
+ num:''
}
},
// 分享到好友(会话)
@@ -180,17 +192,25 @@
this.$refs.canvas.init(this.initChart)
}, 500)
this.recharge = 0
- this.deviceId = uni.getStorageSync('deviceId')
- this.userType = uni.getStorageSync('userType')
- this.userType = '01'
const now = new Date();
- this.yeartime.year = now.getFullYear()
- this.yeartime.month = now.getMonth() + 1
- this.monthdui = this.yeartime.month
- this.dateday = String(now.getDate()).padStart(2, '0')
+ this.yeartime = {
+ year: now.getFullYear(),
+ month: now.getMonth() + 1, // 月份从0开始,所以需要+1
+ day: 1 // 设置为月份的第一天
+ }
+ this.kstime = this.yeartime.year + '-' + this.yeartime.month + '-' + (this.yeartime.day < 10 ? '0' + this.yeartime.day : this.yeartime.day)
+ this.yeartimes.year = now.getFullYear()
+ this.yeartimes.month = now.getMonth() + 1
+ this.yeartimes.day = now.getDate()
+ this.jstime = this.yeartimes.year + '-' + this.yeartimes.month + '-' + (this.yeartimes.day < 10 ? '0' + this.yeartimes.day : this.yeartimes.day)
this.gettime()
},
methods: {
+ // 选择时间
+ btnshow(num){
+ this.show = true
+ this.num = num
+ },
// 点击跳转到管理店铺
btndianpu(){
uni.navigateTo({
@@ -223,8 +243,15 @@
},
// 点击获取时间
confirm(e) {
+ console.log(e);
this.recharge = 0
- this.yeartime = e
+ if(this.num == 1){
+ this.yeartime = e
+ this.kstime = this.yeartime.year + '-' + this.yeartime.month + '-' + this.yeartime.day
+ }else{
+ this.yeartimes = e
+ this.jstime = this.yeartimes.year + '-' + this.yeartimes.month + '-' + this.yeartimes.day
+ }
this.gettime()
setTimeout(() => {
console.log(this.$refs)
@@ -233,33 +260,41 @@
},
// 进行获取用电量请求
gettime() {
- let data = {
- year: this.yeartime.year,
- month: this.yeartime.month,
- groupBy: 'create_date'
- }
+ // let data = {
+ // year: this.yeartime.year,
+ // month: this.yeartime.month,
+ // groupBy: 'create_date'
+ // }
this.loging = false
- this.$u.get('app/bill/landlordCount', data).then((res) => {
+ this.$u.get(`/app/dashboard/bonusDailyAmount?payDateStart=${this.kstime}&payDateEnd=${this.jstime}`).then((res) => {
if (res.code == 200) {
this.timelist = res.data
- if(this.monthdui != this.yeartime.month){
- this.timelists = this.timelist
- this.totalRecharge = res.totalRecharge
- this.chartData = this.timelist.map(item => item.recharge);
- this.chartday = this.timelist.map(item => item.createDay + '日');
- }else{
- this.timelists = this.timelist.slice(0,this.dateday)
- this.timelists.reverse()
- this.totalRecharge = res.totalRecharge
- this.chartData = this.timelist.slice(0, this.dateday).map(item => item.recharge)
- this.chartday = this.timelist.slice(0, this.dateday).map(item => item.createDay + '日');
- }
+ // if(this.monthdui != this.yeartime.month){
+ // this.timelists = this.timelist
+ // this.totalRecharge = res.totalRecharge
+ this.chartData = this.timelist.map(item => item.value);
+ this.chartday = this.timelist.map(item => item.key.slice(-2) + '日');
+ // }else{
+ // this.timelists = this.timelist.slice(0,this.dateday)
+ // this.timelists.reverse()
+ // this.totalRecharge = res.totalRecharge
+ // this.chartData = this.timelist.slice(0, this.dateday).map(item => item.recharge)
+ // this.chartday = this.timelist.slice(0, this.dateday).map(item => item.createDay + '日');
+ // }
+ this.timelists = this.timelist
+ this.totalRecharge = res.total
this.loging = true
for (let i = 0; i < this.timelist.length; i++) {
- this.recharge += this.timelist[i].recharge
+ this.recharge += this.timelist[i].value
}
return this.recharge
this.$refs.canvas.init(this.initChart)
+ }else{
+ uni.showToast({
+ title:res.msg,
+ icon: 'none',
+ duration:2000
+ })
}
})
},
@@ -409,7 +444,7 @@
margin-top: 20rpx;
}
.gongneng{
- margin-top: 70rpx;
+ margin-top: 40rpx;
width: 632rpx;
height: 150rpx;
background: #FFFFFF;
diff --git a/page_fenbao/statulist/myshop/shopdetail/index.vue b/page_fenbao/statulist/myshop/shopdetail/index.vue
index bcf88f2..c9672c3 100644
--- a/page_fenbao/statulist/myshop/shopdetail/index.vue
+++ b/page_fenbao/statulist/myshop/shopdetail/index.vue
@@ -41,10 +41,8 @@
@click="btnpag(1)">
+
-
@@ -135,6 +133,11 @@
}
},
methods: {
+ nav(){
+ uni.navigateTo({
+ url:'/page_fenbao/hehuoren/index?storeId=' + this.storeId,
+ })
+ },
btnsh(){
uni.navigateTo({
url:'/page_fenbao/editshenhe?storeId=' + this.storeId
@@ -525,7 +528,6 @@
font-size: 26rpx;
color: #808080;
width: 40%;
- // margin-right: 20rpx;
}
.shen {
@@ -541,12 +543,13 @@
padding-right: 50rpx;
box-sizing: border-box;
width: 680rpx;
- max-height: 170rpx;
+ max-height: 360rpx;
background: #FFFFFF;
border-radius: 24rpx 24rpx 24rpx 24rpx;
margin: auto;
display: flex;
justify-content: space-between;
+ flex-wrap: wrap;
margin-top: 26rpx;
image {
@@ -554,6 +557,7 @@
height: 96rpx;
margin-top: 40rpx;
margin-bottom: 40rpx;
+ margin-right: 20rpx;
}
}
}
diff --git a/pages/index/index.vue b/pages/index/index.vue
index c342e94..1805398 100644
--- a/pages/index/index.vue
+++ b/pages/index/index.vue
@@ -806,15 +806,10 @@
} else if (Math.abs(deltaY) > 50 && Math.abs(deltaX) < Math.abs(deltaY)) {
if (deltaY < 100) {
console.log("上滑")
- // let sum = this.total / this.pagesize
- // console.log(this.wateringList.length,this.total);
- // if (this.wateringList.length < this.total) {
- // this.getlist()
- // }
if(this.qingqiuflag == true){
- let sum = this.total / this.pagesize
- console.log(this.groupLists[0].wateringList.length,this.total);
- if (this.groupLists[0].wateringList.length < this.total) {
+ let sum = (this.pagenum - 1) * this.pagesize
+ console.log(sum,this.total);
+ if (this.total > sum) {
this.qingqiuflag = false
this.getlist()
}
@@ -1063,7 +1058,7 @@
getlist() {
this.shujuflag = false
// if (this.storeId == null) {
- this.$u.get(`/app/device/list?pageNum=${this.pagenum}&pageSize=${this.pagesize}&orderByColumn=${this.pxzt}&isAsc=desc`).then((res) => {
+ this.$u.get(`/app/device/list?pageNum=${this.pagenum}&pageSize=${this.pagesize}&orderByColumn=${this.pxzt}&isAsc=desc&storeId=${this.storeId == null ? '' : this.storeId}`).then((res) => {
if (res.code == 200) {
this.xiaflag = true
this.shuaxin = false
@@ -1084,17 +1079,18 @@
groupItem.wateringList
})
this.wateringList.forEach(wateringItem => {
- this.groupLists[0].wateringList.push(wateringItem)
- })
- this.wateringList.forEach(wateringItem => {
- this.groupLists.forEach(groupItem => {
- if (groupItem.storeId !== null && wateringItem.storeId !== null && groupItem.storeId == wateringItem.storeId) {
- if (!groupItem.wateringList.some(item => item.storeId === wateringItem.storeId)) {
- groupItem.wateringList.push(wateringItem)
- }
- }
- })
+ // this.groupLists[0].wateringList.push(wateringItem)
+ this.groupLists[this.curtitidx].wateringList.push(wateringItem)
})
+ // this.wateringList.forEach(wateringItem => {
+ // this.groupLists.forEach(groupItem => {
+ // if (groupItem.storeId !== null && wateringItem.storeId !== null && groupItem.storeId == wateringItem.storeId) {
+ // if (!groupItem.wateringList.some(item => item.storeId === wateringItem.storeId)) {
+ // groupItem.wateringList.push(wateringItem)
+ // }
+ // }
+ // })
+ // })
uni.hideLoading()
} else {
this.pagenum++
@@ -1104,15 +1100,15 @@
groupItem.wateringList = []
})
this.wateringList.forEach(wateringItem => {
- this.groupLists[0].wateringList.push(wateringItem);
+ this.groupLists[this.curtitidx].wateringList.push(wateringItem);
})
- this.wateringList.forEach(wateringItem => {
- this.groupLists.forEach(groupItem => {
- if (groupItem.storeId !== null && wateringItem.storeId !== null && groupItem.storeId == wateringItem.storeId) {
- groupItem.wateringList.push(wateringItem)
- }
- })
- })
+ // this.wateringList.forEach(wateringItem => {
+ // this.groupLists.forEach(groupItem => {
+ // if (groupItem.storeId !== null && wateringItem.storeId !== null && groupItem.storeId == wateringItem.storeId) {
+ // groupItem.wateringList.push(wateringItem)
+ // }
+ // })
+ // })
uni.hideLoading()
}
this.isLoading = false
@@ -1345,6 +1341,7 @@
this.pagenum = 1
this.curtitidx = e.detail.current
this.storeId = this.groupLists[this.curtitidx].storeId
+ this.getlist()
},
getdevice() {
diff --git a/pages/my.vue b/pages/my.vue
index b2bb30a..85d56ed 100644
--- a/pages/my.vue
+++ b/pages/my.vue
@@ -94,10 +94,10 @@
意见反馈
-->
-
+
解封记录
diff --git a/pages/tj.vue b/pages/tj.vue
index d47742f..1b0c4d8 100644
--- a/pages/tj.vue
+++ b/pages/tj.vue
@@ -1,37 +1,36 @@
-
-
-
-
+
-
- {{yeartime.year + '年' + yeartime.month + '月'}}
+
+ {{yeartime.year + '年' + yeartime.month + '月' + yeartime.day + '日'}}
+
+ -
+
+ {{yeartimes.year + '年' + yeartimes.month + '月' + yeartimes.day + '日'}}
- 本月收入{{recharge.toFixed(2)}}(元) 累计收入{{totalRecharge.toFixed(2)}}(元)
+ 当前时间段收入{{recharge.toFixed(2)}}(元) 累计收入{{totalRecharge.toFixed(2)}}(元)
-
- {{yeartime.year + '年' + yeartime.month + '月' + item.createDay + '日'}}
+
+ {{item.key}}
- {{item.recharge}}元
+ {{item.value}}元
@@ -45,7 +44,7 @@
- {{yeartime.year + '年' + yeartime.month + '月'}}
+ {{yeartime.year + '年' + yeartime.month + '月' + yeartime.day + '日'}}
本月用电量(度)
@@ -54,29 +53,19 @@
{{quantity}}
-
-
-
-
-
-
-
-
-
+
+
@@ -97,7 +86,7 @@
params: {
year: true,
month: true,
- day: false,
+ day: true,
hour: false,
minute: false,
second: false
@@ -109,7 +98,13 @@
show: false,
yeartime: {
year: '',
- month: ''
+ month: '',
+ day:''
+ },
+ yeartimes: {
+ year: '',
+ month: '',
+ day:''
},
timelist: '',
quantity: 0, //电量
@@ -121,7 +116,12 @@
totalRecharge: 0,
dateday:'',
timelists:'',
- monthdui:''
+ monthdui:'',
+ employId:'',
+ sceneValue:'',
+ kstime:'',
+ jstime:'',
+ num:''
}
},
// 分享到好友(会话)
@@ -140,18 +140,51 @@
path: '/pages/shouye/index'
}
},
- onLoad() {
-
-
- // setTimeout(() => {
-
- // this.initChart()
- // }, 300);
- // this.initChart()
-
- // 首次加载页面给现在的时间
-
-
+ onLoad(option) {
+ if(option.q){
+ function getQueryParam(url, paramName) {
+ let regex = new RegExp(`[?&]${paramName}=([^&]*)`);
+ let results = regex.exec(url);
+ return results ? decodeURIComponent(results[1].replace(/\+/g, ' ')) : null
+ }
+ this.sceneValue = option.q
+ let decodedValue = decodeURIComponent(this.sceneValue);
+ let id = getQueryParam(decodedValue, 'i')
+ this.employId = id
+ let that = this
+ uni.showModal({
+ title: '温馨提示',
+ content: '您确定要成为合伙人吗?',
+ showCancel: true,
+ success: function(res) {
+ if (res.confirm) {
+ that.$u.put(`/app/storeStaff/bindUser?employId=${that.employId}`).then(res => {
+ if (res.code == 200) {
+ uni.showToast({
+ title:'绑定成功',
+ icon: 'success',
+ duration: 2000
+ })
+ }else if(res.code == 401){
+ uni.reLaunch({
+ url:'/pages/login/login'
+ })
+ }else{
+ uni.showToast({
+ title: res.msg,
+ icon: 'none',
+ duration: 2000
+ })
+ }
+ })
+ } else if (res.cancel) {
+ uni.reLaunch({
+ url:'/pages/shouye/index'
+ })
+ }
+ }
+ })
+ }
},
onShow() {
this.timelist = []
@@ -160,22 +193,66 @@
this.$refs.canvas.init(this.initChart)
}, 500)
this.recharge = 0
- this.deviceId = uni.getStorageSync('deviceId')
- this.userType = uni.getStorageSync('userType')
- this.userType = '01'
const now = new Date();
- this.yeartime.year = now.getFullYear()
- this.yeartime.month = now.getMonth() + 1
- this.monthdui = this.yeartime.month
- this.dateday = String(now.getDate()).padStart(2, '0')
+ this.yeartime = {
+ year: now.getFullYear(),
+ month: now.getMonth() + 1, // 月份从0开始,所以需要+1
+ day: 1 // 设置为月份的第一天
+ }
+ this.kstime = this.yeartime.year + '-' + this.yeartime.month + '-' + (this.yeartime.day < 10 ? '0' + this.yeartime.day : this.yeartime.day)
+ this.yeartimes.year = now.getFullYear()
+ this.yeartimes.month = now.getMonth() + 1
+ this.yeartimes.day = now.getDate()
+ this.jstime = this.yeartimes.year + '-' + this.yeartimes.month + '-' + (this.yeartimes.day < 10 ? '0' + this.yeartimes.day : this.yeartimes.day)
this.gettime()
},
methods: {
-
+ // 选择时间
+ btnshow(num){
+ this.show = true
+ this.num = num
+ },
+ // 点击跳转到管理店铺
+ btndianpu(){
+ uni.navigateTo({
+ url:'/page_fenbao/statulist/myshop/index?types=' + 11
+ })
+ },
+ // 点击返回首页
+ btns(){
+ uni.reLaunch({
+ url:'/pages/shouye/index'
+ })
+ },
+ // 点击跳转到个人中心
+ btngeren(){
+ uni.navigateTo({
+ url:'/page_fenbao/hehuoren/geren'
+ })
+ },
+ // 点击跳转到订单管理
+ btndingdan(){
+ uni.navigateTo({
+ url:'/page_user/switchs?type=' + 11
+ })
+ },
+ // 点击跳转到设备列表
+ btnshebie(){
+ uni.navigateTo({
+ url:'/page_fenbao/hehuoren/shebeilist'
+ })
+ },
// 点击获取时间
confirm(e) {
+ console.log(e);
this.recharge = 0
- this.yeartime = e
+ if(this.num == 1){
+ this.yeartime = e
+ this.kstime = this.yeartime.year + '-' + this.yeartime.month + '-' + this.yeartime.day
+ }else{
+ this.yeartimes = e
+ this.jstime = this.yeartimes.year + '-' + this.yeartimes.month + '-' + this.yeartimes.day
+ }
this.gettime()
setTimeout(() => {
console.log(this.$refs)
@@ -184,33 +261,41 @@
},
// 进行获取用电量请求
gettime() {
- let data = {
- year: this.yeartime.year,
- month: this.yeartime.month,
- groupBy: 'create_date'
- }
+ // let data = {
+ // year: this.yeartime.year,
+ // month: this.yeartime.month,
+ // groupBy: 'create_date'
+ // }
this.loging = false
- this.$u.get('app/bill/landlordCount', data).then((res) => {
+ this.$u.get(`/app/dashboard/bonusDailyAmount?payDateStart=${this.kstime}&payDateEnd=${this.jstime}`).then((res) => {
if (res.code == 200) {
this.timelist = res.data
- if(this.monthdui != this.yeartime.month){
- this.timelists = this.timelist
- this.totalRecharge = res.totalRecharge
- this.chartData = this.timelist.map(item => item.recharge);
- this.chartday = this.timelist.map(item => item.createDay + '日');
- }else{
- this.timelists = this.timelist.slice(0,this.dateday)
- this.timelists.reverse()
- this.totalRecharge = res.totalRecharge
- this.chartData = this.timelist.slice(0, this.dateday).map(item => item.recharge)
- this.chartday = this.timelist.slice(0, this.dateday).map(item => item.createDay + '日');
- }
+ // if(this.monthdui != this.yeartime.month){
+ // this.timelists = this.timelist
+ // this.totalRecharge = res.totalRecharge
+ this.chartData = this.timelist.map(item => item.value);
+ this.chartday = this.timelist.map(item => item.key.slice(-2) + '日');
+ // }else{
+ // this.timelists = this.timelist.slice(0,this.dateday)
+ // this.timelists.reverse()
+ // this.totalRecharge = res.totalRecharge
+ // this.chartData = this.timelist.slice(0, this.dateday).map(item => item.recharge)
+ // this.chartday = this.timelist.slice(0, this.dateday).map(item => item.createDay + '日');
+ // }
+ this.timelists = this.timelist
+ this.totalRecharge = res.total
this.loging = true
for (let i = 0; i < this.timelist.length; i++) {
- this.recharge += this.timelist[i].recharge
+ this.recharge += this.timelist[i].value
}
return this.recharge
this.$refs.canvas.init(this.initChart)
+ }else{
+ uni.showToast({
+ title:res.msg,
+ icon: 'none',
+ duration:2000
+ })
}
})
},
@@ -354,7 +439,27 @@
.page {
padding: 0 59rpx;
-
+ .name{
+ font-size: 36rpx;
+ color: #3D3D3D;
+ margin-top: 20rpx;
+ }
+ .gongneng{
+ margin-top: 40rpx;
+ width: 632rpx;
+ height: 150rpx;
+ background: #FFFFFF;
+ box-shadow: 0rpx 16rpx 40rpx 0rpx rgba(42,130,228,0.1);
+ border-radius: 24rpx 24rpx 24rpx 24rpx;
+ display: flex;
+ justify-content: space-between;
+ padding: 26rpx 50rpx;
+ box-sizing: border-box;
+ image{
+ width: 96rpx;
+ height: 102rpx;
+ }
+ }
.title {
margin-top: 120rpx;
font-size: 48rpx;
@@ -412,7 +517,7 @@
.list {
margin-top: 16rpx;
- height: 600rpx;
+ height: 630rpx;
overflow: auto;
.card_list {
width: 632rpx;