diff --git a/go/controllers/app_password_store.go b/go/controllers/app_password_store.go new file mode 100644 index 0000000..92c0a71 --- /dev/null +++ b/go/controllers/app_password_store.go @@ -0,0 +1,243 @@ +package controllers + +import ( + "strconv" + "strings" + + "server/middleware" + "server/models" + "server/pkg/identity" + "server/pkg/jwtutil" + + "github.com/beego/beego/v2/client/orm" + "github.com/beego/beego/v2/core/logs" + beego "github.com/beego/beego/v2/server/web" +) + +// ==================== 移动端 PasswordStore ==================== +// +// 移动端「账号管理」(密码库)接口。与 Web 端 /backend/passwordStore 同一套数据 +// (yz_backend_password_store,一个平台下挂多个账号),按 JWT 中的 tid + user_id +// 隔离,小程序「账号管理」页面调用。 + +type AppPasswordStoreController struct { + beego.Controller +} + +// 只放行移动端与租户端令牌:/api/** 仅被 uniapp 调用,平台令牌不该能打移动端接口。 +func (c *AppPasswordStoreController) appPwdClaims() (*jwtutil.Claims, error) { + claims, err := identity.Claims(c.Ctx.Request.Header.Get("Authorization"), identity.EndApp, identity.EndBackend) + if err != nil { + return nil, err + } + if claims.UserID <= 0 || claims.TenantId <= 0 { + return nil, orm.ErrNoRows + } + return claims, nil +} + +// GetList GET /api/passwordStore/list?keyword= +func (c *AppPasswordStoreController) GetList() { + cl, e := c.appPwdClaims() + if e != nil { + passwordReply(&c.Controller, 401, "未登录或无权限", nil) + return + } + qs := models.Orm.QueryTable(new(models.BackendPasswordStore)). + Filter("is_deleted", 0).Filter("tid", cl.TenantId).Filter("user_id", cl.UserID) + if k := strings.TrimSpace(c.GetString("keyword")); k != "" { + cond := orm.NewCondition(). + Or("platform__icontains", k). + Or("url__icontains", k). + Or("accounts__icontains", k). + Or("remark__icontains", k) + qs = qs.SetCond(orm.NewCondition().And("is_deleted", 0).And("tid", cl.TenantId).And("user_id", cl.UserID).AndCond(cond)) + } + var rows []models.BackendPasswordStore + if _, e = qs.OrderBy("-id").All(&rows); e != nil && e != orm.ErrNoRows { + logs.Error("[passwordStore] app list failed: %v", e) + passwordReply(&c.Controller, 500, "查询失败: "+e.Error(), nil) + return + } + res := make([]PasswordStoreItemDTO, 0, len(rows)) + for _, row := range rows { + res = append(res, PasswordStoreItemDTO{ + ID: row.ID, Tid: row.Tid, Platform: row.Platform, URL: row.URL, + Accounts: accountsFromJSON(row.Accounts), Remark: row.Remark, + UserID: row.UserID, CreateTime: row.CreateTime, UpdateTime: row.UpdateTime, + }) + } + passwordReply(&c.Controller, 200, "success", map[string]interface{}{"list": res, "total": len(res)}) +} + +// GetDetail GET /api/passwordStore/detail/:id +func (c *AppPasswordStoreController) GetDetail() { + cl, e := c.appPwdClaims() + if e != nil { + passwordReply(&c.Controller, 401, "未登录或无权限", nil) + return + } + id, e := strconv.Atoi(c.Ctx.Input.Param(":id")) + if e != nil { + passwordReply(&c.Controller, 400, "参数错误", nil) + return + } + var m models.BackendPasswordStore + e = models.Orm.QueryTable(new(models.BackendPasswordStore)). + Filter("id", id).Filter("is_deleted", 0).Filter("tid", cl.TenantId).Filter("user_id", cl.UserID).One(&m) + if e == orm.ErrNoRows { + passwordReply(&c.Controller, 404, "记录不存在", nil) + return + } + if e != nil { + logs.Error("[passwordStore] app detail failed: %v", e) + passwordReply(&c.Controller, 500, "查询失败: "+e.Error(), nil) + return + } + passwordReply(&c.Controller, 200, "success", PasswordStoreItemDTO{ + ID: m.ID, Tid: m.Tid, Platform: m.Platform, URL: m.URL, + Accounts: accountsFromJSON(m.Accounts), Remark: m.Remark, + UserID: m.UserID, CreateTime: m.CreateTime, UpdateTime: m.UpdateTime, + }) +} + +// Create POST /api/passwordStore/create +func (c *AppPasswordStoreController) Create() { + cl, e := c.appPwdClaims() + if e != nil { + passwordReply(&c.Controller, 401, "未登录或无权限", nil) + return + } + p, e := parsePassword(&c.Controller) + if e != nil { + passwordReply(&c.Controller, 400, e.Error(), nil) + return + } + if !validPassword(p) { + passwordReply(&c.Controller, 400, "请输入平台名称", nil) + return + } + if e := validateAccountsUnique(p.Accounts); e != nil { + passwordReply(&c.Controller, 400, e.Error(), nil) + return + } + qs := models.Orm.QueryTable(new(models.BackendPasswordStore)). + Filter("is_deleted", 0).Filter("tid", cl.TenantId).Filter("user_id", cl.UserID) + if existing, e := findSamePlatformRecord(qs, 0, p.Platform, p.URL); e != nil { + passwordReply(&c.Controller, 500, "查询失败: "+e.Error(), nil) + return + } else if existing > 0 { + passwordReply(&c.Controller, 400, "同平台同网址记录已存在,请勿重复添加", nil) + return + } + m := models.BackendPasswordStore{ + Tid: cl.TenantId, UserID: uint64(cl.UserID), + Platform: p.Platform, URL: p.URL, + Accounts: accountsToJSON(p.Accounts), Remark: p.Remark, + } + if _, e = models.Orm.Insert(&m); e != nil { + logs.Error("[passwordStore] app create failed: %v", e) + passwordReply(&c.Controller, 500, "创建失败: "+e.Error(), nil) + return + } + passwordReply(&c.Controller, 200, "success", PasswordStoreItemDTO{ + ID: m.ID, Tid: m.Tid, Platform: m.Platform, URL: m.URL, + Accounts: p.Accounts, Remark: m.Remark, + UserID: m.UserID, CreateTime: m.CreateTime, UpdateTime: m.UpdateTime, + }) +} + +// Update POST /api/passwordStore/update/:id +func (c *AppPasswordStoreController) Update() { + cl, e := c.appPwdClaims() + if e != nil { + passwordReply(&c.Controller, 401, "未登录或无权限", nil) + return + } + id, e := strconv.Atoi(c.Ctx.Input.Param(":id")) + if e != nil { + passwordReply(&c.Controller, 400, "参数错误", nil) + return + } + p, e := parsePassword(&c.Controller) + if e != nil { + passwordReply(&c.Controller, 400, e.Error(), nil) + return + } + if !validPassword(p) { + passwordReply(&c.Controller, 400, "请输入平台名称", nil) + return + } + if e := validateAccountsUnique(p.Accounts); e != nil { + passwordReply(&c.Controller, 400, e.Error(), nil) + return + } + var m models.BackendPasswordStore + e = models.Orm.QueryTable(new(models.BackendPasswordStore)). + Filter("id", id).Filter("is_deleted", 0).Filter("tid", cl.TenantId).Filter("user_id", cl.UserID).One(&m) + if e == orm.ErrNoRows { + passwordReply(&c.Controller, 404, "记录不存在", nil) + return + } + if e != nil { + logs.Error("[passwordStore] app update query failed: %v", e) + passwordReply(&c.Controller, 500, "查询失败: "+e.Error(), nil) + return + } + qs := models.Orm.QueryTable(new(models.BackendPasswordStore)). + Filter("is_deleted", 0).Filter("tid", cl.TenantId).Filter("user_id", cl.UserID) + if existing, e := findSamePlatformRecord(qs, m.ID, p.Platform, p.URL); e != nil { + passwordReply(&c.Controller, 500, "查询失败: "+e.Error(), nil) + return + } else if existing > 0 { + passwordReply(&c.Controller, 400, "同平台同网址记录已存在,请勿重复添加", nil) + return + } + m.Platform = p.Platform + m.URL = p.URL + m.Remark = p.Remark + m.Accounts = accountsToJSON(p.Accounts) + if _, e = models.Orm.Update(&m); e != nil { + logs.Error("[passwordStore] app update failed: %v", e) + passwordReply(&c.Controller, 500, "更新失败: "+e.Error(), nil) + return + } + passwordReply(&c.Controller, 200, "success", PasswordStoreItemDTO{ + ID: m.ID, Tid: m.Tid, Platform: m.Platform, URL: m.URL, + Accounts: p.Accounts, Remark: m.Remark, + UserID: m.UserID, CreateTime: m.CreateTime, UpdateTime: m.UpdateTime, + }) +} + +// Delete DELETE /api/passwordStore/delete/:id +func (c *AppPasswordStoreController) Delete() { + cl, e := c.appPwdClaims() + if e != nil { + passwordReply(&c.Controller, 401, "未登录或无权限", nil) + return + } + id, e := strconv.Atoi(c.Ctx.Input.Param(":id")) + if e != nil { + passwordReply(&c.Controller, 400, "参数错误", nil) + return + } + var m models.BackendPasswordStore + e = models.Orm.QueryTable(new(models.BackendPasswordStore)). + Filter("id", id).Filter("is_deleted", 0).Filter("tid", cl.TenantId).Filter("user_id", cl.UserID).One(&m) + if e == orm.ErrNoRows { + passwordReply(&c.Controller, 404, "记录不存在", nil) + return + } + if e != nil { + logs.Error("[passwordStore] app delete query failed: %v", e) + passwordReply(&c.Controller, 500, "查询失败: "+e.Error(), nil) + return + } + if _, e = models.Orm.Delete(&m); e != nil { + logs.Error("[passwordStore] app delete failed: %v", e) + passwordReply(&c.Controller, 500, "删除失败: "+e.Error(), nil) + return + } + middleware.WriteDeleteLog(uint64(cl.UserID), cl.TenantId, "passwordStore", m.Platform) + passwordReply(&c.Controller, 200, "success", nil) +} diff --git a/go/routers/api/api.go b/go/routers/api/api.go index 12a4bb1..b445197 100644 --- a/go/routers/api/api.go +++ b/go/routers/api/api.go @@ -75,6 +75,11 @@ func Register() { beego.Router("/api/schedule/:id", &controllers.AppReminderController{}, "get:GetDetail;put:Update;delete:Delete") beego.Router("/api/schedule/:id/toggle", &controllers.AppReminderController{}, "post:ToggleComplete") + // 账号管理(密码库,与 /backend/passwordStore/* 同一套数据;字面量路由在 :id 通配之前) + beego.Router("/api/passwordStore/list", &controllers.AppPasswordStoreController{}, "get:GetList") + beego.Router("/api/passwordStore", &controllers.AppPasswordStoreController{}, "post:Create") + beego.Router("/api/passwordStore/:id", &controllers.AppPasswordStoreController{}, "get:GetDetail;post:Update;delete:Delete") + // 记事本 beego.Router("/api/notebook/list", &controllers.AppNotebookController{}, "get:GetList") beego.Router("/api/notebook", &controllers.AppNotebookController{}, "post:Create") diff --git a/platform/src/views/login/index.vue b/platform/src/views/login/index.vue index ac48d67..6aa45b5 100644 --- a/platform/src/views/login/index.vue +++ b/platform/src/views/login/index.vue @@ -519,7 +519,6 @@ onMounted(() => { .catch(() => {}); }); -const goRegister = () => router.push("/register"); const goForget = () => router.push("/forget"); const clearCache = async () => { @@ -892,10 +891,6 @@ const clearCache = async () => { font-size: 13px; } -.register-link { - margin-right: 0px; -} - .forget-link { margin-left: 0px; } diff --git a/uniapp/api/passwordStore.js b/uniapp/api/passwordStore.js new file mode 100644 index 0000000..938e0fe --- /dev/null +++ b/uniapp/api/passwordStore.js @@ -0,0 +1,77 @@ +import { request } from '@/api/request.js' + +/** + * 账号管理(密码库)——记录个人各平台账号。 + * 与 Web 端密码存储管理同一套数据(一个平台下挂多个账号)。 + * 服务端自动过滤当前登录用户的记录,无需传 user_id。 + */ +export function fetchPasswordStores(keyword) { + return request({ + url: '/api/passwordStore/list', + data: keyword ? { keyword } : {} + }).then(data => ({ + list: (data.list || []).map(normalizeStore), + total: data.total || 0 + })) +} + +export function getPasswordStore(id) { + return request({ + url: `/api/passwordStore/detail/${id}` + }).then(normalizeStore) +} + +export function createPasswordStore(data) { + return request({ + url: '/api/passwordStore/create', + method: 'POST', + data: pickStore(data) + }).then(normalizeStore) +} + +export function updatePasswordStore(id, data) { + return request({ + url: `/api/passwordStore/update/${id}`, + method: 'POST', + data: pickStore(data) + }).then(normalizeStore) +} + +export function deletePasswordStore(id) { + return request({ + url: `/api/passwordStore/delete/${id}`, + method: 'DELETE' + }).then(() => true) +} + +/** 只取服务端接收的字段 */ +function pickStore(data) { + return { + platform: data.platform || '', + url: data.url || '', + remark: data.remark || '', + accounts: (data.accounts || []).map(a => ({ + username: a.username || '', + password: a.password || '', + registration_info: a.registration_info || '', + remark: a.remark || '' + })) + } +} + +/** 统一账号列表结构,避免后端缺字段导致渲染报错 */ +function normalizeStore(item) { + const store = item || {} + return { + ...store, + platform: store.platform || '', + url: store.url || '', + remark: store.remark || '', + accounts: (store.accounts || []).map(a => ({ + username: a.username || '', + password: a.password || '', + registration_info: a.registration_info || '', + remark: a.remark || '' + })) + } +} diff --git a/uniapp/components/NoteRichEditor.vue b/uniapp/components/NoteRichEditor.vue index e57bf0a..c36e2d8 100644 --- a/uniapp/components/NoteRichEditor.vue +++ b/uniapp/components/NoteRichEditor.vue @@ -608,52 +608,32 @@ export default { diff --git a/uniapp/pages.json b/uniapp/pages.json index aff884f..f82c6c3 100644 --- a/uniapp/pages.json +++ b/uniapp/pages.json @@ -22,381 +22,6 @@ "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": { @@ -475,90 +100,523 @@ "navigationStyle": "custom", "navigationBarTitleText": "我的" } + } + ], + "subPackages": [ + { + "root": "pages/crm", + "pages": [ + { + "path": "home/home", + "style": { + "navigationStyle": "custom", + "navigationBarTitleText": "客户关系管理" + } + }, + { + "path": "functions/functions", + "style": { + "navigationStyle": "custom", + "navigationBarTitleText": "客户关系 · 功能" + } + }, + { + "path": "todo/todo", + "style": { + "navigationStyle": "custom", + "navigationBarTitleText": "客户关系 · 待办" + } + }, + { + "path": "mine/mine", + "style": { + "navigationStyle": "custom", + "navigationBarTitleText": "客户关系 · 我的" + } + } + ] }, { - "path": "pages/tools/notepad/index", - "style": { - "navigationBarTitleText": "记事本", - "navigationBarBackgroundColor": "#F8FAFC" - } + "root": "pages/erp", + "pages": [ + { + "path": "home/home", + "style": { + "navigationStyle": "custom", + "navigationBarTitleText": "进销存管理" + } + }, + { + "path": "functions/functions", + "style": { + "navigationStyle": "custom", + "navigationBarTitleText": "进销存 · 功能" + } + }, + { + "path": "todo/todo", + "style": { + "navigationStyle": "custom", + "navigationBarTitleText": "进销存 · 待办" + } + }, + { + "path": "mine/mine", + "style": { + "navigationStyle": "custom", + "navigationBarTitleText": "进销存 · 我的" + } + }, + { + "path": "dashboard/index", + "style": { + "navigationBarTitleText": "进销存工作台", + "navigationBarBackgroundColor": "#F8FAFC", + "navigationBarTextStyle": "black" + } + }, + { + "path": "document/index", + "style": { + "navigationBarTitleText": "单据列表", + "navigationBarBackgroundColor": "#F8FAFC", + "navigationBarTextStyle": "black" + } + }, + { + "path": "document/detail", + "style": { + "navigationBarTitleText": "单据详情", + "navigationBarBackgroundColor": "#F8FAFC", + "navigationBarTextStyle": "black" + } + }, + { + "path": "document/edit", + "style": { + "navigationBarTitleText": "开单", + "navigationBarBackgroundColor": "#F8FAFC", + "navigationBarTextStyle": "black" + } + }, + { + "path": "basic/product", + "style": { + "navigationBarTitleText": "商品档案", + "navigationBarBackgroundColor": "#F8FAFC", + "navigationBarTextStyle": "black" + } + }, + { + "path": "basic/product-detail", + "style": { + "navigationBarTitleText": "商品详情", + "navigationBarBackgroundColor": "#F8FAFC", + "navigationBarTextStyle": "black" + } + }, + { + "path": "basic/warehouse", + "style": { + "navigationBarTitleText": "仓库档案", + "navigationBarBackgroundColor": "#F8FAFC", + "navigationBarTextStyle": "black" + } + }, + { + "path": "partner/index", + "style": { + "navigationBarTitleText": "客商管理", + "navigationBarBackgroundColor": "#F8FAFC", + "navigationBarTextStyle": "black" + } + }, + { + "path": "partner/detail", + "style": { + "navigationBarTitleText": "客商详情", + "navigationBarBackgroundColor": "#F8FAFC", + "navigationBarTextStyle": "black" + } + }, + { + "path": "stock/index", + "style": { + "navigationBarTitleText": "库存结存", + "navigationBarBackgroundColor": "#F8FAFC", + "navigationBarTextStyle": "black" + } + }, + { + "path": "stock/ledger", + "style": { + "navigationBarTitleText": "收发存流水", + "navigationBarBackgroundColor": "#F8FAFC", + "navigationBarTextStyle": "black" + } + }, + { + "path": "stock/batch", + "style": { + "navigationBarTitleText": "批次效期", + "navigationBarBackgroundColor": "#F8FAFC", + "navigationBarTextStyle": "black" + } + }, + { + "path": "stock/warning", + "style": { + "navigationBarTitleText": "库存预警", + "navigationBarBackgroundColor": "#F8FAFC", + "navigationBarTextStyle": "black" + } + }, + { + "path": "finance/bill", + "style": { + "navigationBarTitleText": "应收应付", + "navigationBarBackgroundColor": "#F8FAFC", + "navigationBarTextStyle": "black" + } + }, + { + "path": "finance/bill-detail", + "style": { + "navigationBarTitleText": "账单详情", + "navigationBarBackgroundColor": "#F8FAFC", + "navigationBarTextStyle": "black" + } + }, + { + "path": "finance/fund", + "style": { + "navigationBarTitleText": "收付款单", + "navigationBarBackgroundColor": "#F8FAFC", + "navigationBarTextStyle": "black" + } + }, + { + "path": "finance/fund-edit", + "style": { + "navigationBarTitleText": "收付款", + "navigationBarBackgroundColor": "#F8FAFC", + "navigationBarTextStyle": "black" + } + }, + { + "path": "report/index", + "style": { + "navigationBarTitleText": "报表中心", + "navigationBarBackgroundColor": "#F8FAFC", + "navigationBarTextStyle": "black" + } + } + ] }, { - "path": "pages/tools/notepad/edit", - "style": { - "navigationBarTitleText": "新建笔记", - "navigationBarBackgroundColor": "#F8FAFC" - } + "root": "pages/oa", + "pages": [ + { + "path": "home/home", + "style": { + "navigationStyle": "custom", + "navigationBarTitleText": "协同办公" + } + }, + { + "path": "functions/functions", + "style": { + "navigationStyle": "custom", + "navigationBarTitleText": "OA · 功能" + } + }, + { + "path": "todo/todo", + "style": { + "navigationStyle": "custom", + "navigationBarTitleText": "OA · 待办" + } + }, + { + "path": "mine/mine", + "style": { + "navigationStyle": "custom", + "navigationBarTitleText": "OA · 我的" + } + }, + { + "path": "notice/index", + "style": { + "navigationBarTitleText": "通知公告", + "navigationBarBackgroundColor": "#F8FAFC" + } + }, + { + "path": "dailyreport/index", + "style": { + "navigationBarTitleText": "工作日报", + "navigationBarBackgroundColor": "#F8FAFC" + } + }, + { + "path": "dailyreport/edit", + "style": { + "navigationBarTitleText": "填写日报", + "navigationBarBackgroundColor": "#F8FAFC" + } + }, + { + "path": "dailyreport/detail", + "style": { + "navigationBarTitleText": "日报详情", + "navigationBarBackgroundColor": "#F8FAFC" + } + }, + { + "path": "notice/detail", + "style": { + "navigationBarTitleText": "公告详情", + "navigationBarBackgroundColor": "#F8FAFC" + } + }, + { + "path": "document/index", + "style": { + "navigationBarTitleText": "文档库", + "navigationBarBackgroundColor": "#F8FAFC" + } + }, + { + "path": "document/detail", + "style": { + "navigationBarTitleText": "文档详情", + "navigationBarBackgroundColor": "#F8FAFC" + } + }, + { + "path": "compensation/index", + "style": { + "navigationBarTitleText": "我的工资单", + "navigationBarBackgroundColor": "#F8FAFC" + } + }, + { + "path": "compensation/detail", + "style": { + "navigationBarTitleText": "工资单明细", + "navigationBarBackgroundColor": "#F8FAFC" + } + }, + { + "path": "employeefile/index", + "style": { + "navigationBarTitleText": "员工档案", + "navigationBarBackgroundColor": "#F8FAFC" + } + }, + { + "path": "employeefile/detail", + "style": { + "navigationBarTitleText": "档案详情", + "navigationBarBackgroundColor": "#F8FAFC" + } + }, + { + "path": "contact/index", + "style": { + "navigationBarTitleText": "通讯录", + "navigationBarBackgroundColor": "#F8FAFC" + } + }, + { + "path": "contact/detail", + "style": { + "navigationBarTitleText": "联系人详情", + "navigationBarBackgroundColor": "#F8FAFC" + } + } + ] }, { - "path": "pages/tools/schedule/index", - "style": { - "navigationBarTitleText": "工作日程", - "navigationBarBackgroundColor": "#F8FAFC" - } + "root": "pages/cms", + "pages": [ + { + "path": "home/home", + "style": { + "navigationStyle": "custom", + "navigationBarTitleText": "网站内容管理" + } + }, + { + "path": "functions/functions", + "style": { + "navigationStyle": "custom", + "navigationBarTitleText": "网站管理 · 功能" + } + }, + { + "path": "todo/todo", + "style": { + "navigationStyle": "custom", + "navigationBarTitleText": "网站管理 · 待办" + } + }, + { + "path": "mine/mine", + "style": { + "navigationStyle": "custom", + "navigationBarTitleText": "网站管理 · 我的" + } + } + ] }, { - "path": "pages/tools/schedule/reminder", - "style": { - "navigationBarTitleText": "日程提醒", - "navigationBarBackgroundColor": "#F8FAFC" - } + "root": "pages/toolbox", + "pages": [ + { + "path": "home/home", + "style": { + "navigationStyle": "custom", + "navigationBarTitleText": "便捷工具" + } + }, + { + "path": "functions/functions", + "style": { + "navigationStyle": "custom", + "navigationBarTitleText": "便捷工具 · 功能" + } + }, + { + "path": "todo/todo", + "style": { + "navigationStyle": "custom", + "navigationBarTitleText": "便捷工具 · 待办" + } + }, + { + "path": "mine/mine", + "style": { + "navigationStyle": "custom", + "navigationBarTitleText": "便捷工具 · 我的" + } + } + ] }, { - "path": "pages/tools/schedule/detail", - "style": { - "navigationBarTitleText": "日程详情", - "navigationBarBackgroundColor": "#F8FAFC" - } + "root": "pages/tools", + "pages": [ + { + "path": "notepad/index", + "style": { + "navigationBarTitleText": "记事本", + "navigationBarBackgroundColor": "#F8FAFC" + } + }, + { + "path": "notepad/edit", + "style": { + "navigationBarTitleText": "新建笔记", + "navigationBarBackgroundColor": "#F8FAFC" + } + }, + { + "path": "schedule/index", + "style": { + "navigationBarTitleText": "工作日程", + "navigationBarBackgroundColor": "#F8FAFC" + } + }, + { + "path": "schedule/reminder", + "style": { + "navigationBarTitleText": "日程提醒", + "navigationBarBackgroundColor": "#F8FAFC" + } + }, + { + "path": "schedule/reminder-edit", + "style": { + "navigationBarTitleText": "新增日程提醒", + "navigationBarBackgroundColor": "#F8FAFC" + } + }, + { + "path": "schedule/detail", + "style": { + "navigationBarTitleText": "日程详情", + "navigationBarBackgroundColor": "#F8FAFC" + } + }, + { + "path": "schedule/edit", + "style": { + "navigationBarTitleText": "新建日程", + "navigationBarBackgroundColor": "#F8FAFC" + } + }, + { + "path": "expense/index", + "style": { + "navigationBarTitleText": "报销管理", + "navigationBarBackgroundColor": "#F8FAFC" + } + }, + { + "path": "expense/edit", + "style": { + "navigationBarTitleText": "新建报销单", + "navigationBarBackgroundColor": "#F8FAFC" + } + }, + { + "path": "account/index", + "style": { + "navigationBarTitleText": "账号管理", + "navigationBarBackgroundColor": "#F8FAFC" + } + }, + { + "path": "account/edit", + "style": { + "navigationBarTitleText": "新增账号", + "navigationBarBackgroundColor": "#F8FAFC" + } + }, + { + "path": "expense/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" - } + "root": "pages/approval", + "pages": [ + { + "path": "index", + "style": { + "navigationBarTitleText": "审批列表", + "navigationBarBackgroundColor": "#F8FAFC" + } + }, + { + "path": "detail", + "style": { + "navigationBarTitleText": "审批详情", + "navigationBarBackgroundColor": "#F8FAFC" + } + }, + { + "path": "verify", + "style": { + "navigationBarTitleText": "待我审批", + "navigationBarBackgroundColor": "#F8FAFC" + } + } + ] } ], "globalStyle": { diff --git a/uniapp/pages/login/login.vue b/uniapp/pages/login/login.vue index 42b333b..bbb472c 100644 --- a/uniapp/pages/login/login.vue +++ b/uniapp/pages/login/login.vue @@ -1,161 +1,195 @@