124 lines
2.5 KiB
Vue
124 lines
2.5 KiB
Vue
<template>
|
|
<view class="page">
|
|
<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">
|
|
</u-navbar>
|
|
<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">
|
|
<image src="https://api.ccttiot.com/smartmeter/img/static/uop0H6ZZWbHH600RkbsA" mode=""></image>
|
|
<image src="https://api.ccttiot.com/smartmeter/img/static/uE714dLumBXvTz7EPOFR" mode=""></image>
|
|
</view> -->
|
|
</view>
|
|
</view>
|
|
</template>
|
|
|
|
<script>
|
|
var xBlufi = require("@/components/blufi/xBlufi.js")
|
|
export default {
|
|
data() {
|
|
return {
|
|
bgc: {
|
|
backgroundColor: "#000",
|
|
},
|
|
}
|
|
},
|
|
onLoad(option) {
|
|
console.log(option, uni.getStorageSync('type'));
|
|
if (uni.getStorageSync('type')) {
|
|
console.log(1);
|
|
uni.removeStorageSync('type')
|
|
} else {
|
|
xBlufi.initXBlufi(1)
|
|
}
|
|
},
|
|
onShow() {
|
|
xBlufi.notifyStartDiscoverBle({
|
|
'isStart': true
|
|
})
|
|
},
|
|
methods: {
|
|
// 点击提示暂无功能
|
|
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('用户点击取消')
|
|
}
|
|
}
|
|
})
|
|
}
|
|
})
|
|
},
|
|
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style lang="scss">
|
|
page {
|
|
background: #fff;
|
|
border-radius: 0rpx 0rpx 0rpx 0rpx;
|
|
}
|
|
|
|
/deep/ .u-line-1 {
|
|
padding-bottom: 14rpx;
|
|
}
|
|
|
|
.boxpic {
|
|
width: 500rpx;
|
|
margin: auto;
|
|
margin-top: 460rpx;
|
|
|
|
.bdpic {
|
|
width: 580rpx;
|
|
margin: auto;
|
|
display: flex;
|
|
justify-content: space-between;
|
|
margin-top: 14rpx;
|
|
|
|
image {
|
|
width: 274rpx;
|
|
height: 138rpx;
|
|
}
|
|
}
|
|
|
|
.bd {
|
|
width: 500rpx;
|
|
height: 200rpx;
|
|
margin-top: 500rpx;
|
|
}
|
|
}
|
|
|
|
.bj {
|
|
width: 760rpx;
|
|
height: 110vh;
|
|
position: fixed;
|
|
top: 0;
|
|
left: -10rpx;
|
|
z-index: -1;
|
|
}
|
|
</style> |