部分代码增加平台判断

This commit is contained in:
zhl 2021-12-14 20:12:25 +08:00
parent 9c831584d0
commit da81a3c2ea
2 changed files with 7 additions and 4 deletions

View File

@ -7,8 +7,11 @@
mpType: 'app', mpType: 'app',
async onLaunch(options: any) { async onLaunch(options: any) {
console.log('App Launch ', options) console.log('App Launch ', options)
console.log('platform: ', uni.getSystemInfoSync())
//#ifdef MP-WEIXIN
await sdkManage.init(options); await sdkManage.init(options);
await sdkManage.login(); await sdkManage.login();
// #endif
}, },
onShow() { onShow() {
console.log('App Show') console.log('App Show')

View File

@ -1,12 +1,14 @@
<template> <template>
<view class="container"> <view class="container">
<uni-list> <uni-list>
<!-- #ifdef MP-WEIXIN -->
<uni-list-item> <uni-list-item>
<text-arrow-cell class="cell-item" title="联系客服" icon="chatbubble" open-type="contact"></text-arrow-cell> <text-arrow-cell class="cell-item" title="联系客服" icon="chatbubble" open-type="contact"></text-arrow-cell>
</uni-list-item> </uni-list-item>
<uni-list-item> <uni-list-item>
<text-arrow-cell class="cell-item" title="意见反馈" icon="email" open-type="feedback"></text-arrow-cell> <text-arrow-cell class="cell-item" title="意见反馈" icon="email" open-type="feedback"></text-arrow-cell>
</uni-list-item> </uni-list-item>
<!-- #endif -->
<uni-list-item> <uni-list-item>
<text-arrow-cell class="cell-item" title="免责申明" icon="notification" @cellClicked="onClickSm"></text-arrow-cell> <text-arrow-cell class="cell-item" title="免责申明" icon="notification" @cellClicked="onClickSm"></text-arrow-cell>
</uni-list-item> </uni-list-item>
@ -25,11 +27,9 @@ import TextArrowCell from '@/components/TextArrowCell/index.vue'
} }
}) })
export default class extends Vue{ export default class extends Vue{
private chatIcon = {color: '#999',size: '32',type: 'chatbubble'} private isWx = false
private yjIcon = {color: '#999',size: '32',type: 'email'}
private smIcon = {color: '#999',size: '32',type: 'notification'}
onLoad() { onLoad() {
// this.isWx = uni.getSystemInfoSync().platform
} }
onClick() { onClick() {