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

View File

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

View File

@ -1,6 +1,6 @@
<template> <template>
<view class="pages"> <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> height='50'></u-navbar>
<view class="title"> <view class="title">
<text>设备列表</text> <text>设备列表</text>
@ -76,7 +76,10 @@
gps: {}, gps: {},
mac: '', mac: '',
status: false, status: false,
storeId:'' storeId:'',
bgc: {
backgroundColor: "#8883f0",
},
} }
}, },
onLoad(option) { onLoad(option) {
@ -140,24 +143,16 @@
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
console.log(devicesarr,100100); // console.log(devicesarr,100100);
devicesarr.forEach(device => { devicesarr.forEach(device => {
const mac = device.name.substring(6); const mac = device.name.substring(6);
if (device.name.substring(0, 4) == "CTKG") { 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); this.devicesList.push(device);
console.log(this.devicesList); console.log(this.devicesList);
let uniqueDevicesList = Array.from(new Set(this.devicesList)); let uniqueDevicesList = Array.from(new Set(this.devicesList));
// this.devicesList // this.devicesList
this.devicesList = uniqueDevicesList; this.devicesList = uniqueDevicesList;
// }
// })
} }
}); });
} }
break; break;
@ -314,28 +309,6 @@
console.error('获取位置信息失败:', error); console.error('获取位置信息失败:', error);
that.gps.lat = 0; that.gps.lat = 0;
that.gps.lon = 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 { .title {
margin-bottom: 84rpx; margin-bottom: 84rpx;
margin-top: 50rpx;
image { image {
display: inline-block; display: inline-block;
width: 48rpx; width: 48rpx;

View File

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

View File

@ -21,11 +21,10 @@
<text class="shen">上报时间</text> <text class="qian">{{item.createTime}}</text> <text class="shen">上报时间</text> <text class="qian">{{item.createTime}}</text>
</view> </view>
</view> </view>
<view class="" style="width: 448rpx;height: 448rpx;margin: auto;margin-top: 100rpx;text-align: center;" <view class="" v-if="showflag" style="width: 100%;height: 200rpx;margin: auto;margin-top: 170rpx;text-align: center;">
v-if="showflag"> <image style="width: 200rpx;height: 200rpx;"
<image style="width: 448rpx;height: 448rpx;"
src="https://api.ccttiot.com/smartmeter/img/static/uZFUpcz0YZZ4f4RjvGg2" mode=""></image> 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>
</view> </view>

View File

@ -37,10 +37,10 @@
</view> </view>
</view> </view>
<view class="" v-if="showflag" style="width: 448rpx;height: 448rpx;margin: auto;margin-top: 170rpx;text-align: center;"> <view class="" v-if="showflag" style="width: 100%;height: 200rpx;margin: auto;margin-top: 170rpx;text-align: center;">
<image style="width: 448rpx;height: 448rpx;" <image style="width: 200rpx;height: 200rpx;"
src="https://api.ccttiot.com/smartmeter/img/static/uZFUpcz0YZZ4f4RjvGg2" mode=""></image> 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> </view>

View File

@ -79,7 +79,7 @@
<!-- 选择省市区 --> <!-- 选择省市区 -->
<u-picker v-model="regionshow" mode="region" @confirm="btnregions"></u-picker> <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> </view>

View File

@ -45,11 +45,10 @@
</view> </view>
</view> </view>
<view class="" style="width: 448rpx;height: 448rpx;margin: auto;margin-top: 100rpx;text-align: center;" <view class="" v-if="showflag" style="width: 100%;height: 200rpx;margin: auto;margin-top: 170rpx;text-align: center;">
v-if="showflag"> <image style="width: 200rpx;height: 200rpx;"
<image style="width: 448rpx;height: 448rpx;"
src="https://api.ccttiot.com/smartmeter/img/static/uZFUpcz0YZZ4f4RjvGg2" mode=""></image> 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>

View File

@ -37,11 +37,10 @@
</view> </view>
</view> </view>
</view> </view>
<view class="" style="width: 448rpx;height: 448rpx;margin: auto;margin-top: 100rpx;text-align: center;" <view class="" v-if="showflag" style="width: 100%;height: 200rpx;margin: auto;margin-top: 170rpx;text-align: center;">
v-if="showflag"> <image style="width: 200rpx;height: 200rpx;"
<image style="width: 448rpx;height: 448rpx;"
src="https://api.ccttiot.com/smartmeter/img/static/uZFUpcz0YZZ4f4RjvGg2" mode=""></image> 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>
</view> </view>

View File

@ -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 20rpx;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>
-- --
@ -79,7 +79,7 @@
<!-- 选择省市区 --> <!-- 选择省市区 -->
<u-picker v-model="regionshow" mode="region" @confirm="btnregions"></u-picker> <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> </view>

View File

@ -3,7 +3,6 @@
<u-navbar title="附近共享" :border-bottom="false" :background="bgc" title-color='#fff' back-icon-color="#fff" <u-navbar title="附近共享" :border-bottom="false" :background="bgc" title-color='#fff' back-icon-color="#fff"
title-size='44' height='50'></u-navbar> title-size='44' height='50'></u-navbar>
<view class="dtxs"> <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" <map class='map' id="map" :latitude="latitude" :longitude="longitude" @markertap="handleMarkerClick"
:show-location="true" :markers="covers" :scale="mapScale" /> :show-location="true" :markers="covers" :scale="mapScale" />
</view> </view>
@ -368,6 +367,7 @@
left: 30rpx; left: 30rpx;
z-index: 99; z-index: 99;
width: 100%; width: 100%;
image { image {
width: 210rpx; width: 210rpx;
height: 74rpx !important; height: 74rpx !important;

View File

@ -153,10 +153,10 @@
.list { .list {
width: 680rpx; width: 680rpx;
height: 654rpx; height: 640rpx;
background: #FFFFFF; background: #FFFFFF;
margin-top: 46rpx; margin-top: 46rpx;
border-radius: 20rpx; border-radius: 15rpx;
padding: 10rpx 32rpx; padding: 10rpx 32rpx;
box-sizing: border-box; box-sizing: border-box;
overflow: hidden; overflow: hidden;
@ -187,7 +187,7 @@
vertical-align: middle; vertical-align: middle;
margin-right: 10rpx; margin-right: 10rpx;
} }
margin-top: 20rpx;
width: 100%; width: 100%;
text-align: center; text-align: center;
font-weight: 500; 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' <u-navbar title="套餐列表" :border-bottom="false" :background="bgc" title-color='#fff' back-icon-color="#fff" title-size='36'
height='50'></u-navbar> height='50'></u-navbar>
<view class="box"> <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="boxlist" @click="btnedit(item)">
<view class="toptime"> <view class="toptime">
<text>{{item.name}}{{item.value}}分钟</text> <text>{{item.price}}</text> <text>{{item.name}}{{item.value}}分钟</text> <text>{{item.price}}</text>
@ -38,7 +38,10 @@
backgroundColor: '#dd524d' backgroundColor: '#dd524d'
} }
}], }],
deviceId:'' deviceId:'',
bgc: {
backgroundColor: "#8883f0",
},
}; };
}, },
onLoad(option) { onLoad(option) {
@ -65,7 +68,6 @@
}, },
click(item) { click(item) {
console.log(item);
this.$u.delete(`/app/suit/${item.suitId}`).then((res) => { this.$u.delete(`/app/suit/${item.suitId}`).then((res) => {
if (res.code == 200) { if (res.code == 200) {
this.$u.toast(`删除成功`); this.$u.toast(`删除成功`);
@ -75,7 +77,7 @@
}, },
open(index) { open(index) {
// this.list[index].show = true; this.list[index].show = true
this.list.map((val, idx) => { this.list.map((val, idx) => {
if (index != idx) this.list[idx].show = false; if (index != idx) this.list[idx].show = false;
}) })
@ -97,15 +99,12 @@
padding-bottom: 22rpx; padding-bottom: 22rpx;
} }
page { page {
background: linear-gradient(180deg, #8883F0 0%, rgba(255, 255, 255, 0) 100%); background: #F4F5F7;
} }
.page { .page {
width: 750rpx; width: 750rpx;
position: fixed; padding-bottom: 400rpx;
top: 0;
left: 0;
.box { .box {
width: 750rpx; width: 750rpx;
height: 1440rpx; height: 1440rpx;

View File

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

View File

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

View File

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

View File

@ -20,11 +20,10 @@
</view> </view>
</view> </view>
<view class="" style="width: 448rpx;height: 448rpx;margin: auto;margin-top: 100rpx;text-align: center;" <view class="" v-if="showflag" style="width: 100%;height: 200rpx;margin: auto;margin-top: 170rpx;text-align: center;">
v-if="showflag"> <image style="width: 200rpx;height: 200rpx;"
<image style="width: 448rpx;height: 448rpx;"
src="https://api.ccttiot.com/smartmeter/img/static/uZFUpcz0YZZ4f4RjvGg2" mode=""></image> 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>

View File

@ -1,5 +1,8 @@
<template> <template>
<view class="container" style="margin-top: 100rpx;"> <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"> <view class="device">
<span class="device-list-title">WIFI连接</span> <span class="device-list-title">WIFI连接</span>
</view> </view>
@ -29,12 +32,14 @@
</uni-section> </uni-section>
</view> </view>
</view> </view>
</view>
</template> </template>
<script> <script>
var xBlufi = require("@/page_components/blufi/xBlufi.js") var xBlufi = require("@/page_components/blufi/xBlufi.js")
// import { getwifi } from '@/api/index.js' // import { getwifi } from '@/api/index.js'
export default { export default {
data() { data() {
return { return {
name: '', name: '',
@ -44,6 +49,9 @@ export default {
objlist: '', objlist: '',
statusflag: false, statusflag: false,
status: 'loading', status: 'loading',
bgc: {
backgroundColor: "#8883f0",
},
} }
}, },
@ -59,7 +67,7 @@ export default {
}); });
}, },
onReady() { }, onReady() {},
onUnload() { onUnload() {
xBlufi.listenDeviceMsgEvent(false, this.funListenDeviceMsgEvent); xBlufi.listenDeviceMsgEvent(false, this.funListenDeviceMsgEvent);
wx.closeBLEConnection({ wx.closeBLEConnection({
@ -97,17 +105,16 @@ export default {
}, },
funListenDeviceMsgEvent: function (options) { funListenDeviceMsgEvent: function(options) {
let that = this; let that = this;
switch (options.type) { switch (options.type) {
case xBlufi.XBLUFI_TYPE.TYPE_STATUS_CONNECTED: case xBlufi.XBLUFI_TYPE.TYPE_STATUS_CONNECTED: {
{
console.log('状态', options.result) console.log('状态', options.result)
uni.showModal({ uni.showModal({
title: '很抱歉提醒你!', title: '很抱歉提醒你!',
content: '小程序与设备异常断开', content: '小程序与设备异常断开',
showCancel: false, showCancel: false,
success: function (res) { success: function(res) {
// uni.navigateBack({ // uni.navigateBack({
// url: '../search/search' // url: '../search/search'
// }); // });
@ -135,13 +142,12 @@ export default {
uni.hideLoading(); uni.hideLoading();
uni.showModal({ uni.showModal({
title: '温馨提示', title: '温馨提示',
// content: `${options.data.ssid}`,
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
uni.switchTab({ uni.switchTab({
url:'/pages/index/index' url: '/pages/index/index'
}) })
// getwifi(ids).then(res => { // getwifi(ids).then(res => {
// console.log(res); // console.log(res);
@ -161,7 +167,7 @@ export default {
break; break;
case xBlufi.XBLUFI_TYPE.TYPE_RECIEVE_CUSTON_DATA: case xBlufi.XBLUFI_TYPE.TYPE_RECIEVE_CUSTON_DATA:
this.ver_data =this.parseCustomData(options.data) this.ver_data = this.parseCustomData(options.data)
console.log("1收到设备发来的自定义数据结果", this.ver_data); console.log("1收到设备发来的自定义数据结果", this.ver_data);
break; break;
@ -176,7 +182,7 @@ export default {
content: `设备初始化失败`, content: `设备初始化失败`,
showCancel: false, showCancel: false,
// //
success: function (res) { success: function(res) {
// uni.redirectTo({ // uni.redirectTo({
// url: '../search/search' // url: '../search/search'
// }); // });
@ -210,11 +216,10 @@ export default {
}; };
} }
} }
} }
</script> </script>
<style lang="less"> <style lang="less">
.containers { .containers {
width: 100%; width: 100%;
height: 100vh; height: 100vh;
@ -225,11 +230,11 @@ export default {
} }
.pwd, .pwd,
.name { .name {
text { text {
color: rgba(189, 188, 188, 1); color: #3D3D3D;
font-size: 12px; font-size: 32rpx;
margin-top: 30rpx; margin-top: 30rpx;
display: block; display: block;
line-height: 30rpx; line-height: 30rpx;
@ -247,33 +252,33 @@ export default {
input::placeholder { input::placeholder {
font-size: 14px; font-size: 14px;
} }
} }
.wifibd { .wifibd {
margin-top: 182rpx; margin-top: 182rpx;
} }
.device-list-title { .device-list-title {
color: #999; color: #50565a;
font-size: 96rpx; font-size: 96rpx;
font-family: SourceHanSansCN; font-family: SourceHanSansCN;
margin-top: 100rpx; // margin-top: 100rpx;
} }
.text_3 { .text_3 {
margin-top: 10rpx; margin-top: 10rpx;
color: rgba(119, 128, 141, 1); color: rgba(119, 128, 141, 1);
font-size: 28rpx; font-size: 28rpx;
} }
.container { .container {
/* padding-top: 30rpx !important; */ /* padding-top: 30rpx !important; */
padding: 40rpx 30rpx 0 30rpx !important; padding: 40rpx 30rpx 0 30rpx !important;
box-sizing: border-box; box-sizing: border-box;
align-items: center; align-items: center;
} }
.button { .button {
position: fixed; position: fixed;
display: flex; display: flex;
align-items: center; align-items: center;
@ -291,5 +296,5 @@ export default {
font-size: 20px; font-size: 20px;
width: 622rpx; width: 622rpx;
color: #FFFFFF; color: #FFFFFF;
} }
</style> </style>

View File

@ -20,10 +20,10 @@
</view> </view>
</view> </view>
</view> </view>
<view class="fd" > <view class="fd">
<view class="fd_top"> <view class="fd_top">
<view class="fd_da"> <view class="fd_da" @touchstart="touchStart" @touchmove="touchMove" @touchend="touchEnd">
<view class="fd_lt" :style="{ transform: `translateX(${-curtitidx * 100}rpx)`}"> <view class="fd_lt" :style="{ transform: `translateX(${-curtitidx * 100 }rpx)`}">
<view class="fd_tit" v-for="(item,index) in groupLists" :key="index" <view class="fd_tit" v-for="(item,index) in groupLists" :key="index"
:class="index==curtitidx?'act1':''" @click="changeidx(index)"> :class="index==curtitidx?'act1':''" @click="changeidx(index)">
{{item.name}} {{item.name}}
@ -54,7 +54,7 @@
</view> </view>
</view> </view>
<view class="card_cont"> <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)" --> <!-- //@click="changeGp(item)" -->
<view class="txt"> <view class="txt">
{{item.name}} {{item.name}}
@ -69,16 +69,21 @@
</view> </view>
</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"> <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>
<view class="swiper-item " >
<view class="card_box" @click="todetail(item.deviceId)" <view class="swiper-item ">
v-for="(item,index) in wateringList" :key="index"> <view class="card_box" @click="todetail(item.deviceId)" v-for="(item,index) in wateringList"
<view class="card" > :key="index">
<view class="card">
<view class="card_left"> <view class="card_left">
<view class="card_left_tit"> <view class="card_left_tit">
{{item.deviceName}} {{item.deviceName}}
@ -101,7 +106,8 @@
</view> </view>
</view> </view>
<view class="card_right"> <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> <image v-else :src="item.picture" mode=""></image>
</view> </view>
</view> </view>
@ -189,8 +195,7 @@
isLoading: false, isLoading: false,
noMoreData: false, noMoreData: false,
total: 0, total: 0,
shujuflag:false, shujuflag: false,
} }
}, },
onLoad() { onLoad() {
@ -244,12 +249,6 @@
}, },
methods: { methods: {
tocz() { tocz() {
this.showtip = false this.showtip = false
uni.navigateTo({ uni.navigateTo({
@ -773,12 +772,14 @@
</script> </script>
<style lang="scss"> <style lang="scss">
/deep/ .u-title{ /deep/ .u-title {
padding-bottom: 22rpx; padding-bottom: 22rpx;
} }
/deep/ .u-icon__icon{
/deep/ .u-icon__icon {
padding-bottom: 22rpx; padding-bottom: 22rpx;
} }
page { page {
background-color: #F7FAFE; background-color: #F7FAFE;
height: 100%; height: 100%;
@ -1250,10 +1251,7 @@
flex-wrap: nowrap; flex-wrap: nowrap;
// justify-content: space-between; // justify-content: space-between;
align-items: center; align-items: center;
// position: fixed;
// top: 220rpx;
// left: 50%;
// transform: translateX(-50%);
.fd_da { .fd_da {
width: 600rpx; width: 600rpx;
// overflow-x: scroll; // overflow-x: scroll;
@ -1263,23 +1261,22 @@
-ms-overflow-style: none; -ms-overflow-style: none;
/* 去除IE和Edge的默认滚动条 */ /* 去除IE和Edge的默认滚动条 */
scrollbar-width: none; scrollbar-width: none;
/* 去除Firefox的默认滚动条 */ /* 去除Firefox的默认滚动条 */
&::-webkit-scrollbar { &::-webkit-scrollbar {
display: none; display: none;
} }
.fd_lt { .fd_lt {
width: 100vh; // width: 100vh;
display: flex; display: flex;
transition: transform 0.3s ease; transition: transform 0.3s ease;
.fd_tit { .fd_tit {
// width: 40%;
text-align: center; text-align: center;
// width: 100%; padding: 0 15rpx;
padding: 0 10rpx;
box-sizing: border-box; box-sizing: border-box;
// margin-right: 20rpx; font-size: 34rpx;
font-size: 36rpx;
font-weight: 400; font-weight: 400;
color: #666; color: #666;
@ -1288,6 +1285,7 @@
} }
.act1 { .act1 {
font-size: 36rpx !important;
font-weight: 700 !important; font-weight: 700 !important;
color: #000000 !important; color: #000000 !important;
} }
@ -1316,7 +1314,8 @@
} }
} }
.shebei{
.shebei {
width: 750rpx; width: 750rpx;
height: 100vh; height: 100vh;
position: fixed; position: fixed;
@ -1329,11 +1328,13 @@
} }
.swiper { .swiper {
// height: 100vh; // height: 100vh;
.swiper-item { .swiper-item {
height: 100vh; height: 100vh;
overflow-y: auto; overflow-y: auto;
padding-bottom: 660rpx; padding-bottom: 660rpx;
.card_box { .card_box {
margin-top: 34rpx; margin-top: 34rpx;
display: flex; display: flex;

View File

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

View File

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