├── .gitignore ├── api ├── addons │ └── .gitkeep ├── public │ ├── assets │ │ ├── index.html │ │ ├── css │ │ │ ├── lesshat.css │ │ │ └── iconfont.css │ │ ├── addons │ │ │ └── .gitkeep │ │ ├── js │ │ │ ├── addons.js │ │ │ ├── backend-init.js │ │ │ └── frontend-init.js │ │ ├── img │ │ │ ├── 32px.png │ │ │ ├── 40px.png │ │ │ ├── blank.gif │ │ │ ├── cross.png │ │ │ ├── logo.png │ │ │ ├── mask.png │ │ │ ├── avatar.png │ │ │ ├── circle.png │ │ │ ├── favicon.ico │ │ │ ├── loading.gif │ │ │ ├── qrcode.png │ │ │ ├── login-head.png │ │ │ └── throbber.gif │ │ ├── fonts │ │ │ ├── captcha.ttf │ │ │ ├── verdana.ttf │ │ │ ├── Times New Roman.ttf │ │ │ ├── lato │ │ │ │ ├── lato-black.eot │ │ │ │ ├── lato-black.ttf │ │ │ │ ├── lato-bold.eot │ │ │ │ ├── lato-bold.ttf │ │ │ │ ├── lato-bold.woff │ │ │ │ ├── lato-light.eot │ │ │ │ ├── lato-light.ttf │ │ │ │ ├── lato-black.woff │ │ │ │ ├── lato-italic.eot │ │ │ │ ├── lato-italic.ttf │ │ │ │ ├── lato-italic.woff │ │ │ │ ├── lato-light.woff │ │ │ │ ├── lato-regular.eot │ │ │ │ ├── lato-regular.ttf │ │ │ │ ├── lato-regular.woff │ │ │ │ ├── lato-bolditalic.eot │ │ │ │ ├── lato-bolditalic.ttf │ │ │ │ └── lato-bolditalic.woff │ │ │ ├── iconfont │ │ │ │ ├── iconfont.eot │ │ │ │ ├── iconfont.ttf │ │ │ │ └── iconfont.woff │ │ │ ├── SourceHanSansK-Regular.ttf │ │ │ ├── glyphicons-halflings-regular.eot │ │ │ ├── glyphicons-halflings-regular.ttf │ │ │ ├── glyphicons-halflings-regular.woff │ │ │ └── glyphicons-halflings-regular.woff2 │ │ └── less │ │ │ ├── bootstrap │ │ │ ├── mixins │ │ │ │ ├── center-block.less │ │ │ │ ├── size.less │ │ │ │ ├── opacity.less │ │ │ │ ├── text-emphasis.less │ │ │ │ ├── text-overflow.less │ │ │ │ ├── background-variant.less │ │ │ │ ├── tab-focus.less │ │ │ │ ├── labels.less │ │ │ │ ├── resize.less │ │ │ │ ├── progress-bar.less │ │ │ │ ├── reset-filter.less │ │ │ │ ├── nav-divider.less │ │ │ │ ├── alerts.less │ │ │ │ ├── nav-vertical-align.less │ │ │ │ ├── responsive-visibility.less │ │ │ │ ├── border-radius.less │ │ │ │ ├── reset-text.less │ │ │ │ ├── pagination.less │ │ │ │ ├── panels.less │ │ │ │ ├── hide-text.less │ │ │ │ ├── list-group.less │ │ │ │ ├── clearfix.less │ │ │ │ ├── table-row.less │ │ │ │ └── image.less │ │ │ ├── wells.less │ │ │ ├── breadcrumbs.less │ │ │ ├── responsive-embed.less │ │ │ ├── component-animations.less │ │ │ ├── close.less │ │ │ ├── thumbnails.less │ │ │ ├── utilities.less │ │ │ ├── pager.less │ │ │ ├── media.less │ │ │ └── mixins.less │ │ │ ├── bootstrap-less │ │ │ ├── mixins │ │ │ │ ├── center-block.less │ │ │ │ ├── size.less │ │ │ │ ├── opacity.less │ │ │ │ ├── text-emphasis.less │ │ │ │ ├── text-overflow.less │ │ │ │ ├── background-variant.less │ │ │ │ ├── tab-focus.less │ │ │ │ ├── labels.less │ │ │ │ ├── resize.less │ │ │ │ ├── progress-bar.less │ │ │ │ ├── reset-filter.less │ │ │ │ ├── nav-divider.less │ │ │ │ ├── alerts.less │ │ │ │ ├── nav-vertical-align.less │ │ │ │ ├── responsive-visibility.less │ │ │ │ ├── reset-text.less │ │ │ │ ├── border-radius.less │ │ │ │ ├── pagination.less │ │ │ │ ├── panels.less │ │ │ │ ├── hide-text.less │ │ │ │ ├── list-group.less │ │ │ │ ├── clearfix.less │ │ │ │ ├── table-row.less │ │ │ │ └── image.less │ │ │ └── mixins.less │ │ │ ├── fastadmin │ │ │ ├── invoice.less │ │ │ ├── carousel.less │ │ │ ├── labels.less │ │ │ ├── profile.less │ │ │ ├── .csslintrc │ │ │ ├── users-list.less │ │ │ ├── 404_500_errors.less │ │ │ ├── login_and_register.less │ │ │ ├── products.less │ │ │ ├── callout.less │ │ │ ├── print.less │ │ │ └── table.less │ │ │ ├── skins │ │ │ └── _all-skins.less │ │ │ └── tinycss.less │ ├── template │ │ └── .gitkeep │ ├── uploads │ │ └── .gitkeep │ ├── robots.txt │ ├── .htaccess │ ├── router.php │ ├── index.php │ ├── install.php │ └── admin.php ├── runtime │ └── .gitkeep ├── extend │ ├── .htaccess │ └── fast │ │ └── Pinyin.php ├── application │ ├── .htaccess │ ├── admin │ │ ├── view │ │ │ ├── addon │ │ │ │ └── add.html │ │ │ ├── common │ │ │ │ ├── script.html │ │ │ │ └── meta.html │ │ │ └── auth │ │ │ │ ├── adminlog │ │ │ │ ├── detail.html │ │ │ │ └── index.html │ │ │ │ ├── admin │ │ │ │ └── index.html │ │ │ │ └── group │ │ │ │ └── index.html │ │ ├── command │ │ │ ├── Crud │ │ │ │ └── stubs │ │ │ │ │ ├── mixins │ │ │ │ │ ├── enum.stub │ │ │ │ │ ├── import.stub │ │ │ │ │ ├── modelrelationmethod-hasmany.stub │ │ │ │ │ ├── modelrelationmethod.stub │ │ │ │ │ ├── datetime.stub │ │ │ │ │ ├── modelinit.stub │ │ │ │ │ ├── radio.stub │ │ │ │ │ ├── select.stub │ │ │ │ │ ├── checkbox.stub │ │ │ │ │ └── multiple.stub │ │ │ │ │ ├── lang.stub │ │ │ │ │ ├── html │ │ │ │ │ ├── recyclebin-html.stub │ │ │ │ │ ├── select.stub │ │ │ │ │ ├── radio.stub │ │ │ │ │ ├── checkbox.stub │ │ │ │ │ ├── switch.stub │ │ │ │ │ ├── fieldlist.stub │ │ │ │ │ ├── heading-html.stub │ │ │ │ │ └── fieldlist-template.stub │ │ │ │ │ ├── relationmodel.stub │ │ │ │ │ ├── validate.stub │ │ │ │ │ ├── add.stub │ │ │ │ │ ├── edit.stub │ │ │ │ │ ├── model.stub │ │ │ │ │ ├── controller.stub │ │ │ │ │ └── controllerindex.stub │ │ │ ├── Addon │ │ │ │ └── stubs │ │ │ │ │ ├── info.stub │ │ │ │ │ ├── controller.stub │ │ │ │ │ ├── addon.stub │ │ │ │ │ └── config.stub │ │ │ ├── Min │ │ │ │ └── stubs │ │ │ │ │ ├── css.stub │ │ │ │ │ └── js.stub │ │ │ ├── Importclear.php │ │ │ ├── Import.php │ │ │ └── Api │ │ │ │ └── lang │ │ │ │ └── zh-cn.php │ │ ├── lang │ │ │ └── zh-cn │ │ │ │ ├── ajax.php │ │ │ │ ├── config.php │ │ │ │ ├── user │ │ │ │ ├── group.php │ │ │ │ ├── rule.php │ │ │ │ └── user.php │ │ │ │ ├── account.php │ │ │ │ ├── tags.php │ │ │ │ ├── moneylog.php │ │ │ │ ├── auth │ │ │ │ ├── admin.php │ │ │ │ └── group.php │ │ │ │ ├── general │ │ │ │ └── profile.php │ │ │ │ └── category.php │ │ ├── model │ │ │ ├── AuthGroupAccess.php │ │ │ ├── AuthGroup.php │ │ │ ├── Admin.php │ │ │ ├── UserGroup.php │ │ │ ├── Tags.php │ │ │ └── Account.php │ │ ├── config.php │ │ ├── behavior │ │ │ └── AdminLog.php │ │ ├── validate │ │ │ ├── Tags.php │ │ │ ├── Account.php │ │ │ ├── Category.php │ │ │ ├── UserGroup.php │ │ │ ├── UserRule.php │ │ │ ├── Moneylog.php │ │ │ ├── AuthRule.php │ │ │ └── User.php │ │ ├── tags.php │ │ └── controller │ │ │ ├── Tags.php │ │ │ ├── Account.php │ │ │ └── Moneylog.php │ ├── api │ │ ├── common.php │ │ ├── lang │ │ │ └── zh-cn │ │ │ │ └── common.php │ │ ├── config.php │ │ ├── validate │ │ │ ├── Account.php │ │ │ └── Tags.php │ │ ├── library │ │ │ └── ExceptionHandle.php │ │ └── controller │ │ │ └── Token.php │ ├── extra │ │ ├── addons.php │ │ ├── site.php.template │ │ └── upload.php │ ├── index │ │ └── controller │ │ │ └── Index.php │ ├── common │ │ ├── exception │ │ │ └── UploadException.php │ │ ├── model │ │ │ ├── Ems.php │ │ │ ├── Sms.php │ │ │ ├── UserRule.php │ │ │ ├── UserGroup.php │ │ │ ├── MoneyLog.php │ │ │ └── ScoreLog.php │ │ ├── library │ │ │ ├── Log.php │ │ │ ├── CacheDb.php │ │ │ └── import │ │ │ │ └── Log.php │ │ └── validate │ │ │ └── Moneylog.php │ ├── route.php │ ├── command.php │ ├── build.php │ └── tags.php ├── thinkphp │ ├── .htaccess │ ├── tests │ │ ├── conf │ │ │ ├── redis.ini │ │ │ ├── timezone.ini │ │ │ └── memcached.ini │ │ ├── application │ │ │ ├── views │ │ │ │ ├── display.html │ │ │ │ ├── display.phtml │ │ │ │ ├── include2.html │ │ │ │ ├── layout.html │ │ │ │ ├── layout2.html │ │ │ │ ├── extend.html │ │ │ │ ├── include.html │ │ │ │ └── extend2.html │ │ │ ├── route.php │ │ │ ├── index │ │ │ │ └── controller │ │ │ │ │ └── Index.php │ │ │ └── config.php │ │ ├── thinkphp │ │ │ └── library │ │ │ │ └── think │ │ │ │ ├── model │ │ │ │ └── .gitignore │ │ │ │ ├── session │ │ │ │ └── .gitignore │ │ │ │ ├── controller │ │ │ │ └── .gitignore │ │ │ │ ├── db │ │ │ │ └── driver │ │ │ │ │ └── .gitignore │ │ │ │ ├── view │ │ │ │ ├── driver │ │ │ │ │ └── .gitignore │ │ │ │ └── theme │ │ │ │ │ └── index │ │ │ │ │ └── template.html │ │ │ │ ├── config │ │ │ │ └── driver │ │ │ │ │ └── fixtures │ │ │ │ │ ├── config.ini │ │ │ │ │ ├── config.json │ │ │ │ │ └── config.xml │ │ │ │ ├── template │ │ │ │ └── driver │ │ │ │ │ └── .gitignore │ │ │ │ ├── lang │ │ │ │ └── lang.php │ │ │ │ ├── loader │ │ │ │ └── test │ │ │ │ │ └── Hello.php │ │ │ │ ├── behavior │ │ │ │ ├── Three.php │ │ │ │ ├── Two.php │ │ │ │ └── One.php │ │ │ │ └── log │ │ │ │ └── driver │ │ │ │ └── fileTest.php │ │ ├── .gitignore │ │ ├── script │ │ │ └── install.sh │ │ └── mock.php │ ├── .gitignore │ ├── logo.png │ ├── library │ │ └── think │ │ │ ├── console │ │ │ ├── bin │ │ │ │ ├── hiddeninput.exe │ │ │ │ └── README.md │ │ │ ├── command │ │ │ │ └── make │ │ │ │ │ ├── stubs │ │ │ │ │ ├── model.stub │ │ │ │ │ └── controller.plain.stub │ │ │ │ │ └── Model.php │ │ │ ├── LICENSE │ │ │ └── output │ │ │ │ └── driver │ │ │ │ └── Nothing.php │ │ │ ├── exception │ │ │ ├── RouteNotFoundException.php │ │ │ ├── HttpResponseException.php │ │ │ ├── ClassNotFoundException.php │ │ │ ├── TemplateNotFoundException.php │ │ │ ├── ValidateException.php │ │ │ └── HttpException.php │ │ │ ├── config │ │ │ └── driver │ │ │ │ ├── Ini.php │ │ │ │ ├── Json.php │ │ │ │ └── Xml.php │ │ │ ├── log │ │ │ └── driver │ │ │ │ └── Test.php │ │ │ ├── db │ │ │ ├── exception │ │ │ │ └── BindParamException.php │ │ │ └── Expression.php │ │ │ ├── model │ │ │ └── Pivot.php │ │ │ └── Env.php │ ├── codecov.yml │ ├── start.php │ ├── console.php │ ├── composer.json │ ├── tpl │ │ └── default_index.tpl │ ├── .travis.yml │ └── phpunit.xml ├── .env.sample ├── .bowerrc ├── .gitignore ├── README.md ├── think ├── build.php ├── bower.json └── composer.json ├── spa ├── public │ ├── static │ │ └── 1.txt │ ├── favicon.ico │ ├── apple-touch-icon.png │ └── index.html ├── vue.config.js ├── src │ ├── assets │ │ ├── icon.png │ │ └── icon │ │ │ ├── menu.png │ │ │ ├── time.png │ │ │ ├── paytype.png │ │ │ └── category │ │ │ ├── bus.png │ │ │ ├── cat.png │ │ │ ├── man.png │ │ │ ├── baby.png │ │ │ ├── bread.png │ │ │ ├── candy.png │ │ │ ├── cloud.png │ │ │ ├── house.png │ │ │ ├── label.png │ │ │ ├── pill.png │ │ │ ├── pizza.png │ │ │ ├── taxi.png │ │ │ ├── woman.png │ │ │ ├── airplane.png │ │ │ ├── beer-mug.png │ │ │ ├── broccoli.png │ │ │ ├── handbag.png │ │ │ ├── laptop.png │ │ │ ├── package.png │ │ │ ├── sparkles.png │ │ │ ├── syringe.png │ │ │ ├── t-shirt.png │ │ │ ├── automobile.png │ │ │ ├── briefcase.png │ │ │ ├── bubble-tea.png │ │ │ ├── fuel-pump.png │ │ │ ├── hamburger.png │ │ │ ├── handshake.png │ │ │ ├── ping-pong.png │ │ │ ├── video-game.png │ │ │ ├── watermelon.png │ │ │ ├── baby-bottle.png │ │ │ ├── clapper-board.png │ │ │ ├── cooked-rice.png │ │ │ ├── cut-of-meat.png │ │ │ ├── fishing-pole.png │ │ │ ├── party-popper.png │ │ │ ├── service-dog.png │ │ │ ├── shopping-cart.png │ │ │ ├── wrapped-gift.png │ │ │ ├── yen-banknote.png │ │ │ ├── sparkling-heart.png │ │ │ ├── tropical-drink.png │ │ │ ├── chart-increasing.png │ │ │ └── beach-with-umbrella.png │ ├── store │ │ └── index.js │ ├── components │ │ ├── Modal │ │ │ └── index.js │ │ ├── Toast │ │ │ └── index.js │ │ ├── WSelect │ │ │ └── index.js │ │ ├── DatePicker │ │ │ └── index.js │ │ └── Loading │ │ │ └── index.js │ ├── config.js.template │ ├── library │ │ └── common.js │ └── main.js ├── babel.config.js ├── README.md ├── .gitignore └── package.json ├── icon.png └── README.md /.gitignore: -------------------------------------------------------------------------------- 1 | /*.sql 2 | /*.psd -------------------------------------------------------------------------------- /api/addons/.gitkeep: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /api/public/assets/index.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /api/runtime/.gitkeep: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /api/extend/.htaccess: -------------------------------------------------------------------------------- 1 | deny from all -------------------------------------------------------------------------------- /api/public/assets/css/lesshat.css: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /api/public/template/.gitkeep: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /api/public/uploads/.gitkeep: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /api/application/.htaccess: -------------------------------------------------------------------------------- 1 | deny from all -------------------------------------------------------------------------------- /api/public/assets/addons/.gitkeep: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /api/thinkphp/.htaccess: -------------------------------------------------------------------------------- 1 | deny from all -------------------------------------------------------------------------------- /api/application/admin/view/addon/add.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /api/application/api/common.php: -------------------------------------------------------------------------------- 1 | {__CONTENT__} 2 | -------------------------------------------------------------------------------- /api/thinkphp/tests/application/views/layout2.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /api/thinkphp/tests/thinkphp/library/think/model/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore -------------------------------------------------------------------------------- /api/thinkphp/tests/thinkphp/library/think/session/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore -------------------------------------------------------------------------------- /api/thinkphp/tests/thinkphp/library/think/controller/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore -------------------------------------------------------------------------------- /api/thinkphp/tests/thinkphp/library/think/db/driver/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore -------------------------------------------------------------------------------- /api/thinkphp/tests/thinkphp/library/think/view/driver/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore -------------------------------------------------------------------------------- /api/thinkphp/tests/thinkphp/library/think/config/driver/fixtures/config.ini: -------------------------------------------------------------------------------- 1 | inifile=1 -------------------------------------------------------------------------------- /api/thinkphp/tests/thinkphp/library/think/template/driver/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore -------------------------------------------------------------------------------- /api/public/assets/js/backend-init.js: -------------------------------------------------------------------------------- 1 | define(['backend'], function (Backend) { 2 | 3 | }); -------------------------------------------------------------------------------- /api/public/assets/js/frontend-init.js: -------------------------------------------------------------------------------- 1 | define(['frontend'], function (Frontend) { 2 | 3 | }); -------------------------------------------------------------------------------- /api/thinkphp/tests/thinkphp/library/think/config/driver/fixtures/config.json: -------------------------------------------------------------------------------- 1 | {"jsonstring":1} -------------------------------------------------------------------------------- /api/thinkphp/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/noberumotto/moneylog/HEAD/api/thinkphp/logo.png -------------------------------------------------------------------------------- /api/application/admin/command/Crud/stubs/lang.stub: -------------------------------------------------------------------------------- 1 | '加载', 4 | ]; 5 | -------------------------------------------------------------------------------- /api/thinkphp/tests/application/views/extend.html: -------------------------------------------------------------------------------- 1 | {extend name="extend2" /} 2 | {block name="head"}header{/block} -------------------------------------------------------------------------------- /spa/babel.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | presets: [ 3 | '@vue/cli-plugin-babel/preset' 4 | ] 5 | } 6 | -------------------------------------------------------------------------------- /spa/src/assets/icon/menu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/noberumotto/moneylog/HEAD/spa/src/assets/icon/menu.png -------------------------------------------------------------------------------- /spa/src/assets/icon/time.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/noberumotto/moneylog/HEAD/spa/src/assets/icon/time.png -------------------------------------------------------------------------------- /api/public/assets/img/32px.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/noberumotto/moneylog/HEAD/api/public/assets/img/32px.png -------------------------------------------------------------------------------- /api/public/assets/img/40px.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/noberumotto/moneylog/HEAD/api/public/assets/img/40px.png -------------------------------------------------------------------------------- /api/public/assets/img/blank.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/noberumotto/moneylog/HEAD/api/public/assets/img/blank.gif -------------------------------------------------------------------------------- /api/public/assets/img/cross.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/noberumotto/moneylog/HEAD/api/public/assets/img/cross.png -------------------------------------------------------------------------------- /api/public/assets/img/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/noberumotto/moneylog/HEAD/api/public/assets/img/logo.png -------------------------------------------------------------------------------- /api/public/assets/img/mask.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/noberumotto/moneylog/HEAD/api/public/assets/img/mask.png -------------------------------------------------------------------------------- /api/thinkphp/tests/.gitignore: -------------------------------------------------------------------------------- 1 | /runtime/ 2 | /application/common.php 3 | /application/demo/ 4 | /application/runtime/ -------------------------------------------------------------------------------- /api/thinkphp/tests/application/views/include.html: -------------------------------------------------------------------------------- 1 | 2 | {include file="include2" /} -------------------------------------------------------------------------------- /spa/public/apple-touch-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/noberumotto/moneylog/HEAD/spa/public/apple-touch-icon.png -------------------------------------------------------------------------------- /spa/src/assets/icon/paytype.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/noberumotto/moneylog/HEAD/spa/src/assets/icon/paytype.png -------------------------------------------------------------------------------- /api/public/assets/img/avatar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/noberumotto/moneylog/HEAD/api/public/assets/img/avatar.png -------------------------------------------------------------------------------- /api/public/assets/img/circle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/noberumotto/moneylog/HEAD/api/public/assets/img/circle.png -------------------------------------------------------------------------------- /api/public/assets/img/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/noberumotto/moneylog/HEAD/api/public/assets/img/favicon.ico -------------------------------------------------------------------------------- /api/public/assets/img/loading.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/noberumotto/moneylog/HEAD/api/public/assets/img/loading.gif -------------------------------------------------------------------------------- /api/public/assets/img/qrcode.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/noberumotto/moneylog/HEAD/api/public/assets/img/qrcode.png -------------------------------------------------------------------------------- /api/public/assets/fonts/captcha.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/noberumotto/moneylog/HEAD/api/public/assets/fonts/captcha.ttf -------------------------------------------------------------------------------- /api/public/assets/fonts/verdana.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/noberumotto/moneylog/HEAD/api/public/assets/fonts/verdana.ttf -------------------------------------------------------------------------------- /api/public/assets/img/login-head.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/noberumotto/moneylog/HEAD/api/public/assets/img/login-head.png -------------------------------------------------------------------------------- /api/public/assets/img/throbber.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/noberumotto/moneylog/HEAD/api/public/assets/img/throbber.gif -------------------------------------------------------------------------------- /spa/src/assets/icon/category/bus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/noberumotto/moneylog/HEAD/spa/src/assets/icon/category/bus.png -------------------------------------------------------------------------------- /spa/src/assets/icon/category/cat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/noberumotto/moneylog/HEAD/spa/src/assets/icon/category/cat.png -------------------------------------------------------------------------------- /spa/src/assets/icon/category/man.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/noberumotto/moneylog/HEAD/spa/src/assets/icon/category/man.png -------------------------------------------------------------------------------- /spa/src/assets/icon/category/baby.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/noberumotto/moneylog/HEAD/spa/src/assets/icon/category/baby.png -------------------------------------------------------------------------------- /spa/src/assets/icon/category/bread.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/noberumotto/moneylog/HEAD/spa/src/assets/icon/category/bread.png -------------------------------------------------------------------------------- /spa/src/assets/icon/category/candy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/noberumotto/moneylog/HEAD/spa/src/assets/icon/category/candy.png -------------------------------------------------------------------------------- /spa/src/assets/icon/category/cloud.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/noberumotto/moneylog/HEAD/spa/src/assets/icon/category/cloud.png -------------------------------------------------------------------------------- /spa/src/assets/icon/category/house.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/noberumotto/moneylog/HEAD/spa/src/assets/icon/category/house.png -------------------------------------------------------------------------------- /spa/src/assets/icon/category/label.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/noberumotto/moneylog/HEAD/spa/src/assets/icon/category/label.png -------------------------------------------------------------------------------- /spa/src/assets/icon/category/pill.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/noberumotto/moneylog/HEAD/spa/src/assets/icon/category/pill.png -------------------------------------------------------------------------------- /spa/src/assets/icon/category/pizza.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/noberumotto/moneylog/HEAD/spa/src/assets/icon/category/pizza.png -------------------------------------------------------------------------------- /spa/src/assets/icon/category/taxi.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/noberumotto/moneylog/HEAD/spa/src/assets/icon/category/taxi.png -------------------------------------------------------------------------------- /spa/src/assets/icon/category/woman.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/noberumotto/moneylog/HEAD/spa/src/assets/icon/category/woman.png -------------------------------------------------------------------------------- /api/thinkphp/tests/thinkphp/library/think/loader/test/Hello.php: -------------------------------------------------------------------------------- 1 | '\\app\\api\\library\\ExceptionHandle', 6 | ]; 7 | -------------------------------------------------------------------------------- /api/public/assets/fonts/lato/lato-bolditalic.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/noberumotto/moneylog/HEAD/api/public/assets/fonts/lato/lato-bolditalic.eot -------------------------------------------------------------------------------- /api/public/assets/fonts/lato/lato-bolditalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/noberumotto/moneylog/HEAD/api/public/assets/fonts/lato/lato-bolditalic.ttf -------------------------------------------------------------------------------- /spa/src/assets/icon/category/sparkling-heart.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/noberumotto/moneylog/HEAD/spa/src/assets/icon/category/sparkling-heart.png -------------------------------------------------------------------------------- /spa/src/assets/icon/category/tropical-drink.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/noberumotto/moneylog/HEAD/spa/src/assets/icon/category/tropical-drink.png -------------------------------------------------------------------------------- /api/public/assets/fonts/SourceHanSansK-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/noberumotto/moneylog/HEAD/api/public/assets/fonts/SourceHanSansK-Regular.ttf -------------------------------------------------------------------------------- /api/public/assets/fonts/lato/lato-bolditalic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/noberumotto/moneylog/HEAD/api/public/assets/fonts/lato/lato-bolditalic.woff -------------------------------------------------------------------------------- /spa/src/assets/icon/category/chart-increasing.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/noberumotto/moneylog/HEAD/spa/src/assets/icon/category/chart-increasing.png -------------------------------------------------------------------------------- /spa/src/assets/icon/category/beach-with-umbrella.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/noberumotto/moneylog/HEAD/spa/src/assets/icon/category/beach-with-umbrella.png -------------------------------------------------------------------------------- /api/public/assets/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/noberumotto/moneylog/HEAD/api/public/assets/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /api/public/assets/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/noberumotto/moneylog/HEAD/api/public/assets/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /api/thinkphp/library/think/console/bin/hiddeninput.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/noberumotto/moneylog/HEAD/api/thinkphp/library/think/console/bin/hiddeninput.exe -------------------------------------------------------------------------------- /api/public/assets/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/noberumotto/moneylog/HEAD/api/public/assets/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /api/public/assets/fonts/glyphicons-halflings-regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/noberumotto/moneylog/HEAD/api/public/assets/fonts/glyphicons-halflings-regular.woff2 -------------------------------------------------------------------------------- /api/thinkphp/library/think/console/bin/README.md: -------------------------------------------------------------------------------- 1 | console 工具使用 hiddeninput.exe 在 windows 上隐藏密码输入,该二进制文件由第三方提供,相关源码和其他细节可以在 [Hidden Input](https://github.com/Seldaek/hidden-input) 找到。 2 | -------------------------------------------------------------------------------- /api/application/admin/model/AuthGroupAccess.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 1 5 | 6 | -------------------------------------------------------------------------------- /api/application/admin/config.php: -------------------------------------------------------------------------------- 1 | true, 6 | 'url_html_suffix' => '', 7 | 'controller_auto_search' => true, 8 | ]; 9 | -------------------------------------------------------------------------------- /api/application/extra/addons.php: -------------------------------------------------------------------------------- 1 | false, 5 | 'hooks' => [], 6 | 'route' => [], 7 | 'priority' => [], 8 | 'domain' => '', 9 | ]; 10 | -------------------------------------------------------------------------------- /api/public/assets/less/bootstrap/mixins/center-block.less: -------------------------------------------------------------------------------- 1 | // Center-align a block level element 2 | 3 | .center-block() { 4 | display: block; 5 | margin-left: auto; 6 | margin-right: auto; 7 | } 8 | -------------------------------------------------------------------------------- /api/application/admin/command/Addon/stubs/info.stub: -------------------------------------------------------------------------------- 1 | name = {%name%} 2 | title = 插件名称{%name%} 3 | intro = 插件介绍 4 | author = yourname 5 | website = https://www.fastadmin.net 6 | version = 1.0.0 7 | state = 1 8 | -------------------------------------------------------------------------------- /api/public/assets/less/bootstrap-less/mixins/center-block.less: -------------------------------------------------------------------------------- 1 | // Center-align a block level element 2 | 3 | .center-block() { 4 | display: block; 5 | margin-left: auto; 6 | margin-right: auto; 7 | } 8 | -------------------------------------------------------------------------------- /api/thinkphp/library/think/console/command/make/stubs/model.stub: -------------------------------------------------------------------------------- 1 | '变量名称', 5 | 'intro' => '描述', 6 | 'group' => '分组', 7 | 'type' => '类型', 8 | 'value' => '变量值' 9 | ]; 10 | -------------------------------------------------------------------------------- /api/.env.sample: -------------------------------------------------------------------------------- 1 | [app] 2 | debug = false 3 | trace = false 4 | 5 | [database] 6 | hostname = 127.0.0.1 7 | database = fastadmin 8 | username = root 9 | password = root 10 | hostport = 3306 11 | prefix = fa_ 12 | -------------------------------------------------------------------------------- /api/application/admin/command/Min/stubs/css.stub: -------------------------------------------------------------------------------- 1 | ({ 2 | cssIn: "{%cssBasePath%}{%cssBaseName%}.css", 3 | out: "{%cssBasePath%}{%cssBaseName%}.min.css", 4 | optimizeCss: "default", 5 | optimize: "{%optimize%}" 6 | }) -------------------------------------------------------------------------------- /spa/README.md: -------------------------------------------------------------------------------- 1 | # Moneylog.cloud SPA 2 | 3 | Moneylog h5 前端,基于 vue2 4 | 5 | ## 运行 6 | 7 | - 将 src\config.js.template 更名为 config.js,并打开修改接口地址 8 | - `npm install` 9 | - 开发 `npm run serve` 10 | - 编译 `npm run build` -------------------------------------------------------------------------------- /api/public/assets/less/bootstrap/mixins/size.less: -------------------------------------------------------------------------------- 1 | // Sizing shortcuts 2 | 3 | .size(@width; @height) { 4 | width: @width; 5 | height: @height; 6 | } 7 | 8 | .square(@size) { 9 | .size(@size; @size); 10 | } 11 | -------------------------------------------------------------------------------- /api/public/assets/less/bootstrap-less/mixins/size.less: -------------------------------------------------------------------------------- 1 | // Sizing shortcuts 2 | 3 | .size(@width; @height) { 4 | width: @width; 5 | height: @height; 6 | } 7 | 8 | .square(@size) { 9 | .size(@size; @size); 10 | } 11 | -------------------------------------------------------------------------------- /api/public/assets/less/bootstrap/mixins/opacity.less: -------------------------------------------------------------------------------- 1 | // Opacity 2 | 3 | .opacity(@opacity) { 4 | opacity: @opacity; 5 | // IE8 filter 6 | @opacity-ie: (@opacity * 100); 7 | filter: ~"alpha(opacity=@{opacity-ie})"; 8 | } 9 | -------------------------------------------------------------------------------- /api/public/assets/less/bootstrap/mixins/text-emphasis.less: -------------------------------------------------------------------------------- 1 | // Typography 2 | 3 | .text-emphasis-variant(@color) { 4 | color: @color; 5 | a&:hover, 6 | a&:focus { 7 | color: darken(@color, 10%); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /api/thinkphp/library/think/console/command/make/stubs/controller.plain.stub: -------------------------------------------------------------------------------- 1 | '组名', 5 | 'Rules' => '权限节点', 6 | 'Createtime' => '添加时间', 7 | 'Updatetime' => '更新时间', 8 | 'Status' => '状态' 9 | ]; 10 | -------------------------------------------------------------------------------- /api/application/admin/view/common/script.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /api/public/assets/less/bootstrap/mixins/text-overflow.less: -------------------------------------------------------------------------------- 1 | // Text overflow 2 | // Requires inline-block or block for proper styling 3 | 4 | .text-overflow() { 5 | overflow: hidden; 6 | text-overflow: ellipsis; 7 | white-space: nowrap; 8 | } 9 | -------------------------------------------------------------------------------- /api/public/assets/less/bootstrap-less/mixins/text-overflow.less: -------------------------------------------------------------------------------- 1 | // Text overflow 2 | // Requires inline-block or block for proper styling 3 | 4 | .text-overflow() { 5 | overflow: hidden; 6 | text-overflow: ellipsis; 7 | white-space: nowrap; 8 | } 9 | -------------------------------------------------------------------------------- /api/public/assets/less/bootstrap/mixins/background-variant.less: -------------------------------------------------------------------------------- 1 | // Contextual backgrounds 2 | 3 | .bg-variant(@color) { 4 | background-color: @color; 5 | a&:hover, 6 | a&:focus { 7 | background-color: darken(@color, 10%); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /api/public/assets/less/bootstrap/mixins/tab-focus.less: -------------------------------------------------------------------------------- 1 | // WebKit-style focus 2 | 3 | .tab-focus() { 4 | // Default 5 | outline: thin dotted; 6 | // WebKit 7 | outline: 5px auto -webkit-focus-ring-color; 8 | outline-offset: -2px; 9 | } 10 | -------------------------------------------------------------------------------- /api/public/.htaccess: -------------------------------------------------------------------------------- 1 | 2 | Options +FollowSymlinks -Multiviews 3 | RewriteEngine On 4 | 5 | RewriteCond %{REQUEST_FILENAME} !-d 6 | RewriteCond %{REQUEST_FILENAME} !-f 7 | RewriteRule ^(.*)$ index.php/$1 [QSA,PT,L] 8 | 9 | -------------------------------------------------------------------------------- /api/public/assets/less/bootstrap-less/mixins/background-variant.less: -------------------------------------------------------------------------------- 1 | // Contextual backgrounds 2 | 3 | .bg-variant(@color) { 4 | background-color: @color; 5 | a&:hover, 6 | a&:focus { 7 | background-color: darken(@color, 10%); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /api/public/assets/less/bootstrap-less/mixins/tab-focus.less: -------------------------------------------------------------------------------- 1 | // WebKit-style focus 2 | 3 | .tab-focus() { 4 | // Default 5 | outline: thin dotted; 6 | // WebKit 7 | outline: 5px auto -webkit-focus-ring-color; 8 | outline-offset: -2px; 9 | } 10 | -------------------------------------------------------------------------------- /api/application/admin/command/Crud/stubs/mixins/modelrelationmethod-hasmany.stub: -------------------------------------------------------------------------------- 1 | 2 | public function {%relationMethod%}s() 3 | { 4 | return $this->{%relationMode%}('{%relationClassName%}', '{%relationForeignKey%}', '{%relationPrimaryKey%}'); 5 | } 6 | -------------------------------------------------------------------------------- /api/public/assets/less/bootstrap/mixins/labels.less: -------------------------------------------------------------------------------- 1 | // Labels 2 | 3 | .label-variant(@color) { 4 | background-color: @color; 5 | 6 | &[href] { 7 | &:hover, 8 | &:focus { 9 | background-color: darken(@color, 10%); 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /api/public/assets/less/bootstrap/mixins/resize.less: -------------------------------------------------------------------------------- 1 | // Resize anything 2 | 3 | .resizable(@direction) { 4 | resize: @direction; // Options: horizontal, vertical, both 5 | overflow: auto; // Per CSS3 UI, `resize` only applies when `overflow` isn't `visible` 6 | } 7 | -------------------------------------------------------------------------------- /api/thinkphp/codecov.yml: -------------------------------------------------------------------------------- 1 | comment: 2 | layout: header, changes, diff 3 | coverage: 4 | ignore: 5 | - base.php 6 | - helper.php 7 | - convention.php 8 | - lang/zh-cn.php 9 | - start.php 10 | - console.php 11 | status: 12 | patch: false 13 | -------------------------------------------------------------------------------- /api/public/assets/less/bootstrap-less/mixins/labels.less: -------------------------------------------------------------------------------- 1 | // Labels 2 | 3 | .label-variant(@color) { 4 | background-color: @color; 5 | 6 | &[href] { 7 | &:hover, 8 | &:focus { 9 | background-color: darken(@color, 10%); 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /api/public/assets/less/bootstrap-less/mixins/resize.less: -------------------------------------------------------------------------------- 1 | // Resize anything 2 | 3 | .resizable(@direction) { 4 | resize: @direction; // Options: horizontal, vertical, both 5 | overflow: auto; // Per CSS3 UI, `resize` only applies when `overflow` isn't `visible` 6 | } 7 | -------------------------------------------------------------------------------- /api/application/admin/lang/zh-cn/account.php: -------------------------------------------------------------------------------- 1 | '账户名称', 5 | 'User_id' => '用户id', 6 | 'Status' => '类型', 7 | 'Status 0' => '支出账户', 8 | 'Status 1' => '收入账户', 9 | 'Createtime' => '添加时间' 10 | ]; 11 | -------------------------------------------------------------------------------- /spa/src/store/index.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue'; 2 | import Vuex from 'vuex'; 3 | 4 | import user from './modules/user'; 5 | Vue.use(Vuex); 6 | 7 | const store = new Vuex.Store({ 8 | modules: { 9 | user, 10 | } 11 | }); 12 | 13 | export default store; 14 | -------------------------------------------------------------------------------- /api/application/admin/command/Crud/stubs/mixins/modelrelationmethod.stub: -------------------------------------------------------------------------------- 1 | 2 | public function {%relationMethod%}() 3 | { 4 | return $this->{%relationMode%}('{%relationClassName%}', '{%relationForeignKey%}', '{%relationPrimaryKey%}', [], 'LEFT')->setEagerlyType(0); 5 | } -------------------------------------------------------------------------------- /api/application/admin/command/Crud/stubs/html/recyclebin-html.stub: -------------------------------------------------------------------------------- 1 | {:__('Recycle bin')} -------------------------------------------------------------------------------- /api/application/admin/command/Crud/stubs/relationmodel.stub: -------------------------------------------------------------------------------- 1 | .striped(); 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /api/application/admin/command/Crud/stubs/mixins/datetime.stub: -------------------------------------------------------------------------------- 1 | 2 | public function {%methodName%}($value, $data) 3 | { 4 | $value = $value ? $value : (isset($data['{%field%}']) ? $data['{%field%}'] : ''); 5 | return is_numeric($value) ? date("Y-m-d H:i:s", $value) : $value; 6 | } -------------------------------------------------------------------------------- /api/public/assets/less/bootstrap-less/mixins/progress-bar.less: -------------------------------------------------------------------------------- 1 | // Progress bars 2 | 3 | .progress-bar-variant(@color) { 4 | background-color: @color; 5 | 6 | // Deprecated parent class requirement as of v3.2.0 7 | .progress-striped & { 8 | #gradient > .striped(); 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /api/application/admin/lang/zh-cn/tags.php: -------------------------------------------------------------------------------- 1 | '分类名称', 5 | 'Icon_name' => '图标名称', 6 | 'User_id' => '用户id', 7 | 'Status' => '类型', 8 | 'Status 0' => '支出分类', 9 | 'Status 1' => '收入分类', 10 | 'Createtime' => '添加时间' 11 | ]; 12 | -------------------------------------------------------------------------------- /api/application/admin/command/Addon/stubs/controller.stub: -------------------------------------------------------------------------------- 1 | error("当前插件暂无前台页面"); 13 | } 14 | 15 | } 16 | -------------------------------------------------------------------------------- /api/application/admin/command/Crud/stubs/mixins/modelinit.stub: -------------------------------------------------------------------------------- 1 | 2 | protected static function init() 3 | { 4 | self::afterInsert(function ($row) { 5 | $pk = $row->getPk(); 6 | $row->getQuery()->where($pk, $row[$pk])->update(['{%order%}' => $row[$pk]]); 7 | }); 8 | } 9 | -------------------------------------------------------------------------------- /api/public/assets/less/fastadmin/invoice.less: -------------------------------------------------------------------------------- 1 | /* 2 | * Page: Invoice 3 | * ------------- 4 | */ 5 | 6 | .invoice { 7 | position: relative; 8 | background: #fff; 9 | border: 1px solid #f4f4f4; 10 | padding: 20px; 11 | margin: 10px 25px; 12 | } 13 | 14 | .invoice-title { 15 | margin-top: 0; 16 | } 17 | -------------------------------------------------------------------------------- /api/application/admin/command/Crud/stubs/mixins/radio.stub: -------------------------------------------------------------------------------- 1 | 2 | public function {%methodName%}($value, $data) 3 | { 4 | $value = $value ? $value : (isset($data['{%field%}']) ? $data['{%field%}'] : ''); 5 | $list = $this->{%listMethodName%}(); 6 | return isset($list[$value]) ? $list[$value] : ''; 7 | } -------------------------------------------------------------------------------- /api/application/admin/command/Crud/stubs/mixins/select.stub: -------------------------------------------------------------------------------- 1 | 2 | public function {%methodName%}($value, $data) 3 | { 4 | $value = $value ? $value : (isset($data['{%field%}']) ? $data['{%field%}'] : ''); 5 | $list = $this->{%listMethodName%}(); 6 | return isset($list[$value]) ? $list[$value] : ''; 7 | } -------------------------------------------------------------------------------- /api/public/assets/less/bootstrap/mixins/reset-filter.less: -------------------------------------------------------------------------------- 1 | // Reset filters for IE 2 | // 3 | // When you need to remove a gradient background, do not forget to use this to reset 4 | // the IE filter for IE9 and below. 5 | 6 | .reset-filter() { 7 | filter: e(%("progid:DXImageTransform.Microsoft.gradient(enabled = false)")); 8 | } 9 | -------------------------------------------------------------------------------- /api/public/assets/less/bootstrap-less/mixins/reset-filter.less: -------------------------------------------------------------------------------- 1 | // Reset filters for IE 2 | // 3 | // When you need to remove a gradient background, do not forget to use this to reset 4 | // the IE filter for IE9 and below. 5 | 6 | .reset-filter() { 7 | filter: e(%("progid:DXImageTransform.Microsoft.gradient(enabled = false)")); 8 | } 9 | -------------------------------------------------------------------------------- /api/public/assets/less/bootstrap/mixins/nav-divider.less: -------------------------------------------------------------------------------- 1 | // Horizontal dividers 2 | // 3 | // Dividers (basically an hr) within dropdowns and nav lists 4 | 5 | .nav-divider(@color: #e5e5e5) { 6 | height: 1px; 7 | margin: ((@line-height-computed / 2) - 1) 0; 8 | overflow: hidden; 9 | background-color: @color; 10 | } 11 | -------------------------------------------------------------------------------- /api/application/admin/command/Crud/stubs/html/select.stub: -------------------------------------------------------------------------------- 1 | 2 | 7 | -------------------------------------------------------------------------------- /api/public/assets/less/bootstrap-less/mixins/nav-divider.less: -------------------------------------------------------------------------------- 1 | // Horizontal dividers 2 | // 3 | // Dividers (basically an hr) within dropdowns and nav lists 4 | 5 | .nav-divider(@color: #e5e5e5) { 6 | height: 1px; 7 | margin: ((@line-height-computed / 2) - 1) 0; 8 | overflow: hidden; 9 | background-color: @color; 10 | } 11 | -------------------------------------------------------------------------------- /api/application/admin/behavior/AdminLog.php: -------------------------------------------------------------------------------- 1 | isPost() && config('fastadmin.auto_record_log')) { 11 | \app\admin\model\AdminLog::record(); 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /spa/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules 3 | /dist 4 | 5 | 6 | # local env files 7 | .env.local 8 | .env.*.local 9 | 10 | # Log files 11 | npm-debug.log* 12 | yarn-debug.log* 13 | yarn-error.log* 14 | pnpm-debug.log* 15 | 16 | # Editor directories and files 17 | .idea 18 | .vscode 19 | *.suo 20 | *.ntvs* 21 | *.njsproj 22 | *.sln 23 | *.sw? 24 | /src/config.js -------------------------------------------------------------------------------- /api/public/assets/less/bootstrap/mixins/alerts.less: -------------------------------------------------------------------------------- 1 | // Alerts 2 | 3 | .alert-variant(@background; @border; @text-color) { 4 | background-color: @background; 5 | border-color: @border; 6 | color: @text-color; 7 | 8 | hr { 9 | border-top-color: darken(@border, 5%); 10 | } 11 | .alert-link { 12 | color: darken(@text-color, 10%); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /api/public/assets/less/bootstrap-less/mixins/alerts.less: -------------------------------------------------------------------------------- 1 | // Alerts 2 | 3 | .alert-variant(@background; @border; @text-color) { 4 | background-color: @background; 5 | border-color: @border; 6 | color: @text-color; 7 | 8 | hr { 9 | border-top-color: darken(@border, 5%); 10 | } 11 | .alert-link { 12 | color: darken(@text-color, 10%); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /api/thinkphp/tests/thinkphp/library/think/behavior/One.php: -------------------------------------------------------------------------------- 1 | 3 | {foreach name="{%fieldList%}" item="vo"} 4 | 5 | {/foreach} 6 | 7 | -------------------------------------------------------------------------------- /api/application/admin/command/Crud/stubs/mixins/checkbox.stub: -------------------------------------------------------------------------------- 1 | 2 | public function {%methodName%}($value, $data) 3 | { 4 | $value = $value ? $value : (isset($data['{%field%}']) ? $data['{%field%}'] : ''); 5 | $valueArr = explode(',', $value); 6 | $list = $this->{%listMethodName%}(); 7 | return implode(',', array_intersect_key($list, array_flip($valueArr))); 8 | } -------------------------------------------------------------------------------- /api/application/admin/command/Crud/stubs/mixins/multiple.stub: -------------------------------------------------------------------------------- 1 | 2 | public function {%methodName%}($value, $data) 3 | { 4 | $value = $value ? $value : (isset($data['{%field%}']) ? $data['{%field%}'] : ''); 5 | $valueArr = explode(',', $value); 6 | $list = $this->{%listMethodName%}(); 7 | return implode(',', array_intersect_key($list, array_flip($valueArr))); 8 | } -------------------------------------------------------------------------------- /api/public/assets/less/fastadmin/carousel.less: -------------------------------------------------------------------------------- 1 | /* 2 | * Component: Carousel 3 | * ------------------- 4 | */ 5 | .carousel-control { 6 | &.left, 7 | &.right { 8 | background-image: none; 9 | } 10 | > .fa { 11 | font-size: 40px; 12 | position: absolute; 13 | top: 50%; 14 | z-index: 5; 15 | display: inline-block; 16 | margin-top: -20px; 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /api/application/admin/command/Crud/stubs/html/checkbox.stub: -------------------------------------------------------------------------------- 1 | 2 |
3 | {foreach name="{%fieldList%}" item="vo"} 4 | 5 | {/foreach} 6 |
7 | -------------------------------------------------------------------------------- /api/application/admin/command/Min/stubs/js.stub: -------------------------------------------------------------------------------- 1 | ({ 2 | {%config%} 3 | , 4 | optimizeCss: "standard", 5 | optimize: "{%optimize%}", //可使用uglify|closure|none 6 | preserveLicenseComments: false, 7 | removeCombined: false, 8 | baseUrl: "{%jsBasePath%}", //JS文件所在的基础目录 9 | name: "{%jsBaseName%}", //来源文件,不包含后缀 10 | out: "{%jsBasePath%}{%jsBaseName%}.min.js" //目标文件 11 | }); -------------------------------------------------------------------------------- /api/application/admin/command/Crud/stubs/html/switch.stub: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /api/thinkphp/tests/thinkphp/library/think/view/theme/index/template.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | Document 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /api/.gitignore: -------------------------------------------------------------------------------- 1 | /nbproject/ 2 | /vendor/ 3 | /runtime/* 4 | /addons/* 5 | /application/admin/command/Install/*.lock 6 | /public/assets/libs/ 7 | /public/assets/addons/* 8 | /public/uploads/* 9 | /application/extra/site.php 10 | /application/database.php 11 | /public/*_.php 12 | .idea 13 | composer.lock 14 | *.log 15 | database.php 16 | *.css.map 17 | !.gitkeep 18 | .env 19 | .svn 20 | .vscode 21 | node_modules 22 | *.zip -------------------------------------------------------------------------------- /api/application/index/controller/Index.php: -------------------------------------------------------------------------------- 1 | redirect(config('site.url')); 17 | } 18 | 19 | } 20 | -------------------------------------------------------------------------------- /api/application/common/exception/UploadException.php: -------------------------------------------------------------------------------- 1 | message = $message; 13 | $this->code = $code; 14 | $this->data = $data; 15 | } 16 | 17 | } 18 | -------------------------------------------------------------------------------- /api/application/common/model/Ems.php: -------------------------------------------------------------------------------- 1 | 4 | {include file="include" name="info" value="$info.value" /} 5 | {block name="main"} 6 | {block name="side"} 7 | side 8 | {/block} 9 | {block name="mainbody"} 10 | 11 | {/block} 12 | {/block} 13 | {literal} 14 | {$name} 15 | {/literal} 16 | 17 | -------------------------------------------------------------------------------- /api/thinkphp/tests/script/install.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | if [ $(phpenv version-name) != "hhvm" ]; then 4 | cp tests/extensions/$(phpenv version-name)/*.so $(php-config --extension-dir) 5 | 6 | phpenv config-add tests/conf/memcached.ini 7 | phpenv config-add tests/conf/redis.ini 8 | 9 | phpenv config-add tests/conf/timezone.ini 10 | fi 11 | 12 | composer install --no-interaction --ignore-platform-reqs 13 | composer update 14 | -------------------------------------------------------------------------------- /api/application/admin/lang/zh-cn/user/rule.php: -------------------------------------------------------------------------------- 1 | '父ID', 5 | 'Name' => '规则', 6 | 'Title' => '标题', 7 | 'Remark' => '备注', 8 | 'Ismenu' => '是否菜单', 9 | 'Createtime' => '创建时间', 10 | 'Updatetime' => '更新时间', 11 | 'Menu tips' => '规则任意,请不可重复,仅做层级显示,无需匹配控制器和方法', 12 | 'Node tips' => '模块/控制器/方法名', 13 | 'Weigh' => '权重', 14 | 'Status' => '状态' 15 | ]; 16 | -------------------------------------------------------------------------------- /spa/src/components/Modal/index.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import Modal from './Modal.vue' 3 | const v = Vue.extend(Modal) 4 | function modal(options) { 5 | let t = new v({ 6 | propsData: options 7 | }); 8 | t.$mount(); 9 | document.body.appendChild(t.$el); 10 | t.remove = function () { 11 | document.body.removeChild(t.$el); 12 | t.$destroy() 13 | } 14 | return t; 15 | } 16 | 17 | export default modal -------------------------------------------------------------------------------- /spa/src/components/Toast/index.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import Toast from './Toast.vue' 3 | const v = Vue.extend(Toast) 4 | function toast(options) { 5 | let t = new v({ 6 | propsData: options 7 | }); 8 | t.$mount(); 9 | document.body.appendChild(t.$el); 10 | t.remove = function () { 11 | document.body.removeChild(t.$el); 12 | t.$destroy() 13 | } 14 | return t; 15 | } 16 | 17 | export default toast -------------------------------------------------------------------------------- /api/public/assets/less/bootstrap/mixins/nav-vertical-align.less: -------------------------------------------------------------------------------- 1 | // Navbar vertical align 2 | // 3 | // Vertically center elements in the navbar. 4 | // Example: an element has a height of 30px, so write out `.navbar-vertical-align(30px);` to calculate the appropriate top margin. 5 | 6 | .navbar-vertical-align(@element-height) { 7 | margin-top: ((@navbar-height - @element-height) / 2); 8 | margin-bottom: ((@navbar-height - @element-height) / 2); 9 | } 10 | -------------------------------------------------------------------------------- /api/public/assets/less/bootstrap-less/mixins/nav-vertical-align.less: -------------------------------------------------------------------------------- 1 | // Navbar vertical align 2 | // 3 | // Vertically center elements in the navbar. 4 | // Example: an element has a height of 30px, so write out `.navbar-vertical-align(30px);` to calculate the appropriate top margin. 5 | 6 | .navbar-vertical-align(@element-height) { 7 | margin-top: ((@navbar-height - @element-height) / 2); 8 | margin-bottom: ((@navbar-height - @element-height) / 2); 9 | } 10 | -------------------------------------------------------------------------------- /spa/src/components/WSelect/index.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import Modal from './WSelect.vue' 3 | const v = Vue.extend(Modal) 4 | function wselect(options) { 5 | let t = new v({ 6 | propsData: options 7 | }); 8 | t.$mount(); 9 | document.body.appendChild(t.$el); 10 | t.remove = function () { 11 | document.body.removeChild(t.$el); 12 | t.$destroy() 13 | } 14 | return t; 15 | } 16 | 17 | export default wselect -------------------------------------------------------------------------------- /api/application/admin/model/AuthGroup.php: -------------------------------------------------------------------------------- 1 | [], 24 | 'edit' => [], 25 | ]; 26 | 27 | } 28 | -------------------------------------------------------------------------------- /api/public/assets/less/bootstrap/mixins/responsive-visibility.less: -------------------------------------------------------------------------------- 1 | // Responsive utilities 2 | 3 | // 4 | // More easily include all the states for responsive-utilities.less. 5 | .responsive-visibility() { 6 | display: block !important; 7 | table& { display: table !important; } 8 | tr& { display: table-row !important; } 9 | th&, 10 | td& { display: table-cell !important; } 11 | } 12 | 13 | .responsive-invisibility() { 14 | display: none !important; 15 | } 16 | -------------------------------------------------------------------------------- /api/application/admin/validate/Account.php: -------------------------------------------------------------------------------- 1 | [], 24 | 'edit' => [], 25 | ]; 26 | 27 | } 28 | -------------------------------------------------------------------------------- /api/application/admin/validate/Category.php: -------------------------------------------------------------------------------- 1 | [], 24 | 'edit' => [], 25 | ]; 26 | 27 | } 28 | -------------------------------------------------------------------------------- /api/application/admin/validate/UserGroup.php: -------------------------------------------------------------------------------- 1 | [], 24 | 'edit' => [], 25 | ]; 26 | 27 | } 28 | -------------------------------------------------------------------------------- /api/application/admin/validate/UserRule.php: -------------------------------------------------------------------------------- 1 | [], 24 | 'edit' => [], 25 | ]; 26 | 27 | } 28 | -------------------------------------------------------------------------------- /api/public/assets/less/fastadmin/labels.less: -------------------------------------------------------------------------------- 1 | /* 2 | * Component: Label 3 | * ---------------- 4 | */ 5 | .label-default { 6 | background-color: @gray; 7 | color: #444; 8 | } 9 | 10 | .label-danger { 11 | &:extend(.bg-red); 12 | } 13 | 14 | .label-info { 15 | &:extend(.bg-aqua); 16 | } 17 | 18 | .label-warning { 19 | &:extend(.bg-yellow); 20 | } 21 | 22 | .label-primary { 23 | &:extend(.bg-light-blue); 24 | } 25 | 26 | .label-success { 27 | &:extend(.bg-green); 28 | } 29 | -------------------------------------------------------------------------------- /api/application/common/model/MoneyLog.php: -------------------------------------------------------------------------------- 1 | 'ID', 5 | 'User_id' => '用户id', 6 | 'Money' => '金额', 7 | 'Remark' => '备注', 8 | 'Account_id' => '账户', 9 | 'Tags_id' => '分类', 10 | 'Status' => '类型', 11 | 'Status 0' => '支出', 12 | 'Status 1' => '收入', 13 | 'Type' => '来源', 14 | 'Type 0' => '默认', 15 | 'Type 1' => '导入', 16 | 'Time' => '时间', 17 | 'Createtime' => '添加时间' 18 | ]; 19 | -------------------------------------------------------------------------------- /api/application/admin/command/Crud/stubs/validate.stub: -------------------------------------------------------------------------------- 1 | [], 24 | 'edit' => [], 25 | ]; 26 | 27 | } 28 | -------------------------------------------------------------------------------- /api/application/api/validate/Account.php: -------------------------------------------------------------------------------- 1 | 'min:1|max:4', 14 | ]; 15 | /** 16 | * 提示消息 17 | */ 18 | protected $message = []; 19 | /** 20 | * 验证场景 21 | */ 22 | protected $scene = [ 23 | 'add' => ['name'], 24 | 'edit' => ['name'], 25 | ]; 26 | } 27 | -------------------------------------------------------------------------------- /api/public/assets/less/bootstrap-less/mixins/responsive-visibility.less: -------------------------------------------------------------------------------- 1 | // Responsive utilities 2 | 3 | // 4 | // More easily include all the states for responsive-utilities.less. 5 | .responsive-visibility() { 6 | display: block !important; 7 | table& { 8 | display: table !important; 9 | } 10 | tr& { 11 | display: table-row !important; 12 | } 13 | th&, 14 | td& { 15 | display: table-cell !important; 16 | } 17 | } 18 | 19 | .responsive-invisibility() { 20 | display: none !important; 21 | } 22 | -------------------------------------------------------------------------------- /api/application/admin/command/Crud/stubs/html/fieldlist.stub: -------------------------------------------------------------------------------- 1 | 2 |
3 |
4 | {:__('{%itemKey%}')} 5 | {:__('{%itemValue%}')} 6 |
7 |
{:__('Append')}
8 | 9 |
10 | 11 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Moneylog.cloud 2 | 3 | 4 | 5 | 基于 vue2 + vue-router + vuex + php(api) 的移动端简洁记账 web 单页应用 6 | 7 | ## 特点 8 | 9 | - 开源 10 | - 无广告 11 | - 只专注于记和查,不关注预算、账户余额 12 | - 首页就是记账输入页,免去二次点击 13 | - 实现了简单的导入账单功能 14 | - 记账时间可输入到几点几分 15 | 16 | ## 使用 17 | 18 | [1] 下载源码自行搭建使用 19 | 20 | [2] 访问 [moneylog.cloud](http://moneylog.cloud) 使用(请使用移动端或模拟移动端访问) 21 | 22 | *开源代码和 [moneylog.cloud](http://moneylog.cloud) 不会有区别 23 | 24 | ## 未来的开发计划 25 | 26 | - 定时记账 27 | - 数据导出 28 | - 定时数据导出 29 | - PC端 30 | -------------------------------------------------------------------------------- /api/application/admin/command/Crud/stubs/add.stub: -------------------------------------------------------------------------------- 1 |
2 | 3 | {%addList%} 4 | 11 |
12 | -------------------------------------------------------------------------------- /api/application/admin/command/Crud/stubs/edit.stub: -------------------------------------------------------------------------------- 1 |
2 | 3 | {%editList%} 4 | 11 |
12 | -------------------------------------------------------------------------------- /api/public/assets/less/bootstrap/mixins/border-radius.less: -------------------------------------------------------------------------------- 1 | // Single side border-radius 2 | 3 | .border-top-radius(@radius) { 4 | border-top-right-radius: @radius; 5 | border-top-left-radius: @radius; 6 | } 7 | .border-right-radius(@radius) { 8 | border-bottom-right-radius: @radius; 9 | border-top-right-radius: @radius; 10 | } 11 | .border-bottom-radius(@radius) { 12 | border-bottom-right-radius: @radius; 13 | border-bottom-left-radius: @radius; 14 | } 15 | .border-left-radius(@radius) { 16 | border-bottom-left-radius: @radius; 17 | border-top-left-radius: @radius; 18 | } 19 | -------------------------------------------------------------------------------- /api/public/assets/less/bootstrap/mixins/reset-text.less: -------------------------------------------------------------------------------- 1 | .reset-text() { 2 | font-family: @font-family-base; 3 | // We deliberately do NOT reset font-size. 4 | font-style: normal; 5 | font-weight: normal; 6 | letter-spacing: normal; 7 | line-break: auto; 8 | line-height: @line-height-base; 9 | text-align: left; // Fallback for where `start` is not supported 10 | text-align: start; 11 | text-decoration: none; 12 | text-shadow: none; 13 | text-transform: none; 14 | white-space: normal; 15 | word-break: normal; 16 | word-spacing: normal; 17 | word-wrap: normal; 18 | } 19 | -------------------------------------------------------------------------------- /api/public/assets/less/bootstrap-less/mixins/reset-text.less: -------------------------------------------------------------------------------- 1 | .reset-text() { 2 | font-family: @font-family-base; 3 | // We deliberately do NOT reset font-size. 4 | font-style: normal; 5 | font-weight: normal; 6 | letter-spacing: normal; 7 | line-break: auto; 8 | line-height: @line-height-base; 9 | text-align: left; // Fallback for where `start` is not supported 10 | text-align: start; 11 | text-decoration: none; 12 | text-shadow: none; 13 | text-transform: none; 14 | white-space: normal; 15 | word-break: normal; 16 | word-spacing: normal; 17 | word-wrap: normal; 18 | } 19 | -------------------------------------------------------------------------------- /api/application/admin/command/Importclear.php: -------------------------------------------------------------------------------- 1 | setName('Importclear')->setDescription('import service'); 17 | } 18 | /* 19 | * 开始结束 20 | * */ 21 | protected function execute(Input $input, Output $output) 22 | { 23 | \app\common\library\import\Main::clear(); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /api/public/assets/less/bootstrap-less/mixins/border-radius.less: -------------------------------------------------------------------------------- 1 | // Single side border-radius 2 | 3 | .border-top-radius(@radius) { 4 | border-top-right-radius: @radius; 5 | border-top-left-radius: @radius; 6 | } 7 | 8 | .border-right-radius(@radius) { 9 | border-bottom-right-radius: @radius; 10 | border-top-right-radius: @radius; 11 | } 12 | 13 | .border-bottom-radius(@radius) { 14 | border-bottom-right-radius: @radius; 15 | border-bottom-left-radius: @radius; 16 | } 17 | 18 | .border-left-radius(@radius) { 19 | border-bottom-left-radius: @radius; 20 | border-top-left-radius: @radius; 21 | } 22 | -------------------------------------------------------------------------------- /api/application/admin/command/Crud/stubs/html/heading-html.stub: -------------------------------------------------------------------------------- 1 | 2 |
3 | {:build_heading(null,FALSE)} 4 | 10 |
11 | -------------------------------------------------------------------------------- /api/public/assets/less/fastadmin/profile.less: -------------------------------------------------------------------------------- 1 | /* 2 | * Page: Profile 3 | * ------------- 4 | */ 5 | 6 | .profile-user-img { 7 | margin: 0 auto; 8 | width: 100px; 9 | padding: 3px; 10 | border: 3px solid @gray; 11 | } 12 | 13 | .profile-username { 14 | font-size: 21px; 15 | margin-top: 5px; 16 | } 17 | 18 | .post { 19 | border-bottom: 1px solid @gray; 20 | margin-bottom: 15px; 21 | padding-bottom: 15px; 22 | color: #666; 23 | &:last-of-type { 24 | border-bottom: 0; 25 | margin-bottom: 0; 26 | padding-bottom: 0; 27 | } 28 | .user-block { 29 | margin-bottom: 15px; 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /api/application/admin/command/Import.php: -------------------------------------------------------------------------------- 1 | setName('Import')->setDescription('import service'); 17 | } 18 | /* 19 | * 开始结束 20 | * */ 21 | protected function execute(Input $input, Output $output) 22 | { 23 | \app\common\library\import\Main::handle(); 24 | 25 | echo "处理完成", "\n"; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /api/public/assets/less/bootstrap/mixins/pagination.less: -------------------------------------------------------------------------------- 1 | // Pagination 2 | 3 | .pagination-size(@padding-vertical; @padding-horizontal; @font-size; @line-height; @border-radius) { 4 | > li { 5 | > a, 6 | > span { 7 | padding: @padding-vertical @padding-horizontal; 8 | font-size: @font-size; 9 | line-height: @line-height; 10 | } 11 | &:first-child { 12 | > a, 13 | > span { 14 | .border-left-radius(@border-radius); 15 | } 16 | } 17 | &:last-child { 18 | > a, 19 | > span { 20 | .border-right-radius(@border-radius); 21 | } 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /api/public/assets/less/bootstrap-less/mixins/pagination.less: -------------------------------------------------------------------------------- 1 | // Pagination 2 | 3 | .pagination-size(@padding-vertical; @padding-horizontal; @font-size; @line-height; @border-radius) { 4 | > li { 5 | > a, 6 | > span { 7 | padding: @padding-vertical @padding-horizontal; 8 | font-size: @font-size; 9 | line-height: @line-height; 10 | } 11 | &:first-child { 12 | > a, 13 | > span { 14 | .border-left-radius(@border-radius); 15 | } 16 | } 17 | &:last-child { 18 | > a, 19 | > span { 20 | .border-right-radius(@border-radius); 21 | } 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /api/application/common/library/Log.php: -------------------------------------------------------------------------------- 1 | '所属组别', 5 | 'Loginfailure' => '登录失败次数', 6 | 'Login time' => '最后登录', 7 | 'The parent group exceeds permission limit' => '父组别超出权限范围', 8 | 'Please input correct username' => '用户名只能由3-30位数字、字母、下划线组合', 9 | 'Username must be 3 to 30 characters' => '用户名只能由3-30位数字、字母、下划线组合', 10 | 'Please input correct password' => '密码长度必须在6-30位之间,不能包含空格', 11 | 'Password must be 6 to 30 characters' => '密码长度必须在6-30位之间,不能包含空格', 12 | ]; 13 | -------------------------------------------------------------------------------- /api/public/assets/less/fastadmin/.csslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "adjoining-classes": false, 3 | "box-sizing": false, 4 | "box-model": false, 5 | "compatible-vendor-prefixes": false, 6 | "floats": false, 7 | "font-sizes": false, 8 | "gradients": false, 9 | "important": false, 10 | "known-properties": false, 11 | "outline-none": false, 12 | "qualified-headings": false, 13 | "regex-selectors": false, 14 | "shorthand": false, 15 | "text-indent": false, 16 | "unique-headings": false, 17 | "universal-selector": false, 18 | "unqualified-attributes": false, 19 | "ids": false, 20 | "fallback-colors": false, 21 | "vendor-prefix": false, 22 | "import": false 23 | } 24 | -------------------------------------------------------------------------------- /api/public/assets/less/bootstrap/mixins/panels.less: -------------------------------------------------------------------------------- 1 | // Panels 2 | 3 | .panel-variant(@border; @heading-text-color; @heading-bg-color; @heading-border) { 4 | border-color: @border; 5 | 6 | & > .panel-heading { 7 | color: @heading-text-color; 8 | background-color: @heading-bg-color; 9 | border-color: @heading-border; 10 | 11 | + .panel-collapse > .panel-body { 12 | border-top-color: @border; 13 | } 14 | .badge { 15 | color: @heading-bg-color; 16 | background-color: @heading-text-color; 17 | } 18 | } 19 | & > .panel-footer { 20 | + .panel-collapse > .panel-body { 21 | border-bottom-color: @border; 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /spa/src/components/Loading/index.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import Loading from './Loading.vue' 3 | const loading = Vue.extend(Loading) 4 | 5 | let instanceList = []; 6 | 7 | function showLoading(options) { 8 | let t = new loading({ 9 | propsData: options 10 | }); 11 | t.$mount(); 12 | 13 | instanceList.push(t); 14 | 15 | document.body.appendChild(t.$el); 16 | t.remove = function () { 17 | document.body.removeChild(t.$el); 18 | t.$destroy() 19 | } 20 | return t; 21 | } 22 | showLoading.closeAll = function () { 23 | instanceList.forEach(element => { 24 | element.hide(); 25 | }); 26 | } 27 | export default showLoading -------------------------------------------------------------------------------- /api/public/assets/less/bootstrap-less/mixins/panels.less: -------------------------------------------------------------------------------- 1 | // Panels 2 | 3 | .panel-variant(@border; @heading-text-color; @heading-bg-color; @heading-border) { 4 | border-color: @border; 5 | 6 | & > .panel-heading { 7 | color: @heading-text-color; 8 | background-color: @heading-bg-color; 9 | border-color: @heading-border; 10 | 11 | + .panel-collapse > .panel-body { 12 | border-top-color: @border; 13 | } 14 | .badge { 15 | color: @heading-bg-color; 16 | background-color: @heading-text-color; 17 | } 18 | } 19 | & > .panel-footer { 20 | + .panel-collapse > .panel-body { 21 | border-bottom-color: @border; 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /api/public/assets/less/bootstrap/wells.less: -------------------------------------------------------------------------------- 1 | // 2 | // Wells 3 | // -------------------------------------------------- 4 | 5 | 6 | // Base class 7 | .well { 8 | min-height: 20px; 9 | padding: 19px; 10 | margin-bottom: 20px; 11 | background-color: @well-bg; 12 | border: 1px solid @well-border; 13 | border-radius: @border-radius-base; 14 | .box-shadow(inset 0 1px 1px rgba(0,0,0,.05)); 15 | blockquote { 16 | border-color: #ddd; 17 | border-color: rgba(0,0,0,.15); 18 | } 19 | } 20 | 21 | // Sizes 22 | .well-lg { 23 | padding: 24px; 24 | border-radius: @border-radius-large; 25 | } 26 | .well-sm { 27 | padding: 9px; 28 | border-radius: @border-radius-small; 29 | } 30 | -------------------------------------------------------------------------------- /api/public/assets/less/skins/_all-skins.less: -------------------------------------------------------------------------------- 1 | //All skins in one file 2 | @import "skin-blue.less"; 3 | @import "skin-blue-light.less"; 4 | @import "skin-black.less"; 5 | @import "skin-black-light.less"; 6 | @import "skin-green.less"; 7 | @import "skin-green-light.less"; 8 | @import "skin-red.less"; 9 | @import "skin-red-light.less"; 10 | @import "skin-yellow.less"; 11 | @import "skin-yellow-light.less"; 12 | @import "skin-purple.less"; 13 | @import "skin-purple-light.less"; 14 | @import "skin-black-blue.less"; 15 | @import "skin-black-purple.less"; 16 | @import "skin-black-green.less"; 17 | @import "skin-black-red.less"; 18 | @import "skin-black-yellow.less"; 19 | @import "skin-black-pink.less"; 20 | -------------------------------------------------------------------------------- /api/public/assets/less/bootstrap/mixins/hide-text.less: -------------------------------------------------------------------------------- 1 | // CSS image replacement 2 | // 3 | // Heads up! v3 launched with only `.hide-text()`, but per our pattern for 4 | // mixins being reused as classes with the same name, this doesn't hold up. As 5 | // of v3.0.1 we have added `.text-hide()` and deprecated `.hide-text()`. 6 | // 7 | // Source: https://github.com/h5bp/html5-boilerplate/commit/aa0396eae757 8 | 9 | // Deprecated as of v3.0.1 (has been removed in v4) 10 | .hide-text() { 11 | font: ~"0/0" a; 12 | color: transparent; 13 | text-shadow: none; 14 | background-color: transparent; 15 | border: 0; 16 | } 17 | 18 | // New mixin to use as of v3.0.1 19 | .text-hide() { 20 | .hide-text(); 21 | } 22 | -------------------------------------------------------------------------------- /spa/src/config.js.template: -------------------------------------------------------------------------------- 1 | // api请求域名 2 | let apiBaseUrl = 'http://url/api/'; 3 | 4 | const icons = ['yen-banknote', 'baby-bottle', 'baby', 'candy', 'cloud', 'fuel-pump', 'house', 'label', 'man', 'package', 'pill', 'sparkles', 'woman', 'airplane', 'automobile', 'beach-with-umbrella', 'beer-mug', 'bread', 'briefcase', 'broccoli', 'bubble-tea', 'bus', 'cat', 'chart-increasing', 'clapper-board', 'cooked-rice', 'cut-of-meat', 'fishing-pole', 'hamburger', 'handbag', 'handshake', 'laptop', 'party-popper', 'ping-pong', 'pizza', 'service-dog', 'shopping-cart', 'sparkling-heart', 'syringe', 't-shirt', 'taxi', 'tropical-drink', 'video-game', 'watermelon', 'wrapped-gift']; 5 | 6 | export default { 7 | apiBaseUrl, 8 | icons 9 | } -------------------------------------------------------------------------------- /api/application/common/validate/Moneylog.php: -------------------------------------------------------------------------------- 1 | 'require|number', 11 | 'money' => 'require|number', 12 | 'account_id' => 'require|number', 13 | 'tags_id' => 'require|number', 14 | 'time' => 'require|number', 15 | 'remark' => 'require|max:1', 16 | ]; 17 | 18 | 19 | 20 | protected $scene = [ 21 | 'add' => ['user_id', 'money', 'account_id', 'tags_id', 'time', 'remark'], 22 | 'edit' => ['user_id', 'money', 'account_id', 'tags_id', 'time', 'remark'], 23 | ]; 24 | } 25 | -------------------------------------------------------------------------------- /api/public/assets/less/bootstrap-less/mixins/hide-text.less: -------------------------------------------------------------------------------- 1 | // CSS image replacement 2 | // 3 | // Heads up! v3 launched with only `.hide-text()`, but per our pattern for 4 | // mixins being reused as classes with the same name, this doesn't hold up. As 5 | // of v3.0.1 we have added `.text-hide()` and deprecated `.hide-text()`. 6 | // 7 | // Source: https://github.com/h5bp/html5-boilerplate/commit/aa0396eae757 8 | 9 | // Deprecated as of v3.0.1 (will be removed in v4) 10 | .hide-text() { 11 | font: ~"0/0" a; 12 | color: transparent; 13 | text-shadow: none; 14 | background-color: transparent; 15 | border: 0; 16 | } 17 | 18 | // New mixin to use as of v3.0.1 19 | .text-hide() { 20 | .hide-text(); 21 | } 22 | -------------------------------------------------------------------------------- /api/public/assets/less/bootstrap/mixins/list-group.less: -------------------------------------------------------------------------------- 1 | // List Groups 2 | 3 | .list-group-item-variant(@state; @background; @color) { 4 | .list-group-item-@{state} { 5 | color: @color; 6 | background-color: @background; 7 | 8 | a&, 9 | button& { 10 | color: @color; 11 | 12 | .list-group-item-heading { 13 | color: inherit; 14 | } 15 | 16 | &:hover, 17 | &:focus { 18 | color: @color; 19 | background-color: darken(@background, 5%); 20 | } 21 | &.active, 22 | &.active:hover, 23 | &.active:focus { 24 | color: #fff; 25 | background-color: @color; 26 | border-color: @color; 27 | } 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /api/application/admin/validate/Moneylog.php: -------------------------------------------------------------------------------- 1 | 'require|number', 11 | 'money' => 'require|number|between:0.01,1000000', 12 | 'account_id' => 'require|number', 13 | 'tags_id' => 'require|number', 14 | 'time' => 'require|number|date', 15 | 'remark' => 'max:10', 16 | ]; 17 | 18 | 19 | 20 | protected $scene = [ 21 | 'add' => ['user_id', 'money', 'account_id', 'tags_id', 'time', 'remark'], 22 | 'edit' => ['user_id', 'money', 'account_id', 'tags_id', 'time', 'remark'], 23 | ]; 24 | } 25 | -------------------------------------------------------------------------------- /api/public/assets/less/bootstrap-less/mixins/list-group.less: -------------------------------------------------------------------------------- 1 | // List Groups 2 | 3 | .list-group-item-variant(@state; @background; @color) { 4 | .list-group-item-@{state} { 5 | color: @color; 6 | background-color: @background; 7 | 8 | a&, 9 | button& { 10 | color: @color; 11 | 12 | .list-group-item-heading { 13 | color: inherit; 14 | } 15 | 16 | &:hover, 17 | &:focus { 18 | color: @color; 19 | background-color: darken(@background, 5%); 20 | } 21 | &.active, 22 | &.active:hover, 23 | &.active:focus { 24 | color: #fff; 25 | background-color: @color; 26 | border-color: @color; 27 | } 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /api/README.md: -------------------------------------------------------------------------------- 1 | # Moneylog.cloud API 2 | 3 | Moneylog API 服务端,开发框架是基于 ThinkPHP 的 FastAdmin 4 | 5 | ## 环境要求 6 | 7 | *建议* 8 | 9 | PHP 7.3 10 | 11 | MySQL 5.6 12 | 13 | ## 搭建 14 | 15 | - 创建您的数据库,将 `moneylog.sql` 导入 16 | - 将 `application\database.php.template` 更名为:`application\database.php`,并打开修改相应的数据库连接信息 17 | - 根据需求修改 `application\config.php` 中的 `cache.type` 配置项,默认使用了 `redis` 18 | - 将 `public` 目录设置为访问目录 19 | - 访问后台 > 常规管理 > 系统配置 > 邮件配置 修改正确的配置,因为需要使用邮件发送注册验证码 20 | 21 | ## 访问后台 22 | 23 | 地址:http://url/admin.php 24 | 25 | 默认账号:admin 26 | 27 | 默认密码:123456 28 | 29 | ## 配置导入账单服务 30 | 31 | Moneylog.cloud 通过定时执行 `command` 完成账单导入服务 32 | 33 | ``` 34 | 使用命令 php think Import 处理1个文件 35 | 36 | 使用命令 php think Importclear 清空所有待处理账单队列缓存 37 | ``` 38 | -------------------------------------------------------------------------------- /api/public/assets/less/bootstrap/mixins/clearfix.less: -------------------------------------------------------------------------------- 1 | // Clearfix 2 | // 3 | // For modern browsers 4 | // 1. The space content is one way to avoid an Opera bug when the 5 | // contenteditable attribute is included anywhere else in the document. 6 | // Otherwise it causes space to appear at the top and bottom of elements 7 | // that are clearfixed. 8 | // 2. The use of `table` rather than `block` is only necessary if using 9 | // `:before` to contain the top-margins of child elements. 10 | // 11 | // Source: http://nicolasgallagher.com/micro-clearfix-hack/ 12 | 13 | .clearfix() { 14 | &:before, 15 | &:after { 16 | content: " "; // 1 17 | display: table; // 2 18 | } 19 | &:after { 20 | clear: both; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /api/public/assets/less/bootstrap-less/mixins/clearfix.less: -------------------------------------------------------------------------------- 1 | // Clearfix 2 | // 3 | // For modern browsers 4 | // 1. The space content is one way to avoid an Opera bug when the 5 | // contenteditable attribute is included anywhere else in the document. 6 | // Otherwise it causes space to appear at the top and bottom of elements 7 | // that are clearfixed. 8 | // 2. The use of `table` rather than `block` is only necessary if using 9 | // `:before` to contain the top-margins of child elements. 10 | // 11 | // Source: http://nicolasgallagher.com/micro-clearfix-hack/ 12 | 13 | .clearfix() { 14 | &:before, 15 | &:after { 16 | content: " "; // 1 17 | display: table; // 2 18 | } 19 | &:after { 20 | clear: both; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /api/public/assets/less/bootstrap/breadcrumbs.less: -------------------------------------------------------------------------------- 1 | // 2 | // Breadcrumbs 3 | // -------------------------------------------------- 4 | 5 | 6 | .breadcrumb { 7 | padding: @breadcrumb-padding-vertical @breadcrumb-padding-horizontal; 8 | margin-bottom: @line-height-computed; 9 | list-style: none; 10 | background-color: @breadcrumb-bg; 11 | border-radius: @border-radius-base; 12 | 13 | > li { 14 | display: inline-block; 15 | 16 | + li:before { 17 | content: "@{breadcrumb-separator}\00a0"; // Unicode space added since inline-block means non-collapsing white-space 18 | padding: 0 5px; 19 | color: @breadcrumb-color; 20 | } 21 | } 22 | 23 | > .active { 24 | color: @breadcrumb-active-color; 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /api/public/assets/less/bootstrap/responsive-embed.less: -------------------------------------------------------------------------------- 1 | // Embeds responsive 2 | // 3 | // Credit: Nicolas Gallagher and SUIT CSS. 4 | 5 | .embed-responsive { 6 | position: relative; 7 | display: block; 8 | height: 0; 9 | padding: 0; 10 | overflow: hidden; 11 | 12 | .embed-responsive-item, 13 | iframe, 14 | embed, 15 | object, 16 | video { 17 | position: absolute; 18 | top: 0; 19 | left: 0; 20 | bottom: 0; 21 | height: 100%; 22 | width: 100%; 23 | border: 0; 24 | } 25 | } 26 | 27 | // Modifier class for 16:9 aspect ratio 28 | .embed-responsive-16by9 { 29 | padding-bottom: 56.25%; 30 | } 31 | 32 | // Modifier class for 4:3 aspect ratio 33 | .embed-responsive-4by3 { 34 | padding-bottom: 75%; 35 | } 36 | -------------------------------------------------------------------------------- /api/application/admin/lang/zh-cn/general/profile.php: -------------------------------------------------------------------------------- 1 | '链接', 5 | 'Userame' => '用户名', 6 | 'Createtime' => '操作时间', 7 | 'Click to edit' => '点击编辑', 8 | 'Admin log' => '操作日志', 9 | 'Leave password blank if dont want to change' => '不修改密码请留空', 10 | 'Please input correct email' => '请输入正确的Email地址', 11 | 'Please input correct password' => '密码长度必须在6-30位之间,不能包含空格', 12 | 'Password must be 6 to 30 characters' => '密码长度必须在6-30位之间,不能包含空格', 13 | 'Email already exists' => '邮箱已经存在', 14 | ]; 15 | -------------------------------------------------------------------------------- /api/think: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env php 2 | 11 | // +---------------------------------------------------------------------- 12 | 13 | // 定义项目路径 14 | define('APP_PATH', __DIR__ . '/application/'); 15 | 16 | // 加载框架引导文件 17 | require './thinkphp/console.php'; -------------------------------------------------------------------------------- /api/application/admin/tags.php: -------------------------------------------------------------------------------- 1 | 11 | // +---------------------------------------------------------------------- 12 | // 应用行为扩展定义文件 13 | return [ 14 | // 应用结束 15 | 'app_end' => [ 16 | 'app\\admin\\behavior\\AdminLog', 17 | ], 18 | ]; 19 | -------------------------------------------------------------------------------- /api/thinkphp/start.php: -------------------------------------------------------------------------------- 1 | 10 | // +---------------------------------------------------------------------- 11 | 12 | namespace think; 13 | 14 | // ThinkPHP 引导文件 15 | // 1. 加载基础文件 16 | require __DIR__ . '/base.php'; 17 | 18 | // 2. 执行应用 19 | App::run()->send(); 20 | -------------------------------------------------------------------------------- /api/thinkphp/console.php: -------------------------------------------------------------------------------- 1 | 10 | // +---------------------------------------------------------------------- 11 | 12 | namespace think; 13 | 14 | // ThinkPHP 引导文件 15 | // 加载基础文件 16 | require __DIR__ . '/base.php'; 17 | 18 | // 执行应用 19 | App::initCommon(); 20 | Console::init(); 21 | -------------------------------------------------------------------------------- /api/public/assets/less/fastadmin/users-list.less: -------------------------------------------------------------------------------- 1 | /* 2 | * Component: Users List 3 | * --------------------- 4 | */ 5 | .users-list { 6 | &:extend(.list-unstyled); 7 | > li { 8 | width: 25%; 9 | float: left; 10 | padding: 10px; 11 | text-align: center; 12 | img { 13 | .border-radius(50%); 14 | max-width: 100%; 15 | height: auto; 16 | } 17 | > a:hover { 18 | &, 19 | .users-list-name { 20 | color: #999; 21 | } 22 | } 23 | } 24 | } 25 | 26 | .users-list-name, 27 | .users-list-date { 28 | display: block; 29 | } 30 | 31 | .users-list-name { 32 | font-weight: 600; 33 | color: #444; 34 | overflow: hidden; 35 | white-space: nowrap; 36 | text-overflow: ellipsis; 37 | } 38 | 39 | .users-list-date { 40 | color: #999; 41 | font-size: 12px; 42 | } 43 | -------------------------------------------------------------------------------- /api/application/admin/lang/zh-cn/auth/group.php: -------------------------------------------------------------------------------- 1 | '父组别不能是自身的子组别', 5 | 'The parent group can not found' => '父组别未找到', 6 | 'Group not found' => '组别未找到', 7 | 'Can not change the parent to child' => '父组别不能是它的子组别', 8 | 'Can not change the parent to self' => '父组别不能是它自己', 9 | 'You can not delete group that contain child group and administrators' => '你不能删除含有子组和管理员的组', 10 | 'The parent group exceeds permission limit' => '父组别超出权限范围', 11 | 'The parent group can not be its own child or itself' => '父组别不能是它的子组别及本身', 12 | ]; 13 | -------------------------------------------------------------------------------- /api/application/admin/command/Crud/stubs/model.stub: -------------------------------------------------------------------------------- 1 | thead > tr, 7 | .table > tbody > tr, 8 | .table > tfoot > tr { 9 | > td.@{state}, 10 | > th.@{state}, 11 | &.@{state} > td, 12 | &.@{state} > th { 13 | background-color: @background; 14 | } 15 | } 16 | 17 | // Hover states for `.table-hover` 18 | // Note: this is not available for cells or rows within `thead` or `tfoot`. 19 | .table-hover > tbody > tr { 20 | > td.@{state}:hover, 21 | > th.@{state}:hover, 22 | &.@{state}:hover > td, 23 | &:hover > .@{state}, 24 | &.@{state}:hover > th { 25 | background-color: darken(@background, 5%); 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /api/application/admin/controller/Tags.php: -------------------------------------------------------------------------------- 1 | model = new \app\admin\model\Tags; 25 | $this->view->assign("statusList", $this->model->getStatusList()); 26 | } 27 | 28 | 29 | 30 | /** 31 | * 默认生成的控制器所继承的父类中有index/add/edit/del/multi五个基础方法、destroy/restore/recyclebin三个回收站方法 32 | * 因此在当前控制器中可不用编写增删改查的代码,除非需要自己控制这部分逻辑 33 | * 需要将application/admin/library/traits/Backend.php中对应的方法复制到当前控制器,然后进行修改 34 | */ 35 | 36 | 37 | } 38 | -------------------------------------------------------------------------------- /api/application/admin/model/Admin.php: -------------------------------------------------------------------------------- 1 | encryptPassword($NewPassword); 24 | $ret = $this->where(['id' => $uid])->update(['password' => $passwd]); 25 | return $ret; 26 | } 27 | 28 | // 密码加密 29 | protected function encryptPassword($password, $salt = '', $encrypt = 'md5') 30 | { 31 | return $encrypt($password . $salt); 32 | } 33 | 34 | } 35 | -------------------------------------------------------------------------------- /api/public/assets/less/bootstrap-less/mixins/table-row.less: -------------------------------------------------------------------------------- 1 | // Tables 2 | 3 | .table-row-variant(@state; @background) { 4 | // Exact selectors below required to override `.table-striped` and prevent 5 | // inheritance to nested tables. 6 | .table > thead > tr, 7 | .table > tbody > tr, 8 | .table > tfoot > tr { 9 | > td.@{state}, 10 | > th.@{state}, 11 | &.@{state} > td, 12 | &.@{state} > th { 13 | background-color: @background; 14 | } 15 | } 16 | 17 | // Hover states for `.table-hover` 18 | // Note: this is not available for cells or rows within `thead` or `tfoot`. 19 | .table-hover > tbody > tr { 20 | > td.@{state}:hover, 21 | > th.@{state}:hover, 22 | &.@{state}:hover > td, 23 | &:hover > .@{state}, 24 | &.@{state}:hover > th { 25 | background-color: darken(@background, 5%); 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /api/application/admin/model/UserGroup.php: -------------------------------------------------------------------------------- 1 | __('Normal'), 'hidden' => __('Hidden')]; 25 | } 26 | 27 | public function getStatusTextAttr($value, $data) 28 | { 29 | $value = $value ? $value : $data['status']; 30 | $list = $this->getStatusList(); 31 | return isset($list[$value]) ? $list[$value] : ''; 32 | } 33 | 34 | } 35 | -------------------------------------------------------------------------------- /api/public/router.php: -------------------------------------------------------------------------------- 1 | 10 | // +---------------------------------------------------------------------- 11 | // $Id$ 12 | 13 | if (is_file($_SERVER["DOCUMENT_ROOT"] . $_SERVER["SCRIPT_NAME"])) { 14 | return false; 15 | } else { 16 | $_SERVER["SCRIPT_FILENAME"] = __DIR__ . '/index.php'; 17 | 18 | require __DIR__ . "/index.php"; 19 | } 20 | -------------------------------------------------------------------------------- /api/application/admin/controller/Account.php: -------------------------------------------------------------------------------- 1 | model = new \app\admin\model\Account; 25 | $this->view->assign("statusList", $this->model->getStatusList()); 26 | } 27 | 28 | 29 | 30 | /** 31 | * 默认生成的控制器所继承的父类中有index/add/edit/del/multi五个基础方法、destroy/restore/recyclebin三个回收站方法 32 | * 因此在当前控制器中可不用编写增删改查的代码,除非需要自己控制这部分逻辑 33 | * 需要将application/admin/library/traits/Backend.php中对应的方法复制到当前控制器,然后进行修改 34 | */ 35 | 36 | 37 | } 38 | -------------------------------------------------------------------------------- /api/application/admin/view/auth/adminlog/detail.html: -------------------------------------------------------------------------------- 1 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | {volist name="row" id="vo" } 15 | 16 | 17 | 18 | 19 | {/volist} 20 | 21 |
{:__('Title')}{:__('Content')}
{:__($key)}{if $key=='createtime'}{$vo|datetime}{else/}{$vo|htmlentities}{/if}
22 | 28 | -------------------------------------------------------------------------------- /api/application/admin/lang/zh-cn/category.php: -------------------------------------------------------------------------------- 1 | 'ID', 5 | 'Pid' => '父ID', 6 | 'Type' => '类型', 7 | 'All' => '全部', 8 | 'Image' => '图片', 9 | 'Keywords' => '关键字', 10 | 'Description' => '描述', 11 | 'Diyname' => '自定义名称', 12 | 'Createtime' => '创建时间', 13 | 'Updatetime' => '更新时间', 14 | 'Weigh' => '权重', 15 | 'Category warmtips' => '温馨提示:栏目类型请前往常规管理->系统配置->字典配置中进行管理', 16 | 'Can not change the parent to child or itself' => '父组别不能是它的子组别或它自己', 17 | 'Status' => '状态' 18 | ]; 19 | -------------------------------------------------------------------------------- /api/public/assets/less/fastadmin/404_500_errors.less: -------------------------------------------------------------------------------- 1 | /* 2 | * Page: 400 and 500 error pages 3 | * ------------------------------ 4 | */ 5 | .error-page { 6 | width: 600px; 7 | margin: 20px auto 0 auto; 8 | @media (max-width: @screen-sm-max) { 9 | width: 100%; 10 | } 11 | //For the error number e.g: 404 12 | > .headline { 13 | float: left; 14 | font-size: 100px; 15 | font-weight: 300; 16 | @media (max-width: @screen-sm-max) { 17 | float: none; 18 | text-align: center; 19 | } 20 | } 21 | //For the message 22 | > .error-content { 23 | margin-left: 190px; 24 | @media (max-width: @screen-sm-max) { 25 | margin-left: 0; 26 | } 27 | > h3 { 28 | font-weight: 300; 29 | font-size: 25px; 30 | @media (max-width: @screen-sm-max) { 31 | text-align: center; 32 | } 33 | } 34 | display: block; 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /api/application/admin/command/Api/lang/zh-cn.php: -------------------------------------------------------------------------------- 1 | '基础信息', 5 | 'Sandbox' => '在线测试', 6 | 'Sampleoutput' => '返回示例', 7 | 'Headers' => 'Headers', 8 | 'Parameters' => '参数', 9 | 'Body' => '正文', 10 | 'Name' => '名称', 11 | 'Type' => '类型', 12 | 'Required' => '必选', 13 | 'Description' => '描述', 14 | 'Send' => '提交', 15 | 'Reset' => '重置', 16 | 'Tokentips' => 'Token在会员注册或登录后都会返回,WEB端同时存在于Cookie中', 17 | 'Apiurltips' => 'API接口URL', 18 | 'Savetips' => '点击保存后Token和Api url都将保存在本地Localstorage中', 19 | 'Authorization' => '权限', 20 | 'NeedLogin' => '登录', 21 | 'NeedRight' => '鉴权', 22 | 'ReturnHeaders' => '响应头', 23 | 'ReturnParameters' => '返回参数', 24 | 'Response' => '响应输出', 25 | ]; 26 | -------------------------------------------------------------------------------- /api/application/extra/site.php.template: -------------------------------------------------------------------------------- 1 | 'Moneylog.cloud', 5 | 'version' => '1.0.1', 6 | 'timezone' => 'Asia/Shanghai', 7 | 'forbiddenip' => '', 8 | 'fixedpage' => 'dashboard', 9 | 'categorytype' => 10 | array( 11 | 'default' => '默认', 12 | 'page' => '单页', 13 | 'article' => '文章', 14 | 'test' => 'Test', 15 | ), 16 | 'configgroup' => 17 | array( 18 | 'basic' => '基础配置', 19 | 'email' => '邮件配置', 20 | 'dictionary' => '字典配置', 21 | ), 22 | 'mail_type' => '1', 23 | 'mail_smtp_host' => 'smtp.163.com', 24 | 'mail_smtp_port' => '465', 25 | 'mail_smtp_user' => '', 26 | 'mail_smtp_pass' => '', 27 | 'mail_verify_type' => '2', 28 | 'mail_from' => '', 29 | 'attachmentcategory' => 30 | array( 31 | 'category1' => '分类一', 32 | 'category2' => '分类二', 33 | 'custom' => '自定义', 34 | ), 35 | 'url' => 'http://moneylog.cloud', 36 | ); 37 | -------------------------------------------------------------------------------- /api/public/assets/css/iconfont.css: -------------------------------------------------------------------------------- 1 | 2 | @font-face {font-family: "iconfont"; 3 | src: url('../fonts/iconfont/iconfont.eot'); /* IE9*/ 4 | src: url('../fonts/iconfont/iconfont.eot#iefix') format('embedded-opentype'), /* IE6-IE8 */ 5 | url('../fonts/iconfont/iconfont.woff') format('woff'), /* chrome, firefox */ 6 | url('../fonts/iconfont/iconfont.ttf') format('truetype'), /* chrome, firefox, opera, Safari, Android, iOS 4.2+*/ 7 | url('../fonts/iconfont/iconfont.svg#iconfont') format('svg'); /* iOS 4.1- */ 8 | } 9 | 10 | .iconfont { 11 | font-family:"iconfont" !important; 12 | font-size:16px; 13 | font-style:normal; 14 | -webkit-font-smoothing: antialiased; 15 | -moz-osx-font-smoothing: grayscale; 16 | } 17 | 18 | .icon-max:before { content: "\e623"; } 19 | 20 | .icon-restore:before { content: "\e624"; } 21 | 22 | .icon-min:before { content: "\e625"; } 23 | 24 | .icon-close:before { content: "\e626"; } 25 | 26 | -------------------------------------------------------------------------------- /api/thinkphp/library/think/exception/RouteNotFoundException.php: -------------------------------------------------------------------------------- 1 | 10 | // +---------------------------------------------------------------------- 11 | 12 | namespace think\exception; 13 | 14 | class RouteNotFoundException extends HttpException 15 | { 16 | 17 | public function __construct() 18 | { 19 | parent::__construct(404, 'Route Not Found'); 20 | } 21 | 22 | } 23 | -------------------------------------------------------------------------------- /api/application/extra/upload.php: -------------------------------------------------------------------------------- 1 | 'ajax/upload', 9 | /** 10 | * CDN地址 11 | */ 12 | 'cdnurl' => '', 13 | /** 14 | * 文件保存格式 15 | */ 16 | 'savekey' => '/uploads/{year}{mon}{day}/{filemd5}{.suffix}', 17 | /** 18 | * 最大可上传大小 19 | */ 20 | 'maxsize' => '10mb', 21 | /** 22 | * 可上传的文件类型 23 | */ 24 | 'mimetype' => 'jpg,png,bmp,jpeg,gif,webp,zip,rar,xls,xlsx,wav,mp4,mp3,webm,pdf', 25 | /** 26 | * 是否支持批量上传 27 | */ 28 | 'multiple' => false, 29 | /** 30 | * 是否支持分片上传 31 | */ 32 | 'chunking' => false, 33 | /** 34 | * 默认分片大小 35 | */ 36 | 'chunksize' => 2097152, 37 | /** 38 | * 完整URL模式 39 | */ 40 | 'fullmode' => false, 41 | /** 42 | * 缩略图样式 43 | */ 44 | 'thumbstyle' => '', 45 | ]; 46 | -------------------------------------------------------------------------------- /api/application/admin/command/Crud/stubs/controller.stub: -------------------------------------------------------------------------------- 1 | model = new \{%modelNamespace%}\{%modelName%}; 25 | {%controllerAssignList%} 26 | } 27 | 28 | {%controllerImport%} 29 | 30 | /** 31 | * 默认生成的控制器所继承的父类中有index/add/edit/del/multi五个基础方法、destroy/restore/recyclebin三个回收站方法 32 | * 因此在当前控制器中可不用编写增删改查的代码,除非需要自己控制这部分逻辑 33 | * 需要将application/admin/library/traits/Backend.php中对应的方法复制到当前控制器,然后进行修改 34 | */ 35 | 36 | {%controllerIndex%} 37 | } 38 | -------------------------------------------------------------------------------- /spa/src/library/common.js: -------------------------------------------------------------------------------- 1 | const getUnit = function (money) { 2 | let unit = ""; 3 | money = Math.abs(money); 4 | if (money < 10) { 5 | unit = ""; 6 | } else if (money >= 10 && money < 100) { 7 | unit = "拾"; 8 | } else if (money >= 100 && money < 1000) { 9 | unit = "佰"; 10 | } else if (money >= 1000 && money < 10000) { 11 | unit = "仟"; 12 | } else if (money >= 10000 && money < 100000) { 13 | unit = "万"; 14 | } else if (money >= 100000 && money < 1000000) { 15 | unit = "拾万"; 16 | } else if (money >= 1000000 && money < 10000000) { 17 | unit = "佰万"; 18 | } else if (money >= 10000000 && money < 100000000) { 19 | unit = "仟万"; 20 | } else if (money >= 100000000 && money < 1000000000) { 21 | unit = "亿"; 22 | } else { 23 | unit = "😵"; 24 | } 25 | return unit; 26 | } 27 | 28 | export default { 29 | getUnit 30 | } -------------------------------------------------------------------------------- /api/thinkphp/tests/mock.php: -------------------------------------------------------------------------------- 1 | 10 | // +---------------------------------------------------------------------- 11 | 12 | // 测试入口文件 13 | $_SERVER['REQUEST_METHOD'] = 'GET'; 14 | // 定义项目测试基础路径 15 | define('TEST_PATH', __DIR__ . '/'); 16 | // 定义项目路径 17 | define('APP_PATH', __DIR__ . '/application/'); 18 | // 加载框架基础文件 19 | require __DIR__ . '/../base.php'; 20 | \think\Loader::addNamespace('tests', TEST_PATH); 21 | -------------------------------------------------------------------------------- /api/application/admin/view/auth/admin/index.html: -------------------------------------------------------------------------------- 1 |
2 | {:build_heading()} 3 | 4 |
5 |
6 |
7 |
8 |
9 | {:build_toolbar('refresh,add,delete')} 10 |
11 | 15 |
16 |
17 |
18 | 19 |
20 |
21 |
22 | -------------------------------------------------------------------------------- /api/application/admin/view/auth/group/index.html: -------------------------------------------------------------------------------- 1 |
2 | {:build_heading()} 3 | 4 |
5 |
6 |
7 |
8 |
9 | {:build_toolbar('refresh,add,delete')} 10 |
11 | 15 |
16 |
17 |
18 | 19 |
20 |
21 |
22 | -------------------------------------------------------------------------------- /api/public/assets/less/bootstrap/close.less: -------------------------------------------------------------------------------- 1 | // 2 | // Close icons 3 | // -------------------------------------------------- 4 | 5 | 6 | .close { 7 | float: right; 8 | font-size: (@font-size-base * 1.5); 9 | font-weight: @close-font-weight; 10 | line-height: 1; 11 | color: @close-color; 12 | text-shadow: @close-text-shadow; 13 | .opacity(.2); 14 | 15 | &:hover, 16 | &:focus { 17 | color: @close-color; 18 | text-decoration: none; 19 | cursor: pointer; 20 | .opacity(.5); 21 | } 22 | 23 | // Additional properties for button version 24 | // iOS requires the button element instead of an anchor tag. 25 | // If you want the anchor version, it requires `href="#"`. 26 | // See https://developer.mozilla.org/en-US/docs/Web/Events/click#Safari_Mobile 27 | button& { 28 | padding: 0; 29 | cursor: pointer; 30 | background: transparent; 31 | border: 0; 32 | -webkit-appearance: none; 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /api/public/assets/less/bootstrap/thumbnails.less: -------------------------------------------------------------------------------- 1 | // 2 | // Thumbnails 3 | // -------------------------------------------------- 4 | 5 | 6 | // Mixin and adjust the regular image class 7 | .thumbnail { 8 | display: block; 9 | padding: @thumbnail-padding; 10 | margin-bottom: @line-height-computed; 11 | line-height: @line-height-base; 12 | background-color: @thumbnail-bg; 13 | border: 1px solid @thumbnail-border; 14 | border-radius: @thumbnail-border-radius; 15 | .transition(border .2s ease-in-out); 16 | 17 | > img, 18 | a > img { 19 | &:extend(.img-responsive); 20 | margin-left: auto; 21 | margin-right: auto; 22 | } 23 | 24 | // Add a hover state for linked versions only 25 | a&:hover, 26 | a&:focus, 27 | a&.active { 28 | border-color: @link-color; 29 | } 30 | 31 | // Image captions 32 | .caption { 33 | padding: @thumbnail-caption-padding; 34 | color: @thumbnail-caption-color; 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /api/application/admin/view/auth/adminlog/index.html: -------------------------------------------------------------------------------- 1 |
2 | {:build_heading()} 3 | 4 |
5 |
6 |
7 |
8 |
9 | {:build_toolbar('refresh,delete')} 10 |
11 | 15 |
16 |
17 |
18 | 19 |
20 |
21 |
22 | -------------------------------------------------------------------------------- /api/public/index.php: -------------------------------------------------------------------------------- 1 | 11 | // +---------------------------------------------------------------------- 12 | // [ 应用入口文件 ] 13 | // 定义应用目录 14 | define('APP_PATH', __DIR__ . '/../application/'); 15 | 16 | // 判断是否安装 17 | if (!is_file(APP_PATH . 'admin/command/Install/install.lock')) { 18 | header("location:./install.php"); 19 | exit; 20 | } 21 | 22 | // 加载框架引导文件 23 | require __DIR__ . '/../thinkphp/start.php'; 24 | -------------------------------------------------------------------------------- /api/thinkphp/tests/application/route.php: -------------------------------------------------------------------------------- 1 | 10 | // +---------------------------------------------------------------------- 11 | // $Id$ 12 | 13 | return [ 14 | '__pattern__' => [ 15 | 'name' => '\w+', 16 | ], 17 | '[hello]' => [ 18 | ':id' => ['index/hello', ['method' => 'get'], ['id' => '\d+']], 19 | ':name' => ['index/hello', ['method' => 'post']], 20 | ], 21 | 22 | ]; 23 | -------------------------------------------------------------------------------- /api/application/api/validate/Tags.php: -------------------------------------------------------------------------------- 1 | 'min:1|max:4', 14 | 'icon_name' => 'in:baby-bottle,baby,candy,cloud,fuel-pump,house,label,man,package,pill,sparkles,woman,airplane,automobile,beach-with-umbrella,beer-mug,bread,briefcase,broccoli,bubble-tea,bus,cat,chart-increasing,clapper-board,cooked-rice,cut-of-meat,fishing-pole,hamburger,handbag,handshake,laptop,party-popper,ping-pong,pizza,service-dog,shopping-cart,sparkling-heart,syringe,t-shirt,taxi,tropical-drink,video-game,watermelon,wrapped-gift,yen-banknote' 15 | ]; 16 | /** 17 | * 提示消息 18 | */ 19 | protected $message = []; 20 | /** 21 | * 验证场景 22 | */ 23 | protected $scene = [ 24 | 'add' => ['name'], 25 | 'edit' => ['name'], 26 | ]; 27 | } 28 | -------------------------------------------------------------------------------- /api/application/route.php: -------------------------------------------------------------------------------- 1 | 11 | // +---------------------------------------------------------------------- 12 | 13 | return [ 14 | //别名配置,别名只能是映射到控制器且访问时必须加上请求的方法 15 | '__alias__' => [ 16 | ], 17 | //变量规则 18 | '__pattern__' => [ 19 | ], 20 | // 域名绑定到模块 21 | // '__domain__' => [ 22 | // 'admin' => 'admin', 23 | // 'api' => 'api', 24 | // ], 25 | ]; 26 | -------------------------------------------------------------------------------- /api/application/admin/controller/Moneylog.php: -------------------------------------------------------------------------------- 1 | model = new \app\admin\model\Moneylog; 25 | $this->view->assign("statusList", $this->model->getStatusList()); 26 | $this->view->assign("typeList", $this->model->getTypeList()); 27 | } 28 | 29 | 30 | 31 | /** 32 | * 默认生成的控制器所继承的父类中有index/add/edit/del/multi五个基础方法、destroy/restore/recyclebin三个回收站方法 33 | * 因此在当前控制器中可不用编写增删改查的代码,除非需要自己控制这部分逻辑 34 | * 需要将application/admin/library/traits/Backend.php中对应的方法复制到当前控制器,然后进行修改 35 | */ 36 | 37 | 38 | } 39 | -------------------------------------------------------------------------------- /api/application/command.php: -------------------------------------------------------------------------------- 1 | 11 | // +---------------------------------------------------------------------- 12 | 13 | return [ 14 | 'app\admin\command\Crud', 15 | 'app\admin\command\Menu', 16 | 'app\admin\command\Install', 17 | 'app\admin\command\Min', 18 | 'app\admin\command\Addon', 19 | 'app\admin\command\Api', 20 | 'app\admin\command\Import', 21 | 'app\admin\command\Importclear', 22 | 23 | ]; 24 | -------------------------------------------------------------------------------- /api/extend/fast/Pinyin.php: -------------------------------------------------------------------------------- 1 | abbr($chinese, $delimiter); 25 | } else { 26 | $result = $pinyin->permalink($chinese, $delimiter); 27 | } 28 | if ($ucfirst) { 29 | $pinyinArr = explode($delimiter, $result); 30 | $result = implode($delimiter, array_map('ucfirst', $pinyinArr)); 31 | } 32 | 33 | return $result; 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /api/thinkphp/library/think/config/driver/Ini.php: -------------------------------------------------------------------------------- 1 | 10 | // +---------------------------------------------------------------------- 11 | 12 | namespace think\config\driver; 13 | 14 | class Ini 15 | { 16 | public function parse($config) 17 | { 18 | if (is_file($config)) { 19 | return parse_ini_file($config, true); 20 | } else { 21 | return parse_ini_string($config, true); 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /api/public/assets/less/fastadmin/login_and_register.less: -------------------------------------------------------------------------------- 1 | /* 2 | * Page: Login & Register 3 | * ---------------------- 4 | */ 5 | 6 | .login-logo, 7 | .register-logo { 8 | font-size: 35px; 9 | text-align: center; 10 | margin-bottom: 25px; 11 | font-weight: 300; 12 | a { 13 | color: #444; 14 | } 15 | } 16 | 17 | .login-page, 18 | .register-page { 19 | background: @gray; 20 | } 21 | 22 | .login-box, 23 | .register-box { 24 | width: 360px; 25 | margin: 7% auto; 26 | @media (max-width: @screen-sm) { 27 | width: 90%; 28 | margin-top: 20px; 29 | } 30 | } 31 | 32 | .login-box-body, 33 | .register-box-body { 34 | background: #fff; 35 | padding: 20px; 36 | border-top: 0; 37 | color: #666; 38 | .form-control-feedback { 39 | color: #777; 40 | } 41 | } 42 | 43 | .login-box-msg, 44 | .register-box-msg { 45 | margin: 0; 46 | text-align: center; 47 | padding: 0 20px 20px 20px; 48 | } 49 | 50 | .social-auth-links { 51 | margin: 10px 0; 52 | } 53 | -------------------------------------------------------------------------------- /api/thinkphp/library/think/config/driver/Json.php: -------------------------------------------------------------------------------- 1 | 10 | // +---------------------------------------------------------------------- 11 | 12 | namespace think\config\driver; 13 | 14 | class Json 15 | { 16 | public function parse($config) 17 | { 18 | if (is_file($config)) { 19 | $config = file_get_contents($config); 20 | } 21 | $result = json_decode($config, true); 22 | return $result; 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /api/thinkphp/composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "topthink/framework", 3 | "description": "the new thinkphp framework", 4 | "type": "think-framework", 5 | "keywords": [ 6 | "framework", 7 | "thinkphp", 8 | "ORM" 9 | ], 10 | "homepage": "http://thinkphp.cn/", 11 | "license": "Apache-2.0", 12 | "authors": [ 13 | { 14 | "name": "liu21st", 15 | "email": "liu21st@gmail.com" 16 | } 17 | ], 18 | "require": { 19 | "php": ">=5.4.0", 20 | "topthink/think-installer": "~1.0" 21 | }, 22 | "require-dev": { 23 | "phpunit/phpunit": "4.8.*", 24 | "johnkary/phpunit-speedtrap": "^1.0", 25 | "mikey179/vfsstream": "~1.6", 26 | "phploc/phploc": "2.*", 27 | "sebastian/phpcpd": "2.*", 28 | "phpdocumentor/reflection-docblock": "^2.0" 29 | }, 30 | "autoload": { 31 | "psr-4": { 32 | "think\\": "library/think" 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /api/thinkphp/library/think/log/driver/Test.php: -------------------------------------------------------------------------------- 1 | 10 | // +---------------------------------------------------------------------- 11 | 12 | namespace think\log\driver; 13 | 14 | /** 15 | * 模拟测试输出 16 | */ 17 | class Test 18 | { 19 | /** 20 | * 日志写入接口 21 | * @access public 22 | * @param array $log 日志信息 23 | * @return bool 24 | */ 25 | public function save(array $log = []) 26 | { 27 | return true; 28 | } 29 | 30 | } 31 | -------------------------------------------------------------------------------- /api/application/admin/command/Addon/stubs/addon.stub: -------------------------------------------------------------------------------- 1 | where('id', $id)->find(); 21 | if ($data) { 22 | self::set($table, $id, $data); 23 | } 24 | } 25 | 26 | 27 | 28 | return $data; 29 | } 30 | 31 | /** 32 | * 缓存指定表主键数据 33 | */ 34 | public static function set($table, $id, $data) 35 | { 36 | Cache::set($table . $id, $data, 86400); 37 | } 38 | 39 | /** 40 | * 删除缓存数据 41 | */ 42 | public static function del($table, $id) 43 | { 44 | Cache::rm($table . $id); 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /api/public/assets/less/fastadmin/products.less: -------------------------------------------------------------------------------- 1 | /* 2 | * Component: Products List 3 | * ------------------------ 4 | */ 5 | .products-list { 6 | list-style: none; 7 | margin: 0; 8 | padding: 0; 9 | > .item { 10 | .border-radius(@box-border-radius); 11 | .box-shadow(@box-boxshadow); 12 | .clearfix(); 13 | padding: 10px 0; 14 | background: #fff; 15 | } 16 | .product-img { 17 | float: left; 18 | img { 19 | width: 50px; 20 | height: 50px; 21 | } 22 | } 23 | .product-info { 24 | margin-left: 60px; 25 | } 26 | .product-title { 27 | font-weight: 600; 28 | } 29 | .product-description { 30 | display: block; 31 | color: #999; 32 | overflow: hidden; 33 | white-space: nowrap; 34 | text-overflow: ellipsis; 35 | } 36 | } 37 | 38 | .product-list-in-box > .item { 39 | .box-shadow(none); 40 | .border-radius(0); 41 | border-bottom: 1px solid @box-border-color; 42 | &:last-of-type { 43 | border-bottom-width: 0; 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /spa/src/main.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import App from './App.vue' 3 | import router from './router' 4 | import store from './store/index'; 5 | import toast from "./components/Toast/index"; 6 | import showLoading from "./components/Loading/index"; 7 | import request from "./library/request"; 8 | import modal from "./components/Modal/index"; 9 | import common from "./library/common"; 10 | import datepicker from "./components/DatePicker/index"; 11 | import wselect from "./components/WSelect/index" 12 | 13 | Vue.config.productionTip = false 14 | Vue.prototype.$toast = toast 15 | Vue.prototype.$loading = showLoading 16 | Vue.prototype.$request = request 17 | Vue.prototype.$modal = modal 18 | Vue.prototype.$common = common 19 | Vue.prototype.$datepicker = datepicker 20 | Vue.prototype.$wselect = wselect 21 | 22 | window.$store = store; 23 | window.$router = router; 24 | window.$request = request; 25 | window.$toast = toast; 26 | 27 | new Vue({ 28 | router, 29 | store, 30 | render: h => h(App) 31 | }).$mount('#app') 32 | -------------------------------------------------------------------------------- /api/application/admin/model/Tags.php: -------------------------------------------------------------------------------- 1 | __('Status 0'), '1' => __('Status 1')]; 36 | } 37 | 38 | 39 | public function getStatusTextAttr($value, $data) 40 | { 41 | $value = $value ? $value : (isset($data['status']) ? $data['status'] : ''); 42 | $list = $this->getStatusList(); 43 | return isset($list[$value]) ? $list[$value] : ''; 44 | } 45 | 46 | 47 | 48 | 49 | } 50 | -------------------------------------------------------------------------------- /api/application/admin/model/Account.php: -------------------------------------------------------------------------------- 1 | __('Status 0'), '1' => __('Status 1')]; 36 | } 37 | 38 | 39 | public function getStatusTextAttr($value, $data) 40 | { 41 | $value = $value ? $value : (isset($data['status']) ? $data['status'] : ''); 42 | $list = $this->getStatusList(); 43 | return isset($list[$value]) ? $list[$value] : ''; 44 | } 45 | 46 | 47 | 48 | 49 | } 50 | -------------------------------------------------------------------------------- /api/public/assets/less/bootstrap/utilities.less: -------------------------------------------------------------------------------- 1 | // 2 | // Utility classes 3 | // -------------------------------------------------- 4 | 5 | 6 | // Floats 7 | // ------------------------- 8 | 9 | .clearfix { 10 | .clearfix(); 11 | } 12 | .center-block { 13 | .center-block(); 14 | } 15 | .pull-right { 16 | float: right !important; 17 | } 18 | .pull-left { 19 | float: left !important; 20 | } 21 | 22 | 23 | // Toggling content 24 | // ------------------------- 25 | 26 | // Note: Deprecated .hide in favor of .hidden or .sr-only (as appropriate) in v3.0.1 27 | .hide { 28 | display: none !important; 29 | } 30 | .show { 31 | display: block !important; 32 | } 33 | .invisible { 34 | visibility: hidden; 35 | } 36 | .text-hide { 37 | .text-hide(); 38 | } 39 | 40 | 41 | // Hide from screenreaders and browsers 42 | // 43 | // Credit: HTML5 Boilerplate 44 | 45 | .hidden { 46 | display: none !important; 47 | } 48 | 49 | 50 | // For Affix plugin 51 | // ------------------------- 52 | 53 | .affix { 54 | position: fixed; 55 | } 56 | -------------------------------------------------------------------------------- /api/thinkphp/tpl/default_index.tpl: -------------------------------------------------------------------------------- 1 | *{ padding: 0; margin: 0; } div{ padding: 4px 48px;} a{color:#2E5CD5;cursor: pointer;text-decoration: none} a:hover{text-decoration:underline; } body{ background: #fff; font-family: "Century Gothic","Microsoft yahei"; color: #333;font-size:18px;} h1{ font-size: 100px; font-weight: normal; margin-bottom: 12px; } p{ line-height: 1.6em; font-size: 42px }

:)

ThinkPHP V5
十年磨一剑 - 为API开发设计的高性能框架

[ V5.0 版本由 七牛云 独家赞助发布 ]
'; 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /api/public/assets/less/tinycss.less: -------------------------------------------------------------------------------- 1 | 2 | .make-margin-padding(margin, m, 5px, 4); 3 | .make-margin-padding(padding, p, 5px, 4); 4 | 5 | .make-margin-padding(@type, @prefix, @space, @i) when (@i >= 0) { 6 | .make-margin-padding(@type, @prefix, @space, @i - 1); 7 | @pixel: @space * @i; 8 | .@{prefix}-@{i} { 9 | @{type}-top: @pixel !important; 10 | @{type}-right: @pixel !important; 11 | @{type}-bottom: @pixel !important; 12 | @{type}-left: @pixel !important; 13 | } 14 | .@{prefix}t-@{i} { 15 | @{type}-top: @pixel !important; 16 | } 17 | .@{prefix}r-@{i} { 18 | @{type}-right: @pixel !important; 19 | } 20 | .@{prefix}b-@{i} { 21 | @{type}-bottom: @pixel !important; 22 | } 23 | .@{prefix}l-@{i} { 24 | @{type}-left: @pixel !important; 25 | } 26 | .@{prefix}x-@{i} { 27 | @{type}-left: @pixel !important; 28 | @{type}-right: @pixel !important; 29 | } 30 | .@{prefix}y-@{i} { 31 | @{type}-top: @pixel !important; 32 | @{type}-bottom: @pixel !important; 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /api/thinkphp/tests/application/index/controller/Index.php: -------------------------------------------------------------------------------- 1 | *{ padding: 0; margin: 0; } div{ padding: 4px 48px;} a{color:#2E5CD5;cursor: pointer;text-decoration: none} a:hover{text-decoration:underline; } body{ background: #fff; font-family: "Century Gothic","Microsoft yahei"; color: #333;font-size:18px} h1{ font-size: 100px; font-weight: normal; margin-bottom: 12px; } p{ line-height: 1.6em; font-size: 42px }

:)

ThinkPHP V5
十年磨一剑 - 为API开发设计的高性能框架

[ V5.0 版本由 七牛云 独家赞助发布 ]
'; 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /api/public/install.php: -------------------------------------------------------------------------------- 1 | 11 | // +---------------------------------------------------------------------- 12 | // [ 安装文件 ] 13 | // 建议安装完成后移除此文件 14 | // 定义应用目录 15 | define('APP_PATH', __DIR__ . '/../application/'); 16 | 17 | // 加载框架引导文件 18 | require __DIR__ . '/../thinkphp/base.php'; 19 | 20 | // 绑定到安装控制器 21 | \think\Route::bind('\app\admin\command\Install', 'controller'); 22 | 23 | // 开启路由 24 | \think\App::route(true); 25 | 26 | // 设置根url 27 | \think\Url::root(''); 28 | 29 | // 执行应用 30 | \think\App::run()->send(); 31 | -------------------------------------------------------------------------------- /api/application/admin/command/Addon/stubs/config.stub: -------------------------------------------------------------------------------- 1 | 'usernmae', 7 | //显示的标题 8 | 'title' => '用户名', 9 | //类型 10 | 'type' => 'string', 11 | //分组 12 | 'group' => '', 13 | //动态显示 14 | 'visible' => '', 15 | //数据字典 16 | 'content' => [ 17 | ], 18 | //值 19 | 'value' => '', 20 | //验证规则 21 | 'rule' => 'required', 22 | //错误消息 23 | 'msg' => '', 24 | //提示消息 25 | 'tip' => '', 26 | //成功消息 27 | 'ok' => '', 28 | //扩展信息 29 | 'extend' => '' 30 | ], 31 | [ 32 | 'name' => 'password', 33 | 'title' => '密码', 34 | 'type' => 'string', 35 | 'content' => [ 36 | ], 37 | 'value' => '', 38 | 'rule' => 'required', 39 | 'msg' => '', 40 | 'tip' => '', 41 | 'ok' => '', 42 | 'extend' => '' 43 | ], 44 | ]; 45 | -------------------------------------------------------------------------------- /api/application/api/library/ExceptionHandle.php: -------------------------------------------------------------------------------- 1 | getError(); 25 | } 26 | // Http异常 27 | if ($e instanceof \think\exception\HttpException) { 28 | $statuscode = $code = $e->getStatusCode(); 29 | } 30 | return json(['code' => $code, 'msg' => $msg, 'time' => time(), 'data' => null], $statuscode); 31 | } 32 | 33 | //其它此交由系统处理 34 | return parent::render($e); 35 | } 36 | 37 | } 38 | -------------------------------------------------------------------------------- /api/application/build.php: -------------------------------------------------------------------------------- 1 | 11 | // +---------------------------------------------------------------------- 12 | 13 | return [ 14 | // 生成应用公共文件 15 | '__file__' => [], 16 | // 定义demo模块的自动生成 (按照实际定义的文件名生成) 17 | 'demo' => [ 18 | '__file__' => ['common.php'], 19 | '__dir__' => ['behavior', 'controller', 'model', 'view'], 20 | 'controller' => ['Index', 'Test', 'UserType'], 21 | 'model' => ['User', 'UserType'], 22 | 'view' => ['index/index'], 23 | ], 24 | // 其他更多的模块定义 25 | ]; 26 | -------------------------------------------------------------------------------- /api/public/assets/less/fastadmin/callout.less: -------------------------------------------------------------------------------- 1 | /* 2 | * Component: Callout 3 | * ------------------ 4 | */ 5 | 6 | // Base styles (regardless of theme) 7 | .callout { 8 | .border-radius(3px); 9 | margin: 0 0 20px 0; 10 | padding: 15px 30px 15px 15px; 11 | border-left: 5px solid #eee; 12 | a { 13 | color: #fff; 14 | text-decoration: underline; 15 | &:hover { 16 | color: #eee; 17 | } 18 | } 19 | h4 { 20 | margin-top: 0; 21 | font-weight: 600; 22 | } 23 | p:last-child { 24 | margin-bottom: 0; 25 | } 26 | code, 27 | .highlight { 28 | background-color: #fff; 29 | } 30 | 31 | // Themes for different contexts 32 | &.callout-danger { 33 | &:extend(.bg-red); 34 | border-color: darken(@red, 10%); 35 | } 36 | &.callout-warning { 37 | &:extend(.bg-yellow); 38 | border-color: darken(@yellow, 10%); 39 | } 40 | &.callout-info { 41 | &:extend(.bg-aqua); 42 | border-color: darken(@aqua, 10%); 43 | } 44 | &.callout-success { 45 | &:extend(.bg-green); 46 | border-color: darken(@green, 10%); 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /api/build.php: -------------------------------------------------------------------------------- 1 | 11 | // +---------------------------------------------------------------------- 12 | 13 | return [ 14 | // 生成应用公共文件 15 | '__file__' => ['hello.php', 'test.php'], 16 | // 定义demo模块的自动生成 (按照实际定义的文件名生成) 17 | 'demo' => [ 18 | '__file__' => ['common.php'], 19 | '__dir__' => ['behavior', 'controller', 'model', 'view'], 20 | 'controller' => ['Index', 'Test', 'UserType'], 21 | 'model' => ['User', 'UserType'], 22 | 'view' => ['index/index'], 23 | ], 24 | // 其他更多的模块定义 25 | ]; 26 | -------------------------------------------------------------------------------- /api/application/admin/lang/zh-cn/user/user.php: -------------------------------------------------------------------------------- 1 | 'ID', 5 | 'Group_id' => '组别ID', 6 | 'Username' => '用户名', 7 | 'Nickname' => '昵称', 8 | 'Password' => '密码', 9 | 'Salt' => '密码盐', 10 | 'Email' => '电子邮箱', 11 | 'Mobile' => '手机号', 12 | 'Avatar' => '头像', 13 | 'Level' => '等级', 14 | 'Gender' => '性别', 15 | 'Male' => '男', 16 | 'FeMale' => '女', 17 | 'Birthday' => '生日', 18 | 'Bio' => '格言', 19 | 'Score' => '积分', 20 | 'Successions' => '连续登录天数', 21 | 'Maxsuccessions' => '最大连续登录天数', 22 | 'Prevtime' => '上次登录时间', 23 | 'Logintime' => '登录时间', 24 | 'Loginip' => '登录IP', 25 | 'Loginfailure' => '失败次数', 26 | 'Joinip' => '加入IP', 27 | 'Jointime' => '加入时间', 28 | 'Createtime' => '创建时间', 29 | 'Updatetime' => '更新时间', 30 | 'Token' => 'Token', 31 | 'Status' => '状态', 32 | 'Leave password blank if dont want to change' => '不修改密码请留空', 33 | ]; 34 | -------------------------------------------------------------------------------- /spa/public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 13 | 15 | 16 | Moneylog.cloud 17 | 18 | 19 | 20 | 23 | 27 |
28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /api/public/assets/less/bootstrap/pager.less: -------------------------------------------------------------------------------- 1 | // 2 | // Pager pagination 3 | // -------------------------------------------------- 4 | 5 | 6 | .pager { 7 | padding-left: 0; 8 | margin: @line-height-computed 0; 9 | list-style: none; 10 | text-align: center; 11 | &:extend(.clearfix all); 12 | li { 13 | display: inline; 14 | > a, 15 | > span { 16 | display: inline-block; 17 | padding: 5px 14px; 18 | background-color: @pager-bg; 19 | border: 1px solid @pager-border; 20 | border-radius: @pager-border-radius; 21 | } 22 | 23 | > a:hover, 24 | > a:focus { 25 | text-decoration: none; 26 | background-color: @pager-hover-bg; 27 | } 28 | } 29 | 30 | .next { 31 | > a, 32 | > span { 33 | float: right; 34 | } 35 | } 36 | 37 | .previous { 38 | > a, 39 | > span { 40 | float: left; 41 | } 42 | } 43 | 44 | .disabled { 45 | > a, 46 | > a:hover, 47 | > a:focus, 48 | > span { 49 | color: @pager-disabled-color; 50 | background-color: @pager-bg; 51 | cursor: @cursor-disabled; 52 | } 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /api/thinkphp/library/think/exception/HttpResponseException.php: -------------------------------------------------------------------------------- 1 | 10 | // +---------------------------------------------------------------------- 11 | 12 | namespace think\exception; 13 | 14 | use think\Response; 15 | 16 | class HttpResponseException extends \RuntimeException 17 | { 18 | /** 19 | * @var Response 20 | */ 21 | protected $response; 22 | 23 | public function __construct(Response $response) 24 | { 25 | $this->response = $response; 26 | } 27 | 28 | public function getResponse() 29 | { 30 | return $this->response; 31 | } 32 | 33 | } 34 | -------------------------------------------------------------------------------- /api/application/admin/command/Crud/stubs/html/fieldlist-template.stub: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | {%theadList%} 5 | 6 | 7 | 11 |
{:__('Operate')}
8 | {:__('Append')} 9 | 10 |
12 | 21 | -------------------------------------------------------------------------------- /api/application/admin/view/common/meta.html: -------------------------------------------------------------------------------- 1 | 2 | {$title|default=''} 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | {if $Think.config.fastadmin.adminskin} 13 | 14 | {/if} 15 | 16 | 17 | 21 | 26 | -------------------------------------------------------------------------------- /api/thinkphp/library/think/console/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2004-2016 Fabien Potencier 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is furnished 8 | to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in all 11 | copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. -------------------------------------------------------------------------------- /api/bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "fastadmin", 3 | "description": "the fastest admin framework", 4 | "main": "", 5 | "license": "Apache2.0", 6 | "homepage": "https://www.fastadmin.net", 7 | "private": true, 8 | "dependencies": { 9 | "jquery": "^2.1.4", 10 | "bootstrap": "^3.3.7", 11 | "font-awesome": "^4.6.1", 12 | "bootstrap-table": "fastadmin-bootstraptable#~1.11.5", 13 | "jstree": "~3.3.2", 14 | "moment": "~2.29.0", 15 | "toastr": "~2.1.3", 16 | "eonasdan-bootstrap-datetimepicker": "~4.17.43", 17 | "bootstrap-select": "~1.11.2", 18 | "require-css": "~0.1.8", 19 | "tableExport.jquery.plugin": "~1.10.3", 20 | "jquery-slimscroll": "~1.3.8", 21 | "jquery.cookie": "~1.4.1", 22 | "Sortable": "~1.10.0", 23 | "nice-validator": "~1.1.1", 24 | "art-template": "~3.1.3", 25 | "bootstrap-daterangepicker": "~2.1.25", 26 | "fastadmin-citypicker": "~1.3.1", 27 | "fastadmin-cxselect": "~1.4.0", 28 | "fastadmin-dragsort": "~1.0.0", 29 | "fastadmin-addtabs": "~1.0.5", 30 | "fastadmin-selectpage": "~1.0.6", 31 | "fastadmin-layer": "~3.5.1", 32 | "bootstrap-slider": "*" 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /api/thinkphp/library/think/console/output/driver/Nothing.php: -------------------------------------------------------------------------------- 1 | 10 | // +---------------------------------------------------------------------- 11 | 12 | namespace think\console\output\driver; 13 | 14 | use think\console\Output; 15 | 16 | class Nothing 17 | { 18 | 19 | public function __construct(Output $output) 20 | { 21 | // do nothing 22 | } 23 | 24 | public function write($messages, $newline = false, $options = Output::OUTPUT_NORMAL) 25 | { 26 | // do nothing 27 | } 28 | 29 | public function renderException(\Exception $e) 30 | { 31 | // do nothing 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /api/thinkphp/.travis.yml: -------------------------------------------------------------------------------- 1 | sudo: false 2 | 3 | language: php 4 | 5 | services: 6 | - memcached 7 | - mongodb 8 | - mysql 9 | - postgresql 10 | - redis-server 11 | 12 | matrix: 13 | fast_finish: true 14 | include: 15 | - php: 5.4 16 | - php: 5.5 17 | - php: 5.6 18 | - php: 7.0 19 | - php: hhvm 20 | allow_failures: 21 | - php: hhvm 22 | 23 | cache: 24 | directories: 25 | - $HOME/.composer/cache 26 | 27 | before_install: 28 | - composer self-update 29 | - mysql -e "create database IF NOT EXISTS test;" -uroot 30 | - psql -c 'DROP DATABASE IF EXISTS test;' -U postgres 31 | - psql -c 'create database test;' -U postgres 32 | 33 | install: 34 | - ./tests/script/install.sh 35 | 36 | script: 37 | ## LINT 38 | - find . -path ./vendor -prune -o -type f -name \*.php -exec php -l {} \; 39 | ## PHP Copy/Paste Detector 40 | - vendor/bin/phpcpd --verbose --exclude vendor ./ || true 41 | ## PHPLOC 42 | - vendor/bin/phploc --exclude vendor ./ 43 | ## PHPUNIT 44 | - vendor/bin/phpunit --coverage-clover=coverage.xml --configuration=phpunit.xml 45 | 46 | after_success: 47 | - bash <(curl -s https://codecov.io/bash) 48 | -------------------------------------------------------------------------------- /api/application/admin/validate/AuthRule.php: -------------------------------------------------------------------------------- 1 | '[a-z0-9_\/]+']; 14 | 15 | /** 16 | * 验证规则 17 | */ 18 | protected $rule = [ 19 | 'name' => 'require|unique:AuthRule', 20 | 'title' => 'require', 21 | ]; 22 | 23 | /** 24 | * 提示消息 25 | */ 26 | protected $message = [ 27 | 'name.format' => 'URL规则只能是小写字母、数字、下划线和/组成' 28 | ]; 29 | 30 | /** 31 | * 字段描述 32 | */ 33 | protected $field = [ 34 | ]; 35 | 36 | /** 37 | * 验证场景 38 | */ 39 | protected $scene = [ 40 | ]; 41 | 42 | public function __construct(array $rules = [], $message = [], $field = []) 43 | { 44 | $this->field = [ 45 | 'name' => __('Name'), 46 | 'title' => __('Title'), 47 | ]; 48 | $this->message['name.format'] = __('Name only supports letters, numbers, underscore and slash'); 49 | parent::__construct($rules, $message, $field); 50 | } 51 | 52 | } 53 | -------------------------------------------------------------------------------- /api/thinkphp/library/think/exception/ClassNotFoundException.php: -------------------------------------------------------------------------------- 1 | 10 | // +---------------------------------------------------------------------- 11 | 12 | namespace think\exception; 13 | 14 | class ClassNotFoundException extends \RuntimeException 15 | { 16 | protected $class; 17 | public function __construct($message, $class = '') 18 | { 19 | $this->message = $message; 20 | $this->class = $class; 21 | } 22 | 23 | /** 24 | * 获取类名 25 | * @access public 26 | * @return string 27 | */ 28 | public function getClass() 29 | { 30 | return $this->class; 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /api/application/admin/command/Crud/stubs/controllerindex.stub: -------------------------------------------------------------------------------- 1 | 2 | /** 3 | * 查看 4 | */ 5 | public function index() 6 | { 7 | //当前是否为关联查询 8 | $this->relationSearch = {%relationSearch%}; 9 | //设置过滤方法 10 | $this->request->filter(['strip_tags', 'trim']); 11 | if ($this->request->isAjax()) { 12 | //如果发送的来源是Selectpage,则转发到Selectpage 13 | if ($this->request->request('keyField')) { 14 | return $this->selectpage(); 15 | } 16 | list($where, $sort, $order, $offset, $limit) = $this->buildparams(); 17 | 18 | $list = $this->model 19 | {%relationWithList%} 20 | ->where($where) 21 | ->order($sort, $order) 22 | ->paginate($limit); 23 | 24 | foreach ($list as $row) { 25 | {%visibleFieldList%} 26 | {%relationVisibleFieldList%} 27 | } 28 | 29 | $result = array("total" => $list->total(), "rows" => $list->items()); 30 | 31 | return json($result); 32 | } 33 | return $this->view->fetch(); 34 | } 35 | -------------------------------------------------------------------------------- /api/application/api/controller/Token.php: -------------------------------------------------------------------------------- 1 | auth->getToken(); 23 | $tokenInfo = \app\common\library\Token::get($token); 24 | $this->success('', ['token' => $tokenInfo['token'], 'expires_in' => $tokenInfo['expires_in']]); 25 | } 26 | 27 | /** 28 | * 刷新Token 29 | * 30 | */ 31 | public function refresh() 32 | { 33 | //删除源Token 34 | $token = $this->auth->getToken(); 35 | \app\common\library\Token::delete($token); 36 | //创建新Token 37 | $token = Random::uuid(); 38 | \app\common\library\Token::set($token, $this->auth->id, 2592000); 39 | $tokenInfo = \app\common\library\Token::get($token); 40 | $this->success('', ['token' => $tokenInfo['token'], 'expires_in' => $tokenInfo['expires_in']]); 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /api/application/common/library/import/Log.php: -------------------------------------------------------------------------------- 1 | = 20) { 16 | self::logSave(); 17 | } 18 | $time = date('Y-m-d H:i:s'); 19 | 20 | $msg = "[{$level}][{$time}] $msg\r\n"; 21 | $msg .= "\r\n-------------------\r\n"; 22 | 23 | array_push($list, $msg); 24 | 25 | cache('import_libray_log', $list); 26 | } 27 | 28 | public static function logSave() 29 | { 30 | $list = cache('import_libray_log'); 31 | 32 | $dir = ROOT_PATH . 'runtime' . DS . 'log' . DS . 'import' . DS; 33 | 34 | $name = time() . '.log'; 35 | 36 | if (!is_dir($dir)) { 37 | mkdir($dir, 0777, true); 38 | } 39 | 40 | if ($list) { 41 | file_put_contents($dir . $name, implode("\r\n", $list)); 42 | 43 | cache('import_libray_log', null); 44 | } 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /api/public/assets/less/bootstrap-less/mixins/image.less: -------------------------------------------------------------------------------- 1 | // Image Mixins 2 | // - Responsive image 3 | // - Retina image 4 | 5 | // Responsive image 6 | // 7 | // Keep images from scaling beyond the width of their parents. 8 | .img-responsive(@display: block) { 9 | display: @display; 10 | max-width: 100%; // Part 1: Set a maximum relative to the parent 11 | height: auto; // Part 2: Scale the height according to the width, otherwise you get stretching 12 | } 13 | 14 | // Retina image 15 | // 16 | // Short retina mixin for setting background-image and -size. Note that the 17 | // spelling of `min--moz-device-pixel-ratio` is intentional. 18 | .img-retina(@file-1x; @file-2x; @width-1x; @height-1x) { 19 | background-image: url("@{file-1x}"); 20 | 21 | @media only screen and (-webkit-min-device-pixel-ratio: 2), only screen and ( min--moz-device-pixel-ratio: 2), only screen and ( -o-min-device-pixel-ratio: 2/1), only screen and ( min-device-pixel-ratio: 2), only screen and ( min-resolution: 192dpi), only screen and ( min-resolution: 2dppx) { 22 | background-image: url("@{file-2x}"); 23 | background-size: @width-1x @height-1x; 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /api/thinkphp/library/think/exception/TemplateNotFoundException.php: -------------------------------------------------------------------------------- 1 | 10 | // +---------------------------------------------------------------------- 11 | 12 | namespace think\exception; 13 | 14 | class TemplateNotFoundException extends \RuntimeException 15 | { 16 | protected $template; 17 | 18 | public function __construct($message, $template = '') 19 | { 20 | $this->message = $message; 21 | $this->template = $template; 22 | } 23 | 24 | /** 25 | * 获取模板文件 26 | * @access public 27 | * @return string 28 | */ 29 | public function getTemplate() 30 | { 31 | return $this->template; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /api/thinkphp/library/think/exception/ValidateException.php: -------------------------------------------------------------------------------- 1 | 10 | // +---------------------------------------------------------------------- 11 | 12 | namespace think\exception; 13 | 14 | class ValidateException extends \RuntimeException 15 | { 16 | protected $error; 17 | 18 | public function __construct($error) 19 | { 20 | $this->error = $error; 21 | $this->message = is_array($error) ? implode("\n\r", $error) : $error; 22 | } 23 | 24 | /** 25 | * 获取验证错误信息 26 | * @access public 27 | * @return array|string 28 | */ 29 | public function getError() 30 | { 31 | return $this->error; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /api/thinkphp/tests/thinkphp/library/think/log/driver/fileTest.php: -------------------------------------------------------------------------------- 1 | 10 | // +---------------------------------------------------------------------- 11 | 12 | /** 13 | * Test File Log 14 | */ 15 | namespace tests\thinkphp\library\think\log\driver; 16 | 17 | use think\Log; 18 | 19 | class fileTest extends \PHPUnit_Framework_TestCase 20 | { 21 | protected function setUp() 22 | { 23 | Log::init(['type' => 'file']); 24 | } 25 | 26 | public function testRecord() 27 | { 28 | $record_msg = 'record'; 29 | Log::record($record_msg, 'notice'); 30 | $logs = Log::getLog(); 31 | 32 | $this->assertEquals([], $logs); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /api/public/admin.php: -------------------------------------------------------------------------------- 1 | 11 | // +---------------------------------------------------------------------- 12 | // [ 后台入口文件 ] 13 | // 使用此文件可以达到隐藏admin模块的效果 14 | // 为了你的安全,强烈不建议将此文件名修改成admin.php 15 | // 定义应用目录 16 | define('APP_PATH', __DIR__ . '/../application/'); 17 | 18 | // 判断是否安装 19 | if (!is_file(APP_PATH . 'admin/command/Install/install.lock')) { 20 | header("location:./install.php"); 21 | exit; 22 | } 23 | 24 | // 加载框架引导文件 25 | require __DIR__ . '/../thinkphp/base.php'; 26 | 27 | // 绑定到admin模块 28 | \think\Route::bind('admin'); 29 | 30 | // 关闭路由 31 | \think\App::route(false); 32 | 33 | // 设置根url 34 | \think\Url::root(''); 35 | 36 | // 执行应用 37 | \think\App::run()->send(); 38 | -------------------------------------------------------------------------------- /api/thinkphp/library/think/config/driver/Xml.php: -------------------------------------------------------------------------------- 1 | 10 | // +---------------------------------------------------------------------- 11 | 12 | namespace think\config\driver; 13 | 14 | class Xml 15 | { 16 | public function parse($config) 17 | { 18 | if (is_file($config)) { 19 | $content = simplexml_load_file($config); 20 | } else { 21 | $content = simplexml_load_string($config); 22 | } 23 | $result = (array) $content; 24 | foreach ($result as $key => $val) { 25 | if (is_object($val)) { 26 | $result[$key] = (array) $val; 27 | } 28 | } 29 | return $result; 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /api/public/assets/less/bootstrap/media.less: -------------------------------------------------------------------------------- 1 | .media { 2 | // Proper spacing between instances of .media 3 | margin-top: 15px; 4 | 5 | &:first-child { 6 | margin-top: 0; 7 | } 8 | } 9 | 10 | .media, 11 | .media-body { 12 | zoom: 1; 13 | overflow: hidden; 14 | } 15 | 16 | .media-body { 17 | width: 10000px; 18 | } 19 | 20 | .media-object { 21 | display: block; 22 | 23 | // Fix collapse in webkit from max-width: 100% and display: table-cell. 24 | &.img-thumbnail { 25 | max-width: none; 26 | } 27 | } 28 | 29 | .media-right, 30 | .media > .pull-right { 31 | padding-left: 10px; 32 | } 33 | 34 | .media-left, 35 | .media > .pull-left { 36 | padding-right: 10px; 37 | } 38 | 39 | .media-left, 40 | .media-right, 41 | .media-body { 42 | display: table-cell; 43 | vertical-align: top; 44 | } 45 | 46 | .media-middle { 47 | vertical-align: middle; 48 | } 49 | 50 | .media-bottom { 51 | vertical-align: bottom; 52 | } 53 | 54 | // Reset margins on headings for tighter default spacing 55 | .media-heading { 56 | margin-top: 0; 57 | margin-bottom: 5px; 58 | } 59 | 60 | // Media list variation 61 | // 62 | // Undo default ul/ol styles 63 | .media-list { 64 | padding-left: 0; 65 | list-style: none; 66 | } 67 | -------------------------------------------------------------------------------- /api/public/assets/less/bootstrap/mixins/image.less: -------------------------------------------------------------------------------- 1 | // Image Mixins 2 | // - Responsive image 3 | // - Retina image 4 | 5 | 6 | // Responsive image 7 | // 8 | // Keep images from scaling beyond the width of their parents. 9 | .img-responsive(@display: block) { 10 | display: @display; 11 | max-width: 100%; // Part 1: Set a maximum relative to the parent 12 | height: auto; // Part 2: Scale the height according to the width, otherwise you get stretching 13 | } 14 | 15 | 16 | // Retina image 17 | // 18 | // Short retina mixin for setting background-image and -size. Note that the 19 | // spelling of `min--moz-device-pixel-ratio` is intentional. 20 | .img-retina(@file-1x; @file-2x; @width-1x; @height-1x) { 21 | background-image: url("@{file-1x}"); 22 | 23 | @media 24 | only screen and (-webkit-min-device-pixel-ratio: 2), 25 | only screen and ( min--moz-device-pixel-ratio: 2), 26 | only screen and ( -o-min-device-pixel-ratio: 2/1), 27 | only screen and ( min-device-pixel-ratio: 2), 28 | only screen and ( min-resolution: 192dpi), 29 | only screen and ( min-resolution: 2dppx) { 30 | background-image: url("@{file-2x}"); 31 | background-size: @width-1x @height-1x; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /api/public/assets/less/fastadmin/print.less: -------------------------------------------------------------------------------- 1 | /* 2 | * Misc: print 3 | * ----------- 4 | */ 5 | @media print { 6 | //Add to elements that you do not want to show when printing 7 | .no-print { 8 | display: none !important; 9 | } 10 | 11 | //Elements that we want to hide when printing 12 | .main-sidebar, 13 | .left-side, 14 | .main-header, 15 | .content-header { 16 | &:extend(.no-print); 17 | } 18 | 19 | //This is the only element that should appear, so let's remove the margins 20 | .content-wrapper, 21 | .right-side, 22 | .main-footer { 23 | margin-left: 0 !important; 24 | min-height: 0 !important; 25 | .translate(0, 0) !important; 26 | } 27 | 28 | .fixed .content-wrapper, 29 | .fixed .right-side { 30 | padding-top: 0 !important; 31 | } 32 | 33 | //Invoice printing 34 | .invoice { 35 | width: 100%; 36 | border: 0; 37 | margin: 0; 38 | padding: 0; 39 | } 40 | 41 | .invoice-col { 42 | float: left; 43 | width: 33.3333333%; 44 | } 45 | 46 | //Make sure table content displays properly 47 | .table-responsive { 48 | overflow: auto; 49 | > .table tr th, 50 | > .table tr td { 51 | white-space: normal !important; 52 | } 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /api/thinkphp/tests/application/config.php: -------------------------------------------------------------------------------- 1 | 10 | // +---------------------------------------------------------------------- 11 | // $Id$ 12 | 13 | return [ 14 | 'url_route_on' => true, 15 | 'log' => [ 16 | 'type' => 'file', // 支持 socket trace file 17 | ], 18 | 'view' => [ 19 | // 模板引擎 20 | 'engine_type' => 'think', 21 | // 模板引擎配置 22 | 'engine_config' => [ 23 | // 模板路径 24 | 'view_path' => '', 25 | // 模板后缀 26 | 'view_suffix' => '.html', 27 | // 模板文件名分隔符 28 | 'view_depr' => DS, 29 | ], 30 | // 输出字符串替换 31 | 'parse_str' => [], 32 | ], 33 | ]; 34 | -------------------------------------------------------------------------------- /api/public/assets/less/fastadmin/table.less: -------------------------------------------------------------------------------- 1 | /* 2 | * Component: Table 3 | * ---------------- 4 | */ 5 | 6 | .table { 7 | //Cells 8 | > thead, 9 | > tbody, 10 | > tfoot { 11 | > tr { 12 | > th, 13 | > td { 14 | border-top: 1px solid @box-border-color; 15 | } 16 | } 17 | } 18 | //thead cells 19 | > thead > tr > th { 20 | border-bottom: 2px solid @box-border-color; 21 | } 22 | //progress bars in tables 23 | tr td .progress { 24 | margin-top: 5px; 25 | } 26 | } 27 | 28 | //Bordered Table 29 | .table-bordered { 30 | border: 1px solid @box-border-color; 31 | > thead, 32 | > tbody, 33 | > tfoot { 34 | > tr { 35 | > th, 36 | > td { 37 | border: 1px solid @box-border-color; 38 | } 39 | } 40 | } 41 | > thead > tr { 42 | > th, 43 | > td { 44 | border-bottom-width: 2px; 45 | } 46 | } 47 | } 48 | 49 | .table.no-border { 50 | &, 51 | td, 52 | th { 53 | border: 0; 54 | } 55 | } 56 | 57 | /* .text-center in tables */ 58 | table.text-center { 59 | &, td, th { 60 | text-align: center; 61 | } 62 | } 63 | 64 | .table.align { 65 | th { 66 | text-align: left; 67 | } 68 | td { 69 | text-align: right; 70 | } 71 | } 72 | -------------------------------------------------------------------------------- /api/application/tags.php: -------------------------------------------------------------------------------- 1 | 11 | // +---------------------------------------------------------------------- 12 | // 应用行为扩展定义文件 13 | return [ 14 | // 应用初始化 15 | 'app_init' => [], 16 | // 应用开始 17 | 'app_begin' => [], 18 | // 应用调度 19 | 'app_dispatch' => [ 20 | 'app\\common\\behavior\\Common', 21 | ], 22 | // 模块初始化 23 | 'module_init' => [ 24 | 'app\\common\\behavior\\Common', 25 | ], 26 | // 插件开始 27 | 'addon_begin' => [ 28 | 'app\\common\\behavior\\Common', 29 | ], 30 | // 操作开始执行 31 | 'action_begin' => [], 32 | // 视图内容过滤 33 | 'view_filter' => [], 34 | // 日志写入 35 | 'log_write' => [], 36 | // 应用结束 37 | 'app_end' => [], 38 | ]; 39 | -------------------------------------------------------------------------------- /api/application/admin/validate/User.php: -------------------------------------------------------------------------------- 1 | 'require|regex:\w{3,30}|unique:user', 14 | 'nickname' => 'require|unique:user', 15 | 'password' => 'regex:\S{6,30}', 16 | 'email' => 'require|email|unique:user', 17 | 'mobile' => 'unique:user' 18 | ]; 19 | 20 | /** 21 | * 字段描述 22 | */ 23 | protected $field = [ 24 | ]; 25 | /** 26 | * 提示消息 27 | */ 28 | protected $message = [ 29 | ]; 30 | /** 31 | * 验证场景 32 | */ 33 | protected $scene = [ 34 | 'add' => [], 35 | 'edit' => ['username', 'nickname', 'password', 'email', 'mobile'], 36 | ]; 37 | 38 | public function __construct(array $rules = [], $message = [], $field = []) 39 | { 40 | $this->field = [ 41 | 'username' => __('Username'), 42 | 'nickname' => __('Nickname'), 43 | 'password' => __('Password'), 44 | 'email' => __('Email'), 45 | 'mobile' => __('Mobile') 46 | ]; 47 | parent::__construct($rules, $message, $field); 48 | } 49 | 50 | } 51 | -------------------------------------------------------------------------------- /spa/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "moneylog", 3 | "version": "0.1.0", 4 | "private": true, 5 | "scripts": { 6 | "serve": "vue-cli-service serve", 7 | "build": "vue-cli-service build", 8 | "lint": "vue-cli-service lint" 9 | }, 10 | "dependencies": { 11 | "axios": "^0.27.2", 12 | "bignumber.js": "^9.0.2", 13 | "core-js": "^3.6.5", 14 | "less-loader": "^7.3.0", 15 | "vue": "^2.6.11", 16 | "vue-router": "^3.2.0", 17 | "vuex": "^3.4.0" 18 | }, 19 | "devDependencies": { 20 | "@vue/cli-plugin-babel": "^5.0.4", 21 | "@vue/cli-plugin-eslint": "^5.0.4", 22 | "@vue/cli-plugin-router": "^4.5.14", 23 | "@vue/cli-plugin-vuex": "^4.5.14", 24 | "@vue/cli-service": "^5.0.4", 25 | "babel-eslint": "^10.1.0", 26 | "eslint": "^6.7.2", 27 | "eslint-plugin-vue": "^6.2.2", 28 | "less": "^4.1.2", 29 | "vue-template-compiler": "^2.6.11" 30 | }, 31 | "eslintConfig": { 32 | "root": true, 33 | "env": { 34 | "node": true 35 | }, 36 | "extends": [ 37 | "plugin:vue/essential", 38 | "eslint:recommended" 39 | ], 40 | "parserOptions": { 41 | "parser": "babel-eslint" 42 | }, 43 | "rules": {} 44 | }, 45 | "browserslist": [ 46 | "> 1%", 47 | "last 2 versions", 48 | "not dead" 49 | ] 50 | } 51 | -------------------------------------------------------------------------------- /api/public/assets/less/bootstrap-less/mixins.less: -------------------------------------------------------------------------------- 1 | // Mixins 2 | // -------------------------------------------------- 3 | // Utilities 4 | @import "mixins/hide-text.less"; 5 | @import "mixins/opacity.less"; 6 | @import "mixins/image.less"; 7 | @import "mixins/labels.less"; 8 | @import "mixins/reset-filter.less"; 9 | @import "mixins/resize.less"; 10 | @import "mixins/responsive-visibility.less"; 11 | @import "mixins/size.less"; 12 | @import "mixins/tab-focus.less"; 13 | @import "mixins/reset-text.less"; 14 | @import "mixins/text-emphasis.less"; 15 | @import "mixins/text-overflow.less"; 16 | @import "mixins/vendor-prefixes.less"; 17 | // Components 18 | @import "mixins/alerts.less"; 19 | @import "mixins/buttons.less"; 20 | @import "mixins/panels.less"; 21 | @import "mixins/pagination.less"; 22 | @import "mixins/list-group.less"; 23 | @import "mixins/nav-divider.less"; 24 | @import "mixins/forms.less"; 25 | @import "mixins/progress-bar.less"; 26 | @import "mixins/table-row.less"; 27 | // Skins 28 | @import "mixins/background-variant.less"; 29 | @import "mixins/border-radius.less"; 30 | @import "mixins/gradients.less"; 31 | // Layout 32 | @import "mixins/clearfix.less"; 33 | @import "mixins/center-block.less"; 34 | @import "mixins/nav-vertical-align.less"; 35 | @import "mixins/grid-framework.less"; 36 | @import "mixins/grid.less"; 37 | -------------------------------------------------------------------------------- /api/thinkphp/library/think/console/command/make/Model.php: -------------------------------------------------------------------------------- 1 | 10 | // +---------------------------------------------------------------------- 11 | 12 | namespace think\console\command\make; 13 | 14 | use think\console\command\Make; 15 | 16 | class Model extends Make 17 | { 18 | protected $type = "Model"; 19 | 20 | protected function configure() 21 | { 22 | parent::configure(); 23 | $this->setName('make:model') 24 | ->setDescription('Create a new model class'); 25 | } 26 | 27 | protected function getStub() 28 | { 29 | return __DIR__ . '/stubs/model.stub'; 30 | } 31 | 32 | protected function getNamespace($appNamespace, $module) 33 | { 34 | return parent::getNamespace($appNamespace, $module) . '\model'; 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /api/thinkphp/phpunit.xml: -------------------------------------------------------------------------------- 1 | 2 | 12 | 13 | 14 | ./tests/thinkphp/ 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | ./ 23 | 24 | tests 25 | vendor 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /api/public/assets/less/bootstrap/mixins.less: -------------------------------------------------------------------------------- 1 | // Mixins 2 | // -------------------------------------------------- 3 | 4 | // Utilities 5 | @import "mixins/hide-text.less"; 6 | @import "mixins/opacity.less"; 7 | @import "mixins/image.less"; 8 | @import "mixins/labels.less"; 9 | @import "mixins/reset-filter.less"; 10 | @import "mixins/resize.less"; 11 | @import "mixins/responsive-visibility.less"; 12 | @import "mixins/size.less"; 13 | @import "mixins/tab-focus.less"; 14 | @import "mixins/reset-text.less"; 15 | @import "mixins/text-emphasis.less"; 16 | @import "mixins/text-overflow.less"; 17 | @import "mixins/vendor-prefixes.less"; 18 | 19 | // Components 20 | @import "mixins/alerts.less"; 21 | @import "mixins/buttons.less"; 22 | @import "mixins/panels.less"; 23 | @import "mixins/pagination.less"; 24 | @import "mixins/list-group.less"; 25 | @import "mixins/nav-divider.less"; 26 | @import "mixins/forms.less"; 27 | @import "mixins/progress-bar.less"; 28 | @import "mixins/table-row.less"; 29 | 30 | // Skins 31 | @import "mixins/background-variant.less"; 32 | @import "mixins/border-radius.less"; 33 | @import "mixins/gradients.less"; 34 | 35 | // Layout 36 | @import "mixins/clearfix.less"; 37 | @import "mixins/center-block.less"; 38 | @import "mixins/nav-vertical-align.less"; 39 | @import "mixins/grid-framework.less"; 40 | @import "mixins/grid.less"; 41 | -------------------------------------------------------------------------------- /api/thinkphp/library/think/db/exception/BindParamException.php: -------------------------------------------------------------------------------- 1 | 10 | // +---------------------------------------------------------------------- 11 | 12 | namespace think\db\exception; 13 | 14 | use think\exception\DbException; 15 | 16 | /** 17 | * PDO参数绑定异常 18 | */ 19 | class BindParamException extends DbException 20 | { 21 | 22 | /** 23 | * BindParamException constructor. 24 | * @param string $message 25 | * @param array $config 26 | * @param string $sql 27 | * @param array $bind 28 | * @param int $code 29 | */ 30 | public function __construct($message, $config, $sql, $bind, $code = 10502) 31 | { 32 | $this->setData('Bind Param', $bind); 33 | parent::__construct($message, $config, $sql, $code); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /api/thinkphp/library/think/db/Expression.php: -------------------------------------------------------------------------------- 1 | 10 | // +---------------------------------------------------------------------- 11 | 12 | namespace think\db; 13 | 14 | class Expression 15 | { 16 | /** 17 | * 查询表达式 18 | * 19 | * @var string 20 | */ 21 | protected $value; 22 | 23 | /** 24 | * 创建一个查询表达式 25 | * 26 | * @param string $value 27 | * @return void 28 | */ 29 | public function __construct($value) 30 | { 31 | $this->value = $value; 32 | } 33 | 34 | /** 35 | * 获取表达式 36 | * 37 | * @return string 38 | */ 39 | public function getValue() 40 | { 41 | return $this->value; 42 | } 43 | 44 | public function __toString() 45 | { 46 | return (string) $this->value; 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /api/thinkphp/library/think/exception/HttpException.php: -------------------------------------------------------------------------------- 1 | 10 | // +---------------------------------------------------------------------- 11 | 12 | namespace think\exception; 13 | 14 | class HttpException extends \RuntimeException 15 | { 16 | private $statusCode; 17 | private $headers; 18 | 19 | public function __construct($statusCode, $message = null, \Exception $previous = null, array $headers = [], $code = 0) 20 | { 21 | $this->statusCode = $statusCode; 22 | $this->headers = $headers; 23 | 24 | parent::__construct($message, $code, $previous); 25 | } 26 | 27 | public function getStatusCode() 28 | { 29 | return $this->statusCode; 30 | } 31 | 32 | public function getHeaders() 33 | { 34 | return $this->headers; 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /api/composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "karsonzhang/fastadmin", 3 | "description": "the fastest admin framework", 4 | "type": "project", 5 | "keywords": [ 6 | "fastadmin", 7 | "thinkphp" 8 | ], 9 | "homepage": "https://www.fastadmin.net/", 10 | "license": "Apache-2.0", 11 | "authors": [ 12 | { 13 | "name": "Karson", 14 | "email": "karson@fastadmin.net" 15 | } 16 | ], 17 | "require": { 18 | "php": ">=7.1.0", 19 | "topthink/framework": "dev-master", 20 | "topthink/think-captcha": "^1.0", 21 | "topthink/think-installer": "^1.0.14", 22 | "topthink/think-queue": "1.1.6", 23 | "topthink/think-helper": "^1.0.7", 24 | "karsonzhang/fastadmin-addons": "~1.3.2", 25 | "overtrue/pinyin": "^3.0", 26 | "phpoffice/phpspreadsheet": "1.12", 27 | "overtrue/wechat": "4.2.11", 28 | "nelexa/zip": "^3.3", 29 | "ext-json": "*", 30 | "ext-curl": "*", 31 | "ext-pdo": "*", 32 | "ext-bcmath": "*", 33 | "txthinking/mailer": "^2.0" 34 | }, 35 | "config": { 36 | "preferred-install": "dist" 37 | }, 38 | "repositories": [ 39 | { 40 | "type": "git", 41 | "url": "https://gitee.com/karson/framework" 42 | } 43 | ] 44 | } 45 | -------------------------------------------------------------------------------- /api/thinkphp/library/think/model/Pivot.php: -------------------------------------------------------------------------------- 1 | 10 | // +---------------------------------------------------------------------- 11 | 12 | namespace think\model; 13 | 14 | use think\Model; 15 | 16 | class Pivot extends Model 17 | { 18 | 19 | /** @var Model */ 20 | public $parent; 21 | 22 | protected $autoWriteTimestamp = false; 23 | 24 | /** 25 | * 架构函数 26 | * @access public 27 | * @param array|object $data 数据 28 | * @param Model $parent 上级模型 29 | * @param string $table 中间数据表名 30 | */ 31 | public function __construct($data = [], Model $parent = null, $table = '') 32 | { 33 | $this->parent = $parent; 34 | 35 | if (is_null($this->name)) { 36 | $this->name = $table; 37 | } 38 | 39 | parent::__construct($data); 40 | } 41 | 42 | } 43 | -------------------------------------------------------------------------------- /api/thinkphp/library/think/Env.php: -------------------------------------------------------------------------------- 1 | 10 | // +---------------------------------------------------------------------- 11 | 12 | namespace think; 13 | 14 | class Env 15 | { 16 | /** 17 | * 获取环境变量值 18 | * @access public 19 | * @param string $name 环境变量名(支持二级 . 号分割) 20 | * @param string $default 默认值 21 | * @return mixed 22 | */ 23 | public static function get($name, $default = null) 24 | { 25 | $result = getenv(ENV_PREFIX . strtoupper(str_replace('.', '_', $name))); 26 | 27 | if (false !== $result) { 28 | if ('false' === $result) { 29 | $result = false; 30 | } elseif ('true' === $result) { 31 | $result = true; 32 | } 33 | 34 | return $result; 35 | } 36 | 37 | return $default; 38 | } 39 | } 40 | --------------------------------------------------------------------------------