This commit is contained in:
3321822538@qq.com 2024-06-12 18:02:28 +08:00
parent 6de033d8e1
commit 763b37c5a4
6 changed files with 24 additions and 16 deletions

View File

@ -17,7 +17,7 @@
智能开关 智能开关
</view> </view>
<view class="mac"> <view class="mac">
MAC{{item.localName.substring(6)}} MAC{{item.localName.substring(5)}}
</view> </view>
</view> </view>
<view class="rt"> <view class="rt">

View File

@ -145,6 +145,9 @@
} }
}, },
onLoad() { onLoad() {
},
onShow() {
this.getQiniuToken() this.getQiniuToken()
}, },
methods: { methods: {

View File

@ -15,8 +15,14 @@
</view> </view>
</view> </view>
<view class="mid"> <view class="mid">
<view class="mid_left" @click="btnpic"> <view class="mid_left">
<image :src="imglist" mode=""></image> <button
style="border: 0;outline: none;width: 143rpx;padding-left: 0rpx;height: 143rpx;border-radius: 16rpx;"
type="primary reverse" open-type="chooseAvatar" @chooseavatar="btnpic">
<image :src="imglist" mode=""
style="width: 142rpx;height: 142rpx;border-radius: 20rpx;"></image>
</button>
<!-- <image :src="imglist" mode=""></image> -->
</view> </view>
<view class="mid_right"> <view class="mid_right">
<view class="mid_top"> <view class="mid_top">
@ -447,13 +453,14 @@
url: '/page_user/cbRecord?id=' + this.id url: '/page_user/cbRecord?id=' + this.id
}) })
} else if (num == 1) { } else if (num == 1) {
let that = this
uni.showModal({ uni.showModal({
title: '提示', title: '提示',
content: '您确定要将电表时间归零吗?', content: '您确定要将电表时间归零吗?',
success: function(res) { success: function(res) {
if (res.confirm) { if (res.confirm) {
// //
this.$u.put(`/app/device/${this.id}/reset`).then((res) => { that.$u.put(`/app/device/${that.id}/reset`).then((res) => {
if (res.code == 200) { if (res.code == 200) {
console.log(res.data); console.log(res.data);
uni.showToast({ uni.showToast({
@ -461,7 +468,7 @@
icon: 'none', icon: 'none',
duration: 2000 duration: 2000
}) })
this.getDevice(this.id) that.getDevice(that.id)
} else if (res.msg == '设备剩余时间不足,无需归零') { } else if (res.msg == '设备剩余时间不足,无需归零') {
uni.showToast({ uni.showToast({
title: '设备剩余时间不足,无需归零', title: '设备剩余时间不足,无需归零',
@ -998,12 +1005,12 @@
margin-left: 19rpx; margin-left: 19rpx;
// width: 38rpx; // width: 38rpx;
// height: 23rpx; // height: 23rpx;
padding: 5rpx 10rpx; padding: 0 10rpx;
box-sizing: border-box; box-sizing: border-box;
background: rgba(204, 204, 204, 0); background: rgba(204, 204, 204, 0);
opacity: 1; opacity: 1;
border: 2rpx solid #8883F0; border: 2rpx solid #8883F0;
border-radius: 40rpx; border-radius: 15rpx;
font-size: 26rpx; font-size: 26rpx;
font-family: HarmonyOS Sans SC, HarmonyOS Sans SC; font-family: HarmonyOS Sans SC, HarmonyOS Sans SC;
font-weight: 400; font-weight: 400;

View File

@ -115,9 +115,9 @@
content: '小程序与设备异常断开', content: '小程序与设备异常断开',
showCancel: false, showCancel: false,
success: function(res) { success: function(res) {
// uni.navigateBack({ uni.navigateTo({
// url: '../search/search' url:'/pages/index/index'
// }); })
} }
}); });
this.statusflag = false this.statusflag = false

View File

@ -23,7 +23,7 @@
<view class="fd"> <view class="fd">
<view class="fd_top"> <view class="fd_top">
<view class="fd_da"> <view class="fd_da">
<view class="fd_lt" :style="{ transform: `translateX(${-curtitidx * 100}rpx)`}"> <view class="fd_lt" :style="{ transform: `translateX(${-curtitidx * 100 > -300 ? 0 : -curtitidx * 120}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.length > 5 ? item.name.slice(0, 5) + '...' : item.name}} {{item.name.length > 5 ? item.name.slice(0, 5) + '...' : item.name}}

View File

@ -65,8 +65,6 @@
</view> </view>
</view> </view>
</view> </view>
</view> </view>
</view> </view>
</template> </template>