├── .gitignore ├── pages ├── post │ ├── post.json │ ├── post.wxss │ ├── post.js │ └── post.wxml ├── combine │ ├── combine.wxss │ ├── combine.json │ ├── combine.wxml │ └── combine.js ├── index │ ├── index.json │ ├── index.wxss │ ├── index.wxml │ └── index.js ├── share │ ├── share.json │ ├── share.wxss │ ├── share.js │ └── share.wxml └── upload │ ├── upload.json │ ├── upload.wxml │ ├── upload.wxss │ └── upload.js ├── libs ├── wxa-plugin-canvas │ ├── poster │ │ ├── index.wxss │ │ ├── index.json │ │ ├── index.wxml │ │ ├── poster.js │ │ └── index.js │ └── index │ │ ├── index.json │ │ ├── index.wxml │ │ ├── index.wxss │ │ └── index.js ├── colorui │ ├── components │ │ ├── cu-custom.wxss │ │ ├── cu-custom.json │ │ ├── cu-custom.wxml │ │ └── cu-custom.js │ └── animation.wxss └── we-cropper │ ├── we-cropper.wxml │ ├── we-cropper.min.js │ └── we-cropper.js ├── image ├── 1.png ├── 2.png ├── 3.png ├── 4.png ├── 5.png ├── 6.png ├── 7.png ├── 8.png ├── 9.png ├── bg.jpg └── posters │ ├── 1.jpg │ ├── 2.jpg │ ├── 3.jpg │ └── 4.jpg ├── functions └── imgSecCheckV2 │ ├── config.json │ ├── package.json │ └── index.js ├── sitemap.json ├── project.private.config.json ├── app.wxss ├── app.json ├── utils └── util.js ├── README.md ├── app.js ├── project.config.json └── LICENSE /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules -------------------------------------------------------------------------------- /pages/post/post.json: -------------------------------------------------------------------------------- 1 | {} -------------------------------------------------------------------------------- /libs/wxa-plugin-canvas/poster/index.wxss: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /pages/combine/combine.wxss: -------------------------------------------------------------------------------- 1 | /* pages/combine/combine.wxss */ -------------------------------------------------------------------------------- /pages/index/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "disableScroll": true 3 | } -------------------------------------------------------------------------------- /libs/wxa-plugin-canvas/index/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "component": true 3 | } -------------------------------------------------------------------------------- /libs/colorui/components/cu-custom.wxss: -------------------------------------------------------------------------------- 1 | /* colorui/components/cu-custom.wxss */ -------------------------------------------------------------------------------- /image/1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/idealclover/Wear-Bachelor-Cap/HEAD/image/1.png -------------------------------------------------------------------------------- /image/2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/idealclover/Wear-Bachelor-Cap/HEAD/image/2.png -------------------------------------------------------------------------------- /image/3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/idealclover/Wear-Bachelor-Cap/HEAD/image/3.png -------------------------------------------------------------------------------- /image/4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/idealclover/Wear-Bachelor-Cap/HEAD/image/4.png -------------------------------------------------------------------------------- /image/5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/idealclover/Wear-Bachelor-Cap/HEAD/image/5.png -------------------------------------------------------------------------------- /image/6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/idealclover/Wear-Bachelor-Cap/HEAD/image/6.png -------------------------------------------------------------------------------- /image/7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/idealclover/Wear-Bachelor-Cap/HEAD/image/7.png -------------------------------------------------------------------------------- /image/8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/idealclover/Wear-Bachelor-Cap/HEAD/image/8.png -------------------------------------------------------------------------------- /image/9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/idealclover/Wear-Bachelor-Cap/HEAD/image/9.png -------------------------------------------------------------------------------- /image/bg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/idealclover/Wear-Bachelor-Cap/HEAD/image/bg.jpg -------------------------------------------------------------------------------- /libs/colorui/components/cu-custom.json: -------------------------------------------------------------------------------- 1 | { 2 | "component": true, 3 | "usingComponents": {} 4 | } -------------------------------------------------------------------------------- /image/posters/1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/idealclover/Wear-Bachelor-Cap/HEAD/image/posters/1.jpg -------------------------------------------------------------------------------- /image/posters/2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/idealclover/Wear-Bachelor-Cap/HEAD/image/posters/2.jpg -------------------------------------------------------------------------------- /image/posters/3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/idealclover/Wear-Bachelor-Cap/HEAD/image/posters/3.jpg -------------------------------------------------------------------------------- /image/posters/4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/idealclover/Wear-Bachelor-Cap/HEAD/image/posters/4.jpg -------------------------------------------------------------------------------- /pages/share/share.json: -------------------------------------------------------------------------------- 1 | { 2 | "usingComponents": { 3 | "poster": "../../libs/wxa-plugin-canvas/poster" 4 | } 5 | } -------------------------------------------------------------------------------- /pages/combine/combine.json: -------------------------------------------------------------------------------- 1 | { 2 | "usingComponents": { 3 | "poster": "../../libs/wxa-plugin-canvas/poster" 4 | } 5 | } -------------------------------------------------------------------------------- /pages/post/post.wxss: -------------------------------------------------------------------------------- 1 | /* pages/share.wxss */ 2 | button::after{ 3 | border:0; 4 | } 5 | button{ 6 | background-color: #fff; 7 | } -------------------------------------------------------------------------------- /pages/share/share.wxss: -------------------------------------------------------------------------------- 1 | /* pages/share.wxss */ 2 | button::after{ 3 | border:0; 4 | } 5 | button{ 6 | background-color: #fff; 7 | } -------------------------------------------------------------------------------- /functions/imgSecCheckV2/config.json: -------------------------------------------------------------------------------- 1 | { 2 | "permissions": { 3 | "openapi": [ 4 | "security.imgSecCheck" 5 | ] 6 | } 7 | } -------------------------------------------------------------------------------- /functions/imgSecCheckV2/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "wx-server-sdk": "latest", 4 | "axios": "0.27.2" 5 | } 6 | } -------------------------------------------------------------------------------- /libs/wxa-plugin-canvas/poster/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "component": true, 3 | "usingComponents": { 4 | "we-canvas": "../index/index" 5 | } 6 | } -------------------------------------------------------------------------------- /libs/wxa-plugin-canvas/poster/index.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /pages/upload/upload.json: -------------------------------------------------------------------------------- 1 | { 2 | "backgroundTextStyle":"dark", 3 | "navigationBarBackgroundColor": "#000", 4 | "navigationBarTitleText": "裁剪头像", 5 | "navigationBarTextStyle": "white" 6 | } -------------------------------------------------------------------------------- /sitemap.json: -------------------------------------------------------------------------------- 1 | { 2 | "desc": "关于本文件的更多信息,请参考文档 https://developers.weixin.qq.com/miniprogram/dev/framework/sitemap.html", 3 | "rules": [{ 4 | "action": "allow", 5 | "page": "*" 6 | }] 7 | } -------------------------------------------------------------------------------- /libs/wxa-plugin-canvas/index/index.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /project.private.config.json: -------------------------------------------------------------------------------- 1 | { 2 | "description": "项目私有配置文件。此文件中的内容将覆盖 project.config.json 中的相同字段。项目的改动优先同步到此文件中。详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html", 3 | "projectname": "Wear-Bachelor-Cap", 4 | "setting": { 5 | "compileHotReLoad": true 6 | } 7 | } -------------------------------------------------------------------------------- /app.wxss: -------------------------------------------------------------------------------- 1 | /**app.wxss**/ 2 | 3 | /* @import './libs/weui-miniprogram/weui-wxss/dist/style/weui.wxss'; */ 4 | @import "./libs/colorui/main.wxss"; 5 | @import "./libs/colorui/icon.wxss"; 6 | 7 | .footer { 8 | margin-top: 10px; 9 | margin-bottom: 5px; 10 | } 11 | 12 | .footer-item { 13 | height: 38rpx; 14 | } 15 | -------------------------------------------------------------------------------- /libs/wxa-plugin-canvas/index/index.wxss: -------------------------------------------------------------------------------- 1 | .canvas { 2 | width: 750rpx; 3 | height: 750rpx; 4 | } 5 | .canvas.pro { 6 | position: absolute; 7 | bottom: 0; 8 | left: 0; 9 | transform: translate3d(-9999rpx, 0, 0); 10 | } 11 | .canvas.debug { 12 | position: absolute; 13 | bottom: 0; 14 | left: 0; 15 | border: 1rpx solid #ccc; 16 | } -------------------------------------------------------------------------------- /app.json: -------------------------------------------------------------------------------- 1 | { 2 | "pages": [ 3 | "pages/index/index", 4 | "pages/combine/combine", 5 | "pages/upload/upload", 6 | "pages/share/share", 7 | "pages/post/post" 8 | ], 9 | "window": { 10 | "backgroundTextStyle": "light", 11 | "navigationBarBackgroundColor": "#E54D42", 12 | "navigationBarTitleText": "毕业帽头像", 13 | "navigationBarTextStyle": "white" 14 | }, 15 | "sitemapLocation": "sitemap.json" 16 | } -------------------------------------------------------------------------------- /utils/util.js: -------------------------------------------------------------------------------- 1 | const formatTime = date => { 2 | const year = date.getFullYear() 3 | const month = date.getMonth() + 1 4 | const day = date.getDate() 5 | const hour = date.getHours() 6 | const minute = date.getMinutes() 7 | const second = date.getSeconds() 8 | 9 | return [year, month, day].map(formatNumber).join('/') + ' ' + [hour, minute, second].map(formatNumber).join(':') 10 | } 11 | 12 | const formatNumber = n => { 13 | n = n.toString() 14 | return n[1] ? n : '0' + n 15 | } 16 | 17 | module.exports = { 18 | formatTime: formatTime 19 | } 20 | -------------------------------------------------------------------------------- /libs/we-cropper/we-cropper.wxml: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /pages/upload/upload.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 |