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