├── miniprogram ├── pages │ ├── login │ │ ├── login.json │ │ ├── login.wxss │ │ ├── login.wxml │ │ └── login.js │ ├── group │ │ ├── group.json │ │ ├── group.wxss │ │ └── group.wxml │ ├── personal │ │ └── personal.json │ ├── dist │ │ ├── common │ │ │ ├── style │ │ │ │ ├── var.wxss │ │ │ │ ├── mixins │ │ │ │ │ ├── clearfix.wxss │ │ │ │ │ ├── ellipsis.wxss │ │ │ │ │ └── hairline.wxss │ │ │ │ ├── clearfix.wxss │ │ │ │ ├── ellipsis.wxss │ │ │ │ └── hairline.wxss │ │ │ ├── color.js │ │ │ ├── utils.wxs │ │ │ ├── utils.js │ │ │ ├── class-names.js │ │ │ ├── index.wxss │ │ │ └── component.js │ │ ├── radio-group │ │ │ ├── index.wxml │ │ │ ├── index.wxss │ │ │ ├── index.json │ │ │ └── index.js │ │ ├── checkbox-group │ │ │ ├── index.wxml │ │ │ ├── index.wxss │ │ │ ├── index.json │ │ │ └── index.js │ │ ├── tab │ │ │ ├── index.json │ │ │ ├── index.wxss │ │ │ ├── index.wxml │ │ │ └── index.js │ │ ├── tag │ │ │ ├── index.json │ │ │ ├── index.wxml │ │ │ ├── index.wxss │ │ │ └── index.js │ │ ├── col │ │ │ ├── index.json │ │ │ ├── index.wxml │ │ │ ├── index.js │ │ │ └── index.wxss │ │ ├── loading │ │ │ ├── index.json │ │ │ ├── index.js │ │ │ ├── index.wxml │ │ │ └── index.wxss │ │ ├── row │ │ │ ├── index.json │ │ │ ├── index.wxss │ │ │ ├── index.wxml │ │ │ └── index.js │ │ ├── stepper │ │ │ ├── index.json │ │ │ ├── index.wxml │ │ │ └── index.wxss │ │ ├── tabs │ │ │ ├── index.json │ │ │ ├── index.wxss │ │ │ └── index.wxml │ │ ├── badge │ │ │ ├── index.json │ │ │ ├── index.wxml │ │ │ ├── index.js │ │ │ └── index.wxss │ │ ├── cell-group │ │ │ ├── index.json │ │ │ ├── index.wxss │ │ │ ├── index.wxml │ │ │ └── index.js │ │ ├── collapse │ │ │ ├── index.json │ │ │ ├── index.wxml │ │ │ └── index.js │ │ ├── icon │ │ │ ├── index.json │ │ │ ├── index.js │ │ │ └── index.wxml │ │ ├── progress │ │ │ ├── index.json │ │ │ ├── index.wxml │ │ │ ├── index.wxss │ │ │ └── index.js │ │ ├── slider │ │ │ ├── index.json │ │ │ ├── index.wxml │ │ │ └── index.wxss │ │ ├── tabbar │ │ │ ├── index.json │ │ │ ├── index.wxml │ │ │ └── index.wxss │ │ ├── transition │ │ │ ├── index.json │ │ │ ├── index.js │ │ │ └── index.wxml │ │ ├── badge-group │ │ │ ├── index.json │ │ │ ├── index.wxss │ │ │ ├── index.wxml │ │ │ └── index.js │ │ ├── goods-action │ │ │ ├── index.json │ │ │ ├── index.wxml │ │ │ ├── index.wxss │ │ │ └── index.js │ │ ├── swipe-cell │ │ │ ├── index.json │ │ │ ├── index.wxss │ │ │ └── index.wxml │ │ ├── goods-action-button │ │ │ ├── index.wxss │ │ │ ├── index.json │ │ │ ├── index.js │ │ │ └── index.wxml │ │ ├── overlay │ │ │ ├── index.wxss │ │ │ ├── index.json │ │ │ ├── index.wxml │ │ │ └── index.js │ │ ├── cell │ │ │ ├── index.json │ │ │ ├── index.wxml │ │ │ ├── index.js │ │ │ └── index.wxss │ │ ├── card │ │ │ ├── index.json │ │ │ ├── index.js │ │ │ ├── index.wxss │ │ │ └── index.wxml │ │ ├── notice-bar │ │ │ ├── index.json │ │ │ ├── index.wxss │ │ │ └── index.wxml │ │ ├── panel │ │ │ ├── index.json │ │ │ ├── index.wxss │ │ │ ├── index.js │ │ │ └── index.wxml │ │ ├── radio │ │ │ ├── index.json │ │ │ ├── index.wxss │ │ │ ├── index.wxml │ │ │ └── index.js │ │ ├── rate │ │ │ ├── index.json │ │ │ ├── index.wxss │ │ │ └── index.wxml │ │ ├── steps │ │ │ ├── index.json │ │ │ ├── index.wxml │ │ │ └── index.js │ │ ├── area │ │ │ ├── index.json │ │ │ ├── index.wxss │ │ │ └── index.wxml │ │ ├── button │ │ │ ├── index.json │ │ │ ├── index.wxml │ │ │ ├── index.wxss │ │ │ └── index.js │ │ ├── checkbox │ │ │ ├── index.json │ │ │ ├── index.wxml │ │ │ └── index.wxss │ │ ├── nav-bar │ │ │ ├── index.json │ │ │ ├── index.js │ │ │ ├── index.wxss │ │ │ └── index.wxml │ │ ├── popup │ │ │ ├── index.json │ │ │ ├── index.wxml │ │ │ └── index.js │ │ ├── tabbar-item │ │ │ ├── index.json │ │ │ ├── index.wxml │ │ │ ├── index.js │ │ │ └── index.wxss │ │ ├── tree-select │ │ │ ├── index.json │ │ │ ├── index.wxss │ │ │ ├── index.wxml │ │ │ └── index.js │ │ ├── collapse-item │ │ │ ├── index.json │ │ │ ├── index.wxss │ │ │ └── index.wxml │ │ ├── submit-bar │ │ │ ├── index.json │ │ │ ├── index.wxss │ │ │ ├── index.wxml │ │ │ └── index.js │ │ ├── switch │ │ │ ├── index.json │ │ │ ├── index.wxml │ │ │ ├── index.wxss │ │ │ └── index.js │ │ ├── datetime-picker │ │ │ ├── index.json │ │ │ ├── index.wxss │ │ │ └── index.wxml │ │ ├── notify │ │ │ ├── index.json │ │ │ ├── index.wxss │ │ │ ├── index.wxml │ │ │ ├── notify.js │ │ │ └── index.js │ │ ├── switch-cell │ │ │ ├── index.wxss │ │ │ ├── index.json │ │ │ ├── index.wxml │ │ │ └── index.js │ │ ├── field │ │ │ ├── index.json │ │ │ └── index.wxss │ │ ├── search │ │ │ ├── index.json │ │ │ ├── index.wxss │ │ │ ├── index.wxml │ │ │ └── index.js │ │ ├── dialog │ │ │ ├── index.json │ │ │ ├── index.wxss │ │ │ ├── index.wxml │ │ │ └── dialog.js │ │ ├── goods-action-icon │ │ │ ├── index.json │ │ │ ├── index.wxss │ │ │ ├── index.js │ │ │ └── index.wxml │ │ ├── action-sheet │ │ │ ├── index.json │ │ │ ├── index.wxss │ │ │ ├── index.js │ │ │ └── index.wxml │ │ ├── toast │ │ │ ├── index.json │ │ │ ├── index.js │ │ │ ├── index.wxss │ │ │ └── index.wxml │ │ └── mixins │ │ │ ├── button.js │ │ │ ├── link.js │ │ │ ├── observer │ │ │ ├── props.js │ │ │ ├── index.js │ │ │ └── behavior.js │ │ │ ├── open-type.js │ │ │ ├── touch.js │ │ │ ├── basic.js │ │ │ └── transition.js │ ├── nav │ │ ├── nav.json │ │ ├── nav.wxss │ │ ├── nav.wxml │ │ └── nav.js │ ├── help │ │ ├── help.json │ │ ├── help.js │ │ └── help.wxss │ ├── updateLog │ │ ├── updateLog.json │ │ ├── updateLog.wxss │ │ ├── updateLog.wxml │ │ └── updateLog.js │ ├── share │ │ ├── share.json │ │ ├── share.wxss │ │ └── share.wxml │ ├── result │ │ ├── result.json │ │ └── result.wxss │ ├── billDetail │ │ └── billDetail.json │ ├── groupDetail │ │ ├── groupDetail.json │ │ └── groupDetail.wxss │ └── .DS_Store ├── .DS_Store ├── components │ └── avatar │ │ ├── avatar.json │ │ ├── avatar.wxml │ │ ├── avatar.js │ │ └── avatar.wxss ├── images │ ├── .DS_Store │ ├── gear.png │ ├── group.png │ ├── list.png │ ├── plus.png │ ├── share.png │ ├── user.png │ ├── cancel.png │ ├── cursor.png │ ├── logout.png │ ├── refresh.png │ ├── account.jpeg │ ├── cardiogram.png │ ├── group-dark.png │ ├── jielong.jpeg │ ├── left-arrow.png │ ├── plus-dark.png │ ├── plus-light.png │ ├── settings.png │ ├── user-dark.png │ ├── user-light.png │ ├── walkmark.png │ ├── bubble-speak.png │ ├── do-not-roll.png │ ├── group-light.png │ └── settings-black.png ├── sitemap.json ├── utils │ └── parseTime.js ├── style │ ├── white.wxss │ ├── red.wxss │ ├── blue.wxss │ ├── green.wxss │ ├── purple.wxss │ └── yellow.wxss └── app.json ├── .gitignore ├── .DS_Store ├── cloudfunctions ├── endBill │ └── package.json ├── getResult │ ├── package.json │ └── index.js ├── joinGroup │ ├── package.json │ └── index.js ├── createBill │ ├── package.json │ └── index.js ├── createGroup │ ├── package.json │ └── index.js ├── deleteBill │ ├── package.json │ └── index.js ├── deleteGroup │ ├── package.json │ └── index.js ├── editProject │ ├── package.json │ └── index.js ├── getBill │ ├── package.json │ └── index.js ├── getGroup │ ├── package.json │ └── index.js ├── getGroupUser │ ├── package.json │ └── index.js ├── getOneBill │ ├── package.json │ └── index.js ├── getUserInfo │ ├── package.json │ └── index.js ├── leaveGroup │ ├── package.json │ └── index.js ├── createFeedback │ └── package.json ├── createUser │ ├── package.json │ └── index.js ├── deleteProject │ ├── package.json │ └── index.js ├── getProject │ ├── package.json │ └── index.js └── createProject │ ├── package.json │ └── index.js ├── README.md ├── LICENSE └── project.private.config.json /miniprogram/pages/login/login.json: -------------------------------------------------------------------------------- 1 | {} -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | cloudfunctions/**/node_modules -------------------------------------------------------------------------------- /miniprogram/pages/group/group.json: -------------------------------------------------------------------------------- 1 | { 2 | } -------------------------------------------------------------------------------- /miniprogram/pages/personal/personal.json: -------------------------------------------------------------------------------- 1 | {} -------------------------------------------------------------------------------- /miniprogram/pages/dist/common/style/var.wxss: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /miniprogram/pages/dist/common/style/mixins/clearfix.wxss: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /miniprogram/pages/dist/common/style/mixins/ellipsis.wxss: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /miniprogram/pages/dist/common/style/mixins/hairline.wxss: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /miniprogram/pages/dist/radio-group/index.wxml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /miniprogram/pages/dist/checkbox-group/index.wxml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /miniprogram/pages/nav/nav.json: -------------------------------------------------------------------------------- 1 | { 2 | "component": true 3 | } -------------------------------------------------------------------------------- /miniprogram/pages/dist/tab/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "component": true 3 | } -------------------------------------------------------------------------------- /miniprogram/pages/dist/tag/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "component": true 3 | } -------------------------------------------------------------------------------- /miniprogram/pages/help/help.json: -------------------------------------------------------------------------------- 1 | { 2 | "usingComponents": {} 3 | } -------------------------------------------------------------------------------- /miniprogram/pages/dist/col/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "component": true 3 | } 4 | -------------------------------------------------------------------------------- /miniprogram/pages/dist/loading/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "component": true 3 | } -------------------------------------------------------------------------------- /miniprogram/pages/dist/row/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "component": true 3 | } 4 | -------------------------------------------------------------------------------- /miniprogram/pages/dist/stepper/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "component": true 3 | } -------------------------------------------------------------------------------- /miniprogram/pages/dist/tabs/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "component": true 3 | } -------------------------------------------------------------------------------- /miniprogram/pages/dist/badge/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "component": true 3 | } 4 | -------------------------------------------------------------------------------- /miniprogram/pages/dist/cell-group/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "component": true 3 | } -------------------------------------------------------------------------------- /miniprogram/pages/dist/cell-group/index.wxss: -------------------------------------------------------------------------------- 1 | @import '../common/index.wxss'; -------------------------------------------------------------------------------- /miniprogram/pages/dist/collapse/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "component": true 3 | } 4 | -------------------------------------------------------------------------------- /miniprogram/pages/dist/icon/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "component": true 3 | } 4 | -------------------------------------------------------------------------------- /miniprogram/pages/dist/progress/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "component": true 3 | } 4 | -------------------------------------------------------------------------------- /miniprogram/pages/dist/radio-group/index.wxss: -------------------------------------------------------------------------------- 1 | @import '../common/index.wxss'; -------------------------------------------------------------------------------- /miniprogram/pages/dist/slider/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "component": true 3 | } 4 | -------------------------------------------------------------------------------- /miniprogram/pages/dist/tabbar/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "component": true 3 | } 4 | -------------------------------------------------------------------------------- /miniprogram/pages/dist/transition/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "component": true 3 | } -------------------------------------------------------------------------------- /miniprogram/pages/updateLog/updateLog.json: -------------------------------------------------------------------------------- 1 | { 2 | "usingComponents": {} 3 | } -------------------------------------------------------------------------------- /.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GzhiYi/accounting-together/HEAD/.DS_Store -------------------------------------------------------------------------------- /miniprogram/pages/dist/badge-group/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "component": true 3 | } 4 | -------------------------------------------------------------------------------- /miniprogram/pages/dist/checkbox-group/index.wxss: -------------------------------------------------------------------------------- 1 | @import '../common/index.wxss'; -------------------------------------------------------------------------------- /miniprogram/pages/dist/goods-action/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "component": true 3 | } 4 | -------------------------------------------------------------------------------- /miniprogram/pages/dist/swipe-cell/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "component": true 3 | } 4 | -------------------------------------------------------------------------------- /miniprogram/pages/share/share.json: -------------------------------------------------------------------------------- 1 | { 2 | "navigationBarTitleText": "一起算账" 3 | } -------------------------------------------------------------------------------- /miniprogram/pages/result/result.json: -------------------------------------------------------------------------------- 1 | { 2 | "navigationBarTitleText": "账单结算结果" 3 | } -------------------------------------------------------------------------------- /miniprogram/pages/billDetail/billDetail.json: -------------------------------------------------------------------------------- 1 | { 2 | "navigationBarTitleText": "账单详情" 3 | } -------------------------------------------------------------------------------- /miniprogram/pages/groupDetail/groupDetail.json: -------------------------------------------------------------------------------- 1 | { 2 | "navigationBarTitleText": "群组" 3 | } -------------------------------------------------------------------------------- /miniprogram/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GzhiYi/accounting-together/HEAD/miniprogram/.DS_Store -------------------------------------------------------------------------------- /miniprogram/components/avatar/avatar.json: -------------------------------------------------------------------------------- 1 | { 2 | "component": true, 3 | "usingComponents": {} 4 | } -------------------------------------------------------------------------------- /miniprogram/pages/dist/badge-group/index.wxss: -------------------------------------------------------------------------------- 1 | @import '../common/index.wxss';.van-badge-group{width:85px} -------------------------------------------------------------------------------- /miniprogram/pages/dist/common/style/clearfix.wxss: -------------------------------------------------------------------------------- 1 | .van-clearfix::after{content:'';display:table;clear:both} -------------------------------------------------------------------------------- /miniprogram/pages/dist/goods-action/index.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /miniprogram/pages/dist/goods-action-button/index.wxss: -------------------------------------------------------------------------------- 1 | @import '../common/index.wxss';:host{-webkit-flex:1;flex:1} -------------------------------------------------------------------------------- /miniprogram/images/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GzhiYi/accounting-together/HEAD/miniprogram/images/.DS_Store -------------------------------------------------------------------------------- /miniprogram/images/gear.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GzhiYi/accounting-together/HEAD/miniprogram/images/gear.png -------------------------------------------------------------------------------- /miniprogram/images/group.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GzhiYi/accounting-together/HEAD/miniprogram/images/group.png -------------------------------------------------------------------------------- /miniprogram/images/list.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GzhiYi/accounting-together/HEAD/miniprogram/images/list.png -------------------------------------------------------------------------------- /miniprogram/images/plus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GzhiYi/accounting-together/HEAD/miniprogram/images/plus.png -------------------------------------------------------------------------------- /miniprogram/images/share.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GzhiYi/accounting-together/HEAD/miniprogram/images/share.png -------------------------------------------------------------------------------- /miniprogram/images/user.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GzhiYi/accounting-together/HEAD/miniprogram/images/user.png -------------------------------------------------------------------------------- /miniprogram/pages/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GzhiYi/accounting-together/HEAD/miniprogram/pages/.DS_Store -------------------------------------------------------------------------------- /miniprogram/images/cancel.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GzhiYi/accounting-together/HEAD/miniprogram/images/cancel.png -------------------------------------------------------------------------------- /miniprogram/images/cursor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GzhiYi/accounting-together/HEAD/miniprogram/images/cursor.png -------------------------------------------------------------------------------- /miniprogram/images/logout.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GzhiYi/accounting-together/HEAD/miniprogram/images/logout.png -------------------------------------------------------------------------------- /miniprogram/images/refresh.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GzhiYi/accounting-together/HEAD/miniprogram/images/refresh.png -------------------------------------------------------------------------------- /miniprogram/pages/dist/row/index.wxss: -------------------------------------------------------------------------------- 1 | @import '../common/index.wxss';.van-row::after{content:"";display:table;clear:both} -------------------------------------------------------------------------------- /miniprogram/images/account.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GzhiYi/accounting-together/HEAD/miniprogram/images/account.jpeg -------------------------------------------------------------------------------- /miniprogram/images/cardiogram.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GzhiYi/accounting-together/HEAD/miniprogram/images/cardiogram.png -------------------------------------------------------------------------------- /miniprogram/images/group-dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GzhiYi/accounting-together/HEAD/miniprogram/images/group-dark.png -------------------------------------------------------------------------------- /miniprogram/images/jielong.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GzhiYi/accounting-together/HEAD/miniprogram/images/jielong.jpeg -------------------------------------------------------------------------------- /miniprogram/images/left-arrow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GzhiYi/accounting-together/HEAD/miniprogram/images/left-arrow.png -------------------------------------------------------------------------------- /miniprogram/images/plus-dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GzhiYi/accounting-together/HEAD/miniprogram/images/plus-dark.png -------------------------------------------------------------------------------- /miniprogram/images/plus-light.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GzhiYi/accounting-together/HEAD/miniprogram/images/plus-light.png -------------------------------------------------------------------------------- /miniprogram/images/settings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GzhiYi/accounting-together/HEAD/miniprogram/images/settings.png -------------------------------------------------------------------------------- /miniprogram/images/user-dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GzhiYi/accounting-together/HEAD/miniprogram/images/user-dark.png -------------------------------------------------------------------------------- /miniprogram/images/user-light.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GzhiYi/accounting-together/HEAD/miniprogram/images/user-light.png -------------------------------------------------------------------------------- /miniprogram/images/walkmark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GzhiYi/accounting-together/HEAD/miniprogram/images/walkmark.png -------------------------------------------------------------------------------- /miniprogram/pages/dist/common/color.js: -------------------------------------------------------------------------------- 1 | export var RED = '#f44'; 2 | export var BLUE = '#1989fa'; 3 | export var GREEN = '#4b0'; -------------------------------------------------------------------------------- /miniprogram/pages/dist/row/index.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /miniprogram/images/bubble-speak.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GzhiYi/accounting-together/HEAD/miniprogram/images/bubble-speak.png -------------------------------------------------------------------------------- /miniprogram/images/do-not-roll.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GzhiYi/accounting-together/HEAD/miniprogram/images/do-not-roll.png -------------------------------------------------------------------------------- /miniprogram/images/group-light.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GzhiYi/accounting-together/HEAD/miniprogram/images/group-light.png -------------------------------------------------------------------------------- /miniprogram/pages/dist/overlay/index.wxss: -------------------------------------------------------------------------------- 1 | @import '../common/index.wxss';.van-overlay{position:fixed;top:0;left:0;right:0;bottom:0} -------------------------------------------------------------------------------- /miniprogram/images/settings-black.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GzhiYi/accounting-together/HEAD/miniprogram/images/settings-black.png -------------------------------------------------------------------------------- /miniprogram/pages/dist/tab/index.wxss: -------------------------------------------------------------------------------- 1 | @import '../common/index.wxss';.van-tab__pane{box-sizing:border-box}.van-tab__pane--float{float:left} -------------------------------------------------------------------------------- /miniprogram/pages/dist/cell/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "component": true, 3 | "usingComponents": { 4 | "van-icon": "../icon/index" 5 | } 6 | } -------------------------------------------------------------------------------- /miniprogram/pages/dist/collapse/index.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /miniprogram/pages/dist/badge-group/index.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /miniprogram/pages/dist/card/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "component": true, 3 | "usingComponents": { 4 | "van-tag": "../tag/index" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /miniprogram/pages/dist/col/index.wxml: -------------------------------------------------------------------------------- 1 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /miniprogram/pages/dist/notice-bar/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "component": true, 3 | "usingComponents": { 4 | "van-icon": "../icon/index" 5 | } 6 | } -------------------------------------------------------------------------------- /miniprogram/pages/dist/panel/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "component": true, 3 | "usingComponents": { 4 | "van-cell": "../cell/index" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /miniprogram/pages/dist/radio/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "component": true, 3 | "usingComponents": { 4 | "van-icon": "../icon/index" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /miniprogram/pages/dist/rate/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "component": true, 3 | "usingComponents": { 4 | "van-icon": "../icon/index" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /miniprogram/pages/dist/steps/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "component": true, 3 | "usingComponents": { 4 | "van-icon": "../icon/index" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /miniprogram/pages/dist/tag/index.wxml: -------------------------------------------------------------------------------- 1 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /miniprogram/pages/dist/area/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "component": true, 3 | "usingComponents": { 4 | "van-loading": "../loading/index" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /miniprogram/pages/dist/button/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "component": true, 3 | "usingComponents": { 4 | "van-loading": "../loading/index" 5 | } 6 | } -------------------------------------------------------------------------------- /miniprogram/pages/dist/checkbox/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "component": true, 3 | "usingComponents": { 4 | "van-icon": "../icon/index" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /miniprogram/pages/dist/nav-bar/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "component": true, 3 | "usingComponents": { 4 | "van-icon": "../icon/index" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /miniprogram/pages/dist/popup/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "component": true, 3 | "usingComponents": { 4 | "van-overlay": "../overlay/index" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /miniprogram/pages/dist/radio-group/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "component": true, 3 | "usingComponents": { 4 | "van-icon": "../icon/index" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /miniprogram/pages/dist/tabbar-item/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "component": true, 3 | "usingComponents": { 4 | "van-icon": "../icon/index" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /miniprogram/pages/dist/tree-select/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "component": true, 3 | "usingComponents": { 4 | "van-icon": "../icon/index" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /miniprogram/pages/dist/checkbox-group/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "component": true, 3 | "usingComponents": { 4 | "van-icon": "../icon/index" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /miniprogram/pages/dist/collapse-item/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "component": true, 3 | "usingComponents": { 4 | "van-cell": "../cell/index" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /miniprogram/pages/dist/submit-bar/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "component": true, 3 | "usingComponents": { 4 | "van-button": "../button/index" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /miniprogram/pages/dist/switch/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "component": true, 3 | "usingComponents": { 4 | "van-loading": "../loading/index" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /miniprogram/pages/dist/datetime-picker/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "component": true, 3 | "usingComponents": { 4 | "van-loading": "../loading/index" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /miniprogram/pages/dist/notify/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "component": true, 3 | "usingComponents": { 4 | "van-transition": "../transition/index" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /miniprogram/pages/dist/overlay/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "component": true, 3 | "usingComponents": { 4 | "van-transition": "../transition/index" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /miniprogram/pages/dist/cell-group/index.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /miniprogram/pages/dist/goods-action-button/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "component": true, 3 | "usingComponents": { 4 | "van-button": "../button/index" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /miniprogram/pages/dist/panel/index.wxss: -------------------------------------------------------------------------------- 1 | @import '../common/index.wxss';.van-panel{background:#fff}.van-panel__header-value{color:#f44}.van-panel__footer{padding:10px 15px} -------------------------------------------------------------------------------- /miniprogram/pages/dist/tabbar/index.wxml: -------------------------------------------------------------------------------- 1 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /miniprogram/pages/dist/switch-cell/index.wxss: -------------------------------------------------------------------------------- 1 | @import '../common/index.wxss';.van-switch-cell{padding-top:8px;padding-bottom:8px}.van-switch-cell__switch{vertical-align:middle} -------------------------------------------------------------------------------- /miniprogram/pages/dist/field/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "component": true, 3 | "usingComponents": { 4 | "van-cell": "../cell/index", 5 | "van-icon": "../icon/index" 6 | } 7 | } -------------------------------------------------------------------------------- /miniprogram/pages/dist/common/utils.wxs: -------------------------------------------------------------------------------- 1 | function isSrc(url) { 2 | return url.indexOf('http') === 0 || url.indexOf('data:image') === 0; 3 | } 4 | 5 | module.exports.isSrc = isSrc; 6 | -------------------------------------------------------------------------------- /miniprogram/pages/dist/rate/index.wxss: -------------------------------------------------------------------------------- 1 | @import '../common/index.wxss';.van-rate{-webkit-user-select:none;user-select:none}.van-rate__item{width:1em;padding:0 2px;box-sizing:content-box} -------------------------------------------------------------------------------- /miniprogram/pages/dist/search/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "component": true, 3 | "usingComponents": { 4 | "van-icon": "../icon/index", 5 | "van-field": "../field/index" 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /miniprogram/pages/updateLog/updateLog.wxss: -------------------------------------------------------------------------------- 1 | page { 2 | background: #fff !important; 3 | } 4 | .update-content { 5 | margin:0 30rpx; 6 | font-size:30rpx; 7 | padding:3rpx 0; 8 | } -------------------------------------------------------------------------------- /miniprogram/pages/dist/dialog/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "component": true, 3 | "usingComponents": { 4 | "van-popup": "../popup/index", 5 | "van-button": "../button/index" 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /miniprogram/pages/dist/switch-cell/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "component": true, 3 | "usingComponents": { 4 | "van-cell": "../cell/index", 5 | "van-switch": "../switch/index" 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /miniprogram/pages/dist/goods-action-icon/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "component": true, 3 | "usingComponents": { 4 | "van-icon": "../icon/index", 5 | "van-button": "../button/index" 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /miniprogram/sitemap.json: -------------------------------------------------------------------------------- 1 | { 2 | "desc": "关于本文件的更多信息,请参考文档 https://developers.weixin.qq.com/miniprogram/dev/framework/sitemap.html", 3 | "rules": [{ 4 | "action": "allow", 5 | "page": "*" 6 | }] 7 | } -------------------------------------------------------------------------------- /miniprogram/pages/dist/notify/index.wxss: -------------------------------------------------------------------------------- 1 | @import '../common/index.wxss';.van-notify{z-index:110;position:fixed;top:0;width:100%;text-align:center;box-sizing:border-box;padding:6px 15px;font-size:14px;line-height:20px} -------------------------------------------------------------------------------- /miniprogram/pages/dist/cell-group/index.js: -------------------------------------------------------------------------------- 1 | import { VantComponent } from '../common/component'; 2 | VantComponent({ 3 | props: { 4 | border: { 5 | type: Boolean, 6 | value: true 7 | } 8 | } 9 | }); -------------------------------------------------------------------------------- /miniprogram/pages/dist/action-sheet/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "component": true, 3 | "usingComponents": { 4 | "van-icon": "../icon/index", 5 | "van-popup": "../popup/index", 6 | "van-loading": "../loading/index" 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /miniprogram/pages/dist/goods-action/index.wxss: -------------------------------------------------------------------------------- 1 | @import '../common/index.wxss';.van-goods-action{position:fixed;right:0;bottom:0;left:0;display:-webkit-flex;display:flex;background-color:#fff}.van-goods-action--safe{padding-bottom:34px} -------------------------------------------------------------------------------- /miniprogram/pages/dist/tabbar/index.wxss: -------------------------------------------------------------------------------- 1 | @import '../common/index.wxss';.van-tabbar{display:-webkit-flex;display:flex;width:100%;height:50px;background-color:#fff}.van-tabbar--fixed{position:fixed;bottom:0;left:0}.van-tabbar--safe{padding-bottom:34px} -------------------------------------------------------------------------------- /miniprogram/pages/dist/badge/index.wxml: -------------------------------------------------------------------------------- 1 | 2 | {{ info }} 3 | {{ title }} 4 | 5 | -------------------------------------------------------------------------------- /miniprogram/pages/dist/toast/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "component": true, 3 | "usingComponents": { 4 | "van-icon": "../icon/index", 5 | "van-loading": "../loading/index", 6 | "van-overlay": "../overlay/index", 7 | "van-transition": "../transition/index" 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /miniprogram/pages/dist/overlay/index.wxml: -------------------------------------------------------------------------------- 1 | 8 | -------------------------------------------------------------------------------- /miniprogram/pages/dist/panel/index.js: -------------------------------------------------------------------------------- 1 | import { VantComponent } from '../common/component'; 2 | VantComponent({ 3 | classes: ['header-class', 'footer-class'], 4 | props: { 5 | desc: String, 6 | title: String, 7 | status: String, 8 | useFooterSlot: Boolean 9 | } 10 | }); -------------------------------------------------------------------------------- /miniprogram/pages/dist/tab/index.wxml: -------------------------------------------------------------------------------- 1 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /miniprogram/pages/dist/transition/index.js: -------------------------------------------------------------------------------- 1 | import { VantComponent } from '../common/component'; 2 | import { transition } from '../mixins/transition'; 3 | VantComponent({ 4 | mixins: [transition(true)], 5 | props: { 6 | name: { 7 | type: String, 8 | value: 'fade' 9 | } 10 | } 11 | }); -------------------------------------------------------------------------------- /miniprogram/pages/dist/switch/index.wxml: -------------------------------------------------------------------------------- 1 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /miniprogram/pages/dist/notify/index.wxml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | {{ text }} 10 | 11 | -------------------------------------------------------------------------------- /cloudfunctions/endBill/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "endBill", 3 | "version": "1.0.0", 4 | "description": "", 5 | "main": "index.js", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1" 8 | }, 9 | "author": "", 10 | "license": "ISC", 11 | "dependencies": { 12 | "wx-server-sdk": "latest" 13 | } 14 | } -------------------------------------------------------------------------------- /cloudfunctions/getResult/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "getResult", 3 | "version": "1.0.0", 4 | "description": "", 5 | "main": "index.js", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1" 8 | }, 9 | "author": "", 10 | "license": "ISC", 11 | "dependencies": { 12 | "wx-server-sdk": "latest" 13 | } 14 | } -------------------------------------------------------------------------------- /cloudfunctions/joinGroup/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "joinGroup", 3 | "version": "1.0.0", 4 | "description": "", 5 | "main": "index.js", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1" 8 | }, 9 | "author": "", 10 | "license": "ISC", 11 | "dependencies": { 12 | "wx-server-sdk": "latest" 13 | } 14 | } -------------------------------------------------------------------------------- /cloudfunctions/createBill/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "createBill", 3 | "version": "1.0.0", 4 | "description": "", 5 | "main": "index.js", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1" 8 | }, 9 | "author": "", 10 | "license": "ISC", 11 | "dependencies": { 12 | "wx-server-sdk": "latest" 13 | } 14 | } -------------------------------------------------------------------------------- /cloudfunctions/createGroup/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "createGroup", 3 | "version": "1.0.0", 4 | "description": "", 5 | "main": "index.js", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1" 8 | }, 9 | "author": "", 10 | "license": "ISC", 11 | "dependencies": { 12 | "wx-server-sdk": "latest" 13 | } 14 | } -------------------------------------------------------------------------------- /cloudfunctions/deleteBill/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "deleteBill", 3 | "version": "1.0.0", 4 | "description": "", 5 | "main": "index.js", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1" 8 | }, 9 | "author": "", 10 | "license": "ISC", 11 | "dependencies": { 12 | "wx-server-sdk": "latest" 13 | } 14 | } -------------------------------------------------------------------------------- /cloudfunctions/deleteGroup/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "deleteGroup", 3 | "version": "1.0.0", 4 | "description": "", 5 | "main": "index.js", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1" 8 | }, 9 | "author": "", 10 | "license": "ISC", 11 | "dependencies": { 12 | "wx-server-sdk": "latest" 13 | } 14 | } -------------------------------------------------------------------------------- /cloudfunctions/editProject/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "editProject", 3 | "version": "1.0.0", 4 | "description": "", 5 | "main": "index.js", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1" 8 | }, 9 | "author": "", 10 | "license": "ISC", 11 | "dependencies": { 12 | "wx-server-sdk": "latest" 13 | } 14 | } -------------------------------------------------------------------------------- /cloudfunctions/getBill/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "getBill", 3 | "version": "1.0.0", 4 | "description": "", 5 | "main": "index.js", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1" 8 | }, 9 | "author": "", 10 | "license": "ISC", 11 | "dependencies": { 12 | "wx-server-sdk": "latest" 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /cloudfunctions/getGroup/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "getGroup", 3 | "version": "1.0.0", 4 | "description": "", 5 | "main": "index.js", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1" 8 | }, 9 | "author": "", 10 | "license": "ISC", 11 | "dependencies": { 12 | "wx-server-sdk": "latest" 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /cloudfunctions/getGroupUser/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "getGroupUser", 3 | "version": "1.0.0", 4 | "description": "", 5 | "main": "index.js", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1" 8 | }, 9 | "author": "", 10 | "license": "ISC", 11 | "dependencies": { 12 | "wx-server-sdk": "latest" 13 | } 14 | } -------------------------------------------------------------------------------- /cloudfunctions/getOneBill/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "getOneBill", 3 | "version": "1.0.0", 4 | "description": "", 5 | "main": "index.js", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1" 8 | }, 9 | "author": "", 10 | "license": "ISC", 11 | "dependencies": { 12 | "wx-server-sdk": "latest" 13 | } 14 | } -------------------------------------------------------------------------------- /cloudfunctions/getUserInfo/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "getUserInfo", 3 | "version": "1.0.0", 4 | "description": "", 5 | "main": "index.js", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1" 8 | }, 9 | "author": "", 10 | "license": "ISC", 11 | "dependencies": { 12 | "wx-server-sdk": "latest" 13 | } 14 | } -------------------------------------------------------------------------------- /cloudfunctions/leaveGroup/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "leaveGroup", 3 | "version": "1.0.0", 4 | "description": "", 5 | "main": "index.js", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1" 8 | }, 9 | "author": "", 10 | "license": "ISC", 11 | "dependencies": { 12 | "wx-server-sdk": "latest" 13 | } 14 | } -------------------------------------------------------------------------------- /cloudfunctions/createFeedback/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "createFeedback", 3 | "version": "1.0.0", 4 | "description": "", 5 | "main": "index.js", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1" 8 | }, 9 | "author": "", 10 | "license": "ISC", 11 | "dependencies": { 12 | "wx-server-sdk": "latest" 13 | } 14 | } -------------------------------------------------------------------------------- /cloudfunctions/createUser/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "createUser", 3 | "version": "1.0.0", 4 | "description": "", 5 | "main": "index.js", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1" 8 | }, 9 | "author": "", 10 | "license": "ISC", 11 | "dependencies": { 12 | "wx-server-sdk": "latest" 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /cloudfunctions/deleteProject/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "deleteProject", 3 | "version": "1.0.0", 4 | "description": "", 5 | "main": "index.js", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1" 8 | }, 9 | "author": "", 10 | "license": "ISC", 11 | "dependencies": { 12 | "wx-server-sdk": "latest" 13 | } 14 | } -------------------------------------------------------------------------------- /cloudfunctions/getProject/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "getProject", 3 | "version": "1.0.0", 4 | "description": "", 5 | "main": "index.js", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1" 8 | }, 9 | "author": "", 10 | "license": "ISC", 11 | "dependencies": { 12 | "wx-server-sdk": "latest" 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /miniprogram/pages/updateLog/updateLog.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | {{item}} 5 | 6 | 7 | -------------------------------------------------------------------------------- /cloudfunctions/createProject/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "createProject", 3 | "version": "1.0.0", 4 | "description": "", 5 | "main": "index.js", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1" 8 | }, 9 | "author": "", 10 | "license": "ISC", 11 | "dependencies": { 12 | "wx-server-sdk": "latest" 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /miniprogram/pages/dist/common/style/ellipsis.wxss: -------------------------------------------------------------------------------- 1 | .van-ellipsis{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.van-multi-ellipsis--l2{overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}.van-multi-ellipsis--l3{overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical} -------------------------------------------------------------------------------- /miniprogram/pages/dist/common/utils.js: -------------------------------------------------------------------------------- 1 | function isDef(value) { 2 | return value !== undefined && value !== null; 3 | } 4 | 5 | function isObj(x) { 6 | var type = typeof x; 7 | return x !== null && (type === 'object' || type === 'function'); 8 | } 9 | 10 | function isNumber(value) { 11 | return /^\d+$/.test(value); 12 | } 13 | 14 | export { isObj, isDef, isNumber }; -------------------------------------------------------------------------------- /miniprogram/components/avatar/avatar.wxml: -------------------------------------------------------------------------------- 1 | 2 | 6 | {{userInfo.note || userInfo.nickName}} 10 | -------------------------------------------------------------------------------- /miniprogram/pages/dist/loading/index.js: -------------------------------------------------------------------------------- 1 | import { VantComponent } from '../common/component'; 2 | VantComponent({ 3 | props: { 4 | size: { 5 | type: String, 6 | value: '30px' 7 | }, 8 | type: { 9 | type: String, 10 | value: 'circular' 11 | }, 12 | color: { 13 | type: String, 14 | value: '#c9c9c9' 15 | } 16 | } 17 | }); -------------------------------------------------------------------------------- /miniprogram/pages/dist/transition/index.wxml: -------------------------------------------------------------------------------- 1 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /miniprogram/pages/dist/mixins/button.js: -------------------------------------------------------------------------------- 1 | export var button = Behavior({ 2 | properties: { 3 | id: String, 4 | sessionFrom: String, 5 | appParameter: String, 6 | sendMessageImg: String, 7 | sendMessagePath: String, 8 | showMessageCard: String, 9 | sendMessageTitle: String, 10 | lang: { 11 | type: String, 12 | value: 'en' 13 | } 14 | } 15 | }); -------------------------------------------------------------------------------- /miniprogram/pages/dist/swipe-cell/index.wxss: -------------------------------------------------------------------------------- 1 | @import '../common/index.wxss';.van-swipe-cell{position:relative;overflow:hidden}.van-swipe-cell__left,.van-swipe-cell__right{position:absolute;top:0;height:100%}.van-swipe-cell__left{left:0;-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}.van-swipe-cell__right{right:0;-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)} -------------------------------------------------------------------------------- /miniprogram/pages/dist/goods-action-icon/index.wxss: -------------------------------------------------------------------------------- 1 | @import '../common/index.wxss';.van-goods-action-icon{width:50px!important;border:none!important}.van-goods-action-icon__content{height:100%;display:-webkit-flex;display:flex;line-height:1;font-size:10px;color:#7d7e80;-webkit-flex-direction:column;flex-direction:column;-webkit-justify-content:center;justify-content:center}.van-goods-action-icon__icon{margin-bottom:5px} -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # 因为腾讯云开发开始收费,所以关停了一起算账的接口服务。后续计划迁移到私有的api服务上,不再依赖腾讯云。😓。 2 | 3 | ### 『一起算账』小程序源码 4 | 5 | 使用小程序云开发+Vant组件库搭建的一个AA收账小程序 6 | 7 | ### 访问 8 | 9 |  10 | 11 | ### 欢迎微信扫码使用,觉得有帮助可以star支持下😄 12 | 13 | ## 另外⬇️ 14 | 15 | ### 欢迎使用专为个人记账的全新小程序:单单记账,源码戳:[https://github.com/GzhiYi/dandan-account](https://github.com/GzhiYi/dandan-account) 16 | -------------------------------------------------------------------------------- /miniprogram/pages/dist/switch-cell/index.wxml: -------------------------------------------------------------------------------- 1 | 7 | 15 | 16 | -------------------------------------------------------------------------------- /miniprogram/pages/help/help.js: -------------------------------------------------------------------------------- 1 | // pages/help/help.js 2 | Page({ 3 | data: { 4 | skin: getApp().globalData.skin, 5 | theme: 'white-skin' 6 | }, 7 | onLoad: function () {}, 8 | onShow() { 9 | getApp().setTheme(this) 10 | }, 11 | onShareAppMessage: function () { 12 | return { 13 | title: getApp().globalData.shareWord(), 14 | path: getApp().globalData.sharePath 15 | } 16 | } 17 | }) -------------------------------------------------------------------------------- /miniprogram/pages/help/help.wxss: -------------------------------------------------------------------------------- 1 | /* pages/help/help.wxss */ 2 | page { 3 | background: #fff !important; 4 | } 5 | .help-body { 6 | padding:22rpx; 7 | } 8 | .item { 9 | margin-bottom: 27rpx; 10 | } 11 | .title { 12 | font-size:29rpx; 13 | margin-bottom:10rpx; 14 | padding-left:20rpx; 15 | border-left:5rpx solid red; 16 | } 17 | .content { 18 | font-size:27rpx; 19 | color:#333; 20 | margin-top:-34rpx; 21 | } -------------------------------------------------------------------------------- /miniprogram/pages/dist/icon/index.js: -------------------------------------------------------------------------------- 1 | import { VantComponent } from '../common/component'; 2 | VantComponent({ 3 | props: { 4 | info: null, 5 | name: String, 6 | size: String, 7 | color: String, 8 | customStyle: String, 9 | classPrefix: { 10 | type: String, 11 | value: 'van-icon' 12 | } 13 | }, 14 | methods: { 15 | onClick: function onClick() { 16 | this.$emit('click'); 17 | } 18 | } 19 | }); -------------------------------------------------------------------------------- /miniprogram/pages/dist/progress/index.wxml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 11 | {{ text }} 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /miniprogram/pages/dist/slider/index.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /miniprogram/pages/dist/loading/index.wxml: -------------------------------------------------------------------------------- 1 | 5 | 9 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /miniprogram/pages/dist/overlay/index.js: -------------------------------------------------------------------------------- 1 | import { VantComponent } from '../common/component'; 2 | VantComponent({ 3 | props: { 4 | show: Boolean, 5 | mask: Boolean, 6 | customStyle: String, 7 | zIndex: { 8 | type: Number, 9 | value: 1 10 | } 11 | }, 12 | methods: { 13 | onClick: function onClick() { 14 | this.$emit('click'); 15 | }, 16 | // for prevent touchmove 17 | noop: function noop() {} 18 | } 19 | }); -------------------------------------------------------------------------------- /miniprogram/pages/dist/tag/index.wxss: -------------------------------------------------------------------------------- 1 | @import '../common/index.wxss';.van-tag{color:#fff;font-size:10px;padding:.2em .5em;line-height:normal;border-radius:.2em;display:inline-block}.van-tag::after{border-color:currentColor;border-radius:.4em}.van-tag--mark{padding-right:.6em;border-radius:0 .8em .8em 0}.van-tag--mark::after{border-radius:0 1.6em 1.6em 0}.van-tag--round{border-radius:.8em}.van-tag--round::after{border-radius:1.6em}.van-tag--medium{font-size:12px}.van-tag--large{font-size:14px} -------------------------------------------------------------------------------- /miniprogram/pages/dist/rate/index.wxml: -------------------------------------------------------------------------------- 1 | 5 | 16 | 17 | -------------------------------------------------------------------------------- /miniprogram/pages/dist/mixins/link.js: -------------------------------------------------------------------------------- 1 | export var link = Behavior({ 2 | properties: { 3 | url: String, 4 | linkType: { 5 | type: String, 6 | value: 'navigateTo' 7 | } 8 | }, 9 | methods: { 10 | jumpLink: function jumpLink(urlKey) { 11 | if (urlKey === void 0) { 12 | urlKey = 'url'; 13 | } 14 | 15 | var url = this.data[urlKey]; 16 | 17 | if (url) { 18 | wx[this.data.linkType]({ 19 | url: url 20 | }); 21 | } 22 | } 23 | } 24 | }); -------------------------------------------------------------------------------- /miniprogram/pages/dist/goods-action-icon/index.js: -------------------------------------------------------------------------------- 1 | import { VantComponent } from '../common/component'; 2 | import { link } from '../mixins/link'; 3 | import { button } from '../mixins/button'; 4 | import { openType } from '../mixins/open-type'; 5 | VantComponent({ 6 | mixins: [link, button, openType], 7 | props: { 8 | text: String, 9 | info: String, 10 | icon: String 11 | }, 12 | methods: { 13 | onClick: function onClick(event) { 14 | this.$emit('click', event.detail); 15 | this.jumpLink(); 16 | } 17 | } 18 | }); -------------------------------------------------------------------------------- /miniprogram/pages/dist/slider/index.wxss: -------------------------------------------------------------------------------- 1 | @import '../common/index.wxss';.van-slider{position:relative;border-radius:999px;background-color:#e5e5e5}.van-slider__bar{position:relative;border-radius:inherit;background-color:#1989fa}.van-slider__button{position:absolute;top:50%;right:0;width:20px;height:20px;border-radius:50%;background-color:#fff;-webkit-transform:translate3d(50%,-50%,0);transform:translate3d(50%,-50%,0);box-shadow:0 1px 2px rgba(0,0,0,.5)}.van-slider__button::after{content:'';position:absolute;width:200%;height:200%;top:-50%;left:-50%}.van-slider--disabled{opacity:.3} -------------------------------------------------------------------------------- /miniprogram/pages/dist/icon/index.wxml: -------------------------------------------------------------------------------- 1 | 6 | 10 | {{ info }} 11 | 12 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /miniprogram/pages/dist/progress/index.wxss: -------------------------------------------------------------------------------- 1 | @import '../common/index.wxss';.van-progress{height:4px;position:relative;border-radius:4px;background:#e5e5e5}.van-progress__portion{left:0;height:100%;position:absolute;border-radius:inherit}.van-progress__portion--with-pivot{border-top-right-radius:0;border-bottom-right-radius:0}.van-progress__pivot{top:50%;right:0;min-width:2em;padding:0 5px;font-size:10px;position:absolute;line-height:1.6;text-align:center;border-radius:1em;word-break:keep-all;box-sizing:border-box;background-color:#e5e5e5;-webkit-transform:translate(100%,-50%);transform:translate(100%,-50%)} -------------------------------------------------------------------------------- /miniprogram/pages/dist/checkbox/index.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /miniprogram/pages/dist/badge/index.js: -------------------------------------------------------------------------------- 1 | import { VantComponent } from '../common/component'; 2 | VantComponent({ 3 | relation: { 4 | type: 'ancestor', 5 | name: 'badge-group' 6 | }, 7 | props: { 8 | info: Number, 9 | title: String 10 | }, 11 | methods: { 12 | onClick: function onClick() { 13 | var group = this.getRelationNodes('../badge-group/index')[0]; 14 | 15 | if (group) { 16 | group.setActive(this); 17 | } 18 | }, 19 | setActive: function setActive(active) { 20 | this.set({ 21 | active: active 22 | }); 23 | } 24 | } 25 | }); -------------------------------------------------------------------------------- /miniprogram/pages/dist/panel/index.wxml: -------------------------------------------------------------------------------- 1 | 2 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /miniprogram/components/avatar/avatar.js: -------------------------------------------------------------------------------- 1 | // components/avatar/avatar.js 2 | Component({ 3 | /** 4 | * 组件的属性列表 5 | */ 6 | properties: { 7 | userInfo: Object, 8 | size: { 9 | type: String, 10 | value: '80' 11 | }, 12 | className: { 13 | type: String, 14 | value: 'rounded-full' 15 | }, 16 | showLabel: { 17 | type: Boolean, 18 | value: true 19 | } 20 | }, 21 | 22 | /** 23 | * 组件的初始数据 24 | */ 25 | data: { 26 | 27 | }, 28 | 29 | /** 30 | * 组件的方法列表 31 | */ 32 | methods: { 33 | 34 | } 35 | }) 36 | -------------------------------------------------------------------------------- /miniprogram/pages/dist/goods-action/index.js: -------------------------------------------------------------------------------- 1 | import { VantComponent } from '../common/component'; 2 | VantComponent({ 3 | props: { 4 | safeAreaInsetBottom: { 5 | type: Boolean, 6 | value: true 7 | } 8 | }, 9 | computed: { 10 | rootClass: function rootClass() { 11 | var _this$data = this.data, 12 | safeAreaInsetBottom = _this$data.safeAreaInsetBottom, 13 | isIPhoneX = _this$data.isIPhoneX; 14 | return this.classNames('van-goods-action', 'custom-class', { 15 | ["van-goods-action--safe"]: isIPhoneX && safeAreaInsetBottom 16 | }); 17 | } 18 | } 19 | }); -------------------------------------------------------------------------------- /miniprogram/pages/dist/popup/index.wxml: -------------------------------------------------------------------------------- 1 | 9 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /cloudfunctions/deleteGroup/index.js: -------------------------------------------------------------------------------- 1 | // 云函数入口文件 2 | const cloud = require('wx-server-sdk') 3 | 4 | cloud.init() 5 | const db = cloud.database() 6 | // 云函数入口函数 7 | exports.main = async (event, context) => { 8 | const wxContext = cloud.getWXContext() 9 | cloud.updateConfig({ 10 | env: wxContext.ENV === 'local' ? 'account-release-73522d' : wxContext.ENV, 11 | }) 12 | // 初始化数据库 13 | const db = cloud.database({ 14 | env: wxContext.ENV === 'local' ? 'account-release-73522d' : wxContext.ENV, 15 | }) 16 | await db.collection('group').doc(event.groupId).update({ 17 | data: { 18 | deleted: true 19 | } 20 | }) 21 | } -------------------------------------------------------------------------------- /miniprogram/pages/dist/goods-action-button/index.js: -------------------------------------------------------------------------------- 1 | import { VantComponent } from '../common/component'; 2 | import { link } from '../mixins/link'; 3 | import { button } from '../mixins/button'; 4 | import { openType } from '../mixins/open-type'; 5 | VantComponent({ 6 | mixins: [link, button, openType], 7 | props: { 8 | text: String, 9 | loading: Boolean, 10 | disabled: Boolean, 11 | type: { 12 | type: String, 13 | value: 'danger' 14 | } 15 | }, 16 | methods: { 17 | onClick: function onClick(event) { 18 | this.$emit('click', event.detail); 19 | this.jumpLink(); 20 | } 21 | } 22 | }); -------------------------------------------------------------------------------- /miniprogram/pages/dist/collapse-item/index.wxss: -------------------------------------------------------------------------------- 1 | @import '../common/index.wxss';.van-collapse-item__title .van-cell__right-icon{-webkit-transform:rotate(90deg);transform:rotate(90deg);transition:.3s}.van-collapse-item__title--expanded .van-cell__right-icon{-webkit-transform:rotate(-90deg);transform:rotate(-90deg)}.van-collapse-item__title--disabled .van-cell,.van-collapse-item__title--disabled .van-cell__right-icon{color:#c9c9c9!important}.van-collapse-item__title--disabled:active{background-color:#fff!important}.van-collapse-item__wrapper{overflow:hidden;will-change:max-height;transition:max-height .3s ease-in-out}.van-collapse-item__content{padding:15px;background-color:#fff} -------------------------------------------------------------------------------- /cloudfunctions/deleteBill/index.js: -------------------------------------------------------------------------------- 1 | // 云函数入口文件 2 | const cloud = require('wx-server-sdk') 3 | 4 | cloud.init() 5 | const db = cloud.database() 6 | // 云函数入口函数 7 | exports.main = async (event, context) => { 8 | const wxContext = cloud.getWXContext() 9 | cloud.updateConfig({ 10 | env: wxContext.ENV === 'local' ? 'account-release-73522d' : wxContext.ENV, 11 | }) 12 | // 初始化数据库 13 | const db = cloud.database({ 14 | env: wxContext.ENV === 'local' ? 'account-release-73522d' : wxContext.ENV, 15 | }) 16 | await db.collection('bill').doc(event.billId).update({ 17 | data: { 18 | deleted: true 19 | }, 20 | success() { 21 | } 22 | }) 23 | } -------------------------------------------------------------------------------- /miniprogram/pages/dist/nav-bar/index.js: -------------------------------------------------------------------------------- 1 | import { VantComponent } from '../common/component'; 2 | VantComponent({ 3 | classes: ['title-class'], 4 | props: { 5 | title: String, 6 | fixed: Boolean, 7 | leftText: String, 8 | rightText: String, 9 | leftArrow: Boolean, 10 | border: { 11 | type: Boolean, 12 | value: true 13 | }, 14 | zIndex: { 15 | type: Number, 16 | value: 1 17 | } 18 | }, 19 | methods: { 20 | onClickLeft: function onClickLeft() { 21 | this.$emit('click-left'); 22 | }, 23 | onClickRight: function onClickRight() { 24 | this.$emit('click-right'); 25 | } 26 | } 27 | }); -------------------------------------------------------------------------------- /miniprogram/pages/dist/tab/index.js: -------------------------------------------------------------------------------- 1 | import { VantComponent } from '../common/component'; 2 | VantComponent({ 3 | relation: { 4 | name: 'tabs', 5 | type: 'ancestor' 6 | }, 7 | props: { 8 | title: String, 9 | disabled: Boolean 10 | }, 11 | data: { 12 | inited: false, 13 | active: false, 14 | animated: false, 15 | width: null 16 | }, 17 | watch: { 18 | title: 'update', 19 | disabled: 'update' 20 | }, 21 | methods: { 22 | update: function update() { 23 | var parent = this.getRelationNodes('../tabs/index')[0]; 24 | 25 | if (parent) { 26 | parent.updateTabs(); 27 | } 28 | } 29 | } 30 | }); -------------------------------------------------------------------------------- /miniprogram/pages/dist/search/index.wxss: -------------------------------------------------------------------------------- 1 | @import '../common/index.wxss';.van-search{display:-webkit-flex;display:flex;padding:7px 15px;-webkit-align-items:center;align-items:center;box-sizing:border-box}.van-search__field{overflow:hidden;border-radius:4px;-webkit-flex:1;flex:1}.van-search__field__left-icon{color:#999}.van-search--show-action{padding-right:0}.van-search input::-webkit-search-cancel-button,.van-search input::-webkit-search-decoration,.van-search input::-webkit-search-results-button,.van-search input::-webkit-search-results-decoration{display:none}.van-search__action{padding:0 10px;font-size:14px;line-height:30px;color:#7d7e80}.van-search__action:active{background-color:#e8e8e8} -------------------------------------------------------------------------------- /miniprogram/pages/dist/notice-bar/index.wxss: -------------------------------------------------------------------------------- 1 | @import '../common/index.wxss';.van-notice-bar{display:-webkit-flex;display:flex;height:40px;padding:0 15px;font-size:14px;line-height:24px;-webkit-align-items:center;align-items:center}.van-notice-bar--within-icon{position:relative;padding-right:40px}.van-notice-bar__left-icon{height:18px;min-width:20px;box-sizing:border-box}.van-notice-bar__left-icon>image{width:16px;height:16px}.van-notice-bar__right-icon{position:absolute;top:10px;right:15px;font-size:16px}.van-notice-bar__content-wrap{-webkit-flex:1;flex:1;height:24px;overflow:hidden;position:relative}.van-notice-bar__content{position:absolute;white-space:nowrap}.van-notice-bar__content.van-ellipsis{max-width:100%} -------------------------------------------------------------------------------- /miniprogram/pages/dist/radio/index.wxss: -------------------------------------------------------------------------------- 1 | @import '../common/index.wxss';.van-radio{overflow:hidden;line-height:1;-webkit-user-select:none;user-select:none}.van-radio__input,.van-radio__label{display:inline-block;vertical-align:middle}.van-radio__input{position:relative;font-size:20px}.van-radio__control{z-index:1;position:absolute;top:0;left:0;width:100%;height:100%;margin:0;opacity:0}.van-radio__label{margin-left:10px;color:#333;font-size:16px;line-height:20px}.van-radio__label--left{margin:0 10px 0 0;float:left}.van-radio__label:empty{margin:0}.van-radio__icon{pointer-events:none;display:block;line-height:0}.van-radio__icon--disabled{color:#e5e5e5}.van-radio__icon--checked{color:#1989fa}.van-radio__icon--check{color:#999} -------------------------------------------------------------------------------- /miniprogram/pages/dist/submit-bar/index.wxss: -------------------------------------------------------------------------------- 1 | @import '../common/index.wxss';.van-submit-bar{z-index:100;position:fixed;bottom:0;left:0;width:100%;-webkit-user-select:none;user-select:none}.van-submit-bar__tip{padding:10px;color:#f56723;font-size:12px;line-height:18px;background-color:#fff7cc}.van-submit-bar__bar{display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;height:50px;background-color:#fff;font-size:14px}.van-submit-bar__bar--safe{padding-bottom:34px}.van-submit-bar__text{-webkit-flex:1;flex:1;color:#333;font-weight:500;text-align:right}.van-submit-bar__price{color:#f44;font-size:18px;padding-right:12px}.van-submit-bar__currency{font-size:14px}.van-submit-bar__button button{width:110px} -------------------------------------------------------------------------------- /miniprogram/pages/dist/swipe-cell/index.wxml: -------------------------------------------------------------------------------- 1 | 10 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /miniprogram/pages/dist/stepper/index.wxml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 14 | 18 | 19 | -------------------------------------------------------------------------------- /miniprogram/pages/dist/switch/index.wxss: -------------------------------------------------------------------------------- 1 | @import '../common/index.wxss';.van-switch{height:1em;width:1.8em;display:inline-block;position:relative;border-radius:1em;box-sizing:content-box;border:1px solid rgba(0,0,0,.1);background-color:#fff;transition:background-color .3s}.van-switch__node{top:0;left:0;z-index:1;width:1em;height:1em;transition:.3s;position:absolute;border-radius:100%;background-color:#fff;box-shadow:0 3px 1px 0 rgba(0,0,0,.05),0 2px 2px 0 rgba(0,0,0,.1),0 3px 3px 0 rgba(0,0,0,.05)}.van-switch__loading{top:25%;left:25%;position:absolute!important}.van-switch--on{background-color:#1989fa}.van-switch--on .van-switch__node{-webkit-transform:translateX(.8em);transform:translateX(.8em)}.van-switch--disabled{opacity:.4} -------------------------------------------------------------------------------- /cloudfunctions/getOneBill/index.js: -------------------------------------------------------------------------------- 1 | // 云函数入口文件 2 | const cloud = require('wx-server-sdk') 3 | 4 | cloud.init() 5 | const db = cloud.database() 6 | // 云函数入口函数 7 | exports.main = async (event, context) => { 8 | const wxContext = cloud.getWXContext() 9 | cloud.updateConfig({ 10 | env: wxContext.ENV === 'local' ? 'account-release-73522d' : wxContext.ENV, 11 | }) 12 | // 初始化数据库 13 | const db = cloud.database({ 14 | env: wxContext.ENV === 'local' ? 'account-release-73522d' : wxContext.ENV, 15 | }) 16 | const openId = cloud.getWXContext().OPENID 17 | 18 | let oneBill = await db.collection('bill') 19 | .where({ 20 | _id: event.billId 21 | }) 22 | .get() 23 | return oneBill.data[0] 24 | } -------------------------------------------------------------------------------- /miniprogram/pages/dist/tabbar-item/index.wxml: -------------------------------------------------------------------------------- 1 | 5 | 6 | 12 | 13 | 14 | 15 | {{ info }} 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /miniprogram/pages/updateLog/updateLog.js: -------------------------------------------------------------------------------- 1 | // pages/updateLog/updateLog.js 2 | Page({ 3 | data: { 4 | logs: [] 5 | }, 6 | onLoad: function () {}, 7 | onShow: function () { 8 | const self = this 9 | wx.cloud.callFunction({ 10 | name: 'createFeedback', 11 | data: { 12 | extend: 'getUpdateLog' 13 | }, 14 | success(res) { 15 | console.log(res) 16 | self.setData({ 17 | logs: res.result 18 | }) 19 | } 20 | }) 21 | }, 22 | onShareAppMessage: function () { 23 | return { 24 | title: getApp().globalData.shareWord(), 25 | path: getApp().globalData.sharePath, 26 | imageUrl: getApp().globalData.imageUrl 27 | } 28 | } 29 | }) -------------------------------------------------------------------------------- /miniprogram/pages/dist/mixins/observer/props.js: -------------------------------------------------------------------------------- 1 | export function observeProps(props) { 2 | if (!props) { 3 | return; 4 | } 5 | 6 | Object.keys(props).forEach(function (key) { 7 | var prop = props[key]; 8 | 9 | if (prop === null || !('type' in prop)) { 10 | prop = { 11 | type: prop 12 | }; 13 | } 14 | 15 | var _prop = prop, 16 | observer = _prop.observer; 17 | 18 | prop.observer = function () { 19 | if (observer) { 20 | if (typeof observer === 'string') { 21 | observer = this[observer]; 22 | } 23 | 24 | observer.apply(this, arguments); 25 | } 26 | 27 | this.set(); 28 | }; 29 | 30 | props[key] = prop; 31 | }); 32 | } -------------------------------------------------------------------------------- /miniprogram/pages/dist/mixins/open-type.js: -------------------------------------------------------------------------------- 1 | export var openType = Behavior({ 2 | properties: { 3 | openType: String 4 | }, 5 | methods: { 6 | bindGetUserInfo: function bindGetUserInfo(event) { 7 | this.$emit('getuserinfo', event.detail); 8 | }, 9 | bindContact: function bindContact(event) { 10 | this.$emit('contact', event.detail); 11 | }, 12 | bindGetPhoneNumber: function bindGetPhoneNumber(event) { 13 | this.$emit('getphonenumber', event.detail); 14 | }, 15 | bindOpenSetting: function bindOpenSetting(event) { 16 | this.$emit('opensetting', event.detail); 17 | }, 18 | bindError: function bindError(event) { 19 | this.$emit('error', event.detail); 20 | } 21 | } 22 | }); -------------------------------------------------------------------------------- /miniprogram/components/avatar/avatar.wxss: -------------------------------------------------------------------------------- 1 | .relative { 2 | position: relative; 3 | } 4 | .absolute { 5 | position: absolute; 6 | } 7 | .avatar-label { 8 | font-size: 18rpx; 9 | bottom: 0rpx; 10 | left: 0; 11 | right: 0; 12 | background-color: #ffffff8f; 13 | margin: 0 2rpx; 14 | text-align: center; 15 | border: 1rpx solid #bfbfbf; 16 | border-radius: 8rpx; 17 | background-color: rgb(199, 199, 255, 0.56); 18 | border: 1rpx solid rgb(199, 199, 255, 0.56); 19 | overflow: hidden; 20 | text-overflow: ellipsis; 21 | white-space: nowrap; 22 | line-height: 30rpx; 23 | } 24 | .user-avatar-list { 25 | border: 1rpx solid #ebeef5; 26 | } 27 | .rounded-full { 28 | border-radius: 9999rpx; 29 | } 30 | rounded-8 { 31 | border-radius: 8rpx; 32 | } -------------------------------------------------------------------------------- /miniprogram/pages/dist/switch-cell/index.js: -------------------------------------------------------------------------------- 1 | import { VantComponent } from '../common/component'; 2 | VantComponent({ 3 | field: true, 4 | props: { 5 | title: String, 6 | border: Boolean, 7 | checked: Boolean, 8 | loading: Boolean, 9 | disabled: Boolean, 10 | size: { 11 | type: String, 12 | value: '26px' 13 | } 14 | }, 15 | watch: { 16 | checked: function checked(value) { 17 | this.set({ 18 | value: value 19 | }); 20 | } 21 | }, 22 | created: function created() { 23 | this.set({ 24 | value: this.data.checked 25 | }); 26 | }, 27 | methods: { 28 | onChange: function onChange(event) { 29 | this.$emit('change', event.detail); 30 | } 31 | } 32 | }); -------------------------------------------------------------------------------- /miniprogram/pages/dist/radio/index.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 10 | 11 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /miniprogram/pages/dist/nav-bar/index.wxss: -------------------------------------------------------------------------------- 1 | @import '../common/index.wxss';.van-nav-bar{height:46px;position:relative;-webkit-user-select:none;user-select:none;text-align:center;line-height:46px;background-color:#fff}.van-nav-bar__arrow{color:#1989fa;vertical-align:middle}.van-nav-bar__arrow+.van-nav-bar__text{margin-left:-20px;padding-left:25px}.van-nav-bar--fixed{top:0;left:0;width:100%;position:fixed}.van-nav-bar__title{margin:0 auto;max-width:60%;font-size:16px;font-weight:500}.van-nav-bar__left,.van-nav-bar__right{bottom:0;font-size:14px;position:absolute}.van-nav-bar__left{left:15px}.van-nav-bar__right{right:15px}.van-nav-bar__text{color:#1989fa;margin:0 -15px;padding:0 15px;display:inline-block;vertical-align:middle}.van-nav-bar__text:active{background-color:#e8e8e8} -------------------------------------------------------------------------------- /miniprogram/pages/dist/toast/index.js: -------------------------------------------------------------------------------- 1 | import { VantComponent } from '../common/component'; 2 | VantComponent({ 3 | props: { 4 | show: Boolean, 5 | mask: Boolean, 6 | message: String, 7 | forbidClick: Boolean, 8 | zIndex: { 9 | type: Number, 10 | value: 1000 11 | }, 12 | type: { 13 | type: String, 14 | value: 'text' 15 | }, 16 | loadingType: { 17 | type: String, 18 | value: 'circular' 19 | }, 20 | position: { 21 | type: String, 22 | value: 'middle' 23 | } 24 | }, 25 | methods: { 26 | clear: function clear() { 27 | this.set({ 28 | show: false 29 | }); 30 | }, 31 | // for prevent touchmove 32 | noop: function noop() {} 33 | } 34 | }); -------------------------------------------------------------------------------- /miniprogram/pages/dist/tabbar-item/index.js: -------------------------------------------------------------------------------- 1 | import { VantComponent } from '../common/component'; 2 | VantComponent({ 3 | props: { 4 | info: null, 5 | icon: String, 6 | dot: Boolean 7 | }, 8 | relation: { 9 | name: 'tabbar', 10 | type: 'ancestor' 11 | }, 12 | data: { 13 | active: false 14 | }, 15 | methods: { 16 | onClick: function onClick() { 17 | var parent = this.getRelationNodes('../tabbar/index')[0]; 18 | 19 | if (parent) { 20 | parent.onChange(this); 21 | } 22 | 23 | this.$emit('click'); 24 | }, 25 | setActive: function setActive(active) { 26 | if (this.data.active !== active) { 27 | this.set({ 28 | active: active 29 | }); 30 | } 31 | } 32 | } 33 | }); -------------------------------------------------------------------------------- /miniprogram/pages/login/login.wxss: -------------------------------------------------------------------------------- 1 | .login { 2 | padding:4rpx; 3 | width:90%; 4 | margin:50% auto; 5 | border-radius:20rpx; 6 | } 7 | .login-body { 8 | width: 100%; 9 | height: 100vh; 10 | padding: 40rpx 0; 11 | overflow-x: hidden; 12 | overflow-y: auto; 13 | } 14 | .mp-info { 15 | display:flex; 16 | flex-direction:column; 17 | text-align:center; 18 | justify-content: center; 19 | align-items: center; 20 | } 21 | .mp-info .icon { 22 | height: 100rpx; 23 | width: 100rpx; 24 | border-radius: 50%; 25 | margin: 20rpx; 26 | } 27 | .mp-info .mp-name { 28 | font-size: 36rpx; 29 | } 30 | .login-tips .header { 31 | font-size:30rpx; 32 | margin:50rpx 0 20rpx; 33 | } 34 | .tips-item { 35 | font-size:27rpx; 36 | color:grey; 37 | } 38 | .login-btn { 39 | margin: 70rpx 0 40rpx; 40 | } -------------------------------------------------------------------------------- /miniprogram/pages/share/share.wxss: -------------------------------------------------------------------------------- 1 | .login { 2 | padding: 4rpx; 3 | width: 90%; 4 | margin: 50% auto; 5 | border-radius: 20rpx; 6 | } 7 | .login-body { 8 | width: 100%; 9 | height: 100vh; 10 | padding: 40rpx 0; 11 | overflow-x: hidden; 12 | overflow-y: auto; 13 | } 14 | .mp-info { 15 | display:flex; 16 | flex-direction:column; 17 | text-align:center; 18 | justify-content: center; 19 | align-items: center; 20 | } 21 | .mp-info .icon { 22 | height: 100rpx; 23 | width: 100rpx; 24 | border-radius: 50%; 25 | margin: 20rpx; 26 | } 27 | .mp-info .mp-name { 28 | font-size: 36rpx; 29 | } 30 | .login-tips .header { 31 | font-size:30rpx; 32 | margin:50rpx 0 20rpx; 33 | } 34 | .tips-item { 35 | font-size:27rpx; 36 | color:grey; 37 | } 38 | .login-btn { 39 | margin: 70rpx 0; 40 | } -------------------------------------------------------------------------------- /miniprogram/pages/dist/common/class-names.js: -------------------------------------------------------------------------------- 1 | var hasOwn = {}.hasOwnProperty; 2 | export function classNames() { 3 | var classes = []; 4 | 5 | for (var i = 0; i < arguments.length; i++) { 6 | var arg = arguments[i]; 7 | if (!arg) continue; 8 | var argType = typeof arg; 9 | 10 | if (argType === 'string' || argType === 'number') { 11 | classes.push(arg); 12 | } else if (Array.isArray(arg) && arg.length) { 13 | var inner = classNames.apply(null, arg); 14 | 15 | if (inner) { 16 | classes.push(inner); 17 | } 18 | } else if (argType === 'object') { 19 | for (var key in arg) { 20 | if (hasOwn.call(arg, key) && arg[key]) { 21 | classes.push(key); 22 | } 23 | } 24 | } 25 | } 26 | 27 | return classes.join(' '); 28 | } 29 | ; -------------------------------------------------------------------------------- /miniprogram/pages/dist/mixins/touch.js: -------------------------------------------------------------------------------- 1 | export var touch = Behavior({ 2 | methods: { 3 | touchStart: function touchStart(event) { 4 | this.direction = ''; 5 | this.deltaX = 0; 6 | this.deltaY = 0; 7 | this.offsetX = 0; 8 | this.offsetY = 0; 9 | this.startX = event.touches[0].clientX; 10 | this.startY = event.touches[0].clientY; 11 | }, 12 | touchMove: function touchMove(event) { 13 | var touch = event.touches[0]; 14 | this.deltaX = touch.clientX - this.startX; 15 | this.deltaY = touch.clientY - this.startY; 16 | this.offsetX = Math.abs(this.deltaX); 17 | this.offsetY = Math.abs(this.deltaY); 18 | this.direction = this.offsetX > this.offsetY ? 'horizontal' : this.offsetX < this.offsetY ? 'vertical' : ''; 19 | } 20 | } 21 | }); -------------------------------------------------------------------------------- /miniprogram/pages/dist/goods-action-button/index.wxml: -------------------------------------------------------------------------------- 1 | 24 | {{ text }} 25 | 26 | -------------------------------------------------------------------------------- /miniprogram/pages/dist/badge/index.wxss: -------------------------------------------------------------------------------- 1 | @import '../common/index.wxss';.van-badge{display:block;overflow:hidden;font-size:14px;line-height:1.4;-webkit-user-select:none;user-select:none;color:#7d7e80;word-break:break-all;box-sizing:border-box;padding:20px 12px 20px 9px;background-color:#f8f8f8;border-left:3px solid transparent}.van-badge:active{background-color:#e8e8e8}.van-badge::after{border-bottom-width:1px}.van-badge--active{font-weight:700;color:#333;border-color:#f44}.van-badge--active::after{border-right-width:1px}.van-badge--active,.van-badge--active:active{background-color:#fff}.van-badge__info{position:absolute;top:4px;right:2px;color:#fff;font-size:12px;font-weight:500;-webkit-transform:scale(.8);transform:scale(.8);text-align:center;box-sizing:border-box;padding:0 6px;min-width:18px;line-height:18px;border-radius:9px;background-color:#f44} -------------------------------------------------------------------------------- /miniprogram/pages/dist/card/index.js: -------------------------------------------------------------------------------- 1 | import { link } from '../mixins/link'; 2 | import { VantComponent } from '../common/component'; 3 | VantComponent({ 4 | classes: ['num-class', 'desc-class', 'thumb-class', 'title-class', 'price-class', 'origin-price-class'], 5 | mixins: [link], 6 | props: { 7 | tag: String, 8 | num: String, 9 | desc: String, 10 | thumb: String, 11 | title: String, 12 | price: String, 13 | centered: Boolean, 14 | lazyLoad: Boolean, 15 | thumbLink: String, 16 | originPrice: String, 17 | thumbMode: { 18 | type: String, 19 | value: 'scaleToFill' 20 | }, 21 | currency: { 22 | type: String, 23 | value: '¥' 24 | } 25 | }, 26 | methods: { 27 | onClickThumb: function onClickThumb() { 28 | this.jumpLink('thumbLink'); 29 | } 30 | } 31 | }); -------------------------------------------------------------------------------- /miniprogram/pages/dist/checkbox/index.wxss: -------------------------------------------------------------------------------- 1 | @import '../common/index.wxss';.van-checkbox{overflow:hidden;-webkit-user-select:none;user-select:none}.van-checkbox__icon-wrap,.van-checkbox__label{display:inline-block;line-height:20px;vertical-align:middle}.van-checkbox__icon{box-sizing:border-box;display:block;width:20px;height:20px;border:1px solid #e5e5e5;color:transparent;font-size:14px;text-align:center;transition:.2s}.van-checkbox__icon--round{border-radius:100%}.van-checkbox__icon--checked{color:#fff;border-color:#1989fa;background-color:#1989fa}.van-checkbox__icon--disabled{border-color:#eee;background-color:currentColor;color:#f8f8f8}.van-checkbox__icon--disabled.van-checkbox__icon--checked{border-color:#eee;background-color:#eee}.van-checkbox__label{margin-left:10px}.van-checkbox__label--left{margin:0 10px 0 0;float:left}.van-checkbox__label:empty{margin:0} -------------------------------------------------------------------------------- /cloudfunctions/getResult/index.js: -------------------------------------------------------------------------------- 1 | // 云函数入口文件 2 | const cloud = require('wx-server-sdk') 3 | 4 | cloud.init() 5 | const db = cloud.database() 6 | // 云函数入口函数 7 | exports.main = async (event, context) => { 8 | const wxContext = cloud.getWXContext() 9 | cloud.updateConfig({ 10 | env: wxContext.ENV === 'local' ? 'account-release-73522d' : wxContext.ENV, 11 | }) 12 | // 初始化数据库 13 | const db = cloud.database({ 14 | env: wxContext.ENV === 'local' ? 'account-release-73522d' : wxContext.ENV, 15 | }) 16 | let billInfo = await db.collection('bill').where({ 17 | _id: event.billId 18 | }) 19 | .get() 20 | const groupInfo = await db.collection('group').where({ 21 | _id: billInfo.data[0].groupId 22 | }) 23 | .get() 24 | billInfo.data[0].groupId = groupInfo.data[0] 25 | return { 26 | billInfo: billInfo.data[0] 27 | } 28 | } -------------------------------------------------------------------------------- /miniprogram/pages/dist/button/index.wxml: -------------------------------------------------------------------------------- 1 | 19 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /miniprogram/pages/dist/action-sheet/index.wxss: -------------------------------------------------------------------------------- 1 | @import '../common/index.wxss';.van-action-sheet{max-height:90%!important;color:#333}.van-action-sheet__cancel,.van-action-sheet__item{height:50px;font-size:16px;line-height:50px;text-align:center;background-color:#fff}.van-action-sheet__cancel:active,.van-action-sheet__item:active{background-color:#e8e8e8}.van-action-sheet__cancel{height:60px}.van-action-sheet__cancel::before{display:block;content:' ';height:10px;background-color:#f8f8f8}.van-action-sheet__item--disabled{color:#c9c9c9}.van-action-sheet__item--disabled:active{background-color:#fff}.van-action-sheet__subname{margin-left:5px;font-size:12px;color:#7d7e80}.van-action-sheet__header{font-size:16px;font-weight:500;line-height:44px;text-align:center}.van-action-sheet__close{position:absolute!important;top:0;right:0;padding:0 15px;font-size:18px!important;line-height:inherit!important;color:#999} -------------------------------------------------------------------------------- /miniprogram/pages/dist/tree-select/index.wxss: -------------------------------------------------------------------------------- 1 | @import '../common/index.wxss';.van-tree-select{-webkit-user-select:none;user-select:none;position:relative;font-size:16px}.van-tree-select__nav{width:35%;position:absolute;left:0;top:0;bottom:0;background-color:#fff}.van-tree-select__nitem{line-height:44px;padding:0 15px;background-color:#fff}.van-tree-select__nitem--active,.van-tree-select__nitem:active{background-color:#f8f8f8}.van-tree-select__nitem--active{font-weight:500}.van-tree-select__content{width:65%;padding:0 15px;margin-left:35%;box-sizing:border-box}.van-tree-select__item{position:relative;line-height:44px;padding-left:5px;padding-right:18px}.van-tree-select__item--active,.van-tree-select__item:active{color:#f44}.van-tree-select__item--disabled,.van-tree-select__item--disabled:active{color:#c9c9c9}.van-tree-select__selected{float:right;position:absolute;right:0;top:0;bottom:0;line-height:inherit} -------------------------------------------------------------------------------- /miniprogram/pages/dist/notify/notify.js: -------------------------------------------------------------------------------- 1 | import { isObj } from '../common/utils'; 2 | var defaultOptions = { 3 | selector: '#van-notify', 4 | duration: 3000 5 | }; 6 | 7 | function parseOptions(text) { 8 | return isObj(text) ? text : { 9 | text: text 10 | }; 11 | } 12 | 13 | function getContext() { 14 | var pages = getCurrentPages(); 15 | return pages[pages.length - 1]; 16 | } 17 | 18 | export default function Notify(options) { 19 | if (options === void 0) { 20 | options = {}; 21 | } 22 | 23 | options = Object.assign({}, defaultOptions, parseOptions(options)); 24 | var context = options.context || getContext(); 25 | var notify = context.selectComponent(options.selector); 26 | delete options.selector; 27 | 28 | if (notify) { 29 | notify.set(options); 30 | notify.show(); 31 | } else { 32 | console.warn('未找到 van-notify 节点,请确认 selector 及 context 是否正确'); 33 | } 34 | } -------------------------------------------------------------------------------- /miniprogram/pages/login/login.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 一起算账 7 | 8 | 9 | 一起算账小程序需要授权以下信息 10 | 11 | · 12 | 获取你的公开信息(昵称、头像等)\n 13 | 14 | 15 | 16 | 授权 17 | 18 | 19 | 先逛逛(没啥好逛的) 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /miniprogram/pages/dist/common/style/hairline.wxss: -------------------------------------------------------------------------------- 1 | .van-hairline,.van-hairline--bottom,.van-hairline--left,.van-hairline--right,.van-hairline--surround,.van-hairline--top,.van-hairline--top-bottom{position:relative}.van-hairline--bottom::after,.van-hairline--left::after,.van-hairline--right::after,.van-hairline--surround::after,.van-hairline--top-bottom::after,.van-hairline--top::after,.van-hairline::after{content:' ';position:absolute;pointer-events:none;box-sizing:border-box;-webkit-transform-origin:center;transform-origin:center;top:-50%;left:-50%;right:-50%;bottom:-50%;-webkit-transform:scale(.5);transform:scale(.5);border:0 solid #eee}.van-hairline--top::after{border-top-width:1px}.van-hairline--left::after{border-left-width:1px}.van-hairline--right::after{border-right-width:1px}.van-hairline--bottom::after{border-bottom-width:1px}.van-hairline--top-bottom::after{border-width:1px 0}.van-hairline--surround::after{border-width:1px} -------------------------------------------------------------------------------- /miniprogram/pages/group/group.wxss: -------------------------------------------------------------------------------- 1 | /* pages/group/group.wxss */ 2 | .group-body { 3 | width: 100%; 4 | height: 100vh; 5 | padding: 40rpx 0; 6 | overflow-x: hidden; 7 | overflow-y: auto; 8 | } 9 | .creater { 10 | width:50rpx; 11 | height:50rpx; 12 | border-radius:50%; 13 | margin-right:13rpx; 14 | } 15 | .org_box { 16 | background:rgba(51, 51, 51, 0.973); 17 | color: #fff; 18 | position:relative; 19 | padding:15rpx 25rpx; 20 | font-size:26rpx; 21 | border-radius:13rpx; 22 | } 23 | 24 | .org_bot_cor { 25 | width:0; 26 | height:0; 27 | font-size:0; 28 | border-width:11px; 29 | border-style:solid; 30 | border-color:transparent transparent rgba(51, 51, 51, 0.973); 31 | _border-color:rgba(51, 51, 51, 0.973) white white; 32 | overflow:hidden; 33 | position:absolute; 34 | bottom:59rpx; 35 | right:35rpx; 36 | } 37 | .org-outer { 38 | position:absolute; 39 | } -------------------------------------------------------------------------------- /miniprogram/pages/dist/dialog/index.wxss: -------------------------------------------------------------------------------- 1 | @import '../common/index.wxss';.van-dialog{width:85%;font-size:16px;overflow:hidden;border-radius:4px;background-color:#fff}.van-dialog__header{font-weight:500;padding-top:25px;text-align:center}.van-dialog__header--isolated{padding:25px 0}.van-dialog__message{padding:25px;font-size:14px;line-height:1.5;max-height:60vh;overflow-y:auto;-webkit-overflow-scrolling:touch}.van-dialog__message--has-title{padding-top:12px;color:#7d7e80}.van-dialog__footer{display:-webkit-flex;display:flex}.van-dialog__button{-webkit-flex:1;flex:1}.van-dialog__cancel,.van-dialog__confirm{border:0!important}.van-dialog__confirm,.van-dialog__confirm:active{color:#1989fa!important}.van-dialog-bounce-enter{opacity:0;-webkit-transform:translate3d(-50%,-50%,0) scale(.7);transform:translate3d(-50%,-50%,0) scale(.7)}.van-dialog-bounce-leave-active{opacity:0;-webkit-transform:translate3d(-50%,-50%,0) scale(.9);transform:translate3d(-50%,-50%,0) scale(.9)} -------------------------------------------------------------------------------- /miniprogram/pages/dist/toast/index.wxss: -------------------------------------------------------------------------------- 1 | @import '../common/index.wxss';.van-toast{display:-webkit-flex;display:flex;color:#fff;font-size:14px;line-height:20px;border-radius:4px;word-break:break-all;-webkit-align-items:center;align-items:center;-webkit-flex-direction:column;flex-direction:column;-webkit-justify-content:center;justify-content:center;box-sizing:content-box;background-color:rgba(0,0,0,.7)}.van-toast__container{position:fixed;top:50%;left:50%;max-width:70%;width:-webkit-fit-content;width:fit-content;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}.van-toast--text{padding:8px 12px;min-width:96px}.van-toast--icon{width:90px;padding:15px;min-height:90px}.van-toast--icon .van-toast__icon{font-size:50px}.van-toast--icon .van-toast__text{padding-top:5px}.van-toast__loading{margin:10px 0}.van-toast--top{-webkit-transform:translate(0,-30vh);transform:translate(0,-30vh)}.van-toast--bottom{-webkit-transform:translate(0,30vh);transform:translate(0,30vh)} -------------------------------------------------------------------------------- /miniprogram/pages/nav/nav.wxss: -------------------------------------------------------------------------------- 1 | .content { 2 | position: relative; 3 | /* width: 100%; */ 4 | height: 88rpx; 5 | display:flex; 6 | align-items:center; 7 | padding:0 0 0 18rpx; 8 | } 9 | /* 新增图标 */ 10 | .nav-icon-view { 11 | border-radius:50%; 12 | width:70rpx; 13 | height:70rpx; 14 | display:flex; 15 | justify-content:center; 16 | align-items:center; 17 | margin-right: 22rpx; 18 | } 19 | .nav-icon-view-back { 20 | width:70rpx; 21 | height:70rpx; 22 | display:flex; 23 | justify-content:center; 24 | align-items:center; 25 | margin-right: 22rpx; 26 | } 27 | .has-font { 28 | width:74px; 29 | border-radius:50rpx; 30 | font-size:33rpx; 31 | padding:0 10rpx; 32 | } 33 | .nav-icon { 34 | width: 42rpx; 35 | height: 42rpx; 36 | } 37 | .loading-icon { 38 | animation: headRotate 2s linear infinite; 39 | } 40 | @keyframes headRotate{ 41 | 0% {transform: rotate(0deg);} 42 | 50% {transform: rotate(180deg);} 43 | 100% {transform: rotate(360deg);} 44 | } -------------------------------------------------------------------------------- /cloudfunctions/createGroup/index.js: -------------------------------------------------------------------------------- 1 | // 云函数入口文件 2 | const cloud = require('wx-server-sdk') 3 | 4 | cloud.init() 5 | const db = cloud.database() 6 | // 云函数入口函数 7 | exports.main = (event, context) => { 8 | const wxContext = cloud.getWXContext() 9 | cloud.updateConfig({ 10 | env: wxContext.ENV === 'local' ? 'account-release-73522d' : wxContext.ENV, 11 | }) 12 | // 初始化数据库 13 | const db = cloud.database({ 14 | env: wxContext.ENV === 'local' ? 'account-release-73522d' : wxContext.ENV, 15 | }) 16 | const userInfo = event.userInfo 17 | db.collection('group').add({ 18 | data: { 19 | name: event.groupName, 20 | createBy: userInfo.openId, 21 | createTime: new Date(), 22 | deleted: false, 23 | updateTime: new Date() 24 | } 25 | }) 26 | .then(res => { 27 | db.collection('user-group').add({ 28 | data: { 29 | groupId: res._id, 30 | userId: userInfo.openId, 31 | invalid: false 32 | } 33 | }) 34 | }) 35 | } -------------------------------------------------------------------------------- /cloudfunctions/getBill/index.js: -------------------------------------------------------------------------------- 1 | // 云函数入口文件 2 | const cloud = require('wx-server-sdk') 3 | 4 | cloud.init() 5 | const db = cloud.database() 6 | const _ = db.command 7 | // 云函数入口函数 8 | exports.main = async (event, context) => { 9 | const wxContext = cloud.getWXContext() 10 | cloud.updateConfig({ 11 | env: wxContext.ENV === 'local' ? 'account-release-73522d' : wxContext.ENV, 12 | }) 13 | // 初始化数据库 14 | const db = cloud.database({ 15 | env: wxContext.ENV === 'local' ? 'account-release-73522d' : wxContext.ENV, 16 | }) 17 | let relateBillList = await db.collection('bill-group') 18 | .where({ 19 | groupId: event.groupId 20 | }) 21 | .get() 22 | const billIds = Array.from(new Set(relateBillList.data.map(item => item.billId))) 23 | const billRes = await db.collection('bill').where({ 24 | _id: _.in(billIds), 25 | deleted: false 26 | }).get() 27 | const billList = billRes.data 28 | return billList.sort((a, b) => a.createTime < b.createTime ? 1 : -1) 29 | } -------------------------------------------------------------------------------- /miniprogram/pages/dist/collapse-item/index.wxml: -------------------------------------------------------------------------------- 1 | 2 | 14 | 18 | 22 | 23 | 27 | 28 | 32 | 35 | 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /miniprogram/pages/dist/col/index.js: -------------------------------------------------------------------------------- 1 | import { VantComponent } from '../common/component'; 2 | VantComponent({ 3 | relation: { 4 | name: 'row', 5 | type: 'ancestor' 6 | }, 7 | props: { 8 | span: Number, 9 | offset: Number 10 | }, 11 | data: { 12 | style: '' 13 | }, 14 | computed: { 15 | classes: function classes() { 16 | var _this$data = this.data, 17 | span = _this$data.span, 18 | offset = _this$data.offset; 19 | return this.classNames('van-col', { 20 | ["van-col--" + span]: span, 21 | ["van-col--offset-" + offset]: offset 22 | }); 23 | } 24 | }, 25 | methods: { 26 | setGutter: function setGutter(gutter) { 27 | var padding = gutter / 2 + "px"; 28 | var style = gutter ? "padding-left: " + padding + "; padding-right: " + padding + ";" : ''; 29 | 30 | if (style !== this.data.style) { 31 | this.set({ 32 | style: style 33 | }); 34 | } 35 | } 36 | } 37 | }); -------------------------------------------------------------------------------- /miniprogram/pages/dist/submit-bar/index.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | {{ tipStr }} 6 | 7 | 8 | 9 | 10 | 11 | 12 | {{ label || '合计:' }} 13 | 14 | {{ currency }} {{ priceStr }} 15 | 16 | 17 | 18 | 28 | {{ loading ? '' : buttonText }} 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /cloudfunctions/createBill/index.js: -------------------------------------------------------------------------------- 1 | // 云函数入口文件 2 | const cloud = require('wx-server-sdk') 3 | 4 | cloud.init() 5 | const db = cloud.database() 6 | // 云函数入口函数 7 | exports.main = (event, context) => { 8 | const wxContext = cloud.getWXContext(); 9 | cloud.updateConfig({ 10 | env: wxContext.ENV === 'local' ? 'account-release-73522d' : wxContext.ENV, 11 | }) 12 | // 初始化数据库 13 | const db = cloud.database({ 14 | env: wxContext.ENV === 'local' ? 'account-release-73522d' : wxContext.ENV, 15 | }); 16 | const userInfo = event.userInfo 17 | db.collection('bill').add({ 18 | data: { 19 | name: event.billName, 20 | createBy: userInfo.openId, 21 | createTime: new Date(), 22 | ended: false, 23 | deleted: false, 24 | groupId: event.groupId, 25 | paidTotal: 0 26 | } 27 | }) 28 | .then(res => { 29 | db.collection('bill-group').add({ 30 | data: { 31 | billId: res._id, 32 | groupId: event.groupId 33 | } 34 | }) 35 | }) 36 | } -------------------------------------------------------------------------------- /miniprogram/pages/dist/toast/index.wxml: -------------------------------------------------------------------------------- 1 | 7 | 12 | 16 | 17 | {{ message }} 18 | 19 | 20 | 21 | 27 | 28 | {{ message }} 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /miniprogram/utils/parseTime.js: -------------------------------------------------------------------------------- 1 | const parseTime = (time, cFormat) => { 2 | if (arguments.length === 0) { 3 | return null 4 | } 5 | const format = cFormat || '{y}-{m}-{d} {h}:{i}:{s}' 6 | let date 7 | if (typeof time === 'object') { 8 | date = time 9 | } else { 10 | if (('' + time).length === 10) time = parseInt(time) * 1000 11 | date = new Date(time) 12 | } 13 | const formatObj = { 14 | y: date.getFullYear(), 15 | m: date.getMonth() + 1, 16 | d: date.getDate(), 17 | h: date.getHours(), 18 | i: date.getMinutes(), 19 | s: date.getSeconds(), 20 | a: date.getDay() 21 | } 22 | const time_str = format.replace(/{(y|m|d|h|i|s|a)+}/g, (result, key) => { 23 | let value = formatObj[key] 24 | if (key === 'a') return ['一', '二', '三', '四', '五', '六', '日'][value - 1] 25 | if (result.length > 0 && value < 10) { 26 | value = '0' + value 27 | } 28 | return value || 0 29 | }) 30 | return time_str 31 | } 32 | export { parseTime } -------------------------------------------------------------------------------- /cloudfunctions/deleteProject/index.js: -------------------------------------------------------------------------------- 1 | // 云函数入口文件 2 | const cloud = require('wx-server-sdk') 3 | 4 | cloud.init() 5 | const db = cloud.database() 6 | // 云函数入口函数 7 | exports.main = (event, context) => { 8 | const wxContext = cloud.getWXContext() 9 | cloud.updateConfig({ 10 | env: wxContext.ENV === 'local' ? 'account-release-73522d' : wxContext.ENV, 11 | }) 12 | // 初始化数据库 13 | const db = cloud.database({ 14 | env: wxContext.ENV === 'local' ? 'account-release-73522d' : wxContext.ENV, 15 | }) 16 | db.collection('project').doc(event.projectId).update({ 17 | data: { 18 | deleted: true 19 | } 20 | }) 21 | .then(res => { 22 | db.collection('bill').where({ 23 | _id: event.billId 24 | }) 25 | .get() 26 | .then(res => { 27 | db.collection('bill').doc(event.billId).update({ 28 | data: { 29 | paidTotal: parseFloat(Number((res.data[0].paidTotal) - Number(event.projectPrice)).toPrecision(12)) 30 | } 31 | }) 32 | }) 33 | }) 34 | } -------------------------------------------------------------------------------- /miniprogram/pages/dist/nav-bar/index.wxml: -------------------------------------------------------------------------------- 1 | 5 | 6 | 7 | 13 | {{ leftText }} 14 | 15 | 16 | 17 | 18 | {{ title }} 19 | 20 | 21 | 22 | {{ rightText }} 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /miniprogram/pages/dist/tabbar-item/index.wxss: -------------------------------------------------------------------------------- 1 | @import '../common/index.wxss';:host{-webkit-flex:1;flex:1}.van-tabbar-item{color:#7d7e80;height:100%;display:-webkit-flex;display:flex;line-height:1;font-size:12px;-webkit-align-items:center;align-items:center;-webkit-flex-direction:column;flex-direction:column;-webkit-justify-content:center;justify-content:center}.van-tabbar-item__icon{font-size:18px;margin-bottom:5px;position:relative}.van-tabbar-item__icon .van-icon{display:block}.van-tabbar-item__icon .van-icon__info{color:#fff;left:100%;top:-.5em;font-size:.6em;padding:0 .25em;text-align:center;min-width:1.4em;line-height:1.4;position:absolute;border-radius:.6em;box-sizing:border-box;background-color:#f44;-webkit-transform:translateX(-50%);transform:translateX(-50%);font-family:PingFang SC,Helvetica Neue,Arial,sans-serif}.van-tabbar-item__icon--dot::after{top:0;right:-8px;width:8px;height:8px;content:' ';position:absolute;border-radius:100%;background-color:#f44}.van-tabbar-item__icon image{width:50px;height:18px}.van-tabbar-item--active{color:#1989fa} -------------------------------------------------------------------------------- /miniprogram/pages/dist/card/index.wxss: -------------------------------------------------------------------------------- 1 | @import '../common/index.wxss';.van-card{box-sizing:border-box;position:relative;height:100px;font-size:12px;color:#333;padding:5px 15px 5px 115px;background:#fafafa}.van-card--center{-webkit-align-items:center;align-items:center;-webkit-justify-content:center;justify-content:center}.van-card__thumb{position:absolute;top:5px;left:15px;width:90px;height:90px}.van-card__img{width:100%;height:100%}.van-card,.van-card__content{display:-webkit-flex;display:flex}.van-card__content{width:100%}.van-card__desc,.van-card__title{line-height:20px;word-break:break-all}.van-card__title{max-height:40px}.van-card__desc{max-height:20px;color:#7d7e80}.van-card__left{-webkit-flex:1;flex:1;min-width:0}.van-card__right{-webkit-flex:none;flex:none;padding-left:10px;line-height:20px;text-align:right}.van-card__origin-price{color:#7d7e80;text-decoration:line-through}.van-card__num{color:#7d7e80}.van-card__tag{position:absolute;top:2px;left:0}.van-card__footer{position:absolute;right:15px;bottom:5px}.van-card__footer .van-button{margin-left:5px} -------------------------------------------------------------------------------- /miniprogram/pages/dist/field/index.wxss: -------------------------------------------------------------------------------- 1 | @import '../common/index.wxss';.van-field__body{display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center}.van-field__body--textarea{min-height:24px}.van-field__input{border:0;margin:0;padding:0;width:100%;height:24px;resize:none;display:block;text-align:left;min-height:24px;line-height:inherit;box-sizing:border-box;background-color:transparent}.van-field__input--disabled{opacity:1;color:#7d7e80;background-color:transparent}.van-field__input--center{text-align:center}.van-field__input--right{text-align:right}.van-field__clear-root{height:24px}.van-field__button,.van-field__clear,.van-field__icon-container{-webkit-flex-shrink:0;flex-shrink:0}.van-field__clear,.van-field__icon-container{padding:0 10px;line-height:inherit;margin-right:-10px;vertical-align:middle}.van-field__clear{color:#c9c9c9}.van-field__icon-container{color:#999}.van-field__icon{display:block!important}.van-field__button{padding-left:10px}.van-field__error-message{color:#f44;font-size:12px;text-align:left}.van-field--error{color:#f44} -------------------------------------------------------------------------------- /miniprogram/pages/share/share.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | {{inviteInfo.inviter}} 7 | 8 | 9 | 10 | 你的好友邀你加入收记账群组【{{inviteInfo.groupName}}】 11 | 12 | 13 | · AA清算十分便捷\n 14 | · 告别手动计算,记入即可自动统计\n 15 | · 清算结果一目了然\n 16 | · 轻松一起开心记账\n 17 | 18 | 19 | {{loading ? '正在加入...' : '立即加入'}} 20 | 你已在该组,点击进入 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /miniprogram/pages/dist/goods-action-icon/index.wxml: -------------------------------------------------------------------------------- 1 | 23 | 24 | 30 | {{ text }} 31 | 32 | 33 | -------------------------------------------------------------------------------- /miniprogram/pages/dist/mixins/observer/index.js: -------------------------------------------------------------------------------- 1 | import { behavior } from './behavior'; 2 | import { observeProps } from './props'; 3 | export function observe(vantOptions, options) { 4 | var watch = vantOptions.watch, 5 | computed = vantOptions.computed; 6 | options.behaviors.push(behavior); 7 | 8 | if (watch) { 9 | var props = options.properties || {}; 10 | Object.keys(watch).forEach(function (key) { 11 | if (key in props) { 12 | var prop = props[key]; 13 | 14 | if (prop === null || !('type' in prop)) { 15 | prop = { 16 | type: prop 17 | }; 18 | } 19 | 20 | prop.observer = watch[key]; 21 | props[key] = prop; 22 | } 23 | }); 24 | options.properties = props; 25 | } 26 | 27 | if (computed) { 28 | options.methods = options.methods || {}; 29 | 30 | options.methods.$options = function () { 31 | return vantOptions; 32 | }; 33 | 34 | if (options.properties) { 35 | observeProps(options.properties); 36 | } 37 | } 38 | } -------------------------------------------------------------------------------- /miniprogram/pages/dist/row/index.js: -------------------------------------------------------------------------------- 1 | import { VantComponent } from '../common/component'; 2 | VantComponent({ 3 | relation: { 4 | name: 'col', 5 | type: 'descendant', 6 | linked: function linked(target) { 7 | if (this.data.gutter) { 8 | target.setGutter(this.data.gutter); 9 | } 10 | } 11 | }, 12 | props: { 13 | gutter: Number 14 | }, 15 | watch: { 16 | gutter: 'setGutter' 17 | }, 18 | mounted: function mounted() { 19 | if (this.data.gutter) { 20 | this.setGutter(); 21 | } 22 | }, 23 | methods: { 24 | setGutter: function setGutter() { 25 | var _this = this; 26 | 27 | var gutter = this.data.gutter; 28 | var margin = "-" + Number(gutter) / 2 + "px"; 29 | var style = gutter ? "margin-right: " + margin + "; margin-left: " + margin + ";" : ''; 30 | this.set({ 31 | style: style 32 | }); 33 | this.getRelationNodes('../col/index').forEach(function (col) { 34 | col.setGutter(_this.data.gutter); 35 | }); 36 | } 37 | } 38 | }); -------------------------------------------------------------------------------- /miniprogram/style/white.wxss: -------------------------------------------------------------------------------- 1 | #white-skin { 2 | background-color: #F2F2F2; 3 | } 4 | 5 | #white-skin .public-list { 6 | background-color: #ffffff; 7 | } 8 | 9 | #white-skin .public-item { 10 | border-bottom: 2rpx solid #F2F2F2; 11 | } 12 | 13 | .white-skin-set-bg { 14 | background-color: #F2F2F2; 15 | } 16 | 17 | .white-skin-set-icon-bg { 18 | background-color: #ffffff; 19 | } 20 | 21 | #white-skin .group-detail-body { 22 | background-color: #F2F2F2; 23 | } 24 | 25 | #white-skin .group-detail { 26 | background-color: #ffffff; 27 | } 28 | #white-skin .check-list { 29 | border-bottom: 2rpx solid #F2F2F2; 30 | } 31 | #white-skin .group-body { 32 | background-color: #F2F2F2; 33 | } 34 | #white-skin .divide { 35 | border-bottom: 2rpx solid #F2F2F2; 36 | } 37 | #white-skin .check-list-box { 38 | box-shadow: 0px 5px 12px 0px #F2F2F2; 39 | } 40 | #white-skin .personal { 41 | background-color: #F2F2F2; 42 | } 43 | #white-skin .login-body { 44 | background-color: #F2F2F2; 45 | } 46 | #white-skin .login { 47 | background-color: #ffffff; 48 | } -------------------------------------------------------------------------------- /miniprogram/pages/dist/tag/index.js: -------------------------------------------------------------------------------- 1 | import { VantComponent } from '../common/component'; 2 | import { RED, BLUE, GREEN } from '../common/color'; 3 | var DEFAULT_COLOR = '#999'; 4 | var COLOR_MAP = { 5 | danger: RED, 6 | primary: BLUE, 7 | success: GREEN 8 | }; 9 | VantComponent({ 10 | props: { 11 | size: String, 12 | type: String, 13 | mark: Boolean, 14 | color: String, 15 | plain: Boolean, 16 | round: Boolean 17 | }, 18 | computed: { 19 | classes: function classes() { 20 | var data = this.data; 21 | return this.classNames('van-tag', { 22 | 'van-tag--mark': data.mark, 23 | 'van-tag--plain': data.plain, 24 | 'van-tag--round': data.round, 25 | ["van-tag--" + data.size]: data.size, 26 | 'van-hairline--surround': data.plain 27 | }); 28 | }, 29 | style: function style() { 30 | var color = this.data.color || COLOR_MAP[this.data.type] || DEFAULT_COLOR; 31 | var key = this.data.plain ? 'color' : 'background-color'; 32 | return key + ": " + color; 33 | } 34 | } 35 | }); -------------------------------------------------------------------------------- /cloudfunctions/leaveGroup/index.js: -------------------------------------------------------------------------------- 1 | // 云函数入口文件 2 | const cloud = require('wx-server-sdk') 3 | 4 | cloud.init() 5 | 6 | const db = cloud.database() 7 | // 云函数入口函数 8 | exports.main = async (event, context) => { 9 | const wxContext = cloud.getWXContext() 10 | cloud.updateConfig({ 11 | env: wxContext.ENV === 'local' ? 'account-release-73522d' : wxContext.ENV, 12 | }) 13 | // 初始化数据库 14 | const db = cloud.database({ 15 | env: wxContext.ENV === 'local' ? 'account-release-73522d' : wxContext.ENV, 16 | }) 17 | if (event.hasOwnProperty('menuUser')) { 18 | // 移除成员 19 | const userGroupRes = await db.collection('user-group').where({ 20 | groupId: event.groupInfo._id, 21 | userId: event.menuUser.openId 22 | }).get() 23 | if (userGroupRes.data.length > 0) { 24 | await db.collection('user-group').doc(userGroupRes.data[0]._id).remove() 25 | } 26 | } else { 27 | // 自身退出 28 | const removeRes = await db.collection("user-group").doc(event.relateUserGroupId).remove() 29 | } 30 | return { 31 | msg: '退出成功', 32 | code: 1 33 | } 34 | } -------------------------------------------------------------------------------- /miniprogram/pages/dist/notify/index.js: -------------------------------------------------------------------------------- 1 | import { VantComponent } from '../common/component'; 2 | import { RED } from '../common/color'; 3 | VantComponent({ 4 | props: { 5 | text: String, 6 | color: { 7 | type: String, 8 | value: '#fff' 9 | }, 10 | backgroundColor: { 11 | type: String, 12 | value: RED 13 | }, 14 | duration: { 15 | type: Number, 16 | value: 3000 17 | } 18 | }, 19 | data: { 20 | statusBarHeight: getApp().globalData.statusBarHeight 21 | }, 22 | methods: { 23 | show: function show() { 24 | var _this = this; 25 | var duration = this.data.duration; 26 | clearTimeout(this.timer); 27 | this.set({ 28 | show: true 29 | }); 30 | 31 | if (duration > 0 && duration !== Infinity) { 32 | this.timer = setTimeout(function () { 33 | _this.hide(); 34 | }, duration); 35 | } 36 | }, 37 | hide: function hide() { 38 | clearTimeout(this.timer); 39 | this.set({ 40 | show: false 41 | }); 42 | } 43 | } 44 | }); -------------------------------------------------------------------------------- /miniprogram/pages/dist/notice-bar/index.wxml: -------------------------------------------------------------------------------- 1 | 7 | 8 | 9 | 10 | 11 | 12 | {{ text }} 13 | 14 | 15 | 16 | 17 | 23 | 28 | 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /miniprogram/pages/dist/action-sheet/index.js: -------------------------------------------------------------------------------- 1 | import { VantComponent } from '../common/component'; 2 | VantComponent({ 3 | props: { 4 | show: Boolean, 5 | title: String, 6 | cancelText: String, 7 | zIndex: { 8 | type: Number, 9 | value: 100 10 | }, 11 | actions: { 12 | type: Array, 13 | value: [] 14 | }, 15 | overlay: { 16 | type: Boolean, 17 | value: true 18 | }, 19 | closeOnClickOverlay: { 20 | type: Boolean, 21 | value: true 22 | }, 23 | safeAreaInsetBottom: { 24 | type: Boolean, 25 | value: true 26 | } 27 | }, 28 | methods: { 29 | onSelect: function onSelect(event) { 30 | var index = event.currentTarget.dataset.index; 31 | var item = this.data.actions[index]; 32 | 33 | if (item && !item.disabled && !item.loading) { 34 | this.$emit('select', item); 35 | } 36 | }, 37 | onCancel: function onCancel() { 38 | this.$emit('cancel'); 39 | }, 40 | onClose: function onClose() { 41 | this.$emit('close'); 42 | } 43 | } 44 | }); -------------------------------------------------------------------------------- /miniprogram/pages/dist/mixins/observer/behavior.js: -------------------------------------------------------------------------------- 1 | export var behavior = Behavior({ 2 | created: function created() { 3 | var _this = this; 4 | 5 | if (!this.$options) { 6 | return; 7 | } 8 | 9 | var cache = {}; 10 | 11 | var _this$$options = this.$options(), 12 | computed = _this$$options.computed; 13 | 14 | var keys = Object.keys(computed); 15 | 16 | this.calcComputed = function () { 17 | var needUpdate = {}; 18 | keys.forEach(function (key) { 19 | var value = computed[key].call(_this); 20 | 21 | if (cache[key] !== value) { 22 | cache[key] = needUpdate[key] = value; 23 | } 24 | }); 25 | return needUpdate; 26 | }; 27 | }, 28 | attached: function attached() { 29 | this.set(); 30 | }, 31 | methods: { 32 | // set data and set computed data 33 | set: function set(data, callback) { 34 | if (data) { 35 | this.setData(data, callback); 36 | } 37 | 38 | if (this.calcComputed) { 39 | this.setData(this.calcComputed()); 40 | } 41 | } 42 | } 43 | }); -------------------------------------------------------------------------------- /miniprogram/pages/dist/area/index.wxss: -------------------------------------------------------------------------------- 1 | @import '../common/index.wxss';.van-picker{-webkit-text-size-adjust:100%;position:relative;overflow:hidden;background-color:#fff;-webkit-user-select:none;user-select:none}.van-picker__toolbar{display:-webkit-flex;display:flex;-webkit-justify-content:space-between;justify-content:space-between;height:44px;line-height:44px}.van-picker__cancel,.van-picker__confirm{color:#1989fa;padding:0 15px;font-size:14px}.van-picker__cancel:active,.van-picker__confirm:active{background-color:#e8e8e8}.van-picker__title{max-width:50%;font-size:16px;font-weight:500;text-align:center}.van-picker__columns{position:relative}.van-picker__loading{display:-webkit-flex;display:flex;z-index:4;position:absolute;top:0;right:0;bottom:0;left:0;-webkit-align-items:center;align-items:center;-webkit-justify-content:center;justify-content:center;background-color:rgba(255,255,255,.9)}.van-picker-column{-webkit-flex:1;flex:1;overflow:hidden;font-size:16px;text-align:center}.van-picker-column__item{padding:0 5px;color:#999}.van-picker-column__item--selected{font-weight:500;color:#333}.van-picker-column__item--disabled{opacity:.3} -------------------------------------------------------------------------------- /miniprogram/pages/dist/datetime-picker/index.wxss: -------------------------------------------------------------------------------- 1 | @import '../common/index.wxss';.van-picker{-webkit-text-size-adjust:100%;position:relative;overflow:hidden;background-color:#fff;-webkit-user-select:none;user-select:none}.van-picker__toolbar{display:-webkit-flex;display:flex;-webkit-justify-content:space-between;justify-content:space-between;height:44px;line-height:44px}.van-picker__cancel,.van-picker__confirm{color:#1989fa;padding:0 15px;font-size:14px}.van-picker__cancel:active,.van-picker__confirm:active{background-color:#e8e8e8}.van-picker__title{max-width:50%;font-size:16px;font-weight:500;text-align:center}.van-picker__columns{position:relative}.van-picker__loading{display:-webkit-flex;display:flex;z-index:4;position:absolute;top:0;right:0;bottom:0;left:0;-webkit-align-items:center;align-items:center;-webkit-justify-content:center;justify-content:center;background-color:rgba(255,255,255,.9)}.van-picker-column{-webkit-flex:1;flex:1;overflow:hidden;font-size:16px;text-align:center}.van-picker-column__item{padding:0 5px;color:#999}.van-picker-column__item--selected{font-weight:500;color:#333}.van-picker-column__item--disabled{opacity:.3} -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2019 GzhiYi 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /miniprogram/pages/dist/radio-group/index.js: -------------------------------------------------------------------------------- 1 | import { VantComponent } from '../common/component'; 2 | VantComponent({ 3 | field: true, 4 | relation: { 5 | name: 'radio', 6 | type: 'descendant', 7 | linked: function linked(target) { 8 | var _this$data = this.data, 9 | value = _this$data.value, 10 | disabled = _this$data.disabled; 11 | target.set({ 12 | value: value, 13 | disabled: disabled || target.data.disabled 14 | }); 15 | } 16 | }, 17 | props: { 18 | value: null, 19 | disabled: Boolean 20 | }, 21 | watch: { 22 | value: function value(_value) { 23 | var children = this.getRelationNodes('../radio/index'); 24 | children.forEach(function (child) { 25 | child.set({ 26 | value: _value 27 | }); 28 | }); 29 | }, 30 | disabled: function disabled(_disabled) { 31 | var children = this.getRelationNodes('../radio/index'); 32 | children.forEach(function (child) { 33 | child.set({ 34 | disabled: _disabled || child.data.disabled 35 | }); 36 | }); 37 | } 38 | } 39 | }); -------------------------------------------------------------------------------- /miniprogram/style/red.wxss: -------------------------------------------------------------------------------- 1 | #red-skin { 2 | background-color: #AE303F; 3 | } 4 | 5 | #red-skin .public-list { 6 | background-color: rgb(241, 151, 161); 7 | } 8 | 9 | #red-skin .public-item { 10 | border-bottom: 2rpx solid rgb(245, 138, 150); 11 | } 12 | 13 | .red-skin-set-bg { 14 | background-color: #AE303F; 15 | } 16 | 17 | .red-skin-set-icon-bg { 18 | background-color: rgb(241, 151, 161); 19 | } 20 | 21 | #red-skin .group-detail-body { 22 | background-color: #AE303F; 23 | } 24 | 25 | #red-skin .group-detail { 26 | background-color: rgb(241, 151, 161); 27 | } 28 | 29 | #red-skin .check-list { 30 | border-bottom: 2rpx solid rgb(245, 138, 150); 31 | } 32 | 33 | #red-skin .group-body { 34 | background-color: #AE303F; 35 | } 36 | 37 | #red-skin .divide { 38 | border-bottom: 2rpx solid rgb(245, 138, 150); 39 | } 40 | 41 | #red-skin .check-list-box { 42 | box-shadow: 0px 5px 12px 0px #AE303F; 43 | } 44 | 45 | #red-skin .personal { 46 | background-color: #AE303F; 47 | } 48 | 49 | #red-skin .login-body { 50 | background-color: #AE303F; 51 | } 52 | 53 | #red-skin .login { 54 | background-color: rgb(241, 151, 161); 55 | } -------------------------------------------------------------------------------- /miniprogram/pages/dist/steps/index.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 9 | 10 | {{ item.text }} 11 | {{ item.desc }} 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /miniprogram/style/blue.wxss: -------------------------------------------------------------------------------- 1 | #blue-skin { 2 | background-color: #7BB2D9; 3 | } 4 | 5 | #blue-skin .public-list { 6 | background-color: rgb(190, 222, 245) 7 | } 8 | 9 | #blue-skin .public-item { 10 | border-bottom: 2rpx solid rgb(175, 214, 241); 11 | } 12 | 13 | .blue-skin-set-bg { 14 | background-color: #7BB2D9; 15 | } 16 | 17 | .blue-skin-set-icon-bg { 18 | background-color: rgb(190, 222, 245) 19 | } 20 | 21 | #blue-skin .group-detail-body { 22 | background-color: #7BB2D9; 23 | } 24 | 25 | #blue-skin .group-detail { 26 | background-color: rgb(190, 222, 245) 27 | } 28 | 29 | #blue-skin .check-list { 30 | border-bottom: 2rpx solid rgb(175, 214, 241); 31 | } 32 | 33 | #blue-skin .group-body { 34 | background-color: #7BB2D9; 35 | } 36 | 37 | #blue-skin .divide { 38 | border-bottom: 2rpx solid rgb(175, 214, 241); 39 | } 40 | 41 | #blue-skin .check-list-box { 42 | box-shadow: 0px 5px 12px 0px #7BB2D9; 43 | } 44 | 45 | #blue-skin .personal { 46 | background-color: #7BB2D9; 47 | } 48 | 49 | #blue-skin .login-body { 50 | background-color: #7BB2D9; 51 | } 52 | 53 | #blue-skin .login { 54 | background-color: rgb(190, 222, 245) 55 | } -------------------------------------------------------------------------------- /miniprogram/pages/dist/cell/index.wxml: -------------------------------------------------------------------------------- 1 | 6 | 12 | 13 | 14 | 18 | 19 | {{ title }} 20 | {{ label }} 21 | 22 | 23 | 24 | 25 | 26 | {{ value }} 27 | 28 | 29 | 30 | 36 | 37 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /miniprogram/style/green.wxss: -------------------------------------------------------------------------------- 1 | #green-skin { 2 | background-color: #60837F; 3 | } 4 | 5 | #green-skin .public-list { 6 | background-color: rgb(209, 236, 233); 7 | } 8 | 9 | #green-skin .public-item { 10 | border-bottom: 2rpx solid rgb(227, 243, 241); 11 | } 12 | 13 | .green-skin-set-bg { 14 | background-color: #60837F; 15 | } 16 | 17 | .green-skin-set-icon-bg { 18 | background-color: rgb(209, 236, 233); 19 | } 20 | 21 | #green-skin .group-detail-body { 22 | background-color: #60837F; 23 | } 24 | 25 | #green-skin .group-detail { 26 | background-color: rgb(209, 236, 233); 27 | } 28 | 29 | #green-skin .check-list { 30 | border-bottom: 2rpx solid rgb(227, 243, 241); 31 | } 32 | 33 | #green-skin .group-body { 34 | background-color: #60837F; 35 | } 36 | 37 | #green-skin .divide { 38 | border-bottom: 2rpx solid rgb(227, 243, 241); 39 | } 40 | 41 | #green-skin .check-list-box { 42 | box-shadow: 0px 5px 12px 0px #60837F; 43 | } 44 | 45 | #green-skin .personal { 46 | background-color: #60837F; 47 | } 48 | 49 | #green-skin .login-body { 50 | background-color: #60837F; 51 | } 52 | 53 | #green-skin .login { 54 | background-color: rgb(209, 236, 233); 55 | } -------------------------------------------------------------------------------- /miniprogram/pages/dist/search/index.wxml: -------------------------------------------------------------------------------- 1 | 5 | 29 | 30 | 31 | 取消 32 | 33 | 34 | -------------------------------------------------------------------------------- /miniprogram/style/purple.wxss: -------------------------------------------------------------------------------- 1 | #purple-skin { 2 | background-color: #6B60C8; 3 | } 4 | 5 | #purple-skin .public-list { 6 | background-color: rgb(160, 151, 236); 7 | } 8 | 9 | #purple-skin .public-item { 10 | border-bottom: 2rpx solid rgb(153, 144, 253); 11 | } 12 | 13 | .purple-skin-set-bg { 14 | background-color: #6B60C8; 15 | } 16 | 17 | .purple-skin-set-icon-bg { 18 | background-color: rgb(160, 151, 236); 19 | } 20 | 21 | #purple-skin .group-detail-body { 22 | background-color: #6B60C8; 23 | } 24 | 25 | #purple-skin .group-detail { 26 | background-color: rgb(160, 151, 236); 27 | } 28 | 29 | #purple-skin .check-list { 30 | border-bottom: 2rpx solid rgb(153, 144, 253); 31 | } 32 | 33 | #purple-skin .group-body { 34 | background-color: #6B60C8; 35 | } 36 | 37 | #purple-skin .divide { 38 | border-bottom: 2rpx solid rgb(153, 144, 253); 39 | } 40 | 41 | #purple-skin .check-list-box { 42 | box-shadow: 0px 5px 12px 0px #6B60C8; 43 | } 44 | 45 | #purple-skin .personal { 46 | background-color: #6B60C8; 47 | } 48 | 49 | #purple-skin .login-body { 50 | background-color: #6B60C8; 51 | } 52 | 53 | #purple-skin .login { 54 | background-color: rgb(160, 151, 236); 55 | } -------------------------------------------------------------------------------- /miniprogram/pages/dist/steps/index.js: -------------------------------------------------------------------------------- 1 | import { VantComponent } from '../common/component'; 2 | import { GREEN } from '../common/color'; 3 | VantComponent({ 4 | props: { 5 | icon: String, 6 | steps: Array, 7 | active: Number, 8 | direction: { 9 | type: String, 10 | value: 'horizontal' 11 | }, 12 | activeColor: { 13 | type: String, 14 | value: GREEN 15 | } 16 | }, 17 | watch: { 18 | steps: 'formatSteps', 19 | active: 'formatSteps' 20 | }, 21 | created: function created() { 22 | this.formatSteps(); 23 | }, 24 | methods: { 25 | formatSteps: function formatSteps() { 26 | var _this = this; 27 | 28 | var steps = this.data.steps; 29 | steps.forEach(function (step, index) { 30 | step.status = _this.getStatus(index); 31 | }); 32 | this.set({ 33 | steps: steps 34 | }); 35 | }, 36 | getStatus: function getStatus(index) { 37 | var active = this.data.active; 38 | 39 | if (index < active) { 40 | return 'finish'; 41 | } else if (index === active) { 42 | return 'process'; 43 | } 44 | 45 | return ''; 46 | } 47 | } 48 | }); -------------------------------------------------------------------------------- /miniprogram/pages/dist/tree-select/index.wxml: -------------------------------------------------------------------------------- 1 | 5 | 6 | 13 | {{ item.text }} 14 | 15 | 16 | 21 | 28 | {{ item.text }} 29 | 34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /cloudfunctions/getUserInfo/index.js: -------------------------------------------------------------------------------- 1 | // 云函数入口文件 2 | const cloud = require('wx-server-sdk') 3 | 4 | cloud.init() 5 | const db = cloud.database() 6 | // 云函数入口函数 7 | exports.main = async (event, context) => { 8 | const wxContext = cloud.getWXContext() 9 | cloud.updateConfig({ 10 | env: wxContext.ENV === 'local' ? 'account-release-73522d' : wxContext.ENV, 11 | }) 12 | // 初始化数据库 13 | const db = cloud.database({ 14 | env: wxContext.ENV === 'local' ? 'account-release-73522d' : wxContext.ENV, 15 | }) 16 | const groupNum = await db.collection('user-group') 17 | .where({ 18 | userId: cloud.getWXContext().OPENID 19 | }) 20 | .get() 21 | 22 | 23 | const billNum = await db.collection('project') 24 | .get() 25 | let returnBillNum = 0 26 | billNum.data.forEach(bill => { 27 | bill.containUser.forEach(openId => { 28 | if (openId === cloud.getWXContext().OPENID) { 29 | returnBillNum ++ 30 | } 31 | }) 32 | }) 33 | const storeUser = await db.collection('user').where({ 34 | openId: cloud.getWXContext().OPENID 35 | }) 36 | .get() 37 | return { 38 | groupNum: groupNum.data.length, 39 | billNum: returnBillNum, 40 | storeUser: storeUser.data[0] 41 | } 42 | } -------------------------------------------------------------------------------- /miniprogram/pages/nav/nav.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | {{isEscape ? '群组' : '账单'}} 10 | 11 | 12 | 13 | {{showTheme ? '主题' : ''}} 14 | 15 | 16 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /miniprogram/pages/dist/checkbox-group/index.js: -------------------------------------------------------------------------------- 1 | import { VantComponent } from '../common/component'; 2 | VantComponent({ 3 | field: true, 4 | relation: { 5 | name: 'checkbox', 6 | type: 'descendant', 7 | linked: function linked(target) { 8 | var _this$data = this.data, 9 | value = _this$data.value, 10 | disabled = _this$data.disabled; 11 | target.set({ 12 | value: value.indexOf(target.data.name) !== -1, 13 | disabled: disabled || target.data.disabled 14 | }); 15 | } 16 | }, 17 | props: { 18 | value: Array, 19 | disabled: Boolean, 20 | max: Number 21 | }, 22 | watch: { 23 | value: function value(_value) { 24 | var children = this.getRelationNodes('../checkbox/index'); 25 | children.forEach(function (child) { 26 | child.set({ 27 | value: _value.indexOf(child.data.name) !== -1 28 | }); 29 | }); 30 | }, 31 | disabled: function disabled(_disabled) { 32 | var children = this.getRelationNodes('../checkbox/index'); 33 | children.forEach(function (child) { 34 | child.set({ 35 | disabled: _disabled || child.data.disabled 36 | }); 37 | }); 38 | } 39 | } 40 | }); -------------------------------------------------------------------------------- /miniprogram/style/yellow.wxss: -------------------------------------------------------------------------------- 1 | #yellow-skin { 2 | background-color: rgb(255, 232, 59); 3 | } 4 | 5 | #yellow-skin .public-list { 6 | background-color: rgb(255, 248, 198); 7 | } 8 | 9 | #yellow-skin .public-item { 10 | border-bottom: 2rpx solid rgb(252, 241, 163); 11 | } 12 | 13 | .yellow-skin-set-bg { 14 | background-color: rgb(255, 232, 59); 15 | } 16 | 17 | .yellow-skin-set-icon-bg { 18 | background-color: rgb(255, 248, 198); 19 | } 20 | 21 | #yellow-skin .group-detail-body { 22 | background-color: rgb(255, 232, 59); 23 | } 24 | 25 | #yellow-skin .group-detail { 26 | background-color: rgb(255, 248, 198); 27 | } 28 | 29 | #yellow-skin .check-list { 30 | border-bottom: 2rpx solid rgb(252, 241, 163); 31 | } 32 | 33 | #yellow-skin .group-body { 34 | background-color: rgb(255, 232, 59); 35 | } 36 | 37 | #yellow-skin .divide { 38 | border-bottom: 2rpx solid rgb(252, 241, 163); 39 | } 40 | 41 | #yellow-skin .check-list-box { 42 | box-shadow: 0px 5px 12px 0px rgb(255, 232, 59); 43 | } 44 | 45 | #yellow-skin .personal { 46 | background-color: rgb(255, 232, 59); 47 | } 48 | 49 | #yellow-skin .login-body { 50 | background-color: rgb(255, 232, 59); 51 | } 52 | 53 | #yellow-skin .login { 54 | background-color: rgb(255, 248, 198); 55 | } -------------------------------------------------------------------------------- /cloudfunctions/getGroupUser/index.js: -------------------------------------------------------------------------------- 1 | // 云函数入口文件 2 | const cloud = require('wx-server-sdk') 3 | 4 | cloud.init() 5 | const db = cloud.database() 6 | const _ = db.command 7 | // 云函数入口函数 8 | exports.main = async (event, context) => { 9 | const wxContext = cloud.getWXContext() 10 | cloud.updateConfig({ 11 | env: wxContext.ENV === 'local' ? 'account-release-73522d' : wxContext.ENV, 12 | }) 13 | // 初始化数据库 14 | const db = cloud.database({ 15 | env: wxContext.ENV === 'local' ? 'account-release-73522d' : wxContext.ENV, 16 | }) 17 | const { OPENID } = cloud.getWXContext() 18 | let relateUserList = await db.collection('user-group') 19 | .where({ 20 | groupId: event.groupId 21 | }) 22 | .get() 23 | const userIds = relateUserList.data.map(item => item.userId) 24 | const userRes = await db.collection('user').where({ 25 | openId: _.in(userIds) 26 | }).get() 27 | const userList = userRes.data 28 | userList.forEach(user => { 29 | const matchRelateUser = relateUserList.data.filter(item => item.userId === user.openId) 30 | if (matchRelateUser.length) { 31 | user.userGroupId = matchRelateUser[0]._id 32 | user.note = matchRelateUser[0].note 33 | } 34 | }) 35 | return userList.sort((a, b) => a.createTime < b.createTime ? 1 : -1) 36 | } -------------------------------------------------------------------------------- /miniprogram/pages/dist/area/index.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 取消 4 | {{ title }} 5 | 确定 6 | 7 | 8 | 9 | 10 | 11 | 12 | 19 | 26 | {{ item.name }} 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /miniprogram/pages/dist/common/index.wxss: -------------------------------------------------------------------------------- 1 | .van-ellipsis{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.van-multi-ellipsis--l2{overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}.van-multi-ellipsis--l3{overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical}.van-clearfix::after{content:'';display:table;clear:both}.van-hairline,.van-hairline--bottom,.van-hairline--left,.van-hairline--right,.van-hairline--surround,.van-hairline--top,.van-hairline--top-bottom{position:relative}.van-hairline--bottom::after,.van-hairline--left::after,.van-hairline--right::after,.van-hairline--surround::after,.van-hairline--top-bottom::after,.van-hairline--top::after,.van-hairline::after{content:' ';position:absolute;pointer-events:none;box-sizing:border-box;-webkit-transform-origin:center;transform-origin:center;top:-50%;left:-50%;right:-50%;bottom:-50%;-webkit-transform:scale(.5);transform:scale(.5);border:0 solid #eee}.van-hairline--top::after{border-top-width:1px}.van-hairline--left::after{border-left-width:1px}.van-hairline--right::after{border-right-width:1px}.van-hairline--bottom::after{border-bottom-width:1px}.van-hairline--top-bottom::after{border-width:1px 0}.van-hairline--surround::after{border-width:1px} -------------------------------------------------------------------------------- /miniprogram/pages/dist/mixins/basic.js: -------------------------------------------------------------------------------- 1 | import { classNames } from '../common/class-names'; 2 | export var basic = Behavior({ 3 | created: function created() { 4 | var _this = this; 5 | 6 | wx.getSystemInfo({ 7 | success: function success(_ref) { 8 | var model = _ref.model, 9 | screenHeight = _ref.screenHeight; 10 | var isIphoneX = /iphone x/i.test(model); 11 | var isIphoneNew = /iPhone11/i.test(model) && screenHeight === 812; 12 | 13 | if (isIphoneX || isIphoneNew) { 14 | _this.set({ 15 | isIPhoneX: true 16 | }); 17 | } 18 | } 19 | }); 20 | }, 21 | methods: { 22 | classNames: classNames, 23 | $emit: function $emit() { 24 | this.triggerEvent.apply(this, arguments); 25 | }, 26 | getRect: function getRect(selector, all) { 27 | var _this2 = this; 28 | 29 | return new Promise(function (resolve) { 30 | wx.createSelectorQuery().in(_this2)[all ? 'selectAll' : 'select'](selector).boundingClientRect(function (rect) { 31 | if (all && Array.isArray(rect) && rect.length) { 32 | resolve(rect); 33 | } 34 | 35 | if (!all && rect) { 36 | resolve(rect); 37 | } 38 | }).exec(); 39 | }); 40 | } 41 | } 42 | }); -------------------------------------------------------------------------------- /miniprogram/pages/dist/datetime-picker/index.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | {{ cancelButtonText }} 4 | {{ title }} 5 | {{ confirmButtonText }} 6 | 7 | 8 | 9 | 10 | 11 | 12 | 19 | 26 | {{ item }} 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /miniprogram/pages/dist/search/index.js: -------------------------------------------------------------------------------- 1 | import { VantComponent } from '../common/component'; 2 | VantComponent({ 3 | field: true, 4 | classes: ['field-class', 'input-class', 'cancel-class'], 5 | props: { 6 | focus: Boolean, 7 | error: Boolean, 8 | disabled: Boolean, 9 | readonly: Boolean, 10 | inputAlign: String, 11 | showAction: Boolean, 12 | useActionSlot: Boolean, 13 | placeholder: String, 14 | placeholderStyle: String, 15 | background: { 16 | type: String, 17 | value: 'rgb(252, 241, 163)' 18 | }, 19 | maxlength: { 20 | type: Number, 21 | value: -1 22 | } 23 | }, 24 | methods: { 25 | onChange: function onChange(event) { 26 | this.set({ 27 | value: event.detail 28 | }); 29 | this.$emit('change', event.detail); 30 | }, 31 | onCancel: function onCancel() { 32 | this.set({ 33 | value: '' 34 | }); 35 | this.$emit('cancel'); 36 | this.$emit('change', ''); 37 | }, 38 | onSearch: function onSearch() { 39 | this.$emit('search', this.data.value); 40 | }, 41 | onFocus: function onFocus() { 42 | this.$emit('focus'); 43 | }, 44 | onBlur: function onBlur() { 45 | this.$emit('blur'); 46 | }, 47 | onClear: function onClear() { 48 | this.$emit('clear'); 49 | } 50 | } 51 | }); -------------------------------------------------------------------------------- /miniprogram/pages/dist/action-sheet/index.wxml: -------------------------------------------------------------------------------- 1 | 11 | 12 | {{ title }} 13 | 18 | 19 | 27 | 28 | {{ item.name }} 29 | {{ item.subname }} 30 | 31 | 32 | 33 | 38 | {{ cancelText }} 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /miniprogram/pages/dist/collapse/index.js: -------------------------------------------------------------------------------- 1 | import { VantComponent } from '../common/component'; 2 | VantComponent({ 3 | relation: { 4 | name: 'collapse-item', 5 | type: 'descendant', 6 | linked: function linked(child) { 7 | this.set({ 8 | items: this.data.items.concat([child]) 9 | }, function () { 10 | child.updateExpanded(); 11 | }); 12 | } 13 | }, 14 | props: { 15 | accordion: Boolean, 16 | value: null 17 | }, 18 | data: { 19 | items: [] 20 | }, 21 | watch: { 22 | value: function value() { 23 | this.data.items.forEach(function (child) { 24 | child.updateExpanded(); 25 | }); 26 | }, 27 | accordion: function accordion() { 28 | this.data.items.forEach(function (child) { 29 | child.updateExpanded(); 30 | }); 31 | } 32 | }, 33 | methods: { 34 | switch: function _switch(name, expanded) { 35 | var _this$data = this.data, 36 | accordion = _this$data.accordion, 37 | value = _this$data.value; 38 | 39 | if (!accordion) { 40 | name = expanded ? value.concat(name) : value.filter(function (activeName) { 41 | return activeName !== name; 42 | }); 43 | } else { 44 | name = expanded ? name : ''; 45 | } 46 | 47 | this.$emit('change', name); 48 | this.$emit('input', name); 49 | } 50 | } 51 | }); -------------------------------------------------------------------------------- /miniprogram/pages/dist/tabs/index.wxss: -------------------------------------------------------------------------------- 1 | @import '../common/index.wxss';.van-tabs{position:relative;-webkit-tap-highlight-color:transparent}.van-tabs__wrap{top:0;left:0;right:0;position:absolute}.van-tabs__wrap--page-top{position:fixed}.van-tabs__wrap--content-bottom{top:auto;bottom:0}.van-tabs__wrap--scrollable .van-tab{-webkit-flex:0 0 22%;flex:0 0 22%}.van-tabs__scroll--card{border:1px solid #f44;border-radius:2px}.van-tabs__nav{display:-webkit-flex;display:flex;-webkit-user-select:none;user-select:none;position:relative;background-color:#fff}.van-tabs__nav--line{height:100%}.van-tabs__nav--card{height:30px}.van-tabs__nav--card .van-tab{color:#f44;border-right:1px solid #f44;line-height:30px}.van-tabs__nav--card .van-tab:last-child{border-right:none}.van-tabs__nav--card .van-tab.van-tab--active{color:#fff;background-color:#f44}.van-tabs__line{z-index:1;left:0;bottom:0;height:2px;position:absolute;background-color:#f44;border-radius:2px}.van-tabs--line{padding-top:44px}.van-tabs--line .van-tabs__wrap{height:44px}.van-tabs--card{padding-top:30px;margin:0 15px}.van-tabs--card .van-tabs__wrap{height:30px}.van-tabs__content{overflow:hidden}.van-tab{-webkit-flex:1;flex:1;cursor:pointer;padding:0 5px;font-size:14px;position:relative;color:#7d7e80;line-height:44px;text-align:center;box-sizing:border-box;background-color:#fff;min-width:0}.van-tab span{display:block}.van-tab--active{font-weight:500;color:#333}.van-tab--disabled{color:#c9c9c9} -------------------------------------------------------------------------------- /miniprogram/pages/dist/switch/index.js: -------------------------------------------------------------------------------- 1 | import { VantComponent } from '../common/component'; 2 | VantComponent({ 3 | field: true, 4 | classes: ['node-class'], 5 | props: { 6 | checked: Boolean, 7 | loading: Boolean, 8 | disabled: Boolean, 9 | activeColor: String, 10 | inactiveColor: String, 11 | size: { 12 | type: String, 13 | value: '30px' 14 | } 15 | }, 16 | watch: { 17 | checked: function checked(value) { 18 | this.set({ 19 | value: value 20 | }); 21 | } 22 | }, 23 | computed: { 24 | classes: function classes() { 25 | return this.classNames('van-switch', { 26 | 'van-switch--on': this.data.checked, 27 | 'van-switch--disabled': this.data.disabled 28 | }); 29 | }, 30 | style: function style() { 31 | var backgroundColor = this.data.checked ? this.data.activeColor : this.data.inactiveColor; 32 | return "font-size: " + this.data.size + "; " + (backgroundColor ? "background-color: " + backgroundColor : ''); 33 | } 34 | }, 35 | created: function created() { 36 | this.set({ 37 | value: this.data.checked 38 | }); 39 | }, 40 | methods: { 41 | onClick: function onClick() { 42 | if (!this.data.disabled && !this.data.loading) { 43 | var checked = !this.data.checked; 44 | this.$emit('input', checked); 45 | this.$emit('change', checked); 46 | } 47 | } 48 | } 49 | }); -------------------------------------------------------------------------------- /miniprogram/pages/dist/cell/index.js: -------------------------------------------------------------------------------- 1 | import { link } from '../mixins/link'; 2 | import { VantComponent } from '../common/component'; 3 | VantComponent({ 4 | classes: ['title-class', 'label-class', 'value-class', 'right-icon-class'], 5 | mixins: [link], 6 | props: { 7 | title: null, 8 | value: null, 9 | icon: String, 10 | size: String, 11 | label: String, 12 | center: Boolean, 13 | isLink: Boolean, 14 | required: Boolean, 15 | clickable: Boolean, 16 | titleWidth: String, 17 | customStyle: String, 18 | arrowDirection: String, 19 | border: { 20 | type: Boolean, 21 | value: true 22 | } 23 | }, 24 | computed: { 25 | cellClass: function cellClass() { 26 | var data = this.data; 27 | return this.classNames('van-cell', { 28 | 'van-cell--center': data.center, 29 | 'van-cell--required': data.required, 30 | 'van-cell--borderless': !data.border, 31 | 'van-cell--clickable': data.isLink || data.clickable, 32 | ["van-cell--" + data.size]: data.size 33 | }); 34 | }, 35 | titleStyle: function titleStyle() { 36 | var titleWidth = this.data.titleWidth; 37 | return titleWidth ? "max-width: " + titleWidth + ";min-width: " + titleWidth : ''; 38 | } 39 | }, 40 | methods: { 41 | onClick: function onClick(event) { 42 | this.$emit('click', event.detail); 43 | this.jumpLink(); 44 | } 45 | } 46 | }); -------------------------------------------------------------------------------- /miniprogram/pages/dist/popup/index.js: -------------------------------------------------------------------------------- 1 | import { VantComponent } from '../common/component'; 2 | import { transition } from '../mixins/transition'; 3 | VantComponent({ 4 | mixins: [transition(false)], 5 | props: { 6 | transition: String, 7 | customStyle: String, 8 | overlayStyle: String, 9 | zIndex: { 10 | type: Number, 11 | value: 100 12 | }, 13 | overlay: { 14 | type: Boolean, 15 | value: true 16 | }, 17 | closeOnClickOverlay: { 18 | type: Boolean, 19 | value: true 20 | }, 21 | position: { 22 | type: String, 23 | value: 'center' 24 | }, 25 | safeAreaInsetBottom: { 26 | type: Boolean, 27 | value: true 28 | } 29 | }, 30 | computed: { 31 | popupClass: function popupClass() { 32 | var _this$data = this.data, 33 | position = _this$data.position, 34 | safeAreaInsetBottom = _this$data.safeAreaInsetBottom, 35 | isIPhoneX = _this$data.isIPhoneX; 36 | return this.classNames('custom-class', 'van-popup', { 37 | ["van-popup--" + position]: position, 38 | ["van-popup--safe"]: isIPhoneX && safeAreaInsetBottom && position === 'bottom' 39 | }); 40 | } 41 | }, 42 | methods: { 43 | onClickOverlay: function onClickOverlay() { 44 | this.$emit('click-overlay'); 45 | 46 | if (this.data.closeOnClickOverlay) { 47 | this.$emit('close'); 48 | } 49 | } 50 | } 51 | }); -------------------------------------------------------------------------------- /miniprogram/pages/dist/radio/index.js: -------------------------------------------------------------------------------- 1 | import { VantComponent } from '../common/component'; 2 | VantComponent({ 3 | field: true, 4 | relation: { 5 | name: 'radio-group', 6 | type: 'ancestor' 7 | }, 8 | classes: ['icon-class', 'label-class'], 9 | props: { 10 | name: null, 11 | value: null, 12 | disabled: Boolean, 13 | labelDisabled: Boolean, 14 | labelPosition: String, 15 | checkedColor: String 16 | }, 17 | computed: { 18 | iconClass: function iconClass() { 19 | var _this$data = this.data, 20 | disabled = _this$data.disabled, 21 | name = _this$data.name, 22 | value = _this$data.value; 23 | return this.classNames('van-radio__icon', { 24 | 'van-radio__icon--disabled': disabled, 25 | 'van-radio__icon--checked': !disabled && name === value, 26 | 'van-radio__icon--check': !disabled && name !== value 27 | }); 28 | } 29 | }, 30 | methods: { 31 | emitChange: function emitChange(value) { 32 | var instance = this.getRelationNodes('../radio-group/index')[0] || this; 33 | instance.$emit('input', value); 34 | instance.$emit('change', value); 35 | }, 36 | onChange: function onChange(event) { 37 | this.emitChange(event.detail.value); 38 | }, 39 | onClickLabel: function onClickLabel() { 40 | if (!this.data.disabled && !this.data.labelDisabled) { 41 | this.emitChange(this.data.name); 42 | } 43 | } 44 | } 45 | }); -------------------------------------------------------------------------------- /cloudfunctions/joinGroup/index.js: -------------------------------------------------------------------------------- 1 | // 云函数入口文件 2 | const cloud = require('wx-server-sdk') 3 | 4 | cloud.init() 5 | 6 | const db = cloud.database() 7 | // 云函数入口函数 8 | exports.main = async (event, context) => { 9 | const wxContext = cloud.getWXContext() 10 | cloud.updateConfig({ 11 | env: wxContext.ENV === 'local' ? 'account-release-73522d' : wxContext.ENV, 12 | }) 13 | // 初始化数据库 14 | const db = cloud.database({ 15 | env: wxContext.ENV === 'local' ? 'account-release-73522d' : wxContext.ENV, 16 | }) 17 | const containGroup = await db.collection('user-group').where({ 18 | userId: wxContext.OPENID 19 | }) 20 | .get() 21 | 22 | let alreadyInGroup = false 23 | containGroup.data.forEach(item => { 24 | if (item.groupId === event.groupId) { 25 | alreadyInGroup = true 26 | } 27 | }) 28 | const groupRes = await db.collection('group').where({ 29 | _id: event.groupId 30 | }).get() 31 | if (alreadyInGroup) { 32 | return { 33 | msg: '你已在该组内,即将跳转至组页面', 34 | code: event.mode === 'check' ? 2 : 0, 35 | data: groupRes.data[0] 36 | } 37 | } else { 38 | if (event.mode !== 'check') { 39 | await db.collection('user-group').add({ 40 | data: { 41 | userId: wxContext.OPENID, 42 | groupId: event.groupId, 43 | invalid: false 44 | } 45 | }) 46 | return { 47 | msg: '加入成功', 48 | code: 1, 49 | data: groupRes.data[0] 50 | } 51 | } 52 | } 53 | } -------------------------------------------------------------------------------- /miniprogram/pages/dist/submit-bar/index.js: -------------------------------------------------------------------------------- 1 | import { VantComponent } from '../common/component'; 2 | VantComponent({ 3 | classes: ['bar-class', 'price-class', 'button-class'], 4 | props: { 5 | tip: null, 6 | type: Number, 7 | price: null, 8 | label: String, 9 | loading: Boolean, 10 | disabled: Boolean, 11 | buttonText: String, 12 | currency: { 13 | type: String, 14 | value: '¥' 15 | }, 16 | buttonType: { 17 | type: String, 18 | value: 'danger' 19 | }, 20 | safeAreaInsetBottom: { 21 | type: Boolean, 22 | value: true 23 | } 24 | }, 25 | computed: { 26 | hasPrice: function hasPrice() { 27 | return typeof this.data.price === 'number'; 28 | }, 29 | priceStr: function priceStr() { 30 | return (this.data.price / 100).toFixed(2); 31 | }, 32 | tipStr: function tipStr() { 33 | var tip = this.data.tip; 34 | return typeof tip === 'string' ? tip : ''; 35 | }, 36 | barClass: function barClass() { 37 | var _this$data = this.data, 38 | isIPhoneX = _this$data.isIPhoneX, 39 | safeAreaInsetBottom = _this$data.safeAreaInsetBottom; 40 | return this.classNames('van-submit-bar__bar', 'bar-class', { 41 | 'van-submit-bar__bar--safe': safeAreaInsetBottom && isIPhoneX 42 | }); 43 | } 44 | }, 45 | methods: { 46 | onSubmit: function onSubmit(event) { 47 | this.$emit('submit', event.detail); 48 | } 49 | } 50 | }); -------------------------------------------------------------------------------- /miniprogram/pages/dist/cell/index.wxss: -------------------------------------------------------------------------------- 1 | @import '../common/index.wxss';.van-cell{width:100%;display:-webkit-flex;display:flex;padding:10px 15px;box-sizing:border-box;line-height:24px;position:relative;background-color:#fff;color:#333;font-size:14px}.van-cell::after{content:' ';position:absolute;pointer-events:none;box-sizing:border-box;-webkit-transform-origin:center;transform-origin:center;top:auto;left:15px;right:0;bottom:0;-webkit-transform:scaleY(.5);transform:scaleY(.5);border-bottom:1px solid #eee}.van-cell--borderless::after{display:none}.van-cell-group{background-color:#fff}.van-cell__label{font-size:12px;line-height:18px;color:#7d7e80}.van-cell__title,.van-cell__value{-webkit-flex:1;flex:1}.van-cell__title:empty,.van-cell__value:empty{display:none}.van-cell__value{overflow:hidden;text-align:right;vertical-align:middle}.van-cell__left-icon-wrap,.van-cell__right-icon-wrap{display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;height:24px;font-size:16px}.van-cell__left-icon-wrap{margin-right:5px}.van-cell__right-icon-wrap{margin-left:5px;color:#999}.van-cell__left-icon{line-height:24px;vertical-align:middle}.van-cell__right-icon{line-height:24px}.van-cell--clickable:active{background-color:#e8e8e8}.van-cell--required{overflow:visible}.van-cell--required::before{content:'*';position:absolute;left:7px;font-size:14px;color:#f44}.van-cell--center{-webkit-align-items:center;align-items:center}.van-cell--large{padding-top:12px;padding-bottom:12px}.van-cell--large .van-cell__title{font-size:16px} -------------------------------------------------------------------------------- /miniprogram/pages/dist/badge-group/index.js: -------------------------------------------------------------------------------- 1 | import { VantComponent } from '../common/component'; 2 | import { isNumber } from '../common/utils'; 3 | VantComponent({ 4 | relation: { 5 | name: 'badge', 6 | type: 'descendant', 7 | linked: function linked(target) { 8 | this.badges.push(target); 9 | this.setActive(); 10 | }, 11 | unlinked: function unlinked(target) { 12 | this.badges = this.badges.filter(function (item) { 13 | return item !== target; 14 | }); 15 | this.setActive(); 16 | } 17 | }, 18 | props: { 19 | active: { 20 | type: Number, 21 | value: 0 22 | } 23 | }, 24 | watch: { 25 | active: 'setActive' 26 | }, 27 | beforeCreate: function beforeCreate() { 28 | this.badges = []; 29 | this.currentActive = -1; 30 | }, 31 | methods: { 32 | setActive: function setActive(badge) { 33 | var active = this.data.active; 34 | var badges = this.badges; 35 | 36 | if (badge && !isNumber(badge)) { 37 | active = badges.indexOf(badge); 38 | } 39 | 40 | if (active === this.currentActive) { 41 | return; 42 | } 43 | 44 | if (this.currentActive !== -1 && badges[this.currentActive]) { 45 | this.$emit('change', active); 46 | badges[this.currentActive].setActive(false); 47 | } 48 | 49 | if (badges[active]) { 50 | badges[active].setActive(true); 51 | this.currentActive = active; 52 | } 53 | } 54 | } 55 | }); -------------------------------------------------------------------------------- /miniprogram/pages/dist/stepper/index.wxss: -------------------------------------------------------------------------------- 1 | @import '../common/index.wxss';.van-stepper{font-size:0}.van-stepper__input,.van-stepper__minus,.van-stepper__plus{display:inline-block;vertical-align:middle;background-color:#fff}.van-stepper__minus,.van-stepper__plus{width:40px;height:30px;box-sizing:border-box;border:1px solid #eee;position:relative;padding:5px}.van-stepper__minus::before,.van-stepper__plus::before{width:9px;height:1px}.van-stepper__minus::after,.van-stepper__plus::after{width:1px;height:9px}.van-stepper__minus::after,.van-stepper__minus::before,.van-stepper__plus::after,.van-stepper__plus::before{content:'';position:absolute;margin:auto;top:0;left:0;right:0;bottom:0;background-color:#7d7e80}.van-stepper__minus:active,.van-stepper__plus:active{background-color:#e8e8e8}.van-stepper__minus--disabled,.van-stepper__plus--disabled{background-color:#f8f8f8}.van-stepper__minus--disabled::after,.van-stepper__minus--disabled::before,.van-stepper__plus--disabled::after,.van-stepper__plus--disabled::before{background-color:#c9c9c9}.van-stepper__minus--disabled:active,.van-stepper__plus--disabled:active{background-color:#f8f8f8}.van-stepper__minus{border-radius:2px 0 0 2px}.van-stepper__minus::after{display:none}.van-stepper__plus{border-radius:0 2px 2px 0}.van-stepper__input{width:33px;height:26px;padding:1px;min-height:0;border:1px solid #eee;border-width:1px 0;border-radius:0;box-sizing:content-box;color:#7d7e80;font-size:14px;text-align:center;-webkit-appearance:none}.van-stepper__input--disabled{color:#c9c9c9;background-color:#f8f8f8} -------------------------------------------------------------------------------- /miniprogram/pages/dist/card/index.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 10 | 11 | 17 | {{ tag }} 18 | 19 | 20 | 21 | 22 | 23 | {{ title }} 24 | 25 | 26 | {{ desc }} 27 | 28 | 29 | 30 | 31 | 32 | {{ currency }} {{ price }} 33 | {{ currency }} {{ originPrice }} 34 | x {{ num }} 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /miniprogram/pages/login/login.js: -------------------------------------------------------------------------------- 1 | // pages/login/login.js 2 | const app = getApp() 3 | import Notify from '../dist/notify/notify' 4 | Page({ 5 | 6 | /** 7 | * 页面的初始数据 8 | */ 9 | data: { 10 | backPath: '', 11 | theme: 'white-skin' 12 | }, 13 | onLoad: function (options) { 14 | this.setData({ 15 | backPath: decodeURIComponent(options.back) 16 | }) 17 | }, 18 | onShow: function () { 19 | getApp().setTheme(this) 20 | }, 21 | goGroup() { 22 | wx.redirectTo({ 23 | url: '/pages/group/group', 24 | }) 25 | }, 26 | onGotUserInfo (event) { 27 | const { backPath } = this.data 28 | wx.getUserProfile({ 29 | desc: '展示你的公开信息', 30 | success(res) { 31 | if (res.errMsg === 'getUserProfile:ok') { 32 | app.globalData.userInfo = res.userInfo 33 | const { avatarUrl, nickName, gender } = res.userInfo 34 | wx.cloud.callFunction({ 35 | name: 'createUser', 36 | data: { 37 | mode: 'add', 38 | avatarUrl, 39 | name: '', 40 | nickName, 41 | sex: gender 42 | }, 43 | success(createRes) { 44 | console.log(createRes); 45 | if (createRes.result.code === 1) { 46 | wx.redirectTo({ 47 | url: backPath || '/pages/group/group' 48 | }) 49 | } 50 | } 51 | }) 52 | } 53 | }, 54 | fail(err) { 55 | console.log(err); 56 | } 57 | }) 58 | } 59 | }) -------------------------------------------------------------------------------- /miniprogram/pages/dist/button/index.wxss: -------------------------------------------------------------------------------- 1 | @import '../common/index.wxss';.van-button{position:relative;padding:0;display:inline-block;height:44px;line-height:42px;border-radius:2px;box-sizing:border-box;font-size:16px;text-align:center;vertical-align:middle;-webkit-appearance:none;-webkit-text-size-adjust:100%}.van-button::after{content:" ";position:absolute;top:50%;left:50%;opacity:0;width:100%;height:100%;border:inherit;border-color:#000;background-color:#000;border-radius:inherit;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}.van-button:active::after{opacity:.15}.van-button--unclickable::after{display:none}.van-button--default{color:#333;background-color:#fff;border:1px solid #eee}.van-button--primary{color:#fff;background-color:#4b0;border:1px solid #4b0}.van-button--danger{color:#fff;background-color:#f44;border:1px solid #f44}.van-button--warning{color:#fff;background-color:#ff976a;border:1px solid #ff976a}.van-button--plain{background-color:#fff}.van-button--plain.van-button--primary{color:#4b0}.van-button--plain.van-button--danger{color:#f44}.van-button--plain.van-button--warning{color:#ff976a}.van-button--large{width:100%;height:50px;line-height:48px}.van-button--normal{padding:0 15px;font-size:14px}.van-button--small{height:30px;padding:0 8px;min-width:60px;font-size:12px;line-height:28px}.van-button--mini{display:inline-block;width:50px;height:22px;line-height:20px;font-size:10px}.van-button--mini+.van-button--mini{margin-left:5px}.van-button--block{width:100%;display:block}.van-button--round{border-radius:10em}.van-button--square{border-radius:0}.van-button--disabled{opacity:.5} -------------------------------------------------------------------------------- /cloudfunctions/createUser/index.js: -------------------------------------------------------------------------------- 1 | // 云函数入口文件 2 | const cloud = require('wx-server-sdk') 3 | 4 | cloud.init() 5 | const db = cloud.database() 6 | // 云函数入口函数 7 | exports.main = async (event) => { 8 | const { mode, avatarUrl, nickName, sex, _id } = event 9 | const { OPENID, ENV } = cloud.getWXContext() 10 | cloud.updateConfig({ 11 | env: ENV === 'local' ? 'account-release-73522d' : ENV, 12 | }) 13 | // 初始化数据库 14 | const db = cloud.database({ 15 | env: ENV === 'local' ? 'account-release-73522d' : ENV, 16 | }) 17 | console.log('OPENID', OPENID) 18 | // 检查数据库是否已经保存了这个用户的信息 19 | if (mode === 'check') { 20 | const res = await db.collection('user').where({ 21 | openId: OPENID 22 | }).get() 23 | if (res.data.length) { 24 | return { 25 | code: 1, 26 | msg: '已有该用户信息', 27 | data: res.data[0] 28 | } 29 | } else { 30 | return { 31 | code: 0, 32 | msg: '新用户', 33 | data: null 34 | } 35 | } 36 | } 37 | if (mode === 'add') { 38 | const addRes = await db.collection('user').add({ 39 | data: { 40 | avatarUrl, 41 | nickName, 42 | sex, 43 | name: '', 44 | openId: OPENID, 45 | createTime: new Date() 46 | } 47 | }) 48 | console.log(addRes); 49 | return { 50 | code: 1, 51 | msg: '创建成功', 52 | data: null 53 | } 54 | } 55 | if (mode === 'update') { 56 | await db.collection('user').doc(_id) 57 | .update({ 58 | data: { 59 | avatarUrl, 60 | nickName, 61 | sex 62 | } 63 | }) 64 | } 65 | } -------------------------------------------------------------------------------- /miniprogram/pages/dist/button/index.js: -------------------------------------------------------------------------------- 1 | import { VantComponent } from '../common/component'; 2 | import { button } from '../mixins/button'; 3 | import { openType } from '../mixins/open-type'; 4 | VantComponent({ 5 | classes: ['loading-class'], 6 | mixins: [button, openType], 7 | props: { 8 | plain: Boolean, 9 | block: Boolean, 10 | round: Boolean, 11 | square: Boolean, 12 | loading: Boolean, 13 | disabled: Boolean, 14 | type: { 15 | type: String, 16 | value: 'default' 17 | }, 18 | size: { 19 | type: String, 20 | value: 'normal' 21 | } 22 | }, 23 | computed: { 24 | classes: function classes() { 25 | var _this$data = this.data, 26 | type = _this$data.type, 27 | size = _this$data.size, 28 | block = _this$data.block, 29 | plain = _this$data.plain, 30 | round = _this$data.round, 31 | square = _this$data.square, 32 | loading = _this$data.loading, 33 | disabled = _this$data.disabled; 34 | return this.classNames('van-button', "van-button--" + type, "van-button--" + size, { 35 | 'van-button--block': block, 36 | 'van-button--round': round, 37 | 'van-button--plain': plain, 38 | 'van-button--square': square, 39 | 'van-button--loading': loading, 40 | 'van-button--disabled': disabled, 41 | 'van-button--unclickable': disabled || loading 42 | }); 43 | } 44 | }, 45 | methods: { 46 | onClick: function onClick() { 47 | if (!this.data.disabled && !this.data.loading) { 48 | this.$emit('click'); 49 | } 50 | } 51 | } 52 | }); -------------------------------------------------------------------------------- /cloudfunctions/getGroup/index.js: -------------------------------------------------------------------------------- 1 | // 云函数入口文件 2 | const cloud = require('wx-server-sdk') 3 | 4 | cloud.init() 5 | const db = cloud.database() 6 | const _ = db.command 7 | // 云函数入口函数 8 | exports.main = async (event, context) => { 9 | const wxContext = cloud.getWXContext() 10 | cloud.updateConfig({ 11 | env: wxContext.ENV === 'local' ? 'account-release-73522d' : wxContext.ENV, 12 | }) 13 | // 初始化数据库 14 | const db = cloud.database({ 15 | env: wxContext.ENV === 'local' ? 'account-release-73522d' : wxContext.ENV, 16 | }) 17 | const openId = cloud.getWXContext().OPENID 18 | 19 | let relateGroupList = await db.collection('user-group') 20 | .where({ 21 | userId: openId 22 | }) 23 | .get() 24 | let groupIds = relateGroupList.data.map(item => item.groupId) 25 | // 请求组列表 26 | const groupRes = await db.collection('group').where({ 27 | _id: _.in(groupIds), 28 | deleted: false, 29 | }).get() 30 | const groupList = groupRes.data 31 | const userIds = groupList.map(item => item.createBy) 32 | const userRes = await db.collection('user').where({ 33 | openId: _.in(Array.from(new Set(userIds))) 34 | }).get() 35 | const userList = userRes.data 36 | let i = -1; 37 | let temp = [] 38 | while(++i < groupList.length) { 39 | let groupInfo = groupList[i] 40 | const matchUser = userList.filter(u => u.openId === groupInfo.createBy) 41 | const matchRelateGroup = relateGroupList.data.filter(item => item.groupId === groupInfo._id) 42 | groupInfo.createBy = matchUser[0] 43 | groupInfo.relateUserGroupId = matchRelateGroup[0]._id 44 | temp.push(groupInfo) 45 | } 46 | return temp.sort((a, b) => a.createTime < b.createTime ? 1 : -1) 47 | } -------------------------------------------------------------------------------- /miniprogram/pages/dist/dialog/index.wxml: -------------------------------------------------------------------------------- 1 | 10 | 14 | {{ title }} 15 | 16 | 17 | 18 | 22 | {{ message }} 23 | 24 | 25 | 26 | 34 | {{ cancelButtonText }} 35 | 36 | 50 | {{ confirmButtonText }} 51 | 52 | 53 | 54 | -------------------------------------------------------------------------------- /miniprogram/pages/dist/common/component.js: -------------------------------------------------------------------------------- 1 | import { basic } from '../mixins/basic'; 2 | import { observe } from '../mixins/observer/index'; 3 | 4 | function mapKeys(source, target, map) { 5 | Object.keys(map).forEach(function (key) { 6 | if (source[key]) { 7 | target[map[key]] = source[key]; 8 | } 9 | }); 10 | } 11 | 12 | function VantComponent(vantOptions) { 13 | if (vantOptions === void 0) { 14 | vantOptions = {}; 15 | } 16 | 17 | var options = {}; 18 | mapKeys(vantOptions, options, { 19 | data: 'data', 20 | props: 'properties', 21 | mixins: 'behaviors', 22 | methods: 'methods', 23 | beforeCreate: 'created', 24 | created: 'attached', 25 | mounted: 'ready', 26 | relations: 'relations', 27 | destroyed: 'detached', 28 | classes: 'externalClasses' 29 | }); 30 | var _vantOptions = vantOptions, 31 | relation = _vantOptions.relation; 32 | 33 | if (relation) { 34 | options.relations = Object.assign(options.relations || {}, { 35 | ["../" + relation.name + "/index"]: relation 36 | }); 37 | } // add default externalClasses 38 | 39 | 40 | options.externalClasses = options.externalClasses || []; 41 | options.externalClasses.push('custom-class'); // add default behaviors 42 | 43 | options.behaviors = options.behaviors || []; 44 | options.behaviors.push(basic); // map field to form-field behavior 45 | 46 | if (vantOptions.field) { 47 | options.behaviors.push('wx://form-field'); 48 | } // add default options 49 | 50 | 51 | options.options = { 52 | multipleSlots: true, 53 | addGlobalClass: true 54 | }; 55 | observe(vantOptions, options); 56 | Component(options); 57 | } 58 | 59 | export { VantComponent }; -------------------------------------------------------------------------------- /miniprogram/pages/dist/col/index.wxss: -------------------------------------------------------------------------------- 1 | @import '../common/index.wxss';.van-col{float:left;box-sizing:border-box}.van-col--1{width:4.16666667%}.van-col--offset-1{margin-left:4.16666667%}.van-col--2{width:8.33333333%}.van-col--offset-2{margin-left:8.33333333%}.van-col--3{width:12.5%}.van-col--offset-3{margin-left:12.5%}.van-col--4{width:16.66666667%}.van-col--offset-4{margin-left:16.66666667%}.van-col--5{width:20.83333333%}.van-col--offset-5{margin-left:20.83333333%}.van-col--6{width:25%}.van-col--offset-6{margin-left:25%}.van-col--7{width:29.16666667%}.van-col--offset-7{margin-left:29.16666667%}.van-col--8{width:33.33333333%}.van-col--offset-8{margin-left:33.33333333%}.van-col--9{width:37.5%}.van-col--offset-9{margin-left:37.5%}.van-col--10{width:41.66666667%}.van-col--offset-10{margin-left:41.66666667%}.van-col--11{width:45.83333333%}.van-col--offset-11{margin-left:45.83333333%}.van-col--12{width:50%}.van-col--offset-12{margin-left:50%}.van-col--13{width:54.16666667%}.van-col--offset-13{margin-left:54.16666667%}.van-col--14{width:58.33333333%}.van-col--offset-14{margin-left:58.33333333%}.van-col--15{width:62.5%}.van-col--offset-15{margin-left:62.5%}.van-col--16{width:66.66666667%}.van-col--offset-16{margin-left:66.66666667%}.van-col--17{width:70.83333333%}.van-col--offset-17{margin-left:70.83333333%}.van-col--18{width:75%}.van-col--offset-18{margin-left:75%}.van-col--19{width:79.16666667%}.van-col--offset-19{margin-left:79.16666667%}.van-col--20{width:83.33333333%}.van-col--offset-20{margin-left:83.33333333%}.van-col--21{width:87.5%}.van-col--offset-21{margin-left:87.5%}.van-col--22{width:91.66666667%}.van-col--offset-22{margin-left:91.66666667%}.van-col--23{width:95.83333333%}.van-col--offset-23{margin-left:95.83333333%}.van-col--24{width:100%}.van-col--offset-24{margin-left:100%} -------------------------------------------------------------------------------- /miniprogram/pages/dist/tabs/index.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 10 | 11 | 12 | 20 | 21 | {{ item.title }} 22 | 23 | 24 | 25 | 26 | 27 | 34 | 35 | 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /cloudfunctions/editProject/index.js: -------------------------------------------------------------------------------- 1 | // 云函数入口文件 2 | const cloud = require('wx-server-sdk') 3 | 4 | cloud.init() 5 | const db = cloud.database() 6 | const _ = db.command 7 | // 云函数入口函数 8 | exports.main = async (event, context) => { 9 | const wxContext = cloud.getWXContext() 10 | cloud.updateConfig({ 11 | env: wxContext.ENV === 'local' ? 'account-release-73522d' : wxContext.ENV, 12 | }) 13 | // 初始化数据库 14 | const db = cloud.database({ 15 | env: wxContext.ENV === 'local' ? 'account-release-73522d' : wxContext.ENV, 16 | }) 17 | const { projectPrice, projectTitle, paidDate, containUser, payType, payItem, billId } = event 18 | await db.collection('project').doc(event.projectId).update({ 19 | data: { 20 | price: projectPrice, 21 | title: projectTitle, 22 | paidDate: paidDate, 23 | containUser, 24 | type: payType == 0 ? 'paid' : 'item', 25 | payItem 26 | } 27 | }) 28 | // 将bill表对应的paidTotal修改,重新计算,不要累加 29 | const relateBillRes = await db.collection('bill-project').where({ 30 | billId 31 | }).get() 32 | console.log('relateBillRes', relateBillRes) 33 | const projectIds = Array.from(new Set(relateBillRes.data.map(item => item.projectId))) 34 | const projectRes = await db.collection('project').where({ 35 | _id: _.in(projectIds), 36 | deleted: false 37 | }).get() 38 | console.log('projectRes', projectRes) 39 | const projectList = projectRes.data 40 | let total = 0 41 | projectList.forEach(p => { 42 | let payItemTotal = 0 43 | if (p.payItem instanceof Array) { 44 | p.payItem.forEach(pItem => { 45 | payItemTotal += Number(pItem.value) 46 | }) 47 | } 48 | total += Number(p.price) || payItemTotal 49 | }) 50 | // 更新bill的total 51 | db.collection('bill').doc(event.billId).update({ 52 | data: { 53 | paidTotal: Number(total).toFixed(2) 54 | } 55 | }) 56 | } -------------------------------------------------------------------------------- /miniprogram/app.json: -------------------------------------------------------------------------------- 1 | { 2 | "pages": [ 3 | "pages/group/group", 4 | "pages/groupDetail/groupDetail", 5 | "pages/billDetail/billDetail", 6 | "pages/login/login", 7 | "pages/result/result", 8 | "pages/updateLog/updateLog", 9 | "pages/help/help", 10 | "pages/personal/personal", 11 | "pages/share/share" 12 | ], 13 | "window": { 14 | "backgroundColor": "#fff", 15 | "backgroundTextStyle": "light", 16 | "navigationBarBackgroundColor": "#fff", 17 | "navigationBarTitleText": "一起算账", 18 | "navigationBarTextStyle": "black", 19 | "navigationStyle": "custom", 20 | "enablePullDownRefresh": false 21 | }, 22 | "cloud": true, 23 | "usingComponents": { 24 | "van-button": "./pages/dist/button/index", 25 | "van-dialog": "./pages/dist/dialog/index", 26 | "van-field": "./pages/dist/field/index", 27 | "van-tag": "./pages/dist/tag/index", 28 | "van-icon": "./pages/dist/icon/index", 29 | "van-notify": "./pages/dist/notify/index", 30 | "van-submit-bar": "./pages/dist/submit-bar/index", 31 | "van-action-sheet": "./pages/dist/action-sheet/index", 32 | "van-cell-group": "./pages/dist/cell-group/index", 33 | "van-cell": "./pages/dist/cell/index", 34 | "van-tree-select": "./pages/dist/tree-select/index", 35 | "van-datetime-picker": "./pages/dist/datetime-picker/index", 36 | "van-popup": "./pages/dist/popup/index", 37 | "van-rate": "./pages/dist/rate/index", 38 | "van-collapse": "./pages/dist/collapse/index", 39 | "van-collapse-item": "./pages/dist/collapse-item/index", 40 | "van-panel": "./pages/dist/panel/index", 41 | "nav": "./pages/nav/nav", 42 | "avatar": "./components/avatar/avatar", 43 | "van-tab": "./pages/dist/tab/index", 44 | "van-tabs": "./pages/dist/tabs/index" 45 | }, 46 | "sitemapLocation": "sitemap.json", 47 | "navigateToMiniProgramAppIdList": ["wxda00e9b7cd5f39b1", "wxf3515fa60b618cd5"] 48 | } -------------------------------------------------------------------------------- /miniprogram/pages/dist/mixins/transition.js: -------------------------------------------------------------------------------- 1 | export var transition = function transition(showDefaultValue) { 2 | return Behavior({ 3 | properties: { 4 | customStyle: String, 5 | show: { 6 | type: Boolean, 7 | value: showDefaultValue, 8 | observer: 'observeShow' 9 | }, 10 | duration: { 11 | type: Number, 12 | value: 300 13 | } 14 | }, 15 | data: { 16 | type: '', 17 | inited: false, 18 | display: false, 19 | supportAnimation: true 20 | }, 21 | attached: function attached() { 22 | if (this.data.show) { 23 | this.show(); 24 | } 25 | 26 | this.detectSupport(); 27 | }, 28 | methods: { 29 | detectSupport: function detectSupport() { 30 | var _this = this; 31 | 32 | wx.getSystemInfo({ 33 | success: function success(info) { 34 | if (info && info.system && info.system.indexOf('iOS 8') === 0) { 35 | _this.set({ 36 | supportAnimation: false 37 | }); 38 | } 39 | } 40 | }); 41 | }, 42 | observeShow: function observeShow(value) { 43 | if (value) { 44 | this.show(); 45 | } else { 46 | if (this.data.supportAnimation) { 47 | this.set({ 48 | type: 'leave' 49 | }); 50 | } else { 51 | this.set({ 52 | display: false 53 | }); 54 | } 55 | } 56 | }, 57 | show: function show() { 58 | this.set({ 59 | inited: true, 60 | display: true, 61 | type: 'enter' 62 | }); 63 | }, 64 | onAnimationEnd: function onAnimationEnd() { 65 | if (!this.data.show) { 66 | this.set({ 67 | display: false 68 | }); 69 | } 70 | } 71 | } 72 | }); 73 | }; -------------------------------------------------------------------------------- /cloudfunctions/getProject/index.js: -------------------------------------------------------------------------------- 1 | // 云函数入口文件 2 | const cloud = require('wx-server-sdk') 3 | 4 | cloud.init() 5 | const db = cloud.database() 6 | const _ = db.command 7 | // 云函数入口函数 8 | exports.main = async (event, context) => { 9 | const wxContext = cloud.getWXContext() 10 | cloud.updateConfig({ 11 | env: wxContext.ENV === 'local' ? 'account-release-73522d' : wxContext.ENV, 12 | }) 13 | // 初始化数据库 14 | const db = cloud.database({ 15 | env: wxContext.ENV === 'local' ? 'account-release-73522d' : wxContext.ENV, 16 | }) 17 | const openId = cloud.getWXContext().OPENID 18 | 19 | let relateProjectList = await db.collection('bill-project') 20 | .where({ 21 | billId: event.billId 22 | }) 23 | .get() 24 | let returnResult = [] 25 | const projectIds = Array.from(new Set(relateProjectList.data.map(item => item.projectId))) 26 | const projectRes = await db.collection('project').where({ 27 | _id: _.in(projectIds), 28 | deleted: false 29 | }) 30 | .get() 31 | const projectList = projectRes.data 32 | let userIds = [] 33 | projectList.forEach(p => { 34 | userIds.push(...p.containUser) 35 | userIds.push(p.createBy) 36 | }) 37 | userIds = Array.from(new Set(userIds)) 38 | console.log('看看处理的userId', userIds) 39 | const userRes = await db.collection('user').where({ 40 | openId: _.in(userIds) 41 | }).get() 42 | const userList = userRes.data 43 | const fillUser = openId => { 44 | const matchUser = userList.filter(u => u.openId === openId) 45 | if (matchUser.length) { 46 | return matchUser[0] 47 | } 48 | return openId 49 | } 50 | let i = -1 51 | while(++i < projectList.length) { 52 | const project = projectList[i] 53 | project.createBy = fillUser(project.createBy) 54 | project.containUser = project.containUser.map(p => fillUser(p)) 55 | returnResult.push(project) 56 | } 57 | return returnResult.sort((a, b) => a.paidDate < b.paidDate ? 1 : -1) 58 | } -------------------------------------------------------------------------------- /miniprogram/pages/dist/progress/index.js: -------------------------------------------------------------------------------- 1 | import { VantComponent } from '../common/component'; 2 | import { BLUE } from '../common/color'; 3 | VantComponent({ 4 | props: { 5 | inactive: Boolean, 6 | percentage: Number, 7 | pivotText: String, 8 | pivotColor: String, 9 | showPivot: { 10 | type: Boolean, 11 | value: true 12 | }, 13 | color: { 14 | type: String, 15 | value: BLUE 16 | }, 17 | textColor: { 18 | type: String, 19 | value: '#fff' 20 | } 21 | }, 22 | data: { 23 | pivotWidth: 0, 24 | progressWidth: 0 25 | }, 26 | watch: { 27 | pivotText: 'getWidth', 28 | showPivot: 'getWidth' 29 | }, 30 | computed: { 31 | portionStyle: function portionStyle() { 32 | var width = (this.data.progressWidth - this.data.pivotWidth) * this.data.percentage / 100 + 'px'; 33 | var background = this.getCurrentColor(); 34 | return "width: " + width + "; background: " + background + "; "; 35 | }, 36 | pivotStyle: function pivotStyle() { 37 | var color = this.data.textColor; 38 | var background = this.data.pivotColor || this.getCurrentColor(); 39 | return "color: " + color + "; background: " + background; 40 | }, 41 | text: function text() { 42 | return this.data.pivotText || this.data.percentage + '%'; 43 | } 44 | }, 45 | mounted: function mounted() { 46 | this.getWidth(); 47 | }, 48 | methods: { 49 | getCurrentColor: function getCurrentColor() { 50 | return this.data.inactive ? '#cacaca' : this.data.color; 51 | }, 52 | getWidth: function getWidth() { 53 | var _this = this; 54 | 55 | this.getRect('.van-progress').then(function (rect) { 56 | _this.set({ 57 | progressWidth: rect.width 58 | }); 59 | }); 60 | this.getRect('.van-progress__pivot').then(function (rect) { 61 | _this.set({ 62 | pivotWidth: rect.width || 0 63 | }); 64 | }); 65 | } 66 | } 67 | }); -------------------------------------------------------------------------------- /project.private.config.json: -------------------------------------------------------------------------------- 1 | { 2 | "setting": {}, 3 | "condition": { 4 | "plugin": { 5 | "list": [] 6 | }, 7 | "game": { 8 | "list": [] 9 | }, 10 | "gamePlugin": { 11 | "list": [] 12 | }, 13 | "miniprogram": { 14 | "list": [ 15 | { 16 | "id": -1, 17 | "name": "db guide", 18 | "pathName": "pages/databaseGuide/databaseGuide", 19 | "query": "" 20 | }, 21 | { 22 | "id": -1, 23 | "name": "组", 24 | "pathName": "pages/group/group", 25 | "query": "" 26 | }, 27 | { 28 | "name": "share", 29 | "pathName": "pages/share/share", 30 | "query": "groupId=2d44d6c2615c71f11165651567797dd9&inviter=GzhiYi&avatarUrl=https://wx.qlogo.cn/mmopen/vi_32/KanL6870JUe4WvJlKDGDYYicgZibo9XOrm7WPEKwOB9pqnUV0Cv9EOZfPAH3WulBWYl5NSJA8ICSqSts5v6Cy92A/132&groupName=7B304", 31 | "scene": null 32 | }, 33 | { 34 | "id": -1, 35 | "name": "login", 36 | "pathName": "pages/login/login", 37 | "query": "" 38 | }, 39 | { 40 | "name": "结果页面", 41 | "pathName": "pages/result/result", 42 | "query": "billId=14139e12615c7537114140866b9261fd", 43 | "scene": null 44 | }, 45 | { 46 | "id": -1, 47 | "name": "billDetail页", 48 | "pathName": "pages/billDetail/billDetail", 49 | "query": "" 50 | }, 51 | { 52 | "id": -1, 53 | "name": "结果页面", 54 | "pathName": "pages/personal/personal", 55 | "query": "" 56 | }, 57 | { 58 | "id": -1, 59 | "name": "个人页面", 60 | "pathName": "pages/personal/personal", 61 | "query": "" 62 | }, 63 | { 64 | "id": -1, 65 | "name": "帮助页面", 66 | "pathName": "pages/help/help", 67 | "query": "" 68 | } 69 | ] 70 | } 71 | } 72 | } -------------------------------------------------------------------------------- /miniprogram/pages/nav/nav.js: -------------------------------------------------------------------------------- 1 | Component({ 2 | externalClasses: ['my-class', 'my-icon-class'], 3 | options: { 4 | multipleSlots: true 5 | }, 6 | properties: { 7 | bgColor: { 8 | type: String, 9 | value: 'rgba(0,0,0,0)' 10 | }, 11 | showIcons: { 12 | type: Array 13 | } 14 | }, 15 | data: { 16 | showLoadingIcon: false, 17 | showBackIcon: false, 18 | showHomeIcons: false, 19 | isEscape: getApp().globalData.isEscape, 20 | showTheme: true 21 | }, 22 | ready() { 23 | let { 24 | statusBarHeight, 25 | navBarHeight 26 | } = getApp().globalData 27 | const { showIcons } = this.data 28 | this.setData({ 29 | statusBarHeight, 30 | navBarHeight, 31 | showBackIcon: showIcons.includes('back'), 32 | showHomeIcons: showIcons.includes('home'), 33 | showTheme: [1, 2, 3, '1', '2', '3'].includes(wx.getStorageSync('openCount')) 34 | }) 35 | }, 36 | attached() { 37 | }, 38 | detached() { 39 | this.hideLoading() 40 | }, 41 | methods: { 42 | back() { 43 | wx.navigateBack({ 44 | delta: 1, 45 | fail(error) { 46 | wx.redirectTo({ 47 | url: '/pages/group/group', 48 | }) 49 | } 50 | }) 51 | }, 52 | /** 53 | * 开始旋转 54 | */ 55 | showLoading() { 56 | var that = this; 57 | this.setData({ 58 | showLoadingIcon: true 59 | }) 60 | }, 61 | 62 | /** 63 | * 停止旋转 64 | */ 65 | hideLoading() { 66 | this.setData({ 67 | showLoadingIcon: false 68 | }) 69 | }, 70 | goTo(event) { 71 | const { page } = event.currentTarget.dataset 72 | if (page === 'personal') { 73 | if (!getApp().checkAuth()) { 74 | return 75 | } 76 | } 77 | wx.navigateTo({ 78 | url: `/pages/${page}/${page}` 79 | }) 80 | }, 81 | inDev() { 82 | wx.showToast({ 83 | title: '功能正在开发中...', 84 | icon: 'none' 85 | }) 86 | }, 87 | newGroup() { 88 | getCurrentPages()[0].showNewGroupModal() 89 | } 90 | } 91 | }) -------------------------------------------------------------------------------- /cloudfunctions/createProject/index.js: -------------------------------------------------------------------------------- 1 | // 云函数入口文件 2 | const cloud = require('wx-server-sdk') 3 | 4 | cloud.init() 5 | const db = cloud.database() 6 | const _ = db.command 7 | // 云函数入口函数 8 | exports.main = async (event, context) => { 9 | const wxContext = cloud.getWXContext() 10 | const { OPENID } = wxContext 11 | cloud.updateConfig({ 12 | env: wxContext.ENV === 'local' ? 'account-release-73522d' : wxContext.ENV, 13 | }) 14 | // 初始化数据库 15 | const db = cloud.database({ 16 | env: wxContext.ENV === 'local' ? 'account-release-73522d' : wxContext.ENV, 17 | }) 18 | const { userInfo, projectTitle, projectPrice, groupId, billId, payType, payItem,containUser, paidDate } = event 19 | const res = await db.collection('project').add({ 20 | data: { 21 | title: projectTitle, 22 | createBy: OPENID, 23 | paidDate, 24 | deleted: false, 25 | groupId, 26 | price: projectPrice, 27 | type: payType == 0 ? 'paid' : 'item', 28 | containUser, 29 | payItem 30 | } 31 | }) 32 | const addRes = await db.collection('bill-project').add({ 33 | data: { 34 | projectId: res._id, 35 | billId 36 | } 37 | }) 38 | // 将bill表对应的paidTotal修改,重新计算,不要累加 39 | const relateBillRes = await db.collection('bill-project').where({ 40 | billId 41 | }).get() 42 | console.log('relateBillRes', relateBillRes) 43 | const projectIds = Array.from(new Set(relateBillRes.data.map(item => item.projectId))) 44 | const projectRes = await db.collection('project').where({ 45 | _id: _.in(projectIds), 46 | deleted: false 47 | }).get() 48 | console.log('projectRes', projectRes) 49 | const projectList = projectRes.data 50 | let total = 0 51 | projectList.forEach(p => { 52 | let payItemTotal = 0 53 | if (p.payItem instanceof Array) { 54 | p.payItem.forEach(pItem => { 55 | payItemTotal += Number(pItem.value) 56 | }) 57 | } 58 | total += Number(p.price) || payItemTotal 59 | }) 60 | // 更新bill的total 61 | await db.collection('bill').doc(event.billId).update({ 62 | data: { 63 | paidTotal: Number(total).toFixed(2) 64 | } 65 | }) 66 | } -------------------------------------------------------------------------------- /miniprogram/pages/dist/tree-select/index.js: -------------------------------------------------------------------------------- 1 | import { VantComponent } from '../common/component'; 2 | var ITEM_HEIGHT = 44; 3 | VantComponent({ 4 | props: { 5 | items: Array, 6 | mainActiveIndex: { 7 | type: Number, 8 | value: 0 9 | }, 10 | activeId: { 11 | type: Number, 12 | value: 0 13 | }, 14 | maxHeight: { 15 | type: Number, 16 | value: 300 17 | } 18 | }, 19 | data: { 20 | subItems: [], 21 | mainHeight: 0, 22 | itemHeight: 0 23 | }, 24 | watch: { 25 | items: function items() { 26 | this.updateSubItems(); 27 | this.updateMainHeight(); 28 | }, 29 | maxHeight: function maxHeight() { 30 | this.updateItemHeight(); 31 | this.updateMainHeight(); 32 | }, 33 | mainActiveIndex: 'updateSubItems' 34 | }, 35 | methods: { 36 | // 当一个子项被选择时 37 | onSelectItem: function onSelectItem(event) { 38 | var item = event.currentTarget.dataset.item; 39 | 40 | if (!item.disabled) { 41 | this.$emit('click-item', item); 42 | } 43 | }, 44 | // 当一个导航被点击时 45 | onClickNav: function onClickNav(event) { 46 | var index = event.currentTarget.dataset.index; 47 | this.$emit('click-nav', { 48 | index: index 49 | }); 50 | }, 51 | // 更新子项列表 52 | updateSubItems: function updateSubItems() { 53 | var selectedItem = this.data.items[this.data.mainActiveIndex] || {}; 54 | this.set({ 55 | subItems: selectedItem.children || [] 56 | }); 57 | this.updateItemHeight(); 58 | }, 59 | // 更新组件整体高度,根据最大高度和当前组件需要展示的高度来决定 60 | updateMainHeight: function updateMainHeight() { 61 | var maxHeight = Math.max(this.data.items.length * ITEM_HEIGHT, this.data.subItems.length * ITEM_HEIGHT); 62 | this.set({ 63 | mainHeight: Math.min(maxHeight, this.data.maxHeight) 64 | }); 65 | }, 66 | // 更新子项列表高度,根据可展示的最大高度和当前子项列表的高度决定 67 | updateItemHeight: function updateItemHeight() { 68 | this.set({ 69 | itemHeight: Math.min(this.data.subItems.length * ITEM_HEIGHT, this.data.maxHeight) 70 | }); 71 | } 72 | } 73 | }); -------------------------------------------------------------------------------- /miniprogram/pages/dist/dialog/dialog.js: -------------------------------------------------------------------------------- 1 | function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } 2 | 3 | var queue = []; 4 | 5 | function getContext() { 6 | var pages = getCurrentPages(); 7 | return pages[pages.length - 1]; 8 | } 9 | 10 | var Dialog = function Dialog(options) { 11 | options = _extends({}, Dialog.currentOptions, options); 12 | return new Promise(function (resolve, reject) { 13 | var context = options.context || getContext(); 14 | var dialog = context.selectComponent(options.selector); 15 | delete options.selector; 16 | 17 | if (dialog) { 18 | dialog.set(_extends({ 19 | onCancel: reject, 20 | onConfirm: resolve 21 | }, options)); 22 | queue.push(dialog); 23 | } else { 24 | console.warn('未找到 van-dialog 节点,请确认 selector 及 context 是否正确'); 25 | } 26 | }); 27 | }; 28 | 29 | Dialog.defaultOptions = { 30 | show: true, 31 | title: '', 32 | message: '', 33 | zIndex: 100, 34 | overlay: true, 35 | asyncClose: false, 36 | transition: 'scale', 37 | selector: '#van-dialog', 38 | confirmButtonText: '确认', 39 | cancelButtonText: '取消', 40 | showConfirmButton: true, 41 | showCancelButton: false, 42 | closeOnClickOverlay: false, 43 | confirmButtonOpenType: '' 44 | }; 45 | Dialog.alert = Dialog; 46 | 47 | Dialog.confirm = function (options) { 48 | return Dialog(_extends({ 49 | showCancelButton: true 50 | }, options)); 51 | }; 52 | 53 | Dialog.close = function () { 54 | queue.forEach(function (dialog) { 55 | dialog.close(); 56 | }); 57 | queue = []; 58 | }; 59 | 60 | Dialog.stopLoading = function () { 61 | queue.forEach(function (dialog) { 62 | dialog.stopLoading(); 63 | }); 64 | }; 65 | 66 | Dialog.setDefaultOptions = function (options) { 67 | Object.assign(Dialog.currentOptions, options); 68 | }; 69 | 70 | Dialog.resetDefaultOptions = function () { 71 | Dialog.currentOptions = _extends({}, Dialog.defaultOptions); 72 | }; 73 | 74 | Dialog.resetDefaultOptions(); 75 | export default Dialog; -------------------------------------------------------------------------------- /miniprogram/pages/dist/loading/index.wxss: -------------------------------------------------------------------------------- 1 | @import '../common/index.wxss';.van-loading{z-index:0;font-size:0;line-height:0;position:relative;display:inline-block;vertical-align:middle}.van-loading__spinner{z-index:-1;width:100%;height:100%;position:relative;display:inline-block;box-sizing:border-box;-webkit-animation:van-rotate .8s linear infinite;animation:van-rotate .8s linear infinite}.van-loading__spinner--spinner{-webkit-animation-timing-function:steps(12);animation-timing-function:steps(12)}.van-loading__spinner--circular{border:1px solid;border-radius:100%;border-color:currentColor;border-top-color:transparent}.van-loading__dot{top:0;left:0;width:100%;height:100%;position:absolute}.van-loading__dot::before{width:2px;height:25%;content:' ';display:block;margin:0 auto;border-radius:40%;background-color:currentColor}.van-loading__dot:nth-of-type(1){opacity:1;-webkit-transform:rotate(30deg);transform:rotate(30deg)}.van-loading__dot:nth-of-type(2){opacity:.9375;-webkit-transform:rotate(60deg);transform:rotate(60deg)}.van-loading__dot:nth-of-type(3){opacity:.875;-webkit-transform:rotate(90deg);transform:rotate(90deg)}.van-loading__dot:nth-of-type(4){opacity:.8125;-webkit-transform:rotate(120deg);transform:rotate(120deg)}.van-loading__dot:nth-of-type(5){opacity:.75;-webkit-transform:rotate(150deg);transform:rotate(150deg)}.van-loading__dot:nth-of-type(6){opacity:.6875;-webkit-transform:rotate(180deg);transform:rotate(180deg)}.van-loading__dot:nth-of-type(7){opacity:.625;-webkit-transform:rotate(210deg);transform:rotate(210deg)}.van-loading__dot:nth-of-type(8){opacity:.5625;-webkit-transform:rotate(240deg);transform:rotate(240deg)}.van-loading__dot:nth-of-type(9){opacity:.5;-webkit-transform:rotate(270deg);transform:rotate(270deg)}.van-loading__dot:nth-of-type(10){opacity:.4375;-webkit-transform:rotate(300deg);transform:rotate(300deg)}.van-loading__dot:nth-of-type(11){opacity:.375;-webkit-transform:rotate(330deg);transform:rotate(330deg)}.van-loading__dot:nth-of-type(12){opacity:.3125;-webkit-transform:rotate(360deg);transform:rotate(360deg)}@-webkit-keyframes van-rotate{from{-webkit-transform:rotate(0);transform:rotate(0)}to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes van-rotate{from{-webkit-transform:rotate(0);transform:rotate(0)}to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}} -------------------------------------------------------------------------------- /miniprogram/pages/group/group.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 我的{{isEscape ? '群组' : '账单'}} 7 | 8 | 15 | {{item.name}} 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 添加到我的小程序,使用更方便 27 | 28 | 29 | 30 | 31 | 32 | 觉得好用的话,转发让更多小伙伴加入吧! 33 | 34 | 35 | 36 | 37 | 46 | 47 | 55 | 56 | {{isEscape ? '新建后进入群组通过邀请让好友加入,一起记账。别忘记邀请好友一起哦~' : '新建一个账单组用于汇集你所创建的账单吧~'}} 57 | 58 | 59 | 60 | 61 | -------------------------------------------------------------------------------- /miniprogram/pages/groupDetail/groupDetail.wxss: -------------------------------------------------------------------------------- 1 | /* pages/group/group.wxss */ 2 | page { 3 | height: 100%; 4 | } 5 | .group-detail-body { 6 | width: 100%; 7 | height:100%; 8 | padding: 40rpx 0; 9 | overflow-x: hidden; 10 | overflow-y: auto; 11 | } 12 | .group-detail { 13 | width:90%; 14 | margin: 0 auto 20rpx; 15 | border-radius:20rpx; 16 | } 17 | .group-basic { 18 | padding:20rpx 20rpx 15rpx; 19 | display:flex; 20 | justify-content:space-between; 21 | } 22 | .group-basic-right { 23 | text-align:right; 24 | } 25 | .group-basic .man-count { 26 | font-size: 30rpx; 27 | color: #333; 28 | } 29 | .group-basic .name { 30 | font-size:50rpx; 31 | width:480rpx; 32 | font-weight:bold; 33 | display:flex; 34 | align-items:center; 35 | } 36 | .user-avatar { 37 | width:70rpx; 38 | height:70rpx; 39 | border-radius: 50%; 40 | } 41 | .group-createtime { 42 | font-size:24rpx; 43 | color:#444; 44 | text-align:right; 45 | width:100%; 46 | margin-top:12rpx; 47 | } 48 | .paid-total { 49 | font-size: 26rpx; 50 | color: #313131; 51 | margin-right: 15rpx; 52 | } 53 | .setting { 54 | width: 90%; 55 | margin: 0 auto; 56 | padding: 20rpx; 57 | } 58 | .delete-dialog-body { 59 | text-align: center; 60 | padding: 40rpx; 61 | } 62 | .one-avatar { 63 | width: 100rpx; 64 | height: 100rpx; 65 | position: relative; 66 | margin:10rpx 15rpx 25rpx; 67 | } 68 | .check-list { 69 | display:flex; 70 | flex-wrap:wrap; 71 | align-items: center; 72 | justify-content:center; 73 | padding:10rpx 0 29rpx; 74 | text-align:center; 75 | } 76 | .user-avatar-list { 77 | width: 80rpx; 78 | height: 80rpx; 79 | border-radius: 50%; 80 | } 81 | .user-checked { 82 | position: absolute; 83 | z-index: 10; 84 | right:13rpx; 85 | top:-10rpx; 86 | } 87 | .user-name { 88 | font-size:23rpx; 89 | text-overflow: ellipsis; 90 | white-space: nowrap; 91 | overflow: hidden; 92 | text-align:center; 93 | } 94 | .feedback { 95 | border-radius: 20rpx; 96 | } 97 | .menu-body { 98 | padding: 40rpx 40rpx 20rpx; 99 | text-align: center; 100 | } 101 | .input-feedback { 102 | min-height:300rpx; 103 | } -------------------------------------------------------------------------------- /miniprogram/pages/result/result.wxss: -------------------------------------------------------------------------------- 1 | .personal { 2 | width: 100%; 3 | height: 100vh; 4 | overflow-x: hidden; 5 | overflow-y: auto; 6 | } 7 | .mp-info { 8 | display:flex; 9 | flex-direction:column; 10 | text-align:center; 11 | justify-content: center; 12 | align-items: center; 13 | } 14 | .mp-info .icon { 15 | height: 100rpx; 16 | width: 100rpx; 17 | border-radius: 50%; 18 | margin: 20rpx; 19 | margin-top:-88rpx; 20 | } 21 | .sum { 22 | color:#555; 23 | font-size:26rpx; 24 | } 25 | .one-avatar { 26 | height: 100rpx; 27 | position: relative; 28 | margin: 10rpx 15rpx; 29 | text-align:center; 30 | } 31 | .check-list1 { 32 | display:flex; 33 | flex-wrap:wrap; 34 | justify-content:space-between; 35 | flex-direction:column; 36 | align-items: center; 37 | padding: 6rpx 21rpx; 38 | width:246rpx; 39 | margin-bottom:20rpx; 40 | background-color: #fff; 41 | border-radius:38rpx; 42 | transition: .5s all; 43 | } 44 | .check-me-receive { 45 | width:100%; 46 | background:rgba(40, 167, 70, 0.304); 47 | box-shadow:0px 5px 12px 0px rgba(40, 167, 70, 0.304) !important; 48 | border: 1px solid rgb(30, 131, 53); 49 | } 50 | .check-me-pay { 51 | width: 100%; 52 | background: rgba(220, 53, 70, 0.304); 53 | box-shadow: 0px 5px 12px 0px rgba(220, 53, 70, 0.304) !important; 54 | border: 1px solid #dc3545; 55 | } 56 | .user-avatar-list { 57 | width: 80rpx; 58 | height: 80rpx; 59 | border-radius: 50%; 60 | } 61 | .user-name { 62 | font-size:23rpx; 63 | text-align:center; 64 | text-overflow: ellipsis; 65 | white-space: nowrap; 66 | overflow: hidden; 67 | width:246rpx; 68 | } 69 | 70 | .bill-result { 71 | display:flex; 72 | justify-content:space-between; 73 | flex-wrap:wrap; 74 | padding: 10rpx 40rpx 40rpx; 75 | } 76 | 77 | .result-word { 78 | font-size: 33rpx; 79 | } 80 | .up { 81 | color: #28a745; 82 | margin-right:7rpx 83 | } 84 | .down { 85 | color: #dc3545; 86 | margin-right:7rpx 87 | } 88 | 89 | .setting { 90 | width: 90%; 91 | margin: 0 auto; 92 | padding: 20rpx; 93 | } 94 | .result-tips { 95 | font-size:23rpx; 96 | text-align:center; 97 | width:100%; 98 | margin:10rpx 0 0; 99 | color:#555; 100 | } 101 | .space { 102 | height: 230rpx; 103 | width: 100%; 104 | } --------------------------------------------------------------------------------