Sprinkler-app/pages/login/login.vue
2025-04-17 10:20:41 +08:00

118 lines
2.3 KiB
Vue

<template>
<view>
<image src="https://api.ccttiot.com/smartmeter/img/static/uZUV03nVfyr3MvcLKUfs" class="bj" mode=""></image>
<view class="anniu">
<view class="zhuce" @click="btnzc">
注册
</view>
<view class="denglu" @click="denglu">
登录
</view>
<view class="zhuce" style="margin-top: 30rpx;" @click="denglus">
暂不登录
</view>
</view>
</view>
</template>
<script>
var xBlufi = require("@/components/blufi/xBlufi.js")
export default {
data() {
return {
}
},
// 分享到好友(会话)
onShareAppMessage: function() {
return {
title: '绿小能',
path: '/pages/index/index'
}
},
// 分享到朋友圈
onShareTimeline: function() {
return {
title: '绿小能',
query: '',
path: '/pages/index/index'
}
},
onLoad() {
wx.openBluetoothAdapter({
success: function (res) {
console.log('蓝牙适配器初始化成功');
},
fail: function (err) {
console.error('蓝牙适配器初始化失败,可能是因为没有权限', err);
// uni.showToast({
// title: '蓝牙适配器初始化失败,可能是因为没有权限',
// icon: 'none',
// duration:2000
// })
}
})
xBlufi.initXBlufi(1)
},
methods:{
// 跳转到注册页
btnzc(){
uni.navigateTo({
url:'/pages/login/zhuce'
})
},
// 跳转到登录页
denglu(){
uni.navigateTo({
url:'/pages/login/denglu'
})
},
denglus(){
uni.switchTab({
url:'/pages/index/index'
})
}
}
}
</script>
<style lang="less">
.bj{
width: 100%;
height: 100vh;
position: fixed;
top: 0;
left: 0;
}
.anniu{
position: fixed;
left: 50%;
bottom: 140rpx;
transform: translateX(-50%);
.zhuce{
width: 614rpx;
height: 102rpx;
border-radius: 14rpx 14rpx 14rpx 14rpx;
border: 4rpx solid #FFFFFF;
font-size: 48rpx;
color: #FFFFFF;
font-weight: 600;
text-align: center;
line-height: 102rpx;
}
.denglu{
width: 614rpx;
height: 102rpx;
background: #FFFFFF;
border-radius: 14rpx 14rpx 14rpx 14rpx;
font-size: 48rpx;
color: #48893B;
font-weight: 600;
text-align: center;
line-height: 102rpx;
margin-top: 22rpx;
}
}
</style>