From 7597961a7b763b37b0ba37c97ce6f559371cda7f Mon Sep 17 00:00:00 2001 From: chenwj <654891551@qq.com> Date: Tue, 13 Jun 2023 17:36:18 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E9=A6=96=E9=A1=B5=E5=92=8C?= =?UTF-8?q?=E5=91=98=E5=B7=A5=E5=85=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app.json | 12 +-- app.wxss | 4 +- components/card/index.js | 1 + custom-tab-bar/index.js | 4 +- .../{payroll/payroll.js => employee/index.js} | 21 +++++- pages/employee/index.json | 6 ++ pages/employee/index.wxml | 14 ++++ pages/employee/index.wxss | 26 +++++++ pages/index/index.js | 20 +++-- pages/index/index.json | 6 +- pages/index/index.wxml | 52 ++++++------- pages/index/index.wxss | 73 +++++++++++-------- pages/{my => merchant}/my.js | 0 pages/{my => merchant}/my.json | 0 pages/{my => merchant}/my.wxml | 2 +- pages/{my => merchant}/my.wxss | 2 +- pages/merchant/payroll.js | 40 ++++++++++ pages/merchant/payroll.json | 10 +++ pages/merchant/payroll.wxml | 37 ++++++++++ pages/merchant/payroll.wxss | 55 ++++++++++++++ pages/payroll/payroll.json | 3 - pages/payroll/payroll.wxml | 2 - pages/payroll/payroll.wxss | 1 - project.config.json | 2 +- 24 files changed, 299 insertions(+), 94 deletions(-) rename pages/{payroll/payroll.js => employee/index.js} (61%) create mode 100644 pages/employee/index.json create mode 100644 pages/employee/index.wxml create mode 100644 pages/employee/index.wxss rename pages/{my => merchant}/my.js (100%) rename pages/{my => merchant}/my.json (100%) rename pages/{my => merchant}/my.wxml (93%) rename pages/{my => merchant}/my.wxss (98%) create mode 100644 pages/merchant/payroll.js create mode 100644 pages/merchant/payroll.json create mode 100644 pages/merchant/payroll.wxml create mode 100644 pages/merchant/payroll.wxss delete mode 100644 pages/payroll/payroll.json delete mode 100644 pages/payroll/payroll.wxml delete mode 100644 pages/payroll/payroll.wxss diff --git a/app.json b/app.json index b0bb549..325076b 100644 --- a/app.json +++ b/app.json @@ -2,25 +2,25 @@ "pages": [ "pages/index/index", "pages/logs/logs", - "pages/my/my", - "pages/payroll/payroll" + "pages/merchant/payroll", + "pages/merchant/my", + "pages/employee/index" ], "tabBar": { "custom": true, "list": [ { - "pagePath": "pages/index/index" + "pagePath": "pages/merchant/payroll" }, { - "pagePath": "pages/my/my" + "pagePath": "pages/merchant/my" } ] }, "window": { "backgroundTextStyle": "light", "navigationBarBackgroundColor": "#fff", - "navigationBarTitleText": "发薪Demo", - "navigationBarTextStyle": "black" + "navigationBarTitleText": "发薪Demo" }, "usingComponents": { "t-tab-bar": "tdesign-miniprogram/tab-bar/tab-bar", diff --git a/app.wxss b/app.wxss index 85efbfb..6e4dd1d 100644 --- a/app.wxss +++ b/app.wxss @@ -8,7 +8,7 @@ padding: 200rpx 0; box-sizing: border-box; } -.card { +/* .card { display: flex; flex-direction: column; height: 200px; @@ -18,7 +18,7 @@ .title { font-size: 20px; font-weight: bold; -} +} */ page { background-color: rgb(245, 245, 245); } \ No newline at end of file diff --git a/components/card/index.js b/components/card/index.js index edbad7a..ba14ef0 100644 --- a/components/card/index.js +++ b/components/card/index.js @@ -20,6 +20,7 @@ Component({ * 组件的初始数据 */ data: { + }, /** diff --git a/custom-tab-bar/index.js b/custom-tab-bar/index.js index 8dc85c4..016bc28 100644 --- a/custom-tab-bar/index.js +++ b/custom-tab-bar/index.js @@ -18,10 +18,10 @@ Component({ { value: 1, label: '我的', icon: 'user' }, ], pageList: [{ - url: '/pages/index/index' + url: '/pages/merchant/payroll' }, { - url: '/pages/my/my' + url: '/pages/merchant/my' }] }, /** diff --git a/pages/payroll/payroll.js b/pages/employee/index.js similarity index 61% rename from pages/payroll/payroll.js rename to pages/employee/index.js index 3544251..e1544d8 100644 --- a/pages/payroll/payroll.js +++ b/pages/employee/index.js @@ -1,11 +1,28 @@ -// pages/payroll/payroll.js +// pages/employee/index.js Page({ /** * 页面的初始数据 */ data: { - + iconsList1: [{ + value: 'oa-shenpi', + color: 'orange', + name: '个人信息', + }, { + value: 'zhifushezhi', + color: 'deepskyblue', + name: '薪资卡' + }], + iconsList2: [{ + value: 'oa-shenpi', + color: 'orange', + name: '考勤记录', + }, { + value: 'zhifushezhi', + color: 'deepskyblue', + name: '工资条' + }], }, /** diff --git a/pages/employee/index.json b/pages/employee/index.json new file mode 100644 index 0000000..3e4e883 --- /dev/null +++ b/pages/employee/index.json @@ -0,0 +1,6 @@ +{ + "usingComponents": { + "card": "../../components/card/index", + "t-navbar": "tdesign-miniprogram/navbar/navbar" + } +} \ No newline at end of file diff --git a/pages/employee/index.wxml b/pages/employee/index.wxml new file mode 100644 index 0000000..c02fc7d --- /dev/null +++ b/pages/employee/index.wxml @@ -0,0 +1,14 @@ + + + + + + + + 微信用户 + + + + + + diff --git a/pages/employee/index.wxss b/pages/employee/index.wxss new file mode 100644 index 0000000..6fa7a34 --- /dev/null +++ b/pages/employee/index.wxss @@ -0,0 +1,26 @@ +/* pages/employee/index.wxss */ + +.userinfo { + display: flex; + width: 100%; + flex-direction: row; + background-color: #0052d9; +} +.userinfo-avatar { + overflow: hidden; + width: 128rpx; + height: 128rpx; + margin: 20rpx; + border-radius: 50%; +} + +.userinfo-detail { + display: flex; + flex-direction: column; + margin: 5%; +} + +.userinfo-name { + font-weight: bold; + color: white; +} \ No newline at end of file diff --git a/pages/index/index.js b/pages/index/index.js index 863031c..d543bbf 100644 --- a/pages/index/index.js +++ b/pages/index/index.js @@ -4,7 +4,9 @@ const app = getApp() Page({ data: { - showDialog: false + image1: "https://tdesign.gtimg.com/miniprogram/images/avatar1.png", + image2: "https://tdesign.gtimg.com/miniprogram/images/avatar2.png" + }, // 添加员工 addEmployee(e) { @@ -18,11 +20,16 @@ Page({ showDialog: false }); }, - // 转账记录页面 - switchTransferRecord() { - // TODO - wx.navigateTo({ - url: '/pages/logs/logs', + // 员工页面 + navigateToEmployee() { + wx.navigateTo({ + url: '/pages/employee/index', + }) + }, + // 商户页面 + switchToMerchant() { + wx.switchTab({ + url: '/pages/merchant/payroll', }) }, @@ -34,7 +41,6 @@ Page({ } }, onShow() { - this.getTabBar().init(); }, }) diff --git a/pages/index/index.json b/pages/index/index.json index d3d7d81..bc1ecb3 100644 --- a/pages/index/index.json +++ b/pages/index/index.json @@ -1,11 +1,9 @@ { "usingComponents": { "t-button": "tdesign-miniprogram/button/button", - "t-dialog": "tdesign-miniprogram/dialog/dialog", + "t-avatar": "tdesign-miniprogram/avatar/avatar", "t-row": "tdesign-miniprogram/row/row", "t-col": "tdesign-miniprogram/col/col", - "t-tabs": "tdesign-miniprogram/tabs/tabs", - "t-tab-panel": "tdesign-miniprogram/tab-panel/tab-panel", - "t-empty": "tdesign-miniprogram/empty/empty" + "t-footer": "tdesign-miniprogram/footer/footer" } } \ No newline at end of file diff --git a/pages/index/index.wxml b/pages/index/index.wxml index d9c9a59..6472254 100644 --- a/pages/index/index.wxml +++ b/pages/index/index.wxml @@ -1,36 +1,28 @@ - 欢迎使用智能发薪 - 一键发薪 即时到账 - 一键发薪 - - - - 添加员工 - 快速添加项目员工 - + 智能发薪 + 专业保障, 让发薪更便捷, 更安全 + + + + - - 转账记录 - 转账明细可查 + + 员工入口 + 无需银行卡 实时到账 + 点击进入 - - - - - - - - + + + + + + + 商户入口 + 一键发薪 安全便捷 + 点击进入 + + +当前版本暂不对外开放, 如需使用请先申请 \ No newline at end of file diff --git a/pages/index/index.wxss b/pages/index/index.wxss index bd5e531..954012b 100644 --- a/pages/index/index.wxss +++ b/pages/index/index.wxss @@ -1,4 +1,9 @@ /**index.wxss**/ +page { + background-color: #0052d9; + display: flex; + flex-direction: column; +} .head { display: flex; @@ -8,51 +13,55 @@ padding-top: 5%; padding-bottom: 3%; align-items: center; - background-color: white; - border-radius: 5%; } .title { + color: white; + font-size: 175%; font-weight: bold; + margin-bottom: 2%; } .subtitle { color: lightgray; font-size: 85%; margin-bottom: 5%; } -.head-button { - color: orange; - background-color: orange; - width: 50%; -} -.small-card { - margin-left: 2%; - margin-bottom: 3%; - padding-top: 5%; - padding-left: 20px; +.content { + display: flex; + flex-direction: row; background-color: white; - height: 75px; - border-radius: 5%; + border-radius: 3%; + margin: 5%; + padding: 5%; + padding-bottom: 0%; } -.small-card-title { - font-size: 85%; - font-weight: bold; - margin-bottom: 3%; +.content-avatar { + display: flex; + flex-direction: column; + justify-content: center; + align-items: center; } - -.small-card-subtitle { - color: gray; - font-size: 80%; -} - -.custom-tabs { - margin-bottom: 32rpx; - background-color: gray; - } - -.custom-tab-items { - background-color: rgb(245, 245, 245); - border: hidden; +.avatar { + width: 250rpx; + height: 250rpx; } +.content-title { + font-weight: bold; + /* margin-bottom: 5%; */ +} + +.content-subtitle { + font-size: 85%; + margin-bottom: 5%; + padding: 3%; +} + +.footer { + color: lightgray; + margin-top: 60%; + text-align: center; +} + + diff --git a/pages/my/my.js b/pages/merchant/my.js similarity index 100% rename from pages/my/my.js rename to pages/merchant/my.js diff --git a/pages/my/my.json b/pages/merchant/my.json similarity index 100% rename from pages/my/my.json rename to pages/merchant/my.json diff --git a/pages/my/my.wxml b/pages/merchant/my.wxml similarity index 93% rename from pages/my/my.wxml rename to pages/merchant/my.wxml index bfebc04..e301da2 100644 --- a/pages/my/my.wxml +++ b/pages/merchant/my.wxml @@ -12,6 +12,6 @@ - + \ No newline at end of file diff --git a/pages/my/my.wxss b/pages/merchant/my.wxss similarity index 98% rename from pages/my/my.wxss rename to pages/merchant/my.wxss index 1db2ae3..7a27867 100644 --- a/pages/my/my.wxss +++ b/pages/merchant/my.wxss @@ -14,7 +14,7 @@ height: 128rpx; margin: 20rpx; border-radius: 50%; - } +} .userinfo-detail { display: flex; diff --git a/pages/merchant/payroll.js b/pages/merchant/payroll.js new file mode 100644 index 0000000..a410319 --- /dev/null +++ b/pages/merchant/payroll.js @@ -0,0 +1,40 @@ +// payroll.js +// 获取应用实例 +const app = getApp() + +Page({ + data: { + showDialog: false + }, + // 添加员工 + addEmployee(e) { + console.log(e) + this.setData({ + showDialog: true + }) + }, + closeDialog() { + this.setData({ + showDialog: false + }); + }, + // 转账记录页面 + switchTransferRecord() { + // TODO + wx.navigateTo({ + url: '/pages/logs/logs', + }) + }, + + onLoad() { + if (wx.getUserProfile) { + this.setData({ + canIUseGetUserProfile: true + }) + } + }, + onShow() { + this.getTabBar().init(); + }, + +}) diff --git a/pages/merchant/payroll.json b/pages/merchant/payroll.json new file mode 100644 index 0000000..9c3ec30 --- /dev/null +++ b/pages/merchant/payroll.json @@ -0,0 +1,10 @@ +{ + "usingComponents": { + "t-button": "tdesign-miniprogram/button/button", + "t-dialog": "tdesign-miniprogram/dialog/dialog", + "t-row": "tdesign-miniprogram/row/row", + "t-col": "tdesign-miniprogram/col/col", + "t-tabs": "tdesign-miniprogram/tabs/tabs", + "t-tab-panel": "tdesign-miniprogram/tab-panel/tab-panel" + } +} \ No newline at end of file diff --git a/pages/merchant/payroll.wxml b/pages/merchant/payroll.wxml new file mode 100644 index 0000000..609e208 --- /dev/null +++ b/pages/merchant/payroll.wxml @@ -0,0 +1,37 @@ + + + + 欢迎使用智能发薪 + 一键发薪 即时到账 + 一键发薪 + + + + 添加员工 + 快速添加项目员工 + + + + 转账记录 + 转账明细可查 + + + + + + + + + + + diff --git a/pages/merchant/payroll.wxss b/pages/merchant/payroll.wxss new file mode 100644 index 0000000..2a56555 --- /dev/null +++ b/pages/merchant/payroll.wxss @@ -0,0 +1,55 @@ +/* pages/payroll/payroll.wxss */ + +.head { + display: flex; + flex-direction: column; + margin: 2%; + margin-top: 0%; + padding-top: 5%; + padding-bottom: 3%; + align-items: center; + background-color: white; + border-radius: 5%; +} +.title { + font-weight: bold; +} +.subtitle { + color: lightgray; + font-size: 85%; + margin-bottom: 5%; +} +.head-button { + color: orange; + background-color: orange; + width: 50%; +} +.small-card { + margin-left: 2%; + margin-bottom: 3%; + padding-top: 5%; + padding-left: 20px; + background-color: white; + height: 75px; + border-radius: 5%; +} +.small-card-title { + font-size: 85%; + font-weight: bold; + margin-bottom: 3%; +} + +.small-card-subtitle { + color: gray; + font-size: 80%; +} + +.custom-tabs { + margin-bottom: 32rpx; + background-color: gray; + } + +.custom-tab-items { + background-color: rgb(245, 245, 245); + border: hidden; +} \ No newline at end of file diff --git a/pages/payroll/payroll.json b/pages/payroll/payroll.json deleted file mode 100644 index 3928faa..0000000 --- a/pages/payroll/payroll.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "usingComponents": {} -} \ No newline at end of file diff --git a/pages/payroll/payroll.wxml b/pages/payroll/payroll.wxml deleted file mode 100644 index 19fd079..0000000 --- a/pages/payroll/payroll.wxml +++ /dev/null @@ -1,2 +0,0 @@ - -pages/payroll/payroll.wxml diff --git a/pages/payroll/payroll.wxss b/pages/payroll/payroll.wxss deleted file mode 100644 index 9d86b5a..0000000 --- a/pages/payroll/payroll.wxss +++ /dev/null @@ -1 +0,0 @@ -/* pages/payroll/payroll.wxss */ \ No newline at end of file diff --git a/project.config.json b/project.config.json index cf4c97a..da9b346 100644 --- a/project.config.json +++ b/project.config.json @@ -42,7 +42,7 @@ }, "compileType": "miniprogram", "libVersion": "2.19.4", - "appid": "wx131524437f10d3ea", + "appid": "wxbc8d44f75f7f9ffd", "projectname": "miniprogram-92", "condition": {}, "editorSetting": {