提交 9fb4dddf 编写于 作者: D DCloud_LXH

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

上级 e0a41a90
......@@ -38,10 +38,10 @@
</view>
</uni-collapse-item>
</template>
</uni-collapse>
<!-- #ifdef UNI-APP-X -->
<uni-upgrade-center-app ref="upgradePopup" @close="upgradePopupClose" />
</uni-collapse>
<!-- #ifdef UNI-APP-X & APP -->
<uni-upgrade-center-app ref="upgradePopup" @close="upgradePopupClose" />
<!-- #endif -->
</view>
<!-- #ifdef APP -->
......@@ -49,10 +49,10 @@
<!-- #endif -->
</template>
<script lang="uts">
// #ifdef UNI-APP-X
import checkUpdate from '@/uni_modules/uni-upgrade-center-app/utils/check-update'
// #endif
<script lang="uts">
// #ifdef UNI-APP-X & APP
import checkUpdate from '@/uni_modules/uni-upgrade-center-app/utils/check-update'
// #endif
type Page = {
name : string
......@@ -95,12 +95,12 @@ export default {
*/
{
name: 'list-view',
},
{
name: 'sticky-header',
},
{
name: 'sticky-section',
},
{
name: 'sticky-header',
},
{
name: 'sticky-section',
}
] as Page[],
},
......@@ -230,17 +230,17 @@ export default {
url: '/pages/component/web-view-local/web-view-local',
},
] as Page[],
},
{
id: 'unicloud-db',
name: 'unicloud-db',
pages: [
{
name: '联系人',
enable: true,
url: '/pages/component/unicloud-db-contacts/list'
}
] as Page[],
},
{
id: 'unicloud-db',
name: 'unicloud-db',
pages: [
{
name: '联系人',
enable: true,
url: '/pages/component/unicloud-db-contacts/list'
}
] as Page[],
},
/*
{
......@@ -291,20 +291,20 @@ export default {
uni.navigateTo({
url,
})
}
// #ifdef UNI-APP-X
,upgradePopupClose() {
console.log('upgradePopup close');
}
}
// #ifdef UNI-APP-X & APP
,upgradePopupClose() {
console.log('upgradePopup close');
}
// #endif
},
onReady() {
// #ifdef UNI-APP-X & APP
checkUpdate(this.$refs['upgradePopup'] as UniUpgradeCenterAppComponentPublicInstance)
// #endif
},
onReady() {
// #ifdef UNI-APP-X
checkUpdate(this.$refs['upgradePopup'] as UniUpgradeCenterAppComponentPublicInstance)
// #endif
},
beforeUnmount() {
uni.showTabBar()?.catch(_ => {})
},
beforeUnmount() {
uni.showTabBar()?.catch(_ => {})
}
}
</script>
......
......@@ -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.
先完成此消息的编辑!
想要评论请 注册