diff --git a/pages/archive/edit-archive.vue b/pages/archive/edit-archive.vue index 1f1ae23..8bdca6e 100644 --- a/pages/archive/edit-archive.vue +++ b/pages/archive/edit-archive.vue @@ -157,6 +157,7 @@ async function addArchive() { params.referenceUserId = ''; params.reference = referenceCustomer.value.name; params.referenceType = '客户'; + params.customerSource = ['客户推荐'] } loading.value = false; const res = await api('addCustomer', { params }); diff --git a/pages/home/home.vue b/pages/home/home.vue index a2111b6..6d74958 100644 --- a/pages/home/home.vue +++ b/pages/home/home.vue @@ -2,7 +2,7 @@ - + { }); onShareAppMessage((res) => { - if (team.value) { + if (team.value && team.value.supportPatientForward === 'YES') { const customer = customers.value[0]; const referenceCustomerId = customer ? customer._id : ''; return { diff --git a/pages/home/team-head.vue b/pages/home/team-head.vue index 6eebc08..12b5916 100644 --- a/pages/home/team-head.vue +++ b/pages/home/team-head.vue @@ -6,23 +6,35 @@ - - {{ team.name }} - - + + + {{ team.name }} + + + + + - - {{ currentTeam.leaderCorp || currentTeam.corpName || '' }} - - - + + + {{ currentTeam.leaderCorp || currentTeam.corpName || '' }} + + + + 推荐 + + + + + @@ -103,6 +115,10 @@ const props = defineProps({ type: Object, default: () => ({}), }, + customers: { + type: Array, + default: () => [], + }, teams: { type: Array, default: () => [], @@ -112,11 +128,13 @@ const props = defineProps({ const currentTeam = computed(() => props.teams.find((i) => props.team && i.teamId === props.team.teamId) ); + const qrcode = computed(() => { const qrcodes = props.team && Array.isArray(props.team.qrcodes) ? props.team.qrcodes : []; return qrcodes[0] || '' }) const teamStyle = computed(() => `max-width:${props.teams.length ? 'calc(100% - 60rpx)' : '100%'}`) +const firstCustomer = computed(() => props.customers && props.customers[0] ? props.customers[0] : {}) function select(team) { emits("changeTeam", team); @@ -126,7 +144,7 @@ function select(team) { function toTeamDetail() { if (props.team && props.team.teamId) { uni.navigateTo({ - url: `/pages/team/team-detail?teamId=${props.team.teamId}&corpId=${props.team.corpId}&corpName=${encodeURIComponent(props.team.corpName || '')}` + url: `/pages/team/team-detail?firstCustomerId=${firstCustomer.value._id || ''}&teamId=${props.team.teamId}&corpId=${props.team.corpId}&corpName=${encodeURIComponent(props.team.corpName || '')}` }); } } @@ -311,4 +329,13 @@ onMounted(() => { .rounded-circle { border-radius: 50%; } + +.icon-share { + width: 24rpx; + height: 24rpx; +} + +.opacity-0 { + opacity: 0; +} \ No newline at end of file diff --git a/pages/login/redirect-page.vue b/pages/login/redirect-page.vue index a35548c..1c409a5 100644 --- a/pages/login/redirect-page.vue +++ b/pages/login/redirect-page.vue @@ -38,7 +38,10 @@ async function changeTeam({ teamId, corpId, corpUserId, qrid, referenceCustomerI team.value.corpName = res.data.corpName; set('home-invite-team-info', { teamId: team.value.teamId, - corpUserId: corpUserId || '' + corpUserId: corpUserId || '', + corpUserId, + qrid, + referenceCustomerId: referenceCustomerId || '' }); await login() if (account.value && account.value.mobile) { diff --git a/pages/team/team-detail.vue b/pages/team/team-detail.vue index 24ec31c..f6a6ace 100644 --- a/pages/team/team-detail.vue +++ b/pages/team/team-detail.vue @@ -7,7 +7,15 @@ - {{ team.name }} + + {{ team.name }} + + + 推荐 + + + {{ corpName }} @@ -54,7 +62,7 @@