<template>
<view class="content">
</view>
</template>
<script>
export default {
methods: {
},
onShow() {
//获取网络类型
uni.getNetworkType({
success: function (res) {
console.log(res.networkType);
}
});
}
}
</script>
<style scoped lang="scss">
.content {}
</style>
uni-app获取网络类型(4G\3G\2G\wifi 网络\无网络等)
最新推荐文章于 2024-07-29 13:48:07 发布