(小程序)后台交互-首页

news2024/11/15 8:30:17

目录

一、小程序首页动态数据加载

1.数据库准备

 2.后台准备

① pom.xml

② 配置数据源

③ 整合mybatis 

④ 代码生成

⑤ mybatis-generator

二、准备前端的首页的数据 

1、Promise

 2.封装request

3.会议展示

三、通过wxs将首页动态数据优化


一、小程序首页动态数据加载

1.数据库准备

新建数据库叫oapro,如下图所示:

导入数据,代码如下:

/*
 Navicat Premium Data Transfer

 Source Server         : mysql273
 Source Server Type    : MySQL
 Source Server Version : 50723
 Source Host           : localhost:3306
 Source Schema         : oapro

 Target Server Type    : MySQL
 Target Server Version : 50723
 File Encoding         : 65001

 Date: 02/09/2022 16:46:06
*/

SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for t_oa_data_dict
-- ----------------------------
DROP TABLE IF EXISTS `t_oa_data_dict`;
CREATE TABLE `t_oa_data_dict`  (
  `id` bigint(20) NOT NULL,
  `datasource` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `description` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of t_oa_data_dict
-- ----------------------------
INSERT INTO `t_oa_data_dict` VALUES (1, 'sys_user_role', '用户角色');
INSERT INTO `t_oa_data_dict` VALUES (2, 'sys_permission_type', '权限类别');
INSERT INTO `t_oa_data_dict` VALUES (3, 'meeting_info_state', '会议状态');
INSERT INTO `t_oa_data_dict` VALUES (4, 'meeting_person_type', '会议人员类别');
INSERT INTO `t_oa_data_dict` VALUES (5, 'meeting_person_result', '会议反馈结果');
INSERT INTO `t_oa_data_dict` VALUES (6, 'meeting_equipment_type', '会议设备类别');

-- ----------------------------
-- Table structure for t_oa_data_item
-- ----------------------------
DROP TABLE IF EXISTS `t_oa_data_item`;
CREATE TABLE `t_oa_data_item`  (
  `id` bigint(11) NOT NULL,
  `datasource` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '数据源标识',
  `code` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '据库数存储的值',
  `val` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '该值对应的文本内容'
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of t_oa_data_item
-- ----------------------------
INSERT INTO `t_oa_data_item` VALUES (1, 'sys_user_role', '1', '管理员');
INSERT INTO `t_oa_data_item` VALUES (2, 'sys_user_role', '2', '发起者');
INSERT INTO `t_oa_data_item` VALUES (3, 'sys_user_role', '3', '审批者');
INSERT INTO `t_oa_data_item` VALUES (4, 'sys_user_role', '4', '参与者');
INSERT INTO `t_oa_data_item` VALUES (5, 'sys_user_role', '5', '会议室管理员');
INSERT INTO `t_oa_data_item` VALUES (6, 'sys_permission_type', '1', '菜单');
INSERT INTO `t_oa_data_item` VALUES (7, 'sys_permission_type', '2', '按钮');
INSERT INTO `t_oa_data_item` VALUES (8, 'meeting_info_state', '1', '待审核');
INSERT INTO `t_oa_data_item` VALUES (9, 'meeting_info_state', '2', '驳回');
INSERT INTO `t_oa_data_item` VALUES (10, 'meeting_info_state', '3', '待开');
INSERT INTO `t_oa_data_item` VALUES (11, 'meeting_info_state', '4', '进行中');
INSERT INTO `t_oa_data_item` VALUES (12, 'meeting_info_state', '5', '开启投票');
INSERT INTO `t_oa_data_item` VALUES (13, 'meeting_info_state', '6', '结束会议');
INSERT INTO `t_oa_data_item` VALUES (14, 'meeting_info_state', '0', '取消会议');
INSERT INTO `t_oa_data_item` VALUES (15, 'meeting_person_type', '1', '参会');
INSERT INTO `t_oa_data_item` VALUES (16, 'meeting_person_type', '2', '列席');
INSERT INTO `t_oa_data_item` VALUES (17, 'meeting_person_result', '1', '参加');
INSERT INTO `t_oa_data_item` VALUES (18, 'meeting_person_result', '0', '不参加');
INSERT INTO `t_oa_data_item` VALUES (19, 'meeting_equipment_type', '1', '投影仪');
INSERT INTO `t_oa_data_item` VALUES (20, 'meeting_equipment_type', '2', '麦克风');
INSERT INTO `t_oa_data_item` VALUES (21, 'meeting_equipment_type', '3', '电子版书屏');
INSERT INTO `t_oa_data_item` VALUES (22, 'meeting_equipment_type', '4', '主持台');
INSERT INTO `t_oa_data_item` VALUES (23, 'meeting_equipment_type', '5', '音响');

-- ----------------------------
-- Table structure for t_oa_meeting_feedback
-- ----------------------------
DROP TABLE IF EXISTS `t_oa_meeting_feedback`;
CREATE TABLE `t_oa_meeting_feedback`  (
  `id` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  `meetingId` bigint(11) NULL DEFAULT NULL COMMENT '外键:会议表主键\r\n',
  `personType` int(2) NULL DEFAULT NULL COMMENT '人员类别:1参会2列席\r\n',
  `personId` bigint(11) NULL DEFAULT NULL COMMENT '人员ID\r\n',
  `result` int(2) NULL DEFAULT NULL COMMENT '反馈结果:1参加0不参加\r\n',
  `reason` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '不参加的原因\r\n',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '会议通知反馈表\r\n' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for t_oa_meeting_info
-- ----------------------------
DROP TABLE IF EXISTS `t_oa_meeting_info`;
CREATE TABLE `t_oa_meeting_info`  (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `title` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '会议标题\r\n',
  `content` varchar(2000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '会议内容\r\n',
  `canyuze` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '参会人员\r\n',
  `liexize` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '列席人员\r\n',
  `zhuchiren` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '主持人\r\n',
  `location` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '会议地点\r\n',
  `startTime` datetime(0) NULL DEFAULT NULL COMMENT '开始时间\r\n',
  `endTime` datetime(0) NULL DEFAULT NULL COMMENT '结束时间\r\n',
  `fujian` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '会议附件\r\n',
  `state` int(11) NULL DEFAULT NULL COMMENT '状态:0取消会议1待审核2驳回3待开4进行中5开启投票6结束会议,默认值为1\r\n',
  `auditPerson` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '审核人\r\n',
  `auditTime` datetime(0) NULL DEFAULT NULL COMMENT '审核时间\r\n',
  `seatPic` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '会议排座图片地址\r\n',
  `remark` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '备注\r\n',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 21 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '会议信息表' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of t_oa_meeting_info
-- ----------------------------
INSERT INTO `t_oa_meeting_info` VALUES (1, '关于张三的人事任命', '张三工作期间表现优秀,经集团公司领导研究,最终一致同意,张三升为就业组长', '2,3,4,5,6,7,8,9,10,11', '23,24', '1', '会议室1', '2022-03-13 00:00:00', NULL, NULL, 1, '1', NULL, NULL, '/upload/qianzi/0e12bf4d-2a37-43d7-a283-9805687eb596.jpg');
INSERT INTO `t_oa_meeting_info` VALUES (2, '关于李四的开除通告', '李四工作期间无故旷工、办公室传递负能量消息,经公司商议,给予开除决定', '11,12,13,14,15,16,17', '23,24', '1', '会议室1', '2022-03-13 00:00:00', NULL, NULL, 1, '1', NULL, NULL, '');
INSERT INTO `t_oa_meeting_info` VALUES (15, '11', '11', '1', '3,2', '1', '会议室2', '2022-03-13 00:00:00', NULL, NULL, 1, NULL, NULL, NULL, NULL);
INSERT INTO `t_oa_meeting_info` VALUES (16, '22', '22', '1', '2,3', '1', '会议室122', '2022-03-13 00:00:00', NULL, NULL, 1, '1', NULL, '/uploads/ef512ab350814002b4330efe81ccbba2.png', NULL);
INSERT INTO `t_oa_meeting_info` VALUES (17, '11', '22', '1', '3,4', '1', '会议室111', '2022-03-13 10:00:00', NULL, NULL, 2, NULL, NULL, '/uploads/06db5bd3b6674b599f7ade2276c03ab7.png', NULL);
INSERT INTO `t_oa_meeting_info` VALUES (18, '11', '22', '1', '3,4', '1', '会议室111', '2022-03-13 11:00:00', NULL, NULL, 1, NULL, NULL, '/uploads/5b91797446a74da19cad0b921ac79ea5.png', NULL);
INSERT INTO `t_oa_meeting_info` VALUES (19, '22', '22', '1', '2,3', '2', '会议室122', '2022-03-13 12:00:00', NULL, NULL, 2, NULL, NULL, '/uploads/851bda19dfaf494f9abaebe5b691e9ad.png', NULL);
INSERT INTO `t_oa_meeting_info` VALUES (20, 'ee', 'ee', '1,2', '3,4,5', '2', '会议室1111', '2022-03-15 09:00:00', '2022-03-15 11:00:00', NULL, 2, '1', NULL, '/uploads/abab715507314fbd8a9dd42e38e6693c.png', '/uploads/e403fa90455747c399b66054ee06b70e.png');

-- ----------------------------
-- Table structure for t_oa_meeting_option
-- ----------------------------
DROP TABLE IF EXISTS `t_oa_meeting_option`;
CREATE TABLE `t_oa_meeting_option`  (
  `id` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  `meetingId` bigint(11) NULL DEFAULT NULL COMMENT '会议ID\r\n',
  `optionValue` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '选项标识(A/B/C/D)\r\n',
  `optionText` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '选项描述\r\n',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '会议投票标题选项表\r\n' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for t_oa_meeting_room
-- ----------------------------
DROP TABLE IF EXISTS `t_oa_meeting_room`;
CREATE TABLE `t_oa_meeting_room`  (
  `id` int(11) NOT NULL,
  `name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '会议室名称\r\n',
  `equipment` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '会议设备\r\n',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '会议室信息\r\n' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for t_oa_meeting_vote
-- ----------------------------
DROP TABLE IF EXISTS `t_oa_meeting_vote`;
CREATE TABLE `t_oa_meeting_vote`  (
  `id` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  `optionId` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '选项ID(投票标题选项表的主键)\r\n',
  `personId` bigint(11) NULL DEFAULT NULL COMMENT '投票人员ID\r\n',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '会议投票记录表' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for t_oa_permission
-- ----------------------------
DROP TABLE IF EXISTS `t_oa_permission`;
CREATE TABLE `t_oa_permission`  (
  `id` bigint(20) NOT NULL DEFAULT 0 COMMENT '权限id',
  `name` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '权限名字',
  `description` varchar(128) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '权限描述',
  `url` varchar(128) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '菜单路径',
  `pid` bigint(20) NULL DEFAULT NULL COMMENT '父权限',
  `ismenu` int(11) NULL DEFAULT 1 COMMENT '是否为菜单 1、菜单  2、按钮',
  `displayno` bigint(20) NULL DEFAULT 0 COMMENT '展现顺序',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of t_oa_permission
-- ----------------------------
INSERT INTO `t_oa_permission` VALUES (1, '系统管理', '系统管理', NULL, -1, 1, 0);
INSERT INTO `t_oa_permission` VALUES (2, '用户管理', '用户管理', 'admin/user/user_list.jsp', 1, 1, 0);
INSERT INTO `t_oa_permission` VALUES (3, '数据字典', '数据字典', 'admin/dict/dict_list.jsp', 1, 1, 0);
INSERT INTO `t_oa_permission` VALUES (4, '会议管理', '会议管理', NULL, -1, 1, 0);
INSERT INTO `t_oa_permission` VALUES (5, '发布会议', '发布会议', 'admin/meeting/meeting_add.jsp', 4, 1, 0);
INSERT INTO `t_oa_permission` VALUES (6, '我的会议', '我的会议', 'admin/meeting/myMeeting.jsp', 4, 1, 0);
INSERT INTO `t_oa_permission` VALUES (7, '我的审批', '我的审批', 'admin/meeting/myAudit.jsp', 4, 1, 0);
INSERT INTO `t_oa_permission` VALUES (8, '代开会议', '代开会议', 'admin/meeting/meeting_info_list.jsp', 4, 1, 0);
INSERT INTO `t_oa_permission` VALUES (10, '所有会议', '所有会议', 'admin/meeting/meeting_info_list.jsp', 4, 1, 0);
INSERT INTO `t_oa_permission` VALUES (11, '会议室管理', '会议室管理', 'admin/meeting/meeting_info_list.jsp', -1, 1, 0);
INSERT INTO `t_oa_permission` VALUES (12, '历史会议', '历史会议', '/bg/listOrder4.jsp', 4, 1, 0);

-- ----------------------------
-- Table structure for t_oa_role
-- ----------------------------
DROP TABLE IF EXISTS `t_oa_role`;
CREATE TABLE `t_oa_role`  (
  `id` int(11) NOT NULL,
  `name` varchar(25) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of t_oa_role
-- ----------------------------
INSERT INTO `t_oa_role` VALUES (1, '管理员');
INSERT INTO `t_oa_role` VALUES (2, '普通用户');

-- ----------------------------
-- Table structure for t_oa_role_permission
-- ----------------------------
DROP TABLE IF EXISTS `t_oa_role_permission`;
CREATE TABLE `t_oa_role_permission`  (
  `rid` bigint(20) NULL DEFAULT NULL,
  `pid` bigint(20) NULL DEFAULT NULL
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of t_oa_role_permission
-- ----------------------------
INSERT INTO `t_oa_role_permission` VALUES (1, 0);
INSERT INTO `t_oa_role_permission` VALUES (1, 1);
INSERT INTO `t_oa_role_permission` VALUES (1, 2);
INSERT INTO `t_oa_role_permission` VALUES (1, 3);
INSERT INTO `t_oa_role_permission` VALUES (1, 4);
INSERT INTO `t_oa_role_permission` VALUES (1, 5);
INSERT INTO `t_oa_role_permission` VALUES (1, 6);
INSERT INTO `t_oa_role_permission` VALUES (1, 7);
INSERT INTO `t_oa_role_permission` VALUES (1, 8);
INSERT INTO `t_oa_role_permission` VALUES (1, 9);
INSERT INTO `t_oa_role_permission` VALUES (2, 10);
INSERT INTO `t_oa_role_permission` VALUES (2, 11);
INSERT INTO `t_oa_role_permission` VALUES (2, 12);
INSERT INTO `t_oa_role_permission` VALUES (2, 13);
INSERT INTO `t_oa_role_permission` VALUES (1, 14);

-- ----------------------------
-- Table structure for t_oa_user
-- ----------------------------
DROP TABLE IF EXISTS `t_oa_user`;
CREATE TABLE `t_oa_user`  (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `name` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '用户名: 唯一键 登陆时使用 禁止修改',
  `pwd` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '用户密码:长度6~10位,MD5加密',
  `rid` bigint(20) NULL DEFAULT 2 COMMENT '用户角色:1 管理员 2 发起者 3 审批者 4 参与者 5 会议室管理员',
  `loginName` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '登录名',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 65 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of t_oa_user
-- ----------------------------
INSERT INTO `t_oa_user` VALUES (1, '唐某', '123', 1, 'admin');
INSERT INTO `t_oa_user` VALUES (2, '陈某', '123', 2, 'cheng');
INSERT INTO `t_oa_user` VALUES (3, '胡某', '123', 2, 'hu');
INSERT INTO `t_oa_user` VALUES (4, '王某', '123', 2, 'wang');
INSERT INTO `t_oa_user` VALUES (5, '潘某', '123', 2, 'pang');
INSERT INTO `t_oa_user` VALUES (6, '李某', '123', 2, '');
INSERT INTO `t_oa_user` VALUES (7, '易某', '123', 2, '');
INSERT INTO `t_oa_user` VALUES (8, '刘某', '123', 2, '');
INSERT INTO `t_oa_user` VALUES (9, '裴某', '123', 2, '');
INSERT INTO `t_oa_user` VALUES (10, '行政部经理王某', '123', 2, '');
INSERT INTO `t_oa_user` VALUES (11, '后勤部主管刘某', '123', 2, '');
INSERT INTO `t_oa_user` VALUES (12, '林科大内务校长文某', '123', 2, '');
INSERT INTO `t_oa_user` VALUES (13, '林科大教学部经理唐某', '123', 2, '');
INSERT INTO `t_oa_user` VALUES (14, '林科大教质部主管洪某', '123', 2, '');
INSERT INTO `t_oa_user` VALUES (15, '民族项目市场部经理李某', '123', 2, '');
INSERT INTO `t_oa_user` VALUES (16, '民族项目教质部经理熊樱', '123', 2, '');
INSERT INTO `t_oa_user` VALUES (17, '民族项目教学部经理李某', '123', 2, '');
INSERT INTO `t_oa_user` VALUES (18, '卓景京项目市场部经理夏某', '123', 2, '');
INSERT INTO `t_oa_user` VALUES (19, '卓景京项目内务校长赵某', '123', 2, '');
INSERT INTO `t_oa_user` VALUES (20, '卓景京项目教质部主管周某', '123', 2, '');
INSERT INTO `t_oa_user` VALUES (21, '电子科技校区市场部经理姚某', '123', 2, '');
INSERT INTO `t_oa_user` VALUES (22, '电子科技校区内务校长田某', '123', 2, '');
INSERT INTO `t_oa_user` VALUES (23, '张三', '123', 2, 'zhangsan');
INSERT INTO `t_oa_user` VALUES (24, '李四', '123', 2, 'lisi');
INSERT INTO `t_oa_user` VALUES (25, 'aa', '11', 1, 'aa');
INSERT INTO `t_oa_user` VALUES (26, 'aa', '11', 1, '11');
INSERT INTO `t_oa_user` VALUES (27, 'aa', '1', 1, 'bb');
INSERT INTO `t_oa_user` VALUES (28, 'cc', '1', 1, 'cc');
INSERT INTO `t_oa_user` VALUES (29, 'vv', '1', 1, 'vv');
INSERT INTO `t_oa_user` VALUES (30, 'dd', '1', 1, 'dd');
INSERT INTO `t_oa_user` VALUES (35, 'aa', '11', 1, 'aa');
INSERT INTO `t_oa_user` VALUES (36, 'bb', 'bb', 2, 'bb');
INSERT INTO `t_oa_user` VALUES (37, 'cc', 'cc', 2, 'cc');
INSERT INTO `t_oa_user` VALUES (38, 'dd', 'dd', 1, 'dd');
INSERT INTO `t_oa_user` VALUES (39, 'ee', 'ee', 2, 'ee');
INSERT INTO `t_oa_user` VALUES (40, 'vv', 'vv', 2, 'vv');
INSERT INTO `t_oa_user` VALUES (41, 'a1', '123', 2, 'lisi');
INSERT INTO `t_oa_user` VALUES (42, 'a1', '123', 2, 'lisi');
INSERT INTO `t_oa_user` VALUES (43, 'a1', '123', 2, 'lisi');
INSERT INTO `t_oa_user` VALUES (44, 'a1', '123', 2, 'lisi');
INSERT INTO `t_oa_user` VALUES (45, 'a1', '123', 2, 'lisi');
INSERT INTO `t_oa_user` VALUES (46, 'a1', '123', 2, 'lisi');
INSERT INTO `t_oa_user` VALUES (47, 'a1', '123', 2, 'lisi');
INSERT INTO `t_oa_user` VALUES (48, 'a1', '123', 2, 'lisi');
INSERT INTO `t_oa_user` VALUES (49, 'a1', '123', 2, 'lisi');
INSERT INTO `t_oa_user` VALUES (50, 'a1', '123', 2, 'lisi');
INSERT INTO `t_oa_user` VALUES (51, 'a1', '123', 2, 'lisi');
INSERT INTO `t_oa_user` VALUES (52, 'a1', '123', 2, 'lisi');
INSERT INTO `t_oa_user` VALUES (53, 'a1', '123', 2, 'lisi');
INSERT INTO `t_oa_user` VALUES (54, 'a1', '123', 2, 'lisi');
INSERT INTO `t_oa_user` VALUES (55, 'a1', '123', 2, 'lisi');
INSERT INTO `t_oa_user` VALUES (56, 'a1', '123', 2, 'lisi');
INSERT INTO `t_oa_user` VALUES (57, 'a1', '123', 2, 'lisi');
INSERT INTO `t_oa_user` VALUES (58, 'a1', '123', 2, 'lisi');
INSERT INTO `t_oa_user` VALUES (59, 'a1', '123', 2, 'lisi');
INSERT INTO `t_oa_user` VALUES (60, 'a1', '123', 2, 'lisi');
INSERT INTO `t_oa_user` VALUES (61, 'a1', '123', 2, 'lisi');
INSERT INTO `t_oa_user` VALUES (62, '文博', '123', NULL, 'wenbo');
INSERT INTO `t_oa_user` VALUES (63, 'cc', '123', NULL, 'cc');
INSERT INTO `t_oa_user` VALUES (64, 'vv', '123', 1, 'vv');

-- ----------------------------
-- Table structure for wx_user
-- ----------------------------
DROP TABLE IF EXISTS `wx_user`;
CREATE TABLE `wx_user`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `username` varchar(63) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '用户名称',
  `password` varchar(63) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '用户密码',
  `gender` tinyint(3) NOT NULL DEFAULT 0 COMMENT '性别:0 未知, 1男, 1 女',
  `birthday` date NULL DEFAULT NULL COMMENT '生日',
  `last_login_time` datetime(0) NULL DEFAULT NULL COMMENT '最近一次登录时间',
  `last_login_ip` varchar(63) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '最近一次登录IP地址',
  `user_level` tinyint(3) NULL DEFAULT 0 COMMENT '用户层级 0 普通用户,1 VIP用户,2 区域代理用户',
  `nickname` varchar(63) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '用户昵称或网络名称',
  `mobile` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '用户手机号码',
  `avatar` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '用户头像图片',
  `weixin_openid` varchar(63) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '微信登录openid',
  `status` tinyint(3) NOT NULL DEFAULT 0 COMMENT '0 可用, 1 禁用, 2 注销',
  `add_time` datetime(0) NULL DEFAULT NULL COMMENT '创建时间',
  `update_time` datetime(0) NULL DEFAULT NULL COMMENT '更新时间',
  `deleted` tinyint(1) NULL DEFAULT 0 COMMENT '逻辑删除',
  `share_user_id` int(11) NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `user_name`(`username`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 3 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '用户表' ROW_FORMAT = Compact;

-- ----------------------------
-- Records of wx_user
-- ----------------------------
INSERT INTO `wx_user` VALUES (1, 'of_zY6RGwMfbacRbEngFD4dZMoJ4', 'of_zY6RGwMfbacRbEngFD4dZMoJ4', 0, NULL, '2022-09-02 11:29:55', '0:0:0:0:0:0:0:1', 1, 'donkee', '18008497070', 'https://thirdwx.qlogo.cn/mmopen/vi_32/DYAIOgq83eoQicXQBHibRUP4Ix1x5U1FZOcKgYbRrl8UiaaOMTA5J6Lmr0An4ffnAYrqOIPhz6945wNsExOnianAdg/132', 'of_zY6RGwMfbacRbEngFD4dZMoJ4', 0, NULL, NULL, 0, 1);
INSERT INTO `wx_user` VALUES (2, 'of_zY6UTYaWS7tTOfo9XJ9VyiOcc', 'of_zY6UTYaWS7tTOfo9XJ9VyiOcc', 0, NULL, '2022-08-30 21:28:37', '0:0:0:0:0:0:0:1', 2, '测试号🐷', '12066600001', 'https://thirdwx.qlogo.cn/mmopen/vi_32/Q0j4TwGTfTJhF2keTvcWiaRPXYTrIkpxYhdRQaLLnQp6AJJUFcCDYNLXe3iaywwJbGIeOrD3LKZE7x6zdOl6Lchg/132', 'of_zY6UTYaWS7tTOfo9XJ9VyiOcc', 0, NULL, NULL, 0, 1);

SET FOREIGN_KEY_CHECKS = 1;

 数据导入完毕如下图所示:

 2.后台准备

打开IDEA,创建一个stringboot项目

  •  springboot+mybatis

项目创建好了之后,开始导入pom依赖

① pom.xml

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>2.7.7</version>
        <relativePath/> <!-- lookup parent from repository -->
    </parent>
    <groupId>com.jwj</groupId>
    <artifactId>minoa</artifactId>
    <version>0.0.1-SNAPSHOT</version>
    <name>minoa</name>
    <description>Demo project for Spring Boot</description>
    <properties>
        <java.version>1.8</java.version>
        <fastjson.version>1.2.70</fastjson.version>
        <jackson.version>2.9.8</jackson.version>
    </properties>
    <dependencies>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-jdbc</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
        </dependency>

        <dependency>
            <groupId>org.mybatis.spring.boot</groupId>
            <artifactId>mybatis-spring-boot-starter</artifactId>
            <version>2.2.1</version>
        </dependency>

        <dependency>
            <groupId>mysql</groupId>
            <artifactId>mysql-connector-java</artifactId>
            <version>5.1.44</version>
            <scope>runtime</scope>
        </dependency>
        <dependency>
            <groupId>org.projectlombok</groupId>
            <artifactId>lombok</artifactId>
            <optional>true</optional>
        </dependency>

        <dependency>
            <groupId>com.alibaba</groupId>
            <artifactId>fastjson</artifactId>
            <version>${fastjson.version}</version>
        </dependency>

    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
                <configuration>
                    <excludes>
                        <exclude>
                            <groupId>org.projectlombok</groupId>
                            <artifactId>lombok</artifactId>
                        </exclude>
                    </excludes>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.mybatis.generator</groupId>
                <artifactId>mybatis-generator-maven-plugin</artifactId>
                <version>1.3.2</version>
                <dependencies>
                    <dependency>
                        <groupId>mysql</groupId>
                        <artifactId>mysql-connector-java</artifactId>
                        <version>${mysql.version}</version>
                    </dependency>
                </dependencies>
                <configuration>
                    <overwrite>true</overwrite>
                </configuration>
            </plugin>
        </plugins>
    </build>

</project>

 ② 配置数据源

appliation.yml

spring:
  datasource:
    #type连接池类型 DBCP,C3P0,Hikari,Druid,默认为Hikari
    type: com.zaxxer.hikari.HikariDataSource
    driver-class-name: com.mysql.jdbc.Driver
    url: jdbc:mysql://localhost:3306/oapro?useUnicode=true&characterEncoding=UTF-8&useSSL=false
    username: root
    password: 123456

③ 整合mybatis 

 application.yml

mybatis:
  mapper-locations: classpath*:mapper/*.xml #指定mapper文件位置
  type-aliases-package: com.jwj.minoa.model #指定自动生成别名所在包

在启动类添加

package com.jwj.minoa;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

@MapperScan("com.jwj.minoa.mapper")//指mapper接口所在包
@SpringBootApplication
public class MinoaApplication {

    public static void main(String[] args) {
        SpringApplication.run(MinoaApplication.class, args);
    }

}

 ④ 代码生成

jdbc.properties

jdbc.driver=com.mysql.jdbc.Driver
jdbc.url=jdbc:mysql://localhost:3306/oapro?useUnicode=true&characterEncoding=UTF-8
jdbc.username=root
jdbc.password=123456
jdbc.initialSize=10
jdbc.maxTotal=100
jdbc.maxIdle=50
jdbc.minIdle=10
jdbc.maxWaitMillis=-1

generatorConfig.xml 

<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE generatorConfiguration PUBLIC "-//mybatis.org//DTD MyBatis Generator Configuration 1.0//EN"
        "http://mybatis.org/dtd/mybatis-generator-config_1_0.dtd" >
<generatorConfiguration>
    <!-- 引入配置文件 -->
    <properties resource="jdbc.properties"/>

    <!--指定数据库jdbc驱动jar包的位置-->
    <classPathEntry location="F:\Courseware\SoftwareInstallPath\maven\apache-maven-3.5.0-bin\apache-maven-3.5.0-bin\mvn_repository\mysql\mysql-connector-java\5.1.44\mysql-connector-java-5.1.44.jar"/>

    <!-- 一个数据库一个context -->
    <context id="infoGuardian">
        <!-- 注释 -->
        <commentGenerator>
            <property name="suppressAllComments" value="true"/><!-- 是否取消注释 -->
            <property name="suppressDate" value="true"/> <!-- 是否生成注释代时间戳 -->
        </commentGenerator>

        <!-- jdbc连接 -->
        <jdbcConnection driverClass="${jdbc.driver}"
                        connectionURL="${jdbc.url}" userId="${jdbc.username}" password="${jdbc.password}"/>

        <!-- 类型转换 -->
        <javaTypeResolver>
            <!-- 是否使用bigDecimal, false可自动转化以下类型(Long, Integer, Short, etc.) -->
            <property name="forceBigDecimals" value="false"/>
        </javaTypeResolver>

        <!-- 01 指定javaBean生成的位置 -->
        <!-- targetPackage:指定生成的model生成所在的包名 -->
        <!-- targetProject:指定在该项目下所在的路径  -->
        <javaModelGenerator targetPackage="com.zking.minoa.model"
                            targetProject="src/main/java">
            <!-- 是否允许子包,即targetPackage.schemaName.tableName -->
            <property name="enableSubPackages" value="false"/>
            <!-- 是否对model添加构造函数 -->
            <property name="constructorBased" value="true"/>
            <!-- 是否针对string类型的字段在set的时候进行trim调用 -->
            <property name="trimStrings" value="false"/>
            <!-- 建立的Model对象是否 不可改变  即生成的Model对象不会有 setter方法,只有构造方法 -->
            <property name="immutable" value="false"/>
        </javaModelGenerator>

        <!-- 02 指定sql映射文件生成的位置 om.zking.minoa.-->
        <sqlMapGenerator targetPackage="mapper"
                         targetProject="src/main/resources">
            <!-- 是否允许子包,即targetPackage.schemaName.tableName -->
            <property name="enableSubPackages" value="false"/>
        </sqlMapGenerator>

        <!-- 03 生成XxxMapper接口 -->
        <!-- type="ANNOTATEDMAPPER",生成Java Model 和基于注解的Mapper对象 -->
        <!-- type="MIXEDMAPPER",生成基于注解的Java Model 和相应的Mapper对象 -->
        <!-- type="XMLMAPPER",生成SQLMap XML文件和独立的Mapper接口 -->
        <javaClientGenerator targetPackage="com.zking.minoa.mapper"
                             targetProject="src/main/java" type="XMLMAPPER">
            <!-- 是否在当前路径下新加一层schema,false路径com.oop.eksp.user.model, true:com.oop.eksp.user.model.[schemaName] -->
            <property name="enableSubPackages" value="false"/>
        </javaClientGenerator>

        <!-- 配置表信息 -->
        <!-- schema即为数据库名 -->
        <!-- tableName为对应的数据库表 -->
        <!-- domainObjectName是要生成的实体类 -->
        <!-- enable*ByExample是否生成 example类 -->
        <!--<table schema="" tableName="t_book" domainObjectName="Book"
               enableCountByExample="false" enableDeleteByExample="false"
               enableSelectByExample="false" enableUpdateByExample="false">
            &lt;!&ndash; 忽略列,不生成bean 字段 &ndash;&gt;
            &lt;!&ndash; <ignoreColumn column="FRED" /> &ndash;&gt;
            &lt;!&ndash; 指定列的java数据类型 &ndash;&gt;
            &lt;!&ndash; <columnOverride column="LONG_VARCHAR_FIELD" jdbcType="VARCHAR" /> &ndash;&gt;
        </table>-->
        <table schema="" tableName="t_oa_data_dict" domainObjectName="Dict"
               enableCountByExample="false" enableDeleteByExample="false"
               enableSelectByExample="false" enableUpdateByExample="false">
        </table>

        <table schema="" tableName="t_oa_data_item" domainObjectName="Item"
               enableCountByExample="false" enableDeleteByExample="false"
               enableSelectByExample="false" enableUpdateByExample="false">
        </table>

        <table schema="" tableName="t_oa_meeting_feedback" domainObjectName="Feedback"
               enableCountByExample="false" enableDeleteByExample="false"
               enableSelectByExample="false" enableUpdateByExample="false">
        </table>

        <table schema="" tableName="t_oa_meeting_info" domainObjectName="Info"
               enableCountByExample="false" enableDeleteByExample="false"
               enableSelectByExample="false" enableUpdateByExample="false">
        </table>

        <table schema="" tableName="t_oa_meeting_option" domainObjectName="Option"
               enableCountByExample="false" enableDeleteByExample="false"
               enableSelectByExample="false" enableUpdateByExample="false">
        </table>

        <table schema="" tableName="t_oa_meeting_room" domainObjectName="Room"
               enableCountByExample="false" enableDeleteByExample="false"
               enableSelectByExample="false" enableUpdateByExample="false">
        </table>

        <table schema="" tableName="t_oa_meeting_vote" domainObjectName="Vote"
               enableCountByExample="false" enableDeleteByExample="false"
               enableSelectByExample="false" enableUpdateByExample="false">
        </table>

        <table schema="" tableName="t_oa_permission" domainObjectName="Permission"
               enableCountByExample="false" enableDeleteByExample="false"
               enableSelectByExample="false" enableUpdateByExample="false">
        </table>

        <table schema="" tableName="t_oa_role" domainObjectName="Role"
               enableCountByExample="false" enableDeleteByExample="false"
               enableSelectByExample="false" enableUpdateByExample="false">
        </table>

        <table schema="" tableName="t_oa_role_permission" domainObjectName="RolePermission"
               enableCountByExample="false" enableDeleteByExample="false"
               enableSelectByExample="false" enableUpdateByExample="false">
        </table>

        <table schema="" tableName="t_oa_user" domainObjectName="User"
               enableCountByExample="false" enableDeleteByExample="false"
               enableSelectByExample="false" enableUpdateByExample="false">
        </table>
    </context>
</generatorConfiguration>

 ⑤ mybatis-generator

生成mapper接口,model实体类,mapper映射文件

因为需要跨域,所以添加了一些工具类

启动类 

我们的后台就搭建好了。

二、准备前端的首页的数据 

1、Promise

Promise 是异步编程的一种解决方案,比传统的解决方案——回调函数和事件——更合理和更强大。它由社区最早提出和实现,ES6 将其写进了语言标准,统一了用法,原生提供了Promise对象。

所谓Promise,简单说就是一个容器,里面保存着某个未来才会结束的事件(通常是一个异步操作)的结果。从语法上说,Promise 是一个对象,从它可以获取异步操作的消息。Promise 提供统一的 API,各种异步操作都可以用同样的方法进行处理。

  • promise运行中有三个状态:

    • pending: 等待 (进行中) promise一创建出来,就是pending进行中

    • fulfilled: 成功 (已完成), 调用 resolve, 就会将状态从pending改成fulfilled, 且将来就会执行.then

    • rejected: 失败 (拒绝), 调用 reject, 就会将状态从pending改成rejected, 且将来就会执行.catch

  • 注意点:

    • 一旦promise的状态发生变化, 状态就会被凝固

    • 如果再调用reject或resolve,进行状态修改就没有意义了

修改API地址

// 以下是业务服务器API地址
 // 本机开发API地址
 var WxApiRoot = 'http://localhost:8080/wx/';
 // 测试环境部署api地址
 // var WxApiRoot = 'http://192.168.0.101:8070/demo/wx/';
 // 线上平台api地址
 //var WxApiRoot = 'https://www.oa-mini.com/demo/wx/';
 
 module.exports = {
   IndexUrl: WxApiRoot + 'home/index', //首页数据接口
   SwiperImgs: WxApiRoot+'swiperImgs', //轮播图
   MettingInfos: WxApiRoot+'meeting/list', //会议信息
 };

 把假数据删掉

 2.封装request

在/utils/util.js中

const formatTime = date => {
  const year = date.getFullYear()
  const month = date.getMonth() + 1
  const day = date.getDate()
  const hour = date.getHours()
  const minute = date.getMinutes()
  const second = date.getSeconds()

  return `${[year, month, day].map(formatNumber).join('/')} ${[hour, minute, second].map(formatNumber).join(':')}`
}
/**
 * 封装微信的request请求
 * $.post(url)
 * $.ajaxi({
 *  url:
 * success:
 * })
 */
function request(url, data = {}, method = "GET") {
  return new Promise(function (resolve, reject) {
    wx.request({
      url: url,
      data: data,
      method: method,
      header: {
        'Content-Type': 'application/json',
      },
      success: function (res) {
        if (res.statusCode == 200) {
            resolve(res.data);//会把进行中改变成已成功
        } else {
          reject(res.errMsg);//会把进行中改变成已失败
        }
      },
      fail: function (err) {
        reject(err)
      }
    })
  });
}

const formatNumber = n => {
  n = n.toString()
  return n[1] ? n : `0${n}`
}

module.exports = {
  formatTime,request
}

3.会议展示

  • index/index.js
//引入
const utli = require("../../utils/util")
 /**
   * 生命周期函数--监听页面加载
   */
  onLoad(options) {
    this.loadSwiperImgs();
    this.loadMeetingInfos();
  },
loadMeetingInfos(){
    utli.request(api.IndexUrl).then(res=>{
      this.setData({
        lists:res.data.infoList
      })
    }).catch(res=>{
        console.log('服器没有开启,使用模拟数据!')
    })
  }

把Mock关闭掉,继续把验证关闭掉,如下图所示:

三、通过wxs将首页动态数据优化

WXS 模块 | 微信开放文档微信开发者平台文档https://developers.weixin.qq.com/miniprogram/dev/reference/wxs/01wxs-module.html

 在utils中新建一个文件page.wxs

  • 新增/utils/page.wxs
function getState(state){
  // 状态:0取消会议1待审核2驳回3待开4进行中5开启投票6结束会议,默认值为1
  if(state == 0){
    return '取消会议';
  }else if(state == 1){
    return '待审核';
  }else if(state == 2){
    return '驳回';
  }else if(state ==3){
    return '待开';
  }else if(state == 4){
    return '进行中';
  }else if(state == 5){
    return '开启投票';
  }else if(state == 6){
    return '结束会议';
  }
  return '其它';
}
function getNumber(s){
  s += ""
  var arr = s.split(",");
  return arr.length;
}

function formatDate(ts, option) {
  var date = getDate(ts)
  var year = date.getFullYear()
  var month = date.getMonth() + 1
  var day = date.getDate()
  var week = date.getDay()
  var hour = date.getHours()
  var minute = date.getMinutes()
  var second = date.getSeconds()
  
  //获取 年月日
  if (option == 'YY-MM-DD') return [year, month, day].map(formatNumber).join('-')

  //获取 年月
  if (option == 'YY-MM') return [year, month].map(formatNumber).join('-')

  //获取 年
  if (option == 'YY') return [year].map(formatNumber).toString()

  //获取 月
  if (option == 'MM') return  [mont].map(formatNumber).toString()

  //获取 日
  if (option == 'DD') return [day].map(formatNumber).toString()

  //获取 年月日 周一 至 周日
  if (option == 'YY-MM-DD Week')  return [year, month, day].map(formatNumber).join('-') + ' ' + getWeek(week)

  //获取 月日 周一 至 周日
  if (option == 'MM-DD Week')  return [month, day].map(formatNumber).join('-') + ' ' + getWeek(week)

  //获取 周一 至 周日
  if (option == 'Week')  return getWeek(week)

  //获取 时分秒
  if (option == 'hh-mm-ss') return [hour, minute, second].map(formatNumber).join(':')

  //获取 时分
  if (option == 'hh-mm') return [hour, minute].map(formatNumber).join(':')

  //获取 分秒
  if (option == 'mm-dd') return [minute, second].map(formatNumber).join(':')

  //获取 时
  if (option == 'hh')  return [hour].map(formatNumber).toString()

  //获取 分
  if (option == 'mm')  return [minute].map(formatNumber).toString()

  //获取 秒
  if (option == 'ss') return [second].map(formatNumber).toString()

  //默认 时分秒 年月日
  return [year, month, day].map(formatNumber).join('-') + ' ' + [hour, minute, second].map(formatNumber).join(':')
}
function formatNumber(n) {
  n = n.toString()
  return n[1] ? n : '0' + n
}

function getWeek(n) {
  switch(n) {
      case 1:
      return '星期一'
      case 2:
      return '星期二'
      case 3:
      return '星期三'
      case 4:
      return '星期四'
      case 5:
      return '星期五'
      case 6:
      return '星期六'
      case 7:
      return '星期日'
  }
}

/**
 * 方法导出
 */
module.exports = {
  getState: getState,
  getNumber: getNumber,
  formatDate: formatDate
};
  •  修改/index/index.wxml
<!--pages/index/index.wxml-->
<!-- <text>pages/index/index.wxml</text> -->
<wxs src="/utils/page.wxs" module="tools" />
<view>
    <swiper autoplay="true" indicator-dots="true" indicator-color="#fff" indicator-active-color="#00f">
        <block wx:for="{{imgSrcs}}" wx:key="text">
            <swiper-item>
                <view>
                    <image src="{{item.img}}" class="swiper-item" />
                </view>
            </swiper-item>
        </block>
    </swiper>
</view>
<view class="mobi-title">
    <text class="mobi-icon"></text>
    <text>会议信息</text>
</view>
<block wx:for-items="{{lists}}" wx:for-item="item" wx:key="item.id">
    <view class="list" data-id="{{item.id}}">
        <view class="list-img">
            <image class="video-img" mode="scaleToFill" src="{{item.image !=null ?item.image : '/static/persons/1.jpg'}}"></image>
        </view>
        <view class="list-detail">
            <view class="list-title"><text>{{item.title}}</text></view>
            <view class="list-tag">
                <view class="state">{{tools.getState(item.state)}}</view>
                <view class="join"><text class="list-num">{{tools.getNumber(item.canyuze)}}</text>人报名</view>
            </view>
            <view class="list-info"><text>{{item.location}}</text>|<text>{{tools.formatDate(item.starttime)}}</text></view>
        </view>
    </view>
</block>
<view class="section bottom-line">
		<text>到底啦</text>
</view>

效果如下图所示:

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.coloradmin.cn/o/137215.html

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

Git命令版(powernode)

Git命令版&#xff08;powernode&#xff09; 目录Git命令版&#xff08;powernode&#xff09;1.添加文件相关命令案例实操小结&#xff1a;2.工作区和暂存区2.1 名词解释。2.1.1 工作区&#xff08;Working Directory&#xff09;2.1.2 版本库&#xff08;Repository&#xf…

数据结构之双向链表

双向链表与单向链表较为类似&#xff0c;单向链表有一个指针域&#xff0c;用来指向后继结点&#xff0c;而双向链表有两个指针域&#xff0c;分别用来指向前驱结点和后继结点。玩双向链表时一定要从单向链表的思维中跳出来&#xff0c;否则在操作双向链表时就会出现各种问题。…

【Python百日进阶-数据分析】Day144 - plotly箱线图:go.box()实例

文章目录4.2 go.Box 箱线图4.2.1 基本箱线图4.2.2 基本水平箱线图4.2.3 显示基础数据的箱线图4.2.4 修改计算四分位数的算法4.2.5 带有预先计算的四分位数的箱线图4.2.6 彩色箱线图4.2.7 箱线图样式均值和标准差4.2.8 造型异常值4.2.9 分组箱线图4.2.10 分组水平箱线图4.2.11 彩…

一起学习用Verilog在FPGA上实现CNN----(四)池化层设计

1 池化层设计 自顶而下分析池化层的设计过程 1.1 Average Pool Multi Layer 图为该项目的平均池化层&#xff0c;其包含一个AvgPoolSingle单元&#xff0c;模块的输入为图像特征矩阵&#xff0c;输出为池化后的特征矩阵 图片来自附带的技术文档《Hardware Documentation》 …

Java开发学习(三十六)----SpringBoot三种配置文件解析

一、 配置文件格式 我们现在启动服务器默认的端口号是 8080&#xff0c;访问路径可以书写为 http://localhost:8080/books/1 在线上环境我们还是希望将端口号改为 80&#xff0c;这样在访问的时候就可以不写端口号了&#xff0c;如下 http://localhost/books/1 而 SpringB…

电脑屏录软件,这3款良心软件,分享给你

现在很多人会使用电脑屏录软件&#xff0c;有些用来记录游戏中的精彩操作&#xff0c;有些用来记录在线教学课程&#xff0c;有些用来记录在线视频会议。现在有各种各样的电脑屏录软件。选择一个好的电脑屏录软件是非常重要的。电脑屏录软件哪个好&#xff1f;下面小编分享3款良…

前端基础(四)_数据类型的强制转换

数据类型的强制转换就是通过js提供的函数进行数据转换。常见的就是将其他类型的数据转换成number类型和string类型。 一、其他类型转 number 类型 1.Number Number 方法将其他类型的数据转换为Number类型&#xff0c;返回一个新的数值&#xff0c;不会改变变量本身。 例1&…

【Linux】Linux编辑器-vim的使用以及指令集

推荐先将vim配置好后再使用会方便一些&#xff0c;就是将Linux下vim打造成C IDE的样子。自动配置vim vim1.vim的基本概念2.vim的基本操作2.1进入vim编辑界面2.2 如何在vim编辑代码2.3 退出vim并保存代码2.4一张图总结基本操作3.vim正常模式命令集3.1 进入插入模式和退出插入模式…

自己电脑中安装黑群辉NAS

前期准备&#xff1a;一个品牌U盘(制作后就是启动盘需一直插电脑上)、一台安装群辉的电脑&#xff08;可以没有硬盘&#xff09;、一台可正常开机的电脑 资源下载&#xff1a; 百度网盘链接&#xff1a;链接: https://pan.baidu.com/s/1t_yVON16Pt8H1ytpvf0J-A?pwdxe7m 提取…

Little Snitch 5 - Mac 老牌防火墙安全工具软件小飞贼,监控和组织特定软件的网络连接

Little Snitch 5 - Mac 老牌防火墙安全工具软件小飞贼&#xff0c;监控和组织特定软件的网络连接 一旦连接到Internet&#xff0c;应用程序就可以随时随地发送它们想要的任何东西。通常情况下&#xff0c;他们是为你做的。但有时&#xff0c;例如在跟踪软件、木马或其他恶意软件…

ICLR2022 | ViT-VQGAN+:Vector-quantized Image Modeling with Improved VQGAN

论文链接&#xff1a;https://openreview.net/forum?idpfNyExj7z2 | https://arxiv.53yu.com/abs/2110.04627原文标题&#xff1a;Vector-quantized Image Modeling with Improved VQGAN一、问题提出Natural language processing (NLP) has recently experienced dramatic imp…

程序结构你都懂了吗

上一篇&#xff1a;Python中基本输入和输出 昨天有粉丝问我&#xff0c;在看别人代码时总感觉脑子很混乱&#xff0c;不知道代码到哪步是停止&#xff0c;哪步又是开始&#xff0c;这是怎么回事呢&#xff1f; 其实很简单&#xff0c;因为还没有明白程序的基本执行流程&#x…

空间滤波基础

空间滤波是一种图像处理技术&#xff0c;它通过对每个像素周围的像素进行加权平均来平滑图像。这个过程的基本思想是&#xff0c;将每个像素的灰度值与它周围像素的灰度值进行加权平均&#xff0c;然后用平均值来替换原来的像素值。空间滤波器的大小和形状决定了每个像素的加权…

如何用 Redis 统计用户访问量?

本文已经收录到Github仓库&#xff0c;该仓库包含计算机基础、Java基础、多线程、JVM、数据库、Redis、Spring、Mybatis、SpringMVC、SpringBoot、分布式、微服务、设计模式、架构等核心知识点&#xff0c;欢迎star~ Github地址&#xff1a;https://github.com/Tyson0314/Java-…

DCN v1 可变形卷积v1解析(修正篇)

在两年前的这篇文章Deformable Convolution&#xff08;可变形卷积&#xff09;代码解析&#xff08;有错误&#xff0c;修改中&#xff09;中&#xff0c;当时对可变形卷积进行了代码解读&#xff0c;后来被网友指出其中的解释是错的&#xff0c;里面引用的keras版本的代码实现…

002、捕鱼和分鱼问题

002、【题目】捕鱼和分鱼问题 捕鱼和分鱼&#xff1a;A、B、C、D、E 五个人在某天夜里合伙去捕鱼&#xff0c; 到第二天凌晨时都疲惫不堪&#xff0c;于是各自找地方睡觉。 日上三杆&#xff0c;A第一个醒来&#xff0c;他将鱼分为五份&#xff0c;把多余的一条鱼 扔掉&…

C语言-数据的存储-整形的存储(8.1)

目录 思维导图&#xff1a; 1.数据类型的基本归类 1.1类型的意义 1.2整形家族 1.3浮点数家族 1.4构造类型 1.5指针类型 1.6空类型 2. 整形在内存中的存储 2.1 原码、反码、补码 2.2 大小端介绍 2.3 练习、巩固、提高 写在最后&#xff1a; 思维导图&#xff1a; 1…

视觉slam中的相机类型

作者&#xff1a;朱金灿 来源&#xff1a;clever101的专栏 为什么大多数人学不会人工智能编程&#xff1f;>>> 顾名思义&#xff0c;视觉 SLAM&#xff08;又称 vSLAM&#xff09;使用从相机和其他图像传感器采集的图像。视觉 SLAM 可以使用普通相机&#xff08;广角…

【UnLua】深入理解 UnLua

【UnLua】深入理解 UnLua 从 UnLua 框架层面讨论真正值得关注的关键点 UnLua 架构UnLua 内存管理UnLua 性能 大纲 UnLua 静态导出UnLua 架构UnLua 内存管理UnLua 性能 静态导出 静态导出&#xff0c;这是标准的 Lua 用法&#xff0c;已经非常完善了&#xff0c;就一种标准…

qemu virtio设备模拟与初始化流程

文章目录VirtIO设备模拟及初始化流程Virtio设备的创建参数解析virtio 设备初始化流程pci_bus_matchpci_match_devicepci_device_probevirtio_pci_proberegister_virtio_devicevirtio_dev_matchvirtio_dev_probe参考VirtIO设备模拟及初始化流程 qemu设备虚拟机化的路线可以概括…