chuangte_bike_newxcx/App.vue

84 lines
1.6 KiB
Vue
Raw Normal View History

2023-11-27 09:57:03 +08:00
<script>
2025-04-01 21:35:30 +08:00
var call
var data_call
var ble_id = "1231"
var ble_url
2023-12-05 16:45:28 +08:00
2025-04-01 21:35:30 +08:00
var user_info
2023-12-05 16:45:28 +08:00
2025-04-01 21:35:30 +08:00
// 在文件顶部添加一个变量来存储当前连接的MAC地址
var current_connected_mac = null;
2023-12-05 16:45:28 +08:00
2025-04-01 21:35:30 +08:00
export default {
globalData: {
userInfo: null,
topicTypeIndex: 0,
token: "",
isShow: true,
bleInfo: {
current_connected_mac: null,
ble_id: "1231",
ble_url: null,
devicesList: [],
}
},
created() {
// #ifdef APP-PLUS
plus.navigator.closeSplashscreen()
// #endif
console.log('App @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@Launch')
// #ifndef APP-PLUS
console.log('App 1111111111111Launch')
// #endif
// 添加以下代码,将方法绑定到 uni 全局对象
uni.$emit('init_app_methods', {
set_ble_mac: this.set_ble_mac.bind(this)
})
},
onLaunch(options) {
2025-09-22 17:08:55 +08:00
// console.log('执行');
// this.getimg()
2025-04-01 21:35:30 +08:00
uni.setInnerAudioOption({
obeyMuteSwitch: false
})
},
onShow: function () {
2025-09-22 17:08:55 +08:00
2025-04-01 21:35:30 +08:00
},
onHide: function () {
2023-12-05 16:45:28 +08:00
2025-04-01 21:35:30 +08:00
},
methods: {
get_ble_name(callback) {
if (callback != undefined) {
console.log('关闭蓝牙接口', ble_id);
}
2023-12-05 16:45:28 +08:00
},
2025-09-22 17:08:55 +08:00
// 请求图片
getimg(){
this.$u.get(`/app/app/detail?id=${this.$store.state.appid}`).then(res =>{
if(res.code == 200){
this.$store.state.app = res.data
console.log(this.$store.state.app);
}
})
}
2023-11-27 09:57:03 +08:00
}
2025-04-01 21:35:30 +08:00
}
2023-11-27 09:57:03 +08:00
</script>
2025-04-01 21:35:30 +08:00
2023-12-05 16:45:28 +08:00
<style lang="scss">
2023-11-27 09:57:03 +08:00
/*每个页面公共css */
2023-12-05 16:45:28 +08:00
@import "uview-ui/index.scss";
@import "./common/css/iconfont.css";
// 自定义tabar样式修改
2025-09-22 17:08:55 +08:00
::v-deep.u-tabbar__content__item__text{
2023-12-05 16:45:28 +08:00
font-size: 20rpx !important;
bottom: 10rpx !important;
}
page{
background-color: #f8f8f8;
}
2023-11-27 09:57:03 +08:00
</style>