<template>
  <view>
    <text>设备型号: {{ model }}</text>
    <text>硬件制造商: {{ manufacturer }}</text>
    <text>Android 版本: {{ androidVersion }}</text>
    <text>SDK 版本: {{ sdkVersion }}</text>
  </view>
</template>

<script>
export default {
  data() {
    return {
      model: '',
      manufacturer: '',
      androidVersion: '',
      sdkVersion: ''
    };
  },
  onReady() {
    this.getDeviceInfo();
	this.getAnd();
  },
  methods: {
    getDeviceInfo() {
      // 获取设备型号和制造商信息
      this.model = plus.device.model; // 设备型号
      this.manufacturer = plus.device.vendor; // 硬件制造商

    },
	
	getAnd() {
	  // 获取Android版本和SDK版本
	  uni.getSystemInfo({
		success: (res) => {
		  this.androidVersion = res.system;
		  this.sdkVersion = res.osAndroidAPILevel ? res.osAndroidAPILevel : '未知';
		}
	  });
	}
  }
};
</script>

<style>
view {
  padding: 20px;
}
text {
  display: block;
  margin-bottom: 10px;
}
</style>
