├── miniprogram
├── app.wxss
├── reg
│ ├── pages
│ │ ├── about
│ │ │ ├── hint.wxss
│ │ │ ├── hint.json
│ │ │ ├── about.json
│ │ │ ├── about.wxml
│ │ │ ├── hint.js
│ │ │ ├── about.wxss
│ │ │ ├── about.js
│ │ │ └── hint.wxml
│ │ ├── register
│ │ │ ├── reg_step1.wxss
│ │ │ ├── reg_step2.wxss
│ │ │ ├── reg_step1.json
│ │ │ ├── reg_step2.json
│ │ │ ├── reg_step3.json
│ │ │ ├── reg_step3.wxss
│ │ │ ├── reg_step2.wxml
│ │ │ ├── reg_step1.js
│ │ │ ├── reg_step2.js
│ │ │ ├── reg_step1.wxml
│ │ │ ├── reg_step3.wxml
│ │ │ ├── reg.wxss
│ │ │ └── reg_step3.js
│ │ ├── my
│ │ │ ├── base
│ │ │ │ ├── my_base.wxss
│ │ │ │ ├── my_base.json
│ │ │ │ ├── my_base.wxml
│ │ │ │ └── my_base.js
│ │ │ ├── reload
│ │ │ │ ├── my_reload.json
│ │ │ │ ├── my_reload.wxss
│ │ │ │ ├── my_reload.wxml
│ │ │ │ └── my_reload.js
│ │ │ └── index
│ │ │ │ ├── my_index.json
│ │ │ │ └── my_index.wxss
│ │ ├── search
│ │ │ ├── search.json
│ │ │ ├── search.wxml
│ │ │ ├── search.wxss
│ │ │ └── search.js
│ │ ├── admin
│ │ │ ├── news
│ │ │ │ ├── admin_news_list.wxss
│ │ │ │ ├── admin_news_add.wxss
│ │ │ │ ├── admin_news_edit.wxss
│ │ │ │ ├── admin_news_add.wxml
│ │ │ │ ├── admin_news_list.json
│ │ │ │ ├── admin_news_add.json
│ │ │ │ ├── admin_news_edit.json
│ │ │ │ ├── admin_news_edit.wxml
│ │ │ │ ├── admin_news_form_tpl.wxml
│ │ │ │ ├── admin_news_add.js
│ │ │ │ └── admin_news_edit.js
│ │ │ ├── user
│ │ │ │ ├── admin_user_detail.wxss
│ │ │ │ ├── admin_user_list.wxss
│ │ │ │ ├── admin_user_detail.json
│ │ │ │ ├── admin_user_list.json
│ │ │ │ ├── admin_user_detail.js
│ │ │ │ ├── admin_user_detail.wxml
│ │ │ │ └── admin_user_list.wxml
│ │ │ ├── setup
│ │ │ │ ├── admin_setup.wxss
│ │ │ │ ├── admin_setup.json
│ │ │ │ ├── admin_setup.wxml
│ │ │ │ └── admin_setup.js
│ │ │ └── index
│ │ │ │ ├── admin_login.json
│ │ │ │ ├── admin_home.json
│ │ │ │ ├── admin_login.wxml
│ │ │ │ ├── admin_home.wxss
│ │ │ │ ├── admin_login.wxss
│ │ │ │ ├── admin_home.js
│ │ │ │ ├── admin_login.js
│ │ │ │ └── admin_home.wxml
│ │ ├── news
│ │ │ ├── news_index.wxss
│ │ │ ├── news_detail.wxss
│ │ │ ├── news_detail.json
│ │ │ ├── news_index.json
│ │ │ ├── news_detail.wxml
│ │ │ ├── news_index.js
│ │ │ ├── news_index.wxml
│ │ │ └── news_detail.js
│ │ ├── user
│ │ │ ├── user_index.wxss
│ │ │ ├── user_detail.json
│ │ │ ├── user_index.json
│ │ │ ├── user_index.js
│ │ │ ├── user_detail.js
│ │ │ └── user_index.wxml
│ │ └── index
│ │ │ ├── index_home.json
│ │ │ ├── index_home.js
│ │ │ ├── index_home.wxss
│ │ │ └── index_home.wxml
│ ├── ccmini-cmpts
│ │ └── public
│ │ │ ├── img
│ │ │ ├── img_upload_cmpt.json
│ │ │ ├── img_upload_cmpt.wxss
│ │ │ ├── img_upload_cmpt.wxml
│ │ │ └── img_upload_cmpt.js
│ │ │ ├── list
│ │ │ ├── comm_list_cmpt.json
│ │ │ ├── comm_list_cmpt.wxss
│ │ │ └── comm_list_cmpt.wxml
│ │ │ └── picker
│ │ │ ├── picker_cmpt.json
│ │ │ ├── picker_cmpt.wxml
│ │ │ ├── picker_cmpt.wxss
│ │ │ └── picker_cmpt.js
│ ├── images
│ │ ├── home
│ │ │ ├── my.png
│ │ │ ├── news.png
│ │ │ ├── reg.png
│ │ │ ├── top.jpg
│ │ │ ├── user.png
│ │ │ ├── about.png
│ │ │ └── invite.png
│ │ ├── my
│ │ │ └── top.jpg
│ │ └── tabbar
│ │ │ ├── my.png
│ │ │ ├── home.png
│ │ │ ├── news.png
│ │ │ ├── reg.png
│ │ │ ├── user.png
│ │ │ ├── my_cur.png
│ │ │ ├── reg_cur.png
│ │ │ ├── home_cur.png
│ │ │ ├── news_cur.png
│ │ │ └── user_cur.png
│ ├── ccmini-tpls
│ │ ├── public
│ │ │ ├── top_tpl.wxml
│ │ │ ├── list_load_tpl.wxml
│ │ │ ├── footer_tpl.wxml
│ │ │ └── menu_tpl.wxml
│ │ └── biz
│ │ │ └── user_card_tpl.wxml
│ ├── helper
│ │ ├── ccmini_comm.js
│ │ ├── ccmini_content_check_helper.js
│ │ ├── ccmini_biz_helper.js
│ │ ├── ccmini_setting.js
│ │ └── ccmini_cache_helper.js
│ ├── biz
│ │ ├── base_ccmini_biz.js
│ │ ├── news_biz.js
│ │ ├── search_biz.js
│ │ ├── admin_news_biz.js
│ │ ├── admin_biz.js
│ │ └── reg_biz.js
│ └── style
│ │ ├── comm
│ │ ├── nav.wxss
│ │ ├── comm.wxss
│ │ ├── image.wxss
│ │ ├── avatar.wxss
│ │ ├── base.wxss
│ │ ├── button.wxss
│ │ ├── shadow.wxss
│ │ ├── border.wxss
│ │ ├── tag.wxss
│ │ ├── animation.wxss
│ │ └── text.wxss
│ │ ├── skin.wxss
│ │ └── project
│ │ ├── user_list.wxss
│ │ └── project.wxss
├── sitemap.json
├── app.js
└── app.json
├── cloudfunctionTemplate
└── cloud.json
├── cloudfunctions
└── reg_cloud
│ ├── config.json
│ ├── index.js
│ ├── package.json
│ ├── service
│ ├── home_service.js
│ ├── base_ccmini_service.js
│ └── news_service.js
│ ├── comm
│ ├── ccmini_biz_util.js
│ ├── ccmini_config.js
│ └── ccmini_router.js
│ ├── framework
│ ├── utils
│ │ ├── ccmini_constant.js
│ │ ├── ccmini_util.js
│ │ └── ccmini_str_util.js
│ ├── handler
│ │ ├── ccmini_app_code.js
│ │ └── ccmini_app_error.js
│ ├── client
│ │ └── ccmini_controller.js
│ ├── cloud
│ │ ├── ccmini_cloud_base.js
│ │ └── ccmini_cloud_util.js
│ └── validate
│ │ └── ccmini_content_check.js
│ ├── model
│ ├── base_ccmini_model.js
│ ├── setup_model.js
│ ├── admin_model.js
│ ├── news_model.js
│ └── user_model.js
│ └── controller
│ ├── home_controller.js
│ ├── base_ccmini_controller.js
│ ├── news_controller.js
│ ├── test_controller.js
│ └── passport_controller.js
├── .gitignore
└── project.config.json
/miniprogram/app.wxss:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/miniprogram/reg/pages/about/hint.wxss:
--------------------------------------------------------------------------------
1 | @import 'about.wxss'
--------------------------------------------------------------------------------
/miniprogram/reg/pages/register/reg_step1.wxss:
--------------------------------------------------------------------------------
1 | @import "reg.wxss";
--------------------------------------------------------------------------------
/miniprogram/reg/pages/register/reg_step2.wxss:
--------------------------------------------------------------------------------
1 | @import "reg.wxss";
--------------------------------------------------------------------------------
/miniprogram/reg/pages/my/base/my_base.wxss:
--------------------------------------------------------------------------------
1 | @import "../../../style/skin.wxss";
--------------------------------------------------------------------------------
/miniprogram/reg/pages/search/search.json:
--------------------------------------------------------------------------------
1 | {
2 | "usingComponents": {}
3 | }
--------------------------------------------------------------------------------
/miniprogram/reg/pages/my/reload/my_reload.json:
--------------------------------------------------------------------------------
1 | {
2 | "usingComponents": {}
3 | }
--------------------------------------------------------------------------------
/miniprogram/reg/pages/my/reload/my_reload.wxss:
--------------------------------------------------------------------------------
1 | @import "../../../style/skin.wxss";
--------------------------------------------------------------------------------
/miniprogram/reg/pages/admin/news/admin_news_list.wxss:
--------------------------------------------------------------------------------
1 | @import '../../../style/project/admin.wxss'
--------------------------------------------------------------------------------
/miniprogram/reg/pages/admin/user/admin_user_detail.wxss:
--------------------------------------------------------------------------------
1 | @import '../../../style/project/admin.wxss'
--------------------------------------------------------------------------------
/miniprogram/reg/pages/admin/user/admin_user_list.wxss:
--------------------------------------------------------------------------------
1 | @import '../../../style/project/admin.wxss'
--------------------------------------------------------------------------------
/miniprogram/reg/ccmini-cmpts/public/img/img_upload_cmpt.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true,
3 | "usingComponents": {}
4 | }
--------------------------------------------------------------------------------
/miniprogram/reg/ccmini-cmpts/public/list/comm_list_cmpt.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true,
3 | "usingComponents": {}
4 | }
--------------------------------------------------------------------------------
/miniprogram/reg/ccmini-cmpts/public/picker/picker_cmpt.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true,
3 | "usingComponents": {}
4 | }
--------------------------------------------------------------------------------
/miniprogram/reg/pages/my/base/my_base.json:
--------------------------------------------------------------------------------
1 | {
2 | "usingComponents": {},
3 | "navigationBarTitleText": "修改登记资料"
4 | }
--------------------------------------------------------------------------------
/miniprogram/reg/pages/register/reg_step1.json:
--------------------------------------------------------------------------------
1 | {
2 | "usingComponents": {},
3 | "navigationBarTitleText": "校友登记第一步"
4 | }
--------------------------------------------------------------------------------
/miniprogram/reg/pages/register/reg_step2.json:
--------------------------------------------------------------------------------
1 | {
2 | "usingComponents": {},
3 | "navigationBarTitleText": "校友登记第二步"
4 | }
--------------------------------------------------------------------------------
/miniprogram/reg/pages/register/reg_step3.json:
--------------------------------------------------------------------------------
1 | {
2 | "usingComponents": {},
3 | "navigationBarTitleText": "校友登记第三步"
4 | }
--------------------------------------------------------------------------------
/miniprogram/reg/images/home/my.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/meilinggong2002/SmartReg/HEAD/miniprogram/reg/images/home/my.png
--------------------------------------------------------------------------------
/miniprogram/reg/images/my/top.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/meilinggong2002/SmartReg/HEAD/miniprogram/reg/images/my/top.jpg
--------------------------------------------------------------------------------
/miniprogram/reg/pages/about/hint.json:
--------------------------------------------------------------------------------
1 | {
2 | "usingComponents": {
3 |
4 | },
5 | "navigationBarTitleText": "温馨提示"
6 | }
--------------------------------------------------------------------------------
/miniprogram/reg/images/home/news.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/meilinggong2002/SmartReg/HEAD/miniprogram/reg/images/home/news.png
--------------------------------------------------------------------------------
/miniprogram/reg/images/home/reg.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/meilinggong2002/SmartReg/HEAD/miniprogram/reg/images/home/reg.png
--------------------------------------------------------------------------------
/miniprogram/reg/images/home/top.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/meilinggong2002/SmartReg/HEAD/miniprogram/reg/images/home/top.jpg
--------------------------------------------------------------------------------
/miniprogram/reg/images/home/user.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/meilinggong2002/SmartReg/HEAD/miniprogram/reg/images/home/user.png
--------------------------------------------------------------------------------
/miniprogram/reg/images/tabbar/my.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/meilinggong2002/SmartReg/HEAD/miniprogram/reg/images/tabbar/my.png
--------------------------------------------------------------------------------
/miniprogram/reg/pages/news/news_index.wxss:
--------------------------------------------------------------------------------
1 | @import "../../style/skin.wxss";
2 | @import "../../style/project/article_list.wxss";
--------------------------------------------------------------------------------
/miniprogram/reg/pages/user/user_index.wxss:
--------------------------------------------------------------------------------
1 | @import "../../style/skin.wxss";
2 | @import '../../style/project/user_list.wxss';
3 |
--------------------------------------------------------------------------------
/cloudfunctionTemplate/cloud.json:
--------------------------------------------------------------------------------
1 | [
2 | {
3 | "name": "测试",
4 | "value": {
5 | "router": "test/test"
6 | }
7 | }
8 | ]
--------------------------------------------------------------------------------
/miniprogram/reg/images/home/about.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/meilinggong2002/SmartReg/HEAD/miniprogram/reg/images/home/about.png
--------------------------------------------------------------------------------
/miniprogram/reg/images/home/invite.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/meilinggong2002/SmartReg/HEAD/miniprogram/reg/images/home/invite.png
--------------------------------------------------------------------------------
/miniprogram/reg/images/tabbar/home.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/meilinggong2002/SmartReg/HEAD/miniprogram/reg/images/tabbar/home.png
--------------------------------------------------------------------------------
/miniprogram/reg/images/tabbar/news.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/meilinggong2002/SmartReg/HEAD/miniprogram/reg/images/tabbar/news.png
--------------------------------------------------------------------------------
/miniprogram/reg/images/tabbar/reg.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/meilinggong2002/SmartReg/HEAD/miniprogram/reg/images/tabbar/reg.png
--------------------------------------------------------------------------------
/miniprogram/reg/images/tabbar/user.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/meilinggong2002/SmartReg/HEAD/miniprogram/reg/images/tabbar/user.png
--------------------------------------------------------------------------------
/miniprogram/reg/pages/my/reload/my_reload.wxml:
--------------------------------------------------------------------------------
1 | 信息更新中...
--------------------------------------------------------------------------------
/miniprogram/reg/pages/news/news_detail.wxss:
--------------------------------------------------------------------------------
1 | @import "../../style/skin.wxss";
2 | @import "../../style/project/detail.wxss";
3 |
4 |
--------------------------------------------------------------------------------
/miniprogram/reg/images/tabbar/my_cur.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/meilinggong2002/SmartReg/HEAD/miniprogram/reg/images/tabbar/my_cur.png
--------------------------------------------------------------------------------
/miniprogram/reg/images/tabbar/reg_cur.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/meilinggong2002/SmartReg/HEAD/miniprogram/reg/images/tabbar/reg_cur.png
--------------------------------------------------------------------------------
/miniprogram/reg/images/tabbar/home_cur.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/meilinggong2002/SmartReg/HEAD/miniprogram/reg/images/tabbar/home_cur.png
--------------------------------------------------------------------------------
/miniprogram/reg/images/tabbar/news_cur.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/meilinggong2002/SmartReg/HEAD/miniprogram/reg/images/tabbar/news_cur.png
--------------------------------------------------------------------------------
/miniprogram/reg/images/tabbar/user_cur.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/meilinggong2002/SmartReg/HEAD/miniprogram/reg/images/tabbar/user_cur.png
--------------------------------------------------------------------------------
/miniprogram/reg/pages/about/about.json:
--------------------------------------------------------------------------------
1 | {
2 | "usingComponents": {
3 |
4 | },
5 | "enablePullDownRefresh": true,
6 | "navigationBarTitleText": "关于我们"
7 | }
--------------------------------------------------------------------------------
/miniprogram/reg/pages/index/index_home.json:
--------------------------------------------------------------------------------
1 | {
2 | "usingComponents": {
3 |
4 | },
5 | "backgroundTextStyle": "dark",
6 | "navigationBarTitleText": "首页"
7 | }
--------------------------------------------------------------------------------
/miniprogram/reg/pages/user/user_detail.json:
--------------------------------------------------------------------------------
1 | {
2 | "usingComponents": {},
3 | "enablePullDownRefresh": true,
4 | "backgroundTextStyle": "dark",
5 | "navigationBarTitleText": "校友详情"
6 | }
--------------------------------------------------------------------------------
/cloudfunctions/reg_cloud/config.json:
--------------------------------------------------------------------------------
1 | {
2 | "permissions": {
3 | "openapi": ["wxacode.getUnlimited", "security.imgSecCheck", "security.msgSecCheck","serviceMarket.invokeService"]
4 | }
5 | }
--------------------------------------------------------------------------------
/miniprogram/reg/pages/admin/news/admin_news_add.wxss:
--------------------------------------------------------------------------------
1 | @import '../../../style/project/admin.wxss';
2 | .main-admin{
3 | width:100%;
4 | box-sizing: border-box;
5 | padding:30rpx 20rpx;
6 | }
--------------------------------------------------------------------------------
/miniprogram/reg/pages/admin/news/admin_news_edit.wxss:
--------------------------------------------------------------------------------
1 | @import '../../../style/project/admin.wxss';
2 | .main-admin{
3 | width:100%;
4 | box-sizing: border-box;
5 | padding:30rpx 20rpx;
6 | }
--------------------------------------------------------------------------------
/miniprogram/reg/pages/admin/setup/admin_setup.wxss:
--------------------------------------------------------------------------------
1 | @import '../../../style/project/admin.wxss';
2 | .main-admin{
3 | width:100%;
4 | box-sizing: border-box;
5 | padding:30rpx 20rpx;
6 | }
--------------------------------------------------------------------------------
/miniprogram/reg/pages/my/index/my_index.json:
--------------------------------------------------------------------------------
1 | {
2 | "usingComponents": {},
3 | "enablePullDownRefresh": true,
4 | "backgroundTextStyle": "dark",
5 | "navigationBarTitleText": "个人中心"
6 | }
--------------------------------------------------------------------------------
/miniprogram/reg/pages/news/news_detail.json:
--------------------------------------------------------------------------------
1 | {
2 | "usingComponents": {
3 |
4 | },
5 | "enablePullDownRefresh": true,
6 | "backgroundTextStyle": "dark",
7 | "navigationBarTitleText": "公告通知详情"
8 | }
--------------------------------------------------------------------------------
/miniprogram/reg/ccmini-cmpts/public/img/img_upload_cmpt.wxss:
--------------------------------------------------------------------------------
1 | @import "../../../style/comm/comm.wxss";
2 | @import "../../../style/project/project.wxss";
3 |
4 | @import "../../../style/skin.wxss";
5 |
6 |
--------------------------------------------------------------------------------
/miniprogram/sitemap.json:
--------------------------------------------------------------------------------
1 | {
2 | "desc": "关于本文件的更多信息,请参考文档 https://developers.weixin.qq.com/miniprogram/dev/framework/sitemap.html",
3 | "rules": [{
4 | "action": "allow",
5 | "page": "*"
6 | }]
7 | }
--------------------------------------------------------------------------------
/miniprogram/reg/pages/admin/index/admin_login.json:
--------------------------------------------------------------------------------
1 | {
2 | "usingComponents": {},
3 | "navigationBarBackgroundColor": "#ffffff",
4 | "navigationBarTextStyle": "black",
5 | "navigationBarTitleText": "后台管理"
6 | }
--------------------------------------------------------------------------------
/miniprogram/reg/ccmini-cmpts/public/picker/picker_cmpt.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 | {{options[idx] || '请选择'}}
4 |
5 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Windows
2 | [Dd]esktop.ini
3 | Thumbs.db
4 | $RECYCLE.BIN/
5 |
6 | # macOS
7 | .DS_Store
8 | .fseventsd
9 | .Spotlight-V100
10 | .TemporaryItems
11 | .Trashes
12 |
13 | # Node.js
14 | node_modules/
15 |
--------------------------------------------------------------------------------
/cloudfunctions/reg_cloud/index.js:
--------------------------------------------------------------------------------
1 | const ccminiApplication = require('./framework/handler/ccmini_application.js');
2 |
3 | // 云函数入口函数
4 | exports.main = async (event, context) => {
5 | return await ccminiApplication.ccminiApp(event, context);
6 | }
--------------------------------------------------------------------------------
/miniprogram/reg/ccmini-cmpts/public/picker/picker_cmpt.wxss:
--------------------------------------------------------------------------------
1 | .picker {
2 | line-height: 100rpx;
3 | font-size: 28rpx;
4 | text-overflow: ellipsis;
5 | white-space: nowrap;
6 | overflow: hidden;
7 | width: 100%;
8 | text-align: right;
9 | }
--------------------------------------------------------------------------------
/miniprogram/reg/pages/admin/index/admin_home.json:
--------------------------------------------------------------------------------
1 | {
2 | "usingComponents": {},
3 | "enablePullDownRefresh": true,
4 | "navigationBarBackgroundColor": "#ffffff",
5 | "navigationBarTextStyle": "black",
6 | "navigationBarTitleText": "后台管理"
7 | }
--------------------------------------------------------------------------------
/miniprogram/reg/pages/register/reg_step3.wxss:
--------------------------------------------------------------------------------
1 | @import "reg.wxss";
2 | page{
3 | background-color: #f1f1f1;
4 | }
5 |
6 | .main-reg .form{
7 | width:100%;
8 | box-sizing: border-box;
9 | }
10 |
11 | .main-reg .btn-main{
12 | margin-top:100rpx;
13 | }
--------------------------------------------------------------------------------
/miniprogram/reg/pages/admin/user/admin_user_detail.json:
--------------------------------------------------------------------------------
1 | {
2 | "usingComponents": {},
3 | "enablePullDownRefresh": true,
4 | "backgroundTextStyle": "dark",
5 | "navigationBarBackgroundColor": "#ffffff",
6 | "navigationBarTextStyle": "black",
7 | "navigationBarTitleText": "后台-用户详情"
8 | }
--------------------------------------------------------------------------------
/miniprogram/reg/ccmini-tpls/public/top_tpl.wxml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/miniprogram/reg/pages/news/news_index.json:
--------------------------------------------------------------------------------
1 | {
2 | "usingComponents": {
3 | "ccmini-cmpt-comm-list": "../../ccmini-cmpts/public/list/comm_list_cmpt"
4 | },
5 | "enablePullDownRefresh": false,
6 | "disableScroll": true,
7 | "backgroundTextStyle": "dark",
8 | "navigationBarTitleText": "公告通知"
9 | }
--------------------------------------------------------------------------------
/miniprogram/reg/pages/user/user_index.json:
--------------------------------------------------------------------------------
1 | {
2 | "usingComponents": {
3 | "ccmini-cmpt-comm-list": "../../ccmini-cmpts/public/list/comm_list_cmpt"
4 | },
5 | "enablePullDownRefresh": false,
6 | "disableScroll": true,
7 | "backgroundTextStyle": "dark",
8 | "navigationBarTitleText": "花名册"
9 | }
--------------------------------------------------------------------------------
/miniprogram/reg/pages/admin/setup/admin_setup.json:
--------------------------------------------------------------------------------
1 | {
2 | "usingComponents": {
3 |
4 | },
5 | "navigationBarBackgroundColor": "#ffffff",
6 | "navigationBarTextStyle": "black",
7 | "enablePullDownRefresh": true,
8 | "backgroundTextStyle": "dark",
9 | "navigationBarTitleText": "后台-系统设置"
10 | }
--------------------------------------------------------------------------------
/miniprogram/reg/helper/ccmini_comm.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Notes: 通用常量
3 | * Ver : CCMiniCloud Framework 2.0.1 ALL RIGHTS RESERVED BY www.code942.com
4 | * Date: 2025-11-14 07:48:00
5 | */
6 |
7 | module.exports = {
8 | CACHE_TOKEN: 'CACHE_TOKEN', // 登录
9 | CACHE_ADMIN: 'ADMIN_TOKEN', // 管理员登录
10 | }
11 |
--------------------------------------------------------------------------------
/miniprogram/reg/pages/admin/news/admin_news_add.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/miniprogram/reg/biz/base_ccmini_biz.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Notes: 基础模块业务逻辑
3 | * Ver : CCMiniCloud Framework 2.0.1 ALL RIGHTS RESERVED BY www.code942.com
4 | * Date: 2025-11-14 07:48:00
5 | */
6 |
7 | class CCMiniBaseBiz {
8 | // 取得可选options
9 | static options(str) {
10 | if (!str)
11 | return [];
12 | else
13 | return str.split(',')
14 | }
15 | }
16 |
17 | module.exports = CCMiniBaseBiz;
--------------------------------------------------------------------------------
/miniprogram/reg/pages/admin/news/admin_news_list.json:
--------------------------------------------------------------------------------
1 | {
2 | "usingComponents": {
3 | "ccmini-cmpt-comm-list": "../../../ccmini-cmpts/public/list/comm_list_cmpt"
4 | },
5 | "navigationBarBackgroundColor": "#ffffff",
6 | "navigationBarTextStyle": "black",
7 | "enablePullDownRefresh": false,
8 | "disableScroll": true,
9 | "backgroundTextStyle": "dark",
10 | "navigationBarTitleText": "后台-公告通知"
11 | }
--------------------------------------------------------------------------------
/miniprogram/reg/pages/admin/user/admin_user_list.json:
--------------------------------------------------------------------------------
1 | {
2 | "usingComponents": {
3 | "ccmini-cmpt-comm-list": "../../../ccmini-cmpts/public/list/comm_list_cmpt"
4 | },
5 | "enablePullDownRefresh": false,
6 | "disableScroll": true,
7 | "backgroundTextStyle": "dark",
8 | "navigationBarBackgroundColor": "#ffffff",
9 | "navigationBarTextStyle": "black",
10 | "navigationBarTitleText": "后台-用户模块"
11 | }
--------------------------------------------------------------------------------
/cloudfunctions/reg_cloud/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "cloud",
3 | "version": "1.0.0",
4 | "description": "",
5 | "main": "index.js",
6 | "scripts": {
7 | "test": "echo \"Error: no test specified\" && exit 1"
8 | },
9 | "author": "",
10 | "license": "ISC",
11 | "dependencies": {
12 | "date-utils": "^1.2.21",
13 | "wx-server-sdk": "~2.1.2"
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/miniprogram/reg/style/comm/nav.wxss:
--------------------------------------------------------------------------------
1 |
2 | /* ==================
3 | 导航栏
4 | ==================== */
5 |
6 | .tab {
7 | white-space: nowrap;
8 | }
9 |
10 | ::-webkit-scrollbar {
11 | display: none;
12 | }
13 |
14 | .tab .item {
15 | height: 90rpx;
16 | display: inline-block;
17 | line-height: 90rpx;
18 | margin: 0 10rpx;
19 | padding: 0 20rpx;
20 | }
21 |
22 | .tab .item.cur {
23 | border-bottom: 4rpx solid;
24 | }
25 |
--------------------------------------------------------------------------------
/miniprogram/reg/pages/admin/news/admin_news_add.json:
--------------------------------------------------------------------------------
1 | {
2 | "usingComponents": {
3 | "ccmini-cmpt-picker": "../../../ccmini-cmpts/public/picker/picker_cmpt",
4 | "ccmini-cmpt-img-upload": "../../../ccmini-cmpts/public/img/img_upload_cmpt"
5 | },
6 | "navigationBarBackgroundColor": "#ffffff",
7 | "navigationBarTextStyle": "black",
8 | "enablePullDownRefresh": true,
9 | "backgroundTextStyle": "dark",
10 | "navigationBarTitleText": "后台-公告通知添加"
11 | }
--------------------------------------------------------------------------------
/miniprogram/reg/pages/admin/news/admin_news_edit.json:
--------------------------------------------------------------------------------
1 | {
2 | "usingComponents": {
3 | "ccmini-cmpt-picker": "../../../ccmini-cmpts/public/picker/picker_cmpt",
4 | "ccmini-cmpt-img-upload": "../../../ccmini-cmpts/public/img/img_upload_cmpt"
5 | },
6 | "navigationBarBackgroundColor": "#ffffff",
7 | "navigationBarTextStyle": "black",
8 | "enablePullDownRefresh": true,
9 | "backgroundTextStyle": "dark",
10 | "navigationBarTitleText": "后台-公告通知修改"
11 | }
--------------------------------------------------------------------------------
/miniprogram/reg/ccmini-tpls/public/list_load_tpl.wxml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 | 暂无数据
7 |
--------------------------------------------------------------------------------
/miniprogram/reg/pages/admin/news/admin_news_edit.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/miniprogram/reg/style/comm/comm.wxss:
--------------------------------------------------------------------------------
1 | @import "base.wxss";
2 |
3 | @import "avatar.wxss";
4 | @import "background.wxss";
5 | @import "bar.wxss";
6 | @import "border.wxss";
7 | @import "button.wxss";
8 | @import "image.wxss";
9 | @import "modal.wxss";
10 | @import "nav.wxss";
11 | @import "shadow.wxss";
12 | @import "tag.wxss";
13 | @import "icon.wxss";
14 | @import "form.wxss";
15 | @import "text.wxss";
16 | @import "list.wxss";
17 | @import "load.wxss";
18 | @import "layout.wxss";
--------------------------------------------------------------------------------
/miniprogram/app.js:
--------------------------------------------------------------------------------
1 | App({
2 | onLaunch: function (options) {
3 |
4 | if (!wx.cloud) {
5 | console.error('请使用 2.2.3 或以上的基础库以使用云能力')
6 | } else {
7 | wx.cloud.init({
8 | env: 'card-8gdoyuexd3702a23',
9 | traceUser: true,
10 | })
11 | }
12 |
13 | this.globalData = {}
14 | },
15 | /*
16 | onShow: function (options) {
17 | // 启动,或者从后台进入前台
18 | //GroupBiz.initGroupShareTicket(options);
19 | },
20 | onHide: function () {
21 | // 小程序从前台进入后台
22 | //GroupBiz.clearGroupShareTicket();
23 | }*/
24 | })
--------------------------------------------------------------------------------
/cloudfunctions/reg_cloud/service/home_service.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Notes: 全局/首页模块业务逻辑
3 | * Ver : CCMiniCloud Framework 2.0.1 ALL RIGHTS RESERVED BY www.code942.com
4 | * Date: 2025-11-05 07:48:00
5 | */
6 |
7 | const BaseCCMiniService = require('./base_ccmini_service.js');
8 | const SetupModel = require('../model/setup_model.js');
9 |
10 | class HomeService extends BaseCCMiniService {
11 |
12 |
13 | async getSetup(fields = 'SETUP_TITLE,SETUP_REG_CHECK') {
14 | let where = {}
15 | let setup = await SetupModel.getOne(where, fields);
16 |
17 |
18 | return setup;
19 |
20 | }
21 |
22 |
23 | }
24 |
25 | module.exports = HomeService;
--------------------------------------------------------------------------------
/miniprogram/reg/ccmini-tpls/public/footer_tpl.wxml:
--------------------------------------------------------------------------------
1 |
2 |
15 |
--------------------------------------------------------------------------------
/miniprogram/reg/ccmini-tpls/biz/user_card_tpl.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | {{user.USER_NAME}}
8 | {{user.USER_ITEM}}
9 |
10 |
11 | 详情
12 |
13 |
14 |
--------------------------------------------------------------------------------
/miniprogram/reg/pages/about/about.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | 关于{{about.SETUP_TITLE}}
8 | {{about.SETUP_ABOUT}}
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/miniprogram/reg/biz/news_biz.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Notes: 公告通知模块业务逻辑
3 | * Ver : CCMiniCloud Framework 2.0.1 ALL RIGHTS RESERVED BY www.code942.com
4 | * Date: 2025-11-14 07:48:00
5 | */
6 |
7 | const BaseCCMiniBiz = require('./base_ccmini_biz.js');
8 |
9 | class NewsBiz extends BaseCCMiniBiz {
10 |
11 |
12 | /**
13 | * 搜索菜单设置
14 | */
15 | static async getSearchMenu() {
16 | let sortMenus = [{
17 | label: '全部',
18 | type: '',
19 | value: ''
20 | }, {
21 | label: '最新',
22 | type: 'sort',
23 | value: 'new'
24 | },
25 | {
26 | label: '最热',
27 | type: 'sort',
28 | value: 'view'
29 | }
30 | ];
31 |
32 | let sortItems = [];
33 |
34 | return {
35 | sortItems,
36 | sortMenus
37 | }
38 |
39 | }
40 | }
41 |
42 |
43 | module.exports = NewsBiz;
--------------------------------------------------------------------------------
/cloudfunctions/reg_cloud/comm/ccmini_biz_util.js:
--------------------------------------------------------------------------------
1 | // +----------------------------------------------------------------------
2 | // | CCMiniCloud [ Cloud Framework ]
3 | // +----------------------------------------------------------------------
4 | // | Copyright (c) 2021 www.code942.com All rights reserved.
5 | // +----------------------------------------------------------------------
6 | // | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
7 | // +----------------------------------------------------------------------
8 | // | Author: 明章科技
9 | // +----------------------------------------------------------------------
10 |
11 | /**
12 | * Notes: 业务相关公用
13 | * Ver : CCMiniCloud Framework 2.0.1 ALL RIGHTS RESERVED BY www.code942.com
14 | * Date: 2025-10-24 19:20:00
15 | */
16 | module.exports = {
17 | }
--------------------------------------------------------------------------------
/miniprogram/reg/helper/ccmini_content_check_helper.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Notes: UGC内容校验
3 | * Ver : CCMiniCloud Framework 2.0.1 ALL RIGHTS RESERVED BY www.code942.com
4 | * Date: 2025-11-14 07:48:00
5 | */
6 |
7 | const ccminiCloudHelper = require('../helper/ccmini_cloud_helper.js');
8 |
9 | /**
10 | * 图片类型校验
11 | * @param {*} fileName
12 | * @param {*} type
13 | */
14 | function imgTypeCheck(path, type = ['jpg', 'jpeg', 'png']) {
15 | let fmt = path.split(".")[(path.split(".")).length - 1];
16 | if (type.indexOf(fmt) > -1)
17 | return true;
18 | else
19 | return false;
20 | }
21 |
22 | /**
23 | * 图片大小校验
24 | * @param {*} size
25 | * @param {*} maxSize
26 | */
27 | function imgSizeCheck(size, maxSize) {
28 | return size < maxSize;
29 | }
30 |
31 |
32 |
33 | module.exports = {
34 | imgTypeCheck,
35 | imgSizeCheck
36 | }
--------------------------------------------------------------------------------
/miniprogram/reg/style/comm/image.wxss:
--------------------------------------------------------------------------------
1 |
2 | /* ==================
3 | 图片
4 | ==================== */
5 |
6 | image {
7 | max-width: 100%;
8 | display: inline-block;
9 | position: relative;
10 | z-index: 0;
11 | }
12 |
13 | image.loading::before {
14 | content: "";
15 | background-color: #f5f5f5;
16 | display: block;
17 | position: absolute;
18 | width: 100%;
19 | height: 100%;
20 | z-index: -2;
21 | }
22 |
23 | image.loading::after {
24 | content: "\e7f1";
25 | font-family: "icon";
26 | position: absolute;
27 | top: 0;
28 | left: 0;
29 | width: 32rpx;
30 | height: 32rpx;
31 | line-height: 32rpx;
32 | right: 0;
33 | bottom: 0;
34 | z-index: -1;
35 | font-size: 32rpx;
36 | margin: auto;
37 | color: #ccc;
38 | -webkit-animation: icon-spin 2s infinite linear;
39 | animation: icon-spin 2s infinite linear;
40 | display: block;
41 | }
--------------------------------------------------------------------------------
/miniprogram/reg/ccmini-cmpts/public/img/img_upload_cmpt.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 | {{title}} (每张大小不超过{{imgUploadSize}}M)
4 |
5 |
6 | {{imgList.length}}/{{imgMax}}
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/cloudfunctions/reg_cloud/framework/utils/ccmini_constant.js:
--------------------------------------------------------------------------------
1 | // +----------------------------------------------------------------------
2 | // | CCMiniCloud [ Cloud Framework ]
3 | // +----------------------------------------------------------------------
4 | // | Copyright (c) 2021 www.code942.com All rights reserved.
5 | // +----------------------------------------------------------------------
6 | // | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
7 | // +----------------------------------------------------------------------
8 | // | Author: 明章科技
9 | // +----------------------------------------------------------------------
10 |
11 | /**
12 | * Notes: 通用常量定义
13 | * Ver : CCMiniCloud Framework 2.0.1 ALL RIGHTS RESERVED BY www.code942.com
14 | * Date: 2025-09-05 04:00:00
15 | * Version : CCMiniCloud Framework Ver 2.0.1 ALL RIGHTS RESERVED BY 明章科技
16 | */
17 | module.exports = {
18 |
19 | }
--------------------------------------------------------------------------------
/miniprogram/reg/pages/admin/index/admin_login.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | {{projectName}}后台管理
8 |
9 |
10 |
11 | 账号:
12 |
13 |
14 |
15 |
16 | 密码:
17 |
18 |
19 |
20 |
21 | 返回
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
--------------------------------------------------------------------------------
/miniprogram/reg/pages/my/reload/my_reload.js:
--------------------------------------------------------------------------------
1 | const PassportBiz = require('../../../biz/passport_biz.js');
2 | const CCMINI_SETTING = require('../../../helper/ccmini_setting.js');
3 |
4 | Page({
5 |
6 | /**
7 | * 页面的初始数据
8 | */
9 | data: {
10 |
11 | },
12 |
13 | /**
14 | * 生命周期函数--监听页面加载
15 | */
16 | onLoad: async function (options) {
17 | await PassportBiz.initPage(this);
18 | },
19 |
20 | /**
21 | * 生命周期函数--监听页面初次渲染完成
22 | */
23 | onReady: function () {
24 |
25 | },
26 |
27 | /**
28 | * 生命周期函数--监听页面显示
29 | */
30 | onShow: async function () {
31 |
32 | PassportBiz.clearToken();
33 | await PassportBiz.loginSilence();
34 |
35 | wx.reLaunch({
36 | url: '/' + CCMINI_SETTING.PROJECT_MARK + '/pages/my/index/my_index',
37 | })
38 |
39 | },
40 |
41 | /**
42 | * 生命周期函数--监听页面隐藏
43 | */
44 | onHide: function () {
45 |
46 | },
47 |
48 | /**
49 | * 生命周期函数--监听页面卸载
50 | */
51 | onUnload: function () {
52 |
53 | },
54 |
55 | })
--------------------------------------------------------------------------------
/miniprogram/reg/helper/ccmini_biz_helper.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Notes: 业务通用
3 | * Ver : CCMiniCloud Framework 2.0.1 ALL RIGHTS RESERVED BY www.code942.com
4 | * Date: 2025-11-14 07:48:00
5 | */
6 |
7 | const ccminiCacheHelper = require('./ccmini_cache_helper.js');
8 | const CCMINI_SETTING = require('./ccmini_setting.js');
9 |
10 | function isCacheList(key) {
11 | key = key.toUpperCase();
12 | if (CCMINI_SETTING.CACHE_IS_LIST)
13 | return ccminiCacheHelper.get(key + '_LIST');
14 | else
15 | return false;
16 | }
17 |
18 | function removeCacheList(key) {
19 | key = key.toUpperCase();
20 | if (CCMINI_SETTING.CACHE_IS_LIST)
21 | ccminiCacheHelper.remove(key + '_LIST');
22 | }
23 |
24 | function setCacheList(key, time = CCMINI_SETTING.CACHE_LIST_TIME) {
25 | key = key.toUpperCase();
26 | if (CCMINI_SETTING.CACHE_IS_LIST)
27 | ccminiCacheHelper.set(key + '_LIST', 'TRUE', time);
28 | }
29 |
30 |
31 | module.exports = {
32 | isCacheList,
33 | removeCacheList,
34 | setCacheList
35 | }
--------------------------------------------------------------------------------
/miniprogram/reg/pages/my/base/my_base.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/cloudfunctions/reg_cloud/model/base_ccmini_model.js:
--------------------------------------------------------------------------------
1 | // +----------------------------------------------------------------------
2 | // | CCMiniCloud [ Cloud Framework ]
3 | // +----------------------------------------------------------------------
4 | // | Copyright (c) 2021 www.code942.com All rights reserved.
5 | // +----------------------------------------------------------------------
6 | // | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
7 | // +----------------------------------------------------------------------
8 | // | Author: 明章科技
9 | // +----------------------------------------------------------------------
10 |
11 | /**
12 | * Notes: 实体基类
13 | * Ver : CCMiniCloud Framework 2.0.1 ALL RIGHTS RESERVED BY www.code942.com
14 | * Date: 2025-11-14 19:20:00
15 | * Version : CCMiniCloud Framework Ver 2.0.1 ALL RIGHTS RESERVED BY 明章科技
16 | */
17 |
18 |
19 | const CCMiniModel = require('../framework/database/ccmini_model.js');
20 |
21 | class BaseCCMiniModel extends CCMiniModel {
22 |
23 | }
24 |
25 |
26 | module.exports = BaseCCMiniModel;
--------------------------------------------------------------------------------
/miniprogram/reg/pages/search/search.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 | 历史记录
15 |
16 |
17 | {{item}}
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/miniprogram/reg/pages/register/reg_step2.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | 手机验证
6 |
7 |
8 | 2
9 | 微信授权
10 |
11 |
12 | 3
13 | 提交资料
14 |
15 |
16 |
17 | 登记需要获取您的昵称,头像信息
18 |
20 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/cloudfunctions/reg_cloud/framework/handler/ccmini_app_code.js:
--------------------------------------------------------------------------------
1 | // +----------------------------------------------------------------------
2 | // | CCMiniCloud [ Cloud Framework ]
3 | // +----------------------------------------------------------------------
4 | // | Copyright (c) 2021 www.code942.com All rights reserved.
5 | // +----------------------------------------------------------------------
6 | // | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
7 | // +----------------------------------------------------------------------
8 | // | Author: 明章科技
9 | // +----------------------------------------------------------------------
10 |
11 | /**
12 | * Notes: 错误代码定义
13 | * Ver : CCMiniCloud Framework 2.0.1 ALL RIGHTS RESERVED BY www.code942.com
14 | * Date: 2025-09-05 04:00:00
15 | * Version : CCMiniCloud Framework Ver 2.0.1 ALL RIGHTS RESERVED BY 明章科技
16 | */
17 | module.exports = {
18 | SUCC: 200,
19 | SVR: 500,
20 | LOGIC: 1600,
21 | DATA: 1301,
22 | HEADER: 1302,
23 | NOT_USER: 1303,
24 | USER_EXCEPTION: 1304,
25 | MUST_LOGIN: 1305,
26 | USER_CHECK: 1306,
27 |
28 | ADMIN_ERROR: 2001
29 | }
--------------------------------------------------------------------------------
/miniprogram/reg/pages/about/hint.js:
--------------------------------------------------------------------------------
1 | const ccminiPageHelper = require('../../helper/ccmini_page_helper.js');
2 | const PassportBiz = require('../../biz/passport_biz.js');
3 |
4 | Page({
5 |
6 | /**
7 | * 页面的初始数据
8 | */
9 | data: {
10 | type: 0, //0-需要注册提示 1=用户异常提示 2=认证中提示 9=自定义错误
11 | msg: ''
12 | },
13 |
14 | /**
15 | * 生命周期函数--监听页面加载
16 | */
17 | onLoad: async function (options) {
18 | await PassportBiz.initPage(this);
19 |
20 | let type = 9;
21 | let msg = (options && options.msg) ? decodeURIComponent(options.msg) : '';
22 |
23 | if (options && options.type) type = options.type;
24 |
25 | this.setData({
26 | type,
27 | msg
28 | });
29 | },
30 |
31 | /**
32 | * 生命周期函数--监听页面初次渲染完成
33 | */
34 | onReady: function () {
35 |
36 | },
37 |
38 | /**
39 | * 生命周期函数--监听页面显示
40 | */
41 | onShow: function () {
42 |
43 | },
44 |
45 | /**
46 | * 生命周期函数--监听页面隐藏
47 | */
48 | onHide: function () {
49 |
50 | },
51 |
52 | /**
53 | * 生命周期函数--监听页面卸载
54 | */
55 | onUnload: function () {
56 |
57 | },
58 |
59 | url: function (e) {
60 | ccminiPageHelper.url(e, this);
61 | }
62 |
63 | })
--------------------------------------------------------------------------------
/cloudfunctions/reg_cloud/framework/utils/ccmini_util.js:
--------------------------------------------------------------------------------
1 | // +----------------------------------------------------------------------
2 | // | CCMiniCloud [ Cloud Framework ]
3 | // +----------------------------------------------------------------------
4 | // | Copyright (c) 2021 www.code942.com All rights reserved.
5 | // +----------------------------------------------------------------------
6 | // | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
7 | // +----------------------------------------------------------------------
8 | // | Author: 明章科技
9 | // +----------------------------------------------------------------------
10 |
11 | /**
12 | * Notes: 通用工具函数
13 | * Ver : CCMiniCloud Framework 2.0.1 ALL RIGHTS RESERVED BY www.code942.com
14 | * Date: 2025-09-05 04:00:00
15 | * Version : CCMiniCloud Framework Ver 2.0.1 ALL RIGHTS RESERVED BY 明章科技
16 | */
17 |
18 | function isDefined(val) {
19 | if (val === undefined)
20 | return false;
21 | else
22 | return true;
23 | }
24 |
25 | function sleep(time) {
26 | return new Promise((resolve) => setTimeout(resolve, time));
27 | };
28 |
29 | module.exports = {
30 | isDefined,
31 | sleep
32 | }
--------------------------------------------------------------------------------
/cloudfunctions/reg_cloud/framework/client/ccmini_controller.js:
--------------------------------------------------------------------------------
1 | // +----------------------------------------------------------------------
2 | // | CCMiniCloud [ Cloud Framework ]
3 | // +----------------------------------------------------------------------
4 | // | Copyright (c) 2021 www.code942.com All rights reserved.
5 | // +----------------------------------------------------------------------
6 | // | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
7 | // +----------------------------------------------------------------------
8 | // | Author: 明章科技
9 | // +----------------------------------------------------------------------
10 |
11 | /**
12 | * Notes: 基础控制器
13 | * Ver : CCMiniCloud Framework 2.0.1 ALL RIGHTS RESERVED BY www.code942.com
14 | * Date: 2025-09-05 04:00:00
15 | * Version : CCMiniCloud Framework Ver 2.0.1 ALL RIGHTS RESERVED BY 明章科技
16 | */
17 | class CCMiniController {
18 |
19 | constructor(miniOpenId, request, router, token) {
20 | this._miniOpenId = miniOpenId;
21 | this._request = request;
22 | this._router = router;
23 | this._token = token;
24 | }
25 | }
26 |
27 | module.exports = CCMiniController;
--------------------------------------------------------------------------------
/cloudfunctions/reg_cloud/framework/cloud/ccmini_cloud_base.js:
--------------------------------------------------------------------------------
1 | // +----------------------------------------------------------------------
2 | // | CCMiniCloud [ Cloud Framework ]
3 | // +----------------------------------------------------------------------
4 | // | Copyright (c) 2021 www.code942.com All rights reserved.
5 | // +----------------------------------------------------------------------
6 | // | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
7 | // +----------------------------------------------------------------------
8 | // | Author: 明章科技
9 | // +----------------------------------------------------------------------
10 |
11 | /**
12 | * Notes: 云初始化实例
13 | * Ver : CCMiniCloud Framework 2.0.1 ALL RIGHTS RESERVED BY www.code942.com
14 | * Date: 2025-09-05 04:00:00
15 | * Version : CCMiniCloud Framework Ver 2.0.1 ALL RIGHTS RESERVED BY 明章科技
16 | */
17 |
18 | const ccminiConfig = require('../../comm/ccmini_config.js');
19 |
20 | function getCloud() {
21 | const cloud = require('wx-server-sdk');
22 | cloud.init({
23 | env: cloud.DYNAMIC_CURRENT_ENV
24 | });
25 | return cloud;
26 | }
27 |
28 | module.exports = {
29 | getCloud
30 | }
--------------------------------------------------------------------------------
/miniprogram/reg/pages/register/reg_step1.js:
--------------------------------------------------------------------------------
1 | const ccminiPageHelper = require('../../helper/ccmini_page_helper.js');
2 | const RegBiz = require('../../biz/reg_biz.js');
3 | const PassportBiz = require('../../biz/passport_biz.js');
4 | const ccminiHelper = require('../../helper/ccmini_helper.js');
5 |
6 |
7 | Page({
8 |
9 | /**
10 | * 页面的初始数据
11 | */
12 | data: {
13 |
14 | },
15 |
16 | /**
17 | * 生命周期函数--监听页面加载
18 | */
19 | onLoad: async function (options) {
20 | await PassportBiz.initPage(this);
21 |
22 | PassportBiz.clearToken();
23 | if (await PassportBiz.isRegister(this)) return;
24 |
25 | },
26 |
27 | /**
28 | * 生命周期函数--监听页面初次渲染完成
29 | */
30 | onReady: function () {
31 |
32 | },
33 |
34 | /**
35 | * 生命周期函数--监听页面显示
36 | */
37 | onShow: function () {
38 |
39 | },
40 |
41 | /**
42 | * 生命周期函数--监听页面隐藏
43 | */
44 | onHide: function () {
45 |
46 | },
47 |
48 | /**
49 | * 生命周期函数--监听页面卸载
50 | */
51 | onUnload: function () {},
52 |
53 | bindGetPhoneNumber: async function (e) {
54 | await RegBiz.registerStep1(e);
55 | },
56 |
57 | url: function (e) {
58 | ccminiPageHelper.url(e, this);
59 | }
60 |
61 | })
--------------------------------------------------------------------------------
/miniprogram/reg/biz/search_biz.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Notes: 搜索模块业务逻辑
3 | * Ver : CCMiniCloud Framework 2.0.1 ALL RIGHTS RESERVED BY www.code942.com
4 | * Date: 2025-11-14 07:48:00
5 | */
6 |
7 | const BaseCCMiniBiz = require('./base_ccmini_biz.js');
8 | const ccminiCacheHelper = require('../helper/ccmini_cache_helper.js');
9 |
10 | /**
11 | *
12 | */
13 | class SearchBiz extends BaseCCMiniBiz {
14 |
15 | static clearHistory(key){
16 | ccminiCacheHelper.remove(key);
17 | }
18 |
19 | static getHistory(key)
20 | {
21 | return ccminiCacheHelper.get(key, []);
22 |
23 | }
24 |
25 | /**添加关键字缓存
26 | */
27 | static addHistory(key, val, size = 20, expire = 86400 * 30) {
28 | if (!val || val.length == 0) return [];
29 |
30 | let his = ccminiCacheHelper.get(key, []);
31 |
32 | //查询是否存在 并删除
33 | let pos = his.indexOf(val);
34 | if (pos > -1) his.splice(pos, 1);
35 |
36 | // 加到头部
37 | his.unshift(val);
38 |
39 | // 判断个数, 多的删除
40 | if (his.length > size)
41 | his.splice(his.length - 1, 1);
42 |
43 | // 存缓存
44 | ccminiCacheHelper.set(key, his, expire);
45 |
46 | return his;
47 | }
48 |
49 | }
50 |
51 | module.exports = SearchBiz;
--------------------------------------------------------------------------------
/miniprogram/reg/pages/news/news_detail.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 | {{news.NEWS_TITLE}}
10 | {{news.NEWS_ADD_TIME}}
11 |
12 |
13 | {{news.NEWS_CONTENT}}
14 |
15 |
16 |
17 |
18 |
19 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
--------------------------------------------------------------------------------
/miniprogram/reg/pages/register/reg_step2.js:
--------------------------------------------------------------------------------
1 | const RegBiz = require('../../biz/reg_biz.js');
2 | const PassportBiz = require('../../biz/passport_biz.js');
3 | const ccminiPageHelper = require('../../helper/ccmini_page_helper.js');
4 |
5 | Page({
6 |
7 | /**
8 | * 页面的初始数据
9 | */
10 | data: {
11 |
12 | },
13 |
14 | /**
15 | * 生命周期函数--监听页面加载
16 | */
17 | onLoad: async function (options) {
18 | await PassportBiz.initPage(this);
19 |
20 | if (await PassportBiz.isRegister(this)) return;
21 |
22 | // 判断是否有phone认证
23 | if (!RegBiz.isStep1())
24 | return ccminiPageHelper.goto('reg_step1' , 'back');
25 | },
26 |
27 | /**
28 | * 生命周期函数--监听页面初次渲染完成
29 | */
30 | onReady: function () {
31 |
32 | },
33 |
34 | /**
35 | * 生命周期函数--监听页面显示
36 | */
37 | onShow: function () {
38 |
39 | },
40 |
41 | /**
42 | * 生命周期函数--监听页面隐藏
43 | */
44 | onHide: function () {
45 |
46 | },
47 |
48 | /**
49 | * 生命周期函数--监听页面卸载
50 | */
51 | onUnload: function () {
52 |
53 | },
54 |
55 | getUserProfile: async function (e) {
56 | await RegBiz.registerStep2(e);
57 | },
58 |
59 | url: function (e) {
60 | ccminiPageHelper.url(e, this);
61 | }
62 |
63 | })
--------------------------------------------------------------------------------
/cloudfunctions/reg_cloud/framework/handler/ccmini_app_error.js:
--------------------------------------------------------------------------------
1 | // +----------------------------------------------------------------------
2 | // | CCMiniCloud [ Cloud Framework ]
3 | // +----------------------------------------------------------------------
4 | // | Copyright (c) 2021 www.code942.com All rights reserved.
5 | // +----------------------------------------------------------------------
6 | // | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
7 | // +----------------------------------------------------------------------
8 | // | Author: 明章科技
9 | // +----------------------------------------------------------------------
10 |
11 | /**
12 | * Notes: 应用异常处理类
13 | * Ver : CCMiniCloud Framework 2.0.1 ALL RIGHTS RESERVED BY www.code942.com
14 | * Date: 2025-09-05 04:00:00
15 | * Version : CCMiniCloud Framework Ver 2.0.1 ALL RIGHTS RESERVED BY 明章科技
16 | */
17 |
18 |
19 | const ccminiAppCode = require('./ccmini_app_code.js');
20 |
21 | class CCMiniAppError extends Error {
22 | constructor(message, code = ccminiAppCode.LOGIC) {
23 | super(message);
24 | this.name = 'CCMiniAppError';
25 | this.code = code;
26 | }
27 | }
28 |
29 | module.exports = CCMiniAppError;
--------------------------------------------------------------------------------
/miniprogram/reg/pages/register/reg_step1.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | 1
6 | 手机验证
7 |
8 |
9 | 2
10 | 微信授权
11 |
12 |
13 | 3
14 | 提交资料
15 |
16 |
17 |
18 | 登记需要验证手机号码 (号码仅做验证,不公开)
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
--------------------------------------------------------------------------------
/miniprogram/reg/pages/search/search.wxss:
--------------------------------------------------------------------------------
1 | @import "../../style/skin.wxss";
2 | .main-search{
3 | box-sizing: border-box;
4 | width:100%;
5 | height: 100vh;
6 | display: flex;
7 | padding:0;
8 | flex-direction: column;
9 | justify-content: center;
10 | align-items: center;
11 | }
12 |
13 | .main-search .search{
14 | width:100%;
15 | }
16 |
17 | .main-search .his{
18 | flex:1;
19 | margin-top:2rpx;
20 | width:100%;
21 | background-color: #fff;
22 | display: flex;
23 | flex-direction: column;
24 | padding:30rpx;
25 | }
26 |
27 | .main-search .his .title{
28 | width:100%;
29 | display: flex;
30 | align-items: center;
31 | justify-content: flex-start;
32 | }
33 |
34 | .main-search .his .title .tit{
35 | font-size:34rpx;
36 | font-weight:bold;
37 | flex:1;
38 | }
39 |
40 | .main-search .his .title .del{
41 | font-size:32rpx;
42 | color:#aaa;
43 | margin-left: auto;
44 | }
45 |
46 | .main-search .his .search-content{
47 | width:100%;
48 | display: flex;
49 | align-items: center;
50 | flex-wrap: wrap;
51 | margin-top:40rpx;
52 | }
53 |
54 | .main-search .his .search-content .btn{
55 | margin-right:30rpx;
56 | margin-top:30rpx;
57 | font-size:28rpx;
58 | padding: 35rpx 45rpx;
59 | background-color: #f2f2f2;
60 | }
--------------------------------------------------------------------------------
/miniprogram/reg/pages/about/about.wxss:
--------------------------------------------------------------------------------
1 | @import "../../style/skin.wxss";
2 |
3 | .main-about{
4 | padding:40rpx;
5 | height:100vh;
6 | display: flex;
7 | flex-direction: column;
8 | justify-content: flex-start;
9 | }
10 |
11 | .main-about .main-content{
12 | width:100%;
13 | flex: 1;
14 | }
15 |
16 | .main-about .content{
17 | width:100%;
18 | background-color: #fff;
19 | padding:50rpx;
20 | border-radius: 20rpx;
21 | margin-top:15rpx;
22 | }
23 |
24 | .main-about .content .title{
25 | width:100%;
26 | text-align: center;
27 | font-size:36rpx;
28 | line-height: 1.8;
29 | margin-bottom: 30rpx;
30 | }
31 |
32 | .main-about .content .txt{
33 | color:#666;
34 | margin-bottom: 30rpx;
35 | font-size:28rpx;
36 | line-height: 1.6;
37 | }
38 |
39 | .main-about .content.content-err{
40 | padding-top:120rpx;
41 | padding-bottom:120rpx;
42 | }
43 |
44 | .main-about .content .err-icon{
45 | text-align: center;
46 | font-size: 150rpx;
47 | }
48 |
49 | .main-about .content .err-info{
50 | text-align: center;
51 | font-size: 30rpx;
52 | color:#666;
53 | }
54 |
55 | .main-about .content .err-apply{
56 | display: flex;
57 | justify-content: center;
58 | align-items: center;
59 | margin-top:60rpx;
60 | }
61 |
62 | .main-about .comm-list{
63 | width:100%;
64 | }
65 |
--------------------------------------------------------------------------------
/miniprogram/reg/style/skin.wxss:
--------------------------------------------------------------------------------
1 | @import "comm/comm.wxss";
2 | @import "project/project.wxss";
3 |
4 | .color-skin1 {
5 | color: #AE0B2A !important;
6 | }
7 |
8 | .bg-skin1,
9 | .after-skin1:after {
10 | background-color: #AE0B2A !important;
11 | color: #fff !important;
12 | }
13 |
14 | .border-skin1 {
15 | border-color: #AE0B2A !important;
16 | }
17 |
18 |
19 |
20 | /*非分包菜单*/
21 | .tab-bar {
22 | position: fixed;
23 | bottom: 0;
24 | left: 0;
25 | right: 0;
26 | height: 48px;
27 | background: #fefefe;
28 | display: flex;
29 | padding-bottom: env(safe-area-inset-bottom);
30 | z-index: 99999;
31 | }
32 |
33 | .tab-bar-border {
34 | background-color: rgba(0, 0, 0, 0.33);
35 | position: absolute;
36 | left: 0;
37 | top: 0;
38 | width: 100%;
39 | height: 1px;
40 | transform: scaleY(0.5);
41 | }
42 |
43 | .tab-bar-item {
44 | flex: 1;
45 | text-align: center;
46 | display: flex;
47 | justify-content: flex-start;
48 | align-items: center;
49 | flex-direction: column;
50 | position: relative;
51 | padding-top: 10rpx;
52 | }
53 |
54 | .tab-bar-item .tab-icon {
55 | width: 48rpx;
56 | height: 48rpx;
57 | margin-bottom: 2rpx;
58 | }
59 |
60 | .tab-bar-item .tab-text {
61 | font-size: 24rpx!important;
62 | color: #999;
63 | }
64 |
65 | .tab-bar-item .tab-text-cur {
66 | color: #AE0B2A;
67 | }
--------------------------------------------------------------------------------
/miniprogram/reg/pages/admin/index/admin_home.wxss:
--------------------------------------------------------------------------------
1 | @import "../../../style/skin.wxss";
2 | .main {
3 | width: 100%;
4 | padding: 0;
5 | display: flex;
6 | flex-direction: column;
7 | justify-content: flex-start;
8 | align-items: flex-start;
9 | box-sizing: border-box;
10 | }
11 |
12 | .main .admin-detail {
13 | background-color: #0E9489;
14 | height:200rpx;
15 | width:100%;
16 | color:#fff;
17 | display: flex;
18 | justify-content: flex-start;
19 | align-items: center;
20 | }
21 |
22 | .main .admin-detail .avatar-open {
23 | width: 100rpx;
24 | height: 100rpx;
25 | clip-path: circle(50rpx at center);
26 | margin: 0 20rpx;
27 | }
28 |
29 | .main .admin-detail .detail-right {
30 | flex:1;
31 | display: flex;
32 | flex-direction: column;
33 | }
34 |
35 | .main .admin-detail .detail-right .name {
36 | font-size:32rpx;
37 | line-height: 1.8;
38 | }
39 |
40 | .main .admin-detail .detail-right .extends {
41 | font-size:24rpx;
42 | line-height: 1.3;
43 | }
44 | .main .comm-list,.main .bar {
45 | background-color: #fff;
46 | width:100%;
47 | }
48 |
49 | .main .exit{
50 | width:100%;
51 | padding:0 20rpx;
52 | margin-bottom:50rpx;
53 | }
54 |
55 | .main .exit button{
56 | width:100%;
57 | background-color: #0E9489;
58 | color:#fff;
59 | height:70rpx;
60 | }
61 |
62 | .grid.col-6>view {
63 | width: 16.66%;
64 | }
65 |
66 | .ver-text{
67 | font-size:24rpx;
68 | }
--------------------------------------------------------------------------------
/miniprogram/reg/pages/index/index_home.js:
--------------------------------------------------------------------------------
1 | const ccminiPageHelper = require('../../helper/ccmini_page_helper.js');
2 | const PassportBiz = require('../../biz/passport_biz.js');
3 | const CCMINI_SETTING = require('../../helper/ccmini_setting.js');
4 |
5 | Page({
6 |
7 | /**
8 | * 页面的初始数据
9 | */
10 | data: {
11 | },
12 |
13 | /**
14 | * 生命周期函数--监听页面加载
15 | */
16 | onLoad: async function (options) {
17 | PassportBiz.initApp();
18 | await PassportBiz.initPage(this);
19 | },
20 |
21 | /**
22 | * 生命周期函数--监听页面初次渲染完成
23 | */
24 | onReady: function () {
25 |
26 | },
27 |
28 | /**
29 | * 生命周期函数--监听页面显示
30 | */
31 | onShow: async function () {
32 | await PassportBiz.setSetup(this);
33 |
34 | wx.setNavigationBarTitle({
35 | title: this.data.setup.SETUP_TITLE
36 | });
37 |
38 | },
39 |
40 | /**
41 | * 生命周期函数--监听页面隐藏
42 | */
43 | onHide: function () {
44 |
45 | },
46 |
47 | /**
48 | * 生命周期函数--监听页面卸载
49 | */
50 | onUnload: function () {
51 |
52 | },
53 |
54 |
55 | /**
56 | * 用户点击右上角分享
57 | */
58 | onShareAppMessage: function () {
59 | return {
60 | title: PassportBiz.getUserName() + '向您推荐' + this.data.setup.SETUP_TITLE,
61 | path: '/' + CCMINI_SETTING.PROJECT_MARK + '/pages/index/index_home',
62 | }
63 | },
64 |
65 |
66 |
67 | url: function (e) {
68 | try {
69 | ccminiPageHelper.url(e, this);
70 | }
71 | catch(err) {
72 |
73 | }
74 | }
75 | })
--------------------------------------------------------------------------------
/miniprogram/reg/style/comm/avatar.wxss:
--------------------------------------------------------------------------------
1 |
2 | /* ==================
3 | 头像
4 | ==================== */
5 | .avatar {
6 | font-variant: small-caps;
7 | margin: 0;
8 | padding: 0;
9 | display: inline-flex;
10 | text-align: center;
11 | justify-content: center;
12 | align-items: center;
13 | color: var(--white);
14 | white-space: nowrap;
15 | position: relative;
16 | width: 64rpx;
17 | height: 64rpx;
18 | background-size: cover;
19 | background-position: center;
20 | vertical-align: middle;
21 | font-size: 1.5em;
22 | }
23 |
24 | .avatar:not([class*="bg-"]) {
25 | background-color: #ccc;
26 | }
27 |
28 | .avatar.xs {
29 | width: 32rpx;
30 | height: 32rpx;
31 | font-size: 1em;
32 | }
33 |
34 | .avatar.small {
35 | width: 48rpx;
36 | height: 48rpx;
37 | font-size: 1em;
38 | }
39 |
40 | .avatar.large {
41 | width: 96rpx;
42 | height: 96rpx;
43 | font-size: 2em;
44 | }
45 |
46 | .avatar.xl {
47 | width: 128rpx;
48 | height: 128rpx;
49 | font-size: 2.5em;
50 | }
51 |
52 | .avatar .avatar-text {
53 | font-size: 0.4em;
54 | }
55 |
56 | .avatar-group {
57 | direction: rtl;
58 | unicode-bidi: bidi-override;
59 | padding: 0 10rpx 0 40rpx;
60 | display: inline-block;
61 | }
62 |
63 | .avatar-group .avatar {
64 | margin-left: -30rpx;
65 | border: 4rpx solid var(--ghostWhite);
66 | vertical-align: middle;
67 | }
68 |
69 | .avatar-group .avatar.small {
70 | margin-left: -20rpx;
71 | border: 1rpx solid var(--ghostWhite);
72 | }
73 |
--------------------------------------------------------------------------------
/cloudfunctions/reg_cloud/model/setup_model.js:
--------------------------------------------------------------------------------
1 | // +----------------------------------------------------------------------
2 | // | CCMiniCloud [ Cloud Framework ]
3 | // +----------------------------------------------------------------------
4 | // | Copyright (c) 2021 www.code942.com All rights reserved.
5 | // +----------------------------------------------------------------------
6 | // | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
7 | // +----------------------------------------------------------------------
8 | // | Author: 明章科技
9 | // +----------------------------------------------------------------------
10 |
11 | /**
12 | * Notes: 系统设置实体
13 | * Ver : CCMiniCloud Framework 2.0.1 ALL RIGHTS RESERVED BY www.code942.com
14 | * Date: 2025-11-05 19:20:00
15 | * Version : CCMiniCloud Framework Ver 2.0.1 ALL RIGHTS RESERVED BY 明章科技
16 | */
17 |
18 |
19 | const BaseCCMiniModel = require('./base_ccmini_model.js');
20 |
21 | class SetupModel extends BaseCCMiniModel {
22 |
23 | }
24 |
25 | // 集合名
26 | SetupModel.CL = "setup";
27 |
28 | SetupModel.CCMINI_DB_STRUCTURE = {
29 | SETUP_ID: 'string|true',
30 |
31 | SETUP_TITLE: 'string|false|comment=网站名称',
32 | SETUP_ABOUT: 'string|false|comment=',
33 |
34 | SETUP_REG_CHECK : 'int|true|default=0|comment=',
35 |
36 | SETUP_ADD_TIME: 'int|true',
37 | SETUP_EDIT_TIME: 'int|true',
38 | SETUP_ADD_IP: 'string|false',
39 | SETUP_EDIT_IP: 'string|false',
40 | };
41 |
42 | // 字段前缀
43 | SetupModel.CCMINI_FIELD_PREFIX = "SETUP_";
44 |
45 |
46 |
47 |
48 |
49 |
50 | module.exports = SetupModel;
--------------------------------------------------------------------------------
/miniprogram/reg/pages/admin/index/admin_login.wxss:
--------------------------------------------------------------------------------
1 | @import "../../../style/skin.wxss";
2 |
3 | .main {
4 | width: 100%;
5 | height: 100vh;
6 | background-color: #0E9489;
7 | display: flex;
8 | flex-direction: column;
9 | justify-content: flex-start;
10 | }
11 |
12 | .main .login {
13 | margin-top: 150rpx;
14 | display: flex;
15 | flex-direction: column;
16 | justify-content: flex-start;
17 | align-items: center;
18 | flex: 1;
19 | }
20 |
21 | .main .login .kuang {
22 | width: 600rpx;
23 | background-color: #fff;
24 | height: 750rpx;
25 | margin-top: 0rpx;
26 | border-radius: 20rpx;
27 | display: flex;
28 | flex-direction: column;
29 | justify-content: space-between;
30 | align-items: center;
31 | padding: 50rpx 20rpx;
32 | }
33 |
34 | .main .login .kuang button {
35 | width: 85%;
36 | background-color: #0E9489;
37 | color: #fff;
38 | font-size:32rpx;
39 | }
40 |
41 | .main .login .kuang .hint {
42 | width: 100%;
43 | color: #aaa;
44 | font-size:30rpx;
45 | text-align: center;
46 | }
47 |
48 | .main .login .kuang .return {
49 | width: 100%;
50 | color: #0E9489;
51 | font-size:30rpx;
52 | text-align: center;
53 | font-size:26rpx;
54 | }
55 |
56 | .main .avatar-open {
57 | width: 180rpx;
58 | height: 180rpx;
59 | clip-path: circle(90rpx at center);
60 | }
61 |
62 | .main .bottom {
63 | width: 100%;
64 | align-self: flex-end;
65 | font-size: 26rpx;
66 | height: 70rpx;
67 | text-align: center;
68 | color: #fff;
69 | display: flex;
70 | flex-direction: column;
71 | }
72 |
73 | .form-group .title {
74 | font-weight: normal;
75 | }
--------------------------------------------------------------------------------
/miniprogram/reg/pages/index/index_home.wxss:
--------------------------------------------------------------------------------
1 | @import "../../style/skin.wxss";
2 | @import "../../style/project/article_list.wxss";
3 |
4 | page {
5 | background-color: #EFEFEF;
6 | }
7 |
8 | .main-home {
9 | background-color: #EFEFEF;
10 | display: flex;
11 | flex-direction: column;
12 | align-items: center;
13 | width: 100%;
14 | box-sizing: border-box;
15 | padding: 0;
16 | }
17 |
18 | .top-pic {
19 | height: 500rpx;
20 | background-color: #AE0B2A;
21 | width: 100%;
22 | display: flex;
23 | justify-content: center;
24 | }
25 |
26 | .top-pic image {
27 | width: 780rpx;
28 | height: 500rpx;
29 | }
30 |
31 | .bottom-area {
32 | margin-top: -100rpx;
33 | height: 1100rpx;
34 | width: 100%;
35 | background-color: #EFEFEF;
36 | border-radius: 100rpx 100rpx 0 0;
37 | display: flex;
38 | justify-content: center;
39 | z-index: 999;
40 | }
41 |
42 | .core-menu {
43 | margin-top: 80rpx;
44 | height: 580rpx;
45 | display: flex;
46 | justify-content: center;
47 | flex-wrap: wrap;
48 | }
49 |
50 | .core-menu-item {
51 | width: 250rpx;
52 | height: 250rpx !important;
53 | background-color: #fff;
54 | border-radius: 50rpx;
55 | display: flex;
56 | flex-direction: column;
57 | align-items: center;
58 | box-shadow: 8px 8px 14px #ddd;
59 | margin: 25rpx;
60 | }
61 |
62 | .core-menu-item image {
63 | width: 130rpx;
64 | height: 130rpx;
65 | margin-top: 15rpx;
66 | }
67 |
68 | .core-menu-item .item-name {
69 | font-size: 30rpx;
70 | color: #000;
71 | }
72 |
73 | .core-menu-item .item-desc {
74 | margin-top: 8rpx;
75 | font-size: 24rpx;
76 | color: #999;
77 | }
--------------------------------------------------------------------------------
/miniprogram/reg/biz/admin_news_biz.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Notes: 公告通知后台管理模块业务逻辑
3 | * Ver : CCMiniCloud Framework 2.0.1 ALL RIGHTS RESERVED BY www.code942.com
4 | * Date: 2025-11-14 07:48:00
5 | */
6 |
7 | const ccminiCloudHelper = require('../helper/ccmini_cloud_helper.js');
8 | const BaseCCMiniBiz = require('./base_ccmini_biz.js');
9 | const CCMINI_SETTING = require('../helper/ccmini_setting.js');
10 | const NewsBiz = require('./news_biz.js');
11 |
12 | class AdminNewsBiz {
13 |
14 | static async initFormData(id = '') {
15 |
16 | return {
17 | id,
18 |
19 |
20 | // 图片数据
21 | imgMax: CCMINI_SETTING.NEWS_MAX_PIC,
22 | imgList: [],
23 |
24 | cateOptions: AdminNewsBiz.CATE_OPTIONS,
25 |
26 | // 表单数据
27 | formCate:'',
28 | formTitle: '',
29 | formContent: '',
30 | }
31 |
32 | }
33 |
34 | static async updateNewsPic(newsId, imgList) {
35 |
36 | imgList = await ccminiCloudHelper.transTempPics(imgList, CCMINI_SETTING.NEWS_PIC_DIR, newsId);
37 |
38 | let params = {
39 | newsId: newsId,
40 | imgList: imgList
41 | }
42 |
43 | try {
44 | let res = await ccminiCloudHelper.callCloudSumbit('admin/news_update_pic', params);
45 | return res.data.urls;
46 | } catch (e) {}
47 | }
48 |
49 | }
50 |
51 |
52 | AdminNewsBiz.CHECK_FORM = {
53 | title: 'formTitle|required|string|min:5|max:50|name=公告通知标题',
54 | cate: 'formCate|required|string|min:1|max:15|name=公告通知分类',
55 | content: 'formContent|required|string|min:10|max:50000|name=详细描述'
56 | };
57 |
58 | AdminNewsBiz.CATE_OPTIONS = BaseCCMiniBiz.options(CCMINI_SETTING.PROJECT_NEWS_CATE);
59 |
60 | module.exports = AdminNewsBiz;
--------------------------------------------------------------------------------
/miniprogram/reg/helper/ccmini_setting.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Notes: 配置文件
3 | * Ver : CCMiniCloud Framework 2.0.1 ALL RIGHTS RESERVED BY www.code942.com
4 | * Date: 2025-07-14 07:48:00
5 | */
6 | module.exports = {
7 | PROJECT_MARK: 'reg',
8 | PROJECT_COLOR: '#AE0B2A',
9 | PROJECT_SWITCH: ['index_home', 'user_index', 'my_index', 'news_index', 'reg_step1'],
10 | PROJECT_IS_SUB: false, // 分包
11 | PROJECT_NAME: '校友登记系统',
12 | PROJECT_VER: 'CCReg-Client(V1.0 Build20210828)', //升级必须,请勿修改
13 | PROJECT_NEWS_CATE: '公告通知',
14 |
15 | TEST_MODE: false,
16 |
17 | TEST_OPEN_PAGES: true,
18 |
19 | TEST_USER_ID: 'oYyk-minzonetech',
20 | TEST_TOKEN: {
21 | id: 'minzonetech',
22 | name: '明章科技',
23 | pic: '',
24 | status: 1,
25 | type: 1
26 | },
27 |
28 |
29 | IMG_UPLOAD_SIZE: 4, //图片上传大小M兆
30 |
31 | PASSPORT_TOKEN_EXPIRE: 86400,
32 |
33 | ADMIN_TOKEN_EXPIRE: 3600 * 2,
34 |
35 | CACHE_IS_LIST: true,
36 | CACHE_LIST_TIME: 60 * 30,
37 |
38 | USER_PIC_DIR: 'client/user/pic/', //用户头像图片目录
39 |
40 | INFO_PIC_DIR: 'client/info/pic/', //互助图片目录
41 | INFO_MAX_EXPIRE: 86400 * 60, //互助有效期 秒
42 | INFO_DEFAULT_REGION: ['广东省', '广州市', '越秀区'], //默认区域
43 | INFO_MAX_PIC: 8, //互助图片上限
44 |
45 | MEET_PIC_DIR: 'client/info/pic/', //活动图片目录
46 | MEET_DEFAULT_REGION: ['广东省', '广州市', '越秀区'], //默认区域
47 | MEET_MAX_PIC: 8, //活动图片上限
48 |
49 | ALBUM_PIC_DIR: 'client/album/pic/', //活动图片目录
50 | ALBUM_MAX_PIC: 8, //活动图片上限
51 |
52 | NEWS_PIC_DIR: 'client/news/pic/', //公告通知图片目录
53 | NEWS_MAX_PIC: 8, //公告通知图片上限
54 |
55 | CACHE_SETUP: 3600 * 1,
56 |
57 | }
--------------------------------------------------------------------------------
/miniprogram/reg/pages/news/news_index.js:
--------------------------------------------------------------------------------
1 | const NewsBiz = require('../../biz/news_biz.js');
2 | const ccminiPageHelper = require('../../helper/ccmini_page_helper.js');
3 | const PassportBiz = require('../../biz/passport_biz.js');
4 | const AdminNewsBiz = require('../../biz/admin_news_biz.js');
5 |
6 | Page({
7 |
8 | /**
9 | * 页面的初始数据
10 | */
11 | data: {
12 |
13 | },
14 |
15 | /**
16 | * 生命周期函数--监听页面加载
17 | */
18 | onLoad: async function (options) {
19 |
20 | await PassportBiz.initPage(this);
21 |
22 | //设置搜索菜单
23 | this.setData(await NewsBiz.getSearchMenu());
24 | },
25 |
26 | /**
27 | * 生命周期函数--监听页面初次渲染完成
28 | */
29 | onReady: function () {},
30 |
31 | /**
32 | * 生命周期函数--监听页面显示
33 | */
34 | onShow: async function () {
35 | PassportBiz.loginSilence(this);
36 |
37 | // 获取当前小程序的页面栈
38 | let pages = getCurrentPages();
39 | // 数组中索引最大的页面--当前页面
40 | let currentPage = pages[pages.length - 1];
41 | // 附加参数
42 |
43 | if (currentPage.options && currentPage.options.cate) {
44 | let cate = AdminNewsBiz.CATE_OPTIONS[currentPage.options.cate];
45 | wx.setNavigationBarTitle({
46 | title: cate
47 | });
48 | this.setData({
49 | _params: {
50 | cate
51 | }
52 | });
53 | }
54 |
55 | },
56 |
57 | /**
58 | * 生命周期函数--监听页面隐藏
59 | */
60 | onHide: function () {
61 |
62 | },
63 |
64 | /**
65 | * 生命周期函数--监听页面卸载
66 | */
67 | onUnload: function () {
68 |
69 | },
70 |
71 | url: async function (e) {
72 | ccminiPageHelper.url(e);
73 | },
74 |
75 | myCommListListener: function (e) {
76 | ccminiPageHelper.commListListener(this, e);
77 | },
78 |
79 | })
--------------------------------------------------------------------------------
/miniprogram/reg/pages/admin/setup/admin_setup.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
47 |
--------------------------------------------------------------------------------
/miniprogram/reg/style/project/user_list.wxss:
--------------------------------------------------------------------------------
1 | .user-list {
2 | width: 100%;
3 | box-sizing: border-box;
4 | padding: 30rpx 30rpx 30rpx 30rpx;
5 | display: flex;
6 | flex-direction: column;
7 | justify-content: center;
8 | }
9 |
10 | .user-list .item {
11 | border-radius: 20rpx;
12 | background-color: #fff;
13 | display: flex;
14 | justify-content: center;
15 | padding: 20rpx;
16 | margin-bottom: 24rpx;
17 | position: relative;
18 | }
19 |
20 | .user-list .item .pic {
21 | width: 140rpx;
22 | }
23 |
24 | .user-list .item .detail {
25 | flex: 1;
26 | box-sizing: border-box;
27 | width: 400rpx;
28 | display: flex;
29 | flex-direction: column;
30 | }
31 |
32 | .user-list .item .detail .name {
33 | font-size: 24rpx;
34 | margin-bottom: 10rpx;
35 | z-index: 999;
36 | }
37 |
38 | .user-list .item .detail .name .yname{
39 | font-size: 32rpx;
40 | font-weight: bold;
41 | margin-right:10rpx;
42 | }
43 |
44 | .user-list .item .detail .name text {
45 | font-size: 24rpx;
46 | font-weight: normal;
47 | }
48 |
49 | .user-list .item .line {
50 | margin:0 6rpx;
51 | color: #ddd;
52 | }
53 |
54 | .user-list .item .detail .desc {
55 | line-height: 1.7;
56 | font-size: 24rpx;
57 | color: #666;
58 | }
59 |
60 | .user-list .item .detail .desc.last {
61 | line-height: 1.7;
62 | font-size: 24rpx;
63 | color: #aaa;
64 | }
65 |
66 | .user-list .item .mark {
67 | position: absolute;
68 | top: 0;
69 | right: 0;
70 | height: 52rpx;
71 | width: 112rpx;
72 | color: white;
73 | background-color: #CECECE;
74 | line-height: 52rpx;
75 | font-size: 24rpx;
76 | text-align: center;
77 | border-radius: 0 20rpx 0 20rpx;
78 | }
--------------------------------------------------------------------------------
/miniprogram/reg/pages/admin/user/admin_user_detail.js:
--------------------------------------------------------------------------------
1 | const ccminiPageHelper = require('../../../helper/ccmini_page_helper.js');
2 | const ccminiCloudHelper = require('../../../helper/ccmini_cloud_helper.js');
3 | const AdminBiz = require('../../../biz/admin_biz.js');
4 |
5 | Page({
6 |
7 | /**
8 | * 页面的初始数据
9 | */
10 | data: {},
11 |
12 | /**
13 | * 生命周期函数--监听页面加载
14 | */
15 | onLoad: async function (options) {
16 | if (!AdminBiz.isAdmin(this)) return;
17 |
18 | if (!ccminiPageHelper.getId(this, options)) return;
19 |
20 | this._loadDetail();
21 |
22 | },
23 |
24 | /**
25 | * 生命周期函数--监听页面初次渲染完成
26 | */
27 | onReady: function () {
28 |
29 | },
30 |
31 | /**
32 | * 生命周期函数--监听页面显示
33 | */
34 | onShow: function () {
35 |
36 | },
37 |
38 | /**
39 | * 生命周期函数--监听页面隐藏
40 | */
41 | onHide: function () {
42 |
43 | },
44 |
45 | /**
46 | * 生命周期函数--监听页面卸载
47 | */
48 | onUnload: function () {
49 |
50 | },
51 |
52 | /**
53 | * 页面相关事件处理函数--监听用户下拉动作
54 | */
55 | onPullDownRefresh: async function () {
56 | await this._loadDetail();
57 | wx.stopPullDownRefresh();
58 | },
59 |
60 | _loadDetail: async function () {
61 | let id = this.data.id;
62 | if (!id) return;
63 |
64 | let params = {
65 | id
66 | }
67 | let opts = {
68 | hint: false
69 | }
70 | let user = await ccminiCloudHelper.callCloudData('admin/user_detail', params, opts);
71 | if (!user) {
72 | this.setData({
73 | isLoad: null,
74 | })
75 | return;
76 | };
77 |
78 | this.setData({
79 | isLoad: true,
80 | user
81 | })
82 | },
83 |
84 | url: function (e) {
85 | ccminiPageHelper.url(e);
86 | }
87 |
88 | })
--------------------------------------------------------------------------------
/miniprogram/reg/pages/admin/news/admin_news_form_tpl.wxml:
--------------------------------------------------------------------------------
1 |
2 |
45 |
--------------------------------------------------------------------------------
/miniprogram/reg/ccmini-tpls/public/menu_tpl.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
--------------------------------------------------------------------------------
/miniprogram/reg/helper/ccmini_cache_helper.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Notes: 微信缓存二次封装,有设置时效性的封装
3 | * Ver : CCMiniCloud Framework 2.0.1 ALL RIGHTS RESERVED BY www.code942.com
4 | * Date: 2025-11-14 07:48:00
5 | */
6 |
7 | const TIME_SUFFIX = "_deadtime"
8 | const CCMINI_SETTING = require('./ccmini_setting.js');
9 |
10 | /**
11 | * 设置
12 | */
13 | function set(k, v, t = 86400 * 30) {
14 | if (!k) return null;
15 |
16 | k = k + '_p_' + CCMINI_SETTING.PROJECT_MARK;
17 |
18 | wx.setStorageSync(k, v);
19 | let seconds = parseInt(t);
20 | if (seconds > 0) {
21 | let newtime = Date.parse(new Date());
22 | newtime = newtime / 1000 + seconds;
23 | wx.setStorageSync(k + TIME_SUFFIX, newtime + "");
24 | } else {
25 | wx.removeStorageSync(k + TIME_SUFFIX);
26 | }
27 | }
28 |
29 |
30 | /**
31 | * 获取
32 | */
33 | function get(k, def = null) {
34 | if (!k) return null;
35 |
36 | k = k + '_p_' + CCMINI_SETTING.PROJECT_MARK;
37 |
38 | let deadtime = parseInt(wx.getStorageSync(k + TIME_SUFFIX));
39 |
40 | if (deadtime) {
41 | if (parseInt(deadtime) < Date.parse(new Date()) / 1000) {
42 | wx.removeStorageSync(k);
43 | wx.removeStorageSync(k + TIME_SUFFIX);
44 | return def;
45 | }
46 | }
47 |
48 | let res = wx.getStorageSync(k);
49 | if (res) {
50 | return res;
51 | } else {
52 | return def;
53 | }
54 | }
55 |
56 | /**
57 | * 删除
58 | */
59 | function remove(k) {
60 | if (!k) return null;
61 |
62 | k = k + '_p_' + CCMINI_SETTING.PROJECT_MARK;
63 |
64 | wx.removeStorageSync(k);
65 | wx.removeStorageSync(k + TIME_SUFFIX);
66 | }
67 |
68 | /**
69 | * 清除所有key
70 | */
71 | function clear() {
72 | wx.clearStorageSync();
73 | }
74 |
75 | module.exports = {
76 | set,
77 | get,
78 | remove,
79 | clear
80 | }
--------------------------------------------------------------------------------
/miniprogram/reg/pages/register/reg_step3.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | 手机验证
6 |
7 |
8 |
9 |
10 | 微信授权
11 |
12 |
13 | 3
14 | 提交资料
15 |
16 |
17 |
18 |
19 |
35 |
36 |
37 |
38 |
--------------------------------------------------------------------------------
/miniprogram/reg/pages/user/user_index.js:
--------------------------------------------------------------------------------
1 | const UserBiz = require('../../biz/user_biz.js');
2 | const ccminiPageHelper = require('../../helper/ccmini_page_helper.js');
3 | const PassportBiz = require('../../biz/passport_biz.js');
4 | const ccminiCacheHelper = require('../../helper/ccmini_cache_helper.js');
5 |
6 | const CACHE_SHOW_USER_TYPE = 'USER_SHOW_TYPE';
7 |
8 | Page({
9 |
10 | /**
11 | * 页面的初始数据
12 | */
13 | data: {
14 | showUserType: 1, //默认展示风格
15 | showUserTypeBtn: ['详细模式', '简明模式']
16 | },
17 |
18 | /**
19 | * 生命周期函数--监听页面加载
20 | */
21 | onLoad: async function (options) {
22 | await PassportBiz.initPage(this);
23 |
24 | //设置搜索菜单
25 | this.setData(UserBiz.getSearchMenu());
26 |
27 | let showUserType = ccminiCacheHelper.get(CACHE_SHOW_USER_TYPE);
28 | if (showUserType) {
29 | this.setData({
30 | showUserType
31 | });
32 | }
33 |
34 | this.setData({
35 | isLogin: true
36 | });
37 | },
38 |
39 | /**
40 | * 生命周期函数--监听页面初次渲染完成
41 | */
42 | onReady: function () {
43 |
44 | },
45 |
46 | /**
47 | * 生命周期函数--监听页面显示
48 | */
49 | onShow: async function () {
50 | PassportBiz.loginSilence(this);
51 | },
52 |
53 | /**
54 | * 生命周期函数--监听页面隐藏
55 | */
56 | onHide: function () {
57 |
58 | },
59 |
60 | /**
61 | * 生命周期函数--监听页面卸载
62 | */
63 | onUnload: function () {
64 |
65 | },
66 |
67 | url: async function (e) {
68 | ccminiPageHelper.url(e);
69 | },
70 |
71 | myCommListListener: function (e) {
72 | ccminiPageHelper.commListListener(this, e);
73 | },
74 |
75 | bindChangeTap: function () {
76 | let showUserType = (this.data.showUserType == 0) ? 1 : 0;
77 | ccminiCacheHelper.set(CACHE_SHOW_USER_TYPE, showUserType);
78 | this.setData({
79 | showUserType
80 | });
81 | }
82 |
83 | })
--------------------------------------------------------------------------------
/cloudfunctions/reg_cloud/controller/home_controller.js:
--------------------------------------------------------------------------------
1 | // +----------------------------------------------------------------------
2 | // | CCMiniCloud [ Cloud Framework ]
3 | // +----------------------------------------------------------------------
4 | // | Copyright (c) 2021 www.code942.com All rights reserved.
5 | // +----------------------------------------------------------------------
6 | // | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
7 | // +----------------------------------------------------------------------
8 | // | Author: 明章科技
9 | // +----------------------------------------------------------------------
10 |
11 | /**
12 | * Notes: 全局或者主页模块控制器
13 | * Ver : CCMiniCloud Framework 2.0.1 ALL RIGHTS RESERVED BY www.code942.com
14 | * Date: 2025-11-05 10:20:00
15 | * Version : CCMiniCloud Framework Ver 2.0.1 ALL RIGHTS RESERVED BY 明章科技
16 | */
17 |
18 | const BaseCCMiniController = require('./base_ccmini_controller.js');
19 | const HomeService = require('../service/home_service.js');
20 | const ccminiTimeUtil = require('../framework/utils/ccmini_time_util.js');
21 |
22 | class HomeController extends BaseCCMiniController {
23 |
24 |
25 |
26 | async getSetup() {
27 |
28 | // 数据校验
29 | let rules = {};
30 |
31 | // 取得数据
32 | let input = this.ccminiValidateData(rules);
33 |
34 | let service = new HomeService();
35 | let result = await service.getSetup();
36 |
37 | return result;
38 |
39 | }
40 |
41 | async getSetupAll() {
42 |
43 | // 数据校验
44 | let rules = {};
45 |
46 | // 取得数据
47 | let input = this.ccminiValidateData(rules);
48 |
49 | let service = new HomeService();
50 | let result = await service.getSetup('*');
51 |
52 | return result;
53 |
54 | }
55 |
56 | }
57 |
58 | module.exports = HomeController;
--------------------------------------------------------------------------------
/cloudfunctions/reg_cloud/model/admin_model.js:
--------------------------------------------------------------------------------
1 | // +----------------------------------------------------------------------
2 | // | CCMiniCloud [ Cloud Framework ]
3 | // +----------------------------------------------------------------------
4 | // | Copyright (c) 2021 www.code942.com All rights reserved.
5 | // +----------------------------------------------------------------------
6 | // | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
7 | // +----------------------------------------------------------------------
8 | // | Author: 明章科技
9 | // +----------------------------------------------------------------------
10 |
11 | /**
12 | * Notes: 系统管理员实体
13 | * Ver : CCMiniCloud Framework 2.0.1 ALL RIGHTS RESERVED BY www.code942.com
14 | * Date: 2025-10-16 19:20:00
15 | * Version : CCMiniCloud Framework Ver 2.0.1 ALL RIGHTS RESERVED BY 明章科技
16 | */
17 |
18 |
19 | const BaseModel = require('./base_ccmini_model.js');
20 |
21 | class AdminModel extends BaseModel {
22 |
23 | }
24 |
25 | // 集合名
26 | AdminModel.CL = "admin";
27 |
28 | AdminModel.CCMINI_DB_STRUCTURE = {
29 | ADMIN_ID: 'string|true',
30 | ADMIN_NAME: 'string|true',
31 | ADMIN_PHONE: 'string|true|comment=登录电话',
32 | ADMIN_STATUS: 'int|true|default=1|comment=状态:0=禁用 1=启用',
33 |
34 | ADMIN_LOGIN_CNT: 'int|true|default=0|comment=',
35 | ADMIN_LOGIN_TIME: 'int|true|default=0|comment=',
36 | ADMIN_TYPE: 'int|true|default=1|comment=类型',
37 |
38 | ADMIN_TOKEN :'string|false|comment=',
39 | ADMIN_TOKEN_TIME :'int|true|default=0|comment=',
40 |
41 | ADMIN_ADD_TIME: 'int|true',
42 | ADMIN_EDIT_TIME: 'int|true',
43 | ADMIN_ADD_IP: 'string|false',
44 | ADMIN_EDIT_IP: 'string|false',
45 | };
46 |
47 | // 字段前缀
48 | AdminModel.CCMINI_FIELD_PREFIX = "ADMIN_";
49 |
50 |
51 |
52 | module.exports = AdminModel;
--------------------------------------------------------------------------------
/cloudfunctions/reg_cloud/model/news_model.js:
--------------------------------------------------------------------------------
1 | // +----------------------------------------------------------------------
2 | // | CCMiniCloud [ Cloud Framework ]
3 | // +----------------------------------------------------------------------
4 | // | Copyright (c) 2021 www.code942.com All rights reserved.
5 | // +----------------------------------------------------------------------
6 | // | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
7 | // +----------------------------------------------------------------------
8 | // | Author: 明章科技
9 | // +----------------------------------------------------------------------
10 |
11 | /**
12 | * Notes: 公告通知实体
13 | * Ver : CCMiniCloud Framework 2.0.1 ALL RIGHTS RESERVED BY www.code942.com
14 | * Date: 2025-10-28 19:20:00
15 | * Version : CCMiniCloud Framework Ver 2.0.1 ALL RIGHTS RESERVED BY 明章科技
16 | */
17 |
18 |
19 | const BaseCCMiniModel = require('./base_ccmini_model.js');
20 |
21 | class NewsModel extends BaseCCMiniModel {
22 |
23 | }
24 |
25 | // 集合名
26 | NewsModel.CL = "news";
27 |
28 | NewsModel.CCMINI_DB_STRUCTURE = {
29 | NEWS_ID: 'string|true',
30 | NEWS_ADMIN_ID: 'string|true|default=0',
31 |
32 | NEWS_TITLE: 'string|true|comment=标题',
33 | NEWS_CATE: 'string|true|comment=分类',
34 | NEWS_DESC: 'string|false|comment=',
35 | NEWS_CONTENT: 'string|true|comment=',
36 | NEWS_STATUS: 'int|true|default=1|comment=',
37 | NEWS_ORDER: 'int|true|default=9999',
38 |
39 | NEWS_VIEW_CNT: 'int|true|default=0|comment=',
40 |
41 |
42 | NEWS_PIC: 'array|false|default=[]|comment=',
43 |
44 | NEWS_ADD_TIME: 'int|true',
45 | NEWS_EDIT_TIME: 'int|true',
46 | NEWS_ADD_IP: 'string|false',
47 | NEWS_EDIT_IP: 'string|false',
48 | };
49 |
50 | // 字段前缀
51 | NewsModel.CCMINI_FIELD_PREFIX = "NEWS_";
52 |
53 |
54 | module.exports = NewsModel;
--------------------------------------------------------------------------------
/cloudfunctions/reg_cloud/comm/ccmini_config.js:
--------------------------------------------------------------------------------
1 | // +----------------------------------------------------------------------
2 | // | CCMiniCloud [ Cloud Framework ]
3 | // +----------------------------------------------------------------------
4 | // | Copyright (c) 2021 www.code942.com All rights reserved.
5 | // +----------------------------------------------------------------------
6 | // | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
7 | // +----------------------------------------------------------------------
8 | // | Author: 明章科技
9 | // +----------------------------------------------------------------------
10 |
11 | /**
12 | * Notes: 配置文件
13 | * Ver : CCMiniCloud Framework 2.0.1 ALL RIGHTS RESERVED BY www.code942.com
14 | * Date: 2025-08-02 19:20:00
15 | */
16 | module.exports = {
17 |
18 | CCMINI_ADMIN_NAME: 'ccadmin', // 管理员账号(6-30位)
19 | CCMINI_ADMIN_PWD: '123456', // 管理员密码(6-30位)
20 |
21 | CCMINI_TEST_MODE: false,
22 |
23 | CCMINI_TEST_TOKEN_ID: 'oTthr5P34HTx5iYLtATaGjNlIxZw',
24 |
25 | CCMINI_ADMIN_LOGIN_EXPIRE: 86400,
26 |
27 | PROJECT_MARK: 'reg',
28 | PROJECT_NAME: 'CC校友登记平台',
29 | PROJECT_VER: 'CCReg-Cloud(V1.0 Build20210828)', //升级必须,请勿修改
30 | PROJECT_SOURCE: 'https://gitee.com/minzonetech',
31 |
32 | CCMINI_CLIENT_CHECK_CONTENT: true,
33 | CCMINI_ADMIN_CHECK_CONTENT: false,
34 |
35 | CCMINI_COLLECTION_NAME: 'setup|user|admin|news',
36 | CCMINI_SETUP_TITLE: 'CC校友登记平台',
37 | CCMINI_SETUP_ABOUT: ' 在这里,您可以了解母校和校友组织的最新讯息。\n\n 在这里,您可以怀念在母校度过的青葱时代,忆往昔峥嵘岁月稠。\n\n 在这里,您可以结交很多新校友,互通信息,资源共享,打造自己的人脉存折。\n\n 来把,校友们,朋友们,让我们一起加入校友大家庭!!!',
38 |
39 | CCMINI_NEWS_TITLE: '校友登记平台小程序正式上线了!!',
40 | CCMINI_NEWS_CATE: '公告通知',
41 | CCMINI_NEWS_DESC: '经过大家的努力,我们的校友登记平台小程序正式上线了,希望大家多多光临,建立自己良好的人脉!!',
42 | CCMINI_NEWS_CONTENT: '经过大家的努力,我们的校友登记平台小程序正式上线了,希望大家多多光临,建立自己良好的人脉!!',
43 |
44 | }
--------------------------------------------------------------------------------
/miniprogram/reg/ccmini-cmpts/public/list/comm_list_cmpt.wxss:
--------------------------------------------------------------------------------
1 | @import "../../../style/comm/comm.wxss";
2 | @import "../../../style/project/project.wxss";
3 |
4 | @import "../../../style/skin.wxss";
5 |
6 |
7 |
8 |
9 | /*sort*/
10 | .tabs {
11 | display: flex;
12 | font-size: 28rpx;
13 | color: #aaa;
14 | height: 80rpx;
15 | line-height: 80rpx;
16 | }
17 |
18 | .tabs .tab {
19 | flex-grow: 1;
20 | text-align: center;
21 | position: relative;
22 | }
23 |
24 | .tabs .cur{
25 | font-weight:bold;
26 | }
27 |
28 | .tabs .tab-menu.cur:after{
29 | content: " ";
30 | position: absolute;
31 | left: 0;
32 | bottom: 0rpx;
33 | width: 100%;
34 | height: 4rpx;
35 | background-color: #0E9489;
36 | }
37 |
38 | .tabs .icon {
39 | color: #000;
40 | }
41 |
42 |
43 | .sort {
44 | position: absolute;
45 | top: 178rpx;
46 | bottom: 0;
47 | width: 100%;
48 | background-color: rgba(188, 188, 188, 0.3);
49 | z-index: 999;
50 | }
51 |
52 | .sort .sort-item {
53 | border-top: 1px solid #eee;
54 | height: 80rpx;
55 | line-height: 80rpx;
56 | padding-left: 50rpx;
57 | background-color: #fff;
58 | }
59 |
60 |
61 | /**头部*/
62 | .top_bar {
63 | width: 100%;
64 | }
65 |
66 | .top_bar_scroll {
67 | position: fixed;
68 | top: 0rpx;
69 | left: 0;
70 | z-index: 99;
71 | background: #fff;
72 |
73 | z-index: 999;
74 | }
75 |
76 |
77 | .box-list {
78 | display: flex;
79 | flex-direction: column;
80 | height: 100vh;
81 | overflow: hidden;
82 | }
83 |
84 | .box-list-scroll {
85 | flex: 1;
86 | height: 1px;
87 | }
88 |
89 |
90 | .top-button{
91 | position: fixed;
92 | bottom: 50rpx;
93 | right: 30rpx;
94 | opacity: .8 ;
95 | }
96 |
97 | .list-scroll-view{
98 | display: inline-block;
99 | padding: 0 10rpx;
100 | }
--------------------------------------------------------------------------------
/miniprogram/reg/pages/news/news_index.wxml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
8 |
9 |
10 | {{index+1}}.
11 | {{item.NEWS_TITLE}}
12 | new
13 | hot
14 | 置顶
15 |
16 |
17 |
18 | {{item.NEWS_DESC}}
19 |
21 |
22 |
23 |
24 | {{item.NEWS_VIEW_CNT}}阅读
25 | {{item.NEWS_ADD_TIME}}
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
--------------------------------------------------------------------------------
/miniprogram/reg/pages/admin/index/admin_home.js:
--------------------------------------------------------------------------------
1 | const AdminBiz = require('../../../biz/admin_biz.js');
2 | const ccminiPageHelper = require('../../../helper/ccmini_page_helper.js');
3 | const ccminiCloudHelper = require('../../../helper/ccmini_cloud_helper.js');
4 | const CCMINI_SETTING = require('../../../helper/ccmini_setting.js');
5 | Page({
6 |
7 | /**
8 | * 页面的初始数据
9 | */
10 | data: {
11 | projectVer: CCMINI_SETTING.PROJECT_VER,
12 | projectName: CCMINI_SETTING.PROJECT_NAME
13 | },
14 |
15 | /**
16 | * 生命周期函数--监听页面加载
17 | */
18 | onLoad: async function (options) {
19 | if (!AdminBiz.isAdmin(this)) return;
20 |
21 | this._loadDetail();
22 | },
23 |
24 | /**
25 | * 页面相关事件处理函数--监听用户下拉动作
26 | */
27 | onPullDownRefresh: async function () {
28 | await this._loadDetail();
29 | wx.stopPullDownRefresh();
30 | },
31 |
32 | _loadDetail: async function () {
33 | try {
34 | let opts = {
35 | title: 'bar'
36 | }
37 | let res = await ccminiCloudHelper.callCloudData('admin/home', {}, opts);
38 | this.setData({
39 | isLoad: true,
40 | data: res
41 | });
42 |
43 | } catch (err) {
44 | console.log(err);
45 | }
46 |
47 | let admin = AdminBiz.getAdminToken();
48 | this.setData({
49 | admin
50 | });
51 | },
52 |
53 | /**
54 | * 生命周期函数--监听页面初次渲染完成
55 | */
56 | onReady: function () {
57 |
58 | },
59 |
60 | /**
61 | * 生命周期函数--监听页面显示
62 | */
63 | onShow: function () {
64 |
65 | },
66 |
67 | /**
68 | * 生命周期函数--监听页面隐藏
69 | */
70 | onHide: function () {
71 |
72 | },
73 |
74 | /**
75 | * 生命周期函数--监听页面卸载
76 | */
77 | onUnload: function () {
78 |
79 | },
80 |
81 | url: function (e) {
82 | ccminiPageHelper.url(e, this);
83 | },
84 |
85 | bindExitTap: function (e) {
86 | AdminBiz.clearAdminToken();
87 | ccminiPageHelper.goto('/pages/my/index/my_index');
88 | }
89 |
90 | })
--------------------------------------------------------------------------------
/miniprogram/reg/pages/about/about.js:
--------------------------------------------------------------------------------
1 | const ccminiCloudHelper = require('../../helper/ccmini_cloud_helper.js');
2 | const ccminiHelper = require('../../helper/ccmini_helper.js');
3 | const ccminiBizHelper = require('../../helper/ccmini_biz_helper.js');
4 | const ccminiPageHelper = require('../../helper/ccmini_page_helper.js');
5 | const PassportBiz = require('../../biz/passport_biz.js');
6 | const CCMINI_SETTING = require('../../helper/ccmini_setting.js');
7 |
8 | Page({
9 |
10 | /**
11 | * 页面的初始数据
12 | */
13 | data: {
14 | isLoad: false
15 | },
16 |
17 | /**
18 | * 生命周期函数--监听页面加载
19 | */
20 | onLoad: async function (options) {
21 | await PassportBiz.initPage(this);
22 | this._loadDetail();
23 | },
24 |
25 | _loadDetail: async function () {
26 | let opts = {
27 | title: 'bar'
28 | }
29 | let about = await ccminiCloudHelper.callCloudData('home/setup_all', {}, opts);
30 | if (!about) {
31 | this.setData({
32 | isLoad: null
33 | });
34 | return;
35 | }
36 |
37 | if (about) this.setData({
38 | about,
39 | isLoad: true
40 | });
41 | },
42 |
43 | /**
44 | * 生命周期函数--监听页面初次渲染完成
45 | */
46 | onReady: function () {
47 |
48 | },
49 |
50 | /**
51 | * 生命周期函数--监听页面显示
52 | */
53 | onShow: function () {
54 |
55 | },
56 |
57 | /**
58 | * 生命周期函数--监听页面隐藏
59 | */
60 | onHide: function () {
61 |
62 | },
63 |
64 | /**
65 | * 生命周期函数--监听页面卸载
66 | */
67 | onUnload: function () {
68 |
69 | },
70 |
71 | /**
72 | * 页面相关事件处理函数--监听用户下拉动作
73 | */
74 | onPullDownRefresh: function () {
75 | this._loadDetail();
76 | wx.stopPullDownRefresh();
77 | },
78 |
79 |
80 | /**
81 | * 用户点击右上角分享
82 | */
83 | onShareAppMessage: function () {
84 | return {
85 | title: '关于我们',
86 | path: '/' + CCMINI_SETTING.PROJECT_MARK + '/pages/about/about',
87 | }
88 | },
89 |
90 | url: function (e) {
91 | ccminiPageHelper.url(e, this);
92 | }
93 | })
--------------------------------------------------------------------------------
/miniprogram/reg/biz/admin_biz.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Notes: 后台管理模块业务逻辑
3 | * Ver : CCMiniCloud Framework 2.0.1 ALL RIGHTS RESERVED BY www.code942.com
4 | * Date: 2025-11-14 07:48:00
5 | */
6 |
7 | const BaseCCMiniBiz = require('./base_ccmini_biz.js');
8 | const ccminiCacheHelper = require('../helper/ccmini_cache_helper.js');
9 | const ccminiCloudHelper = require('../helper/ccmini_cloud_helper.js');
10 | const CCMINI_SETTING = require('../helper/ccmini_setting.js');
11 | const ccminiComm = require('../helper/ccmini_comm.js');
12 | const ccminiPageHelper = require('../helper/ccmini_page_helper.js');
13 |
14 |
15 | class AdminBiz extends BaseCCMiniBiz {
16 |
17 | static adminLogin(admin) {
18 | ccminiCacheHelper.set(ccminiComm.CACHE_ADMIN, admin, CCMINI_SETTING.ADMIN_TOKEN_EXPIRE);
19 | }
20 |
21 | static clearAdminToken() {
22 | ccminiCacheHelper.remove(ccminiComm.CACHE_ADMIN);
23 | }
24 |
25 | static getAdminToken() {
26 | return ccminiCacheHelper.get(ccminiComm.CACHE_ADMIN);
27 | }
28 |
29 | static getAdminName() {
30 | let admin = ccminiCacheHelper.get(ccminiComm.CACHE_ADMIN);
31 | if (!admin) return '';
32 | return admin.name;
33 | }
34 |
35 | static isSuperAdmin() {
36 | let admin = ccminiCacheHelper.get(ccminiComm.CACHE_ADMIN);
37 | if (!admin) return false;
38 | return (admin.type == 1);
39 | }
40 |
41 | static isAdmin(that) {
42 | if (CCMINI_SETTING.TEST_OPEN_PAGES) {
43 | let pages = getCurrentPages();
44 | console.log('PAGE length=' + pages.length)
45 | for (let k in pages) {
46 | console.log('[PAGE' + k + ']' + pages[k].route)
47 | }
48 | }
49 |
50 | let admin = ccminiCacheHelper.get(ccminiComm.CACHE_ADMIN);
51 | if (!admin) {
52 | ccminiPageHelper.goto('/pages/admin/index/admin_login', 'relaunch');
53 | return false;
54 | }
55 |
56 | that.setData({
57 | isAdmin: true
58 | });
59 | return true;
60 | }
61 |
62 |
63 | }
64 |
65 | module.exports = AdminBiz;
--------------------------------------------------------------------------------
/miniprogram/reg/pages/admin/index/admin_login.js:
--------------------------------------------------------------------------------
1 | const AdminBiz = require('../../../biz/admin_biz.js');
2 | const ccminiCloudHelper = require('../../../helper/ccmini_cloud_helper.js');
3 | const ccminiPageHelper = require('../../../helper/ccmini_page_helper.js');
4 | const CCMINI_SETTING = require('../../../helper/ccmini_setting.js');
5 |
6 | Page({
7 |
8 | /**
9 | * 页面的初始数据
10 | */
11 | data: {
12 | projectName: CCMINI_SETTING.PROJECT_NAME,
13 | name: '',
14 | pwd: '',
15 | },
16 |
17 | /**
18 | * 生命周期函数--监听页面加载
19 | */
20 | onLoad: function (options) {
21 | AdminBiz.clearAdminToken();
22 | },
23 |
24 | /**
25 | * 生命周期函数--监听页面初次渲染完成
26 | */
27 | onReady: function () {
28 |
29 | },
30 |
31 | /**
32 | * 生命周期函数--监听页面显示
33 | */
34 | onShow: function () {
35 |
36 | },
37 |
38 | /**
39 | * 生命周期函数--监听页面隐藏
40 | */
41 | onHide: function () {
42 |
43 | },
44 |
45 | /**
46 | * 生命周期函数--监听页面卸载
47 | */
48 | onUnload: function () {
49 |
50 | },
51 |
52 | url: function (e) {
53 | ccminiPageHelper.url(e, this);
54 | },
55 |
56 | bindGetPhoneNumber: async function (e) {
57 | if (this.data.name.length < 6 || this.data.name.length > 30) {
58 | wx.showToast({
59 | title: '账号输入错误(6-30位)',
60 | icon: 'none'
61 | });
62 | return;
63 | }
64 |
65 | if (this.data.pwd.length < 6 || this.data.pwd.length > 30) {
66 | wx.showToast({
67 | title: '密码输入错误(6-30位)',
68 | icon: 'none'
69 | });
70 | return;
71 | }
72 |
73 | let params = {
74 | name: this.data.name,
75 | pwd: this.data.pwd
76 | };
77 | let opt = {
78 | title: '登录中'
79 | };
80 |
81 | try {
82 | await ccminiCloudHelper.callCloudSumbit('admin/login', params, opt).then(res => {
83 | if (res && res.data && res.data.name) AdminBiz.adminLogin(res.data);
84 |
85 | ccminiPageHelper.goto('admin_home', 'relaunch');
86 | });
87 | } catch (e) {
88 | console.log(e);
89 | }
90 |
91 | }
92 |
93 | })
--------------------------------------------------------------------------------
/cloudfunctions/reg_cloud/controller/base_ccmini_controller.js:
--------------------------------------------------------------------------------
1 | // +----------------------------------------------------------------------
2 | // | CCMiniCloud [ Cloud Framework ]
3 | // +----------------------------------------------------------------------
4 | // | Copyright (c) 2021 www.code942.com All rights reserved.
5 | // +----------------------------------------------------------------------
6 | // | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
7 | // +----------------------------------------------------------------------
8 | // | Author: 明章科技
9 | // +----------------------------------------------------------------------
10 |
11 | /**
12 | * Notes: 基本业务控制器
13 | * Ver : CCMiniCloud Framework 2.0.1 ALL RIGHTS RESERVED BY www.code942.com
14 | * Date: 2025-09-05 04:00:00
15 | * Version : CCMiniCloud Framework Ver 2.0.1 ALL RIGHTS RESERVED BY 明章科技
16 | */
17 |
18 | const ccminiTimeUtil = require('../framework/utils/ccmini_time_util.js');
19 | const CCMiniController = require('../framework/client/ccmini_controller.js');
20 | const ccminiDataCheck = require('../framework/validate/ccmini_data_check.js');
21 |
22 | class BaseCCMiniController extends CCMiniController {
23 |
24 | constructor(miniOpenId, request, router, token) {
25 | super(miniOpenId, request, router, token);
26 |
27 | // 云函数入口文件
28 |
29 | //this._cloud = ccminiCloudUtil.getCloud();
30 | //this._log = this._cloud.logger();
31 | /*
32 | this._db = this._cloud.database();
33 | this._dbCmd = this._db.command;
34 | this._dbAggr = this._dbCmd.aggregate;*/
35 |
36 | // 微信上下文 OPENID, APPID,UNIONID,CLIENTIP, CLIENTIPV6
37 | //this._wxContext = this._cloud.getWXContext();
38 | this._userId = miniOpenId;
39 |
40 | // 当前时间戳
41 | this._timestamp = ccminiTimeUtil.time();
42 |
43 |
44 | }
45 |
46 | ccminiValidateData(rules = {}) {
47 | let input = this._request;
48 | return ccminiDataCheck.check(input, rules);
49 | }
50 | }
51 |
52 | module.exports = BaseCCMiniController;
--------------------------------------------------------------------------------
/miniprogram/reg/ccmini-cmpts/public/picker/picker_cmpt.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Notes:
3 | * Ver : CCMiniCloud Framework 2.0.1 ALL RIGHTS RESERVED BY www.code942.com
4 | * Date: 2025-08-14 07:48:00
5 | */
6 | Component({
7 | /**
8 | * 组件的属性列表
9 | */
10 | properties: {
11 | optionsStr: { //待选项
12 | type: String,
13 | value: '',
14 | },
15 | optionsArr: { //待选项
16 | type: Array,
17 | value: '',
18 | },
19 |
20 | item: { // 选中值
21 | type: String,
22 | value: '',
23 | },
24 | },
25 |
26 | /**
27 | * 组件的初始数据
28 | */
29 | data: {
30 | idx: 0,
31 | options: []
32 | },
33 |
34 | /**
35 | * 生命周期方法
36 | */
37 | lifetimes: {
38 | attached: function () {
39 |
40 | },
41 |
42 | ready: function () {
43 | let options = this.data.optionsStr;
44 | if (options) {
45 | options = options.replace(',', ',');
46 | options = options.split(',');
47 | this.setData({
48 | options
49 | });
50 | } else {
51 | this.setData({
52 | options: this.data.optionsArr
53 | });
54 | }
55 | this.selected(this.data.item);
56 | },
57 |
58 | detached: function () {
59 | // 在组件实例被从页面节点树移除时执行
60 | },
61 | },
62 |
63 | /**
64 | * 组件的方法列表
65 | */
66 | methods: {
67 |
68 | // 触发改变
69 | bindChange: function (e) {
70 | let ret = this.data.options[this.data.idx];
71 | if (!ret) ret = '';
72 | this.triggerEvent('myEvent', ret);
73 | },
74 |
75 | // 选中值
76 | selected: function (item) {
77 | if (this.data.options.length == 1) {
78 | this.setData({
79 | idx: 0
80 | });
81 | this.triggerEvent('myEvent', this.data.options[0]);
82 | return;
83 | } else {
84 | for (let k in this.data.options) {
85 | if (item == this.data.options[k]) {
86 | this.setData({
87 | idx: k
88 | });
89 | return;
90 | }
91 | }
92 | this.setData({
93 | idx: -1
94 | });
95 | }
96 |
97 |
98 |
99 | }
100 | }
101 | })
--------------------------------------------------------------------------------
/miniprogram/reg/pages/about/hint.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | 抱歉!该操作仅限校友
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 | 抱歉!用户状态异常,请联系客服
15 |
16 |
17 |
18 |
19 | 正在用户审核,暂无法使用本功能
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 | {{msg}}
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
--------------------------------------------------------------------------------
/project.config.json:
--------------------------------------------------------------------------------
1 | {
2 | "miniprogramRoot": "miniprogram/",
3 | "cloudfunctionRoot": "cloudfunctions/",
4 | "setting": {
5 | "urlCheck": true,
6 | "es6": true,
7 | "enhance": true,
8 | "postcss": true,
9 | "preloadBackgroundData": false,
10 | "minified": true,
11 | "newFeature": true,
12 | "coverView": true,
13 | "nodeModules": false,
14 | "autoAudits": false,
15 | "showShadowRootInWxmlPanel": true,
16 | "scopeDataCheck": false,
17 | "uglifyFileName": true,
18 | "checkInvalidKey": true,
19 | "checkSiteMap": true,
20 | "uploadWithSourceMap": true,
21 | "compileHotReLoad": false,
22 | "useMultiFrameRuntime": true,
23 | "useApiHook": true,
24 | "useApiHostProcess": false,
25 | "babelSetting": {
26 | "ignore": [],
27 | "disablePlugins": [],
28 | "outputPath": ""
29 | },
30 | "bundle": false,
31 | "useIsolateContext": true,
32 | "useCompilerModule": true,
33 | "userConfirmedUseCompilerModuleSwitch": false,
34 | "userConfirmedBundleSwitch": false,
35 | "packNpmManually": false,
36 | "packNpmRelationList": [],
37 | "minifyWXSS": true
38 | },
39 | "appid": "wxd4a5be4daf679ace",
40 | "projectname": "CC%E6%A0%A1%E5%8F%8B%E7%99%BB%E8%AE%B0%E5%B9%B3%E5%8F%B0-Free",
41 | "libVersion": "3.8.10",
42 | "simulatorType": "wechat",
43 | "simulatorPluginLibVersion": {},
44 | "cloudfunctionTemplateRoot": "cloudfunctionTemplate/",
45 | "condition": {
46 | "search": {
47 | "list": []
48 | },
49 | "conversation": {
50 | "list": []
51 | },
52 | "plugin": {
53 | "list": []
54 | },
55 | "game": {
56 | "list": []
57 | },
58 | "gamePlugin": {
59 | "list": []
60 | },
61 | "miniprogram": {
62 | "list": [
63 | {
64 | "id": -1,
65 | "name": "db guide",
66 | "pathName": "pages/databaseGuide/databaseGuide",
67 | "query": ""
68 | }
69 | ]
70 | }
71 | },
72 | "compileType": "miniprogram",
73 | "srcMiniprogramRoot": "miniprogram/",
74 | "packOptions": {
75 | "ignore": [],
76 | "include": []
77 | },
78 | "editorSetting": {
79 | "tabIndent": "tab",
80 | "tabSize": 4
81 | }
82 | }
--------------------------------------------------------------------------------
/miniprogram/reg/pages/index/index_home.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
--------------------------------------------------------------------------------
/miniprogram/reg/pages/register/reg.wxss:
--------------------------------------------------------------------------------
1 | @import "../../style/skin.wxss";
2 | page{
3 | background-color: #fff;
4 | }
5 |
6 | .main-reg{
7 | width:100%;
8 | box-sizing: border-box;
9 | padding:20rpx 20rpx;
10 | display: flex;
11 | flex-direction: column;
12 | justify-content: center;
13 | align-items: center;
14 | }
15 | .main-reg .step{
16 | display: flex;
17 | justify-content: center;
18 | align-items: center;
19 | width:100%;
20 | }
21 |
22 | .main-reg .step .item{
23 | width:33.3%;
24 | display: flex;
25 | flex-direction: column;
26 | box-sizing: border-box;
27 | padding:30rpx;
28 | justify-content: center;
29 | align-items: center;
30 | }
31 |
32 | .main-reg .step .item .circle-item{
33 | width:100rpx;
34 | height:100rpx;
35 | background-color:#fff;
36 | color:#0E9489;
37 | border-radius: 50%;
38 | display: flex;
39 | justify-content: center;
40 | align-items: center;
41 | position: relative;
42 | border:4rpx solid #0E9489;
43 | }
44 |
45 | .main-reg .step .item.cur .circle-item{
46 | background-color:#0E9489;
47 | color:#fff;
48 | }
49 |
50 | .main-reg .step .item.cur .icon-check{
51 | font-size:50rpx;
52 | }
53 |
54 | .main-reg .step .item .circle-item-mid::after {
55 | content: '';
56 | position: absolute;
57 | top: 50%;
58 | background: #ccc;
59 | width: 110%;
60 | height: 2rpx;
61 | left:120%;
62 | }
63 |
64 | .main-reg .step .item .circle-item-mid::before {
65 | content: '';
66 | position: absolute;
67 | top: 50%;
68 | background: #ccc;
69 | width: 110%;
70 | height: 2rpx;
71 | right:120%;
72 | }
73 |
74 | .main-reg .step .item .circle-item .num{
75 | font-size:38rpx;
76 | font-weight:bold;
77 | }
78 |
79 | .main-reg .step .item .circle-item .icon-check{
80 | font-weight:bold;
81 | }
82 |
83 | .main-reg .step .item .step-text{
84 | margin-top:20rpx;
85 | font-size:30rpx;
86 | }
87 |
88 | .main-reg .step .item.cur .step-text{
89 | color:#0E9489;
90 | }
91 |
92 | .main-reg .step-desc{
93 | margin-top:30rpx;
94 | font-size:30rpx;
95 | color:#86C8C3;
96 | }
97 |
98 | .main-reg .btn-reg{
99 | margin-top:200rpx;
100 | background-color: #0E9489;
101 | }
102 |
--------------------------------------------------------------------------------
/miniprogram/reg/style/comm/base.wxss:
--------------------------------------------------------------------------------
1 | /* ==================
2 | 初始化
3 | ==================== */
4 | page {
5 | /* Color 可以自定义相关配色 */
6 | /* var属性兼容性 --> https://www.caniuse.com/#feat=css-variables */
7 | /* 标准色 */
8 | --red: #e54d42;
9 | --orange: #f37b1d;
10 | --yellow: #fbbd08;
11 | --olive: #8dc63f;
12 | --green: #39b54a;
13 | --darkgreen: #0E9489;
14 | --cyan: #1cbbb4;
15 | --blue: #0081ff;
16 | --purple: #6739b6;
17 | --mauve: #9c26b0;
18 | --pink: #e03997;
19 | --brown: #a5673f;
20 | --grey: #8799a3;
21 | --black: #333333;
22 | --darkGray: #666666;
23 | --gray: #aaaaaa;
24 | --ghostWhite: #f1f1f1;
25 | --white: #ffffff;
26 | /* 浅色 */
27 | --redLight: #fadbd9;
28 | --orangeLight: #fde6d2;
29 | --yellowLight: #fef2ce;
30 | --oliveLight: #e8f4d9;
31 | --greenLight: #d7f0db;
32 | --cyanLight: #d2f1f0;
33 | --blueLight: #cce6ff;
34 | --purpleLight: #e1d7f0;
35 | --mauveLight: #ebd4ef;
36 | --pinkLight: #f9d7ea;
37 | --brownLight: #ede1d9;
38 | --greyLight: #e7ebed;
39 |
40 | /* 阴影透明色 */
41 | --ShadowSize: 6rpx 6rpx 8rpx;
42 | --redShadow: rgba(204, 69, 59, 0.2);
43 | --orangeShadow: rgba(217, 109, 26, 0.2);
44 | --yellowShadow: rgba(224, 170, 7, 0.2);
45 | --oliveShadow: rgba(124, 173, 55, 0.2);
46 | --greenShadow: rgba(48, 156, 63, 0.2);
47 | --darkgreenShadow: rgba(48, 156, 63, 0.2);
48 | --cyanShadow: rgba(28, 187, 180, 0.2);
49 | --blueShadow: rgba(0, 102, 204, 0.2);
50 | --purpleShadow: rgba(88, 48, 156, 0.2);
51 | --mauveShadow: rgba(133, 33, 150, 0.2);
52 | --pinkShadow: rgba(199, 50, 134, 0.2);
53 | --brownShadow: rgba(140, 88, 53, 0.2);
54 | --greyShadow: rgba(114, 130, 138, 0.2);
55 | --grayShadow: rgba(114, 130, 138, 0.2);
56 | --blackShadow: rgba(26, 26, 26, 0.2);
57 |
58 | background-color: var(--ghostWhite);
59 | font-size: 28rpx;
60 | color: var(--black);
61 | font-family: Helvetica Neue, Helvetica, sans-serif;
62 | }
63 |
64 | view,
65 | scroll-view,
66 | swiper,
67 | button,
68 | input,
69 | textarea,
70 | label,
71 | navigator,
72 | image {
73 | box-sizing: border-box;
74 | }
75 |
76 | .hide {
77 | display: none;
78 | }
79 |
80 | .round {
81 | border-radius: 5000rpx;
82 | }
83 |
84 | .radius {
85 | border-radius: 6rpx;
86 | }
87 |
88 | .block {
89 | display: block;
90 | }
91 |
92 | /* 多行文本 */
93 | .text-content{
94 | line-height: 1.6;
95 | }
--------------------------------------------------------------------------------
/miniprogram/app.json:
--------------------------------------------------------------------------------
1 | {
2 | "pages": [
3 | "reg/pages/index/index_home",
4 | "reg/pages/my/index/my_index",
5 | "reg/pages/register/reg_step1",
6 | "reg/pages/register/reg_step2",
7 | "reg/pages/register/reg_step3",
8 | "reg/pages/my/base/my_base",
9 | "reg/pages/my/reload/my_reload",
10 |
11 | "reg/pages/search/search",
12 | "reg/pages/user/user_index",
13 | "reg/pages/user/user_detail",
14 | "reg/pages/admin/user/admin_user_list",
15 | "reg/pages/admin/user/admin_user_detail",
16 |
17 | "reg/pages/admin/index/admin_login",
18 | "reg/pages/admin/index/admin_home",
19 | "reg/pages/admin/news/admin_news_list",
20 | "reg/pages/admin/news/admin_news_add",
21 | "reg/pages/admin/news/admin_news_edit",
22 | "reg/pages/news/news_index",
23 | "reg/pages/news/news_detail",
24 |
25 | "reg/pages/admin/setup/admin_setup",
26 |
27 | "reg/pages/about/about",
28 | "reg/pages/about/hint"
29 | ],
30 | "window": {
31 | "backgroundColor": "#f1f1f1",
32 | "backgroundTextStyle": "light",
33 | "navigationBarBackgroundColor": "#AE0B2A",
34 | "navigationBarTitleText": "CC校友登记平台",
35 | "navigationBarTextStyle": "white"
36 | },
37 | "tabBar": {
38 | "backgroundColor": "#fefefe",
39 | "color": "#999",
40 | "selectedColor": "#AE0B2A",
41 | "list": [{
42 | "pagePath": "reg/pages/index/index_home",
43 | "text": "首页",
44 | "iconPath": "/reg/images/tabbar/home.png",
45 | "selectedIconPath": "/reg/images/tabbar/home_cur.png"
46 | },
47 | {
48 | "pagePath": "reg/pages/news/news_index",
49 | "text": "公告通知",
50 | "iconPath": "/reg/images/tabbar/news.png",
51 | "selectedIconPath": "/reg/images/tabbar/news_cur.png"
52 | },
53 | {
54 | "pagePath": "reg/pages/register/reg_step1",
55 | "text": "校友登记",
56 | "iconPath": "/reg/images/tabbar/reg.png",
57 | "selectedIconPath": "/reg/images/tabbar/reg_cur.png"
58 | },
59 | {
60 | "pagePath": "reg/pages/user/user_index",
61 | "text": "花名册",
62 | "iconPath": "/reg/images/tabbar/user.png",
63 | "selectedIconPath": "/reg/images/tabbar/user_cur.png"
64 | },
65 | {
66 | "pagePath": "reg/pages/my/index/my_index",
67 | "text": "个人中心",
68 | "iconPath": "/reg/images/tabbar/my.png",
69 | "selectedIconPath": "/reg/images/tabbar/my_cur.png"
70 | }
71 | ]
72 | },
73 | "sitemapLocation": "sitemap.json"
74 | }
--------------------------------------------------------------------------------
/cloudfunctions/reg_cloud/framework/utils/ccmini_str_util.js:
--------------------------------------------------------------------------------
1 | // +----------------------------------------------------------------------
2 | // | CCMiniCloud [ Cloud Framework ]
3 | // +----------------------------------------------------------------------
4 | // | Copyright (c) 2021 www.code942.com All rights reserved.
5 | // +----------------------------------------------------------------------
6 | // | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
7 | // +----------------------------------------------------------------------
8 | // | Author: 明章科技
9 | // +----------------------------------------------------------------------
10 |
11 | /**
12 | * Notes: 字符相关操作函数
13 | * Ver : CCMiniCloud Framework 2.0.1 ALL RIGHTS RESERVED BY www.code942.com
14 | * Date: 2025-09-05 04:00:00
15 | * Version : CCMiniCloud Framework Ver 2.0.1 ALL RIGHTS RESERVED BY 明章科技
16 | */
17 |
18 |
19 | const genRandomNum = (min, max) => (Math.random() * (max - min + 1) | 0) + min;
20 |
21 | const genRandomString = len => {
22 | const text = 'abcdefghijklmnopqrstuvwxyz0123456789';
23 | const rdmIndex = text => Math.random() * text.length | 0;
24 | let rdmString = '';
25 | for (; rdmString.length < len; rdmString += text.charAt(rdmIndex(text)));
26 | return rdmString;
27 | }
28 |
29 | function str2Arr(str, sp) {
30 | if (str && Array.isArray(str)) return str;
31 |
32 | if (sp == undefined) sp = ',';
33 |
34 | str = str.replace(/,/g, ",");
35 | let arr = str.split(',');
36 | for (let i = 0; i < arr.length; i++) {
37 | arr[i] = arr[i].trim();
38 |
39 | if (isNumber(arr[i])) {
40 | arr[i] = Number(arr[i]);
41 | }
42 |
43 | }
44 | return arr;
45 | }
46 |
47 | function isNumber(val) {
48 | var reg = /^[0-9]+.?[0-9]*$/;
49 | if (reg.test(val)) {
50 | return true;
51 | } else {
52 | return false;
53 | }
54 | }
55 |
56 |
57 | function getArrByKey(arr, key) {
58 | if (!Array.isArray(arr)) return;
59 | return arr.map((item) => {
60 | return item[key]
61 | });
62 | }
63 |
64 | function fmtText(content, len = -1) {
65 | let str = content.replace(/[\r\n]/g, ""); //去掉回车换行
66 | if (len > 0) {
67 | str = str.substr(0, len);
68 | }
69 | return str.trim();
70 | }
71 |
72 | module.exports = {
73 | str2Arr,
74 | isNumber,
75 | getArrByKey,
76 | genRandomString,
77 | genRandomNum,
78 | fmtText,
79 | }
--------------------------------------------------------------------------------
/miniprogram/reg/style/project/project.wxss:
--------------------------------------------------------------------------------
1 | /* 主框架 */
2 | .main {
3 | width: 100%;
4 | box-sizing: border-box;
5 | padding: 20rpx 20rpx;
6 | display: flex;
7 | flex-direction: column;
8 | justify-content: center;
9 | align-items: center;
10 | }
11 |
12 | /*表单*/
13 | .main form {
14 | width: 100%;
15 | display: flex;
16 | flex-direction: column;
17 | }
18 |
19 | .form-group .title {
20 | font-weight: bold;
21 | }
22 |
23 | .form-box {
24 | background-color: #fff;
25 | border-radius: 20rpx;
26 | margin-bottom: 24rpx;
27 | box-sizing: border-box;
28 | width: 100%;
29 | }
30 |
31 | /* 固定按钮 */
32 | .btn-fixed {
33 | position: fixed;
34 | bottom: 130rpx;
35 | right: 12rpx;
36 | color: #fff;
37 | font-size: 40rpx;
38 | font-weight: bold;
39 | border-radius: 50%;
40 | background-color: #ccc;
41 | width: 60rpx;
42 | height: 60rpx;
43 | display: flex;
44 | align-items: center;
45 | justify-content: center;
46 | }
47 |
48 | /*单行大按钮*/
49 | .btn-main {
50 | width: 600rpx;
51 | font-size: 32rpx;
52 | height: 80rpx;
53 | line-height: 80rpx;
54 | border-radius: 40rpx;
55 | background-color: #0E9489;
56 | color: #fff;
57 | font-weight: bold;
58 | }
59 |
60 | /**校友底图**/
61 | .school-cover{
62 | position:absolute;
63 | top:0;
64 | left:0;
65 | width:100%;
66 | height:100%;
67 | opacity: .1;
68 | background-size:750rpx 280rpx;
69 | }
70 |
71 |
72 | .site-footer{
73 | width:100%;
74 | display: flex;
75 | flex-direction: column;
76 | justify-content: center;
77 | align-items: center;
78 | font-size: 28rpx;
79 | color:#666;
80 | margin-top:20rpx;
81 | }
82 |
83 | .site-footer .link{
84 | display: flex;
85 | justify-content: center;
86 | align-items: center;
87 | }
88 |
89 | .site-footer .link view, .site-footer .link button{
90 | margin-left:5rpx;
91 | margin-right:5rpx;
92 | }
93 |
94 | .site-footer .link .line{
95 | color:#ccc;
96 | }
97 |
98 | .site-footer .info{
99 | margin-top:10rpx;
100 | color:#aaa;
101 | font-size:24rpx;
102 | }
103 |
104 | .clearbtn {
105 | margin:0;
106 | padding:0;
107 | background-color: transparent;
108 | text-align: center;
109 | font-size:inherit;
110 | color: inherit;
111 | }
112 |
113 | .clearbtn::after {
114 | border: none !important;
115 | }
--------------------------------------------------------------------------------
/cloudfunctions/reg_cloud/comm/ccmini_router.js:
--------------------------------------------------------------------------------
1 | // +----------------------------------------------------------------------
2 | // | CCMiniCloud [ Cloud Framework ]
3 | // +----------------------------------------------------------------------
4 | // | Copyright (c) 2021 www.code942.com All rights reserved.
5 | // +----------------------------------------------------------------------
6 | // | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
7 | // +----------------------------------------------------------------------
8 | // | Author: 明章科技
9 | // +----------------------------------------------------------------------
10 |
11 | /**
12 | * Notes: 路由配置文件
13 | * Ver : CCMiniCloud Framework 2.0.1 ALL RIGHTS RESERVED BY www.code942.com
14 | * Date: 2025-10-14 07:00:00
15 | */
16 |
17 | module.exports = {
18 |
19 | 'test/test': 'TestController@test',
20 |
21 | 'home/setup': 'HomeController@getSetup',
22 | 'home/setup_all': 'HomeController@getSetupAll',
23 |
24 | 'user/list': 'UserController@getUserList',
25 | 'user/detail': 'UserController@getUser',
26 | 'user/view': 'UserController@viewUser',
27 | 'user/my_detail': 'UserController@getMyDetail',
28 |
29 |
30 | 'passport/phone': 'PassportController@getPhone',
31 | 'passport/reg': 'PassportController@register',
32 | 'passport/modify': 'PassportController@modifyBase',
33 | 'passport/login': 'PassportController@login',
34 | 'passport/update_pic': 'PassportController@updatePic',
35 |
36 | 'news/list': 'NewsController@getNewsList',
37 | 'news/view': 'NewsController@viewNews',
38 |
39 |
40 | //***########### ADMIN ################## */
41 | 'admin/setup_edit': 'AdminController@setupEdit',
42 |
43 | 'admin/login': 'AdminController@adminLogin',
44 | 'admin/home': 'AdminController@adminHome',
45 | 'admin/user_list': 'AdminController@getUserList',
46 | 'admin/user_detail': 'AdminController@getUserDetail',
47 | 'admin/user_del': 'AdminController@delUser',
48 | 'admin/user_status': 'AdminController@statusUser',
49 |
50 | 'admin/news_list': 'AdminController@getNewsList',
51 | 'admin/news_insert': 'AdminController@insertNews',
52 | 'admin/news_detail': 'AdminController@getNewsDetail',
53 | 'admin/news_edit': 'AdminController@editNews',
54 | 'admin/news_del': 'AdminController@delNews',
55 | 'admin/news_update_pic': 'AdminController@updateNewsPic',
56 | 'admin/news_sort': 'AdminController@sortNews',
57 | 'admin/news_status': 'AdminController@statusNews',
58 |
59 | }
--------------------------------------------------------------------------------
/miniprogram/reg/pages/news/news_detail.js:
--------------------------------------------------------------------------------
1 | const ccminiCloudHelper = require('../../helper/ccmini_cloud_helper.js');
2 | const ccminiHelper = require('../../helper/ccmini_helper.js');
3 | const ccminiBizHelper = require('../../helper/ccmini_biz_helper.js');
4 | const ccminiPageHelper = require('../../helper/ccmini_page_helper.js');
5 | const PassportBiz = require('../../biz/passport_biz.js');
6 | const CCMINI_SETTING = require('../../helper/ccmini_setting.js');
7 |
8 | Page({
9 |
10 | /**
11 | * 页面的初始数据
12 | */
13 | data: {
14 | isLoad: false,
15 | },
16 |
17 | /**
18 | * 生命周期函数--监听页面加载
19 | */
20 | onLoad: async function (options) {
21 | await PassportBiz.initPage(this);
22 |
23 | PassportBiz.loginSilence(this);
24 | if (!ccminiPageHelper.getId(this, options)) return;
25 |
26 | this._loadDetail();
27 |
28 | },
29 |
30 | _loadDetail: async function () {
31 | let id = this.data.id;
32 | if (!id) return;
33 |
34 | let params = {
35 | id,
36 | };
37 | let opt = {
38 | hint: false
39 | };
40 | let news = await ccminiCloudHelper.callCloudData('news/view', params, opt);
41 | if (!news) {
42 | this.setData({
43 | isLoad: null
44 | })
45 | return;
46 | }
47 |
48 | this.setData({
49 | isLoad: true,
50 | news,
51 |
52 | });
53 |
54 |
55 | },
56 |
57 | /**
58 | * 生命周期函数--监听页面初次渲染完成
59 | */
60 | onReady: function () {},
61 |
62 | /**
63 | * 生命周期函数--监听页面显示
64 | */
65 | onShow: function () {
66 |
67 | },
68 |
69 | /**
70 | * 生命周期函数--监听页面隐藏
71 | */
72 | onHide: function () {
73 |
74 | },
75 |
76 | /**
77 | * 生命周期函数--监听页面卸载
78 | */
79 | onUnload: function () {
80 |
81 | },
82 |
83 | /**
84 | * 页面相关事件处理函数--监听用户下拉动作
85 | */
86 | onPullDownRefresh: async function () {
87 | await this._loadDetail();
88 | wx.stopPullDownRefresh();
89 | },
90 |
91 | /**
92 | * 页面上拉触底事件的处理函数
93 | */
94 | onReachBottom: function () {
95 |
96 | },
97 |
98 | url: function (e) {
99 | ccminiPageHelper.url(e);
100 | },
101 |
102 | onPageScroll: function (e) {
103 | // 回页首按钮
104 | ccminiPageHelper.showTopBtn(e, this);
105 |
106 | },
107 |
108 | /**
109 | * 用户点击右上角分享
110 | */
111 | onShareAppMessage: function (res) {
112 | return {
113 | title: this.data.news.NEWS_TITLE,
114 | path: '/' + CCMINI_SETTING.PROJECT_MARK + '/pages/news/news_detail?id=' + this.data.id,
115 | }
116 | },
117 |
118 | })
--------------------------------------------------------------------------------
/miniprogram/reg/pages/search/search.js:
--------------------------------------------------------------------------------
1 | const SearchBiz = require('../../biz/search_biz.js');
2 | const ccminiPageHelper = require('../../helper/ccmini_page_helper.js');
3 | const PassportBiz = require('../../biz/passport_biz.js');
4 |
5 |
6 | Page({
7 |
8 | /**
9 | * 页面的初始数据
10 | */
11 | data: {
12 | type: '', // 来自哪个业务标识
13 | returnUrl: '', //搜索完返回哪个地址
14 | cacheName: '', //本业务搜索历史缓存
15 | search: '', //搜索关键字
16 |
17 | hisKeys: []
18 | },
19 |
20 | /**
21 | * 生命周期函数--监听页面加载
22 | */
23 | onLoad: async function (options) {
24 | await PassportBiz.initPage(this);
25 |
26 | let type = options.type;
27 |
28 | let cacheName = 'SERACH_HIS_' + type;
29 | this.setData({
30 | type,
31 | cacheName
32 | });
33 | },
34 |
35 | /**
36 | * 生命周期函数--监听页面初次渲染完成
37 | */
38 | onReady: function () {
39 |
40 | },
41 |
42 | /**
43 | * 生命周期函数--监听页面显示
44 | */
45 | onShow: function () {
46 | let hisKeys = SearchBiz.getHistory(this.data.cacheName);
47 | this.setData({
48 | hisKeys
49 | });
50 | },
51 |
52 | /**
53 | * 生命周期函数--监听页面隐藏
54 | */
55 | onHide: function () {
56 |
57 | },
58 |
59 | /**
60 | * 生命周期函数--监听页面卸载
61 | */
62 | onUnload: function () {
63 |
64 | },
65 |
66 | url: function (e) {
67 | ccminiPageHelper.url(e);
68 | },
69 |
70 |
71 | /**
72 | * 点击确认搜索
73 | */
74 | bindSearchConfirm: function (e) {
75 |
76 | if (!this.data.type) return;
77 |
78 | let search = this.data.search.trim();
79 | if (!search) return;
80 |
81 | // 历史记录
82 | let hisKeys = SearchBiz.addHistory(this.data.cacheName, search);
83 | this.setData({
84 | search,
85 | hisKeys
86 | });
87 |
88 | let prevPage = ccminiPageHelper.getPrevPage();
89 | // 直接调用上一个页面的setData()方法,把数据存到上一个页面中去
90 | prevPage.setData({
91 | search,
92 | })
93 |
94 | ccminiPageHelper.goto('', 'back');
95 |
96 | },
97 |
98 | // 清空搜索记录
99 | bindDelHisTap: function (e) {
100 | SearchBiz.clearHistory(this.data.cacheName);
101 | this.setData({
102 | hisKeys: []
103 | });
104 | },
105 |
106 | //清除关键字
107 | bindClearKeyTap: function (e) {
108 | this.setData({
109 | search: ''
110 | });
111 | },
112 |
113 | // 点击历史
114 | bindKeyTap: function (e) {
115 | let search = e.currentTarget.dataset.key.trim();
116 | if (search) {
117 | this.setData({
118 | search
119 | });
120 | this.bindSearchConfirm(e);
121 | }
122 | },
123 |
124 | })
--------------------------------------------------------------------------------
/miniprogram/reg/style/comm/button.wxss:
--------------------------------------------------------------------------------
1 |
2 | /* ==================
3 | 按钮
4 | ==================== */
5 |
6 | .btn {
7 | border: 0rpx;
8 | display: inline-flex;
9 | align-items: center;
10 | justify-content: center;
11 | box-sizing: border-box;
12 | padding: 0 30rpx;
13 | font-size: 28rpx;
14 | height: 64rpx;
15 | line-height: 1;
16 | text-align: center;
17 | text-decoration: none;
18 | overflow: visible;
19 | margin-left: initial;
20 | transform: translate(0rpx, 0rpx);
21 | margin-right: initial;
22 | border-radius: 12rpx;
23 | }
24 |
25 | .btn::after {
26 | display: none;
27 | }
28 |
29 | .btn:not([class*="bg-"]) {
30 | background-color: #f0f0f0;
31 | }
32 |
33 | .btn[class*="border"] {
34 | background-color: transparent;
35 | }
36 |
37 | /* 伪元素边框 */
38 | .btn[class*="border"]::after {
39 | content: " ";
40 | display: block;
41 | width: 200%;
42 | height: 200%;
43 | position: absolute;
44 | top: 0;
45 | left: 0;
46 | border: 1rpx solid currentColor;
47 | transform: scale(0.5);
48 | transform-origin: 0 0;
49 | box-sizing: border-box;
50 | z-index: 1;
51 | pointer-events: none;
52 | border-radius: 12rpx;
53 | }
54 |
55 | .btn[class*="bg-"]::after {
56 | display: none;
57 | }
58 |
59 | .btn.small {
60 | padding: 0 20rpx;
61 | font-size: 20rpx;
62 | height: 48rpx;
63 | border-radius: 10rpx;
64 | }
65 |
66 | .btn.mid {
67 | padding: 0 20rpx;
68 | font-size: 24rpx;
69 | height: 50rpx;
70 | border-radius: 10rpx;
71 | }
72 |
73 | .btn.large {
74 | padding: 0 40rpx;
75 | font-size: 32rpx;
76 | height: 80rpx;
77 | border-radius: 14rpx;
78 | }
79 |
80 | .btn.btn-icon.small {
81 | width: 48rpx;
82 | height: 48rpx;
83 | }
84 |
85 | .btn.btn-icon {
86 | width: 64rpx;
87 | height: 64rpx;
88 | border-radius: 500rpx;
89 | padding: 0;
90 | }
91 |
92 | button.btn-icon.large {
93 | width: 80rpx;
94 | height: 80rpx;
95 | }
96 |
97 | .btn.shadow-blur::before {
98 | top: 4rpx;
99 | left: 4rpx;
100 | filter: blur(6rpx);
101 | opacity: 0.6;
102 | }
103 |
104 | .btn.button-hover {
105 | transform: translate(1rpx, 1rpx);
106 | }
107 |
108 | .btn[disabled] {
109 | opacity: 0.6;
110 | color: var(--white);
111 | }
112 |
113 |
114 | .btn.round {
115 | border-radius: 5000rpx;
116 | }
117 |
118 | .btn.round[class*="border"]::after {
119 | border-radius: 1000rpx;
120 | }
121 |
122 | .btn.border-bold::after {
123 | border: 6rpx solid currentColor;
124 | }
125 |
126 |
--------------------------------------------------------------------------------
/cloudfunctions/reg_cloud/service/base_ccmini_service.js:
--------------------------------------------------------------------------------
1 | // +----------------------------------------------------------------------
2 | // | CCMiniCloud [ Cloud Framework ]
3 | // +----------------------------------------------------------------------
4 | // | Copyright (c) 2021 www.code942.com All rights reserved.
5 | // +----------------------------------------------------------------------
6 | // | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
7 | // +----------------------------------------------------------------------
8 | // | Author: 明章科技
9 | // +----------------------------------------------------------------------
10 |
11 | /**
12 | * Notes: 业务基类
13 | * Ver : CCMiniCloud Framework 2.0.1 ALL RIGHTS RESERVED BY www.code942.com
14 | * Date: 2025-09-05 04:00:00
15 | */
16 |
17 | const CCMiniAppError = require('../framework/handler/ccmini_app_error.js');
18 | const ccminiAppCode = require('../framework/handler/ccmini_app_code.js');
19 | const ccminiTimeUtil = require('../framework/utils/ccmini_time_util.js');
20 | const UserModel = require('../model/user_model.js');
21 | const ccminiConfig = require('../comm/ccmini_config.js');
22 |
23 | class BaseCCMiniService {
24 | constructor() {
25 | // 当前时间戳
26 | this._timestamp = ccminiTimeUtil.time();
27 |
28 | }
29 |
30 | /**
31 | * 抛出异常
32 | * @param {*} msg
33 | * @param {*} code
34 | */
35 | ccminiAppError(msg, code = ccminiAppCode.LOGIC) {
36 | throw new CCMiniAppError(msg, code);
37 | }
38 |
39 | getJoinUserParams(localField = '_openid') {
40 | return {
41 | from: ccminiConfig.PROJECT_MARK + '_user',
42 | localField: localField,
43 | foreignField: 'USER_MINI_OPENID',
44 | as: 'USER_DETAIL',
45 | };
46 | }
47 |
48 | getJoinUserFields() {
49 | return 'USER_DETAIL.USER_ITEM,USER_DETAIL.USER_NAME,USER_DETAIL.USER_PIC,USER_DETAIL.USER_MINI_OPENID,USER_DETAIL.USER_SEX';
50 | }
51 |
52 | getJoinUserFieldsAdmin() {
53 | return 'USER_DETAIL.USER_ITEM,USER_DETAIL.USER_NAME,USER_DETAIL.USER_MINI_OPENID,USER_DETAIL.USER_SEX';
54 | }
55 |
56 | getUserFields() {
57 | return 'USER_NAME,USER_PIC,USER_SEX,USER_MINI_OPENID,USER_ITEM';
58 | }
59 |
60 | async getUserMyBase(userId, fields = this.getUserFields()) {
61 | let where = {
62 | USER_MINI_OPENID: userId
63 | }
64 | return await UserModel.getOne(where, fields);
65 | }
66 |
67 | async getUserOne(userId, fields = this.getUserFields()) {
68 | let where = {
69 | USER_MINI_OPENID: userId
70 | }
71 | return await UserModel.getOne(where, fields);
72 | }
73 |
74 |
75 | }
76 |
77 | module.exports = BaseCCMiniService;
--------------------------------------------------------------------------------
/miniprogram/reg/pages/admin/news/admin_news_add.js:
--------------------------------------------------------------------------------
1 | const AdminBiz = require('../../../biz/admin_biz.js');
2 | const ccminiPageHelper = require('../../../helper/ccmini_page_helper.js');
3 | const ccminiBizHelper = require('../../../helper/ccmini_biz_helper.js');
4 | const ccminiCloudHelper = require('../../../helper/ccmini_cloud_helper.js');
5 | const ccminiValidate = require('../../../helper/ccmini_validate.js');
6 | const AdminNewsBiz = require('../../../biz/admin_news_biz.js');
7 |
8 | Page({
9 |
10 | /**
11 | * 页面的初始数据
12 | */
13 | data: {
14 |
15 | },
16 |
17 | /**
18 | * 生命周期函数--监听页面加载
19 | */
20 | onLoad: async function (options) {
21 |
22 | if (!AdminBiz.isAdmin(this)) return;
23 |
24 | this.setData(await AdminNewsBiz.initFormData()); // 初始化表单数据
25 | this.setData({
26 | isLoad: true
27 | });
28 | },
29 |
30 | /**
31 | * 生命周期函数--监听页面初次渲染完成
32 | */
33 | onReady: function () {
34 |
35 | },
36 |
37 | /**
38 | * 生命周期函数--监听页面显示
39 | */
40 | onShow: function () {
41 |
42 | },
43 |
44 | /**
45 | * 生命周期函数--监听页面隐藏
46 | */
47 | onHide: function () {
48 |
49 | },
50 |
51 | /**
52 | * 生命周期函数--监听页面卸载
53 | */
54 | onUnload: function () {
55 |
56 | },
57 |
58 | model: function (e) {
59 | ccminiPageHelper.model(this, e);
60 | },
61 |
62 |
63 | bindMyPickerCateEventListener: function (e) {
64 | let formCate = e.detail;
65 | this.setData({
66 | formCate
67 | })
68 | },
69 |
70 | /**
71 | * 数据提交
72 | */
73 | bindFormSubmit: async function () {
74 |
75 | let data = this.data;
76 |
77 | // 数据校验
78 | data = ccminiValidate.check(data, AdminNewsBiz.CHECK_FORM, this);
79 | if (!data) return;
80 |
81 | try {
82 | // 先创建,再上传
83 | let result = await ccminiCloudHelper.callCloudSumbit('admin/news_insert', data);
84 |
85 | // 图片 提交处理
86 | let imgList = this.data.imgList;
87 | if (imgList.length > 0) {
88 | wx.showLoading({
89 | title: '提交中...',
90 | mask: true
91 | });
92 |
93 | let newsId = result.data.id;
94 | await AdminNewsBiz.updateNewsPic(newsId, imgList);
95 | }
96 |
97 | let callback = async function () {
98 | ccminiBizHelper.removeCacheList('admin-news');
99 | ccminiPageHelper.goto('admin_news_list', 'back');
100 |
101 | }
102 | ccminiPageHelper.showSuccToast('发布成功', 2000, callback);
103 |
104 | } catch (err) {
105 | console.log(err);
106 | }
107 |
108 | },
109 |
110 |
111 | bindMyImgUploadListener: function (e) {
112 | this.setData({
113 | imgList: e.detail
114 | });
115 | }
116 |
117 | })
--------------------------------------------------------------------------------
/cloudfunctions/reg_cloud/service/news_service.js:
--------------------------------------------------------------------------------
1 | // +----------------------------------------------------------------------
2 | // | CCMiniCloud [ Cloud Framework ]
3 | // +----------------------------------------------------------------------
4 | // | Copyright (c) 2021 www.code942.com All rights reserved.
5 | // +----------------------------------------------------------------------
6 | // | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
7 | // +----------------------------------------------------------------------
8 | // | Author: 明章科技
9 | // +----------------------------------------------------------------------
10 |
11 | /**
12 | * Notes: 公告通知模块业务逻辑
13 | * Ver : CCMiniCloud Framework 2.0.1 ALL RIGHTS RESERVED BY www.code942.com
14 | * Date: 2025-10-29 07:48:00
15 | */
16 |
17 | const BaseCCMiniService = require('./base_ccmini_service.js');
18 | const ccminiDbUtil = require('../framework/database/ccmini_db_util.js');
19 | const ccminiUtil = require('../framework/utils/ccmini_util.js');
20 | const NewsModel = require('../model/news_model.js');
21 | class NewsService extends BaseCCMiniService {
22 |
23 |
24 | async viewNews(id) {
25 |
26 | let fields = '*';
27 |
28 | let where = {
29 | _id: id,
30 | NEWS_STATUS: 1
31 | }
32 | let news = await NewsModel.getOne(where, fields);
33 | if (!news) return null;
34 |
35 | NewsModel.inc(id, 'NEWS_VIEW_CNT', 1);
36 |
37 | return news;
38 | }
39 |
40 | async getNewsList({
41 | search,
42 | cate = '',
43 | sortType,
44 | sortVal,
45 | orderBy,
46 | whereEx,
47 | page,
48 | size,
49 | isTotal = true,
50 | oldTotal
51 | }) {
52 | orderBy = orderBy || {
53 | 'NEWS_ORDER': 'asc',
54 | 'NEWS_ADD_TIME': 'desc'
55 | };
56 | let fields = 'NEWS_PIC,NEWS_VIEW_CNT,NEWS_TITLE,NEWS_DESC,NEWS_ADD_TIME,NEWS_ORDER,NEWS_STATUS';
57 |
58 | let where = {};
59 | where.NEWS_STATUS = 1; // 状态
60 |
61 | if (cate)
62 | where.NEWS_CATE = cate;
63 |
64 | if (ccminiUtil.isDefined(search) && search) {
65 | where.NEWS_TITLE = {
66 | $regex: '.*' + search,
67 | $options: 'i'
68 | };
69 | } else if (sortType && ccminiUtil.isDefined(sortVal)) {
70 | switch (sortType) {
71 | case 'sort':
72 | if (sortVal == 'view') {
73 | orderBy = {
74 | 'NEWS_VIEW_CNT': 'desc',
75 | 'NEWS_ADD_TIME': 'desc'
76 | };
77 | }
78 | if (sortVal == 'new') {
79 | orderBy = {
80 | 'NEWS_ADD_TIME': 'desc'
81 | };
82 | }
83 | break;
84 | }
85 | }
86 |
87 | return await NewsModel.getList(where, fields, orderBy, page, size, isTotal, oldTotal);
88 | }
89 |
90 |
91 | }
92 |
93 | module.exports = NewsService;
--------------------------------------------------------------------------------
/cloudfunctions/reg_cloud/controller/news_controller.js:
--------------------------------------------------------------------------------
1 | // +----------------------------------------------------------------------
2 | // | CCMiniCloud [ Cloud Framework ]
3 | // +----------------------------------------------------------------------
4 | // | Copyright (c) 2021 www.code942.com All rights reserved.
5 | // +----------------------------------------------------------------------
6 | // | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
7 | // +----------------------------------------------------------------------
8 | // | Author: 明章科技
9 | // +----------------------------------------------------------------------
10 |
11 | /**
12 | * Notes: 公告通知模块控制器
13 | * Ver : CCMiniCloud Framework 2.0.1 ALL RIGHTS RESERVED BY www.code942.com
14 | * Date: 2025-09-29 04:00:00
15 | * Version : CCMiniCloud Framework Ver 2.0.1 ALL RIGHTS RESERVED BY 明章科技
16 | */
17 |
18 | const BaseCCMiniController = require('./base_ccmini_controller.js');
19 | const NewsService = require('../service/news_service.js');
20 | const ccminiTimeUtil = require('../framework/utils/ccmini_time_util.js');
21 |
22 | class NewsController extends BaseCCMiniController {
23 |
24 | async getNewsList() {
25 |
26 | // 数据校验
27 | let rules = {
28 | search: 'string|min:1|max:30|name=搜索条件',
29 | cate: 'string|name=分类条件',
30 | sortType: 'string|name=搜索类型',
31 | sortVal: 'name=搜索类型值',
32 | orderBy: 'object|name=排序',
33 | whereEx: 'object|name=附加查询条件',
34 | page: 'required|int|default=1',
35 | size: 'int',
36 | isTotal: 'bool',
37 | oldTotal: 'int',
38 | };
39 |
40 | // 取得数据
41 | let input = this.ccminiValidateData(rules);
42 |
43 | let service = new NewsService();
44 | let result = await service.getNewsList(input);
45 |
46 | // 数据格式化
47 | let list = result.list;
48 |
49 | for (let k in list) {
50 |
51 | list[k].NEWS_ADD_TIME = ccminiTimeUtil.timestamp2Time(list[k].NEWS_ADD_TIME, 'Y-M-D');
52 |
53 | // 默认图片
54 | if (list[k].NEWS_PIC && list[k].NEWS_PIC.length > 0)
55 | list[k].NEWS_PIC = list[k].NEWS_PIC[0]['url'];
56 | else
57 | list[k].NEWS_PIC = '';
58 | }
59 | result.list = list;
60 |
61 | return result;
62 |
63 | }
64 |
65 | async viewNews() {
66 | // 数据校验
67 | let rules = {
68 | id: 'required|id',
69 | };
70 |
71 | // 取得数据
72 | let input = this.ccminiValidateData(rules);
73 |
74 | let service = new NewsService();
75 | let news = await service.viewNews(input.id);
76 |
77 | if (news) {
78 | // 显示转换
79 | news.NEWS_ADD_TIME = ccminiTimeUtil.timestamp2Time(news.NEWS_ADD_TIME, 'Y-M-D');
80 | }
81 |
82 | return news;
83 | }
84 |
85 |
86 | }
87 |
88 | module.exports = NewsController;
--------------------------------------------------------------------------------
/cloudfunctions/reg_cloud/controller/test_controller.js:
--------------------------------------------------------------------------------
1 | // +----------------------------------------------------------------------
2 | // | CCMiniCloud [ Cloud Framework ]
3 | // +----------------------------------------------------------------------
4 | // | Copyright (c) 2021 www.code942.com All rights reserved.
5 | // +----------------------------------------------------------------------
6 | // | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
7 | // +----------------------------------------------------------------------
8 | // | Author: 明章科技
9 | // +----------------------------------------------------------------------
10 |
11 | /**
12 | * Notes: Test控制器
13 | * Ver : CCMiniCloud Framework 2.0.1 ALL RIGHTS RESERVED BY www.code942.com
14 | * Date: 2025-09-10 19:52:00
15 | * Version : CCMiniCloud Framework Ver 2.0.1 ALL RIGHTS RESERVED BY 明章科技
16 | */
17 | const ccminiMock = require('../framework/utils/ccmini_mock.js');
18 | const UserModel = require('../model/user_model.js');
19 |
20 | class TestController {
21 |
22 | async test() {
23 |
24 | console.log('>>>>TEST begin....');
25 |
26 | await this.mockUser();
27 | console.log('<<< Number(data.grad))
89 | return ccminiPageHelper.showModal('入学年份不能早于毕业年份');
90 |
91 | let params = {
92 | formData: data
93 | };
94 | await ccminiCloudHelper.callCloudSumbit('passport/modify', params).then(result => {
95 |
96 | ccminiPageHelper.goto('../reload/my_reload' , 'relaunch');
97 | }).catch(err => {
98 | console.log(err);
99 | });
100 |
101 | },
102 |
103 |
104 | model: function (e) {
105 | let that = this;
106 | ccminiPageHelper.model(that, e);
107 | },
108 |
109 |
110 |
111 | })
--------------------------------------------------------------------------------
/cloudfunctions/reg_cloud/controller/passport_controller.js:
--------------------------------------------------------------------------------
1 | // +----------------------------------------------------------------------
2 | // | CCMiniCloud [ Cloud Framework ]
3 | // +----------------------------------------------------------------------
4 | // | Copyright (c) 2021 www.code942.com All rights reserved.
5 | // +----------------------------------------------------------------------
6 | // | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
7 | // +----------------------------------------------------------------------
8 | // | Author: 明章科技
9 | // +----------------------------------------------------------------------
10 |
11 | /**
12 | * Notes: passport模块控制器
13 | * Ver : CCMiniCloud Framework 2.0.1 ALL RIGHTS RESERVED BY www.code942.com
14 | * Date: 2025-09-10 19:52:00
15 | * Version : CCMiniCloud Framework Ver 2.0.1 ALL RIGHTS RESERVED BY 明章科技
16 | */
17 |
18 | const BaseCCMiniController = require('./base_ccmini_controller.js');
19 | const PassportService = require('../service/passport_service.js');
20 | const ccminiContentCheck = require('../framework/validate/ccmini_content_check.js');
21 |
22 | class PassportController extends BaseCCMiniController {
23 |
24 | async getPhone() {
25 |
26 | // 数据校验
27 | let rules = {
28 | cloudID: 'required|string|min:1|max:200|name=cloudID',
29 | };
30 |
31 | // 取得数据
32 | let input = this.ccminiValidateData(rules);
33 |
34 | let service = new PassportService();
35 | return await service.getPhone(input.cloudID);
36 | }
37 |
38 | async register() {
39 | // 数据校验
40 | let rules = {
41 | phone: 'required|string',
42 | formData: 'required|object',
43 | wechatData: 'required|object',
44 | };
45 |
46 | // 取得数据
47 | let input = this.ccminiValidateData(rules);
48 |
49 | await ccminiContentCheck.checkTextMultiClient(input.formData);
50 |
51 | let service = new PassportService();
52 | return await service.register(this._userId, input);
53 | }
54 |
55 | async modifyBase() {
56 | // 数据校验
57 | let rules = {
58 | formData: 'required|object',
59 | };
60 |
61 | // 取得数据
62 | let input = this.ccminiValidateData(rules);
63 |
64 | await ccminiContentCheck.checkTextMultiClient(input.formData);
65 |
66 | let service = new PassportService();
67 | return await service.modifyBase(this._userId, input);
68 | }
69 |
70 | async login() {
71 | // 数据校验
72 | let rules = {};
73 |
74 | // 取得数据
75 | let input = this.ccminiValidateData(rules);
76 |
77 | let service = new PassportService();
78 | return await service.login(this._userId);
79 | }
80 |
81 | async updatePic() {
82 | // 数据校验
83 | let rules = {
84 | fileID: 'required|string',
85 | };
86 |
87 | // 取得数据
88 | let input = this.ccminiValidateData(rules);
89 |
90 | let service = new PassportService();
91 | return await service.updatePic(this._userId, input.fileID);
92 | }
93 |
94 | }
95 |
96 | module.exports = PassportController;
--------------------------------------------------------------------------------
/miniprogram/reg/pages/admin/user/admin_user_detail.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 | {{user.USER_NAME}}
10 |
11 |
12 |
13 | 班级:{{user.USER_ITEM}} ({{user.USER_ENROLL}}-{{user.USER_GRAD}})
14 |
15 |
16 |
17 | 性别:{{user.USER_SEX==1?'男':'女'}}
18 |
19 |
20 | 活跃:{{user.USER_LOGIN_TIME}}
21 |
22 |
23 | 注册:{{user.USER_ADD_TIME}}
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 | 生日:{{user.USER_BIRTH}}
33 | | 城市:{{user.USER_CITY}}
34 |
35 |
36 |
37 | 学历:{{user.USER_EDU}}
38 |
39 |
40 |
41 |
42 |
43 | 工作信息
44 |
45 |
46 |
47 | 当前行业:{{user.USER_TRADE}}
48 |
49 |
50 |
51 | 工作单位:{{user.USER_COMPANY}}
52 |
53 |
54 |
55 |
56 | 当前职位:{{user.USER_COMPANY_DUTY}}
57 |
58 |
59 |
60 |
61 | 联系信息
62 |
63 |
64 |
65 |
66 |
67 |
68 | 联系电话:{{user.USER_MOBILE}}
69 |
70 |
71 |
72 |
73 | 微信号:{{user.USER_WECHAT}}
74 |
75 |
76 |
77 | 电子邮箱:{{user.USER_EMAIL}}
78 |
79 |
80 |
81 | QQ号码:{{user.USER_QQ}}
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 | 自我介绍:{{user.USER_DESC}}
90 |
91 |
92 |
93 | 资源与需求:{{user.USER_RESOURCE}}
94 |
95 |
96 |
97 |
98 |
99 |
--------------------------------------------------------------------------------
/miniprogram/reg/style/comm/shadow.wxss:
--------------------------------------------------------------------------------
1 |
2 | /* ==================
3 | 阴影
4 | ==================== */
5 | /* -- 形状阴影 -- */
6 | .shadow[class*='white'] {
7 | --ShadowSize: 0 1rpx 6rpx;
8 | }
9 |
10 | .shadow-large {
11 | --ShadowSize: 0rpx 40rpx 100rpx 0rpx;
12 | }
13 |
14 | .shadow-warp {
15 | position: relative;
16 | box-shadow: 0 0 10rpx rgba(0, 0, 0, 0.1);
17 | }
18 |
19 | .shadow-warp:before,
20 | .shadow-warp:after {
21 | position: absolute;
22 | content: "";
23 | top: 20rpx;
24 | bottom: 30rpx;
25 | left: 20rpx;
26 | width: 50%;
27 | box-shadow: 0 30rpx 20rpx rgba(0, 0, 0, 0.2);
28 | transform: rotate(-3deg);
29 | z-index: -1;
30 | }
31 |
32 | .shadow-warp:after {
33 | right: 20rpx;
34 | left: auto;
35 | transform: rotate(3deg);
36 | }
37 |
38 | .shadow-blur {
39 | position: relative;
40 | }
41 |
42 | .shadow-blur::before {
43 | content: "";
44 | display: block;
45 | background: inherit;
46 | filter: blur(10rpx);
47 | position: absolute;
48 | width: 100%;
49 | height: 100%;
50 | top: 10rpx;
51 | left: 10rpx;
52 | z-index: -1;
53 | opacity: 0.4;
54 | transform-origin: 0 0;
55 | border-radius: inherit;
56 | transform: scale(1, 1);
57 | }
58 |
59 |
60 | .shadow {
61 | box-shadow: var(--ShadowSize) var(--greyShadow);
62 | }
63 |
64 | .shadow[class*="-red"] {
65 | box-shadow: var(--ShadowSize) var(--redShadow);
66 | }
67 |
68 | .shadow[class*="-orange"] {
69 | box-shadow: var(--ShadowSize) var(--orangeShadow);
70 | }
71 |
72 | .shadow[class*="-yellow"] {
73 | box-shadow: var(--ShadowSize) var(--yellowShadow);
74 | }
75 |
76 | .shadow[class*="-olive"] {
77 | box-shadow: var(--ShadowSize) var(--oliveShadow);
78 | }
79 |
80 | .shadow[class*="-green"] {
81 | box-shadow: var(--ShadowSize) var(--greenShadow);
82 | }
83 |
84 | .shadow[class*="-darkgreen"] {
85 | box-shadow: var(--ShadowSize) var(--darkgreenShadow);
86 | }
87 |
88 | .shadow[class*="-cyan"] {
89 | box-shadow: var(--ShadowSize) var(--cyanShadow);
90 | }
91 |
92 | .shadow[class*="-blue"] {
93 | box-shadow: var(--ShadowSize) var(--blueShadow);
94 | }
95 |
96 | .shadow[class*="-purple"] {
97 | box-shadow: var(--ShadowSize) var(--purpleShadow);
98 | }
99 |
100 | .shadow[class*="-mauve"] {
101 | box-shadow: var(--ShadowSize) var(--mauveShadow);
102 | }
103 |
104 | .shadow[class*="-pink"] {
105 | box-shadow: var(--ShadowSize) var(--pinkShadow);
106 | }
107 |
108 | .shadow[class*="-brown"] {
109 | box-shadow: var(--ShadowSize) var(--brownShadow);
110 | }
111 |
112 | .shadow[class*="-grey"] {
113 | box-shadow: var(--ShadowSize) var(--greyShadow);
114 | }
115 |
116 | .shadow[class*="-gray"] {
117 | box-shadow: var(--ShadowSize) var(--grayShadow);
118 | }
119 |
120 | .shadow[class*="-black"] {
121 | box-shadow: var(--ShadowSize) var(--blackShadow);
122 | }
123 |
124 | .shadow[class*="-white"] {
125 | box-shadow: var(--ShadowSize) var(--blackShadow);
126 | }
127 |
128 |
--------------------------------------------------------------------------------
/cloudfunctions/reg_cloud/framework/validate/ccmini_content_check.js:
--------------------------------------------------------------------------------
1 | // +----------------------------------------------------------------------
2 | // | CCMiniCloud [ Cloud Framework ]
3 | // +----------------------------------------------------------------------
4 | // | Copyright (c) 2021 www.code942.com All rights reserved.
5 | // +----------------------------------------------------------------------
6 | // | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
7 | // +----------------------------------------------------------------------
8 | // | Author: 明章科技
9 | // +----------------------------------------------------------------------
10 |
11 | /**
12 | * Notes: 内容审核
13 | * Ver : CCMiniCloud Framework 2.0.1 ALL RIGHTS RESERVED BY www.code942.com
14 | * Date: 2025-09-05 04:00:00
15 | * Version : CCMiniCloud Framework Ver 2.0.1 ALL RIGHTS RESERVED BY 明章科技
16 | */
17 |
18 | const CCMiniAppError = require('../handler/ccmini_app_error.js');
19 | const ccminiCloudBase = require('../cloud/ccmini_cloud_base.js');
20 | const ccminiConfig = require('../../comm/ccmini_config.js');
21 |
22 |
23 | /**
24 | * 后台把输入数据里的文本数据提交内容审核
25 | * @param {*} input
26 | */
27 | async function checkTextMultiAdmin(input) {
28 | if (!ccminiConfig.CCMINI_ADMIN_CHECK_CONTENT) return;
29 | return checkTextMulti(input);
30 | }
31 |
32 | /**
33 | * 前台把输入数据里的文本数据提交内容审核
34 | * @param {*} input
35 | */
36 | async function checkTextMultiClient(input) {
37 | if (!ccminiConfig.CCMINI_CLIENT_CHECK_CONTENT) return;
38 | return checkTextMulti(input);
39 | }
40 |
41 | /**
42 | * 把输入数据里的文本数据提交内容审核
43 | * @param {*} input
44 | */
45 | async function checkTextMulti(input) {
46 | let txt = '';
47 | for (let k in input) {
48 | if (typeof (input[k]) === 'string')
49 | txt += input[k];
50 | }
51 | await checkText(txt);
52 | }
53 | /**
54 | * 后台校验文字信息
55 | * @param {*}
56 | */
57 | async function checkTextAdmin(txt) {
58 | if (!ccminiConfig.CCMINI_ADMIN_CHECK_CONTENT) return;
59 | return checkText(txt);
60 | }
61 |
62 | /**
63 | * 前台校验文字信息
64 | * @param {*}
65 | */
66 | async function checkTextClient(txt) {
67 | if (!ccminiConfig.CCMINI_CLIENT_CHECK_CONTENT) return;
68 | return checkText(txt);
69 | }
70 |
71 | /**
72 | * 校验文字信息
73 | * @param {*}
74 | */
75 | async function checkText(txt) {
76 | if (!txt) return;
77 |
78 | let cloud = ccminiCloudBase.getCloud();
79 | try {
80 | const result = await cloud.openapi.security.msgSecCheck({
81 | content: txt
82 |
83 | })
84 |
85 | if (!result || result.errCode !== 0) {
86 | throw new CCMiniAppError('文字内容不合适,请修改或者重试');
87 | }
88 |
89 | } catch (err) {
90 | console.log('checkText ex', err);
91 | throw new CCMiniAppError('文字内容不合适,请修改或者重试');
92 | }
93 |
94 | }
95 |
96 | module.exports = {
97 | checkTextMulti,
98 | checkTextMultiClient,
99 | checkTextMultiAdmin,
100 | checkText,
101 | checkTextClient,
102 | checkTextAdmin
103 | }
--------------------------------------------------------------------------------
/miniprogram/reg/pages/admin/index/admin_home.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 | {{projectName}} - {{admin.name}}
10 |
11 |
12 | 共登录{{admin.cnt}}次,上次{{admin.last}}
13 |
14 |
15 |
16 |
17 | {{data.newsCnt}}公告通知
19 | {{data.userCnt}}用户
21 |
22 |
23 |
24 |
25 |
26 |
27 | 功能管理
28 |
29 |
30 |
31 |
32 | 用户管理
34 |
35 | 公告通知
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 | 系统参数设置
48 |
49 |
50 |
51 |
52 |
53 |
54 | 最新版本
55 |
56 |
57 |
58 |
59 |
60 |
61 | 当前版本(mini):{{projectVer}}
62 |
63 |
64 |
65 |
66 |
67 | 当前版本(cloud):{{data.projectVerCloud}}
68 |
69 |
70 |
71 |
72 |
73 |
74 | 源码更新与下载:{{data.projectSource}}
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
--------------------------------------------------------------------------------
/miniprogram/reg/biz/reg_biz.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Notes: 注册模块业务逻辑
3 | * Ver : CCMiniCloud Framework 2.0.1 ALL RIGHTS RESERVED BY www.code942.com
4 | * Date: 2025-11-14 07:48:00
5 | */
6 |
7 | const BaseCCMiniBiz = require('./base_ccmini_biz.js');
8 | const ccminiCacheHelper = require('../helper/ccmini_cache_helper.js');
9 | const ccminiCloudHelper = require('../helper/ccmini_cloud_helper.js');
10 | const ccminiHelper = require('../helper/ccmini_helper.js');
11 | const ccminiValidate = require('../helper/ccmini_validate.js');
12 | const ccminiPageHelper = require('../helper/ccmini_page_helper.js');
13 |
14 | /**
15 | *
16 | */
17 | class RegBiz extends BaseCCMiniBiz {
18 | /**
19 | * 判断第一步是否完成
20 | */
21 | static isStep1() {
22 | let cache = ccminiCacheHelper.get(RegBiz.CACHE_REG);
23 | if (!cache || !cache['phone'])
24 | return false;
25 | else
26 | return true;
27 | }
28 |
29 | /**
30 | * 判断第2步是否完成
31 | */
32 | static isStep2() {
33 | let cache = ccminiCacheHelper.get(RegBiz.CACHE_REG);
34 | if (!cache || !cache['user'])
35 | return false;
36 | else
37 | return true;
38 | }
39 |
40 | static clearRegCache() {
41 | ccminiCacheHelper.remove(RegBiz.CACHE_REG);
42 | }
43 |
44 | /**
45 | * 保存已授权或者填写的信息 phone=电话 user=微信资料 form=填写的表单
46 | * @param {*} key
47 | * @param {*} val
48 | */
49 | static setRegCache(key, val) {
50 | let cache = ccminiCacheHelper.get(RegBiz.CACHE_REG);
51 | if (!cache) cache = {};
52 | cache[key] = val;
53 | ccminiCacheHelper.set(RegBiz.CACHE_REG, cache, 3600 * 30);
54 | }
55 |
56 | /**
57 | * 获取授权或者填写的信息
58 | * @param {*} key
59 | */
60 | static getRegCache(key) {
61 | let cache = ccminiCacheHelper.get(RegBiz.CACHE_REG);
62 | if (cache && cache[key]) return cache[key];
63 | return null;
64 | }
65 |
66 |
67 |
68 | /**
69 | * 注册第二步
70 | * @param {*} e
71 | */
72 | static async registerStep2(e) {
73 | wx.getUserProfile({
74 | desc: '用于完善资料',
75 | success: async (res) => {
76 | let userInfo = res.userInfo;
77 | if (!ccminiHelper.isDefined(userInfo) || !userInfo)
78 | wx.showToast({
79 | title: '授权失败,请重新授权',
80 | icon: 'none',
81 | duration: 4000
82 | });
83 | else {
84 |
85 | let cloudID = res.cloudID;
86 | let params = {
87 | cloudID
88 | };
89 | let opt = {
90 | title: '请稍等'
91 | };
92 |
93 | userInfo.unionId = 'unionId';
94 |
95 | // 存储 用户信息
96 | RegBiz.setRegCache('user', userInfo);
97 | ccminiPageHelper.goto('reg_step3');
98 | };
99 | },
100 | fail: (err) => {
101 | wx.showToast({
102 | title: '授权失败,请重新授权',
103 | icon: 'none'
104 | });
105 | }
106 | })
107 | }
108 |
109 | /**
110 | * 注册第一步
111 | * @param {*} e
112 | */
113 | static async registerStep1(e) {
114 | RegBiz.setRegCache('phone', '13900000000');
115 | ccminiPageHelper.goto('reg_step2');
116 | }
117 | }
118 | RegBiz.CACHE_REG = 'CACHE_REG_INFO';
119 |
120 | module.exports = RegBiz;
--------------------------------------------------------------------------------
/miniprogram/reg/style/comm/border.wxss:
--------------------------------------------------------------------------------
1 |
2 | /* ==================
3 | 边框 line为伪元素
4 | ==================== */
5 |
6 | .border-red::after {
7 | border-color: var(--red);
8 | }
9 |
10 | .border-orange::after {
11 | border-color: var(--orange);
12 | }
13 |
14 | .border-yellow::after {
15 | border-color: var(--yellow);
16 | }
17 |
18 | .border-olive::after {
19 | border-color: var(--olive);
20 | }
21 |
22 | .border-green::after {
23 | border-color: var(--green);
24 | }
25 |
26 | .border-darkgreen::after {
27 | border-color: var(--darkgreen);
28 | }
29 |
30 | .border-cyan::after {
31 | border-color: var(--cyan);
32 | }
33 |
34 | .border-blue::after {
35 | border-color: var(--blue);
36 | }
37 |
38 | .border-purple::after {
39 | border-color: var(--purple);
40 | }
41 |
42 | .border-mauve::after {
43 | border-color: var(--mauve);
44 | }
45 |
46 | .border-pink::after {
47 | border-color: var(--pink);
48 | }
49 |
50 | .border-brown::after {
51 | border-color: var(--brown);
52 | }
53 |
54 | .border-grey::after {
55 | border-color: var(--grey);
56 | }
57 |
58 | .border-gray::after {
59 | border-color: var(--gray);
60 | }
61 |
62 | .border-black::after {
63 | border-color: var(--black);
64 | }
65 |
66 | .border-white::after {
67 | border-color: var(--white);
68 | }
69 |
70 |
71 |
72 | /* ==================
73 | 边框
74 | ==================== */
75 |
76 | /* -- 实线 -- */
77 |
78 | .solid,
79 | .solid-top,
80 | .solid-right,
81 | .solid-bottom,
82 | .solid-left,
83 | .solid-bold,
84 | .solid-bold-top,
85 | .solid-bold-right,
86 | .solid-bold-bottom,
87 | .solid-bold-left {
88 | position: relative;
89 | }
90 |
91 | .solid::after,
92 | .solid-top::after,
93 | .solid-right::after,
94 | .solid-bottom::after,
95 | .solid-left::after,
96 | .solid-bold::after,
97 | .solid-bold-top::after,
98 | .solid-bold-right::after,
99 | .solid-bold-bottom::after,
100 | .solid-bold-left::after {
101 | content: " ";
102 | width: 200%;
103 | height: 200%;
104 | position: absolute;
105 | top: 0;
106 | left: 0;
107 | border-radius: inherit;
108 | transform: scale(0.5);
109 | transform-origin: 0 0;
110 | pointer-events: none;
111 | box-sizing: border-box;
112 | }
113 |
114 | .solid::after {
115 | border: 4rpx solid rgba(0, 0, 0, 0.1);
116 | }
117 |
118 | .solid-top::after {
119 | border-top: 4rpx solid rgba(0, 0, 0, 0.1);
120 | }
121 |
122 | .solid-right::after {
123 | border-right: 4rpx solid rgba(0, 0, 0, 0.1);
124 | }
125 |
126 | .solid-bottom::after {
127 | border-bottom: 4rpx solid rgba(0, 0, 0, 0.1);
128 | }
129 |
130 | .solid-left::after {
131 | border-left: 4rpx solid rgba(0, 0, 0, 0.1);
132 | }
133 |
134 | .solid-bold::after {
135 | border: 8rpx solid #eee;
136 | }
137 |
138 | .solid-bold-top::after {
139 | border-top: 8rpx solid #eee;
140 | }
141 |
142 | .solid-bold-right::after {
143 | border-right: 8rpx solid #eee;
144 | }
145 |
146 | .solid-bold-bottom::after {
147 | border-bottom: 8rpx solid #eee;
148 | }
149 |
150 | .solid-bold-left::after {
151 | border-left: 8rpx solid #eee;
152 | }
--------------------------------------------------------------------------------
/miniprogram/reg/style/comm/tag.wxss:
--------------------------------------------------------------------------------
1 |
2 | /* ==================
3 | 标签
4 | ==================== */
5 |
6 | .tag {
7 | font-size: 24rpx;
8 | vertical-align: middle;
9 | position: relative;
10 | display: inline-flex;
11 | align-items: center;
12 | justify-content: center;
13 | box-sizing: border-box;
14 | padding: 0rpx 16rpx;
15 | height: 48rpx;
16 | font-family: Helvetica Neue, Helvetica, sans-serif;
17 | white-space: nowrap;
18 | }
19 |
20 | .tag:not([class*="bg"]):not([class*="border"]) {
21 | background-color: var(--ghostWhite);
22 | }
23 |
24 | .tag[class*="border-"]::after {
25 | content: " ";
26 | width: 200%;
27 | height: 200%;
28 | position: absolute;
29 | top: 0;
30 | left: 0;
31 | border: 1rpx solid currentColor;
32 | transform: scale(0.5);
33 | transform-origin: 0 0;
34 | box-sizing: border-box;
35 | border-radius: inherit;
36 | z-index: 1;
37 | pointer-events: none;
38 | }
39 |
40 | .tag.radius[class*="border"]::after {
41 | border-radius: 12rpx;
42 | }
43 |
44 | .tag.round[class*="border"]::after {
45 | border-radius: 1000rpx;
46 | }
47 |
48 | .tag[class*="border-"]::after {
49 | border-radius: 0;
50 | }
51 |
52 | .tag.border-bold::after {
53 | border: 6rpx solid currentColor;
54 | }
55 |
56 | .tag+.tag {
57 | margin-left: 10rpx;
58 | }
59 |
60 | .tag.small {
61 | font-size: 20rpx;
62 | padding: 0rpx 12rpx;
63 | height: 32rpx;
64 | }
65 |
66 | .capsule {
67 | display: inline-flex;
68 | vertical-align: middle;
69 | }
70 |
71 | .capsule+.capsule {
72 | margin-left: 10rpx;
73 | }
74 |
75 | .capsule .tag {
76 | margin: 0;
77 | }
78 |
79 | .capsule .tag[class*="border-"]:last-child::after {
80 | border-left: 0rpx solid transparent;
81 | }
82 |
83 | .capsule .tag[class*="border-"]:first-child::after {
84 | border-right: 0rpx solid transparent;
85 | }
86 |
87 | .capsule.radius .tag:first-child {
88 | border-top-left-radius: 6rpx;
89 | border-bottom-left-radius: 6rpx;
90 | }
91 |
92 | .capsule.radius .tag:last-child::after,
93 | .capsule.radius .tag[class*="border-"] {
94 | border-top-right-radius: 12rpx;
95 | border-bottom-right-radius: 12rpx;
96 | }
97 |
98 | .capsule.round .tag:first-child {
99 | border-top-left-radius: 200rpx;
100 | border-bottom-left-radius: 200rpx;
101 | text-indent: 4rpx;
102 | }
103 |
104 | .capsule.round .tag:last-child::after,
105 | .capsule.round .tag:last-child {
106 | border-top-right-radius: 200rpx;
107 | border-bottom-right-radius: 200rpx;
108 | text-indent: -4rpx;
109 | }
110 |
111 | .tag.badge {
112 | border-radius: 200rpx;
113 | position: absolute;
114 | top: -10rpx;
115 | right: -10rpx;
116 | font-size: 20rpx;
117 | padding: 0rpx 10rpx;
118 | height: 28rpx;
119 | color: var(--white);
120 | }
121 |
122 | .tag.badge:not([class*="bg-"]) {
123 | background-color: #dd514c;
124 | }
125 |
126 | .tag:empty:not([class*="icon-"]) {
127 | padding: 0rpx;
128 | width: 16rpx;
129 | height: 16rpx;
130 | top: -4rpx;
131 | right: -4rpx;
132 | }
133 |
134 | .tag[class*="icon-"] {
135 | width: 32rpx;
136 | height: 32rpx;
137 | top: -4rpx;
138 | right: -4rpx;
139 | }
140 |
--------------------------------------------------------------------------------
/miniprogram/reg/pages/user/user_index.wxml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
7 |
9 |
10 |
11 |
12 |
13 |
15 |
16 |
17 |
19 |
20 |
21 |
22 |
23 |
24 | {{item.USER_NAME}}
25 | {{item.USER_ITEM}}|{{item.USER_CITY}}|{{item.USER_BIRTH}}
27 |
28 |
29 |
30 |
31 |
32 | {{item.USER_ENROLL}}-{{item.USER_GRAD}}|{{item.USER_EDU}}
33 |
34 |
35 | {{item.USER_COMPANY}}|{{item.USER_COMPANY_DUTY}}
36 |
37 |
38 | {{item.USER_TRADE}}
39 |
40 |
41 |
42 |
43 |
44 | {{item.USER_LOGIN_TIME}} 活跃
45 |
46 |
47 |
48 | {{item.USER_INFO_CNT}}
49 |
50 |
51 |
52 |
53 | {{item.USER_ALBUM_CNT}}
54 |
55 |
56 |
57 |
58 | {{item.USER_MEET_CNT}}
59 |
60 |
61 |
62 | {{item.USER_MEET_JOIN_CNT}}
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
--------------------------------------------------------------------------------
/miniprogram/reg/ccmini-cmpts/public/list/comm_list_cmpt.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 | {{ index==sortIndex && item.items[sortItemIndex] ? item.items[sortItemIndex].label: item.items[0].label}}
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 | {{its.label}}
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
--------------------------------------------------------------------------------
/miniprogram/reg/ccmini-cmpts/public/img/img_upload_cmpt.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Notes:
3 | * Ver : CCMiniCloud Framework 2.0.1 ALL RIGHTS RESERVED BY www.code942.com
4 | * Date: 2025-08-14 07:48:00
5 | */
6 |
7 | const ccminiPageHelper = require('../../../helper/ccmini_page_helper.js');
8 | const ccminiCloudHelper = require('../../../helper/ccmini_cloud_helper.js');
9 | const ccminiContentCheckHelper = require('../../../helper/ccmini_content_check_helper.js');
10 | const CCMINI_SETTING = require('../../../helper/ccmini_setting.js');
11 |
12 | Component({
13 | /**
14 | * 组件的属性列表
15 | */
16 | properties: {
17 | imgList: {
18 | type: Array,
19 | value: []
20 |
21 | },
22 | imgMax: {
23 | type: Number,
24 | value: 4,
25 | },
26 | title: {
27 | type: String,
28 | value: '图片上传',
29 | },
30 | isCheck:{
31 | type: Boolean,
32 | value: true,
33 | },
34 | imgUploadSize:{
35 | type: Number,
36 | value: CCMINI_SETTING.IMG_UPLOAD_SIZE,
37 | }
38 | },
39 |
40 | /**
41 | * 组件的初始数据
42 | */
43 | data: {
44 | //imgList:[]
45 | },
46 |
47 |
48 | /**
49 | * 生命周期方法
50 | */
51 | lifetimes: {
52 | attached: function () {
53 |
54 | },
55 |
56 | ready: function () {
57 |
58 | },
59 | detached: function () {
60 | // 在组件实例被从页面节点树移除时执行
61 | },
62 | },
63 |
64 | /**
65 | * 组件的方法列表
66 | */
67 | methods: {
68 | /**
69 | * 选择上传图片
70 | */
71 | bindChooseImgTap: function (e) {
72 | wx.chooseImage({
73 | count: this.data.imgMax - this.data.imgList.length, //默认9
74 | sizeType: ['compressed'], //可以指定是原图还是压缩图,默认二者都有
75 | sourceType: ['album', 'camera'], //从相册选择
76 | success: async (res) => {
77 | wx.showLoading({
78 | title: '图片校验中',
79 | mask: true
80 | });
81 |
82 | for (let k = 0; k < res.tempFiles.length; k++) {
83 | let size = res.tempFiles[k].size;
84 | let path = res.tempFiles[k].path;
85 | console.log('size=' + size + ',path=' + path)
86 | if (!ccminiContentCheckHelper.imgTypeCheck(path)) {
87 | wx.hideLoading();
88 | return ccminiPageHelper.showNoneToast('只能上传png、jpg、jpep格式', 3000);
89 | }
90 |
91 | let imageMaxSize = 1024 * 1000 * this.data.imgUploadSize;
92 | if (!ccminiContentCheckHelper.imgSizeCheck(size, imageMaxSize)) {
93 | wx.hideLoading();
94 | return ccminiPageHelper.showNoneToast('单张图片大小不能超过 ' + this.data.imgUploadSize + 'M', 3000);
95 | }
96 |
97 | this.setData({
98 | imgList: this.data.imgList.concat(path)
99 | });
100 | this.triggerEvent('myImgUploadEvent', this.data.imgList);
101 |
102 | }
103 |
104 | wx.hideLoading();
105 | }
106 | });
107 | },
108 |
109 | bindPreviewImgTap: function (e) {
110 | wx.previewImage({
111 | urls: this.data.imgList,
112 | current: e.currentTarget.dataset.url
113 | });
114 | },
115 |
116 | /**
117 | * 删除图片
118 | */
119 | catchDelImgTap: function (e) {
120 | let that = this;
121 | let callback = function () {
122 | that.data.imgList.splice(e.currentTarget.dataset.index, 1);
123 | that.setData({
124 | imgList: that.data.imgList
125 | });
126 | that.triggerEvent('myImgUploadEvent', that.data.imgList);
127 | }
128 | ccminiPageHelper.showConfirm('确定要删除该图片吗?', callback);
129 | },
130 |
131 | }
132 | })
--------------------------------------------------------------------------------
/cloudfunctions/reg_cloud/framework/cloud/ccmini_cloud_util.js:
--------------------------------------------------------------------------------
1 | // +----------------------------------------------------------------------
2 | // | CCMiniCloud [ Cloud Framework ]
3 | // +----------------------------------------------------------------------
4 | // | Copyright (c) 2021 www.code942.com All rights reserved.
5 | // +----------------------------------------------------------------------
6 | // | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
7 | // +----------------------------------------------------------------------
8 | // | Author: 明章科技
9 | // +----------------------------------------------------------------------
10 |
11 | /**
12 | * Notes: 云基本操作模块
13 | * Ver : CCMiniCloud Framework 2.0.1 ALL RIGHTS RESERVED BY www.code942.com
14 | * Date: 2025-09-05 04:00:00
15 | * Version : CCMiniCloud Framework Ver 2.0.1 ALL RIGHTS RESERVED BY 明章科技
16 | */
17 | const ccminiCloudBase = require('./ccmini_cloud_base.js');
18 |
19 | function log(method, err, level = 'error') {
20 | const cloud = ccminiCloudBase.getCloud();
21 | const log = cloud.logger();
22 | log.error({
23 | method: method,
24 | errCode: err.code,
25 | errMsg: err.message,
26 | errStack: err.stack
27 | });
28 | }
29 |
30 | async function getTempFileURLOne(fileID) {
31 | if (!fileID) return '';
32 |
33 | const cloud = ccminiCloudBase.getCloud();
34 | let result = await cloud.getTempFileURL({
35 | fileList: [fileID],
36 | })
37 | if (result && result.fileList && result.fileList[0] && result.fileList[0].tempFileURL)
38 | return result.fileList[0].tempFileURL;
39 | return '';
40 | }
41 |
42 | async function getTempFileURL(tempFileList, isValid = false) {
43 | if (!tempFileList || tempFileList.length == 0) return [];
44 |
45 | const cloud = ccminiCloudBase.getCloud();
46 | let result = await cloud.getTempFileURL({
47 | fileList: tempFileList,
48 | })
49 | console.log(result);
50 |
51 | let list = result.fileList;
52 | let outList = [];
53 | for (let i = 0; i < list.length; i++) {
54 | let pic = {};
55 | if (list[i].status == 0) {
56 | pic.url = list[i].tempFileURL;
57 | pic.cloudId = list[i].fileID;
58 | outList.push(pic)
59 | } else {
60 | if (!isValid) {
61 | pic.url = list[i].fileID;
62 | pic.cloudId = list[i].fileID;
63 | outList.push(pic)
64 | }
65 | }
66 | }
67 | console.log(outList);
68 | return outList;
69 | }
70 |
71 |
72 | async function handlerCloudFiles(oldFiles, newFiles) {
73 | const cloud = ccminiCloudBase.getCloud();
74 | for (let i = 0; i < oldFiles.length; i++) {
75 | let isDel = true;
76 | for (let j = 0; j < newFiles.length; j++) {
77 | if (oldFiles[i].url == newFiles[j].url) {
78 | newFiles[j].cloudId = oldFiles[i].cloudId;
79 | isDel = false;
80 | break;
81 | }
82 | }
83 |
84 | if (isDel && oldFiles[i].cloudId) {
85 |
86 | let result = await cloud.deleteFile({
87 | fileList: [oldFiles[i].cloudId],
88 | });
89 | console.log(result);
90 | }
91 |
92 | }
93 |
94 | return newFiles;
95 | }
96 |
97 | async function deleteFiles(list = []) {
98 | const cloud = ccminiCloudBase.getCloud();
99 | if (!Array.isArray(list) || list.length == 0) return;
100 | await cloud.deleteFile({
101 | fileList: list,
102 | });
103 | }
104 |
105 | module.exports = {
106 | log,
107 | getTempFileURL,
108 | getTempFileURLOne,
109 | deleteFiles,
110 | handlerCloudFiles
111 | }
--------------------------------------------------------------------------------
/miniprogram/reg/pages/register/reg_step3.js:
--------------------------------------------------------------------------------
1 | const ccminiPageHelper = require('../../helper/ccmini_page_helper.js');
2 | const ccminiValidate = require('../../helper/ccmini_validate.js');
3 | const UserBiz = require('../../biz/user_biz.js');
4 | const RegBiz = require('../../biz/reg_biz.js');
5 | const ccminiCloudHelper = require('../../helper/ccmini_cloud_helper.js');
6 | const PassportBiz = require('../../biz/passport_biz.js');
7 | const ccminiCacheHelper = require('../../helper/ccmini_cache_helper.js');
8 | const CCMINI_SETTING = require('../../helper/ccmini_setting.js');
9 | const ccminiHelper = require('../../helper/ccmini_helper.js');
10 | const ccminiComm = require('../../helper/ccmini_comm.js');
11 |
12 | Page({
13 |
14 | /**
15 | * 页面的初始数据
16 | */
17 | data: {
18 | formSex: 1,
19 |
20 | eduOptions: UserBiz.EDU_OPTIONS,
21 |
22 | formEduIndex: 3,
23 |
24 | },
25 |
26 | /**
27 | * 生命周期函数--监听页面加载
28 | */
29 | onLoad: async function (options) {
30 | await PassportBiz.initPage(this);
31 |
32 | if (await PassportBiz.isRegister(this)) return;
33 |
34 | // 判断是否有phone认证
35 | if (!RegBiz.isStep1())
36 | return ccminiPageHelper.goto('reg_step1', 'relaunch');
37 |
38 | if (!RegBiz.isStep2())
39 | return ccminiPageHelper.goto('reg_step2', 'back');
40 | },
41 |
42 | /**
43 | * 生命周期函数--监听页面初次渲染完成
44 | */
45 | onReady: function () {
46 |
47 | },
48 |
49 | /**
50 | * 生命周期函数--监听页面显示
51 | */
52 | onShow: function () {
53 |
54 | },
55 |
56 | /**
57 | * 生命周期函数--监听页面隐藏
58 | */
59 | onHide: function () {
60 |
61 | },
62 |
63 | /**
64 | * 生命周期函数--监听页面卸载
65 | */
66 | onUnload: function () {
67 |
68 | },
69 |
70 | model: function (e) {
71 | let that = this;
72 | ccminiPageHelper.model(that, e);
73 | },
74 |
75 | bindSubmitForm: async function (e) {
76 | let data = this.data;
77 | data.formEdu = UserBiz.EDU_OPTIONS[data.formEduIndex];
78 |
79 | // 判断是否有phone认证和微信授权
80 | if (!RegBiz.isStep1() || !RegBiz.isStep2())
81 | return ccminiPageHelper.goto("reg_step1", 'relaunch');
82 |
83 | // 数据清洗与校验
84 | let checkRules = UserBiz.getFormCheckRules();
85 |
86 |
87 | data = ccminiValidate.check(data, checkRules, this);
88 | if (!data) return;
89 | if (Number(data.enroll) > Number(data.grad))
90 | return ccminiPageHelper.showModal('入学年份不能早于毕业年份');
91 |
92 | let opt = {
93 | title: '注册中'
94 | };
95 | let params = {};
96 | params.wechatData = RegBiz.getRegCache('user');
97 | params.phone = RegBiz.getRegCache('phone');
98 | params.formData = data;
99 |
100 |
101 | await ccminiCloudHelper.callCloudSumbit('passport/reg', params, opt).then(result => {
102 | ccminiCacheHelper.clear();
103 | if (result && ccminiHelper.isDefined(result.data.token) && result.data.token) {
104 | ccminiCacheHelper.set(ccminiComm.CACHE_TOKEN, result.data.token, CCMINI_SETTING.PASSPORT_TOKEN_EXPIRE);
105 |
106 | // 清除注册缓存
107 | RegBiz.clearRegCache();
108 | ccminiPageHelper.showSuccToast('注册成功!');
109 |
110 | setTimeout(() => {
111 | return ccminiPageHelper.goto('/pages/my/reload/my_reload', 'relaunch');
112 | }, 1500);
113 |
114 | } else if (result && result.data && result.data === 'CODE_WAITCHECK') {
115 | ccminiPageHelper.hint('注册成功!正在等待系统审核', 'reLaunch');
116 | } else
117 | ccminiPageHelper.showModal('注册遇到了一点小问题,请重新提交');
118 | }).catch(err => {
119 | console.log(err)
120 | });
121 |
122 | },
123 | })
--------------------------------------------------------------------------------
/miniprogram/reg/style/comm/animation.wxss:
--------------------------------------------------------------------------------
1 | /*
2 | Animation 微动画
3 | 基于ColorUI组建库的动画模块 by 文晓港 2019年3月26日19:52:28
4 | */
5 |
6 | /* css 滤镜 控制黑白底色gif的 */
7 | .gif-black{
8 | mix-blend-mode: screen;
9 | }
10 | .gif-white{
11 | mix-blend-mode: multiply;
12 | }
13 |
14 |
15 | /* Animation css */
16 | [class*=animation-] {
17 | animation-duration: .5s;
18 | animation-timing-function: ease-out;
19 | animation-fill-mode: both
20 | }
21 |
22 | .animation-fade {
23 | animation-name: fade;
24 | animation-duration: .8s;
25 | animation-timing-function: linear
26 | }
27 |
28 | .animation-scale-up {
29 | animation-name: scale-up
30 | }
31 |
32 | .animation-scale-down {
33 | animation-name: scale-down
34 | }
35 |
36 | .animation-slide-top {
37 | animation-name: slide-top
38 | }
39 |
40 | .animation-slide-bottom {
41 | animation-name: slide-bottom
42 | }
43 |
44 | .animation-slide-left {
45 | animation-name: slide-left
46 | }
47 |
48 | .animation-slide-right {
49 | animation-name: slide-right
50 | }
51 |
52 | .animation-shake {
53 | animation-name: shake
54 | }
55 |
56 | .animation-reverse {
57 | animation-direction: reverse
58 | }
59 |
60 | @keyframes fade {
61 | 0% {
62 | opacity: 0
63 | }
64 |
65 | 100% {
66 | opacity: 1
67 | }
68 | }
69 |
70 | @keyframes scale-up {
71 | 0% {
72 | opacity: 0;
73 | transform: scale(.2)
74 | }
75 |
76 | 100% {
77 | opacity: 1;
78 | transform: scale(1)
79 | }
80 | }
81 |
82 | @keyframes scale-down {
83 | 0% {
84 | opacity: 0;
85 | transform: scale(1.8)
86 | }
87 |
88 | 100% {
89 | opacity: 1;
90 | transform: scale(1)
91 | }
92 | }
93 |
94 | @keyframes slide-top {
95 | 0% {
96 | opacity: 0;
97 | transform: translateY(-100%)
98 | }
99 |
100 | 100% {
101 | opacity: 1;
102 | transform: translateY(0)
103 | }
104 | }
105 |
106 | @keyframes slide-bottom {
107 | 0% {
108 | opacity: 0;
109 | transform: translateY(100%)
110 | }
111 |
112 | 100% {
113 | opacity: 1;
114 | transform: translateY(0)
115 | }
116 | }
117 |
118 | @keyframes shake {
119 |
120 | 0%,
121 | 100% {
122 | transform: translateX(0)
123 | }
124 |
125 | 10% {
126 | transform: translateX(-9px)
127 | }
128 |
129 | 20% {
130 | transform: translateX(8px)
131 | }
132 |
133 | 30% {
134 | transform: translateX(-7px)
135 | }
136 |
137 | 40% {
138 | transform: translateX(6px)
139 | }
140 |
141 | 50% {
142 | transform: translateX(-5px)
143 | }
144 |
145 | 60% {
146 | transform: translateX(4px)
147 | }
148 |
149 | 70% {
150 | transform: translateX(-3px)
151 | }
152 |
153 | 80% {
154 | transform: translateX(2px)
155 | }
156 |
157 | 90% {
158 | transform: translateX(-1px)
159 | }
160 | }
161 |
162 | @keyframes slide-left {
163 | 0% {
164 | opacity: 0;
165 | transform: translateX(-100%)
166 | }
167 |
168 | 100% {
169 | opacity: 1;
170 | transform: translateX(0)
171 | }
172 | }
173 |
174 | @keyframes slide-right {
175 | 0% {
176 | opacity: 0;
177 | transform: translateX(100%)
178 | }
179 |
180 | 100% {
181 | opacity: 1;
182 | transform: translateX(0)
183 | }
184 | }
--------------------------------------------------------------------------------
/miniprogram/reg/style/comm/text.wxss:
--------------------------------------------------------------------------------
1 |
2 |
3 | /* ==================
4 | 文本
5 | ==================== */
6 |
7 | .text-xs,
8 | [class*="icon-"].text-xs {
9 | font-size: 20rpx!important;
10 | }
11 |
12 | .text-s,
13 | [class*="icon-"].text-s {
14 | font-size: 24rpx!important;
15 | }
16 |
17 | .text-normal,
18 | [class*="icon-"].text-normal {
19 | font-size: 28rpx!important;
20 | }
21 |
22 | .text-l,
23 | [class*="icon-"].text-l {
24 | font-size: 32rpx!important;
25 | }
26 |
27 | .text-xl,
28 | [class*="icon-"].text-xl {
29 | font-size: 36rpx!important;
30 | }
31 |
32 | .text-xxl,
33 | [class*="icon-"].text-xxl {
34 | font-size: 44rpx!important;
35 | }
36 |
37 | .text-xxxl,
38 | [class*="icon-"].text-xxxl {
39 | font-size: 80rpx!important;
40 | }
41 |
42 | .text-xxxxl,
43 | [class*="icon-"].text-xxxxl {
44 | font-size: 120rpx!important;
45 | }
46 |
47 |
48 | .text-cut {
49 | text-overflow: ellipsis;
50 | white-space: nowrap;
51 | overflow: hidden;
52 | }
53 |
54 | .content-cut {
55 | text-overflow: ellipsis;
56 | overflow: hidden;
57 | }
58 |
59 | .content-cut-two {
60 | text-overflow: ellipsis;
61 | overflow: hidden;
62 | display: -webkit-box;
63 | word-break: break-all;
64 | -webkit-box-orient: vertical;
65 | -webkit-line-clamp: 2;
66 | }
67 |
68 | .content-cut-three {
69 | text-overflow: ellipsis;
70 | overflow: hidden;
71 | display: -webkit-box;
72 | word-break: break-all;
73 | -webkit-box-orient: vertical;
74 | -webkit-line-clamp: 3;
75 | }
76 |
77 | .text-bold {
78 | font-weight: bold!important;
79 | }
80 |
81 | .text-center {
82 | text-align: center!important;
83 | }
84 |
85 | .text-content {
86 | line-height: 1.6!important;
87 | }
88 |
89 | .text-left {
90 | text-align: left!important;
91 | }
92 |
93 | .text-right {
94 | text-align: right!important;
95 | }
96 |
97 | .text-red,
98 | .border-red {
99 | color: var(--red)!important;
100 | }
101 |
102 | .text-orange,
103 | .border-orange {
104 | color: var(--orange)!important;
105 | }
106 |
107 | .text-yellow,
108 | .border-yellow {
109 | color: var(--yellow)!important;
110 | }
111 |
112 | .text-olive,
113 | .border-olive {
114 | color: var(--olive)!important;
115 | }
116 |
117 | .text-green,
118 | .border-green {
119 | color: var(--green)!important;
120 | }
121 |
122 | .text-darkgreen,
123 | .border-darkgreen {
124 | color: var(--darkgreen)!important;
125 | }
126 |
127 | .text-cyan,
128 | .border-cyan {
129 | color: var(--cyan)!important;
130 | }
131 |
132 | .text-blue,
133 | .border-blue {
134 | color: var(--blue)!important;
135 | }
136 |
137 | .text-purple,
138 | .border-purple {
139 | color: var(--purple)!important;
140 | }
141 |
142 | .text-mauve,
143 | .border-mauve {
144 | color: var(--mauve)!important;
145 | }
146 |
147 | .text-pink,
148 | .border-pink {
149 | color: var(--pink)!important;
150 | }
151 |
152 | .text-brown,
153 | .border-brown {
154 | color: var(--brown)!important;
155 | }
156 |
157 | .text-grey,
158 | .border-grey {
159 | color: var(--grey)!important;
160 | }
161 |
162 | .text-gray,
163 | .border-gray {
164 | color: var(--gray)!important;
165 | }
166 |
167 | .text-black,
168 | .border-black {
169 | color: var(--black)!important;
170 | }
171 |
172 | .text-white,
173 | .border-white {
174 | color: var(--white)!important;
175 | }
176 |
177 |
--------------------------------------------------------------------------------
/cloudfunctions/reg_cloud/model/user_model.js:
--------------------------------------------------------------------------------
1 | // +----------------------------------------------------------------------
2 | // | CCMiniCloud [ Cloud Framework ]
3 | // +----------------------------------------------------------------------
4 | // | Copyright (c) 2021 www.code942.com All rights reserved.
5 | // +----------------------------------------------------------------------
6 | // | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
7 | // +----------------------------------------------------------------------
8 | // | Author: 明章科技
9 | // +----------------------------------------------------------------------
10 |
11 | /**
12 | * Notes: 用户实体
13 | * Ver : CCMiniCloud Framework 2.0.1 ALL RIGHTS RESERVED BY www.code942.com
14 | * Date: 2025-10-14 19:20:00
15 | * Version : CCMiniCloud Framework Ver 2.0.1 ALL RIGHTS RESERVED BY 明章科技
16 | */
17 |
18 |
19 | const BaseCCMiniModel = require('./base_ccmini_model.js');
20 | class UserModel extends BaseCCMiniModel {}
21 |
22 | // 集合名
23 | UserModel.CL = "user";
24 |
25 | UserModel.CCMINI_DB_STRUCTURE = {
26 | USER_ID: 'string|true',
27 |
28 | USER_NAME: 'string|true|comment=用户姓名',
29 | USER_PIC: 'string|true|comment=',
30 |
31 | USER_PHONE_CHECKED: 'string|true|comment=',
32 |
33 | USER_MINI_OPENID: 'string|true|comment=',
34 |
35 | USER_STATUS: 'int|true|default=1|comment=',
36 |
37 | USER_ITEM: 'string|true|comment=',
38 | USER_SEX: 'int|true|default=1|comment=',
39 | USER_BIRTH: 'string|true|comment=',
40 |
41 | USER_MOBILE: 'string|false|comment=',
42 | USER_WECHAT: 'string|false|comment=',
43 | USER_QQ: 'string|false|comment=',
44 | USER_EMAIL: 'string|false',
45 |
46 | USER_ENROLL: 'int|true|default=0|comment=',
47 | USER_GRAD: 'int|true|default=0|comment=',
48 | USER_EDU: 'string|true|comment=',
49 |
50 | USER_COMPANY: 'string|false|comment=',
51 | USER_COMPANY_DUTY: 'string|false|comment=',
52 | USER_TRADE: 'string|false|comment=',
53 | USER_CITY: 'string|false|comment=',
54 |
55 | USER_DESC: 'string|false|comment=',
56 | USER_RESOURCE: 'string|false|comment=',
57 |
58 | USER_INVITE_CNT: 'int|true|default=0|comment=',
59 | USER_VIEW_CNT: 'int|true|default=0|comment=',
60 | USER_ALBUM_CNT: 'int|true|default=0|comment=',
61 | USER_INFO_CNT: 'int|true|default=0|comment=',
62 | USER_MEET_CNT: 'int|true|default=0|comment=',
63 | USER_MEET_JOIN_CNT: 'int|true|default=0|comment=',
64 |
65 | USER_WX_GENDER: 'int|true|default=0|comment=微信性别 0=未定义,1=男,2=女',
66 | USER_WX_AVATAR_URL: 'string|false|comment=',
67 | USER_WX_NICKNAME: 'string|false|comment=',
68 | USER_WX_LANGUAGE: 'string|false|comment=',
69 | USER_WX_CITY: 'string|false|comment=',
70 | USER_WX_PROVINCE: 'string|false|comment=',
71 | USER_WX_COUNTRY: 'string|false|comment=',
72 | USER_WX_UPDATE_TIME: 'int|false|comment=',
73 |
74 | USER_LOGIN_CNT: 'int|true|default=0|comment=',
75 | USER_LOGIN_TIME: 'int|false|comment=',
76 |
77 | USER_ADD_TIME: 'int|true',
78 | USER_ADD_IP: 'string|false',
79 |
80 | USER_EDIT_TIME: 'int|true',
81 | USER_EDIT_IP: 'string|false',
82 | }
83 |
84 | // 字段前缀
85 | UserModel.CCMINI_FIELD_PREFIX = "USER_";
86 |
87 | /**
88 | * 状态 0=待审核,1=正常,8=VIP,9=禁用,10=已删除
89 | */
90 | UserModel.STATUS = {
91 | UNUSE: 0,
92 | COMM: 1,
93 | VIP: 8,
94 | PEDDING: 9,
95 | DEL: 10
96 | };
97 |
98 | UserModel.STATUS_DESC = {
99 | UNUSE: '待审核',
100 | COMM: '正常',
101 | VIP: 'VIP',
102 | PEDDING: '禁用',
103 | DEL: '已删除'
104 | };
105 |
106 |
107 |
108 | module.exports = UserModel;
--------------------------------------------------------------------------------
/miniprogram/reg/pages/admin/user/admin_user_list.wxml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
7 |
8 |
9 | 共有{{dataList.total}}条符合条件记录
10 |
11 |
12 | {{index+1}}
13 |
14 |
16 | {{item.USER_NAME}}
17 | 班级:{{item.USER_ITEM}}
18 |
19 |
20 |
21 | 状态:待审核
22 | 状态:正常
23 | 状态:VIP用户
24 | 状态:禁用
25 | 注册:{{item.USER_ADD_TIME}}
26 |
27 |
28 |
29 | 最近:{{item.USER_LOGIN_TIME}}
30 |
31 |
32 |
33 | 城市:{{item.USER_CITY}}
34 |
35 |
36 |
37 |
38 | 学历:{{item.USER_EDU}}
39 | | 性别:{{item.USER_SEX==1?'男':'女'}}
40 | | 生日:{{item.USER_BIRTH}}
41 |
42 |
43 |
44 | 单位:{{item.USER_COMPANY}} ({{item.USER_COMPANY_DUTY}})
45 |
46 |
47 |
48 | 被查看{{item.USER_VIEW_CNT}}
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
58 |
59 |
61 |
62 |
64 |
65 |
67 |
68 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
--------------------------------------------------------------------------------
/miniprogram/reg/pages/my/index/my_index.wxss:
--------------------------------------------------------------------------------
1 | @import "../../../style/skin.wxss";
2 |
3 | .main-my-index {
4 | padding: 0;
5 | }
6 |
7 | .school-cover {
8 | opacity: 1;
9 | }
10 |
11 | .school-cover image {
12 | width: 780rpx;
13 | height: 280rpx;
14 | }
15 |
16 | .clearbtn-share {
17 | display: flex;
18 | flex-direction: column;
19 | }
20 |
21 | .main-my-index .avatar-open {
22 | width: 130rpx;
23 | height: 130rpx;
24 | clip-path: circle(66rpx at center);
25 | }
26 |
27 | .icon-big {
28 | font-size: 40rpx;
29 | color: #666;
30 | opacity: .8;
31 | }
32 |
33 | .main-my-index .user {
34 | background-color: #0E9489;
35 | height: 280rpx;
36 | width: 100%;
37 | display: flex;
38 | box-sizing: border-box;
39 | padding: 100rpx 40rpx 0rpx 40rpx;
40 | flex-direction: column;
41 | align-items: center;
42 | justify-content: center;
43 | position: relative;
44 | }
45 |
46 |
47 | .main-my-index .user .user-bar {
48 | flex: 1;
49 | display: flex;
50 | box-sizing: border-box;
51 | width: 100%;
52 | z-index: 999;
53 | }
54 |
55 | .main-my-index .user .user-bar .avatar {
56 | height: 130rpx;
57 | width: 130rpx;
58 | border: 0rpx;
59 | }
60 |
61 | .main-my-index .user .user-bar .detail {
62 | width: 400rpx;
63 | margin-left: 40rpx;
64 | display: flex;
65 | flex-direction: column;
66 | justify-content: flex-start;
67 | color: #fff;
68 | box-sizing: border-box;
69 | }
70 |
71 | .main-my-index .user .user-bar .detail .name {
72 | font-size: 36rpx;
73 | font-weight: bold;
74 | }
75 |
76 | .main-my-index .user .user-bar .detail .desc {
77 | margin-top: 15rpx;
78 | }
79 |
80 | .main-my-index .user .user-bar .detail .desc .bg-gray {
81 | opacity: .5;
82 | }
83 |
84 | .main-my-index .user .right-top {
85 | position: absolute;
86 | top: 20rpx;
87 | right: 20rpx;
88 | }
89 |
90 | .main-my-index .user .left-top {
91 | position: absolute;
92 | top: 20rpx;
93 | left: 20rpx;
94 | }
95 |
96 | .main-my-index .user .user-share {
97 | top: 30rpx;
98 | right: 30rpx;
99 | opacity: .5;
100 | position: absolute;
101 | height: 50rpx;
102 | width: 50rpx;
103 | display: flex;
104 | justify-content: center;
105 | align-items: center;
106 | border-radius: 50%;
107 | z-index: 999;
108 | }
109 |
110 | .main-my-index .user .info {
111 | background-color: #CCBE97;
112 | height: 80rpx;
113 | width: 100%;
114 | opacity: 0.6;
115 | border-top-left-radius: 20rpx;
116 | border-top-right-radius: 20rpx;
117 | }
118 |
119 | .main-my-index .down {
120 | box-sizing: border-box;
121 | width: 100%;
122 | display: flex;
123 | flex-direction: column;
124 | justify-content: center;
125 | }
126 |
127 | .main-my-index .down .data {
128 | display: flex;
129 | justify-content: space-between;
130 | align-items: center;
131 | height: 150rpx;
132 | padding: 0rpx 40rpx 0rpx 40rpx;
133 | width: 100%;
134 | background-color: #fff;
135 | }
136 |
137 | .main-my-index .down .data view {
138 | width: 150rpx;
139 | display: flex;
140 | flex-direction: column;
141 | align-items: center;
142 | justify-content: center;
143 | }
144 |
145 | .main-my-index .down .data view .num {
146 | font-size: 32rpx;
147 | font-weight: bold;
148 | }
149 |
150 | .main-my-index .down .data view .txt {
151 | font-size: 24rpx;
152 | color: #aaa;
153 | }
154 |
155 | .main-my-index .comm-list .item.arrow::before,
156 | .main-my-index .comm-list .item .content .item-icon {
157 | color: #0E9489;
158 | }
159 |
160 | .main-my-index .demo-card {
161 | box-shadow: var(--ShadowSize) var(--yellowShadow);
162 | border: 1rpx solid yellow;
163 | color: green !important;
164 | }
--------------------------------------------------------------------------------
/miniprogram/reg/pages/admin/news/admin_news_edit.js:
--------------------------------------------------------------------------------
1 | const AdminBiz = require('../../../biz/admin_biz.js');
2 | const ccminiPageHelper = require('../../../helper/ccmini_page_helper.js');
3 | const ccminiCloudHelper = require('../../../helper/ccmini_cloud_helper.js');
4 | const ccminiValidate = require('../../../helper/ccmini_validate.js');
5 | const AdminNewsBiz = require('../../../biz/admin_news_biz.js');
6 | const ccminiHelper = require('../../../helper/ccmini_helper.js');
7 |
8 | Page({
9 |
10 | /**
11 | * 页面的初始数据
12 | */
13 | data: {
14 | isLoad: false
15 | },
16 |
17 | /**
18 | * 生命周期函数--监听页面加载
19 | */
20 | onLoad: async function (options) {
21 | if (!AdminBiz.isAdmin(this)) return;
22 | if (!ccminiPageHelper.getId(this, options)) return;
23 |
24 | this._loadDetail();
25 | },
26 |
27 | /**
28 | * 生命周期函数--监听页面初次渲染完成
29 | */
30 | onReady: function () {
31 |
32 | },
33 |
34 | /**
35 | * 生命周期函数--监听页面显示
36 | */
37 | onShow: function () {
38 |
39 | },
40 |
41 | /**
42 | * 生命周期函数--监听页面隐藏
43 | */
44 | onHide: function () {
45 |
46 | },
47 |
48 | /**
49 | * 生命周期函数--监听页面卸载
50 | */
51 | onUnload: function () {
52 |
53 | },
54 |
55 | /**
56 | * 页面相关事件处理函数--监听用户下拉动作
57 | */
58 | onPullDownRefresh: async function () {
59 | await this._loadDetail();
60 | wx.stopPullDownRefresh();
61 | },
62 |
63 | model: function (e) {
64 | ccminiPageHelper.model(this, e);
65 | },
66 |
67 | _loadDetail: async function () {
68 | let id = this.data.id;
69 | if (!id) return;
70 |
71 | if (!this.data.isLoad) this.setData(await AdminNewsBiz.initFormData(id)); // 初始化表单数据
72 |
73 | let params = {
74 | id
75 | };
76 | let opt = {
77 | hint: false
78 | };
79 | let news = await ccminiCloudHelper.callCloudData('admin/news_detail', params, opt);
80 | if (!news) {
81 | this.setData({
82 | isLoad: null
83 | })
84 | return;
85 | };
86 |
87 |
88 | this.setData({
89 | isLoad: true,
90 |
91 | imgList: news.NEWS_PIC,
92 |
93 | // 表单数据
94 |
95 | formTitle: news.NEWS_TITLE,
96 | formCate: news.NEWS_CATE,
97 | formContent: news.NEWS_CONTENT,
98 |
99 | });
100 | },
101 |
102 | bindMyPickerCateEventListener: function (e) {
103 | let formCate = e.detail;
104 | this.setData({
105 | formCate
106 | })
107 | },
108 |
109 | /**
110 | * 数据提交
111 | */
112 | bindFormSubmit: async function () {
113 |
114 | let data = this.data;
115 |
116 | // 数据校验
117 | data = ccminiValidate.check(data, AdminNewsBiz.CHECK_FORM, this);
118 | if (!data) return;
119 | data.desc = ccminiHelper.fmtText(data.content, 100);
120 |
121 | try {
122 | let newsId = this.data.id;
123 | data.id = newsId;
124 |
125 | // 先修改,再上传
126 | await ccminiCloudHelper.callCloudSumbit('admin/news_edit', data);
127 |
128 | // 图片 提交处理
129 | wx.showLoading({
130 | title: '提交中...',
131 | mask: true
132 | });
133 |
134 |
135 | let imgList = this.data.imgList;
136 | await AdminNewsBiz.updateNewsPic(newsId, imgList);
137 |
138 |
139 | let callback = async function () {
140 | // 更新列表页面数据
141 | ccminiPageHelper.modifyPrevPageListNode(newsId, 'NEWS_TITLE', data.title);
142 | ccminiPageHelper.modifyPrevPageListNode(newsId, 'NEWS_CATE', data.cate);
143 | ccminiPageHelper.goto('', 'back');
144 |
145 | }
146 | ccminiPageHelper.showSuccToast('修改成功', 2000, callback);
147 |
148 | } catch (err) {
149 | console.log(err);
150 | }
151 |
152 | },
153 |
154 |
155 | bindMyImgUploadListener: function (e) {
156 | this.setData({
157 | imgList: e.detail
158 | });
159 | }
160 |
161 | })
--------------------------------------------------------------------------------