├── README.md
├── backend
└── marriage-demo
│ ├── pom.xml
│ └── src
│ ├── .DS_Store
│ ├── main
│ ├── .DS_Store
│ ├── java
│ │ ├── .DS_Store
│ │ └── com
│ │ │ ├── .DS_Store
│ │ │ └── jiuyu
│ │ │ ├── .DS_Store
│ │ │ ├── Application.java
│ │ │ ├── aop
│ │ │ └── LogAspect.java
│ │ │ ├── bo
│ │ │ └── LogAddressBO.java
│ │ │ ├── common
│ │ │ ├── BaseEntity.java
│ │ │ ├── Constant.java
│ │ │ ├── GlobalConstant.java
│ │ │ ├── Query.java
│ │ │ ├── R.java
│ │ │ ├── RegexConstant.java
│ │ │ ├── SQLFilter.java
│ │ │ └── exception
│ │ │ │ └── RRException.java
│ │ │ ├── config
│ │ │ ├── ContractConfig.java
│ │ │ ├── SdkBeanConfig.java
│ │ │ └── SystemConfig.java
│ │ │ ├── controller
│ │ │ ├── DemoController.java
│ │ │ ├── IndexController.java
│ │ │ ├── LoginController.java
│ │ │ ├── MarriageEvidenceController.java
│ │ │ └── UserController.java
│ │ │ ├── dao
│ │ │ ├── AdminUserDao.java
│ │ │ ├── ContractTemplateDao.java
│ │ │ ├── MarriageEvidenceDao.java
│ │ │ ├── MarriageInfoDao.java
│ │ │ └── UserInfoDao.java
│ │ │ ├── entity
│ │ │ ├── AdminUserEntity.java
│ │ │ ├── ContractTemplateEntity.java
│ │ │ ├── MarriageEvidenceEntity.java
│ │ │ ├── MarriageInfoEntity.java
│ │ │ └── UserInfoEntity.java
│ │ │ ├── enums
│ │ │ ├── CertStatusEnum.java
│ │ │ ├── MarriageStatusEnum.java
│ │ │ └── RespEnum.java
│ │ │ ├── raw
│ │ │ └── MarriageEvidence.java
│ │ │ ├── service
│ │ │ ├── AdminUserService.java
│ │ │ ├── ContractTemplateService.java
│ │ │ ├── MarriageEvidenceService.java
│ │ │ ├── MarriageInfoService.java
│ │ │ ├── UserInfoService.java
│ │ │ └── impl
│ │ │ │ ├── AdminUserServiceImpl.java
│ │ │ │ ├── ContractTemplateServiceImpl.java
│ │ │ │ ├── MarriageEvidenceServiceImpl.java
│ │ │ │ ├── MarriageInfoServiceImpl.java
│ │ │ │ └── UserInfoServiceImpl.java
│ │ │ ├── utils
│ │ │ ├── CommonUtils.java
│ │ │ ├── DateUtils.java
│ │ │ ├── HttpUtils.java
│ │ │ └── PageUtils.java
│ │ │ └── vo
│ │ │ ├── ReqAddUser.java
│ │ │ ├── ReqCreateMarriageEvidenceVo.java
│ │ │ ├── ReqLoginVo.java
│ │ │ ├── ReqNull.java
│ │ │ ├── ReqSignVo.java
│ │ │ ├── ResAddUser.java
│ │ │ ├── ResCreateMarriageEvidenceVo.java
│ │ │ ├── ResIndexVo.java
│ │ │ ├── ResLoginVo.java
│ │ │ ├── ResMarriageDeatailVo.java
│ │ │ └── ResSignVo.java
│ └── resources
│ │ ├── abi
│ │ └── MarriageEvidence.abi
│ │ ├── application.properties
│ │ ├── bin.ecc
│ │ └── MarriageEvidence.bin
│ │ ├── conf
│ │ ├── ca.crt
│ │ ├── sdk.crt
│ │ └── sdk.key
│ │ ├── contracts
│ │ └── MarriageEvidence.sol
│ │ ├── logback-boot.xml
│ │ ├── mapper
│ │ ├── AdminUserDao.xml
│ │ ├── ContractTemplateDao.xml
│ │ ├── MarriageEvidenceDao.xml
│ │ ├── MarriageInfoDao.xml
│ │ └── UserInfoDao.xml
│ │ └── sql
│ │ └── marriage_demo.sql
│ └── test
│ └── java
│ └── com
│ └── jiuyu
│ └── test
│ └── TestMain.java
└── frontend
└── marriage
├── .env.development
├── .env.production
├── .env.staging
├── .eslintignore
├── .eslintrc.js
├── .gitignore
├── .idea
├── .gitignore
├── inspectionProfiles
│ └── Project_Default.xml
├── marriage.iml
├── modules.xml
└── vcs.xml
├── babel.config.js
├── build
└── index.js
├── element-variables.scss
├── jest.config.js
├── jsconfig.json
├── package-lock.json
├── package.json
├── postcss.config.js
├── public
├── favicon.ico
└── index.html
├── src
├── App.vue
├── api
│ ├── table.js
│ └── user.js
├── assets
│ ├── 404_images
│ │ ├── 404.png
│ │ └── 404_cloud.png
│ ├── avatar-sh.png
│ └── images
│ │ ├── background-328.jpg
│ │ ├── banner-index.png
│ │ ├── banner-index1.jpg
│ │ ├── certificate-bg.png
│ │ ├── logbj.png
│ │ └── regist-bg.jpg
├── components
│ ├── Breadcrumb
│ │ └── index.vue
│ ├── Hamburger
│ │ └── index.vue
│ └── SvgIcon
│ │ └── index.vue
├── icons
│ ├── index.js
│ ├── svg
│ │ ├── dashboard.svg
│ │ ├── example.svg
│ │ ├── eye-open.svg
│ │ ├── eye.svg
│ │ ├── form.svg
│ │ ├── link.svg
│ │ ├── nested.svg
│ │ ├── password.svg
│ │ ├── table.svg
│ │ ├── tree.svg
│ │ └── user.svg
│ └── svgo.yml
├── layout
│ ├── components
│ │ ├── AppMain.vue
│ │ ├── Navbar.vue
│ │ ├── Sidebar
│ │ │ ├── FixiOSBug.js
│ │ │ ├── Item.vue
│ │ │ ├── Link.vue
│ │ │ ├── Logo.vue
│ │ │ ├── SidebarItem.vue
│ │ │ └── index.vue
│ │ └── index.js
│ ├── index.vue
│ └── mixin
│ │ └── ResizeHandler.js
├── main.js
├── permission.js
├── router
│ └── index.js
├── settings.js
├── store
│ ├── getters.js
│ ├── index.js
│ └── modules
│ │ ├── app.js
│ │ ├── settings.js
│ │ └── user.js
├── styles
│ ├── element-ui.scss
│ ├── index.scss
│ ├── mixin.scss
│ ├── sidebar.scss
│ ├── transition.scss
│ └── variables.scss
├── utils
│ ├── auth.js
│ ├── get-page-title.js
│ ├── index.js
│ ├── request.js
│ └── validate.js
└── views
│ ├── 404.vue
│ ├── create-cer
│ └── index.vue
│ ├── create
│ └── index.vue
│ ├── dashboard
│ └── index.vue
│ ├── index
│ └── index.vue
│ ├── join
│ └── index.vue
│ ├── login
│ └── index.vue
│ └── sign
│ └── index.vue
├── theme
├── alert.css
├── aside.css
├── autocomplete.css
├── avatar.css
├── backtop.css
├── badge.css
├── base.css
├── breadcrumb-item.css
├── breadcrumb.css
├── button-group.css
├── button.css
├── calendar.css
├── card.css
├── carousel-item.css
├── carousel.css
├── cascader-panel.css
├── cascader.css
├── checkbox-button.css
├── checkbox-group.css
├── checkbox.css
├── col.css
├── collapse-item.css
├── collapse.css
├── color-picker.css
├── container.css
├── date-picker.css
├── descriptions-item.css
├── descriptions.css
├── dialog.css
├── display.css
├── divider.css
├── drawer.css
├── dropdown-item.css
├── dropdown-menu.css
├── dropdown.css
├── element-variables.css
├── empty.css
├── fonts
│ ├── element-icons.ttf
│ └── element-icons.woff
├── footer.css
├── form-item.css
├── form.css
├── header.css
├── icon.css
├── image.css
├── index.css
├── infinite-scroll.css
├── infiniteScroll.css
├── input-number.css
├── input.css
├── link.css
├── loading.css
├── main.css
├── menu-item-group.css
├── menu-item.css
├── menu.css
├── message-box.css
├── message.css
├── notification.css
├── option-group.css
├── option.css
├── page-header.css
├── pagination.css
├── popconfirm.css
├── popover.css
├── popper.css
├── progress.css
├── radio-button.css
├── radio-group.css
├── radio.css
├── rate.css
├── reset.css
├── result.css
├── row.css
├── scrollbar.css
├── select-dropdown.css
├── select.css
├── skeleton-item.css
├── skeleton.css
├── slider.css
├── spinner.css
├── step.css
├── steps.css
├── submenu.css
├── switch.css
├── tab-pane.css
├── table-column.css
├── table.css
├── tabs.css
├── tag.css
├── time-picker.css
├── time-select.css
├── timeline-item.css
├── timeline.css
├── tooltip.css
├── transfer.css
├── tree.css
└── upload.css
└── vue.config.js
/backend/marriage-demo/src/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XuLeiGithub/marriage-demo/f43828c444a92267af507b8e683825678e1aee66/backend/marriage-demo/src/.DS_Store
--------------------------------------------------------------------------------
/backend/marriage-demo/src/main/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XuLeiGithub/marriage-demo/f43828c444a92267af507b8e683825678e1aee66/backend/marriage-demo/src/main/.DS_Store
--------------------------------------------------------------------------------
/backend/marriage-demo/src/main/java/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XuLeiGithub/marriage-demo/f43828c444a92267af507b8e683825678e1aee66/backend/marriage-demo/src/main/java/.DS_Store
--------------------------------------------------------------------------------
/backend/marriage-demo/src/main/java/com/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XuLeiGithub/marriage-demo/f43828c444a92267af507b8e683825678e1aee66/backend/marriage-demo/src/main/java/com/.DS_Store
--------------------------------------------------------------------------------
/backend/marriage-demo/src/main/java/com/jiuyu/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XuLeiGithub/marriage-demo/f43828c444a92267af507b8e683825678e1aee66/backend/marriage-demo/src/main/java/com/jiuyu/.DS_Store
--------------------------------------------------------------------------------
/backend/marriage-demo/src/main/java/com/jiuyu/Application.java:
--------------------------------------------------------------------------------
1 | package com.jiuyu;
2 |
3 | import org.mybatis.spring.annotation.MapperScan;
4 | import org.springframework.boot.SpringApplication;
5 | import org.springframework.boot.autoconfigure.SpringBootApplication;
6 |
7 |
8 | /**
9 | *
Title: Application
10 | * Description:
11 | *
12 | * @author he_jiebing@jiuyv.com
13 | * @date 2021年8月19日 下午9:20:10
14 | */
15 | @SpringBootApplication
16 | public class Application {
17 |
18 | public static void main(String[] args) {
19 | SpringApplication.run(Application.class, args);
20 |
21 | }
22 |
23 | }
24 |
--------------------------------------------------------------------------------
/backend/marriage-demo/src/main/java/com/jiuyu/aop/LogAspect.java:
--------------------------------------------------------------------------------
1 | package com.jiuyu.aop;
2 |
3 | import org.aspectj.lang.JoinPoint;
4 | import org.aspectj.lang.ProceedingJoinPoint;
5 | import org.aspectj.lang.annotation.AfterReturning;
6 | import org.aspectj.lang.annotation.AfterThrowing;
7 | import org.aspectj.lang.annotation.Around;
8 | import org.aspectj.lang.annotation.Aspect;
9 | import org.aspectj.lang.annotation.Pointcut;
10 | import org.slf4j.LoggerFactory;
11 | import org.springframework.stereotype.Component;
12 |
13 | import cn.hutool.core.util.ReUtil;
14 | import cn.hutool.json.JSONUtil;
15 |
16 | import com.jiuyu.common.R;
17 | import com.jiuyu.common.RegexConstant;
18 |
19 |
20 | /**
21 | * @Title: LogAspect
22 | * @Description: TODO
23 | * @author YuWenJing
24 | * @date 2019-03-27 17:06
25 | *
26 | */
27 | @Aspect
28 | @Component
29 | public class LogAspect {
30 |
31 | @Pointcut("(execution(public * com.jiuyu.controller.*Controller.*(..)))")
32 | public void controllerReqResAspect() {
33 | //切点
34 | }
35 |
36 | //不能使用before,会出现数据无法脱敏
37 | @Around(value = "controllerReqResAspect()")
38 | public Object printReq(ProceedingJoinPoint proceedingJoinPoint) throws Throwable {
39 | LoggerFactory.getLogger(proceedingJoinPoint.getTarget().getClass()).info("method:{},req:{}",proceedingJoinPoint.getSignature().getName(),JSONUtil.toJsonStr(proceedingJoinPoint.getArgs()[0]));
40 | Object returnValue = proceedingJoinPoint.proceed(); //执行连接点方法,object:方法返回值
41 | return returnValue;
42 | }
43 |
44 | @AfterReturning(value = "controllerReqResAspect()",returning="res")
45 | public void printRes(JoinPoint joinPoint,Object res) {
46 | // 过滤指定接口,不打印消息体
47 | boolean isMatch = false;
48 | for (String regex : RegexConstant.LOG_FILTER_METHOD_REGEX.split(",")) {
49 | if (ReUtil.isMatch(regex, joinPoint.getSignature().toShortString())) {
50 | isMatch = true;
51 | break;
52 | }
53 | }
54 | if (isMatch) {
55 | String msg = "success";
56 | if (res instanceof R && ((R) res).containsKey("msg")) {
57 | msg = (String) ((R) res).get("msg");
58 | }
59 | LoggerFactory.getLogger(joinPoint.getTarget().getClass()).info("method:{},res:{}",joinPoint.getSignature().getName(),msg);
60 | } else {
61 | LoggerFactory.getLogger(joinPoint.getTarget().getClass()).info("method:{},res:{}",joinPoint.getSignature().getName(),JSONUtil.toJsonStr(res));
62 | }
63 | }
64 |
65 | @AfterThrowing(pointcut = "controllerReqResAspect()", throwing = "e")//切点在webpointCut()
66 | public void handleThrowing(JoinPoint joinPoint, Exception e) {//controller类抛出的异常在这边捕获
67 | LoggerFactory.getLogger(joinPoint.getTarget().getClass()).info("method:{},res:{}",
68 | joinPoint.getSignature().getName(),JSONUtil.toJsonStr(joinPoint.getArgs()[0]));
69 | }
70 |
71 | }
72 |
--------------------------------------------------------------------------------
/backend/marriage-demo/src/main/java/com/jiuyu/bo/LogAddressBO.java:
--------------------------------------------------------------------------------
1 | package com.jiuyu.bo;
2 |
3 | import java.io.Serializable;
4 |
5 | /**
6 | * Title: LogAddressBO
7 | * Description:
8 | *
9 | * @author he_jiebing@jiuyv.com
10 | * @date 2021年4月24日 下午7:57:44
11 | */
12 |
13 | public class LogAddressBO implements Serializable {
14 |
15 | /**
16 | * serialVersionUID
17 | */
18 | private static final long serialVersionUID = -4391796405858117896L;
19 |
20 | private String address;
21 |
22 | public String getAddress() {
23 | return address;
24 | }
25 |
26 | public void setAddress(String address) {
27 | this.address = address;
28 | }
29 |
30 | }
31 |
--------------------------------------------------------------------------------
/backend/marriage-demo/src/main/java/com/jiuyu/common/BaseEntity.java:
--------------------------------------------------------------------------------
1 | package com.jiuyu.common;
2 |
3 | import java.io.Serializable;
4 | import java.util.Date;
5 | import java.util.HashMap;
6 | import java.util.Map;
7 |
8 | /**
9 | * Entity基类
10 | *
11 | * @author ruoyi
12 | */
13 | public class BaseEntity implements Serializable
14 | {
15 | private static final long serialVersionUID = 1L;
16 |
17 | /** 搜索值 */
18 | private String searchValue;
19 |
20 | /** 创建者 */
21 | private String createBy;
22 |
23 | /** 创建时间 */
24 | private Date createTime;
25 |
26 | /** 更新者 */
27 | private String updateBy;
28 |
29 | /** 更新时间 */
30 | private Date updateTime;
31 |
32 | /** 备注 */
33 | private String remark;
34 |
35 | /** 请求参数 */
36 | private Map params;
37 |
38 |
39 | public String getSearchValue()
40 | {
41 | return searchValue;
42 | }
43 |
44 | public void setSearchValue(String searchValue)
45 | {
46 | this.searchValue = searchValue;
47 | }
48 |
49 | public String getCreateBy()
50 | {
51 | return createBy;
52 | }
53 |
54 | public void setCreateBy(String createBy)
55 | {
56 | this.createBy = createBy;
57 | }
58 |
59 | public Date getCreateTime()
60 | {
61 | return createTime;
62 | }
63 |
64 | public void setCreateTime(Date createTime)
65 | {
66 | this.createTime = createTime;
67 | }
68 |
69 | public String getUpdateBy()
70 | {
71 | return updateBy;
72 | }
73 |
74 | public void setUpdateBy(String updateBy)
75 | {
76 | this.updateBy = updateBy;
77 | }
78 |
79 | public Date getUpdateTime()
80 | {
81 | return updateTime;
82 | }
83 |
84 | public void setUpdateTime(Date updateTime)
85 | {
86 | this.updateTime = updateTime;
87 | }
88 |
89 | public String getRemark()
90 | {
91 | return remark;
92 | }
93 |
94 | public void setRemark(String remark)
95 | {
96 | this.remark = remark;
97 | }
98 |
99 | public Map getParams()
100 | {
101 | if (params == null)
102 | {
103 | params = new HashMap<>();
104 | }
105 | return params;
106 | }
107 |
108 | public void setParams(Map params)
109 | {
110 | this.params = params;
111 | }
112 | }
113 |
--------------------------------------------------------------------------------
/backend/marriage-demo/src/main/java/com/jiuyu/common/Constant.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2016-2019 人人开源 All rights reserved.
3 | *
4 | * https://www.renren.io
5 | *
6 | * 版权所有,侵权必究!
7 | */
8 |
9 | package com.jiuyu.common;
10 |
11 | /**
12 | * 常量
13 | *
14 | * @author Mark sunlightcs@gmail.com
15 | */
16 | public class Constant {
17 |
18 |
19 | private Constant() {
20 | throw new AssertionError("No java.nio.charset.StandardCharsets instances for you!");
21 | }
22 |
23 | /** 超级管理员ID */
24 | public static final int SUPER_ADMIN = 1;
25 | /**
26 | * 当前页码
27 | */
28 | public static final String PAGE = "page";
29 | /**
30 | * 每页显示记录数
31 | */
32 | public static final String LIMIT = "limit";
33 | /**
34 | * 排序字段
35 | */
36 | public static final String ORDER_FIELD = "sidx";
37 | /**
38 | * 排序方式
39 | */
40 | public static final String ORDER = "order";
41 | /**
42 | * 升序
43 | */
44 | public static final String ASC = "asc";
45 |
46 | /**
47 | * 通用成功标识
48 | */
49 | public static final String SUCCESS = "0";
50 |
51 | /**
52 | * 通用失败标识
53 | */
54 | public static final String FAIL = "1";
55 |
56 | /**
57 | * utf-8编码
58 | */
59 | public static final String UNICODE_UTF="UTF-8";
60 | /**
61 | * 菜单类型
62 | *
63 | * @author chenshun
64 | * @email sunlightcs@gmail.com
65 | * @date 2016年11月15日 下午1:24:29
66 | */
67 | public enum MenuType {
68 | /**
69 | * 目录
70 | */
71 | CATALOG(0),
72 | /**
73 | * 菜单
74 | */
75 | MENU(1),
76 | /**
77 | * 按钮
78 | */
79 | BUTTON(2);
80 |
81 | private int value;
82 |
83 | MenuType(int value) {
84 | this.value = value;
85 | }
86 |
87 | public int getValue() {
88 | return value;
89 | }
90 | }
91 |
92 | /**
93 | * 定时任务状态
94 | *
95 | * @author chenshun
96 | * @email sunlightcs@gmail.com
97 | * @date 2016年12月3日 上午12:07:22
98 | */
99 | public enum ScheduleStatus {
100 | /**
101 | * 正常
102 | */
103 | NORMAL(0),
104 | /**
105 | * 暂停
106 | */
107 | PAUSE(1);
108 |
109 | private int value;
110 |
111 | ScheduleStatus(int value) {
112 | this.value = value;
113 | }
114 |
115 | public int getValue() {
116 | return value;
117 | }
118 | }
119 |
120 | /**
121 | * 云服务商
122 | */
123 | public enum CloudService {
124 | /**
125 | * 七牛云
126 | */
127 | QINIU(1),
128 | /**
129 | * 阿里云
130 | */
131 | ALIYUN(2),
132 | /**
133 | * 腾讯云
134 | */
135 | QCLOUD(3);
136 |
137 | private int value;
138 |
139 | CloudService(int value) {
140 | this.value = value;
141 | }
142 |
143 | public int getValue() {
144 | return value;
145 | }
146 | }
147 |
148 | }
149 |
--------------------------------------------------------------------------------
/backend/marriage-demo/src/main/java/com/jiuyu/common/GlobalConstant.java:
--------------------------------------------------------------------------------
1 | package com.jiuyu.common;
2 |
3 | /**
4 | * Title: GlobalConstant
5 | * Description:
6 | * @author he_jiebing@jiuyv.com
7 | @date 2021年8月19日 下午11:03:51
8 | */
9 |
10 | public class GlobalConstant {
11 |
12 | public static final String APP_PREIX = "marriage_";
13 |
14 | public static final String CONTRACT_TEMPLATE = "MarriageEvidence";
15 |
16 | }
17 |
--------------------------------------------------------------------------------
/backend/marriage-demo/src/main/java/com/jiuyu/common/Query.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2016-2019 人人开源 All rights reserved.
3 | *
4 | * https://www.renren.io
5 | *
6 | * 版权所有,侵权必究!
7 | */
8 |
9 | package com.jiuyu.common;
10 |
11 | import java.util.Map;
12 |
13 | import org.apache.commons.lang.StringUtils;
14 |
15 | import com.baomidou.mybatisplus.core.metadata.IPage;
16 | import com.baomidou.mybatisplus.core.metadata.OrderItem;
17 | import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
18 |
19 |
20 | /**
21 | * 查询参数
22 | *
23 | * @author Mark sunlightcs@gmail.com
24 | */
25 | public class Query {
26 |
27 | public IPage getPage(Map params) {
28 | return this.getPage(params, null, false);
29 | }
30 |
31 | public IPage getPage(Map params, String defaultOrderField, boolean isAsc) {
32 | //分页参数
33 | long curPage = 1;
34 | long limit = 10;
35 |
36 | if(params.get(Constant.PAGE) != null){
37 | curPage = Long.parseLong((String)params.get(Constant.PAGE));
38 | }
39 | if(params.get(Constant.LIMIT) != null){
40 | limit = Long.parseLong((String)params.get(Constant.LIMIT));
41 | }
42 |
43 | //分页对象
44 | Page page = new Page<>(curPage, limit);
45 |
46 | //分页参数
47 | params.put(Constant.PAGE, page);
48 |
49 | //排序字段
50 | //防止SQL注入(因为sidx、order是通过拼接SQL实现排序的,会有SQL注入风险)
51 | String orderField = SQLFilter.sqlInject((String)params.get(Constant.ORDER_FIELD));
52 | String order = (String)params.get(Constant.ORDER);
53 |
54 |
55 | //前端字段排序
56 | if(StringUtils.isNotEmpty(orderField) && StringUtils.isNotEmpty(order)){
57 | if(Constant.ASC.equalsIgnoreCase(order)) {
58 | return page.addOrder(OrderItem.asc(orderField));
59 | }else {
60 | return page.addOrder(OrderItem.desc(orderField));
61 | }
62 | }
63 |
64 | //没有排序字段,则不排序
65 | if(StringUtils.isBlank(defaultOrderField)){
66 | return page;
67 | }
68 |
69 | //默认排序
70 | if(isAsc) {
71 | page.addOrder(OrderItem.asc(defaultOrderField));
72 | }else {
73 | page.addOrder(OrderItem.desc(defaultOrderField));
74 | }
75 |
76 | return page;
77 | }
78 |
79 | }
80 |
--------------------------------------------------------------------------------
/backend/marriage-demo/src/main/java/com/jiuyu/common/R.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2016-2019 人人开源 All rights reserved.
3 | *
4 | * https://www.renren.io
5 | *
6 | * 版权所有,侵权必究!
7 | */
8 |
9 | package com.jiuyu.common;
10 |
11 | import java.util.HashMap;
12 |
13 | import org.apache.http.HttpStatus;
14 |
15 | import com.jiuyu.enums.RespEnum;
16 |
17 | /**
18 | * 返回数据
19 | *
20 | * @author Mark sunlightcs@gmail.com
21 | */
22 | public class R extends HashMap {
23 | private static final long serialVersionUID = 1L;
24 |
25 | public R() {
26 | put("code", RespEnum.SUCCESS.getCode());
27 | put("msg", RespEnum.SUCCESS.getMsg());
28 | }
29 |
30 | public static R error() {
31 | return error(HttpStatus.SC_INTERNAL_SERVER_ERROR, "未知异常,请联系管理员");
32 | }
33 |
34 | public static R error(String msg) {
35 | return error(HttpStatus.SC_INTERNAL_SERVER_ERROR, msg);
36 | }
37 |
38 | public static R error(int code, String msg) {
39 | R r = new R();
40 | r.put("code", code);
41 | r.put("msg", msg);
42 | return r;
43 | }
44 |
45 | public static R error(RespEnum respEnum) {
46 | R r = new R();
47 | r.put("code", respEnum.getCode());
48 | r.put("msg", respEnum.getMsg());
49 | return r;
50 | }
51 |
52 | public static R ok() {
53 | return new R();
54 | }
55 |
56 | public R put(String key, Object value) {
57 | super.put(key, value);
58 | return this;
59 | }
60 |
61 | public static R ok(Object obj){
62 | R r = new R();
63 | r.put("code", RespEnum.SUCCESS.getCode());
64 | r.put("msg", RespEnum.SUCCESS.getMsg());
65 | r.put("data",obj);
66 | return r;
67 | }
68 |
69 | public static Boolean isOk(R r) {
70 | Integer code = r.get("code")==null?null:Integer.valueOf(r.get("code").toString());
71 | return code==RespEnum.SUCCESS.getCode();
72 | }
73 | }
74 |
--------------------------------------------------------------------------------
/backend/marriage-demo/src/main/java/com/jiuyu/common/RegexConstant.java:
--------------------------------------------------------------------------------
1 | package com.jiuyu.common;
2 |
3 | /**
4 | * Title: RegexConstant
5 | * Description:
6 | * @author he_jiebing@jiuyv.com
7 | @date 2020年8月27日 下午12:47:19
8 | */
9 |
10 | public class RegexConstant {
11 |
12 |
13 | private RegexConstant() {
14 | throw new AssertionError("No java.nio.charset.StandardCharsets instances for you!");
15 | }
16 |
17 | /**
18 | * 中国手机正则表达式
19 | */
20 | public static final String CHINA_PHONE_REGEX = "^((13[0-9])|(14[5|7])|(15([0-3]|[5-9]))|(17[013678])|(18[0,5-9]))\\d{8}$";
21 | /**
22 | * 邮箱正则表达式
23 | */
24 | public static final String EMAIL_REGEX = "^[a-zA-Z0-9_.-]+@[a-zA-Z0-9-]+(\\.[a-zA-Z0-9-]+)*\\.[a-zA-Z0-9]{2,6}$";
25 | /**
26 | * 图片类型
27 | */
28 | public static final String IMG_TYPE = "jpg,jpeg,png,bmp";
29 | /**
30 | * 用户名正则表达式 :英文字母,至少包含一个英文字母,长度6到25位
31 | */
32 | public static final String NICKNAME_REGEX = "^(?=.*[A-Za-z])[\\da-zA-Z]{6,25}$";
33 | /**
34 | * 用户密码正则表达式:至少包含数字,大小写字母,特殊字符,长度 8到16位
35 | */
36 | public static final String PASSWORD_REGEX = "^(?=.*[a-z])(?=.*[A-Z])(?=.*\\d)(?=.*[$@$!%*?&])[A-Za-z\\d$@$!%*?&]{8,16}";
37 | /**
38 | * 短信验证码表达式
39 | */
40 | public static final String SMS_CODE_REGEX = "^\\d{6}$";
41 |
42 | /**
43 | * 文档类型
44 | */
45 | public static final String DOC_TYPE = "doc,docx,pdf";
46 |
47 | /**
48 | * 智能合约压缩包类型
49 | */
50 | public static final String CONTRACT_TYPE = "zip";
51 |
52 | /**
53 | * 接口返回时不打印消息体(消息体太大,会占满log窗口)的方法
54 | */
55 | public static final String LOG_FILTER_METHOD_REGEX = "AddressInfoController.getResponseAddressInfo.*";
56 | }
57 |
--------------------------------------------------------------------------------
/backend/marriage-demo/src/main/java/com/jiuyu/common/SQLFilter.java:
--------------------------------------------------------------------------------
1 | package com.jiuyu.common;
2 |
3 | import org.apache.commons.lang.StringUtils;
4 |
5 | import com.jiuyu.common.exception.RRException;
6 |
7 |
8 |
9 | /**
10 | * SQL过滤
11 | *
12 | */
13 | public class SQLFilter {
14 |
15 | /**
16 | * SQL注入过滤
17 | * @param str 待验证的字符串
18 | */
19 | public static String sqlInject(String str){
20 | if(StringUtils.isBlank(str)){
21 | return null;
22 | }
23 | //去掉'|"|;|\字符
24 | str = StringUtils.replace(str, "'", "");
25 | str = StringUtils.replace(str, "\"", "");
26 | str = StringUtils.replace(str, ";", "");
27 | str = StringUtils.replace(str, "\\", "");
28 |
29 | //转换成小写
30 | str = str.toLowerCase();
31 |
32 | //非法字符
33 | String[] keywords = {"master", "truncate", "insert", "select", "delete", "update", "declare", "alter", "drop"};
34 |
35 | //判断是否包含非法字符
36 | for(String keyword : keywords){
37 | if(str.indexOf(keyword) != -1){
38 | throw new RRException("包含非法字符");
39 | }
40 | }
41 |
42 | return str;
43 | }
44 |
45 | private SQLFilter() {
46 | throw new AssertionError("No java.nio.charset.StandardCharsets instances for you!");
47 | }
48 |
49 |
50 | }
51 |
--------------------------------------------------------------------------------
/backend/marriage-demo/src/main/java/com/jiuyu/common/exception/RRException.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2016-2019 人人开源 All rights reserved.
3 | *
4 | * https://www.renren.io
5 | *
6 | * 版权所有,侵权必究!
7 | */
8 |
9 | package com.jiuyu.common.exception;
10 |
11 | /**
12 | * 自定义异常
13 | *
14 | * @author Mark sunlightcs@gmail.com
15 | */
16 | public class RRException extends RuntimeException {
17 | private static final long serialVersionUID = 1L;
18 |
19 | private String msg;
20 | private int code = 500;
21 |
22 | public RRException(String msg) {
23 | super(msg);
24 | this.msg = msg;
25 | }
26 |
27 | public RRException(String msg, Throwable e) {
28 | super(msg, e);
29 | this.msg = msg;
30 | }
31 |
32 | public RRException(String msg, int code) {
33 | super(msg);
34 | this.msg = msg;
35 | this.code = code;
36 | }
37 |
38 | public RRException(String msg, int code, Throwable e) {
39 | super(msg, e);
40 | this.msg = msg;
41 | this.code = code;
42 | }
43 |
44 | public String getMsg() {
45 | return msg;
46 | }
47 |
48 | public void setMsg(String msg) {
49 | this.msg = msg;
50 | }
51 |
52 | public int getCode() {
53 | return code;
54 | }
55 |
56 | public void setCode(int code) {
57 | this.code = code;
58 | }
59 |
60 |
61 | }
62 |
--------------------------------------------------------------------------------
/backend/marriage-demo/src/main/java/com/jiuyu/config/ContractConfig.java:
--------------------------------------------------------------------------------
1 | package com.jiuyu.config;
2 |
3 | import java.lang.String;
4 | import lombok.Data;
5 |
6 | @Data
7 | public class ContractConfig {
8 | private String marriageEvidenceAddress;
9 | }
10 |
--------------------------------------------------------------------------------
/backend/marriage-demo/src/main/java/com/jiuyu/config/SdkBeanConfig.java:
--------------------------------------------------------------------------------
1 | package com.jiuyu.config;
2 |
3 | import java.math.BigInteger;
4 | import java.util.Arrays;
5 | import java.util.HashMap;
6 | import java.util.List;
7 | import java.util.Map;
8 | import java.util.stream.Collectors;
9 | import lombok.extern.slf4j.Slf4j;
10 | import org.fisco.bcos.sdk.BcosSDK;
11 | import org.fisco.bcos.sdk.client.Client;
12 | import org.fisco.bcos.sdk.config.ConfigOption;
13 | import org.fisco.bcos.sdk.config.exceptions.ConfigException;
14 | import org.fisco.bcos.sdk.config.model.ConfigProperty;
15 | import org.springframework.beans.factory.annotation.Autowired;
16 | import org.springframework.context.annotation.Bean;
17 | import org.springframework.context.annotation.Configuration;
18 |
19 | @Configuration
20 | @Slf4j
21 | public class SdkBeanConfig {
22 |
23 | @Autowired
24 | private SystemConfig config;
25 |
26 | @Bean
27 | public Client client() throws Exception {
28 | String certPaths = this.config.getCertPath();
29 | String[] possibilities = certPaths.split(",|;");
30 | for(String certPath: possibilities ) {
31 | try{
32 | ConfigProperty property = new ConfigProperty();
33 | configNetwork(property);
34 | configCryptoMaterial(property,certPath);
35 |
36 | ConfigOption configOption = new ConfigOption(property);
37 | Client client = new BcosSDK(configOption).getClient(config.getGroupId());
38 |
39 | BigInteger blockNumber = client.getBlockNumber().getBlockNumber();
40 | log.info("Chain connect successful. Current block number {}", blockNumber);
41 |
42 | configCryptoKeyPair(client);
43 | log.info("is Gm:{}, address:{}", client.getCryptoSuite().cryptoTypeConfig == 1, client.getCryptoSuite().getCryptoKeyPair().getAddress());
44 | return client;
45 | }
46 | catch (Exception ex) {
47 | log.error(ex.getMessage());
48 | try{
49 | Thread.sleep(5000);
50 | }catch (Exception e) {}
51 | }
52 | }
53 | throw new ConfigException("Failed to connect to peers:" + config.getPeers());
54 | }
55 |
56 | public void configNetwork(ConfigProperty configProperty) {
57 | String peerStr = config.getPeers();
58 | List peers = Arrays.stream(peerStr.split(",")).collect(Collectors.toList());
59 | Map networkConfig = new HashMap<>();
60 | networkConfig.put("peers", peers);
61 |
62 | configProperty.setNetwork(networkConfig);
63 | }
64 |
65 | public void configCryptoMaterial(ConfigProperty configProperty,String certPath) {
66 | Map cryptoMaterials = new HashMap<>();
67 | cryptoMaterials.put("certPath", certPath);
68 | configProperty.setCryptoMaterial(cryptoMaterials);
69 | }
70 |
71 | public void configCryptoKeyPair(Client client) {
72 | if (config.getHexPrivateKey() == null || config.getHexPrivateKey().isEmpty()){
73 | client.getCryptoSuite().setCryptoKeyPair(client.getCryptoSuite().createKeyPair());
74 | return;
75 | }
76 | String privateKey;
77 | if (!config.getHexPrivateKey().contains(",")) {
78 | privateKey = config.getHexPrivateKey();
79 | } else {
80 | String[] list = config.getHexPrivateKey().split(",");
81 | privateKey = list[0];
82 | }
83 | if (privateKey.startsWith("0x") || privateKey.startsWith("0X")) {
84 | privateKey = privateKey.substring(2);
85 | config.setHexPrivateKey(privateKey);
86 | }
87 | client.getCryptoSuite().setCryptoKeyPair(client.getCryptoSuite().createKeyPair(privateKey));
88 | }
89 | }
90 |
--------------------------------------------------------------------------------
/backend/marriage-demo/src/main/java/com/jiuyu/config/SystemConfig.java:
--------------------------------------------------------------------------------
1 | package com.jiuyu.config;
2 |
3 | import java.lang.String;
4 | import lombok.Data;
5 | import org.springframework.boot.context.properties.ConfigurationProperties;
6 | import org.springframework.boot.context.properties.NestedConfigurationProperty;
7 | import org.springframework.context.annotation.Configuration;
8 |
9 | @Data
10 | @Configuration
11 | @ConfigurationProperties(
12 | prefix = "system"
13 | )
14 | public class SystemConfig {
15 | private String peers;
16 |
17 | private int groupId = 1;
18 |
19 | private String certPath = "conf";
20 |
21 | private String hexPrivateKey;
22 |
23 | @NestedConfigurationProperty
24 | private ContractConfig contract;
25 | }
26 |
--------------------------------------------------------------------------------
/backend/marriage-demo/src/main/java/com/jiuyu/controller/DemoController.java:
--------------------------------------------------------------------------------
1 | package com.jiuyu.controller;
2 |
3 | import java.util.List;
4 | import java.util.stream.Collectors;
5 |
6 | import org.springframework.beans.factory.annotation.Autowired;
7 | import org.springframework.beans.factory.annotation.Value;
8 | import org.springframework.web.bind.annotation.GetMapping;
9 | import org.springframework.web.bind.annotation.PathVariable;
10 | import org.springframework.web.bind.annotation.PostMapping;
11 | import org.springframework.web.bind.annotation.RequestBody;
12 | import org.springframework.web.bind.annotation.RequestParam;
13 | import org.springframework.web.bind.annotation.RestController;
14 |
15 | import com.jiuyu.common.R;
16 | import com.jiuyu.entity.UserInfoEntity;
17 | import com.jiuyu.enums.MarriageStatusEnum;
18 | import com.jiuyu.service.UserInfoService;
19 | import com.jiuyu.vo.ReqAddUser;
20 | import com.jiuyu.vo.ReqNull;
21 | import com.jiuyu.vo.ResAddUser;
22 | import com.webank.webase.app.sdk.client.AppClient;
23 | import com.webank.webase.app.sdk.config.HttpConfig;
24 | import com.webank.webase.app.sdk.dto.rsp.RspUserInfo;
25 |
26 | /**
27 | *
28 | * Title: DemoController
29 | *
30 | *
31 | * Description:
32 | *
33 | *
34 | * @author he_jiebing@jiuyv.com
35 | * @date 2021年9月27日 下午2:01:56
36 | */
37 | @RestController
38 | public class DemoController {
39 |
40 | @Value("${webase.node.mgr.url}")
41 | private String url;
42 |
43 | @Value("${webase.node.mgr.appKey}")
44 | private String appKey;
45 |
46 | @Value("${webase.node.mgr.appSecret}")
47 | private String appSecret;
48 |
49 | @Value("${webase.node.mgr.isTransferEncrypt}")
50 | private Boolean isTransferEncrypt;
51 |
52 | private static AppClient appClient = null;
53 |
54 | private static final String ACCOUNT = "admin";
55 |
56 | @GetMapping("/userInfo/{userId}")
57 | public RspUserInfo getUserInfo(@PathVariable("userId") Integer userId) {
58 | // 2.调用WeBASE-APP-SDK 获取用户公钥地址等信息
59 | HttpConfig httpConfig = new HttpConfig(30, 30, 30);
60 | appClient = new AppClient(url, appKey, appSecret, isTransferEncrypt,httpConfig);
61 | RspUserInfo userInfo = appClient.userInfo(userId);
62 | return userInfo;
63 | }
64 |
65 | }
66 |
--------------------------------------------------------------------------------
/backend/marriage-demo/src/main/java/com/jiuyu/controller/IndexController.java:
--------------------------------------------------------------------------------
1 | package com.jiuyu.controller;
2 |
3 | import java.util.List;
4 | import java.util.stream.Collectors;
5 |
6 | import org.springframework.beans.BeanUtils;
7 | import org.springframework.beans.factory.annotation.Autowired;
8 | import org.springframework.web.bind.annotation.GetMapping;
9 | import org.springframework.web.bind.annotation.RequestMapping;
10 | import org.springframework.web.bind.annotation.RequestParam;
11 | import org.springframework.web.bind.annotation.RestController;
12 |
13 | import com.jiuyu.common.R;
14 | import com.jiuyu.entity.MarriageInfoEntity;
15 | import com.jiuyu.service.MarriageInfoService;
16 | import com.jiuyu.vo.ReqNull;
17 | import com.jiuyu.vo.ResIndexVo;
18 |
19 | /**
20 | * Title: IndexController
21 | * Description:
22 | *
23 | * @author he_jiebing@jiuyv.com
24 | * @date 2021年8月19日 下午9:56:18
25 | */
26 | @RequestMapping("/marriage")
27 | @RestController
28 | public class IndexController {
29 |
30 | @Autowired
31 | private MarriageInfoService marriageInfoService;
32 |
33 | @GetMapping("/unlogin/index")
34 | public R queryUnLoginIndexInfo(@RequestParam(required = false, name = "name") ReqNull req) {
35 | List list = marriageInfoService.queryConfirmMarriageList();
36 | List result = list.stream().map(item -> {
37 | ResIndexVo res = new ResIndexVo();
38 | BeanUtils.copyProperties(item, res);
39 | return res;
40 | }).collect(Collectors.toList());
41 |
42 | return R.ok(result);
43 | }
44 |
45 | @GetMapping("/login/index")
46 | public R queryLoginIndexInfo(@RequestParam(required = false, name = "name") ReqNull req) {
47 | List list = marriageInfoService.list();
48 | return R.ok(list);
49 | }
50 |
51 | }
52 |
--------------------------------------------------------------------------------
/backend/marriage-demo/src/main/java/com/jiuyu/controller/LoginController.java:
--------------------------------------------------------------------------------
1 | package com.jiuyu.controller;
2 |
3 |
4 | import org.springframework.beans.factory.annotation.Autowired;
5 | import org.springframework.web.bind.annotation.PostMapping;
6 | import org.springframework.web.bind.annotation.RequestBody;
7 | import org.springframework.web.bind.annotation.RequestMapping;
8 | import org.springframework.web.bind.annotation.RestController;
9 |
10 | import com.jiuyu.common.R;
11 | import com.jiuyu.entity.AdminUserEntity;
12 | import com.jiuyu.enums.RespEnum;
13 | import com.jiuyu.service.AdminUserService;
14 | import com.jiuyu.vo.ReqLoginVo;
15 | import com.jiuyu.vo.ResLoginVo;
16 |
17 | /**
18 | * Title: LoginController
19 | * Description:
20 | *
21 | * @author he_jiebing@jiuyv.com
22 | * @date 2021年8月19日 下午10:04:40
23 | */
24 | @RequestMapping("/marriage")
25 | @RestController
26 | public class LoginController {
27 |
28 | @Autowired
29 | private AdminUserService adminUserService;
30 |
31 | @PostMapping("/login")
32 | public R login(@RequestBody ReqLoginVo req) {
33 | AdminUserEntity result = adminUserService.login(req);
34 | if (null == result) {
35 | return R.error(RespEnum.LOGIN_FAIL);
36 | }
37 | ResLoginVo res = new ResLoginVo();
38 | res.setAdminUserId(result.getId());
39 | res.setUsername(result.getUsername());
40 | return R.ok(result);
41 | }
42 |
43 | }
44 |
--------------------------------------------------------------------------------
/backend/marriage-demo/src/main/java/com/jiuyu/controller/MarriageEvidenceController.java:
--------------------------------------------------------------------------------
1 | package com.jiuyu.controller;
2 |
3 | import org.springframework.beans.factory.annotation.Autowired;
4 | import org.springframework.web.bind.annotation.GetMapping;
5 | import org.springframework.web.bind.annotation.PathVariable;
6 | import org.springframework.web.bind.annotation.PostMapping;
7 | import org.springframework.web.bind.annotation.RequestBody;
8 | import org.springframework.web.bind.annotation.RequestMapping;
9 | import org.springframework.web.bind.annotation.RestController;
10 |
11 | import com.jiuyu.common.R;
12 | import com.jiuyu.service.MarriageEvidenceService;
13 | import com.jiuyu.vo.ReqCreateMarriageEvidenceVo;
14 | import com.jiuyu.vo.ReqSignVo;
15 | import com.jiuyu.vo.ResCreateMarriageEvidenceVo;
16 | import com.jiuyu.vo.ResMarriageDeatailVo;
17 |
18 | /**
19 | * Title: MarriageEvidenceController
20 | * Description:
21 | *
22 | * @author he_jiebing@jiuyv.com
23 | * @date 2021年8月19日 下午11:27:12
24 | */
25 | @RequestMapping("/marriage")
26 | @RestController
27 | public class MarriageEvidenceController {
28 |
29 | @Autowired
30 | private MarriageEvidenceService marriageEvidenceService;
31 |
32 |
33 | @PostMapping("/create")
34 | public R createMarriageEvidence(@RequestBody ReqCreateMarriageEvidenceVo req) {
35 | ResCreateMarriageEvidenceVo res = marriageEvidenceService.createMarriageEvidence(req);
36 | return R.ok(res);
37 | }
38 |
39 | @PostMapping("/sign")
40 | public R sign(@RequestBody ReqSignVo req) {
41 | return marriageEvidenceService.sign(req);
42 | }
43 |
44 | @GetMapping("/info/{id}")
45 | public R queryMarriageDetail(@PathVariable("id") String certificateNumber) {
46 | ResMarriageDeatailVo res = marriageEvidenceService.queryMarriageDetail(certificateNumber);
47 | return R.ok(res);
48 | }
49 |
50 | }
51 |
--------------------------------------------------------------------------------
/backend/marriage-demo/src/main/java/com/jiuyu/controller/UserController.java:
--------------------------------------------------------------------------------
1 | package com.jiuyu.controller;
2 |
3 | import java.util.List;
4 | import java.util.stream.Collectors;
5 |
6 | import org.springframework.beans.factory.annotation.Autowired;
7 | import org.springframework.web.bind.annotation.GetMapping;
8 | import org.springframework.web.bind.annotation.PathVariable;
9 | import org.springframework.web.bind.annotation.PostMapping;
10 | import org.springframework.web.bind.annotation.RequestBody;
11 | import org.springframework.web.bind.annotation.RequestMapping;
12 | import org.springframework.web.bind.annotation.RequestParam;
13 | import org.springframework.web.bind.annotation.RestController;
14 |
15 | import com.jiuyu.common.R;
16 | import com.jiuyu.entity.UserInfoEntity;
17 | import com.jiuyu.enums.MarriageStatusEnum;
18 | import com.jiuyu.service.UserInfoService;
19 | import com.jiuyu.vo.ReqAddUser;
20 | import com.jiuyu.vo.ReqNull;
21 | import com.jiuyu.vo.ResAddUser;
22 |
23 | /**
24 | *
25 | * Title: UserController
26 | *
27 | *
28 | * Description:
29 | *
30 | *
31 | * @author he_jiebing@jiuyv.com
32 | * @date 2021年8月19日 下午9:56:29
33 | */
34 | @RequestMapping("/marriage")
35 | @RestController
36 | public class UserController {
37 |
38 | @Autowired
39 | private UserInfoService userInfoService;
40 |
41 | @PostMapping("/addUser")
42 | public R addUser(@RequestBody ReqAddUser req) {
43 | ResAddUser result = userInfoService.addUser(req);
44 | return R.ok(result);
45 | }
46 |
47 | @GetMapping("/user/list")
48 | public R queryUserList(@RequestParam(required = false, name = "name") ReqNull req) {
49 | List list = userInfoService.list();
50 | return R.ok(list);
51 | }
52 |
53 | @GetMapping("/user/list/{sex}")
54 | public R queryUserBySex(@PathVariable("sex") String sex) {
55 | List list = userInfoService.list();
56 | List result = list.stream()
57 | .filter(item -> item.getSex().equals(sex)
58 | && item.getMarriageStatus().equals(
59 | MarriageStatusEnum.NEW_USER.getCode()))
60 | .collect(Collectors.toList());
61 | return R.ok(result);
62 | }
63 | @GetMapping("/witness/list")
64 | public R queryWitnessList(){
65 | List list = userInfoService.list();
66 | List result = list.stream()
67 | .filter(item -> item.getMarriageStatus().equals(
68 | MarriageStatusEnum.NEW_USER.getCode()))
69 | .collect(Collectors.toList());
70 | return R.ok(result);
71 | }
72 |
73 | }
74 |
--------------------------------------------------------------------------------
/backend/marriage-demo/src/main/java/com/jiuyu/dao/AdminUserDao.java:
--------------------------------------------------------------------------------
1 | package com.jiuyu.dao;
2 |
3 | import org.apache.ibatis.annotations.Mapper;
4 | import org.apache.ibatis.annotations.Param;
5 |
6 | import com.baomidou.mybatisplus.core.mapper.BaseMapper;
7 | import com.jiuyu.entity.AdminUserEntity;
8 |
9 | /**
10 | * 管理员信息表
11 | *
12 | * @author hejiebing
13 | * @email he_jiebing@jiuyv.com
14 | * @date 2021-08-19 21:07:24
15 | */
16 | @Mapper
17 | public interface AdminUserDao extends BaseMapper {
18 |
19 | AdminUserEntity selectAdminUser(@Param("username") String username, @Param("password")String password);
20 |
21 | }
22 |
--------------------------------------------------------------------------------
/backend/marriage-demo/src/main/java/com/jiuyu/dao/ContractTemplateDao.java:
--------------------------------------------------------------------------------
1 | package com.jiuyu.dao;
2 |
3 | import org.apache.ibatis.annotations.Mapper;
4 | import org.apache.ibatis.annotations.Param;
5 |
6 | import com.baomidou.mybatisplus.core.mapper.BaseMapper;
7 | import com.jiuyu.entity.ContractTemplateEntity;
8 |
9 | /**
10 | * 合约模板表
11 | *
12 | * @author hejiebing
13 | * @email he_jiebing@jiuyv.com
14 | * @date 2021-08-19 21:07:24
15 | */
16 | @Mapper
17 | public interface ContractTemplateDao extends BaseMapper {
18 |
19 | /**
20 | * 查询模板信息
21 | * @param template
22 | * @return
23 | */
24 | ContractTemplateEntity queryByTemplate(@Param("template") String template);
25 |
26 | }
27 |
--------------------------------------------------------------------------------
/backend/marriage-demo/src/main/java/com/jiuyu/dao/MarriageEvidenceDao.java:
--------------------------------------------------------------------------------
1 | package com.jiuyu.dao;
2 |
3 | import org.apache.ibatis.annotations.Mapper;
4 | import org.apache.ibatis.annotations.Param;
5 |
6 | import com.baomidou.mybatisplus.core.mapper.BaseMapper;
7 | import com.jiuyu.entity.MarriageEvidenceEntity;
8 |
9 | /**
10 | * 结婚存证表
11 | *
12 | * @author hejiebing
13 | * @email he_jiebing@jiuyv.com
14 | * @date 2021-08-19 21:07:24
15 | */
16 | @Mapper
17 | public interface MarriageEvidenceDao extends BaseMapper {
18 |
19 | MarriageEvidenceEntity queryByUserPublicAddress(@Param("publicAddress") String publicAddress);
20 | }
21 |
--------------------------------------------------------------------------------
/backend/marriage-demo/src/main/java/com/jiuyu/dao/MarriageInfoDao.java:
--------------------------------------------------------------------------------
1 | package com.jiuyu.dao;
2 |
3 | import org.apache.ibatis.annotations.Mapper;
4 | import org.apache.ibatis.annotations.Param;
5 |
6 | import com.baomidou.mybatisplus.core.mapper.BaseMapper;
7 | import com.jiuyu.entity.MarriageInfoEntity;
8 |
9 | /**
10 | * 结婚证信息表
11 | *
12 | * @author hejiebing
13 | * @email he_jiebing@jiuyv.com
14 | * @date 2021-08-19 21:07:24
15 | */
16 | @Mapper
17 | public interface MarriageInfoDao extends BaseMapper {
18 |
19 | MarriageInfoEntity selectByUserId(@Param("userId") Long userId);
20 |
21 | }
22 |
--------------------------------------------------------------------------------
/backend/marriage-demo/src/main/java/com/jiuyu/dao/UserInfoDao.java:
--------------------------------------------------------------------------------
1 | package com.jiuyu.dao;
2 |
3 | import org.apache.ibatis.annotations.Mapper;
4 |
5 | import com.baomidou.mybatisplus.core.mapper.BaseMapper;
6 | import com.jiuyu.entity.UserInfoEntity;
7 |
8 | /**
9 | * 用户信息表
10 | *
11 | * @author hejiebing
12 | * @email he_jiebing@jiuyv.com
13 | * @date 2021-08-19 21:07:24
14 | */
15 | @Mapper
16 | public interface UserInfoDao extends BaseMapper {
17 |
18 | }
19 |
--------------------------------------------------------------------------------
/backend/marriage-demo/src/main/java/com/jiuyu/entity/AdminUserEntity.java:
--------------------------------------------------------------------------------
1 | package com.jiuyu.entity;
2 |
3 | import com.baomidou.mybatisplus.annotation.TableId;
4 | import com.baomidou.mybatisplus.annotation.TableName;
5 |
6 | import java.io.Serializable;
7 | import java.util.Date;
8 |
9 | /**
10 | * 管理员信息表
11 | *
12 | * @author hejiebing
13 | * @email he_jiebing@jiuyv.com
14 | * @date 2021-08-19 21:07:24
15 | */
16 | @TableName("tbl_admin_user")
17 | public class AdminUserEntity implements Serializable {
18 | private static final long serialVersionUID = 1L;
19 |
20 | /**
21 | * id
22 | */
23 | @TableId
24 | private Long id;
25 | /**
26 | * 姓名
27 | */
28 | private String username;
29 | /**
30 | * 密码
31 | */
32 | private String password;
33 | /**
34 | * signuserid
35 | */
36 | private String signUserId;
37 | /**
38 | * 公钥地址
39 | */
40 | private String publicAddress;
41 | /**
42 | * 插入时间
43 | */
44 | private Date insertTime;
45 | /**
46 | * 更新时间
47 | */
48 | private Date updateTime;
49 | public Long getId() {
50 | return id;
51 | }
52 | public void setId(Long id) {
53 | this.id = id;
54 | }
55 | public String getUsername() {
56 | return username;
57 | }
58 | public void setUsername(String username) {
59 | this.username = username;
60 | }
61 | public String getPassword() {
62 | return password;
63 | }
64 | public void setPassword(String password) {
65 | this.password = password;
66 | }
67 | public String getSignUserId() {
68 | return signUserId;
69 | }
70 | public void setSignUserId(String signUserId) {
71 | this.signUserId = signUserId;
72 | }
73 | public String getPublicAddress() {
74 | return publicAddress;
75 | }
76 | public void setPublicAddress(String publicAddress) {
77 | this.publicAddress = publicAddress;
78 | }
79 | public Date getInsertTime() {
80 | return insertTime;
81 | }
82 | public void setInsertTime(Date insertTime) {
83 | this.insertTime = insertTime;
84 | }
85 | public Date getUpdateTime() {
86 | return updateTime;
87 | }
88 | public void setUpdateTime(Date updateTime) {
89 | this.updateTime = updateTime;
90 | }
91 |
92 |
93 |
94 | }
95 |
--------------------------------------------------------------------------------
/backend/marriage-demo/src/main/java/com/jiuyu/entity/ContractTemplateEntity.java:
--------------------------------------------------------------------------------
1 | package com.jiuyu.entity;
2 |
3 | import com.baomidou.mybatisplus.annotation.TableId;
4 | import com.baomidou.mybatisplus.annotation.TableName;
5 |
6 | import java.io.Serializable;
7 |
8 | /**
9 | * 合约模板表
10 | *
11 | * @author hejiebing
12 | * @email he_jiebing@jiuyv.com
13 | * @date 2021-08-19 21:07:24
14 | */
15 | @TableName("tbl_contract_template")
16 | public class ContractTemplateEntity implements Serializable {
17 | private static final long serialVersionUID = 1L;
18 |
19 | /**
20 | * id
21 | */
22 | @TableId
23 | private Long id;
24 | /**
25 | * 合约名称
26 | */
27 | private String contractName;
28 | /**
29 | * 合约abi
30 | */
31 | private String contractAbi;
32 | /**
33 | * 合约bin
34 | */
35 | private String contractBin;
36 | /**
37 | * 合约base64
38 | */
39 | private String contractBase64;
40 | /**
41 | * 合约地址
42 | */
43 | private String contractAddress;
44 | public Long getId() {
45 | return id;
46 | }
47 | public void setId(Long id) {
48 | this.id = id;
49 | }
50 | public String getContractName() {
51 | return contractName;
52 | }
53 | public void setContractName(String contractName) {
54 | this.contractName = contractName;
55 | }
56 | public String getContractAbi() {
57 | return contractAbi;
58 | }
59 | public void setContractAbi(String contractAbi) {
60 | this.contractAbi = contractAbi;
61 | }
62 | public String getContractBin() {
63 | return contractBin;
64 | }
65 | public void setContractBin(String contractBin) {
66 | this.contractBin = contractBin;
67 | }
68 | public String getContractBase64() {
69 | return contractBase64;
70 | }
71 | public void setContractBase64(String contractBase64) {
72 | this.contractBase64 = contractBase64;
73 | }
74 | public String getContractAddress() {
75 | return contractAddress;
76 | }
77 | public void setContractAddress(String contractAddress) {
78 | this.contractAddress = contractAddress;
79 | }
80 |
81 |
82 |
83 | }
84 |
--------------------------------------------------------------------------------
/backend/marriage-demo/src/main/java/com/jiuyu/entity/MarriageEvidenceEntity.java:
--------------------------------------------------------------------------------
1 | package com.jiuyu.entity;
2 |
3 | import com.baomidou.mybatisplus.annotation.IdType;
4 | import com.baomidou.mybatisplus.annotation.TableId;
5 | import com.baomidou.mybatisplus.annotation.TableName;
6 |
7 | import java.io.Serializable;
8 | import java.util.Date;
9 |
10 | /**
11 | * 结婚存证表
12 | *
13 | * @author hejiebing
14 | * @email he_jiebing@jiuyv.com
15 | * @date 2021-08-19 21:07:24
16 | */
17 | @TableName("tbl_marriage_evidence")
18 | public class MarriageEvidenceEntity implements Serializable {
19 | private static final long serialVersionUID = 1L;
20 |
21 | /**
22 | * id
23 | */
24 | @TableId(type = IdType.AUTO)
25 | private Long id;
26 | /**
27 | * 存证key
28 | */
29 | private String evidenceKey;
30 | /**
31 | * 存证value
32 | */
33 | private String evidenceValue;
34 | /**
35 | * 需要签名各方(公钥地址,民政局管理员,男方,女方)
36 | */
37 | private String needSigners;
38 | /**
39 | * 已签名各方(公钥地址,民政局管理员,男方,女方)
40 | */
41 | private String hasSigners;
42 | /**
43 | * 交易id
44 | */
45 | private String txId;
46 | /**
47 | * 插入时间
48 | */
49 | private Date insertTime;
50 | /**
51 | * 更新时间
52 | */
53 | private Date updateTime;
54 | /**
55 | * 证书编号
56 | */
57 | private String certificateNumber;
58 |
59 | public String getCertificateNumber() {
60 | return certificateNumber;
61 | }
62 |
63 | public void setCertificateNumber(String certificateNumber) {
64 | this.certificateNumber = certificateNumber;
65 | }
66 |
67 | public Long getId() {
68 | return id;
69 | }
70 |
71 | public void setId(Long id) {
72 | this.id = id;
73 | }
74 |
75 | public String getEvidenceKey() {
76 | return evidenceKey;
77 | }
78 |
79 | public void setEvidenceKey(String evidenceKey) {
80 | this.evidenceKey = evidenceKey;
81 | }
82 |
83 | public String getEvidenceValue() {
84 | return evidenceValue;
85 | }
86 |
87 | public void setEvidenceValue(String evidenceValue) {
88 | this.evidenceValue = evidenceValue;
89 | }
90 |
91 | public String getNeedSigners() {
92 | return needSigners;
93 | }
94 |
95 | public void setNeedSigners(String needSigners) {
96 | this.needSigners = needSigners;
97 | }
98 |
99 | public String getHasSigners() {
100 | return hasSigners;
101 | }
102 |
103 | public void setHasSigners(String hasSigners) {
104 | this.hasSigners = hasSigners;
105 | }
106 |
107 | public String getTxId() {
108 | return txId;
109 | }
110 |
111 | public void setTxId(String txId) {
112 | this.txId = txId;
113 | }
114 |
115 | public Date getInsertTime() {
116 | return insertTime;
117 | }
118 |
119 | public void setInsertTime(Date insertTime) {
120 | this.insertTime = insertTime;
121 | }
122 |
123 | public Date getUpdateTime() {
124 | return updateTime;
125 | }
126 |
127 | public void setUpdateTime(Date updateTime) {
128 | this.updateTime = updateTime;
129 | }
130 |
131 |
132 | }
133 |
--------------------------------------------------------------------------------
/backend/marriage-demo/src/main/java/com/jiuyu/entity/UserInfoEntity.java:
--------------------------------------------------------------------------------
1 | package com.jiuyu.entity;
2 |
3 | import com.baomidou.mybatisplus.annotation.IdType;
4 | import com.baomidou.mybatisplus.annotation.TableId;
5 | import com.baomidou.mybatisplus.annotation.TableName;
6 |
7 | import java.io.Serializable;
8 | import java.util.Date;
9 |
10 | /**
11 | * 用户信息表
12 | *
13 | * @author hejiebing
14 | * @email he_jiebing@jiuyv.com
15 | * @date 2021-08-19 21:07:24
16 | */
17 | @TableName("tbl_user_info")
18 | public class UserInfoEntity implements Serializable {
19 | private static final long serialVersionUID = 1L;
20 |
21 | /**
22 | * id
23 | */
24 | @TableId(type = IdType.AUTO)
25 | private Long id;
26 | /**
27 | * 姓名
28 | */
29 | private String username;
30 | /**
31 | * signuserid
32 | */
33 | private String signUserId;
34 | /**
35 | * 公钥地址
36 | */
37 | private String publicAddress;
38 | /**
39 | * 用户私钥
40 | */
41 | private String privateKey;
42 | /**
43 | * 家庭住址
44 | */
45 | private String familyAddress;
46 | /**
47 | * 身份证信息
48 | */
49 | private String idCard;
50 | /**
51 | * 年龄
52 | */
53 | private Integer age;
54 | /**
55 | * 性别
56 | */
57 | private String sex;
58 | /**
59 | * 插入时间
60 | */
61 | private Date insertTime;
62 | /**
63 | * 更新时间
64 | */
65 | private Date updateTime;
66 | /**
67 | * 签名状态
68 | */
69 | private String marriageStatus;
70 | /**
71 | * 证书编号
72 | */
73 | private String certificateNumber;
74 |
75 | public String getMarriageStatus() {
76 | return marriageStatus;
77 | }
78 |
79 | public void setMarriageStatus(String marriageStatus) {
80 | this.marriageStatus = marriageStatus;
81 | }
82 |
83 | public Long getId() {
84 | return id;
85 | }
86 |
87 | public void setId(Long id) {
88 | this.id = id;
89 | }
90 |
91 | public String getUsername() {
92 | return username;
93 | }
94 |
95 | public void setUsername(String username) {
96 | this.username = username;
97 | }
98 |
99 | public String getSignUserId() {
100 | return signUserId;
101 | }
102 |
103 | public void setSignUserId(String signUserId) {
104 | this.signUserId = signUserId;
105 | }
106 |
107 | public String getPublicAddress() {
108 | return publicAddress;
109 | }
110 |
111 | public void setPublicAddress(String publicAddress) {
112 | this.publicAddress = publicAddress;
113 | }
114 |
115 | public void setPrivateKey(String privateKey) {
116 | this.privateKey = privateKey;
117 | }
118 |
119 | public String getPrivateKey() {
120 | return privateKey;
121 | }
122 |
123 | public String getFamilyAddress() {
124 | return familyAddress;
125 | }
126 |
127 | public void setFamilyAddress(String familyAddress) {
128 | this.familyAddress = familyAddress;
129 | }
130 |
131 | public String getIdCard() {
132 | return idCard;
133 | }
134 |
135 | public void setIdCard(String idCard) {
136 | this.idCard = idCard;
137 | }
138 |
139 | public Integer getAge() {
140 | return age;
141 | }
142 |
143 | public void setAge(Integer age) {
144 | this.age = age;
145 | }
146 |
147 | public String getSex() {
148 | return sex;
149 | }
150 |
151 | public void setSex(String sex) {
152 | this.sex = sex;
153 | }
154 |
155 | public Date getInsertTime() {
156 | return insertTime;
157 | }
158 |
159 | public void setInsertTime(Date insertTime) {
160 | this.insertTime = insertTime;
161 | }
162 |
163 | public Date getUpdateTime() {
164 | return updateTime;
165 | }
166 |
167 | public void setUpdateTime(Date updateTime) {
168 | this.updateTime = updateTime;
169 | }
170 |
171 | public void setCertificateNumber(String certificateNumber) {
172 | this.certificateNumber = certificateNumber;
173 | }
174 |
175 | public String getCertificateNumber() {
176 | return certificateNumber;
177 | }
178 | }
179 |
--------------------------------------------------------------------------------
/backend/marriage-demo/src/main/java/com/jiuyu/enums/CertStatusEnum.java:
--------------------------------------------------------------------------------
1 | package com.jiuyu.enums;
2 |
3 | /**
4 | * Title: RespEnum
5 | * Description:
6 | * @author he_jiebing@jiuyv.com
7 | @date 2020年8月24日 下午3:56:12
8 | */
9 |
10 | public enum CertStatusEnum {
11 |
12 | CONFIRMED(0,"confirmed"),
13 | DRAFT(1,"draft");
14 |
15 |
16 | private int code;
17 | private String msg;
18 | CertStatusEnum(int code,String msg){
19 | this.code = code;
20 | this.msg = msg;
21 | }
22 |
23 | public int getCode() {
24 | return code;
25 | }
26 |
27 | public String getMsg() {
28 | return msg;
29 | }
30 |
31 | }
32 |
--------------------------------------------------------------------------------
/backend/marriage-demo/src/main/java/com/jiuyu/enums/MarriageStatusEnum.java:
--------------------------------------------------------------------------------
1 | package com.jiuyu.enums;
2 |
3 | /**
4 | * Title: RespEnum
5 | * Description:
6 | * @author he_jiebing@jiuyv.com
7 | @date 2020年8月24日 下午3:56:12
8 | */
9 |
10 | public enum MarriageStatusEnum {
11 |
12 | HAS_MARRIAHE("00","HAS_MARRIAHE"),
13 | NO_MARRIAGE("01","NO_MARRIAGE"),
14 | NEW_USER("02","NEW_USER");
15 |
16 |
17 | private String code;
18 | private String msg;
19 | MarriageStatusEnum(String code,String msg){
20 | this.code = code;
21 | this.msg = msg;
22 | }
23 |
24 | public String getCode() {
25 | return code;
26 | }
27 |
28 | public String getMsg() {
29 | return msg;
30 | }
31 |
32 | }
33 |
--------------------------------------------------------------------------------
/backend/marriage-demo/src/main/java/com/jiuyu/enums/RespEnum.java:
--------------------------------------------------------------------------------
1 | package com.jiuyu.enums;
2 |
3 | /**
4 | * Title: RespEnum
5 | * Description:
6 | * @author he_jiebing@jiuyv.com
7 | @date 2020年8月24日 下午3:56:12
8 | */
9 |
10 | public enum RespEnum {
11 |
12 | SUCCESS(0,"success"),
13 | LOGIN_FAIL(10000,"用户名或密码不正确");
14 |
15 | /********************************* 结束**************************************/
16 |
17 | private int code;
18 | private String msg;
19 | RespEnum(int code,String msg){
20 | this.code = code;
21 | this.msg = msg;
22 | }
23 |
24 | public int getCode() {
25 | return code;
26 | }
27 |
28 | public String getMsg() {
29 | return msg;
30 | }
31 |
32 | }
33 |
--------------------------------------------------------------------------------
/backend/marriage-demo/src/main/java/com/jiuyu/service/AdminUserService.java:
--------------------------------------------------------------------------------
1 | package com.jiuyu.service;
2 |
3 | import com.baomidou.mybatisplus.extension.service.IService;
4 | import com.jiuyu.entity.AdminUserEntity;
5 | import com.jiuyu.vo.ReqLoginVo;
6 |
7 | /**
8 | * 管理员信息表
9 | *
10 | * @author hejiebing
11 | * @email he_jiebing@jiuyv.com
12 | * @date 2021-08-19 21:07:24
13 | */
14 | public interface AdminUserService extends IService {
15 |
16 | /**
17 | * 管理员登录
18 | *
19 | * @param req 管理员账号密码
20 | */
21 | AdminUserEntity login(ReqLoginVo req);
22 |
23 | }
24 |
25 |
--------------------------------------------------------------------------------
/backend/marriage-demo/src/main/java/com/jiuyu/service/ContractTemplateService.java:
--------------------------------------------------------------------------------
1 | package com.jiuyu.service;
2 |
3 | import java.util.Map;
4 |
5 | import com.baomidou.mybatisplus.extension.service.IService;
6 | import com.jiuyu.entity.ContractTemplateEntity;
7 | import com.jiuyu.utils.PageUtils;
8 |
9 | /**
10 | * 合约模板表
11 | *
12 | * @author hejiebing
13 | * @email he_jiebing@jiuyv.com
14 | * @date 2021-08-19 21:07:24
15 | */
16 | public interface ContractTemplateService extends IService {
17 |
18 | PageUtils queryPage(Map params);
19 | }
20 |
21 |
--------------------------------------------------------------------------------
/backend/marriage-demo/src/main/java/com/jiuyu/service/MarriageEvidenceService.java:
--------------------------------------------------------------------------------
1 | package com.jiuyu.service;
2 |
3 | import java.util.Map;
4 |
5 | import com.baomidou.mybatisplus.extension.service.IService;
6 | import com.jiuyu.common.R;
7 | import com.jiuyu.entity.MarriageEvidenceEntity;
8 | import com.jiuyu.utils.PageUtils;
9 | import com.jiuyu.vo.ReqCreateMarriageEvidenceVo;
10 | import com.jiuyu.vo.ReqSignVo;
11 | import com.jiuyu.vo.ResCreateMarriageEvidenceVo;
12 | import com.jiuyu.vo.ResMarriageDeatailVo;
13 |
14 | /**
15 | * 结婚存证表
16 | *
17 | * @author hejiebing
18 | * @email he_jiebing@jiuyv.com
19 | * @date 2021-08-19 21:07:24
20 | */
21 | public interface MarriageEvidenceService extends IService {
22 |
23 | PageUtils queryPage(Map params);
24 |
25 | /**
26 | * 创建结婚证书
27 | *
28 | * @param req 管理员id、男方id、女方id
29 | * @return
30 | */
31 | ResCreateMarriageEvidenceVo createMarriageEvidence(ReqCreateMarriageEvidenceVo req);
32 |
33 | /**
34 | * 签名
35 | *
36 | * @param req 管理员id、签名方id
37 | * @return
38 | */
39 | R sign(ReqSignVo req);
40 |
41 | /**
42 | * 查询详情
43 | *
44 | * @param id 证书编号
45 | * @return
46 | */
47 | ResMarriageDeatailVo queryMarriageDetail(String id);
48 | }
49 |
50 |
--------------------------------------------------------------------------------
/backend/marriage-demo/src/main/java/com/jiuyu/service/MarriageInfoService.java:
--------------------------------------------------------------------------------
1 | package com.jiuyu.service;
2 |
3 | import java.util.List;
4 | import java.util.Map;
5 |
6 | import com.baomidou.mybatisplus.extension.service.IService;
7 | import com.jiuyu.entity.MarriageInfoEntity;
8 | import com.jiuyu.utils.PageUtils;
9 |
10 | /**
11 | * 结婚证信息表
12 | *
13 | * @author hejiebing
14 | * @email he_jiebing@jiuyv.com
15 | * @date 2021-08-19 21:07:24
16 | */
17 | public interface MarriageInfoService extends IService {
18 |
19 | PageUtils queryPage(Map params);
20 |
21 | /**
22 | * 查询首页已成功的新人信息
23 | *
24 | * @return 已登记结婚的新人信息
25 | */
26 | List queryConfirmMarriageList();
27 | }
28 |
29 |
--------------------------------------------------------------------------------
/backend/marriage-demo/src/main/java/com/jiuyu/service/UserInfoService.java:
--------------------------------------------------------------------------------
1 | package com.jiuyu.service;
2 |
3 | import java.util.Map;
4 |
5 | import com.baomidou.mybatisplus.extension.service.IService;
6 | import com.jiuyu.entity.UserInfoEntity;
7 | import com.jiuyu.utils.PageUtils;
8 | import com.jiuyu.vo.ReqAddUser;
9 | import com.jiuyu.vo.ResAddUser;
10 |
11 | /**
12 | * 用户信息表
13 | *
14 | * @author hejiebing
15 | * @email he_jiebing@jiuyv.com
16 | * @date 2021-08-19 21:07:24
17 | */
18 | public interface UserInfoService extends IService {
19 |
20 | PageUtils queryPage(Map params);
21 |
22 | /**
23 | * 登记信息
24 | *
25 | * @param req 用户信息
26 | * @return
27 | */
28 | ResAddUser addUser(ReqAddUser req);
29 |
30 | }
31 |
32 |
--------------------------------------------------------------------------------
/backend/marriage-demo/src/main/java/com/jiuyu/service/impl/AdminUserServiceImpl.java:
--------------------------------------------------------------------------------
1 | package com.jiuyu.service.impl;
2 |
3 |
4 | import org.springframework.beans.factory.annotation.Autowired;
5 | import org.springframework.stereotype.Service;
6 |
7 | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
8 | import com.jiuyu.dao.AdminUserDao;
9 | import com.jiuyu.entity.AdminUserEntity;
10 | import com.jiuyu.service.AdminUserService;
11 | import com.jiuyu.vo.ReqLoginVo;
12 |
13 | @Service("adminUserService")
14 | public class AdminUserServiceImpl extends ServiceImpl implements AdminUserService {
15 |
16 | @Autowired
17 | private AdminUserDao adminUserDao;
18 |
19 | @Override
20 | public AdminUserEntity login(ReqLoginVo req) {
21 |
22 | // TODO 后续密码需要加密处理
23 | String username = req.getUsername();
24 | String password = req.getPassword();
25 |
26 | AdminUserEntity result = adminUserDao.selectAdminUser(username, password);
27 |
28 | return result;
29 | }
30 |
31 | }
--------------------------------------------------------------------------------
/backend/marriage-demo/src/main/java/com/jiuyu/service/impl/ContractTemplateServiceImpl.java:
--------------------------------------------------------------------------------
1 | package com.jiuyu.service.impl;
2 |
3 | import java.util.Map;
4 |
5 | import org.springframework.stereotype.Service;
6 |
7 | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
8 | import com.baomidou.mybatisplus.core.metadata.IPage;
9 | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
10 | import com.jiuyu.common.Query;
11 | import com.jiuyu.dao.ContractTemplateDao;
12 | import com.jiuyu.entity.ContractTemplateEntity;
13 | import com.jiuyu.service.ContractTemplateService;
14 | import com.jiuyu.utils.PageUtils;
15 |
16 |
17 | @Service("contractTemplateService")
18 | public class ContractTemplateServiceImpl extends ServiceImpl implements ContractTemplateService {
19 |
20 | @Override
21 | public PageUtils queryPage(Map params) {
22 | IPage page = this.page(
23 | new Query().getPage(params),
24 | new QueryWrapper()
25 | );
26 |
27 | return new PageUtils(page);
28 | }
29 |
30 | }
--------------------------------------------------------------------------------
/backend/marriage-demo/src/main/java/com/jiuyu/service/impl/MarriageInfoServiceImpl.java:
--------------------------------------------------------------------------------
1 | package com.jiuyu.service.impl;
2 |
3 | import java.util.List;
4 | import java.util.Map;
5 |
6 | import org.springframework.beans.factory.annotation.Autowired;
7 | import org.springframework.stereotype.Service;
8 |
9 | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
10 | import com.baomidou.mybatisplus.core.metadata.IPage;
11 | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
12 | import com.jiuyu.common.Query;
13 | import com.jiuyu.dao.MarriageInfoDao;
14 | import com.jiuyu.entity.MarriageInfoEntity;
15 | import com.jiuyu.enums.CertStatusEnum;
16 | import com.jiuyu.service.MarriageInfoService;
17 | import com.jiuyu.utils.PageUtils;
18 |
19 |
20 | @Service("marriageInfoService")
21 | public class MarriageInfoServiceImpl extends ServiceImpl implements MarriageInfoService {
22 |
23 | @Autowired
24 | private MarriageInfoDao marriageInfoDao;
25 |
26 | @Override
27 | public PageUtils queryPage(Map params) {
28 | IPage page = this.page(
29 | new Query().getPage(params),
30 | new QueryWrapper()
31 | );
32 |
33 | return new PageUtils(page);
34 | }
35 |
36 | @Override
37 | public List queryConfirmMarriageList() {
38 | List list = marriageInfoDao.selectList(new QueryWrapper().eq("cert_status", CertStatusEnum.CONFIRMED.getMsg()));
39 | return list;
40 | }
41 |
42 | }
--------------------------------------------------------------------------------
/backend/marriage-demo/src/main/java/com/jiuyu/service/impl/UserInfoServiceImpl.java:
--------------------------------------------------------------------------------
1 | package com.jiuyu.service.impl;
2 |
3 | import java.time.Instant;
4 | import java.util.Date;
5 | import java.util.Map;
6 |
7 | import org.slf4j.Logger;
8 | import org.slf4j.LoggerFactory;
9 | import org.springframework.beans.BeanUtils;
10 | import org.springframework.beans.factory.annotation.Autowired;
11 | import org.springframework.beans.factory.annotation.Value;
12 | import org.springframework.stereotype.Service;
13 | import org.springframework.transaction.annotation.Propagation;
14 | import org.springframework.transaction.annotation.Transactional;
15 | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
16 | import com.baomidou.mybatisplus.core.metadata.IPage;
17 | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
18 | import com.jiuyu.common.GlobalConstant;
19 | import com.jiuyu.common.Query;
20 | import com.jiuyu.dao.ContractTemplateDao;
21 | import com.jiuyu.dao.UserInfoDao;
22 | import com.jiuyu.entity.UserInfoEntity;
23 | import com.jiuyu.enums.MarriageStatusEnum;
24 | import com.jiuyu.service.UserInfoService;
25 | import com.jiuyu.utils.PageUtils;
26 | import com.jiuyu.vo.ReqAddUser;
27 | import com.jiuyu.vo.ResAddUser;
28 | import com.webank.webase.app.sdk.client.AppClient;
29 | import com.webank.webase.app.sdk.config.HttpConfig;
30 | import com.webank.webase.app.sdk.dto.req.ReqNewUser;
31 | import com.webank.webase.app.sdk.dto.rsp.RspUserInfo;
32 |
33 |
34 | @Service("userInfoService")
35 | public class UserInfoServiceImpl extends ServiceImpl implements UserInfoService {
36 | @Value("${webase.node.mgr.url}")
37 | private String url;
38 |
39 | @Value("${webase.node.mgr.appKey}")
40 | private String appKey;
41 |
42 | @Value("${webase.node.mgr.appSecret}")
43 | private String appSecret;
44 |
45 | @Value("${webase.node.mgr.isTransferEncrypt}")
46 | private Boolean isTransferEncrypt;
47 |
48 | @Autowired
49 | private UserInfoDao userInfoDao;
50 |
51 | private static AppClient appClient = null;
52 |
53 | private static final String ACCOUNT = "admin";
54 |
55 | private static final String CONTRACT_VERSION = "1.0.0";
56 |
57 | @Override
58 | public PageUtils queryPage(Map params) {
59 | IPage page = this.page(
60 | new Query().getPage(params),
61 | new QueryWrapper()
62 | );
63 |
64 | return new PageUtils(page);
65 | }
66 |
67 | @Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class)
68 | @Override
69 | public ResAddUser addUser(ReqAddUser req) {
70 | // 1.先落地tbl_user_info 表
71 | String username = req.getUsername();
72 | Date date = Date.from(Instant.now());
73 | UserInfoEntity userEntity = new UserInfoEntity();
74 | BeanUtils.copyProperties(req, userEntity);
75 | userEntity.setInsertTime(date);
76 | userEntity.setUpdateTime(date);
77 |
78 | // 2.调用WeBASE-APP-SDK 获取用户公钥地址等信息
79 | ReqNewUser reqNewUser = new ReqNewUser();
80 | reqNewUser.setGroupId(1);
81 | reqNewUser.setUserName(userEntity.getUsername());
82 | reqNewUser.setAccount(ACCOUNT);
83 | reqNewUser.setDescription(GlobalConstant.APP_PREIX + username);
84 | HttpConfig httpConfig = new HttpConfig(30, 30, 30);
85 | appClient = new AppClient(url, appKey, appSecret, isTransferEncrypt, httpConfig);
86 | RspUserInfo resp = appClient.newUser(reqNewUser);
87 | String address = resp.getAddress();
88 | String signUserId = resp.getSignUserId();
89 | String privateKey = resp.getPrivateKey();
90 | userEntity.setSignUserId(signUserId);
91 | userEntity.setPublicAddress(address);
92 | userEntity.setPrivateKey(privateKey);
93 |
94 | userEntity.setMarriageStatus(MarriageStatusEnum.NEW_USER.getCode());
95 | userInfoDao.insert(userEntity);
96 | ResAddUser res = new ResAddUser();
97 | res.setTxHash(req.getUsername() + "添加成功");
98 | return res;
99 | }
100 | }
--------------------------------------------------------------------------------
/backend/marriage-demo/src/main/java/com/jiuyu/utils/HttpUtils.java:
--------------------------------------------------------------------------------
1 | package com.jiuyu.utils;
2 |
3 | import cn.hutool.http.HttpUtil;
4 |
5 | import java.util.Map;
6 |
7 | /**
8 | * @author chengliang
9 | * @date 2021/08/14 11:11
10 | */
11 | public class HttpUtils {
12 |
13 | private HttpUtils() {
14 | throw new AssertionError("No java.nio.charset.StandardCharsets instances for you!");
15 | }
16 |
17 | /**
18 | * 设置超时时间60秒
19 | */
20 | public static final int TIMEOUT = 60 * 1000;
21 |
22 |
23 | /**
24 | * http get 参数传参
25 | *
26 | * @param url
27 | * @param param
28 | * @return
29 | */
30 | public static String httpGet(String url, Map param) {
31 | return HttpUtil.get(url, param, TIMEOUT);
32 | }
33 |
34 | /**
35 | * http post + map
36 | *
37 | * @param url
38 | * @param param
39 | * @return
40 | */
41 | public static String httpPost(String url, Map param) {
42 | return HttpUtil.post(url, param, TIMEOUT);
43 | }
44 |
45 | /**
46 | * http post + json
47 | *
48 | * @param url
49 | * @param jsonStr
50 | * @return
51 | */
52 | public static String httpPostByJson(String url, String jsonStr) {
53 | return HttpUtil.post(url, jsonStr, TIMEOUT);
54 | }
55 |
56 | }
57 |
--------------------------------------------------------------------------------
/backend/marriage-demo/src/main/java/com/jiuyu/utils/PageUtils.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2016-2019 人人开源 All rights reserved.
3 | *
4 | * https://www.renren.io
5 | *
6 | * 版权所有,侵权必究!
7 | */
8 |
9 | package com.jiuyu.utils;
10 |
11 | import com.baomidou.mybatisplus.core.metadata.IPage;
12 |
13 | import java.io.Serializable;
14 | import java.util.List;
15 |
16 | /**
17 | * 分页工具类
18 | *
19 | * @author Mark sunlightcs@gmail.com
20 | */
21 | public class PageUtils implements Serializable {
22 |
23 | private static final long serialVersionUID = 1L;
24 | /**
25 | * 总记录数
26 | */
27 | private int totalCount;
28 | /**
29 | * 每页记录数
30 | */
31 | private int pageSize;
32 | /**
33 | * 总页数
34 | */
35 | private int totalPage;
36 | /**
37 | * 当前页数
38 | */
39 | private int currPage;
40 | /**
41 | * 列表数据
42 | */
43 | private List> list;
44 |
45 | /**
46 | * 分页
47 | * @param list 列表数据
48 | * @param totalCount 总记录数
49 | * @param pageSize 每页记录数
50 | * @param currPage 当前页数
51 | */
52 | public PageUtils(List> list, int totalCount, int pageSize, int currPage) {
53 | this.list = list;
54 | this.totalCount = totalCount;
55 | this.pageSize = pageSize;
56 | this.currPage = currPage;
57 | this.totalPage = (int)Math.ceil((double)totalCount/pageSize);
58 | }
59 |
60 | /**
61 | * 分页
62 | */
63 | public PageUtils(IPage> page) {
64 | this.list = page.getRecords();
65 | this.totalCount = (int)page.getTotal();
66 | this.pageSize = (int)page.getSize();
67 | this.currPage = (int)page.getCurrent();
68 | this.totalPage = (int)page.getPages();
69 | }
70 |
71 | public int getTotalCount() {
72 | return totalCount;
73 | }
74 |
75 | public void setTotalCount(int totalCount) {
76 | this.totalCount = totalCount;
77 | }
78 |
79 | public int getPageSize() {
80 | return pageSize;
81 | }
82 |
83 | public void setPageSize(int pageSize) {
84 | this.pageSize = pageSize;
85 | }
86 |
87 | public int getTotalPage() {
88 | return totalPage;
89 | }
90 |
91 | public void setTotalPage(int totalPage) {
92 | this.totalPage = totalPage;
93 | }
94 |
95 | public int getCurrPage() {
96 | return currPage;
97 | }
98 |
99 | public void setCurrPage(int currPage) {
100 | this.currPage = currPage;
101 | }
102 |
103 | public List> getList() {
104 | return list;
105 | }
106 |
107 | public void setList(List> list) {
108 | this.list = list;
109 | }
110 |
111 | }
112 |
--------------------------------------------------------------------------------
/backend/marriage-demo/src/main/java/com/jiuyu/vo/ReqAddUser.java:
--------------------------------------------------------------------------------
1 | package com.jiuyu.vo;
2 |
3 | import java.io.Serializable;
4 |
5 | /**
6 | * Title: ReqAddUser
7 | * Description:
8 | * @author he_jiebing@jiuyv.com
9 | @date 2021年8月19日 下午10:43:26
10 | */
11 |
12 | public class ReqAddUser implements Serializable{
13 |
14 | /**
15 | * serialVersionUID
16 | */
17 | private static final long serialVersionUID = -7338514675327325683L;
18 |
19 | private Long adminUserId;
20 |
21 | /**
22 | * 姓名
23 | */
24 | private String username;
25 | /**
26 | * 身份证信息
27 | */
28 | private String idCard;
29 | /**
30 | * 年龄
31 | */
32 | private Integer age;
33 | /**
34 | * 性别
35 | */
36 | private String sex;
37 | /**
38 | * 家庭住址
39 | */
40 | private String familyAddress;
41 |
42 |
43 | public Long getAdminUserId() {
44 | return adminUserId;
45 | }
46 | public void setAdminUserId(Long adminUserId) {
47 | this.adminUserId = adminUserId;
48 | }
49 | public String getUsername() {
50 | return username;
51 | }
52 | public void setUsername(String username) {
53 | this.username = username;
54 | }
55 | public String getIdCard() {
56 | return idCard;
57 | }
58 | public void setIdCard(String idCard) {
59 | this.idCard = idCard;
60 | }
61 | public Integer getAge() {
62 | return age;
63 | }
64 | public void setAge(Integer age) {
65 | this.age = age;
66 | }
67 | public String getSex() {
68 | return sex;
69 | }
70 | public void setSex(String sex) {
71 | this.sex = sex;
72 | }
73 | public String getFamilyAddress() {
74 | return familyAddress;
75 | }
76 | public void setFamilyAddress(String familyAddress) {
77 | this.familyAddress = familyAddress;
78 | }
79 |
80 |
81 |
82 | }
83 |
--------------------------------------------------------------------------------
/backend/marriage-demo/src/main/java/com/jiuyu/vo/ReqCreateMarriageEvidenceVo.java:
--------------------------------------------------------------------------------
1 | package com.jiuyu.vo;
2 |
3 | import java.io.Serializable;
4 |
5 | /**
6 | * Title: ReqCreateMarriageEvidenceVo
7 | * Description:
8 | *
9 | * @author he_jiebing@jiuyv.com
10 | * @date 2021年8月20日 上午9:51:42
11 | */
12 |
13 | public class ReqCreateMarriageEvidenceVo implements Serializable {
14 |
15 | /**
16 | * serialVersionUID
17 | */
18 | private static final long serialVersionUID = 1861595425924703910L;
19 |
20 | private Long adminUserId;
21 |
22 | private Long maleUserId;
23 |
24 | private Long femaleUserId;
25 |
26 | private Long witnessUserId;
27 |
28 | public Long getAdminUserId() {
29 | return adminUserId;
30 | }
31 |
32 | public void setAdminUserId(Long adminUserId) {
33 | this.adminUserId = adminUserId;
34 | }
35 |
36 | public Long getMaleUserId() {
37 | return maleUserId;
38 | }
39 |
40 | public void setMaleUserId(Long maleUserId) {
41 | this.maleUserId = maleUserId;
42 | }
43 |
44 | public Long getFemaleUserId() {
45 | return femaleUserId;
46 | }
47 |
48 | public void setFemaleUserId(Long femaleUserId) {
49 | this.femaleUserId = femaleUserId;
50 | }
51 |
52 | public Long getWitnessUserId() {
53 | return witnessUserId;
54 | }
55 |
56 | public void setWitnessUserId(Long witnessUserId) {
57 | this.witnessUserId = witnessUserId;
58 | }
59 | }
60 |
--------------------------------------------------------------------------------
/backend/marriage-demo/src/main/java/com/jiuyu/vo/ReqLoginVo.java:
--------------------------------------------------------------------------------
1 | package com.jiuyu.vo;
2 |
3 | import java.io.Serializable;
4 |
5 | /**
6 | * Title: ReqLoginVo
7 | * Description:
8 | * @author he_jiebing@jiuyv.com
9 | @date 2021年8月19日 下午10:07:05
10 | */
11 |
12 | public class ReqLoginVo implements Serializable{
13 |
14 | /**
15 | * serialVersionUID
16 | */
17 | private static final long serialVersionUID = 8112832851657681932L;
18 |
19 | private String username;
20 |
21 | private String password;
22 |
23 | public String getUsername() {
24 | return username;
25 | }
26 |
27 | public void setUsername(String username) {
28 | this.username = username;
29 | }
30 |
31 | public String getPassword() {
32 | return password;
33 | }
34 |
35 | public void setPassword(String password) {
36 | this.password = password;
37 | }
38 |
39 |
40 |
41 | }
42 |
--------------------------------------------------------------------------------
/backend/marriage-demo/src/main/java/com/jiuyu/vo/ReqNull.java:
--------------------------------------------------------------------------------
1 | package com.jiuyu.vo;
2 |
3 | import java.io.Serializable;
4 |
5 | /**
6 | * Title: ReqNull
7 | * Description:
8 | * @author he_jiebing@jiuyv.com
9 | @date 2021年8月20日 下午5:08:59
10 | */
11 |
12 | public class ReqNull implements Serializable{
13 |
14 | /**
15 | * serialVersionUID
16 | */
17 | private static final long serialVersionUID = 1L;
18 |
19 |
20 |
21 |
22 | }
23 |
--------------------------------------------------------------------------------
/backend/marriage-demo/src/main/java/com/jiuyu/vo/ReqSignVo.java:
--------------------------------------------------------------------------------
1 | package com.jiuyu.vo;
2 |
3 | import java.io.Serializable;
4 |
5 | /**
6 | * Title: ReqSignVo
7 | * Description:
8 | *
9 | * @author he_jiebing@jiuyv.com
10 | * @date 2021年8月20日 上午11:09:12
11 | */
12 |
13 | public class ReqSignVo implements Serializable {
14 |
15 | /**
16 | * serialVersionUID
17 | */
18 | private static final long serialVersionUID = 1L;
19 |
20 | private Long adminUserId;
21 |
22 | private Long userId;
23 |
24 | private String certificateNumber;
25 |
26 | public Long getAdminUserId() {
27 | return adminUserId;
28 | }
29 |
30 | public void setAdminUserId(Long adminUserId) {
31 | this.adminUserId = adminUserId;
32 | }
33 |
34 | public Long getUserId() {
35 | return userId;
36 | }
37 |
38 | public void setUserId(Long userId) {
39 | this.userId = userId;
40 | }
41 |
42 | public String getCertificateNumber() {
43 | return certificateNumber;
44 | }
45 |
46 | public void setCertificateNumber(String certificateNumber) {
47 | this.certificateNumber = certificateNumber;
48 | }
49 | }
50 |
--------------------------------------------------------------------------------
/backend/marriage-demo/src/main/java/com/jiuyu/vo/ResAddUser.java:
--------------------------------------------------------------------------------
1 | package com.jiuyu.vo;
2 |
3 | import java.io.Serializable;
4 |
5 | /**
6 | * Title: ResAddUser
7 | * Description:
8 | * @author he_jiebing@jiuyv.com
9 | @date 2021年8月19日 下午10:55:23
10 | */
11 |
12 | public class ResAddUser implements Serializable{
13 |
14 | /**
15 | * serialVersionUID
16 | */
17 | private static final long serialVersionUID = 1L;
18 | private String txHash;
19 |
20 | public String getTxHash() {
21 | return txHash;
22 | }
23 |
24 | public void setTxHash(String txHash) {
25 | this.txHash = txHash;
26 | }
27 |
28 |
29 |
30 | }
31 |
--------------------------------------------------------------------------------
/backend/marriage-demo/src/main/java/com/jiuyu/vo/ResCreateMarriageEvidenceVo.java:
--------------------------------------------------------------------------------
1 | package com.jiuyu.vo;
2 |
3 | import java.io.Serializable;
4 |
5 | /**
6 | * Title: ResCreateMarriageEvidenceVo
7 | * Description:
8 | * @author he_jiebing@jiuyv.com
9 | @date 2021年8月20日 上午9:52:09
10 | */
11 |
12 | public class ResCreateMarriageEvidenceVo implements Serializable{
13 |
14 | /**
15 | * serialVersionUID
16 | */
17 | private static final long serialVersionUID = 800076333440519120L;
18 |
19 | private String txHash;
20 |
21 | public String getTxHash() {
22 | return txHash;
23 | }
24 |
25 | public void setTxHash(String txHash) {
26 | this.txHash = txHash;
27 | }
28 |
29 |
30 |
31 | }
32 |
--------------------------------------------------------------------------------
/backend/marriage-demo/src/main/java/com/jiuyu/vo/ResIndexVo.java:
--------------------------------------------------------------------------------
1 | package com.jiuyu.vo;
2 |
3 | import java.io.Serializable;
4 |
5 | /**
6 | * Title: ResIndexVo
7 | * Description:
8 | * @author he_jiebing@jiuyv.com
9 | @date 2021年8月19日 下午10:29:21
10 | */
11 |
12 | public class ResIndexVo implements Serializable{
13 |
14 | /**
15 | * serialVersionUID
16 | */
17 | private static final long serialVersionUID = -8097283499291122524L;
18 |
19 | private String maleUsername;
20 |
21 | private String femaleUsername;
22 |
23 | private String marriageDesc;
24 |
25 | public String getMaleUsername() {
26 | return maleUsername;
27 | }
28 |
29 | public void setMaleUsername(String maleUsername) {
30 | this.maleUsername = maleUsername;
31 | }
32 |
33 | public String getFemaleUsername() {
34 | return femaleUsername;
35 | }
36 |
37 | public void setFemaleUsername(String femaleUsername) {
38 | this.femaleUsername = femaleUsername;
39 | }
40 |
41 | public String getMarriageDesc() {
42 | return marriageDesc;
43 | }
44 |
45 | public void setMarriageDesc(String marriageDesc) {
46 | this.marriageDesc = marriageDesc;
47 | }
48 |
49 |
50 |
51 | }
52 |
--------------------------------------------------------------------------------
/backend/marriage-demo/src/main/java/com/jiuyu/vo/ResLoginVo.java:
--------------------------------------------------------------------------------
1 | package com.jiuyu.vo;
2 |
3 | import java.io.Serializable;
4 |
5 | /**
6 | * Title: ResLoginVo
7 | * Description:
8 | * @author he_jiebing@jiuyv.com
9 | @date 2021年8月20日 下午2:04:21
10 | */
11 |
12 | public class ResLoginVo implements Serializable{
13 |
14 | /**
15 | * serialVersionUID
16 | */
17 | private static final long serialVersionUID = -504298366794258582L;
18 |
19 | /**
20 | * 姓名
21 | */
22 | private String username;
23 |
24 | private Long adminUserId;
25 |
26 | public String getUsername() {
27 | return username;
28 | }
29 |
30 | public void setUsername(String username) {
31 | this.username = username;
32 | }
33 |
34 | public Long getAdminUserId() {
35 | return adminUserId;
36 | }
37 |
38 | public void setAdminUserId(Long adminUserId) {
39 | this.adminUserId = adminUserId;
40 | }
41 |
42 |
43 |
44 | }
45 |
--------------------------------------------------------------------------------
/backend/marriage-demo/src/main/java/com/jiuyu/vo/ResMarriageDeatailVo.java:
--------------------------------------------------------------------------------
1 | package com.jiuyu.vo;
2 |
3 | import java.io.Serializable;
4 | import java.util.Date;
5 |
6 | /**
7 | * Title: ResMarriageDeatailVo
8 | * Description:
9 | *
10 | * @author he_jiebing@jiuyv.com
11 | * @date 2021年8月20日 下午3:54:16
12 | */
13 |
14 | public class ResMarriageDeatailVo implements Serializable {
15 |
16 | /**
17 | * serialVersionUID
18 | */
19 | private static final long serialVersionUID = 7775857195217837728L;
20 |
21 | private String maleUsername;
22 |
23 | private String maleSignStatus;
24 |
25 | private String femaleUsername;
26 |
27 | private String femaleSignStatus;
28 |
29 | private String witnessUsername;
30 |
31 | private String witnessSignStatus;
32 |
33 | private String certStatus;
34 |
35 | private String marriageDesc;
36 |
37 | private String certificateNumber;
38 |
39 | private Date updateTime;
40 |
41 |
42 | public String getMaleSignStatus() {
43 | return maleSignStatus;
44 | }
45 |
46 | public void setMaleSignStatus(String maleSignStatus) {
47 | this.maleSignStatus = maleSignStatus;
48 | }
49 |
50 | public String getFemaleSignStatus() {
51 | return femaleSignStatus;
52 | }
53 |
54 | public void setFemaleSignStatus(String femaleSignStatus) {
55 | this.femaleSignStatus = femaleSignStatus;
56 | }
57 |
58 | public Date getUpdateTime() {
59 | return updateTime;
60 | }
61 |
62 | public void setUpdateTime(Date updateTime) {
63 | this.updateTime = updateTime;
64 | }
65 |
66 | public String getMaleUsername() {
67 | return maleUsername;
68 | }
69 |
70 | public void setMaleUsername(String maleUsername) {
71 | this.maleUsername = maleUsername;
72 | }
73 |
74 | public String getFemaleUsername() {
75 | return femaleUsername;
76 | }
77 |
78 | public void setFemaleUsername(String femaleUsername) {
79 | this.femaleUsername = femaleUsername;
80 | }
81 |
82 | public String getCertStatus() {
83 | return certStatus;
84 | }
85 |
86 | public void setCertStatus(String certStatus) {
87 | this.certStatus = certStatus;
88 | }
89 |
90 | public String getMarriageDesc() {
91 | return marriageDesc;
92 | }
93 |
94 | public void setMarriageDesc(String marriageDesc) {
95 | this.marriageDesc = marriageDesc;
96 | }
97 |
98 | public String getWitnessUsername() {
99 | return witnessUsername;
100 | }
101 |
102 | public void setWitnessUsername(String witnessUsername) {
103 | this.witnessUsername = witnessUsername;
104 | }
105 |
106 | public String getCertificateNumber() {
107 | return certificateNumber;
108 | }
109 |
110 | public void setCertificateNumber(String certificateNumber) {
111 | this.certificateNumber = certificateNumber;
112 | }
113 |
114 | public String getWitnessSignStatus() {
115 | return witnessSignStatus;
116 | }
117 |
118 | public void setWitnessSignStatus(String witnessSignStatus) {
119 | this.witnessSignStatus = witnessSignStatus;
120 | }
121 | }
122 |
--------------------------------------------------------------------------------
/backend/marriage-demo/src/main/java/com/jiuyu/vo/ResSignVo.java:
--------------------------------------------------------------------------------
1 | package com.jiuyu.vo;
2 |
3 | import java.io.Serializable;
4 |
5 | /**
6 | * Title: ResSignVo
7 | * Description:
8 | * @author he_jiebing@jiuyv.com
9 | @date 2021年8月20日 上午11:10:29
10 | */
11 |
12 | public class ResSignVo implements Serializable{
13 |
14 | /**
15 | * serialVersionUID
16 | */
17 | private static final long serialVersionUID = -8468721294075037960L;
18 |
19 | private String txHash;
20 |
21 | public String getTxHash() {
22 | return txHash;
23 | }
24 |
25 | public void setTxHash(String txHash) {
26 | this.txHash = txHash;
27 | }
28 |
29 |
30 |
31 | }
32 |
--------------------------------------------------------------------------------
/backend/marriage-demo/src/main/resources/abi/MarriageEvidence.abi:
--------------------------------------------------------------------------------
1 | [{"constant":true,"inputs":[{"name":"_certificateNumber","type":"string"}],"name":"getEviCharacter","outputs":[{"name":"","type":"address"},{"name":"","type":"string"},{"name":"","type":"address"},{"name":"","type":"string"},{"name":"","type":"address"},{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_certificateNumber","type":"string"},{"name":"_husband","type":"address"},{"name":"_husbandSummary","type":"string"},{"name":"_wife","type":"address"},{"name":"_wifeSummary","type":"string"},{"name":"_witness","type":"address"},{"name":"_witnessName","type":"bytes32"}],"name":"deployEvi","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_certificateNumber","type":"string"}],"name":"sign","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"_certificateNumber","type":"string"}],"name":"getEvi","outputs":[{"name":"","type":"string"},{"name":"","type":"address[]"},{"name":"","type":"address[]"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_certificateNumber","type":"string"},{"name":"_evi","type":"string"}],"name":"newEvi","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"_certificateNumber","type":"string"}],"name":"checkEviSigned","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"inputs":[],"payable":false,"stateMutability":"nonpayable","type":"constructor"}]
--------------------------------------------------------------------------------
/backend/marriage-demo/src/main/resources/application.properties:
--------------------------------------------------------------------------------
1 | spring.application.name=marriage-demo
2 | ### Required, node's {ip:port} to connect.
3 | system.peers=ip:port
4 | ### Required
5 | system.groupId=1
6 | ### Optional. Default will search conf,config,src/main/conf/src/main/config
7 | system.certPath=conf,config,src/main/resources/conf,src/main/resources/config
8 | ### Optional. If don't specify a random private key will be used
9 | system.hexPrivateKey=5b426e4032c15af462b9ecc32cc76c409fe5e8a125410858d3f51928cf5f2fe7
10 | ### Optional. Please fill this address if you want to use related service
11 | system.contract.marriageEvidenceAddress=0x05b594f748b902d4c4f248f05b95233457ac885d
12 | ### ### Springboot server config
13 | server.port=8080
14 | server.session.timeout=60
15 | banner.charset=UTF-8
16 | ### Datasource
17 | spring.datasource.username=
18 | spring.datasource.password=
19 | spring.datasource.url=jdbc:mysql://ip:port/marriage_demo
20 | spring.datasource.type=com.zaxxer.hikari.HikariDataSource
21 | spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
22 | spring.datasource.hikari.connection-timeout=30000
23 | spring.datasource.hikari.minimum-idle=10
24 | spring.datasource.hikari.maximum-pool-size=20
25 | spring.datasource.hikari.auto-commit=true
26 | spring.datasource.hikari.idle-timeout=600000
27 | spring.datasource.hikari.pool-name=DateSourceHikariCP
28 | spring.datasource.hikari.max-lifetime=1800000
29 | spring.datasource.hikari.connection-test-query=SELECT 1
30 | # webase-node-mgr的IP与端口
31 | webase.node.mgr.url=http://ip:port
32 | # webase管理台-应用管理,创建自定义应用生成的appKey
33 | webase.node.mgr.appKey=Eju9tYqe
34 | # webase管理台-应用管理,创建自定义应用生成的appSecret
35 | webase.node.mgr.appSecret=zvJk4T7gaxPifZZircMVkqVEK3ZHdnVj
36 | # 是否加密传输
37 | webase.node.mgr.isTransferEncrypt=true
38 | #pagehelper分页插件配置
39 | pagehelper.helperDialect=mysql
40 | pagehelper.reasonable=true
41 | pagehelper.supportMethodsArguments=true
42 | pagehelper.params=count=countSql
43 | # page-size-zero:默认值为 false,当该参数设置为 true 时,如果 pageSize=0 或者 RowBounds.limit = 0 就会查询出全部的结果
44 | #pagehelper.page-size-zero=true
45 | # mybatis-plus 配置
46 | mybatis-plus.mapper-locations=classpath:/mapper/**/*.xml
47 | # 日志配置
48 | logging.config=classpath:logback-boot.xml
49 | # 打印日志级别
50 | logging.level.com.jiuyu.dao=DEBUG
51 | # 返回json的全局时间格式
52 | spring.jackson.date-format=yyyy-MM-dd HH:mm:ss
53 | spring.jackson.time-zone=GMT+8
--------------------------------------------------------------------------------
/backend/marriage-demo/src/main/resources/conf/ca.crt:
--------------------------------------------------------------------------------
1 | -----BEGIN CERTIFICATE-----
2 | MIIBsTCCAVagAwIBAgIJAK3PC6jOVbziMAoGCCqGSM49BAMCMDUxDjAMBgNVBAMM
3 | BWNoYWluMRMwEQYDVQQKDApmaXNjby1iY29zMQ4wDAYDVQQLDAVjaGFpbjAgFw0y
4 | MTA5MTcwNTU3MjhaGA8yMTIxMDgyNDA1NTcyOFowNTEOMAwGA1UEAwwFY2hhaW4x
5 | EzARBgNVBAoMCmZpc2NvLWJjb3MxDjAMBgNVBAsMBWNoYWluMFYwEAYHKoZIzj0C
6 | AQYFK4EEAAoDQgAEidmpsj4htakKoabQILlcEQZlGkFfGFTW/ozSdgyfqv9aAYjb
7 | ULGQgCWTqoHt/6uIn4Rnc/6qGvw1iphBlz/EMqNQME4wHQYDVR0OBBYEFMXzZp7C
8 | 3nmR1csK8j7dMn6m0HDJMB8GA1UdIwQYMBaAFMXzZp7C3nmR1csK8j7dMn6m0HDJ
9 | MAwGA1UdEwQFMAMBAf8wCgYIKoZIzj0EAwIDSQAwRgIhAOJRjT1U+CzmUzCmvarX
10 | AZmforjS69YNFHbYkHBtaDwzAiEAlGlENr5DFJEg96hILuhytyALOigzOC1o1ak8
11 | CkNiX3A=
12 | -----END CERTIFICATE-----
13 |
--------------------------------------------------------------------------------
/backend/marriage-demo/src/main/resources/conf/sdk.crt:
--------------------------------------------------------------------------------
1 | -----BEGIN CERTIFICATE-----
2 | MIIBeDCCAR6gAwIBAgIJAKbRjNBbb4fUMAoGCCqGSM49BAMCMDcxDzANBgNVBAMM
3 | BmFnZW5jeTETMBEGA1UECgwKZmlzY28tYmNvczEPMA0GA1UECwwGYWdlbmN5MCAX
4 | DTIxMDkxNzA1NTcyOFoYDzIxMjEwODI0MDU1NzI4WjAxMQwwCgYDVQQDDANzZGsx
5 | EzARBgNVBAoMCmZpc2NvLWJjb3MxDDAKBgNVBAsMA3NkazBWMBAGByqGSM49AgEG
6 | BSuBBAAKA0IABPrIoax36GvTL7uQzhQQZxWtHJsQ1eatsGXnl6X3/1b5U+UbsT6Y
7 | KLvplB6if9Gu7wQFwAR3h792Sn/dv+Vt9hOjGjAYMAkGA1UdEwQCMAAwCwYDVR0P
8 | BAQDAgXgMAoGCCqGSM49BAMCA0gAMEUCIG5Mz/EkJsebFMeZ1z6sulOsXcTOVz3D
9 | 3HDiKkwBD1c9AiEA2kw9K3Q1tonVRS4QTWCUgvWRUVUesWOQUkW23XLhmJY=
10 | -----END CERTIFICATE-----
11 | -----BEGIN CERTIFICATE-----
12 | MIIBbzCCARagAwIBAgIJAI68tgZoNQvLMAoGCCqGSM49BAMCMDUxDjAMBgNVBAMM
13 | BWNoYWluMRMwEQYDVQQKDApmaXNjby1iY29zMQ4wDAYDVQQLDAVjaGFpbjAeFw0y
14 | MTA5MTcwNTU3MjhaFw0zMTA5MTUwNTU3MjhaMDcxDzANBgNVBAMMBmFnZW5jeTET
15 | MBEGA1UECgwKZmlzY28tYmNvczEPMA0GA1UECwwGYWdlbmN5MFYwEAYHKoZIzj0C
16 | AQYFK4EEAAoDQgAE5RPWP7q3S4i6NGGiLWtM1wmFkmaZrih7vB/167FxfeNe2mcC
17 | +HUNVnk5OiR3Ss7rYCIvQO7ocPD4otGA6Y7HCKMQMA4wDAYDVR0TBAUwAwEB/zAK
18 | BggqhkjOPQQDAgNHADBEAiBt9rLcNB1KA4HYTwFmWeYBI7FTeZOfZyfNum/cFKG+
19 | RwIgUrkdTkBcgB8/w36mWvjpC+/K/ULiU1hOMqt16zNlRfA=
20 | -----END CERTIFICATE-----
21 | -----BEGIN CERTIFICATE-----
22 | MIIBsTCCAVagAwIBAgIJAK3PC6jOVbziMAoGCCqGSM49BAMCMDUxDjAMBgNVBAMM
23 | BWNoYWluMRMwEQYDVQQKDApmaXNjby1iY29zMQ4wDAYDVQQLDAVjaGFpbjAgFw0y
24 | MTA5MTcwNTU3MjhaGA8yMTIxMDgyNDA1NTcyOFowNTEOMAwGA1UEAwwFY2hhaW4x
25 | EzARBgNVBAoMCmZpc2NvLWJjb3MxDjAMBgNVBAsMBWNoYWluMFYwEAYHKoZIzj0C
26 | AQYFK4EEAAoDQgAEidmpsj4htakKoabQILlcEQZlGkFfGFTW/ozSdgyfqv9aAYjb
27 | ULGQgCWTqoHt/6uIn4Rnc/6qGvw1iphBlz/EMqNQME4wHQYDVR0OBBYEFMXzZp7C
28 | 3nmR1csK8j7dMn6m0HDJMB8GA1UdIwQYMBaAFMXzZp7C3nmR1csK8j7dMn6m0HDJ
29 | MAwGA1UdEwQFMAMBAf8wCgYIKoZIzj0EAwIDSQAwRgIhAOJRjT1U+CzmUzCmvarX
30 | AZmforjS69YNFHbYkHBtaDwzAiEAlGlENr5DFJEg96hILuhytyALOigzOC1o1ak8
31 | CkNiX3A=
32 | -----END CERTIFICATE-----
33 |
--------------------------------------------------------------------------------
/backend/marriage-demo/src/main/resources/conf/sdk.key:
--------------------------------------------------------------------------------
1 | -----BEGIN PRIVATE KEY-----
2 | MIGEAgEAMBAGByqGSM49AgEGBSuBBAAKBG0wawIBAQQgaM/GrgW6cPKPV3cXS9DB
3 | fNUJ2FP2y4L1jvl9lIpvA0ShRANCAAT6yKGsd+hr0y+7kM4UEGcVrRybENXmrbBl
4 | 55el9/9W+VPlG7E+mCi76ZQeon/Rru8EBcAEd4e/dkp/3b/lbfYT
5 | -----END PRIVATE KEY-----
6 |
--------------------------------------------------------------------------------
/backend/marriage-demo/src/main/resources/mapper/AdminUserDao.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/backend/marriage-demo/src/main/resources/mapper/ContractTemplateDao.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/backend/marriage-demo/src/main/resources/mapper/MarriageEvidenceDao.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
25 |
26 |
--------------------------------------------------------------------------------
/backend/marriage-demo/src/main/resources/mapper/MarriageInfoDao.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
34 |
35 |
--------------------------------------------------------------------------------
/backend/marriage-demo/src/main/resources/mapper/UserInfoDao.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/backend/marriage-demo/src/test/java/com/jiuyu/test/TestMain.java:
--------------------------------------------------------------------------------
1 | package com.jiuyu.test;
2 |
3 | import cn.hutool.json.JSONUtil;
4 |
5 | import com.jiuyu.vo.ReqAddUser;
6 |
7 | /**
8 | * Title: TestMain
9 | * Description:
10 | * @author he_jiebing@jiuyv.com
11 | @date 2021年8月20日 下午12:33:59
12 | */
13 |
14 | public class TestMain {
15 |
16 | public static void main(String[] args) {
17 | testMale();
18 | //testFemale();
19 | }
20 |
21 | public static void testMale(){
22 | ReqAddUser req = new ReqAddUser();
23 |
24 | req.setAdminUserId(1L);
25 | req.setAge(28);
26 | req.setIdCard("340827199309879876");
27 | req.setFamilyAddress("上海市松江区泽悦路212弄");
28 | req.setSex("male");
29 | req.setUsername("Bob0820_4");
30 | System.out.println(JSONUtil.toJsonPrettyStr(req));
31 | }
32 |
33 | public static void testFemale(){
34 | ReqAddUser req = new ReqAddUser();
35 |
36 | req.setAdminUserId(1L);
37 | req.setAge(27);
38 | req.setIdCard("340827199309871230");
39 | req.setFamilyAddress("上海市徐汇区虹漕路421号");
40 | req.setSex("female");
41 | req.setUsername("Alice0820");
42 | System.out.println(JSONUtil.toJsonPrettyStr(req));
43 | }
44 |
45 | }
46 |
--------------------------------------------------------------------------------
/frontend/marriage/.env.development:
--------------------------------------------------------------------------------
1 | # just a flag
2 | ENV = 'development'
3 |
4 | # base api
5 | VUE_APP_BASE_API = '/marriage'
6 |
--------------------------------------------------------------------------------
/frontend/marriage/.env.production:
--------------------------------------------------------------------------------
1 | # just a flag
2 | ENV = 'production'
3 |
4 | # base api
5 | VUE_APP_BASE_API = '/marriage'
6 |
7 |
--------------------------------------------------------------------------------
/frontend/marriage/.env.staging:
--------------------------------------------------------------------------------
1 | NODE_ENV = production
2 |
3 | # just a flag
4 | ENV = 'staging'
5 |
6 | # base api
7 | VUE_APP_BASE_API = '/marriage'
8 |
9 |
--------------------------------------------------------------------------------
/frontend/marriage/.eslintignore:
--------------------------------------------------------------------------------
1 | build/*.js
2 | src/assets
3 | public
4 | dist
5 |
--------------------------------------------------------------------------------
/frontend/marriage/.gitignore:
--------------------------------------------------------------------------------
1 | .DS_Store
2 | node_modules/
3 | dist/
4 | npm-debug.log
--------------------------------------------------------------------------------
/frontend/marriage/.idea/.gitignore:
--------------------------------------------------------------------------------
1 | # Default ignored files
2 | /shelf/
3 | /workspace.xml
4 | # Editor-based HTTP Client requests
5 | /httpRequests/
6 |
--------------------------------------------------------------------------------
/frontend/marriage/.idea/inspectionProfiles/Project_Default.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/frontend/marriage/.idea/marriage.iml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/frontend/marriage/.idea/modules.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/frontend/marriage/.idea/vcs.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/frontend/marriage/babel.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | presets: [
3 | // https://github.com/vuejs/vue-cli/tree/master/packages/@vue/babel-preset-app
4 | '@vue/cli-plugin-babel/preset'
5 | ],
6 | 'env': {
7 | 'development': {
8 | // babel-plugin-dynamic-import-node plugin only does one thing by converting all import() to require().
9 | // This plugin can significantly increase the speed of hot updates, when you have a large number of pages.
10 | // https://panjiachen.github.io/vue-element-admin-site/guide/advanced/lazy-loading.html
11 | 'plugins': ['dynamic-import-node']
12 | }
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/frontend/marriage/build/index.js:
--------------------------------------------------------------------------------
1 | const { run } = require('runjs')
2 | const chalk = require('chalk')
3 | const config = require('../vue.config.js')
4 | const rawArgv = process.argv.slice(2)
5 | const args = rawArgv.join(' ')
6 |
7 | if (process.env.npm_config_preview || rawArgv.includes('--preview')) {
8 | const report = rawArgv.includes('--report')
9 |
10 | run(`vue-cli-service build ${args}`)
11 |
12 | const port = 9526
13 | const publicPath = config.publicPath
14 |
15 | var connect = require('connect')
16 | var serveStatic = require('serve-static')
17 | const app = connect()
18 |
19 | app.use(
20 | publicPath,
21 | serveStatic('./dist', {
22 | index: ['index.html', '/']
23 | })
24 | )
25 |
26 | app.listen(port, function () {
27 | console.log(chalk.green(`> Preview at http://localhost:${port}${publicPath}`))
28 | if (report) {
29 | console.log(chalk.green(`> Report at http://localhost:${port}${publicPath}report.html`))
30 | }
31 |
32 | })
33 | } else {
34 | run(`vue-cli-service build ${args}`)
35 | }
36 |
--------------------------------------------------------------------------------
/frontend/marriage/jest.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | moduleFileExtensions: ['js', 'jsx', 'json', 'vue'],
3 | transform: {
4 | '^.+\\.vue$': 'vue-jest',
5 | '.+\\.(css|styl|less|sass|scss|svg|png|jpg|ttf|woff|woff2)$':
6 | 'jest-transform-stub',
7 | '^.+\\.jsx?$': 'babel-jest'
8 | },
9 | moduleNameMapper: {
10 | '^@/(.*)$': '/src/$1'
11 | },
12 | snapshotSerializers: ['jest-serializer-vue'],
13 | testMatch: [
14 | '**/tests/unit/**/*.spec.(js|jsx|ts|tsx)|**/__tests__/*.(js|jsx|ts|tsx)'
15 | ],
16 | collectCoverageFrom: ['src/utils/**/*.{js,vue}', '!src/utils/auth.js', '!src/utils/request.js', 'src/components/**/*.{js,vue}'],
17 | coverageDirectory: '/tests/unit/coverage',
18 | // 'collectCoverage': true,
19 | 'coverageReporters': [
20 | 'lcov',
21 | 'text-summary'
22 | ],
23 | testURL: 'http://localhost/'
24 | }
25 |
--------------------------------------------------------------------------------
/frontend/marriage/jsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "baseUrl": "./",
4 | "paths": {
5 | "@/*": ["src/*"]
6 | }
7 | },
8 | "exclude": ["node_modules", "dist"]
9 | }
10 |
--------------------------------------------------------------------------------
/frontend/marriage/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "vue-admin-template",
3 | "version": "4.4.0",
4 | "description": "A vue admin template with Element UI & axios & iconfont & permission control & lint",
5 | "author": "Pan ",
6 | "scripts": {
7 | "dev": "vue-cli-service serve",
8 | "build:prod": "vue-cli-service build",
9 | "build:stage": "vue-cli-service build --mode staging",
10 | "preview": "node build/index.js --preview",
11 | "svgo": "svgo -f src/icons/svg --config=src/icons/svgo.yml",
12 | "lint": "eslint --ext .js,.vue src",
13 | "test:unit": "jest --clearCache && vue-cli-service test:unit",
14 | "test:ci": "npm run lint && npm run test:unit"
15 | },
16 | "dependencies": {
17 | "axios": "0.18.1",
18 | "core-js": "3.6.5",
19 | "element-ui": "2.13.2",
20 | "js-cookie": "2.2.0",
21 | "normalize.css": "7.0.0",
22 | "nprogress": "0.2.0",
23 | "path-to-regexp": "2.4.0",
24 | "swiper": "^6.8.2",
25 | "vue": "2.6.10",
26 | "vue-router": "3.0.6",
27 | "vuex": "3.1.0"
28 | },
29 | "devDependencies": {
30 | "@vue/cli-plugin-babel": "4.4.4",
31 | "@vue/cli-plugin-eslint": "4.4.4",
32 | "@vue/cli-plugin-unit-jest": "4.4.4",
33 | "@vue/cli-service": "4.4.4",
34 | "@vue/test-utils": "1.0.0-beta.29",
35 | "autoprefixer": "9.5.1",
36 | "babel-eslint": "10.1.0",
37 | "babel-jest": "23.6.0",
38 | "babel-plugin-dynamic-import-node": "2.3.3",
39 | "chalk": "2.4.2",
40 | "connect": "3.6.6",
41 | "element-theme": "^2.0.1",
42 | "element-theme-chalk": "^2.15.5",
43 | "eslint": "6.7.2",
44 | "eslint-plugin-vue": "6.2.2",
45 | "html-webpack-plugin": "3.2.0",
46 | "mockjs": "1.0.1-beta3",
47 | "runjs": "4.3.2",
48 | "sass": "1.26.8",
49 | "sass-loader": "8.0.2",
50 | "script-ext-html-webpack-plugin": "2.1.3",
51 | "serve-static": "1.13.2",
52 | "svg-sprite-loader": "4.1.3",
53 | "svgo": "1.2.2",
54 | "vue-template-compiler": "2.6.10"
55 | },
56 | "browserslist": [
57 | "> 1%",
58 | "last 2 versions"
59 | ],
60 | "engines": {
61 | "node": ">=8.9",
62 | "npm": ">= 3.0.0"
63 | },
64 | "license": "MIT"
65 | }
66 |
--------------------------------------------------------------------------------
/frontend/marriage/postcss.config.js:
--------------------------------------------------------------------------------
1 | // https://github.com/michael-ciniawsky/postcss-load-config
2 |
3 | module.exports = {
4 | 'plugins': {
5 | // to edit target browsers: use "browserslist" field in package.json
6 | 'autoprefixer': {}
7 | }
8 | }
9 |
--------------------------------------------------------------------------------
/frontend/marriage/public/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XuLeiGithub/marriage-demo/f43828c444a92267af507b8e683825678e1aee66/frontend/marriage/public/favicon.ico
--------------------------------------------------------------------------------
/frontend/marriage/public/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 | <%= webpackConfig.name %>
9 |
10 |
11 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/frontend/marriage/src/App.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
12 |
--------------------------------------------------------------------------------
/frontend/marriage/src/api/table.js:
--------------------------------------------------------------------------------
1 | import request from '@/utils/request'
2 | import { getUserId } from '@/utils/auth'
3 | // const userId = getUserId();
4 | export function getList(userId) {
5 | return request({
6 | url: '/login/index',
7 | method: 'get'
8 | })
9 | }
10 | export function getJoinList(userId) {
11 | return request({
12 | url: '/supplychain/chain/join/' + userId,
13 | method: 'get'
14 | })
15 | }
16 |
17 | export function checkSign(chainId) {
18 | return request({
19 | url: '/supplychain/chain/checkSign/' + chainId,
20 | method: 'get'
21 | })
22 | }
23 | export function getSelectList() {
24 | return request({
25 | url: '/supplychain/participater/list',
26 | method: 'get'
27 | })
28 | }
29 | export function createChain(data) {
30 | return request({
31 | url: '/addUser',
32 | method: 'post',
33 | data
34 | })
35 | }
36 | export function createCertificate(data) {
37 | return request({
38 | url: '/create',
39 | method: 'post',
40 | data
41 | })
42 | }
43 | export function getUserList() {
44 | return request({
45 | url: '/user/list',
46 | method: 'get'
47 | })
48 | }
49 | export function getCardInfo(id) {
50 | return request({
51 | url: '/info/' + id,
52 | method: 'get'
53 | })
54 | }
55 |
56 | export function getSignInfo(sex) {
57 | return request({
58 | url: '/user/list/' + sex,
59 | method: 'get'
60 | })
61 | }
62 | export function addSign(data) {
63 | return request({
64 | url: '/sign',
65 | method: 'post',
66 | data
67 | })
68 | }
69 | export function toPay(data) {
70 | return request({
71 | url: '/supplychain/chain/pay',
72 | method: 'post',
73 | data
74 | })
75 | }
76 | export function getNotice() {
77 | return request({
78 | url: '/unlogin/index',
79 | method: 'get'
80 | })
81 | }
82 | export function getUser(userId) {
83 | return request({
84 | url: '/supplychain/user/' + userId,
85 | method: 'get'
86 | })
87 | }
88 |
--------------------------------------------------------------------------------
/frontend/marriage/src/api/user.js:
--------------------------------------------------------------------------------
1 | import request from '@/utils/request'
2 |
3 | export function login(data) {
4 | return request({
5 | url: '/login',
6 | method: 'post',
7 | data
8 | })
9 | }
10 |
11 | export function register(data) {
12 | return request({
13 | url: '/supplychain/user/register',
14 | method: 'post',
15 | data
16 | })
17 | }
18 |
--------------------------------------------------------------------------------
/frontend/marriage/src/assets/404_images/404.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XuLeiGithub/marriage-demo/f43828c444a92267af507b8e683825678e1aee66/frontend/marriage/src/assets/404_images/404.png
--------------------------------------------------------------------------------
/frontend/marriage/src/assets/404_images/404_cloud.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XuLeiGithub/marriage-demo/f43828c444a92267af507b8e683825678e1aee66/frontend/marriage/src/assets/404_images/404_cloud.png
--------------------------------------------------------------------------------
/frontend/marriage/src/assets/avatar-sh.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XuLeiGithub/marriage-demo/f43828c444a92267af507b8e683825678e1aee66/frontend/marriage/src/assets/avatar-sh.png
--------------------------------------------------------------------------------
/frontend/marriage/src/assets/images/background-328.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XuLeiGithub/marriage-demo/f43828c444a92267af507b8e683825678e1aee66/frontend/marriage/src/assets/images/background-328.jpg
--------------------------------------------------------------------------------
/frontend/marriage/src/assets/images/banner-index.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XuLeiGithub/marriage-demo/f43828c444a92267af507b8e683825678e1aee66/frontend/marriage/src/assets/images/banner-index.png
--------------------------------------------------------------------------------
/frontend/marriage/src/assets/images/banner-index1.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XuLeiGithub/marriage-demo/f43828c444a92267af507b8e683825678e1aee66/frontend/marriage/src/assets/images/banner-index1.jpg
--------------------------------------------------------------------------------
/frontend/marriage/src/assets/images/certificate-bg.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XuLeiGithub/marriage-demo/f43828c444a92267af507b8e683825678e1aee66/frontend/marriage/src/assets/images/certificate-bg.png
--------------------------------------------------------------------------------
/frontend/marriage/src/assets/images/logbj.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XuLeiGithub/marriage-demo/f43828c444a92267af507b8e683825678e1aee66/frontend/marriage/src/assets/images/logbj.png
--------------------------------------------------------------------------------
/frontend/marriage/src/assets/images/regist-bg.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XuLeiGithub/marriage-demo/f43828c444a92267af507b8e683825678e1aee66/frontend/marriage/src/assets/images/regist-bg.jpg
--------------------------------------------------------------------------------
/frontend/marriage/src/components/Breadcrumb/index.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | {{ item.meta.title }}
10 | {{ item.meta.title }}
11 |
12 |
13 |
14 |
15 |
16 |
76 |
77 |
90 |
--------------------------------------------------------------------------------
/frontend/marriage/src/components/Hamburger/index.vue:
--------------------------------------------------------------------------------
1 |
2 |
14 |
15 |
16 |
32 |
33 |
45 |
--------------------------------------------------------------------------------
/frontend/marriage/src/components/SvgIcon/index.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
6 |
7 |
8 |
47 |
48 |
63 |
--------------------------------------------------------------------------------
/frontend/marriage/src/icons/index.js:
--------------------------------------------------------------------------------
1 | import Vue from 'vue'
2 | import SvgIcon from '@/components/SvgIcon'// svg component
3 |
4 | // register globally
5 | Vue.component('svg-icon', SvgIcon)
6 |
7 | const req = require.context('./svg', false, /\.svg$/)
8 | const requireAll = requireContext => requireContext.keys().map(requireContext)
9 | requireAll(req)
10 |
--------------------------------------------------------------------------------
/frontend/marriage/src/icons/svg/dashboard.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/frontend/marriage/src/icons/svg/example.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/frontend/marriage/src/icons/svg/eye-open.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/frontend/marriage/src/icons/svg/eye.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/frontend/marriage/src/icons/svg/form.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/frontend/marriage/src/icons/svg/link.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/frontend/marriage/src/icons/svg/nested.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/frontend/marriage/src/icons/svg/password.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/frontend/marriage/src/icons/svg/table.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/frontend/marriage/src/icons/svg/tree.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/frontend/marriage/src/icons/svg/user.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/frontend/marriage/src/icons/svgo.yml:
--------------------------------------------------------------------------------
1 | # replace default config
2 |
3 | # multipass: true
4 | # full: true
5 |
6 | plugins:
7 |
8 | # - name
9 | #
10 | # or:
11 | # - name: false
12 | # - name: true
13 | #
14 | # or:
15 | # - name:
16 | # param1: 1
17 | # param2: 2
18 |
19 | - removeAttrs:
20 | attrs:
21 | - 'fill'
22 | - 'fill-rule'
23 |
--------------------------------------------------------------------------------
/frontend/marriage/src/layout/components/AppMain.vue:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
9 |
19 |
20 |
32 |
33 |
41 |
--------------------------------------------------------------------------------
/frontend/marriage/src/layout/components/Navbar.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
8 |
9 |
10 |
11 |
29 |
30 |
31 |
32 |
58 |
59 |
137 |
--------------------------------------------------------------------------------
/frontend/marriage/src/layout/components/Sidebar/FixiOSBug.js:
--------------------------------------------------------------------------------
1 | export default {
2 | computed: {
3 | device() {
4 | return this.$store.state.app.device
5 | }
6 | },
7 | mounted() {
8 | // In order to fix the click on menu on the ios device will trigger the mouseleave bug
9 | // https://github.com/PanJiaChen/vue-element-admin/issues/1135
10 | this.fixBugIniOS()
11 | },
12 | methods: {
13 | fixBugIniOS() {
14 | const $subMenu = this.$refs.subMenu
15 | if ($subMenu) {
16 | const handleMouseleave = $subMenu.handleMouseleave
17 | $subMenu.handleMouseleave = (e) => {
18 | if (this.device === 'mobile') {
19 | return
20 | }
21 | handleMouseleave(e)
22 | }
23 | }
24 | }
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/frontend/marriage/src/layout/components/Sidebar/Item.vue:
--------------------------------------------------------------------------------
1 |
34 |
35 |
42 |
--------------------------------------------------------------------------------
/frontend/marriage/src/layout/components/Sidebar/Link.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
44 |
--------------------------------------------------------------------------------
/frontend/marriage/src/layout/components/Sidebar/Logo.vue:
--------------------------------------------------------------------------------
1 |
2 |
14 |
15 |
16 |
33 |
34 |
83 |
--------------------------------------------------------------------------------
/frontend/marriage/src/layout/components/Sidebar/SidebarItem.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
23 |
24 |
25 |
26 |
27 |
96 |
--------------------------------------------------------------------------------
/frontend/marriage/src/layout/components/Sidebar/index.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
57 |
--------------------------------------------------------------------------------
/frontend/marriage/src/layout/components/index.js:
--------------------------------------------------------------------------------
1 | export { default as Navbar } from './Navbar'
2 | export { default as Sidebar } from './Sidebar'
3 | export { default as AppMain } from './AppMain'
4 |
--------------------------------------------------------------------------------
/frontend/marriage/src/layout/index.vue:
--------------------------------------------------------------------------------
1 |
2 |
16 |
17 |
18 |
56 |
57 |
98 |
--------------------------------------------------------------------------------
/frontend/marriage/src/layout/mixin/ResizeHandler.js:
--------------------------------------------------------------------------------
1 | import store from '@/store'
2 |
3 | const { body } = document
4 | const WIDTH = 992 // refer to Bootstrap's responsive design
5 |
6 | export default {
7 | watch: {
8 | $route(route) {
9 | if (this.device === 'mobile' && this.sidebar.opened) {
10 | store.dispatch('app/closeSideBar', { withoutAnimation: false })
11 | }
12 | }
13 | },
14 | beforeMount() {
15 | window.addEventListener('resize', this.$_resizeHandler)
16 | },
17 | beforeDestroy() {
18 | window.removeEventListener('resize', this.$_resizeHandler)
19 | },
20 | mounted() {
21 | const isMobile = this.$_isMobile()
22 | if (isMobile) {
23 | store.dispatch('app/toggleDevice', 'mobile')
24 | store.dispatch('app/closeSideBar', { withoutAnimation: true })
25 | }
26 | },
27 | methods: {
28 | // use $_ for mixins properties
29 | // https://vuejs.org/v2/style-guide/index.html#Private-property-names-essential
30 | $_isMobile() {
31 | const rect = body.getBoundingClientRect()
32 | return rect.width - 1 < WIDTH
33 | },
34 | $_resizeHandler() {
35 | if (!document.hidden) {
36 | const isMobile = this.$_isMobile()
37 | store.dispatch('app/toggleDevice', isMobile ? 'mobile' : 'desktop')
38 |
39 | if (isMobile) {
40 | store.dispatch('app/closeSideBar', { withoutAnimation: true })
41 | }
42 | }
43 | }
44 | }
45 | }
46 |
--------------------------------------------------------------------------------
/frontend/marriage/src/main.js:
--------------------------------------------------------------------------------
1 | import Vue from 'vue'
2 |
3 | import 'normalize.css/normalize.css' // A modern alternative to CSS resets
4 |
5 | import ElementUI from 'element-ui'
6 | import 'element-ui/lib/theme-chalk/index.css'
7 | // import locale from "element-ui/lib/locale/lang/en"; // lang i18n
8 |
9 | import '@/styles/index.scss' // global css
10 | import '../theme/index.css'
11 |
12 | import App from './App'
13 | import store from './store'
14 | import router from './router'
15 |
16 | import '@/icons' // icon
17 | import '@/permission' // permission control
18 |
19 | Vue.use(ElementUI)
20 |
21 | Vue.config.productionTip = false
22 |
23 | new Vue({
24 | el: '#app',
25 | router,
26 | store,
27 | render: h => h(App)
28 | })
29 |
--------------------------------------------------------------------------------
/frontend/marriage/src/permission.js:
--------------------------------------------------------------------------------
1 | import router from './router'
2 | import NProgress from 'nprogress' // progress bar
3 | import 'nprogress/nprogress.css' // progress bar style
4 | import { getUserId } from '@/utils/auth' // get token from cookie
5 | import getPageTitle from '@/utils/get-page-title'
6 |
7 | NProgress.configure({ showSpinner: false }) // NProgress Configuration
8 |
9 | const whiteList = [
10 | '/',
11 | '/login',
12 | '/regist'
13 | ] // no redirect whitelist
14 |
15 | router.beforeEach(async(to, from, next) => {
16 | // start progress bar
17 | NProgress.start()
18 |
19 | // set page title
20 | document.title = getPageTitle(to.meta.title)
21 |
22 | // determine whether the user has logged in
23 | const hasToken = getUserId()
24 |
25 | if (hasToken) {
26 | next()
27 | NProgress.done()
28 | } else {
29 | /* has no token*/
30 | if (whiteList.indexOf(to.path) !== -1) {
31 | // in the free login whitelist, go directly
32 | next()
33 | } else {
34 | // other pages that do not have permission to access are redirected to the login page.
35 | next(`/login?redirect=${to.path}`)
36 | NProgress.done()
37 | }
38 | }
39 | })
40 |
41 | router.afterEach(() => {
42 | // finish progress bar
43 | NProgress.done()
44 | })
45 |
--------------------------------------------------------------------------------
/frontend/marriage/src/router/index.js:
--------------------------------------------------------------------------------
1 | import Vue from 'vue'
2 | import Router from 'vue-router'
3 |
4 | Vue.use(Router)
5 |
6 | /* Layout */
7 | import Layout from '@/layout'
8 |
9 | export const constantRoutes = [
10 | {
11 | path: '/',
12 | component: () => import('@/views/index/index'),
13 | hidden: true
14 | },
15 | {
16 | path: '/login',
17 | component: () => import('@/views/login/index'),
18 | hidden: true
19 | },
20 |
21 | // {
22 | // path: '/setting',
23 | // component: () => import('@/views/regist/index')
24 | // },
25 | {
26 | path: '/404',
27 | component: () => import('@/views/404'),
28 | hidden: true
29 | },
30 |
31 | {
32 | path: '/list',
33 | component: Layout,
34 | redirect: '/list/table',
35 | children: [
36 | {
37 | path: 'table',
38 | name: 'Dashboard',
39 | component: () => import('@/views/dashboard/index'),
40 | meta: { title: '用户信息列表', icon: 'user' }
41 | },
42 | {
43 | path: 'create',
44 | name: 'Create',
45 | component: () => import('@/views/create/index'),
46 | meta: { title: '新建', icon: 'user' },
47 | hidden: true
48 | }
49 | ]
50 | },
51 | {
52 | path: '/marriageInfo',
53 | component: Layout,
54 | redirect: '/join/list',
55 | children: [
56 | {
57 | path: 'list',
58 | name: 'jonList',
59 | component: () => import('@/views/join/index'),
60 | meta: { title: '证书列表', icon: 'example' }
61 | },
62 | {
63 | path: 'createCer',
64 | name: 'CreateCer',
65 | component: () => import('@/views/create-cer/index'),
66 | meta: { title: '新建证书', icon: 'Create' },
67 | hidden: true
68 | }
69 | ]
70 | },
71 |
72 | // 404 page must be placed at the end !!!
73 | { path: '*', redirect: '/404', hidden: true }
74 | ]
75 |
76 | const createRouter = () =>
77 | new Router({
78 | // mode: 'history', // require service support
79 | scrollBehavior: () => ({ y: 0 }),
80 | routes: constantRoutes
81 | })
82 |
83 | const router = createRouter()
84 |
85 | export function resetRouter() {
86 | const newRouter = createRouter()
87 | router.matcher = newRouter.matcher // reset router
88 | }
89 |
90 | export default router
91 |
--------------------------------------------------------------------------------
/frontend/marriage/src/settings.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | title: 'Block Chain Marry System',
3 |
4 | /**
5 | * @type {boolean} true | false
6 | * @description Whether fix the header
7 | */
8 | fixedHeader: false,
9 |
10 | /**
11 | * @type {boolean} true | false
12 | * @description Whether show the logo in sidebar
13 | */
14 | sidebarLogo: false
15 | }
16 |
--------------------------------------------------------------------------------
/frontend/marriage/src/store/getters.js:
--------------------------------------------------------------------------------
1 | const getters = {
2 | sidebar: state => state.app.sidebar,
3 | device: state => state.app.device,
4 | token: state => state.user.token,
5 | avatar: state => state.user.avatar,
6 | name: state => state.user.name
7 | };
8 | export default getters;
9 |
--------------------------------------------------------------------------------
/frontend/marriage/src/store/index.js:
--------------------------------------------------------------------------------
1 | import Vue from "vue";
2 | import Vuex from "vuex";
3 | import getters from "./getters";
4 | import app from "./modules/app";
5 | import settings from "./modules/settings";
6 | import user from "./modules/user";
7 |
8 | Vue.use(Vuex);
9 |
10 | const store = new Vuex.Store({
11 | modules: {
12 | app,
13 | settings,
14 | user
15 | },
16 | getters
17 | });
18 |
19 | export default store;
20 |
--------------------------------------------------------------------------------
/frontend/marriage/src/store/modules/app.js:
--------------------------------------------------------------------------------
1 | import Cookies from 'js-cookie'
2 |
3 | const state = {
4 | sidebar: {
5 | opened: Cookies.get('sidebarStatus') ? !!+Cookies.get('sidebarStatus') : true,
6 | withoutAnimation: false
7 | },
8 | device: 'desktop'
9 | }
10 |
11 | const mutations = {
12 | TOGGLE_SIDEBAR: state => {
13 | state.sidebar.opened = !state.sidebar.opened
14 | state.sidebar.withoutAnimation = false
15 | if (state.sidebar.opened) {
16 | Cookies.set('sidebarStatus', 1)
17 | } else {
18 | Cookies.set('sidebarStatus', 0)
19 | }
20 | },
21 | CLOSE_SIDEBAR: (state, withoutAnimation) => {
22 | Cookies.set('sidebarStatus', 0)
23 | state.sidebar.opened = false
24 | state.sidebar.withoutAnimation = withoutAnimation
25 | },
26 | TOGGLE_DEVICE: (state, device) => {
27 | state.device = device
28 | }
29 | }
30 |
31 | const actions = {
32 | toggleSideBar({ commit }) {
33 | commit('TOGGLE_SIDEBAR')
34 | },
35 | closeSideBar({ commit }, { withoutAnimation }) {
36 | commit('CLOSE_SIDEBAR', withoutAnimation)
37 | },
38 | toggleDevice({ commit }, device) {
39 | commit('TOGGLE_DEVICE', device)
40 | }
41 | }
42 |
43 | export default {
44 | namespaced: true,
45 | state,
46 | mutations,
47 | actions
48 | }
49 |
--------------------------------------------------------------------------------
/frontend/marriage/src/store/modules/settings.js:
--------------------------------------------------------------------------------
1 | import defaultSettings from '@/settings'
2 |
3 | const { showSettings, fixedHeader, sidebarLogo } = defaultSettings
4 |
5 | const state = {
6 | showSettings: showSettings,
7 | fixedHeader: fixedHeader,
8 | sidebarLogo: sidebarLogo
9 | }
10 |
11 | const mutations = {
12 | CHANGE_SETTING: (state, { key, value }) => {
13 | // eslint-disable-next-line no-prototype-builtins
14 | if (state.hasOwnProperty(key)) {
15 | state[key] = value
16 | }
17 | }
18 | }
19 |
20 | const actions = {
21 | changeSetting({ commit }, data) {
22 | commit('CHANGE_SETTING', data)
23 | }
24 | }
25 |
26 | export default {
27 | namespaced: true,
28 | state,
29 | mutations,
30 | actions
31 | }
32 |
33 |
--------------------------------------------------------------------------------
/frontend/marriage/src/store/modules/user.js:
--------------------------------------------------------------------------------
1 | import { login, logout, getInfo } from '@/api/user'
2 | import {
3 | getToken,
4 | getParticipaterId,
5 | setParticipaterId,
6 | setToken,
7 | getUserId,
8 | setUserId,
9 | removeToken
10 | } from '@/utils/auth'
11 | import { resetRouter } from '@/router'
12 |
13 | const getDefaultState = () => {
14 | return {
15 | token: getToken(),
16 | name: '',
17 | avatar: '',
18 | userid: getUserId(),
19 | participaterid: getParticipaterId()
20 | }
21 | }
22 |
23 | const state = getDefaultState()
24 |
25 | const mutations = {
26 | RESET_STATE: (state) => {
27 | Object.assign(state, getDefaultState())
28 | },
29 | SET_TOKEN: (state, token) => {
30 | state.token = token
31 | },
32 | SET_USERID: (state, userid) => {
33 | state.userid = userid
34 | },
35 | SET_PARTID: (state, participaterid) => {
36 | state.participaterid = participaterid
37 | },
38 | SET_NAME: (state, name) => {
39 | state.name = name
40 | },
41 | SET_AVATAR: (state, avatar) => {
42 | state.avatar = avatar
43 | }
44 | }
45 |
46 | const actions = {
47 | // user login
48 | login({ commit }, userInfo) {
49 | console.log(userInfo)
50 | const { username, password } = userInfo
51 | return new Promise((resolve, reject) => {
52 | login({
53 | username: username.trim(),
54 | password: password.trim()
55 | })
56 | .then((response) => {
57 | const { data } = response
58 | commit('SET_USERID', data.id)
59 | commit('SET_PARTID', data.publicAddress)
60 | setUserId(data.id)
61 | setParticipaterId(data.publicAddress)
62 | resolve()
63 | })
64 | .catch((error) => {
65 | reject(error)
66 | })
67 | })
68 | },
69 |
70 | // get user info
71 | getInfo({ commit, state }) {
72 | return new Promise((resolve, reject) => {
73 | getInfo(state.token)
74 | .then((response) => {
75 | const { data } = response
76 |
77 | if (!data) {
78 | return reject('Verification failed, please Login again.')
79 | }
80 |
81 | const { name, avatar } = data
82 |
83 | commit('SET_NAME', name)
84 | commit('SET_AVATAR', avatar)
85 | resolve(data)
86 | })
87 | .catch((error) => {
88 | reject(error)
89 | })
90 | })
91 | },
92 |
93 | // user logout
94 | logout({ commit, state }) {
95 | return new Promise((resolve, reject) => {
96 | logout(state.token)
97 | .then(() => {
98 | removeToken() // must remove token first
99 | resetRouter()
100 | commit('RESET_STATE')
101 | resolve()
102 | })
103 | .catch((error) => {
104 | reject(error)
105 | })
106 | })
107 | },
108 |
109 | // remove token
110 | resetToken({ commit }) {
111 | return new Promise((resolve) => {
112 | removeToken() // must remove token first
113 | commit('RESET_STATE')
114 | resolve()
115 | })
116 | }
117 | }
118 |
119 | export default {
120 | namespaced: true,
121 | state,
122 | mutations,
123 | actions
124 | }
125 |
--------------------------------------------------------------------------------
/frontend/marriage/src/styles/element-ui.scss:
--------------------------------------------------------------------------------
1 | // cover some element-ui styles
2 |
3 | .el-breadcrumb__inner,
4 | .el-breadcrumb__inner a {
5 | font-weight: 400 !important;
6 | }
7 |
8 | .el-upload {
9 | input[type="file"] {
10 | display: none !important;
11 | }
12 | }
13 |
14 | .el-upload__input {
15 | display: none;
16 | }
17 |
18 |
19 | // to fixed https://github.com/ElemeFE/element/issues/2461
20 | .el-dialog {
21 | transform: none;
22 | left: 0;
23 | position: relative;
24 | margin: 0 auto;
25 | }
26 |
27 | // refine element ui upload
28 | .upload-container {
29 | .el-upload {
30 | width: 100%;
31 |
32 | .el-upload-dragger {
33 | width: 100%;
34 | height: 200px;
35 | }
36 | }
37 | }
38 |
39 | // dropdown
40 | .el-dropdown-menu {
41 | a {
42 | display: block
43 | }
44 | }
45 |
46 | // to fix el-date-picker css style
47 | .el-range-separator {
48 | box-sizing: content-box;
49 | }
50 |
--------------------------------------------------------------------------------
/frontend/marriage/src/styles/index.scss:
--------------------------------------------------------------------------------
1 | @import './variables.scss';
2 | @import './mixin.scss';
3 | @import './transition.scss';
4 | @import './element-ui.scss';
5 | @import './sidebar.scss';
6 |
7 | body {
8 | height: 100%;
9 | -moz-osx-font-smoothing: grayscale;
10 | -webkit-font-smoothing: antialiased;
11 | text-rendering: optimizeLegibility;
12 | font-family: Helvetica Neue, Helvetica, PingFang SC, Hiragino Sans GB, Microsoft YaHei, Arial, sans-serif;
13 | }
14 |
15 | label {
16 | font-weight: 700;
17 | }
18 |
19 | html {
20 | height: 100%;
21 | box-sizing: border-box;
22 | }
23 |
24 | #app {
25 | height: 100%;
26 | }
27 |
28 | *,
29 | *:before,
30 | *:after {
31 | box-sizing: inherit;
32 | }
33 |
34 | a:focus,
35 | a:active {
36 | outline: none;
37 | }
38 |
39 | a,
40 | a:focus,
41 | a:hover {
42 | cursor: pointer;
43 | color: inherit;
44 | text-decoration: none;
45 | }
46 |
47 | div:focus {
48 | outline: none;
49 | }
50 |
51 | .clearfix {
52 | &:after {
53 | visibility: hidden;
54 | display: block;
55 | font-size: 0;
56 | content: " ";
57 | clear: both;
58 | height: 0;
59 | }
60 | }
61 |
62 | // main-container global css
63 | .app-container {
64 | padding: 20px;
65 | }
66 |
--------------------------------------------------------------------------------
/frontend/marriage/src/styles/mixin.scss:
--------------------------------------------------------------------------------
1 | @mixin clearfix {
2 | &:after {
3 | content: "";
4 | display: table;
5 | clear: both;
6 | }
7 | }
8 |
9 | @mixin scrollBar {
10 | &::-webkit-scrollbar-track-piece {
11 | background: #d3dce6;
12 | }
13 |
14 | &::-webkit-scrollbar {
15 | width: 6px;
16 | }
17 |
18 | &::-webkit-scrollbar-thumb {
19 | background: #99a9bf;
20 | border-radius: 20px;
21 | }
22 | }
23 |
24 | @mixin relative {
25 | position: relative;
26 | width: 100%;
27 | height: 100%;
28 | }
29 |
--------------------------------------------------------------------------------
/frontend/marriage/src/styles/transition.scss:
--------------------------------------------------------------------------------
1 | // global transition css
2 |
3 | /* fade */
4 | .fade-enter-active,
5 | .fade-leave-active {
6 | transition: opacity 0.28s;
7 | }
8 |
9 | .fade-enter,
10 | .fade-leave-active {
11 | opacity: 0;
12 | }
13 |
14 | /* fade-transform */
15 | .fade-transform-leave-active,
16 | .fade-transform-enter-active {
17 | transition: all .5s;
18 | }
19 |
20 | .fade-transform-enter {
21 | opacity: 0;
22 | transform: translateX(-30px);
23 | }
24 |
25 | .fade-transform-leave-to {
26 | opacity: 0;
27 | transform: translateX(30px);
28 | }
29 |
30 | /* breadcrumb transition */
31 | .breadcrumb-enter-active,
32 | .breadcrumb-leave-active {
33 | transition: all .5s;
34 | }
35 |
36 | .breadcrumb-enter,
37 | .breadcrumb-leave-active {
38 | opacity: 0;
39 | transform: translateX(20px);
40 | }
41 |
42 | .breadcrumb-move {
43 | transition: all .5s;
44 | }
45 |
46 | .breadcrumb-leave-active {
47 | position: absolute;
48 | }
49 |
--------------------------------------------------------------------------------
/frontend/marriage/src/styles/variables.scss:
--------------------------------------------------------------------------------
1 | // sidebar
2 | $menuText: #bfcbd9;
3 | $menuActiveText: #FF3947;
4 | $subMenuActiveText: #f4f4f5; //https://github.com/ElemeFE/element/issues/12951
5 |
6 | $menuBg: #191a23;
7 | $menuHover: #263445;
8 |
9 | $subMenuBg: #101117;
10 | $subMenuHover: #001528;
11 |
12 | $sideBarWidth: 210px;
13 |
14 | // the :export directive is the magic sauce for webpack
15 | // https://www.bluematador.com/blog/how-to-share-variables-between-js-and-sass
16 | :export {
17 | menuText: $menuText;
18 | menuActiveText: $menuActiveText;
19 | subMenuActiveText: $subMenuActiveText;
20 | menuBg: $menuBg;
21 | menuHover: $menuHover;
22 | subMenuBg: $subMenuBg;
23 | subMenuHover: $subMenuHover;
24 | sideBarWidth: $sideBarWidth;
25 | }
26 |
--------------------------------------------------------------------------------
/frontend/marriage/src/utils/auth.js:
--------------------------------------------------------------------------------
1 | import Cookies from 'js-cookie'
2 |
3 | const TokenKey = 'vue_admin_template_token1'
4 | const userId = 'user_id'
5 | const participaterId = 'participater_id'
6 |
7 | export function getToken() {
8 | return Cookies.get(TokenKey)
9 | }
10 |
11 | export function setToken(token) {
12 | return Cookies.set(TokenKey, token)
13 | }
14 | export function setUserId(userid) {
15 | return Cookies.set(userId, userid)
16 | }
17 | export function setParticipaterId(participaterid) {
18 | return Cookies.set(participaterId, participaterid)
19 | }
20 | export function getUserId() {
21 | return Cookies.get(userId)
22 | }
23 | export function getParticipaterId() {
24 | return Cookies.get(participaterId)
25 | }
26 | export function removeUserId() {
27 | return Cookies.remove(userId)
28 | }
29 | export function removeParticipaterId() {
30 | return Cookies.remove(participaterId)
31 | }
32 | export function removeToken() {
33 | return Cookies.remove(TokenKey)
34 | }
35 |
--------------------------------------------------------------------------------
/frontend/marriage/src/utils/get-page-title.js:
--------------------------------------------------------------------------------
1 | import defaultSettings from '@/settings'
2 |
3 | const title = defaultSettings.title || 'Block Chain Marry System'
4 |
5 | export default function getPageTitle(pageTitle) {
6 | if (pageTitle) {
7 | return `${pageTitle} - ${title}`
8 | }
9 | return `${title}`
10 | }
11 |
--------------------------------------------------------------------------------
/frontend/marriage/src/utils/index.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Created by PanJiaChen on 16/11/18.
3 | */
4 |
5 | /**
6 | * Parse the time to string
7 | * @param {(Object|string|number)} time
8 | * @param {string} cFormat
9 | * @returns {string | null}
10 | */
11 | export function parseTime(time, cFormat) {
12 | if (arguments.length === 0 || !time) {
13 | return null
14 | }
15 | const format = cFormat || '{y}-{m}-{d} {h}:{i}:{s}'
16 | let date
17 | if (typeof time === 'object') {
18 | date = time
19 | } else {
20 | if ((typeof time === 'string')) {
21 | if ((/^[0-9]+$/.test(time))) {
22 | // support "1548221490638"
23 | time = parseInt(time)
24 | } else {
25 | // support safari
26 | // https://stackoverflow.com/questions/4310953/invalid-date-in-safari
27 | time = time.replace(new RegExp(/-/gm), '/')
28 | }
29 | }
30 |
31 | if ((typeof time === 'number') && (time.toString().length === 10)) {
32 | time = time * 1000
33 | }
34 | date = new Date(time)
35 | }
36 | const formatObj = {
37 | y: date.getFullYear(),
38 | m: date.getMonth() + 1,
39 | d: date.getDate(),
40 | h: date.getHours(),
41 | i: date.getMinutes(),
42 | s: date.getSeconds(),
43 | a: date.getDay()
44 | }
45 | const time_str = format.replace(/{([ymdhisa])+}/g, (result, key) => {
46 | const value = formatObj[key]
47 | // Note: getDay() returns 0 on Sunday
48 | if (key === 'a') { return ['日', '一', '二', '三', '四', '五', '六'][value ] }
49 | return value.toString().padStart(2, '0')
50 | })
51 | return time_str
52 | }
53 |
54 | /**
55 | * @param {number} time
56 | * @param {string} option
57 | * @returns {string}
58 | */
59 | export function formatTime(time, option) {
60 | if (('' + time).length === 10) {
61 | time = parseInt(time) * 1000
62 | } else {
63 | time = +time
64 | }
65 | const d = new Date(time)
66 | const now = Date.now()
67 |
68 | const diff = (now - d) / 1000
69 |
70 | if (diff < 30) {
71 | return '刚刚'
72 | } else if (diff < 3600) {
73 | // less 1 hour
74 | return Math.ceil(diff / 60) + '分钟前'
75 | } else if (diff < 3600 * 24) {
76 | return Math.ceil(diff / 3600) + '小时前'
77 | } else if (diff < 3600 * 24 * 2) {
78 | return '1天前'
79 | }
80 | if (option) {
81 | return parseTime(time, option)
82 | } else {
83 | return (
84 | d.getMonth() +
85 | 1 +
86 | '月' +
87 | d.getDate() +
88 | '日' +
89 | d.getHours() +
90 | '时' +
91 | d.getMinutes() +
92 | '分'
93 | )
94 | }
95 | }
96 |
97 | /**
98 | * @param {string} url
99 | * @returns {Object}
100 | */
101 | export function param2Obj(url) {
102 | const search = decodeURIComponent(url.split('?')[1]).replace(/\+/g, ' ')
103 | if (!search) {
104 | return {}
105 | }
106 | const obj = {}
107 | const searchArr = search.split('&')
108 | searchArr.forEach(v => {
109 | const index = v.indexOf('=')
110 | if (index !== -1) {
111 | const name = v.substring(0, index)
112 | const val = v.substring(index + 1, v.length)
113 | obj[name] = val
114 | }
115 | })
116 | return obj
117 | }
118 |
--------------------------------------------------------------------------------
/frontend/marriage/src/utils/request.js:
--------------------------------------------------------------------------------
1 | import axios from 'axios'
2 | import { MessageBox, Message } from 'element-ui'
3 | import store from '@/store'
4 | import { getToken } from '@/utils/auth'
5 |
6 | // create an axios instance
7 | const service = axios.create({
8 | baseURL: process.env.VUE_APP_BASE_API, // url = base url + request url
9 | // withCredentials: true, // send cookies when cross-domain requests
10 | timeout: 5000 // request timeout
11 | })
12 |
13 | // request interceptor
14 | service.interceptors.request.use(
15 | config => {
16 | // do something before request is sent
17 |
18 | if (store.getters.token) {
19 | // let each request carry token
20 | // ['X-Token'] is a custom headers key
21 | // please modify it according to the actual situation
22 | config.headers['X-Token'] = getToken()
23 | }
24 | return config
25 | },
26 | error => {
27 | // do something with request error
28 | console.log(error) // for debug
29 | return Promise.reject(error)
30 | }
31 | )
32 |
33 | // response interceptor
34 | service.interceptors.response.use(
35 | /**
36 | * If you want to get http information such as headers or status
37 | * Please return response => response
38 | */
39 |
40 | /**
41 | * Determine the request status by custom code
42 | * Here is just an example
43 | * You can also judge the status by HTTP Status Code
44 | */
45 | response => {
46 | const res = response.data
47 |
48 | // if the custom code is not 20000, it is judged as an error.
49 | if (res.code !== 0) {
50 | Message({
51 | message: res.msg || 'Error',
52 | type: 'error',
53 | duration: 5 * 1000
54 | })
55 |
56 | // 50008: Illegal token; 50012: Other clients logged in; 50014: Token expired;
57 | /* if (res.code === 50008 || res.code === 50012 || res.code === 50014) {
58 | // to re-login
59 | MessageBox.confirm(
60 | "You have been logged out, you can cancel to stay on this page, or log in again",
61 | "Confirm logout",
62 | {
63 | confirmButtonText: "Re-Login",
64 | cancelButtonText: "Cancel",
65 | type: "warning"
66 | }
67 | ).then(() => {
68 | store.dispatch("user/resetToken").then(() => {
69 | location.reload();
70 | });
71 | });
72 | } */
73 | return Promise.reject(new Error(res.message || 'Error'))
74 | } else {
75 | return res
76 | }
77 | },
78 | error => {
79 | console.log('err' + error) // for debug
80 | Message({
81 | message: error.message,
82 | type: 'error',
83 | duration: 5 * 1000
84 | })
85 | return Promise.reject(error)
86 | }
87 | )
88 |
89 | export default service
90 |
--------------------------------------------------------------------------------
/frontend/marriage/src/utils/validate.js:
--------------------------------------------------------------------------------
1 | /**
2 | * @param {string} path
3 | * @returns {Boolean}
4 | */
5 | export function isExternal(path) {
6 | return /^(https?:|mailto:|tel:)/.test(path)
7 | }
8 | export function isDecimal(path) {
9 | return /\b0(\.\d{1,2})\b/.test(path)
10 | }
11 | export function validUserIdCardNo(str) {
12 | const reg = /(^\d{8}(0\d|10|11|12)([0-2]\d|30|31)\d{3}$)|(^\d{6}(18|19|20)\d{2}(0\d|10|11|12)([0-2]\d|30|31)\d{3}(\d|X|x)$)/
13 | return reg.test(str)
14 | }
15 |
--------------------------------------------------------------------------------
/frontend/marriage/src/views/create-cer/index.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
12 |
18 |
19 |
20 |
21 |
26 |
32 |
33 |
34 |
35 |
40 |
46 |
47 |
48 |
49 |
50 | 提交
51 |
52 |
53 |
54 |
55 |
120 |
121 |
127 |
--------------------------------------------------------------------------------
/frontend/marriage/src/views/sign/index.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
10 |
16 |
17 |
18 |
28 |
29 | 提交
30 | 取消
31 |
32 |
33 |
34 |
35 | 签名成功
36 |
37 | 交易hash:
38 | {{ txHash }}
39 |
45 |
46 |
47 |
48 |
49 |
105 |
106 |
125 |
--------------------------------------------------------------------------------
/frontend/marriage/theme/aside.css:
--------------------------------------------------------------------------------
1 | /* BEM support Func
2 | -------------------------- */
3 | /* Element Chalk Variables */
4 | /* Transition
5 | -------------------------- */
6 | /* Color
7 | -------------------------- */
8 | /* 53a8ff */
9 | /* 66b1ff */
10 | /* 79bbff */
11 | /* 8cc5ff */
12 | /* a0cfff */
13 | /* b3d8ff */
14 | /* c6e2ff */
15 | /* d9ecff */
16 | /* ecf5ff */
17 | /* Link
18 | -------------------------- */
19 | /* Border
20 | -------------------------- */
21 | /* Fill
22 | -------------------------- */
23 | /* Typography
24 | -------------------------- */
25 | /* Size
26 | -------------------------- */
27 | /* z-index
28 | -------------------------- */
29 | /* Disable base
30 | -------------------------- */
31 | /* Icon
32 | -------------------------- */
33 | /* Checkbox
34 | -------------------------- */
35 | /* Radio
36 | -------------------------- */
37 | /* Select
38 | -------------------------- */
39 | /* Alert
40 | -------------------------- */
41 | /* MessageBox
42 | -------------------------- */
43 | /* Message
44 | -------------------------- */
45 | /* Notification
46 | -------------------------- */
47 | /* Input
48 | -------------------------- */
49 | /* Cascader
50 | -------------------------- */
51 | /* Group
52 | -------------------------- */
53 | /* Tab
54 | -------------------------- */
55 | /* Button
56 | -------------------------- */
57 | /* cascader
58 | -------------------------- */
59 | /* Switch
60 | -------------------------- */
61 | /* Dialog
62 | -------------------------- */
63 | /* Table
64 | -------------------------- */
65 | /* Pagination
66 | -------------------------- */
67 | /* Popup
68 | -------------------------- */
69 | /* Popover
70 | -------------------------- */
71 | /* Tooltip
72 | -------------------------- */
73 | /* Tag
74 | -------------------------- */
75 | /* Tree
76 | -------------------------- */
77 | /* Dropdown
78 | -------------------------- */
79 | /* Badge
80 | -------------------------- */
81 | /* Card
82 | --------------------------*/
83 | /* Slider
84 | --------------------------*/
85 | /* Steps
86 | --------------------------*/
87 | /* Menu
88 | --------------------------*/
89 | /* Rate
90 | --------------------------*/
91 | /* DatePicker
92 | --------------------------*/
93 | /* Loading
94 | --------------------------*/
95 | /* Scrollbar
96 | --------------------------*/
97 | /* Carousel
98 | --------------------------*/
99 | /* Collapse
100 | --------------------------*/
101 | /* Transfer
102 | --------------------------*/
103 | /* Header
104 | --------------------------*/
105 | /* Footer
106 | --------------------------*/
107 | /* Main
108 | --------------------------*/
109 | /* Timeline
110 | --------------------------*/
111 | /* Backtop
112 | --------------------------*/
113 | /* Link
114 | --------------------------*/
115 | /* Calendar
116 | --------------------------*/
117 | /* Form
118 | -------------------------- */
119 | /* Avatar
120 | --------------------------*/
121 | /* Empty
122 | -------------------------- */
123 | /* Descriptions
124 | -------------------------- */
125 | /* Skeleton
126 | --------------------------*/
127 | /* Svg
128 | --------------- */
129 | /* Result
130 | -------------------------- */
131 | /* Break-point
132 | --------------------------*/
133 | /* Break-points
134 | -------------------------- */
135 | /* Scrollbar
136 | -------------------------- */
137 | /* Placeholder
138 | -------------------------- */
139 | /* BEM
140 | -------------------------- */
141 | .el-aside {
142 | overflow: auto;
143 | -webkit-box-sizing: border-box;
144 | box-sizing: border-box;
145 | -ms-flex-negative: 0;
146 | flex-shrink: 0; }
147 |
--------------------------------------------------------------------------------
/frontend/marriage/theme/breadcrumb-item.css:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XuLeiGithub/marriage-demo/f43828c444a92267af507b8e683825678e1aee66/frontend/marriage/theme/breadcrumb-item.css
--------------------------------------------------------------------------------
/frontend/marriage/theme/button-group.css:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XuLeiGithub/marriage-demo/f43828c444a92267af507b8e683825678e1aee66/frontend/marriage/theme/button-group.css
--------------------------------------------------------------------------------
/frontend/marriage/theme/checkbox-button.css:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XuLeiGithub/marriage-demo/f43828c444a92267af507b8e683825678e1aee66/frontend/marriage/theme/checkbox-button.css
--------------------------------------------------------------------------------
/frontend/marriage/theme/checkbox-group.css:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XuLeiGithub/marriage-demo/f43828c444a92267af507b8e683825678e1aee66/frontend/marriage/theme/checkbox-group.css
--------------------------------------------------------------------------------
/frontend/marriage/theme/collapse-item.css:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XuLeiGithub/marriage-demo/f43828c444a92267af507b8e683825678e1aee66/frontend/marriage/theme/collapse-item.css
--------------------------------------------------------------------------------
/frontend/marriage/theme/container.css:
--------------------------------------------------------------------------------
1 | /* BEM support Func
2 | -------------------------- */
3 | /* Element Chalk Variables */
4 | /* Transition
5 | -------------------------- */
6 | /* Color
7 | -------------------------- */
8 | /* 53a8ff */
9 | /* 66b1ff */
10 | /* 79bbff */
11 | /* 8cc5ff */
12 | /* a0cfff */
13 | /* b3d8ff */
14 | /* c6e2ff */
15 | /* d9ecff */
16 | /* ecf5ff */
17 | /* Link
18 | -------------------------- */
19 | /* Border
20 | -------------------------- */
21 | /* Fill
22 | -------------------------- */
23 | /* Typography
24 | -------------------------- */
25 | /* Size
26 | -------------------------- */
27 | /* z-index
28 | -------------------------- */
29 | /* Disable base
30 | -------------------------- */
31 | /* Icon
32 | -------------------------- */
33 | /* Checkbox
34 | -------------------------- */
35 | /* Radio
36 | -------------------------- */
37 | /* Select
38 | -------------------------- */
39 | /* Alert
40 | -------------------------- */
41 | /* MessageBox
42 | -------------------------- */
43 | /* Message
44 | -------------------------- */
45 | /* Notification
46 | -------------------------- */
47 | /* Input
48 | -------------------------- */
49 | /* Cascader
50 | -------------------------- */
51 | /* Group
52 | -------------------------- */
53 | /* Tab
54 | -------------------------- */
55 | /* Button
56 | -------------------------- */
57 | /* cascader
58 | -------------------------- */
59 | /* Switch
60 | -------------------------- */
61 | /* Dialog
62 | -------------------------- */
63 | /* Table
64 | -------------------------- */
65 | /* Pagination
66 | -------------------------- */
67 | /* Popup
68 | -------------------------- */
69 | /* Popover
70 | -------------------------- */
71 | /* Tooltip
72 | -------------------------- */
73 | /* Tag
74 | -------------------------- */
75 | /* Tree
76 | -------------------------- */
77 | /* Dropdown
78 | -------------------------- */
79 | /* Badge
80 | -------------------------- */
81 | /* Card
82 | --------------------------*/
83 | /* Slider
84 | --------------------------*/
85 | /* Steps
86 | --------------------------*/
87 | /* Menu
88 | --------------------------*/
89 | /* Rate
90 | --------------------------*/
91 | /* DatePicker
92 | --------------------------*/
93 | /* Loading
94 | --------------------------*/
95 | /* Scrollbar
96 | --------------------------*/
97 | /* Carousel
98 | --------------------------*/
99 | /* Collapse
100 | --------------------------*/
101 | /* Transfer
102 | --------------------------*/
103 | /* Header
104 | --------------------------*/
105 | /* Footer
106 | --------------------------*/
107 | /* Main
108 | --------------------------*/
109 | /* Timeline
110 | --------------------------*/
111 | /* Backtop
112 | --------------------------*/
113 | /* Link
114 | --------------------------*/
115 | /* Calendar
116 | --------------------------*/
117 | /* Form
118 | -------------------------- */
119 | /* Avatar
120 | --------------------------*/
121 | /* Empty
122 | -------------------------- */
123 | /* Descriptions
124 | -------------------------- */
125 | /* Skeleton
126 | --------------------------*/
127 | /* Svg
128 | --------------- */
129 | /* Result
130 | -------------------------- */
131 | /* Break-point
132 | --------------------------*/
133 | /* Break-points
134 | -------------------------- */
135 | /* Scrollbar
136 | -------------------------- */
137 | /* Placeholder
138 | -------------------------- */
139 | /* BEM
140 | -------------------------- */
141 | .el-container {
142 | display: -webkit-box;
143 | display: -ms-flexbox;
144 | display: flex;
145 | -webkit-box-orient: horizontal;
146 | -webkit-box-direction: normal;
147 | -ms-flex-direction: row;
148 | flex-direction: row;
149 | -webkit-box-flex: 1;
150 | -ms-flex: 1;
151 | flex: 1;
152 | -ms-flex-preferred-size: auto;
153 | flex-basis: auto;
154 | -webkit-box-sizing: border-box;
155 | box-sizing: border-box;
156 | min-width: 0; }
157 | .el-container.is-vertical {
158 | -webkit-box-orient: vertical;
159 | -webkit-box-direction: normal;
160 | -ms-flex-direction: column;
161 | flex-direction: column; }
162 |
--------------------------------------------------------------------------------
/frontend/marriage/theme/dropdown-item.css:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XuLeiGithub/marriage-demo/f43828c444a92267af507b8e683825678e1aee66/frontend/marriage/theme/dropdown-item.css
--------------------------------------------------------------------------------
/frontend/marriage/theme/dropdown-menu.css:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XuLeiGithub/marriage-demo/f43828c444a92267af507b8e683825678e1aee66/frontend/marriage/theme/dropdown-menu.css
--------------------------------------------------------------------------------
/frontend/marriage/theme/element-variables.css:
--------------------------------------------------------------------------------
1 | /* Element Chalk Variables */
2 | /* Transition
3 | -------------------------- */
4 | /* Color
5 | -------------------------- */
6 | /* 53a8ff */
7 | /* 66b1ff */
8 | /* 79bbff */
9 | /* 8cc5ff */
10 | /* a0cfff */
11 | /* b3d8ff */
12 | /* c6e2ff */
13 | /* d9ecff */
14 | /* ecf5ff */
15 | /* Link
16 | -------------------------- */
17 | /* Border
18 | -------------------------- */
19 | /* Fill
20 | -------------------------- */
21 | /* Typography
22 | -------------------------- */
23 | /* Size
24 | -------------------------- */
25 | /* z-index
26 | -------------------------- */
27 | /* Disable base
28 | -------------------------- */
29 | /* Icon
30 | -------------------------- */
31 | /* Checkbox
32 | -------------------------- */
33 | /* Radio
34 | -------------------------- */
35 | /* Select
36 | -------------------------- */
37 | /* Alert
38 | -------------------------- */
39 | /* MessageBox
40 | -------------------------- */
41 | /* Message
42 | -------------------------- */
43 | /* Notification
44 | -------------------------- */
45 | /* Input
46 | -------------------------- */
47 | /* Cascader
48 | -------------------------- */
49 | /* Group
50 | -------------------------- */
51 | /* Tab
52 | -------------------------- */
53 | /* Button
54 | -------------------------- */
55 | /* cascader
56 | -------------------------- */
57 | /* Switch
58 | -------------------------- */
59 | /* Dialog
60 | -------------------------- */
61 | /* Table
62 | -------------------------- */
63 | /* Pagination
64 | -------------------------- */
65 | /* Popup
66 | -------------------------- */
67 | /* Popover
68 | -------------------------- */
69 | /* Tooltip
70 | -------------------------- */
71 | /* Tag
72 | -------------------------- */
73 | /* Tree
74 | -------------------------- */
75 | /* Dropdown
76 | -------------------------- */
77 | /* Badge
78 | -------------------------- */
79 | /* Card
80 | --------------------------*/
81 | /* Slider
82 | --------------------------*/
83 | /* Steps
84 | --------------------------*/
85 | /* Menu
86 | --------------------------*/
87 | /* Rate
88 | --------------------------*/
89 | /* DatePicker
90 | --------------------------*/
91 | /* Loading
92 | --------------------------*/
93 | /* Scrollbar
94 | --------------------------*/
95 | /* Carousel
96 | --------------------------*/
97 | /* Collapse
98 | --------------------------*/
99 | /* Transfer
100 | --------------------------*/
101 | /* Header
102 | --------------------------*/
103 | /* Footer
104 | --------------------------*/
105 | /* Main
106 | --------------------------*/
107 | /* Timeline
108 | --------------------------*/
109 | /* Backtop
110 | --------------------------*/
111 | /* Link
112 | --------------------------*/
113 | /* Calendar
114 | --------------------------*/
115 | /* Form
116 | -------------------------- */
117 | /* Avatar
118 | --------------------------*/
119 | /* Empty
120 | -------------------------- */
121 | /* Descriptions
122 | -------------------------- */
123 | /* Skeleton
124 | --------------------------*/
125 | /* Svg
126 | --------------- */
127 | /* Result
128 | -------------------------- */
129 | /* Break-point
130 | --------------------------*/
131 |
--------------------------------------------------------------------------------
/frontend/marriage/theme/fonts/element-icons.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XuLeiGithub/marriage-demo/f43828c444a92267af507b8e683825678e1aee66/frontend/marriage/theme/fonts/element-icons.ttf
--------------------------------------------------------------------------------
/frontend/marriage/theme/fonts/element-icons.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XuLeiGithub/marriage-demo/f43828c444a92267af507b8e683825678e1aee66/frontend/marriage/theme/fonts/element-icons.woff
--------------------------------------------------------------------------------
/frontend/marriage/theme/form-item.css:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XuLeiGithub/marriage-demo/f43828c444a92267af507b8e683825678e1aee66/frontend/marriage/theme/form-item.css
--------------------------------------------------------------------------------
/frontend/marriage/theme/infinite-scroll.css:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XuLeiGithub/marriage-demo/f43828c444a92267af507b8e683825678e1aee66/frontend/marriage/theme/infinite-scroll.css
--------------------------------------------------------------------------------
/frontend/marriage/theme/infiniteScroll.css:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XuLeiGithub/marriage-demo/f43828c444a92267af507b8e683825678e1aee66/frontend/marriage/theme/infiniteScroll.css
--------------------------------------------------------------------------------
/frontend/marriage/theme/menu-item-group.css:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XuLeiGithub/marriage-demo/f43828c444a92267af507b8e683825678e1aee66/frontend/marriage/theme/menu-item-group.css
--------------------------------------------------------------------------------
/frontend/marriage/theme/menu-item.css:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XuLeiGithub/marriage-demo/f43828c444a92267af507b8e683825678e1aee66/frontend/marriage/theme/menu-item.css
--------------------------------------------------------------------------------
/frontend/marriage/theme/reset.css:
--------------------------------------------------------------------------------
1 | @charset "UTF-8";
2 | /* Element Chalk Variables */
3 | /* Transition
4 | -------------------------- */
5 | /* Color
6 | -------------------------- */
7 | /* 53a8ff */
8 | /* 66b1ff */
9 | /* 79bbff */
10 | /* 8cc5ff */
11 | /* a0cfff */
12 | /* b3d8ff */
13 | /* c6e2ff */
14 | /* d9ecff */
15 | /* ecf5ff */
16 | /* Link
17 | -------------------------- */
18 | /* Border
19 | -------------------------- */
20 | /* Fill
21 | -------------------------- */
22 | /* Typography
23 | -------------------------- */
24 | /* Size
25 | -------------------------- */
26 | /* z-index
27 | -------------------------- */
28 | /* Disable base
29 | -------------------------- */
30 | /* Icon
31 | -------------------------- */
32 | /* Checkbox
33 | -------------------------- */
34 | /* Radio
35 | -------------------------- */
36 | /* Select
37 | -------------------------- */
38 | /* Alert
39 | -------------------------- */
40 | /* MessageBox
41 | -------------------------- */
42 | /* Message
43 | -------------------------- */
44 | /* Notification
45 | -------------------------- */
46 | /* Input
47 | -------------------------- */
48 | /* Cascader
49 | -------------------------- */
50 | /* Group
51 | -------------------------- */
52 | /* Tab
53 | -------------------------- */
54 | /* Button
55 | -------------------------- */
56 | /* cascader
57 | -------------------------- */
58 | /* Switch
59 | -------------------------- */
60 | /* Dialog
61 | -------------------------- */
62 | /* Table
63 | -------------------------- */
64 | /* Pagination
65 | -------------------------- */
66 | /* Popup
67 | -------------------------- */
68 | /* Popover
69 | -------------------------- */
70 | /* Tooltip
71 | -------------------------- */
72 | /* Tag
73 | -------------------------- */
74 | /* Tree
75 | -------------------------- */
76 | /* Dropdown
77 | -------------------------- */
78 | /* Badge
79 | -------------------------- */
80 | /* Card
81 | --------------------------*/
82 | /* Slider
83 | --------------------------*/
84 | /* Steps
85 | --------------------------*/
86 | /* Menu
87 | --------------------------*/
88 | /* Rate
89 | --------------------------*/
90 | /* DatePicker
91 | --------------------------*/
92 | /* Loading
93 | --------------------------*/
94 | /* Scrollbar
95 | --------------------------*/
96 | /* Carousel
97 | --------------------------*/
98 | /* Collapse
99 | --------------------------*/
100 | /* Transfer
101 | --------------------------*/
102 | /* Header
103 | --------------------------*/
104 | /* Footer
105 | --------------------------*/
106 | /* Main
107 | --------------------------*/
108 | /* Timeline
109 | --------------------------*/
110 | /* Backtop
111 | --------------------------*/
112 | /* Link
113 | --------------------------*/
114 | /* Calendar
115 | --------------------------*/
116 | /* Form
117 | -------------------------- */
118 | /* Avatar
119 | --------------------------*/
120 | /* Empty
121 | -------------------------- */
122 | /* Descriptions
123 | -------------------------- */
124 | /* Skeleton
125 | --------------------------*/
126 | /* Svg
127 | --------------- */
128 | /* Result
129 | -------------------------- */
130 | /* Break-point
131 | --------------------------*/
132 | body {
133 | font-family: "Helvetica Neue",Helvetica,"PingFang SC","Hiragino Sans GB","Microsoft YaHei","微软雅黑",Arial,sans-serif;
134 | font-weight: 400;
135 | font-size: 14px;
136 | color: #000000;
137 | -webkit-font-smoothing: antialiased; }
138 |
139 | a {
140 | color: #FF3947;
141 | text-decoration: none; }
142 | a:hover, a:focus {
143 | color: #ff616c; }
144 | a:active {
145 | color: #e63340; }
146 |
147 | h1, h2, h3, h4, h5, h6 {
148 | color: #606266;
149 | font-weight: inherit; }
150 | h1:first-child, h2:first-child, h3:first-child, h4:first-child, h5:first-child, h6:first-child {
151 | margin-top: 0; }
152 | h1:last-child, h2:last-child, h3:last-child, h4:last-child, h5:last-child, h6:last-child {
153 | margin-bottom: 0; }
154 |
155 | h1 {
156 | font-size: 20px; }
157 |
158 | h2 {
159 | font-size: 18px; }
160 |
161 | h3 {
162 | font-size: 16px; }
163 |
164 | h4, h5, h6, p {
165 | font-size: inherit; }
166 |
167 | p {
168 | line-height: 1.8; }
169 | p:first-child {
170 | margin-top: 0; }
171 | p:last-child {
172 | margin-bottom: 0; }
173 |
174 | sup, sub {
175 | font-size: 13px; }
176 |
177 | small {
178 | font-size: 12px; }
179 |
180 | hr {
181 | margin-top: 20px;
182 | margin-bottom: 20px;
183 | border: 0;
184 | border-top: 1px solid #eeeeee; }
185 |
--------------------------------------------------------------------------------
/frontend/marriage/theme/spinner.css:
--------------------------------------------------------------------------------
1 | /* BEM support Func
2 | -------------------------- */
3 | /* Element Chalk Variables */
4 | /* Transition
5 | -------------------------- */
6 | /* Color
7 | -------------------------- */
8 | /* 53a8ff */
9 | /* 66b1ff */
10 | /* 79bbff */
11 | /* 8cc5ff */
12 | /* a0cfff */
13 | /* b3d8ff */
14 | /* c6e2ff */
15 | /* d9ecff */
16 | /* ecf5ff */
17 | /* Link
18 | -------------------------- */
19 | /* Border
20 | -------------------------- */
21 | /* Fill
22 | -------------------------- */
23 | /* Typography
24 | -------------------------- */
25 | /* Size
26 | -------------------------- */
27 | /* z-index
28 | -------------------------- */
29 | /* Disable base
30 | -------------------------- */
31 | /* Icon
32 | -------------------------- */
33 | /* Checkbox
34 | -------------------------- */
35 | /* Radio
36 | -------------------------- */
37 | /* Select
38 | -------------------------- */
39 | /* Alert
40 | -------------------------- */
41 | /* MessageBox
42 | -------------------------- */
43 | /* Message
44 | -------------------------- */
45 | /* Notification
46 | -------------------------- */
47 | /* Input
48 | -------------------------- */
49 | /* Cascader
50 | -------------------------- */
51 | /* Group
52 | -------------------------- */
53 | /* Tab
54 | -------------------------- */
55 | /* Button
56 | -------------------------- */
57 | /* cascader
58 | -------------------------- */
59 | /* Switch
60 | -------------------------- */
61 | /* Dialog
62 | -------------------------- */
63 | /* Table
64 | -------------------------- */
65 | /* Pagination
66 | -------------------------- */
67 | /* Popup
68 | -------------------------- */
69 | /* Popover
70 | -------------------------- */
71 | /* Tooltip
72 | -------------------------- */
73 | /* Tag
74 | -------------------------- */
75 | /* Tree
76 | -------------------------- */
77 | /* Dropdown
78 | -------------------------- */
79 | /* Badge
80 | -------------------------- */
81 | /* Card
82 | --------------------------*/
83 | /* Slider
84 | --------------------------*/
85 | /* Steps
86 | --------------------------*/
87 | /* Menu
88 | --------------------------*/
89 | /* Rate
90 | --------------------------*/
91 | /* DatePicker
92 | --------------------------*/
93 | /* Loading
94 | --------------------------*/
95 | /* Scrollbar
96 | --------------------------*/
97 | /* Carousel
98 | --------------------------*/
99 | /* Collapse
100 | --------------------------*/
101 | /* Transfer
102 | --------------------------*/
103 | /* Header
104 | --------------------------*/
105 | /* Footer
106 | --------------------------*/
107 | /* Main
108 | --------------------------*/
109 | /* Timeline
110 | --------------------------*/
111 | /* Backtop
112 | --------------------------*/
113 | /* Link
114 | --------------------------*/
115 | /* Calendar
116 | --------------------------*/
117 | /* Form
118 | -------------------------- */
119 | /* Avatar
120 | --------------------------*/
121 | /* Empty
122 | -------------------------- */
123 | /* Descriptions
124 | -------------------------- */
125 | /* Skeleton
126 | --------------------------*/
127 | /* Svg
128 | --------------- */
129 | /* Result
130 | -------------------------- */
131 | /* Break-point
132 | --------------------------*/
133 | /* Break-points
134 | -------------------------- */
135 | /* Scrollbar
136 | -------------------------- */
137 | /* Placeholder
138 | -------------------------- */
139 | /* BEM
140 | -------------------------- */
141 | .el-time-spinner {
142 | width: 100%;
143 | white-space: nowrap; }
144 |
145 | .el-spinner {
146 | display: inline-block;
147 | vertical-align: middle; }
148 |
149 | .el-spinner-inner {
150 | -webkit-animation: rotate 2s linear infinite;
151 | animation: rotate 2s linear infinite;
152 | width: 50px;
153 | height: 50px; }
154 | .el-spinner-inner .path {
155 | stroke: #ececec;
156 | stroke-linecap: round;
157 | -webkit-animation: dash 1.5s ease-in-out infinite;
158 | animation: dash 1.5s ease-in-out infinite; }
159 |
160 | @-webkit-keyframes rotate {
161 | 100% {
162 | -webkit-transform: rotate(360deg);
163 | transform: rotate(360deg); } }
164 |
165 | @keyframes rotate {
166 | 100% {
167 | -webkit-transform: rotate(360deg);
168 | transform: rotate(360deg); } }
169 |
170 | @-webkit-keyframes dash {
171 | 0% {
172 | stroke-dasharray: 1, 150;
173 | stroke-dashoffset: 0; }
174 | 50% {
175 | stroke-dasharray: 90, 150;
176 | stroke-dashoffset: -35; }
177 | 100% {
178 | stroke-dasharray: 90, 150;
179 | stroke-dashoffset: -124; } }
180 |
181 | @keyframes dash {
182 | 0% {
183 | stroke-dasharray: 1, 150;
184 | stroke-dashoffset: 0; }
185 | 50% {
186 | stroke-dasharray: 90, 150;
187 | stroke-dashoffset: -35; }
188 | 100% {
189 | stroke-dasharray: 90, 150;
190 | stroke-dashoffset: -124; } }
191 |
--------------------------------------------------------------------------------
/frontend/marriage/theme/steps.css:
--------------------------------------------------------------------------------
1 | /* BEM support Func
2 | -------------------------- */
3 | /* Element Chalk Variables */
4 | /* Transition
5 | -------------------------- */
6 | /* Color
7 | -------------------------- */
8 | /* 53a8ff */
9 | /* 66b1ff */
10 | /* 79bbff */
11 | /* 8cc5ff */
12 | /* a0cfff */
13 | /* b3d8ff */
14 | /* c6e2ff */
15 | /* d9ecff */
16 | /* ecf5ff */
17 | /* Link
18 | -------------------------- */
19 | /* Border
20 | -------------------------- */
21 | /* Fill
22 | -------------------------- */
23 | /* Typography
24 | -------------------------- */
25 | /* Size
26 | -------------------------- */
27 | /* z-index
28 | -------------------------- */
29 | /* Disable base
30 | -------------------------- */
31 | /* Icon
32 | -------------------------- */
33 | /* Checkbox
34 | -------------------------- */
35 | /* Radio
36 | -------------------------- */
37 | /* Select
38 | -------------------------- */
39 | /* Alert
40 | -------------------------- */
41 | /* MessageBox
42 | -------------------------- */
43 | /* Message
44 | -------------------------- */
45 | /* Notification
46 | -------------------------- */
47 | /* Input
48 | -------------------------- */
49 | /* Cascader
50 | -------------------------- */
51 | /* Group
52 | -------------------------- */
53 | /* Tab
54 | -------------------------- */
55 | /* Button
56 | -------------------------- */
57 | /* cascader
58 | -------------------------- */
59 | /* Switch
60 | -------------------------- */
61 | /* Dialog
62 | -------------------------- */
63 | /* Table
64 | -------------------------- */
65 | /* Pagination
66 | -------------------------- */
67 | /* Popup
68 | -------------------------- */
69 | /* Popover
70 | -------------------------- */
71 | /* Tooltip
72 | -------------------------- */
73 | /* Tag
74 | -------------------------- */
75 | /* Tree
76 | -------------------------- */
77 | /* Dropdown
78 | -------------------------- */
79 | /* Badge
80 | -------------------------- */
81 | /* Card
82 | --------------------------*/
83 | /* Slider
84 | --------------------------*/
85 | /* Steps
86 | --------------------------*/
87 | /* Menu
88 | --------------------------*/
89 | /* Rate
90 | --------------------------*/
91 | /* DatePicker
92 | --------------------------*/
93 | /* Loading
94 | --------------------------*/
95 | /* Scrollbar
96 | --------------------------*/
97 | /* Carousel
98 | --------------------------*/
99 | /* Collapse
100 | --------------------------*/
101 | /* Transfer
102 | --------------------------*/
103 | /* Header
104 | --------------------------*/
105 | /* Footer
106 | --------------------------*/
107 | /* Main
108 | --------------------------*/
109 | /* Timeline
110 | --------------------------*/
111 | /* Backtop
112 | --------------------------*/
113 | /* Link
114 | --------------------------*/
115 | /* Calendar
116 | --------------------------*/
117 | /* Form
118 | -------------------------- */
119 | /* Avatar
120 | --------------------------*/
121 | /* Empty
122 | -------------------------- */
123 | /* Descriptions
124 | -------------------------- */
125 | /* Skeleton
126 | --------------------------*/
127 | /* Svg
128 | --------------- */
129 | /* Result
130 | -------------------------- */
131 | /* Break-point
132 | --------------------------*/
133 | /* Break-points
134 | -------------------------- */
135 | /* Scrollbar
136 | -------------------------- */
137 | /* Placeholder
138 | -------------------------- */
139 | /* BEM
140 | -------------------------- */
141 | .el-steps {
142 | display: -webkit-box;
143 | display: -ms-flexbox;
144 | display: flex; }
145 | .el-steps--simple {
146 | padding: 13px 8%;
147 | border-radius: 4px;
148 | background: #F5F7FA; }
149 | .el-steps--horizontal {
150 | white-space: nowrap; }
151 | .el-steps--vertical {
152 | height: 100%;
153 | -webkit-box-orient: vertical;
154 | -webkit-box-direction: normal;
155 | -ms-flex-flow: column;
156 | flex-flow: column; }
157 |
--------------------------------------------------------------------------------
/frontend/marriage/theme/submenu.css:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XuLeiGithub/marriage-demo/f43828c444a92267af507b8e683825678e1aee66/frontend/marriage/theme/submenu.css
--------------------------------------------------------------------------------
/frontend/marriage/theme/tab-pane.css:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XuLeiGithub/marriage-demo/f43828c444a92267af507b8e683825678e1aee66/frontend/marriage/theme/tab-pane.css
--------------------------------------------------------------------------------
/frontend/marriage/vue.config.js:
--------------------------------------------------------------------------------
1 | 'use strict'
2 | const path = require('path')
3 | const defaultSettings = require('./src/settings.js')
4 |
5 | function resolve(dir) {
6 | return path.join(__dirname, dir)
7 | }
8 |
9 | const name = defaultSettings.title || 'vue Admin Template' // page title
10 |
11 | // If your port is set to 80,
12 | // use administrator privileges to execute the command line.
13 | // For example, Mac: sudo npm run
14 | // You can change the port by the following methods:
15 | // port = 9528 npm run dev OR npm run dev --port = 9528
16 | const port = process.env.port || process.env.npm_config_port || 9528 // dev port
17 |
18 | // All configuration item explanations can be find in https://cli.vuejs.org/config/
19 | module.exports = {
20 | /**
21 | * You will need to set publicPath if you plan to deploy your site under a sub path,
22 | * for example GitHub Pages. If you plan to deploy your site to https://foo.github.io/bar/,
23 | * then publicPath should be set to "/bar/".
24 | * In most cases please use '/' !!!
25 | * Detail: https://cli.vuejs.org/config/#publicpath
26 | */
27 | publicPath: './',
28 | outputDir: 'dist',
29 | assetsDir: 'static',
30 | lintOnSave: process.env.NODE_ENV === 'development',
31 | productionSourceMap: false,
32 | devServer: {
33 | port: port,
34 | open: true,
35 | overlay: {
36 | warnings: false,
37 | errors: true
38 | },
39 | proxy: {
40 | // change xxx-api/login => mock/login
41 | // detail: https://cli.vuejs.org/config/#devserver-proxy
42 | [process.env.VUE_APP_BASE_API]: {
43 | target: 'http://121.5.145.25:9999/',
44 | changeOrigin: true,
45 | pathRewrite: {
46 | ['^' + process.env.VUE_APP_BASE_API]: '/marriage'
47 | }
48 | }
49 | }
50 | },
51 | configureWebpack: {
52 | // provide the app's title in webpack's name field, so that
53 | // it can be accessed in index.html to inject the correct title.
54 | name: name,
55 | resolve: {
56 | alias: {
57 | '@': resolve('src')
58 | }
59 | }
60 | },
61 | chainWebpack(config) {
62 | // it can improve the speed of the first screen, it is recommended to turn on preload
63 | config.plugin('preload').tap(() => [
64 | {
65 | rel: 'preload',
66 | // to ignore runtime.js
67 | // https://github.com/vuejs/vue-cli/blob/dev/packages/@vue/cli-service/lib/config/app.js#L171
68 | fileBlacklist: [/\.map$/, /hot-update\.js$/, /runtime\..*\.js$/],
69 | include: 'initial'
70 | }
71 | ])
72 |
73 | // when there are many pages, it will cause too many meaningless requests
74 | config.plugins.delete('prefetch')
75 |
76 | // set svg-sprite-loader
77 | config.module
78 | .rule('svg')
79 | .exclude.add(resolve('src/icons'))
80 | .end()
81 | config.module
82 | .rule('icons')
83 | .test(/\.svg$/)
84 | .include.add(resolve('src/icons'))
85 | .end()
86 | .use('svg-sprite-loader')
87 | .loader('svg-sprite-loader')
88 | .options({
89 | symbolId: 'icon-[name]'
90 | })
91 | .end()
92 |
93 | config.when(process.env.NODE_ENV !== 'development', (config) => {
94 | config
95 | .plugin('ScriptExtHtmlWebpackPlugin')
96 | .after('html')
97 | .use('script-ext-html-webpack-plugin', [
98 | {
99 | // `runtime` must same as runtimeChunk name. default is `runtime`
100 | inline: /runtime\..*\.js$/
101 | }
102 | ])
103 | .end()
104 | config.optimization.splitChunks({
105 | chunks: 'all',
106 | cacheGroups: {
107 | libs: {
108 | name: 'chunk-libs',
109 | test: /[\\/]node_modules[\\/]/,
110 | priority: 10,
111 | chunks: 'initial' // only package third parties that are initially dependent
112 | },
113 | elementUI: {
114 | name: 'chunk-elementUI', // split elementUI into a single package
115 | priority: 20, // the weight needs to be larger than libs and app or it will be packaged into libs or app
116 | test: /[\\/]node_modules[\\/]_?element-ui(.*)/ // in order to adapt to cnpm
117 | },
118 | commons: {
119 | name: 'chunk-commons',
120 | test: resolve('src/components'), // can customize your rules
121 | minChunks: 3, // minimum common number
122 | priority: 5,
123 | reuseExistingChunk: true
124 | }
125 | }
126 | })
127 | // https:// webpack.js.org/configuration/optimization/#optimizationruntimechunk
128 | config.optimization.runtimeChunk('single')
129 | })
130 | }
131 | }
132 |
--------------------------------------------------------------------------------