From 32a2258ac82b33f202d2dbb4a5121a0c99a08dd0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E6=96=87=E6=B6=9B?= <1909118034@qq.com> Date: Wed, 7 May 2025 21:42:04 +0800 Subject: [PATCH] =?UTF-8?q?=E7=89=A9=E4=B8=9A=E5=82=AC=E7=BC=B4=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=E5=AE=8C=E6=88=90(home)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/fee.ts | 4 + api/login.ts | 6 + pages/index/index.vue | 20 +- pages/mine/index.vue | 39 +- pagesB/agreement/index.vue | 10 +- pagesB/call/index.vue | 841 ++++++++++++++------------------- pagesB/setting/editInfo.vue | 166 +++---- pagesB/setting/index.vue | 4 +- unocss/a-hua-unocss/index.scss | 155 +++--- utils/common.ts | 120 +++-- 10 files changed, 640 insertions(+), 725 deletions(-) create mode 100644 api/fee.ts diff --git a/api/fee.ts b/api/fee.ts new file mode 100644 index 0000000..83318ef --- /dev/null +++ b/api/fee.ts @@ -0,0 +1,4 @@ +import { get, post, put, del } from '../utils/request'; + +export const feeInfo = (data : any = {}) => get('v1/fee/info', data); + diff --git a/api/login.ts b/api/login.ts index c002ba1..e8f8534 100644 --- a/api/login.ts +++ b/api/login.ts @@ -22,3 +22,9 @@ export const logout = (data : any) => get('v1/logout', data); // 获取权限 export const menu = (data : any) => get('v1/menu', data); +// 修改用户信息 +export const changeInfo = (data : any) => post('v2/change/info', data) + +// 用户协议隐私政策 +export const configGet = (data : any) => get('v2/config/get', data); + diff --git a/pages/index/index.vue b/pages/index/index.vue index c172c94..527e273 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -186,11 +186,11 @@ title: '物业催缴', type: 'call' }, - { - image: uni.$globalData?.RESOURCE_URL + 'home/grid/tousu.png', - title: '投诉管理', - type: 'complaint' - }, + // { + // image: uni.$globalData?.RESOURCE_URL + 'home/grid/tousu.png', + // title: '投诉管理', + // type: 'complaint' + // }, // { // image: uni.$globalData?.RESOURCE_URL + 'home/grid/fangke.png', // title: '访客邀请', @@ -216,11 +216,11 @@ title: '商品核销', type: 'verification' }, - { - image: uni.$globalData?.RESOURCE_URL + 'home/grid/gongdan.png', - title: '员工权限', - type: 'permissions' - } + // { + // image: uni.$globalData?.RESOURCE_URL + 'home/grid/gongdan.png', + // title: '员工权限', + // type: 'permissions' + // } ]) diff --git a/pages/mine/index.vue b/pages/mine/index.vue index 41e82b6..12287c9 100644 --- a/pages/mine/index.vue +++ b/pages/mine/index.vue @@ -4,7 +4,8 @@ - + @@ -84,16 +85,11 @@ import { onShow, onReachBottom, Uni } from "@dcloudio/uni-app" import { ref } from "vue" import { useToast } from '@/uni_modules/wot-design-uni' + import { userInfo } from '@/api/login' const Toast = useToast() declare const uni : Uni - const user_info = ref({ - "realname": "里派", - "avatar": "/static/m_avatar.png", - "owner": { - "name": "里派(杭州)网络科技有限公司" - } - }) + const user_info = ref({}) const mine_back = uni.$globalData?.RESOURCE_URL + 'mine/mine-back1.png' const card_back = uni.$globalData?.RESOURCE_URL + 'mine/card-back.png' @@ -151,12 +147,12 @@ // number: 0, // icon: uni.$globalData?.RESOURCE_URL + 'mine/icon/menjin.png' // }, - { - title: '用户协议', - number: 0, - icon: uni.$globalData?.RESOURCE_URL + 'mine/icon/pandian.png', - type: 'protocol' - }, + // { + // title: '用户协议', + // number: 0, + // icon: uni.$globalData?.RESOURCE_URL + 'mine/icon/pandian.png', + // type: 'protocol' + // }, { title: '隐私政策', number: 0, @@ -240,12 +236,19 @@ } } + const getUserInfo = async () => { + const res = await userInfo() + user_info.value = res.data + } + onShow(async () => { - const userInfo = await uni.$store.state.userInfos - userInfo.realname && (user_info.value.realname = userInfo.realname) - userInfo.avatar && (user_info.value.avatar = userInfo.avatar) - userInfo.owner.name && (user_info.value.owner.name = userInfo.owner.name) + // const userInfo = await uni.$store.state.userInfos + // userInfo.realname && (user_info.value.realname = userInfo.realname) + // userInfo.avatar && (user_info.value.avatar = userInfo.avatar) + // userInfo.owner.name && (user_info.value.owner.name = userInfo.owner.name) + + getUserInfo() }) diff --git a/pagesB/agreement/index.vue b/pagesB/agreement/index.vue index 2ff42ca..e1175b1 100644 --- a/pagesB/agreement/index.vue +++ b/pagesB/agreement/index.vue @@ -25,6 +25,7 @@ import { onLoad } from '@dcloudio/uni-app'; import { useNavigation } from '@/hooks/useNavigation'; import { useToast } from '@/uni_modules/wot-design-uni'; + import { configGet } from '@/api/login' const Toast = useToast(); @@ -36,7 +37,13 @@ } = useNavigation(); const paramsType = ref('1') - const rawHtml = ref('
我是内容
') + const rawHtml = ref('') + + const getConfigGet = async () => { + const res = await configGet({group_id:29}) + rawHtml.value = res.data.emp_privacy_agreement + } + // 页面跳转 @@ -62,6 +69,7 @@ // 生命周期钩子 onLoad((options) => { checkRouteStack(); + getConfigGet() paramsType.value = options.type }); diff --git a/pagesB/call/index.vue b/pagesB/call/index.vue index 7cc3eff..51c5a1e 100644 --- a/pagesB/call/index.vue +++ b/pagesB/call/index.vue @@ -1,4 +1,5 @@ -