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

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

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