'修改'
This commit is contained in:
parent
f7d809aa34
commit
d74eb83a16
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name" : "kaiguan",
|
"name" : "kaiguan",
|
||||||
"appid" : "__UNI__CE4B00E",
|
"appid" : "__UNI__F877C47",
|
||||||
"description" : "",
|
"description" : "",
|
||||||
"versionName" : "1.0.0",
|
"versionName" : "1.0.0",
|
||||||
"versionCode" : "100",
|
"versionCode" : "100",
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
<view class="title">
|
<view class="title">
|
||||||
<text>设备列表</text>
|
<text>设备列表</text>
|
||||||
<image src="https://api.ccttiot.com/smartmeter/img/static/uCfe9273aC89tGOT7n1G" mode="widthFix"></image>
|
<image src="https://api.ccttiot.com/smartmeter/img/static/uCfe9273aC89tGOT7n1G" mode="widthFix"></image>
|
||||||
<text class="sm"> 正在扫描蓝牙设备...... </text>
|
<text class="sm"> {{texts}} </text>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="dblist" v-for="(item, index) in devicesList" :key="index">
|
<view class="dblist" v-for="(item, index) in devicesList" :key="index">
|
||||||
|
@ -25,7 +25,7 @@
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="anniu">
|
<view class="anniu" @click="Search">
|
||||||
<button>重新扫描</button>
|
<button>重新扫描</button>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
@ -135,8 +135,7 @@
|
||||||
case xBlufi.XBLUFI_TYPE.TYPE_GET_DEVICE_LISTS:
|
case xBlufi.XBLUFI_TYPE.TYPE_GET_DEVICE_LISTS:
|
||||||
if (options.result) {
|
if (options.result) {
|
||||||
let devicesarr = options.data
|
let devicesarr = options.data
|
||||||
// this.devicesList = options.data
|
|
||||||
// console.log(mac,'devicesarrdevicesarr');
|
|
||||||
devicesarr.forEach(device => {
|
devicesarr.forEach(device => {
|
||||||
const mac = device.name.substring(6);
|
const mac = device.name.substring(6);
|
||||||
|
|
||||||
|
@ -144,6 +143,7 @@
|
||||||
// this.$u.get(`/app/device/${mac}/isBind`, data).then((res) => {
|
// this.$u.get(`/app/device/${mac}/isBind`, data).then((res) => {
|
||||||
// if (res.data == false) {
|
// if (res.data == false) {
|
||||||
this.devicesList.push(device);
|
this.devicesList.push(device);
|
||||||
|
console.log(this.devicesList);
|
||||||
let uniqueDevicesList = Array.from(new Set(this.devicesList));
|
let uniqueDevicesList = Array.from(new Set(this.devicesList));
|
||||||
|
|
||||||
// 将去重后的数组重新赋值给 this.devicesList
|
// 将去重后的数组重新赋值给 this.devicesList
|
||||||
|
@ -152,16 +152,7 @@
|
||||||
// })
|
// })
|
||||||
|
|
||||||
}
|
}
|
||||||
// getisband(mac).then(res => {
|
|
||||||
// console.log(res);
|
|
||||||
// if (res.data == true) {
|
|
||||||
// console.log(`MAC 地址 ${mac} 已经绑定`);
|
|
||||||
// } else {
|
|
||||||
// this.devicesList.push(device)
|
|
||||||
// }
|
|
||||||
// }).catch(error => {
|
|
||||||
// console.error(`检查 MAC 地址 ${mac} 是否绑定的过程中出错:`, error);
|
|
||||||
// });
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -176,11 +167,7 @@
|
||||||
}); {
|
}); {
|
||||||
console.log("连接回调options.data.deviceId:" + options.data.deviceId,
|
console.log("连接回调options.data.deviceId:" + options.data.deviceId,
|
||||||
"连接回调options.data.name:" + options.data.name);
|
"连接回调options.data.name:" + options.data.name);
|
||||||
// 连接成功绑定设备
|
|
||||||
// let params = {
|
|
||||||
// mac: this.Bluetoothmac,
|
|
||||||
// userId: this.$store.state.user.userId
|
|
||||||
// }
|
|
||||||
let systemInfo = uni.getSystemInfoSync();
|
let systemInfo = uni.getSystemInfoSync();
|
||||||
if (systemInfo.platform === 'android') {
|
if (systemInfo.platform === 'android') {
|
||||||
// 当前设备是 Android
|
// 当前设备是 Android
|
||||||
|
|
|
@ -32,28 +32,7 @@
|
||||||
绑定
|
绑定
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<!-- <view class="title">
|
|
||||||
<text>设备列表</text>
|
|
||||||
<image src="https://api.ccttiot.com/smartmeter/img/static/uCfe9273aC89tGOT7n1G" mode="widthFix"></image>
|
|
||||||
<text class="sm"> 正在扫描蓝牙设备...... </text>
|
|
||||||
</view>
|
|
||||||
|
|
||||||
<view class="dblist" v-for="(item, index) in devicesList" :key="index">
|
|
||||||
<view class="lt">
|
|
||||||
<image src="https://api.ccttiot.com/smartmeter/img/static/uoQO0pUZ1UHcW5uVKkuR" mode=""></image>
|
|
||||||
</view>
|
|
||||||
<view class="cen">
|
|
||||||
<view class="name">
|
|
||||||
智能电表
|
|
||||||
</view>
|
|
||||||
<view class="mac">
|
|
||||||
MAC:{{item.localName.substring(6)}}
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<view class="rt">
|
|
||||||
<text :id="item.deviceId" @tap="createBLEConnection(item)">连接</text>
|
|
||||||
</view>
|
|
||||||
</view> -->
|
|
||||||
|
|
||||||
<view class="anniu">
|
<view class="anniu">
|
||||||
<button>重新扫描</button>
|
<button>重新扫描</button>
|
||||||
|
|
|
@ -4,26 +4,15 @@
|
||||||
height='38'></u-navbar>
|
height='38'></u-navbar>
|
||||||
<view class="box">
|
<view class="box">
|
||||||
<view class="title">
|
<view class="title">
|
||||||
微信小程序
|
{{obj.title}}
|
||||||
</view>
|
</view>
|
||||||
<view class="nav_top">
|
|
||||||
|
<view class="js" v-html="obj.content">
|
||||||
</view>
|
|
||||||
<view class="tit">
|
|
||||||
微信小程序
|
|
||||||
</view>
|
|
||||||
<view class="js">
|
|
||||||
微信小程序微信小程序微信小程序微信小程,序微信小 微信小程序微信小程序微信小程序微信小程序微信小程 微信小程序微信小程序微信小程序微信小程序微信小程 序微信小程序微信小程序微信小程序
|
|
||||||
</view>
|
|
||||||
<view class="js">
|
|
||||||
微信小程序微信小程序微信小程序微信小程,序微信小 微信小程序微信小程序微信小程
|
|
||||||
</view>
|
|
||||||
<view class="js">
|
|
||||||
微信小程序微信小程序微信小程序微信小程,序微信小 微信小程序微信小程序微信小程微信小程序微信小程序 微信小程序微信小程序
|
|
||||||
</view>
|
</view>
|
||||||
|
<!--
|
||||||
<view class="nav_bom">
|
<view class="nav_bom">
|
||||||
|
|
||||||
</view>
|
</view> -->
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
@ -32,11 +21,21 @@
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
obj:{}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
onLoad() {
|
||||||
|
this.getabout()
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
getabout(){
|
||||||
|
let type = 'about'
|
||||||
|
this.$u.get(`/app/article/licence/${type}`).then((res) => {
|
||||||
|
if (res.code == 200) {
|
||||||
|
this.obj= res.data
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
<view class="listval">
|
<view class="listval">
|
||||||
<view class="tit"> 营业时间</view>
|
<view class="tit"> 营业时间</view>
|
||||||
<view class="but"
|
<view class="but"
|
||||||
style="display: flex;justify-content: space-between;padding: 15rpx 10rpx;box-sizing: border-box;">
|
style="display: flex;justify-content: space-between;padding: 15rpx 26rpx;box-sizing: border-box;">
|
||||||
<!-- <input type="text" placeholder="请输入营业时间" v-model="yetime" /> -->
|
<!-- <input type="text" placeholder="请输入营业时间" v-model="yetime" /> -->
|
||||||
<view class="" style="font-size: 28rpx;color: #666;" @click="btnyinye(1)">{{ksyy}}</view>
|
<view class="" style="font-size: 28rpx;color: #666;" @click="btnyinye(1)">{{ksyy}}</view>
|
||||||
--
|
--
|
||||||
|
|
|
@ -311,7 +311,7 @@
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
position: fixed;
|
position: fixed;
|
||||||
top: 170rpx;
|
top: 160rpx;
|
||||||
.cjshop {
|
.cjshop {
|
||||||
width: 200rpx;
|
width: 200rpx;
|
||||||
height: 64rpx;
|
height: 64rpx;
|
||||||
|
|
|
@ -151,6 +151,11 @@
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url:'/page_user/mapditu/index'
|
url:'/page_user/mapditu/index'
|
||||||
})
|
})
|
||||||
|
}else if(num == 2){
|
||||||
|
console.log(111);
|
||||||
|
uni.switchTab({
|
||||||
|
url:'/pages/index/index'
|
||||||
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
@ -229,7 +229,7 @@
|
||||||
left: 50%;
|
left: 50%;
|
||||||
transform: translateX(-50%);
|
transform: translateX(-50%);
|
||||||
width: 706rpx;
|
width: 706rpx;
|
||||||
height: 384rpx;
|
height: 400rpx;
|
||||||
background: #FFFFFF;
|
background: #FFFFFF;
|
||||||
box-shadow: 0rpx 10rpx 64rpx 0rpx rgba(0,0,0,0.08);
|
box-shadow: 0rpx 10rpx 64rpx 0rpx rgba(0,0,0,0.08);
|
||||||
border-radius: 20rpx;
|
border-radius: 20rpx;
|
||||||
|
|
|
@ -652,14 +652,14 @@
|
||||||
|
|
||||||
.bot_left {
|
.bot_left {
|
||||||
width: 210rpx;
|
width: 210rpx;
|
||||||
height: 190.14rpx;
|
height: 180rpx;
|
||||||
margin-right: 34rpx;
|
margin-right: 34rpx;
|
||||||
.echarts {
|
.echarts {
|
||||||
width: 210rpx;
|
// width: 210rpx;
|
||||||
|
height: 200rpx;
|
||||||
.uni-ec-canvas {
|
.uni-ec-canvas {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 190.14rpx;
|
height: 100rpx !important;
|
||||||
display: block;
|
display: block;
|
||||||
// margin-top: 30rpx;
|
// margin-top: 30rpx;
|
||||||
}
|
}
|
||||||
|
|
|
@ -259,7 +259,7 @@
|
||||||
tosetpage() {
|
tosetpage() {
|
||||||
this.showfz = false
|
this.showfz = false
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: '/pages_user/fenzu'
|
url: '/page_user/fenzu'
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
sub(num) {
|
sub(num) {
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="card" style="margin-top: 26rpx;">
|
<view class="card" style="margin-top: 26rpx;">
|
||||||
<view class="li">
|
<view class="li" @click="btnwz(1)">
|
||||||
<view class="tit">
|
<view class="tit">
|
||||||
用户协议
|
用户协议
|
||||||
</view>
|
</view>
|
||||||
|
@ -37,7 +37,7 @@
|
||||||
<view class="iconfont icon-xiangyou1"></view>
|
<view class="iconfont icon-xiangyou1"></view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="li">
|
<view class="li" @click="btnwz(2)">
|
||||||
<view class="tit">
|
<view class="tit">
|
||||||
隐私政策
|
隐私政策
|
||||||
</view>
|
</view>
|
||||||
|
@ -46,7 +46,7 @@
|
||||||
<view class="iconfont icon-xiangyou1"></view>
|
<view class="iconfont icon-xiangyou1"></view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="li" style="border-bottom: #fff solid 2rpx;">
|
<view class="li" style="border-bottom: #fff solid 2rpx;" @click="btnwz(3)">
|
||||||
<view class="tit">
|
<view class="tit">
|
||||||
个人信息收集清单
|
个人信息收集清单
|
||||||
</view>
|
</view>
|
||||||
|
@ -135,7 +135,8 @@
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
mode:'房东模式',
|
mode:'房东模式',
|
||||||
userinfo:{}
|
userinfo:{},
|
||||||
|
type:''
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad() {
|
onLoad() {
|
||||||
|
@ -148,6 +149,26 @@
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
|
btnwz(num){
|
||||||
|
if(num == 1){
|
||||||
|
this.type = 'user'
|
||||||
|
uni.navigateTo({
|
||||||
|
url:'/page_components/wentdetail?type=' + this.type
|
||||||
|
})
|
||||||
|
}else if(num == 2){
|
||||||
|
this.type = 'privacy'
|
||||||
|
uni.navigateTo({
|
||||||
|
url:'/page_components/wentdetail?type=' + this.type
|
||||||
|
})
|
||||||
|
}else if(num == 3){
|
||||||
|
this.type = 'collection'
|
||||||
|
uni.navigateTo({
|
||||||
|
url:'/page_components/wentdetail?type=' + this.type
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
// 点击更换用户模式
|
// 点击更换用户模式
|
||||||
confirm(e){
|
confirm(e){
|
||||||
// console.log(e);
|
// console.log(e);
|
||||||
|
|
|
@ -57,9 +57,7 @@ export default {
|
||||||
xBlufi.notifyInitBleEsp32({
|
xBlufi.notifyInitBleEsp32({
|
||||||
deviceId: this.objlist.deviceId
|
deviceId: this.objlist.deviceId
|
||||||
});
|
});
|
||||||
|
|
||||||
// console.log("获取到id",JSON.parse(this.options.objlist.deviceId))
|
|
||||||
// console.log(this.objlist,"option",this.objlist.deviceId)
|
|
||||||
},
|
},
|
||||||
onReady() { },
|
onReady() { },
|
||||||
onUnload() {
|
onUnload() {
|
||||||
|
@ -141,19 +139,18 @@ export default {
|
||||||
content: `连接成功路由器`,
|
content: `连接成功路由器`,
|
||||||
showCancel: false,
|
showCancel: false,
|
||||||
success: function (res) {
|
success: function (res) {
|
||||||
let ids = that.$store.state.user.deviceId
|
// let ids = that.$store.state.user.deviceId
|
||||||
getwifi(ids).then(res => {
|
uni.switchTab({
|
||||||
console.log(res);
|
url:'/pages/index/index'
|
||||||
uni.switchTab({
|
|
||||||
url:'/pages/index'
|
|
||||||
})
|
|
||||||
})
|
})
|
||||||
|
// getwifi(ids).then(res => {
|
||||||
|
// console.log(res);
|
||||||
|
// uni.switchTab({
|
||||||
|
// url:'/pages/index/index'
|
||||||
|
// })
|
||||||
|
// })
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
// 连接成功进行跳转
|
|
||||||
// setTimeout(()=>{
|
|
||||||
|
|
||||||
// },1000)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
10
pages.json
10
pages.json
|
@ -409,6 +409,16 @@
|
||||||
"navigationBarTextStyle": "#FFFFFF",
|
"navigationBarTextStyle": "#FFFFFF",
|
||||||
"navigationStyle": "custom"
|
"navigationStyle": "custom"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "wentdetail",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "添加设备",
|
||||||
|
"enablePullDownRefresh": false,
|
||||||
|
"navigationBarBackgroundColor": "#3996FD",
|
||||||
|
"navigationBarTextStyle": "#FFFFFF",
|
||||||
|
"navigationStyle": "custom"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,9 +12,7 @@
|
||||||
<view class="txt">
|
<view class="txt">
|
||||||
系统检测到您的设备未联网或者为蓝牙版本,金额充值失败,请靠近设备进行蓝牙充值
|
系统检测到您的设备未联网或者为蓝牙版本,金额充值失败,请靠近设备进行蓝牙充值
|
||||||
</view>
|
</view>
|
||||||
<!-- <view class="txt">
|
|
||||||
|
|
||||||
</view> -->
|
|
||||||
</view>
|
</view>
|
||||||
<view class="bot">
|
<view class="bot">
|
||||||
<view class="bot_left" @click="showtip=false">
|
<view class="bot_left" @click="showtip=false">
|
||||||
|
@ -28,10 +26,7 @@
|
||||||
<!-- 房东 -->
|
<!-- 房东 -->
|
||||||
<view class="fd" >
|
<view class="fd" >
|
||||||
<view class="fd_top">
|
<view class="fd_top">
|
||||||
<!-- <view class="fd_tit" v-for="(item,index) in titlist" :key="index" :class="index==curtitidx?'act1':''"
|
|
||||||
@click="changeidx(index)">
|
|
||||||
{{item}}
|
|
||||||
</view> -->
|
|
||||||
<view class="fd_tit">
|
<view class="fd_tit">
|
||||||
{{titlist}}
|
{{titlist}}
|
||||||
</view>
|
</view>
|
||||||
|
@ -103,19 +98,14 @@
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="card_right">
|
<view class="card_right">
|
||||||
<image src="https://api.ccttiot.com/smartmeter/img/static/uoQO0pUZ1UHcW5uVKkuR"
|
<image :src="item.picture"
|
||||||
mode=""></image>
|
mode=""></image>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<!-- <swiper-item>
|
|
||||||
<view class="swiper-item ">B</view>
|
|
||||||
</swiper-item>
|
|
||||||
<swiper-item>
|
|
||||||
<view class="swiper-item ">C</view>
|
|
||||||
</swiper-item> -->
|
|
||||||
</view>
|
</view>
|
||||||
<view v-if="wateringList.length == 0" style="margin-left:200rpx; color: #ccc;font-size: 36rpx;margin-top: 200rpx;width: 750rpx;">该店铺暂无设备...</view>
|
<view v-if="wateringList.length == 0" style="margin-left:200rpx; color: #ccc;font-size: 36rpx;margin-top: 200rpx;width: 750rpx;">该店铺暂无设备...</view>
|
||||||
</view>
|
</view>
|
||||||
|
@ -138,14 +128,6 @@
|
||||||
|
|
||||||
<tab-bar :indexs='0'></tab-bar>
|
<tab-bar :indexs='0'></tab-bar>
|
||||||
|
|
||||||
<!-- <u-popup v-model="show" mode="bottom" border-radius="14" width="750rpx" height="464rpx" closeable="true"
|
|
||||||
close-icon-pos="top-left">
|
|
||||||
<view class="popup-content">
|
|
||||||
<text class="add">添加方式</text>
|
|
||||||
<text class="saoma">扫码添加</text>
|
|
||||||
<text class="sousuo" @click="btnserch">搜索附近设备添加</text>
|
|
||||||
</view>
|
|
||||||
</u-popup> -->
|
|
||||||
<view class="dd">
|
<view class="dd">
|
||||||
<u-select v-model="show" :list="list" title='添加方式' @confirm="confirm"></u-select>
|
<u-select v-model="show" :list="list" title='添加方式' @confirm="confirm"></u-select>
|
||||||
</view>
|
</view>
|
||||||
|
@ -212,20 +194,7 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad() {
|
onLoad() {
|
||||||
setTimeout(() => {
|
|
||||||
console.log(this.$refs)
|
|
||||||
// this.$refs.canvas.init(this.initChart)
|
|
||||||
}, 1000)
|
|
||||||
|
|
||||||
// setTimeout(() => {
|
|
||||||
|
|
||||||
// this.initChart()
|
|
||||||
// }, 300);
|
|
||||||
// this.initChart()
|
|
||||||
|
|
||||||
// 首次加载页面给现在的时间
|
|
||||||
|
|
||||||
|
|
||||||
},
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
this.logins();
|
this.logins();
|
||||||
|
@ -297,7 +266,6 @@
|
||||||
}else{
|
}else{
|
||||||
this.orderinfo=null
|
this.orderinfo=null
|
||||||
}
|
}
|
||||||
// console.log(this.deviceInfo,'this.deviceInfo');
|
|
||||||
|
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
@ -439,7 +407,7 @@
|
||||||
tosetpage() {
|
tosetpage() {
|
||||||
this.showfz = false
|
this.showfz = false
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: '/pages_user/shebei/fenzu'
|
url: '/page_user/fenzu'
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
// 点击更换用户模式
|
// 点击更换用户模式
|
||||||
|
@ -608,12 +576,9 @@
|
||||||
|
|
||||||
// console.log( this.$refs.chartRef,'1111');
|
// console.log( this.$refs.chartRef,'1111');
|
||||||
const chart = await this.$refs.chart.init(echarts);
|
const chart = await this.$refs.chart.init(echarts);
|
||||||
console.log(option);
|
// console.log(option);
|
||||||
chart.setOption(option)
|
chart.setOption(option)
|
||||||
// chart.resize({
|
|
||||||
// width: uni.upx2px(210), // Convert 210rpx to pixels
|
|
||||||
// height: uni.upx2px(190.14) // Convert 190.14rpx to pixels
|
|
||||||
// });
|
|
||||||
return chart
|
return chart
|
||||||
},
|
},
|
||||||
// 获取设备详情
|
// 获取设备详情
|
||||||
|
@ -707,10 +672,8 @@
|
||||||
this.sbflag = true
|
this.sbflag = true
|
||||||
}
|
}
|
||||||
uni.setStorageSync('deviceId', this.deviceInfo.deviceId);
|
uni.setStorageSync('deviceId', this.deviceInfo.deviceId);
|
||||||
this.initChart()
|
// this.initChart()
|
||||||
this.order()
|
this.order()
|
||||||
// console.log(this.deviceInfo,'this.deviceInfo');
|
|
||||||
|
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
changeidx(index) {
|
changeidx(index) {
|
||||||
|
@ -1305,13 +1268,12 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.card_right {
|
.card_right {
|
||||||
margin-top: 60rpx;
|
margin-top: 30rpx;
|
||||||
margin-left: auto;
|
margin-left: auto;
|
||||||
margin-right: 94rpx;
|
margin-right: 50rpx;
|
||||||
|
|
||||||
image {
|
image {
|
||||||
width: 63.04rpx;
|
width: 180rpx;
|
||||||
height: 167.48rpx;
|
height:200rpx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
32
pages/tj.vue
32
pages/tj.vue
|
@ -23,8 +23,7 @@
|
||||||
<view class="echarts" v-if="loging">
|
<view class="echarts" v-if="loging">
|
||||||
<!-- <mpvue-echarts id="main" ref="pieChart" :echarts="echarts" @onInit="initChart" /> -->
|
<!-- <mpvue-echarts id="main" ref="pieChart" :echarts="echarts" @onInit="initChart" /> -->
|
||||||
<!-- <l-echart ref="chart" @finished="initChart"></l-echart> -->
|
<!-- <l-echart ref="chart" @finished="initChart"></l-echart> -->
|
||||||
<uni-ec-canvas class="uni-ec-canvas" id="uni-ec-canvas" ref="canvas" canvas-id="uni-ec-canvas"
|
<uni-ec-canvas class="uni-ec-canvas" id="uni-ec-canvas" ref="canvas" canvas-id="uni-ec-canvas" :ec="ec">
|
||||||
:ec="ec">
|
|
||||||
</uni-ec-canvas>
|
</uni-ec-canvas>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
@ -94,9 +93,6 @@
|
||||||
ec: {
|
ec: {
|
||||||
lazyLoad: true
|
lazyLoad: true
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
params: {
|
params: {
|
||||||
year: true,
|
year: true,
|
||||||
month: true,
|
month: true,
|
||||||
|
@ -126,10 +122,7 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad() {
|
onLoad() {
|
||||||
setTimeout(() => {
|
|
||||||
console.log(this.$refs)
|
|
||||||
this.$refs.canvas.init(this.initChart)
|
|
||||||
}, 1000)
|
|
||||||
|
|
||||||
// setTimeout(() => {
|
// setTimeout(() => {
|
||||||
|
|
||||||
|
@ -142,6 +135,10 @@
|
||||||
|
|
||||||
},
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
|
setTimeout(() => {
|
||||||
|
// console.log(this.$refs)
|
||||||
|
this.$refs.canvas.init(this.initChart)
|
||||||
|
}, 1000)
|
||||||
this.recharge = 0
|
this.recharge = 0
|
||||||
this.deviceId = uni.getStorageSync('deviceId')
|
this.deviceId = uni.getStorageSync('deviceId')
|
||||||
this.userType = uni.getStorageSync('userType')
|
this.userType = uni.getStorageSync('userType')
|
||||||
|
@ -149,11 +146,12 @@
|
||||||
const now = new Date();
|
const now = new Date();
|
||||||
this.yeartime.year = now.getFullYear()
|
this.yeartime.year = now.getFullYear()
|
||||||
this.yeartime.month = now.getMonth() + 1
|
this.yeartime.month = now.getMonth() + 1
|
||||||
if (this.userType == '00') {
|
this.gettime()
|
||||||
this.gettimes()
|
// if (this.userType == '00') {
|
||||||
} else if (this.userType == '01') {
|
// this.gettimes()
|
||||||
this.gettime()
|
// } else if (this.userType == '01') {
|
||||||
}
|
// this.gettime()
|
||||||
|
// }
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
// 点击获取时间
|
// 点击获取时间
|
||||||
|
@ -161,6 +159,10 @@
|
||||||
this.recharge = 0
|
this.recharge = 0
|
||||||
this.yeartime = e
|
this.yeartime = e
|
||||||
this.gettime()
|
this.gettime()
|
||||||
|
setTimeout(() => {
|
||||||
|
// console.log(this.$refs)
|
||||||
|
this.$refs.canvas.init(this.initChart)
|
||||||
|
}, 1000)
|
||||||
},
|
},
|
||||||
// 进行获取用电量请求
|
// 进行获取用电量请求
|
||||||
gettime() {
|
gettime() {
|
||||||
|
@ -314,7 +316,7 @@
|
||||||
height: height,
|
height: height,
|
||||||
devicePixelRatio: canvasDpr
|
devicePixelRatio: canvasDpr
|
||||||
})
|
})
|
||||||
console.log(chart);
|
|
||||||
option.series[0].data = that.chartData
|
option.series[0].data = that.chartData
|
||||||
canvas.setChart(chart)
|
canvas.setChart(chart)
|
||||||
chart.setOption(option)
|
chart.setOption(option)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user