diff --git a/App.vue b/App.vue index ee7b1c7..0fa925e 100644 --- a/App.vue +++ b/App.vue @@ -216,6 +216,10 @@ page { margin-right: 20rpx; } +.ml-10 { + margin-left: 30rpx; +} + .ml-15 { margin-left: 30rpx; } diff --git a/components/group-avatar.vue b/components/group-avatar.vue index 6d8ab1d..44b83a7 100644 --- a/components/group-avatar.vue +++ b/components/group-avatar.vue @@ -25,7 +25,7 @@ const props = defineProps({ } }) -const list = computed(() => props.avatarList.map(i => i || '/static/default-avatar.png')) +const list = computed(() => props.avatarList.map(i => i || '/static/default-avatar.svg')) const size = computed(() => { const val = Number.isInteger(props.size) && props.size > 0 ? props.size : 144; diff --git a/pages.json b/pages.json index 641d9dc..9cfcb68 100644 --- a/pages.json +++ b/pages.json @@ -1,183 +1,184 @@ { - "pages": [ - { - "path": "pages/home/home", - "style": { - "navigationBarTitleText": "首页", - "navigationStyle": "custom" - } - }, - { - "path": "pages/article/article-list", - "style": { - "navigationBarTitleText": "我的宣教" - } - }, - { - "path": "pages/article/article-cate-list", - "style": { - "navigationBarTitleText": "健康宣教" - } - }, - { - "path": "pages/survey/survey-list", - "style": { - "navigationBarTitleText": "我的问卷" - } - }, - { - "path": "pages/message/message", - "style": { - "navigationBarTitleText": "消息" - } - }, - { - "path": "pages/message/index", - "style": { - "navigationBarTitleText": "聊天", - "enablePullDownRefresh": false - } - }, - { - "path": "pages/login/login", - "style": { - "navigationBarTitleText": "柚健康" - } - }, - { - "path": "pages/login/redirect-page", - "style": { - "navigationBarTitleText": "柚健康" - } - }, - { - "path": "pages/archive/archive-manage", - "style": { - "navigationBarTitleText": "档案管理" - } - }, - { - "path": "pages/archive/edit-archive", - "style": { - "navigationBarTitleText": "新增档案" - } - }, - { - "path": "pages/archive/archive-result", - "style": { - "navigationBarTitleText": "团队服务" - } - }, - { - "path": "pages/health/list", - "style": { - "navigationBarTitleText": "健康信息" - } - }, - { - "path": "pages/health/record", - "style": { - "navigationBarTitleText": "健康信息" - } - }, - { - "path": "pages/library/diagnosis-list", - "style": { - "navigationBarTitleText": "选择诊断" - } - }, - { - "path": "pages/team/team-detail", - "style": { - "navigationBarTitleText": "团队介绍" - } - }, - { - "path": "pages/team/homepage", - "style": { - "navigationBarTitleText": "个人主页" - } - }, - { - "path": "pages/team/friend", - "style": { - "navigationBarTitleText": "添加好友" - } - }, - { - "path": "pages/web-view/web-view", - "style": { - "navigationBarTitleText": "" - } - }, - { - "path": "pages/mine/mine", - "style": { - "navigationBarTitleText": "我的" - } - }, - { - "path": "pages/mine/contact", - "style": { - "navigationBarTitleText": "联系客服" - } - }, - { - "path": "pages/common/privacy", - "style": { - "navigationBarTitleText": "隐私政策" - } - }, - { - "path": "pages/common/agreement", - "style": { - "navigationBarTitleText": "用户协议" - } - }, - { - "path": "pages/article/article-detail", - "style": { - "navigationBarTitleText": "宣教文章" - } - }, - { - "path": "pages/article/send-article", - "style": { - "navigationBarTitleText": "选择宣教文章" - } - } - ], - "globalStyle": { - "navigationBarTextStyle": "white", - "navigationBarTitleText": "uni-app", - "navigationBarBackgroundColor": "#065bd6", - "backgroundColor": "#065bd6" - }, - "tabBar": { - "color": "#666666", - "selectedColor": "#007aff", - "backgroundColor": "#ffffff", - "borderStyle": "white", - "list": [ - { - "pagePath": "pages/home/home", - "iconPath": "static/tabbar/home.png", - "selectedIconPath": "static/tabbar/home_selected.png", - "text": "消息" - }, - { - "pagePath": "pages/message/message", - "iconPath": "static/tabbar/consult.png", - "selectedIconPath": "static/tabbar/consult_selected.png", - "text": "咨询" - }, - { - "pagePath": "pages/mine/mine", - "iconPath": "static/tabbar/mine.png", - "selectedIconPath": "static/tabbar/mine_selected.png", - "text": "我的" - } - ] - }, - "uniIdRouter": {} + "pages": [ + { + "path": "pages/home/home", + "style": { + "navigationBarTitleText": "首页", + "navigationStyle": "custom" + } + }, + { + "path": "pages/article/article-list", + "style": { + "navigationBarTitleText": "我的宣教" + } + }, + { + "path": "pages/article/article-cate-list", + "style": { + "navigationBarTitleText": "健康宣教" + } + }, + { + "path": "pages/survey/survey-list", + "style": { + "navigationBarTitleText": "我的问卷" + } + }, + { + "path": "pages/message/message", + "style": { + "navigationBarTitleText": "消息" + } + }, + { + "path": "pages/message/index", + "style": { + "navigationBarTitleText": "聊天", + "enablePullDownRefresh": false + } + }, + { + "path": "pages/login/login", + "style": { + "navigationBarTitleText": "柚健康", + "navigationStyle": "custom" + } + }, + { + "path": "pages/login/redirect-page", + "style": { + "navigationBarTitleText": "柚健康" + } + }, + { + "path": "pages/archive/archive-manage", + "style": { + "navigationBarTitleText": "档案管理" + } + }, + { + "path": "pages/archive/edit-archive", + "style": { + "navigationBarTitleText": "新增档案" + } + }, + { + "path": "pages/archive/archive-result", + "style": { + "navigationBarTitleText": "团队服务" + } + }, + { + "path": "pages/health/list", + "style": { + "navigationBarTitleText": "健康信息" + } + }, + { + "path": "pages/health/record", + "style": { + "navigationBarTitleText": "健康信息" + } + }, + { + "path": "pages/library/diagnosis-list", + "style": { + "navigationBarTitleText": "选择诊断" + } + }, + { + "path": "pages/team/team-detail", + "style": { + "navigationBarTitleText": "团队介绍" + } + }, + { + "path": "pages/team/homepage", + "style": { + "navigationBarTitleText": "个人主页" + } + }, + { + "path": "pages/team/friend", + "style": { + "navigationBarTitleText": "添加好友" + } + }, + { + "path": "pages/web-view/web-view", + "style": { + "navigationBarTitleText": "" + } + }, + { + "path": "pages/mine/mine", + "style": { + "navigationBarTitleText": "我的" + } + }, + { + "path": "pages/mine/contact", + "style": { + "navigationBarTitleText": "联系客服" + } + }, + { + "path": "pages/common/privacy", + "style": { + "navigationBarTitleText": "隐私政策" + } + }, + { + "path": "pages/common/agreement", + "style": { + "navigationBarTitleText": "用户协议" + } + }, + { + "path": "pages/article/article-detail", + "style": { + "navigationBarTitleText": "宣教文章" + } + }, + { + "path": "pages/article/send-article", + "style": { + "navigationBarTitleText": "选择宣教文章" + } + } + ], + "globalStyle": { + "navigationBarTextStyle": "white", + "navigationBarTitleText": "uni-app", + "navigationBarBackgroundColor": "#065bd6", + "backgroundColor": "#065bd6" + }, + "tabBar": { + "color": "#666666", + "selectedColor": "#007aff", + "backgroundColor": "#ffffff", + "borderStyle": "white", + "list": [ + { + "pagePath": "pages/home/home", + "iconPath": "static/tabbar/home.png", + "selectedIconPath": "static/tabbar/home_selected.png", + "text": "消息" + }, + { + "pagePath": "pages/message/message", + "iconPath": "static/tabbar/consult.png", + "selectedIconPath": "static/tabbar/consult_selected.png", + "text": "咨询" + }, + { + "pagePath": "pages/mine/mine", + "iconPath": "static/tabbar/mine.png", + "selectedIconPath": "static/tabbar/mine_selected.png", + "text": "我的" + } + ] + }, + "uniIdRouter": {} } diff --git a/pages/archive/archive-manage.vue b/pages/archive/archive-manage.vue index 99e4f0a..9bf6019 100644 --- a/pages/archive/archive-manage.vue +++ b/pages/archive/archive-manage.vue @@ -31,8 +31,8 @@ 关联档案 - 完善个人信息 - 删除档案 + 完善个人信息 + diff --git a/pages/archive/edit-archive.vue b/pages/archive/edit-archive.vue index 159734c..aab9a26 100644 --- a/pages/archive/edit-archive.vue +++ b/pages/archive/edit-archive.vue @@ -11,7 +11,8 @@ ({ ...customer.value, ...form.value })); +const formData = computed(() => { + if (customerId.value) { + return { ...customer.value, ...form.value } + } + return { ...customer.value, ...form.value, mobile: account.value?.mobile } +}); function change({ title, value }) { if (title) { @@ -95,6 +101,7 @@ async function addArchive() { loading.value = false; const res = await api('addCustomer', { params }); if (res && res.success) { + uni.$emit('reloadTeamCustomers') uni.redirectTo({ url: `/pages/archive/archive-result?corpId=${corpId.value}&teamId=${teamId.value}` }) @@ -154,7 +161,6 @@ async function getBaseForm() { async function getCustomer() { const res = await api('getCustomerByCustomerId', { customerId: customerId.value }); - console.log(res.data) if (res && res.success && res.data) { customer.value = res.data; } else { @@ -166,9 +172,10 @@ async function getCustomer() { async function updateArchive() { if (Object.keys(form.value).length > 0) { - const res = await api('updateCustomer', { id: customerId.value, ...form.value }); + const res = await api('updateCustomer', { id: customerId.value, params: { ...form.value } }); if (res && res.success) { await toast('修改成功'); + uni.$emit('reloadTeamCustomers') uni.navigateBack(); } else { toast(res?.message || '修改失败'); @@ -178,6 +185,18 @@ async function updateArchive() { } } +async function unBindArchive() { + await uniConfirm('确定删除档案吗?') + const res = await api('unbindMiniAppArchive', { id: customer.value._id, corpId: corpId.value, teamId: teamId.value, miniAppId: account.value.openid }); + if (res && res.success) { + await toast('删除成功'); + uni.$emit('reloadTeamCustomers') + uni.navigateBack(); + } else { + toast(res?.message || '删除失败') + } +} + // async updateCustomer() { // if (Object.keys(this.form).length === 0) return this.editMemberId; // const { success, message } = await updateCustomer( @@ -194,6 +213,7 @@ onLoad(options => { customerId.value = options.id || ''; uni.setNavigationBarTitle({ title: customerId.value ? '编辑档案' : '新增档案' }) }) + useLoad(options => { teamId.value = options.teamId; corpId.value = options.corpId; diff --git a/pages/home/customer-archive.vue b/pages/home/customer-archive.vue index ce1696b..4acdb0b 100644 --- a/pages/home/customer-archive.vue +++ b/pages/home/customer-archive.vue @@ -15,8 +15,7 @@ - {{ i.name }} + + + + {{ i.age > 0 ? i.age + '岁' : '' }} + + @@ -39,24 +45,25 @@ - 该档案还未授权本服务团队,点击右侧授权按钮。我们将更精准的为您服务。 + 点击右侧授权按钮, 我们将更精准的为您服务 授权 - + 个人基本信息 - 完善个人信息 + 请完善您的个人信息 + 完善个人信息 - + @@ -70,7 +77,7 @@