You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
34 lines
693 B
34 lines
693 B
1 year ago
|
export default function() {
|
||
|
// #ifdef APP-PLUS
|
||
|
return new Promise((resolve, reject) => {
|
||
|
plus.runtime.getProperty(plus.runtime.appid, function(widgetInfo) {
|
||
|
const data = {
|
||
|
action: 'checkVersion',
|
||
|
appid: plus.runtime.appid,
|
||
|
appVersion: plus.runtime.version,
|
||
|
wgtVersion: widgetInfo.version
|
||
|
}
|
||
|
console.log("data: ",data);
|
||
|
uniCloud.callFunction({
|
||
|
name: 'uni-upgrade-center',
|
||
|
data,
|
||
|
success: (e) => {
|
||
|
console.log("e: ", e);
|
||
|
resolve(e)
|
||
|
},
|
||
|
fail: (error) => {
|
||
|
reject(error)
|
||
|
}
|
||
|
})
|
||
|
})
|
||
|
})
|
||
|
// #endif
|
||
|
// #ifndef APP-PLUS
|
||
|
return new Promise((resolve, reject) => {
|
||
|
reject({
|
||
|
message: '请在App中使用'
|
||
|
})
|
||
|
})
|
||
|
// #endif
|
||
|
}
|