提交 29d8f729 编写于 作者: D DCloud_LXH

feat: 升级中心适配 uts-openSchema

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