有待修改

This commit is contained in:
3321822538@qq.com 2024-05-25 18:05:40 +08:00
parent 2ad7e0ea61
commit f514616b96
4 changed files with 111 additions and 64 deletions

View File

@ -186,21 +186,33 @@
duration: 2000
});
uni.removeStorageSync('mac');
let systemInfo = uni.getSystemInfoSync();
if (systemInfo.platform === 'android') {
// Android
uni.navigateTo({
url: '/page_components/wifilist/index?deviceId=' + options
.data.deviceId + '&name=' + options.data.name
})
} else if (systemInfo.platform === 'ios') {
// iOS
uni.navigateTo({
url: '/page_fenbao/device/wifivideo?deviceId=' + options
.data.deviceId + '&name=' + options.data.name
})
}
let vm = this
uni.showModal({
title: '提示',
content: '你已绑定成功,需前去配网吗?',
success: function (res) {
if (res.confirm) {
let systemInfo = uni.getSystemInfoSync();
if (systemInfo.platform === 'android') {
// Android
uni.navigateTo({
url: '/page_components/wifilist/index?deviceId=' + options
.data.deviceId + '&name=' + options.data.name
})
} else if (systemInfo.platform === 'ios') {
// iOS
uni.navigateTo({
url: '/page_fenbao/device/wifivideo?deviceId=' + options
.data.deviceId + '&name=' + options.data.name
})
}
} else if (res.cancel) {
console.log('用户点击了取消');
}
}
})
} else {
uni.showToast({
title: '该设备已被绑定',

View File

@ -265,20 +265,31 @@
});
uni.hideLoading();
uni.removeStorageSync('mac');
let systemInfo = uni.getSystemInfoSync();
if (systemInfo.platform === 'android') {
// Android
uni.navigateTo({
url: '/page_components/wifilist/index?deviceId=' +
options.data.deviceId + '&name=' + options.data.name
})
} else if (systemInfo.platform === 'ios') {
// iOS
uni.navigateTo({
url: '/page_fenbao/device/wifivideo?deviceId=' +
options.data.deviceId + '&name=' + options.data.name
})
}
let vm = this
uni.showModal({
title: '提示',
content: '你已绑定成功,需前去配网吗?',
success: function (res) {
if (res.confirm) {
let systemInfo = uni.getSystemInfoSync();
if (systemInfo.platform === 'android') {
// Android
uni.navigateTo({
url: '/page_components/wifilist/index?deviceId=' + options
.data.deviceId + '&name=' + options.data.name
})
} else if (systemInfo.platform === 'ios') {
// iOS
uni.navigateTo({
url: '/page_fenbao/device/wifivideo?deviceId=' + options
.data.deviceId + '&name=' + options.data.name
})
}
} else if (res.cancel) {
console.log('用户点击了取消');
}
}
})
}else if(res.code == 500){
uni.showToast({

View File

@ -32,17 +32,23 @@
</view>
</view>
<view class="bot">
<view class="bot_left">
<!-- <view class="bot_left">
<view class="echarts">
<!-- <mpvue-echarts id="main" ref="pieChart" :echarts="echarts" @onInit="initChart" /> -->
<l-echart ref="chart" @finished="initChart"></l-echart>
<uni-ec-canvas class="uni-ec-canvas" id="uni-ec-canvas" ref="canvas"
canvas-id="uni-ec-canvas" :ec="ec">
</uni-ec-canvas>
</view>
</view>
</view> -->
<view class="bot_right">
<view class="cont" style="text-align: center;">
<view class="tit">
{{deviceInfo.orderAmount == null ? 0 : deviceInfo.orderAmount}}
</view>
<view class="txt">
订单金额
</view>
</view>
<view class="cont" style="text-align: center;">
<view class="tit">
{{deviceInfo.orderCount == null ? 0 : deviceInfo.orderCount}}
@ -51,7 +57,7 @@
订单数
</view>
</view>
<view class="cont" style="margin-left: 100rpx;text-align: center;">
<view class="cont" style="text-align: center;">
<view class="tit">
{{timeday}}
</view>
@ -190,9 +196,9 @@
}
},
onLoad(option) {
setTimeout(() => {
this.$refs.canvas.init(this.initChart)
}, 1000)
// setTimeout(() => {
// this.$refs.canvas.init(this.initChart)
// }, 1000)
let id = option.id
this.id = id
this.getDevice(id)
@ -354,7 +360,7 @@
this.timeday = Math.abs(Math.floor(differenceInMs / (1000 * 60)));
}
this.loadings = true
this.initChart()
// this.initChart()
}
});
@ -449,7 +455,9 @@
// url: '/page_fenbao/device/lianjie?mac=' + this.deviceInfo.mac + '&storeId=' + this
// .deviceInfo.storeId
// })
uni.showLoading({
title: '加载中...'
});
xBlufi.initXBlufi(1);
xBlufi.listenDeviceMsgEvent(true, this.funListenDeviceMsgEvent);
xBlufi.notifyStartDiscoverBle({
@ -519,23 +527,33 @@
icon: 'none',
duration: 2000
});
uni.hideLoading();
uni.hideLoading();
uni.removeStorageSync('mac');
let systemInfo = uni.getSystemInfoSync();
if (systemInfo.platform === 'android') {
// Android
uni.navigateTo({
url: '/page_components/wifilist/index?deviceId=' +
options.data.deviceId + '&name=' + options.data.name
})
} else if (systemInfo.platform === 'ios') {
// iOS
uni.navigateTo({
url: '/page_fenbao/device/wifivideo?deviceId=' +
options.data.deviceId + '&name=' + options.data.name
})
}
let vm = this
uni.showModal({
title: '提示',
content: '你已绑定成功,需前去配网吗?',
success: function (res) {
if (res.confirm) {
let systemInfo = uni.getSystemInfoSync();
if (systemInfo.platform === 'android') {
// Android
uni.navigateTo({
url: '/page_components/wifilist/index?deviceId=' + options
.data.deviceId + '&name=' + options.data.name
})
} else if (systemInfo.platform === 'ios') {
// iOS
uni.navigateTo({
url: '/page_fenbao/device/wifivideo?deviceId=' + options
.data.deviceId + '&name=' + options.data.name
})
}
} else if (res.cancel) {
console.log('用户点击了取消');
}
}
})
}else if(res.code == 500){
uni.showToast({
title: '该设备已被绑定',
@ -628,7 +646,7 @@
.card1 {
padding: 34rpx 0 0 40rpx;
width: 670rpx;
height: 583rpx;
height: 470rpx;
background: #FFFFFF;
box-shadow: 0rpx 14rpx 35rpx 0rpx rgba(53, 140, 255, 0.1);
border-radius: 28rpx 28rpx 28rpx 28rpx;
@ -700,13 +718,15 @@
align-items: center;
justify-content: center;
margin-left: 19rpx;
width: 38rpx;
height: 23rpx;
// width: 38rpx;
// height: 23rpx;
padding: 5rpx 10rpx;
box-sizing: border-box;
background: rgba(204, 204, 204, 0);
opacity: 1;
border: 2rpx solid #8883F0;
border-radius: 40rpx;
font-size: 14rpx;
font-size: 24rpx;
font-family: HarmonyOS Sans SC, HarmonyOS Sans SC;
font-weight: 400;
color: #8883F0;
@ -742,8 +762,12 @@
.bot_right {
// margin-top: 50rpx;
display: flex;
flex-wrap: nowrap;
// flex-wrap: nowrap;
width: 100%;
justify-content: space-between;
padding-left: 80rpx;
padding-right: 120rpx;
box-sizing: border-box;
.cont {
.tit {
font-size: 28rpx;

View File

@ -23,12 +23,12 @@
<view class="fd" >
<view class="fd_top">
<view class="fd_da">
<view class="fd_lt" :style="{ transform: `translateX(${-curtitidx * 140}rpx)` }">
<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">
@ -1277,7 +1277,7 @@
// width: 40%;
text-align: center;
// width: 100%;
padding: 0 30rpx;
padding: 0 10rpx;
box-sizing: border-box;
// margin-right: 20rpx;
font-size: 36rpx;