提交 64589cb7 编写于 作者: D DCloud_LXH

feat: 升级中心适配 uts-openSchema

上级 8cf63030
......@@ -61,7 +61,7 @@
</template>
<script>
import { openSchema } from '@/uni_modules/uts-openSchema'
import { openSchema as utsOpenSchema } from '@/uni_modules/uts-openSchema'
import { createNotificationProgress, cancelNotificationProgress, finishNotificationProgress } from '@/uni_modules/uts-progressNotification'
import { type CreateNotificationProgressOptions, type FinishNotificationProgressOptions } from '@/uni_modules/uts-progressNotification/utssdk/interface.uts'
import { UniUpgradeCenterResult, StoreListItem } from '../../utils/call-check-version'
......@@ -72,6 +72,15 @@
let downloadTask : DownloadTask | null = null;
let openSchemePromise: Promise<boolean> | null = null;
const openSchema = (url: string): Promise<boolean> => new Promise<boolean>((resolve,reject) =>{
try{
utsOpenSchema(url)
resolve(true)
}catch(e){
reject(false)
}
})
export default {
emits: ['close', 'show'],
data() {
......
......@@ -67,7 +67,7 @@ export default function () : Promise<UniUpgradeCenterResult> {
if (typeof appId === 'string' && typeof appVersion === 'string' && appId.length > 0 && appVersion.length > 0) {
let data = {
action: 'checkVersion',
appid: '__UNI__3584C99',
appid: appId,
appVersion: appVersion,
is_uniapp_x: true,
wgtVersion: '0.0.0.0.0.1'
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册