修改web_view
This commit is contained in:
parent
3b46b76f1f
commit
5e52a4ef84
@ -6,26 +6,19 @@
|
||||
},
|
||||
}
|
||||
</route>
|
||||
|
||||
<!-- navigationStyle: 'custom', -->
|
||||
<template>
|
||||
<!-- <CustomNavbar :title="title">
|
||||
<template #right>
|
||||
<wd-icon name="home" @click="handleSearch" />
|
||||
</template>
|
||||
</CustomNavbar> -->
|
||||
<!-- <view class="content"> -->
|
||||
<fly-login v-model="show" />
|
||||
<web-view class="web-view" :webview-styles="webviewStyles" :src="local_url"></web-view>
|
||||
<!-- </view> -->
|
||||
</template>
|
||||
<!-- :style="{ width: windowW + 'px', height: windowH + 'px' }" -->
|
||||
<script>
|
||||
import { defineComponent, computed } from 'vue'
|
||||
import { computed, defineComponent } from 'vue'
|
||||
import CustomNavbar from '@/components/CustomNavbar.vue'
|
||||
import { useUserStore } from '@/store'
|
||||
import { getUrlCrmebLogin } from '@/utils'
|
||||
import { isMpWeixin } from '@/utils/platform'
|
||||
|
||||
const userStore = useUserStore()
|
||||
|
||||
// 检查是否授权
|
||||
const hasLogin = computed(() => userStore.userInfo?.id)
|
||||
const userId = computed(() => userStore.userInfo?.id)
|
||||
export default defineComponent({
|
||||
data() {
|
||||
return {
|
||||
@ -49,13 +42,13 @@ export default defineComponent({
|
||||
onLoad(option) {
|
||||
// const target = encodeURIComponent(option.target)
|
||||
const target = option.target
|
||||
console.log('获取跳转连接', target)
|
||||
console.log('userId', userId.value)
|
||||
if (isMpWeixin) {
|
||||
this.local_url = getUrlCrmebLogin() + '?target=' + target
|
||||
this.local_url = `${getUrlCrmebLogin()}?target=${target}&user_id=${userId.value}`
|
||||
} else {
|
||||
this.local_url = getUrlCrmebLogin() + target
|
||||
}
|
||||
console.log(this.local_url)
|
||||
console.log('local_url', this.local_url)
|
||||
this.title = option.title || ''
|
||||
uni.setNavigationBarTitle({
|
||||
title: this.title, // 运行时修改标题
|
||||
@ -73,7 +66,6 @@ export default defineComponent({
|
||||
},
|
||||
methods: {
|
||||
handleSearch() {
|
||||
// console.log('search')
|
||||
// 跳转到搜索页面
|
||||
uni.navigateTo({ url: '/pages/search/index' })
|
||||
},
|
||||
@ -81,6 +73,11 @@ export default defineComponent({
|
||||
})
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<fly-login v-model="show" />
|
||||
<web-view class="web-view" :webview-styles="webviewStyles" :src="local_url" />
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
/* 根据需要添加样式 */
|
||||
.content {
|
||||
|
Loading…
x
Reference in New Issue
Block a user