aaa
This commit is contained in:
parent
d74eb83a16
commit
9e563c8321
|
@ -9,7 +9,6 @@
|
|||
<view class="swiper-item ">
|
||||
<view class="card_box" v-for="(item,index) in wateringList"
|
||||
:key="index">
|
||||
<!-- @click="todetail(item.deviceId)" -->
|
||||
<view class="card">
|
||||
<view class="card_left">
|
||||
<view class="card_left_tit">
|
||||
|
@ -30,7 +29,7 @@
|
|||
</view>
|
||||
</view>
|
||||
<view class="card_left_no">
|
||||
SN号:{{item.deviceNo}}
|
||||
S/N码:{{item.deviceNo}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="card_right">
|
||||
|
@ -57,9 +56,9 @@
|
|||
},
|
||||
pagenum: 1,
|
||||
wateringList: [],
|
||||
pagesize: 10, // 一页多少数据
|
||||
isLoading: false, // 是否正在加载数据
|
||||
noMoreData: false, // 是否没有更多数据
|
||||
pagesize: 10,
|
||||
isLoading: false,
|
||||
noMoreData: false,
|
||||
total: 0
|
||||
}
|
||||
},
|
||||
|
@ -104,35 +103,23 @@
|
|||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
page {
|
||||
// background: linear-gradient(180deg, #8883F0 0%, rgba(255, 255, 255, 0) 100%);
|
||||
}
|
||||
|
||||
.page {
|
||||
width: 750rpx;
|
||||
// position: fixed;
|
||||
// top: 0;
|
||||
// left: 0;
|
||||
padding-bottom: 200rpx;
|
||||
.box{
|
||||
width: 750rpx;
|
||||
// height: 1440rpx;
|
||||
background: #F4F5F7;
|
||||
border-radius: 0rpx 0rpx 0rpx 0rpx;
|
||||
padding-left: 40rpx;
|
||||
.swiper {
|
||||
.swiper-item {
|
||||
|
||||
height: 100%;
|
||||
|
||||
.card_box {
|
||||
margin-top: 34rpx;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
|
||||
.card {
|
||||
display: flex;
|
||||
// align-items: center;
|
||||
margin-top: 20rpx;
|
||||
width: 658rpx;
|
||||
height: 282rpx;
|
||||
|
@ -186,7 +173,6 @@
|
|||
.card_right {
|
||||
margin-top: 30rpx;
|
||||
margin-left: auto;
|
||||
// margin-right: 94rpx;
|
||||
margin-right: 40rpx;
|
||||
image {
|
||||
width: 180rpx;
|
||||
|
|
|
@ -7,11 +7,8 @@
|
|||
<view class="listbox">
|
||||
<view class="moshi">
|
||||
<image src="https://api.ccttiot.com/smartmeter/img/static/uCux5cJrpLFhwYjVTz4J" mode="" @click="btndt(1)" class="img"></image>
|
||||
<image src="https://api.ccttiot.com/smartmeter/img/static/uGVN2tOaCq2hiWKy1cYl" mode="" @click="btndt(2)" v-if="isMch"></image>
|
||||
<!-- <image src="https://api.ccttiot.com/smartmeter/img/static/uGVN2tOaCq2hiWKy1cYl" mode="" @click="btndt(2)" v-if="isMch"></image> -->
|
||||
</view>
|
||||
<!-- <view class="title">
|
||||
<text :class="index == 1 ? 'active' : ''" @click="btntab(1)">可共享</text> <text :class="index == 2 ? 'active' : ''" @click="btntab(2)">共享中</text> <text :class="index == 3 ? 'active' : ''" @click="btntab(3)">全部共享</text>
|
||||
</view> -->
|
||||
<view class="list" v-for="(item,index) in gxlist" :key="index">
|
||||
<view class="pic">
|
||||
<image :src="item.picture" mode=""></image>
|
||||
|
@ -41,9 +38,9 @@
|
|||
export default {
|
||||
data() {
|
||||
return {
|
||||
latitude: '', // 初始纬度
|
||||
longitude: '', // 初始经度
|
||||
covers: [], // 覆盖物数组
|
||||
latitude: '',
|
||||
longitude: '',
|
||||
covers: [],
|
||||
index:1,
|
||||
isMch:false,
|
||||
gxlist:[]
|
||||
|
@ -56,14 +53,11 @@
|
|||
this.getshanghu()
|
||||
},
|
||||
methods: {
|
||||
|
||||
// 跳转导航
|
||||
mapFun(item) {
|
||||
console.log(item);
|
||||
uni.openLocation({
|
||||
latitude: item.lat,
|
||||
//纬度 - 目的地/坐标点
|
||||
longitude: item.lng,
|
||||
//经度 - 目的地/坐标点
|
||||
name: item.county,
|
||||
address: item.address
|
||||
});
|
||||
|
@ -79,11 +73,9 @@
|
|||
uni.getLocation({
|
||||
type: 'wgs84',
|
||||
success: (res) => {
|
||||
console.log('我的位置:', res);
|
||||
this.latitude = res.latitude;
|
||||
this.longitude = res.longitude;
|
||||
this.jinweidu = this.longitude + ',' + this.latitude;
|
||||
|
||||
// 请求附近的店铺
|
||||
this.$u.get("/app/store/listNearBy?center=" + this.jinweidu + '&radius=' + 1000).then(response => {
|
||||
if (response.code == 200) {
|
||||
|
@ -100,7 +92,7 @@
|
|||
longitude: item.lng,
|
||||
width: 30,
|
||||
height: 40,
|
||||
iconPath: 'https://api.ccttiot.com/smartmeter/img/static/uZXgsJE6hXbRSwbKILB4', // 图标路径
|
||||
iconPath: 'https://api.ccttiot.com/smartmeter/img/static/uZXgsJE6hXbRSwbKILB4',
|
||||
distance: distance // 可以在这里也添加距离到覆盖物对象中,但通常只需要在店铺对象中
|
||||
};
|
||||
// console.log(this.gxlist);
|
||||
|
@ -123,18 +115,12 @@
|
|||
const phi2 = lat2 * Math.PI / 180;
|
||||
const deltaPhi = (lat2 - lat1) * Math.PI / 180;
|
||||
const deltaLambda = (lon2 - lon1) * Math.PI / 180;
|
||||
|
||||
const a = Math.sin(deltaPhi / 2) * Math.sin(deltaPhi / 2) +
|
||||
Math.cos(phi1) * Math.cos(phi2) *
|
||||
Math.sin(deltaLambda / 2) * Math.sin(deltaLambda / 2);
|
||||
const a = Math.sin(deltaPhi / 2) * Math.sin(deltaPhi / 2) + Math.cos(phi1) * Math.cos(phi2) * Math.sin(deltaLambda / 2) * Math.sin(deltaLambda / 2);
|
||||
const c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a));
|
||||
|
||||
const distance = R * c; // 计算出的距离值
|
||||
const distance = R * c;
|
||||
return distance;
|
||||
},
|
||||
|
||||
|
||||
|
||||
handleMarkerClick(event) {
|
||||
const markerId = event.markerId;
|
||||
uni.navigateTo({
|
||||
|
@ -171,7 +157,6 @@
|
|||
height: 100%;
|
||||
}
|
||||
page {
|
||||
// background-color: ;
|
||||
background: linear-gradient(180deg, #D9D8FF 0%, rgba(255, 255, 255, 0) 100%);
|
||||
border-radius: 0rpx 0rpx 0rpx 0rpx;
|
||||
}
|
||||
|
@ -250,7 +235,6 @@
|
|||
}
|
||||
}
|
||||
.cen{
|
||||
// margin-right: 140rpx;
|
||||
.cena{
|
||||
font-weight: 500;
|
||||
font-size: 28rpx;
|
||||
|
@ -274,7 +258,6 @@
|
|||
display: inline-block;
|
||||
padding: 4rpx 18rpx;
|
||||
box-sizing: border-box;
|
||||
// border: 1px solid #ccc;
|
||||
border-radius: 20rpx;
|
||||
}
|
||||
.bu{
|
||||
|
|
|
@ -20,10 +20,10 @@
|
|||
</view>
|
||||
<view class="mid_right">
|
||||
<view class="mid_top">
|
||||
{{ deviceInfo.deviceName }}号
|
||||
{{ deviceInfo.deviceName }}
|
||||
</view>
|
||||
<view class="mid_bot">
|
||||
<view class="txt" v-if="deviceInfo">电表号:{{ deviceInfo.deviceId }}</view>
|
||||
<view class="txt" v-if="deviceInfo">S/N码:{{ deviceInfo.deviceNo }}</view>
|
||||
<div class="tip" v-if="deviceInfo.onlineStatus==1">在线</div>
|
||||
<div class="tip" v-if="deviceInfo.onlineStatus==0">离线</div>
|
||||
<div class="tip" v-if="deviceInfo.powerStatus==0">断电</div>
|
||||
|
@ -182,145 +182,143 @@
|
|||
this.getDevice(id)
|
||||
},
|
||||
methods: {
|
||||
initChart(canvas, width, height, canvasDpr) {
|
||||
let that = this
|
||||
console.log(canvas, width, height, canvasDpr)
|
||||
let value = 100;
|
||||
let value2 = this.deviceInfo.orderAmount
|
||||
const option = {
|
||||
// backgroundColor:"#061740",
|
||||
title: {
|
||||
show: false,
|
||||
text: `历史请求满意度`, // 图表标题
|
||||
x: 'center',
|
||||
y: '20',
|
||||
textStyle: {
|
||||
color: '#333', //'#fff',
|
||||
fontSize: 20,
|
||||
},
|
||||
},
|
||||
series: [{
|
||||
type: 'pie', // 饼图类型
|
||||
radius: ['98%', '70%'], // 饼图半径,第一个值是内半径,第二个值是外半径
|
||||
silent: true,
|
||||
clockwise: true,
|
||||
startAngle: 90, // 起始角度
|
||||
z: 0,
|
||||
zlevel: 0,
|
||||
data: [{
|
||||
value: value,
|
||||
name: '占比', // 数据项名称
|
||||
itemStyle: {
|
||||
normal: {
|
||||
color: '#8883F0', // 数据项颜色
|
||||
},
|
||||
},
|
||||
label: {
|
||||
normal: {
|
||||
position: 'center',
|
||||
formatter: ` {a|${value2}}\n\n{b|订单金额}`, // 标签内容格式
|
||||
rich: {
|
||||
a: {
|
||||
fontSize: 15,
|
||||
fontWeight: '700',
|
||||
color: '#333',
|
||||
},
|
||||
b: {
|
||||
fontSize: 11,
|
||||
color: '#888',
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
value: 100 - value,
|
||||
name: '',
|
||||
label: {
|
||||
normal: {
|
||||
show: false,
|
||||
},
|
||||
},
|
||||
itemStyle: {
|
||||
normal: {
|
||||
color: '#173164',
|
||||
},
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
type: 'gauge', // 仪表盘类型
|
||||
radius: '130%', // 仪表盘半径,占图表容器的百分比
|
||||
center: ['50%', '50%'], // 仪表盘中心位置
|
||||
startAngle: 359,
|
||||
endAngle: 359.9,
|
||||
splitNumber: 2, // 刻度分割段数
|
||||
hoverAnimation: true,
|
||||
axisTick: {
|
||||
show: true, // 是否显示刻度线
|
||||
length: 10, // 刻度线长度
|
||||
lineStyle: {
|
||||
color: 'auto',
|
||||
width: 1,
|
||||
},
|
||||
},
|
||||
splitLine: {
|
||||
length: 0, // 刻度线分隔线长度
|
||||
lineStyle: {
|
||||
width: 1,
|
||||
color: '#061740',
|
||||
},
|
||||
},
|
||||
axisLabel: {
|
||||
show: false, // 是否显示刻度标签
|
||||
},
|
||||
pointer: {
|
||||
show: false, // 是否显示指针
|
||||
},
|
||||
axisLine: {
|
||||
lineStyle: {
|
||||
opacity: 0,
|
||||
},
|
||||
},
|
||||
detail: {
|
||||
show: false, // 是否显示仪表盘详情
|
||||
},
|
||||
data: [{
|
||||
value: 0,
|
||||
name: '',
|
||||
}, ],
|
||||
},
|
||||
],
|
||||
};
|
||||
|
||||
|
||||
chart = echarts.init(canvas, null, {
|
||||
width: width,
|
||||
height: height,
|
||||
devicePixelRatio: canvasDpr
|
||||
})
|
||||
console.log(chart);
|
||||
// option.series[0].data = that.chartData
|
||||
canvas.setChart(chart)
|
||||
chart.setOption(option)
|
||||
return chart
|
||||
},
|
||||
// initChart(canvas, width, height, canvasDpr) {
|
||||
// let that = this
|
||||
// console.log(canvas, width, height, canvasDpr)
|
||||
// let value = 100;
|
||||
// let value2 = this.deviceInfo.orderAmount
|
||||
// const option = {
|
||||
// // backgroundColor:"#061740",
|
||||
// title: {
|
||||
// show: false,
|
||||
// text: `历史请求满意度`, // 图表标题
|
||||
// x: 'center',
|
||||
// y: '20',
|
||||
// textStyle: {
|
||||
// color: '#333', //'#fff',
|
||||
// fontSize: 20,
|
||||
// },
|
||||
// },
|
||||
// series: [{
|
||||
// type: 'pie', // 饼图类型
|
||||
// radius: ['98%', '70%'], // 饼图半径,第一个值是内半径,第二个值是外半径
|
||||
// silent: true,
|
||||
// clockwise: true,
|
||||
// startAngle: 90, // 起始角度
|
||||
// z: 0,
|
||||
// zlevel: 0,
|
||||
// data: [{
|
||||
// value: value,
|
||||
// name: '占比', // 数据项名称
|
||||
// itemStyle: {
|
||||
// normal: {
|
||||
// color: '#8883F0', // 数据项颜色
|
||||
// },
|
||||
// },
|
||||
// label: {
|
||||
// normal: {
|
||||
// position: 'center',
|
||||
// formatter: ` {a|${value2}}\n\n{b|订单金额}`, // 标签内容格式
|
||||
// rich: {
|
||||
// a: {
|
||||
// fontSize: 15,
|
||||
// fontWeight: '700',
|
||||
// color: '#333',
|
||||
// },
|
||||
// b: {
|
||||
// fontSize: 11,
|
||||
// color: '#888',
|
||||
// },
|
||||
// },
|
||||
// },
|
||||
// },
|
||||
// },
|
||||
// {
|
||||
// value: 100 - value,
|
||||
// name: '',
|
||||
// label: {
|
||||
// normal: {
|
||||
// show: false,
|
||||
// },
|
||||
// },
|
||||
// itemStyle: {
|
||||
// normal: {
|
||||
// color: '#173164',
|
||||
// },
|
||||
// },
|
||||
// },
|
||||
// ],
|
||||
// },
|
||||
// {
|
||||
// type: 'gauge', // 仪表盘类型
|
||||
// radius: '130%', // 仪表盘半径,占图表容器的百分比
|
||||
// center: ['50%', '50%'], // 仪表盘中心位置
|
||||
// startAngle: 359,
|
||||
// endAngle: 359.9,
|
||||
// splitNumber: 2, // 刻度分割段数
|
||||
// hoverAnimation: true,
|
||||
// axisTick: {
|
||||
// show: true, // 是否显示刻度线
|
||||
// length: 10, // 刻度线长度
|
||||
// lineStyle: {
|
||||
// color: 'auto',
|
||||
// width: 1,
|
||||
// },
|
||||
// },
|
||||
// splitLine: {
|
||||
// length: 0, // 刻度线分隔线长度
|
||||
// lineStyle: {
|
||||
// width: 1,
|
||||
// color: '#061740',
|
||||
// },
|
||||
// },
|
||||
// axisLabel: {
|
||||
// show: true, // 是否显示刻度标签
|
||||
// },
|
||||
// pointer: {
|
||||
// show: false, // 是否显示指针
|
||||
// },
|
||||
// axisLine: {
|
||||
// lineStyle: {
|
||||
// opacity: 0,
|
||||
// },
|
||||
// },
|
||||
// detail: {
|
||||
// show: false, // 是否显示仪表盘详情
|
||||
// },
|
||||
// data: [{
|
||||
// value: 0,
|
||||
// name: '',
|
||||
// }, ],
|
||||
// },
|
||||
// ],
|
||||
// };
|
||||
// chart = echarts.init(canvas, null, {
|
||||
// width: width,
|
||||
// height: height,
|
||||
// devicePixelRatio: canvasDpr
|
||||
// })
|
||||
// console.log(chart);
|
||||
// // option.series[0].data = that.chartData
|
||||
// canvas.setChart(chart)
|
||||
// chart.setOption(option)
|
||||
// return chart
|
||||
// },
|
||||
async initChart() {
|
||||
let value = 100;
|
||||
let value2 = this.deviceInfo.orderAmount
|
||||
const option = {
|
||||
// backgroundColor:"#061740",
|
||||
title: {
|
||||
show: false,
|
||||
text: `历史请求满意度`, // 图表标题
|
||||
x: 'center',
|
||||
y: '20',
|
||||
textStyle: {
|
||||
color: '#333', //'#fff',
|
||||
fontSize: 20,
|
||||
},
|
||||
},
|
||||
// title: {
|
||||
// show: false,
|
||||
// text: `历史请求满意度`, // 图表标题
|
||||
// x: 'center',
|
||||
// y: '20',
|
||||
// textStyle: {
|
||||
// color: '#333', //'#fff',
|
||||
// fontSize: 20,
|
||||
// },
|
||||
// },
|
||||
series: [{
|
||||
type: 'pie', // 饼图类型
|
||||
radius: ['98%', '70%'], // 饼图半径,第一个值是内半径,第二个值是外半径
|
||||
|
@ -355,70 +353,70 @@
|
|||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
value: 100 - value,
|
||||
name: '',
|
||||
label: {
|
||||
normal: {
|
||||
show: false,
|
||||
},
|
||||
},
|
||||
itemStyle: {
|
||||
normal: {
|
||||
color: '#173164',
|
||||
},
|
||||
},
|
||||
},
|
||||
// {
|
||||
// value: 100 - value2,
|
||||
// name: '',
|
||||
// label: {
|
||||
// normal: {
|
||||
// show: false,
|
||||
// },
|
||||
// },
|
||||
// itemStyle: {
|
||||
// normal: {
|
||||
// color: '#173164',
|
||||
// },
|
||||
// },
|
||||
// },
|
||||
],
|
||||
},
|
||||
{
|
||||
type: 'gauge', // 仪表盘类型
|
||||
radius: '130%', // 仪表盘半径,占图表容器的百分比
|
||||
center: ['50%', '50%'], // 仪表盘中心位置
|
||||
startAngle: 359,
|
||||
endAngle: 359.9,
|
||||
splitNumber: 2, // 刻度分割段数
|
||||
hoverAnimation: true,
|
||||
axisTick: {
|
||||
show: true, // 是否显示刻度线
|
||||
length: 10, // 刻度线长度
|
||||
lineStyle: {
|
||||
color: 'auto',
|
||||
width: 1,
|
||||
},
|
||||
},
|
||||
splitLine: {
|
||||
length: 0, // 刻度线分隔线长度
|
||||
lineStyle: {
|
||||
width: 1,
|
||||
color: '#061740',
|
||||
},
|
||||
},
|
||||
axisLabel: {
|
||||
show: false, // 是否显示刻度标签
|
||||
},
|
||||
pointer: {
|
||||
show: false, // 是否显示指针
|
||||
},
|
||||
axisLine: {
|
||||
lineStyle: {
|
||||
opacity: 0,
|
||||
},
|
||||
},
|
||||
detail: {
|
||||
show: false, // 是否显示仪表盘详情
|
||||
},
|
||||
data: [{
|
||||
value: 0,
|
||||
name: '',
|
||||
}, ],
|
||||
},
|
||||
// {
|
||||
// type: 'gauge', // 仪表盘类型
|
||||
// radius: '130%', // 仪表盘半径,占图表容器的百分比
|
||||
// center: ['50%', '50%'], // 仪表盘中心位置
|
||||
// startAngle: 359,
|
||||
// endAngle: 359.9,
|
||||
// splitNumber: 2, // 刻度分割段数
|
||||
// hoverAnimation: true,
|
||||
// axisTick: {
|
||||
// show: true, // 是否显示刻度线
|
||||
// length: 10, // 刻度线长度
|
||||
// lineStyle: {
|
||||
// color: 'auto',
|
||||
// width: 1,
|
||||
// },
|
||||
// },
|
||||
// splitLine: {
|
||||
// length: 0, // 刻度线分隔线长度
|
||||
// lineStyle: {
|
||||
// width: 1,
|
||||
// color: '#061740',
|
||||
// },
|
||||
// },
|
||||
// axisLabel: {
|
||||
// show: false, // 是否显示刻度标签
|
||||
// },
|
||||
// pointer: {
|
||||
// show: false, // 是否显示指针
|
||||
// },
|
||||
// axisLine: {
|
||||
// lineStyle: {
|
||||
// opacity: 0,
|
||||
// },
|
||||
// },
|
||||
// detail: {
|
||||
// show: false, // 是否显示仪表盘详情
|
||||
// },
|
||||
// data: [{
|
||||
// value: 0,
|
||||
// name: '',
|
||||
// }, ],
|
||||
// },
|
||||
],
|
||||
};
|
||||
|
||||
// console.log( this.$refs.chartRef,'1111');
|
||||
const chart = await this.$refs.chart.init(echarts);
|
||||
console.log(option,11);
|
||||
// console.log(option,11);
|
||||
chart.setOption(option)
|
||||
// chart.resize({
|
||||
// width: uni.upx2px(210), // Convert 210rpx to pixels
|
||||
|
|
|
@ -3,6 +3,17 @@
|
|||
<u-navbar title="设置" :border-bottom="false" :background="bgc" title-color='#2E4975' title-size='36'
|
||||
height='36'></u-navbar>
|
||||
<view class="card">
|
||||
<view class="li" @click.stop="sremakemc()">
|
||||
<view class="tit">
|
||||
设备名称
|
||||
</view>
|
||||
<view class="info">
|
||||
<view class="txt">
|
||||
{{listobj.deviceName}}
|
||||
</view>
|
||||
<view class="iconfont icon-xiangyou1"></view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="li" @click.stop="sremake()">
|
||||
<view class="tit">
|
||||
备注
|
||||
|
@ -125,9 +136,26 @@
|
|||
确定
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</u-popup>
|
||||
<u-popup v-model="showmc" mode="center" border-radius='20'>
|
||||
<view class="popcard" v-if="showmc">
|
||||
<view class="tit">
|
||||
修改名称
|
||||
</view>
|
||||
<view class="ipt">
|
||||
<u-input v-model="xgname" placeholder=" " border='surround' placeholder-style='font-size: 24rpx;' />
|
||||
</view>
|
||||
<view class="btnbox">
|
||||
<view class="btn2" @click="close()">
|
||||
取消
|
||||
</view>
|
||||
<view class="btn1" @click="sub(2)">
|
||||
确定
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</u-popup>
|
||||
<view class="btn" @click="deldevice()">
|
||||
解除绑定
|
||||
</view>
|
||||
|
@ -159,6 +187,7 @@
|
|||
}
|
||||
],
|
||||
id: '',
|
||||
xgname:'',
|
||||
deviceInfo: {},
|
||||
groupList: {},
|
||||
showpopup: false,
|
||||
|
@ -167,7 +196,7 @@
|
|||
showpeice: false,
|
||||
showremake: false,
|
||||
listobj: {},
|
||||
|
||||
showmc:false,
|
||||
pagenum: 1,
|
||||
wateringList: [],
|
||||
pagesize: 10, // 一页多少数据
|
||||
|
@ -188,12 +217,6 @@
|
|||
this.getgroup()
|
||||
},
|
||||
methods: {
|
||||
|
||||
// taocan(){
|
||||
// uni.navigateTo({
|
||||
// url:'/page_fenbao/statulist/taocanlist/index'
|
||||
// })
|
||||
// },
|
||||
sremakes() {
|
||||
this.showshop = true
|
||||
},
|
||||
|
@ -279,6 +302,7 @@
|
|||
}
|
||||
this.showpopup = false
|
||||
this.showpeice = false
|
||||
this.showmc = false
|
||||
this.putdevice(data)
|
||||
}
|
||||
},
|
||||
|
@ -317,6 +341,11 @@
|
|||
}
|
||||
})
|
||||
},
|
||||
sremakemc(){
|
||||
console.log(1);
|
||||
this.showmc = true
|
||||
this.xgname = this.listobj.deviceName
|
||||
},
|
||||
sremake() {
|
||||
this.showpopup = true
|
||||
this.showremake = true
|
||||
|
@ -329,7 +358,7 @@
|
|||
this.showpeice = false
|
||||
this.showremake = false
|
||||
this.showpopup = false
|
||||
|
||||
this.showmc = false
|
||||
},
|
||||
getDevice(id) {
|
||||
this.$u.get("/app/device/" + this.id).then((res) => {
|
||||
|
|
|
@ -109,9 +109,7 @@
|
|||
<view class="dd">
|
||||
<u-select v-model="show" :list="list" title='角色切换' @confirm="confirm"></u-select>
|
||||
</view>
|
||||
<view class="btn" @click="btntc">
|
||||
退出商户中心
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
|
@ -143,11 +141,7 @@
|
|||
this.getuserinfo()
|
||||
},
|
||||
methods: {
|
||||
btntc(){
|
||||
uni.reLaunch({
|
||||
url:'/pages/shouye/index'
|
||||
})
|
||||
},
|
||||
|
||||
|
||||
btnwz(num){
|
||||
if(num == 1){
|
||||
|
@ -263,22 +257,7 @@
|
|||
}
|
||||
}
|
||||
|
||||
.btn {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
margin: 52rpx auto 0;
|
||||
width: 654rpx;
|
||||
height: 100rpx;
|
||||
background: #FF4F4F;
|
||||
box-shadow: 0rpx 16rpx 40rpx 0rpx rgba(42, 130, 228, 0.1);
|
||||
opacity: 1;
|
||||
border-radius: 30rpx;
|
||||
font-size: 32rpx;
|
||||
font-family: HarmonyOS Sans SC, HarmonyOS Sans SC;
|
||||
font-weight: 400;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
|
||||
|
||||
.fz {
|
||||
|
||||
|
|
|
@ -3,9 +3,6 @@
|
|||
<u-navbar :is-back="false" :title="tittxt" :border-bottom="false" :background="bgc" title-color='#2E4975'
|
||||
title-size='44' height='44' id="navbar">
|
||||
</u-navbar>
|
||||
<!-- <view class="" @click="scanQRCode()">
|
||||
扫码添加
|
||||
</view> -->
|
||||
<u-mask :show="showtip" @click="show = false" :z-index='1000'/>
|
||||
<view class="tip_box" v-if="showtip">
|
||||
<view class="top">
|
||||
|
@ -23,7 +20,6 @@
|
|||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 房东 -->
|
||||
<view class="fd" >
|
||||
<view class="fd_top">
|
||||
|
||||
|
@ -94,7 +90,7 @@
|
|||
</view>
|
||||
</view>
|
||||
<view class="card_left_no">
|
||||
电表号:{{item.deviceNo}}
|
||||
S/N码:{{item.deviceNo}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="card_right">
|
||||
|
@ -187,9 +183,9 @@
|
|||
|
||||
pagenum: 1,
|
||||
wateringList: [],
|
||||
pagesize: 10, // 一页多少数据
|
||||
isLoading: false, // 是否正在加载数据
|
||||
noMoreData: false, // 是否没有更多数据
|
||||
pagesize: 10,
|
||||
isLoading: false,
|
||||
noMoreData: false,
|
||||
total: 0
|
||||
}
|
||||
},
|
||||
|
@ -204,19 +200,14 @@
|
|||
console.log(this.deviceId,'aaa',this.name);
|
||||
let that = this; // 将外部的 this 绑定到 that 上
|
||||
|
||||
// let options= JSON.parse(storedData);
|
||||
|
||||
setTimeout(() => {
|
||||
if (this.userType === '01') { // 注意 '01' 是一个字符串
|
||||
if (uni.getStorageSync('mac')) {
|
||||
this.mac = uni.getStorageSync('mac');
|
||||
|
||||
uni.getLocation({
|
||||
type: 'wgs84',
|
||||
success: function(lb) {
|
||||
console.log('位置信息', lb);
|
||||
console.log('当前位置的经度:' + lb.longitude);
|
||||
console.log('当前位置的纬度:' + lb.latitude);
|
||||
|
||||
that.gps.lat = lb.latitude;
|
||||
that.gps.lon = lb.longitude;
|
||||
that.tobind()
|
||||
|
@ -284,7 +275,7 @@
|
|||
// 当前设备是 Android
|
||||
|
||||
} else if (systemInfo.platform === 'ios') {
|
||||
console.log('aaaaaaaaaaaa');
|
||||
// console.log('aaaaaaaaaaaa');
|
||||
uni.navigateTo({
|
||||
url: '/page_components/wifilist/index?deviceId=' + this.deviceId + '&name=' + this.name
|
||||
})
|
||||
|
@ -297,7 +288,7 @@
|
|||
uni.removeStorageSync('mac');
|
||||
uni.removeStorageSync('deviceIds');
|
||||
uni.removeStorageSync('name');
|
||||
this.getDeviceList(); // 使用 that 而不是 this
|
||||
this.getDeviceList();
|
||||
} else {
|
||||
// 处理失败情况
|
||||
}
|
||||
|
|
11
pages/my.vue
11
pages/my.vue
|
@ -78,6 +78,10 @@
|
|||
<image src="https://api.ccttiot.com/smartmeter/img/static/uYWpW30vIQ6M4svb7Vnb"></image>
|
||||
<view class="txt">设置</view>
|
||||
</view>
|
||||
|
||||
<view class="botcard" style="padding-left: 220rpx;font-size: 40rpx;font-weight: 600;" @click="btntc">
|
||||
切换用户端
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
@ -106,6 +110,11 @@
|
|||
this.logins()
|
||||
},
|
||||
methods: {
|
||||
btntc(){
|
||||
uni.reLaunch({
|
||||
url:'/pages/shouye/index'
|
||||
})
|
||||
},
|
||||
topage(num){
|
||||
if(num==0){
|
||||
uni.navigateTo({
|
||||
|
@ -320,7 +329,7 @@ page{
|
|||
}
|
||||
.num{
|
||||
margin-top: 20rpx;
|
||||
font-size: 22rpx;
|
||||
font-size: 28rpx;
|
||||
font-family: HarmonyOS Sans SC, HarmonyOS Sans SC;
|
||||
font-weight: 400;
|
||||
color: #ABA8F4;
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<!-- 用户首页显示 -->
|
||||
<view class="useryonghu">
|
||||
<u-navbar :is-back="false" title="首页" :border-bottom="false" :background="bgc" title-color='#000'
|
||||
title-size='36' height='8'></u-navbar>
|
||||
title-size='44' height='44'></u-navbar>
|
||||
<!-- <view class="title">
|
||||
充电宝
|
||||
</view> -->
|
||||
|
|
Loading…
Reference in New Issue
Block a user