feat: 识别码机,追加商米SN标识
This commit is contained in:
@@ -130,21 +130,31 @@ export default {
|
||||
onLoad() {
|
||||
uni.showLoading();
|
||||
|
||||
// 写死
|
||||
// this.machineId = "861299032410223";
|
||||
// this.getShopInfoApi();
|
||||
// return;
|
||||
// #ifdef APP-PLUS
|
||||
let imelSet = []
|
||||
var Build = plus.android.importClass("android.os.Build");
|
||||
var SystemProperties = plus.android.importClass("android.os.SystemProperties");
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) {
|
||||
imelSet.push(SystemProperties.get('ro.sunmi.serial'))
|
||||
} else if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
||||
imelSet.push(Build.getSerial())
|
||||
} else{
|
||||
imelSet.push(Build.SERIAL)
|
||||
}
|
||||
|
||||
plus.device.getInfo({
|
||||
success: (e) => {
|
||||
const imei = e.imei.split(",");
|
||||
this.machineId = imei[0];
|
||||
imelSet.push(imei[0])
|
||||
this.machineId = imelSet.join(',');
|
||||
|
||||
this.getShopInfoApi();
|
||||
},
|
||||
fail: function (e) {
|
||||
console.log("getDeviceInfo failed: " + JSON.stringify(e));
|
||||
},
|
||||
});
|
||||
// #endif
|
||||
},
|
||||
methods: {
|
||||
// 人数
|
||||
|
Reference in New Issue
Block a user