提交 8c61ab39 编写于 作者: D DCloud_LXH

chore: 修改升级中心条件编译

上级 b6b14a4a
......@@ -40,7 +40,7 @@
</template>
</uni-collapse>
<!-- #ifdef UNI-APP-X -->
<!-- #ifdef UNI-APP-X & APP -->
<uni-upgrade-center-app ref="upgradePopup" @close="upgradePopupClose" />
<!-- #endif -->
</view>
......@@ -50,7 +50,7 @@
</template>
<script lang="uts">
// #ifdef UNI-APP-X
// #ifdef UNI-APP-X & APP
import checkUpdate from '@/uni_modules/uni-upgrade-center-app/utils/check-update'
// #endif
......@@ -289,14 +289,14 @@ export default {
url,
})
}
// #ifdef UNI-APP-X
// #ifdef UNI-APP-X & APP
,upgradePopupClose() {
console.log('upgradePopup close');
}
// #endif
},
onReady() {
// #ifdef UNI-APP-X
// #ifdef UNI-APP-X & APP
checkUpdate(this.$refs['upgradePopup'] as UniUpgradeCenterAppComponentPublicInstance)
// #endif
},
......
......@@ -63,7 +63,7 @@ export default function (): Promise<UniUpgradeCenterResult> {
reject('plus.runtime.appid is EMPTY')
}
// #endif
// // #ifdef UNI-APP-X
// #ifdef UNI-APP-X
if (typeof appId === 'string' && typeof appVersion === 'string' && appId.length > 0 && appVersion.length > 0) {
let data = {
action: 'checkVersion',
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册