This commit is contained in:
3321822538@qq.com 2024-06-04 14:50:30 +08:00
parent ca1ed4834f
commit 10b5790c94
21 changed files with 636 additions and 643 deletions

View File

@ -36,7 +36,7 @@
该设备还剩余时长{{expireTimeStr}}分钟
</view>
<view class="">
{{item.description}}
{{item.description == null ? '无' : item.description}}
</view>
<view class="wz">
联系客服2562356565
@ -46,7 +46,7 @@
<view class="tongyi">
<u-checkbox-group>
<u-checkbox v-model="checked" @change="checkboxChange" active-color="#8883F0 ">我已同意
<text>用户服务协议</text> </u-checkbox>
</u-checkbox><text></text>
</u-checkbox-group>
<view class="zf" @click="btnzhifu">
立即支付
@ -210,7 +210,9 @@
/deep/ .u-title {
padding-bottom: 22rpx;
}
/deep/ .u-checkbox__label{
margin-right: 0 !important;
}
// /deep/ .u-icon__icon{
// padding-bottom: 41rpx;
// }
@ -288,7 +290,7 @@
.title {
margin-top: 40rpx;
padding-left: 32rpx;
font-weight: 500;
font-weight: 600;
font-size: 40rpx;
color: #383838;
margin-bottom: 30rpx;
@ -311,6 +313,8 @@
text {
color: #638DFF;
height: 50rpx;
line-height: 50rpx;
}
.zf {

View File

@ -1,7 +1,9 @@
<template>
<view>
<u-navbar title="WIFI连接" :border-bottom="false" :background="bgc" title-color='#fff' back-icon-color="#fff" title-size='36'
height='50'></u-navbar>
<!-- 样式 -->
<view class="container" style="margin-top: 100rpx;">
<view class="container" style="margin-top: 50rpx;">
<view class="device">
<span class="device-list-title">WIFI选择</span>
</view>
@ -18,19 +20,23 @@
<ul>
<li
v-if="(item.signalStrength < 1 ? (item.signalStrength * 100) : item.signalStrength) > 1 && (item.signalStrength < 1 ? (item.signalStrength * 100) : item.signalStrength) < 30">
<image src="https://api.ccttiot.com/smartmeter/img/static/uTvQ7JtgSsBsTY99SKrF" mode=""></image>
<image src="https://api.ccttiot.com/smartmeter/img/static/uTvQ7JtgSsBsTY99SKrF"
mode=""></image>
</li>
<li
v-if="(item.signalStrength < 1 ? (item.signalStrength * 100) : item.signalStrength) > 29 && (item.signalStrength < 1 ? (item.signalStrength * 100) : item.signalStrength) < 51">
<image src="https://api.ccttiot.com/smartmeter/img/static/uXM3mk2pJi73XeM9mVqG" mode=""></image>
<image src="https://api.ccttiot.com/smartmeter/img/static/uXM3mk2pJi73XeM9mVqG"
mode=""></image>
</li>
<li
v-if="(item.signalStrength < 1 ? (item.signalStrength * 100) : item.signalStrength) > 50 && (item.signalStrength < 1 ? (item.signalStrength * 100) : item.signalStrength) < 70">
<image src="https://api.ccttiot.com/smartmeter/img/static/uTTcLsrjxpw5asCMUZtR" mode=""></image>
<image src="https://api.ccttiot.com/smartmeter/img/static/uTTcLsrjxpw5asCMUZtR"
mode=""></image>
</li>
<li
v-if="(item.signalStrength < 1 ? (item.signalStrength * 100) : item.signalStrength) > 69">
<image src="https://api.ccttiot.com/smartmeter/img/static/uOa0lsRfyLqH7CEYrgXx" mode=""></image>
<image src="https://api.ccttiot.com/smartmeter/img/static/uOa0lsRfyLqH7CEYrgXx"
mode=""></image>
</li>
</ul>
</view>
@ -40,12 +46,16 @@
<view class="wz" style="color: #8883F0 ;">{{item.BSSID}}</view>
</view>
</view>
<image src="https://api.ccttiot.com/smartmeter/img/static/uLrArPv3OrIodtWZ3gri" mode="" class="pictwo" v-if="indexs == index">
<image src="https://api.ccttiot.com/smartmeter/img/static/uLrArPv3OrIodtWZ3gri" mode=""
class="pictwo" v-if="indexs == index">
</image>
</view>
</view>
<view class="button" @click="btnxyb">下一步</view>
<view class="buttons" @click="btnsd">手动输入WIFI</view>
<view class="annius" style="display: flex;justify-content: space-between;">
<view class="" @click="btnsd">手动输入WIFI</view>
<view class="" @click="btnxyb">下一步</view>
</view>
</view>
</view>
@ -83,7 +93,10 @@
videoflag: false, //flag
ssid: '', //wifi
signalStrengthflag: false,
objlist: {}
objlist: {},
bgc: {
backgroundColor: "#8883f0",
},
};
},
@ -128,7 +141,6 @@
}
that.signalStrengthflag = true
that.list = that.wifiList
console.log(that.list, '1010'); //
});
},
fail: function(err) {
@ -150,7 +162,7 @@
onLoad: function(option) {
//
this.objlist = option
console.log(this.objlist,'listlist')
console.log(this.objlist, 'listlist')
var that = this
wx.startWifi({
success: function() {
@ -211,7 +223,7 @@
},
//
btnxyb() {
console.log('panduan1',this.indexs);
console.log('panduan1', this.indexs);
if (this.indexs == -1) {
uni.showToast({
title: '请选择需要连接的wifi',
@ -221,14 +233,16 @@
} else {
console.log('panduan2');
uni.navigateTo({
url: '/page_user/wifijoint/index?ssid=' + JSON.stringify(this.ssid) + '&objlist=' + JSON.stringify(this.objlist)
url: '/page_user/wifijoint/index?ssid=' + JSON.stringify(this.ssid) + '&objlist=' + JSON
.stringify(this.objlist)
})
}
},
btnsd() {
this.ssid = ''
uni.navigateTo({
url: '/page_user/wifijoint/index?objlist=' + JSON.stringify(this.objlist) + '&ssid=' + JSON.stringify(this.ssid)
url: '/page_user/wifijoint/index?objlist=' + JSON.stringify(this.objlist) + '&ssid=' + JSON
.stringify(this.ssid)
})
},
@ -263,51 +277,34 @@
}
li {
// width: 8rpx;
// position: absolute;
// bottom: 0;
// border-radius: 10px;
// background: rgba(0, 0, 0, .5);
image {
display: inline-block;
margin-top: 10rpx;
// padding-left: 30rpx;
// box-sizing: border-box;
width: 50rpx;
height: 46rpx;
}
}
// ul li:nth-child(1) {
// height: 10rpx;
// left: 0px;
// }
// ul li:nth-child(2) {
// height: 20rpx;
// left: 10px;
// }
// ul li:nth-child(3) {
// height: 30rpx;
// left: 20px;
// }
// ul li:nth-child(4) {
// height: 40rpx;
// left: 30px;
// }
// ul li:nth-child(5) {
// height: 50rpx;
// left: 40px;
// }
// ul li:nth-child(6) {
// height: 60rpx;
// left: 50px;
// }
.annius{
position: fixed;
align-items: center;
left: 50%;
transform: translateX(-50%);
bottom: 50rpx;
border-radius: 52rpx 52rpx 52rpx 52rpx;
font-weight: 700;
font-size: 20px;
width: 90%;
view{
color: #FFFFFF;
height: 96rpx;
border-radius: 30rpx;
line-height: 96rpx;
box-sizing: border-box;
width: 44%;
background-color: #8883F0 !important;
text-align: center;
}
}
@ -482,7 +479,7 @@
padding: 10rpx 0;
height: 96rpx;
box-sizing: border-box;
background-color: #8883F0 !important;
background-color: #8883F0 !important;
border-radius: 52rpx 52rpx 52rpx 52rpx;
font-weight: 700;
font-size: 20px;
@ -501,7 +498,7 @@
height: 96rpx;
padding: 10rpx 0;
box-sizing: border-box;
background-color: #8883F0 !important;
background-color: #8883F0 !important;
border-radius: 52rpx 52rpx 52rpx 52rpx;
font-weight: 700;
font-size: 20px;

View File

@ -1,6 +1,6 @@
<template>
<view class="pages">
<u-navbar title="添加设备" :border-bottom="false" :background="bgc" title-color='#262B37' title-size='38'
<u-navbar title="添加设备" :border-bottom="false" :background="bgc" title-size='38' title-color='#fff' back-icon-color="#fff"
height='50'></u-navbar>
<view class="title">
<text>设备列表</text>
@ -14,7 +14,7 @@
</view>
<view class="cen">
<view class="name">
智能开关
智能开关
</view>
<view class="mac">
MAC{{item.localName.substring(6)}}
@ -76,7 +76,10 @@
gps: {},
mac: '',
status: false,
storeId:''
storeId:'',
bgc: {
backgroundColor: "#8883f0",
},
}
},
onLoad(option) {
@ -140,24 +143,16 @@
case xBlufi.XBLUFI_TYPE.TYPE_GET_DEVICE_LISTS:
if (options.result) {
let devicesarr = options.data
console.log(devicesarr,100100);
// console.log(devicesarr,100100);
devicesarr.forEach(device => {
const mac = device.name.substring(6);
if (device.name.substring(0, 4) == "CTKG") {
// this.$u.get(`/app/device/${mac}/isBind`, data).then((res) => {
// if (res.data == false) {
this.devicesList.push(device);
console.log(this.devicesList);
let uniqueDevicesList = Array.from(new Set(this.devicesList));
// this.devicesList
this.devicesList = uniqueDevicesList;
// }
// })
}
});
}
break;
@ -314,28 +309,6 @@
console.error('获取位置信息失败:', error);
that.gps.lat = 0;
that.gps.lon = 0;
// that.$u.put(`/app/device/bind/${that.mac}`, that.gps).then((res) => {
// if (res.code == 200) {
// uni.showToast({
// title: '',
// icon: 'none',
// duration: 2000
// });
// uni.removeStorageSync('mac');
// // setTimeout(()=>{
// // uni.switchTab({
// // url:'/pages/index/index'
// // })
// // },)
// } else {
// // setTimeout(()=>{
// // uni.switchTab({
// // url:'/pages/index/index'
// // })
// // },)
// }
// })
//
}
})
@ -420,7 +393,7 @@
.title {
margin-bottom: 84rpx;
margin-top: 50rpx;
image {
display: inline-block;
width: 48rpx;

View File

@ -1,6 +1,6 @@
<template>
<view class="page">
<u-navbar title="添加设备" :border-bottom="false" :background="bgc" title-color='#262B37' title-size='38'
<u-navbar title="添加设备" :border-bottom="false" :background="bgc" title-color='#fff' back-icon-color="#fff" title-size='38'
height='50'></u-navbar>
<text class="title">IOS WIFI连接教程</text>
<text class="wb">系统检测到您为苹果手机需进wiFi设置页获取最新WIFI后返回</text>
@ -18,7 +18,10 @@
options: '',
deviceId: '',
name: '',
videosrc:'https://lxnapi.ccttiot.com/FjAFeRSQNx3FUuU6eH61dHAconzA'
videosrc:'https://lxnapi.ccttiot.com/FjAFeRSQNx3FUuU6eH61dHAconzA',
bgc: {
backgroundColor: "#8883f0",
},
}
},
onLoad(option) {
@ -42,10 +45,10 @@
padding: 0 20rpx;
box-sizing: border-box;
padding-top: 50rpx;
padding-bottom: 30rpx;
// padding-bottom: 30rpx;
.title {
font-size: 80rpx;
font-size: 60rpx;
color: #666;
}
@ -53,34 +56,28 @@
color: #666;
display: block;
font-size: 34rpx;
margin-top: 30rpx;
margin-top: 10rpx;
}
.wifivideo {
// width: 100%;
margin-top: 30rpx;
margin-top: 10rpx;
width: 100%;
height: 63vh;
padding-bottom: 56.25%;
position: relative;
text-align: center;
// position: relative;
video {
// width: 100%;
// height: 90vh;
border-radius: 20rpx;
position: absolute;
width: 100%;
height: 100%;
// position: absolute;
width: 90%;
height: 63vh;
object-fit: cover;
}
}
}
button {
// position: fixed;
// left: 50%;
// transform: translateX(-50%);
// bottom: 50rpx;
//margin-top: -100rpx;
padding: 10rpx 0;
box-sizing: border-box;
background-color: #8883F0;

View File

@ -21,11 +21,10 @@
<text class="shen">上报时间</text> <text class="qian">{{item.createTime}}</text>
</view>
</view>
<view class="" style="width: 448rpx;height: 448rpx;margin: auto;margin-top: 100rpx;text-align: center;"
v-if="showflag">
<image style="width: 448rpx;height: 448rpx;"
<view class="" v-if="showflag" style="width: 100%;height: 200rpx;margin: auto;margin-top: 170rpx;text-align: center;">
<image style="width: 200rpx;height: 200rpx;"
src="https://api.ccttiot.com/smartmeter/img/static/uZFUpcz0YZZ4f4RjvGg2" mode=""></image>
<view class="" style="font-size: 30rpx;color: #ccc;margin-top: 30rpx;">暂无更多故障记录...</view>
<view class="" style="font-size: 28rpx;color: #808080;margin-top: 30rpx;">暂无更多故障记录...</view>
</view>
</view>
</view>

View File

@ -37,10 +37,10 @@
</view>
</view>
<view class="" v-if="showflag" style="width: 448rpx;height: 448rpx;margin: auto;margin-top: 170rpx;text-align: center;">
<image style="width: 448rpx;height: 448rpx;"
<view class="" v-if="showflag" style="width: 100%;height: 200rpx;margin: auto;margin-top: 170rpx;text-align: center;">
<image style="width: 200rpx;height: 200rpx;"
src="https://api.ccttiot.com/smartmeter/img/static/uZFUpcz0YZZ4f4RjvGg2" mode=""></image>
<view class="" style="font-size: 36rpx;color: #808080;margin-top: 30rpx;">暂无更多订单记录...</view>
<view class="" style="font-size: 28rpx;color: #808080;margin-top: 30rpx;">暂无更多订单记录...</view>
</view>
</view>

View File

@ -79,7 +79,7 @@
<!-- 选择省市区 -->
<u-picker v-model="regionshow" mode="region" @confirm="btnregions"></u-picker>
<!-- 营业时间 -->
<u-picker mode="time" v-model="show" :params="params" @confirm="btnyy"></u-picker>
<u-picker mode="time" v-model="show" default-time="00:00" :params="params" @confirm="btnyy"></u-picker>
</view>
</view>

View File

@ -45,11 +45,10 @@
</view>
</view>
<view class="" style="width: 448rpx;height: 448rpx;margin: auto;margin-top: 100rpx;text-align: center;"
v-if="showflag">
<image style="width: 448rpx;height: 448rpx;"
<view class="" v-if="showflag" style="width: 100%;height: 200rpx;margin: auto;margin-top: 170rpx;text-align: center;">
<image style="width: 200rpx;height: 200rpx;"
src="https://api.ccttiot.com/smartmeter/img/static/uZFUpcz0YZZ4f4RjvGg2" mode=""></image>
<view class="" style="font-size: 30rpx;color: #ccc;margin-top: 30rpx;">暂无更多店铺...</view>
<view class="" style="font-size: 28rpx;color: #808080;margin-top: 30rpx;">暂无更多店铺...</view>
</view>
</view>

View File

@ -37,11 +37,10 @@
</view>
</view>
</view>
<view class="" style="width: 448rpx;height: 448rpx;margin: auto;margin-top: 100rpx;text-align: center;"
v-if="showflag">
<image style="width: 448rpx;height: 448rpx;"
<view class="" v-if="showflag" style="width: 100%;height: 200rpx;margin: auto;margin-top: 170rpx;text-align: center;">
<image style="width: 200rpx;height: 200rpx;"
src="https://api.ccttiot.com/smartmeter/img/static/uZFUpcz0YZZ4f4RjvGg2" mode=""></image>
<view class="" style="font-size: 30rpx;color: #ccc;margin-top: 30rpx;">该店铺暂无设备...</view>
<view class="" style="font-size: 28rpx;color: #808080;margin-top: 30rpx;">暂无更多设备...</view>
</view>
</view>
</view>

View File

@ -16,7 +16,7 @@
<view class="listval">
<view class="tit"> 营业时间</view>
<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 20rpx;box-sizing: border-box;">
<!-- <input type="text" placeholder="请输入营业时间" v-model="yetime" /> -->
<view class="" style="font-size: 28rpx;color: #666;" @click="btnyinye(1)">{{ksyy}}</view>
--
@ -79,7 +79,7 @@
<!-- 选择省市区 -->
<u-picker v-model="regionshow" mode="region" @confirm="btnregions"></u-picker>
<!-- 营业时间 -->
<u-picker mode="time" v-model="show" :params="params" @confirm="btnyy"></u-picker>
<u-picker mode="time" v-model="show" default-time="00:00" :params="params" @confirm="btnyy"></u-picker>
</view>
</view>

View File

@ -3,7 +3,6 @@
<u-navbar title="附近共享" :border-bottom="false" :background="bgc" title-color='#fff' back-icon-color="#fff"
title-size='44' height='50'></u-navbar>
<view class="dtxs">
<!-- <map class='map' :latitude="latitude" :longitude="longitude" @markertap="handleMarkerClick" :markers="covers" :show-location="true" :scale="mapScale"/> -->
<map class='map' id="map" :latitude="latitude" :longitude="longitude" @markertap="handleMarkerClick"
:show-location="true" :markers="covers" :scale="mapScale" />
</view>
@ -152,7 +151,7 @@
// },
onControltap(control) {
this.setMapScale()
// uni.createMapContext("map", this).moveToLocation({
// longitude: this.longitude,
// latitude: this.latitude,
@ -367,7 +366,8 @@
bottom: 37vh;
left: 30rpx;
z-index: 99;
width: 100%;
width: 100%;
image {
width: 210rpx;
height: 74rpx !important;

View File

@ -153,10 +153,10 @@
.list {
width: 680rpx;
height: 654rpx;
height: 640rpx;
background: #FFFFFF;
margin-top: 46rpx;
border-radius: 20rpx;
border-radius: 15rpx;
padding: 10rpx 32rpx;
box-sizing: border-box;
overflow: hidden;
@ -187,7 +187,7 @@
vertical-align: middle;
margin-right: 10rpx;
}
margin-top: 20rpx;
width: 100%;
text-align: center;
font-weight: 500;

View File

@ -3,7 +3,7 @@
<u-navbar title="套餐列表" :border-bottom="false" :background="bgc" title-color='#fff' back-icon-color="#fff" title-size='36'
height='50'></u-navbar>
<view class="box">
<u-swipe-action :show="item.show" :index="index" v-for="(item, index) in list" :key="index" @click="click(item)" @open="open" :options="options">
<u-swipe-action :show="item.show" :index="index" v-for="(item, index) in list" :key="item.suitId" @click="click(item)" @open="open" :options="options">
<view class="boxlist" @click="btnedit(item)">
<view class="toptime">
<text>{{item.name}}{{item.value}}分钟</text> <text>{{item.price}}</text>
@ -38,7 +38,10 @@
backgroundColor: '#dd524d'
}
}],
deviceId:''
deviceId:'',
bgc: {
backgroundColor: "#8883f0",
},
};
},
onLoad(option) {
@ -65,7 +68,6 @@
},
click(item) {
console.log(item);
this.$u.delete(`/app/suit/${item.suitId}`).then((res) => {
if (res.code == 200) {
this.$u.toast(`删除成功`);
@ -75,7 +77,7 @@
},
open(index) {
// this.list[index].show = true;
this.list[index].show = true
this.list.map((val, idx) => {
if (index != idx) this.list[idx].show = false;
})
@ -97,15 +99,12 @@
padding-bottom: 22rpx;
}
page {
background: linear-gradient(180deg, #8883F0 0%, rgba(255, 255, 255, 0) 100%);
background: #F4F5F7;
}
.page {
width: 750rpx;
position: fixed;
top: 0;
left: 0;
padding-bottom: 400rpx;
.box {
width: 750rpx;
height: 1440rpx;

View File

@ -107,6 +107,7 @@
padding-bottom: 22rpx;
}
page {
background: #F4F5F7;
// background: linear-gradient(180deg, #8883F0 0%, rgba(255, 255, 255, 0) 100%);
}

View File

@ -1,22 +1,26 @@
<template>
<view class="page">
<u-navbar title="地图模式" :border-bottom="false" :background="bgc" title-color='#fff' back-icon-color="#fff" title-size='44' height='50'></u-navbar>
<view class="dtxs">
<map class='map' id="map" :latitude="latitude" :longitude="longitude" @markertap="handleMarkerClick"
:show-location="true" :markers="covers" :scale="mapScale" />
</view>
<u-navbar title="地图模式" :border-bottom="false" :background="bgc" title-color='#fff' back-icon-color="#fff"
title-size='44' height='50'></u-navbar>
<view class="dtxs">
<map class='map' id="map" :latitude="latitude" :longitude="longitude" @markertap="handleMarkerClick"
:show-location="true" :markers="covers" :scale="mapScale" />
</view>
<view class="listbox" v-if="falga">
<view class="moshi">
<image src="https://api.ccttiot.com/smartmeter/img/static/udwYRUCox5uxQ8nHfvST" mode="" @click="btndt(1)"></image>
<image src="https://api.ccttiot.com/smartmeter/img/static/u7yxUJZqgPzESeI4tmiz" mode="" @click="btndt(2)" v-if="isMch"></image>
<image src="https://api.ccttiot.com/smartmeter/img/static/uqv3e5ThWL8DqrRNBfoA" mode=""
@click="btndt(1)"></image>
<image src="https://api.ccttiot.com/smartmeter/img/static/u7yxUJZqgPzESeI4tmiz" mode=""
@click="btndt(2)" v-if="isMch"></image>
</view>
<view class="saoyisao">
<view @click="scanQRCode">
<image src="https://api.ccttiot.com/smartmeter/img/static/uBh15vzRx6gV0wRQj7gi" mode=""></image><text>扫一扫</text>
<image src="https://api.ccttiot.com/smartmeter/img/static/uBh15vzRx6gV0wRQj7gi" mode=""></image>
<text>扫一扫</text>
</view>
</view>
</view>
</view>
<view class="list_item" v-if="falgb">
<view class="list">
<view class="pic">
@ -27,10 +31,12 @@
{{listobj.name}}
</view>
<view class="cenb">
<image src="https://api.ccttiot.com/smartmeter/img/static/uHK2aJHvzEm3nbOPwpdr" mode=""></image> {{listobj.address}}
<image src="https://api.ccttiot.com/smartmeter/img/static/uHK2aJHvzEm3nbOPwpdr" mode=""></image>
{{listobj.address}}
</view>
<view class="cenc">
共享时间{{listobj.businessTimeStart}}-{{listobj.businessTimeEnd}} <text class="bu">{{listobj.availableDeviceCount}}台可共享</text>
共享时间{{listobj.businessTimeStart}}-{{listobj.businessTimeEnd}} <text
class="bu">{{listobj.availableDeviceCount}}台可共享</text>
</view>
</view>
</view>
@ -44,14 +50,16 @@
</view>
<view class="anniu">
<view class="" @click="mapFun">
<image style="height: 39rpx;width: 38rpx;" class="picsm" src="https://api.ccttiot.com/smartmeter/img/static/u9Z7DXlWfjJtIrq5OEty" mode=""></image> 到这去
<image style="height: 41rpx;width: 38rpx;" class="picsm"
src="https://api.ccttiot.com/smartmeter/img/static/u9Z7DXlWfjJtIrq5OEty" mode=""></image> 到这去
</view>
<view class="" style="color: #fff;background-color: #8883F0;" @click="scanQRCode">
<image class="picsm" src="https://api.ccttiot.com/smartmeter/img/static/uvrsmSxGunHTI9S51ujn" mode=""></image> 扫一扫
<image class="picsm" src="https://api.ccttiot.com/smartmeter/img/static/uvrsmSxGunHTI9S51ujn"
mode=""></image> 扫一扫
</view>
</view>
</view>
</view>
</template>
@ -62,14 +70,14 @@
latitude: '', //
longitude: '', //
covers: [], //
index:1,
falga:true,
falgb:false,
storeId:'',
listobj:{},
mapname:'',
mapaddress:'',
isMch:'',
index: 1,
falga: true,
falgb: false,
storeId: '',
listobj: {},
mapname: '',
mapaddress: '',
isMch: '',
bgc: {
backgroundColor: " #8883F0",
},
@ -81,7 +89,7 @@
},
onLoad(option) {
this.storeId = option.markerId
if(option.markerId){
if (option.markerId) {
this.falga = false
this.falgb = true
}
@ -111,9 +119,8 @@
},
fail: (error) => {
console.error('获取地图缩放级别失败:', error);
// ...
},
});
})
},
addMarkersWithoutLabels() {
this.listmap.forEach((item) => {
@ -123,7 +130,7 @@
longitude: item.lng,
width: 25,
height: 30,
iconPath: 'https://api.ccttiot.com/smartmeter/img/static/uZXgsJE6hXbRSwbKILB4',
iconPath: 'https://api.ccttiot.com/smartmeter/img/static/uZXgsJE6hXbRSwbKILB4',
};
this.covers.push(shopCover);
});
@ -139,7 +146,7 @@
iconPath: 'https://api.ccttiot.com/smartmeter/img/static/uZXgsJE6hXbRSwbKILB4',
label: {
content: item.name,
anchorX:this.calculateAnchorX(item.name),
anchorX: this.calculateAnchorX(item.name),
fontWeight: 700,
color: '#8883F0',
textShadow: '2px 2px 0px white, -2px -2px 0px white, 2px -2px 0px white, -2px 2px 0px white',
@ -148,23 +155,22 @@
this.covers.push(shopCover);
});
},
calculateAnchorX(name) {
let chineseLength = 0;
let englishLength = 0;
for (let i = 0; i < name.length; i++) {
const charCode = name.charCodeAt(i);
//
if (charCode >= 0x4e00 && charCode <= 0x9fa5) {
chineseLength++;
} else if (/[a-zA-Z]/.test(name[i])) { //
englishLength = englishLength+0.3; // 1
// console.log(englishLength);
}
}
const totalLength = chineseLength + englishLength * 2; //
return -totalLength * 6.5; // anchorX -7
calculateAnchorX(name) {
let chineseLength = 0;
let englishLength = 0;
for (let i = 0; i < name.length; i++) {
const charCode = name.charCodeAt(i);
//
if (charCode >= 0x4e00 && charCode <= 0x9fa5) {
chineseLength++;
} else if (/[a-zA-Z]/.test(name[i])) { //
englishLength = englishLength + 0.3; // 0.3
}
}
const totalLength = chineseLength + englishLength * 2; //
return -totalLength * 6.5; // anchorX -6.5
},
scanQRCode() {
uni.scanCode({
onlyFromCamera: true,
@ -180,8 +186,8 @@
let sceneValue = res.result
let decodedValue = decodeURIComponent(sceneValue);
let id = getQueryParam(decodedValue, 's')
this.$u.get(`/app/device/${id}/withSuitList`).then((res) =>{
if(res.code == 200){
this.$u.get(`/app/device/${id}/withSuitList`).then((res) => {
if (res.code == 200) {
uni.navigateTo({
url: '/page_components/fuwu/index?id=' + id
})
@ -197,155 +203,158 @@
}
});
},
btnchak(id){
btnchak(id) {
uni.navigateTo({
url:'/page_fenbao/sbshouye?storeId=' + id
url: '/page_fenbao/sbshouye?storeId=' + id
})
},
getxq(){
getxq() {
this.$u.get("/app/store/" + this.storeId).then(res => {
if (res.code == 200) {
this.listobj = res.data
this.listobj = res.data
}
})
},
getshanghu(){
getshanghu() {
this.$u.get("/app/user/userInfo").then((res) => {
if (res.code == 200) {
this.isMch = res.data.isMch
}
})
},
mapFun() {
uni.openLocation({
latitude: this.listobj.lat,
// - /
longitude: this.listobj.lng,
// - /
name:this.mapname,
// - /
longitude: this.listobj.lng,
// - /
name: this.mapname,
address: this.mapaddress
});
},
getMyLocation() {
uni.getLocation({
type: 'wgs84',
success: (res) => {
// console.log('', res);
this.jinweidu = res.longitude + ',' + res.latitude
this.latitude = Number(res.latitude.toFixed(5)) - 0.005
this.longitude = Number(res.longitude.toFixed(5)) + 0.005
//
this.$u.get("/app/store/listNearBy?center=" + this.jinweidu + '&radius=' + 1000).then(res => {
if (res.code == 200) {
this.listmap = res.data
// res.rowslatitudelongitude
res.data.forEach(item => {
const shopCover = {
id:parseFloat(item.storeId),
latitude: item.lat,
longitude: item.lng,
width: 25,
height: 30,
iconPath: 'https://api.ccttiot.com/smartmeter/img/static/uZXgsJE6hXbRSwbKILB4' ,
label: {
content: item.name,
anchorX: (() => {
if (item.name.length <= 2) {
return -12
} else if (item.name.length <= 3) {
return -20
} else if (item.name.length <= 4) {
return -25
} else if (item.name.length <= 5) {
return -30
} else if (item.name.length <= 6) {
return -35
} else if (item.name.length <= 8) {
return -40
} else if (item.name.length <=
10) {
return -45
} else {
return -item.name.length * 5
}
})(),
fontWeight: 700,
color: '#8883F0',
textShadow: '2px 2px 0px white, -2px -2px 0px white, 2px -2px 0px white, -2px 2px 0px white',
}
};
this.covers.push(shopCover);
});
}
});
},
fail: (err) => {
console.error('获取位置失败:', err);
}
});
},
handleMarkerClick(e){
uni.getLocation({
type: 'wgs84',
success: (res) => {
this.jinweidu = res.longitude + ',' + res.latitude
this.latitude = Number(res.latitude.toFixed(5)) - 0.005
this.longitude = Number(res.longitude.toFixed(5)) + 0.005
//
this.$u.get("/app/store/listNearBy?center=" + this.jinweidu + '&radius=' + 1000).then(
res => {
if (res.code == 200) {
this.listmap = res.data
// res.rowslatitudelongitude
res.data.forEach(item => {
const shopCover = {
id: parseFloat(item.storeId),
latitude: item.lat,
longitude: item.lng,
width: 25,
height: 30,
iconPath: 'https://api.ccttiot.com/smartmeter/img/static/uZXgsJE6hXbRSwbKILB4',
label: {
content: item.name,
anchorX: (() => {
if (item.name.length <= 2) {
return -12
} else if (item.name.length <= 3) {
return -20
} else if (item.name.length <= 4) {
return -25
} else if (item.name.length <= 5) {
return -30
} else if (item.name.length <= 6) {
return -35
} else if (item.name.length <= 8) {
return -40
} else if (item.name.length <=
10) {
return -45
} else {
return -item.name.length * 5
}
})(),
fontWeight: 700,
color: '#8883F0',
textShadow: '2px 2px 0px white, -2px -2px 0px white, 2px -2px 0px white, -2px 2px 0px white',
}
};
this.covers.push(shopCover);
});
}
});
},
fail: (err) => {
console.error('获取位置失败:', err);
}
});
},
handleMarkerClick(e) {
this.$u.get("/app/store/" + e.markerId).then(res => {
if (res.code == 200) {
this.listobj = res.data
this.mapname = res.data.city
this.mapaddress = res.data.address
this.listobj = res.data
this.mapname = res.data.city
this.mapaddress = res.data.address
}
})
this.falga = false
this.falgb = true
},
btntab(num){
btntab(num) {
this.index = num
},
btndt(num){
if(num == 1){
btndt(num) {
if (num == 1) {
uni.navigateBack()
}
},
btnitem(){
btnitem() {
this.falga = false
this.falgb = true
}
},
mounted() {
this.getMyLocation();
this.getMyLocation();
}
}
</script>
<style lang="scss">
/deep/ .u-title{
/deep/ .u-title {
padding-bottom: 22rpx;
}
/deep/ .u-icon__icon{
/deep/ .u-icon__icon {
padding-bottom: 22rpx;
}
/deep/ .map{
/deep/ .map {
width: 100%;
height: 100%;
}
page {
// background-color: ;
background: linear-gradient(180deg, #D9D8FF 0%, rgba(255, 255, 255, 0) 100%);
border-radius: 0rpx 0rpx 0rpx 0rpx;
}
.page {
width: 750rpx;
position: fixed;
position: fixed;
top: 0;
left: 0;
.list_item{
.list_item {
position: fixed;
bottom: 84rpx;
left: 50%;
@ -353,12 +362,13 @@
width: 706rpx;
height: 420rpx;
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;
margin: auto;
padding: 46rpx 40rpx;
box-sizing: border-box;
.chakan{
.chakan {
display: flex;
justify-content: space-between;
width: 625rpx;
@ -368,40 +378,42 @@
box-sizing: border-box;
background: #D9D8FF;
border-radius: 8rpx 8rpx 8rpx 8rpx;
// opacity: 0.5;
margin-top: 10rpx;
view{
view {
font-size: 28rpx;
color: #8883F0;
}
}
.anniu{
.anniu {
display: flex;
justify-content: space-between;
margin-top: 20rpx;
view{
view {
width: 300rpx;
height: 82rpx;
line-height: 82rpx;
line-height: 80rpx;
border-radius: 45rpx 45rpx 45rpx 45rpx;
border: 2rpx solid #8883F0;
text-align: center;
font-weight: 500;
font-size: 36rpx;
color: #8883F0;;
color: #8883F0;
;
}
}
.list{
.list {
display: flex;
// margin-top: 44rpx;
padding-bottom: 16rpx;
.pic{
.pic {
width: 150rpx;
height: 150rpx;
// background-color: #D9D8FF;
border-radius: 20rpx;
// margin-right: 28rpx;
image{
image {
width: 150rpx;
height: 150rpx;
mode: "aspectFill";
@ -409,55 +421,63 @@
border-radius: 20rpx;
}
}
.cen{
// margin-right: 140rpx;
.cen {
margin-left: 20rpx;
.cena{
.cena {
font-weight: 500;
font-size: 30rpx;
color: #3D3D3D;
line-height: 38rpx;
}
.cenb{
.cenb {
font-weight: 400;
font-size: 24rpx;
color: #3D3D3D;
line-height: 32rpx;
margin-top: 14rpx;
image{
image {
display: inline-block;
width: 22rpx;
height: 22rpx;
margin-right: 6rpx;
}
}
.cenc{
.cenc {
font-weight: 400;
font-size: 24rpx;
color: #3D3D3D;
line-height: 32rpx;
margin-top: 14rpx;
text{
text {
display: inline-block;
padding: 4rpx 18rpx;
box-sizing: border-box;
// border: 1px solid #ccc;
border-radius: 20rpx;
}
.bu{
.bu {
margin-left: 32rpx;
background:#D9D8FF;
background: #D9D8FF;
color: #4D48B5;
}
}
}
.right{
.right {
padding-top: 40rpx;
image{
image {
width: 40rpx;
height: 40rpx;
}
text{
text {
display: block;
font-weight: 400;
font-size: 20rpx;
@ -467,15 +487,17 @@
}
}
}
.picsm{
width: 48rpx;
height: 48rpx;
vertical-align: middle;
display: inline-block;
margin-bottom: 10rpx;
margin-right: 10rpx;
.picsm {
width: 48rpx;
height: 48rpx;
vertical-align: middle;
display: inline-block;
margin-bottom: 10rpx;
margin-right: 10rpx;
}
.dtxs{
.dtxs {
width: 100%;
height: 100vh;
position: fixed;
@ -483,53 +505,61 @@
left: 0;
z-index: -1;
}
.listbox{
.listbox {
background: #FFFFFF;
border-radius: 64rpx 64rpx 0 0;
box-shadow: 0rpx 10rpx 64rpx 0rpx rgba(0,0,0,0.08);
height:186rpx;
border-radius: 64rpx 64rpx 0 0;
box-shadow: 0rpx 10rpx 64rpx 0rpx rgba(0, 0, 0, 0.08);
height: 186rpx;
width: 100%;
overflow-y: scroll;
position: fixed;
position: fixed;
bottom: 0;
left: 0;
.saoyisao{
.saoyisao {
margin-top: 44rpx;
view{
view {
border-radius: 54rpx 54rpx 54rpx 54rpx;
text-align: center;
width: 676rpx;
height: 102rpx;
background: linear-gradient( 90deg, #8883F0 0%, #837EEB 100%);
background: linear-gradient(90deg, #8883F0 0%, #837EEB 100%);
line-height: 102rpx;
margin: auto;
image{
image {
width: 56rpx;
height: 56rpx;
vertical-align: middle;
display: inline-block;
display: inline-block;
margin-bottom: 12rpx;
margin-right: 10rpx;
}
text{
text {
font-weight: 500;
font-size: 40rpx;
color: #FFFFFF;
}
}
}
.moshi{
.moshi {
position: fixed;
bottom:210rpx;
bottom: 210rpx;
left: 30rpx;
z-index: 99;
image{
image {
width: 210rpx;
height: 74rpx;
}
}
.title{
border-radius: 64rpx 64rpx 0 0;
.title {
border-radius: 64rpx 64rpx 0 0;
display: flex;
justify-content: space-between;
font-weight: 500;
@ -548,7 +578,8 @@
}
}
.active{
.active {
border-bottom: 10rpx solid #D9D8FF;
border-radius: 7rpx;
padding-bottom: 10rpx;

View File

@ -20,10 +20,10 @@
</view>
<view class="mid_right">
<view class="mid_top">
{{ deviceInfo.deviceName }}
{{ deviceInfo.deviceName == null ? '' : deviceInfo.deviceName }}
</view>
<view class="mid_bot">
<view class="txt" v-if="deviceInfo">S/N码{{ deviceInfo.deviceNo }}</view>
<view class="txt" v-if="deviceInfo">S/N码{{ deviceInfo.deviceNo == null ? '' : 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>
@ -59,7 +59,7 @@
</view>
<view class="cont" style="text-align: center;">
<view class="tit">
{{timeday}}
{{timeday == null ? 0 : timeday}}
</view>
<view class="txt">
剩余分钟
@ -72,15 +72,15 @@
<view class="tit">实时</view>
<view class="cont_box">
<view class="cont">
<view class="top">{{deviceInfo.realTimePower}}KW</view>
<view class="top">{{deviceInfo.realTimePower == null ? '' : deviceInfo.realTimePower}}KW</view>
<view class="bot">实时功率</view>
</view>
<view class="cont" style="width: 70rpx;">
<view class="top">{{deviceInfo.electricity}}A</view>
<view class="top">{{deviceInfo.electricity == null ? '' : deviceInfo.electricity}}A</view>
<view class="bot">电流</view>
</view>
<view class="cont" style="width: 110rpx;">
<view class="top">{{deviceInfo.voltage}}V</view>
<view class="top">{{deviceInfo.voltage == null ? '' : deviceInfo.voltage}}V</view>
<view class="bot">电压</view>
</view>
@ -166,7 +166,6 @@
return {
bgc: {
backgroundColor: "#8883f0",
},
ec: {
lazyLoad: true
@ -558,9 +557,9 @@
}
}
})
} else if (res.code == 500) {
} else if (res.msg == '设备编号和mac不能同时为空') {
uni.showToast({
title: '该设备已被绑定',
title: '设备不在线,未找到设备',
icon: 'none',
duration: 2000
});

View File

@ -20,11 +20,10 @@
</view>
</view>
<view class="" style="width: 448rpx;height: 448rpx;margin: auto;margin-top: 100rpx;text-align: center;"
v-if="showflag">
<image style="width: 448rpx;height: 448rpx;"
<view class="" v-if="showflag" style="width: 100%;height: 200rpx;margin: auto;margin-top: 170rpx;text-align: center;">
<image style="width: 200rpx;height: 200rpx;"
src="https://api.ccttiot.com/smartmeter/img/static/uZFUpcz0YZZ4f4RjvGg2" mode=""></image>
<view class="" style="font-size: 30rpx;color: #ccc;margin-top: 30rpx;">暂无更多收支记录...</view>
<view class="" style="font-size: 28rpx;color: #808080;margin-top: 30rpx;">暂无更多收支记录...</view>
</view>
</view>

View File

@ -1,220 +1,225 @@
<template>
<view class="container" style="margin-top: 100rpx;">
<view class="device">
<span class="device-list-title">WIFI连接</span>
</view>
<view class="flex-row items-center flex-1 group">
<text class="text_3 ml-3">请选择您的WiFi网络详细信息</text>
</view>
<!-- wifi信息 -->
<view class="wifibd">
<view class="name">
<text>您的WiFi网络名称</text>
<input type="text" v-model="name" placeholder="请输入您的WiFi网络名称" />
<view class="">
<u-navbar title="WIFI连接" :border-bottom="false" :background="bgc" title-color='#fff' back-icon-color="#fff" title-size='36'
height='50'></u-navbar>
<view class="container">
<view class="device">
<span class="device-list-title">WIFI连接</span>
</view>
<view class="flex-row items-center flex-1 group">
<text class="text_3 ml-3">请选择您的WiFi网络详细信息</text>
</view>
<view class="pwd">
<text>密码</text>
<input type="text" v-model="password" placeholder="请输入您的WiFi密码" />
<!-- wifi信息 -->
<view class="wifibd">
<view class="name">
<text>您的WiFi网络名称</text>
<input type="text" v-model="name" placeholder="请输入您的WiFi网络名称" />
</view>
<view class="pwd">
<text>密码</text>
<input type="text" v-model="password" placeholder="请输入您的WiFi密码" />
</view>
</view>
<!-- 点击连接 -->
<view class="button" @click="content_wf">连接</view>
<!-- 加载状态 -->
<view class="containers" v-show="statusflag">
<uni-section>
<uni-load-more :status="status"/>
</uni-section>
</view>
</view>
<!-- 点击连接 -->
<view class="button" @click="content_wf">连接</view>
<!-- 加载状态 -->
<view class="containers" v-show="statusflag">
<uni-section>
<uni-load-more :status="status"/>
</uni-section>
</view>
</view>
</template>
<script>
var xBlufi = require("@/page_components/blufi/xBlufi.js")
// import { getwifi } from '@/api/index.js'
export default {
data() {
return {
name: '',
password: '',
options: '',
falg: 0,
objlist: '',
statusflag: false,
status: 'loading',
}
var xBlufi = require("@/page_components/blufi/xBlufi.js")
// import { getwifi } from '@/api/index.js'
export default {
data() {
return {
name: '',
password: '',
options: '',
falg: 0,
objlist: '',
statusflag: false,
status: 'loading',
bgc: {
backgroundColor: "#8883f0",
},
}
},
onLoad(options) {
this.name = JSON.parse(options.ssid)
this.options = options
this.objlist = JSON.parse(options.objlist)
// console.log("id",JSON.parse(this.options.objlist.deviceId))
console.log("this.objlist.deviceId", this.objlist.deviceId)
xBlufi.listenDeviceMsgEvent(true, this.funListenDeviceMsgEvent);
xBlufi.notifyInitBleEsp32({
deviceId: this.objlist.deviceId
});
},
onReady() { },
onUnload() {
xBlufi.listenDeviceMsgEvent(false, this.funListenDeviceMsgEvent);
wx.closeBLEConnection({
deviceId: this.objlist.deviceId,
})
},
methods: {
content_wf() {
if (!this.name) {
uni.showToast({
title: 'SSID不能为空',
icon: 'none'
});
return;
}
if (!this.password) {
uni.showToast({
title: '密码不能为空',
icon: 'none'
});
return;
}
uni.showLoading({
title: '正在配网',
mask: true
},
onLoad(options) {
this.name = JSON.parse(options.ssid)
this.options = options
this.objlist = JSON.parse(options.objlist)
// console.log("id",JSON.parse(this.options.objlist.deviceId))
console.log("this.objlist.deviceId", this.objlist.deviceId)
xBlufi.listenDeviceMsgEvent(true, this.funListenDeviceMsgEvent);
xBlufi.notifyInitBleEsp32({
deviceId: this.objlist.deviceId
});
},
onReady() {},
onUnload() {
xBlufi.listenDeviceMsgEvent(false, this.funListenDeviceMsgEvent);
wx.closeBLEConnection({
deviceId: this.objlist.deviceId,
})
xBlufi.notifySendCustomData({
},
methods: {
content_wf() {
if (!this.name) {
uni.showToast({
title: 'SSID不能为空',
icon: 'none'
});
return;
}
if (!this.password) {
uni.showToast({
title: '密码不能为空',
icon: 'none'
});
return;
}
uni.showLoading({
title: '正在配网',
mask: true
})
xBlufi.notifySendCustomData({
customData: "ssid@" + this.name
})
xBlufi.notifySendCustomData({
customData: "pass@" + this.password
})
xBlufi.notifySendCustomData({
customData: "pass@" + this.password
})
},
},
funListenDeviceMsgEvent: function (options) {
let that = this;
switch (options.type) {
case xBlufi.XBLUFI_TYPE.TYPE_STATUS_CONNECTED:
{
funListenDeviceMsgEvent: function(options) {
let that = this;
switch (options.type) {
case xBlufi.XBLUFI_TYPE.TYPE_STATUS_CONNECTED: {
console.log('状态', options.result)
uni.showModal({
title: '很抱歉提醒你!',
content: '小程序与设备异常断开',
showCancel: false,
success: function (res) {
success: function(res) {
// uni.navigateBack({
// url: '../search/search'
// });
}
});
this.statusflag = false
uni.hideLoading();
this.statusflag = false
uni.hideLoading();
}
break;
case xBlufi.XBLUFI_TYPE.TYPE_CONNECT_ROUTER_RESULT:
uni.hideLoading();
if (!options.result)
this.statusflag = false,
uni.hideLoading(),
uni.showModal({
title: '温馨提示',
content: '配网失败,请重试',
showCancel: false //
});
else {
if (options.data.progress == 100) {
let ssid = options.data.ssid;
this.statusflag = false
uni.hideLoading();
case xBlufi.XBLUFI_TYPE.TYPE_CONNECT_ROUTER_RESULT:
uni.hideLoading();
if (!options.result)
this.statusflag = false,
uni.hideLoading(),
uni.showModal({
title: '温馨提示',
// content: `${options.data.ssid}`,
content: `连接成功`,
showCancel: false,
success: function (res) {
// let ids = that.$store.state.user.deviceId
uni.switchTab({
url:'/pages/index/index'
})
// getwifi(ids).then(res => {
// console.log(res);
// uni.switchTab({
// url:'/pages/index/index'
// })
// })
}
})
}
}
break;
case xBlufi.XBLUFI_TYPE.TYPE_RECIEVE_MY_DATA:
this.loadPercent = options.data;
this.loadText = '文件读取中'
console.log("文件读取中", options.data);
break;
case xBlufi.XBLUFI_TYPE.TYPE_RECIEVE_CUSTON_DATA:
this.ver_data =this.parseCustomData(options.data)
console.log("1收到设备发来的自定义数据结果", this.ver_data);
break;
case xBlufi.XBLUFI_TYPE.TYPE_INIT_ESP32_RESULT:
uni.hideLoading();
if (options.result) {
console.log('初始化成功');
} else {
console.log('初始化失败');
uni.showModal({
title: '温馨提示',
content: `设备初始化失败`,
showCancel: false,
//
success: function (res) {
// uni.redirectTo({
// url: '../search/search'
// });
content: '配网失败,请重试',
showCancel: false //
});
else {
if (options.data.progress == 100) {
let ssid = options.data.ssid;
this.statusflag = false
uni.hideLoading();
uni.showModal({
title: '温馨提示',
content: `连接成功`,
showCancel: false,
success: function(res) {
// let ids = that.$store.state.user.deviceId
uni.switchTab({
url: '/pages/index/index'
})
// getwifi(ids).then(res => {
// console.log(res);
// uni.switchTab({
// url:'/pages/index/index'
// })
// })
}
})
}
});
}
break;
}
break;
case xBlufi.XBLUFI_TYPE.TYPE_RECIEVE_MY_DATA:
this.loadPercent = options.data;
this.loadText = '文件读取中'
console.log("文件读取中", options.data);
break;
case xBlufi.XBLUFI_TYPE.TYPE_RECIEVE_CUSTON_DATA:
this.ver_data = this.parseCustomData(options.data)
console.log("1收到设备发来的自定义数据结果", this.ver_data);
break;
case xBlufi.XBLUFI_TYPE.TYPE_INIT_ESP32_RESULT:
uni.hideLoading();
if (options.result) {
console.log('初始化成功');
} else {
console.log('初始化失败');
uni.showModal({
title: '温馨提示',
content: `设备初始化失败`,
showCancel: false,
//
success: function(res) {
// uni.redirectTo({
// url: '../search/search'
// });
}
});
}
break;
}
},
//
parseCustomData(data) {
// "@"
const dataArray = data.split('@');
//
const voltage = parseFloat(dataArray[0].substring(1)); // "V"
const switchState = dataArray[1].substring(1); // "S"
const current = parseFloat(dataArray[2].substring(1)); // "A"
const power = parseFloat(dataArray[4].substring(1)); // "P"
const remainingPower = parseFloat(dataArray[5].substring(1)); // "M"
const setMode = dataArray[6].substring(3); // "SET"
//
return {
voltage,
switchState,
current,
power,
remainingPower,
setMode
};
}
},
//
parseCustomData(data) {
// "@"
const dataArray = data.split('@');
//
const voltage = parseFloat(dataArray[0].substring(1)); // "V"
const switchState = dataArray[1].substring(1); // "S"
const current = parseFloat(dataArray[2].substring(1)); // "A"
const power = parseFloat(dataArray[4].substring(1)); // "P"
const remainingPower = parseFloat(dataArray[5].substring(1)); // "M"
const setMode = dataArray[6].substring(3); // "SET"
//
return {
voltage,
switchState,
current,
power,
remainingPower,
setMode
};
}
}
}
</script>
<style lang="less">
.containers {
width: 100%;
height: 100vh;
@ -223,73 +228,73 @@ export default {
left: 0;
z-index: 999 !important;
}
.pwd,
.name {
text {
color: rgba(189, 188, 188, 1);
font-size: 12px;
margin-top: 30rpx;
display: block;
line-height: 30rpx;
.pwd,
.name {
text {
color: #3D3D3D;
font-size: 32rpx;
margin-top: 30rpx;
display: block;
line-height: 30rpx;
}
input {
margin-top: 10rpx;
color: rgba(80, 86, 90, 1);
font-size: 14px;
border-bottom: 1px solid #ccc;
height: 60rpx;
line-height: 60rpx;
}
input::placeholder {
font-size: 14px;
}
}
input {
.wifibd {
margin-top: 182rpx;
}
.device-list-title {
color: #50565a;
font-size: 96rpx;
font-family: SourceHanSansCN;
// margin-top: 100rpx;
}
.text_3 {
margin-top: 10rpx;
color: rgba(80, 86, 90, 1);
font-size: 14px;
border-bottom: 1px solid #ccc;
height: 60rpx;
line-height: 60rpx;
color: rgba(119, 128, 141, 1);
font-size: 28rpx;
}
input::placeholder {
font-size: 14px;
.container {
/* padding-top: 30rpx !important; */
padding: 40rpx 30rpx 0 30rpx !important;
box-sizing: border-box;
align-items: center;
}
}
.wifibd {
margin-top: 182rpx;
}
.device-list-title {
color: #999;
font-size: 96rpx;
font-family: SourceHanSansCN;
margin-top: 100rpx;
}
.text_3 {
margin-top: 10rpx;
color: rgba(119, 128, 141, 1);
font-size: 28rpx;
}
.container {
/* padding-top: 30rpx !important; */
padding: 40rpx 30rpx 0 30rpx !important;
box-sizing: border-box;
align-items: center;
}
.button {
position: fixed;
display: flex;
align-items: center;
justify-content: center;
left: 50%;
transform: translateX(-50%);
bottom: 50rpx;
height: 96rpx;
//margin-top: -100rpx;
padding: 10rpx 0;
box-sizing: border-box;
background-color: #8883F0 !important;
border-radius: 52rpx 52rpx 52rpx 52rpx;
font-weight: 700;
font-size: 20px;
width: 622rpx;
color: #FFFFFF;
}
.button {
position: fixed;
display: flex;
align-items: center;
justify-content: center;
left: 50%;
transform: translateX(-50%);
bottom: 50rpx;
height: 96rpx;
//margin-top: -100rpx;
padding: 10rpx 0;
box-sizing: border-box;
background-color: #8883F0 !important;
border-radius: 52rpx 52rpx 52rpx 52rpx;
font-weight: 700;
font-size: 20px;
width: 622rpx;
color: #FFFFFF;
}
</style>

View File

@ -20,15 +20,15 @@
</view>
</view>
</view>
<view class="fd" >
<view class="fd">
<view class="fd_top">
<view class="fd_da">
<view class="fd_lt" :style="{ transform: `translateX(${-curtitidx * 100}rpx)`}">
<view class="fd_da" @touchstart="touchStart" @touchmove="touchMove" @touchend="touchEnd">
<view class="fd_lt" :style="{ transform: `translateX(${-curtitidx * 100 }rpx)`}">
<view class="fd_tit" v-for="(item,index) in groupLists" :key="index"
:class="index==curtitidx?'act1':''" @click="changeidx(index)">
{{item.name}}
</view>
</view>
</view>
</view>
<view class="right">
<!-- <view class="fd_set" @click="show = true">
@ -54,7 +54,7 @@
</view>
</view>
<view class="card_cont">
<view class="cards" v-for="(item,index) in groupLists" :key="index" >
<view class="cards" v-for="(item,index) in groupLists" :key="index">
<!-- //@click="changeGp(item)" -->
<view class="txt">
{{item.name}}
@ -69,16 +69,21 @@
</view>
</view>
<swiper class="swiper" style="height: 100%;margin-top: 20rpx;" :current='curtitidx' @change="swiperchange" @scrolltolower="onReachBottom">
<swiper class="swiper" style="height: 100%;margin-top: 20rpx;" :current='curtitidx' @change="swiperchange"
@scrolltolower="onReachBottom">
<swiper-item v-for="(item,index) in groupLists" :key="index">
<view style="width: 100%;padding-top: 300rpx;text-align: center;font-size: 32rpx;font-weight: 400;color: #808080;" class="" v-if="shujuflag">
<image style="width: 432rpx;height: 432rpx;display: block;padding-left: 100rpx;margin-bottom: 30rpx;" src="https://api.ccttiot.com/smartmeter/img/static/unju6N2PoHUv2pyLegfV" mode=""></image>
该店铺暂无设备...
<view class="" v-if="shujuflag"
style="width: 100%;height: 200rpx;margin: auto;margin-top: 230rpx;text-align: center;">
<image style="width: 200rpx;height: 200rpx;"
src="https://api.ccttiot.com/smartmeter/img/static/uZFUpcz0YZZ4f4RjvGg2" mode=""></image>
<view class="" style="font-size: 28rpx;color: #808080;margin-top: 30rpx;">该店铺暂无设备...</view>
</view>
<view class="swiper-item " >
<view class="card_box" @click="todetail(item.deviceId)"
v-for="(item,index) in wateringList" :key="index">
<view class="card" >
<view class="swiper-item ">
<view class="card_box" @click="todetail(item.deviceId)" v-for="(item,index) in wateringList"
:key="index">
<view class="card">
<view class="card_left">
<view class="card_left_tit">
{{item.deviceName}}
@ -101,7 +106,8 @@
</view>
</view>
<view class="card_right">
<image v-if="item.customPicture" :src="item.customPicture" mode="" style="border-radius: 20rpx;"></image>
<image v-if="item.customPicture" :src="item.customPicture" mode=""
style="border-radius: 20rpx;"></image>
<image v-else :src="item.picture" mode=""></image>
</view>
</view>
@ -141,7 +147,7 @@
export default {
data() {
return {
bgc: {
bgc: {
backgroundColor: "#8883f0",
},
ec: {
@ -189,8 +195,7 @@
isLoading: false,
noMoreData: false,
total: 0,
shujuflag:false,
shujuflag: false,
}
},
onLoad() {
@ -244,12 +249,6 @@
},
methods: {
tocz() {
this.showtip = false
uni.navigateTo({
@ -362,7 +361,7 @@
uni.hideLoading()
} else {
//
this.shujuflag = true
this.shujuflag = true
uni.hideLoading()
}
this.isLoading = false;
@ -383,7 +382,7 @@
uni.hideLoading()
} else {
//
this.shujuflag = true
this.shujuflag = true
uni.hideLoading()
}
this.isLoading = false;
@ -484,8 +483,8 @@
// scanType: ['qrCode'],
// success: res => {
// console.log('', res);
// this.qrResult = res.result;
// // this.$u.get(`/app/device/${this.qrResult}/withSuitList`).then((res) =>{
// // if(res.code == 200){
@ -717,8 +716,8 @@
},
swiperchange(e) {
uni.showLoading({
title: '加载中...'
uni.showLoading({
title: '加载中...'
});
this.wateringList = []
this.pagenum = 1
@ -773,12 +772,14 @@
</script>
<style lang="scss">
/deep/ .u-title{
/deep/ .u-title {
padding-bottom: 22rpx;
}
/deep/ .u-icon__icon{
/deep/ .u-icon__icon {
padding-bottom: 22rpx;
}
page {
background-color: #F7FAFE;
height: 100%;
@ -1250,10 +1251,7 @@
flex-wrap: nowrap;
// justify-content: space-between;
align-items: center;
// position: fixed;
// top: 220rpx;
// left: 50%;
// transform: translateX(-50%);
.fd_da {
width: 600rpx;
// overflow-x: scroll;
@ -1263,23 +1261,22 @@
-ms-overflow-style: none;
/* 去除IE和Edge的默认滚动条 */
scrollbar-width: none;
/* 去除Firefox的默认滚动条 */
&::-webkit-scrollbar {
display: none;
}
.fd_lt {
width: 100vh;
// width: 100vh;
display: flex;
transition: transform 0.3s ease;
transition: transform 0.3s ease;
.fd_tit {
// width: 40%;
text-align: center;
// width: 100%;
padding: 0 10rpx;
padding: 0 15rpx;
box-sizing: border-box;
// margin-right: 20rpx;
font-size: 36rpx;
font-size: 34rpx;
font-weight: 400;
color: #666;
@ -1288,6 +1285,7 @@
}
.act1 {
font-size: 36rpx !important;
font-weight: 700 !important;
color: #000000 !important;
}
@ -1316,7 +1314,8 @@
}
}
.shebei{
.shebei {
width: 750rpx;
height: 100vh;
position: fixed;
@ -1329,11 +1328,13 @@
}
.swiper {
// height: 100vh;
.swiper-item {
height: 100vh;
overflow-y: auto;
padding-bottom: 660rpx;
.card_box {
margin-top: 34rpx;
display: flex;
@ -1444,4 +1445,4 @@
box-sizing: border-box;
}
}
</style>
</style>

View File

@ -8,15 +8,12 @@
<view class="fdpage" style="padding-bottom: 200rpx;">
<view class="top_box">
<view class="userinfo">
<!-- <view class="img">
<image src="https://api.ccttiot.com/smartmeter/img/static/uGvS4RQvbw7OOfhzy6xf" mode=""></image>
</view> -->
<view class="info">
<view class="username">
{{userinfo.nickName}}
{{userinfo.nickName == null ? '' : userinfo.nickName}}
</view>
<view class="num">
{{userinfo.storeCount}}间店铺
{{userinfo.storeCount == null ? '' : userinfo.storeCount}}间店铺
</view>
</view>
</view>
@ -29,7 +26,7 @@
<view class="txt" style="font-size: 24rpx;">
</view>
{{userinfo.balance}}
{{userinfo.balance == null ? '' : userinfo.balance}}
</view>
<view class="bot">
钱包余额

View File

@ -305,7 +305,7 @@
const timer = setTimeout(() => {
clearTimeout(timer);
}, 500);
},
}
})
},
@ -481,21 +481,16 @@
.dateactive {
background: #E1F3ED;
}
page {
// background-color: ;
background: linear-gradient(180deg, #8883F0 10%, rgba(255, 255, 255, 0) 100%);
border-radius: 0rpx 0rpx 0rpx 0rpx;
}
.page {
width: 750rpx;
padding-left: 34rpx;
padding-right: 34rpx;
box-sizing: border-box;
height: 100%;
//
.tip_box {
position: fixed;
left: 72rpx;
@ -802,8 +797,6 @@
justify-content: space-between;
padding: 30rpx 50rpx;
box-sizing: border-box;
// padding-top: 20rpx;
// padding-bottom: 24rpx;
.gr {
text-align: center;