首页 > 其他分享 >uni-app:获取手机设备的系统信息(hbuilderx 3.7.3)

uni-app:获取手机设备的系统信息(hbuilderx 3.7.3)

时间:2023-02-25 22:11:06浏览次数:48  
标签:res app 3.7 https uni com getSystemInfo hbuilderx

一,官方文档地址:

https://uniapp.dcloud.net.cn/api/system/info.html#

说明:刘宏缔的架构森林是一个专注架构的博客,地址:https://www.cnblogs.com/architectforest

         对应的源码可以访问这里获取: https://github.com/liuhongdi/
         或: https://gitee.com/liuhongdi

说明:作者:刘宏缔 邮箱: [email protected]

二,代码:

<template>
    <view>
        <view v-for="(item, index) in res" :key="index" >
            {{index}}:{{item}}
        </view>
    </view>
</template>

<script>
    export default {
        data() {
            return {
                res:{},
            }
        },
        onl oad(){
            this.getSystemInfo();
        },
        methods: {
            getSystemInfo(){
               let that = this;
               uni.getSystemInfo({
                   success: function (res) {
                       console.log(res);
                       that.res = res;
                   }
                });
            }
        }
    }
</script>
<style>
</style>

三,测试效果

四,查看hbuilderx的版本: 

 

标签:res,app,3.7,https,uni,com,getSystemInfo,hbuilderx
From: https://www.cnblogs.com/architectforest/p/17155566.html

相关文章