Merge branch 'main' of https://gitea.lihaink.cn/sjeam/digital_village_uni
Some checks are pending
Auto Merge Main to Other Branches / Merge main into i18n (push) Waiting to run
Auto Merge Main to Other Branches / Merge main into base-sard-ui (push) Waiting to run

This commit is contained in:
sjeam 2025-09-07 14:28:18 +08:00
commit 5e32427925

View File

@ -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 hasLogin = computed(() => userStore.userInfo?.id) const userStore = useUserStore()
//
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 {