Skip to content

Commit

Permalink
fix(runtime-web): 提供 my.SDKVersion 支持
Browse files Browse the repository at this point in the history
  • Loading branch information
lyfeyaj committed Apr 25, 2023
1 parent fc77d21 commit ba333b3
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions packages/runtime-web/src/api/device/systeminfo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ function contains(arr, needle) {

function systemInfo() {
const info = {
// NOTE: 这里暂时以最新版本的支付宝小程序基础库为准
SDKVersion: '2.8.9',
model: md.mobile(),
pixelRatio: window.devicePixelRatio, //设备像素比。
windowWidth: document.body.clientWidth,
Expand Down Expand Up @@ -63,11 +61,15 @@ function systemInfo() {
}

export default {
// NOTE: 这里暂时以最新版本的支付宝小程序基础库为准
SDKVersion: '2.8.9',

getSystemInfo() {
return new Promise((resolve) => {
resolve(systemInfo())
})
},

getSystemInfoSync() {
return systemInfo()
}
Expand Down

0 comments on commit ba333b3

Please sign in to comment.