引入mqtt

This commit is contained in:
仲么了
2023-01-13 13:23:25 +08:00
parent fd9b3df761
commit 36bcbab647
4 changed files with 62 additions and 100 deletions

View File

@@ -1,52 +1,53 @@
<template>
<view class="content">
<image class="logo" src="/static/logo.png"></image>
<view class="text-area">
<text class="title">{{title}}</text>
</view>
</view>
<view class="content">
<image class="logo" src="/static/logo.png"></image>
<view class="text-area">
<text class="title">{{ title }}</text>
</view>
</view>
</template>
<script>
export default {
data() {
return {
title: '灿能'
}
},
onLoad() {
const mqtt = require('mqtt')
export default {
data () {
return {
title: '灿能'
}
},
onLoad () {
console.log(mqtt);
},
methods: {
},
methods: {
}
}
}
}
</script>
<style>
.content {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
}
.content {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
}
.logo {
height: 200rpx;
width: 200rpx;
margin-top: 200rpx;
margin-left: auto;
margin-right: auto;
margin-bottom: 50rpx;
}
.logo {
height: 200rpx;
width: 200rpx;
margin-top: 200rpx;
margin-left: auto;
margin-right: auto;
margin-bottom: 50rpx;
}
.text-area {
display: flex;
justify-content: center;
}
.text-area {
display: flex;
justify-content: center;
}
.title {
font-size: 36rpx;
color: #8f8f94;
}
.title {
font-size: 36rpx;
color: #8f8f94;
}
</style>