From da14783edc746797754b631105eda4ac5ec004a1 Mon Sep 17 00:00:00 2001 From: chenwj <654891551@qq.com> Date: Tue, 6 Jun 2023 16:07:59 +0800 Subject: [PATCH] feat init project --- .eslintrc.js | 31 +++ .gitignore | 15 ++ app.js | 20 ++ app.json | 30 +++ app.wxss | 24 ++ components/card/index.js | 33 +++ components/card/index.json | 6 + components/card/index.wxml | 12 + components/card/index.wxss | 38 +++ custom-tab-bar/index.js | 44 +++ custom-tab-bar/index.json | 4 + custom-tab-bar/index.wxml | 6 + custom-tab-bar/index.wxss | 1 + iconfont.json | 7 + iconfont/iconfont.js | 63 +++++ iconfont/iconfont.json | 4 + iconfont/iconfont.wxml | 26 ++ iconfont/iconfont.wxss | 3 + package-lock.json | 520 ++++++++++++++++++++++++++++++++++++ package.json | 8 + pages/index/index.js | 40 +++ pages/index/index.json | 11 + pages/index/index.wxml | 36 +++ pages/index/index.wxss | 58 ++++ pages/logs/logs.js | 18 ++ pages/logs/logs.json | 4 + pages/logs/logs.wxml | 6 + pages/logs/logs.wxss | 8 + pages/my/my.js | 104 ++++++++ pages/my/my.json | 8 + pages/my/my.wxml | 18 ++ pages/my/my.wxss | 24 ++ pages/payroll/payroll.js | 66 +++++ pages/payroll/payroll.json | 3 + pages/payroll/payroll.wxml | 2 + pages/payroll/payroll.wxss | 1 + project.config.json | 52 ++++ project.private.config.json | 7 + sitemap.json | 7 + utils/util.js | 19 ++ 40 files changed, 1387 insertions(+) create mode 100644 .eslintrc.js create mode 100644 .gitignore create mode 100644 app.js create mode 100644 app.json create mode 100644 app.wxss create mode 100644 components/card/index.js create mode 100644 components/card/index.json create mode 100644 components/card/index.wxml create mode 100644 components/card/index.wxss create mode 100644 custom-tab-bar/index.js create mode 100644 custom-tab-bar/index.json create mode 100644 custom-tab-bar/index.wxml create mode 100644 custom-tab-bar/index.wxss create mode 100644 iconfont.json create mode 100644 iconfont/iconfont.js create mode 100644 iconfont/iconfont.json create mode 100644 iconfont/iconfont.wxml create mode 100644 iconfont/iconfont.wxss create mode 100644 package-lock.json create mode 100644 package.json create mode 100644 pages/index/index.js create mode 100644 pages/index/index.json create mode 100644 pages/index/index.wxml create mode 100644 pages/index/index.wxss create mode 100644 pages/logs/logs.js create mode 100644 pages/logs/logs.json create mode 100644 pages/logs/logs.wxml create mode 100644 pages/logs/logs.wxss create mode 100644 pages/my/my.js create mode 100644 pages/my/my.json create mode 100644 pages/my/my.wxml create mode 100644 pages/my/my.wxss create mode 100644 pages/payroll/payroll.js create mode 100644 pages/payroll/payroll.json create mode 100644 pages/payroll/payroll.wxml create mode 100644 pages/payroll/payroll.wxss create mode 100644 project.config.json create mode 100644 project.private.config.json create mode 100644 sitemap.json create mode 100644 utils/util.js diff --git a/.eslintrc.js b/.eslintrc.js new file mode 100644 index 0000000..115cc02 --- /dev/null +++ b/.eslintrc.js @@ -0,0 +1,31 @@ +/* + * Eslint config file + * Documentation: https://eslint.org/docs/user-guide/configuring/ + * Install the Eslint extension before using this feature. + */ +module.exports = { + env: { + es6: true, + browser: true, + node: true, + }, + ecmaFeatures: { + modules: true, + }, + parserOptions: { + ecmaVersion: 2018, + sourceType: 'module', + }, + globals: { + wx: true, + App: true, + Page: true, + getCurrentPages: true, + getApp: true, + Component: true, + requirePlugin: true, + requireMiniProgram: true, + }, + // extends: 'eslint:recommended', + rules: {}, +} diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..b565c04 --- /dev/null +++ b/.gitignore @@ -0,0 +1,15 @@ +# Windows +[Dd]esktop.ini +Thumbs.db +$RECYCLE.BIN/ + +# macOS +.DS_Store +.fseventsd +.Spotlight-V100 +.TemporaryItems +.Trashes + +# Node.js +node_modules/ +miniprogram_npm/ diff --git a/app.js b/app.js new file mode 100644 index 0000000..e1db57a --- /dev/null +++ b/app.js @@ -0,0 +1,20 @@ +// app.js +App({ + onLaunch() { + // 展示本地存储能力 + const logs = wx.getStorageSync('logs') || [] + logs.unshift(Date.now()) + wx.setStorageSync('logs', logs) + + // 登录 + wx.login({ + success: res => { + // 发送 res.code 到后台换取 openId, sessionKey, unionId + } + }) + }, + globalData: { + userInfo: null, + active: 0, + } +}) diff --git a/app.json b/app.json new file mode 100644 index 0000000..b0bb549 --- /dev/null +++ b/app.json @@ -0,0 +1,30 @@ +{ + "pages": [ + "pages/index/index", + "pages/logs/logs", + "pages/my/my", + "pages/payroll/payroll" + ], + "tabBar": { + "custom": true, + "list": [ + { + "pagePath": "pages/index/index" + }, + { + "pagePath": "pages/my/my" + } + ] + }, + "window": { + "backgroundTextStyle": "light", + "navigationBarBackgroundColor": "#fff", + "navigationBarTitleText": "发薪Demo", + "navigationBarTextStyle": "black" + }, + "usingComponents": { + "t-tab-bar": "tdesign-miniprogram/tab-bar/tab-bar", + "t-tab-bar-item": "tdesign-miniprogram/tab-bar-item/tab-bar-item" + }, + "sitemapLocation": "sitemap.json" +} \ No newline at end of file diff --git a/app.wxss b/app.wxss new file mode 100644 index 0000000..85efbfb --- /dev/null +++ b/app.wxss @@ -0,0 +1,24 @@ +/**app.wxss**/ +.container { + height: 100%; + display: flex; + flex-direction: column; + align-items: center; + justify-content: space-between; + padding: 200rpx 0; + box-sizing: border-box; +} +.card { + display: flex; + flex-direction: column; + height: 200px; + width: 100%; + margin: 5%; +} +.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 new file mode 100644 index 0000000..ad8df03 --- /dev/null +++ b/components/card/index.js @@ -0,0 +1,33 @@ +// components/payroll-manage/index.js +Component({ + /** + * 组件的属性列表 + */ + properties: { + cardName: { + type: String, + value: "", + }, + icons: { + type: Array, + value: [], + } + }, + + /** + * 组件的初始数据 + */ + data: { + list: [ + { value: 'label_1', label: '首页', icon: 'home' }, + { value: 'label_2', label: '应用', icon: 'app' } + ] + }, + + /** + * 组件的方法列表 + */ + methods: { + + } +}) diff --git a/components/card/index.json b/components/card/index.json new file mode 100644 index 0000000..8e7407b --- /dev/null +++ b/components/card/index.json @@ -0,0 +1,6 @@ +{ + "component": true, + "usingComponents": { + "iconfont": "/iconfont/iconfont" + } +} \ No newline at end of file diff --git a/components/card/index.wxml b/components/card/index.wxml new file mode 100644 index 0000000..cd7f34c --- /dev/null +++ b/components/card/index.wxml @@ -0,0 +1,12 @@ + + + {{cardName}} + + + + + + {{item.name}} + + + diff --git a/components/card/index.wxss b/components/card/index.wxss new file mode 100644 index 0000000..9f56b57 --- /dev/null +++ b/components/card/index.wxss @@ -0,0 +1,38 @@ +/* components/payroll-manage/index.wxss */ +.card { + display: flex; + flex-direction: column; + width: 100%; + padding-left: 5%; + padding-bottom: 5%; + /* margin: 5%; */ + background-color: white; + margin-bottom: 5%; +} +.title { + font-size: 105%; + font-weight: bold; + margin-top: 3%; +} +.icon { + flex: 0 0 25%; + display: flex; + flex-direction: row; +} +.card-icon { + overflow: hidden; + width: 100rpx; + height: 100rpx; + margin-left: 20rpx; + margin-right: 50rpx; + margin-top: 30rpx; + margin-bottom: 10rpx; + display: flex; + justify-content: center; + align-items:center; + border-radius: 50%; +} +.card-name { + margin: 20rpx; + margin-bottom: 0%; +} \ No newline at end of file diff --git a/custom-tab-bar/index.js b/custom-tab-bar/index.js new file mode 100644 index 0000000..8dc85c4 --- /dev/null +++ b/custom-tab-bar/index.js @@ -0,0 +1,44 @@ +// custom-tab-bar/index.js +Component({ + + /** + * 组件的属性列表 + */ + properties: { + + }, + + /** + * 组件的初始数据 + */ + data: { + active: 0, + list: [ + { value: 0, label: '发薪', icon: 'money-circle' }, + { value: 1, label: '我的', icon: 'user' }, + ], + pageList: [{ + url: '/pages/index/index' + }, + { + url: '/pages/my/my' + }] + }, + /** + * 组件的方法列表 + */ + methods: { + changePage(e) { + getApp().globalData.active = e.detail.value; + wx.switchTab({ + url: this.data.pageList[e.detail.value].url, + }) + }, + init() { + const page = getCurrentPages().pop(); + this.setData({ + active: this.data.pageList.findIndex(item => item.url === '/' + `${page?.route}`) + }) + } + } +}) \ No newline at end of file diff --git a/custom-tab-bar/index.json b/custom-tab-bar/index.json new file mode 100644 index 0000000..7e37c03 --- /dev/null +++ b/custom-tab-bar/index.json @@ -0,0 +1,4 @@ +{ + "component": true, + "usingComponents": {} +} \ No newline at end of file diff --git a/custom-tab-bar/index.wxml b/custom-tab-bar/index.wxml new file mode 100644 index 0000000..71a96e8 --- /dev/null +++ b/custom-tab-bar/index.wxml @@ -0,0 +1,6 @@ + + + + {{item.label}} + + diff --git a/custom-tab-bar/index.wxss b/custom-tab-bar/index.wxss new file mode 100644 index 0000000..761e72b --- /dev/null +++ b/custom-tab-bar/index.wxss @@ -0,0 +1 @@ +/* custom-tab-bar/index.wxss */ \ No newline at end of file diff --git a/iconfont.json b/iconfont.json new file mode 100644 index 0000000..acdb076 --- /dev/null +++ b/iconfont.json @@ -0,0 +1,7 @@ +{ + "symbol_url": "//at.alicdn.com/t/c/font_4106433_hbvaw7z674t.js", + "save_dir": "./iconfont", + "use_rpx": true, + "trim_icon_prefix": "icon", + "default_icon_size": 18 +} diff --git a/iconfont/iconfont.js b/iconfont/iconfont.js new file mode 100644 index 0000000..5546b4f --- /dev/null +++ b/iconfont/iconfont.js @@ -0,0 +1,63 @@ +Component({ + properties: { + // xiangmuguanli | yuangongguanli | dianzihetong | oa-shenpi | tuanduiguanli | zhifushezhi | baoxian | baoxianzhanghu | zhanghuyue + name: { + type: String, + }, + // string | string[] + color: { + type: null, + observer: function(color) { + this.setData({ + colors: this.fixColor(), + isStr: typeof color === 'string', + }); + } + }, + size: { + type: Number, + value: 18, + observer: function(size) { + this.setData({ + svgSize: size / 750 * wx.getSystemInfoSync().windowWidth, + }); + }, + }, + }, + data: { + colors: '', + svgSize: 18 / 750 * wx.getSystemInfoSync().windowWidth, + quot: '"', + isStr: true, + }, + methods: { + fixColor: function() { + var color = this.data.color; + var hex2rgb = this.hex2rgb; + + if (typeof color === 'string') { + return color.indexOf('#') === 0 ? hex2rgb(color) : color; + } + + return color.map(function (item) { + return item.indexOf('#') === 0 ? hex2rgb(item) : item; + }); + }, + hex2rgb: function(hex) { + var rgb = []; + + hex = hex.substr(1); + + if (hex.length === 3) { + hex = hex.replace(/(.)/g, '$1$1'); + } + + hex.replace(/../g, function(color) { + rgb.push(parseInt(color, 0x10)); + return color; + }); + + return 'rgb(' + rgb.join(',') + ')'; + } + } +}); diff --git a/iconfont/iconfont.json b/iconfont/iconfont.json new file mode 100644 index 0000000..a89ef4d --- /dev/null +++ b/iconfont/iconfont.json @@ -0,0 +1,4 @@ +{ + "component": true, + "usingComponents": {} +} diff --git a/iconfont/iconfont.wxml b/iconfont/iconfont.wxml new file mode 100644 index 0000000..dd02094 --- /dev/null +++ b/iconfont/iconfont.wxml @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/iconfont/iconfont.wxss b/iconfont/iconfont.wxss new file mode 100644 index 0000000..9f68d1a --- /dev/null +++ b/iconfont/iconfont.wxss @@ -0,0 +1,3 @@ +.icon { + background-repeat: no-repeat; +} diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 0000000..efd4d34 --- /dev/null +++ b/package-lock.json @@ -0,0 +1,520 @@ +{ + "name": "payroll", + "lockfileVersion": 2, + "requires": true, + "packages": { + "": { + "dependencies": { + "tdesign-miniprogram": "^1.1.8" + }, + "devDependencies": { + "mini-program-iconfont-cli": "^0.6.1" + } + }, + "node_modules/axios": { + "version": "0.19.2", + "resolved": "https://registry.npmmirror.com/axios/-/axios-0.19.2.tgz", + "integrity": "sha512-fjgm5MvRHLhx+osE2xoekY70AhARk3a6hkN+3Io1jc00jtquGvxYlKlsFUhmUET0V5te6CcZI7lcv2Ym61mjHA==", + "deprecated": "Critical security vulnerability fixed in v0.21.1. For more information, see https://github.com/axios/axios/pull/3410", + "dev": true, + "dependencies": { + "follow-redirects": "1.5.10" + } + }, + "node_modules/balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmmirror.com/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "dev": true + }, + "node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmmirror.com/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/colors": { + "version": "1.4.0", + "resolved": "https://registry.npmmirror.com/colors/-/colors-1.4.0.tgz", + "integrity": "sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA==", + "dev": true, + "engines": { + "node": ">=0.1.90" + } + }, + "node_modules/concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmmirror.com/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", + "dev": true + }, + "node_modules/dayjs": { + "version": "1.11.8", + "resolved": "https://registry.npmmirror.com/dayjs/-/dayjs-1.11.8.tgz", + "integrity": "sha512-LcgxzFoWMEPO7ggRv1Y2N31hUf2R0Vj7fuy/m+Bg1K8rr+KAs1AEy4y9jd5DXe8pbHgX+srkHNS7TH6Q6ZhYeQ==" + }, + "node_modules/debug": { + "version": "3.1.0", + "resolved": "https://registry.npmmirror.com/debug/-/debug-3.1.0.tgz", + "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "dev": true, + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/follow-redirects": { + "version": "1.5.10", + "resolved": "https://registry.npmmirror.com/follow-redirects/-/follow-redirects-1.5.10.tgz", + "integrity": "sha512-0V5l4Cizzvqt5D44aTXbFZz+FtyXV1vrDN6qrelxtfYQKW0KO0W2T/hkE8xvGa/540LkZlkaUjO4ailYTFtHVQ==", + "dev": true, + "dependencies": { + "debug": "=3.1.0" + }, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/fs-extra": { + "version": "8.1.0", + "resolved": "https://registry.npmmirror.com/fs-extra/-/fs-extra-8.1.0.tgz", + "integrity": "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==", + "dev": true, + "dependencies": { + "graceful-fs": "^4.2.0", + "jsonfile": "^4.0.0", + "universalify": "^0.1.0" + }, + "engines": { + "node": ">=6 <7 || >=8" + } + }, + "node_modules/fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmmirror.com/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", + "dev": true + }, + "node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmmirror.com/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "dev": true, + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + } + }, + "node_modules/graceful-fs": { + "version": "4.2.11", + "resolved": "https://registry.npmmirror.com/graceful-fs/-/graceful-fs-4.2.11.tgz", + "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", + "dev": true + }, + "node_modules/inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmmirror.com/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", + "dev": true, + "dependencies": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmmirror.com/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "dev": true + }, + "node_modules/jsonfile": { + "version": "4.0.0", + "resolved": "https://registry.npmmirror.com/jsonfile/-/jsonfile-4.0.0.tgz", + "integrity": "sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==", + "dev": true, + "optionalDependencies": { + "graceful-fs": "^4.1.6" + } + }, + "node_modules/mini-program-iconfont-cli": { + "version": "0.6.1", + "resolved": "https://registry.npmmirror.com/mini-program-iconfont-cli/-/mini-program-iconfont-cli-0.6.1.tgz", + "integrity": "sha512-69FsU+tSevwmHBiL55535Hfh1q0ciRpNyYtiTBZw2bvw9lvW3N/SCTg395P0rkisWMqf1Ki9VYIWeaONvNWy2Q==", + "dev": true, + "dependencies": { + "axios": "^0.19.0", + "colors": "^1.3.3", + "fs-extra": "^8.1.0", + "glob": "^7.1.4", + "minimist": "^1.2.5", + "mkdirp": "^0.5.1", + "tslib": "^1.10.0", + "xml2js": "^0.4.19" + }, + "bin": { + "iconfont": "commands/help.js", + "iconfont-alipay": "commands/createAlipayIcon.js", + "iconfont-baidu": "commands/createBaiduIcon.js", + "iconfont-init": "commands/createJson.js", + "iconfont-kuaishou": "commands/createKuaishouIcon.js", + "iconfont-qq": "commands/createQqIcon.js", + "iconfont-toutiao": "commands/createToutiaoIcon.js", + "iconfont-wechat": "commands/createWechatIcon.js" + } + }, + "node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmmirror.com/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/minimist": { + "version": "1.2.8", + "resolved": "https://registry.npmmirror.com/minimist/-/minimist-1.2.8.tgz", + "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", + "dev": true + }, + "node_modules/mkdirp": { + "version": "0.5.6", + "resolved": "https://registry.npmmirror.com/mkdirp/-/mkdirp-0.5.6.tgz", + "integrity": "sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==", + "dev": true, + "dependencies": { + "minimist": "^1.2.6" + }, + "bin": { + "mkdirp": "bin/cmd.js" + } + }, + "node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmmirror.com/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", + "dev": true + }, + "node_modules/once": { + "version": "1.4.0", + "resolved": "https://registry.npmmirror.com/once/-/once-1.4.0.tgz", + "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", + "dev": true, + "dependencies": { + "wrappy": "1" + } + }, + "node_modules/path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmmirror.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/sax": { + "version": "1.2.4", + "resolved": "https://registry.npmmirror.com/sax/-/sax-1.2.4.tgz", + "integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==", + "dev": true + }, + "node_modules/tdesign-miniprogram": { + "version": "1.1.8", + "resolved": "https://registry.npmmirror.com/tdesign-miniprogram/-/tdesign-miniprogram-1.1.8.tgz", + "integrity": "sha512-BkPAulks69Q6RIYXHsY+hCW2K6ou151WVtiQtDNZ/5o4HLgKgif17+N3DtTnAjyB8HLeoyNFJUjJp7hjdml6pQ==", + "dependencies": { + "dayjs": "^1.10.7" + } + }, + "node_modules/tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmmirror.com/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", + "dev": true + }, + "node_modules/universalify": { + "version": "0.1.2", + "resolved": "https://registry.npmmirror.com/universalify/-/universalify-0.1.2.tgz", + "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", + "dev": true, + "engines": { + "node": ">= 4.0.0" + } + }, + "node_modules/wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmmirror.com/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", + "dev": true + }, + "node_modules/xml2js": { + "version": "0.4.23", + "resolved": "https://registry.npmmirror.com/xml2js/-/xml2js-0.4.23.tgz", + "integrity": "sha512-ySPiMjM0+pLDftHgXY4By0uswI3SPKLDw/i3UXbnO8M/p28zqexCUoPmQFrYD+/1BzhGJSs2i1ERWKJAtiLrug==", + "dev": true, + "dependencies": { + "sax": ">=0.6.0", + "xmlbuilder": "~11.0.0" + }, + "engines": { + "node": ">=4.0.0" + } + }, + "node_modules/xmlbuilder": { + "version": "11.0.1", + "resolved": "https://registry.npmmirror.com/xmlbuilder/-/xmlbuilder-11.0.1.tgz", + "integrity": "sha512-fDlsI/kFEx7gLvbecc0/ohLG50fugQp8ryHzMTuW9vSa1GJ0XYWKnhsUx7oie3G98+r56aTQIUB4kht42R3JvA==", + "dev": true, + "engines": { + "node": ">=4.0" + } + } + }, + "dependencies": { + "axios": { + "version": "0.19.2", + "resolved": "https://registry.npmmirror.com/axios/-/axios-0.19.2.tgz", + "integrity": "sha512-fjgm5MvRHLhx+osE2xoekY70AhARk3a6hkN+3Io1jc00jtquGvxYlKlsFUhmUET0V5te6CcZI7lcv2Ym61mjHA==", + "dev": true, + "requires": { + "follow-redirects": "1.5.10" + } + }, + "balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmmirror.com/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "dev": true + }, + "brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmmirror.com/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "colors": { + "version": "1.4.0", + "resolved": "https://registry.npmmirror.com/colors/-/colors-1.4.0.tgz", + "integrity": "sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA==", + "dev": true + }, + "concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmmirror.com/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", + "dev": true + }, + "dayjs": { + "version": "1.11.8", + "resolved": "https://registry.npmmirror.com/dayjs/-/dayjs-1.11.8.tgz", + "integrity": "sha512-LcgxzFoWMEPO7ggRv1Y2N31hUf2R0Vj7fuy/m+Bg1K8rr+KAs1AEy4y9jd5DXe8pbHgX+srkHNS7TH6Q6ZhYeQ==" + }, + "debug": { + "version": "3.1.0", + "resolved": "https://registry.npmmirror.com/debug/-/debug-3.1.0.tgz", + "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "follow-redirects": { + "version": "1.5.10", + "resolved": "https://registry.npmmirror.com/follow-redirects/-/follow-redirects-1.5.10.tgz", + "integrity": "sha512-0V5l4Cizzvqt5D44aTXbFZz+FtyXV1vrDN6qrelxtfYQKW0KO0W2T/hkE8xvGa/540LkZlkaUjO4ailYTFtHVQ==", + "dev": true, + "requires": { + "debug": "=3.1.0" + } + }, + "fs-extra": { + "version": "8.1.0", + "resolved": "https://registry.npmmirror.com/fs-extra/-/fs-extra-8.1.0.tgz", + "integrity": "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==", + "dev": true, + "requires": { + "graceful-fs": "^4.2.0", + "jsonfile": "^4.0.0", + "universalify": "^0.1.0" + } + }, + "fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmmirror.com/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", + "dev": true + }, + "glob": { + "version": "7.2.3", + "resolved": "https://registry.npmmirror.com/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "dev": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "graceful-fs": { + "version": "4.2.11", + "resolved": "https://registry.npmmirror.com/graceful-fs/-/graceful-fs-4.2.11.tgz", + "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", + "dev": true + }, + "inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmmirror.com/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", + "dev": true, + "requires": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmmirror.com/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "dev": true + }, + "jsonfile": { + "version": "4.0.0", + "resolved": "https://registry.npmmirror.com/jsonfile/-/jsonfile-4.0.0.tgz", + "integrity": "sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==", + "dev": true, + "requires": { + "graceful-fs": "^4.1.6" + } + }, + "mini-program-iconfont-cli": { + "version": "0.6.1", + "resolved": "https://registry.npmmirror.com/mini-program-iconfont-cli/-/mini-program-iconfont-cli-0.6.1.tgz", + "integrity": "sha512-69FsU+tSevwmHBiL55535Hfh1q0ciRpNyYtiTBZw2bvw9lvW3N/SCTg395P0rkisWMqf1Ki9VYIWeaONvNWy2Q==", + "dev": true, + "requires": { + "axios": "^0.19.0", + "colors": "^1.3.3", + "fs-extra": "^8.1.0", + "glob": "^7.1.4", + "minimist": "^1.2.5", + "mkdirp": "^0.5.1", + "tslib": "^1.10.0", + "xml2js": "^0.4.19" + } + }, + "minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmmirror.com/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "minimist": { + "version": "1.2.8", + "resolved": "https://registry.npmmirror.com/minimist/-/minimist-1.2.8.tgz", + "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", + "dev": true + }, + "mkdirp": { + "version": "0.5.6", + "resolved": "https://registry.npmmirror.com/mkdirp/-/mkdirp-0.5.6.tgz", + "integrity": "sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==", + "dev": true, + "requires": { + "minimist": "^1.2.6" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmmirror.com/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", + "dev": true + }, + "once": { + "version": "1.4.0", + "resolved": "https://registry.npmmirror.com/once/-/once-1.4.0.tgz", + "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", + "dev": true, + "requires": { + "wrappy": "1" + } + }, + "path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmmirror.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", + "dev": true + }, + "sax": { + "version": "1.2.4", + "resolved": "https://registry.npmmirror.com/sax/-/sax-1.2.4.tgz", + "integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==", + "dev": true + }, + "tdesign-miniprogram": { + "version": "1.1.8", + "resolved": "https://registry.npmmirror.com/tdesign-miniprogram/-/tdesign-miniprogram-1.1.8.tgz", + "integrity": "sha512-BkPAulks69Q6RIYXHsY+hCW2K6ou151WVtiQtDNZ/5o4HLgKgif17+N3DtTnAjyB8HLeoyNFJUjJp7hjdml6pQ==", + "requires": { + "dayjs": "^1.10.7" + } + }, + "tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmmirror.com/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", + "dev": true + }, + "universalify": { + "version": "0.1.2", + "resolved": "https://registry.npmmirror.com/universalify/-/universalify-0.1.2.tgz", + "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", + "dev": true + }, + "wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmmirror.com/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", + "dev": true + }, + "xml2js": { + "version": "0.4.23", + "resolved": "https://registry.npmmirror.com/xml2js/-/xml2js-0.4.23.tgz", + "integrity": "sha512-ySPiMjM0+pLDftHgXY4By0uswI3SPKLDw/i3UXbnO8M/p28zqexCUoPmQFrYD+/1BzhGJSs2i1ERWKJAtiLrug==", + "dev": true, + "requires": { + "sax": ">=0.6.0", + "xmlbuilder": "~11.0.0" + } + }, + "xmlbuilder": { + "version": "11.0.1", + "resolved": "https://registry.npmmirror.com/xmlbuilder/-/xmlbuilder-11.0.1.tgz", + "integrity": "sha512-fDlsI/kFEx7gLvbecc0/ohLG50fugQp8ryHzMTuW9vSa1GJ0XYWKnhsUx7oie3G98+r56aTQIUB4kht42R3JvA==", + "dev": true + } + } +} diff --git a/package.json b/package.json new file mode 100644 index 0000000..29cc8c3 --- /dev/null +++ b/package.json @@ -0,0 +1,8 @@ +{ + "dependencies": { + "tdesign-miniprogram": "^1.1.8" + }, + "devDependencies": { + "mini-program-iconfont-cli": "^0.6.1" + } +} diff --git a/pages/index/index.js b/pages/index/index.js new file mode 100644 index 0000000..863031c --- /dev/null +++ b/pages/index/index.js @@ -0,0 +1,40 @@ +// index.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/index/index.json b/pages/index/index.json new file mode 100644 index 0000000..d3d7d81 --- /dev/null +++ b/pages/index/index.json @@ -0,0 +1,11 @@ +{ + "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", + "t-empty": "tdesign-miniprogram/empty/empty" + } +} \ No newline at end of file diff --git a/pages/index/index.wxml b/pages/index/index.wxml new file mode 100644 index 0000000..d9c9a59 --- /dev/null +++ b/pages/index/index.wxml @@ -0,0 +1,36 @@ + + + + 欢迎使用智能发薪 + 一键发薪 即时到账 + 一键发薪 + + + + 添加员工 + 快速添加项目员工 + + + + 转账记录 + 转账明细可查 + + + + + + + + + + diff --git a/pages/index/index.wxss b/pages/index/index.wxss new file mode 100644 index 0000000..bd5e531 --- /dev/null +++ b/pages/index/index.wxss @@ -0,0 +1,58 @@ +/**index.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; +} + + + diff --git a/pages/logs/logs.js b/pages/logs/logs.js new file mode 100644 index 0000000..85f6aac --- /dev/null +++ b/pages/logs/logs.js @@ -0,0 +1,18 @@ +// logs.js +const util = require('../../utils/util.js') + +Page({ + data: { + logs: [] + }, + onLoad() { + this.setData({ + logs: (wx.getStorageSync('logs') || []).map(log => { + return { + date: util.formatTime(new Date(log)), + timeStamp: log + } + }) + }) + } +}) diff --git a/pages/logs/logs.json b/pages/logs/logs.json new file mode 100644 index 0000000..3ee76c1 --- /dev/null +++ b/pages/logs/logs.json @@ -0,0 +1,4 @@ +{ + "navigationBarTitleText": "查看启动日志", + "usingComponents": {} +} \ No newline at end of file diff --git a/pages/logs/logs.wxml b/pages/logs/logs.wxml new file mode 100644 index 0000000..0b6b645 --- /dev/null +++ b/pages/logs/logs.wxml @@ -0,0 +1,6 @@ + + + + {{index + 1}}. {{log.date}} + + diff --git a/pages/logs/logs.wxss b/pages/logs/logs.wxss new file mode 100644 index 0000000..94d4b88 --- /dev/null +++ b/pages/logs/logs.wxss @@ -0,0 +1,8 @@ +.log-list { + display: flex; + flex-direction: column; + padding: 40rpx; +} +.log-item { + margin: 10rpx; +} diff --git a/pages/my/my.js b/pages/my/my.js new file mode 100644 index 0000000..b0715d3 --- /dev/null +++ b/pages/my/my.js @@ -0,0 +1,104 @@ +// pages/my/my.js +Page({ + + /** + * 页面的初始数据 + */ + data: { + iconsList1: [{ + value: 'oa-shenpi', + color: 'orange', + name: 'OA审批' + }, { + value: 'zhifushezhi', + color: 'deepskyblue', + name: '支付设置' + }], + iconsList2: [{ + value: 'xiangmuguanli', + color: 'deepskyblue', + name: '项目管理' + }, { + value: 'zhanghuyue', + color: 'mediumpurple', + name: '账号余额' + }, { + value: 'yuangongguanli', + color: 'deepskyblue', + name: '员工库' + }, { + value: 'tuanduiguanli', + color: 'red', + name: '团队管理' + }], + iconsList3: [{ + value: 'dianzihetong', + color: 'springgreen', + name: '电子合同' + },{ + value: 'baoxian', + color: 'orange', + name: '投保项目' + },{ + value: 'baoxianzhanghu', + color: 'deepskyblue', + name: '保险账户' + }] + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad(options) { + + }, + + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady() { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow() { + this.getTabBar().init(); + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide() { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload() { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh() { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom() { + + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage() { + + } +}) \ No newline at end of file diff --git a/pages/my/my.json b/pages/my/my.json new file mode 100644 index 0000000..3ade3ff --- /dev/null +++ b/pages/my/my.json @@ -0,0 +1,8 @@ +{ + "usingComponents": { + "t-icon": "tdesign-miniprogram/icon/icon", + "t-cell": "tdesign-miniprogram/cell/cell", + "card": "../../components/card/index", + "iconfont": "/iconfont/iconfont" + } +} \ No newline at end of file diff --git a/pages/my/my.wxml b/pages/my/my.wxml new file mode 100644 index 0000000..340fee5 --- /dev/null +++ b/pages/my/my.wxml @@ -0,0 +1,18 @@ + + + + + + + + 微信用户 + 驻场 + + + + + + + + + diff --git a/pages/my/my.wxss b/pages/my/my.wxss new file mode 100644 index 0000000..c36ce17 --- /dev/null +++ b/pages/my/my.wxss @@ -0,0 +1,24 @@ +/* pages/my/my.wxss */ + +.userinfo { + display: flex; + flex-direction: row; + background-color: white; +} +.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; +} \ No newline at end of file diff --git a/pages/payroll/payroll.js b/pages/payroll/payroll.js new file mode 100644 index 0000000..3544251 --- /dev/null +++ b/pages/payroll/payroll.js @@ -0,0 +1,66 @@ +// pages/payroll/payroll.js +Page({ + + /** + * 页面的初始数据 + */ + data: { + + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad(options) { + + }, + + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady() { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow() { + + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide() { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload() { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh() { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom() { + + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage() { + + } +}) \ No newline at end of file diff --git a/pages/payroll/payroll.json b/pages/payroll/payroll.json new file mode 100644 index 0000000..3928faa --- /dev/null +++ b/pages/payroll/payroll.json @@ -0,0 +1,3 @@ +{ + "usingComponents": {} +} \ No newline at end of file diff --git a/pages/payroll/payroll.wxml b/pages/payroll/payroll.wxml new file mode 100644 index 0000000..19fd079 --- /dev/null +++ b/pages/payroll/payroll.wxml @@ -0,0 +1,2 @@ + +pages/payroll/payroll.wxml diff --git a/pages/payroll/payroll.wxss b/pages/payroll/payroll.wxss new file mode 100644 index 0000000..9d86b5a --- /dev/null +++ b/pages/payroll/payroll.wxss @@ -0,0 +1 @@ +/* pages/payroll/payroll.wxss */ \ No newline at end of file diff --git a/project.config.json b/project.config.json new file mode 100644 index 0000000..cf4c97a --- /dev/null +++ b/project.config.json @@ -0,0 +1,52 @@ +{ + "description": "项目配置文件", + "packOptions": { + "ignore": [], + "include": [] + }, + "setting": { + "bundle": false, + "userConfirmedBundleSwitch": false, + "urlCheck": true, + "scopeDataCheck": false, + "coverView": true, + "es6": true, + "postcss": true, + "compileHotReLoad": false, + "lazyloadPlaceholderEnable": false, + "preloadBackgroundData": false, + "minified": true, + "autoAudits": false, + "newFeature": false, + "uglifyFileName": false, + "uploadWithSourceMap": true, + "useIsolateContext": true, + "nodeModules": false, + "enhance": true, + "useMultiFrameRuntime": true, + "useApiHook": true, + "useApiHostProcess": true, + "showShadowRootInWxmlPanel": true, + "packNpmManually": false, + "enableEngineNative": false, + "packNpmRelationList": [], + "minifyWXSS": true, + "showES6CompileOption": false, + "minifyWXML": true, + "babelSetting": { + "ignore": [], + "disablePlugins": [], + "outputPath": "" + }, + "condition": false + }, + "compileType": "miniprogram", + "libVersion": "2.19.4", + "appid": "wx131524437f10d3ea", + "projectname": "miniprogram-92", + "condition": {}, + "editorSetting": { + "tabIndent": "insertSpaces", + "tabSize": 4 + } +} \ No newline at end of file diff --git a/project.private.config.json b/project.private.config.json new file mode 100644 index 0000000..7462c72 --- /dev/null +++ b/project.private.config.json @@ -0,0 +1,7 @@ +{ + "description": "项目私有配置文件。此文件中的内容将覆盖 project.config.json 中的相同字段。项目的改动优先同步到此文件中。详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html", + "projectname": "payroll", + "setting": { + "compileHotReLoad": true + } +} \ No newline at end of file diff --git a/sitemap.json b/sitemap.json new file mode 100644 index 0000000..ca02add --- /dev/null +++ b/sitemap.json @@ -0,0 +1,7 @@ +{ + "desc": "关于本文件的更多信息,请参考文档 https://developers.weixin.qq.com/miniprogram/dev/framework/sitemap.html", + "rules": [{ + "action": "allow", + "page": "*" + }] +} \ No newline at end of file diff --git a/utils/util.js b/utils/util.js new file mode 100644 index 0000000..764bc2c --- /dev/null +++ b/utils/util.js @@ -0,0 +1,19 @@ +const formatTime = date => { + const year = date.getFullYear() + const month = date.getMonth() + 1 + const day = date.getDate() + const hour = date.getHours() + const minute = date.getMinutes() + const second = date.getSeconds() + + return `${[year, month, day].map(formatNumber).join('/')} ${[hour, minute, second].map(formatNumber).join(':')}` +} + +const formatNumber = n => { + n = n.toString() + return n[1] ? n : `0${n}` +} + +module.exports = { + formatTime +}