diff --git a/uniapp/api/auth.js b/uniapp/api/auth.js
index 6f4b02a..fd1fd29 100644
--- a/uniapp/api/auth.js
+++ b/uniapp/api/auth.js
@@ -35,10 +35,14 @@ export function loginUAC(data) {
/** 统一认证:选择/切换企业(一人多企业) */
export function switchTenant(data) {
+ let clientId = 'yz-uniapp'
+ // #ifdef MP-WEIXIN
+ clientId = 'yz-miniapp'
+ // #endif
return request({
url: '/auth/switch-tenant',
method: 'POST',
- data: Object.assign({ client_id: 'yz-uniapp' }, data)
+ data: Object.assign({ client_id: clientId }, data)
})
}
diff --git a/uniapp/api/legal.js b/uniapp/api/legal.js
new file mode 100644
index 0000000..f2ad0b8
--- /dev/null
+++ b/uniapp/api/legal.js
@@ -0,0 +1,10 @@
+import { request } from '@/api/request.js'
+
+/** 读取平台端维护的法律单页内容。路径不包含前导斜杠。 */
+export function fetchLegalDocument(path) {
+ return request({
+ url: `/platform/website/page/path/${encodeURIComponent(path)}`,
+ method: 'GET',
+ silent: true
+ })
+}
diff --git a/uniapp/pages.json b/uniapp/pages.json
index 174f0dd..87640a0 100644
--- a/uniapp/pages.json
+++ b/uniapp/pages.json
@@ -1,567 +1,612 @@
{
- "easycom": {
- "autoscan": true,
- "custom": {
- "^u--(.*)": "uview-plus/components/u-$1/u-$1.vue",
- "^up-(.*)": "uview-plus/components/u-$1/u-$1.vue",
- "^u-([^-].*)": "uview-plus/components/u-$1/u-$1.vue"
- }
- },
- "pages": [
- {
- "path": "pages/nav/nav",
- "style": {
- "navigationStyle": "custom",
- "navigationBarTitleText": "选择子系统"
- }
- },
- {
- "path": "pages/sub/tabs",
- "style": {
- "navigationStyle": "custom",
- "navigationBarTitleText": "子系统"
- }
- },
- {
- "path": "pages/crm/home/home",
- "style": {
- "navigationStyle": "custom",
- "navigationBarTitleText": "客户关系管理"
- }
- },
- {
- "path": "pages/crm/functions/functions",
- "style": {
- "navigationStyle": "custom",
- "navigationBarTitleText": "客户关系 · 功能"
- }
- },
- {
- "path": "pages/crm/todo/todo",
- "style": {
- "navigationStyle": "custom",
- "navigationBarTitleText": "客户关系 · 待办"
- }
- },
- {
- "path": "pages/crm/mine/mine",
- "style": {
- "navigationStyle": "custom",
- "navigationBarTitleText": "客户关系 · 我的"
- }
- },
- {
- "path": "pages/erp/home/home",
- "style": {
- "navigationStyle": "custom",
- "navigationBarTitleText": "进销存管理"
- }
- },
- {
- "path": "pages/erp/functions/functions",
- "style": {
- "navigationStyle": "custom",
- "navigationBarTitleText": "进销存 · 功能"
- }
- },
- {
- "path": "pages/erp/todo/todo",
- "style": {
- "navigationStyle": "custom",
- "navigationBarTitleText": "进销存 · 待办"
- }
- },
- {
- "path": "pages/erp/mine/mine",
- "style": {
- "navigationStyle": "custom",
- "navigationBarTitleText": "进销存 · 我的"
- }
- },
- {
- "path": "pages/erp/dashboard/index",
- "style": {
- "navigationBarTitleText": "进销存工作台",
- "navigationBarBackgroundColor": "#F8FAFC",
- "navigationBarTextStyle": "black"
- }
- },
- {
- "path": "pages/erp/document/index",
- "style": {
- "navigationBarTitleText": "单据列表",
- "navigationBarBackgroundColor": "#F8FAFC",
- "navigationBarTextStyle": "black"
- }
- },
- {
- "path": "pages/erp/document/detail",
- "style": {
- "navigationBarTitleText": "单据详情",
- "navigationBarBackgroundColor": "#F8FAFC",
- "navigationBarTextStyle": "black"
- }
- },
- {
- "path": "pages/erp/document/edit",
- "style": {
- "navigationBarTitleText": "开单",
- "navigationBarBackgroundColor": "#F8FAFC",
- "navigationBarTextStyle": "black"
- }
- },
- {
- "path": "pages/erp/basic/product",
- "style": {
- "navigationBarTitleText": "商品档案",
- "navigationBarBackgroundColor": "#F8FAFC",
- "navigationBarTextStyle": "black"
- }
- },
- {
- "path": "pages/erp/basic/product-detail",
- "style": {
- "navigationBarTitleText": "商品详情",
- "navigationBarBackgroundColor": "#F8FAFC",
- "navigationBarTextStyle": "black"
- }
- },
- {
- "path": "pages/erp/basic/warehouse",
- "style": {
- "navigationBarTitleText": "仓库档案",
- "navigationBarBackgroundColor": "#F8FAFC",
- "navigationBarTextStyle": "black"
- }
- },
- {
- "path": "pages/erp/partner/index",
- "style": {
- "navigationBarTitleText": "客商管理",
- "navigationBarBackgroundColor": "#F8FAFC",
- "navigationBarTextStyle": "black"
- }
- },
- {
- "path": "pages/erp/partner/detail",
- "style": {
- "navigationBarTitleText": "客商详情",
- "navigationBarBackgroundColor": "#F8FAFC",
- "navigationBarTextStyle": "black"
- }
- },
- {
- "path": "pages/erp/stock/index",
- "style": {
- "navigationBarTitleText": "库存结存",
- "navigationBarBackgroundColor": "#F8FAFC",
- "navigationBarTextStyle": "black"
- }
- },
- {
- "path": "pages/erp/stock/ledger",
- "style": {
- "navigationBarTitleText": "收发存流水",
- "navigationBarBackgroundColor": "#F8FAFC",
- "navigationBarTextStyle": "black"
- }
- },
- {
- "path": "pages/erp/stock/batch",
- "style": {
- "navigationBarTitleText": "批次效期",
- "navigationBarBackgroundColor": "#F8FAFC",
- "navigationBarTextStyle": "black"
- }
- },
- {
- "path": "pages/erp/stock/warning",
- "style": {
- "navigationBarTitleText": "库存预警",
- "navigationBarBackgroundColor": "#F8FAFC",
- "navigationBarTextStyle": "black"
- }
- },
- {
- "path": "pages/erp/finance/bill",
- "style": {
- "navigationBarTitleText": "应收应付",
- "navigationBarBackgroundColor": "#F8FAFC",
- "navigationBarTextStyle": "black"
- }
- },
- {
- "path": "pages/erp/finance/bill-detail",
- "style": {
- "navigationBarTitleText": "账单详情",
- "navigationBarBackgroundColor": "#F8FAFC",
- "navigationBarTextStyle": "black"
- }
- },
- {
- "path": "pages/erp/finance/fund",
- "style": {
- "navigationBarTitleText": "收付款单",
- "navigationBarBackgroundColor": "#F8FAFC",
- "navigationBarTextStyle": "black"
- }
- },
- {
- "path": "pages/erp/finance/fund-edit",
- "style": {
- "navigationBarTitleText": "收付款",
- "navigationBarBackgroundColor": "#F8FAFC",
- "navigationBarTextStyle": "black"
- }
- },
- {
- "path": "pages/erp/report/index",
- "style": {
- "navigationBarTitleText": "报表中心",
- "navigationBarBackgroundColor": "#F8FAFC",
- "navigationBarTextStyle": "black"
- }
- },
- {
- "path": "pages/oa/home/home",
- "style": {
- "navigationStyle": "custom",
- "navigationBarTitleText": "协同办公"
- }
- },
- {
- "path": "pages/oa/functions/functions",
- "style": {
- "navigationStyle": "custom",
- "navigationBarTitleText": "OA · 功能"
- }
- },
- {
- "path": "pages/oa/todo/todo",
- "style": {
- "navigationStyle": "custom",
- "navigationBarTitleText": "OA · 待办"
- }
- },
- {
- "path": "pages/oa/mine/mine",
- "style": {
- "navigationStyle": "custom",
- "navigationBarTitleText": "OA · 我的"
- }
- },
- {
- "path": "pages/oa/notice/index",
- "style": {
- "navigationBarTitleText": "通知公告",
- "navigationBarBackgroundColor": "#F8FAFC"
- }
- },
- {
- "path": "pages/oa/dailyreport/index",
- "style": {
- "navigationBarTitleText": "工作日报",
- "navigationBarBackgroundColor": "#F8FAFC"
- }
- },
- {
- "path": "pages/oa/dailyreport/edit",
- "style": {
- "navigationBarTitleText": "填写日报",
- "navigationBarBackgroundColor": "#F8FAFC"
- }
- },
- {
- "path": "pages/oa/dailyreport/detail",
- "style": {
- "navigationBarTitleText": "日报详情",
- "navigationBarBackgroundColor": "#F8FAFC"
- }
- },
- {
- "path": "pages/oa/notice/detail",
- "style": {
- "navigationBarTitleText": "公告详情",
- "navigationBarBackgroundColor": "#F8FAFC"
- }
- },
- {
- "path": "pages/oa/document/index",
- "style": {
- "navigationBarTitleText": "文档库",
- "navigationBarBackgroundColor": "#F8FAFC"
- }
- },
- {
- "path": "pages/oa/document/detail",
- "style": {
- "navigationBarTitleText": "文档详情",
- "navigationBarBackgroundColor": "#F8FAFC"
- }
- },
- {
- "path": "pages/oa/compensation/index",
- "style": {
- "navigationBarTitleText": "我的工资单",
- "navigationBarBackgroundColor": "#F8FAFC"
- }
- },
- {
- "path": "pages/oa/compensation/detail",
- "style": {
- "navigationBarTitleText": "工资单明细",
- "navigationBarBackgroundColor": "#F8FAFC"
- }
- },
- {
- "path": "pages/oa/employeefile/index",
- "style": {
- "navigationBarTitleText": "员工档案",
- "navigationBarBackgroundColor": "#F8FAFC"
- }
- },
- {
- "path": "pages/oa/employeefile/detail",
- "style": {
- "navigationBarTitleText": "档案详情",
- "navigationBarBackgroundColor": "#F8FAFC"
- }
- },
- {
- "path": "pages/oa/contact/index",
- "style": {
- "navigationBarTitleText": "通讯录",
- "navigationBarBackgroundColor": "#F8FAFC"
- }
- },
- {
- "path": "pages/oa/contact/detail",
- "style": {
- "navigationBarTitleText": "联系人详情",
- "navigationBarBackgroundColor": "#F8FAFC"
- }
- },
- {
- "path": "pages/cms/home/home",
- "style": {
- "navigationStyle": "custom",
- "navigationBarTitleText": "网站内容管理"
- }
- },
- {
- "path": "pages/cms/functions/functions",
- "style": {
- "navigationStyle": "custom",
- "navigationBarTitleText": "网站管理 · 功能"
- }
- },
- {
- "path": "pages/cms/todo/todo",
- "style": {
- "navigationStyle": "custom",
- "navigationBarTitleText": "网站管理 · 待办"
- }
- },
- {
- "path": "pages/cms/mine/mine",
- "style": {
- "navigationStyle": "custom",
- "navigationBarTitleText": "网站管理 · 我的"
- }
- },
- {
- "path": "pages/toolbox/home/home",
- "style": {
- "navigationStyle": "custom",
- "navigationBarTitleText": "便捷工具"
- }
- },
- {
- "path": "pages/toolbox/functions/functions",
- "style": {
- "navigationStyle": "custom",
- "navigationBarTitleText": "便捷工具 · 功能"
- }
- },
- {
- "path": "pages/toolbox/todo/todo",
- "style": {
- "navigationStyle": "custom",
- "navigationBarTitleText": "便捷工具 · 待办"
- }
- },
- {
- "path": "pages/toolbox/mine/mine",
- "style": {
- "navigationStyle": "custom",
- "navigationBarTitleText": "便捷工具 · 我的"
- }
- },
- {
- "path": "pages/login/login",
- "style": {
- "navigationStyle": "custom",
- "navigationBarTitleText": "登录"
- }
- },
- {
- "path": "pages/login/register",
- "style": {
- "navigationStyle": "custom",
- "navigationBarTitleText": "注册"
- }
- },
- {
- "path": "pages/login/forget",
- "style": {
- "navigationStyle": "custom",
- "navigationBarTitleText": "忘记密码"
- }
- },
- {
- "path": "pages/login/geetest-webview",
- "style": {
- "navigationStyle": "custom",
- "navigationBarTitleText": "人机验证",
- "backgroundColor": "#F8FAFC",
- "app-plus": {
- "animationType": "fade-in",
- "animationDuration": 200,
- "popGesture": "none",
- "bounce": "none"
- }
- }
- },
- {
- "path": "pages/dashboard/dashboard",
- "style": {
- "navigationStyle": "custom",
- "navigationBarTitleText": "仪表盘"
- }
- },
- {
- "path": "pages/features/features",
- "style": {
- "navigationStyle": "custom",
- "navigationBarTitleText": "全部应用"
- }
- },
- {
- "path": "pages/apps/webview",
- "style": {
- "navigationBarTitleText": "功能",
- "navigationBarBackgroundColor": "#ffffff",
- "navigationBarTextStyle": "black"
- }
- },
- {
- "path": "pages/common/developing",
- "style": {
- "navigationBarTitleText": "功能开发中",
- "navigationBarBackgroundColor": "#F8FAFC",
- "navigationBarTextStyle": "black"
- }
- },
- {
- "path": "pages/profile/profile",
- "style": {
- "navigationStyle": "custom",
- "navigationBarTitleText": "我的"
- }
- },
- {
- "path": "pages/tools/notepad/index",
- "style": {
- "navigationBarTitleText": "记事本",
- "navigationBarBackgroundColor": "#F8FAFC"
- }
- },
- {
- "path": "pages/tools/notepad/edit",
- "style": {
- "navigationBarTitleText": "新建笔记",
- "navigationBarBackgroundColor": "#F8FAFC"
- }
- },
- {
- "path": "pages/tools/schedule/index",
- "style": {
- "navigationBarTitleText": "工作日程",
- "navigationBarBackgroundColor": "#F8FAFC"
- }
- },
- {
- "path": "pages/tools/schedule/reminder",
- "style": {
- "navigationBarTitleText": "日程提醒",
- "navigationBarBackgroundColor": "#F8FAFC"
- }
- },
- {
- "path": "pages/tools/schedule/detail",
- "style": {
- "navigationBarTitleText": "日程详情",
- "navigationBarBackgroundColor": "#F8FAFC"
- }
- },
- {
- "path": "pages/tools/schedule/edit",
- "style": {
- "navigationBarTitleText": "新建日程",
- "navigationBarBackgroundColor": "#F8FAFC"
- }
- },
- {
- "path": "pages/tools/expense/index",
- "style": {
- "navigationBarTitleText": "报销管理",
- "navigationBarBackgroundColor": "#F8FAFC"
- }
- },
- {
- "path": "pages/tools/expense/edit",
- "style": {
- "navigationBarTitleText": "新建报销单",
- "navigationBarBackgroundColor": "#F8FAFC"
- }
- },
- {
- "path": "pages/tools/expense/detail",
- "style": {
- "navigationBarTitleText": "报销详情",
- "navigationBarBackgroundColor": "#F8FAFC"
- }
- },
- {
- "path": "pages/approval/index",
- "style": {
- "navigationBarTitleText": "审批列表",
- "navigationBarBackgroundColor": "#F8FAFC"
- }
- },
- {
- "path": "pages/approval/detail",
- "style": {
- "navigationBarTitleText": "审批详情",
- "navigationBarBackgroundColor": "#F8FAFC"
- }
- },
- {
- "path": "pages/approval/verify",
- "style": {
- "navigationBarTitleText": "待我审批",
- "navigationBarBackgroundColor": "#F8FAFC"
- }
- }
- ],
- "globalStyle": {
- "navigationBarTextStyle": "black",
- "navigationBarTitleText": "云泽",
- "navigationBarBackgroundColor": "#F8FAFC",
- "backgroundColor": "#F8FAFC",
- "rpxCalcMaxDeviceWidth": 560,
- "rpxCalcBaseDeviceWidth": 375,
- "rpxCalcIncludeWidth": 750
- },
- "uniIdRouter": {}
-}
+\t"easycom": {
+\t\t"autoscan": true,
+\t\t"custom": {
+\t\t\t"^u--(.*)": "uview-plus/components/u-$1/u-$1.vue",
+\t\t\t"^up-(.*)": "uview-plus/components/u-$1/u-$1.vue",
+\t\t\t"^u-([^-].*)": "uview-plus/components/u-$1/u-$1.vue"
+\t\t}
+\t},
+\t"pages": [
+\t\t{
+\t\t\t"path": "pages/nav/nav",
+\t\t\t"style": {
+\t\t\t\t"navigationStyle": "custom",
+\t\t\t\t"navigationBarTitleText": "选择子系统"
+\t\t\t}
+\t\t},
+\t\t{
+\t\t\t"path": "pages/sub/tabs",
+\t\t\t"style": {
+\t\t\t\t"navigationStyle": "custom",
+\t\t\t\t"navigationBarTitleText": "子系统"
+\t\t\t}
+\t\t},
+\t\t{
+\t\t\t"path": "pages/legal/document",
+\t\t\t"style": {
+\t\t\t\t"navigationBarTitleText": "法律条款",
+\t\t\t\t"navigationBarBackgroundColor": "#f4f8fc",
+\t\t\t\t"navigationBarTextStyle": "black"
+\t\t\t}
+\t\t},
+\t\t{
+\t\t\t"path": "pages/login/login",
+\t\t\t"style": {
+\t\t\t\t"navigationStyle": "custom",
+\t\t\t\t"navigationBarTitleText": "登录"
+\t\t\t}
+\t\t},
+\t\t{
+\t\t\t"path": "pages/login/register",
+\t\t\t"style": {
+\t\t\t\t"navigationStyle": "custom",
+\t\t\t\t"navigationBarTitleText": "注册"
+\t\t\t}
+\t\t},
+\t\t{
+\t\t\t"path": "pages/login/forget",
+\t\t\t"style": {
+\t\t\t\t"navigationStyle": "custom",
+\t\t\t\t"navigationBarTitleText": "忘记密码"
+\t\t\t}
+\t\t},
+\t\t{
+\t\t\t"path": "pages/login/geetest-webview",
+\t\t\t"style": {
+\t\t\t\t"navigationStyle": "custom",
+\t\t\t\t"navigationBarTitleText": "人机验证",
+\t\t\t\t"backgroundColor": "#F8FAFC",
+\t\t\t\t"app-plus": {
+\t\t\t\t\t"animationType": "fade-in",
+\t\t\t\t\t"animationDuration": 200,
+\t\t\t\t\t"popGesture": "none",
+\t\t\t\t\t"bounce": "none"
+\t\t\t\t}
+\t\t\t}
+\t\t},
+\t\t{
+\t\t\t"path": "pages/dashboard/dashboard",
+\t\t\t"style": {
+\t\t\t\t"navigationStyle": "custom",
+\t\t\t\t"navigationBarTitleText": "仪表盘"
+\t\t\t}
+\t\t},
+\t\t{
+\t\t\t"path": "pages/features/features",
+\t\t\t"style": {
+\t\t\t\t"navigationStyle": "custom",
+\t\t\t\t"navigationBarTitleText": "全部应用"
+\t\t\t}
+\t\t},
+\t\t{
+\t\t\t"path": "pages/apps/webview",
+\t\t\t"style": {
+\t\t\t\t"navigationBarTitleText": "功能",
+\t\t\t\t"navigationBarBackgroundColor": "#ffffff",
+\t\t\t\t"navigationBarTextStyle": "black"
+\t\t\t}
+\t\t},
+\t\t{
+\t\t\t"path": "pages/common/developing",
+\t\t\t"style": {
+\t\t\t\t"navigationBarTitleText": "功能开发中",
+\t\t\t\t"navigationBarBackgroundColor": "#F8FAFC",
+\t\t\t\t"navigationBarTextStyle": "black"
+\t\t\t}
+\t\t},
+\t\t{
+\t\t\t"path": "pages/profile/profile",
+\t\t\t"style": {
+\t\t\t\t"navigationStyle": "custom",
+\t\t\t\t"navigationBarTitleText": "我的"
+\t\t\t}
+\t\t}
+\t],
+\t"globalStyle": {
+\t\t"navigationBarTextStyle": "black",
+\t\t"navigationBarTitleText": "云泽",
+\t\t"navigationBarBackgroundColor": "#F8FAFC",
+\t\t"backgroundColor": "#F8FAFC",
+\t\t"rpxCalcMaxDeviceWidth": 560,
+\t\t"rpxCalcBaseDeviceWidth": 375,
+\t\t"rpxCalcIncludeWidth": 750
+\t},
+\t"uniIdRouter": {},
+\t"subPackages": [
+\t\t{
+\t\t\t"root": "pages/crm",
+\t\t\t"pages": [
+\t\t\t\t{
+\t\t\t\t\t"path": "home/home",
+\t\t\t\t\t"style": {
+\t\t\t\t\t\t"navigationStyle": "custom",
+\t\t\t\t\t\t"navigationBarTitleText": "客户关系管理"
+\t\t\t\t\t}
+\t\t\t\t},
+\t\t\t\t{
+\t\t\t\t\t"path": "functions/functions",
+\t\t\t\t\t"style": {
+\t\t\t\t\t\t"navigationStyle": "custom",
+\t\t\t\t\t\t"navigationBarTitleText": "客户关系 · 功能"
+\t\t\t\t\t}
+\t\t\t\t},
+\t\t\t\t{
+\t\t\t\t\t"path": "todo/todo",
+\t\t\t\t\t"style": {
+\t\t\t\t\t\t"navigationStyle": "custom",
+\t\t\t\t\t\t"navigationBarTitleText": "客户关系 · 待办"
+\t\t\t\t\t}
+\t\t\t\t},
+\t\t\t\t{
+\t\t\t\t\t"path": "mine/mine",
+\t\t\t\t\t"style": {
+\t\t\t\t\t\t"navigationStyle": "custom",
+\t\t\t\t\t\t"navigationBarTitleText": "客户关系 · 我的"
+\t\t\t\t\t}
+\t\t\t\t}
+\t\t\t]
+\t\t},
+\t\t{
+\t\t\t"root": "pages/cms",
+\t\t\t"pages": [
+\t\t\t\t{
+\t\t\t\t\t"path": "home/home",
+\t\t\t\t\t"style": {
+\t\t\t\t\t\t"navigationStyle": "custom",
+\t\t\t\t\t\t"navigationBarTitleText": "网站内容管理"
+\t\t\t\t\t}
+\t\t\t\t},
+\t\t\t\t{
+\t\t\t\t\t"path": "functions/functions",
+\t\t\t\t\t"style": {
+\t\t\t\t\t\t"navigationStyle": "custom",
+\t\t\t\t\t\t"navigationBarTitleText": "网站管理 · 功能"
+\t\t\t\t\t}
+\t\t\t\t},
+\t\t\t\t{
+\t\t\t\t\t"path": "todo/todo",
+\t\t\t\t\t"style": {
+\t\t\t\t\t\t"navigationStyle": "custom",
+\t\t\t\t\t\t"navigationBarTitleText": "网站管理 · 待办"
+\t\t\t\t\t}
+\t\t\t\t},
+\t\t\t\t{
+\t\t\t\t\t"path": "mine/mine",
+\t\t\t\t\t"style": {
+\t\t\t\t\t\t"navigationStyle": "custom",
+\t\t\t\t\t\t"navigationBarTitleText": "网站管理 · 我的"
+\t\t\t\t\t}
+\t\t\t\t}
+\t\t\t]
+\t\t},
+\t\t{
+\t\t\t"root": "pages/erp",
+\t\t\t"pages": [
+\t\t\t\t{
+\t\t\t\t\t"path": "home/home",
+\t\t\t\t\t"style": {
+\t\t\t\t\t\t"navigationStyle": "custom",
+\t\t\t\t\t\t"navigationBarTitleText": "进销存管理"
+\t\t\t\t\t}
+\t\t\t\t},
+\t\t\t\t{
+\t\t\t\t\t"path": "functions/functions",
+\t\t\t\t\t"style": {
+\t\t\t\t\t\t"navigationStyle": "custom",
+\t\t\t\t\t\t"navigationBarTitleText": "进销存 · 功能"
+\t\t\t\t\t}
+\t\t\t\t},
+\t\t\t\t{
+\t\t\t\t\t"path": "todo/todo",
+\t\t\t\t\t"style": {
+\t\t\t\t\t\t"navigationStyle": "custom",
+\t\t\t\t\t\t"navigationBarTitleText": "进销存 · 待办"
+\t\t\t\t\t}
+\t\t\t\t},
+\t\t\t\t{
+\t\t\t\t\t"path": "mine/mine",
+\t\t\t\t\t"style": {
+\t\t\t\t\t\t"navigationStyle": "custom",
+\t\t\t\t\t\t"navigationBarTitleText": "进销存 · 我的"
+\t\t\t\t\t}
+\t\t\t\t},
+\t\t\t\t{
+\t\t\t\t\t"path": "dashboard/index",
+\t\t\t\t\t"style": {
+\t\t\t\t\t\t"navigationBarTitleText": "进销存工作台",
+\t\t\t\t\t\t"navigationBarBackgroundColor": "#F8FAFC",
+\t\t\t\t\t\t"navigationBarTextStyle": "black"
+\t\t\t\t\t}
+\t\t\t\t},
+\t\t\t\t{
+\t\t\t\t\t"path": "document/index",
+\t\t\t\t\t"style": {
+\t\t\t\t\t\t"navigationBarTitleText": "单据列表",
+\t\t\t\t\t\t"navigationBarBackgroundColor": "#F8FAFC",
+\t\t\t\t\t\t"navigationBarTextStyle": "black"
+\t\t\t\t\t}
+\t\t\t\t},
+\t\t\t\t{
+\t\t\t\t\t"path": "document/detail",
+\t\t\t\t\t"style": {
+\t\t\t\t\t\t"navigationBarTitleText": "单据详情",
+\t\t\t\t\t\t"navigationBarBackgroundColor": "#F8FAFC",
+\t\t\t\t\t\t"navigationBarTextStyle": "black"
+\t\t\t\t\t}
+\t\t\t\t},
+\t\t\t\t{
+\t\t\t\t\t"path": "document/edit",
+\t\t\t\t\t"style": {
+\t\t\t\t\t\t"navigationBarTitleText": "开单",
+\t\t\t\t\t\t"navigationBarBackgroundColor": "#F8FAFC",
+\t\t\t\t\t\t"navigationBarTextStyle": "black"
+\t\t\t\t\t}
+\t\t\t\t},
+\t\t\t\t{
+\t\t\t\t\t"path": "basic/product",
+\t\t\t\t\t"style": {
+\t\t\t\t\t\t"navigationBarTitleText": "商品档案",
+\t\t\t\t\t\t"navigationBarBackgroundColor": "#F8FAFC",
+\t\t\t\t\t\t"navigationBarTextStyle": "black"
+\t\t\t\t\t}
+\t\t\t\t},
+\t\t\t\t{
+\t\t\t\t\t"path": "basic/product-detail",
+\t\t\t\t\t"style": {
+\t\t\t\t\t\t"navigationBarTitleText": "商品详情",
+\t\t\t\t\t\t"navigationBarBackgroundColor": "#F8FAFC",
+\t\t\t\t\t\t"navigationBarTextStyle": "black"
+\t\t\t\t\t}
+\t\t\t\t},
+\t\t\t\t{
+\t\t\t\t\t"path": "basic/warehouse",
+\t\t\t\t\t"style": {
+\t\t\t\t\t\t"navigationBarTitleText": "仓库档案",
+\t\t\t\t\t\t"navigationBarBackgroundColor": "#F8FAFC",
+\t\t\t\t\t\t"navigationBarTextStyle": "black"
+\t\t\t\t\t}
+\t\t\t\t},
+\t\t\t\t{
+\t\t\t\t\t"path": "partner/index",
+\t\t\t\t\t"style": {
+\t\t\t\t\t\t"navigationBarTitleText": "客商管理",
+\t\t\t\t\t\t"navigationBarBackgroundColor": "#F8FAFC",
+\t\t\t\t\t\t"navigationBarTextStyle": "black"
+\t\t\t\t\t}
+\t\t\t\t},
+\t\t\t\t{
+\t\t\t\t\t"path": "partner/detail",
+\t\t\t\t\t"style": {
+\t\t\t\t\t\t"navigationBarTitleText": "客商详情",
+\t\t\t\t\t\t"navigationBarBackgroundColor": "#F8FAFC",
+\t\t\t\t\t\t"navigationBarTextStyle": "black"
+\t\t\t\t\t}
+\t\t\t\t},
+\t\t\t\t{
+\t\t\t\t\t"path": "stock/index",
+\t\t\t\t\t"style": {
+\t\t\t\t\t\t"navigationBarTitleText": "库存结存",
+\t\t\t\t\t\t"navigationBarBackgroundColor": "#F8FAFC",
+\t\t\t\t\t\t"navigationBarTextStyle": "black"
+\t\t\t\t\t}
+\t\t\t\t},
+\t\t\t\t{
+\t\t\t\t\t"path": "stock/ledger",
+\t\t\t\t\t"style": {
+\t\t\t\t\t\t"navigationBarTitleText": "收发存流水",
+\t\t\t\t\t\t"navigationBarBackgroundColor": "#F8FAFC",
+\t\t\t\t\t\t"navigationBarTextStyle": "black"
+\t\t\t\t\t}
+\t\t\t\t},
+\t\t\t\t{
+\t\t\t\t\t"path": "stock/batch",
+\t\t\t\t\t"style": {
+\t\t\t\t\t\t"navigationBarTitleText": "批次效期",
+\t\t\t\t\t\t"navigationBarBackgroundColor": "#F8FAFC",
+\t\t\t\t\t\t"navigationBarTextStyle": "black"
+\t\t\t\t\t}
+\t\t\t\t},
+\t\t\t\t{
+\t\t\t\t\t"path": "stock/warning",
+\t\t\t\t\t"style": {
+\t\t\t\t\t\t"navigationBarTitleText": "库存预警",
+\t\t\t\t\t\t"navigationBarBackgroundColor": "#F8FAFC",
+\t\t\t\t\t\t"navigationBarTextStyle": "black"
+\t\t\t\t\t}
+\t\t\t\t},
+\t\t\t\t{
+\t\t\t\t\t"path": "finance/bill",
+\t\t\t\t\t"style": {
+\t\t\t\t\t\t"navigationBarTitleText": "应收应付",
+\t\t\t\t\t\t"navigationBarBackgroundColor": "#F8FAFC",
+\t\t\t\t\t\t"navigationBarTextStyle": "black"
+\t\t\t\t\t}
+\t\t\t\t},
+\t\t\t\t{
+\t\t\t\t\t"path": "finance/bill-detail",
+\t\t\t\t\t"style": {
+\t\t\t\t\t\t"navigationBarTitleText": "账单详情",
+\t\t\t\t\t\t"navigationBarBackgroundColor": "#F8FAFC",
+\t\t\t\t\t\t"navigationBarTextStyle": "black"
+\t\t\t\t\t}
+\t\t\t\t},
+\t\t\t\t{
+\t\t\t\t\t"path": "finance/fund",
+\t\t\t\t\t"style": {
+\t\t\t\t\t\t"navigationBarTitleText": "收付款单",
+\t\t\t\t\t\t"navigationBarBackgroundColor": "#F8FAFC",
+\t\t\t\t\t\t"navigationBarTextStyle": "black"
+\t\t\t\t\t}
+\t\t\t\t},
+\t\t\t\t{
+\t\t\t\t\t"path": "finance/fund-edit",
+\t\t\t\t\t"style": {
+\t\t\t\t\t\t"navigationBarTitleText": "收付款",
+\t\t\t\t\t\t"navigationBarBackgroundColor": "#F8FAFC",
+\t\t\t\t\t\t"navigationBarTextStyle": "black"
+\t\t\t\t\t}
+\t\t\t\t},
+\t\t\t\t{
+\t\t\t\t\t"path": "report/index",
+\t\t\t\t\t"style": {
+\t\t\t\t\t\t"navigationBarTitleText": "报表中心",
+\t\t\t\t\t\t"navigationBarBackgroundColor": "#F8FAFC",
+\t\t\t\t\t\t"navigationBarTextStyle": "black"
+\t\t\t\t\t}
+\t\t\t\t}
+\t\t\t]
+\t\t},
+\t\t{
+\t\t\t"root": "pages/oa",
+\t\t\t"pages": [
+\t\t\t\t{
+\t\t\t\t\t"path": "home/home",
+\t\t\t\t\t"style": {
+\t\t\t\t\t\t"navigationStyle": "custom",
+\t\t\t\t\t\t"navigationBarTitleText": "协同办公"
+\t\t\t\t\t}
+\t\t\t\t},
+\t\t\t\t{
+\t\t\t\t\t"path": "functions/functions",
+\t\t\t\t\t"style": {
+\t\t\t\t\t\t"navigationStyle": "custom",
+\t\t\t\t\t\t"navigationBarTitleText": "OA · 功能"
+\t\t\t\t\t}
+\t\t\t\t},
+\t\t\t\t{
+\t\t\t\t\t"path": "todo/todo",
+\t\t\t\t\t"style": {
+\t\t\t\t\t\t"navigationStyle": "custom",
+\t\t\t\t\t\t"navigationBarTitleText": "OA · 待办"
+\t\t\t\t\t}
+\t\t\t\t},
+\t\t\t\t{
+\t\t\t\t\t"path": "mine/mine",
+\t\t\t\t\t"style": {
+\t\t\t\t\t\t"navigationStyle": "custom",
+\t\t\t\t\t\t"navigationBarTitleText": "OA · 我的"
+\t\t\t\t\t}
+\t\t\t\t},
+\t\t\t\t{
+\t\t\t\t\t"path": "notice/index",
+\t\t\t\t\t"style": {
+\t\t\t\t\t\t"navigationBarTitleText": "通知公告",
+\t\t\t\t\t\t"navigationBarBackgroundColor": "#F8FAFC"
+\t\t\t\t\t}
+\t\t\t\t},
+\t\t\t\t{
+\t\t\t\t\t"path": "dailyreport/index",
+\t\t\t\t\t"style": {
+\t\t\t\t\t\t"navigationBarTitleText": "工作日报",
+\t\t\t\t\t\t"navigationBarBackgroundColor": "#F8FAFC"
+\t\t\t\t\t}
+\t\t\t\t},
+\t\t\t\t{
+\t\t\t\t\t"path": "dailyreport/edit",
+\t\t\t\t\t"style": {
+\t\t\t\t\t\t"navigationBarTitleText": "填写日报",
+\t\t\t\t\t\t"navigationBarBackgroundColor": "#F8FAFC"
+\t\t\t\t\t}
+\t\t\t\t},
+\t\t\t\t{
+\t\t\t\t\t"path": "dailyreport/detail",
+\t\t\t\t\t"style": {
+\t\t\t\t\t\t"navigationBarTitleText": "日报详情",
+\t\t\t\t\t\t"navigationBarBackgroundColor": "#F8FAFC"
+\t\t\t\t\t}
+\t\t\t\t},
+\t\t\t\t{
+\t\t\t\t\t"path": "notice/detail",
+\t\t\t\t\t"style": {
+\t\t\t\t\t\t"navigationBarTitleText": "公告详情",
+\t\t\t\t\t\t"navigationBarBackgroundColor": "#F8FAFC"
+\t\t\t\t\t}
+\t\t\t\t},
+\t\t\t\t{
+\t\t\t\t\t"path": "document/index",
+\t\t\t\t\t"style": {
+\t\t\t\t\t\t"navigationBarTitleText": "文档库",
+\t\t\t\t\t\t"navigationBarBackgroundColor": "#F8FAFC"
+\t\t\t\t\t}
+\t\t\t\t},
+\t\t\t\t{
+\t\t\t\t\t"path": "document/detail",
+\t\t\t\t\t"style": {
+\t\t\t\t\t\t"navigationBarTitleText": "文档详情",
+\t\t\t\t\t\t"navigationBarBackgroundColor": "#F8FAFC"
+\t\t\t\t\t}
+\t\t\t\t},
+\t\t\t\t{
+\t\t\t\t\t"path": "compensation/index",
+\t\t\t\t\t"style": {
+\t\t\t\t\t\t"navigationBarTitleText": "我的工资单",
+\t\t\t\t\t\t"navigationBarBackgroundColor": "#F8FAFC"
+\t\t\t\t\t}
+\t\t\t\t},
+\t\t\t\t{
+\t\t\t\t\t"path": "compensation/detail",
+\t\t\t\t\t"style": {
+\t\t\t\t\t\t"navigationBarTitleText": "工资单明细",
+\t\t\t\t\t\t"navigationBarBackgroundColor": "#F8FAFC"
+\t\t\t\t\t}
+\t\t\t\t},
+\t\t\t\t{
+\t\t\t\t\t"path": "employeefile/index",
+\t\t\t\t\t"style": {
+\t\t\t\t\t\t"navigationBarTitleText": "员工档案",
+\t\t\t\t\t\t"navigationBarBackgroundColor": "#F8FAFC"
+\t\t\t\t\t}
+\t\t\t\t},
+\t\t\t\t{
+\t\t\t\t\t"path": "employeefile/detail",
+\t\t\t\t\t"style": {
+\t\t\t\t\t\t"navigationBarTitleText": "档案详情",
+\t\t\t\t\t\t"navigationBarBackgroundColor": "#F8FAFC"
+\t\t\t\t\t}
+\t\t\t\t},
+\t\t\t\t{
+\t\t\t\t\t"path": "contact/index",
+\t\t\t\t\t"style": {
+\t\t\t\t\t\t"navigationBarTitleText": "通讯录",
+\t\t\t\t\t\t"navigationBarBackgroundColor": "#F8FAFC"
+\t\t\t\t\t}
+\t\t\t\t},
+\t\t\t\t{
+\t\t\t\t\t"path": "contact/detail",
+\t\t\t\t\t"style": {
+\t\t\t\t\t\t"navigationBarTitleText": "联系人详情",
+\t\t\t\t\t\t"navigationBarBackgroundColor": "#F8FAFC"
+\t\t\t\t\t}
+\t\t\t\t}
+\t\t\t]
+\t\t},
+\t\t{
+\t\t\t"root": "pages/toolbox",
+\t\t\t"pages": [
+\t\t\t\t{
+\t\t\t\t\t"path": "home/home",
+\t\t\t\t\t"style": {
+\t\t\t\t\t\t"navigationStyle": "custom",
+\t\t\t\t\t\t"navigationBarTitleText": "便捷工具"
+\t\t\t\t\t}
+\t\t\t\t},
+\t\t\t\t{
+\t\t\t\t\t"path": "functions/functions",
+\t\t\t\t\t"style": {
+\t\t\t\t\t\t"navigationStyle": "custom",
+\t\t\t\t\t\t"navigationBarTitleText": "便捷工具 · 功能"
+\t\t\t\t\t}
+\t\t\t\t},
+\t\t\t\t{
+\t\t\t\t\t"path": "todo/todo",
+\t\t\t\t\t"style": {
+\t\t\t\t\t\t"navigationStyle": "custom",
+\t\t\t\t\t\t"navigationBarTitleText": "便捷工具 · 待办"
+\t\t\t\t\t}
+\t\t\t\t},
+\t\t\t\t{
+\t\t\t\t\t"path": "mine/mine",
+\t\t\t\t\t"style": {
+\t\t\t\t\t\t"navigationStyle": "custom",
+\t\t\t\t\t\t"navigationBarTitleText": "便捷工具 · 我的"
+\t\t\t\t\t}
+\t\t\t\t}
+\t\t\t]
+\t\t},
+\t\t{
+\t\t\t"root": "pages/tools",
+\t\t\t"pages": [
+\t\t\t\t{
+\t\t\t\t\t"path": "notepad/index",
+\t\t\t\t\t"style": {
+\t\t\t\t\t\t"navigationBarTitleText": "记事本",
+\t\t\t\t\t\t"navigationBarBackgroundColor": "#F8FAFC"
+\t\t\t\t\t}
+\t\t\t\t},
+\t\t\t\t{
+\t\t\t\t\t"path": "notepad/edit",
+\t\t\t\t\t"style": {
+\t\t\t\t\t\t"navigationBarTitleText": "新建笔记",
+\t\t\t\t\t\t"navigationBarBackgroundColor": "#F8FAFC"
+\t\t\t\t\t}
+\t\t\t\t},
+\t\t\t\t{
+\t\t\t\t\t"path": "schedule/index",
+\t\t\t\t\t"style": {
+\t\t\t\t\t\t"navigationBarTitleText": "工作日程",
+\t\t\t\t\t\t"navigationBarBackgroundColor": "#F8FAFC"
+\t\t\t\t\t}
+\t\t\t\t},
+\t\t\t\t{
+\t\t\t\t\t"path": "schedule/reminder",
+\t\t\t\t\t"style": {
+\t\t\t\t\t\t"navigationBarTitleText": "日程提醒",
+\t\t\t\t\t\t"navigationBarBackgroundColor": "#F8FAFC"
+\t\t\t\t\t}
+\t\t\t\t},
+\t\t\t\t{
+\t\t\t\t\t"path": "schedule/detail",
+\t\t\t\t\t"style": {
+\t\t\t\t\t\t"navigationBarTitleText": "日程详情",
+\t\t\t\t\t\t"navigationBarBackgroundColor": "#F8FAFC"
+\t\t\t\t\t}
+\t\t\t\t},
+\t\t\t\t{
+\t\t\t\t\t"path": "schedule/edit",
+\t\t\t\t\t"style": {
+\t\t\t\t\t\t"navigationBarTitleText": "新建日程",
+\t\t\t\t\t\t"navigationBarBackgroundColor": "#F8FAFC"
+\t\t\t\t\t}
+\t\t\t\t},
+\t\t\t\t{
+\t\t\t\t\t"path": "expense/index",
+\t\t\t\t\t"style": {
+\t\t\t\t\t\t"navigationBarTitleText": "报销管理",
+\t\t\t\t\t\t"navigationBarBackgroundColor": "#F8FAFC"
+\t\t\t\t\t}
+\t\t\t\t},
+\t\t\t\t{
+\t\t\t\t\t"path": "expense/edit",
+\t\t\t\t\t"style": {
+\t\t\t\t\t\t"navigationBarTitleText": "新建报销单",
+\t\t\t\t\t\t"navigationBarBackgroundColor": "#F8FAFC"
+\t\t\t\t\t}
+\t\t\t\t},
+\t\t\t\t{
+\t\t\t\t\t"path": "expense/detail",
+\t\t\t\t\t"style": {
+\t\t\t\t\t\t"navigationBarTitleText": "报销详情",
+\t\t\t\t\t\t"navigationBarBackgroundColor": "#F8FAFC"
+\t\t\t\t\t}
+\t\t\t\t}
+\t\t\t]
+\t\t},
+\t\t{
+\t\t\t"root": "pages/approval",
+\t\t\t"pages": [
+\t\t\t\t{
+\t\t\t\t\t"path": "index",
+\t\t\t\t\t"style": {
+\t\t\t\t\t\t"navigationBarTitleText": "审批列表",
+\t\t\t\t\t\t"navigationBarBackgroundColor": "#F8FAFC"
+\t\t\t\t\t}
+\t\t\t\t},
+\t\t\t\t{
+\t\t\t\t\t"path": "detail",
+\t\t\t\t\t"style": {
+\t\t\t\t\t\t"navigationBarTitleText": "审批详情",
+\t\t\t\t\t\t"navigationBarBackgroundColor": "#F8FAFC"
+\t\t\t\t\t}
+\t\t\t\t},
+\t\t\t\t{
+\t\t\t\t\t"path": "verify",
+\t\t\t\t\t"style": {
+\t\t\t\t\t\t"navigationBarTitleText": "待我审批",
+\t\t\t\t\t\t"navigationBarBackgroundColor": "#F8FAFC"
+\t\t\t\t\t}
+\t\t\t\t}
+\t\t\t]
+\t\t}
+\t]
+}\n
\ No newline at end of file
diff --git a/uniapp/pages/legal/document.vue b/uniapp/pages/legal/document.vue
new file mode 100644
index 0000000..9a551da
--- /dev/null
+++ b/uniapp/pages/legal/document.vue
@@ -0,0 +1,102 @@
+
+
+ 正在加载内容…
+ {{ error }},点此重试
+ 暂未发布此内容,请联系管理员
+
+
+ {{ document.title || pageTitle }}
+
+
+
+
+
+
+
+
+
diff --git a/uniapp/pages/login/login.vue b/uniapp/pages/login/login.vue
index d95c8de..42b333b 100644
--- a/uniapp/pages/login/login.vue
+++ b/uniapp/pages/login/login.vue
@@ -6,7 +6,7 @@
云泽统一认证
- 一次登录,全平台通行
+ 欢迎回来,开启云泽服务
@@ -48,8 +48,8 @@
- 欢迎登录
- {{ panelSub }}
+ {{ showMiniLogin && activeTab === 'account' ? '账号登录' : '欢迎登录' }}
+ {{ panelSub }}
@@ -57,25 +57,7 @@
-
-
-
- 微信登录
-
-
-
- 账号密码登录
-
-
-
+
@@ -86,19 +68,22 @@
@getphonenumber="onGetPhoneNumber"
>
- 微信手机号一键登录
+ {{ submitting ? '登录中...' : '微信一键登录' }}
- 首次使用请先用账号密码登录一次,自动完成微信绑定后即可一键登录
+ 微信安全授权,快捷登录云泽统一认证
-
- 使用账号密码登录
+
+ 账号登录
+
+ ‹ 微信一键登录
+
账号
@@ -167,16 +152,12 @@
登录即表示同意
- 《用户协议》
+ 《用户协议》
和
- 《隐私政策》
+ 《隐私政策》
-
@@ -229,7 +210,10 @@ const showMiniLogin = ref(false)
/** 面板副标题:随 Tab 切换提示文案 */
const panelSub = computed(() => {
if (platform.value === 'mp-weixin' && showMiniLogin.value && activeTab.value === 'wechat') {
- return '使用微信一键登录,或切换到账号密码登录'
+ return '微信授权,安全快捷地登录'
+ }
+ if (platform.value === 'mp-weixin' && showMiniLogin.value && activeTab.value === 'account') {
+ return '使用已注册的账号继续'
}
return '请输入您的账号与密码以继续'
})
@@ -490,11 +474,8 @@ async function onGetPhoneNumber(e) {
uni.showToast({ title: '你已取消手机号授权', icon: 'none' })
return
}
- // 认证中 / 未开通手机号能力:拿不到动态 code 时降级为「按已绑定 openid 登录」
+ // 手机号授权码可能不可用;仍继续尝试按已绑定的 openid 登录
const phoneCode = detail.code && errMsg.indexOf('fail') === -1 ? detail.code : ''
- if (!phoneCode) {
- uni.showToast({ title: '手机号能力暂不可用,按已绑定账号登录', icon: 'none' })
- }
if (!agreed.value) {
const ok = await confirmAgreement()
if (!ok) {
@@ -521,12 +502,11 @@ function handleMiniError(err) {
const reason = err && err.response && err.response.reason
if (reason === 'identity_not_found') {
uni.showModal({
- title: '尚未绑定云泽账号',
- content: '当前微信未绑定云泽账号,且手机号能力暂不可用。请先用账号密码登录一次(会自动完成微信绑定),之后即可一键登录。',
+ title: '暂无使用权限',
+ content: '您没有该程序使用权,请联系企业管理员。也可以使用已有账号登录。',
showCancel: true,
cancelText: '知道了',
- // 微信小程序 showModal 的 confirmText 上限为 4 个汉字,超限会导致 API 失败、弹窗不显示
- confirmText: '去登录',
+ confirmText: '账号登录',
confirmColor: '#2563eb',
success: (res) => {
if (res.confirm) switchTab('account')
@@ -571,9 +551,8 @@ function toggleAgree() {
if (agreed.value) showAgreementTip.value = false
}
-/** 协议占位:正式接入条款页后改为跳转条款页 */
-function showAgreement() {
- uni.showToast({ title: '条款内容待接入', icon: 'none' })
+function openLegal(path, title) {
+ uni.navigateTo({ url: `/pages/legal/document?path=${encodeURIComponent(path)}&title=${encodeURIComponent(title)}` })
}
/**
@@ -627,52 +606,88 @@ function goForget() {
@import '@/src/styles/page-common.scss';
.login-page {
+ position: relative;
min-height: 100vh;
- background: linear-gradient(160deg, #1e3a8a 0%, #2563eb 100%);
- padding: 0 32rpx calc(env(safe-area-inset-bottom, 0px) + 40rpx);
+ background: linear-gradient(145deg, #eaf6ff 0%, #f7fbff 48%, #dceeff 100%);
+ padding: calc(env(safe-area-inset-top, 0px) + 24rpx) 32rpx calc(env(safe-area-inset-bottom, 0px) + 40rpx);
box-sizing: border-box;
+ display: flex;
+ flex-direction: column;
+ justify-content: center;
+ overflow: hidden;
+}
+
+.login-page::before,
+.login-page::after {
+ content: '';
+ position: absolute;
+ border-radius: 50%;
+ pointer-events: none;
+}
+
+.login-page::before {
+ width: 460rpx;
+ height: 460rpx;
+ top: -150rpx;
+ right: -130rpx;
+ background: rgba(111, 192, 255, 0.28);
+}
+
+.login-page::after {
+ width: 360rpx;
+ height: 360rpx;
+ bottom: 100rpx;
+ left: -180rpx;
+ background: rgba(151, 218, 255, 0.2);
}
/* ---------- 品牌区 ---------- */
.brand {
+ position: relative;
+ z-index: 1;
display: flex;
flex-direction: column;
align-items: center;
- padding-top: calc(env(safe-area-inset-top, 0px) + 96rpx);
- padding-bottom: 56rpx;
+ padding-top: calc(env(safe-area-inset-top, 0px) + 56rpx);
+ padding-bottom: 48rpx;
}
.brand-logo {
- width: 88rpx;
- height: 88rpx;
- border-radius: 24rpx;
- background: rgba(255, 255, 255, 0.18);
- border: 1rpx solid rgba(255, 255, 255, 0.3);
+ width: 92rpx;
+ height: 92rpx;
+ border-radius: 30rpx;
+ background: linear-gradient(145deg, #79c8ff, #398fe7);
+ border: 1rpx solid rgba(255, 255, 255, 0.88);
+ box-shadow: 0 16rpx 36rpx rgba(57, 143, 231, 0.28), inset 0 1rpx 0 rgba(255, 255, 255, 0.48);
display: flex;
align-items: center;
justify-content: center;
}
.brand-name {
- margin-top: 20rpx;
- font-size: 34rpx;
- font-weight: 600;
- letter-spacing: 1rpx;
- color: #ffffff;
+ margin-top: 22rpx;
+ font-size: 36rpx;
+ font-weight: 700;
+ letter-spacing: 2rpx;
+ color: #173b67;
}
.brand-desc {
- margin-top: 8rpx;
+ margin-top: 10rpx;
font-size: 24rpx;
- color: rgba(255, 255, 255, 0.76);
+ letter-spacing: 1rpx;
+ color: #7190af;
}
/* ---------- 表单卡片 ---------- */
.card {
- background: $color-card;
- border-radius: 24rpx;
- padding: 44rpx 36rpx 36rpx;
- box-shadow: 0 18rpx 50rpx rgba(37, 96, 169, 0.14);
+ position: relative;
+ z-index: 1;
+ background: rgba(255, 255, 255, 0.72);
+ border: 1rpx solid rgba(255, 255, 255, 0.92);
+ border-radius: 34rpx;
+ padding: 48rpx 36rpx 40rpx;
+ box-shadow: 0 24rpx 70rpx rgba(74, 132, 184, 0.16), inset 0 1rpx 0 rgba(255, 255, 255, 0.9);
}
.panel-head {
@@ -681,9 +696,10 @@ function goForget() {
.panel-title {
display: block;
- font-size: 40rpx;
- font-weight: 600;
- color: $color-text;
+ font-size: 42rpx;
+ font-weight: 700;
+ letter-spacing: 1rpx;
+ color: #183b63;
}
.panel-sub {
@@ -723,10 +739,11 @@ function goForget() {
position: relative;
display: flex;
align-items: center;
- background: #fbfcff;
- border: 1rpx solid $color-border;
- border-radius: $radius-md;
+ background: rgba(248, 252, 255, 0.82);
+ border: 1rpx solid #d8e9f7;
+ border-radius: 18rpx;
padding: 0 20rpx;
+ box-shadow: inset 0 2rpx 8rpx rgba(104, 158, 202, 0.05);
}
.field-input {
@@ -817,11 +834,12 @@ function goForget() {
}
.btn-wechat {
- margin-top: 0;
- height: 88rpx;
- border-radius: $radius-md;
- background: #07c160;
+ margin-top: 8rpx;
+ height: 96rpx;
+ border-radius: 20rpx;
+ background: linear-gradient(110deg, #18b96b 0%, #09a95e 100%);
color: #ffffff;
+ box-shadow: 0 14rpx 28rpx rgba(7, 193, 96, 0.2);
font-size: 28rpx;
display: flex;
align-items: center;
@@ -839,6 +857,37 @@ function goForget() {
}
}
+/* 小程序备用登录入口,弱化账号密码路径 */
+.account-entry {
+ margin: 36rpx auto 0;
+ padding: 8rpx 20rpx;
+ display: flex;
+ justify-content: center;
+}
+
+.account-entry-text {
+ font-size: 24rpx;
+ color: #7995ad;
+}
+
+.account-entry-text {
+ padding-bottom: 4rpx;
+ border-bottom: 1rpx solid #c9dceb;
+}
+
+.account-mode-label {
+ margin: -14rpx 0 22rpx;
+ display: flex;
+ align-items: center;
+ justify-content: flex-start;
+}
+
+.account-mode-back {
+ font-size: 24rpx;
+ color: #5688b7;
+ padding: 8rpx 0;
+}
+
/* 登录方式 Tab:微信登录 / 账号密码登录 */
.login-tabs {
display: flex;
@@ -967,12 +1016,14 @@ function goForget() {
color: $color-text-muted;
}
-/* ---------- 协议与页脚 ---------- */
+/* ---------- 协议 ---------- */
.agreement {
+ position: relative;
+ z-index: 1;
display: flex;
align-items: flex-start;
gap: 12rpx;
- margin-top: 32rpx;
+ margin-top: 30rpx;
padding: 0 8rpx;
}
@@ -982,8 +1033,8 @@ function goForget() {
width: 34rpx;
height: 34rpx;
border-radius: 8rpx;
- border: 2rpx solid rgba(255, 255, 255, 0.75);
- background: rgba(255, 255, 255, 0.14);
+ border: 2rpx solid #bad3e8;
+ background: rgba(255, 255, 255, 0.76);
flex-shrink: 0;
margin-top: 2rpx;
@@ -1010,12 +1061,13 @@ function goForget() {
.agree-text {
flex: 1;
font-size: 22rpx;
- color: rgba(255, 255, 255, 0.78);
+ color: #6e8da8;
line-height: 1.7;
}
.agree-link {
- color: #ffffff;
+ color: #347fbd;
+ font-weight: 500;
}
/* 未勾选协议时的行内提示 */
@@ -1031,20 +1083,8 @@ function goForget() {
.agree-tip-text {
font-size: 22rpx;
- color: #ffd591;
+ color: #ad6400;
line-height: 1.5;
}
-.foot-tip {
- display: flex;
- align-items: center;
- justify-content: center;
- gap: 8rpx;
- margin-top: 40rpx;
-}
-
-.foot-tip-text {
- font-size: 22rpx;
- color: rgba(255, 255, 255, 0.62);
-}
diff --git a/uniapp/pages/nav/nav.vue b/uniapp/pages/nav/nav.vue
index 6d4efa0..e380231 100644
--- a/uniapp/pages/nav/nav.vue
+++ b/uniapp/pages/nav/nav.vue
@@ -3,10 +3,35 @@
- 选择子系统
- {{ enabledCount }}/{{ cards.length }} 已开通
+
+ 工作空间
+ 选择一个应用,开始今天的工作
+
+
+
+
+
+ 当前公司
+ {{ user.tenant || '云泽平台' }}
+
+ {{ user.account }}
+
+
+
+
+
+
+
+ 切换公司
+ 完成
+
+ 选择后将切换当前工作空间
+
+
+ {{ item.tenant_name || `企业${item.tid}` }}{{ Number(item.tid) === currentTid ? '当前工作空间' : '切换到此公司' }}
+
+
- {{ user.tenant || '云泽平台' }} · {{ user.account }}
@@ -53,7 +78,8 @@ import { mpHeadPad } from '@/utils/mpHead.js'
const headPad = mpHeadPad()
import { onShow } from '@dcloudio/uni-app'
-import { isLoggedIn } from '@/utils/auth.js'
+import { isLoggedIn, getTenants, getTid, setAuthTokens, setTid, setTenantName } from '@/utils/auth.js'
+import { switchTenant } from '@/api/auth.js'
import { fetchHome } from '@/api/workspace.js'
import { openMenu } from '@/utils/nav.js'
import { getSubsystemByModule, goSubsystem } from '@/config/subsystems.js'
@@ -80,6 +106,10 @@ const loadError = ref('')
const user = ref({})
const modules = ref([])
const menus = ref([])
+const tenants = ref([])
+const currentTid = ref(0)
+const tenantPickerVisible = ref(false)
+const switchingTenant = ref(false)
/** 叶子菜单(可直接跳转的功能页),已锁定的过滤掉 */
const leafMenus = computed(() => menus.value.filter((m) => m.leaf !== false && !m.locked))
@@ -125,6 +155,8 @@ async function load(force = false) {
try {
const data = await fetchHome(force)
user.value = data.user || {}
+ tenants.value = getTenants()
+ currentTid.value = getTid()
modules.value = Array.isArray(data.modules) ? data.modules : []
menus.value = Array.isArray(data.menus) ? data.menus : []
loadError.value = ''
@@ -159,6 +191,43 @@ function enter(card) {
uni.showToast({ title: card.name + '暂未开放', icon: 'none' })
}
+function openTenantPicker() {
+ if (tenants.value.length < 2) return
+ tenantPickerVisible.value = true
+}
+
+function closeTenantPicker() {
+ if (!switchingTenant.value) tenantPickerVisible.value = false
+}
+
+async function changeTenant(item) {
+ const tid = Number(item && item.tid)
+ if (!tid || tid === currentTid.value || switchingTenant.value) {
+ tenantPickerVisible.value = false
+ return
+ }
+ switchingTenant.value = true
+ uni.showLoading({ title: '正在切换...', mask: true })
+ try {
+ const result = await switchTenant({ tid })
+ if (!result || !result.tokens) throw new Error((result && result.msg) || '切换公司失败')
+ setAuthTokens(result.tokens)
+ setTid(tid)
+ const tenantName = item.tenant_name || `企业${tid}`
+ setTenantName(tenantName)
+ user.value = Object.assign({}, user.value, { tenant: tenantName, tid })
+ currentTid.value = tid
+ tenantPickerVisible.value = false
+ await load(true)
+ uni.showToast({ title: '已切换公司', icon: 'success' })
+ } catch (err) {
+ uni.showToast({ title: (err && err.message) || '切换公司失败', icon: 'none' })
+ } finally {
+ uni.hideLoading()
+ switchingTenant.value = false
+ }
+}
+
/* ==================== 生命周期 ==================== */
onMounted(() => {
@@ -200,23 +269,70 @@ onShow(() => {
}
.head-title {
- font-size: 42rpx;
- font-weight: 600;
- color: $color-text;
+ font-size: 46rpx;
+ font-weight: 700;
+ color: #193d61;
letter-spacing: 1rpx;
}
-.head-count {
- font-size: 23rpx;
- color: $color-text-muted;
+.head-caption {
+ display: block;
+ margin-top: 10rpx;
+ font-size: 24rpx;
+ color: #8aa2b8;
+}
+
+.tenant-switcher {
+ margin-top: 28rpx;
+ padding: 20rpx 22rpx;
+ display: flex;
+ align-items: center;
+ gap: 16rpx;
+ border: 1rpx solid rgba(255, 255, 255, 0.92);
+ border-radius: 24rpx;
+ background: rgba(255, 255, 255, 0.78);
+ box-shadow: 0 12rpx 32rpx rgba(81, 133, 176, 0.08);
+
+ &.selectable:active { background: #f4faff; }
+}
+
+.tenant-mark {
+ width: 68rpx;
+ height: 68rpx;
flex-shrink: 0;
+ border-radius: 20rpx;
+ background: #eaf5ff;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+}
+
+.tenant-current {
+ flex: 1;
+ min-width: 0;
+}
+
+.tenant-label {
+ display: block;
+ margin-bottom: 5rpx;
+ font-size: 20rpx;
+ color: #94aabe;
}
.head-sub {
display: block;
- margin-top: 8rpx;
- font-size: 23rpx;
- color: $color-text-muted;
+ font-size: 28rpx;
+ font-weight: 600;
+ color: #294a68;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+}
+
+.tenant-account {
+ max-width: 180rpx;
+ font-size: 21rpx;
+ color: #8da3b7;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
@@ -231,6 +347,100 @@ onShow(() => {
padding: 8rpx $page-padding-x 0;
}
+.tenant-mask {
+ position: fixed;
+ z-index: 99;
+ left: 0;
+ top: 0;
+ right: 0;
+ bottom: 0;
+ background: rgba(18, 42, 68, 0.32);
+ display: flex;
+ align-items: flex-end;
+}
+
+.tenant-sheet {
+ width: 100%;
+ max-height: 72vh;
+ overflow-y: auto;
+ padding: 38rpx 32rpx calc(env(safe-area-inset-bottom, 0px) + 40rpx);
+ box-sizing: border-box;
+ border-radius: 36rpx 36rpx 0 0;
+ background: linear-gradient(180deg, #f5faff 0%, #ffffff 24%);
+}
+
+.sheet-head {
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+}
+
+.sheet-title {
+ font-size: 32rpx;
+ font-weight: 600;
+ color: #203b56;
+}
+
+.sheet-close {
+ font-size: 25rpx;
+ color: #398fe7;
+ padding: 10rpx;
+}
+
+.sheet-sub {
+ display: block;
+ margin: 8rpx 0 20rpx;
+ font-size: 23rpx;
+ color: #8aa0b4;
+}
+
+.tenant-option {
+ display: flex;
+ align-items: center;
+ gap: 18rpx;
+ padding: 20rpx 16rpx;
+ border-radius: 18rpx;
+ border: 1rpx solid #edf3f8;
+ margin-top: 12rpx;
+
+ &.current {
+ background: #f2f8ff;
+ border-color: #cfe5fa;
+ }
+
+ &.disabled { opacity: 0.6; }
+}
+
+.tenant-option-icon {
+ width: 64rpx;
+ height: 64rpx;
+ border-radius: 18rpx;
+ background: #eaf5ff;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+}
+
+.tenant-option-info {
+ flex: 1;
+ min-width: 0;
+}
+
+.tenant-option-name,
+.tenant-option-meta { display: block; }
+
+.tenant-option-name {
+ font-size: 27rpx;
+ font-weight: 500;
+ color: #294763;
+}
+
+.tenant-option-meta {
+ margin-top: 5rpx;
+ font-size: 22rpx;
+ color: #91a5b8;
+}
+
/* ============ 失败提示 ============ */
.err-box {
display: flex;