From ea15f8e02bf466d48ee6d239fceec9d747ea0ffc Mon Sep 17 00:00:00 2001 From: liangzilin Date: Tue, 14 Nov 2023 16:39:16 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E8=AF=86=E5=88=AB=E7=A0=81=E6=9C=BA?= =?UTF-8?q?=EF=BC=8C=E8=BF=BD=E5=8A=A0=E5=95=86=E7=B1=B3SN=E6=A0=87?= =?UTF-8?q?=E8=AF=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- manifest.json | 5 +++-- pages/detailedList/index.vue | 18 ++---------------- pages/index/index.vue | 20 +++++++++++++++----- 3 files changed, 20 insertions(+), 23 deletions(-) diff --git a/manifest.json b/manifest.json index 25770bb..a8588ee 100644 --- a/manifest.json +++ b/manifest.json @@ -3,7 +3,7 @@ "appid" : "__UNI__0801766", "description" : "Verification Service", "versionName" : "1.1.5", - "versionCode" : 115, + "versionCode" : 2023111402, "transformPx" : false, /* 5+App特有相关 */ "app-plus" : { @@ -34,7 +34,8 @@ "permissions" : [ "", "", - "" + "", + "" ], "autoSdkPermissions" : false, "permissionPhoneState" : { diff --git a/pages/detailedList/index.vue b/pages/detailedList/index.vue index 7f0f675..9b5d4a4 100644 --- a/pages/detailedList/index.vue +++ b/pages/detailedList/index.vue @@ -162,22 +162,8 @@ export default { }; }, onLoad: function () { - // 写死 - // this.machineId = "861741042996303"; - // this.getDataList(); - // return; - - plus.device.getInfo({ - success: (e) => { - const imei = e.imei.split(","); - this.machineId = imei[0]; - this.getDataList(); - }, - fail: function (e) { - console.log("getDeviceInfo failed: " + JSON.stringify(e)); - }, - }); - // this.getDataList() + this.machineId = uni.getStorageSync("store_obj").imei + this.getDataList() }, methods: { all_price(spendAmount, couponAmount, pointAmount) { diff --git a/pages/index/index.vue b/pages/index/index.vue index ba4856a..df11b1b 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -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: { // 人数