├── Backend ├── static │ └── .gitkeep ├── src │ ├── views │ │ ├── layout │ │ │ ├── components │ │ │ │ ├── index.js │ │ │ │ ├── Sidebar │ │ │ │ │ ├── Item.vue │ │ │ │ │ ├── Link.vue │ │ │ │ │ └── index.vue │ │ │ │ └── AppMain.vue │ │ │ └── mixin │ │ │ │ └── ResizeHandler.js │ │ └── dashboard │ │ │ └── index.vue │ ├── styles │ │ ├── variables.scss │ │ ├── mixin.scss │ │ ├── element-ui.scss │ │ ├── transition.scss │ │ └── index.scss │ ├── api │ │ └── bmobConfig.js │ ├── icons │ │ ├── svg │ │ │ ├── link.svg │ │ │ ├── user.svg │ │ │ ├── example.svg │ │ │ ├── table.svg │ │ │ ├── password.svg │ │ │ ├── nested.svg │ │ │ ├── eye.svg │ │ │ └── tree.svg │ │ ├── index.js │ │ └── svgo.yml │ ├── store │ │ ├── getters.js │ │ ├── index.js │ │ └── modules │ │ │ └── app.js │ ├── utils │ │ └── auth.js │ ├── App.vue │ ├── components │ │ └── SvgIcon │ │ │ └── index.vue │ ├── main.js │ └── permission.js ├── .eslintignore ├── test │ ├── unit │ │ ├── setup.js │ │ ├── .eslintrc │ │ ├── specs │ │ │ └── HelloWorld.spec.js │ │ └── jest.conf.js │ └── e2e │ │ ├── specs │ │ └── test.js │ │ ├── custom-assertions │ │ └── elementCount.js │ │ ├── nightwatch.conf.js │ │ └── runner.js ├── config │ ├── prod.env.js │ ├── test.env.js │ └── dev.env.js ├── build │ ├── logo.png │ ├── vue-loader.conf.js │ ├── build.js │ └── check-versions.js ├── .editorconfig ├── .gitignore ├── .postcssrc.js ├── index.html ├── .babelrc └── README.md ├── WeChatApp ├── dist │ ├── slide │ │ ├── index.wxss │ │ ├── index.wxml │ │ ├── index.json │ │ └── index.js │ ├── sticky │ │ ├── index.wxss │ │ ├── index.json │ │ └── index.wxml │ ├── collapse │ │ ├── index.wxss │ │ ├── index.json │ │ ├── index.wxml │ │ └── index.js │ ├── count-down │ │ ├── index.wxss │ │ ├── index.json │ │ └── index.wxml │ ├── radio-group │ │ ├── index.wxss │ │ ├── index.wxml │ │ ├── index.json │ │ └── index.js │ ├── checkbox-group │ │ ├── index.wxss │ │ ├── index.wxml │ │ ├── index.json │ │ └── index.js │ ├── steps │ │ ├── index.wxss │ │ ├── index.json │ │ ├── index.wxml │ │ └── index.js │ ├── col │ │ ├── index.json │ │ ├── index.wxml │ │ └── index.js │ ├── tag │ │ ├── index.json │ │ ├── index.wxml │ │ ├── index.wxss │ │ └── index.js │ ├── avatar │ │ ├── index.json │ │ ├── index.wxml │ │ ├── index.js │ │ └── index.wxss │ ├── badge │ │ ├── index.json │ │ ├── index.wxml │ │ ├── index.wxss │ │ └── index.js │ ├── button │ │ ├── index.json │ │ ├── index.wxml │ │ └── index.wxss │ ├── cell │ │ ├── index.json │ │ ├── index.wxml │ │ └── index.wxss │ ├── drawer │ │ ├── index.json │ │ ├── index.wxml │ │ ├── index.wxss │ │ └── index.js │ ├── grid │ │ ├── index.json │ │ ├── index.wxml │ │ ├── index.wxss │ │ └── index.js │ ├── icon │ │ ├── index.json │ │ ├── index.wxml │ │ └── index.js │ ├── index │ │ ├── index.json │ │ ├── index.wxss │ │ └── index.wxml │ ├── input │ │ ├── index.json │ │ ├── index.wxml │ │ ├── index.wxss │ │ └── index.js │ ├── panel │ │ ├── index.json │ │ ├── index.wxml │ │ ├── index.js │ │ └── index.wxss │ ├── row │ │ ├── index.json │ │ ├── index.wxml │ │ ├── index.wxss │ │ └── index.js │ ├── spin │ │ ├── index.json │ │ ├── index.wxml │ │ ├── index.js │ │ └── index.wxss │ ├── switch │ │ ├── index.json │ │ ├── index.js │ │ ├── index.wxml │ │ └── index.wxss │ ├── tabs │ │ ├── index.json │ │ ├── index.wxml │ │ ├── index.wxss │ │ └── index.js │ ├── cell-group │ │ ├── index.json │ │ ├── index.wxml │ │ └── index.js │ ├── divider │ │ ├── index.json │ │ ├── index.wxss │ │ ├── index.js │ │ └── index.wxml │ ├── grid-icon │ │ ├── index.json │ │ ├── index.wxml │ │ ├── index.wxss │ │ └── index.js │ ├── grid-item │ │ ├── index.json │ │ ├── index.wxml │ │ ├── index.wxss │ │ └── index.js │ ├── grid-label │ │ ├── index.json │ │ ├── index.wxml │ │ ├── index.wxss │ │ └── index.js │ ├── index-item │ │ ├── index.json │ │ ├── index.wxss │ │ ├── index.wxml │ │ └── index.js │ ├── load-more │ │ ├── index.json │ │ ├── index.js │ │ ├── index.wxml │ │ └── index.wxss │ ├── message │ │ ├── index.json │ │ ├── index.wxml │ │ ├── index.wxss │ │ └── index.js │ ├── progress │ │ ├── index.json │ │ ├── index.wxml │ │ ├── index.js │ │ └── index.wxss │ ├── sticky-item │ │ ├── index.json │ │ ├── index.wxss │ │ ├── index.wxml │ │ └── index.js │ ├── tab-bar │ │ ├── index.json │ │ ├── index.wxml │ │ └── index.wxss │ ├── input-number │ │ ├── index.json │ │ ├── index.wxml │ │ └── index.wxss │ ├── rate │ │ ├── index.json │ │ ├── index.wxss │ │ └── index.wxml │ ├── tab │ │ ├── index.json │ │ ├── index.wxss │ │ ├── index.wxml │ │ └── index.js │ ├── toast │ │ ├── index.json │ │ ├── index.wxss │ │ ├── index.wxml │ │ └── index.js │ ├── page │ │ ├── index.json │ │ ├── index.wxss │ │ ├── index.js │ │ └── index.wxml │ ├── card │ │ ├── index.json │ │ ├── index.js │ │ ├── index.wxml │ │ └── index.wxss │ ├── collapse-item │ │ ├── index.json │ │ ├── index.wxss │ │ ├── index.wxml │ │ └── index.js │ ├── step │ │ ├── index.json │ │ ├── index.js │ │ └── index.wxss │ ├── alert │ │ ├── index.json │ │ ├── index.wxss │ │ ├── index.wxml │ │ └── index.js │ ├── checkbox │ │ ├── index.json │ │ ├── index.wxss │ │ ├── index.wxml │ │ └── index.js │ ├── radio │ │ ├── index.json │ │ ├── index.wxss │ │ └── index.wxml │ ├── notice-bar │ │ ├── index.json │ │ ├── index.wxss │ │ └── index.wxml │ ├── swipeout │ │ ├── index.json │ │ └── index.wxss │ ├── tab-bar-item │ │ ├── index.json │ │ ├── index.wxss │ │ ├── index.wxml │ │ └── index.js │ ├── action-sheet │ │ ├── index.json │ │ ├── index.js │ │ ├── index.wxml │ │ └── index.wxss │ ├── modal │ │ ├── index.json │ │ └── index.js │ └── base │ │ └── index.js ├── pages │ ├── index │ │ ├── index.json │ │ ├── index.wxml │ │ └── index.js │ ├── result │ │ ├── index.json │ │ ├── index.wxss │ │ ├── index.wxml │ │ └── index.js │ ├── answerErr │ │ ├── index.wxss │ │ ├── index.json │ │ ├── index.wxml │ │ └── index.js │ ├── historyList │ │ ├── index.wxss │ │ ├── index.json │ │ ├── index.wxml │ │ └── index.js │ ├── logs │ │ ├── logs.json │ │ ├── logs.wxss │ │ ├── logs.wxml │ │ └── logs.js │ ├── wrong │ │ ├── index.json │ │ ├── index.wxml │ │ ├── index.wxss │ │ └── index.js │ ├── select │ │ ├── index.json │ │ ├── index.wxml │ │ ├── index.wxss │ │ └── index.js │ ├── rank │ │ ├── index.json │ │ ├── index.wxml │ │ ├── index.wxss │ │ └── index.js │ ├── history │ │ ├── index.json │ │ ├── index.js │ │ ├── index.wxml │ │ └── index.wxss │ ├── rankList │ │ ├── index.json │ │ ├── index.js │ │ ├── index.wxml │ │ └── index.wxss │ ├── answerInfo │ │ ├── index.json │ │ ├── index.wxml │ │ ├── index.js │ │ └── index.wxss │ ├── feedback │ │ ├── index.json │ │ ├── index.wxml │ │ ├── index.wxss │ │ └── index.js │ ├── my │ │ ├── index.json │ │ ├── index.js │ │ ├── index.wxss │ │ └── index.wxml │ ├── wrongAnswer │ │ └── index.json │ ├── analysis │ │ └── index.json │ └── answer │ │ └── index.json ├── wux │ ├── radio-group │ │ ├── index.wxss │ │ ├── index.json │ │ ├── index.wxml │ │ └── index.js │ ├── cell │ │ ├── index.json │ │ └── index.wxml │ ├── button │ │ ├── index.json │ │ └── index.wxml │ ├── cell-group │ │ ├── index.json │ │ ├── index.wxml │ │ ├── index.wxss │ │ └── index.js │ ├── animation-group │ │ ├── index.json │ │ └── index.wxml │ ├── radio │ │ ├── index.json │ │ ├── index.wxss │ │ └── index.wxml │ ├── result │ │ ├── index.json │ │ └── index.wxss │ ├── prompt │ │ ├── index.json │ │ ├── index.wxml │ │ └── index.wxss │ └── helpers │ │ ├── mergeOptionsToData.js │ │ ├── colors.js │ │ └── gestures.js ├── images │ ├── my.png │ ├── error.png │ ├── logo.png │ ├── rank.png │ ├── share.png │ ├── sort.png │ ├── wave.png │ ├── wrong.png │ ├── answer.png │ ├── nodata.png │ ├── select.png │ ├── title8.png │ ├── warning.png │ ├── my-select.png │ ├── sort-select.png │ ├── wrong-select.png │ ├── answer-select.png │ └── confirm-word1.png ├── app.wxss ├── project.config.json ├── app.js └── app.json └── README.md /Backend/static/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /WeChatApp/dist/slide/index.wxss: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /WeChatApp/dist/sticky/index.wxss: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /WeChatApp/dist/collapse/index.wxss: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /WeChatApp/dist/count-down/index.wxss: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /WeChatApp/dist/radio-group/index.wxss: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /WeChatApp/pages/index/index.json: -------------------------------------------------------------------------------- 1 | {} -------------------------------------------------------------------------------- /WeChatApp/pages/result/index.json: -------------------------------------------------------------------------------- 1 | {} -------------------------------------------------------------------------------- /WeChatApp/wux/radio-group/index.wxss: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /WeChatApp/dist/checkbox-group/index.wxss: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Backend/src/views/layout/components/index.js: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /WeChatApp/dist/steps/index.wxss: -------------------------------------------------------------------------------- 1 | .i-steps{width:100%} -------------------------------------------------------------------------------- /WeChatApp/dist/col/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "component": true 3 | } -------------------------------------------------------------------------------- /WeChatApp/dist/tag/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "component" : true 3 | } -------------------------------------------------------------------------------- /WeChatApp/pages/result/index.wxss: -------------------------------------------------------------------------------- 1 | /* pages/result/index.wxss */ -------------------------------------------------------------------------------- /WeChatApp/wux/cell/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "component": true 3 | } -------------------------------------------------------------------------------- /WeChatApp/dist/avatar/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "component": true 3 | } 4 | -------------------------------------------------------------------------------- /WeChatApp/dist/badge/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "component": true 3 | } 4 | -------------------------------------------------------------------------------- /WeChatApp/dist/button/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "component": true 3 | } 4 | -------------------------------------------------------------------------------- /WeChatApp/dist/cell/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "component": true 3 | } 4 | -------------------------------------------------------------------------------- /WeChatApp/dist/drawer/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "component": true 3 | } 4 | -------------------------------------------------------------------------------- /WeChatApp/dist/grid/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "component": true 3 | } 4 | -------------------------------------------------------------------------------- /WeChatApp/dist/icon/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "component": true 3 | } 4 | -------------------------------------------------------------------------------- /WeChatApp/dist/index/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "component": true 3 | } 4 | -------------------------------------------------------------------------------- /WeChatApp/dist/input/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "component": true 3 | } 4 | -------------------------------------------------------------------------------- /WeChatApp/dist/panel/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "component": true 3 | } 4 | -------------------------------------------------------------------------------- /WeChatApp/dist/row/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "component": true 3 | } 4 | -------------------------------------------------------------------------------- /WeChatApp/dist/spin/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "component": true 3 | } 4 | -------------------------------------------------------------------------------- /WeChatApp/dist/steps/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "component": true 3 | } 4 | -------------------------------------------------------------------------------- /WeChatApp/dist/sticky/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "component": true 3 | } 4 | -------------------------------------------------------------------------------- /WeChatApp/dist/switch/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "component": true 3 | } 4 | -------------------------------------------------------------------------------- /WeChatApp/dist/tabs/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "component": true 3 | } 4 | -------------------------------------------------------------------------------- /WeChatApp/pages/answerErr/index.wxss: -------------------------------------------------------------------------------- 1 | /* pages/answerErr/index.wxss */ -------------------------------------------------------------------------------- /WeChatApp/wux/button/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "component": true 3 | } -------------------------------------------------------------------------------- /WeChatApp/wux/cell-group/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "component": true 3 | } -------------------------------------------------------------------------------- /WeChatApp/dist/cell-group/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "component": true 3 | } 4 | -------------------------------------------------------------------------------- /WeChatApp/dist/collapse/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "component": true 3 | } 4 | -------------------------------------------------------------------------------- /WeChatApp/dist/divider/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "component": true 3 | } 4 | -------------------------------------------------------------------------------- /WeChatApp/dist/grid-icon/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "component": true 3 | } 4 | -------------------------------------------------------------------------------- /WeChatApp/dist/grid-item/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "component": true 3 | } 4 | -------------------------------------------------------------------------------- /WeChatApp/dist/grid-label/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "component": true 3 | } 4 | -------------------------------------------------------------------------------- /WeChatApp/dist/index-item/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "component": true 3 | } 4 | -------------------------------------------------------------------------------- /WeChatApp/dist/load-more/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "component": true 3 | } 4 | -------------------------------------------------------------------------------- /WeChatApp/dist/message/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "component": true 3 | } 4 | -------------------------------------------------------------------------------- /WeChatApp/dist/progress/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "component": true 3 | } 4 | -------------------------------------------------------------------------------- /WeChatApp/dist/sticky-item/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "component": true 3 | } 4 | -------------------------------------------------------------------------------- /WeChatApp/dist/tab-bar/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "component": true 3 | } 4 | -------------------------------------------------------------------------------- /WeChatApp/pages/historyList/index.wxss: -------------------------------------------------------------------------------- 1 | /* pages/historyList/index.wxss */ -------------------------------------------------------------------------------- /WeChatApp/wux/animation-group/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "component": true 3 | } -------------------------------------------------------------------------------- /WeChatApp/dist/count-down/index.json: -------------------------------------------------------------------------------- 1 | 2 | { 3 | "component": true 4 | } 5 | -------------------------------------------------------------------------------- /WeChatApp/dist/input-number/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "component": true 3 | } 4 | -------------------------------------------------------------------------------- /WeChatApp/dist/row/index.wxml: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /WeChatApp/dist/row/index.wxss: -------------------------------------------------------------------------------- 1 | .i-row:after{content:"";display:table;clear:both} -------------------------------------------------------------------------------- /WeChatApp/pages/logs/logs.json: -------------------------------------------------------------------------------- 1 | { 2 | "navigationBarTitleText": "查看启动日志" 3 | } -------------------------------------------------------------------------------- /WeChatApp/pages/wrong/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "navigationBarTitleText": "错题" 3 | } -------------------------------------------------------------------------------- /WeChatApp/dist/grid/index.wxml: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /WeChatApp/pages/select/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "navigationBarTitleText": "答题" 3 | } -------------------------------------------------------------------------------- /Backend/.eslintignore: -------------------------------------------------------------------------------- 1 | /build/ 2 | /config/ 3 | /dist/ 4 | /*.js 5 | /test/unit/coverage/ 6 | -------------------------------------------------------------------------------- /WeChatApp/dist/grid-icon/index.wxml: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /WeChatApp/dist/grid-label/index.wxml: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Backend/test/unit/setup.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | 3 | Vue.config.productionTip = false 4 | -------------------------------------------------------------------------------- /Backend/config/prod.env.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | module.exports = { 3 | NODE_ENV: '"production"' 4 | } 5 | -------------------------------------------------------------------------------- /WeChatApp/dist/count-down/index.wxml: -------------------------------------------------------------------------------- 1 | 2 | {{time}} 3 | 4 | 5 | -------------------------------------------------------------------------------- /WeChatApp/dist/steps/index.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /WeChatApp/dist/sticky/index.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /Backend/build/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sky8652/QuestionWeChatApp/HEAD/Backend/build/logo.png -------------------------------------------------------------------------------- /WeChatApp/dist/cell-group/index.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /WeChatApp/images/my.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sky8652/QuestionWeChatApp/HEAD/WeChatApp/images/my.png -------------------------------------------------------------------------------- /Backend/test/unit/.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "env": { 3 | "jest": true 4 | }, 5 | "globals": { 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /WeChatApp/images/error.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sky8652/QuestionWeChatApp/HEAD/WeChatApp/images/error.png -------------------------------------------------------------------------------- /WeChatApp/images/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sky8652/QuestionWeChatApp/HEAD/WeChatApp/images/logo.png -------------------------------------------------------------------------------- /WeChatApp/images/rank.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sky8652/QuestionWeChatApp/HEAD/WeChatApp/images/rank.png -------------------------------------------------------------------------------- /WeChatApp/images/share.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sky8652/QuestionWeChatApp/HEAD/WeChatApp/images/share.png -------------------------------------------------------------------------------- /WeChatApp/images/sort.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sky8652/QuestionWeChatApp/HEAD/WeChatApp/images/sort.png -------------------------------------------------------------------------------- /WeChatApp/images/wave.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sky8652/QuestionWeChatApp/HEAD/WeChatApp/images/wave.png -------------------------------------------------------------------------------- /WeChatApp/images/wrong.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sky8652/QuestionWeChatApp/HEAD/WeChatApp/images/wrong.png -------------------------------------------------------------------------------- /WeChatApp/pages/result/index.wxml: -------------------------------------------------------------------------------- 1 | 2 | pages/result/index.wxml 3 | -------------------------------------------------------------------------------- /Backend/src/styles/variables.scss: -------------------------------------------------------------------------------- 1 | //sidebar 2 | $menuBg:#304156; 3 | $subMenuBg:#1f2d3d; 4 | $menuHover:#001528; 5 | -------------------------------------------------------------------------------- /WeChatApp/dist/checkbox-group/index.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /WeChatApp/dist/grid-item/index.wxml: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /WeChatApp/dist/grid/index.wxss: -------------------------------------------------------------------------------- 1 | .i-grid{border-top:1rpx solid #e9eaec;border-left:1rpx solid #e9eaec;overflow:hidden} -------------------------------------------------------------------------------- /WeChatApp/dist/radio-group/index.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /WeChatApp/images/answer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sky8652/QuestionWeChatApp/HEAD/WeChatApp/images/answer.png -------------------------------------------------------------------------------- /WeChatApp/images/nodata.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sky8652/QuestionWeChatApp/HEAD/WeChatApp/images/nodata.png -------------------------------------------------------------------------------- /WeChatApp/images/select.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sky8652/QuestionWeChatApp/HEAD/WeChatApp/images/select.png -------------------------------------------------------------------------------- /WeChatApp/images/title8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sky8652/QuestionWeChatApp/HEAD/WeChatApp/images/title8.png -------------------------------------------------------------------------------- /WeChatApp/images/warning.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sky8652/QuestionWeChatApp/HEAD/WeChatApp/images/warning.png -------------------------------------------------------------------------------- /WeChatApp/images/my-select.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sky8652/QuestionWeChatApp/HEAD/WeChatApp/images/my-select.png -------------------------------------------------------------------------------- /WeChatApp/images/sort-select.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sky8652/QuestionWeChatApp/HEAD/WeChatApp/images/sort-select.png -------------------------------------------------------------------------------- /WeChatApp/images/wrong-select.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sky8652/QuestionWeChatApp/HEAD/WeChatApp/images/wrong-select.png -------------------------------------------------------------------------------- /WeChatApp/dist/collapse/index.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /WeChatApp/images/answer-select.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sky8652/QuestionWeChatApp/HEAD/WeChatApp/images/answer-select.png -------------------------------------------------------------------------------- /WeChatApp/images/confirm-word1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sky8652/QuestionWeChatApp/HEAD/WeChatApp/images/confirm-word1.png -------------------------------------------------------------------------------- /WeChatApp/pages/answerErr/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "usingComponents": { 3 | "wux-result": "../../wux/result/index" 4 | } 5 | } -------------------------------------------------------------------------------- /WeChatApp/dist/rate/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "component": true, 3 | "usingComponents":{ 4 | "i-icon": "../icon/index" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /WeChatApp/dist/grid-icon/index.wxss: -------------------------------------------------------------------------------- 1 | .i-grid-icon{display:block;width:28px;height:28px;margin:0 auto}.i-grid-icon image{width:100%;height:100%} -------------------------------------------------------------------------------- /WeChatApp/dist/tab/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "component": true, 3 | "usingComponents": 4 | { 5 | "i-badge": "../badge/index" 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /WeChatApp/dist/toast/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "component": true, 3 | "usingComponents": 4 | { 5 | "i-icon": "../icon/index" 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /WeChatApp/wux/radio/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "component": true, 3 | "usingComponents": { 4 | "wux-cell": "../cell/index" 5 | } 6 | } -------------------------------------------------------------------------------- /WeChatApp/dist/page/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "component": true, 3 | "usingComponents": 4 | { 5 | "i-button": "../button/index" 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /WeChatApp/wux/result/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "component": true, 3 | "usingComponents": { 4 | "wux-button": "../button/index" 5 | } 6 | } -------------------------------------------------------------------------------- /WeChatApp/dist/card/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "component": true, 3 | "usingComponents": { 4 | "i-avatar": "../../dist/avatar/index" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /WeChatApp/dist/collapse-item/index.json: -------------------------------------------------------------------------------- 1 | 2 | { 3 | "component": true, 4 | "usingComponents": { 5 | "i-icon": "../icon/index" 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /WeChatApp/dist/step/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "component": true, 3 | "usingComponents": 4 | { 5 | "i-icon": "../icon/index" 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /WeChatApp/dist/alert/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "component": true, 3 | "usingComponents": 4 | { 5 | "i-icon": "../icon/index" 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /WeChatApp/dist/checkbox/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "component": true, 3 | "usingComponents": 4 | { 5 | "i-cell": "../cell/index" 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /WeChatApp/dist/message/index.wxml: -------------------------------------------------------------------------------- 1 | 2 | {{ content }} 3 | -------------------------------------------------------------------------------- /WeChatApp/dist/radio/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "component": true, 3 | "usingComponents": 4 | { 5 | "i-cell": "../cell/index" 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /WeChatApp/pages/rank/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "navigationBarTitleText": "排名", 3 | "usingComponents": { 4 | "i-spin": "../../dist/spin/index" 5 | } 6 | } -------------------------------------------------------------------------------- /WeChatApp/dist/col/index.wxml: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /WeChatApp/dist/notice-bar/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "component": true, 3 | "usingComponents": 4 | { 5 | "i-icon": "../icon/index" 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /WeChatApp/pages/history/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "navigationBarTitleText": "答题记录", 3 | "usingComponents": { 4 | "i-spin": "../../dist/spin/index" 5 | } 6 | } -------------------------------------------------------------------------------- /WeChatApp/wux/radio-group/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "component": true, 3 | "usingComponents": { 4 | "wux-cell-group": "../cell-group/index" 5 | } 6 | } -------------------------------------------------------------------------------- /WeChatApp/pages/logs/logs.wxss: -------------------------------------------------------------------------------- 1 | .log-list { 2 | display: flex; 3 | flex-direction: column; 4 | padding: 40rpx; 5 | } 6 | .log-item { 7 | margin: 10rpx; 8 | } 9 | -------------------------------------------------------------------------------- /WeChatApp/pages/rankList/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "navigationBarTitleText": "排名记录", 3 | "usingComponents": { 4 | "i-spin": "../../dist/spin/index" 5 | } 6 | } -------------------------------------------------------------------------------- /WeChatApp/wux/prompt/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "component": true, 3 | "usingComponents": { 4 | "wux-animation-group": "../animation-group/index" 5 | } 6 | } -------------------------------------------------------------------------------- /WeChatApp/wux/radio-group/index.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /WeChatApp/dist/radio-group/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "component": true, 3 | "usingComponents": 4 | { 5 | "i-cell-group": "../cell-group/index" 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /WeChatApp/dist/slide/index.wxml: -------------------------------------------------------------------------------- 1 | 2 | 1111 3 | 4 | -------------------------------------------------------------------------------- /WeChatApp/dist/swipeout/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "component": true, 3 | "usingComponents": { 4 | "i-cell": "../cell/index", 5 | "i-icon": "../icon/index" 6 | } 7 | } -------------------------------------------------------------------------------- /WeChatApp/dist/checkbox-group/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "component": true, 3 | "usingComponents": 4 | { 5 | "i-cell-group": "../cell-group/index" 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /Backend/src/api/bmobConfig.js: -------------------------------------------------------------------------------- 1 | var Bmob = require('../../static/Bmob-1.6.5.min.js') 2 | 3 | export function bmob() { 4 | Bmob.initialize("","",""); 5 | return Bmob 6 | } -------------------------------------------------------------------------------- /WeChatApp/dist/grid-item/index.wxss: -------------------------------------------------------------------------------- 1 | .i-grid-item{position:relative;float:left;width:33.33333333%;box-sizing:border-box;border-right:1rpx solid #e9eaec;border-bottom:1rpx solid #e9eaec} -------------------------------------------------------------------------------- /WeChatApp/dist/slide/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "component": true, 3 | "usingComponents": 4 | { 5 | "i-button": "../button/index", 6 | "i-icon": "../icon/index" 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /WeChatApp/dist/grid-label/index.wxss: -------------------------------------------------------------------------------- 1 | .i-grid-label{margin-top:5px;display:block;text-align:center;color:#1c2438;font-size:14px;white-space:nowrap;text-overflow:ellipsis;overflow:hidden} -------------------------------------------------------------------------------- /WeChatApp/dist/tab-bar-item/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "component": true, 3 | "usingComponents": 4 | { 5 | "i-badge": "../badge/index", 6 | "i-icon": "../icon/index" 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /WeChatApp/dist/action-sheet/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "component": true, 3 | "usingComponents": 4 | { 5 | "i-button": "../button/index", 6 | "i-icon": "../icon/index" 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /WeChatApp/dist/icon/index.wxml: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Backend/config/test.env.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | const merge = require('webpack-merge') 3 | const devEnv = require('./dev.env') 4 | 5 | module.exports = merge(devEnv, { 6 | NODE_ENV: '"testing"' 7 | }) 8 | -------------------------------------------------------------------------------- /WeChatApp/dist/index-item/index.wxss: -------------------------------------------------------------------------------- 1 | .i-index-item-header{height:30px;line-height:30px;background:#eee;font-size:14px;padding-left:10px;width:100%;box-sizing:border-box}.i-index-item-content{font-size:14px} -------------------------------------------------------------------------------- /Backend/config/dev.env.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | const merge = require('webpack-merge') 3 | const prodEnv = require('./prod.env') 4 | 5 | module.exports = merge(prodEnv, { 6 | NODE_ENV: '"development"' 7 | }) 8 | -------------------------------------------------------------------------------- /WeChatApp/dist/row/index.js: -------------------------------------------------------------------------------- 1 | Component({ 2 | externalClasses: ['i-class'], 3 | 4 | relations: { 5 | '../col/index': { 6 | type: 'child' 7 | } 8 | } 9 | }); 10 | -------------------------------------------------------------------------------- /Backend/.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | charset = utf-8 5 | indent_style = space 6 | indent_size = 2 7 | end_of_line = lf 8 | insert_final_newline = true 9 | trim_trailing_whitespace = true 10 | -------------------------------------------------------------------------------- /WeChatApp/pages/logs/logs.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | {{index + 1}}. {{log}} 5 | 6 | 7 | -------------------------------------------------------------------------------- /WeChatApp/dist/grid-icon/index.js: -------------------------------------------------------------------------------- 1 | Component({ 2 | externalClasses: ['i-class'], 3 | 4 | relations: { 5 | '../grid-item/index': { 6 | type: 'parent' 7 | } 8 | }, 9 | 10 | }); 11 | -------------------------------------------------------------------------------- /WeChatApp/dist/grid-label/index.js: -------------------------------------------------------------------------------- 1 | Component({ 2 | externalClasses: ['i-class'], 3 | 4 | relations: { 5 | '../grid-item/index': { 6 | type: 'parent' 7 | } 8 | }, 9 | 10 | }); 11 | -------------------------------------------------------------------------------- /WeChatApp/dist/radio/index.wxss: -------------------------------------------------------------------------------- 1 | .i-radio-cell::after{display:block}.i-radio-radio-left{float:left}.i-radio-radio-right{float:right}.i-radio-radio{vertical-align:middle}.i-radio-title{display:inline-block;vertical-align:middle;width: 90%;} -------------------------------------------------------------------------------- /WeChatApp/wux/animation-group/index.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /WeChatApp/dist/checkbox/index.wxss: -------------------------------------------------------------------------------- 1 | .i-checkbox-cell::after{display:block}.i-checkbox-checkbox-left{float:left}.i-checkbox-checkbox-right{float:right}.i-checkbox-radio{vertical-align:middle}.i-checkbox-title{display:inline-block;vertical-align:middle} -------------------------------------------------------------------------------- /WeChatApp/pages/answerInfo/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "navigationBarTitleText": "选择题库", 3 | "usingComponents": { 4 | "i-row": "../../dist/row/index", 5 | "i-col": "../../dist/col/index", 6 | "i-button": "../../dist/button/index" 7 | } 8 | } -------------------------------------------------------------------------------- /WeChatApp/dist/badge/index.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | {{ finalCount }} 5 | 6 | -------------------------------------------------------------------------------- /WeChatApp/pages/answerErr/index.wxml: -------------------------------------------------------------------------------- 1 | 2 | 10 | -------------------------------------------------------------------------------- /WeChatApp/dist/modal/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "component": true, 3 | "usingComponents": { 4 | "i-grid": "../grid/index", 5 | "i-grid-item": "../grid-item/index", 6 | "i-button": "../button/index", 7 | "i-icon": "../icon/index" 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /WeChatApp/pages/historyList/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "navigationBarTitleText": "测试记录", 3 | "usingComponents": { 4 | "i-cell": "../../dist/cell/index", 5 | "i-cell-group": "../../dist/cell-group/index", 6 | "i-spin": "../../dist/spin/index" 7 | } 8 | } -------------------------------------------------------------------------------- /WeChatApp/dist/tabs/index.wxml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /WeChatApp/dist/avatar/index.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /WeChatApp/pages/feedback/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "navigationBarTitleText": "反馈意见", 3 | "usingComponents": { 4 | "i-input": "../../dist/input/index", 5 | "i-panel": "../../dist/panel/index", 6 | "i-button": "../../dist/button/index" 7 | } 8 | } 9 | 10 | -------------------------------------------------------------------------------- /WeChatApp/wux/radio/index.wxss: -------------------------------------------------------------------------------- 1 | .wux-radio__input { 2 | position: absolute; 3 | top: 0; 4 | left: 0; 5 | opacity: 0; 6 | width: 100%; 7 | height: 100%; 8 | z-index: 2; 9 | border: 0 none; 10 | -webkit-appearance: none; 11 | appearance: none; 12 | } 13 | -------------------------------------------------------------------------------- /WeChatApp/dist/sticky-item/index.wxss: -------------------------------------------------------------------------------- 1 | .i-sticky-item-header{background:#eee;font-size:14px;width:100%;height:32px;line-height:32px}.i-sticky-item-content{font-size:14px}.i-sticky-title{width:100%;padding:0 15px;box-sizing:border-box;background:#eee}.i-sticky-fixed .i-sticky-title{position:fixed;top:0} -------------------------------------------------------------------------------- /WeChatApp/dist/panel/index.wxml: -------------------------------------------------------------------------------- 1 | 2 | {{ title }} 3 | 4 | 5 | -------------------------------------------------------------------------------- /Backend/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules/ 3 | /dist/ 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | /test/unit/coverage/ 8 | /test/e2e/reports/ 9 | selenium-debug.log 10 | 11 | # Editor directories and files 12 | .idea 13 | .vscode 14 | *.suo 15 | *.ntvs* 16 | *.njsproj 17 | *.sln 18 | -------------------------------------------------------------------------------- /Backend/.postcssrc.js: -------------------------------------------------------------------------------- 1 | // https://github.com/michael-ciniawsky/postcss-load-config 2 | 3 | module.exports = { 4 | "plugins": { 5 | "postcss-import": {}, 6 | "postcss-url": {}, 7 | // to edit target browsers: use "browserslist" field in package.json 8 | "autoprefixer": {} 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /Backend/src/icons/svg/link.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /WeChatApp/dist/drawer/index.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /WeChatApp/dist/index-item/index.wxml: -------------------------------------------------------------------------------- 1 | 2 | {{name}} 3 | 4 | 5 | 6 | 7 | 8 | module.exports = { 9 | 10 | } 11 | 12 | -------------------------------------------------------------------------------- /WeChatApp/wux/cell-group/index.wxml: -------------------------------------------------------------------------------- 1 | 2 | {{ title }} 3 | 4 | 5 | 6 | {{ label }} 7 | -------------------------------------------------------------------------------- /WeChatApp/dist/load-more/index.js: -------------------------------------------------------------------------------- 1 | Component({ 2 | externalClasses: ['i-class'], 3 | 4 | properties: { 5 | loading: { 6 | type: Boolean, 7 | value: true 8 | }, 9 | tip: { 10 | type: String, 11 | value: '' 12 | } 13 | }, 14 | }); 15 | -------------------------------------------------------------------------------- /Backend/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | backend 7 | 8 | 9 |
10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /Backend/src/views/dashboard/index.vue: -------------------------------------------------------------------------------- 1 | 8 | 9 | -------------------------------------------------------------------------------- /WeChatApp/dist/rate/index.wxss: -------------------------------------------------------------------------------- 1 | .i-rate{margin:0;padding:0;font-size:20px;display:inline-block;vertical-align:middle;font-weight:400;font-style:normal}.i-rate-hide-input{display:none}.i-rate-star{display:inline-block;color:#e9e9e9}.i-rate-current{color:#f5a623}.i-rate-text{display:inline-block;vertical-align:middle;margin-left:6px;font-size:14px} -------------------------------------------------------------------------------- /Backend/src/icons/index.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import SvgIcon from '@/components/SvgIcon' // svg组件 3 | 4 | // register globally 5 | Vue.component('svg-icon', SvgIcon) 6 | 7 | const requireAll = requireContext => requireContext.keys().map(requireContext) 8 | const req = require.context('./svg', false, /\.svg$/) 9 | requireAll(req) 10 | -------------------------------------------------------------------------------- /Backend/src/store/getters.js: -------------------------------------------------------------------------------- 1 | const getters = { 2 | sidebar: state => state.app.sidebar, 3 | device: state => state.app.device, 4 | token: state => state.user.token, 5 | avatar: state => state.user.avatar, 6 | name: state => state.user.name, 7 | roles: state => state.user.roles 8 | } 9 | export default getters 10 | -------------------------------------------------------------------------------- /WeChatApp/dist/divider/index.wxss: -------------------------------------------------------------------------------- 1 | .i-divider{width:100%;text-align:center;font-size:12px;position:relative;display:flex;align-items:center;justify-content:center}.i-divider-line{position:absolute;left:0;width:100%;height:1rpx;background-color:#f7f7f7;top:50%}.i-divider-content{background:#fff;position:relative;z-index:1;display:inline-block;padding:0 10px} -------------------------------------------------------------------------------- /WeChatApp/dist/spin/index.wxml: -------------------------------------------------------------------------------- 1 | 2 |
3 | 4 |
5 |
6 |
7 | -------------------------------------------------------------------------------- /WeChatApp/dist/grid-item/index.js: -------------------------------------------------------------------------------- 1 | Component({ 2 | externalClasses: ['i-class'], 3 | 4 | relations: { 5 | '../grid/index': { 6 | type: 'parent' 7 | }, 8 | '../grid-icon/index': { 9 | type: 'child' 10 | } 11 | }, 12 | 13 | data: { 14 | width: '33.33%' 15 | } 16 | }); 17 | -------------------------------------------------------------------------------- /WeChatApp/pages/logs/logs.js: -------------------------------------------------------------------------------- 1 | //logs.js 2 | const util = require('../../utils/util.js') 3 | 4 | Page({ 5 | data: { 6 | logs: [] 7 | }, 8 | onLoad: function () { 9 | this.setData({ 10 | logs: (wx.getStorageSync('logs') || []).map(log => { 11 | return util.formatTime(new Date(log)) 12 | }) 13 | }) 14 | } 15 | }) 16 | -------------------------------------------------------------------------------- /WeChatApp/dist/slide/index.js: -------------------------------------------------------------------------------- 1 | Component({ 2 | externalClasses: ['i-class'], 3 | options: { 4 | // 在组件定义时的选项中启用多slot支持 5 | multipleSlots: true 6 | }, 7 | methods : { 8 | handleTap2(){ 9 | console.log(event,1111111) 10 | }, 11 | handleTap3(){ 12 | 13 | } 14 | } 15 | }); 16 | -------------------------------------------------------------------------------- /WeChatApp/dist/tab-bar/index.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /Backend/src/icons/svgo.yml: -------------------------------------------------------------------------------- 1 | # replace default config 2 | 3 | # multipass: true 4 | # full: true 5 | 6 | plugins: 7 | 8 | # - name 9 | # 10 | # or: 11 | # - name: false 12 | # - name: true 13 | # 14 | # or: 15 | # - name: 16 | # param1: 1 17 | # param2: 2 18 | 19 | - removeAttrs: 20 | attrs: 21 | - 'fill' 22 | - 'fill-rule' 23 | -------------------------------------------------------------------------------- /Backend/src/utils/auth.js: -------------------------------------------------------------------------------- 1 | import Cookies from 'js-cookie' 2 | 3 | const TokenKey = 'Admin-Token' 4 | 5 | export function getToken() { 6 | return Cookies.get(TokenKey) 7 | } 8 | 9 | export function setToken(token) { 10 | return Cookies.set(TokenKey, token) 11 | } 12 | 13 | export function removeToken() { 14 | return Cookies.remove(TokenKey) 15 | } -------------------------------------------------------------------------------- /WeChatApp/pages/my/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "navigationBarTitleText": "个人中心", 3 | "usingComponents": { 4 | "i-row": "../../dist/row/index", 5 | "i-col": "../../dist/col/index", 6 | "i-icon": "../../dist/icon/index", 7 | "i-avatar": "../../dist/avatar/index", 8 | "i-cell": "../../dist/cell/index", 9 | "i-cell-group": "../../dist/cell-group/index" 10 | } 11 | } -------------------------------------------------------------------------------- /WeChatApp/pages/rank/index.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | {{selectQuestionMenu}} 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /WeChatApp/pages/wrong/index.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | {{selectQuestionMenu}} 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /Backend/src/store/index.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import Vuex from 'vuex' 3 | import user from './modules/user' 4 | import getters from './getters' 5 | import app from './modules/app' 6 | 7 | 8 | Vue.use(Vuex) 9 | 10 | const store = new Vuex.Store({ 11 | modules:{ 12 | app, 13 | user 14 | }, 15 | getters 16 | }) 17 | 18 | export default store -------------------------------------------------------------------------------- /Backend/src/App.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 12 | 13 | 25 | -------------------------------------------------------------------------------- /WeChatApp/dist/sticky-item/index.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /WeChatApp/dist/collapse-item/index.wxss: -------------------------------------------------------------------------------- 1 | .i-collapse-item{padding:2px 8px;border-top:1px solid #dddee1}.i-collapse-item-title{vertical-align:middle}.i-collapse-item-title-wrap{padding:2px 0 0}.i-collapse-item-content{padding:6px;display:none}.i-collapse-item-show-content{display:block}.i-collapse-item-arrow{transition:transform .2s ease-in-out}.i-collapse-item-arrow-show{transition:transform .2s ease-in-out;transform:rotate(90deg)} -------------------------------------------------------------------------------- /WeChatApp/dist/checkbox/index.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /WeChatApp/dist/load-more/index.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | {{ tip }} 5 | 正在加载 6 | 7 | 8 | -------------------------------------------------------------------------------- /WeChatApp/dist/col/index.js: -------------------------------------------------------------------------------- 1 | Component({ 2 | externalClasses: ['i-class'], 3 | 4 | relations: { 5 | '../row/index': { 6 | type: 'parent' 7 | } 8 | }, 9 | 10 | properties: { 11 | span: { 12 | value: 0, 13 | type: Number 14 | }, 15 | offset: { 16 | value: 0, 17 | type: Number 18 | } 19 | } 20 | }); 21 | -------------------------------------------------------------------------------- /Backend/test/unit/specs/HelloWorld.spec.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import HelloWorld from '@/components/HelloWorld' 3 | 4 | describe('HelloWorld.vue', () => { 5 | it('should render correct contents', () => { 6 | const Constructor = Vue.extend(HelloWorld) 7 | const vm = new Constructor().$mount() 8 | expect(vm.$el.querySelector('.hello h1').textContent) 9 | .toEqual('Welcome to Your Vue.js App') 10 | }) 11 | }) 12 | -------------------------------------------------------------------------------- /WeChatApp/dist/panel/index.js: -------------------------------------------------------------------------------- 1 | Component({ 2 | externalClasses: ['i-class'], 3 | 4 | properties: { 5 | title: { 6 | type: String, 7 | value: '' 8 | }, 9 | // 标题顶部距离 10 | hideTop: { 11 | type: Boolean, 12 | value: false 13 | }, 14 | hideBorder: { 15 | type: Boolean, 16 | value: false 17 | } 18 | } 19 | }); 20 | -------------------------------------------------------------------------------- /WeChatApp/pages/answerErr/index.js: -------------------------------------------------------------------------------- 1 | Page({ 2 | data: { 3 | icon: { 4 | type: 'warn', 5 | color: '#ef473a', 6 | }, 7 | buttons: [{ 8 | type: 'balanced', 9 | block: true, 10 | text: '重新加载', 11 | } 12 | ], 13 | }, 14 | onClick(e) { 15 | console.log(e) 16 | const { index } = e.detail 17 | 18 | index === 0 && wx.switchTab({ 19 | url: '/pages/select/index', 20 | }) 21 | }, 22 | }) -------------------------------------------------------------------------------- /Backend/src/icons/svg/user.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /WeChatApp/pages/rankList/index.js: -------------------------------------------------------------------------------- 1 | // pages/rankList/index.js 2 | Page({ 3 | 4 | /** 5 | * 页面的初始数据 6 | */ 7 | data: { 8 | rankList:{}, 9 | loading: true, 10 | }, 11 | 12 | /** 13 | * 生命周期函数--监听页面加载 14 | */ 15 | onLoad (options) { 16 | var menu = options.menu 17 | wx.u.getRank(menu).then(res => { 18 | this.setData({ 19 | rankList:res.data, 20 | loading:false 21 | }) 22 | }) 23 | }, 24 | 25 | }) -------------------------------------------------------------------------------- /WeChatApp/wux/helpers/mergeOptionsToData.js: -------------------------------------------------------------------------------- 1 | /** 2 | * 过滤对象的函数属性 3 | * @param {Object} opts 4 | */ 5 | const mergeOptionsToData = (opts = {}) => { 6 | const options = Object.assign({}, opts) 7 | 8 | for (const key in options) { 9 | if (options.hasOwnProperty(key) && typeof options[key] === 'function') { 10 | delete options[key] 11 | } 12 | } 13 | 14 | return options 15 | } 16 | 17 | export default mergeOptionsToData -------------------------------------------------------------------------------- /WeChatApp/pages/select/index.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | {{selectQuestionMenu}} 9 | 10 | 11 | 12 | 13 | 开始答题 14 | 15 | 16 | -------------------------------------------------------------------------------- /WeChatApp/wux/radio/index.wxml: -------------------------------------------------------------------------------- 1 | 2 | 6 | -------------------------------------------------------------------------------- /WeChatApp/dist/avatar/index.js: -------------------------------------------------------------------------------- 1 | Component({ 2 | externalClasses: ['i-class'], 3 | 4 | properties: { 5 | // circle || square 6 | shape: { 7 | type: String, 8 | value: 'circle' 9 | }, 10 | // small || large || default 11 | size: { 12 | type: String, 13 | value: 'default' 14 | }, 15 | src: { 16 | type: String, 17 | value: '' 18 | } 19 | } 20 | }); 21 | -------------------------------------------------------------------------------- /WeChatApp/wux/helpers/colors.js: -------------------------------------------------------------------------------- 1 | export const colors = { 2 | 'light': '#ddd', 3 | 'stable': '#b2b2b2', 4 | 'positive': '#387ef5', 5 | 'calm': '#11c1f3', 6 | 'balanced': '#33cd5f', 7 | 'energized': '#ffc900', 8 | 'assertive': '#ef473a', 9 | 'royal': '#886aea', 10 | 'dark': '#444', 11 | } 12 | 13 | export const isPresetColor = (color) => { 14 | if (!color) { 15 | return false 16 | } 17 | return colors[color] ? colors[color] : color 18 | } -------------------------------------------------------------------------------- /Backend/.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": [ 3 | ["env", { 4 | "modules": false, 5 | "targets": { 6 | "browsers": ["> 1%", "last 2 versions", "not ie <= 8"] 7 | } 8 | }], 9 | "stage-2" 10 | ], 11 | "plugins": ["transform-vue-jsx", "transform-runtime"], 12 | "env": { 13 | "test": { 14 | "presets": ["env", "stage-2"], 15 | "plugins": ["transform-vue-jsx", "transform-es2015-modules-commonjs", "dynamic-import-node"] 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /WeChatApp/dist/icon/index.js: -------------------------------------------------------------------------------- 1 | Component({ 2 | externalClasses: ['i-class'], 3 | 4 | properties: { 5 | type: { 6 | type: String, 7 | value: '' 8 | }, 9 | custom: { 10 | type: String, 11 | value: '' 12 | }, 13 | size: { 14 | type: Number, 15 | value: 14 16 | }, 17 | color: { 18 | type: String, 19 | value: '' 20 | } 21 | } 22 | }); 23 | -------------------------------------------------------------------------------- /WeChatApp/dist/message/index.wxss: -------------------------------------------------------------------------------- 1 | .i-message{display:block;width:100%;min-height:32px;line-height:2.3;position:fixed;top:0;left:0;right:0;background:#2d8cf0;color:#fff;text-align:center;font-size:14px;z-index:1010;opacity:0;-webkit-transform:translateZ(0) translateY(-100%);transition:all .4s ease-in-out}.i-message-show{-webkit-transform:translateZ(0) translateY(0);opacity:1}.i-message-default{background:#2d8cf0}.i-message-success{background:#19be6b}.i-message-warning{background:#f90}.i-message-error{background:#ed3f14} -------------------------------------------------------------------------------- /Backend/src/icons/svg/example.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /WeChatApp/dist/collapse-item/index.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | {{title}} 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /WeChatApp/dist/progress/index.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | {{ percent }}% 9 | 10 | -------------------------------------------------------------------------------- /WeChatApp/dist/tabs/index.wxss: -------------------------------------------------------------------------------- 1 | .i-tabs{display:flex;width:100%;height:42px;line-height:42px;box-sizing:border-box;position:relative;justify-content:space-around;align-items:center;-webkit-box-align:center;background:#fff}.i-tabs::after{content:'';position:absolute;top:0;left:0;width:200%;height:200%;transform:scale(.5);transform-origin:0 0;pointer-events:none;box-sizing:border-box;border:0 solid #e9eaec;border-bottom-width:1px}.i-tabs-scroll{display:block;overflow-x:auto;white-space:nowrap}.i-tabs-fixed{position:fixed;top:0;z-index:2} -------------------------------------------------------------------------------- /Backend/src/styles/mixin.scss: -------------------------------------------------------------------------------- 1 | @mixin clearfix { 2 | &:after { 3 | content: ""; 4 | display: table; 5 | clear: both; 6 | } 7 | } 8 | 9 | @mixin scrollBar { 10 | &::-webkit-scrollbar-track-piece { 11 | background: #d3dce6; 12 | } 13 | &::-webkit-scrollbar { 14 | width: 6px; 15 | } 16 | &::-webkit-scrollbar-thumb { 17 | background: #99a9bf; 18 | border-radius: 20px; 19 | } 20 | } 21 | 22 | @mixin relative { 23 | position: relative; 24 | width: 100%; 25 | height: 100%; 26 | } 27 | 28 | -------------------------------------------------------------------------------- /WeChatApp/dist/panel/index.wxss: -------------------------------------------------------------------------------- 1 | .i-panel{position:relative;overflow:hidden}.i-panel-title{font-size:14px;line-height:1;color:#1c2438;padding:20px 16px 10px}.i-panel-title-hide-top{padding-top:0}.i-panel-content{position:relative;background:#fff;overflow:hidden}.i-panel-content::after{content:'';position:absolute;top:0;left:0;width:200%;height:200%;transform:scale(.5);transform-origin:0 0;pointer-events:none;box-sizing:border-box;border:0 solid #e9eaec;border-top-width:1px;border-bottom-width:1px}.i-panel-without-border::after{border:0 none} -------------------------------------------------------------------------------- /WeChatApp/dist/swipeout/index.wxss: -------------------------------------------------------------------------------- 1 | .i-swipeout-wrap{border-bottom:#dddee1 solid 1px;background:#fff;position:relative;overflow:hidden}.i-swipeout-item{width:100%;padding:15px 20px;box-sizing:border-box;transition:transform .2s ease;font-size:14px}.i-swipeout-content{white-space:nowrap;overflow:hidden}.i-swipeout-button-right-group{position:absolute;right:-100%;top:0;height:100%;z-index:1;width:100%}.i-swipeout-button-right-item{height:100%;float:left;white-space:nowrap;box-sizing:border-box;display:flex;align-items:center;justify-content:center} -------------------------------------------------------------------------------- /WeChatApp/dist/notice-bar/index.wxss: -------------------------------------------------------------------------------- 1 | .i-noticebar{display:flex;height:72rpx;line-height:72rpx;font-size:14px;color:#f76a24;background-color:#fefcec;overflow:hidden}.i-noticebar-icon{display:flex;margin-left:30rpx;align-items:center}.i-noticebar-icon+view{margin-left:10rpx}.i-noticebar-operation{display:flex;margin-right:16rpx;align-items:center}.i-noticebar-content-wrap{position:relative;flex:1;margin:0 30rpx;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.i-noticebar-content-wrap .i-noticebar-content{position:absolute;transition-duration:20s} -------------------------------------------------------------------------------- /WeChatApp/app.wxss: -------------------------------------------------------------------------------- 1 | /**app.wxss**/ 2 | page{ 3 | width: 100%; 4 | height: 100%; 5 | position: relative; 6 | color: #333; 7 | background-color: #f8f8f8; 8 | font-size: 16px; 9 | font-family: -apple-system-font,Helvetica Neue,Helvetica,sans-serif; 10 | -ms-text-size-adjust: 100%; 11 | -webkit-text-size-adjust: 100%; 12 | -webkit-tap-highlight-color: transparent; 13 | } 14 | .css-shadow{ 15 | -moz-box-shadow:2px 2px 10px #78E4CC; 16 | -webkit-box-shadow:2px 2px 10px #78E4CC; 17 | box-shadow:2px 2px 10px #78E4CC; 18 | } 19 | -------------------------------------------------------------------------------- /WeChatApp/dist/tab/index.wxss: -------------------------------------------------------------------------------- 1 | .i-tabs-tab{flex:1;display:flex;width:100%;-webkit-box-pack:center;justify-content:center;-webkit-box-align:center;align-items:center;-webkit-box-orient:vertical;-webkit-box-direction:normal;flex-direction:column;text-align:center;position:relative}.i-tabs-tab-bar{display:block;width:100%;height:2px;background:0 0;position:absolute;bottom:0;left:0;background:#2d8cf0}.i-tabs-tab-title{font-size:14px;text-align:center;box-sizing:border-box;color:#80848f}.i-tabs-tab-title-current{color:#2d8cf0}.i-tabs-tab-scroll{display:inline-block;width:60px} -------------------------------------------------------------------------------- /WeChatApp/dist/spin/index.js: -------------------------------------------------------------------------------- 1 | Component({ 2 | externalClasses: ['i-class'], 3 | 4 | properties: { 5 | // small || default || large 6 | size: { 7 | type: String, 8 | value: 'default' 9 | }, 10 | fix: { 11 | type: Boolean, 12 | value: false 13 | }, 14 | fullscreen: { 15 | type: Boolean, 16 | value: false 17 | }, 18 | custom: { 19 | type: Boolean, 20 | value: false 21 | } 22 | } 23 | }); 24 | -------------------------------------------------------------------------------- /WeChatApp/dist/tab-bar/index.wxss: -------------------------------------------------------------------------------- 1 | .i-tab-bar{display:flex;width:100%;height:50px;box-sizing:border-box;position:relative;justify-content:space-around;align-items:center;-webkit-box-align:center;background:#fff}.i-tab-bar::after{content:'';position:absolute;top:0;left:0;width:200%;height:200%;transform:scale(.5);transform-origin:0 0;pointer-events:none;box-sizing:border-box;border:0 solid #e9eaec;border-top-width:1px}.i-tab-bar-fixed{position:fixed;bottom:0;z-index:2}.i-tab-bar-list{position:absolute;top:0;bottom:0;left:0;right:0}.i-tab-bar-layer{display:block;float:left;height:100%} -------------------------------------------------------------------------------- /WeChatApp/dist/progress/index.js: -------------------------------------------------------------------------------- 1 | Component({ 2 | externalClasses: ['i-class'], 3 | 4 | properties: { 5 | percent: { 6 | type: Number, 7 | value: 0 8 | }, 9 | // normal || active || wrong || success 10 | status: { 11 | type: String, 12 | value: 'normal' 13 | }, 14 | strokeWidth: { 15 | type: Number, 16 | value: 10 17 | }, 18 | hideInfo: { 19 | type: Boolean, 20 | value: false 21 | } 22 | } 23 | }); 24 | -------------------------------------------------------------------------------- /WeChatApp/pages/wrongAnswer/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "navigationBarTitleText": "错题集", 3 | "usingComponents": { 4 | "i-spin": "../../dist/spin/index", 5 | "i-tag": "../../dist/tag/index", 6 | "i-panel": "../../dist/panel/index", 7 | "i-radio-group": "../../dist/radio-group/index", 8 | "i-radio": "../../dist/radio/index", 9 | "i-row": "../../dist/row/index", 10 | "i-col": "../../dist/col/index", 11 | "i-page": "../../dist/page/index", 12 | "i-icon": "../../dist/icon/index", 13 | "i-action-sheet": "../../dist/action-sheet/index" 14 | } 15 | } -------------------------------------------------------------------------------- /WeChatApp/dist/input-number/index.wxml: -------------------------------------------------------------------------------- 1 | 2 | - 3 | 4 | + 5 | 6 | -------------------------------------------------------------------------------- /WeChatApp/pages/feedback/index.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | 5 | 6 | 7 | 8 | 9 |
10 |
11 | -------------------------------------------------------------------------------- /Backend/src/icons/svg/table.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Backend/src/styles/element-ui.scss: -------------------------------------------------------------------------------- 1 | //to reset element-ui default css 2 | .el-upload { 3 | input[type="file"] { 4 | display: none !important; 5 | } 6 | } 7 | 8 | .el-upload__input { 9 | display: none; 10 | } 11 | 12 | //暂时性解决diolag 问题 https://github.com/ElemeFE/element/issues/2461 13 | .el-dialog { 14 | transform: none; 15 | left: 0; 16 | position: relative; 17 | margin: 0 auto; 18 | } 19 | 20 | //element ui upload 21 | .upload-container { 22 | .el-upload { 23 | width: 100%; 24 | .el-upload-dragger { 25 | width: 100%; 26 | height: 200px; 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /WeChatApp/dist/divider/index.js: -------------------------------------------------------------------------------- 1 | Component({ 2 | externalClasses: ['i-class'], 3 | properties: { 4 | content: { 5 | type: String, 6 | value: '' 7 | }, 8 | height : { 9 | type: Number, 10 | value: 48 11 | }, 12 | color : { 13 | type : String, 14 | value : '#80848f' 15 | }, 16 | lineColor : { 17 | type : String, 18 | value : '#e9eaec' 19 | }, 20 | size : { 21 | type: String, 22 | value: 12 23 | } 24 | } 25 | }); 26 | -------------------------------------------------------------------------------- /WeChatApp/pages/historyList/index.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 暂无记录 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /WeChatApp/pages/rank/index.wxss: -------------------------------------------------------------------------------- 1 | /* pages/rank/index.wxss */ 2 | .selectIcon{ 3 | text-align: center; 4 | margin: 0 auto; 5 | width: 350rpx; 6 | height: 350rpx; 7 | margin-bottom: 130rpx; 8 | padding-top: 100rpx; 9 | } 10 | .answer{ 11 | width:275rpx; 12 | height:275rpx; 13 | } 14 | .selectQuestionMenu{ 15 | font-size:30rpx; 16 | background-color:#eef6f6; 17 | width:400rpx; 18 | height:90rpx; 19 | margin:0 auto; 20 | text-align:center; 21 | justify-content:center; 22 | display:flex; 23 | align-items:center; 24 | color:#adc2c1; 25 | margin-bottom:80rpx; 26 | 27 | } -------------------------------------------------------------------------------- /WeChatApp/dist/input-number/index.wxss: -------------------------------------------------------------------------------- 1 | .i-input-number{color:#495060}.i-input-number view{display:inline-block;line-height:20px;padding:5px 0;text-align:center;min-width:40px;box-sizing:border-box;vertical-align:middle;font-size:12px;border:1rpx solid #dddee1}.i-input-number-minus{border-right:none;border-radius:2px 0 0 2px}.i-input-number-plus{border-left:none;border-radius:0 2px 2px 0}.i-input-number-text{border:1rpx solid #dddee1;display:inline-block;text-align:center;vertical-align:middle;height:30px;width:40px;min-height:auto;font-size:12px;line-height:30px}.i-input-number-disabled{border-color:#dddee1;color:#bbbec4;background:#f7f7f7} -------------------------------------------------------------------------------- /WeChatApp/pages/wrong/index.wxss: -------------------------------------------------------------------------------- 1 | /* pages/wrong/index.wxss */ 2 | .selectIcon{ 3 | text-align: center; 4 | margin: 0 auto; 5 | width: 350rpx; 6 | height: 350rpx; 7 | margin-bottom: 130rpx; 8 | padding-top: 100rpx; 9 | } 10 | .answer{ 11 | width:275rpx; 12 | height:275rpx; 13 | } 14 | .selectQuestionMenu{ 15 | font-size:30rpx; 16 | background-color:#eef6f6; 17 | width:400rpx; 18 | height:90rpx; 19 | margin:0 auto; 20 | text-align:center; 21 | justify-content:center; 22 | display:flex; 23 | align-items:center; 24 | color:#adc2c1; 25 | margin-bottom:80rpx; 26 | 27 | } -------------------------------------------------------------------------------- /Backend/src/icons/svg/password.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Backend/src/views/layout/components/Sidebar/Item.vue: -------------------------------------------------------------------------------- 1 | 30 | -------------------------------------------------------------------------------- /WeChatApp/dist/notice-bar/index.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /WeChatApp/pages/rankList/index.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | {{item.user.nickName}} 9 | 10 | 11 | {{item.score}} 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /WeChatApp/pages/analysis/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "usingComponents": { 3 | "i-spin": "../../dist/spin/index", 4 | "i-row": "../../dist/row/index", 5 | "i-col": "../../dist/col/index", 6 | "i-tag": "../../dist/tag/index", 7 | "i-panel": "../../dist/panel/index", 8 | "i-radio-group": "../../dist/radio-group/index", 9 | "i-radio": "../../dist/radio/index", 10 | "i-page": "../../dist/page/index", 11 | "i-checkbox-group": "../../dist/checkbox-group/index", 12 | "i-checkbox": "../../dist/checkbox/index", 13 | "i-icon": "../../dist/icon/index", 14 | "i-action-sheet": "../../dist/action-sheet/index" 15 | } 16 | } -------------------------------------------------------------------------------- /Backend/test/e2e/specs/test.js: -------------------------------------------------------------------------------- 1 | // For authoring Nightwatch tests, see 2 | // http://nightwatchjs.org/guide#usage 3 | 4 | module.exports = { 5 | 'default e2e tests': function (browser) { 6 | // automatically uses dev Server port from /config.index.js 7 | // default: http://localhost:8080 8 | // see nightwatch.conf.js 9 | const devServer = browser.globals.devServerURL 10 | 11 | browser 12 | .url(devServer) 13 | .waitForElementVisible('#app', 5000) 14 | .assert.elementPresent('.hello') 15 | .assert.containsText('h1', 'Welcome to Your Vue.js App') 16 | .assert.elementCount('img', 1) 17 | .end() 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /WeChatApp/dist/avatar/index.wxss: -------------------------------------------------------------------------------- 1 | .i-avatar{display:inline-block;text-align:center;background:#ccc;color:#fff;white-space:nowrap;position:relative;overflow:hidden;vertical-align:middle;width:32px;height:32px;line-height:32px;border-radius:16px;font-size:18px}.i-avatar .ivu-avatar-string{line-height:32px}.i-avatar-large{width:40px;height:40px;line-height:40px;border-radius:20px;font-size:24px}.i-avatar-large .ivu-avatar-string{line-height:40px}.i-avatar-small{width:24px;height:24px;line-height:24px;border-radius:12px;font-size:14px}.i-avatar-small .ivu-avatar-string{line-height:24px}.i-avatar-image{background:0 0}.i-avatar-square{border-radius:4px}.i-avatar>image{width:100%;height:100%} -------------------------------------------------------------------------------- /Backend/build/vue-loader.conf.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | const utils = require('./utils') 3 | const config = require('../config') 4 | const isProduction = process.env.NODE_ENV === 'production' 5 | const sourceMapEnabled = isProduction 6 | ? config.build.productionSourceMap 7 | : config.dev.cssSourceMap 8 | 9 | module.exports = { 10 | loaders: utils.cssLoaders({ 11 | sourceMap: sourceMapEnabled, 12 | extract: isProduction 13 | }), 14 | cssSourceMap: sourceMapEnabled, 15 | cacheBusting: config.dev.cacheBusting, 16 | transformToRequire: { 17 | video: ['src', 'poster'], 18 | source: 'src', 19 | img: 'src', 20 | image: 'xlink:href' 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /Backend/README.md: -------------------------------------------------------------------------------- 1 | # backend 2 | 3 | > A Vue.js project 4 | 5 | ## Build Setup 6 | 7 | ``` bash 8 | # install dependencies 9 | npm install 10 | 11 | # serve with hot reload at localhost:8080 12 | npm run dev 13 | 14 | # build for production with minification 15 | npm run build 16 | 17 | # build for production and view the bundle analyzer report 18 | npm run build --report 19 | 20 | # run unit tests 21 | npm run unit 22 | 23 | # run e2e tests 24 | npm run e2e 25 | 26 | # run all tests 27 | npm test 28 | ``` 29 | 30 | For a detailed explanation on how things work, check out the [guide](http://vuejs-templates.github.io/webpack/) and [docs for vue-loader](http://vuejs.github.io/vue-loader). 31 | -------------------------------------------------------------------------------- /WeChatApp/dist/tab/index.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | {{ title }} 5 | {{ title }} 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /WeChatApp/dist/radio/index.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /WeChatApp/dist/cell/index.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | {{ title }} 7 | {{ label }} 8 | 9 | 10 | 11 | 12 | {{ value }} 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /WeChatApp/dist/index/index.wxss: -------------------------------------------------------------------------------- 1 | .i-index{width:100%;height:100%}.i-index-line{position:absolute;left:0;width:100%;height:1rpx;background-color:#f7f7f7;top:50%}.i-index-content{background:#fff;position:relative;z-index:1;display:inline-block;padding:0 10px}.i-index-fixed{position:fixed;right:0;top:50%;z-index:10;padding-left:10px;transform:translateY(-50%)}.i-index-fixed-item{display:block;height:18px;line-height:18px;padding:0 5px;text-align:center;color:#2d8cf0;font-size:12px;border-radius:50%}.i-index-fixed-item-current{background:#2d8cf0;color:#fff}.i-index-tooltip{position:fixed;left:50%;top:50%;transform:translate3d(-50%,-50%,0);background:rgba(0,0,0,.7);color:#fff;font-size:24px;border-radius:50%;width:80px;height:80px;line-height:80px;text-align:center} -------------------------------------------------------------------------------- /WeChatApp/dist/toast/index.wxss: -------------------------------------------------------------------------------- 1 | .i-toast{position:fixed;top:35%;left:50%;transform:translate3d(-50%,-50%,0);background:rgba(0,0,0,.7);color:#fff;font-size:14px;line-height:1.5em;margin:0 auto;box-sizing:border-box;padding:10px 18px;text-align:center;border-radius:4px;z-index:1010}.i-toast-mask{position:fixed;top:0;bottom:0;left:0;right:0;z-index:1010}.i-toast-icon{font-size:38px!important;margin-bottom:6px}.i-toast-image{max-width:100px;max-height:100px}.i-toast-loading{display:inline-block;vertical-align:middle;width:28px;height:28px;background:0 0;border-radius:50%;border:2px solid #fff;border-color:#fff #fff #fff #2d8cf0;animation:btn-spin .8s linear;animation-iteration-count:infinite}@keyframes btn-spin{0%{transform:rotate(0)}100%{transform:rotate(360deg)}} -------------------------------------------------------------------------------- /WeChatApp/dist/divider/index.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | {{content}} 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | module.exports = { 12 | getStyle : function(color,size,height){ 13 | var color = 'color:' + color +';'; 14 | var size = 'font-size:' + size + 'px;'; 15 | var height = 'height:' + height+'px;' 16 | return color + size + height; 17 | } 18 | } 19 | 20 | -------------------------------------------------------------------------------- /WeChatApp/dist/badge/index.wxss: -------------------------------------------------------------------------------- 1 | .i-badge{position:relative;display:inline-block;line-height:1;vertical-align:middle}.i-badge-count{position:absolute;transform:translateX(50%);top:-6px;right:0;height:18px;border-radius:9px;min-width:18px;background:#ed3f14;border:1px solid transparent;color:#fff;line-height:18px;text-align:center;padding:0 5px;font-size:12px;white-space:nowrap;transform-origin:-10% center;z-index:10;box-shadow:0 0 0 1px #fff;box-sizing:border-box;text-rendering:optimizeLegibility}.i-badge-count-alone{top:auto;display:block;position:relative;transform:translateX(0)}.i-badge-dot{position:absolute;transform:translateX(-50%);transform-origin:0 center;top:-4px;right:-8px;height:8px;width:8px;border-radius:100%;background:#ed3f14;z-index:10;box-shadow:0 0 0 1px #fff} -------------------------------------------------------------------------------- /WeChatApp/pages/historyList/index.js: -------------------------------------------------------------------------------- 1 | // pages/historyList/index.js 2 | Page({ 3 | 4 | /** 5 | * 页面的初始数据 6 | */ 7 | data: { 8 | dataInfo:{}, 9 | nodata:false, 10 | loading:true 11 | }, 12 | 13 | /** 14 | * 生命周期函数--监听页面加载 15 | */ 16 | onLoad (options) { 17 | wx.u.getHistoryList().then(res=>{ 18 | if(res.result){ 19 | for(let object of res.data){ 20 | object.createdAt = object.createdAt.split(" ")[0] 21 | } 22 | this.setData({ 23 | dataInfo:res.data, 24 | nodata: false, 25 | loading:false 26 | }) 27 | }else{ 28 | this.setData({ 29 | nodata:true, 30 | loading:false 31 | }) 32 | } 33 | }) 34 | } 35 | }) -------------------------------------------------------------------------------- /WeChatApp/pages/my/index.js: -------------------------------------------------------------------------------- 1 | // pages/my/index.js 2 | Page({ 3 | 4 | /** 5 | * 页面的初始数据 6 | */ 7 | data: { 8 | userInfo:{} 9 | }, 10 | 11 | /** 12 | * 生命周期函数--监听页面加载 13 | */ 14 | onLoad (options) { 15 | var that = this 16 | wx.getUserInfo({ 17 | success(res) { 18 | that.setData({ 19 | userInfo:res.userInfo 20 | }) 21 | } 22 | }) 23 | }, 24 | onShareAppMessage(){ 25 | return { 26 | title: '答题酷', 27 | path: '/pages/index/index', 28 | imageUrl:'/images/logo.png' 29 | } 30 | }, 31 | about() { 32 | wx.showModal({ 33 | title: '关于', 34 | content: '本程序后端使用Bmob实现,仅供学习使用,请勿使用于商业用途,如有问题,请联系QQ:903363777', 35 | showCancel: false 36 | }) 37 | } 38 | }) -------------------------------------------------------------------------------- /WeChatApp/wux/result/index.wxss: -------------------------------------------------------------------------------- 1 | .wux-result { 2 | padding-top: 0; 3 | text-align: center; 4 | } 5 | .wux-result__bd { 6 | padding: 60rpx 40rpx; 7 | } 8 | .wux-result__icon { 9 | padding-top: 72rpx; 10 | text-align: center; 11 | } 12 | .wux-result__title { 13 | margin-bottom: 10rpx; 14 | font-weight: 400; 15 | font-size: 40rpx; 16 | } 17 | .wux-result__desc { 18 | font-size: 28rpx; 19 | color: #808080; 20 | } 21 | .wux-result__buttons { 22 | margin-top: 60rpx; 23 | } 24 | .wux-result__ft { 25 | font-size: 28rpx; 26 | color: #808080; 27 | } 28 | .wux-result--fixed .wux-result__ft { 29 | position: fixed; 30 | left: 0; 31 | bottom: 0; 32 | width: 100%; 33 | padding: 30rpx; 34 | text-align: center; 35 | box-sizing: border-box; 36 | } 37 | -------------------------------------------------------------------------------- /WeChatApp/dist/alert/index.wxss: -------------------------------------------------------------------------------- 1 | .i-alert{position:relative;margin:10px;padding:8px 48px 8px 16px;font-size:14px;border-radius:2px;color:#fff;background:#f7f7f7;color:#495060}.i-alert.i-alert-with-icon{padding:8px 48px 8px 38px}.i-alert-info{color:#fff;background:#2db7f5}.i-alert-success{color:#fff;background:#19be6b}.i-alert-warning{color:#fff;background:#f90}.i-alert-error{color:#fff;background:#ed3f14}.i-alert-icon{position:absolute;top:9px;left:16px;font-size:14px}.i-alert-desc{font-size:12px}.i-alert-with-desc{padding:16px;position:relative}.i-alert-with-desc.i-alert-with-icon{padding:16px 16px 16px 69px}.i-alert-with-desc .i-alert-icon{top:50%;left:24px;margin-top:-21px;font-size:28px}.i-alert-close{font-size:12px;position:absolute;right:16px;top:8px;overflow:hidden;cursor:pointer} -------------------------------------------------------------------------------- /WeChatApp/pages/my/index.wxss: -------------------------------------------------------------------------------- 1 | .button-text { 2 | background-color: #fff; 3 | font-size: 14px; 4 | line-height: unset; 5 | padding: unset; 6 | text-align: unset; 7 | color: #bbb; 8 | } 9 | .button-text:after { 10 | border: unset; 11 | } 12 | .header-pic{ 13 | flex: 1; 14 | text-align: left; 15 | display:flex; 16 | align-items:center; 17 | border-right: 1px solid #e9eaec; 18 | } 19 | .header{ 20 | /* display:flex; */ 21 | padding:16px 16px; 22 | background: #fff; 23 | 24 | } 25 | view.userPic,.userPic>image,.userPic>view{ 26 | width: 60px; 27 | height: 60px; 28 | line-height:60px; 29 | } 30 | .userPic>image{ 31 | margin-right: 15rpx; 32 | } 33 | .bg-line{ 34 | height: 4px; 35 | background: #e9eaec; 36 | } -------------------------------------------------------------------------------- /WeChatApp/dist/page/index.wxss: -------------------------------------------------------------------------------- 1 | .i-page{display:block;width:100%;height:44px;overflow:hidden;box-sizing:border-box;position:relative}.i-page-prev{position:absolute;left:10px;top:0;}.i-page-next{position:absolute;right:10px;top:0;height: 100%;}.i-page-number{width:100%;height:44px;line-height:44px;margin:0 auto;text-align:center;}.i-page-number-current{display:inline;color:#2d8cf0}.i-page-pointer{width:100%;height:44px;line-height:44px;margin:0 auto;text-align:center}.i-page-pointer-dot{display:inline-block;width:8px;height:8px;margin:0 2px;border-radius:50%;background:#bbbec4}.i-page-pointer-dot.current{background:#80848f}.i-page-button{display:inline-block;margin:0!important;background-color: #fff;font-size: 12px;height: 100%;line-height: 44px;}.i-page-button::after{border:none!important;} -------------------------------------------------------------------------------- /WeChatApp/dist/drawer/index.wxss: -------------------------------------------------------------------------------- 1 | .i-drawer{visibility:hidden}.i-drawer-show{visibility:visible}.i-drawer-show .i-drawer-mask{display:block;opacity:1}.i-drawer-show .i-drawer-container{opacity:1}.i-drawer-show.i-drawer-left .i-drawer-container,.i-drawer-show.i-drawer-right .i-drawer-container{transform:translate3d(0,-50%,0)}.i-drawer-mask{opacity:0;position:fixed;top:0;left:0;right:0;bottom:0;z-index:6;background:rgba(0,0,0,.6);transition:all .3s ease-in-out}.i-drawer-container{position:fixed;left:50%;top:50%;transform:translate3d(-50%,-50%,0);transform-origin:center;transition:all .3s ease-in-out;z-index:7;opacity:0}.i-drawer-left .i-drawer-container{left:0;top:50%;transform:translate3d(-100%,-50%,0)}.i-drawer-right .i-drawer-container{right:0;top:50%;left:auto;transform:translate3d(100%,-50%,0)} -------------------------------------------------------------------------------- /WeChatApp/pages/answerInfo/index.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 选择题库 6 | {{questionMenu}} 7 | 8 | 9 | 答题标准 10 | {{questionNum}}题, {{time}}分钟 11 | 12 | 13 | 14 | 15 | 16 | 本题库共{{questionNum}}小题,包含单项选择题和多项选择题,每小题1分。单项选择题只有1个正确答案,多项选择题有多个正确答案,请从每题的备选答案中选出你认为正确的答案。答题不可修改,时间到,系统自动交卷。 17 | 18 | 19 | 20 | 开始答题 21 | 22 | -------------------------------------------------------------------------------- /WeChatApp/dist/drawer/index.js: -------------------------------------------------------------------------------- 1 | Component({ 2 | externalClasses: ['i-class'], 3 | properties: { 4 | visible: { 5 | type: Boolean, 6 | value: false 7 | }, 8 | 9 | mask: { 10 | type: Boolean, 11 | value: true 12 | }, 13 | 14 | maskClosable: { 15 | type: Boolean, 16 | value: true 17 | }, 18 | 19 | mode: { 20 | type: String, 21 | value: 'left' // left right 22 | } 23 | }, 24 | data: {}, 25 | methods: { 26 | handleMaskClick() { 27 | if (!this.data.maskClosable) { 28 | return; 29 | } 30 | this.triggerEvent('close', {}); 31 | } 32 | } 33 | }); 34 | -------------------------------------------------------------------------------- /WeChatApp/dist/badge/index.js: -------------------------------------------------------------------------------- 1 | Component({ 2 | externalClasses: ['i-class', 'i-class-alone'], 3 | 4 | properties: { 5 | count: { 6 | type: Number, 7 | value: 0, 8 | observer: 'finalCount' 9 | }, 10 | overflowCount: { 11 | type: Number, 12 | value: 99 13 | }, 14 | dot: { 15 | type: Boolean, 16 | value: false 17 | }, 18 | }, 19 | data: { 20 | finalCount: 0 21 | }, 22 | methods: { 23 | finalCount() { 24 | this.setData({ 25 | finalCount: parseInt(this.data.count) >= parseInt(this.data.overflowCount) ? `${this.data.overflowCount}+` : this.data.count 26 | }); 27 | }, 28 | } 29 | }); 30 | -------------------------------------------------------------------------------- /WeChatApp/dist/tab-bar-item/index.wxss: -------------------------------------------------------------------------------- 1 | .i-tab-bar-item{flex:1;display:flex;width:100%;-webkit-box-pack:center;justify-content:center;-webkit-box-align:center;align-items:center;-webkit-box-orient:vertical;-webkit-box-direction:normal;flex-direction:column;text-align:center}.i-tab-bar-item-icon{display:flex;-webkit-box-pack:center;justify-content:center;box-sizing:border-box;color:#80848f}.i-tab-bar-item-icon-current{color:#2d8cf0}.i-tab-bar-item-img{display:flex;-webkit-box-pack:center;justify-content:center;box-sizing:border-box;width:22px;height:22px}.i-tab-bar-item-title{font-size:10px;margin:3px 0 0;line-height:1;text-align:center;box-sizing:border-box;color:#80848f}.i-tab-bar-item-title-current{color:#2d8cf0}.i-tab-bar-item-img{display:flex;-webkit-box-pack:center;justify-content:center;box-sizing:border-box;color:#80848f} -------------------------------------------------------------------------------- /Backend/src/icons/svg/nested.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /WeChatApp/dist/rate/index.wxml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 10 | 11 | 12 | 13 | 14 | 15 | var prefixCls = 'i-rate'; 16 | module.exports = { 17 | getCurrent : function( value,index ){ 18 | if( index < value ){ 19 | return prefixCls + '-current' 20 | } 21 | } 22 | } 23 | 24 | -------------------------------------------------------------------------------- /WeChatApp/wux/cell-group/index.wxss: -------------------------------------------------------------------------------- 1 | .wux-cell-group__hd { 2 | padding: 30rpx 30rpx 18rpx; 3 | font-size: 28rpx; 4 | color: #888; 5 | width: 100%; 6 | box-sizing: border-box; 7 | } 8 | .wux-cell-group__bd { 9 | position: relative; 10 | background-color: #fff; 11 | } 12 | .wux-cell-group__bd:after { 13 | content: " "; 14 | position: absolute; 15 | top: 0; 16 | left: 0; 17 | width: 200%; 18 | height: 200%; 19 | -webkit-transform: scale(0.5); 20 | transform: scale(0.5); 21 | -webkit-transform-origin: 0 0; 22 | transform-origin: 0 0; 23 | pointer-events: none; 24 | box-sizing: border-box; 25 | border: 0 solid #D9D9D9; 26 | border-top-width: 2rpx; 27 | border-bottom-width: 2rpx; 28 | } 29 | .wux-cell-group__ft { 30 | padding: 18rpx 30rpx 30rpx; 31 | font-size: 28rpx; 32 | color: #888; 33 | } 34 | -------------------------------------------------------------------------------- /Backend/src/views/layout/components/Sidebar/Link.vue: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 40 | -------------------------------------------------------------------------------- /Backend/test/unit/jest.conf.js: -------------------------------------------------------------------------------- 1 | const path = require('path') 2 | 3 | module.exports = { 4 | rootDir: path.resolve(__dirname, '../../'), 5 | moduleFileExtensions: [ 6 | 'js', 7 | 'json', 8 | 'vue' 9 | ], 10 | moduleNameMapper: { 11 | '^@/(.*)$': '/src/$1' 12 | }, 13 | transform: { 14 | '^.+\\.js$': '/node_modules/babel-jest', 15 | '.*\\.(vue)$': '/node_modules/vue-jest' 16 | }, 17 | testPathIgnorePatterns: [ 18 | '/test/e2e' 19 | ], 20 | snapshotSerializers: ['/node_modules/jest-serializer-vue'], 21 | setupFiles: ['/test/unit/setup'], 22 | mapCoverage: true, 23 | coverageDirectory: '/test/unit/coverage', 24 | collectCoverageFrom: [ 25 | 'src/**/*.{js,vue}', 26 | '!src/main.js', 27 | '!src/router/index.js', 28 | '!**/node_modules/**' 29 | ] 30 | } 31 | -------------------------------------------------------------------------------- /WeChatApp/dist/tab-bar-item/index.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | {{ title }} 7 | {{ title }} 8 | 9 | 10 | -------------------------------------------------------------------------------- /Backend/src/views/layout/components/AppMain.vue: -------------------------------------------------------------------------------- 1 | 10 | 11 | 21 | 22 | 30 | -------------------------------------------------------------------------------- /WeChatApp/pages/answer/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "navigationBarTitleText": "答题", 3 | "usingComponents": { 4 | "i-spin": "../../dist/spin/index", 5 | "i-row": "../../dist/row/index", 6 | "i-col": "../../dist/col/index", 7 | "i-progress": "../../dist/progress/index", 8 | "i-tag": "../../dist/tag/index", 9 | "i-panel": "../../dist/panel/index", 10 | "i-radio-group": "../../dist/radio-group/index", 11 | "i-radio": "../../dist/radio/index", 12 | "i-page": "../../dist/page/index", 13 | "i-icon": "../../dist/icon/index", 14 | "i-checkbox-group": "../../dist/checkbox-group/index", 15 | "i-checkbox": "../../dist/checkbox/index", 16 | "i-button": "../../dist/button/index", 17 | "i-action-sheet": "../../dist/action-sheet/index", 18 | "i-modal": "../../dist/modal/index", 19 | "i-message": "../../dist/message/index" 20 | } 21 | } -------------------------------------------------------------------------------- /WeChatApp/dist/alert/index.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /Backend/src/components/SvgIcon/index.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 34 | 35 | 44 | -------------------------------------------------------------------------------- /WeChatApp/dist/alert/index.js: -------------------------------------------------------------------------------- 1 | Component({ 2 | externalClasses: ['i-class'], 3 | options: { 4 | multipleSlots: true 5 | }, 6 | properties: { 7 | //info, success, warning, error 8 | type: { 9 | type: String, 10 | value: 'info' 11 | }, 12 | closable: { 13 | type: Boolean, 14 | value: false 15 | }, 16 | showIcon: { 17 | type: Boolean, 18 | default: false 19 | }, 20 | desc: { 21 | type: Boolean, 22 | default: false 23 | }, 24 | }, 25 | data: { 26 | closed: false 27 | }, 28 | methods: { 29 | handleTap() { 30 | this.setData({ 31 | closed: !this.data.closed, 32 | }); 33 | this.triggerEvent('close'); 34 | }, 35 | 36 | } 37 | }); 38 | -------------------------------------------------------------------------------- /WeChatApp/dist/card/index.js: -------------------------------------------------------------------------------- 1 | Component({ 2 | externalClasses: ['i-class'], 3 | 4 | options: { 5 | multipleSlots: true 6 | }, 7 | 8 | properties: { 9 | full: { 10 | type: Boolean, 11 | value: false 12 | }, 13 | thumb: { 14 | type: String, 15 | value: '' 16 | }, 17 | title: { 18 | type: String, 19 | value: '' 20 | }, 21 | extra: { 22 | type: String, 23 | value: '' 24 | }, 25 | logo: { 26 | type: String, 27 | value: '' 28 | }, 29 | size: { 30 | type: String, 31 | value: 'default' // small, default, large 32 | }, 33 | shape: { 34 | type: String, 35 | value: 'square' // square, circle 36 | } 37 | } 38 | }); 39 | -------------------------------------------------------------------------------- /WeChatApp/dist/card/index.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | {{ title }} 7 | 8 | {{ extra }} 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /WeChatApp/wux/cell/index.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | {{ title }} 12 | {{ label }} 13 | 14 | 15 | 16 | {{ extra }} 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /Backend/src/main.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | 3 | import ElementUI from 'element-ui' 4 | import 'element-ui/lib/theme-chalk/index.css' 5 | import '@/icons' // icon 6 | import '@/styles/index.scss' // global css 7 | 8 | import locale from 'element-ui/lib/locale/lang/zh-CN' //Element 组件内部默认使用中文,若希望使用其他语言,则需要进行多语言设置 9 | 10 | import App from './App' 11 | import router from './router' 12 | import store from './store' 13 | import {bmob} from './api/bmobConfig' 14 | import '@/permission' // permission control 15 | import tablelist from './components/Tablelist/index' 16 | 17 | 18 | 19 | Vue.config.productionTip = false 20 | 21 | Vue.use(ElementUI,{ locale }) 22 | Vue.prototype.$Bmob = bmob() //全局变量 23 | 24 | Vue.component('tablelist',tablelist) 25 | 26 | /* eslint-disable no-new */ 27 | new Vue({ 28 | el: '#app', 29 | router, 30 | store, 31 | components: { App }, 32 | template: '' 33 | }) 34 | -------------------------------------------------------------------------------- /WeChatApp/dist/spin/index.wxss: -------------------------------------------------------------------------------- 1 | .i-spin{color:#2d8cf0;vertical-align:middle;text-align:center}.i-spin-dot{position:relative;display:block;border-radius:50%;background-color:#2d8cf0;width:20px;height:20px;animation:ani-spin-bounce 1s 0s ease-in-out infinite}.i-spin-large .i-spin-dot{width:32px;height:32px}.i-spin-small .i-spin-dot{width:12px;height:12px}.i-spin-fix{position:absolute;top:0;left:0;z-index:8;width:100%;height:100%;background-color:rgba(255,255,255,.9)}.i-spin-fullscreen{z-index:2010}.i-spin-fullscreen-wrapper{position:fixed;top:0;right:0;bottom:0;left:0}.i-spin-fix .i-spin-main{position:absolute;top:50%;left:50%;-ms-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}.i-spin-fix .i-spin-dot{display:inline-block}.i-spin-show-text .i-spin-dot,.i-spin-text{display:none}.i-spin-show-text .i-spin-text{display:block;font-size:14px}@keyframes ani-spin-bounce{0%{transform:scale(0)}100%{transform:scale(1);opacity:0}} -------------------------------------------------------------------------------- /Backend/src/styles/transition.scss: -------------------------------------------------------------------------------- 1 | //globl transition css 2 | 3 | /*fade*/ 4 | .fade-enter-active, 5 | .fade-leave-active { 6 | transition: opacity 0.28s; 7 | } 8 | 9 | .fade-enter, 10 | .fade-leave-active { 11 | opacity: 0; 12 | } 13 | 14 | /*fade-transform*/ 15 | .fade-transform-leave-active, 16 | .fade-transform-enter-active { 17 | transition: all .5s; 18 | } 19 | .fade-transform-enter { 20 | opacity: 0; 21 | transform: translateX(-30px); 22 | } 23 | .fade-transform-leave-to { 24 | opacity: 0; 25 | transform: translateX(30px); 26 | } 27 | 28 | /*fade*/ 29 | .breadcrumb-enter-active, 30 | .breadcrumb-leave-active { 31 | transition: all .5s; 32 | } 33 | 34 | .breadcrumb-enter, 35 | .breadcrumb-leave-active { 36 | opacity: 0; 37 | transform: translateX(20px); 38 | } 39 | 40 | .breadcrumb-move { 41 | transition: all .5s; 42 | } 43 | 44 | .breadcrumb-leave-active { 45 | position: absolute; 46 | } 47 | -------------------------------------------------------------------------------- /Backend/test/e2e/custom-assertions/elementCount.js: -------------------------------------------------------------------------------- 1 | // A custom Nightwatch assertion. 2 | // The assertion name is the filename. 3 | // Example usage: 4 | // 5 | // browser.assert.elementCount(selector, count) 6 | // 7 | // For more information on custom assertions see: 8 | // http://nightwatchjs.org/guide#writing-custom-assertions 9 | 10 | exports.assertion = function (selector, count) { 11 | this.message = 'Testing if element <' + selector + '> has count: ' + count 12 | this.expected = count 13 | this.pass = function (val) { 14 | return val === this.expected 15 | } 16 | this.value = function (res) { 17 | return res.value 18 | } 19 | this.command = function (cb) { 20 | var self = this 21 | return this.api.execute(function (selector) { 22 | return document.querySelectorAll(selector).length 23 | }, [selector], function (res) { 24 | cb.call(self, res) 25 | }) 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /WeChatApp/dist/base/index.js: -------------------------------------------------------------------------------- 1 | function getCtx (selector) { 2 | const pages = getCurrentPages(); 3 | const ctx = pages[pages.length - 1]; 4 | 5 | const componentCtx = ctx.selectComponent(selector); 6 | 7 | if (!componentCtx) { 8 | console.error('无法找到对应的组件,请按文档说明使用组件'); 9 | return null; 10 | } 11 | return componentCtx; 12 | } 13 | 14 | function Toast(options) { 15 | const { selector = '#toast' } = options; 16 | const ctx = getCtx(selector); 17 | 18 | ctx.handleShow(options); 19 | } 20 | 21 | Toast.hide = function (selector = '#toast') { 22 | const ctx = getCtx(selector); 23 | 24 | ctx.handleHide(); 25 | }; 26 | 27 | function Message(options) { 28 | const { selector = '#message' } = options; 29 | const ctx = getCtx(selector); 30 | 31 | ctx.handleShow(options); 32 | } 33 | 34 | module.exports = { 35 | $Toast: Toast, 36 | $Message: Message 37 | }; -------------------------------------------------------------------------------- /WeChatApp/dist/collapse/index.js: -------------------------------------------------------------------------------- 1 | Component({ 2 | externalClasses: ['i-class'], 3 | 4 | relations: { 5 | '../collapse-item/index': { 6 | type: 'child' 7 | } 8 | }, 9 | properties: { 10 | name: String, 11 | accordion: Boolean 12 | }, 13 | methods: { 14 | clickfn(e) { 15 | const params = e.detail; 16 | const allList = this.getRelationNodes('../collapse-item/index'); 17 | allList.forEach((item) => { 18 | if (params.name === item.data.name) { 19 | item.setData({ 20 | showContent: 'i-collapse-item-show-content' 21 | }); 22 | } else { 23 | item.setData({ 24 | showContent: '' 25 | }); 26 | } 27 | }); 28 | }, 29 | } 30 | }); 31 | 32 | -------------------------------------------------------------------------------- /WeChatApp/dist/cell/index.wxss: -------------------------------------------------------------------------------- 1 | .i-cell{position:relative;padding:12px 15px;display:flex;background:#fff;align-items:center;line-height:1.4;font-size:14px;overflow:hidden}.i-cell::after{content:'';position:absolute;top:0;left:0;width:200%;height:200%;transform:scale(.5);transform-origin:0 0;pointer-events:none;box-sizing:border-box;border:0 solid #e9eaec;border-bottom-width:1px;left:15px;right:0}.i-cell-last::after{display:none}.i-cell-icon{margin-right:5px}.i-cell-icon:empty{display:none}.i-cell-bd{flex:1}.i-cell-text{line-height:24px;font-size:14px}.i-cell-desc{line-height:1.2;font-size:12px;color:#80848f}.i-cell-ft{position:relative;text-align:right;color:#495060}.i-cell-access .i-cell-ft{padding-right:13px}.i-cell-access .i-cell-ft::after{content:" ";display:inline-block;width:6px;height:6px;position:absolute;top:50%;right:2px;border-width:2px 2px 0 0;border-color:#dddee1;border-style:solid;transform:translateY(-50%) matrix(.71,.71,-.71,.71,0,0)} -------------------------------------------------------------------------------- /WeChatApp/dist/index-item/index.js: -------------------------------------------------------------------------------- 1 | Component({ 2 | externalClasses: ['i-class'], 3 | properties : { 4 | name : { 5 | type : String, 6 | value : '' 7 | } 8 | }, 9 | relations : { 10 | '../index/index' : { 11 | type : 'parent' 12 | } 13 | }, 14 | data : { 15 | top : 0, 16 | height : 0, 17 | currentName : '' 18 | }, 19 | methods: { 20 | updateDataChange() { 21 | const className = '.i-index-item'; 22 | const query = wx.createSelectorQuery().in(this); 23 | query.select( className ).boundingClientRect((res)=>{ 24 | this.setData({ 25 | top : res.top, 26 | height : res.height, 27 | currentName : this.data.name 28 | }) 29 | }).exec() 30 | } 31 | } 32 | }) -------------------------------------------------------------------------------- /Backend/src/icons/svg/eye.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /WeChatApp/dist/cell-group/index.js: -------------------------------------------------------------------------------- 1 | Component({ 2 | externalClasses: ['i-class'], 3 | 4 | relations: { 5 | '../cell/index': { 6 | type: 'child', 7 | linked () { 8 | this._updateIsLastCell(); 9 | }, 10 | linkChanged () { 11 | this._updateIsLastCell(); 12 | }, 13 | unlinked () { 14 | this._updateIsLastCell(); 15 | } 16 | } 17 | }, 18 | 19 | methods: { 20 | _updateIsLastCell() { 21 | let cells = this.getRelationNodes('../cell/index'); 22 | const len = cells.length; 23 | 24 | if (len > 0) { 25 | let lastIndex = len - 1; 26 | 27 | cells.forEach((cell, index) => { 28 | cell.updateIsLastCell(index === lastIndex); 29 | }); 30 | } 31 | } 32 | } 33 | }); 34 | -------------------------------------------------------------------------------- /WeChatApp/pages/result/index.js: -------------------------------------------------------------------------------- 1 | // pages/result/index.js 2 | Page({ 3 | 4 | /** 5 | * 页面的初始数据 6 | */ 7 | data: { 8 | 9 | }, 10 | 11 | /** 12 | * 生命周期函数--监听页面加载 13 | */ 14 | onLoad: function (options) { 15 | 16 | }, 17 | 18 | /** 19 | * 生命周期函数--监听页面初次渲染完成 20 | */ 21 | onReady: function () { 22 | 23 | }, 24 | 25 | /** 26 | * 生命周期函数--监听页面显示 27 | */ 28 | onShow: function () { 29 | 30 | }, 31 | 32 | /** 33 | * 生命周期函数--监听页面隐藏 34 | */ 35 | onHide: function () { 36 | 37 | }, 38 | 39 | /** 40 | * 生命周期函数--监听页面卸载 41 | */ 42 | onUnload: function () { 43 | 44 | }, 45 | 46 | /** 47 | * 页面相关事件处理函数--监听用户下拉动作 48 | */ 49 | onPullDownRefresh: function () { 50 | 51 | }, 52 | 53 | /** 54 | * 页面上拉触底事件的处理函数 55 | */ 56 | onReachBottom: function () { 57 | 58 | }, 59 | 60 | /** 61 | * 用户点击右上角分享 62 | */ 63 | onShareAppMessage: function () { 64 | 65 | } 66 | }) -------------------------------------------------------------------------------- /WeChatApp/pages/select/index.wxss: -------------------------------------------------------------------------------- 1 | /* pages/select/index.wxss */ 2 | .selectIcon{ 3 | text-align: center; 4 | margin: 0 auto; 5 | width: 350rpx; 6 | height: 350rpx; 7 | margin-bottom: 130rpx; 8 | padding-top: 100rpx; 9 | } 10 | .answer{ 11 | width:275rpx; 12 | height:275rpx; 13 | } 14 | .selectQuestionMenu{ 15 | font-size:30rpx; 16 | background-color:#eef6f6; 17 | width:400rpx; 18 | height:90rpx; 19 | margin:0 auto; 20 | text-align:center; 21 | justify-content:center; 22 | display:flex; 23 | align-items:center; 24 | color:#adc2c1; 25 | margin-bottom:80rpx; 26 | 27 | } 28 | .start{ 29 | font-size: 30rpx; 30 | background-color: #2db7f5; 31 | width: 250rpx; 32 | height: 80rpx; 33 | border-radius: 100rpx; 34 | color: #ffffff; 35 | margin: 0 auto; 36 | text-align: center; 37 | justify-content:center; 38 | display:flex; 39 | align-items:center; 40 | 41 | } 42 | -------------------------------------------------------------------------------- /WeChatApp/dist/tag/index.wxml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | 7 | module.exports = { 8 | getClass : function(color,type,checked,checkable) { 9 | var initColorList = ['blue', 'green', 'red', 'yellow', 'default']; 10 | var theme = ''; 11 | var className = 'i-tag-'; 12 | if( initColorList.indexOf( color ) > -1 ){ 13 | theme = className + color; 14 | } 15 | if( type === 'border' ){ 16 | theme = className+color+'-border'; 17 | } 18 | if( checkable && checked ){ 19 | theme = className+color+'-checked'; 20 | }else if( checkable && !checked ){ 21 | theme = ( type === 'border' ? className + color +'-border' : className+'none' ); 22 | } 23 | 24 | return theme; 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /WeChatApp/pages/answerInfo/index.js: -------------------------------------------------------------------------------- 1 | // pages/answerInfo/index.js 2 | Page({ 3 | 4 | /** 5 | * 页面的初始数据 6 | */ 7 | data: { 8 | id:'', 9 | time:'', 10 | questionMenu:'', 11 | questionNum:'' 12 | }, 13 | onLoad (e) { 14 | var id = e.id 15 | var questionMenu = e.questionMenu 16 | var time, questionNum 17 | wx.u.getSetting().then(res=>{ 18 | for(let i in res.result){ 19 | if(res.result[i].key == 'time'){ 20 | time = res.result[i].value 21 | } else if (res.result[i].key == 'questionNum'){ 22 | questionNum = res.result[i].value 23 | } 24 | } 25 | this.setData({ 26 | id:id, 27 | time:time, 28 | questionMenu: questionMenu, 29 | questionNum:questionNum 30 | }) 31 | }) 32 | }, 33 | start(){ 34 | wx.redirectTo({ 35 | url: '/pages/answer/index?id=' + this.data.id + '&questionMenu=' + this.data.questionMenu 36 | }) 37 | 38 | } 39 | }) -------------------------------------------------------------------------------- /WeChatApp/dist/page/index.js: -------------------------------------------------------------------------------- 1 | Component({ 2 | externalClasses: ['i-class'], 3 | 4 | options: { 5 | multipleSlots: true 6 | }, 7 | 8 | properties: { 9 | // button || number || pointer 10 | mode: { 11 | type: String, 12 | value: 'button' 13 | }, 14 | current: { 15 | type: Number, 16 | value: 1 17 | }, 18 | total: { 19 | type: Number, 20 | value: 0 21 | }, 22 | // 是否隐藏数值 23 | simple: { 24 | type: Boolean, 25 | value: false 26 | } 27 | }, 28 | 29 | methods: { 30 | handleChange (type) { 31 | this.triggerEvent('change', { 32 | type: type 33 | }); 34 | }, 35 | handlePrev () { 36 | this.handleChange('prev'); 37 | }, 38 | handleNext () { 39 | this.handleChange('next'); 40 | } 41 | } 42 | }); 43 | -------------------------------------------------------------------------------- /WeChatApp/dist/page/index.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | {{ current }}/{{total}} 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /WeChatApp/wux/helpers/gestures.js: -------------------------------------------------------------------------------- 1 | /** 2 | * 获取触摸点位置信息 3 | */ 4 | export const getTouchPoints = (e, index = 0) => { 5 | const { pageX: x, pageY: y } = e.touches[index] || e.changedTouches[index] 6 | return { 7 | x, 8 | y, 9 | } 10 | } 11 | 12 | /** 13 | * 获取触摸点个数 14 | */ 15 | export const getPointsNumber = (e) => e.touches && e.touches.length || e.changedTouches && e.changedTouches.length 16 | 17 | /** 18 | * 判断是否为同一点 19 | */ 20 | export const isEqualPoints = (p1, p2) => p1.x === p2.x && p1.y === p2.y 21 | 22 | /** 23 | * 判断是否为相近的两点 24 | */ 25 | export const isNearbyPoints = (p1, p2, DOUBLE_TAP_RADIUS = 25) => { 26 | const xMove = Math.abs(p1.x - p2.x) 27 | const yMove = Math.abs(p1.y - p2.y) 28 | return xMove < DOUBLE_TAP_RADIUS & yMove < DOUBLE_TAP_RADIUS 29 | } 30 | 31 | /** 32 | * 获取两点之间的距离 33 | */ 34 | export const getPointsDistance = (p1, p2) => { 35 | const xMove = Math.abs(p1.x - p2.x) 36 | const yMove = Math.abs(p1.y - p2.y) 37 | return Math.sqrt(xMove * xMove + yMove * yMove) 38 | } -------------------------------------------------------------------------------- /WeChatApp/dist/toast/index.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | {{ content }} 16 | -------------------------------------------------------------------------------- /WeChatApp/dist/switch/index.js: -------------------------------------------------------------------------------- 1 | Component({ 2 | externalClasses: ['i-class'], 3 | properties : { 4 | value : { 5 | type : Boolean, 6 | value : false 7 | }, 8 | //large small default 9 | size : { 10 | type : String, 11 | value : 'default' 12 | }, 13 | // is or not disable 14 | disabled : { 15 | type : Boolean, 16 | value : false 17 | }, 18 | // hidden inut name 19 | name : { 20 | type : String, 21 | value : '' 22 | } 23 | }, 24 | options: { 25 | // 在组件定义时的选项中启用多slot支持 26 | multipleSlots: true 27 | }, 28 | methods : { 29 | toggle(){ 30 | if( this.data.disabled ) return; 31 | const data = this.data; 32 | const value = data.value ? false : true; 33 | this.triggerEvent('change',{ 34 | value : value 35 | }) 36 | } 37 | } 38 | }); 39 | -------------------------------------------------------------------------------- /WeChatApp/dist/switch/index.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | var sizes = ['large', 'default']; 12 | var prefixCls = 'i-switch'; 13 | module.exports = { 14 | setSize : function( size ){ 15 | var index = sizes.indexOf( size ); 16 | return prefixCls + ( index > -1 ? ( '-'+size ) : 'default' ) 17 | }, 18 | setCurrent : function( value,disabled ){ 19 | var className = value && !disabled ? prefixCls + '-checked' : ''; 20 | if( disabled ){ 21 | className += ' ' + prefixCls + '-disabled'; 22 | } 23 | return className; 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /WeChatApp/pages/answerInfo/index.wxss: -------------------------------------------------------------------------------- 1 | /* pages/answerInfo/index.wxss */ 2 | .content { 3 | margin: 0 20px; 4 | padding: 10px; 5 | border-radius: 5px; 6 | background: #fff; 7 | 8 | } 9 | .css-shadow{ 10 | -moz-box-shadow:2px 2px 10px #2db7f5; 11 | -webkit-box-shadow:2px 2px 10px #2db7f5; 12 | box-shadow:2px 2px 10px #2db7f5; 13 | } 14 | .css-shadow-bottom{ 15 | box-shadow:0px 2px 5px #2db7f5; 16 | } 17 | .score-col { 18 | text-align: center; 19 | color: #a0a0a0 ; 20 | line-height: 40px; 21 | } 22 | .tips { 23 | line-height: 25px; 24 | font-size: 15px; 25 | color: #aaa; 26 | padding:0 40rpx; 27 | 28 | } 29 | .startAnswer{ 30 | position: fixed; 31 | bottom: 30%; 32 | left: 50%; 33 | margin-left: -125rpx; 34 | font-size: 30rpx; 35 | background-color: #2db7f5; 36 | width: 250rpx; 37 | height: 80rpx; 38 | border-radius: 100rpx; 39 | color: #ffffff; 40 | text-align: center; 41 | justify-content:center; 42 | display:flex; 43 | align-items:center; 44 | } -------------------------------------------------------------------------------- /WeChatApp/wux/prompt/index.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | {{ title }} 5 | {{ text }} 6 | 7 | 8 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /WeChatApp/dist/button/index.wxml: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /WeChatApp/dist/progress/index.wxss: -------------------------------------------------------------------------------- 1 | .i-progress{display:inline-block;width:100%;font-size:12px;position:relative}.i-progress-outer{display:inline-block;width:100%;margin-right:0;padding-right:0;box-sizing:border-box}.i-progress-show-info .i-progress-outer{padding-right:55px;margin-right:-55px}.i-progress-inner{display:inline-block;width:100%;background-color:#f3f3f3;border-radius:100px;vertical-align:middle}.i-progress-bg{border-radius:100px;background-color:#2db7f5;transition:all .2s linear;position:relative}.i-progress-text{display:inline-block;margin-left:5px;text-align:left;font-size:1em;vertical-align:middle}.i-progress-active .i-progress-bg:before{content:'';opacity:0;position:absolute;top:0;left:0;right:0;bottom:0;background:#fff;border-radius:10px;animation:i-progress-active 2s ease-in-out infinite}.i-progress-wrong .i-progress-bg{background-color:#ed3f14}.i-progress-wrong .i-progress-text{color:#ed3f14}.i-progress-success .i-progress-bg{background-color:#19be6b}.i-progress-success .i-progress-text{color:#19be6b}@keyframes i-progress-active{0%{opacity:.3;width:0}100%{opacity:0;width:100%}} -------------------------------------------------------------------------------- /WeChatApp/dist/load-more/index.wxss: -------------------------------------------------------------------------------- 1 | .i-load-more{width:65%;margin:1.5em auto;line-height:1.6em;font-size:14px;text-align:center}.i-load-more-loading{display:inline-block;margin-right:12px;vertical-align:middle;width:14px;height:14px;background:0 0;border-radius:50%;border:2px solid #e9eaec;border-color:#e9eaec #e9eaec #e9eaec #2d8cf0;animation:btn-spin .6s linear;animation-iteration-count:infinite}.i-load-more-tip{display:inline-block;vertical-align:middle;color:#495060}.i-load-more-line{border-top:1px solid #dddee1;display:flex;border-top:0}.i-load-more-line::before{position:relative;top:-1px;-webkit-box-flex:1;-webkit-flex:1;flex:1;content:'';border-top:1px solid #dddee1}.i-load-more-line::after{position:relative;top:-1px;-webkit-box-flex:1;-webkit-flex:1;flex:1;content:'';border-top:1px solid #dddee1}.i-load-more-line .i-load-more-tip{position:relative;top:-.9em;padding:0 .55em}.i-load-more-empty{width:4px;height:4px;border-radius:50%;background-color:#e5e5e5;display:inline-block;position:relative;vertical-align:0;top:-.16em}@keyframes btn-spin{0%{transform:rotate(0)}100%{transform:rotate(360deg)}} -------------------------------------------------------------------------------- /WeChatApp/dist/tag/index.wxss: -------------------------------------------------------------------------------- 1 | .i-tag{display:inline-block;height:18px;line-height:18px;padding:0 4px;border-radius:2px;background:#fff;font-size:11px;vertical-align:middle;border:1rpx solid #dddee1}.i-tag-none{border-color:#fff}.i-tag-default{border-color:#dddee1;background:#e9eaec}.i-tag-red{background:#ed3f14;color:#fff}.i-tag-red-border{color:#ed3f14;background:#fff;border-color:#ed3f14}.i-tag-red-checked{background:#ed3f14;color:#fff;border-color:#ed3f14}.i-tag-green{background:#19be6b;color:#fff;border-color:#19be6b}.i-tag-green-border{color:#19be6b;background:#fff;border-color:#19be6b}.i-tag-green-checked{background:#19be6b;color:#fff;border-color:#19be6b}.i-tag-blue{background:#2d8cf0;color:#fff;border-color:#2d8cf0}.i-tag-blue-border{color:#2d8cf0;background:#fff;border-color:#2d8cf0}.i-tag-blue-checked{background:#2d8cf0;color:#fff;border-color:#2d8cf0}.i-tag-yellow{background:#f90;color:#fff;border-color:#f90}.i-tag-yellow-border{color:#f90;background:#fff;border-color:#f90}.i-tag-yellow-checked{background:#f90;color:#fff;border-color:#f90}.i-tag-default-checked{background:#e9eaec;color:#495060;border-color:#e9eaec} -------------------------------------------------------------------------------- /WeChatApp/dist/card/index.wxss: -------------------------------------------------------------------------------- 1 | .i-card{margin:0 16px;font-size:14px;overflow:hidden;position:relative;background:#fff;border:1rpx solid #dddee1;border-radius:5px}.i-card-full{margin:0;border-left:none;border-right:none;border-radius:0}.i-card-header{display:flex;padding:6px 16px;align-items:center}.i-card-header-content{flex:1;text-align:left}.i-card-header-height{height: 80px;}.i-card-header-thumb{display:inline-block;width:64px;height:64px;position:relative;margin-left:auto;margin-right:auto;overflow:hidden;background-size:cover;vertical-align:middle}.i-card-header-title{display:inline-block;vertical-align:middle;font-size:14px;color:#1c2438}.i-card-header-extra{ font-size: 15px;color:#80848f;margin-left: 10px;height: 40px;overflow: hidden;}.i-card-body{position:relative;padding:6px 16px;color:#495060;font-size:14px}.i-card-body::before{content:'';position:absolute;top:0;left:0;width:200%;height:200%;transform:scale(.5);transform-origin:0 0;pointer-events:none;box-sizing:border-box;border:0 solid #e9eaec;border-top-width:1px}.i-card-footer{position:relative;padding:6px 16px;color:#80848f;font-size:12px}.avatar{border: 1px solid #80848f;} -------------------------------------------------------------------------------- /WeChatApp/dist/switch/index.wxss: -------------------------------------------------------------------------------- 1 | .i-switch{display:inline-block;width:48px;height:24px;line-height:24px;border-radius:24px;vertical-align:middle;border:1px solid #ccc;background-color:#ccc;position:relative;cursor:pointer;-webkit-tap-highlight-color:transparent;transition:all .2s ease-in-out}.i-switch-hide-input{display:none;opacity:0}.i-switch-inner{color:#fff;font-size:12px;position:absolute;left:25px;vertical-align:middle}.i-switch-inner .i-icon{width:12px;height:12px;text-align:center;vertical-align:middle}.i-switch:after{content:'';width:22px;height:22px;border-radius:22px;background-color:#fff;position:absolute;left:1px;top:1px;cursor:pointer;transition:left .2s ease-in-out,width .2s ease-in-out}.i-switch-checked:after{left:8px}.i-switch-large{width:60px}.i-switch-large.i-switch-checked:after{left:37px}.i-switch-checked:after{left:25px}.i-switch-checked{border-color:#2d8cf0;background-color:#2d8cf0}.i-switch-checked .i-switch-inner{left:8px}.i-switch-checked:after{left:25px}.i-switch-disabled{background:#f3f3f3;border-color:#f3f3f3}.i-switch-disabled:after{background:#ccc;cursor:not-allowed}.i-switch-disabled .i-switch-inner{color:#ccc} -------------------------------------------------------------------------------- /WeChatApp/pages/history/index.js: -------------------------------------------------------------------------------- 1 | // pages/history/index.js 2 | Page({ 3 | 4 | /** 5 | * 页面的初始数据 6 | */ 7 | data: { 8 | loading:true, 9 | total:0, 10 | score:0, 11 | average:0 12 | }, 13 | 14 | onLoad (options) { 15 | var objectId = options.id 16 | wx.u.getHistory(objectId).then(res=>{ 17 | wx.u.getBeatNum(res.result.menu, res.result.score).then(res1=>{ 18 | wx.u.getAverage(res.result.menu).then(res2 => { 19 | this.setData({ 20 | objectId:objectId, 21 | loading: false, 22 | total: res.result.questionList.length, 23 | score: res.result.score, 24 | questions: res.result.questionList, 25 | beatNum: res1.result, 26 | average: parseInt(res2.result[0].allScore / res2.result[0].peopleNum) 27 | }) 28 | }) 29 | }) 30 | }) 31 | }, 32 | back(){ 33 | wx.reLaunch({ 34 | url: '/pages/select/index', 35 | }) 36 | }, 37 | analysis(){ 38 | wx.navigateTo({ 39 | url: '/pages/analysis/index?objectId='+ this.data.objectId, 40 | }) 41 | } 42 | }) -------------------------------------------------------------------------------- /WeChatApp/dist/message/index.js: -------------------------------------------------------------------------------- 1 | const default_data = { 2 | visible: false, 3 | content: '', 4 | duration: 2, 5 | type: 'default', // default || success || warning || error 6 | }; 7 | 8 | let timmer = null; 9 | 10 | Component({ 11 | externalClasses: ['i-class'], 12 | 13 | data: { 14 | ...default_data 15 | }, 16 | 17 | methods: { 18 | handleShow (options) { 19 | const { type = 'default', duration = 2 } = options; 20 | 21 | this.setData({ 22 | ...options, 23 | type, 24 | duration, 25 | visible: true 26 | }); 27 | 28 | const d = this.data.duration * 1000; 29 | 30 | if (timmer) clearTimeout(timmer); 31 | if (d !== 0) { 32 | timmer = setTimeout(() => { 33 | this.handleHide(); 34 | timmer = null; 35 | }, d); 36 | } 37 | }, 38 | 39 | handleHide () { 40 | this.setData({ 41 | ...default_data 42 | }); 43 | } 44 | } 45 | }); -------------------------------------------------------------------------------- /WeChatApp/wux/button/index.wxml: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /WeChatApp/wux/prompt/index.wxss: -------------------------------------------------------------------------------- 1 | .wux-prompt { 2 | display: -webkit-box; 3 | display: -webkit-flex; 4 | display: flex; 5 | height: 100%; 6 | -webkit-box-align: center; 7 | -webkit-align-items: center; 8 | align-items: center; 9 | -webkit-box-pack: center; 10 | -webkit-justify-content: center; 11 | justify-content: center; 12 | color: #939393; 13 | background-color: #f2f3f4; 14 | } 15 | .wux-prompt__bd { 16 | margin-top: 0; 17 | text-align: center; 18 | } 19 | .wux-prompt__icon { 20 | width: 128rpx; 21 | height: 128rpx; 22 | } 23 | .wux-prompt__title { 24 | font-size: 32rpx; 25 | font-weight: bold; 26 | color: #333; 27 | margin: 4rpx 0; 28 | } 29 | .wux-prompt__text { 30 | font-size: 24rpx; 31 | margin: 4rpx 0; 32 | } 33 | .wux-prompt__button { 34 | font-size: 26rpx; 35 | line-height: 2; 36 | margin: 8rpx auto; 37 | width: 200rpx; 38 | padding: 4rpx 0; 39 | border: 2rpx solid #eee; 40 | } 41 | .wux-prompt__button:after { 42 | display: none; 43 | } 44 | .wux-prompt__button--hover { 45 | color: rgba(0, 0, 0, 0.6) !important; 46 | background-color: #DEDEDE !important; 47 | } 48 | -------------------------------------------------------------------------------- /WeChatApp/dist/radio-group/index.js: -------------------------------------------------------------------------------- 1 | Component({ 2 | externalClasses: ['i-class'], 3 | relations: { 4 | '../radio/index': { 5 | type: 'child', 6 | linked() { 7 | this.changeCurrent(); 8 | }, 9 | linkChanged() { 10 | this.changeCurrent(); 11 | }, 12 | unlinked() { 13 | this.changeCurrent(); 14 | } 15 | } 16 | }, 17 | properties: { 18 | current: { 19 | type: String, 20 | value: '', 21 | observer: 'changeCurrent' 22 | }, 23 | }, 24 | methods: { 25 | changeCurrent(val = this.data.current) { 26 | let items = this.getRelationNodes('../radio/index'); 27 | const len = items.length; 28 | if (len > 0) { 29 | items.forEach(item => { 30 | item.changeCurrent(val === item.data.value); 31 | }); 32 | } 33 | }, 34 | emitEvent(current) { 35 | this.triggerEvent('change', current); 36 | } 37 | } 38 | }); 39 | -------------------------------------------------------------------------------- /WeChatApp/project.config.json: -------------------------------------------------------------------------------- 1 | { 2 | "description": "项目配置文件", 3 | "packOptions": { 4 | "ignore": [] 5 | }, 6 | "setting": { 7 | "urlCheck": true, 8 | "es6": true, 9 | "postcss": true, 10 | "minified": true, 11 | "newFeature": true 12 | }, 13 | "compileType": "miniprogram", 14 | "libVersion": "2.4.0", 15 | "appid": "", 16 | "projectname": "%E7%AD%94%E9%A2%98%E9%85%B7", 17 | "debugOptions": { 18 | "hidedInDevtools": [] 19 | }, 20 | "isGameTourist": false, 21 | "condition": { 22 | "search": { 23 | "current": -1, 24 | "list": [] 25 | }, 26 | "conversation": { 27 | "current": -1, 28 | "list": [] 29 | }, 30 | "plugin": { 31 | "current": -1, 32 | "list": [] 33 | }, 34 | "game": { 35 | "currentL": -1, 36 | "list": [] 37 | }, 38 | "miniprogram": { 39 | "current": 1, 40 | "list": [ 41 | { 42 | "id": 0, 43 | "name": "记录页面", 44 | "pathName": "pages/history/index", 45 | "query": "id=2533ecc298" 46 | }, 47 | { 48 | "id": -1, 49 | "name": "错题页面", 50 | "pathName": "pages/wrongAnswer/index", 51 | "query": "" 52 | } 53 | ] 54 | } 55 | } 56 | } -------------------------------------------------------------------------------- /WeChatApp/dist/checkbox-group/index.js: -------------------------------------------------------------------------------- 1 | Component({ 2 | externalClasses: ['i-class'], 3 | relations: { 4 | '../checkbox/index': { 5 | type: 'child', 6 | linked() { 7 | this.changeCurrent(); 8 | }, 9 | linkChanged() { 10 | this.changeCurrent(); 11 | }, 12 | unlinked() { 13 | this.changeCurrent(); 14 | } 15 | } 16 | }, 17 | properties: { 18 | current: { 19 | type: Array, 20 | value: [], 21 | observer: 'changeCurrent' 22 | }, 23 | }, 24 | methods: { 25 | changeCurrent(val = this.data.current) { 26 | let items = this.getRelationNodes('../checkbox/index'); 27 | const len = items.length; 28 | if (len > 0) { 29 | items.forEach(item => { 30 | item.changeCurrent(val.indexOf(item.data.value) !== -1); 31 | }); 32 | } 33 | }, 34 | emitEvent(current) { 35 | this.triggerEvent('change', current); 36 | } 37 | } 38 | }); 39 | -------------------------------------------------------------------------------- /WeChatApp/dist/tag/index.js: -------------------------------------------------------------------------------- 1 | Component({ 2 | externalClasses: ['i-class'], 3 | properties : { 4 | //slot name 5 | name : { 6 | type : String, 7 | value : '' 8 | }, 9 | //can click or not click 10 | checkable : { 11 | type : Boolean, 12 | value : false 13 | }, 14 | //is current choose 15 | checked : { 16 | type : Boolean, 17 | value : true 18 | }, 19 | //background and color setting 20 | color : { 21 | type : String, 22 | value : 'default' 23 | }, 24 | //control fill or not 25 | type : { 26 | type : String, 27 | value : 'dot' 28 | } 29 | }, 30 | methods : { 31 | tapTag(){ 32 | const data = this.data; 33 | if( data.checkable ){ 34 | const checked = data.checked ? false : true; 35 | this.triggerEvent('change',{ 36 | name : data.name || '', 37 | checked : checked 38 | }); 39 | } 40 | } 41 | } 42 | }) -------------------------------------------------------------------------------- /WeChatApp/wux/cell-group/index.js: -------------------------------------------------------------------------------- 1 | Component({ 2 | externalClasses: ['wux-class'], 3 | relations: { 4 | '../cell/index': { 5 | type: 'child', 6 | linked() { 7 | this.updateIsLastElement('../cell/index') 8 | }, 9 | linkChanged() { 10 | this.updateIsLastElement('../cell/index') 11 | }, 12 | unlinked() { 13 | this.updateIsLastElement('../cell/index') 14 | }, 15 | }, 16 | }, 17 | properties: { 18 | title: { 19 | type: String, 20 | value: '', 21 | }, 22 | label: { 23 | type: String, 24 | value: '', 25 | }, 26 | }, 27 | methods: { 28 | updateIsLastElement() { 29 | const elements = this.getRelationNodes('../cell/index') 30 | if (elements.length > 0) { 31 | const lastIndex = elements.length - 1 32 | elements.forEach((element, index) => { 33 | element.updateIsLastElement(index === lastIndex) 34 | }) 35 | } 36 | }, 37 | }, 38 | }) -------------------------------------------------------------------------------- /Backend/src/views/layout/mixin/ResizeHandler.js: -------------------------------------------------------------------------------- 1 | import store from '@/store' 2 | 3 | const { body } = document 4 | const WIDTH = 1024 5 | const RATIO = 3 6 | 7 | export default { 8 | watch: { 9 | $route(route) { 10 | if (this.device === 'mobile' && this.sidebar.opened) { 11 | store.dispatch('CloseSideBar', { withoutAnimation: false }) 12 | } 13 | } 14 | }, 15 | beforeMount() { 16 | window.addEventListener('resize', this.resizeHandler) 17 | }, 18 | mounted() { 19 | const isMobile = this.isMobile() 20 | if (isMobile) { 21 | store.dispatch('ToggleDevice', 'mobile') 22 | store.dispatch('CloseSideBar', { withoutAnimation: true }) 23 | } 24 | }, 25 | methods: { 26 | isMobile() { 27 | const rect = body.getBoundingClientRect() 28 | return rect.width - RATIO < WIDTH 29 | }, 30 | resizeHandler() { 31 | if (!document.hidden) { 32 | const isMobile = this.isMobile() 33 | store.dispatch('ToggleDevice', isMobile ? 'mobile' : 'desktop') 34 | 35 | if (isMobile) { 36 | store.dispatch('CloseSideBar', { withoutAnimation: true }) 37 | } 38 | } 39 | } 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /WeChatApp/dist/toast/index.js: -------------------------------------------------------------------------------- 1 | const default_data = { 2 | visible: false, 3 | content: '', 4 | icon: '', 5 | image: '', 6 | duration: 2, 7 | mask: true, 8 | type: 'default', // default || success || warning || error || loading 9 | }; 10 | 11 | let timmer = null; 12 | 13 | Component({ 14 | externalClasses: ['i-class'], 15 | 16 | data: { 17 | ...default_data 18 | }, 19 | 20 | methods: { 21 | handleShow (options) { 22 | const { type = 'default', duration = 2 } = options; 23 | 24 | this.setData({ 25 | ...options, 26 | type, 27 | duration, 28 | visible: true 29 | }); 30 | 31 | const d = this.data.duration * 1000; 32 | 33 | if (timmer) clearTimeout(timmer); 34 | if (d !== 0) { 35 | timmer = setTimeout(() => { 36 | this.handleHide(); 37 | timmer = null; 38 | }, d); 39 | } 40 | }, 41 | 42 | handleHide () { 43 | this.setData({ 44 | ...default_data 45 | }); 46 | } 47 | } 48 | }); 49 | -------------------------------------------------------------------------------- /Backend/src/views/layout/components/Sidebar/index.vue: -------------------------------------------------------------------------------- 1 | 16 | 17 | 37 | -------------------------------------------------------------------------------- /WeChatApp/pages/index/index.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 立即进入 19 | 20 | 21 | 22 | © 2018 Mamba 倾情出品 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /WeChatApp/dist/tab/index.js: -------------------------------------------------------------------------------- 1 | Component({ 2 | externalClasses: ['i-class'], 3 | 4 | relations: { 5 | '../tabs/index': { 6 | type: 'parent' 7 | } 8 | }, 9 | 10 | properties: { 11 | key: { 12 | type: String, 13 | value: '' 14 | }, 15 | title: { 16 | type: String, 17 | value: '' 18 | }, 19 | dot: { 20 | type: Boolean, 21 | value: false 22 | }, 23 | count: { 24 | type: Number, 25 | value: 0 26 | } 27 | }, 28 | 29 | data: { 30 | current: false, 31 | currentColor: '', 32 | scroll: false 33 | }, 34 | 35 | methods: { 36 | changeCurrent (current) { 37 | this.setData({ current }); 38 | }, 39 | changeCurrentColor (currentColor) { 40 | this.setData({ currentColor }); 41 | }, 42 | changeScroll (scroll) { 43 | this.setData({ scroll }); 44 | }, 45 | handleClickItem () { 46 | const parent = this.getRelationNodes('../tabs/index')[0]; 47 | parent.emitEvent(this.data.key); 48 | } 49 | } 50 | }); 51 | -------------------------------------------------------------------------------- /WeChatApp/pages/rankList/index.wxss: -------------------------------------------------------------------------------- 1 | /* pages/rankList/index.wxss */ 2 | 3 | page { 4 | height: 100%; 5 | background: #91e7f6; 6 | } 7 | 8 | .page { 9 | font-family: 'PingFang SC', 10 | 'Helvetica Neue', 11 | Helvetica, 12 | 'Droid Sans Fallback', 13 | 'Microsoft Yahei', 14 | sans-serif; 15 | height: 100%; 16 | background: #fff; 17 | margin: 15rpx 15rpx 70rpx 15rpx; 18 | position: relative; 19 | z-index: 2; 20 | } 21 | 22 | .messScroll { 23 | height: 100%; 24 | } 25 | 26 | .bottimBG { 27 | position: absolute; 28 | bottom: 0; 29 | width: 100%; 30 | height: 150rpx; 31 | z-index: 1; 32 | } 33 | 34 | .item { 35 | display: flex; 36 | align-items: center; 37 | height: 130rpx; 38 | border-bottom: 1rpx solid #efefef; 39 | padding: 10rpx 0rpx 10rpx 0rpx; 40 | justify-content: space-around; 41 | } 42 | 43 | .userPhoto { 44 | width: 100rpx; 45 | height: 100rpx; 46 | border-radius: 50%; 47 | padding: 0; 48 | margin: 0; 49 | } 50 | 51 | .score { 52 | text-align: center; 53 | float: left; 54 | width: 30%; 55 | font-size: 45rpx; 56 | color: #f74b4b; 57 | } 58 | -------------------------------------------------------------------------------- /WeChatApp/dist/action-sheet/index.js: -------------------------------------------------------------------------------- 1 | Component({ 2 | externalClasses: ['i-class', 'i-class-mask', 'i-class-header'], 3 | 4 | options: { 5 | multipleSlots: true 6 | }, 7 | 8 | properties: { 9 | visible: { 10 | type: Boolean, 11 | value: false 12 | }, 13 | maskClosable: { 14 | type: Boolean, 15 | value: true 16 | }, 17 | showCancel: { 18 | type: Boolean, 19 | value: false 20 | }, 21 | cancelText: { 22 | type: String, 23 | value: '取消' 24 | }, 25 | actions: { 26 | type: Array, 27 | value: [] 28 | } 29 | }, 30 | 31 | methods: { 32 | handleClickMask () { 33 | if (!this.data.maskClosable) return; 34 | this.handleClickCancel(); 35 | }, 36 | 37 | handleClickItem ({ currentTarget = {} }) { 38 | const dataset = currentTarget.dataset || {}; 39 | const { index } = dataset; 40 | this.triggerEvent('click', { index }); 41 | }, 42 | 43 | handleClickCancel () { 44 | this.triggerEvent('cancel'); 45 | } 46 | } 47 | }); 48 | -------------------------------------------------------------------------------- /Backend/test/e2e/nightwatch.conf.js: -------------------------------------------------------------------------------- 1 | require('babel-register') 2 | var config = require('../../config') 3 | 4 | // http://nightwatchjs.org/gettingstarted#settings-file 5 | module.exports = { 6 | src_folders: ['test/e2e/specs'], 7 | output_folder: 'test/e2e/reports', 8 | custom_assertions_path: ['test/e2e/custom-assertions'], 9 | 10 | selenium: { 11 | start_process: true, 12 | server_path: require('selenium-server').path, 13 | host: '127.0.0.1', 14 | port: 4444, 15 | cli_args: { 16 | 'webdriver.chrome.driver': require('chromedriver').path 17 | } 18 | }, 19 | 20 | test_settings: { 21 | default: { 22 | selenium_port: 4444, 23 | selenium_host: 'localhost', 24 | silent: true, 25 | globals: { 26 | devServerURL: 'http://localhost:' + (process.env.PORT || config.dev.port) 27 | } 28 | }, 29 | 30 | chrome: { 31 | desiredCapabilities: { 32 | browserName: 'chrome', 33 | javascriptEnabled: true, 34 | acceptSslCerts: true 35 | } 36 | }, 37 | 38 | firefox: { 39 | desiredCapabilities: { 40 | browserName: 'firefox', 41 | javascriptEnabled: true, 42 | acceptSslCerts: true 43 | } 44 | } 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /WeChatApp/pages/index/index.js: -------------------------------------------------------------------------------- 1 | // pages/start/index.js 2 | 3 | Page({ 4 | 5 | /** 6 | * 页面的初始数据 7 | */ 8 | data: { 9 | userInfo: {}, 10 | }, 11 | onLoad(e) { 12 | var that = this; 13 | wx.getUserInfo({ 14 | success(res) { 15 | wx.u.getUserInfo().then(res1 => { 16 | var bmobUser = res1.result; 17 | if (bmobUser.avatarUrl == '' || bmobUser.avatarUrl == undefined) { 18 | wx.u.changeUserInfo(res.userInfo.avatarUrl, res.userInfo.nickName).then(res2 => { }); 19 | } 20 | }) 21 | that.setData({ 22 | userInfo: res.userInfo 23 | }) 24 | } 25 | }) 26 | }, 27 | bindgetuserinfo() { 28 | var that = this; 29 | wx.getUserInfo({ 30 | success(res) { 31 | wx.u.getUserInfo().then(res1 => { 32 | var bmobUser = res1.result; 33 | if (bmobUser.avatarUrl == '' || bmobUser.avatarUrl == undefined) { 34 | wx.u.changeUserInfo(res.userInfo.avatarUrl, res.userInfo.nickName).then(res2 => { }); 35 | } 36 | }) 37 | that.setData({ 38 | userInfo: res.userInfo 39 | }) 40 | } 41 | }) 42 | }, 43 | goSign() { 44 | wx.reLaunch({ 45 | url: '/pages/select/index', 46 | }) 47 | } 48 | }) -------------------------------------------------------------------------------- /WeChatApp/dist/sticky-item/index.js: -------------------------------------------------------------------------------- 1 | Component({ 2 | externalClasses: ['i-class'], 3 | options: { 4 | multipleSlots: true 5 | }, 6 | relations : { 7 | '../sticky/index' : { 8 | type : 'parent' 9 | } 10 | }, 11 | data : { 12 | top : 0, 13 | height : 0, 14 | isFixed : false, 15 | index : -1, 16 | }, 17 | methods: { 18 | updateScrollTopChange(scrollTop){ 19 | const data = this.data; 20 | const top = data.top; 21 | const height = data.height; 22 | this.setData({ 23 | isFixed : ( scrollTop >= top && scrollTop < top + height ) ? true : false 24 | }) 25 | }, 26 | updateDataChange(index) { 27 | const className = '.i-sticky-item'; 28 | const query = wx.createSelectorQuery().in(this); 29 | query.select( className ).boundingClientRect((res)=>{ 30 | if( res ){ 31 | this.setData({ 32 | top : res.top, 33 | height : res.height, 34 | index : index 35 | }) 36 | } 37 | }).exec() 38 | } 39 | } 40 | }) -------------------------------------------------------------------------------- /Backend/src/permission.js: -------------------------------------------------------------------------------- 1 | import router from './router' 2 | import store from './store' 3 | import NProgress from 'nprogress' 4 | import 'nprogress/nprogress.css'// Progress 进度条样式 5 | import { Message } from 'element-ui' 6 | import { getToken } from '@/utils/auth' 7 | 8 | const whiteList = ['/login'] //不重定向url 9 | 10 | router.beforeEach((to,from,next)=>{ 11 | console.log("19") 12 | NProgress.start() 13 | if(getToken()){ 14 | console.log("getToken") 15 | console.log(getToken()) 16 | if (to.path === '/login') { 17 | next({ path: '/' }) 18 | NProgress.done() // if current page is dashboard will not trigger afterEach hook, so manually handle it 19 | }else{ 20 | if(store.getters.roles.length === 0){ 21 | store.dispatch('GetInfo').then(res=>{ 22 | next() 23 | }) 24 | }else { 25 | next() 26 | } 27 | } 28 | }else{ 29 | if(whiteList.indexOf(to.path) !== -1){ 30 | next() 31 | }else{ 32 | next(`/login?redirect=${to.path}`) 33 | NProgress.done() 34 | } 35 | } 36 | 37 | }) 38 | 39 | router.afterEach(()=>{ 40 | NProgress.done() 41 | }) -------------------------------------------------------------------------------- /WeChatApp/dist/action-sheet/index.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 14 | 15 | 16 | {{ item.name }} 17 | 18 | 19 | 20 | 21 | {{ cancelText }} 22 | 23 | 24 | -------------------------------------------------------------------------------- /WeChatApp/dist/input/index.wxml: -------------------------------------------------------------------------------- 1 | 2 | {{ title }} 3 | 17 | 31 | 32 | -------------------------------------------------------------------------------- /WeChatApp/dist/collapse-item/index.js: -------------------------------------------------------------------------------- 1 | Component({ 2 | externalClasses: ['i-class-content', 'i-class-title', 'i-class'], 3 | 4 | relations: { 5 | '../collapse/index': { 6 | type: 'parent', 7 | linked: function (target) { 8 | const options = { 9 | accordion: target.data.accordion 10 | } 11 | if (target.data.name === this.data.name) { 12 | options.showContent = 'i-collapse-item-show-content'; 13 | } 14 | this.setData(options); 15 | } 16 | } 17 | }, 18 | 19 | properties: { 20 | title: String, 21 | name: String 22 | }, 23 | 24 | data: { 25 | showContent: '', 26 | accordion: false 27 | }, 28 | 29 | options: { 30 | multipleSlots: true 31 | }, 32 | 33 | methods: { 34 | trigger(e) { 35 | const data = this.data; 36 | if (data.accordion) { 37 | this.triggerEvent('collapse', {name: data.name}, {composed: true, bubbles: true}); 38 | } else { 39 | this.setData({ 40 | showContent: data.showContent ? '' : 'i-collapse-item-show-content' 41 | }); 42 | } 43 | }, 44 | } 45 | }); 46 | 47 | -------------------------------------------------------------------------------- /WeChatApp/wux/radio-group/index.js: -------------------------------------------------------------------------------- 1 | Component({ 2 | externalClasses: ['wux-class'], 3 | behaviors: ['wx://form-field'], 4 | relations: { 5 | '../radio/index': { 6 | type: 'child', 7 | linked() { 8 | this.changeValue() 9 | }, 10 | linkChanged() { 11 | this.changeValue() 12 | }, 13 | unlinked() { 14 | this.changeValue() 15 | }, 16 | }, 17 | }, 18 | properties: { 19 | value: { 20 | type: String, 21 | value: '', 22 | observer: 'changeValue', 23 | }, 24 | title: { 25 | type: String, 26 | value: '', 27 | }, 28 | label: { 29 | type: String, 30 | value: '', 31 | }, 32 | }, 33 | methods: { 34 | changeValue(value = this.data.value) { 35 | const elements = this.getRelationNodes('../radio/index') 36 | if (elements.length > 0) { 37 | elements.forEach((element, index) => { 38 | element.changeValue(value === element.data.value, index) 39 | }) 40 | } 41 | }, 42 | emitEvent(value) { 43 | this.triggerEvent('change', value) 44 | }, 45 | }, 46 | }) -------------------------------------------------------------------------------- /WeChatApp/dist/step/index.js: -------------------------------------------------------------------------------- 1 | Component({ 2 | externalClasses: ['i-class'], 3 | properties : { 4 | status : { 5 | type : String, 6 | //wait、process、finish、error 7 | value : '' 8 | }, 9 | title : { 10 | type : String, 11 | value : '' 12 | }, 13 | content : { 14 | type : String, 15 | value : '' 16 | }, 17 | icon : { 18 | type : String, 19 | value : '' 20 | } 21 | }, 22 | options: { 23 | // 在组件定义时的选项中启用多slot支持 24 | multipleSlots: true 25 | }, 26 | relations : { 27 | '../steps/index' : { 28 | type : 'parent' 29 | } 30 | }, 31 | data : { 32 | //step length 33 | len : 1, 34 | //current in step index 35 | index : 0, 36 | //parent component select current index 37 | current : 0, 38 | //css direction 39 | direction : 'horizontal' 40 | }, 41 | methods : { 42 | updateDataChange( options ){ 43 | this.setData({ 44 | len : options.len, 45 | index : options.index, 46 | current : options.current, 47 | direction : options.direction 48 | }) 49 | } 50 | } 51 | 52 | }) -------------------------------------------------------------------------------- /Backend/build/build.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | require('./check-versions')() 3 | 4 | process.env.NODE_ENV = 'production' 5 | 6 | const ora = require('ora') 7 | const rm = require('rimraf') 8 | const path = require('path') 9 | const chalk = require('chalk') 10 | const webpack = require('webpack') 11 | const config = require('../config') 12 | const webpackConfig = require('./webpack.prod.conf') 13 | 14 | const spinner = ora('building for production...') 15 | spinner.start() 16 | 17 | rm(path.join(config.build.assetsRoot, config.build.assetsSubDirectory), err => { 18 | if (err) throw err 19 | webpack(webpackConfig, (err, stats) => { 20 | spinner.stop() 21 | if (err) throw err 22 | process.stdout.write(stats.toString({ 23 | colors: true, 24 | modules: false, 25 | children: false, // If you are using ts-loader, setting this to true will make TypeScript errors show up during build. 26 | chunks: false, 27 | chunkModules: false 28 | }) + '\n\n') 29 | 30 | if (stats.hasErrors()) { 31 | console.log(chalk.red(' Build failed with errors.\n')) 32 | process.exit(1) 33 | } 34 | 35 | console.log(chalk.cyan(' Build complete.\n')) 36 | console.log(chalk.yellow( 37 | ' Tip: built files are meant to be served over an HTTP server.\n' + 38 | ' Opening index.html over file:// won\'t work.\n' 39 | )) 40 | }) 41 | }) 42 | -------------------------------------------------------------------------------- /WeChatApp/app.js: -------------------------------------------------------------------------------- 1 | //app.js 2 | const Bmob = require('utils/Bmob-1.6.5.min.js'); 3 | const utils = require('utils/util.js'); 4 | Bmob.initialize("", ""); 5 | wx.u = utils 6 | App({ 7 | onLaunch: function () { 8 | Bmob.User.auth().then(res=>{ 9 | console.log(res) 10 | console.log('一键登陆成功') 11 | }).catch(err => { 12 | console.log(err) 13 | }); 14 | 15 | // 展示本地存储能力 16 | var logs = wx.getStorageSync('logs') || [] 17 | logs.unshift(Date.now()) 18 | wx.setStorageSync('logs', logs) 19 | 20 | // 登录 21 | wx.login({ 22 | success: res => { 23 | // 发送 res.code 到后台换取 openId, sessionKey, unionId 24 | } 25 | }) 26 | // 获取用户信息 27 | wx.getSetting({ 28 | success: res => { 29 | if (res.authSetting['scope.userInfo']) { 30 | // 已经授权,可以直接调用 getUserInfo 获取头像昵称,不会弹框 31 | wx.getUserInfo({ 32 | success: res => { 33 | // 可以将 res 发送给后台解码出 unionId 34 | this.globalData.userInfo = res.userInfo 35 | 36 | // 由于 getUserInfo 是网络请求,可能会在 Page.onLoad 之后才返回 37 | // 所以此处加入 callback 以防止这种情况 38 | if (this.userInfoReadyCallback) { 39 | this.userInfoReadyCallback(res) 40 | } 41 | } 42 | }) 43 | } 44 | } 45 | }) 46 | }, 47 | globalData: { 48 | userInfo: null 49 | } 50 | }) -------------------------------------------------------------------------------- /Backend/src/styles/index.scss: -------------------------------------------------------------------------------- 1 | @import './variables.scss'; 2 | @import './mixin.scss'; 3 | @import './transition.scss'; 4 | @import './element-ui.scss'; 5 | @import './sidebar.scss'; 6 | 7 | body { 8 | height: 100%; 9 | -moz-osx-font-smoothing: grayscale; 10 | -webkit-font-smoothing: antialiased; 11 | text-rendering: optimizeLegibility; 12 | font-family: Helvetica Neue, Helvetica, PingFang SC, Hiragino Sans GB, Microsoft YaHei, Arial, sans-serif; 13 | } 14 | 15 | label { 16 | font-weight: 700; 17 | } 18 | 19 | html { 20 | height: 100%; 21 | box-sizing: border-box; 22 | } 23 | 24 | #app{ 25 | height: 100%; 26 | } 27 | 28 | *, 29 | *:before, 30 | *:after { 31 | box-sizing: inherit; 32 | } 33 | 34 | a, 35 | a:focus, 36 | a:hover { 37 | cursor: pointer; 38 | color: inherit; 39 | outline: none; 40 | text-decoration: none; 41 | } 42 | 43 | div:focus{ 44 | outline: none; 45 | } 46 | 47 | a:focus, 48 | a:active { 49 | outline: none; 50 | } 51 | 52 | a, 53 | a:focus, 54 | a:hover { 55 | cursor: pointer; 56 | color: inherit; 57 | text-decoration: none; 58 | } 59 | 60 | .clearfix { 61 | &:after { 62 | visibility: hidden; 63 | display: block; 64 | font-size: 0; 65 | content: " "; 66 | clear: both; 67 | height: 0; 68 | } 69 | } 70 | 71 | //main-container全局样式 72 | .app-main{ 73 | min-height: 100% 74 | } 75 | 76 | .app-container { 77 | padding: 20px; 78 | } 79 | -------------------------------------------------------------------------------- /WeChatApp/dist/input/index.wxss: -------------------------------------------------------------------------------- 1 | .i-cell{position:relative;padding:12px 15px;display:flex;background:#fff;align-items:center;line-height:1.4;font-size:14px;overflow:hidden}.i-cell::after{content:'';position:absolute;top:0;left:0;width:200%;height:200%;transform:scale(.5);transform-origin:0 0;pointer-events:none;box-sizing:border-box;border:0 solid #e9eaec;border-bottom-width:1px;left:15px;right:0}.i-cell-last::after{display:none}.i-cell-icon{margin-right:5px}.i-cell-icon:empty{display:none}.i-cell-bd{flex:1}.i-cell-text{line-height:24px;font-size:14px}.i-cell-desc{line-height:1.2;font-size:12px;color:#80848f}.i-cell-ft{position:relative;text-align:right;color:#495060}.i-cell-access .i-cell-ft{padding-right:13px}.i-cell-access .i-cell-ft::after{content:" ";display:inline-block;width:6px;height:6px;position:absolute;top:50%;right:2px;border-width:2px 2px 0 0;border-color:#dddee1;border-style:solid;transform:translateY(-50%) matrix(.71,.71,-.71,.71,0,0)}.i-input{padding:7px 15px;color:#495060}.i-input-wrapped{margin:10px 15px;background-color:#fff}.i-input-wrapped::after{left:0;border-width:1px;border-radius:4px}.i-input-error{color:#ed3f14}.i-input-title{color:#495060;min-width:65px;padding-right:10px}.i-input-input{flex:1;line-height:1.6;padding:4px 0;min-height:22px;height:auto;font-size:14px}.i-input-placeholder{font-size:14px}.i-input-input-right{text-align:right}.i-input.i-input-wrapped::after{display:block}.i-input-wrapped.i-input-error::after{border-color:#ed3f14} -------------------------------------------------------------------------------- /Backend/src/store/modules/app.js: -------------------------------------------------------------------------------- 1 | import Cookies from 'js-cookie' 2 | 3 | const app = { 4 | state: { 5 | sidebar: { 6 | opened: !+Cookies.get('sidebarStatus'), 7 | withoutAnimation: false 8 | }, 9 | device: 'desktop' 10 | }, 11 | mutations: { 12 | TOGGLE_SIDEBAR: state => { 13 | if (state.sidebar.opened) { 14 | Cookies.set('sidebarStatus', 1) 15 | } else { 16 | Cookies.set('sidebarStatus', 0) 17 | } 18 | state.sidebar.opened = !state.sidebar.opened 19 | state.sidebar.withoutAnimation = false 20 | }, 21 | CLOSE_SIDEBAR: (state, withoutAnimation) => { 22 | Cookies.set('sidebarStatus', 1) 23 | state.sidebar.opened = false 24 | state.sidebar.withoutAnimation = withoutAnimation 25 | }, 26 | TOGGLE_DEVICE: (state, device) => { 27 | state.device = device 28 | } 29 | }, 30 | actions: { 31 | ToggleSideBar: ({ commit }) => { 32 | commit('TOGGLE_SIDEBAR') 33 | }, 34 | CloseSideBar({ commit }, { withoutAnimation }) { 35 | commit('CLOSE_SIDEBAR', withoutAnimation) 36 | }, 37 | ToggleDevice({ commit }, device) { 38 | commit('TOGGLE_DEVICE', device) 39 | } 40 | } 41 | } 42 | 43 | export default app 44 | -------------------------------------------------------------------------------- /WeChatApp/dist/modal/index.js: -------------------------------------------------------------------------------- 1 | Component({ 2 | externalClasses: ['i-class', 'i-class-mask'], 3 | 4 | properties: { 5 | visible: { 6 | type: Boolean, 7 | value: false 8 | }, 9 | title: { 10 | type: String, 11 | value: '' 12 | }, 13 | showOk: { 14 | type: Boolean, 15 | value: true 16 | }, 17 | showCancel: { 18 | type: Boolean, 19 | value: true 20 | }, 21 | okText: { 22 | type: String, 23 | value: '确定' 24 | }, 25 | cancelText: { 26 | type: String, 27 | value: '取消' 28 | }, 29 | // 按钮组,有此值时,不显示 ok 和 cancel 按钮 30 | actions: { 31 | type: Array, 32 | value: [] 33 | }, 34 | // horizontal || vertical 35 | actionMode: { 36 | type: String, 37 | value: 'horizontal' 38 | } 39 | }, 40 | 41 | methods: { 42 | handleClickItem ({ currentTarget = {} }) { 43 | const dataset = currentTarget.dataset || {}; 44 | const { index } = dataset; 45 | this.triggerEvent('click', { index }); 46 | }, 47 | handleClickOk () { 48 | this.triggerEvent('ok'); 49 | }, 50 | handleClickCancel () { 51 | this.triggerEvent('cancel'); 52 | } 53 | } 54 | }); 55 | -------------------------------------------------------------------------------- /WeChatApp/dist/index/index.wxml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 12 | 17 | {{item}} 18 | 19 | 20 | {{currentName}} 21 | 22 | 23 | 24 | module.exports = { 25 | setScrollStyle : function(height){ 26 | var units = ['%','px','rem','rpx','em','rem']; 27 | var hasUnits = false; 28 | for( var i = 0; i < units.length;i++ ){ 29 | var u = units[i]; 30 | if( height.indexOf( u ) > -1 ){ 31 | hasUnits = true; 32 | break; 33 | } 34 | } 35 | return 'height:'+ ( hasUnits ? height : height+'px' ); 36 | } 37 | } 38 | 39 | -------------------------------------------------------------------------------- /WeChatApp/pages/rank/index.js: -------------------------------------------------------------------------------- 1 | Page({ 2 | 3 | /** 4 | * 页面的初始数据 5 | */ 6 | data: { 7 | selectQuestionMenu: '请选择', 8 | objectQuestionMenu: {}, 9 | questionMenu: [], 10 | index: 0 11 | }, 12 | 13 | /** 14 | * 生命周期函数--监听页面加载 15 | */ 16 | onLoad(options) { 17 | //获取套题 18 | wx.u.getQuestionMenu().then(res => { 19 | var questionMenu = []; 20 | if (res.result.length > 0) { 21 | for (var i = 0; i < res.result.length; i++) { 22 | questionMenu.push(res.result[i].name); 23 | } 24 | } 25 | console.log(questionMenu); 26 | this.setData({ 27 | questionMenu: questionMenu, 28 | objectQuestionMenu: res.result 29 | }) 30 | }) 31 | }, 32 | /** 33 | * 选择题库 34 | */ 35 | changeMenu(e) { 36 | console.log(e); 37 | this.setData({ 38 | index: e.detail.value, 39 | selectQuestionMenu: this.data.questionMenu[e.detail.value] 40 | }) 41 | var objectQuestionMenu = this.data.objectQuestionMenu 42 | var menu = objectQuestionMenu[e.detail.value].objectId 43 | wx.u.getRank(menu).then(res=>{ 44 | if(res.result){ 45 | wx.navigateTo({ 46 | url: '/pages/rankList/index?menu=' + menu, 47 | }) 48 | }else{ 49 | wx.showToast({ 50 | title: '暂无记录', 51 | duration: 1500, 52 | image: '/images/warning.png' 53 | }) 54 | return; 55 | } 56 | }) 57 | }, 58 | }) -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | 答题酷小程序,适用于考核,评测等场景,分为四大功能:答题,错题集,排名,答题记录;答题功能具有单项选择题和多项选择题,实时查看答题卡,倒计时功能,交卷评分,倒计时自动提示交卷;错题集会自动记录用户在答题中答错的题目,让用户可以复习,查看题目分析帮助,并且可以随时移除题目,可以翻看答题情况,跳题查看错题集题目;排名功能可以对每套试卷的作答人员进行分数等排名;答题记录可以随时查看用户的测试记录,查看分析帮助,有助于查漏补缺。本程序还搭配管理后台,管理用户,系统设置,可以随时增加套题,增加题目,编辑题目,删除题目,以及使用模板批量的导入题目,非常方便实用! 2 | 3 | ### 效果图 4 | ![](https://upload-images.jianshu.io/upload_images/6673460-def5a21295cf2f2a.jpg?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240) 5 | 6 | ![](https://upload-images.jianshu.io/upload_images/6673460-32b7bdc68887a7ca.jpg?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240) 7 | 8 | ![](https://upload-images.jianshu.io/upload_images/6673460-802f7b8df9d44aeb.jpg?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240) 9 | 10 | ![](https://upload-images.jianshu.io/upload_images/6673460-e9e35f5f1dd79925.jpg?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240) 11 | 12 | ![](https://upload-images.jianshu.io/upload_images/6673460-7b1d5a8687b66837.jpg?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240) 13 | 14 | ### 小程序二维码 15 | ![](https://upload-images.jianshu.io/upload_images/6673460-3e5bae283d0ab417.jpg?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240) 16 | 17 | ### 后台界面 18 | 19 | ![1545118864(1).jpg](https://upload-images.jianshu.io/upload_images/6673460-22bcd3f8f30ed1a2.jpg?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240) 20 | 21 | ![1545118837(1).jpg](https://upload-images.jianshu.io/upload_images/6673460-9c025cce1c032c3a.jpg?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240) 22 | -------------------------------------------------------------------------------- /WeChatApp/pages/my/index.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 未授权 9 | {{userInfo.nickName}} 10 | 11 | 12 | 13 | 14 | 15 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /WeChatApp/pages/wrong/index.js: -------------------------------------------------------------------------------- 1 | // pages/wrong/index.js 2 | Page({ 3 | 4 | /** 5 | * 页面的初始数据 6 | */ 7 | data: { 8 | selectQuestionMenu: '请选择', 9 | objectQuestionMenu: {}, 10 | questionMenu: [], 11 | index: 0, 12 | }, 13 | 14 | /** 15 | * 生命周期函数--监听页面加载 16 | */ 17 | onLoad (options) { 18 | //获取套题 19 | wx.u.getQuestionMenu().then(res => { 20 | var questionMenu = []; 21 | if (res.result.length > 0) { 22 | for (var i = 0; i < res.result.length; i++) { 23 | questionMenu.push(res.result[i].name); 24 | } 25 | } 26 | console.log(questionMenu); 27 | this.setData({ 28 | questionMenu: questionMenu, 29 | objectQuestionMenu: res.result 30 | }) 31 | }) 32 | }, 33 | /** 34 | * 选择题库 35 | */ 36 | changeMenu(e) { 37 | console.log(e); 38 | this.setData({ 39 | index: e.detail.value, 40 | selectQuestionMenu: this.data.questionMenu[e.detail.value] 41 | }) 42 | var objectQuestionMenu = this.data.objectQuestionMenu 43 | var menu = objectQuestionMenu[e.detail.value].objectId 44 | wx.u.getError(menu).then(res=>{ 45 | if (res.result){ 46 | wx.navigateTo({ 47 | url: '/pages/wrongAnswer/index?menu='+menu, 48 | }) 49 | }else{ 50 | wx.showToast({ 51 | title: '无错题记录', 52 | duration: 1500, 53 | image: '/images/warning.png' 54 | }) 55 | return; 56 | } 57 | }) 58 | }, 59 | }) -------------------------------------------------------------------------------- /WeChatApp/dist/action-sheet/index.wxss: -------------------------------------------------------------------------------- 1 | .i-as{position:fixed;width:100%;box-sizing:border-box;left:0;right:0;bottom:0;background:#f7f7f7;transform:translate3d(0,100%,0);transform-origin:center;transition:all .2s ease-in-out;z-index:900;visibility:hidden}.i-as-show{transform:translate3d(0,0,0);visibility:visible}.i-as-mask{position:fixed;top:0;left:0;right:0;bottom:0;background:rgba(0,0,0,.7);z-index:900;transition:all .2s ease-in-out;opacity:0;visibility:hidden}.i-as-mask-show{opacity:1;visibility:visible}.i-as-action-item{position:relative}.i-as-action-item::after{content:'';position:absolute;top:0;left:0;width:200%;height:200%;transform:scale(.5);transform-origin:0 0;pointer-events:none;box-sizing:border-box;border:0 solid #e9eaec;border-bottom-width:1px}.i-as-header{background:#fff;text-align:center;position:relative;font-size:12px;color:#80848f}.i-as-header::after{content:'';position:absolute;top:0;left:0;width:200%;height:200%;transform:scale(.5);transform-origin:0 0;pointer-events:none;box-sizing:border-box;border:0 solid #e9eaec;border-bottom-width:1px}.i-as-cancel{margin-top:6px}.i-as-btn-loading{display:inline-block;vertical-align:middle;margin-right:10px;width:12px;height:12px;background:0 0;border-radius:50%;border:2px solid #e5e5e5;border-color:#666 #e5e5e5 #e5e5e5 #e5e5e5;animation:btn-spin .6s linear;animation-iteration-count:infinite}.i-as-btn-text{display:inline-block;vertical-align:middle}.i-as-btn-icon{font-size:14px!important;margin-right:4px}@keyframes btn-spin{0%{transform:rotate(0)}100%{transform:rotate(360deg)}} -------------------------------------------------------------------------------- /WeChatApp/pages/feedback/index.wxss: -------------------------------------------------------------------------------- 1 | /* pages/feedback/index.wxss */ 2 | page{ 3 | background: #f8f8f8; 4 | } 5 | .i-btn{text-align:center;vertical-align:middle;touch-action:manipulation;cursor:pointer;background-image:none;white-space:nowrap;user-select:none;font-size:14px;border-radius:2px;border:0!important;position:relative;text-decoration:none;height:44px;line-height:44px;box-shadow:inset 0 0 0 1px rgba(0,0,0,.1);color:#fff!important;background:#f7f7f7!important;color:#495060!important;margin:10px}.i-btn-hover{opacity:.9}.i-btn-long{border-radius:0;margin:0;box-shadow:none}.i-btn-large{height:48px;line-height:48px}.i-btn-small{height:40px;line-height:40px}.i-btn-primary{color:#fff!important;background:#2db7f5!important}.i-btn-ghost{color:#fff!important;background:#fff!important;color:#495060!important}.i-btn-success{color:#fff!important;background:#19be6b!important}.i-btn-warning{color:#fff!important;background:#f90!important}.i-btn-error{color:#fff!important;background:#ed3f14!important}.i-btn-info{color:#fff!important;background:#2db7f5!important}.i-btn-circle{border-radius:44px}.i-btn-large.i-btn-circle{border-radius:48px}.i-btn-small.i-btn-circle{border-radius:40px}.i-btn-loading{opacity:.6}.i-btn-loading-inner{display:inline-block;margin-right:12px;vertical-align:middle;width:14px;height:14px;background:0 0;border-radius:50%;border:2px solid #fff;border-color:#fff #fff #fff transparent;animation:btn-spin .6s linear;animation-iteration-count:infinite}.i-btn-disabled{color:#bbbec4!important;background:#f7f7f7!important} -------------------------------------------------------------------------------- /WeChatApp/dist/tab-bar-item/index.js: -------------------------------------------------------------------------------- 1 | Component({ 2 | externalClasses: ['i-class'], 3 | 4 | relations: { 5 | '../tab-bar/index': { 6 | type: 'parent' 7 | } 8 | }, 9 | 10 | properties: { 11 | icon: { 12 | type: String, 13 | value: '' 14 | }, 15 | currentIcon: { 16 | type: String, 17 | value: '' 18 | }, 19 | img: { 20 | type: String, 21 | value: '' 22 | }, 23 | currentImg: { 24 | type: String, 25 | value: '' 26 | }, 27 | key: { 28 | type: String, 29 | value: '' 30 | }, 31 | title: { 32 | type: String, 33 | value: '' 34 | }, 35 | dot: { 36 | type: Boolean, 37 | value: false 38 | }, 39 | count: { 40 | type: Number, 41 | value: 0 42 | } 43 | }, 44 | 45 | data: { 46 | current: false, 47 | currentColor: '' 48 | }, 49 | 50 | methods: { 51 | changeCurrent (current) { 52 | this.setData({ current }); 53 | }, 54 | changeCurrentColor (currentColor) { 55 | this.setData({ currentColor }); 56 | }, 57 | handleClickItem () { 58 | const parent = this.getRelationNodes('../tab-bar/index')[0]; 59 | parent.emitEvent(this.data.key); 60 | } 61 | } 62 | }); 63 | -------------------------------------------------------------------------------- /WeChatApp/pages/select/index.js: -------------------------------------------------------------------------------- 1 | // pages/select/index.js 2 | Page({ 3 | 4 | /** 5 | * 页面的初始数据 6 | */ 7 | data: { 8 | selectQuestionMenu:'请选择', 9 | objectQuestionMenu:{}, 10 | questionMenu:[], 11 | index: 0, 12 | }, 13 | 14 | onLoad (e) { 15 | 16 | //获取套题 17 | wx.u.getQuestionMenu().then(res=>{ 18 | var questionMenu = []; 19 | if( res.result.length>0 ){ 20 | for( var i =0;i { 26 | // item.setData({ 27 | // 'width': '33.33%' 28 | // }); 29 | // }); 30 | // } else { 31 | // const width = 100 / nodes.length; 32 | // nodes.forEach(item => { 33 | // item.setData({ 34 | // 'width': width + '%' 35 | // }); 36 | // }); 37 | // } 38 | const width = 100 / nodes.length; 39 | nodes.forEach(item => { 40 | item.setData({ 41 | 'width': width + '%' 42 | }); 43 | }); 44 | } 45 | }, 46 | 47 | ready () { 48 | this.setGridItemWidth(); 49 | } 50 | }); 51 | -------------------------------------------------------------------------------- /WeChatApp/dist/button/index.wxss: -------------------------------------------------------------------------------- 1 | .i-btn{text-align:center;vertical-align:middle;touch-action:manipulation;cursor:pointer;background-image:none;white-space:nowrap;user-select:none;font-size:14px;border-radius:2px;border:0!important;position:relative;text-decoration:none;height:44px;line-height:44px;box-shadow:inset 0 0 0 1px rgba(0,0,0,.1);color:#fff!important;background:#f7f7f7!important;color:#495060!important;margin:10px}.i-btn-hover{opacity:.9}.i-btn-long{border-radius:0;margin:0;box-shadow:none}.i-btn-large{height:48px;line-height:48px}.i-btn-small{height:40px;line-height:40px}.i-btn-primary{color:#fff!important;background:#2d8cf0!important}.i-btn-ghost{color:#fff!important;background:#fff!important;color:#495060!important}.i-btn-success{color:#fff!important;background:#19be6b!important}.i-btn-warning{color:#fff!important;background:#f90!important}.i-btn-error{color:#fff!important;background:#ed3f14!important}.i-btn-info{color:#fff!important;background:#2db7f5!important}.i-btn-circle{border-radius:44px}.i-btn-large.i-btn-circle{border-radius:48px}.i-btn-small.i-btn-circle{border-radius:40px}.i-btn-loading{opacity:.6}.i-btn-loading-inner{display:inline-block;margin-right:12px;vertical-align:middle;width:14px;height:14px;background:0 0;border-radius:50%;border:2px solid #fff;border-color:#fff #fff #fff transparent;animation:btn-spin .6s linear;animation-iteration-count:infinite}.i-btn-disabled{color:#bbbec4!important;background:#f7f7f7!important}.i-btn-inline{display:inline-block}@keyframes btn-spin{0%{transform:rotate(0)}100%{transform:rotate(360deg)}} -------------------------------------------------------------------------------- /Backend/build/check-versions.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | const chalk = require('chalk') 3 | const semver = require('semver') 4 | const packageConfig = require('../package.json') 5 | const shell = require('shelljs') 6 | 7 | function exec (cmd) { 8 | return require('child_process').execSync(cmd).toString().trim() 9 | } 10 | 11 | const versionRequirements = [ 12 | { 13 | name: 'node', 14 | currentVersion: semver.clean(process.version), 15 | versionRequirement: packageConfig.engines.node 16 | } 17 | ] 18 | 19 | if (shell.which('npm')) { 20 | versionRequirements.push({ 21 | name: 'npm', 22 | currentVersion: exec('npm --version'), 23 | versionRequirement: packageConfig.engines.npm 24 | }) 25 | } 26 | 27 | module.exports = function () { 28 | const warnings = [] 29 | 30 | for (let i = 0; i < versionRequirements.length; i++) { 31 | const mod = versionRequirements[i] 32 | 33 | if (!semver.satisfies(mod.currentVersion, mod.versionRequirement)) { 34 | warnings.push(mod.name + ': ' + 35 | chalk.red(mod.currentVersion) + ' should be ' + 36 | chalk.green(mod.versionRequirement) 37 | ) 38 | } 39 | } 40 | 41 | if (warnings.length) { 42 | console.log('') 43 | console.log(chalk.yellow('To use this template, you must update following to modules:')) 44 | console.log() 45 | 46 | for (let i = 0; i < warnings.length; i++) { 47 | const warning = warnings[i] 48 | console.log(' ' + warning) 49 | } 50 | 51 | console.log() 52 | process.exit(1) 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /WeChatApp/dist/steps/index.js: -------------------------------------------------------------------------------- 1 | Component({ 2 | externalClasses: ['i-class'], 3 | properties : { 4 | current : { 5 | type : Number, 6 | value : -1, 7 | observer : '_updateDataChange' 8 | }, 9 | status : { 10 | type : String, 11 | //wait、process、finish、error 12 | value : '' 13 | }, 14 | direction : { 15 | type : String, 16 | //value has horizontal or vertical 17 | value : 'horizontal' 18 | } 19 | }, 20 | relations : { 21 | '../step/index' : { 22 | type : 'child', 23 | linked(){ 24 | this._updateDataChange(); 25 | }, 26 | linkChanged () { 27 | this._updateDataChange(); 28 | }, 29 | unlinked () { 30 | this._updateDataChange(); 31 | } 32 | } 33 | }, 34 | methods: { 35 | _updateDataChange() { 36 | let steps = this.getRelationNodes('../step/index'); 37 | const len = steps.length; 38 | if (len > 0) { 39 | steps.forEach((step, index) => { 40 | step.updateDataChange({ 41 | len : len, 42 | index : index, 43 | current : this.data.current, 44 | direction : this.data.direction 45 | }); 46 | }); 47 | } 48 | } 49 | } 50 | }) -------------------------------------------------------------------------------- /WeChatApp/dist/input/index.js: -------------------------------------------------------------------------------- 1 | Component({ 2 | behaviors: ['wx://form-field'], 3 | 4 | externalClasses: ['i-class'], 5 | 6 | properties: { 7 | title: { 8 | type: String 9 | }, 10 | // text || textarea || password || number 11 | type: { 12 | type: String, 13 | value: 'text' 14 | }, 15 | disabled: { 16 | type: Boolean, 17 | value: false 18 | }, 19 | placeholder: { 20 | type: String, 21 | value: '' 22 | }, 23 | autofocus: { 24 | type: Boolean, 25 | value: false 26 | }, 27 | mode: { 28 | type: String, 29 | value: 'normal' 30 | }, 31 | right: { 32 | type: Boolean, 33 | value: false 34 | }, 35 | error: { 36 | type: Boolean, 37 | value: false 38 | }, 39 | maxlength: { 40 | type: Number 41 | } 42 | }, 43 | 44 | methods: { 45 | handleInputChange(event) { 46 | const { detail = {} } = event; 47 | const { value = '' } = detail; 48 | this.setData({ value }); 49 | 50 | this.triggerEvent('change', event); 51 | }, 52 | 53 | handleInputFocus(event) { 54 | this.triggerEvent('focus', event); 55 | }, 56 | 57 | handleInputBlur(event) { 58 | this.triggerEvent('blur', event); 59 | } 60 | } 61 | }); 62 | -------------------------------------------------------------------------------- /WeChatApp/dist/tabs/index.js: -------------------------------------------------------------------------------- 1 | Component({ 2 | externalClasses: ['i-class'], 3 | 4 | relations: { 5 | '../tab/index': { 6 | type: 'child', 7 | linked () { 8 | this.changeCurrent(); 9 | }, 10 | linkChanged () { 11 | this.changeCurrent(); 12 | }, 13 | unlinked () { 14 | this.changeCurrent(); 15 | } 16 | } 17 | }, 18 | 19 | properties: { 20 | current: { 21 | type: String, 22 | value: '', 23 | observer: 'changeCurrent' 24 | }, 25 | color: { 26 | type: String, 27 | value: '' 28 | }, 29 | scroll: { 30 | type: Boolean, 31 | value: false 32 | }, 33 | fixed: { 34 | type: Boolean, 35 | value: false 36 | } 37 | }, 38 | 39 | methods: { 40 | changeCurrent (val = this.data.current) { 41 | let items = this.getRelationNodes('../tab/index'); 42 | const len = items.length; 43 | 44 | if (len > 0) { 45 | items.forEach(item => { 46 | item.changeScroll(this.data.scroll); 47 | item.changeCurrent(item.data.key === val); 48 | item.changeCurrentColor(this.data.color); 49 | }); 50 | } 51 | }, 52 | emitEvent (key) { 53 | this.triggerEvent('change', { key }); 54 | } 55 | } 56 | }); 57 | -------------------------------------------------------------------------------- /WeChatApp/pages/history/index.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | {{score}}/{{total}}分 7 | 8 | 9 | 10 | 击败本站考生 11 | {{beatNum}}人 12 | 13 | 14 | 本站平均分 15 | {{average}}分 16 | 17 | 18 | 19 | 20 | 21 | | 22 | 题目列表 23 | 24 | 25 | {{index+1}} 26 | {{index+1}} 27 | {{index+1}} 28 | 29 | 30 | 31 | 32 | 33 | 查看解析 34 | 35 | 36 | 返回首页 37 | 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /WeChatApp/app.json: -------------------------------------------------------------------------------- 1 | { 2 | "pages": [ 3 | "pages/index/index", 4 | "pages/select/index", 5 | "pages/answer/index", 6 | "pages/history/index", 7 | "pages/answerErr/index", 8 | "pages/answerInfo/index", 9 | "pages/result/index", 10 | "pages/logs/logs", 11 | "pages/analysis/index", 12 | "pages/wrong/index", 13 | "pages/wrongAnswer/index", 14 | "pages/rank/index", 15 | "pages/rankList/index", 16 | "pages/my/index", 17 | "pages/historyList/index", 18 | "pages/feedback/index" 19 | ], 20 | "window": { 21 | "backgroundTextStyle": "light", 22 | "navigationBarBackgroundColor": "#2db7f5", 23 | "navigationBarTitleText": "答题酷", 24 | "navigationBarTextStyle": "#fff" 25 | }, 26 | "tabBar": { 27 | "selectedColor": "#2db7f5", 28 | "color": "#909090", 29 | "list": [ 30 | { 31 | "text": "答题", 32 | "iconPath": "images/answer.png", 33 | "selectedIconPath": "images/answer-select.png", 34 | "pagePath": "pages/select/index" 35 | }, 36 | { 37 | "text": "错题", 38 | "iconPath": "images/wrong.png", 39 | "selectedIconPath": "images/wrong-select.png", 40 | "pagePath": "pages/wrong/index" 41 | }, 42 | { 43 | "text": "排名", 44 | "iconPath": "images/sort.png", 45 | "selectedIconPath": "images/sort-select.png", 46 | "pagePath": "pages/rank/index" 47 | }, 48 | { 49 | "text": "我的", 50 | "iconPath": "images/my.png", 51 | "selectedIconPath": "images/my-select.png", 52 | "pagePath": "pages/my/index" 53 | } 54 | ] 55 | } 56 | } -------------------------------------------------------------------------------- /WeChatApp/dist/step/index.wxss: -------------------------------------------------------------------------------- 1 | .i-step-ico{width:24px;height:100%;border-radius:100%;background:#fff;position:relative;z-index:2;margin:0 auto;border:#dddee1 solid 1px}.i-step-ico-in{vertical-align:baseline}.i-step-line{position:absolute;left:50%;top:12px;width:100%;height:1px;background:#dddee1}.i-step-horizontal .i-step-ico::after{position:absolute;top:11px;left:23px;z-index:1;content:'';height:1px;background:#fff;width:10px}.i-step-horizontal .i-step-item-main{text-align:center}.i-step-horizontal .i-step-ico::before{position:absolute;top:11px;left:-11px;z-index:1;content:'';height:1px;background:#fff;width:10px}.i-step-ico{box-sizing:border-box;font-size:12px}.i-step-process .i-step-ico{border:#2d8cf0 solid 1px;color:#fff;background:#2d8cf0}.i-step-wait .i-step-ico{border:#e9eaec solid 1px;color:#e9eaec}.i-step-wait .i-step-line{background:#2d8cf0}.i-step-finish .i-step-ico{border:#2d8cf0 solid 1px;color:#2d8cf0}.i-step-finish .i-step-line{background:#2d8cf0}.i-step-error .i-step-ico{border:#ed3f14 solid 1px;color:#ed3f14}.i-step-error .i-step-line{background:#ed3f14}.i-step-item{font-size:12px;position:relative;display:inline-block;box-sizing:border-box;padding-left:10px;vertical-align:top}.i-step-item-ico{width:100%;height:24px;line-height:24px;text-align:center}.i-step-item-main{margin-top:10px;clear:both}.i-step-item-title{font-size:14px;font-weight:700;color:#1c2438}.i-step-item-content{font-size:12px;font-weight:700;margin-top:2px;color:#80848f}.i-step-vertical{padding-bottom:30px}.i-step-vertical .i-step-item-ico{width:24px;float:left}.i-step-vertical .i-step-item-main{margin-left:40px;margin-top:0;clear:inherit}.i-step-vertical .i-step-line{position:absolute;height:100%;top:0;left:10px;margin:0 0 0 12px;width:1px} -------------------------------------------------------------------------------- /WeChatApp/dist/checkbox/index.js: -------------------------------------------------------------------------------- 1 | const prefixCls = 'i-checkbox'; 2 | 3 | Component({ 4 | externalClasses: ['i-class'], 5 | relations: { 6 | '../checkbox-group/index': { 7 | type: 'parent' 8 | } 9 | }, 10 | properties: { 11 | value: { 12 | type: String, 13 | value: '' 14 | }, 15 | checked: { 16 | type: Boolean, 17 | value: false 18 | }, 19 | disabled: { 20 | type: Boolean, 21 | value: false 22 | }, 23 | color: { 24 | type: String, 25 | value: '#2d8cf0' 26 | }, 27 | position: { 28 | type: String, 29 | value: 'left', //left right 30 | observer: 'setPosition' 31 | } 32 | }, 33 | data: { 34 | checked: true, 35 | positionCls: `${prefixCls}-checkbox-left`, 36 | }, 37 | attached() { 38 | this.setPosition(); 39 | }, 40 | methods: { 41 | changeCurrent(current) { 42 | this.setData({ checked: current }); 43 | }, 44 | checkboxChange() { 45 | if (this.data.disabled) return; 46 | const item = { current: !this.data.checked, value: this.data.value }; 47 | const parent = this.getRelationNodes('../checkbox-group/index')[0]; 48 | parent ? parent.emitEvent(item) : this.triggerEvent('change', item); 49 | }, 50 | setPosition() { 51 | this.setData({ 52 | positionCls: this.data.position.indexOf('left') !== -1 ? `${prefixCls}-checkbox-left` : `${prefixCls}-checkbox-right`, 53 | }); 54 | } 55 | } 56 | }); 57 | -------------------------------------------------------------------------------- /Backend/test/e2e/runner.js: -------------------------------------------------------------------------------- 1 | // 1. start the dev server using production config 2 | process.env.NODE_ENV = 'testing' 3 | 4 | const webpack = require('webpack') 5 | const DevServer = require('webpack-dev-server') 6 | 7 | const webpackConfig = require('../../build/webpack.prod.conf') 8 | const devConfigPromise = require('../../build/webpack.dev.conf') 9 | 10 | let server 11 | 12 | devConfigPromise.then(devConfig => { 13 | const devServerOptions = devConfig.devServer 14 | const compiler = webpack(webpackConfig) 15 | server = new DevServer(compiler, devServerOptions) 16 | const port = devServerOptions.port 17 | const host = devServerOptions.host 18 | return server.listen(port, host) 19 | }) 20 | .then(() => { 21 | // 2. run the nightwatch test suite against it 22 | // to run in additional browsers: 23 | // 1. add an entry in test/e2e/nightwatch.conf.js under "test_settings" 24 | // 2. add it to the --env flag below 25 | // or override the environment flag, for example: `npm run e2e -- --env chrome,firefox` 26 | // For more information on Nightwatch's config file, see 27 | // http://nightwatchjs.org/guide#settings-file 28 | let opts = process.argv.slice(2) 29 | if (opts.indexOf('--config') === -1) { 30 | opts = opts.concat(['--config', 'test/e2e/nightwatch.conf.js']) 31 | } 32 | if (opts.indexOf('--env') === -1) { 33 | opts = opts.concat(['--env', 'chrome']) 34 | } 35 | 36 | const spawn = require('cross-spawn') 37 | const runner = spawn('./node_modules/.bin/nightwatch', opts, { stdio: 'inherit' }) 38 | 39 | runner.on('exit', function (code) { 40 | server.close() 41 | process.exit(code) 42 | }) 43 | 44 | runner.on('error', function (err) { 45 | server.close() 46 | throw err 47 | }) 48 | }) 49 | -------------------------------------------------------------------------------- /WeChatApp/pages/history/index.wxss: -------------------------------------------------------------------------------- 1 | /* pages/history/index.wxss */ 2 | page{ 3 | background: #fff; 4 | } 5 | .header{ 6 | width:100%; 7 | text-align:center; 8 | height:280rpx; 9 | background:#fff; 10 | } 11 | .header{ 12 | padding-top:65rpx; 13 | } 14 | .statistics{ 15 | display:flex; 16 | margin-top:25px; 17 | } 18 | .word{ 19 | width:50%; 20 | font-size:32rpx; 21 | } 22 | .beatNum{ 23 | margin-top:10rpx; 24 | font-size:40rpx; 25 | } 26 | .questionList{ 27 | margin-top:15rpx; 28 | background:#fff; 29 | margin-bottom: 100rpx; 30 | } 31 | .question{ 32 | width: 100%; 33 | margin:30rpx 20rpx 0rpx 40rpx; 34 | } 35 | .yuan{ 36 | float:left; 37 | margin: 8rpx 50rpx 30rpx 0rpx; 38 | width:28px; 39 | height: 28px; 40 | text-align: center; 41 | justify-content: center; 42 | display: flex; 43 | align-items: center; 44 | border-radius: 50px; 45 | } 46 | .blank{ 47 | color:#2db7f5; 48 | border: 1px #2db7f5 solid; 49 | background-color: white; 50 | } 51 | .right{ 52 | background: #b6f49f; 53 | color:#fff; 54 | border:1px #b6f49f solid; 55 | } 56 | .error{ 57 | background: #fba4b1; 58 | color:#fff; 59 | border:1px #fba4b1 solid; 60 | } 61 | .footer{ 62 | background: #fff; 63 | width: 100%; 64 | position: fixed; 65 | bottom:0; 66 | height: 100rpx; 67 | border-top:1px solid #e9e9e9; 68 | display: flex; 69 | align-items:center; 70 | } 71 | .btn{ 72 | width:105px; 73 | height:28px; 74 | line-height:28px; 75 | background:#2db7f5; 76 | color:#fff; 77 | border-radius:15px; 78 | text-align:center; 79 | font-size:14px; 80 | 81 | } 82 | .ftview{ 83 | width:50%; 84 | display:flex; 85 | justify-content:center; 86 | } 87 | -------------------------------------------------------------------------------- /WeChatApp/pages/feedback/index.js: -------------------------------------------------------------------------------- 1 | // pages/feedback/index.js 2 | Page({ 3 | 4 | /** 5 | * 页面的初始数据 6 | */ 7 | data: { 8 | value1:'', 9 | value2:'' 10 | }, 11 | onLoad (e) { 12 | 13 | }, 14 | handleChange(field, value) { 15 | console.log(value); 16 | this.setData({ 17 | [field]: value 18 | }) 19 | }, 20 | handleChange1({ detail }) { 21 | this.handleChange('value1', detail.detail.value) 22 | }, 23 | handleChange2({ detail }) { 24 | this.handleChange('value2', detail.detail.value) 25 | }, 26 | formSubmit(e) { 27 | var phoneNum = this.data.value1; 28 | var content = this.data.value2; 29 | var reg = /^1[3|4|5|7|8][0-9]\d{8}$/; 30 | if (reg.test(phoneNum) === false) { 31 | wx.showToast({ 32 | title: '号码不合法', 33 | icon: 'loading', 34 | duration: 1500 35 | }); 36 | return false; 37 | } 38 | if(content == ''){ 39 | wx.showToast({ 40 | title: '内容不为空', 41 | icon: 'loading', 42 | duration: 1500 43 | }); 44 | return false; 45 | } 46 | wx.u.addFeedBack(phoneNum,content).then(res=>{ 47 | if (res.result == 'success'){ 48 | wx.showToast({ 49 | title: '提交成功', 50 | success: function () { 51 | setTimeout(function () { 52 | //要延时执行的代码 53 | wx.switchTab({ 54 | url: '../my/index' 55 | }) 56 | }, 1500) 57 | } 58 | }); 59 | 60 | }else{ 61 | wx.showToast({ 62 | title: '提交失败', 63 | icon: 'loading', 64 | duration: 1500 65 | }); 66 | return false; 67 | } 68 | }) 69 | } 70 | }) -------------------------------------------------------------------------------- /Backend/src/icons/svg/tree.svg: -------------------------------------------------------------------------------- 1 | --------------------------------------------------------------------------------