├── .gitignore ├── README.md ├── cloudfunctions └── mcloud │ ├── config.json │ ├── config │ └── config.js │ ├── framework │ ├── cloud │ │ ├── cloud_base.js │ │ └── cloud_util.js │ ├── core │ │ ├── app_code.js │ │ ├── app_error.js │ │ ├── app_other.js │ │ ├── app_util.js │ │ └── application.js │ ├── database │ │ ├── db_util.js │ │ ├── model.js │ │ └── multi_model.js │ ├── lib │ │ ├── faker_lib.js │ │ ├── md5_lib.js │ │ └── mini_lib.js │ ├── platform │ │ ├── controller │ │ │ ├── base_admin_controller.js │ │ │ └── base_controller.js │ │ ├── model │ │ │ ├── admin_model.js │ │ │ ├── base_model.js │ │ │ └── log_model.js │ │ └── service │ │ │ ├── base_admin_service.js │ │ │ └── base_service.js │ ├── utils │ │ ├── constant.js │ │ ├── data_util.js │ │ ├── export_util.js │ │ ├── log_util.js │ │ ├── math_util.js │ │ ├── setup │ │ │ ├── setup_model.js │ │ │ └── setup_util.js │ │ ├── time_util.js │ │ └── util.js │ └── validate │ │ ├── content_check.js │ │ └── data_check.js │ ├── index.js │ ├── package-lock.json │ ├── package.json │ └── project │ └── bbs │ ├── controller │ ├── admin │ │ ├── admin_cate_controller.js │ │ ├── admin_home_controller.js │ │ ├── admin_mgr_controller.js │ │ ├── admin_product_controller.js │ │ ├── admin_setup_controller.js │ │ ├── admin_user_controller.js │ │ └── base_project_admin_controller.js │ ├── base_project_controller.js │ ├── cate_controller.js │ ├── check_controller.js │ ├── comment_controller.js │ ├── fav_controller.js │ ├── home_controller.js │ ├── my_controller.js │ ├── passport_controller.js │ └── product_controller.js │ ├── model │ ├── base_project_model.js │ ├── cate1_model.js │ ├── cate2_model.js │ ├── comment_model.js │ ├── fav_model.js │ ├── product_model.js │ └── user_model.js │ ├── public │ ├── constants.js │ ├── project_config.js │ └── route.js │ └── service │ ├── admin │ ├── admin_cate_service.js │ ├── admin_home_service.js │ ├── admin_mgr_service.js │ ├── admin_product_service.js │ ├── admin_setup_service.js │ ├── admin_user_service.js │ └── base_project_admin_service.js │ ├── base_project_service.js │ ├── cate_service.js │ ├── comment_service.js │ ├── fav_service.js │ ├── home_service.js │ ├── passport_service.js │ └── product_service.js ├── miniprogram ├── app.js ├── app.json ├── app.wxss ├── cmpts │ ├── biz │ │ ├── detail │ │ │ ├── detail_cmpt.js │ │ │ ├── detail_cmpt.json │ │ │ ├── detail_cmpt.wxml │ │ │ └── detail_cmpt.wxss │ │ └── foot │ │ │ ├── foot_cmpt.js │ │ │ ├── foot_cmpt.json │ │ │ ├── foot_cmpt.wxml │ │ │ └── foot_cmpt.wxss │ └── public │ │ ├── calendar │ │ ├── calendar_comm │ │ │ ├── calendar_comm_cmpt.js │ │ │ ├── calendar_comm_cmpt.json │ │ │ ├── calendar_comm_cmpt.wxml │ │ │ ├── calendar_comm_cmpt.wxss │ │ │ └── din.wxss │ │ ├── calendar_lib.js │ │ ├── calendar_meet │ │ │ ├── calendar_meet_cmpt.js │ │ │ ├── calendar_meet_cmpt.json │ │ │ ├── calendar_meet_cmpt.wxml │ │ │ └── calendar_meet_cmpt.wxss │ │ ├── date_select │ │ │ ├── date_select_cmpt.js │ │ │ ├── date_select_cmpt.json │ │ │ ├── date_select_cmpt.wxml │ │ │ └── date_select_cmpt.wxss │ │ └── time_select │ │ │ ├── time_select_cmpt.js │ │ │ ├── time_select_cmpt.json │ │ │ ├── time_select_cmpt.wxml │ │ │ └── time_select_cmpt.wxss │ │ ├── car_number │ │ ├── car_number_cmpt.js │ │ ├── car_number_cmpt.json │ │ ├── car_number_cmpt.wxml │ │ └── car_number_cmpt.wxss │ │ ├── checkbox │ │ ├── checkbox_cmpt.js │ │ ├── checkbox_cmpt.json │ │ ├── checkbox_cmpt.wxml │ │ └── checkbox_cmpt.wxss │ │ ├── custom_nav │ │ ├── custom_nav_cmpt.js │ │ ├── custom_nav_cmpt.json │ │ ├── custom_nav_cmpt.wxml │ │ └── custom_nav_cmpt.wxss │ │ ├── editor │ │ ├── editor_cmpt.js │ │ ├── editor_cmpt.json │ │ ├── editor_cmpt.wxml │ │ └── editor_cmpt.wxss │ │ ├── form │ │ ├── form_set │ │ │ ├── field │ │ │ │ ├── form_set_field.js │ │ │ │ ├── form_set_field.json │ │ │ │ ├── form_set_field.wxml │ │ │ │ └── form_set_field.wxss │ │ │ ├── form_set_cmpt.js │ │ │ ├── form_set_cmpt.json │ │ │ ├── form_set_cmpt.wxml │ │ │ └── form_set_cmpt.wxss │ │ ├── form_set_helper.js │ │ └── form_show │ │ │ ├── content │ │ │ ├── form_show_content.js │ │ │ ├── form_show_content.json │ │ │ ├── form_show_content.wxml │ │ │ └── form_show_content.wxss │ │ │ ├── form_show_cmpt.js │ │ │ ├── form_show_cmpt.json │ │ │ ├── form_show_cmpt.wxml │ │ │ └── form_show_cmpt.wxss │ │ ├── img │ │ ├── img_upload_cmpt.js │ │ ├── img_upload_cmpt.json │ │ ├── img_upload_cmpt.wxml │ │ └── img_upload_cmpt.wxss │ │ ├── list │ │ ├── comm_list_cmpt.js │ │ ├── comm_list_cmpt.json │ │ ├── comm_list_cmpt.wxml │ │ └── comm_list_cmpt.wxss │ │ ├── modal │ │ ├── modal_cmpt.js │ │ ├── modal_cmpt.json │ │ ├── modal_cmpt.wxml │ │ └── modal_cmpt.wxss │ │ ├── picker │ │ ├── picker_cmpt.js │ │ ├── picker_cmpt.json │ │ ├── picker_cmpt.wxml │ │ └── picker_cmpt.wxss │ │ ├── picker_multi │ │ ├── picker_multi_cmpt.js │ │ ├── picker_multi_cmpt.json │ │ ├── picker_multi_cmpt.wxml │ │ └── picker_multi_cmpt.wxss │ │ ├── picker_time │ │ ├── datetime_picker.js │ │ ├── picker_time_cmpt.js │ │ ├── picker_time_cmpt.json │ │ ├── picker_time_cmpt.wxml │ │ └── picker_time_cmpt.wxss │ │ ├── poster │ │ ├── images │ │ │ ├── friend.png │ │ │ └── wechat.png │ │ ├── poster_cmpt.js │ │ ├── poster_cmpt.json │ │ ├── poster_cmpt.wxml │ │ ├── poster_cmpt.wxss │ │ ├── poster_cmpt_helper.js │ │ └── wxa-plugin-canvas │ │ │ ├── index │ │ │ ├── index.js │ │ │ ├── index.json │ │ │ ├── index.wxml │ │ │ └── index.wxss │ │ │ └── poster │ │ │ ├── index.js │ │ │ ├── index.json │ │ │ ├── index.wxml │ │ │ ├── index.wxss │ │ │ └── poster.js │ │ ├── radio │ │ ├── radio_cmpt.js │ │ ├── radio_cmpt.json │ │ ├── radio_cmpt.wxml │ │ └── radio_cmpt.wxss │ │ ├── rows │ │ ├── rows_cmpt.js │ │ ├── rows_cmpt.json │ │ ├── rows_cmpt.wxml │ │ ├── rows_cmpt.wxss │ │ └── rows_set_helper.js │ │ ├── simple_list │ │ ├── simple_list_cmpt.js │ │ ├── simple_list_cmpt.json │ │ ├── simple_list_cmpt.wxml │ │ └── simple_list_cmpt.wxss │ │ ├── swiper │ │ ├── swiper_cmpt.js │ │ ├── swiper_cmpt.json │ │ ├── swiper_cmpt.wxml │ │ └── swiper_cmpt.wxss │ │ └── table │ │ ├── table_cmpt.js │ │ ├── table_cmpt.json │ │ ├── table_cmpt.wxml │ │ └── table_cmpt.wxss ├── comm │ ├── behavior │ │ ├── about_bh.js │ │ ├── my_fav_bh.js │ │ ├── my_foot_bh.js │ │ ├── news_index_bh.js │ │ └── search_bh.js │ ├── biz │ │ ├── admin_biz.js │ │ ├── base_biz.js │ │ ├── fav_biz.js │ │ ├── foot_biz.js │ │ ├── passport_biz.js │ │ ├── public_biz.js │ │ └── search_biz.js │ └── constants.js ├── helper │ ├── cache_helper.js │ ├── cloud_helper.js │ ├── content_check_helper.js │ ├── data_helper.js │ ├── file_helper.js │ ├── form_helper.js │ ├── helper.js │ ├── mini_helper.js │ ├── page_helper.js │ ├── pic_helper.js │ ├── time_helper.js │ └── validate.js ├── images │ └── cover.gif ├── lib │ └── tools │ │ ├── base64_lib.js │ │ ├── lunar_lib.js │ │ ├── md5_lib.js │ │ ├── qrcode_lib.js │ │ └── wxcharts-min.js ├── pages │ └── test1 │ │ ├── test1.js │ │ ├── test1.json │ │ ├── test1.wxml │ │ └── test1.wxss ├── projects │ └── bbs │ │ ├── biz │ │ ├── admin_cate_biz.js │ │ ├── admin_product_biz.js │ │ ├── cate_biz.js │ │ ├── comment_biz.js │ │ ├── product_biz.js │ │ └── project_biz.js │ │ ├── images │ │ ├── cover.jpg │ │ ├── home.png │ │ ├── no.jpg │ │ └── tabbar │ │ │ ├── add.png │ │ │ ├── add_cur.png │ │ │ ├── home.png │ │ │ ├── home_cur.png │ │ │ ├── my.png │ │ │ ├── my_cur.png │ │ │ ├── order.png │ │ │ ├── order_cur.png │ │ │ ├── sort.png │ │ │ └── sort_cur.png │ │ ├── pages │ │ ├── about │ │ │ └── index │ │ │ │ ├── about_index.js │ │ │ │ ├── about_index.json │ │ │ │ ├── about_index.wxml │ │ │ │ └── about_index.wxss │ │ ├── admin │ │ │ ├── cate1 │ │ │ │ ├── add │ │ │ │ │ ├── admin_cate1_add.js │ │ │ │ │ ├── admin_cate1_add.json │ │ │ │ │ ├── admin_cate1_add.wxml │ │ │ │ │ ├── admin_cate1_add.wxss │ │ │ │ │ └── admin_cate1_form_tpl.wxml │ │ │ │ ├── edit │ │ │ │ │ ├── admin_cate1_edit.js │ │ │ │ │ ├── admin_cate1_edit.json │ │ │ │ │ ├── admin_cate1_edit.wxml │ │ │ │ │ └── admin_cate1_edit.wxss │ │ │ │ └── list │ │ │ │ │ ├── admin_cate1_list.js │ │ │ │ │ ├── admin_cate1_list.json │ │ │ │ │ ├── admin_cate1_list.wxml │ │ │ │ │ └── admin_cate1_list.wxss │ │ │ ├── cate2 │ │ │ │ ├── add │ │ │ │ │ ├── admin_cate2_add.js │ │ │ │ │ ├── admin_cate2_add.json │ │ │ │ │ ├── admin_cate2_add.wxml │ │ │ │ │ ├── admin_cate2_add.wxss │ │ │ │ │ └── admin_cate2_form_tpl.wxml │ │ │ │ ├── edit │ │ │ │ │ ├── admin_cate2_edit.js │ │ │ │ │ ├── admin_cate2_edit.json │ │ │ │ │ ├── admin_cate2_edit.wxml │ │ │ │ │ └── admin_cate2_edit.wxss │ │ │ │ └── list │ │ │ │ │ ├── admin_cate2_list.js │ │ │ │ │ ├── admin_cate2_list.json │ │ │ │ │ ├── admin_cate2_list.wxml │ │ │ │ │ └── admin_cate2_list.wxss │ │ │ ├── content │ │ │ │ ├── admin_content.js │ │ │ │ ├── admin_content.json │ │ │ │ ├── admin_content.wxml │ │ │ │ └── admin_content.wxss │ │ │ ├── index │ │ │ │ ├── home │ │ │ │ │ ├── admin_home.js │ │ │ │ │ ├── admin_home.json │ │ │ │ │ ├── admin_home.wxml │ │ │ │ │ └── admin_home.wxss │ │ │ │ └── login │ │ │ │ │ ├── admin_login.js │ │ │ │ │ ├── admin_login.json │ │ │ │ │ ├── admin_login.wxml │ │ │ │ │ └── admin_login.wxss │ │ │ ├── mgr │ │ │ │ ├── add │ │ │ │ │ ├── admin_mgr_add.js │ │ │ │ │ ├── admin_mgr_add.json │ │ │ │ │ ├── admin_mgr_add.wxml │ │ │ │ │ └── admin_mgr_add.wxss │ │ │ │ ├── edit │ │ │ │ │ ├── admin_mgr_edit.js │ │ │ │ │ ├── admin_mgr_edit.json │ │ │ │ │ ├── admin_mgr_edit.wxml │ │ │ │ │ └── admin_mgr_edit.wxss │ │ │ │ ├── list │ │ │ │ │ ├── admin_mgr_list.js │ │ │ │ │ ├── admin_mgr_list.json │ │ │ │ │ ├── admin_mgr_list.wxml │ │ │ │ │ └── admin_mgr_list.wxss │ │ │ │ ├── log │ │ │ │ │ ├── admin_log_list.js │ │ │ │ │ ├── admin_log_list.json │ │ │ │ │ ├── admin_log_list.wxml │ │ │ │ │ └── admin_log_list.wxss │ │ │ │ └── pwd │ │ │ │ │ ├── admin_mgr_pwd.js │ │ │ │ │ ├── admin_mgr_pwd.json │ │ │ │ │ ├── admin_mgr_pwd.wxml │ │ │ │ │ └── admin_mgr_pwd.wxss │ │ │ ├── product │ │ │ │ ├── add │ │ │ │ │ ├── admin_product_add.js │ │ │ │ │ ├── admin_product_add.json │ │ │ │ │ ├── admin_product_add.wxml │ │ │ │ │ ├── admin_product_add.wxss │ │ │ │ │ └── admin_product_form_tpl.wxml │ │ │ │ ├── edit │ │ │ │ │ ├── admin_product_edit.js │ │ │ │ │ ├── admin_product_edit.json │ │ │ │ │ ├── admin_product_edit.wxml │ │ │ │ │ └── admin_product_edit.wxss │ │ │ │ └── list │ │ │ │ │ ├── admin_product_list.js │ │ │ │ │ ├── admin_product_list.json │ │ │ │ │ ├── admin_product_list.wxml │ │ │ │ │ └── admin_product_list.wxss │ │ │ ├── setup │ │ │ │ ├── about │ │ │ │ │ ├── admin_setup_about.js │ │ │ │ │ ├── admin_setup_about.json │ │ │ │ │ ├── admin_setup_about.wxml │ │ │ │ │ └── admin_setup_about.wxss │ │ │ │ ├── about_list │ │ │ │ │ ├── admin_setup_about_list.js │ │ │ │ │ ├── admin_setup_about_list.json │ │ │ │ │ ├── admin_setup_about_list.wxml │ │ │ │ │ └── admin_setup_about_list.wxss │ │ │ │ ├── qr │ │ │ │ │ ├── admin_setup_qr.js │ │ │ │ │ ├── admin_setup_qr.json │ │ │ │ │ ├── admin_setup_qr.wxml │ │ │ │ │ └── admin_setup_qr.wxss │ │ │ │ └── swiper │ │ │ │ │ ├── admin_setup_swiper.js │ │ │ │ │ ├── admin_setup_swiper.json │ │ │ │ │ ├── admin_setup_swiper.wxml │ │ │ │ │ └── admin_setup_swiper.wxss │ │ │ └── user │ │ │ │ ├── detail │ │ │ │ ├── admin_user_detail.js │ │ │ │ ├── admin_user_detail.json │ │ │ │ ├── admin_user_detail.wxml │ │ │ │ └── admin_user_detail.wxss │ │ │ │ ├── export │ │ │ │ ├── admin_user_export.js │ │ │ │ ├── admin_user_export.json │ │ │ │ ├── admin_user_export.wxml │ │ │ │ └── admin_user_export.wxss │ │ │ │ └── list │ │ │ │ ├── admin_user_list.js │ │ │ │ ├── admin_user_list.json │ │ │ │ ├── admin_user_list.wxml │ │ │ │ └── admin_user_list.wxss │ │ ├── comment │ │ │ ├── add │ │ │ │ ├── comment_add.js │ │ │ │ ├── comment_add.json │ │ │ │ ├── comment_add.wxml │ │ │ │ └── comment_add.wxss │ │ │ ├── list │ │ │ │ ├── comment_list.js │ │ │ │ ├── comment_list.json │ │ │ │ ├── comment_list.wxml │ │ │ │ ├── comment_list.wxss │ │ │ │ └── comment_list_tpl.wxml │ │ │ └── my_list │ │ │ │ ├── comment_my_list.js │ │ │ │ ├── comment_my_list.json │ │ │ │ ├── comment_my_list.wxml │ │ │ │ └── comment_my_list.wxss │ │ ├── default │ │ │ ├── index │ │ │ │ ├── default_index.js │ │ │ │ ├── default_index.json │ │ │ │ ├── default_index.wxml │ │ │ │ └── default_index.wxss │ │ │ └── web │ │ │ │ ├── web.js │ │ │ │ ├── web.json │ │ │ │ ├── web.wxml │ │ │ │ └── web.wxss │ │ ├── my │ │ │ ├── edit │ │ │ │ ├── my_edit.js │ │ │ │ ├── my_edit.json │ │ │ │ ├── my_edit.wxml │ │ │ │ ├── my_edit.wxss │ │ │ │ └── user_form.wxml │ │ │ ├── fav │ │ │ │ ├── my_fav.js │ │ │ │ ├── my_fav.json │ │ │ │ ├── my_fav.wxml │ │ │ │ └── my_fav.wxss │ │ │ ├── foot │ │ │ │ ├── my_foot.js │ │ │ │ ├── my_foot.json │ │ │ │ ├── my_foot.wxml │ │ │ │ └── my_foot.wxss │ │ │ ├── index │ │ │ │ ├── my_index.js │ │ │ │ ├── my_index.json │ │ │ │ ├── my_index.wxml │ │ │ │ └── my_index.wxss │ │ │ └── reg │ │ │ │ ├── my_reg.js │ │ │ │ ├── my_reg.json │ │ │ │ ├── my_reg.wxml │ │ │ │ └── my_reg.wxss │ │ ├── product │ │ │ ├── add │ │ │ │ ├── product_add.js │ │ │ │ ├── product_add.json │ │ │ │ ├── product_add.wxml │ │ │ │ └── product_add.wxss │ │ │ ├── cate1 │ │ │ │ ├── product_cate1.js │ │ │ │ ├── product_cate1.json │ │ │ │ ├── product_cate1.wxml │ │ │ │ └── product_cate1.wxss │ │ │ ├── cate2 │ │ │ │ ├── product_cate2.js │ │ │ │ ├── product_cate2.json │ │ │ │ ├── product_cate2.wxml │ │ │ │ └── product_cate2.wxss │ │ │ ├── detail │ │ │ │ ├── product_detail.js │ │ │ │ ├── product_detail.json │ │ │ │ ├── product_detail.wxml │ │ │ │ └── product_detail.wxss │ │ │ ├── edit │ │ │ │ ├── product_edit.js │ │ │ │ ├── product_edit.json │ │ │ │ ├── product_edit.wxml │ │ │ │ └── product_edit.wxss │ │ │ ├── index │ │ │ │ ├── product_index.js │ │ │ │ ├── product_index.json │ │ │ │ ├── product_index.wxml │ │ │ │ └── product_index.wxss │ │ │ ├── my_fav_user │ │ │ │ ├── product_my_fav_user.js │ │ │ │ ├── product_my_fav_user.json │ │ │ │ ├── product_my_fav_user.wxml │ │ │ │ └── product_my_fav_user.wxss │ │ │ ├── my_list │ │ │ │ ├── product_my_list.js │ │ │ │ ├── product_my_list.json │ │ │ │ ├── product_my_list.wxml │ │ │ │ └── product_my_list.wxss │ │ │ ├── my_post │ │ │ │ ├── product_my_post.js │ │ │ │ ├── product_my_post.json │ │ │ │ ├── product_my_post.wxml │ │ │ │ └── product_my_post.wxss │ │ │ ├── order │ │ │ │ ├── product_order.js │ │ │ │ ├── product_order.json │ │ │ │ ├── product_order.wxml │ │ │ │ └── product_order.wxss │ │ │ ├── user_detail │ │ │ │ ├── product_user_detail.js │ │ │ │ ├── product_user_detail.json │ │ │ │ ├── product_user_detail.wxml │ │ │ │ └── product_user_detail.wxss │ │ │ └── user_order_list │ │ │ │ ├── product_user_order_list.js │ │ │ │ ├── product_user_order_list.json │ │ │ │ ├── product_user_order_list.wxml │ │ │ │ └── product_user_order_list.wxss │ │ ├── search │ │ │ ├── search.js │ │ │ ├── search.json │ │ │ ├── search.wxml │ │ │ └── search.wxss │ │ └── tpls │ │ │ └── menu_tpl.wxml │ │ ├── public │ │ └── project_setting.js │ │ └── style │ │ └── skin.wxss ├── setting │ └── setting.js ├── sitemap.json ├── style │ ├── base │ │ ├── animation.wxss │ │ ├── avatar.wxss │ │ ├── background.wxss │ │ ├── bar.wxss │ │ ├── base.wxss │ │ ├── border.wxss │ │ ├── button.wxss │ │ ├── comm.wxss │ │ ├── form.wxss │ │ ├── icon.wxss │ │ ├── image.wxss │ │ ├── layout.wxss │ │ ├── list.wxss │ │ ├── load.wxss │ │ ├── modal.wxss │ │ ├── nav.wxss │ │ ├── shadow.wxss │ │ ├── table.wxss │ │ ├── tag.wxss │ │ └── text.wxss │ ├── project │ │ ├── admin_list_style.wxss │ │ ├── my_fav_style.wxss │ │ ├── my_foot_style.wxss │ │ └── search_style.wxss │ └── public │ │ ├── admin.wxss │ │ ├── article_list.wxss │ │ ├── comm_box_list.wxss │ │ ├── detail.wxss │ │ └── project.wxss └── tpls │ ├── project │ ├── about_tpl.wxml │ ├── my_fav_tpl.wxml │ ├── my_foot_tpl.wxml │ ├── news_index_tpl.wxml │ └── search_tpl.wxml │ ├── public │ ├── admin_forms_detail_tpl.wxml │ ├── base_list_tpl.wxml │ ├── list_load_tpl.wxml │ └── top_tpl.wxml │ └── wxs │ └── tools.wxs ├── project.config.json ├── project.private.config.json └── 论坛小程序安装使用手册.docx /.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/mcloud/config.json: -------------------------------------------------------------------------------- 1 | { 2 | "permissions": { 3 | "openapi": ["wxacode.getUnlimited", "security.imgSecCheck", "security.msgSecCheck","serviceMarket.invokeService"] 4 | } 5 | } -------------------------------------------------------------------------------- /cloudfunctions/mcloud/config/config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | 3 | //### 环境相关 4 | CLOUD_ID: 'cloud1-3go08kosfd9d453c', //你的云环境id 5 | 6 | // ################################################################## 7 | COLLECTION_PRFIX: 'bx_', 8 | 9 | IS_DEMO: false, //是否演示版 (后台不可操作提交动作) 10 | // ################################################################## 11 | // #### 调试相关 12 | TEST_MODE: false, // 测试模式 涉及小程序码生成路径, 用以下 TEST_TOKEN_ID openid.. 13 | TEST_TOKEN_ID: 'oD58U5Ej-gK0BjqSspqjQEPgXuQQ', 14 | 15 | 16 | // #### 内容安全 17 | CLIENT_CHECK_CONTENT: false, //前台图片文字是否校验 18 | ADMIN_CHECK_CONTENT: false, //后台图片文字是否校验 19 | 20 | // ### 后台业务相关 21 | ADMIN_LOGIN_EXPIRE: 86400, //管理员token过期时间 (秒) 22 | 23 | // ### 服务者相关 24 | WORK_LOGIN_EXPIRE: 86400, //服务者token过期时间 (秒) 25 | } -------------------------------------------------------------------------------- /cloudfunctions/mcloud/framework/cloud/cloud_base.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Notes: 云初始化实例 3 | * Ver : CCMiniCloud Framework 2.2.1 ALL RIGHTS RESERVED BY cclinux0730 (wechat) 4 | * Date: 2020-09-05 04:00:00 5 | */ 6 | 7 | const config = require('../../config/config.js'); 8 | 9 | /** 10 | * 获得云实例 11 | */ 12 | function getCloud() { 13 | const cloud = require('wx-server-sdk'); 14 | cloud.init({ 15 | env: config.CLOUD_ID 16 | }); 17 | return cloud; 18 | } 19 | 20 | module.exports = { 21 | getCloud 22 | } -------------------------------------------------------------------------------- /cloudfunctions/mcloud/framework/core/app_code.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Notes: 错误代码定义 3 | * Ver : CCMiniCloud Framework 2.4.1 ALL RIGHTS RESERVED BY Cclinux0730 (wechat) 4 | * Date: 2020-09-05 04:00:00 5 | */ 6 | module.exports = { 7 | SUCC: 200, 8 | SVR: 500, // 服务器错误 9 | LOGIC: 1600, //逻辑错误 10 | DATA: 1301, // 数据校验错误 11 | HEADER: 1302, // header 校验错误 12 | 13 | 14 | //2000开始为业务错误代码, 15 | 16 | ADMIN_ERROR: 2401, //管理员错误 17 | WORK_ERROR: 2501 //服务者错误 18 | } -------------------------------------------------------------------------------- /cloudfunctions/mcloud/framework/core/app_error.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Notes: 应用异常处理类 3 | * Ver : CCMiniCloud Framework 2.5.1 ALL RIGHTS RESERVED BY cClinux0730 (wechat) 4 | * Date: 2020-09-05 04:00:00 5 | */ 6 | 7 | 8 | const appCode = require('./app_code.js'); 9 | 10 | class AppError extends Error { 11 | constructor(message, code = appCode.LOGIC) { 12 | super(message); 13 | this.name = 'AppError'; 14 | this.code = code; 15 | } 16 | } 17 | 18 | module.exports = AppError; -------------------------------------------------------------------------------- /cloudfunctions/mcloud/framework/core/app_other.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Notes: 云函数非标业务处理 3 | * Ver : CCMiniCloud Framework 2.6.1 ALL RIGHTS RESERVED BY ccLinux@qq.com 4 | * Date: 2021-10-21 04:00:00 5 | */ 6 | 7 | function handlerOther(event) { 8 | let isOther = false; 9 | 10 | if (!event) return { 11 | isOther, 12 | eventX 13 | }; 14 | 15 | // 公众号事件处理 16 | if (event['FromUserName'] && event['MsgType']) { 17 | console.log('公众号事件处理'); 18 | let ret = { 19 | route: 'oa/serve', 20 | params: event 21 | } 22 | return { 23 | isOther: true, 24 | eventX: ret 25 | }; 26 | } 27 | 28 | return { 29 | isOther, 30 | eventX: event 31 | }; 32 | } 33 | 34 | 35 | module.exports = { 36 | handlerOther, 37 | } -------------------------------------------------------------------------------- /cloudfunctions/mcloud/framework/core/app_util.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Notes: 云函数业务主逻辑函数 3 | * Ver : CCMiniCloud Framework 2.7.1 ALL RIGHTS RESERVED BY cclinuX0730 (wechat) 4 | * Date: 2021-02-09 04:00:00 5 | */ 6 | 7 | const appCode = require('./app_code.js'); 8 | 9 | function handlerBasic(code, msg = '', data = {}) { 10 | 11 | switch (code) { 12 | case appCode.SUCC: 13 | msg = (msg) ? msg + ':ok' : 'ok'; 14 | break; 15 | case appCode.SVR: 16 | msg = '服务器繁忙,请稍后再试'; 17 | break; 18 | case appCode.LOGIC: 19 | break; 20 | case appCode.DATA: 21 | break; 22 | 23 | /* 24 | default: 25 | msg = '服务器开小差了,请稍后再试'; 26 | break;*/ 27 | } 28 | 29 | return { 30 | code: code, 31 | msg: msg, 32 | data: data 33 | } 34 | 35 | } 36 | 37 | function handlerSvrErr(msg = '') { 38 | return handlerBasic(appCode.SVR, msg); 39 | } 40 | 41 | function handlerSucc(msg = '') { 42 | return handlerBasic(appCode.SUCC, msg); 43 | } 44 | 45 | function handlerAppErr(msg = '', code = appCode.LOGIC) { 46 | return handlerBasic(code, msg); 47 | } 48 | 49 | 50 | function handlerData(data, msg = '') { 51 | return handlerBasic(appCode.SUCC, msg, data); 52 | } 53 | 54 | module.exports = { 55 | handlerBasic, 56 | handlerData, 57 | handlerSucc, 58 | handlerSvrErr, 59 | handlerAppErr 60 | } -------------------------------------------------------------------------------- /cloudfunctions/mcloud/framework/lib/mini_lib.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Notes: 小程序封装类库 3 | * Ver : CCMiniCloud Framework 2.0.1 ALL RIGHTS RESERVED BY cClinux0730 (wechat) 4 | * Date: 2020-09-06 14:00:00 5 | */ 6 | const cloudBase = require('../cloud/cloud_base.js'); 7 | const cloudUtil = require('../cloud/cloud_util.js'); 8 | const config = require('../../config/config'); 9 | 10 | 11 | // 消息长度截取 12 | function fmtThing(str) { //20个以内字符,可汉字、数字、字母或符号组合 13 | return str.substr(0, 20); 14 | } 15 | 16 | function fmtCharacterString(str) { //32位以内数字、字母或符号 17 | return str.substr(0, 32); 18 | } 19 | 20 | function fmtPhrase(str) { //5个以内汉字 21 | return str.substr(0, 5); 22 | } 23 | 24 | /** 25 | * 发送一次性消息 26 | * @param {*} body 27 | * @param {*} key 28 | */ 29 | async function sendMiniOnceTempMsg(body, key = '') { 30 | // console.log('##sendOnceTempMsg[' + key + ']', body); 31 | let cloud = cloudBase.getCloud(); 32 | try { 33 | // 默认参数 34 | body.lang = 'zh_CN'; 35 | body.miniprogramState = 'formal'; 36 | 37 | await cloud.openapi.subscribeMessage.send(body); 38 | } catch (err) { 39 | cloudUtil.log('##sendOnceTempMsg[' + key + ']', err); 40 | } 41 | } 42 | module.exports = { 43 | sendMiniOnceTempMsg, 44 | 45 | fmtThing, 46 | fmtCharacterString, 47 | fmtPhrase 48 | } -------------------------------------------------------------------------------- /cloudfunctions/mcloud/framework/platform/controller/base_admin_controller.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Notes: 后台管理控制器模块 3 | * Ver : CCMiniCloud Framework 2.0.3 ALL RIGHTS RESERVED BY cclinuX0730 (wechat) 4 | * Date: 2022-05-26 19:20:00 5 | */ 6 | 7 | const BaseController = require('./base_controller.js'); 8 | const BaseAdminService = require('../service/base_admin_service.js'); 9 | const LogModel = require('../model/log_model.js'); 10 | 11 | const timeUtil = require('../../../framework/utils/time_util.js'); 12 | 13 | class BaseAdminController extends BaseController { 14 | 15 | constructor(route, openId, event) { 16 | super(route, openId, event); 17 | 18 | // 当前时间戳 19 | this._timestamp = timeUtil.time(); 20 | 21 | this._admin = null; 22 | this._adminId = '0'; 23 | 24 | } 25 | 26 | /** 是否管理员 */ 27 | async isAdmin() { 28 | // 判断是否管理员 29 | let service = new BaseAdminService(); 30 | let admin = await service.isAdmin(this._token); 31 | this._admin = admin; 32 | this._adminId = admin._id; 33 | } 34 | 35 | /** 是否超级管理员 */ 36 | async isSuperAdmin() { 37 | // 判断是否管理员 38 | let service = new BaseAdminService(); 39 | let admin = await service.isSuperAdmin(this._token); 40 | this._admin = admin; 41 | this._adminId = admin._id; 42 | } 43 | 44 | /** 记录日志 */ 45 | async log(content, type) { 46 | let service = new BaseAdminService(); 47 | await service.insertLog(content, this._admin, type); 48 | } 49 | 50 | async logSys(content) { 51 | await this.log(content, LogModel.TYPE.SYS); 52 | } 53 | 54 | async logUser(content) { 55 | await this.log(content, LogModel.TYPE.USER); 56 | } 57 | 58 | async logOther(content) { 59 | await this.log(content, LogModel.TYPE.OTHER); 60 | } 61 | 62 | async logNews(content) { 63 | await this.log(content, LogModel.TYPE.NEWS); 64 | } 65 | 66 | } 67 | 68 | module.exports = BaseAdminController; -------------------------------------------------------------------------------- /cloudfunctions/mcloud/framework/platform/controller/base_controller.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Notes: 基础控制器 3 | * Ver : CCMiniCloud Framework 2.0.4 ALL RIGHTS RESERVED BY cclinUx0730 (wechat) 4 | * Date: 2020-09-05 04:00:00 5 | */ 6 | 7 | const config = require('../../../config/config.js'); 8 | const timeUtil = require('../../utils/time_util.js'); 9 | const util = require('../../utils/util.js'); 10 | const dataCheck = require('../../validate/data_check.js'); 11 | 12 | const AppError = require('../../core/app_error.js'); 13 | const appCode = require('../../core/app_code.js'); 14 | 15 | class BaseController { 16 | 17 | constructor(route, openId, event) { 18 | 19 | this._route = route; // 路由 20 | this._openId = openId; //用户身份 21 | this._event = event; // 所有参数 22 | this._request = event.params; //数据参数 23 | 24 | if (!openId) { 25 | console.error('OPENID is unfined'); 26 | throw new AppError('OPENID is unfined', appCode.SVR); 27 | } 28 | 29 | let userId = openId; 30 | 31 | this._token = event.token || ''; 32 | this._userId = userId; 33 | 34 | // 当前时间戳 35 | this._timestamp = timeUtil.time(); 36 | let time = timeUtil.time('Y-M-D h:m:s'); 37 | 38 | console.log('------------------------'); 39 | console.log(`【${time}】【Request -- ↘↘↘】\n【↘Token = ${this._token}】\n【↘USER-ID = ${userId}】\n【↘↘IN DATA】=\n`, JSON.stringify(this._request, null, 4)); 40 | 41 | } 42 | 43 | /** 44 | * 数据校验 45 | * @param {*} rules 46 | */ 47 | validateData(rules = {}) { 48 | let input = this._request; 49 | return dataCheck.check(input, rules); 50 | } 51 | 52 | // 取得某个具体的参数值 53 | getParameter(name) { 54 | let input = this._request; 55 | if (util.isDefined(input[name])) 56 | return input[name]; 57 | else 58 | return ''; 59 | } 60 | } 61 | 62 | module.exports = BaseController; -------------------------------------------------------------------------------- /cloudfunctions/mcloud/framework/platform/model/admin_model.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Notes: 系统管理员实体 3 | * Date: 2021-03-15 19:20:00 4 | * Ver : CCMiniCloud Framework 2.0.5 ALL RIGHTS RESERVED BY CCLINUX0730 (wechat) 5 | */ 6 | 7 | 8 | const BaseModel = require('./base_model.js'); 9 | 10 | class AdminModel extends BaseModel { 11 | 12 | } 13 | 14 | // 集合名 15 | AdminModel.CL = BaseModel.C('admin'); 16 | 17 | AdminModel.DB_STRUCTURE = { 18 | _pid: 'string|true', 19 | ADMIN_ID: 'string|true', 20 | ADMIN_NAME: 'string|true', 21 | ADMIN_DESC: 'string|true', 22 | ADMIN_PHONE: 'string|false|comment=手机', 23 | ADMIN_PASSWORD: 'string|true|comment=密码', 24 | ADMIN_STATUS: 'int|true|default=1|comment=状态:0=禁用 1=启用', 25 | 26 | ADMIN_LOGIN_CNT: 'int|true|default=0|comment=登录次数', 27 | ADMIN_LOGIN_TIME: 'int|true|default=0|comment=最后登录时间', 28 | ADMIN_TYPE: 'int|true|default=0|comment=类型 0=普通管理员 1=超级管理员', 29 | 30 | ADMIN_TOKEN: 'string|false|comment=当前登录token', 31 | ADMIN_TOKEN_TIME: 'int|true|default=0|comment=当前登录token time', 32 | 33 | ADMIN_ADD_TIME: 'int|true', 34 | ADMIN_EDIT_TIME: 'int|true', 35 | ADMIN_ADD_IP: 'string|false', 36 | ADMIN_EDIT_IP: 'string|false', 37 | }; 38 | 39 | // 字段前缀 40 | AdminModel.FIELD_PREFIX = "ADMIN_"; 41 | 42 | 43 | 44 | 45 | 46 | 47 | module.exports = AdminModel; -------------------------------------------------------------------------------- /cloudfunctions/mcloud/framework/platform/model/base_model.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Notes: 实体基类 3 | * Date: 2021-03-15 19:20:00 4 | * Ver : CCMiniCloud Framework 2.0.6 ALL RIGHTS RESERVED BY cclinux0730 (wechat) 5 | */ 6 | 7 | 8 | const MultiModel = require('../../../framework/database/multi_model.js'); 9 | 10 | class BaseModel extends MultiModel { 11 | 12 | } 13 | 14 | module.exports = BaseModel; -------------------------------------------------------------------------------- /cloudfunctions/mcloud/framework/platform/model/log_model.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Notes: 后台操作日志实体 3 | * Ver : CCMiniCloud Framework 2.0.7 ALL RIGHTS RESERVED BY cclinuX0730 (wechat) 4 | * Date: 2020-10-16 19:20:00 5 | */ 6 | 7 | 8 | const BaseModel = require('./base_model.js'); 9 | 10 | class LogModel extends BaseModel { 11 | 12 | } 13 | 14 | // 集合名 15 | LogModel.CL = BaseModel.C('log'); 16 | 17 | LogModel.DB_STRUCTURE = { 18 | _pid: 'string|true', 19 | LOG_ID: 'string|true', 20 | 21 | LOG_ADMIN_ID: 'string|true|comment=管理员', 22 | LOG_ADMIN_DESC: 'string|false', 23 | LOG_ADMIN_NAME: 'string|true', 24 | 25 | LOG_CONTENT: 'string|true', 26 | 27 | LOG_TYPE: 'int|true|comment=日志类型 ', 28 | 29 | LOG_ADD_TIME: 'int|true', 30 | LOG_EDIT_TIME: 'int|true', 31 | LOG_ADD_IP: 'string|false', 32 | LOG_EDIT_IP: 'string|false', 33 | }; 34 | 35 | // 字段前缀 36 | LogModel.FIELD_PREFIX = "LOG_"; 37 | 38 | LogModel.TYPE = { 39 | SYS: 0, 40 | USER: 1, 41 | NEWS: 2, 42 | OTHER: 99, 43 | 44 | } 45 | LogModel.TYPE_DESC = { 46 | SYS: '系统', 47 | USER: '用户', 48 | NEWS: '文章', 49 | OTHER: '其他', 50 | } 51 | 52 | module.exports = LogModel; -------------------------------------------------------------------------------- /cloudfunctions/mcloud/framework/platform/service/base_service.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Notes: 基础业务逻辑 3 | * Ver : CCMiniCloud Framework 2.0.9 ALL RIGHTS RESERVED BY cclinux0730 (wechat) 4 | * Date: 2022-04-24 04:00:00 5 | */ 6 | 7 | const AppError = require('../../core/app_error.js'); 8 | const appCode = require('../../core/app_code.js'); 9 | const timeUtil = require('../../utils/time_util.js'); 10 | 11 | class BaseService { 12 | constructor() { 13 | // 当前时间戳 14 | this._timestamp = timeUtil.time(); 15 | 16 | } 17 | 18 | /** 19 | * 抛出异常 20 | * @param {*} msg 21 | * @param {*} code 22 | */ 23 | AppError(msg, code = appCode.LOGIC) { 24 | throw new AppError(msg, code); 25 | } 26 | 27 | /** 时期范围处理 */ 28 | fmtSearchDate(where, search, field) { 29 | if (!search || search.length != 21 || !search.includes('#')) return where; 30 | 31 | let arr = search.split('#'); 32 | let start = arr[0]; 33 | let end = arr[1]; 34 | where[field] = ['between', start, end]; 35 | return where; 36 | } 37 | 38 | /* 数据库字段排序处理 */ 39 | fmtOrderBySort(sortVal, defaultSort) { 40 | let orderBy = { 41 | [defaultSort]: 'desc' 42 | }; 43 | 44 | if (sortVal.includes('|')) { 45 | let field = sortVal.split('|')[0]; 46 | let order = sortVal.split('|')[1]; 47 | orderBy = { 48 | [field]: order, 49 | }; 50 | if (defaultSort != field) orderBy[defaultSort] = 'desc'; 51 | } 52 | return orderBy; 53 | } 54 | 55 | } 56 | 57 | module.exports = BaseService; -------------------------------------------------------------------------------- /cloudfunctions/mcloud/framework/utils/constant.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Notes: 通用常量定义 3 | * Ver : CCMiniCloud Framework 2.32.1 ALL RIGHTS RESERVED BY cclinux0730 (wechat) 4 | * Date: 2020-09-05 04:00:00 5 | */ 6 | module.exports = { 7 | 8 | } -------------------------------------------------------------------------------- /cloudfunctions/mcloud/framework/utils/math_util.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Notes: 数学计算相关操作函数 3 | * Ver : CCMiniCloud Framework 2.35.1 ALL RIGHTS RESERVED BY cclinux0730 (wechat) 4 | * Date: 2021-10-04 04:00:00 5 | */ 6 | 7 | 8 | /** 获取百分比, 保留2位小数 */ 9 | function percent(num1, num2) { 10 | return Math.round(num1 / num2 * 10000) / 100.00; 11 | } 12 | 13 | /** 数组对象排序 */ 14 | function arrayObjecSortAsc(property) { 15 | return function (a, b) { 16 | var value1 = a[property]; 17 | var value2 = b[property]; 18 | return value1 - value2; 19 | } 20 | } 21 | 22 | /** 数组对象排序 */ 23 | function arrayObjecSortDesc(property) { 24 | return function (a, b) { 25 | var value1 = a[property]; 26 | var value2 = b[property]; 27 | return value2 - value1; 28 | } 29 | } 30 | 31 | module.exports = { 32 | percent, // 百分比,保留2位小数 33 | arrayObjecSortAsc, // 数组对象排序 34 | arrayObjecSortDesc, // 数组对象排序 35 | } -------------------------------------------------------------------------------- /cloudfunctions/mcloud/framework/utils/setup/setup_model.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Notes: 系统设置实体 3 | * Ver : CCMiniCloud Framework 2.0.15 ALL RIGHTS RESERVED BY cclinux0730 (wechat) 4 | * Date: 2020-11-05 19:20:00 5 | */ 6 | 7 | 8 | const MultiModel = require('../../database/multi_model.js'); 9 | 10 | class SetupModel extends MultiModel { 11 | 12 | } 13 | 14 | // 集合名 15 | SetupModel.CL = MultiModel.C('setup'); 16 | 17 | SetupModel.DB_STRUCTURE = { 18 | _pid: 'string|true', 19 | SETUP_ID: 'string|true', 20 | 21 | SETUP_TYPE: 'string|false', //content/cache/vouch 22 | SETUP_KEY: 'string|true', 23 | SETUP_VALUE: 'object|true', // {val:} 24 | 25 | SETUP_ADD_TIME: 'int|true', 26 | SETUP_EDIT_TIME: 'int|true', 27 | SETUP_ADD_IP: 'string|false', 28 | SETUP_EDIT_IP: 'string|false', 29 | }; 30 | 31 | // 字段前缀 32 | SetupModel.FIELD_PREFIX = "SETUP_"; 33 | 34 | 35 | module.exports = SetupModel; 36 | 37 | /* 38 | ### 富文本 39 | [{"type":"text","val":"xxx"},{"type":"img","val":"cloudId://xxxx"}] 40 | 41 | ### 导出 42 | {"EXPORT_CLOUD_ID":"","EXPORT_EDIT_TIME":""} 43 | */ -------------------------------------------------------------------------------- /cloudfunctions/mcloud/framework/utils/util.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Notes: 通用工具函数 3 | * Ver : CCMiniCloud Framework 2.38.1 ALL RIGHTS RESERVED BY cclinux0730 (wechat) 4 | * Date: 2020-09-05 04:00:00 5 | */ 6 | 7 | function getProjectId() { 8 | if (global.PID) 9 | return global.PID; 10 | else 11 | return 'ONE'; 12 | } 13 | 14 | /** 15 | * 判断变量,参数,对象属性是否定义 16 | * @param {*} val 17 | */ 18 | function isDefined(val) { 19 | // == 不能判断是否为null 20 | if (val === undefined) 21 | return false; 22 | else 23 | return true; 24 | } 25 | 26 | /** 27 | * 判断对象是否为空 28 | * @param {*} obj 29 | */ 30 | function isObjectNull(obj) { 31 | return (Object.keys(obj).length == 0); 32 | } 33 | 34 | 35 | 36 | /** 37 | * 休眠时间,配合await使用 38 | * @param {*} time 毫秒 39 | */ 40 | function sleep(time) { 41 | return new Promise((resolve) => setTimeout(resolve, time)); 42 | }; 43 | 44 | 45 | 46 | 47 | module.exports = { 48 | getProjectId, 49 | isDefined, //判断变量,参数,对象属性是否定义 50 | sleep, 51 | isObjectNull, 52 | 53 | } -------------------------------------------------------------------------------- /cloudfunctions/mcloud/index.js: -------------------------------------------------------------------------------- 1 | const application = require('./framework/core/application.js'); 2 | 3 | // 云函数入口函数 4 | exports.main = async (event, context) => { 5 | return await application.app(event, context); 6 | } -------------------------------------------------------------------------------- /cloudfunctions/mcloud/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 | "mysql": "^2.18.1", 14 | "node-xlsx": "^0.16.1", 15 | "wx-server-sdk": "~2.6.2" 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /cloudfunctions/mcloud/project/bbs/controller/admin/admin_home_controller.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Notes: 后台登录与首页模块 3 | * Ver : CCMiniCloud Framework 2.0.1 ALL RIGHTS RESERVED BY cclinux0730 (wechat) 4 | * Date: 2021-03-15 19:20:00 5 | */ 6 | 7 | const BaseProjectAdminController = require('./base_project_admin_controller.js'); 8 | const AdminHomeService = require('../../service/admin/admin_home_service.js'); 9 | 10 | class AdminHomeController extends BaseProjectAdminController { 11 | 12 | 13 | // 管理首页 14 | async adminHome() { 15 | await this.isAdmin(); 16 | 17 | // 数据校验 18 | let rules = { 19 | 20 | }; 21 | 22 | // 取得数据 23 | let input = this.validateData(rules); 24 | 25 | let service = new AdminHomeService(); 26 | return await service.adminHome(); 27 | } 28 | 29 | 30 | // 清除首页推荐 31 | async clearVouchData() { 32 | await this.isAdmin(); 33 | 34 | // 数据校验 35 | let rules = { 36 | 37 | }; 38 | 39 | // 取得数据 40 | let input = this.validateData(rules); 41 | 42 | let service = new AdminHomeService(); 43 | return await service.clearVouchData(); 44 | } 45 | 46 | } 47 | 48 | module.exports = AdminHomeController; -------------------------------------------------------------------------------- /cloudfunctions/mcloud/project/bbs/controller/admin/admin_setup_controller.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Notes: 设置控制模块 3 | * Ver : CCMiniCloud Framework 2.0.1 ALL RIGHTS RESERVED BY cclinux0730 (wechat) 4 | * Date: 2021-07-11 10:20:00 5 | */ 6 | 7 | const BaseProjectAdminController = require('./base_project_admin_controller.js'); 8 | const AdminSetupService = require('../../service/admin/admin_setup_service.js'); 9 | const contentCheck = require('../../../../framework/validate/content_check.js'); 10 | 11 | class AdminSetupController extends BaseProjectAdminController { 12 | 13 | // 通用setup 14 | async setSetup() { 15 | await this.isAdmin(); 16 | 17 | // 数据校验 18 | let rules = { 19 | key: 'must|string|name=KEY', 20 | content: 'name=内容', 21 | }; 22 | 23 | // 取得数据 24 | let input = this._request; 25 | 26 | let service = new AdminSetupService(); 27 | await service.setSetup(input.key, input.content); 28 | } 29 | 30 | // 富文本setup 31 | async setContentSetup() { 32 | await this.isAdmin(); 33 | 34 | // 数据校验 35 | let rules = { 36 | id: 'must|string|name=KEY', 37 | content: 'must|array|name=内容' 38 | }; 39 | 40 | // 取得数据 41 | let input = this.validateData(rules); 42 | 43 | // 内容审核 44 | await contentCheck.checkTextMultiAdmin(input); 45 | 46 | let service = new AdminSetupService(); 47 | await service.setContentSetup(input.id, input.content, 'content'); 48 | } 49 | 50 | async genMiniQr() { 51 | await this.isAdmin(); 52 | 53 | // 数据校验 54 | let rules = { 55 | path: 'must|string', 56 | sc: 'string', 57 | }; 58 | 59 | // 取得数据 60 | let input = this.validateData(rules); 61 | 62 | 63 | let service = new AdminSetupService(); 64 | return await service.genMiniQr(input.path, input.sc); 65 | } 66 | } 67 | 68 | module.exports = AdminSetupController; -------------------------------------------------------------------------------- /cloudfunctions/mcloud/project/bbs/controller/admin/base_project_admin_controller.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Notes: 后台管理控制模块 3 | * Ver : CCMiniCloud Framework 2.0.1 ALL RIGHTS RESERVED BY cclinux0730 (wechat) 4 | * Date: 2021-03-15 19:20:00 5 | */ 6 | 7 | const BaseAdminController = require('../../../../framework/platform/controller/base_admin_controller.js'); 8 | const BaseProjectService = require('../../service/base_project_service.js'); 9 | 10 | class BaseProjectAdminController extends BaseAdminController { 11 | // TODO 12 | async initSetup() { 13 | let service = new BaseProjectService(); 14 | await service.initSetup(); 15 | } 16 | 17 | } 18 | 19 | module.exports = BaseProjectAdminController; -------------------------------------------------------------------------------- /cloudfunctions/mcloud/project/bbs/controller/base_project_controller.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Notes: 本业务基本控制器 3 | * Date: 2021-03-15 19:20:00 4 | * Ver : CCMiniCloud Framework 2.0.1 ALL RIGHTS RESERVED BY cclinux0730 (wechat) 5 | */ 6 | 7 | const BaseController = require('../../../framework/platform/controller/base_controller.js'); 8 | const BaseProjectService = require('../service/base_project_service.js'); 9 | 10 | class BaseProjectController extends BaseController { 11 | 12 | // TODO 13 | async initSetup() { 14 | let service = new BaseProjectService(); 15 | await service.initSetup(); 16 | } 17 | } 18 | 19 | module.exports = BaseProjectController; -------------------------------------------------------------------------------- /cloudfunctions/mcloud/project/bbs/controller/cate_controller.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Notes: 内容检测控制器 3 | * Date: 2021-03-15 19:20:00 4 | * Ver : CCMiniCloud Framework 2.0.1 ALL RIGHTS RESERVED BY cclinux0730 (wechat) 5 | */ 6 | const CateService = require('../service/cate_service.js'); 7 | const BaseProjectController = require('./base_project_controller.js'); 8 | 9 | class CateController extends BaseProjectController { 10 | async getAllCateOptions() { 11 | let service = new CateService(); 12 | return await service.getAllCateOptions(); 13 | 14 | } 15 | 16 | } 17 | 18 | module.exports = CateController; -------------------------------------------------------------------------------- /cloudfunctions/mcloud/project/bbs/controller/check_controller.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Notes: 内容检测控制器 3 | * Date: 2021-03-15 19:20:00 4 | * Ver : CCMiniCloud Framework 2.0.1 ALL RIGHTS RESERVED BY cclinux0730 (wechat) 5 | */ 6 | 7 | const BaseProjectController = require('./base_project_controller.js'); 8 | const contentCheck = require('../../framework/validate/content_check.js'); 9 | 10 | class CheckController extends BaseProjectController { 11 | 12 | /** 13 | * 图片校验 14 | */ 15 | async checkImg() { 16 | 17 | // 数据校验 18 | let rules = { 19 | img: 'name=img', 20 | mine: 'must|default=jpg', 21 | }; 22 | 23 | // 取得数据 24 | let input = this.validateData(rules); 25 | 26 | return await contentCheck.checkImg(input.img, 'jpg'); 27 | 28 | } 29 | 30 | } 31 | 32 | module.exports = CheckController; -------------------------------------------------------------------------------- /cloudfunctions/mcloud/project/bbs/controller/home_controller.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Notes: 全局或者主页模块控制器 3 | * Date: 2020-11-05 10:20:00 4 | * Ver : CCMiniCloud Framework 2.0.1 ALL RIGHTS RESERVED BY cclinux0730 (wechat) 5 | */ 6 | 7 | const BaseProjectController = require('./base_project_controller.js'); 8 | const HomeService = require('../service/home_service.js'); 9 | 10 | class HomeController extends BaseProjectController { 11 | 12 | async getSetup() { 13 | // 数据校验 14 | let rules = { 15 | key: 'must|string|name=KEY', 16 | }; 17 | 18 | // 取得数据 19 | let input = this.validateData(rules); 20 | 21 | let service = new HomeService(); 22 | return await service.getSetup(input.key); 23 | 24 | } 25 | 26 | 27 | /** 首页推荐列表 */ 28 | async getHomeList() { 29 | let service = new HomeService(); 30 | return await service.getHomeList(); 31 | } 32 | 33 | } 34 | 35 | module.exports = HomeController; -------------------------------------------------------------------------------- /cloudfunctions/mcloud/project/bbs/controller/my_controller.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Notes: 用户中心模块控制器 3 | * Date: 2021-03-15 19:20:00 4 | * Ver : CCMiniCloud Framework 2.0.1 ALL RIGHTS RESERVED BY cclinux0730 (wechat) 5 | */ 6 | 7 | const BaseProjectController = require('./base_project_controller.js'); 8 | 9 | class MyController extends BaseProjectController { 10 | 11 | } 12 | 13 | module.exports = MyController; -------------------------------------------------------------------------------- /cloudfunctions/mcloud/project/bbs/model/base_project_model.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Notes: 实体ORM基类 3 | * Date: 2022-03-15 19:20:00 4 | * Ver : CCMiniCloud Framework 2.0.1 ALL RIGHTS RESERVED BY cclinux0730 (wechat) 5 | */ 6 | 7 | 8 | const BaseModel = require('../../../framework/platform/model/base_model.js'); 9 | 10 | class BaseProjectModel extends BaseModel { 11 | 12 | 13 | } 14 | 15 | module.exports = BaseProjectModel; -------------------------------------------------------------------------------- /cloudfunctions/mcloud/project/bbs/model/cate1_model.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Notes: 一级分类 3 | * Ver : CCMiniCloud Framework 2.0.1 ALL RIGHTS RESERVED BY cclinux0730 (wechat) 4 | * Date: 2023-11-04 19:20:00 5 | */ 6 | 7 | 8 | const BaseProjectModel = require('./base_project_model.js'); 9 | 10 | class Cate1Model extends BaseProjectModel { 11 | 12 | } 13 | 14 | // 集合名 15 | Cate1Model.CL = BaseProjectModel.C('cate1'); 16 | 17 | Cate1Model.DB_STRUCTURE = { 18 | _pid: 'string|true', 19 | CATE1_ID: 'string|true', 20 | 21 | CATE1_ORDER: 'int|true|default=9999', 22 | CATE1_VOUCH: 'int|true|default=0', 23 | 24 | CATE1_TITLE: 'string|false|comment=标题', 25 | CATE1_STATUS: 'int|true|default=1|comment=状态 0/1', 26 | 27 | CATE1_CNT: 'int|true|default=0', 28 | 29 | CATE1_FORMS: 'array|true|default=[]', 30 | CATE1_OBJ: 'object|true|default={}', 31 | 32 | CATE1_ADD_TIME: 'int|true', 33 | CATE1_EDIT_TIME: 'int|true', 34 | CATE1_ADD_IP: 'string|false', 35 | CATE1_EDIT_IP: 'string|false', 36 | }; 37 | 38 | // 字段前缀 39 | Cate1Model.FIELD_PREFIX = "CATE1_"; 40 | 41 | 42 | module.exports = Cate1Model; -------------------------------------------------------------------------------- /cloudfunctions/mcloud/project/bbs/model/cate2_model.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Notes: 二级分类 3 | * Ver : CCMiniCloud Framework 2.0.1 ALL RIGHTS RESERVED BY cclinux0730 (wechat) 4 | * Date: 2023-11-04 19:20:00 5 | */ 6 | 7 | 8 | const BaseProjectModel = require('./base_project_model.js'); 9 | 10 | class Cate2Model extends BaseProjectModel { 11 | 12 | } 13 | 14 | // 集合名 15 | Cate2Model.CL = BaseProjectModel.C('cate2'); 16 | 17 | Cate2Model.DB_STRUCTURE = { 18 | _pid: 'string|true', 19 | CATE2_ID: 'string|true', 20 | 21 | CATE2_ORDER: 'int|true|default=9999', 22 | 23 | CATE2_CATE1_ID: 'string|true', 24 | CATE2_TITLE: 'string|false|comment=标题', 25 | CATE2_STATUS: 'int|true|default=1|comment=状态 0/1', 26 | 27 | CATE2_CNT: 'int|true|default=0', 28 | 29 | CATE2_FORMS: 'array|true|default=[]', 30 | CATE2_OBJ: 'object|true|default={}', 31 | 32 | CATE2_ADD_TIME: 'int|true', 33 | CATE2_EDIT_TIME: 'int|true', 34 | CATE2_ADD_IP: 'string|false', 35 | CATE2_EDIT_IP: 'string|false', 36 | }; 37 | 38 | // 字段前缀 39 | Cate2Model.FIELD_PREFIX = "CATE2_"; 40 | 41 | 42 | module.exports = Cate2Model; -------------------------------------------------------------------------------- /cloudfunctions/mcloud/project/bbs/model/comment_model.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Notes: 评论实体 3 | * Ver : CCMiniCloud Framework 2.0.1 ALL RIGHTS RESERVED BY cclinux0730 (wechat) 4 | * Date: 2023-05-24 19:20:00 5 | */ 6 | 7 | 8 | const BaseProjectModel = require('./base_project_model.js'); 9 | 10 | class CommentModel extends BaseProjectModel { 11 | 12 | } 13 | 14 | // 集合名 15 | CommentModel.CL = BaseProjectModel.C('comment'); 16 | 17 | CommentModel.DB_STRUCTURE = { 18 | _pid: 'string|true', 19 | 20 | COMMENT_ID: 'string|true', 21 | 22 | COMMENT_USER_ID: 'string|true|comment=用户ID', 23 | 24 | COMMENT_TYPE: 'string|true', 25 | COMMENT_OID: 'string|true', 26 | 27 | COMMENT_FORMS: 'array|true|default=[]', 28 | COMMENT_OBJ: 'object|true|default={}', 29 | 30 | COMMENT_LIKE_CNT: 'int|true|default=0', 31 | COMMENT_LIKE_LIST: 'array|true|default=[]', 32 | 33 | COMMENT_ADD_TIME: 'int|true', 34 | COMMENT_EDIT_TIME: 'int|true', 35 | COMMENT_ADD_IP: 'string|false', 36 | COMMENT_EDIT_IP: 'string|false', 37 | 38 | }; 39 | 40 | // 字段前缀 41 | CommentModel.FIELD_PREFIX = "COMMENT_"; 42 | 43 | module.exports = CommentModel; -------------------------------------------------------------------------------- /cloudfunctions/mcloud/project/bbs/model/fav_model.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Notes: 收藏实体 3 | * Ver : CCMiniCloud Framework 2.0.1 ALL RIGHTS RESERVED BY cclinux0730 (wechat) 4 | * Date: 2022-05-24 19:20:00 5 | */ 6 | 7 | 8 | const BaseProjectModel = require('./base_project_model.js'); 9 | 10 | class FavModel extends BaseProjectModel { 11 | 12 | } 13 | 14 | // 集合名 15 | FavModel.CL = BaseProjectModel.C('fav'); 16 | 17 | FavModel.DB_STRUCTURE = { 18 | _pid: 'string|true', 19 | FAV_ID: 'string|true', 20 | 21 | FAV_USER_ID: 'string|true', 22 | 23 | FAV_TITLE: 'string|true|comment=标题', 24 | FAV_TYPE: 'string|true|comment=类型', 25 | FAV_OID: 'string|true|comment=相关表主键', 26 | FAV_PATH: 'string|true|comment=路径', 27 | 28 | FAV_ADD_TIME: 'int|true', 29 | FAV_EDIT_TIME: 'int|true', 30 | FAV_ADD_IP: 'string|false', 31 | FAV_EDIT_IP: 'string|false', 32 | }; 33 | 34 | // 字段前缀 35 | FavModel.FIELD_PREFIX = "FAV_"; 36 | 37 | module.exports = FavModel; -------------------------------------------------------------------------------- /cloudfunctions/mcloud/project/bbs/model/product_model.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Notes: 论坛实体 3 | * Ver : CCMiniCloud Framework 2.0.1 ALL RIGHTS RESERVED BY cclinux0730 (wechat) 4 | * Date: 2020-10-28 19:20:00 5 | */ 6 | 7 | 8 | const BaseProjectModel = require('./base_project_model.js'); 9 | 10 | class ProductModel extends BaseProjectModel { 11 | 12 | } 13 | 14 | // 集合名 15 | ProductModel.CL = BaseProjectModel.C('product'); 16 | 17 | ProductModel.DB_STRUCTURE = { 18 | _pid: 'string|true', 19 | PRODUCT_ID: 'string|true', 20 | 21 | PRODUCT_TITLE: 'string|false|comment=标题', 22 | PRODUCT_STATUS: 'int|true|default=1|comment=状态 0/1,99=待审核,98=待修改', 23 | 24 | PRODUCT_USER_ID: 'string|false|comment=用户ID', 25 | PRODUCT_METHOD: 'int|true|default=0|comment=发布方式 0=管理员 1=用户', 26 | 27 | PRODUCT_CATE_ID: 'array|true|comment=分类编号', 28 | PRODUCT_CATE_NAME: 'array|true|comment=分类冗余', 29 | 30 | PRODUCT_GOOD: 'int|true|default=0', 31 | 32 | PRODUCT_ORDER: 'int|true|default=9999', 33 | PRODUCT_VOUCH: 'int|true|default=0', 34 | 35 | PRODUCT_COMMENT_CNT: 'int|true|default=0', 36 | 37 | PRODUCT_QR: 'string|false', 38 | PRODUCT_VIEW_CNT: 'int|true|default=0|comment=访问次数', 39 | 40 | PRODUCT_COMMENT_CNT: 'int|true|default=0|comment=评论数', 41 | PRODUCT_FAV_CNT: 'int|true|default=0|comment=收藏数', 42 | 43 | PRODUCT_LIKE_CNT: 'int|true|default=0|comment=点赞数', 44 | PRODUCT_LIKE_LIST: 'array|true|default=[]|comment=点赞记录', 45 | 46 | PRODUCT_FORMS: 'array|true|default=[]', 47 | PRODUCT_OBJ: 'object|true|default={}', 48 | PRODUCT_PIC: 'array|true|default=[]|comment=图片集', 49 | 50 | PRODUCT_ADD_TIME: 'int|true', 51 | PRODUCT_EDIT_TIME: 'int|true', 52 | PRODUCT_ADD_IP: 'string|false', 53 | PRODUCT_EDIT_IP: 'string|false', 54 | }; 55 | 56 | // 字段前缀 57 | ProductModel.FIELD_PREFIX = "PRODUCT_"; 58 | 59 | 60 | module.exports = ProductModel; -------------------------------------------------------------------------------- /cloudfunctions/mcloud/project/bbs/model/user_model.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Notes: 用户实体 3 | * Ver : CCMiniCloud Framework 2.0.1 ALL RIGHTS RESERVED BY cclinux0730 (wechat) 4 | * Date: 2020-10-14 19:20:00 5 | */ 6 | 7 | 8 | const BaseProjectModel = require('./base_project_model.js'); 9 | class UserModel extends BaseProjectModel { } 10 | 11 | // 集合名 12 | UserModel.CL = BaseProjectModel.C('user'); 13 | 14 | UserModel.DB_STRUCTURE = { 15 | _pid: 'string|true', 16 | USER_ID: 'string|true', 17 | 18 | USER_MINI_OPENID: 'string|true|comment=小程序openid', 19 | USER_STATUS: 'int|true|default=1|comment=状态 0=待审核,1=正常,8=审核未过,9=禁用', 20 | USER_CHECK_REASON: 'string|false|comment=审核未过的理由', 21 | 22 | USER_NAME: 'string|false|comment=用户昵称', 23 | USER_MOBILE: 'string|false|comment=联系电话', 24 | USER_PIC: 'string|false|comment=头像', 25 | 26 | USER_FORMS: 'array|true|default=[]', 27 | USER_OBJ: 'object|true|default={}', 28 | 29 | USER_PRODUCT_CNT: 'int|true|default=0', 30 | USER_PRODUCT_TIME: 'int|true|default=0|comment=最近发贴时间', 31 | 32 | USER_VIEW_CNT: 'int|true|default=0', 33 | 34 | USER_MY_FAV_CNT: 'int|true|default=0|comment=我关注的', 35 | USER_FAV_CNT: 'int|true|default=0|comment=关注我的', 36 | USER_FAV_LIST: 'array|true|default=[]|comment=关注我的', 37 | 38 | USER_LOGIN_CNT: 'int|true|default=0|comment=登陆次数', 39 | USER_LOGIN_TIME: 'int|false|comment=最近登录时间', 40 | 41 | USER_ADD_TIME: 'int|true', 42 | USER_ADD_IP: 'string|false', 43 | 44 | USER_EDIT_TIME: 'int|true', 45 | USER_EDIT_IP: 'string|false', 46 | } 47 | 48 | // 字段前缀 49 | UserModel.FIELD_PREFIX = "USER_"; 50 | 51 | /** 52 | * 状态 0=待审核,1=正常,2=审核未过,9=禁用 53 | */ 54 | UserModel.STATUS = { 55 | UNUSE: 0, 56 | COMM: 1, 57 | UNCHECK: 8, 58 | FORBID: 9 59 | }; 60 | 61 | UserModel.STATUS_DESC = { 62 | UNUSE: '待审核', 63 | COMM: '正常', 64 | UNCHECK: '未通过审核', 65 | FORBID: '禁用' 66 | }; 67 | 68 | 69 | module.exports = UserModel; -------------------------------------------------------------------------------- /cloudfunctions/mcloud/project/bbs/public/constants.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | // 首页推荐 3 | SETUP_HOME_VOUCH_KEY : 'SETUP_HOME_VOUCH_KEY', 4 | } -------------------------------------------------------------------------------- /cloudfunctions/mcloud/project/bbs/public/project_config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | // ## 缓存相关 3 | CACHE_CALENDAR_TIME: 60 * 30, //日历缓存 4 | 5 | } -------------------------------------------------------------------------------- /cloudfunctions/mcloud/project/bbs/service/admin/base_project_admin_service.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Notes: 后台管理模块 基类 3 | * Date: 2021-03-15 07:48:00 4 | * Ver : CCMiniCloud Framework 2.0.1 ALL RIGHTS RESERVED BY cclinux0730 (wechat) 5 | */ 6 | 7 | const BaseAdminService = require('../../../../framework/platform/service/base_admin_service.js'); 8 | ; 9 | const util = require('../../../../framework/utils/util.js'); 10 | const cloudBase = require('../../../../framework/cloud/cloud_base.js'); 11 | 12 | class BaseProjectAdminService extends BaseAdminService { 13 | 14 | getProjectId() { 15 | return util.getProjectId(); 16 | } 17 | 18 | async genDetailQr(type, id) { 19 | let cloud = cloudBase.getCloud(); 20 | 21 | let page = `projects/${this.getProjectId()}/pages/${type}/detail/${type}_detail`; 22 | console.log('page=', page); 23 | let result = await cloud.openapi.wxacode.getUnlimited({ 24 | scene: id, 25 | width: 280, 26 | check_path: false, 27 | //env_version: 'trial', //release,trial,develop 28 | page 29 | }); 30 | 31 | let cloudPath = `${this.getProjectId()}/${type}/${id}/qr.png`; 32 | console.log('cloudPath=', cloudPath); 33 | let upload = await cloud.uploadFile({ 34 | cloudPath, 35 | fileContent: result.buffer, 36 | }); 37 | 38 | if (!upload || !upload.fileID) return; 39 | 40 | return upload.fileID; 41 | } 42 | } 43 | 44 | module.exports = BaseProjectAdminService; -------------------------------------------------------------------------------- /miniprogram/app.js: -------------------------------------------------------------------------------- 1 | const setting = require('./setting/setting.js'); 2 | 3 | App({ 4 | onLaunch: function (options) { 5 | 6 | if (!wx.cloud) { 7 | console.error('请使用 2.2.3 或以上的基础库以使用云能力') 8 | } else { 9 | wx.cloud.init({ 10 | // env 参数说明: 11 | // env 参数决定接下来小程序发起的云开发调用(wx.cloud.xxx)会默认请求到哪个云环境的资源 12 | // 此处请填入环境 ID, 环境 ID 可打开云控制台查看 13 | // 如不填则使用默认环境(第一个创建的环境) 14 | // env: 'my-env-id', 15 | env: setting.CLOUD_ID, 16 | traceUser: true, 17 | }) 18 | } 19 | 20 | this.globalData = {}; 21 | 22 | // 用于自定义导航栏 23 | wx.getSystemInfo({ 24 | success: e => { 25 | this.globalData.statusBarHeight = e.statusBarHeight; 26 | let capsule = wx.getMenuButtonBoundingClientRect(); 27 | if (capsule) { 28 | this.globalData.customBarHeight = capsule.bottom + capsule.top - e.statusBarHeight; 29 | this.globalData.capsule = capsule; 30 | } else { 31 | this.globalData.customBarHeight = e.statusBarHeight + 50; 32 | 33 | } 34 | } 35 | }); 36 | }, 37 | 38 | }) -------------------------------------------------------------------------------- /miniprogram/app.wxss: -------------------------------------------------------------------------------- 1 | @import "style/base/comm.wxss"; 2 | @import "style/public/project.wxss"; 3 | -------------------------------------------------------------------------------- /miniprogram/cmpts/biz/detail/detail_cmpt.json: -------------------------------------------------------------------------------- 1 | { 2 | "component": true, 3 | "usingComponents": { 4 | "cmpt-poster": "/cmpts/public/poster/poster_cmpt" 5 | } 6 | } -------------------------------------------------------------------------------- /miniprogram/cmpts/biz/foot/foot_cmpt.js: -------------------------------------------------------------------------------- 1 | const pageHelper = require('../../../helper/page_helper'); 2 | const timeHelper = require('../../../helper/time_helper'); 3 | const setting = require('../../../setting/setting.js'); 4 | 5 | Component({ 6 | options: { 7 | addGlobalClass: true 8 | }, 9 | 10 | /** 11 | * 组件的属性列表 12 | */ 13 | properties: { 14 | color: { 15 | type: String, 16 | value: '' 17 | }, 18 | }, 19 | 20 | /** 21 | * 组件的初始数据 22 | */ 23 | data: { 24 | 25 | }, 26 | 27 | lifetimes: { 28 | created: function () { 29 | // 组件实例化,但节点树还未导入,因此这时不能用setData 30 | }, 31 | attached: function () { 32 | // 在组件实例进入页面节点树时执行 33 | // 节点树完成,可以用setData渲染节点,但无法操作节点 34 | }, 35 | ready: async function () { 36 | // 组件布局完成,这时可以获取节点信息,也可以操作节点 37 | // 当前用户,用于评论删除 38 | this._loadDetail(); 39 | 40 | this.setData({ time: timeHelper.time('Y.M') }); 41 | }, 42 | move: function () { 43 | // 组件实例被移动到树的另一个位置 44 | }, 45 | detached: function () { 46 | // 在组件实例被从页面节点树移除时执行 47 | }, 48 | }, 49 | 50 | /** 51 | * 组件的方法列表 52 | */ 53 | methods: { 54 | _loadDetail: async function () { 55 | this.setData({ 56 | company: setting.COMPANY, 57 | ver: setting.VER 58 | }); 59 | }, 60 | url: function (e) { 61 | pageHelper.url(e, this); 62 | } 63 | } 64 | }) -------------------------------------------------------------------------------- /miniprogram/cmpts/biz/foot/foot_cmpt.json: -------------------------------------------------------------------------------- 1 | { 2 | "component": true, 3 | "usingComponents": {} 4 | } -------------------------------------------------------------------------------- /miniprogram/cmpts/biz/foot/foot_cmpt.wxml: -------------------------------------------------------------------------------- 1 | 2 | © {{company}} 3 | build {{time}} 4 | -------------------------------------------------------------------------------- /miniprogram/cmpts/biz/foot/foot_cmpt.wxss: -------------------------------------------------------------------------------- 1 | @import "../../../style/public/project.wxss"; 2 | 3 | .site-footer { 4 | width: 100%; 5 | display: flex; 6 | flex-direction: column; 7 | justify-content: center; 8 | align-items: center; 9 | font-size: 24rpx; 10 | color: #aaa; 11 | margin-top: 20rpx; 12 | margin-bottom: 20rpx; 13 | } -------------------------------------------------------------------------------- /miniprogram/cmpts/public/calendar/calendar_comm/calendar_comm_cmpt.json: -------------------------------------------------------------------------------- 1 | { 2 | "component": true, 3 | "usingComponents": {} 4 | } -------------------------------------------------------------------------------- /miniprogram/cmpts/public/calendar/calendar_meet/calendar_meet_cmpt.json: -------------------------------------------------------------------------------- 1 | { 2 | "component": true, 3 | "usingComponents": {} 4 | } -------------------------------------------------------------------------------- /miniprogram/cmpts/public/calendar/date_select/date_select_cmpt.json: -------------------------------------------------------------------------------- 1 | { 2 | "component": true, 3 | "usingComponents": {} 4 | } -------------------------------------------------------------------------------- /miniprogram/cmpts/public/calendar/date_select/date_select_cmpt.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | {{month||'2022年'}} 4 | 刷新 5 | 6 | 7 | 8 | {{item.week}} 9 | {{item.show}} 10 | 11 | 12 | -------------------------------------------------------------------------------- /miniprogram/cmpts/public/calendar/date_select/date_select_cmpt.wxss: -------------------------------------------------------------------------------- 1 | @import "../calendar_comm/din.wxss"; 2 | 3 | .date-cmpt { 4 | width: 100%; 5 | } 6 | 7 | .date-cmpt .month { 8 | width: 100%; 9 | padding: 10rpx 15rpx; 10 | display: flex; 11 | align-items: center; 12 | justify-content: space-between; 13 | } 14 | 15 | .date-cmpt .month .left{ 16 | font-size: 32rpx; 17 | color: #000; 18 | font-weight: bold; 19 | font-family: 'din'; 20 | } 21 | 22 | .date-cmpt .month .right{ 23 | font-size: 28rpx; 24 | color: #777; 25 | padding: 0 10rpx 0rpx 60rpx; 26 | } 27 | 28 | 29 | 30 | .date-select { 31 | white-space: nowrap; 32 | } 33 | 34 | .date-select .item { 35 | margin: 10rpx 10rpx 10rpx 0rpx; 36 | text-align: center; 37 | font-size: 24rpx; 38 | line-height: 55rpx; 39 | height: 110rpx; 40 | width: 85rpx; 41 | border: 2rpx solid #ddd; 42 | border-radius: 17rpx; 43 | display: inline-block; 44 | } 45 | 46 | .date-select .item:first-child { 47 | margin-left: 5rpx; 48 | } 49 | 50 | .date-select .item .date { 51 | font-size: 32rpx; 52 | color: #000; 53 | font-family: 'din'; 54 | } 55 | 56 | .date-select .item .week { 57 | font-size: 24rpx; 58 | color: #666; 59 | } 60 | 61 | .date-select .item.cur { 62 | background-color: #f37445; 63 | } 64 | 65 | .date-select .item.cur .week, 66 | .date-select .item.cur .date { 67 | color: #fff; 68 | } -------------------------------------------------------------------------------- /miniprogram/cmpts/public/calendar/time_select/time_select_cmpt.json: -------------------------------------------------------------------------------- 1 | { 2 | "component": true, 3 | "usingComponents": {} 4 | } -------------------------------------------------------------------------------- /miniprogram/cmpts/public/calendar/time_select/time_select_cmpt.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | {{item.title}} 6 | {{item.usedText}} 7 | 8 | 9 | 10 | 11 | 12 | 13 | 确认预约 ({{selectedStart}}~{{selectedEndPoint}}) 14 | -------------------------------------------------------------------------------- /miniprogram/cmpts/public/car_number/car_number_cmpt.json: -------------------------------------------------------------------------------- 1 | { 2 | "component": true, 3 | "usingComponents": {} 4 | } -------------------------------------------------------------------------------- /miniprogram/cmpts/public/checkbox/checkbox_cmpt.json: -------------------------------------------------------------------------------- 1 | { 2 | "component": true, 3 | "usingComponents": {} 4 | } -------------------------------------------------------------------------------- /miniprogram/cmpts/public/checkbox/checkbox_cmpt.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 14 | 15 | -------------------------------------------------------------------------------- /miniprogram/cmpts/public/checkbox/checkbox_cmpt.wxss: -------------------------------------------------------------------------------- 1 | .checkbox-group { 2 | width: 100%; 3 | display: flex; 4 | justify-content: center; 5 | flex-direction: column; 6 | align-items: center; 7 | padding: 0rpx 20rpx; 8 | } 9 | 10 | .checkbox-group .item { 11 | width: 100%; 12 | display: flex; 13 | flex-direction: row; 14 | justify-content: flex-start; 15 | align-items: center; 16 | line-height: 2.1; 17 | min-height: 70rpx; 18 | border-bottom: 1rpx solid #eee; 19 | font-size: 28rpx; 20 | } 21 | 22 | .checkbox-group .item .item-label{ 23 | width: 100%; 24 | display: flex; 25 | flex-direction: row; 26 | justify-content: flex-start; 27 | align-items: center; 28 | } 29 | 30 | 31 | .checkbox-group .item:last-child { 32 | border-bottom: 0; 33 | } 34 | 35 | .checkbox-group .item:nth-child(odd) { 36 | background-color: #fcfcfc; 37 | } 38 | 39 | 40 | .checkbox-group .item .item-checkbox { 41 | margin-right: 20rpx; 42 | padding-left: 10rpx; 43 | } 44 | 45 | 46 | 47 | /*按行排列*/ 48 | .checkbox-group.row{ 49 | flex-direction: row!important; 50 | flex-wrap: wrap!important; 51 | justify-content: flex-start; 52 | } 53 | 54 | .checkbox-group.row .item{ 55 | width:unset!important; 56 | margin-right: 25rpx; 57 | } 58 | 59 | .checkbox-group.row .item .item-checkbox { 60 | margin-right: 5rpx; 61 | padding-left: 0rpx; 62 | } 63 | -------------------------------------------------------------------------------- /miniprogram/cmpts/public/custom_nav/custom_nav_cmpt.js: -------------------------------------------------------------------------------- 1 | 2 | const app = getApp(); 3 | Component({ 4 | /** 5 | * 组件的一些选项 6 | */ 7 | options: { 8 | addGlobalClass: true, 9 | multipleSlots: true 10 | }, 11 | /** 12 | * 组件的对外属性 13 | */ 14 | properties: { 15 | textColor: { 16 | type: String, 17 | value: 'text-white' 18 | }, 19 | url: { 20 | type: String, 21 | value: '/projects/home/index/home_index' 22 | } 23 | }, 24 | /** 25 | * 组件的初始数据 26 | */ 27 | data: { 28 | method: 'back', 29 | statusBarHeight: app.globalData.statusBarHeight, 30 | customBarHeight: app.globalData.customBarHeight, 31 | }, 32 | 33 | lifetimes: { 34 | attached() { 35 | let parentPages = getCurrentPages().length; 36 | if (parentPages == 1) 37 | this.setData({ 38 | method: 'home' 39 | }); 40 | } 41 | }, 42 | 43 | 44 | /** 45 | * 组件的方法列表 46 | */ 47 | methods: { 48 | bindTap() { 49 | if (this.data.method == 'back') { 50 | wx.navigateBack(); 51 | } else 52 | wx.reLaunch({ 53 | url: this.data.url, 54 | }); 55 | } 56 | } 57 | }) -------------------------------------------------------------------------------- /miniprogram/cmpts/public/custom_nav/custom_nav_cmpt.json: -------------------------------------------------------------------------------- 1 | { 2 | "component": true, 3 | "usingComponents": {} 4 | } -------------------------------------------------------------------------------- /miniprogram/cmpts/public/custom_nav/custom_nav_cmpt.wxml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /miniprogram/cmpts/public/custom_nav/custom_nav_cmpt.wxss: -------------------------------------------------------------------------------- 1 | .bar { 2 | display: flex; 3 | position: relative; 4 | align-items: center; 5 | min-height: 100rpx; 6 | justify-content: space-between; 7 | } 8 | 9 | .custom { 10 | display: block; 11 | position: fixed; 12 | width:100%; 13 | z-index: 99999; 14 | } 15 | 16 | .custom .title{ 17 | color:#fff; 18 | } 19 | 20 | .custom .bar { 21 | width:100%; 22 | min-height: 0px; 23 | padding-right: 220rpx; 24 | box-shadow: 0rpx 0rpx 0rpx; 25 | z-index: 9999; 26 | } 27 | 28 | .custom .bar .action>.icc { 29 | background-color: rgba(0, 0, 0, .3); 30 | border-radius: 50% !important; 31 | color: #fff; 32 | width: 60rpx; 33 | height: 60rpx; 34 | display: flex; 35 | justify-content: center; 36 | align-items: center; 37 | font-size: 36rpx; 38 | } 39 | 40 | .custom .bar .content { 41 | width: 100%; 42 | } 43 | 44 | 45 | .custom .bar .content image { 46 | height: 60rpx; 47 | width: 240rpx; 48 | } -------------------------------------------------------------------------------- /miniprogram/cmpts/public/editor/editor_cmpt.json: -------------------------------------------------------------------------------- 1 | { 2 | "component": true, 3 | "usingComponents": {} 4 | } -------------------------------------------------------------------------------- /miniprogram/cmpts/public/form/form_set/field/form_set_field.json: -------------------------------------------------------------------------------- 1 | { 2 | "usingComponents": { 3 | "cmpt-picker-multi": "/cmpts/public/picker_multi/picker_multi_cmpt" 4 | }, 5 | "navigationBarBackgroundColor": "#ffffff", 6 | "navigationBarTextStyle": "black", 7 | "enablePullDownRefresh": true, 8 | "backgroundTextStyle": "dark", 9 | "navigationBarTitleText": "后台-字段添加" 10 | } -------------------------------------------------------------------------------- /miniprogram/cmpts/public/form/form_set/field/form_set_field.wxss: -------------------------------------------------------------------------------- 1 | .main { 2 | margin-bottom: 150rpx; 3 | } 4 | 5 | .oprt { 6 | display: flex; 7 | width: 100%; 8 | justify-content: space-around; 9 | } 10 | 11 | .oprt button { 12 | width: 45%; 13 | } 14 | 15 | .select-close { 16 | width: 60rpx; 17 | font-size: 40rpx !important; 18 | font-weight: bold; 19 | text-align: right; 20 | } 21 | 22 | .title-desc { 23 | padding-left: 24rpx; 24 | color: #aaa; 25 | padding-bottom: 30rpx; 26 | border-bottom: 1rpx solid #eee; 27 | } 28 | 29 | .title-info { 30 | margin-left: 4rpx; 31 | color: #aaa; 32 | font-weight: normal; 33 | font-size: 24rpx; 34 | } -------------------------------------------------------------------------------- /miniprogram/cmpts/public/form/form_set/form_set_cmpt.json: -------------------------------------------------------------------------------- 1 | { 2 | "component": true, 3 | "usingComponents": {} 4 | } -------------------------------------------------------------------------------- /miniprogram/cmpts/public/form/form_set/form_set_cmpt.wxss: -------------------------------------------------------------------------------- 1 | .picker-set { 2 | line-height: 100rpx; 3 | font-size: 24rpx; 4 | width: 100%; 5 | text-align: right; 6 | color: #999; 7 | width: 210rpx; 8 | } 9 | 10 | .form-group .picker-set { 11 | padding-right: 40rpx; 12 | overflow: hidden; 13 | position: relative; 14 | } 15 | 16 | .form-group.cur { 17 | animation: glow 800ms linear 1 alternate; 18 | } 19 | 20 | @keyframes glow { 21 | 0% { 22 | background-color: #ececec; 23 | } 24 | 100% { 25 | background-color: #fff; 26 | } 27 | } 28 | 29 | .form-group-active{ 30 | background-color: #ececec; 31 | } 32 | 33 | .form-group .title { 34 | font-weight: normal; 35 | color: #333; 36 | flex: 1; 37 | padding-right: 10rpx; 38 | } 39 | 40 | .form-group .field-oprt { 41 | color: #777; 42 | background: hsla(0, 0%, 100%, .95); 43 | border-radius: 5rpx; 44 | box-shadow: 0 0 5px rgba(0, 0, 0, .1); 45 | display: flex; 46 | text-align: center; 47 | align-items: center; 48 | justify-content: center; 49 | margin-right: 15rpx; 50 | } 51 | 52 | .form-group .field-oprt>view{ 53 | width:70rpx; 54 | height:55rpx; 55 | display: flex; 56 | text-align: center; 57 | align-items: center; 58 | justify-content: center; 59 | font-size:36rpx; 60 | } 61 | -------------------------------------------------------------------------------- /miniprogram/cmpts/public/form/form_show/content/form_show_content.json: -------------------------------------------------------------------------------- 1 | { 2 | "usingComponents": { 3 | "cmpt-editor": "/cmpts/public/editor/editor_cmpt" 4 | }, 5 | "navigationBarTitleText": "详细内容" 6 | } -------------------------------------------------------------------------------- /miniprogram/cmpts/public/form/form_show/content/form_show_content.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 不保存,返回 11 | 保存 12 | -------------------------------------------------------------------------------- /miniprogram/cmpts/public/form/form_show/content/form_show_content.wxss: -------------------------------------------------------------------------------- 1 | @import '../../../../../style/public/admin.wxss'; 2 | 3 | .main-admin { 4 | width: 100%; 5 | box-sizing: border-box; 6 | padding: 30rpx 20rpx; 7 | padding-bottom: 200rpx; 8 | } 9 | 10 | .form-group { 11 | padding: 1rpx 1rpx; 12 | overflow: hidden; 13 | } 14 | 15 | .oprt { 16 | display: flex; 17 | width: 100%; 18 | justify-content: space-around; 19 | } 20 | 21 | .oprt button { 22 | width: 45%; 23 | } 24 | 25 | .bottom-oprt { 26 | position: fixed; 27 | bottom: 0; 28 | height: 130rpx; 29 | background-color: #f8f8f8; 30 | display: flex; 31 | justify-content: space-around; 32 | align-items: center; 33 | border-top: 1rpx solid #ccc; 34 | z-index: 99999; 35 | } -------------------------------------------------------------------------------- /miniprogram/cmpts/public/form/form_show/form_show_cmpt.json: -------------------------------------------------------------------------------- 1 | { 2 | "component": true, 3 | "usingComponents": { 4 | "cmpt-car-number": "/cmpts/public/car_number/car_number_cmpt", 5 | "cmpt-checkbox": "/cmpts/public/checkbox/checkbox_cmpt", 6 | "cmpt-radio": "/cmpts/public/radio/radio_cmpt", 7 | "cmpt-rows": "/cmpts/public/rows/rows_cmpt", 8 | "cmpt-img-upload": "/cmpts/public/img/img_upload_cmpt" 9 | } 10 | } -------------------------------------------------------------------------------- /miniprogram/cmpts/public/img/img_upload_cmpt.json: -------------------------------------------------------------------------------- 1 | { 2 | "component": true, 3 | "usingComponents": {} 4 | } -------------------------------------------------------------------------------- /miniprogram/cmpts/public/img/img_upload_cmpt.wxml: -------------------------------------------------------------------------------- 1 | 2 | *{{title}} (每张不超过{{imgUploadSize}}M) 3 | 4 | 5 | {{imgList.length}}/{{imgMax}} 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | #{{index}} 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /miniprogram/cmpts/public/img/img_upload_cmpt.wxss: -------------------------------------------------------------------------------- 1 | @import "../../../style/base/comm.wxss"; 2 | @import "../../../style/public/project.wxss"; 3 | 4 | .form-group .upload-img .img-no { 5 | position: absolute; 6 | right: 0; 7 | bottom: 0; 8 | border-top-left-radius: 6rpx; 9 | padding: 6rpx 12rpx; 10 | height: 35rpx; 11 | opacity: .9; 12 | } -------------------------------------------------------------------------------- /miniprogram/cmpts/public/list/comm_list_cmpt.json: -------------------------------------------------------------------------------- 1 | { 2 | "component": true, 3 | "usingComponents": {} 4 | } -------------------------------------------------------------------------------- /miniprogram/cmpts/public/modal/modal_cmpt.js: -------------------------------------------------------------------------------- 1 | // cmpts/public/modal/modal.js 2 | Component({ 3 | options: { 4 | addGlobalClass: true, 5 | multipleSlots: true 6 | }, 7 | 8 | externalClasses: ['slot-class'], 9 | 10 | /** 11 | * 组件的属性列表 12 | */ 13 | properties: { 14 | type: { // 类型 comm/bottom/dialog/image 15 | type: String, 16 | value: 'comm' 17 | }, 18 | title: { 19 | type: String, 20 | value: '温馨提示' 21 | }, 22 | subtitle: { 23 | type: String, 24 | value: '' 25 | }, 26 | subtitleAlign: { 27 | type: String, 28 | value: 'center' 29 | }, 30 | show: { 31 | type: Boolean, 32 | value: true 33 | }, 34 | cancelText: { 35 | type: String, 36 | value: '取消' 37 | }, 38 | confirmText: { 39 | type: String, 40 | value: '确定' 41 | }, 42 | showConfirm: { 43 | type: Boolean, 44 | value: true 45 | }, 46 | imgURL: { 47 | type: String, 48 | value: '' 49 | }, 50 | 51 | height: { 52 | type: Number, 53 | value: 600 54 | }, 55 | }, 56 | 57 | /** 58 | * 组件的初始数据 59 | */ 60 | data: { 61 | 62 | }, 63 | 64 | /** 65 | * 组件的方法列表 66 | */ 67 | methods: { 68 | bindHideModalTap: function (e) { 69 | this.setData({ 70 | show: '' 71 | }) 72 | }, 73 | 74 | nomove: function () {}, 75 | 76 | bindComfirmTap: function (e) { 77 | this.triggerEvent('click', {}); 78 | } 79 | } 80 | }) -------------------------------------------------------------------------------- /miniprogram/cmpts/public/modal/modal_cmpt.json: -------------------------------------------------------------------------------- 1 | { 2 | "component": true, 3 | "usingComponents": {} 4 | } -------------------------------------------------------------------------------- /miniprogram/cmpts/public/modal/modal_cmpt.wxss: -------------------------------------------------------------------------------- 1 | .bg-img { 2 | width: 100%; 3 | height: 100%; 4 | position: relative; 5 | } 6 | 7 | .bg-img .bg-img-image { 8 | top: 0; 9 | left: 0; 10 | position: absolute; 11 | width: 100%; 12 | height: 100%; 13 | } 14 | 15 | .bg-img .action .icon-close { 16 | font-size: 50rpx !important; 17 | font-weight: bold; 18 | } 19 | 20 | .modal .dialog { 21 | padding: 20rpx 0rpx; 22 | margin-top:30rpx; 23 | } 24 | 25 | .modal .dialog .bar { 26 | background-color: #f8f8f8; 27 | } 28 | 29 | .modal .dialog .bar .content { 30 | color: #333; 31 | font-size: 36rpx; 32 | } 33 | 34 | .modal-bar { 35 | width: 100%; 36 | display: flex; 37 | align-items: center; 38 | justify-content: center; 39 | border-top: 1rpx solid #ccc; 40 | line-height: 3; 41 | } 42 | 43 | .modal-bar .modal-bar-view { 44 | width: 50%; 45 | font-size: 36rpx; 46 | font-weight: bold; 47 | } 48 | 49 | .modal-bar .modal-bar-comfirm { 50 | color: #576B95; 51 | border-left: 1rpx solid #ccc; 52 | } 53 | 54 | .modal .modal-dialog { 55 | padding: 10rpx 0rpx 0; 56 | } 57 | 58 | .modal .modal-dialog .subtitle { 59 | width:100%; 60 | text-align: center; 61 | font-size:30rpx; 62 | color:#777; 63 | padding:0 60rpx; 64 | margin-top:10rpx; 65 | margin-bottom:20rpx; 66 | } -------------------------------------------------------------------------------- /miniprogram/cmpts/public/picker/picker_cmpt.json: -------------------------------------------------------------------------------- 1 | { 2 | "component": true, 3 | "usingComponents": {} 4 | } -------------------------------------------------------------------------------- /miniprogram/cmpts/public/picker/picker_cmpt.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | {{options[idx].label || noDataHint}} 4 | {{options[idx] || noDataHint}} 5 | 6 | 7 | 8 | 9 | 10 | 11 | {{multiDesc || noDataHint}} 12 | 13 | 14 | -------------------------------------------------------------------------------- /miniprogram/cmpts/public/picker/picker_cmpt.wxss: -------------------------------------------------------------------------------- 1 | .picker-cmpt { 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 | padding-right: 40rpx; 10 | } 11 | 12 | .disabled { 13 | background-color: #eee; 14 | color:#999; 15 | } 16 | 17 | .picker-cmpt::before { 18 | position: absolute; 19 | top: 0; 20 | right: 30rpx; 21 | bottom: 0; 22 | display: block; 23 | margin: auto; 24 | width: 30rpx; 25 | height: 30rpx; 26 | color: var(--grey); 27 | content: "\e6a3"; 28 | text-align: center; 29 | font-size: 34rpx; 30 | font-family: "icon"; 31 | line-height: 30rpx; 32 | margin-top: auto; 33 | margin-right: auto; 34 | margin-bottom: auto; 35 | margin-left: auto; 36 | } -------------------------------------------------------------------------------- /miniprogram/cmpts/public/picker_multi/picker_multi_cmpt.json: -------------------------------------------------------------------------------- 1 | { 2 | "component": true, 3 | "usingComponents": {} 4 | } -------------------------------------------------------------------------------- /miniprogram/cmpts/public/picker_multi/picker_multi_cmpt.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | {{multiArray[0][multiIndex[0]]}},{{multiArray[1][multiIndex[1]]}} 6 | 7 | 8 | {{multiArray[0][multiIndex[0]]}},{{multiArray[1][multiIndex[1]]}},{{multiArray[2][multiIndex[2]]}} 9 | 10 | 11 | {{multiArray[0][multiIndex[0]]}},{{multiArray[1][multiIndex[1]]}},{{multiArray[2][multiIndex[2]]}},{{multiArray[3][multiIndex[3]]}} 12 | 13 | 14 | {{multiArray[0][multiIndex[0]]}},{{multiArray[1][multiIndex[1]]}},{{multiArray[2][multiIndex[2]]}},{{multiArray[3][multiIndex[3]]}},{{multiArray[4][multiIndex[4]]}} 15 | 16 | 17 | -------------------------------------------------------------------------------- /miniprogram/cmpts/public/picker_multi/picker_multi_cmpt.wxss: -------------------------------------------------------------------------------- 1 | .picker-cmpt { 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/cmpts/public/picker_time/picker_time_cmpt.json: -------------------------------------------------------------------------------- 1 | { 2 | "component": true, 3 | "usingComponents": {} 4 | } -------------------------------------------------------------------------------- /miniprogram/cmpts/public/picker_time/picker_time_cmpt.wxml: -------------------------------------------------------------------------------- 1 | 10 | 11 | -------------------------------------------------------------------------------- /miniprogram/cmpts/public/picker_time/picker_time_cmpt.wxss: -------------------------------------------------------------------------------- 1 | /* cmpts/public/picker_time/picker_time_cmpt.wxss */ -------------------------------------------------------------------------------- /miniprogram/cmpts/public/poster/images/friend.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wananmiao2000/SmartForum/80514df764eec52926b8d87e94380908fd68061a/miniprogram/cmpts/public/poster/images/friend.png -------------------------------------------------------------------------------- /miniprogram/cmpts/public/poster/images/wechat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wananmiao2000/SmartForum/80514df764eec52926b8d87e94380908fd68061a/miniprogram/cmpts/public/poster/images/wechat.png -------------------------------------------------------------------------------- /miniprogram/cmpts/public/poster/poster_cmpt.json: -------------------------------------------------------------------------------- 1 | { 2 | "component": true, 3 | "usingComponents": { 4 | "poster": "./wxa-plugin-canvas/poster" 5 | } 6 | } -------------------------------------------------------------------------------- /miniprogram/cmpts/public/poster/poster_cmpt.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 长按图片保存或者转发 11 | 12 | 13 | 14 | 20 | 21 | 22 | 23 | 24 | 25 | 生成海报 26 | 27 | 28 | 29 | 30 | 关闭 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /miniprogram/cmpts/public/poster/poster_cmpt.wxss: -------------------------------------------------------------------------------- 1 | .main-poster .poster-share { 2 | width: 100%; 3 | display: flex; 4 | justify-content: space-around; 5 | align-items: center; 6 | padding: 30rpx 50rpx 10rpx; 7 | } 8 | 9 | .main-poster .poster-share .item { 10 | flex: 1 0 0; 11 | display: flex; 12 | flex-direction: column; 13 | justify-content: flex-start; 14 | align-items: center; 15 | color: #333; 16 | } 17 | 18 | .main-poster .poster-share .item .pic { 19 | height: 100rpx; 20 | width: 100rpx; 21 | background-color: #f2f2f2; 22 | border-radius: 50%; 23 | display: flex; 24 | justify-content: center; 25 | align-items: center; 26 | } 27 | 28 | .main-poster .poster-share .item-share { 29 | margin-top: 15rpx; 30 | } 31 | 32 | .main-poster .poster-share .item-share>text { 33 | margin-top: 15rpx !important; 34 | } 35 | 36 | .main-poster .poster-share .item .pic image { 37 | height: 50rpx; 38 | width: 50rpx; 39 | } 40 | 41 | .main-poster .poster-share .item .pic .friend { 42 | height: 60rpx; 43 | width: 60rpx; 44 | } 45 | 46 | .main-poster .poster-share .item>text { 47 | margin-top: 15rpx; 48 | font-size: 30rpx; 49 | text-align: center; 50 | } 51 | 52 | .main-poster .poster-img { 53 | display: flex; 54 | justify-content: center; 55 | align-items: center; 56 | padding-top: 0rpx; 57 | padding-bottom: 0rpx; 58 | min-height: 600rpx; 59 | margin-top: 30rpx; 60 | flex-direction: column; 61 | } 62 | 63 | .main-poster .poster-img .save-hint { 64 | font-size: 30rpx; 65 | color: #555; 66 | margin-top: 10rpx; 67 | } 68 | 69 | .load.loading::after { 70 | content: "海报生成中..."; 71 | } 72 | 73 | .main-poster .poster-img image { 74 | width: 375rpx; 75 | border-radius: 15rpx; 76 | } 77 | 78 | .main-poster .line { 79 | width: 100%; 80 | margin: 30rpx 0 30rpx; 81 | border-top: 1rpx solid #ddd; 82 | padding: 30rpx 0 20rpx; 83 | font-size: 32rpx; 84 | } -------------------------------------------------------------------------------- /miniprogram/cmpts/public/poster/wxa-plugin-canvas/index/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "component": true 3 | } -------------------------------------------------------------------------------- /miniprogram/cmpts/public/poster/wxa-plugin-canvas/index/index.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /miniprogram/cmpts/public/poster/wxa-plugin-canvas/index/index.wxss: -------------------------------------------------------------------------------- 1 | .canvas { 2 | width: 750rpx; 3 | height: 750rpx; 4 | } 5 | .canvas.pro { 6 | position: absolute; 7 | bottom: 0; 8 | left: 0; 9 | transform: translate3d(-9999rpx, 0, 0); 10 | } 11 | .canvas.debug { 12 | position: absolute; 13 | bottom: 0; 14 | left: 0; 15 | border: 1rpx solid #ccc; 16 | } -------------------------------------------------------------------------------- /miniprogram/cmpts/public/poster/wxa-plugin-canvas/poster/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "component": true, 3 | "usingComponents": { 4 | "we-canvas": "../index/index" 5 | } 6 | } -------------------------------------------------------------------------------- /miniprogram/cmpts/public/poster/wxa-plugin-canvas/poster/index.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /miniprogram/cmpts/public/poster/wxa-plugin-canvas/poster/index.wxss: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wananmiao2000/SmartForum/80514df764eec52926b8d87e94380908fd68061a/miniprogram/cmpts/public/poster/wxa-plugin-canvas/poster/index.wxss -------------------------------------------------------------------------------- /miniprogram/cmpts/public/poster/wxa-plugin-canvas/poster/poster.js: -------------------------------------------------------------------------------- 1 | const defaultOptions = { 2 | selector: '#poster' 3 | }; 4 | 5 | function Poster(options = {}, that) { 6 | options = { 7 | ...defaultOptions, 8 | ...options, 9 | }; 10 | 11 | const pages = getCurrentPages(); 12 | let ctx = pages[pages.length - 1]; 13 | if (that) ctx = that 14 | const poster = ctx.selectComponent(options.selector); 15 | delete options.selector; 16 | 17 | return poster; 18 | }; 19 | 20 | Poster.create = (reset = false, that) => { 21 | const poster = Poster({}, that); 22 | if (!poster) { 23 | console.error('请设置组件的id="poster"!!!'); 24 | } else { 25 | return Poster({}, that).onCreate(reset); 26 | } 27 | } 28 | 29 | export default Poster; 30 | -------------------------------------------------------------------------------- /miniprogram/cmpts/public/radio/radio_cmpt.json: -------------------------------------------------------------------------------- 1 | { 2 | "component": true, 3 | "usingComponents": {} 4 | } -------------------------------------------------------------------------------- /miniprogram/cmpts/public/radio/radio_cmpt.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | 9 | 10 | 11 | 12 | {{item.label}}{{labelExt}} 13 | 14 | -------------------------------------------------------------------------------- /miniprogram/cmpts/public/rows/rows_cmpt.json: -------------------------------------------------------------------------------- 1 | { 2 | "component": true, 3 | "usingComponents": {} 4 | } -------------------------------------------------------------------------------- /miniprogram/cmpts/public/rows/rows_set_helper.js: -------------------------------------------------------------------------------- 1 | 2 | const helper = require('../../../helper/helper.js'); 3 | const dataHelper = require('../../../helper/data_helper.js'); 4 | 5 | const BASE_ROW = { mark: '', title: '', val: '', pic: '', detail: [], edit: true }; 6 | 7 | function fmtRows(rows) { 8 | for (let k = 0; k < rows.length; k++) { 9 | let node = rows[k]; 10 | 11 | // 补充编号 12 | if (!node['mark']) node['mark'] = mark(); 13 | 14 | if (!helper.isDefined(node['title'])) node['title'] = ''; 15 | if (!helper.isDefined(node['val'])) node['val'] = ''; 16 | if (!helper.isDefined(node['pic'])) node['pic'] = ''; 17 | 18 | if (!helper.isDefined(node['detail'])) node['detail'] = []; 19 | if (!Array.isArray(node['detail'])) node['detail'] = []; 20 | 21 | if (!helper.isDefined(node['edit'])) node['edit'] = true; 22 | } 23 | 24 | return rows; 25 | } 26 | 27 | function mark() { 28 | return dataHelper.genRandomAlpha(10).toUpperCase(); 29 | }; 30 | 31 | module.exports = { 32 | BASE_ROW, 33 | fmtRows, 34 | mark 35 | } -------------------------------------------------------------------------------- /miniprogram/cmpts/public/simple_list/simple_list_cmpt.json: -------------------------------------------------------------------------------- 1 | { 2 | "component": true, 3 | "usingComponents": {} 4 | } -------------------------------------------------------------------------------- /miniprogram/cmpts/public/simple_list/simple_list_cmpt.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | {{dataNoHint}} 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | {{dataNoHint}} 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /miniprogram/cmpts/public/simple_list/simple_list_cmpt.wxss: -------------------------------------------------------------------------------- 1 | .scroll-view { 2 | height: 100vh; 3 | } -------------------------------------------------------------------------------- /miniprogram/cmpts/public/swiper/swiper_cmpt.js: -------------------------------------------------------------------------------- 1 | const pageHelper = require('../../../helper/page_helper.js'); 2 | Component({ 3 | options: { 4 | addGlobalClass: true, 5 | }, 6 | 7 | /** 8 | * 组件的属性列表 9 | */ 10 | properties: { 11 | images: { 12 | type: Array, 13 | value: [] 14 | }, 15 | height: { 16 | type: Number, 17 | value: 350 18 | }, 19 | mode: { 20 | type: String, 21 | value: 'aspectFill' 22 | }, 23 | indicatorActiveColor: { 24 | type: String, 25 | value: '#000000' 26 | }, 27 | interval: { 28 | type: Number, 29 | value: 3000 30 | }, 31 | duration: { 32 | type: Number, 33 | value: 500 34 | }, 35 | previousMargin: { 36 | type: Number, 37 | value: 0 38 | }, 39 | nextMargin: { 40 | type: Number, 41 | value: 0 42 | }, 43 | indicatorDots: { 44 | type: Boolean, 45 | value: true 46 | }, 47 | autoplay: { 48 | type: Boolean, 49 | value: true 50 | }, 51 | circular: { 52 | type: Boolean, 53 | value: true 54 | }, 55 | vertical: { 56 | type: Boolean, 57 | value: false 58 | }, 59 | }, 60 | 61 | /** 62 | * 组件的初始数据 63 | */ 64 | data: { 65 | 66 | }, 67 | 68 | /** 69 | * 组件的方法列表 70 | */ 71 | methods: { 72 | url: function (e) { 73 | pageHelper.url(e, this); 74 | } 75 | } 76 | }) -------------------------------------------------------------------------------- /miniprogram/cmpts/public/swiper/swiper_cmpt.json: -------------------------------------------------------------------------------- 1 | { 2 | "component": true, 3 | "usingComponents": {} 4 | } -------------------------------------------------------------------------------- /miniprogram/cmpts/public/swiper/swiper_cmpt.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /miniprogram/cmpts/public/swiper/swiper_cmpt.wxss: -------------------------------------------------------------------------------- 1 | .swiper { 2 | width: 100%; 3 | } 4 | .swiper-item-images { 5 | width: 100%; 6 | } -------------------------------------------------------------------------------- /miniprogram/cmpts/public/table/table_cmpt.js: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | */ 4 | Component({ 5 | /** 6 | * 外部样式类 7 | */ 8 | externalClasses: ['header-row-class-name', 'row-class-name', 'cell-class-name'], 9 | 10 | /** 11 | * 组件样式隔离 12 | */ 13 | options: { 14 | styleIsolation: "isolated", 15 | multipleSlots: true // 支持多个slot 16 | }, 17 | 18 | /** 19 | * 组件的属性列表 20 | */ 21 | properties: { 22 | data: { 23 | type: Array, 24 | value: [] 25 | }, 26 | headers: { 27 | type: Array, 28 | value: [] 29 | }, 30 | // table的高度, 溢出可滚动 31 | height: { 32 | type: String, 33 | value: 'auto' 34 | }, 35 | width: { 36 | type: Number || String, 37 | value: '100%' 38 | }, 39 | // 单元格的宽度 40 | tdWidth: { 41 | type: Number, 42 | value: 35 43 | }, 44 | // 固定表头 thead达到Header的位置时就应该被fixed了 45 | offsetTop: { 46 | type: Number, 47 | value: 150 48 | }, 49 | // 是否带有纵向边框 50 | stripe: { 51 | type: Boolean, 52 | value: false 53 | }, 54 | // 是否带有纵向边框 55 | border: { 56 | type: Boolean, 57 | value: false 58 | }, 59 | msg: { 60 | type: String, 61 | value: '暂无数据~' 62 | } 63 | }, 64 | 65 | /** 66 | * 组件的初始数据 67 | */ 68 | data: { 69 | scrolWidth: '20%' 70 | }, 71 | 72 | lifetimes: { 73 | attached: function () { 74 | 75 | }, 76 | ready: function () { 77 | 78 | }, 79 | detached: function () { 80 | // 在组件实例被从页面节点树移除时执行 81 | }, 82 | }, 83 | 84 | /** 85 | * 组件的方法列表 86 | */ 87 | methods: { 88 | 89 | } 90 | }) -------------------------------------------------------------------------------- /miniprogram/cmpts/public/table/table_cmpt.json: -------------------------------------------------------------------------------- 1 | { 2 | "component": true, 3 | "usingComponents": {} 4 | } -------------------------------------------------------------------------------- /miniprogram/cmpts/public/table/table_cmpt.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | {{ item.label }} 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | {{it[head["prop"]]}} 16 | 17 | 18 | 19 | 20 | 21 | {{ msg }} 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /miniprogram/comm/behavior/my_fav_bh.js: -------------------------------------------------------------------------------- 1 | const pageHelper = require('../../helper/page_helper.js'); 2 | const cloudHelper = require('../../helper/cloud_helper.js'); 3 | 4 | module.exports = Behavior({ 5 | /** 6 | * 页面的初始数据 7 | */ 8 | data: { 9 | }, 10 | 11 | methods: { 12 | /** 13 | * 生命周期函数--监听页面加载 14 | */ 15 | onLoad: async function (options) { 16 | }, 17 | 18 | myCommListListener: function (e) { 19 | pageHelper.commListListener(this, e); 20 | }, 21 | 22 | /** 23 | * 生命周期函数--监听页面初次渲染完成 24 | */ 25 | onReady: function () { 26 | 27 | }, 28 | 29 | /** 30 | * 生命周期函数--监听页面显示 31 | */ 32 | onShow: function () { 33 | 34 | }, 35 | 36 | /** 37 | * 生命周期函数--监听页面隐藏 38 | */ 39 | onHide: function () { 40 | 41 | }, 42 | 43 | /** 44 | * 生命周期函数--监听页面卸载 45 | */ 46 | onUnload: function () { 47 | 48 | }, 49 | 50 | 51 | /** 52 | * 页面上拉触底事件的处理函数 53 | */ 54 | onReachBottom: function () { 55 | 56 | }, 57 | 58 | url: function (e) { 59 | pageHelper.url(e, this); 60 | }, 61 | 62 | bindDelTap: async function (e) { 63 | 64 | let oid = e.currentTarget.dataset.oid; 65 | if (!oid) return; 66 | let that = this; 67 | let callback = async function () { 68 | await cloudHelper.callCloudSumbit('fav/del', { 69 | oid 70 | }).then(res => { 71 | pageHelper.delListNode(oid, that.data.dataList.list, 'FAV_OID'); 72 | that.data.dataList.total--; 73 | that.setData({ 74 | dataList: that.data.dataList 75 | }); 76 | pageHelper.showSuccToast('删除成功'); 77 | }).catch(err => { 78 | console.log(err); 79 | }); 80 | } 81 | pageHelper.showConfirm('您确认删除?', callback); 82 | } 83 | } 84 | }) -------------------------------------------------------------------------------- /miniprogram/comm/behavior/my_foot_bh.js: -------------------------------------------------------------------------------- 1 | const FootBiz = require('../biz/foot_biz.js'); 2 | const pageHelper = require('../../helper/page_helper.js'); 3 | 4 | module.exports = Behavior({ 5 | /** 6 | * 页面的初始数据 7 | */ 8 | data: { 9 | }, 10 | 11 | methods: { 12 | /** 13 | * 生命周期函数--监听页面加载 14 | */ 15 | onLoad: async function (options) { 16 | this._loadList(); 17 | }, 18 | 19 | _loadList: async function (e) { 20 | let footList = FootBiz.getFootList(); 21 | this.setData({ 22 | footList 23 | }); 24 | }, 25 | /** 26 | * 生命周期函数--监听页面初次渲染完成 27 | */ 28 | onReady: function () { 29 | 30 | }, 31 | 32 | /** 33 | * 生命周期函数--监听页面显示 34 | */ 35 | onShow: function () { 36 | 37 | }, 38 | 39 | /** 40 | * 生命周期函数--监听页面隐藏 41 | */ 42 | onHide: function () { 43 | 44 | }, 45 | 46 | /** 47 | * 生命周期函数--监听页面卸载 48 | */ 49 | onUnload: function () { 50 | 51 | }, 52 | 53 | /** 54 | * 页面相关事件处理函数--监听用户下拉动作 55 | */ 56 | onPullDownRefresh: async function () { 57 | await this._loadList(); 58 | wx.stopPullDownRefresh(); 59 | }, 60 | 61 | /** 62 | * 页面上拉触底事件的处理函数 63 | */ 64 | onReachBottom: function () { 65 | 66 | }, 67 | 68 | url: function (e) { 69 | pageHelper.url(e, this); 70 | } 71 | } 72 | }) -------------------------------------------------------------------------------- /miniprogram/comm/biz/base_biz.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Notes: 基础模块业务逻辑 3 | * Ver : CCMiniCloud Framework 2.0.1 ALL RIGHTS RESERVED BY cclinux0730 (wechat) 4 | * Date: 2020-11-14 07:48:00 5 | */ 6 | 7 | const pageHelper = require('../../helper/page_helper.js'); 8 | 9 | class BaseBiz { 10 | 11 | static getCateName(cateId, cateList) { 12 | for (let k = 0; k < cateList.length; k++) { 13 | if (cateList[k].id == cateId) { 14 | return cateList[k].title; 15 | } 16 | } 17 | return ''; 18 | } 19 | 20 | static getCateList(cateList) { 21 | 22 | let arr = []; 23 | for (let k = 0; k < cateList.length; k++) { 24 | arr.push({ 25 | label: cateList[k].title, 26 | type: 'cateId', 27 | val: cateList[k].id, //for options form 28 | value: cateList[k].id, //for list menu 29 | }) 30 | } 31 | 32 | return arr; 33 | } 34 | 35 | static setCateTitle(cateList, cateId = null) { 36 | 37 | let curPage = pageHelper.getPrevPage(1); 38 | if (!curPage) return; 39 | 40 | if (!cateId) { 41 | if (curPage.options && curPage.options.id) { 42 | cateId = curPage.options.id; 43 | } 44 | } 45 | 46 | for (let k = 0; k < cateList.length; k++) { 47 | if (cateList[k].id == cateId) { 48 | wx.setNavigationBarTitle({ 49 | title: cateList[k].title 50 | }); 51 | curPage.setData({ 52 | listMode: cateList[k].style || '' 53 | }) 54 | return; 55 | } 56 | } 57 | 58 | } 59 | } 60 | 61 | module.exports = BaseBiz; -------------------------------------------------------------------------------- /miniprogram/comm/biz/fav_biz.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Notes: 预约模块业务逻辑 3 | * Ver : CCMiniCloud Framework 2.0.1 ALL RIGHTS RESERVED BY cclinux0730 (wechat) 4 | * Date: 2021-12-10 07:48:00 5 | */ 6 | 7 | const BaseBiz = require('./base_biz.js'); 8 | const cloudHelper = require('../../helper/cloud_helper.js'); 9 | const pageHelper = require('../../helper/page_helper.js'); 10 | 11 | class FavBiz extends BaseBiz { 12 | 13 | static async isFav(that, oid, type = '') { 14 | if (!oid) return; 15 | 16 | that.setData({ 17 | isFav: -1 18 | }); 19 | 20 | // 异步获取是否收藏 21 | let params = { 22 | oid, 23 | type 24 | }; 25 | cloudHelper.callCloudSumbit('fav/is_fav', params, { title: 'bar' }).then(result => { 26 | that.setData({ 27 | isFav: result.data.isFav 28 | }); 29 | }).catch(error => { }) 30 | } 31 | 32 | static async updateFav(that, oid, isFav, type, title) { 33 | let path = pageHelper.getCurrentPageUrlWithArgs(); 34 | if (!oid || !path || !title || !type) return; 35 | 36 | let params = { 37 | oid, 38 | title, 39 | type, 40 | path 41 | } 42 | let opts = { 43 | title: (isFav == 0) ? '收藏中' : '取消中' 44 | } 45 | try { 46 | let result = await cloudHelper.callCloudSumbit('fav/update', params, opts); 47 | that.setData({ 48 | isFav: result.data.isFav, 49 | }); 50 | } catch (e) { 51 | console.log(e); 52 | } 53 | } 54 | 55 | } 56 | 57 | module.exports = FavBiz; -------------------------------------------------------------------------------- /miniprogram/comm/biz/foot_biz.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Notes: 足迹模块业务逻辑 3 | * Ver : CCMiniCloud Framework 2.0.1 ALL RIGHTS RESERVED BY www.code942.com 4 | * Date: 2020-11-14 07:48:00 5 | */ 6 | 7 | const BaseBiz = require('./base_biz.js'); 8 | const cacheHelper = require('../../helper/cache_helper.js'); 9 | const timeHelper = require('../../helper/time_helper.js'); 10 | const pageHelper = require('../../helper/page_helper.js'); 11 | const CACHE_FOOT = 'CACHE_FOOT'; 12 | 13 | class FootBiz extends BaseBiz { 14 | 15 | static getFootList() { 16 | let foot = cacheHelper.get(CACHE_FOOT); 17 | if (foot) { 18 | for (let i = 0; i < foot.length; i++) { 19 | foot[i].time = timeHelper.timestamp2Time(foot[i].time); 20 | } 21 | } 22 | 23 | return foot; 24 | } 25 | 26 | /**添加足迹缓存 27 | * 28 | * @param {*} key 键 29 | * @param {*} val 值 30 | * 格式 key:{ 31 | * type:类型 32 | * title:标题 33 | * time:加入时间 34 | * } 35 | * @param {*} size 最大个数 36 | * @param {*} expire 过期时间 37 | */ 38 | static addFoot(type, title, size = 60, expire = 86400 * 365 * 3) { 39 | let path = pageHelper.getCurrentPageUrlWithArgs(); 40 | if (!path || !title || !type) return []; 41 | 42 | let foot = cacheHelper.get(CACHE_FOOT, []); 43 | 44 | //查询是否存在 并删除 45 | for (let k = 0; k < foot.length; k++) { 46 | if (path == foot[k].path) 47 | foot.splice(k, 1); 48 | } 49 | 50 | // 加到头部 51 | let val = { 52 | path, 53 | type, 54 | title, 55 | time: timeHelper.time() 56 | } 57 | foot.unshift(val); 58 | 59 | // 判断个数, 多的删除 60 | if (foot.length > size) 61 | foot.splice(foot.length - 1, 1); 62 | 63 | // 存缓存 64 | cacheHelper.set(CACHE_FOOT, foot, expire); 65 | 66 | return foot; 67 | } 68 | } 69 | 70 | module.exports = FootBiz; -------------------------------------------------------------------------------- /miniprogram/comm/biz/search_biz.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Notes: 搜索模块业务逻辑 3 | * Ver : CCMiniCloud Framework 2.0.1 ALL RIGHTS RESERVED BY cclinux0730 (wechat) 4 | * Date: 2020-11-14 07:48:00 5 | */ 6 | 7 | const BaseBiz = require('./base_biz.js'); 8 | const cacheHelper = require('../../helper/cache_helper.js'); 9 | 10 | /** 11 | * 12 | */ 13 | class SearchBiz extends BaseBiz { 14 | 15 | static clearHistory(key){ 16 | cacheHelper.remove(key); 17 | } 18 | 19 | static getHistory(key) 20 | { 21 | return cacheHelper.get(key, []); 22 | 23 | } 24 | 25 | /**添加关键字缓存 26 | * 27 | * @param {*} key 28 | * @param {*} val 29 | * @param {*} size 个数 30 | * @param {*} expire 过期时间 31 | */ 32 | static addHistory(key, val, size = 20, expire = 86400 * 30) { 33 | if (!val || val.length == 0) return []; 34 | 35 | let his = cacheHelper.get(key, []); 36 | 37 | //查询是否存在 并删除 38 | let pos = his.indexOf(val); 39 | if (pos > -1) his.splice(pos, 1); 40 | 41 | // 加到头部 42 | his.unshift(val); 43 | 44 | // 判断个数, 多的删除 45 | if (his.length > size) 46 | his.splice(his.length - 1, 1); 47 | 48 | // 存缓存 49 | cacheHelper.set(key, his, expire); 50 | 51 | return his; 52 | } 53 | 54 | } 55 | 56 | module.exports = SearchBiz; -------------------------------------------------------------------------------- /miniprogram/comm/constants.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Notes: 通用常量 3 | * Ver : CCMiniCloud Framework 2.0.1 ALL RIGHTS RESERVED BY cclinux0730 (wechat) 4 | * Date: 2020-11-14 07:48:00 5 | */ 6 | 7 | module.exports = { 8 | CACHE_TOKEN: 'CACHE_TOKEN', // 登录 9 | CACHE_TOKEN_EXPIRE: 86400, //登录有效时间 秒 10 | 11 | CACHE_ADMIN: 'ADMIN_TOKEN', // 管理员登录 12 | ADMIN_TOKEN_EXPIRE: 3600 * 2, //管理员过期时间2小时有效 秒 13 | 14 | 15 | CACHE_WORK: 'WORK_TOKEN', // 服务者登录 16 | WORK_TOKEN_EXPIRE: 3600 * 10, //服务者过期时间 秒 17 | 18 | } -------------------------------------------------------------------------------- /miniprogram/helper/cache_helper.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Notes: 微信缓存二次封装,有设置时效性的封装 3 | * Ver : CCMiniCloud Framework 3.0.1 ALL RIGHTS RESERVED BY cclinux0730 (wechat) 4 | * Date: 2020-11-14 07:48:00 5 | */ 6 | const helper = require('./helper.js'); 7 | 8 | const TIME_SUFFIX = "_deadtime" 9 | 10 | /** 11 | * 设置 12 | * k 键key 13 | * v 值value 14 | * t 秒 15 | */ 16 | function set(k, v, t = 86400 * 30) { 17 | if (!k) return null; 18 | 19 | wx.setStorageSync(k, v); 20 | let seconds = parseInt(t); 21 | if (seconds > 0) { 22 | let newtime = Date.parse(new Date()); 23 | newtime = newtime / 1000 + seconds; 24 | wx.setStorageSync(k + TIME_SUFFIX, newtime + ""); 25 | } else { 26 | wx.removeStorageSync(k + TIME_SUFFIX); 27 | } 28 | } 29 | 30 | 31 | /** 32 | * 获取 33 | * k 键key 34 | * def 默认值 35 | */ 36 | function get(k, def = null) { 37 | if (!k) return null; 38 | 39 | let deadtime = wx.getStorageSync(k + TIME_SUFFIX); 40 | if (!deadtime) return def; 41 | 42 | deadtime = parseInt(deadtime); 43 | if (!deadtime) return def; 44 | 45 | if (deadtime) { 46 | if (parseInt(deadtime) < Date.parse(new Date()) / 1000) { 47 | wx.removeStorageSync(k); 48 | wx.removeStorageSync(k + TIME_SUFFIX); 49 | return def; 50 | } 51 | } 52 | 53 | let res = wx.getStorageSync(k); 54 | 55 | if (helper.isDefined(res)) { 56 | return res; 57 | } else { 58 | return def; 59 | } 60 | } 61 | 62 | /** 63 | * 删除 64 | */ 65 | function remove(k) { 66 | if (!k) return null; 67 | 68 | wx.removeStorageSync(k); 69 | wx.removeStorageSync(k + TIME_SUFFIX); 70 | } 71 | 72 | /** 73 | * 清除所有key 74 | */ 75 | function clear() { 76 | wx.clearStorageSync(); 77 | } 78 | 79 | module.exports = { 80 | set, 81 | get, 82 | remove, 83 | clear 84 | } -------------------------------------------------------------------------------- /miniprogram/helper/file_helper.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Notes: 文件处理相关函数 3 | * Ver : CCMiniCloud Framework 2.7.1 ALL RIGHTS RESERVED BY cclinux0730 (wechat) 4 | * Date: 2022-02-05 04:00:00 5 | */ 6 | const pageHelper = require('./page_helper.js'); 7 | const timeHelper = require('./time_helper.js'); 8 | 9 | function openDoc(name, url, ext = '.xlsx') { 10 | 11 | wx.showLoading({ 12 | title: '文件下载中', 13 | }); 14 | 15 | wx.downloadFile({ 16 | url, 17 | //fileID:' ', 18 | filePath: wx.env.USER_DATA_PATH + '/' + name + timeHelper.time('YMDhms') + ext, 19 | success: function (res) { 20 | wx.hideLoading(); 21 | if (res.statusCode != 200) 22 | return pageHelper.showModal('打开文件失败,请重试或者采取别的下载方式'); 23 | 24 | const filePath = res.filePath; 25 | wx.openDocument({ 26 | showMenu: true, 27 | filePath: filePath, 28 | success: function (res) { 29 | console.log('打开文档成功'); 30 | } 31 | }) 32 | }, 33 | fail: function (err) { 34 | wx.hideLoading(); 35 | console.log(err); 36 | pageHelper.showModal('打开文件失败,请重试或者采取别的下载方式'); 37 | } 38 | }) 39 | } 40 | 41 | module.exports = { 42 | openDoc 43 | } -------------------------------------------------------------------------------- /miniprogram/helper/form_helper.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Notes: 表单通用类库 3 | * Ver : CCMiniCloud Framework 2.8.1 ALL RIGHTS RESERVED BY cclinux0730 (wechat) 4 | * Date: 2021-02-28 07:48:00 5 | */ 6 | 7 | 8 | /** 9 | * model变表单 10 | * @param {*} model 11 | */ 12 | function model2Form(model) { 13 | let newModel = {}; 14 | for (let key in model) { 15 | let arr = key.split('_'); 16 | let result = ''; 17 | for (let i = 1; i < arr.length; i++) { 18 | let name = arr[i].toLowerCase(); 19 | name = name.charAt(0).toUpperCase() + name.slice(1); 20 | result = result + name; 21 | } 22 | 23 | newModel['form' + result] = model[key]; 24 | } 25 | return newModel; 26 | } 27 | 28 | // picker表单赋值到页面data 29 | function setOptions(that, options, name, val) { 30 | let idx = options.indexOf(val); 31 | idx = (idx < 0) ? 0 : idx; 32 | that.setData({ 33 | [name]: idx 34 | }) 35 | } 36 | 37 | module.exports = { 38 | model2Form, 39 | setOptions 40 | } -------------------------------------------------------------------------------- /miniprogram/helper/helper.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Notes: 通用类库 3 | * Ver : CCMiniCloud Framework 2.9.1 ALL RIGHTS RESERVED BY cclinux0730 (wechat) 4 | * Date: 2020-11-14 07:48:00 5 | */ 6 | 7 | /** 8 | * 判断变量,参数,对象属性是否定义 9 | * @param {*} val 10 | */ 11 | function isDefined(val) { 12 | // == 不能判断是否为null 13 | if (val === undefined) 14 | return false; 15 | else 16 | return true; 17 | } 18 | 19 | /** 20 | * 判断对象是否为空 21 | * @param {*} obj 22 | */ 23 | function isObjectNull(obj) { 24 | return (Object.keys(obj).length == 0); 25 | } 26 | 27 | 28 | function sleep(time) { 29 | return new Promise((resolve) => setTimeout(resolve, time)); 30 | }; 31 | 32 | 33 | function formatNumber(n) { 34 | n = n.toString() 35 | return n[1] ? n : '0' + n 36 | } 37 | 38 | /** 39 | * 从picker options中 获取索引值 40 | * @param {*} options 41 | * [{ 42 | value: 0, 43 | label: '猎头' 44 | }] 45 | * @param {*} val 46 | */ 47 | function getOptionsIdx(options, val) { 48 | for (let i = 0; i < options.length; i++) { 49 | if (options[i].value === val) 50 | return i; 51 | } 52 | return 0; 53 | } 54 | 55 | 56 | 57 | module.exports = { 58 | isDefined, 59 | isObjectNull, 60 | sleep, 61 | 62 | 63 | getOptionsIdx, 64 | 65 | } -------------------------------------------------------------------------------- /miniprogram/images/cover.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wananmiao2000/SmartForum/80514df764eec52926b8d87e94380908fd68061a/miniprogram/images/cover.gif -------------------------------------------------------------------------------- /miniprogram/pages/test1/test1.js: -------------------------------------------------------------------------------- 1 | const myFavBh = require('../../comm/behavior/my_fav_bh.js'); 2 | const myFootBh = require('../../comm/behavior/my_foot_bh.js'); 3 | const newsIndexBh = require('../../comm/behavior/news_index_bh.js'); 4 | const searchBh = require('../../comm/behavior/search_bh.js'); 5 | const favBiz = require('../../comm/biz/fav_biz.js'); 6 | const fileHelper = require('../../helper/file_helper.js'); 7 | const qr = require('../../lib/tools/qrcode_lib.js'); 8 | const base64 = require('../../lib/tools/base64_lib.js') 9 | const miniHelper = require('../../helper/mini_helper.js') 10 | const formHelper = require('../../helper/form_helper.js') 11 | Page({ 12 | 13 | /** 14 | * 页面的初始数据 15 | */ 16 | data: { 17 | 18 | }, 19 | 20 | /** 21 | * 生命周期函数--监听页面加载 22 | */ 23 | onLoad(options) { 24 | 25 | }, 26 | 27 | /** 28 | * 生命周期函数--监听页面初次渲染完成 29 | */ 30 | onReady() { 31 | 32 | }, 33 | 34 | /** 35 | * 生命周期函数--监听页面显示 36 | */ 37 | onShow() { 38 | 39 | }, 40 | 41 | /** 42 | * 生命周期函数--监听页面隐藏 43 | */ 44 | onHide() { 45 | 46 | }, 47 | 48 | /** 49 | * 生命周期函数--监听页面卸载 50 | */ 51 | onUnload() { 52 | 53 | }, 54 | 55 | /** 56 | * 页面相关事件处理函数--监听用户下拉动作 57 | */ 58 | onPullDownRefresh() { 59 | 60 | }, 61 | 62 | /** 63 | * 页面上拉触底事件的处理函数 64 | */ 65 | onReachBottom() { 66 | 67 | }, 68 | 69 | /** 70 | * 用户点击右上角分享 71 | */ 72 | onShareAppMessage() { 73 | 74 | } 75 | }) -------------------------------------------------------------------------------- /miniprogram/pages/test1/test1.json: -------------------------------------------------------------------------------- 1 | { 2 | "usingComponents": { 3 | "cmpt-car-number": "/cmpts/public/car_number/car_number_cmpt", 4 | "cmpt-customer-nav": "/cmpts/public/custom_nav/custom_nav_cmpt", 5 | "cmpt-swiper": "/cmpts/public/swiper/swiper_cmpt", 6 | "cmpt-date-select": "/cmpts/public/calendar/date_select/date_select_cmpt", 7 | "cmpt-time-select": "/cmpts/public/calendar/time_select/time_select_cmpt", 8 | "cmpt-picker-time": "/cmpts/public/picker_time/picker_time_cmpt", 9 | "cmpt-poster": "/cmpts/public/poster/poster_cmpt", 10 | "cmpt-picker": "/cmpts/public/picker/picker_cmpt", 11 | "cmpt-checkbox": "/cmpts/public/checkbox/checkbox_cmpt", 12 | "cmpt-editor": "/cmpts/public/editor/editor_cmpt", 13 | "cmpt-table": "/cmpts/public/table/table_cmpt", 14 | "cmpt-ex-form": "/cmpts/public/form/form_show/form_show_cmpt", 15 | "cmpt-picker-multi": "/cmpts/public/picker_multi/picker_multi_cmpt" 16 | } 17 | } -------------------------------------------------------------------------------- /miniprogram/pages/test1/test1.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /miniprogram/pages/test1/test1.wxss: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wananmiao2000/SmartForum/80514df764eec52926b8d87e94380908fd68061a/miniprogram/pages/test1/test1.wxss -------------------------------------------------------------------------------- /miniprogram/projects/bbs/biz/admin_cate_biz.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Notes: 分类后台管理模块业务逻辑 3 | * Ver : CCMiniCloud Framework 2.0.1 ALL RIGHTS RESERVED BY cclinux0730 (wechat) 4 | * Date: 2023-11-14 07:48:00 5 | */ 6 | 7 | const BaseBiz = require('../../../comm/biz/base_biz.js'); 8 | const projectSetting = require('../public/project_setting.js'); 9 | 10 | class AdminCateBiz extends BaseBiz { 11 | 12 | /** 表单初始化相关数据 */ 13 | static async initCate1FormData(id = '') { 14 | return { 15 | id, 16 | 17 | fields: projectSetting.CATE1_FIELDS, 18 | 19 | // 表单数据 20 | formOrder: 9999, 21 | formTitle: '', 22 | formForms: [], 23 | } 24 | 25 | } 26 | 27 | static async initCate2FormData(id = '') { 28 | return { 29 | id, 30 | 31 | fields: projectSetting.CATE2_FIELDS, 32 | 33 | // 表单数据 34 | formOrder: 9999, 35 | formTitle: '', 36 | formForms: [], 37 | } 38 | 39 | } 40 | 41 | 42 | } 43 | 44 | /** 表单校验 本地 */ 45 | AdminCateBiz.CATE1_CHECK_FORM = { 46 | title: 'formTitle|must|string|name=分类名称', 47 | order: 'formOrder|must|int|min:0|max:9999|name=排序号', 48 | forms: 'formForms|array', 49 | }; 50 | 51 | AdminCateBiz.CATE2_CHECK_FORM = { 52 | title: 'formTitle|must|string|name=分类名称', 53 | order: 'formOrder|must|int|min:0|max:9999|name=排序号', 54 | forms: 'formForms|array', 55 | }; 56 | 57 | 58 | 59 | module.exports = AdminCateBiz; -------------------------------------------------------------------------------- /miniprogram/projects/bbs/biz/cate_biz.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Notes: 分类后台管理模块业务逻辑 3 | * Ver : CCMiniCloud Framework 2.0.1 ALL RIGHTS RESERVED BY cclinux0730 (wechat) 4 | * Date: 2023-11-14 07:48:00 5 | */ 6 | 7 | const BaseBiz = require('../../../comm/biz/base_biz.js'); 8 | const cloudHelper = require('../../../helper/cloud_helper.js'); 9 | 10 | class CateBiz extends BaseBiz { 11 | 12 | // 取得所有分类 13 | static async getAllCateOptions(title = 'bar') { 14 | return await cloudHelper.callCloudData('cate/all_options', {}, { title }); 15 | } 16 | 17 | // 根据一级分类,获取名字 18 | static getCate1Name(allCateOptions, cate1Id) { 19 | for (let k = 0; k < allCateOptions.length; k++) { 20 | if (allCateOptions[k].val == cate1Id) return allCateOptions[k].label; 21 | } 22 | return ''; 23 | } 24 | 25 | // 根据二级分类,获取名字 26 | static getCate2Name(allCateOptions, cate2Id) { 27 | for (let k = 0; k < allCateOptions.length; k++) { 28 | if (allCateOptions[k].children) { 29 | for (let j in allCateOptions[k].children) 30 | if (allCateOptions[k].children[j].val == cate2Id) return allCateOptions[k].children[j].label; 31 | } 32 | } 33 | return ''; 34 | } 35 | 36 | // 根据分类ID获取文字描述数组 37 | static getCateNameArr(allCateOptions, cateId) { 38 | let cate1Id = cateId[0]; 39 | let cate2Id = cateId[1]; 40 | 41 | let cate1 = CateBiz.getCate1Name(allCateOptions, cate1Id); 42 | let cate2 = CateBiz.getCate2Name(allCateOptions, cate2Id); 43 | if (!cate2) 44 | return [cate1]; 45 | else 46 | return [cate1, cate2]; 47 | } 48 | } 49 | 50 | module.exports = CateBiz; -------------------------------------------------------------------------------- /miniprogram/projects/bbs/biz/project_biz.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Notes: 项目通用业务逻辑 3 | * Ver : CCMiniCloud Framework 2.0.1 ALL RIGHTS RESERVED BY cclinux0730 (wechat) 4 | * Date: 2022-05-22 07:48:00 5 | */ 6 | 7 | const BaseBiz = require('../../../comm/biz/base_biz.js'); 8 | const projectSetting = require('../public/project_setting.js'); 9 | const PubilcBiz = require('../../../comm/biz/public_biz.js'); 10 | const cloudHelper = require('../../../helper/cloud_helper.js'); 11 | const SearchBiz = require('../../../comm/biz/search_biz.js'); 12 | 13 | class ProjectBiz extends BaseBiz { 14 | 15 | /** 16 | * 页面初始化 17 | * @param {*} that 18 | */ 19 | static initPage(that, { isSetNavColor = true } = {}) { 20 | 21 | let skin = {}; 22 | skin.NAV_BG = projectSetting.NAV_BG; 23 | skin.NAV_COLOR = projectSetting.NAV_COLOR; 24 | skin.PROJECT_COLOR = projectSetting.PROJECT_COLOR; 25 | 26 | PubilcBiz.initPageBase(that, { skin, isSetNavColor }); 27 | } 28 | 29 | static bindSearchConfirm(that) { 30 | let query = that.data.query.trim(); 31 | if (!query) return wx.showToast({ 32 | icon: 'none', 33 | title: '请输入搜索关键字', 34 | }); 35 | SearchBiz.addHistory('SERACH_HIS_product-list', query); 36 | wx.navigateTo({ 37 | url: '../../product/index/product_index?search=' + query, 38 | }) 39 | } 40 | 41 | static async getSetup(key, hint = 'bar') { 42 | let params = { 43 | key 44 | } 45 | 46 | let opts = { 47 | title: hint 48 | } 49 | 50 | let ret = await cloudHelper.callCloudData('home/setup_get', params, opts); 51 | return ret; 52 | } 53 | 54 | } 55 | 56 | module.exports = ProjectBiz; -------------------------------------------------------------------------------- /miniprogram/projects/bbs/images/cover.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wananmiao2000/SmartForum/80514df764eec52926b8d87e94380908fd68061a/miniprogram/projects/bbs/images/cover.jpg -------------------------------------------------------------------------------- /miniprogram/projects/bbs/images/home.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wananmiao2000/SmartForum/80514df764eec52926b8d87e94380908fd68061a/miniprogram/projects/bbs/images/home.png -------------------------------------------------------------------------------- /miniprogram/projects/bbs/images/no.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wananmiao2000/SmartForum/80514df764eec52926b8d87e94380908fd68061a/miniprogram/projects/bbs/images/no.jpg -------------------------------------------------------------------------------- /miniprogram/projects/bbs/images/tabbar/add.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wananmiao2000/SmartForum/80514df764eec52926b8d87e94380908fd68061a/miniprogram/projects/bbs/images/tabbar/add.png -------------------------------------------------------------------------------- /miniprogram/projects/bbs/images/tabbar/add_cur.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wananmiao2000/SmartForum/80514df764eec52926b8d87e94380908fd68061a/miniprogram/projects/bbs/images/tabbar/add_cur.png -------------------------------------------------------------------------------- /miniprogram/projects/bbs/images/tabbar/home.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wananmiao2000/SmartForum/80514df764eec52926b8d87e94380908fd68061a/miniprogram/projects/bbs/images/tabbar/home.png -------------------------------------------------------------------------------- /miniprogram/projects/bbs/images/tabbar/home_cur.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wananmiao2000/SmartForum/80514df764eec52926b8d87e94380908fd68061a/miniprogram/projects/bbs/images/tabbar/home_cur.png -------------------------------------------------------------------------------- /miniprogram/projects/bbs/images/tabbar/my.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wananmiao2000/SmartForum/80514df764eec52926b8d87e94380908fd68061a/miniprogram/projects/bbs/images/tabbar/my.png -------------------------------------------------------------------------------- /miniprogram/projects/bbs/images/tabbar/my_cur.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wananmiao2000/SmartForum/80514df764eec52926b8d87e94380908fd68061a/miniprogram/projects/bbs/images/tabbar/my_cur.png -------------------------------------------------------------------------------- /miniprogram/projects/bbs/images/tabbar/order.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wananmiao2000/SmartForum/80514df764eec52926b8d87e94380908fd68061a/miniprogram/projects/bbs/images/tabbar/order.png -------------------------------------------------------------------------------- /miniprogram/projects/bbs/images/tabbar/order_cur.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wananmiao2000/SmartForum/80514df764eec52926b8d87e94380908fd68061a/miniprogram/projects/bbs/images/tabbar/order_cur.png -------------------------------------------------------------------------------- /miniprogram/projects/bbs/images/tabbar/sort.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wananmiao2000/SmartForum/80514df764eec52926b8d87e94380908fd68061a/miniprogram/projects/bbs/images/tabbar/sort.png -------------------------------------------------------------------------------- /miniprogram/projects/bbs/images/tabbar/sort_cur.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wananmiao2000/SmartForum/80514df764eec52926b8d87e94380908fd68061a/miniprogram/projects/bbs/images/tabbar/sort_cur.png -------------------------------------------------------------------------------- /miniprogram/projects/bbs/pages/about/index/about_index.js: -------------------------------------------------------------------------------- 1 | const behavior = require('../../../../../comm/behavior/about_bh.js'); 2 | const ProjectBiz = require('../../../biz/project_biz.js'); 3 | const projectSetting = require('../../../public/project_setting.js'); 4 | 5 | Page({ 6 | 7 | behaviors: [behavior], 8 | 9 | /** 10 | * 生命周期函数--监听页面加载 11 | */ 12 | onLoad: async function (options) { 13 | ProjectBiz.initPage(this); 14 | 15 | if (options && options.key) 16 | this._loadDetail(options.key, projectSetting.SETUP_CONTENT_ITEMS); 17 | }, 18 | 19 | }) -------------------------------------------------------------------------------- /miniprogram/projects/bbs/pages/about/index/about_index.json: -------------------------------------------------------------------------------- 1 | { 2 | "usingComponents": { 3 | }, 4 | "enablePullDownRefresh": true 5 | } -------------------------------------------------------------------------------- /miniprogram/projects/bbs/pages/about/index/about_index.wxml: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /miniprogram/projects/bbs/pages/about/index/about_index.wxss: -------------------------------------------------------------------------------- 1 | @import "../../../../../style/public/detail.wxss"; 2 | @import "../../../style/skin.wxss"; 3 | -------------------------------------------------------------------------------- /miniprogram/projects/bbs/pages/admin/cate1/add/admin_cate1_add.json: -------------------------------------------------------------------------------- 1 | { 2 | "usingComponents": { 3 | "cmpt-img-upload": "/cmpts/public/img/img_upload_cmpt", 4 | "cmpt-picker-multi": "/cmpts/public/picker_multi/picker_multi_cmpt", 5 | "cmpt-form-show": "/cmpts/public/form/form_show/form_show_cmpt" 6 | }, 7 | "navigationBarBackgroundColor": "#2499f2", 8 | "navigationBarTextStyle": "white", 9 | "enablePullDownRefresh": true, 10 | "navigationBarTitleText": "添加一级分类" 11 | } -------------------------------------------------------------------------------- /miniprogram/projects/bbs/pages/admin/cate1/add/admin_cate1_add.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /miniprogram/projects/bbs/pages/admin/cate1/add/admin_cate1_add.wxss: -------------------------------------------------------------------------------- 1 | @import '../../../../../../style/public/admin.wxss'; 2 | -------------------------------------------------------------------------------- /miniprogram/projects/bbs/pages/admin/cate1/add/admin_cate1_form_tpl.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 一级分类名称 4 | 5 | 6 | 7 | 8 | 9 | {{formTitleFocus}} 10 | 11 | 12 | 排序号(小的先显示) 13 | 14 | 15 | {{formOrderFocus}} 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /miniprogram/projects/bbs/pages/admin/cate1/edit/admin_cate1_edit.json: -------------------------------------------------------------------------------- 1 | { 2 | "usingComponents": { 3 | "cmpt-img-upload": "/cmpts/public/img/img_upload_cmpt", 4 | "cmpt-picker-multi": "/cmpts/public/picker_multi/picker_multi_cmpt", 5 | "cmpt-form-show": "/cmpts/public/form/form_show/form_show_cmpt" 6 | }, 7 | "navigationBarBackgroundColor": "#2499f2", 8 | "navigationBarTextStyle": "white", 9 | "enablePullDownRefresh": true, 10 | "navigationBarTitleText": "编辑一级分类" 11 | } -------------------------------------------------------------------------------- /miniprogram/projects/bbs/pages/admin/cate1/edit/admin_cate1_edit.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /miniprogram/projects/bbs/pages/admin/cate1/edit/admin_cate1_edit.wxss: -------------------------------------------------------------------------------- 1 | @import '../../../../../../style/public/admin.wxss'; -------------------------------------------------------------------------------- /miniprogram/projects/bbs/pages/admin/cate1/list/admin_cate1_list.json: -------------------------------------------------------------------------------- 1 | { 2 | "usingComponents": {}, 3 | "navigationBarBackgroundColor": "#2499f2", 4 | "navigationBarTextStyle": "white", 5 | "enablePullDownRefresh": true, 6 | "navigationBarTitleText": "一级分类管理" 7 | } -------------------------------------------------------------------------------- /miniprogram/projects/bbs/pages/admin/cate1/list/admin_cate1_list.wxss: -------------------------------------------------------------------------------- 1 | @import '../../../../../../style/public/admin.wxss'; 2 | 3 | .admin-comm-list .item .info .info-item .title { 4 | width: 170rpx; 5 | } 6 | 7 | .admin-comm-list .item .level { 8 | position: absolute; 9 | bottom: 0; 10 | left: 10rpx; 11 | z-index: 99999; 12 | font-size: 24rpx; 13 | color: #ccc; 14 | opacity: .5; 15 | } -------------------------------------------------------------------------------- /miniprogram/projects/bbs/pages/admin/cate2/add/admin_cate2_add.json: -------------------------------------------------------------------------------- 1 | { 2 | "usingComponents": { 3 | "cmpt-img-upload": "/cmpts/public/img/img_upload_cmpt", 4 | "cmpt-picker-multi": "/cmpts/public/picker_multi/picker_multi_cmpt", 5 | "cmpt-form-show": "/cmpts/public/form/form_show/form_show_cmpt" 6 | }, 7 | "navigationBarBackgroundColor": "#2499f2", 8 | "navigationBarTextStyle": "white", 9 | "enablePullDownRefresh": true, 10 | "navigationBarTitleText": "添加二级分类" 11 | } -------------------------------------------------------------------------------- /miniprogram/projects/bbs/pages/admin/cate2/add/admin_cate2_add.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /miniprogram/projects/bbs/pages/admin/cate2/add/admin_cate2_add.wxss: -------------------------------------------------------------------------------- 1 | @import '../../../../../../style/public/admin.wxss'; 2 | -------------------------------------------------------------------------------- /miniprogram/projects/bbs/pages/admin/cate2/add/admin_cate2_form_tpl.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 二级分类名称 4 | 5 | 6 | 7 | 8 | 9 | {{formTitleFocus}} 10 | 11 | 12 | 排序号(小的先显示) 13 | 14 | 15 | {{formOrderFocus}} 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /miniprogram/projects/bbs/pages/admin/cate2/edit/admin_cate2_edit.json: -------------------------------------------------------------------------------- 1 | { 2 | "usingComponents": { 3 | "cmpt-img-upload": "/cmpts/public/img/img_upload_cmpt", 4 | "cmpt-picker-multi": "/cmpts/public/picker_multi/picker_multi_cmpt", 5 | "cmpt-form-show": "/cmpts/public/form/form_show/form_show_cmpt" 6 | }, 7 | "navigationBarBackgroundColor": "#2499f2", 8 | "navigationBarTextStyle": "white", 9 | "enablePullDownRefresh": true, 10 | "navigationBarTitleText": "编辑二级分类" 11 | } -------------------------------------------------------------------------------- /miniprogram/projects/bbs/pages/admin/cate2/edit/admin_cate2_edit.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /miniprogram/projects/bbs/pages/admin/cate2/edit/admin_cate2_edit.wxss: -------------------------------------------------------------------------------- 1 | @import '../../../../../../style/public/admin.wxss'; -------------------------------------------------------------------------------- /miniprogram/projects/bbs/pages/admin/cate2/list/admin_cate2_list.json: -------------------------------------------------------------------------------- 1 | { 2 | "usingComponents": {}, 3 | "navigationBarBackgroundColor": "#2499f2", 4 | "navigationBarTextStyle": "white", 5 | "enablePullDownRefresh": true, 6 | "navigationBarTitleText": "二级分类管理" 7 | } -------------------------------------------------------------------------------- /miniprogram/projects/bbs/pages/admin/cate2/list/admin_cate2_list.wxss: -------------------------------------------------------------------------------- 1 | @import "../../cate1/list/admin_cate1_list.wxss"; -------------------------------------------------------------------------------- /miniprogram/projects/bbs/pages/admin/content/admin_content.js: -------------------------------------------------------------------------------- 1 | const AdminBiz = require('../../../../../comm/biz/admin_biz.js'); 2 | const pageHelper = require('../../../../../helper/page_helper.js'); 3 | 4 | Page({ 5 | 6 | /** 7 | * 页面的初始数据 8 | */ 9 | data: { 10 | formContent: [{ 11 | type: 'text', 12 | val: '', 13 | }] 14 | }, 15 | 16 | /** 17 | * 生命周期函数--监听页面加载 18 | */ 19 | onLoad: async function (options) { 20 | if (!AdminBiz.isAdmin(this)) return; 21 | 22 | let parent = pageHelper.getPrevPage(2); 23 | if (!parent) return; 24 | 25 | let formContent = parent.data.formContent; 26 | if (formContent && formContent.length > 0) 27 | this.setData({ 28 | formContent 29 | }); 30 | }, 31 | 32 | 33 | 34 | 35 | /** 36 | * 生命周期函数--监听页面初次渲染完成 37 | */ 38 | onReady: function () {}, 39 | 40 | /** 41 | * 生命周期函数--监听页面显示 42 | */ 43 | onShow: function () {}, 44 | 45 | /** 46 | * 生命周期函数--监听页面隐藏 47 | */ 48 | onHide: function () {}, 49 | 50 | /** 51 | * 生命周期函数--监听页面卸载 52 | */ 53 | onUnload: function () {}, 54 | 55 | /** 56 | * 页面相关事件处理函数--监听用户下拉动作 57 | */ 58 | onPullDownRefresh: async function () { 59 | 60 | }, 61 | 62 | model: function (e) { 63 | pageHelper.model(this, e); 64 | }, 65 | 66 | url: function (e) { 67 | pageHelper.url(e, this); 68 | }, 69 | 70 | bindSaveTap: function (e) { 71 | let formContent = this.selectComponent("#contentEditor").getNodeList(); 72 | 73 | let parent = pageHelper.getPrevPage(2); 74 | if (!parent) return; 75 | 76 | parent.setData({ 77 | formContent 78 | }, () => { 79 | parent._setContentDesc(); 80 | }); 81 | 82 | wx.navigateBack(); 83 | } 84 | }) -------------------------------------------------------------------------------- /miniprogram/projects/bbs/pages/admin/content/admin_content.json: -------------------------------------------------------------------------------- 1 | { 2 | "usingComponents": { 3 | "cmpt-editor": "/cmpts/public/editor/editor_cmpt" 4 | }, 5 | "navigationBarBackgroundColor": "#2499f2", 6 | "navigationBarTextStyle": "white", 7 | "navigationBarTitleText": "后台-详细内容编辑" 8 | } -------------------------------------------------------------------------------- /miniprogram/projects/bbs/pages/admin/content/admin_content.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 不保存,返回 12 | 保存 13 | 14 | 15 | -------------------------------------------------------------------------------- /miniprogram/projects/bbs/pages/admin/content/admin_content.wxss: -------------------------------------------------------------------------------- 1 | @import '../../../../../style/public/admin.wxss'; 2 | 3 | .main-admin { 4 | width: 100%; 5 | box-sizing: border-box; 6 | padding: 30rpx 20rpx; 7 | padding-bottom: 200rpx; 8 | } 9 | 10 | .form-group { 11 | padding: 1rpx 1rpx; 12 | overflow: hidden; 13 | } 14 | 15 | .oprt { 16 | display: flex; 17 | width: 100%; 18 | justify-content: space-around; 19 | } 20 | 21 | .oprt button { 22 | width: 45%; 23 | } 24 | 25 | .bottom-oprt { 26 | position: fixed; 27 | bottom: 0; 28 | height: 130rpx; 29 | background-color: #f8f8f8; 30 | display: flex; 31 | justify-content: space-around; 32 | align-items: center; 33 | border-top: 1rpx solid #ccc; 34 | z-index: 99999; 35 | } -------------------------------------------------------------------------------- /miniprogram/projects/bbs/pages/admin/index/home/admin_home.json: -------------------------------------------------------------------------------- 1 | { 2 | "usingComponents": { 3 | "cmpt-foot": "/cmpts/biz/foot/foot_cmpt" 4 | }, 5 | "enablePullDownRefresh": true, 6 | "navigationBarBackgroundColor": "#2499f2", 7 | "navigationBarTextStyle": "white", 8 | "navigationBarTitleText": "后台管理" 9 | } -------------------------------------------------------------------------------- /miniprogram/projects/bbs/pages/admin/index/home/admin_home.wxss: -------------------------------------------------------------------------------- 1 | @import '../../../../../../style/public/admin.wxss'; 2 | 3 | .main-admin { 4 | padding: 0; 5 | } 6 | 7 | .admin-info { 8 | height: 200rpx; 9 | width: 100%; 10 | color: #fff; 11 | display: flex; 12 | justify-content: flex-start; 13 | align-items: center; 14 | position: relative; 15 | } 16 | 17 | .admin-info .pic { 18 | width: 100rpx; 19 | height: 100rpx; 20 | font-size: 70rpx; 21 | display: flex; 22 | justify-content: center; 23 | align-items: center; 24 | margin-right: 20rpx; 25 | border-radius:20rpx; 26 | margin-left:20rpx; 27 | } 28 | 29 | .admin-info .right { 30 | flex: 1; 31 | display: flex; 32 | flex-direction: column; 33 | } 34 | 35 | .admin-info .right .name { 36 | font-size: 32rpx; 37 | line-height: 1.8; 38 | } 39 | 40 | .admin-info .right .desc { 41 | font-size: 24rpx; 42 | line-height: 1.3; 43 | } 44 | 45 | .admin-info .exit-admin { 46 | position: absolute; 47 | top: 12rpx; 48 | right: 12rpx; 49 | font-size: 45rpx; 50 | } 51 | 52 | 53 | .main-admin .comm-list, 54 | .main-admin .bar { 55 | background-color: #fff; 56 | width: 100%; 57 | } 58 | 59 | .main-admin .exit { 60 | width: 100%; 61 | padding: 0 20rpx; 62 | margin-bottom: 50rpx; 63 | } 64 | 65 | .main-admin .exit button { 66 | width: 100%; 67 | color: #fff; 68 | height: 70rpx; 69 | } 70 | 71 | .grid.col-6>view { 72 | width: 16.66%; 73 | } 74 | 75 | .foot-bottom { 76 | width: 100%; 77 | display: flex; 78 | justify-content: center; 79 | align-items: center; 80 | bottom: 50rpx; 81 | } -------------------------------------------------------------------------------- /miniprogram/projects/bbs/pages/admin/index/login/admin_login.js: -------------------------------------------------------------------------------- 1 | const AdminBiz = require('../../../../../../comm/biz/admin_biz.js'); 2 | const pageHelper = require('../../../../../../helper/page_helper.js'); 3 | const cacheHelper = require('../../../../../../helper/cache_helper.js'); 4 | 5 | Page({ 6 | 7 | /** 8 | * 页面的初始数据 9 | */ 10 | data: { 11 | name: '', 12 | pwd: '', 13 | remember: false 14 | }, 15 | 16 | /** 17 | * 生命周期函数--监听页面加载 18 | */ 19 | onLoad: function (options) { 20 | AdminBiz.clearAdminToken(); 21 | 22 | // 记住密码 23 | let pwd = cacheHelper.get('admin-pwd'); 24 | if (pwd) { 25 | this.setData({ 26 | name: pwd.name, 27 | pwd: pwd.pwd, 28 | remember: true 29 | }); 30 | } 31 | 32 | }, 33 | 34 | /** 35 | * 生命周期函数--监听页面初次渲染完成 36 | */ 37 | onReady: function () { 38 | 39 | }, 40 | 41 | /** 42 | * 生命周期函数--监听页面显示 43 | */ 44 | onShow: function () { }, 45 | 46 | /** 47 | * 生命周期函数--监听页面隐藏 48 | */ 49 | onHide: function () { 50 | 51 | }, 52 | 53 | /** 54 | * 生命周期函数--监听页面卸载 55 | */ 56 | onUnload: function () { 57 | 58 | }, 59 | 60 | url: function (e) { 61 | pageHelper.url(e, this); 62 | }, 63 | 64 | bindBackTap: function (e) { 65 | wx.reLaunch({ 66 | url: pageHelper.fmtURLByPID('/pages/my/index/my_index'), 67 | }); 68 | }, 69 | 70 | bindLoginTap: async function (e) { 71 | // 记住密码 72 | if (this.data.remember) { 73 | cacheHelper.set('admin-pwd', { pwd: this.data.pwd, name: this.data.name }, 86400 * 30); 74 | } 75 | else { 76 | cacheHelper.clear('admin-pwd'); 77 | } 78 | 79 | return AdminBiz.adminLogin(this, this.data.name, this.data.pwd); 80 | }, 81 | 82 | bindRememberTap: function (e) { 83 | this.setData({ 84 | remember: !this.data.remember 85 | }) 86 | } 87 | 88 | }) -------------------------------------------------------------------------------- /miniprogram/projects/bbs/pages/admin/index/login/admin_login.json: -------------------------------------------------------------------------------- 1 | { 2 | "usingComponents": { 3 | "cmpt-foot": "/cmpts/biz/foot/foot_cmpt" 4 | }, 5 | "disableScroll": true, 6 | "navigationBarBackgroundColor": "#ffffff", 7 | "navigationBarTextStyle": "black" 8 | } -------------------------------------------------------------------------------- /miniprogram/projects/bbs/pages/admin/index/login/admin_login.wxml: -------------------------------------------------------------------------------- 1 | 2 | 26 | 27 | 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /miniprogram/projects/bbs/pages/admin/index/login/admin_login.wxss: -------------------------------------------------------------------------------- 1 | @import '../../../../../../style/public/admin.wxss'; 2 | 3 | .main-admin { 4 | width: 100%; 5 | min-height: 100vh; 6 | display: flex; 7 | flex-direction: column; 8 | align-items: center; 9 | justify-content: center; 10 | position: relative; 11 | } 12 | 13 | .login { 14 | width: 500rpx; 15 | background-color: #fff; 16 | min-height: 550rpx; 17 | border-radius: 20rpx; 18 | display: flex; 19 | flex-direction: column; 20 | justify-content: space-between; 21 | align-items: center; 22 | padding: 50rpx 20rpx; 23 | margin-top: -100rpx; 24 | } 25 | 26 | .login button { 27 | width: 85%; 28 | color: #fff; 29 | font-size: 32rpx; 30 | } 31 | 32 | .login .hint { 33 | width: 100%; 34 | color: #000; 35 | font-weight: bold; 36 | font-size: 36rpx; 37 | text-align: center; 38 | } 39 | 40 | .login .return { 41 | width: 100%; 42 | font-size: 30rpx; 43 | text-align: center; 44 | font-size: 26rpx; 45 | } 46 | 47 | .pic { 48 | width: 180rpx; 49 | height: 180rpx; 50 | font-size: 130rpx; 51 | display: flex; 52 | justify-content: center; 53 | align-items: center; 54 | } 55 | 56 | .foot-bottom { 57 | width: 100%; 58 | display: flex; 59 | justify-content: center; 60 | align-items: center; 61 | position: absolute; 62 | bottom: 50rpx; 63 | } 64 | 65 | .site-footer { 66 | color: #fff !important; 67 | } 68 | 69 | .form-group .title { 70 | color: #333; 71 | } 72 | 73 | .form-group-pwd { 74 | width: 100%; 75 | padding: 25rpx 30rpx; 76 | color: #777 !important; 77 | } -------------------------------------------------------------------------------- /miniprogram/projects/bbs/pages/admin/mgr/add/admin_mgr_add.js: -------------------------------------------------------------------------------- 1 | const AdminBiz = require('../../../../../../comm/biz/admin_biz.js'); 2 | const PublicBiz = require('../../../../../../comm/biz/public_biz.js'); 3 | const pageHelper = require('../../../../../../helper/page_helper.js'); 4 | const cloudHelper = require('../../../../../../helper/cloud_helper.js'); 5 | const validate = require('../../../../../../helper/validate.js'); 6 | 7 | Page({ 8 | 9 | /** 10 | * 页面的初始数据 11 | */ 12 | data: { 13 | formName: '', 14 | formType: 0, 15 | formDesc: '', 16 | formPhone: '', 17 | formPassword: '', 18 | }, 19 | 20 | /** 21 | * 生命周期函数--监听页面加载 22 | */ 23 | onLoad: function (options) { 24 | if (!AdminBiz.isAdmin(this, true)) return; 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 | * 数据提交 59 | */ 60 | bindFormSubmit: async function () { 61 | if (!AdminBiz.isAdmin(this, true)) return; 62 | 63 | let data = this.data; 64 | 65 | // 数据校验 66 | data = validate.check(data, AdminBiz.CHECK_FORM_MGR_ADD, this); 67 | if (!data) return; 68 | 69 | try { 70 | let adminId = this.data.id; 71 | data.id = adminId; 72 | 73 | await cloudHelper.callCloudSumbit('admin/mgr_insert', data).then(res => { 74 | 75 | let callback = async function () { 76 | PublicBiz.removeCacheList('admin-mgr'); 77 | wx.navigateBack(); 78 | 79 | } 80 | pageHelper.showSuccToast('添加成功', 1500, callback); 81 | }); 82 | 83 | 84 | } catch (err) { 85 | console.log(err); 86 | } 87 | 88 | }, 89 | }) -------------------------------------------------------------------------------- /miniprogram/projects/bbs/pages/admin/mgr/add/admin_mgr_add.json: -------------------------------------------------------------------------------- 1 | { 2 | "usingComponents": { 3 | "cmpt-checkbox": "/cmpts/public/checkbox/checkbox_cmpt" 4 | }, 5 | "navigationBarBackgroundColor": "#2499f2", 6 | "navigationBarTextStyle": "white", 7 | "navigationBarTitleText": "添加管理员" 8 | } -------------------------------------------------------------------------------- /miniprogram/projects/bbs/pages/admin/mgr/add/admin_mgr_add.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 管理员类型 6 | 7 | 8 | 9 | 10 | 登录账号 11 | 12 | 13 | {{formNameFocus}} 14 | 15 | 16 | 姓名 17 | 18 | 19 | {{formDescFocus}} 20 | 21 | 22 | 手机 23 | 24 | 25 | {{formPhoneFocus}} 26 | 27 | 28 | 密码 29 | 30 | 31 | {{formPasswordFocus}} 32 | 33 | 34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /miniprogram/projects/bbs/pages/admin/mgr/add/admin_mgr_add.wxss: -------------------------------------------------------------------------------- 1 | @import '../../../../../../style/public/admin.wxss'; -------------------------------------------------------------------------------- /miniprogram/projects/bbs/pages/admin/mgr/edit/admin_mgr_edit.json: -------------------------------------------------------------------------------- 1 | { 2 | "usingComponents": { 3 | "cmpt-checkbox": "/cmpts/public/checkbox/checkbox_cmpt" 4 | }, 5 | "navigationBarBackgroundColor": "#2499f2", 6 | "navigationBarTextStyle": "white", 7 | "enablePullDownRefresh": true, 8 | "navigationBarTitleText": "修改管理员" 9 | } -------------------------------------------------------------------------------- /miniprogram/projects/bbs/pages/admin/mgr/edit/admin_mgr_edit.wxss: -------------------------------------------------------------------------------- 1 | @import '../../../../../../style/public/admin.wxss'; -------------------------------------------------------------------------------- /miniprogram/projects/bbs/pages/admin/mgr/list/admin_mgr_list.json: -------------------------------------------------------------------------------- 1 | { 2 | "usingComponents": {}, 3 | "navigationBarBackgroundColor": "#2499f2", 4 | "navigationBarTextStyle": "white", 5 | "navigationBarTitleText": "管理员管理" 6 | } -------------------------------------------------------------------------------- /miniprogram/projects/bbs/pages/admin/mgr/list/admin_mgr_list.wxss: -------------------------------------------------------------------------------- 1 | @import '../../../../../../style/public/admin.wxss'; 2 | 3 | .admin-comm-list .item .info.title-mid .info-item .title { 4 | justify-content: flex-end; 5 | } -------------------------------------------------------------------------------- /miniprogram/projects/bbs/pages/admin/mgr/log/admin_log_list.json: -------------------------------------------------------------------------------- 1 | { 2 | "usingComponents": { 3 | }, 4 | "navigationBarBackgroundColor": "#2499f2", 5 | "navigationBarTextStyle": "white", 6 | "disableScroll": true, 7 | "navigationBarTitleText": "后台-操作日志" 8 | } -------------------------------------------------------------------------------- /miniprogram/projects/bbs/pages/admin/mgr/log/admin_log_list.wxss: -------------------------------------------------------------------------------- 1 | @import '../../../../../../style/public/admin.wxss'; 2 | 3 | page { 4 | background-color: #f8f8f8; 5 | } 6 | 7 | .admin-comm-list .item .info { 8 | padding: 15rpx 20rpx 0rpx; 9 | } -------------------------------------------------------------------------------- /miniprogram/projects/bbs/pages/admin/mgr/pwd/admin_mgr_pwd.js: -------------------------------------------------------------------------------- 1 | const AdminBiz = require('../../../../../../comm/biz/admin_biz.js'); 2 | const pageHelper = require('../../../../../../helper/page_helper.js'); 3 | const cloudHelper = require('../../../../../../helper/cloud_helper.js'); 4 | const validate = require('../../../../../../helper/validate.js'); 5 | 6 | Page({ 7 | 8 | /** 9 | * 页面的初始数据 10 | */ 11 | data: { 12 | formOldPassword: '', 13 | formPassword: '', 14 | formPassword2: '', 15 | }, 16 | 17 | /** 18 | * 生命周期函数--监听页面加载 19 | */ 20 | onLoad: function (options) { 21 | if (!AdminBiz.isAdmin(this)) return; 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 | bindFormSubmit: async function () { 56 | if (!AdminBiz.isAdmin(this)) return; 57 | 58 | let data = this.data; 59 | 60 | // 数据校验 61 | data = validate.check(data, AdminBiz.CHECK_FORM_MGR_PWD, this); 62 | if (!data) return; 63 | 64 | if (data.password != data.password2) { 65 | return pageHelper.showModal('两次输入的新密码不一致'); 66 | } 67 | 68 | try { 69 | await cloudHelper.callCloudSumbit('admin/mgr_pwd', data).then(res => { 70 | let callback = () => { 71 | wx.navigateBack(); 72 | } 73 | pageHelper.showSuccToast('修改成功', 1500, callback); 74 | }); 75 | 76 | 77 | } catch (err) { 78 | console.log(err); 79 | } 80 | 81 | }, 82 | }) -------------------------------------------------------------------------------- /miniprogram/projects/bbs/pages/admin/mgr/pwd/admin_mgr_pwd.json: -------------------------------------------------------------------------------- 1 | { 2 | "usingComponents": {}, 3 | "navigationBarBackgroundColor": "#2499f2", 4 | "navigationBarTextStyle": "white", 5 | "navigationBarTitleText": "管理员密码修改" 6 | } -------------------------------------------------------------------------------- /miniprogram/projects/bbs/pages/admin/mgr/pwd/admin_mgr_pwd.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 旧密码 6 | 7 | 8 | {{formOldPasswordFocus}} 9 | 10 | 11 | 新密码 12 | 13 | 14 | {{formPasswordFocus}} 15 | 16 | 17 | 新密码再次填写 18 | 19 | 20 | {{formPassword2Focus}} 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /miniprogram/projects/bbs/pages/admin/mgr/pwd/admin_mgr_pwd.wxss: -------------------------------------------------------------------------------- 1 | @import '../../../../../../style/public/admin.wxss'; -------------------------------------------------------------------------------- /miniprogram/projects/bbs/pages/admin/product/add/admin_product_add.json: -------------------------------------------------------------------------------- 1 | { 2 | "usingComponents": { 3 | "cmpt-img-upload": "/cmpts/public/img/img_upload_cmpt", 4 | "cmpt-picker-multi": "/cmpts/public/picker_multi/picker_multi_cmpt", 5 | "cmpt-form-show": "/cmpts/public/form/form_show/form_show_cmpt" 6 | }, 7 | "navigationBarBackgroundColor": "#2499f2", 8 | "navigationBarTextStyle": "white", 9 | "enablePullDownRefresh": true 10 | } -------------------------------------------------------------------------------- /miniprogram/projects/bbs/pages/admin/product/add/admin_product_add.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /miniprogram/projects/bbs/pages/admin/product/add/admin_product_add.wxss: -------------------------------------------------------------------------------- 1 | @import '../../../../../../style/public/admin.wxss'; 2 | -------------------------------------------------------------------------------- /miniprogram/projects/bbs/pages/admin/product/add/admin_product_form_tpl.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 贴子标题 4 | 5 | 6 | 7 | 8 | 9 | {{formTitleFocus}} 10 | 11 | 12 | 13 | 排序号(小的先显示) 14 | 15 | 16 | {{formOrderFocus}} 17 | 18 | 19 | 20 | 分类 21 | 22 | {{cateName}} 23 | 24 | 25 | {{formCateIdFocus}} 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /miniprogram/projects/bbs/pages/admin/product/edit/admin_product_edit.json: -------------------------------------------------------------------------------- 1 | { 2 | "usingComponents": { 3 | "cmpt-img-upload": "/cmpts/public/img/img_upload_cmpt", 4 | "cmpt-picker-multi": "/cmpts/public/picker_multi/picker_multi_cmpt", 5 | "cmpt-form-show": "/cmpts/public/form/form_show/form_show_cmpt" 6 | }, 7 | "navigationBarBackgroundColor": "#2499f2", 8 | "navigationBarTextStyle": "white", 9 | "enablePullDownRefresh": true 10 | } -------------------------------------------------------------------------------- /miniprogram/projects/bbs/pages/admin/product/edit/admin_product_edit.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /miniprogram/projects/bbs/pages/admin/product/edit/admin_product_edit.wxss: -------------------------------------------------------------------------------- 1 | @import '../../../../../../style/public/admin.wxss'; -------------------------------------------------------------------------------- /miniprogram/projects/bbs/pages/admin/product/list/admin_product_list.json: -------------------------------------------------------------------------------- 1 | { 2 | "usingComponents": { 3 | }, 4 | "navigationBarBackgroundColor": "#2499f2", 5 | "navigationBarTextStyle": "white", 6 | "disableScroll": true 7 | } -------------------------------------------------------------------------------- /miniprogram/projects/bbs/pages/admin/product/list/admin_product_list.wxss: -------------------------------------------------------------------------------- 1 | @import '../../../../../../style/public/admin.wxss'; 2 | @import '../../../../../../style/project/admin_list_style.wxss'; 3 | 4 | page { 5 | background-color: #f8f8f8; 6 | } 7 | 8 | .cate { 9 | width: 100%; 10 | padding: 20rpx; 11 | display: flex; 12 | align-items: flex-start; 13 | justify-content: flex-start; 14 | flex-wrap: wrap; 15 | padding-bottom: 100rpx; 16 | } 17 | 18 | .cate .item { 19 | width: calc((100% - 45rpx) / 3); 20 | border: 1rpx solid #ccc; 21 | margin-bottom: 20rpx; 22 | border-radius: 20rpx; 23 | padding: 20rpx 10rpx; 24 | display: flex; 25 | flex-direction: column; 26 | color: #666; 27 | } 28 | 29 | .cate .item:nth-child(3n+1), 30 | .cate .item:nth-child(3n+2) { 31 | margin-right: 15rpx; 32 | } 33 | 34 | .cate .item .t { 35 | font-size: 28rpx; 36 | margin-bottom: 10rpx; 37 | } 38 | 39 | .cate .item .cate { 40 | font-size: 24rpx; 41 | color: #bbb 42 | } 43 | 44 | .cate .item.selected .cate { 45 | color: #fff 46 | } 47 | 48 | .cate .item.selected { 49 | border-color: #eee; 50 | color: #fff; 51 | background-color: var(--blue); 52 | } 53 | 54 | .cate .item.cur .t { 55 | color: #000 56 | } 57 | 58 | .btn { 59 | padding: 0 20rpx !important; 60 | } 61 | 62 | .admin-comm-list .item .info .oprt { 63 | justify-content: space-around 64 | } 65 | 66 | .admin-comm-list .item .info .oprt .btn { 67 | width: 144rpx; 68 | } 69 | 70 | .admin-comm-list .item .info .swiper { 71 | position: absolute; 72 | top: 14rpx; 73 | right: 10rpx; 74 | } -------------------------------------------------------------------------------- /miniprogram/projects/bbs/pages/admin/setup/about/admin_setup_about.json: -------------------------------------------------------------------------------- 1 | { 2 | "usingComponents": { 3 | "cmpt-editor": "/cmpts/public/editor/editor_cmpt" 4 | }, 5 | "navigationBarBackgroundColor": "#2499f2", 6 | "navigationBarTextStyle": "white", 7 | "enablePullDownRefresh": true, 8 | "navigationBarTitleText": "编辑" 9 | } -------------------------------------------------------------------------------- /miniprogram/projects/bbs/pages/admin/setup/about/admin_setup_about.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 保存修改 13 | 14 | -------------------------------------------------------------------------------- /miniprogram/projects/bbs/pages/admin/setup/about/admin_setup_about.wxss: -------------------------------------------------------------------------------- 1 | @import '../../../../../../style/public/admin.wxss'; 2 | 3 | .main-admin { 4 | width: 100%; 5 | box-sizing: border-box; 6 | padding: 30rpx 20rpx; 7 | padding-bottom: 200rpx; 8 | } 9 | 10 | .form-group { 11 | padding: 1rpx 1rpx; 12 | overflow: hidden; 13 | } 14 | 15 | .btn-bottom-admin>view { 16 | width: 100%; 17 | } -------------------------------------------------------------------------------- /miniprogram/projects/bbs/pages/admin/setup/about_list/admin_setup_about_list.js: -------------------------------------------------------------------------------- 1 | const AdminBiz = require('../../../../../../comm/biz/admin_biz.js'); 2 | const projectSetting = require('../../../../public/project_setting.js'); 3 | const pageHelper = require('../../../../../../helper/page_helper.js'); 4 | 5 | Page({ 6 | 7 | /** 8 | * 页面的初始数据 9 | */ 10 | data: { 11 | 12 | }, 13 | 14 | /** 15 | * 生命周期函数--监听页面加载 16 | */ 17 | onLoad(options) { 18 | if (!AdminBiz.isAdmin(this)) return; 19 | 20 | this.setData({ 21 | list: projectSetting.SETUP_CONTENT_ITEMS 22 | }); 23 | }, 24 | 25 | /** 26 | * 生命周期函数--监听页面初次渲染完成 27 | */ 28 | onReady() { 29 | 30 | }, 31 | 32 | /** 33 | * 生命周期函数--监听页面显示 34 | */ 35 | onShow() { 36 | 37 | }, 38 | 39 | /** 40 | * 生命周期函数--监听页面隐藏 41 | */ 42 | onHide() { 43 | 44 | }, 45 | 46 | /** 47 | * 生命周期函数--监听页面卸载 48 | */ 49 | onUnload() { 50 | 51 | }, 52 | 53 | /** 54 | * 页面相关事件处理函数--监听用户下拉动作 55 | */ 56 | onPullDownRefresh() { 57 | 58 | }, 59 | 60 | /** 61 | * 页面上拉触底事件的处理函数 62 | */ 63 | onReachBottom() { 64 | 65 | }, 66 | 67 | url: function (e) { 68 | pageHelper.url(e, this); 69 | } 70 | }) -------------------------------------------------------------------------------- /miniprogram/projects/bbs/pages/admin/setup/about_list/admin_setup_about_list.json: -------------------------------------------------------------------------------- 1 | { 2 | "usingComponents": { 3 | 4 | }, 5 | "navigationBarBackgroundColor": "#2499f2", 6 | "navigationBarTextStyle": "white", 7 | "enablePullDownRefresh": true, 8 | "navigationBarTitleText": "单页文章" 9 | } -------------------------------------------------------------------------------- /miniprogram/projects/bbs/pages/admin/setup/about_list/admin_setup_about_list.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 《{{item.title}}》 7 | 8 | 编辑 9 | 10 | 预览 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /miniprogram/projects/bbs/pages/admin/setup/about_list/admin_setup_about_list.wxss: -------------------------------------------------------------------------------- 1 | @import '../../../../../../style/public/admin.wxss'; 2 | 3 | page { 4 | background-color: #f8f8f8; 5 | } 6 | 7 | .main-admin { 8 | padding: 40rpx 0; 9 | } 10 | 11 | .admin-comm-list .item { 12 | margin-bottom: 40rpx; 13 | } 14 | 15 | .admin-comm-list .item .header .left { 16 | font-size: 32rpx !important; 17 | } -------------------------------------------------------------------------------- /miniprogram/projects/bbs/pages/admin/setup/qr/admin_setup_qr.json: -------------------------------------------------------------------------------- 1 | { 2 | "usingComponents": { 3 | 4 | }, 5 | "navigationBarBackgroundColor": "#2499f2", 6 | "navigationBarTextStyle": "white", 7 | "enablePullDownRefresh": true, 8 | "navigationBarTitleText": "小程序码" 9 | } -------------------------------------------------------------------------------- /miniprogram/projects/bbs/pages/admin/setup/qr/admin_setup_qr.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 放在推广的地方展示 10 | 11 | 12 | 长按图片保存小程序码 13 | 14 | 《{{title}}》小程序码 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /miniprogram/projects/bbs/pages/admin/setup/qr/admin_setup_qr.wxss: -------------------------------------------------------------------------------- 1 | @import '../../../../../../style/public/admin.wxss'; 2 | 3 | .load.loading::after { 4 | content: "小程序码生成中..."; 5 | } 6 | 7 | .form-box .checkin { 8 | width: 100%; 9 | padding: 40rpx 40rpx 80rpx; 10 | padding-bottom: 150rpx; 11 | display: flex; 12 | flex-direction: column; 13 | justify-content: flex-start; 14 | align-items: center; 15 | } 16 | 17 | .form-box .checkin .notice { 18 | width: 100%; 19 | font-size: 36rpx; 20 | text-align: center; 21 | color: #000; 22 | margin-bottom: 30rpx; 23 | } 24 | 25 | .form-box .checkin image { 26 | width: 500rpx; 27 | height: 500rpx; 28 | margin: 30rpx 0rpx; 29 | } 30 | 31 | .form-box .checkin .oprt { 32 | margin-top: 0rpx; 33 | text-align: center; 34 | font-size: 30rpx; 35 | color: var(--adminColor); 36 | padding: 20rpx 10rpx; 37 | } -------------------------------------------------------------------------------- /miniprogram/projects/bbs/pages/admin/setup/swiper/admin_setup_swiper.json: -------------------------------------------------------------------------------- 1 | { 2 | "usingComponents": { 3 | "cmpt-img-upload": "/cmpts/public/img/img_upload_cmpt", 4 | "cmpt-radio": "/cmpts/public/radio/radio_cmpt" 5 | }, 6 | "navigationBarBackgroundColor": "#2499f2", 7 | "navigationBarTextStyle": "white", 8 | "enablePullDownRefresh": true, 9 | "navigationBarTitleText": "首页轮播图设置" 10 | } -------------------------------------------------------------------------------- /miniprogram/projects/bbs/pages/admin/setup/swiper/admin_setup_swiper.wxss: -------------------------------------------------------------------------------- 1 | @import '../../../../../../style/public/admin.wxss'; 2 | 3 | .form-box { 4 | padding: 10rpx 20rpx; 5 | } 6 | 7 | .ipt1 { 8 | border-bottom: 0rpx solid #ccc; 9 | background-color: #fff; 10 | text-align: right; 11 | margin-right: 10rpx; 12 | } 13 | 14 | .checkbox-group .item { 15 | border-bottom: 0 !important; 16 | } 17 | 18 | .checkbox-group .item:nth-child(odd) { 19 | background-color: #fff !important; 20 | } 21 | 22 | .form-group .upload-img { 23 | justify-content: center; 24 | } 25 | 26 | .form-group .upload-img>view { 27 | width: 600rpx !important; 28 | height: 255rpx !important; 29 | } 30 | 31 | 32 | .cate-modal { 33 | width: 100%; 34 | padding: 20rpx; 35 | display: flex; 36 | align-items: flex-start; 37 | justify-content: flex-start; 38 | flex-wrap: wrap; 39 | padding-bottom: 100rpx; 40 | } 41 | 42 | .cate-modal .item { 43 | width: calc((100% - 45rpx) / 3); 44 | border: 1rpx solid #ccc; 45 | margin-bottom: 20rpx; 46 | border-radius: 20rpx; 47 | padding: 20rpx 10rpx; 48 | display: flex; 49 | flex-direction: column; 50 | color: #666; 51 | } 52 | 53 | .cate-modal .item:nth-child(3n+1), 54 | .cate-modal .item:nth-child(3n+2) { 55 | margin-right: 15rpx; 56 | } 57 | 58 | .cate-modal .item .t { 59 | font-size: 28rpx; 60 | margin-bottom: 10rpx; 61 | } 62 | 63 | .cate-modal .item .cate { 64 | font-size: 24rpx; 65 | color: #bbb 66 | } 67 | 68 | .cate-modal .item.selected .cate { 69 | color: #fff 70 | } 71 | 72 | .cate-modal .item.selected { 73 | border-color: #eee; 74 | color: #fff; 75 | background-color: var(--blue); 76 | } 77 | 78 | .cate-modal .item.cur .t { 79 | color: #000 80 | } -------------------------------------------------------------------------------- /miniprogram/projects/bbs/pages/admin/user/detail/admin_user_detail.json: -------------------------------------------------------------------------------- 1 | { 2 | "usingComponents": { 3 | 4 | }, 5 | "navigationBarBackgroundColor": "#2499f2", 6 | "navigationBarTextStyle": "white", 7 | "enablePullDownRefresh": true, 8 | "navigationBarTitleText": "用户详情" 9 | } -------------------------------------------------------------------------------- /miniprogram/projects/bbs/pages/admin/user/detail/admin_user_detail.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 用户昵称 11 | 12 | {{user.USER_NAME}} 13 | 14 | 15 | 手机号码 16 | 17 | {{user.USER_MOBILE}} 18 | 19 | 20 | 注册时间 21 | 22 | {{user.USER_ADD_TIME}} 23 | 24 | 25 | 26 | {{item.title}} 27 | 28 | 29 | 30 | 31 | {{item.val===true?'是':'否'}} 32 | {{item.val}} 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /miniprogram/projects/bbs/pages/admin/user/detail/admin_user_detail.wxss: -------------------------------------------------------------------------------- 1 | @import '../../../../../../style/public/admin.wxss'; 2 | 3 | .main-admin { 4 | padding: 30rpx 0rpx; 5 | } 6 | 7 | .info-item.pic { 8 | display: flex; 9 | } 10 | 11 | .info-item.pic image{ 12 | width: 180rpx; 13 | height: 180rpx; 14 | margin-left: 20rpx; 15 | border-radius: 2rpx; 16 | } 17 | 18 | .admin-comm-list .item .info .info-item .comment { 19 | width: 100%; 20 | color:#666; 21 | display: flex; 22 | flex-direction: column; 23 | } -------------------------------------------------------------------------------- /miniprogram/projects/bbs/pages/admin/user/export/admin_user_export.json: -------------------------------------------------------------------------------- 1 | { 2 | "usingComponents": { 3 | 4 | }, 5 | "navigationBarBackgroundColor": "#2499f2", 6 | "navigationBarTextStyle": "white", 7 | "enablePullDownRefresh": true, 8 | "navigationBarTitleText": "用户资料导出" 9 | } -------------------------------------------------------------------------------- /miniprogram/projects/bbs/pages/admin/user/export/admin_user_export.wxss: -------------------------------------------------------------------------------- 1 | @import '../../../../../../style/public/admin.wxss'; 2 | 3 | .form-box .title-desc { 4 | padding-bottom: 10rpx; 5 | border: 0; 6 | font-size: 29rpx; 7 | color: #888; 8 | } 9 | 10 | .btn-admin{ 11 | margin-bottom: 20rpx; 12 | } -------------------------------------------------------------------------------- /miniprogram/projects/bbs/pages/admin/user/list/admin_user_list.json: -------------------------------------------------------------------------------- 1 | { 2 | "usingComponents": { 3 | 4 | }, 5 | "navigationBarBackgroundColor": "#2499f2", 6 | "navigationBarTextStyle": "white", 7 | "disableScroll": true, 8 | "navigationBarTitleText": "用户管理" 9 | } -------------------------------------------------------------------------------- /miniprogram/projects/bbs/pages/admin/user/list/admin_user_list.wxss: -------------------------------------------------------------------------------- 1 | @import '../../../../../../style/public/admin.wxss'; 2 | 3 | page { 4 | background-color: #f8f8f8; 5 | } 6 | 7 | .admin-comm-list .item .info .oprt { 8 | padding: 0rpx 0rpx; 9 | } 10 | 11 | 12 | 13 | .cate { 14 | width: 100%; 15 | padding: 20rpx; 16 | display: flex; 17 | align-items: flex-start; 18 | justify-content: flex-start; 19 | flex-wrap: wrap; 20 | padding-bottom: 100rpx; 21 | } 22 | 23 | .cate .item { 24 | width: calc((100% - 45rpx) / 3); 25 | border: 1rpx solid #ccc; 26 | margin-bottom: 20rpx; 27 | border-radius: 20rpx; 28 | padding: 20rpx 10rpx; 29 | display: flex; 30 | flex-direction: column; 31 | color: #666; 32 | } 33 | 34 | .cate .item:nth-child(3n+1), 35 | .cate .item:nth-child(3n+2) { 36 | margin-right: 15rpx; 37 | } 38 | 39 | .cate .item .t { 40 | font-size: 28rpx; 41 | margin-bottom: 10rpx; 42 | } 43 | 44 | .cate .item .cate { 45 | font-size: 24rpx; 46 | color: #bbb 47 | } 48 | 49 | .cate .item.selected .cate { 50 | color: #fff 51 | } 52 | 53 | .cate .item.selected { 54 | border-color: #eee; 55 | color: #fff; 56 | background-color: var(--blue); 57 | } 58 | 59 | .cate .item.cur .t { 60 | color: #000 61 | } -------------------------------------------------------------------------------- /miniprogram/projects/bbs/pages/comment/add/comment_add.json: -------------------------------------------------------------------------------- 1 | { 2 | "usingComponents": { 3 | "cmpt-form-show": "/cmpts/public/form/form_show/form_show_cmpt" 4 | }, 5 | "enablePullDownRefresh": true, 6 | "navigationBarTitleText": "写评论" 7 | } -------------------------------------------------------------------------------- /miniprogram/projects/bbs/pages/comment/add/comment_add.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /miniprogram/projects/bbs/pages/comment/add/comment_add.wxss: -------------------------------------------------------------------------------- 1 | @import "../../../style/skin.wxss"; -------------------------------------------------------------------------------- /miniprogram/projects/bbs/pages/comment/list/comment_list.json: -------------------------------------------------------------------------------- 1 | { 2 | "usingComponents": { 3 | }, 4 | "disableScroll": true, 5 | "navigationBarTitleText": "评论" 6 | } -------------------------------------------------------------------------------- /miniprogram/projects/bbs/pages/comment/list/comment_list.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 写评论 17 | 18 | 19 | -------------------------------------------------------------------------------- /miniprogram/projects/bbs/pages/comment/my_list/comment_my_list.json: -------------------------------------------------------------------------------- 1 | { 2 | "usingComponents": { 3 | }, 4 | "disableScroll": true, 5 | "navigationBarTitleText": "我的评论" 6 | } -------------------------------------------------------------------------------- /miniprogram/projects/bbs/pages/comment/my_list/comment_my_list.wxss: -------------------------------------------------------------------------------- 1 | @import "../list/comment_list.wxss"; -------------------------------------------------------------------------------- /miniprogram/projects/bbs/pages/default/index/default_index.js: -------------------------------------------------------------------------------- 1 | const pageHelper = require('../../../../../helper/page_helper.js'); 2 | const cloudHelper = require('../../../../../helper/cloud_helper.js'); 3 | const ProjectBiz = require('../../../biz/project_biz.js'); 4 | 5 | Page({ 6 | /** 7 | * 页面的初始数据 8 | */ 9 | data: { 10 | isLoad: false, 11 | query: '', 12 | }, 13 | 14 | /** 15 | * 生命周期函数--监听页面加载 16 | */ 17 | onLoad: async function (options) { 18 | ProjectBiz.initPage(this); 19 | 20 | await this._loadDetail(); 21 | }, 22 | 23 | _loadDetail: async function () { 24 | let opts = { 25 | title: 'bar' 26 | } 27 | await cloudHelper.callCloudSumbit('home/list', {}, opts).then(res => { 28 | this.setData({ 29 | isLoad: true, 30 | ...res.data 31 | }); 32 | }) 33 | 34 | }, 35 | 36 | /** 37 | * 生命周期函数--监听页面初次渲染完成 38 | */ 39 | onReady: function () { }, 40 | 41 | /** 42 | * 生命周期函数--监听页面显示 43 | */ 44 | onShow: async function () { 45 | 46 | }, 47 | 48 | onPullDownRefresh: async function () { 49 | await this._loadDetail(); 50 | wx.stopPullDownRefresh(); 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 | pageHelper.url(e, this); 69 | }, 70 | 71 | 72 | /** 73 | * 用户点击右上角分享 74 | */ 75 | onShareAppMessage: function () { 76 | 77 | }, 78 | 79 | bindSearchConfirm: function (e) { 80 | ProjectBiz.bindSearchConfirm(this); 81 | }, 82 | }) -------------------------------------------------------------------------------- /miniprogram/projects/bbs/pages/default/index/default_index.json: -------------------------------------------------------------------------------- 1 | { 2 | "usingComponents": { 3 | }, 4 | "enablePullDownRefresh": true, 5 | "navigationStyle": "custom", 6 | "navigationBarTitleText": "首页" 7 | } -------------------------------------------------------------------------------- /miniprogram/projects/bbs/pages/default/web/web.js: -------------------------------------------------------------------------------- 1 | // projects/prod/pages/default/web/web.js 2 | Page({ 3 | 4 | /** 5 | * 页面的初始数据 6 | */ 7 | data: { 8 | 9 | }, 10 | 11 | /** 12 | * 生命周期函数--监听页面加载 13 | */ 14 | onLoad(options) { 15 | let url = decodeURIComponent(options.url); 16 | this.setData({ url }); 17 | }, 18 | 19 | /** 20 | * 生命周期函数--监听页面初次渲染完成 21 | */ 22 | onReady() { 23 | 24 | }, 25 | 26 | /** 27 | * 生命周期函数--监听页面显示 28 | */ 29 | onShow() { 30 | 31 | }, 32 | 33 | /** 34 | * 生命周期函数--监听页面隐藏 35 | */ 36 | onHide() { 37 | 38 | }, 39 | 40 | /** 41 | * 生命周期函数--监听页面卸载 42 | */ 43 | onUnload() { 44 | 45 | }, 46 | 47 | /** 48 | * 页面相关事件处理函数--监听用户下拉动作 49 | */ 50 | onPullDownRefresh() { 51 | 52 | }, 53 | 54 | /** 55 | * 页面上拉触底事件的处理函数 56 | */ 57 | onReachBottom() { 58 | 59 | }, 60 | 61 | /** 62 | * 用户点击右上角分享 63 | */ 64 | onShareAppMessage() { 65 | 66 | } 67 | }) -------------------------------------------------------------------------------- /miniprogram/projects/bbs/pages/default/web/web.json: -------------------------------------------------------------------------------- 1 | { 2 | "usingComponents": {} 3 | } -------------------------------------------------------------------------------- /miniprogram/projects/bbs/pages/default/web/web.wxml: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /miniprogram/projects/bbs/pages/default/web/web.wxss: -------------------------------------------------------------------------------- 1 | /* projects/prod/pages/default/web/web.wxss */ -------------------------------------------------------------------------------- /miniprogram/projects/bbs/pages/my/edit/my_edit.json: -------------------------------------------------------------------------------- 1 | { 2 | "usingComponents": { 3 | "cmpt-form-show": "/cmpts/public/form/form_show/form_show_cmpt" 4 | }, 5 | "enablePullDownRefresh": true, 6 | "navigationBarTitleText": "个人资料" 7 | } -------------------------------------------------------------------------------- /miniprogram/projects/bbs/pages/my/edit/my_edit.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /miniprogram/projects/bbs/pages/my/edit/my_edit.wxss: -------------------------------------------------------------------------------- 1 | @import "../../../style/skin.wxss"; 2 | .submit-line { 3 | width: 100%; 4 | } 5 | 6 | .form-group .mobile { 7 | flex: 1; 8 | text-align: left; 9 | } 10 | 11 | .submit-line { 12 | width: 100%; 13 | } 14 | 15 | .form-group .mobile { 16 | flex: 1; 17 | text-align: left; 18 | } 19 | 20 | .form-group .avatar { 21 | width: 100rpx; 22 | height: 100rpx; 23 | border-radius: 10rpx; 24 | } -------------------------------------------------------------------------------- /miniprogram/projects/bbs/pages/my/fav/my_fav.js: -------------------------------------------------------------------------------- 1 | const behavior = require('../../../../../comm/behavior/my_fav_bh.js'); 2 | const ProjectBiz = require('../../../biz/project_biz.js'); 3 | 4 | Page({ 5 | 6 | behaviors: [behavior], 7 | 8 | onReady: function () { 9 | ProjectBiz.initPage(this); 10 | }, 11 | }) -------------------------------------------------------------------------------- /miniprogram/projects/bbs/pages/my/fav/my_fav.json: -------------------------------------------------------------------------------- 1 | { 2 | "usingComponents": {}, 3 | "enablePullDownRefresh": true, 4 | "navigationBarTitleText": "我的收藏" 5 | } -------------------------------------------------------------------------------- /miniprogram/projects/bbs/pages/my/fav/my_fav.wxml: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /miniprogram/projects/bbs/pages/my/fav/my_fav.wxss: -------------------------------------------------------------------------------- 1 | @import "../../../../../style/public/article_list.wxss"; 2 | @import "../../../style/skin.wxss"; 3 | @import "../../../../../style/project/my_fav_style.wxss"; -------------------------------------------------------------------------------- /miniprogram/projects/bbs/pages/my/foot/my_foot.js: -------------------------------------------------------------------------------- 1 | const behavior = require('../../../../../comm/behavior/my_foot_bh.js'); 2 | const ProjectBiz = require('../../../biz/project_biz.js'); 3 | 4 | Page({ 5 | 6 | behaviors: [behavior], 7 | 8 | onReady: function () { 9 | ProjectBiz.initPage(this); 10 | }, 11 | }) -------------------------------------------------------------------------------- /miniprogram/projects/bbs/pages/my/foot/my_foot.json: -------------------------------------------------------------------------------- 1 | { 2 | "usingComponents": {}, 3 | "enablePullDownRefresh": true, 4 | "navigationBarTitleText": "历史浏览" 5 | } -------------------------------------------------------------------------------- /miniprogram/projects/bbs/pages/my/foot/my_foot.wxml: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /miniprogram/projects/bbs/pages/my/foot/my_foot.wxss: -------------------------------------------------------------------------------- 1 | @import "../../../../../style/public/article_list.wxss"; 2 | @import "../../../style/skin.wxss"; 3 | @import "../../../../../style/project/my_foot_style.wxss"; -------------------------------------------------------------------------------- /miniprogram/projects/bbs/pages/my/index/my_index.json: -------------------------------------------------------------------------------- 1 | { 2 | "usingComponents": { 3 | 4 | }, 5 | "navigationStyle": "custom", 6 | "enablePullDownRefresh": true, 7 | "navigationBarTitleText": "我的" 8 | } -------------------------------------------------------------------------------- /miniprogram/projects/bbs/pages/my/reg/my_reg.json: -------------------------------------------------------------------------------- 1 | { 2 | "usingComponents": { 3 | "cmpt-form-show": "/cmpts/public/form/form_show/form_show_cmpt" 4 | }, 5 | "enablePullDownRefresh": true, 6 | "navigationBarTitleText": "注册" 7 | } -------------------------------------------------------------------------------- /miniprogram/projects/bbs/pages/my/reg/my_reg.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /miniprogram/projects/bbs/pages/my/reg/my_reg.wxss: -------------------------------------------------------------------------------- 1 | @import "../../../style/skin.wxss"; 2 | .submit-line { 3 | width: 100%; 4 | } 5 | 6 | .form-group .mobile { 7 | flex: 1; 8 | text-align: left; 9 | } 10 | 11 | .submit-line { 12 | width: 100%; 13 | } 14 | 15 | .form-group .mobile { 16 | flex: 1; 17 | text-align: left; 18 | font-size:28rpx; 19 | } -------------------------------------------------------------------------------- /miniprogram/projects/bbs/pages/product/add/product_add.json: -------------------------------------------------------------------------------- 1 | { 2 | "usingComponents": { 3 | "cmpt-img-upload": "/cmpts/public/img/img_upload_cmpt", 4 | "cmpt-picker-multi": "/cmpts/public/picker_multi/picker_multi_cmpt", 5 | "cmpt-form-show": "/cmpts/public/form/form_show/form_show_cmpt" 6 | }, 7 | "navigationBarTitleText": "发贴" 8 | } -------------------------------------------------------------------------------- /miniprogram/projects/bbs/pages/product/add/product_add.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |