baodeng_xcx/pages/index/index.vue

124 lines
2.5 KiB
Vue
Raw Normal View History

2023-11-27 09:57:03 +08:00
<template>
2024-01-27 16:37:52 +08:00
<view class="page">
2025-05-19 18:02:41 +08:00
<u-navbar :is-back="false" title="Deep" :border-bottom="false" back-icon-color="000" :background="bgc"
title-color='#fff' title-size='36' height='44' id="navbar">
2024-01-27 16:37:52 +08:00
</u-navbar>
2025-05-19 18:02:41 +08:00
<image class="bj" src="https://api.ccttiot.com/smartmeter/img/static/u1dVlFYFsW87hp0Rs014" mode=""></image>
<view class="boxpic">
<image class="bd" @click="btnbd" src="https://api.ccttiot.com/smartmeter/img/static/uQdax0INyCWNnNqWXerD"
mode=""></image>
<!-- <view class="bdpic" @click="btnwu">
2025-05-14 15:14:12 +08:00
<image src="https://api.ccttiot.com/smartmeter/img/static/uop0H6ZZWbHH600RkbsA" mode=""></image>
<image src="https://api.ccttiot.com/smartmeter/img/static/uE714dLumBXvTz7EPOFR" mode=""></image>
2025-05-19 18:02:41 +08:00
</view> -->
</view>
2023-11-27 09:57:03 +08:00
</view>
</template>
<script>
2025-05-14 15:14:12 +08:00
var xBlufi = require("@/components/blufi/xBlufi.js")
2023-11-27 09:57:03 +08:00
export default {
data() {
return {
2025-05-19 18:02:41 +08:00
bgc: {
backgroundColor: "#000",
},
2025-05-14 15:14:12 +08:00
}
2025-05-19 18:02:41 +08:00
},
2025-05-14 15:14:12 +08:00
onLoad(option) {
2025-05-19 18:02:41 +08:00
console.log(option, uni.getStorageSync('type'));
if (uni.getStorageSync('type')) {
2025-05-14 15:14:12 +08:00
console.log(1);
uni.removeStorageSync('type')
2025-05-19 18:02:41 +08:00
} else {
2025-05-14 15:14:12 +08:00
xBlufi.initXBlufi(1)
2024-03-13 10:54:22 +08:00
}
},
2025-05-14 15:14:12 +08:00
onShow() {
xBlufi.notifyStartDiscoverBle({
'isStart': true
})
2023-11-27 09:57:03 +08:00
},
methods: {
2025-05-19 18:02:41 +08:00
// 点击提示暂无功能
btnwu() {
uni.showToast({
title: '当前功能暂未开放',
icon: 'none',
duration: 2000
})
},
// 点击跳转到爆灯
btnbd() {
this.$u.get(`/getInfo`).then(res => {
if (res.code == 200) {
uni.navigateTo({
url: '/pages/myorder/index'
})
} else if (res.code == 401) {
uni.showModal({
title: '提示',
content: '你还未登录,是否去登录?',
success: function(res) {
if (res.confirm) {
console.log('用户点击确定')
uni.reLaunch({
url: '/pages/login/login'
})
} else if (res.cancel) {
console.log('用户点击取消')
}
}
2025-05-14 15:14:12 +08:00
})
2025-05-19 18:02:41 +08:00
}
})
},
2023-11-27 09:57:03 +08:00
}
}
</script>
2024-01-27 16:37:52 +08:00
<style lang="scss">
2024-03-13 10:54:22 +08:00
page {
2025-05-14 15:14:12 +08:00
background: #fff;
border-radius: 0rpx 0rpx 0rpx 0rpx;
2024-03-13 10:54:22 +08:00
}
2025-05-19 18:02:41 +08:00
/deep/ .u-line-1 {
2025-05-14 15:14:12 +08:00
padding-bottom: 14rpx;
}
2025-05-19 18:02:41 +08:00
.boxpic {
width: 500rpx;
2025-05-14 15:14:12 +08:00
margin: auto;
margin-top: 460rpx;
2025-05-19 18:02:41 +08:00
.bdpic {
2025-05-14 15:14:12 +08:00
width: 580rpx;
margin: auto;
2024-03-13 10:54:22 +08:00
display: flex;
2025-05-14 15:14:12 +08:00
justify-content: space-between;
margin-top: 14rpx;
2025-05-19 18:02:41 +08:00
image {
2025-05-14 15:14:12 +08:00
width: 274rpx;
height: 138rpx;
2024-03-13 10:54:22 +08:00
}
}
2025-05-19 18:02:41 +08:00
.bd {
width: 500rpx;
height: 200rpx;
margin-top: 500rpx;
2024-03-25 19:46:07 +08:00
}
}
2025-05-19 18:02:41 +08:00
.bj {
width: 760rpx;
height: 110vh;
2025-05-14 15:14:12 +08:00
position: fixed;
top: 0;
2025-05-19 18:02:41 +08:00
left: -10rpx;
2025-05-14 15:14:12 +08:00
z-index: -1;
2024-01-27 16:37:52 +08:00
}
2024-03-13 10:54:22 +08:00
</style>