├── LittleDemo ├── app.js ├── app.json ├── app.wxss ├── pages │ ├── case │ │ ├── case.js │ │ ├── case.json │ │ ├── case.wxml │ │ └── case.wxss │ ├── criminalsmall │ │ ├── criminalsmall.js │ │ ├── criminalsmall.json │ │ ├── criminalsmall.wxml │ │ ├── criminalsmall.wxss │ │ ├── detail │ │ │ ├── detail.js │ │ │ ├── detail.json │ │ │ ├── detail.wxml │ │ │ └── detail.wxss │ │ └── searchresult │ │ │ ├── searchresult.js │ │ │ ├── searchresult.json │ │ │ ├── searchresult.wxml │ │ │ └── searchresult.wxss │ ├── detail │ │ ├── civil │ │ │ ├── detail.js │ │ │ ├── detail.json │ │ │ ├── detail.wxml │ │ │ └── detail.wxss │ │ ├── consume │ │ │ ├── detail.js │ │ │ ├── detail.json │ │ │ ├── detail.wxml │ │ │ └── detail.wxss │ │ ├── criminal │ │ │ ├── detail.js │ │ │ ├── detail.json │ │ │ ├── detail.wxml │ │ │ └── detail.wxss │ │ ├── detail.js │ │ ├── detail.json │ │ ├── detail.wxml │ │ ├── detail.wxss │ │ ├── fund │ │ │ ├── detail.js │ │ │ ├── detail.json │ │ │ ├── detail.wxml │ │ │ └── detail.wxss │ │ ├── insurance │ │ │ ├── detail.js │ │ │ ├── detail.json │ │ │ ├── detail.wxml │ │ │ └── detail.wxss │ │ ├── labor │ │ │ ├── detail.js │ │ │ ├── detail.json │ │ │ ├── detail.wxml │ │ │ └── detail.wxss │ │ ├── marriage │ │ │ ├── detail.js │ │ │ ├── detail.json │ │ │ ├── detail.wxml │ │ │ └── detail.wxss │ │ ├── protect │ │ │ ├── detail.js │ │ │ ├── detail.json │ │ │ ├── detail.wxml │ │ │ └── detail.wxss │ │ ├── security │ │ │ ├── detail.js │ │ │ ├── detail.json │ │ │ ├── detail.wxml │ │ │ └── detail.wxss │ │ ├── traffic │ │ │ ├── detail.js │ │ │ ├── detail.json │ │ │ ├── detail.wxml │ │ │ └── detail.wxss │ │ ├── trafficscore │ │ │ ├── detail.js │ │ │ ├── detail.json │ │ │ ├── detail.wxml │ │ │ └── detail.wxss │ │ └── work │ │ │ ├── detail.js │ │ │ ├── detail.json │ │ │ ├── detail.wxml │ │ │ └── detail.wxss │ ├── font │ │ ├── font.js │ │ ├── font.json │ │ ├── font.wxml │ │ └── font.wxss │ ├── home │ │ ├── home.js │ │ ├── home.json │ │ ├── home.wxml │ │ └── home.wxss │ ├── la │ │ ├── la.js │ │ ├── la.json │ │ ├── la.wxml │ │ └── la.wxss │ ├── la2 │ │ ├── la2.js │ │ ├── la2.json │ │ ├── la2.wxml │ │ └── la2.wxss │ ├── laws │ │ ├── laws.js │ │ ├── laws.json │ │ ├── laws.wxml │ │ └── laws.wxss │ ├── qa │ │ ├── qa.js │ │ ├── qa.json │ │ ├── qa.wxml │ │ └── qa.wxss │ ├── question │ │ ├── question.js │ │ ├── question.json │ │ ├── question.wxml │ │ └── question.wxss │ └── start │ │ ├── start.js │ │ ├── start.json │ │ ├── start.wxml │ │ └── start.wxss ├── project.config.json ├── sitemap.json ├── src │ ├── an3.png │ ├── audio.png │ ├── audio2.png │ ├── book3.png │ ├── book5.png │ ├── book6.png │ ├── book7.png │ ├── book8.png │ ├── book9.png │ ├── cover.jpg │ ├── question3.png │ ├── question5.png │ ├── question6.png │ ├── question7.png │ ├── question8.png │ ├── question9.png │ ├── search3.png │ ├── search5.png │ ├── search6.png │ ├── search7.png │ ├── search8.png │ ├── search9.png │ ├── ֪ʶ5.png │ ├── ֪ʶ6.png │ ├── ֪ʶ7.png │ ├── ֪ʶ8.png │ └── ֪ʶ9.png └── wxstyle │ ├── base │ ├── fn.wxss │ ├── mixin │ │ ├── setArrow.wxss │ │ ├── setOnepx.wxss │ │ └── text.wxss │ ├── reset.wxss │ └── variable │ │ ├── color.wxss │ │ ├── global.wxss │ │ ├── weui-button.wxss │ │ ├── weui-cell.wxss │ │ ├── weui-dialog.wxss │ │ ├── weui-grid.wxss │ │ ├── weui-msg.wxss │ │ └── weui-progress.wxss │ ├── weui.wxss │ └── widget │ ├── weui-agree │ └── weui-agree.wxss │ ├── weui-animate │ └── weui-animate.wxss │ ├── weui-button │ └── weui-button.wxss │ ├── weui-cell │ ├── weui-access.wxss │ ├── weui-cell.wxss │ ├── weui-check.wxss │ ├── weui-form.wxss │ ├── weui-form │ │ ├── weui-form-preview.wxss │ │ ├── weui-form_common.wxss │ │ ├── weui-select.wxss │ │ └── weui-vcode.wxss │ ├── weui-switch.wxss │ └── weui-uploader.wxss │ ├── weui-flex │ └── weui-flex.wxss │ ├── weui-footer │ └── weui-footer.wxss │ ├── weui-grid │ └── weui-grid.wxss │ ├── weui-loading │ └── weui-loading.wxss │ ├── weui-media-box │ └── weui-media-box.wxss │ ├── weui-page │ ├── weui-article.wxss │ └── weui-msg.wxss │ ├── weui-panel │ └── weui-panel.wxss │ ├── weui-progress │ └── weui-progress.wxss │ ├── weui-searchbar │ └── weui-searchbar.wxss │ ├── weui-tab │ ├── weui-navbar.wxss │ └── weui-tab.wxss │ └── weui-tips │ ├── weui-badge.wxss │ └── weui-loadmore.wxss ├── README.md ├── criminal ├── HELP.md ├── criminal.iml ├── mvnw ├── mvnw.cmd ├── pom.xml └── src │ ├── main │ ├── java │ │ └── com │ │ │ └── law │ │ │ └── criminal │ │ │ ├── CriminalApplication.java │ │ │ ├── comm │ │ │ ├── CivilTableOutput.java │ │ │ ├── CommonTableOutput.java │ │ │ ├── LawTableOutput.java │ │ │ ├── QAOutput.java │ │ │ ├── SecurityTableOutput.java │ │ │ └── TrafficTableOutput.java │ │ │ ├── config │ │ │ └── MyServerConfig.java │ │ │ ├── model │ │ │ ├── elasticsearch │ │ │ │ ├── CivilLaw.java │ │ │ │ ├── ConsumerLaw.java │ │ │ │ ├── ContractLaw.java │ │ │ │ ├── CriminalLaw.java │ │ │ │ ├── FundLaw.java │ │ │ │ ├── InsuranceLaw.java │ │ │ │ ├── LaborLaw.java │ │ │ │ ├── MarriageLaw.java │ │ │ │ ├── ProtectLaw.java │ │ │ │ ├── QAData.java │ │ │ │ ├── SecurityLaw.java │ │ │ │ ├── TrafficLaw.java │ │ │ │ └── TrafficScoreLaw.java │ │ │ └── mysql │ │ │ │ ├── Civil.java │ │ │ │ ├── CivilKey.java │ │ │ │ ├── Contract.java │ │ │ │ ├── ContractKey.java │ │ │ │ ├── Insurance.java │ │ │ │ ├── InsuranceKey.java │ │ │ │ ├── Law.java │ │ │ │ ├── LawKey.java │ │ │ │ ├── Security.java │ │ │ │ ├── SecurityKey.java │ │ │ │ ├── Traffic.java │ │ │ │ └── TrafficKey.java │ │ │ ├── repository │ │ │ ├── elasticsearch │ │ │ │ ├── CivilLawSearchReposity.java │ │ │ │ ├── ConsumerLawSearchRepository.java │ │ │ │ ├── ContractLawSearchRepository.java │ │ │ │ ├── CriminaLawSearchReposity.java │ │ │ │ ├── FundLawSearchReposity.java │ │ │ │ ├── InsuranceLawSearchRepository.java │ │ │ │ ├── LaborLawSearchReposity.java │ │ │ │ ├── MarriageSearchReposity.java │ │ │ │ ├── ProtectLawSearchRepository.java │ │ │ │ ├── QADataSearchReposity.java │ │ │ │ ├── SecuritylawSearchReposity.java │ │ │ │ ├── TrafficLawSearchReposity.java │ │ │ │ └── TrafficScoreSearchRepository.java │ │ │ └── mysql │ │ │ │ └── LawSearchRepository.java │ │ │ ├── service │ │ │ ├── CivilLawSearchService.java │ │ │ ├── CriminalLawSearchService.java │ │ │ ├── FundLawSearchService.java │ │ │ ├── LaborLawSearchService.java │ │ │ ├── MarriageLawSearchService.java │ │ │ ├── QASearchService.java │ │ │ ├── SecurityLawSearchService.java │ │ │ ├── TrafficLawSearchService.java │ │ │ ├── TrafficScoreLawSearchService.java │ │ │ └── impl │ │ │ │ ├── CivilLawSearchServiceImpl.java │ │ │ │ ├── CriminalLawSearchServiceImpl.java │ │ │ │ ├── FundLawSearchServiceImpl.java │ │ │ │ ├── LaborLawSearchServiceImpl.java │ │ │ │ ├── MarriageLawSearchServiceImpl.java │ │ │ │ ├── QASearchServiceImpl.java │ │ │ │ ├── SecurityLawSearchServiceImpl.java │ │ │ │ ├── TrafficLawSearchServiceImpl.java │ │ │ │ └── TrafficScoreLawSearchServiceImpl.java │ │ │ └── web │ │ │ ├── CivilSearchController.java │ │ │ ├── ConsumerSearchController.java │ │ │ ├── ContractSearchController.java │ │ │ ├── CriminalSearchController.java │ │ │ ├── FundSearchController.java │ │ │ ├── InsuranceSearchController.java │ │ │ ├── LaborSearchController.java │ │ │ ├── MarriageSearchController.java │ │ │ ├── ProtectSearchController.java │ │ │ ├── QAController.java │ │ │ ├── SecuritySearchController.java │ │ │ ├── TrafficScoreSearchController.java │ │ │ └── TrafficSearchController.java │ └── resources │ │ └── application.properties │ └── test │ └── java │ └── com │ └── law │ └── criminal │ ├── CriminalApplicationTests.java │ └── HelloTest.java ├── image ├── weixin1.png └── weixin2.png ├── kg ├── HELP.md ├── kg.iml ├── mvnw ├── mvnw.cmd ├── pom.xml └── src │ ├── main │ ├── java │ │ └── com │ │ │ └── law │ │ │ └── kg │ │ │ ├── KgApplication.java │ │ │ ├── comm │ │ │ ├── KnowledgeType.java │ │ │ ├── QAOutput.java │ │ │ └── RandomUtil.java │ │ │ ├── model │ │ │ ├── Knowledge.java │ │ │ └── elasticsearch │ │ │ │ └── QAData.java │ │ │ ├── repository │ │ │ ├── KnowledgeRepository.java │ │ │ └── QADataSearchReposity.java │ │ │ └── web │ │ │ ├── HelloController.java │ │ │ └── QAController.java │ └── resources │ │ └── application.properties │ └── test │ └── java │ └── com │ └── law │ └── kg │ └── KgApplicationTests.java └── lawPredict ├── pom.xml └── src ├── main └── java │ ├── com │ └── wangyuhui │ │ └── App.java │ └── predict │ ├── IClassificationPredictService.java │ ├── IRegressionPredictService.java │ ├── PredictService.java │ ├── impl │ ├── PredictAyService.java │ ├── PredictLawService.java │ └── PredictXqService.java │ └── pojo │ └── PredictResult.java └── test └── java └── com └── wangyuhui └── AppTest.java /LittleDemo/app.js: -------------------------------------------------------------------------------- 1 | App({ 2 | onLaunch: function () { 3 | console.log('App Launch') 4 | }, 5 | onShow: function () { 6 | console.log('App Show') 7 | }, 8 | onHide: function () { 9 | console.log('App Hide') 10 | }, 11 | globalData: { 12 | hasLogin: false 13 | } 14 | }); -------------------------------------------------------------------------------- /LittleDemo/app.json: -------------------------------------------------------------------------------- 1 | { 2 | "pages": [ 3 | "pages/start/start", 4 | "pages/question/question", 5 | "pages/home/home", 6 | "pages/detail/detail", 7 | "pages/la/la", 8 | "pages/la2/la2", 9 | "pages/detail/criminal/detail", 10 | "pages/detail/traffic/detail", 11 | "pages/detail/labor/detail", 12 | "pages/detail/trafficscore/detail", 13 | "pages/detail/civil/detail", 14 | "pages/detail/security/detail", 15 | "pages/detail/marriage/detail", 16 | "pages/detail/work/detail", 17 | "pages/detail/fund/detail", 18 | "pages/detail/consume/detail", 19 | "pages/detail/insurance/detail", 20 | "pages/detail/protect/detail", 21 | "pages/case/case", 22 | "pages/qa/qa", 23 | "pages/laws/laws", 24 | "pages/criminalsmall/criminalsmall", 25 | "pages/criminalsmall/searchresult/searchresult", 26 | "pages/criminalsmall/detail/detail", 27 | "pages/font/font" 28 | ], 29 | "window": { 30 | "backgroundTextStyle": "dark", 31 | "navigationBarBackgroundColor": "#207dff", 32 | "navigationBarTitleText": "法律小智囊", 33 | "navigationBarTextStyle": "white" 34 | }, 35 | "sitemapLocation": "sitemap.json", 36 | "tabBar": { 37 | "color": "#a9b7b7", 38 | "selectedColor": "#207dff", 39 | "borderStyle": "white", 40 | "list": [ 41 | { 42 | "pagePath": "pages/case/case", 43 | "text": "案情推理", 44 | "iconPath": "src/search7.png", 45 | "selectedIconPath": "src/search5.png" 46 | }, 47 | { 48 | "pagePath": "pages/question/question", 49 | "text": "智能问答", 50 | "iconPath": "src/question7.png", 51 | "selectedIconPath": "src/question5.png" 52 | }, 53 | { 54 | "pagePath": "pages/qa/qa", 55 | "text": "法律知识", 56 | "iconPath": "src/知识7.png", 57 | "selectedIconPath": "src/知识5.png" 58 | }, 59 | { 60 | "pagePath": "pages/laws/laws", 61 | "text": "法律手册", 62 | "iconPath": "src/book7.png", 63 | "selectedIconPath": "src/book5.png" 64 | } 65 | ] 66 | }, 67 | "enablePullDownRefresh": true 68 | } -------------------------------------------------------------------------------- /LittleDemo/app.wxss: -------------------------------------------------------------------------------- 1 | @import 'wxstyle/weui.wxss'; 2 | 3 | page{ 4 | background-color: #F8F8F8; 5 | font-size: 32rpx; 6 | font-family: -apple-system-font,Helvetica Neue,Helvetica,sans-serif; 7 | } 8 | .page__hd { 9 | padding: 70rpx 70rpx 56rpx 70rpx; 10 | } 11 | .page__bd { 12 | padding-bottom: 56rpx; 13 | } 14 | .page__bd_spacing { 15 | padding-left: 15px; 16 | padding-right: 15px; 17 | } 18 | 19 | .page__ft{ 20 | padding-bottom: 20rpx; 21 | text-align: center; 22 | } 23 | 24 | .page__title { 25 | text-align: left; 26 | /* font-size: 20px; */ 27 | font-size: 42rpx; 28 | font-weight: 400; 29 | } 30 | 31 | .page__desc { 32 | margin-top: 10rpx; 33 | color: #888888; 34 | text-align: left; 35 | /* font-size: 14px; */ 36 | font-size: 28rpx; 37 | } 38 | 39 | .orange-ui-btn{ 40 | vertical-align: baseline; 41 | font-size: 24rpx; 42 | padding-left: 14rpx; 43 | padding-right: 14rpx; 44 | /* background: #207dff; */ 45 | /* color:#fff; */ 46 | margin: 4rpx 10rpx; 47 | background: #fff; 48 | /* color:#fff; */ 49 | color:#207dff; 50 | /* margin-left: 10px; */ 51 | margin-right: 20rpx; 52 | margin-left: 0; 53 | font-weight: 500; 54 | border-color: #dedede; 55 | } 56 | .oubtn-r{ 57 | background: #fff; 58 | /* color:#207dff; */ 59 | color:#000; 60 | direction: right; 61 | margin-right: 0; 62 | font-weight: normal; 63 | } 64 | .oo-btn{ 65 | color:#fff!important; 66 | border-radius: 8rpx!important; 67 | background-color: #207dff!important; 68 | border: none!important; 69 | font:SimHei; 70 | height: 76rpx; 71 | line-height: 76rpx; 72 | font-size: 28rpx; 73 | box-shadow: 0px 2rpx 6rpx rgba(0, 0, 0, .25); 74 | font-weight: 500; 75 | } -------------------------------------------------------------------------------- /LittleDemo/pages/case/case.json: -------------------------------------------------------------------------------- 1 | { 2 | "usingComponents": {}, 3 | "enablePullDownRefresh": true 4 | } -------------------------------------------------------------------------------- /LittleDemo/pages/criminalsmall/criminalsmall.js: -------------------------------------------------------------------------------- 1 | // pages/criminalsmall/criminalsmall.js 2 | Page({ 3 | 4 | /** 5 | * 页面的初始数据 6 | */ 7 | data: { 8 | smallcriminal:"", 9 | criminalSmalllList:[], 10 | info:"" 11 | 12 | }, 13 | 14 | /** 15 | * 生命周期函数--监听页面加载 16 | */ 17 | onLoad: function (options) { 18 | var _this = this 19 | var type = options.type 20 | //获取上级的点击事件 21 | var info = JSON.parse(options.info) 22 | _this.setData({ 23 | info: info 24 | }) 25 | _this.askData() 26 | }, 27 | 28 | /** 29 | * 生命周期函数--监听页面初次渲染完成 30 | */ 31 | onReady: function () { 32 | 33 | }, 34 | 35 | /** 36 | * 生命周期函数--监听页面显示 37 | */ 38 | onShow: function () { 39 | 40 | }, 41 | 42 | /** 43 | * 生命周期函数--监听页面隐藏 44 | */ 45 | onHide: function () { 46 | 47 | }, 48 | 49 | /** 50 | * 生命周期函数--监听页面卸载 51 | */ 52 | onUnload: function () { 53 | 54 | }, 55 | 56 | /** 57 | * 页面相关事件处理函数--监听用户下拉动作 58 | */ 59 | onPullDownRefresh: function () { 60 | 61 | }, 62 | 63 | /** 64 | * 页面上拉触底事件的处理函数 65 | */ 66 | onReachBottom: function () { 67 | 68 | }, 69 | 70 | /** 71 | * 用户点击右上角分享 72 | */ 73 | onShareAppMessage: function () { 74 | 75 | }, 76 | askData: function () { 77 | var _this = this 78 | var info = this.data.info; 79 | wx.request({ 80 | url: "https://www.服务器域名.site/kg/getSmallByBig?crimeBig="+info, 81 | method: 'get', 82 | header: { 'content-type': 'application/json' }, 83 | data: { 84 | }, 85 | success: function (res) { 86 | console.log(res.data) 87 | console.log(JSON.parse(res.data[0]))// 服务器回包信息 88 | var list =[] 89 | for(var i=0;i 12 | 13 | 14 | 15 | 16 | 17 | {{item.crimeSmall}} 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /LittleDemo/pages/criminalsmall/criminalsmall.wxss: -------------------------------------------------------------------------------- 1 | /* pages/criminalsmall/criminalsmall.wxss */ 2 | .searchbar-result { 3 | margin-top: 0; 4 | font-size: 14px; 5 | } 6 | 7 | .searchbar-result:before { 8 | display: none; 9 | } 10 | 11 | .weui-cell { 12 | padding: 12px 15px 12px 35px; 13 | } 14 | 15 | .orange-card-head { 16 | font-size: 17px; 17 | color: #1a237e; 18 | } 19 | 20 | .orange-head2 { 21 | /* text-indent: 20px; */ 22 | margin-left: 25px; 23 | font-size: 15px; 24 | padding: 5px; 25 | color: #283593; 26 | /* margin-bottom: 10px; */ 27 | } 28 | 29 | .orange-head3 { 30 | text-indent: 30px; 31 | font-size: 14px; 32 | padding: 5px; 33 | color: #424242; 34 | } 35 | 36 | .weui-panel__hd2 { 37 | padding: 14px 15px 10px; 38 | } 39 | 40 | .orange-select { 41 | display: flex; 42 | flex-direction: row-reverse; 43 | } 44 | 45 | .weui-select, .weui-select_in-select-after { 46 | display: none; 47 | } 48 | 49 | .orange-ui-btn { 50 | vertical-align: baseline; 51 | font-size: 12px; 52 | padding-left: 7px; 53 | padding-right: 7px; 54 | background: #2b8bc6; 55 | color: #fff; 56 | margin: 2px 10px; 57 | margin-bottom: -10px; 58 | } 59 | 60 | .oubtn-r { 61 | background: #fff; 62 | color: #2b8bc6; 63 | direction: right; 64 | } 65 | 66 | .page__hd { 67 | padding: 40px 0px 20px 40px; 68 | } 69 | 70 | .page_cards { 71 | margin-top: 10px; 72 | } 73 | .page__desc2{ 74 | margin-top:5px; 75 | color:#EAB268; 76 | text-align:left; 77 | font-size: 16px; 78 | } 79 | -------------------------------------------------------------------------------- /LittleDemo/pages/criminalsmall/detail/detail.js: -------------------------------------------------------------------------------- 1 | // pages/criminalsmall/detail/detail.js 2 | Page({ 3 | 4 | /** 5 | * 页面的初始数据 6 | */ 7 | data: { 8 | initdata:"" 9 | }, 10 | 11 | /** 12 | * 生命周期函数--监听页面加载 13 | */ 14 | onLoad: function (options) { 15 | var _this = this 16 | var type = options.type 17 | //获取上级的点击事件 18 | var info = JSON.parse(options.info) 19 | _this.setData({ 20 | info: info 21 | }) 22 | _this.askData() 23 | }, 24 | 25 | /** 26 | * 生命周期函数--监听页面初次渲染完成 27 | */ 28 | onReady: function () { 29 | 30 | }, 31 | 32 | /** 33 | * 生命周期函数--监听页面显示 34 | */ 35 | onShow: function () { 36 | 37 | }, 38 | 39 | /** 40 | * 生命周期函数--监听页面隐藏 41 | */ 42 | onHide: function () { 43 | 44 | }, 45 | 46 | /** 47 | * 生命周期函数--监听页面卸载 48 | */ 49 | onUnload: function () { 50 | 51 | }, 52 | 53 | /** 54 | * 页面相关事件处理函数--监听用户下拉动作 55 | */ 56 | onPullDownRefresh: function () { 57 | 58 | }, 59 | 60 | /** 61 | * 页面上拉触底事件的处理函数 62 | */ 63 | onReachBottom: function () { 64 | 65 | }, 66 | 67 | /** 68 | * 用户点击右上角分享 69 | */ 70 | onShareAppMessage: function () { 71 | 72 | }, 73 | askData: function () { 74 | var _this = this 75 | var info = this.data.info; 76 | wx.request({ 77 | url: "https://www.服务器.site/kg/getDetail?crimeSmall=" + info, 78 | method: 'get', 79 | header: { 'content-type': 'application/json' }, 80 | data: { 81 | }, 82 | success: function (res) { 83 | console.log(res.data) 84 | console.log(res.data.law) 85 | console.log(res.data.law.length) 86 | // console.log(JSON.parse(res.data[0]))// 服务器回包信息 87 | // var list = [] 88 | // for (var i = 0; i < res.data.length; i++) { 89 | // list.push(JSON.parse(res.data[i])) 90 | // } 91 | _this.setData({ 92 | initdata: res.data, 93 | }) 94 | }, 95 | fail: function (res) { 96 | console.log(res)// 服务器回包信息 97 | } 98 | }) 99 | } 100 | }) -------------------------------------------------------------------------------- /LittleDemo/pages/criminalsmall/detail/detail.json: -------------------------------------------------------------------------------- 1 | { 2 | "usingComponents": {} 3 | } -------------------------------------------------------------------------------- /LittleDemo/pages/criminalsmall/detail/detail.wxss: -------------------------------------------------------------------------------- 1 | /* pages/criminalsmall/detail/detail.wxss */ 2 | .weui-media-box__desc{ 3 | color:#999; 4 | font-size:13px; 5 | line-height:1.2; 6 | overflow:hidden; 7 | text-overflow:ellipsis; 8 | display:-webkit-box; 9 | -webkit-box-orient:vertical; 10 | -webkit-line-clamp:1000; 11 | 12 | } 13 | .orange-head21{ 14 | font-size: 15px; 15 | /* text-indent: 5px; */ 16 | color:#353535; 17 | } 18 | .orange-card-head{ 19 | font-size: 17px; 20 | color:#1a237e; 21 | } 22 | .orange-head2{ 23 | /* text-indent: 20px; */ 24 | font-size: 16px; 25 | color: #283593; 26 | margin-bottom: 3px; 27 | } 28 | .weui-media-box__desc2{ 29 | font-size: 14px; 30 | text-indent: 28px; 31 | color:#424242; 32 | } 33 | .weui-panel__hd { 34 | color:#2b8bc6; 35 | font-size:16px; 36 | 37 | } 38 | .orange-cell{ 39 | padding:4px 15px; 40 | /* text-indent: 28px; */ 41 | } -------------------------------------------------------------------------------- /LittleDemo/pages/criminalsmall/searchresult/searchresult.json: -------------------------------------------------------------------------------- 1 | { 2 | "usingComponents": {} 3 | } -------------------------------------------------------------------------------- /LittleDemo/pages/criminalsmall/searchresult/searchresult.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 搜索结果 6 | 以下为有关{{info.keywords}}的搜索结果 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | {{item.crime}}(大罪) 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 未搜到相关结果 36 | 37 | 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /LittleDemo/pages/criminalsmall/searchresult/searchresult.wxss: -------------------------------------------------------------------------------- 1 | /* pages/criminalsmall/searchresult/searchresult.wxss */ 2 | .weui-media-box__desc{ 3 | color:#999; 4 | font-size:13px; 5 | line-height:1.2; 6 | overflow:hidden; 7 | text-overflow:ellipsis; 8 | display:-webkit-box; 9 | -webkit-box-orient:vertical; 10 | -webkit-line-clamp:1000; 11 | 12 | } 13 | .orange-head21{ 14 | font-size: 15px; 15 | /* text-indent: 5px; */ 16 | color:#353535; 17 | } 18 | .orange-card-head{ 19 | font-size: 17px; 20 | color:#1a237e; 21 | } 22 | .orange-head2{ 23 | /* text-indent: 20px; */ 24 | font-size: 16px; 25 | color: #283593; 26 | margin-bottom: 3px; 27 | } 28 | .weui-media-box__desc2{ 29 | font-size: 14px; 30 | text-indent: 28px; 31 | color:#424242; 32 | } 33 | /* pages/criminalsmall/criminalsmall.wxss */ 34 | .searchbar-result { 35 | margin-top: 0; 36 | font-size: 14px; 37 | } 38 | 39 | .searchbar-result:before { 40 | display: none; 41 | } 42 | 43 | .weui-cell { 44 | padding: 12px 15px 12px 35px; 45 | } 46 | 47 | .orange-card-head { 48 | font-size: 17px; 49 | color: #1a237e; 50 | } 51 | 52 | .orange-head2 { 53 | text-indent: 20px; 54 | font-size: 15px; 55 | padding: 5px; 56 | color: #283593; 57 | /* margin-bottom: 10px; */ 58 | } 59 | 60 | .orange-head3 { 61 | text-indent: 30px; 62 | font-size: 14px; 63 | padding: 5px; 64 | color: #424242; 65 | } 66 | 67 | .weui-panel__hd2 { 68 | padding: 14px 15px 10px; 69 | } 70 | 71 | .orange-select { 72 | display: flex; 73 | flex-direction: row-reverse; 74 | } 75 | 76 | .weui-select, .weui-select_in-select-after { 77 | display: none; 78 | } 79 | 80 | .orange-ui-btn { 81 | vertical-align: baseline; 82 | font-size: 12px; 83 | padding-left: 7px; 84 | padding-right: 7px; 85 | background: #2b8bc6; 86 | color: #fff; 87 | margin: 2px 10px; 88 | margin-bottom: -10px; 89 | } 90 | 91 | .oubtn-r { 92 | background: #fff; 93 | color: #2b8bc6; 94 | direction: right; 95 | } 96 | 97 | .page__hd { 98 | padding: 40px 0px 20px 40px; 99 | } 100 | 101 | .page_cards { 102 | margin-top: 10px; 103 | } 104 | .page__desc2{ 105 | margin-top:5px; 106 | color:#EAB268; 107 | text-align:left; 108 | font-size: 16px; 109 | } 110 | -------------------------------------------------------------------------------- /LittleDemo/pages/detail/civil/detail.json: -------------------------------------------------------------------------------- 1 | { 2 | "usingComponents": {} 3 | } -------------------------------------------------------------------------------- /LittleDemo/pages/detail/civil/detail.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 查询结果 5 | 以下为相应章节条款 6 | 7 | 8 | 9 | 10 | 11 | 第{{item.partNum}}编 {{item.part}} 12 | 13 | 14 | 第{{item.chapterNum}}章 {{item.chapter}} 第{{item.sectionNum}}节 {{item.section}} 15 | {{item.item}} 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 未搜到相关结果 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /LittleDemo/pages/detail/civil/detail.wxss: -------------------------------------------------------------------------------- 1 | /* pages/detail/detail.wxss */ 2 | .weui-media-box__desc{ 3 | color:#999; 4 | font-size:26rpx; 5 | line-height:1.2; 6 | overflow:hidden; 7 | text-overflow:ellipsis; 8 | display:-webkit-box; 9 | -webkit-box-orient:vertical; 10 | -webkit-line-clamp:1000; 11 | 12 | } 13 | .orange-head21{ 14 | font-size: 31rpx; 15 | /* text-indent: 5px; */ 16 | color:#353535; 17 | } 18 | .orange-card-head{ 19 | font-size: 34rpx; 20 | color:#1a237e; 21 | } 22 | .orange-head2{ 23 | /* text-indent: 20px; */ 24 | font-size: 32rpx; 25 | color: #283593; 26 | margin-bottom: 6rpx; 27 | } 28 | .weui-media-box__desc2{ 29 | font-size: 30rpx; 30 | text-indent: 56rpx; 31 | color:#424242; 32 | } 33 | -------------------------------------------------------------------------------- /LittleDemo/pages/detail/consume/detail.json: -------------------------------------------------------------------------------- 1 | { 2 | "usingComponents": {} 3 | } -------------------------------------------------------------------------------- /LittleDemo/pages/detail/consume/detail.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 查询结果 4 | 以下为相应章节条款 5 | 6 | 7 | 8 | 9 | 10 | 第{{item.chapterNum}}章 {{item.chapter}} 11 | 12 | 13 | 14 | 15 | 16 | 17 | {{item.item}} 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 未搜到相关结果 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /LittleDemo/pages/detail/consume/detail.wxss: -------------------------------------------------------------------------------- 1 | /* pages/detail/detail.wxss */ 2 | .weui-media-box__desc{ 3 | color:#999; 4 | font-size:26rpx; 5 | line-height:1.2; 6 | overflow:hidden; 7 | text-overflow:ellipsis; 8 | display:-webkit-box; 9 | -webkit-box-orient:vertical; 10 | -webkit-line-clamp:1000; 11 | 12 | } 13 | .orange-head21{ 14 | font-size: 31rpx; 15 | /* text-indent: 5px; */ 16 | color:#353535; 17 | } 18 | .orange-card-head{ 19 | font-size: 34rpx; 20 | color:#1a237e; 21 | } 22 | .orange-head2{ 23 | /* text-indent: 20px; */ 24 | font-size: 32rpx; 25 | color: #283593; 26 | margin-bottom: 6rpx; 27 | } 28 | .weui-media-box__desc2{ 29 | font-size: 30rpx; 30 | /* text-indent: 28px; */ 31 | color:#424242; 32 | } 33 | -------------------------------------------------------------------------------- /LittleDemo/pages/detail/criminal/detail.json: -------------------------------------------------------------------------------- 1 | { 2 | "usingComponents": {} 3 | } -------------------------------------------------------------------------------- /LittleDemo/pages/detail/criminal/detail.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 查询结果 5 | 以下为相应章节条款 6 | 7 | 8 | 9 | 10 | 11 | 第{{item.partNum}}编 {{item.part}} 12 | 13 | 14 | 第{{item.chapterNum}}章 {{item.chapter}} 第{{item.sectionNum}}节 {{item.section}} 15 | {{item.item}} 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 未搜到相关结果 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /LittleDemo/pages/detail/criminal/detail.wxss: -------------------------------------------------------------------------------- 1 | /* pages/detail/detail.wxss */ 2 | .weui-media-box__desc{ 3 | color:#999; 4 | font-size:26rpx; 5 | line-height:1.2; 6 | overflow:hidden; 7 | text-overflow:ellipsis; 8 | display:-webkit-box; 9 | -webkit-box-orient:vertical; 10 | -webkit-line-clamp:1000; 11 | 12 | } 13 | .orange-head21{ 14 | font-size: 31rpx; 15 | /* text-indent: 5px; */ 16 | color:#353535; 17 | } 18 | .orange-card-head{ 19 | font-size: 34rpx; 20 | color:#1a237e; 21 | } 22 | .orange-head2{ 23 | /* text-indent: 20px; */ 24 | font-size: 32rpx; 25 | color: #283593; 26 | margin-bottom: 6rpx; 27 | } 28 | .weui-media-box__desc2{ 29 | font-size: 30rpx; 30 | text-indent: 56rpx; 31 | color:#424242; 32 | } 33 | -------------------------------------------------------------------------------- /LittleDemo/pages/detail/detail.json: -------------------------------------------------------------------------------- 1 | { 2 | "usingComponents": {} 3 | } -------------------------------------------------------------------------------- /LittleDemo/pages/detail/detail.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 查询结果 5 | 以下为相应章节条款 6 | 7 | 8 | 9 | 10 | 11 | 第{{item.partNum}}编 {{item.part}} 12 | 13 | 14 | 第{{item.chapterNum}}章 {{item.chapter}} 第{{item.sectionNum}}节 {{item.section}} 15 | {{item.item}} 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 未搜到相关结果 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /LittleDemo/pages/detail/detail.wxss: -------------------------------------------------------------------------------- 1 | /* pages/detail/detail.wxss */ 2 | .weui-media-box__desc{ 3 | color:#999; 4 | font-size:13px; 5 | line-height:1.2; 6 | overflow:hidden; 7 | text-overflow:ellipsis; 8 | display:-webkit-box; 9 | -webkit-box-orient:vertical; 10 | -webkit-line-clamp:1000; 11 | 12 | } 13 | .orange-head21{ 14 | font-size: 15px; 15 | /* text-indent: 5px; */ 16 | color:#353535; 17 | } 18 | .orange-card-head{ 19 | font-size: 17px; 20 | color:#1a237e; 21 | } 22 | .orange-head2{ 23 | /* text-indent: 20px; */ 24 | font-size: 16px; 25 | color: #283593; 26 | margin-bottom: 3px; 27 | } 28 | .weui-media-box__desc2{ 29 | font-size: 14px; 30 | text-indent: 28px; 31 | color:#424242; 32 | } 33 | -------------------------------------------------------------------------------- /LittleDemo/pages/detail/fund/detail.json: -------------------------------------------------------------------------------- 1 | { 2 | "usingComponents": {} 3 | } -------------------------------------------------------------------------------- /LittleDemo/pages/detail/fund/detail.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 查询结果 5 | 以下为相应章节条款 6 | 7 | 8 | 9 | 10 | 11 | 第{{item.chapterNum}}章 {{item.chapter}} 12 | 13 | 14 | 15 | 16 | 17 | 18 | {{item.item}} 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 未搜到相关结果 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /LittleDemo/pages/detail/fund/detail.wxss: -------------------------------------------------------------------------------- 1 | /* pages/detail/detail.wxss */ 2 | .weui-media-box__desc{ 3 | color:#999; 4 | font-size:26rpx; 5 | line-height:1.2; 6 | overflow:hidden; 7 | text-overflow:ellipsis; 8 | display:-webkit-box; 9 | -webkit-box-orient:vertical; 10 | -webkit-line-clamp:1000; 11 | 12 | } 13 | .orange-head21{ 14 | font-size: 31rpx; 15 | /* text-indent: 5px; */ 16 | color:#353535; 17 | } 18 | .orange-card-head{ 19 | font-size: 34rpx; 20 | color:#1a237e; 21 | } 22 | .orange-head2{ 23 | /* text-indent: 20px; */ 24 | font-size: 32rpx; 25 | color: #283593; 26 | margin-bottom: 6rpx; 27 | } 28 | .weui-media-box__desc2{ 29 | font-size: 30rpx; 30 | /* text-indent: 28px; */ 31 | color:#424242; 32 | } 33 | -------------------------------------------------------------------------------- /LittleDemo/pages/detail/insurance/detail.json: -------------------------------------------------------------------------------- 1 | { 2 | "usingComponents": {} 3 | } -------------------------------------------------------------------------------- /LittleDemo/pages/detail/insurance/detail.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 查询结果 5 | 以下为相应章节条款 6 | 7 | 8 | 9 | 10 | 11 | 第{{item.chapterNum}}章 {{item.chapter}} 12 | 13 | 14 | 15 | 16 | 第{{item.sectionNum}}节 {{item.section}} 17 | 18 | {{item.item}} 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 未搜到相关结果 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /LittleDemo/pages/detail/insurance/detail.wxss: -------------------------------------------------------------------------------- 1 | /* pages/detail/detail.wxss */ 2 | .weui-media-box__desc{ 3 | color:#999; 4 | font-size:26rpx; 5 | line-height:1.2; 6 | overflow:hidden; 7 | text-overflow:ellipsis; 8 | display:-webkit-box; 9 | -webkit-box-orient:vertical; 10 | -webkit-line-clamp:1000; 11 | 12 | } 13 | .orange-head21{ 14 | font-size: 31rpx; 15 | /* text-indent: 5px; */ 16 | color:#353535; 17 | } 18 | .orange-card-head{ 19 | font-size: 34rpx; 20 | color:#1a237e; 21 | } 22 | .orange-head2{ 23 | /* text-indent: 20px; */ 24 | font-size: 32rpx; 25 | color: #283593; 26 | margin-bottom: 6rpx; 27 | } 28 | .weui-media-box__desc2{ 29 | font-size: 30rpx; 30 | text-indent: 56rpx; 31 | color:#424242; 32 | } 33 | -------------------------------------------------------------------------------- /LittleDemo/pages/detail/labor/detail.json: -------------------------------------------------------------------------------- 1 | { 2 | "usingComponents": {} 3 | } -------------------------------------------------------------------------------- /LittleDemo/pages/detail/labor/detail.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 查询结果 5 | 以下为相应章节条款 6 | 7 | 8 | 9 | 10 | 11 | 第{{item.chapterNum}}章 {{item.chapter}} 12 | 13 | 14 | 15 | 16 | 17 | 18 | {{item.item}} 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 未搜到相关结果 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /LittleDemo/pages/detail/labor/detail.wxss: -------------------------------------------------------------------------------- 1 | /* pages/detail/detail.wxss */ 2 | .weui-media-box__desc{ 3 | color:#999; 4 | font-size:26rpx; 5 | line-height:1.2; 6 | overflow:hidden; 7 | text-overflow:ellipsis; 8 | display:-webkit-box; 9 | -webkit-box-orient:vertical; 10 | -webkit-line-clamp:1000; 11 | 12 | } 13 | .orange-head21{ 14 | font-size: 32rpx; 15 | /* text-indent: 5px; */ 16 | color:#353535; 17 | } 18 | .orange-card-head{ 19 | font-size: 34rpx; 20 | color:#1a237e; 21 | } 22 | .orange-head2{ 23 | /* text-indent: 20px; */ 24 | font-size: 32rpx; 25 | color: #283593; 26 | margin-bottom: 6rpx; 27 | } 28 | .weui-media-box__desc2{ 29 | font-size: 30rpx; 30 | /* text-indent: 28px; */ 31 | color:#424242; 32 | } 33 | -------------------------------------------------------------------------------- /LittleDemo/pages/detail/marriage/detail.json: -------------------------------------------------------------------------------- 1 | { 2 | "usingComponents": {} 3 | } -------------------------------------------------------------------------------- /LittleDemo/pages/detail/marriage/detail.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 查询结果 5 | 以下为相应章节条款 6 | 7 | 8 | 9 | 10 | 11 | 第{{item.chapterNum}}章 {{item.chapter}} 12 | 13 | 14 | 15 | 16 | 17 | 18 | {{item.item}} 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 未搜到相关结果 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /LittleDemo/pages/detail/marriage/detail.wxss: -------------------------------------------------------------------------------- 1 | /* pages/detail/detail.wxss */ 2 | .weui-media-box__desc{ 3 | color:#999; 4 | font-size:26rpx; 5 | line-height:1.2; 6 | overflow:hidden; 7 | text-overflow:ellipsis; 8 | display:-webkit-box; 9 | -webkit-box-orient:vertical; 10 | -webkit-line-clamp:1000; 11 | 12 | } 13 | .orange-head21{ 14 | font-size: 31rpx; 15 | /* text-indent: 5px; */ 16 | color:#353535; 17 | } 18 | .orange-card-head{ 19 | font-size: 34rpx; 20 | color:#1a237e; 21 | } 22 | .orange-head2{ 23 | /* text-indent: 20px; */ 24 | font-size: 32rpx; 25 | color: #283593; 26 | margin-bottom: 3px; 27 | } 28 | .weui-media-box__desc2{ 29 | font-size: 30rpx; 30 | /* text-indent: 28px; */ 31 | color:#424242; 32 | } 33 | -------------------------------------------------------------------------------- /LittleDemo/pages/detail/protect/detail.json: -------------------------------------------------------------------------------- 1 | { 2 | "usingComponents": {} 3 | } -------------------------------------------------------------------------------- /LittleDemo/pages/detail/protect/detail.wxss: -------------------------------------------------------------------------------- 1 | /* pages/detail/detail.wxss */ 2 | .weui-media-box__desc{ 3 | color:#999; 4 | font-size:26rpx; 5 | line-height:1.2; 6 | overflow:hidden; 7 | text-overflow:ellipsis; 8 | display:-webkit-box; 9 | -webkit-box-orient:vertical; 10 | -webkit-line-clamp:1000; 11 | 12 | } 13 | .orange-head21{ 14 | font-size: 31rpx; 15 | /* text-indent: 5px; */ 16 | color:#353535; 17 | } 18 | .orange-card-head{ 19 | font-size: 34rpx; 20 | color:#1a237e; 21 | } 22 | .orange-head2{ 23 | /* text-indent: 20px; */ 24 | font-size: 32rpx; 25 | color: #283593; 26 | margin-bottom: 3px; 27 | } 28 | .weui-media-box__desc2{ 29 | font-size: 30rpx; 30 | /* text-indent: 28px; */ 31 | color:#424242; 32 | } 33 | -------------------------------------------------------------------------------- /LittleDemo/pages/detail/security/detail.json: -------------------------------------------------------------------------------- 1 | { 2 | "usingComponents": {} 3 | } -------------------------------------------------------------------------------- /LittleDemo/pages/detail/security/detail.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 查询结果 5 | 以下为相应章节条款 6 | 7 | 8 | 9 | 10 | 11 | 第{{item.chapterNum}}章 {{item.chapter}} 12 | 13 | 14 | 15 | 16 | 第{{item.sectionNum}}节 {{item.section}} 17 | {{item.item}} 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 未搜到相关结果 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /LittleDemo/pages/detail/security/detail.wxss: -------------------------------------------------------------------------------- 1 | /* pages/detail/detail.wxss */ 2 | .weui-media-box__desc{ 3 | color:#999; 4 | font-size:26rpx; 5 | line-height:1.2; 6 | overflow:hidden; 7 | text-overflow:ellipsis; 8 | display:-webkit-box; 9 | -webkit-box-orient:vertical; 10 | -webkit-line-clamp:1000; 11 | 12 | } 13 | .orange-head21{ 14 | font-size: 31rpx; 15 | /* text-indent: 5px; */ 16 | color:#353535; 17 | } 18 | .orange-card-head{ 19 | font-size: 34rpx; 20 | color:#1a237e; 21 | } 22 | .orange-head2{ 23 | /* text-indent: 20px; */ 24 | font-size: 32rpx; 25 | color: #283593; 26 | margin-bottom: 6rpx; 27 | } 28 | .weui-media-box__desc2{ 29 | font-size: 30rpx; 30 | text-indent: 56rpx; 31 | color:#424242; 32 | } 33 | -------------------------------------------------------------------------------- /LittleDemo/pages/detail/traffic/detail.json: -------------------------------------------------------------------------------- 1 | { 2 | "usingComponents": {} 3 | } -------------------------------------------------------------------------------- /LittleDemo/pages/detail/traffic/detail.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 查询结果 5 | 以下为相应章节条款 6 | 7 | 8 | 9 | 10 | 11 | 第{{item.chapterNum}}章 {{item.chapter}} 12 | 13 | 14 | 15 | 16 | 第{{item.sectionNum}}节 {{item.section}} 17 | {{item.item}} 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 未搜到相关结果 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /LittleDemo/pages/detail/traffic/detail.wxss: -------------------------------------------------------------------------------- 1 | /* pages/detail/detail.wxss */ 2 | .weui-media-box__desc{ 3 | color:#999; 4 | font-size:26rpx; 5 | line-height:1.2; 6 | overflow:hidden; 7 | text-overflow:ellipsis; 8 | display:-webkit-box; 9 | -webkit-box-orient:vertical; 10 | -webkit-line-clamp:1000; 11 | 12 | } 13 | .orange-head21{ 14 | font-size: 31rpx; 15 | /* text-indent: 5px; */ 16 | color:#353535; 17 | } 18 | .orange-card-head{ 19 | font-size: 34rpx; 20 | color:#1a237e; 21 | } 22 | .orange-head2{ 23 | /* text-indent: 20px; */ 24 | font-size: 32rpx; 25 | color: #283593; 26 | margin-bottom: 6rpx; 27 | } 28 | .weui-media-box__desc2{ 29 | font-size: 30rpx; 30 | text-indent: 56rpx; 31 | color:#424242; 32 | } 33 | -------------------------------------------------------------------------------- /LittleDemo/pages/detail/trafficscore/detail.json: -------------------------------------------------------------------------------- 1 | { 2 | "usingComponents": {} 3 | } -------------------------------------------------------------------------------- /LittleDemo/pages/detail/trafficscore/detail.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 查询结果 5 | 以下为相应章节条款 6 | 7 | 8 | 9 | 10 | 11 | 第{{item.chapterNum}}章 {{item.chapter}} 12 | 13 | 14 | 15 | 16 | 17 | 18 | {{item.item}} 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 未搜到相关结果 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /LittleDemo/pages/detail/trafficscore/detail.wxss: -------------------------------------------------------------------------------- 1 | /* pages/detail/detail.wxss */ 2 | .weui-media-box__desc{ 3 | color:#999; 4 | font-size:13px; 5 | line-height:1.2; 6 | overflow:hidden; 7 | text-overflow:ellipsis; 8 | display:-webkit-box; 9 | -webkit-box-orient:vertical; 10 | -webkit-line-clamp:1000; 11 | 12 | } 13 | .orange-head21{ 14 | font-size: 31rpx; 15 | /* text-indent: 5px; */ 16 | color:#353535; 17 | } 18 | .orange-card-head{ 19 | font-size: 34rpx; 20 | color:#1a237e; 21 | } 22 | .orange-head2{ 23 | /* text-indent: 20px; */ 24 | font-size: 32rpx; 25 | color: #283593; 26 | margin-bottom: 6rpx; 27 | } 28 | .weui-media-box__desc2{ 29 | font-size: 30rpx; 30 | /* text-indent: 28px; */ 31 | color:#424242; 32 | } 33 | -------------------------------------------------------------------------------- /LittleDemo/pages/detail/work/detail.json: -------------------------------------------------------------------------------- 1 | { 2 | "usingComponents": {} 3 | } -------------------------------------------------------------------------------- /LittleDemo/pages/detail/work/detail.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 查询结果 5 | 以下为相应章节条款 6 | 7 | 8 | 9 | 10 | 11 | 第{{item.chapterNum}}章 {{item.chapter}} 12 | 13 | 14 | 15 | 16 | 第{{item.sectionNum}}节 {{item.section}} 17 | 18 | {{item.item}} 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 未搜到相关结果 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /LittleDemo/pages/detail/work/detail.wxss: -------------------------------------------------------------------------------- 1 | /* pages/detail/detail.wxss */ 2 | .weui-media-box__desc{ 3 | color:#999; 4 | font-size:26rpx; 5 | line-height:1.2; 6 | overflow:hidden; 7 | text-overflow:ellipsis; 8 | display:-webkit-box; 9 | -webkit-box-orient:vertical; 10 | -webkit-line-clamp:1000; 11 | 12 | } 13 | .orange-head21{ 14 | font-size: 31rpx; 15 | /* text-indent: 5px; */ 16 | color:#353535; 17 | } 18 | .orange-card-head{ 19 | font-size: 34rpx; 20 | color:#1a237e; 21 | } 22 | .orange-head2{ 23 | /* text-indent: 20px; */ 24 | font-size: 32rpx; 25 | color: #283593; 26 | margin-bottom: 6rpx; 27 | } 28 | .weui-media-box__desc2{ 29 | font-size: 30rpx; 30 | text-indent: 56rpx; 31 | color:#424242; 32 | } 33 | -------------------------------------------------------------------------------- /LittleDemo/pages/font/font.js: -------------------------------------------------------------------------------- 1 | // pages/font/font.js 2 | Page({ 3 | 4 | /** 5 | * 页面的初始数据 6 | */ 7 | data: { 8 | 9 | }, 10 | 11 | /** 12 | * 生命周期函数--监听页面加载 13 | */ 14 | onLoad: function (options) { 15 | 16 | }, 17 | 18 | /** 19 | * 生命周期函数--监听页面初次渲染完成 20 | */ 21 | onReady: function () { 22 | 23 | }, 24 | 25 | /** 26 | * 生命周期函数--监听页面显示 27 | */ 28 | onShow: function () { 29 | 30 | }, 31 | 32 | /** 33 | * 生命周期函数--监听页面隐藏 34 | */ 35 | onHide: function () { 36 | 37 | }, 38 | 39 | /** 40 | * 生命周期函数--监听页面卸载 41 | */ 42 | onUnload: function () { 43 | 44 | }, 45 | 46 | /** 47 | * 页面相关事件处理函数--监听用户下拉动作 48 | */ 49 | onPullDownRefresh: function () { 50 | 51 | }, 52 | 53 | /** 54 | * 页面上拉触底事件的处理函数 55 | */ 56 | onReachBottom: function () { 57 | 58 | }, 59 | 60 | /** 61 | * 用户点击右上角分享 62 | */ 63 | onShareAppMessage: function () { 64 | 65 | } 66 | }) -------------------------------------------------------------------------------- /LittleDemo/pages/font/font.json: -------------------------------------------------------------------------------- 1 | { 2 | "usingComponents": {} 3 | } -------------------------------------------------------------------------------- /LittleDemo/pages/font/font.wxml: -------------------------------------------------------------------------------- 1 | 2 | 32rpx 3 | 28rpx 4 | 24rpx 5 | 18rpx 6 | 16rpx 7 | 14rpx 8 | 9 | 32px 10 | 28px 11 | 24px 12 | 18px 13 | 16px 14 | 14px 15 | 16 | 17 | -------------------------------------------------------------------------------- /LittleDemo/pages/font/font.wxss: -------------------------------------------------------------------------------- 1 | /* pages/font/font.wxss */ -------------------------------------------------------------------------------- /LittleDemo/pages/home/home.js: -------------------------------------------------------------------------------- 1 | Page({ 2 | data: { 3 | inputShowed: false, 4 | inputVal: "", 5 | infoList:[] 6 | }, 7 | showInput: function () { 8 | this.setData({ 9 | inputShowed: true 10 | }); 11 | }, 12 | hideInput: function () { 13 | this.setData({ 14 | inputVal: "", 15 | inputShowed: false 16 | }); 17 | }, 18 | clearInput: function () { 19 | this.setData({ 20 | inputVal: "" 21 | }); 22 | }, 23 | inputTyping: function (e) { 24 | this.setData({ 25 | inputVal: e.detail.value 26 | }); 27 | console.log(this) 28 | }, 29 | dataRend:function(e){ 30 | var keyWords = e.detail.value; 31 | var _this = this; 32 | console.log(keyWords) 33 | wx.request({ 34 | url: 'data.json', 35 | method: 'get', 36 | header: { 'content-type': 'application/json' }, 37 | data: { 38 | }, 39 | success: function (res) { 40 | console.log(res)// 服务器回包信息 41 | }, 42 | fail:function(res){ 43 | console.log(res)// 服务器回包信息 44 | _this.setData({infoList: [ 45 | { 46 | "chapter": "第一章", 47 | "title": "中华人名共和国刑法,第一章第一节" 48 | }, 49 | { 50 | "chapter": "第二章", 51 | "title": "中华人名共和国刑法,第二章第一节" 52 | }, 53 | ]}) 54 | console.log(_this.infoList) 55 | } 56 | }) 57 | }, 58 | handleTap:function(e){ 59 | var data = e.currentTarget.dataset 60 | console.log(data.info) 61 | wx.navigateTo({ 62 | url: '../../pages/detail/detail?info='+data.info.title, 63 | }) 64 | } 65 | 66 | }); -------------------------------------------------------------------------------- /LittleDemo/pages/home/home.json: -------------------------------------------------------------------------------- 1 | { 2 | "usingComponents": {} 3 | } -------------------------------------------------------------------------------- /LittleDemo/pages/home/home.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 刑法搜索 4 | 在下面进行搜索可以得到相关法律条文 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 实时搜索文本 27 | 28 | 29 | 30 | 31 | 实时搜索文本 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 谢谢 41 | 42 | 43 | {{item.chapter}} 44 | {{item.title}} 45 | 46 | 47 | 48 | 49 | 50 | 51 | -------------------------------------------------------------------------------- /LittleDemo/pages/home/home.wxss: -------------------------------------------------------------------------------- 1 | .searchbar-result{ 2 | margin-top: 0; 3 | font-size: 14px; 4 | } 5 | .searchbar-result:before{ 6 | display: none; 7 | } 8 | .weui-cell{ 9 | padding: 12px 15px 12px 35px; 10 | } -------------------------------------------------------------------------------- /LittleDemo/pages/la/la.js: -------------------------------------------------------------------------------- 1 | Page({ 2 | 3 | /** 4 | * 页面的初始数据 5 | */ 6 | data: { 7 | currentTab: 0, 8 | 9 | }, 10 | 11 | /** 12 | * 生命周期函数--监听页面加载 13 | */ 14 | onLoad: function (options) { 15 | 16 | }, 17 | 18 | /** 19 | * 生命周期函数--监听页面初次渲染完成 20 | */ 21 | onReady: function () { 22 | 23 | }, 24 | 25 | /** 26 | * 生命周期函数--监听页面显示 27 | */ 28 | onShow: function () { 29 | 30 | }, 31 | 32 | /** 33 | * 生命周期函数--监听页面隐藏 34 | */ 35 | onHide: function () { 36 | 37 | }, 38 | 39 | /** 40 | * 生命周期函数--监听页面卸载 41 | */ 42 | onUnload: function () { 43 | 44 | }, 45 | 46 | /** 47 | * 页面相关事件处理函数--监听用户下拉动作 48 | */ 49 | onPullDownRefresh: function () { 50 | 51 | }, 52 | 53 | /** 54 | * 页面上拉触底事件的处理函数 55 | */ 56 | onReachBottom: function () { 57 | 58 | }, 59 | 60 | /** 61 | * 用户点击右上角分享 62 | */ 63 | onShareAppMessage: function () { 64 | 65 | }, 66 | // swiper滑动时触发bindchange事件,获取事件对象e获取当前所在滑块的 index,并将其更新至data的currentTab中,视图渲染通过判断currentTab的让对应的tab hover。 67 | GetCurrentTab: function (e) { 68 | console.log(e.detail.current); 69 | var that = this; 70 | this.setData({ 71 | currentTab: e.detail.current 72 | }); 73 | // console.log("11111"+this.data.currentTab); 74 | }, 75 | swithNav: function (e) { 76 | var that = this; 77 | that.setData({ 78 | currentTab: e.target.dataset.current 79 | }); 80 | }, 81 | //禁止滑动 82 | catchTouchMove: function (res) { 83 | return false 84 | } 85 | }) -------------------------------------------------------------------------------- /LittleDemo/pages/la/la.json: -------------------------------------------------------------------------------- 1 | { 2 | "usingComponents": {} 3 | } -------------------------------------------------------------------------------- /LittleDemo/pages/la/la.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | {{item.title}} 4 | 5 | 6 | 7 | 10 | 11 | 第一页 12 | 13 | 14 | 第二页 15 | 16 | 17 | -------------------------------------------------------------------------------- /LittleDemo/pages/la/la.wxss: -------------------------------------------------------------------------------- 1 | /* pages/la/la.wxss */ 2 | .swiper-tab { 3 | line-height: 80rpx; 4 | display: flex; 5 | justify-content: space-around; 6 | align-items: center; 7 | border-bottom: 1px solid #e0e0e0; 8 | } 9 | 10 | .swiper-tab-list { 11 | font-size: 30rpx; 12 | font-weight: bold; 13 | color: #777; 14 | text-align: center; 15 | border-bottom: 1px solid #F8F8F8; 16 | /* background: #fff; */ 17 | width: 30%; 18 | } 19 | 20 | .active { 21 | color: #2b8bc6; 22 | border-bottom: 1px solid #2b8bc6; 23 | /* background: #fafafa; */ 24 | } 25 | 26 | .swiper-box { 27 | display: block; 28 | height: 100%; 29 | width: 100%; 30 | overflow: hidden; 31 | } 32 | 33 | .swiper-box view { 34 | text-align: center; 35 | } 36 | 37 | image { 38 | width: 100%; 39 | } -------------------------------------------------------------------------------- /LittleDemo/pages/la2/la2.js: -------------------------------------------------------------------------------- 1 | Page({ 2 | data: { 3 | currentTab: 0 //预定的位置 4 | }, 5 | //点击滑动 6 | bindchange: function (e) { 7 | let that = this; 8 | that.setData({ 9 | currentTab: e.detail.current 10 | }) 11 | }, 12 | //点击切换,滑块index赋值 13 | clickTab: function (e) { 14 | let that = this; 15 | if (that.data.currentTab === e.currentTarget.dataset.current) { 16 | return false; 17 | } else { 18 | that.setData({ 19 | currentTab: e.currentTarget.dataset.current 20 | }) 21 | } 22 | } 23 | }) -------------------------------------------------------------------------------- /LittleDemo/pages/la2/la2.json: -------------------------------------------------------------------------------- 1 | { 2 | "usingComponents": {} 3 | } -------------------------------------------------------------------------------- /LittleDemo/pages/la2/la2.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 法律 4 | 处罚 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /LittleDemo/pages/la2/la2.wxss: -------------------------------------------------------------------------------- 1 | 2 | .swiper-tab{ 3 | display: flex; 4 | height: 80rpx; 5 | line-height: 80rpx; 6 | width: 100%; 7 | position:fixed; 8 | top:0; 9 | z-index: 100; 10 | background: #fff; 11 | } 12 | .swiper-tab-item{ 13 | flex: 1; 14 | text-align: center; 15 | border-bottom: 1rpx solid #eee; 16 | } 17 | .active{ 18 | color: 4675F9; 19 | position: relative; 20 | } 21 | .swiper-tab-item.active{ 22 | border-bottom:1px solid #4675F9; 23 | } 24 | .swiper{ 25 | width: 100%; 26 | height: 100%; 27 | display: flex; 28 | position: fixed; 29 | top:80rpx; 30 | } 31 | scroll-view{ 32 | width: 100%; 33 | height: 93%;/*动态高度*/ 34 | } -------------------------------------------------------------------------------- /LittleDemo/pages/laws/laws.json: -------------------------------------------------------------------------------- 1 | { 2 | "usingComponents": {}, 3 | "enablePullDownRefresh": true 4 | } -------------------------------------------------------------------------------- /LittleDemo/pages/laws/laws.wxss: -------------------------------------------------------------------------------- 1 | .searchbar-result { 2 | margin-top: 0; 3 | font-size: 14px; 4 | } 5 | 6 | .searchbar-result:before { 7 | display: none; 8 | } 9 | 10 | .weui-cell { 11 | padding: 12px 15px 12px 35px; 12 | } 13 | 14 | .orange-card-head { 15 | font-size: 34rpx; 16 | color: #1a237e; 17 | } 18 | 19 | .orange-head2 { 20 | text-indent: 40rpx; 21 | font-size: 32rpx; 22 | padding: 10rpx; 23 | color: #283593; 24 | /* margin-bottom: 10px; */ 25 | } 26 | 27 | .orange-head3 { 28 | text-indent: 60rpx; 29 | font-size: 30rpx; 30 | padding: 10rpx; 31 | color: #424242; 32 | } 33 | 34 | .weui-panel__hd2 { 35 | padding: 28rpx 30rpx 20rpx; 36 | } 37 | 38 | .orange-select { 39 | display: flex; 40 | flex-direction: row-reverse; 41 | } 42 | 43 | .weui-select, .weui-select_in-select-after { 44 | display: none; 45 | } 46 | 47 | .orange-ui-btn { 48 | vertical-align: baseline; 49 | font-size: 26rpx; 50 | padding-left: 14rpx; 51 | padding-right: 14rpx; 52 | background: #207dff; 53 | color: #fff; 54 | margin: 4rpx 20rpx; 55 | margin-bottom: -20rpx; 56 | } 57 | 58 | .oubtn-r { 59 | background: #fff; 60 | color: #207dff; 61 | direction: right; 62 | } 63 | 64 | .page__hd { 65 | padding: 80rpx 0px 40rpx 80rpx; 66 | } 67 | 68 | .swiper-tab { 69 | display: flex; 70 | height: 80rpx; 71 | line-height: 80rpx; 72 | width: 100%; 73 | position: fixed; 74 | top: 0; 75 | z-index: 100; 76 | background: #fff; 77 | } 78 | 79 | .swiper-tab-item { 80 | flex: 1; 81 | text-align: center; 82 | border-bottom: 1rpx solid #eee; 83 | } 84 | 85 | .active { 86 | color: 4675F9; 87 | position: relative; 88 | } 89 | 90 | .swiper-tab-item.active { 91 | border-bottom: 1px solid #207dff; 92 | color:#207dff; 93 | } 94 | 95 | .swiper { 96 | width: 100%; 97 | height: 100%; 98 | display: flex; 99 | position: fixed; 100 | top: 80rpx; 101 | } 102 | 103 | scroll-view { 104 | width: 100%; 105 | height: 93%; /*动态高度*/ 106 | } 107 | 108 | .page_cards { 109 | margin-top: 10px; 110 | } 111 | .weui-search-bar{ 112 | border-top: none!important; 113 | border-bottom: none!important; 114 | background-color: #F8F8F8!important; 115 | } 116 | .weui-search-bar__form{ 117 | border: none!important; 118 | } 119 | .weui-cells:after{ 120 | border-bottom:none!important; 121 | } 122 | -------------------------------------------------------------------------------- /LittleDemo/pages/qa/qa.json: -------------------------------------------------------------------------------- 1 | { 2 | "usingComponents": {}, 3 | "enablePullDownRefresh": true 4 | } -------------------------------------------------------------------------------- /LittleDemo/pages/qa/qa.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 法律知识 5 | 学习法律知识,提高法律意识 6 | 7 | 8 | 9 | 10 | 11 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | {{qaData[index].question}}? 45 | 46 | 问题分类:{{qaData[index].big}} 47 | {{"("+qaData[index].small+")"}} 48 | 49 | 答案: 50 | {{qaData[index].answer}} 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | -------------------------------------------------------------------------------- /LittleDemo/pages/question/question.json: -------------------------------------------------------------------------------- 1 | { 2 | "usingComponents": {}, 3 | "enablePullDownRefresh": true 4 | } -------------------------------------------------------------------------------- /LittleDemo/pages/question/question.wxss: -------------------------------------------------------------------------------- 1 | /* pages/question/question.wxss */ 2 | .button-sp-area{ 3 | margin: 0 auto; 4 | padding-top: 15px; 5 | width: 35%; 6 | } 7 | .mini-btn{ 8 | margin-right: 5px; 9 | } 10 | .weui-textarea{ 11 | height: 5.3em; 12 | overflow: scroll; 13 | } 14 | .orange-ui-audio{ 15 | height: 48rpx; 16 | font-size: 28rpx; 17 | line-height: 48rpx; 18 | color: #fff; 19 | padding: 4rpx 10rpx; 20 | width: 175rpx; 21 | border-radius: 6rpx; 22 | background-color: #11cd6e; 23 | } 24 | image{ 25 | width: 32rpx; 26 | height: 24rpx; 27 | position: relative; 28 | top: 4rpx; 29 | } 30 | .flex-wrp{ 31 | display: flex; 32 | flex-direction: row-reverse; 33 | justify-content: right; 34 | } 35 | .orange-ui-btn{ 36 | vertical-align: baseline; 37 | font-size: 26rpx; 38 | padding-left: 14rpx; 39 | padding-right: 14rpx; 40 | background: #fff; 41 | color:#207dff; 42 | margin-left: 20rpx; 43 | margin-right: 0!important; 44 | font-weight: 500; 45 | border-color: #dedede; 46 | } 47 | .orange-ui-btn-hover{ 48 | opacity: 0.8; 49 | background-color: #dedede; 50 | } 51 | .weui-panel__hd{ 52 | color:#207dff; 53 | font-size: 32rpx; 54 | } 55 | .oubtn-r{ 56 | background: #fff; 57 | color:#000; 58 | margin-left: 20rpx; 59 | font-weight: normal; 60 | } 61 | /* button.weui-btn{ 62 | color:#207dff!important; 63 | border-color:#207dff!important; 64 | border-radius: 10px!important; 65 | font-size: 15px!important; 66 | } */ 67 | .weui-textarea{ 68 | color:#353535!important; 69 | } 70 | .weui-media-box__desc_all, 71 | .weui-cell_primary{ 72 | font-size: 30rpx!important; 73 | } 74 | .fz14{ 75 | font-size: 30rpx!important; 76 | } 77 | .oo-btn{ 78 | color:#fff!important; 79 | border-radius: 8rpx!important; 80 | background-color: #207dff!important; 81 | border: none!important; 82 | font:SimHei; 83 | height: 80rpx; 84 | line-height: 80rpx; 85 | font-size: 30rpx; 86 | box-shadow: 0px 1px 3px rgba(0, 0, 0, .25); 87 | font-weight: 500; 88 | } 89 | 90 | 91 | 92 | 93 | -------------------------------------------------------------------------------- /LittleDemo/pages/start/start.js: -------------------------------------------------------------------------------- 1 | // pages/start/start.js 2 | Page({ 3 | 4 | /** 5 | * 页面的初始数据 6 | */ 7 | data: { 8 | 9 | }, 10 | 11 | /** 12 | * 生命周期函数--监听页面加载 13 | */ 14 | onLoad: function (options) { 15 | setTimeout(function () { 16 | wx.switchTab({ 17 | url: '../question/question', 18 | success: function (res) { }, 19 | fail: function (res) { }, 20 | complete: function (res) { }, 21 | }) 22 | }, 2000) 23 | }, 24 | 25 | /** 26 | * 生命周期函数--监听页面初次渲染完成 27 | */ 28 | onReady: function () { 29 | 30 | }, 31 | 32 | /** 33 | * 生命周期函数--监听页面显示 34 | */ 35 | onShow: function () { 36 | 37 | }, 38 | 39 | /** 40 | * 生命周期函数--监听页面隐藏 41 | */ 42 | onHide: function () { 43 | 44 | }, 45 | 46 | /** 47 | * 生命周期函数--监听页面卸载 48 | */ 49 | onUnload: function () { 50 | 51 | }, 52 | 53 | /** 54 | * 页面相关事件处理函数--监听用户下拉动作 55 | */ 56 | onPullDownRefresh: function () { 57 | 58 | }, 59 | 60 | /** 61 | * 页面上拉触底事件的处理函数 62 | */ 63 | onReachBottom: function () { 64 | 65 | }, 66 | 67 | /** 68 | * 用户点击右上角分享 69 | */ 70 | onShareAppMessage: function () { 71 | 72 | }, 73 | gotoApp:function(){ 74 | console.log('../case/case') 75 | wx.switchTab({ 76 | url:'../question/question', 77 | success: function(res) {}, 78 | fail: function(res) {}, 79 | complete: function(res) {}, 80 | }) 81 | } 82 | }) -------------------------------------------------------------------------------- /LittleDemo/pages/start/start.json: -------------------------------------------------------------------------------- 1 | { 2 | "usingComponents": {}, 3 | "navigationBarBackgroundColor": "#81B7E6" 4 | 5 | } -------------------------------------------------------------------------------- /LittleDemo/pages/start/start.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 16 | 34 | 35 | 36 | 37 | 38 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | -------------------------------------------------------------------------------- /LittleDemo/project.config.json: -------------------------------------------------------------------------------- 1 | { 2 | "description": "项目配置文件", 3 | "packOptions": { 4 | "ignore": [] 5 | }, 6 | "setting": { 7 | "urlCheck": false, 8 | "es6": true, 9 | "postcss": true, 10 | "minified": true, 11 | "newFeature": true, 12 | "autoAudits": false, 13 | "checkInvalidKey": true 14 | }, 15 | "compileType": "miniprogram", 16 | "libVersion": "2.0.4", 17 | "appid": "wx34860b9a719a8c82", 18 | "projectname": "LittleDemo", 19 | "cloudfunctionTemplateRoot": "", 20 | "debugOptions": { 21 | "hidedInDevtools": [] 22 | }, 23 | "scripts": {}, 24 | "simulatorType": "wechat", 25 | "simulatorPluginLibVersion": {}, 26 | "condition": { 27 | "search": { 28 | "current": -1, 29 | "list": [] 30 | }, 31 | "conversation": { 32 | "current": -1, 33 | "list": [] 34 | }, 35 | "plugin": { 36 | "current": -1, 37 | "list": [] 38 | }, 39 | "game": { 40 | "list": [] 41 | }, 42 | "miniprogram": { 43 | "current": 8, 44 | "list": [ 45 | { 46 | "id": -1, 47 | "name": "智能问答", 48 | "pathName": "pages/question/question", 49 | "query": "", 50 | "scene": null 51 | }, 52 | { 53 | "id": -1, 54 | "name": "法律", 55 | "pathName": "pages/laws/laws", 56 | "query": "", 57 | "scene": null 58 | }, 59 | { 60 | "id": -1, 61 | "name": "案情推理", 62 | "pathName": "pages/case/case", 63 | "query": "", 64 | "scene": null 65 | }, 66 | { 67 | "id": -1, 68 | "name": "启动页", 69 | "pathName": "pages/start/start", 70 | "query": "", 71 | "scene": 1001 72 | }, 73 | { 74 | "id": -1, 75 | "name": "选项卡", 76 | "pathName": "pages/la/la", 77 | "query": "", 78 | "scene": null 79 | }, 80 | { 81 | "id": -1, 82 | "name": "选项卡", 83 | "pathName": "pages/la2/la2", 84 | "query": "", 85 | "scene": null 86 | }, 87 | { 88 | "id": -1, 89 | "name": "选项卡", 90 | "pathName": "pages/qa/qa", 91 | "query": "qa", 92 | "scene": null 93 | }, 94 | { 95 | "id": -1, 96 | "name": "法律知识", 97 | "pathName": "pages/qa/qa", 98 | "query": "", 99 | "scene": null 100 | }, 101 | { 102 | "id": -1, 103 | "name": "字体", 104 | "pathName": "pages/font/font", 105 | "scene": null 106 | } 107 | ] 108 | } 109 | } 110 | } -------------------------------------------------------------------------------- /LittleDemo/sitemap.json: -------------------------------------------------------------------------------- 1 | { 2 | "desc": "关于本文件的更多信息,请参考文档 https://developers.weixin.qq.com/miniprogram/dev/framework/sitemap.html", 3 | "rules": [{ 4 | "action": "allow", 5 | "page": "*" 6 | }] 7 | } -------------------------------------------------------------------------------- /LittleDemo/src/an3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cswangyuhui/AILaw/7747b53c4e5aeb3af4f6f3d39eeb6d61bd907d9a/LittleDemo/src/an3.png -------------------------------------------------------------------------------- /LittleDemo/src/audio.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cswangyuhui/AILaw/7747b53c4e5aeb3af4f6f3d39eeb6d61bd907d9a/LittleDemo/src/audio.png -------------------------------------------------------------------------------- /LittleDemo/src/audio2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cswangyuhui/AILaw/7747b53c4e5aeb3af4f6f3d39eeb6d61bd907d9a/LittleDemo/src/audio2.png -------------------------------------------------------------------------------- /LittleDemo/src/book3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cswangyuhui/AILaw/7747b53c4e5aeb3af4f6f3d39eeb6d61bd907d9a/LittleDemo/src/book3.png -------------------------------------------------------------------------------- /LittleDemo/src/book5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cswangyuhui/AILaw/7747b53c4e5aeb3af4f6f3d39eeb6d61bd907d9a/LittleDemo/src/book5.png -------------------------------------------------------------------------------- /LittleDemo/src/book6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cswangyuhui/AILaw/7747b53c4e5aeb3af4f6f3d39eeb6d61bd907d9a/LittleDemo/src/book6.png -------------------------------------------------------------------------------- /LittleDemo/src/book7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cswangyuhui/AILaw/7747b53c4e5aeb3af4f6f3d39eeb6d61bd907d9a/LittleDemo/src/book7.png -------------------------------------------------------------------------------- /LittleDemo/src/book8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cswangyuhui/AILaw/7747b53c4e5aeb3af4f6f3d39eeb6d61bd907d9a/LittleDemo/src/book8.png -------------------------------------------------------------------------------- /LittleDemo/src/book9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cswangyuhui/AILaw/7747b53c4e5aeb3af4f6f3d39eeb6d61bd907d9a/LittleDemo/src/book9.png -------------------------------------------------------------------------------- /LittleDemo/src/cover.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cswangyuhui/AILaw/7747b53c4e5aeb3af4f6f3d39eeb6d61bd907d9a/LittleDemo/src/cover.jpg -------------------------------------------------------------------------------- /LittleDemo/src/question3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cswangyuhui/AILaw/7747b53c4e5aeb3af4f6f3d39eeb6d61bd907d9a/LittleDemo/src/question3.png -------------------------------------------------------------------------------- /LittleDemo/src/question5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cswangyuhui/AILaw/7747b53c4e5aeb3af4f6f3d39eeb6d61bd907d9a/LittleDemo/src/question5.png -------------------------------------------------------------------------------- /LittleDemo/src/question6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cswangyuhui/AILaw/7747b53c4e5aeb3af4f6f3d39eeb6d61bd907d9a/LittleDemo/src/question6.png -------------------------------------------------------------------------------- /LittleDemo/src/question7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cswangyuhui/AILaw/7747b53c4e5aeb3af4f6f3d39eeb6d61bd907d9a/LittleDemo/src/question7.png -------------------------------------------------------------------------------- /LittleDemo/src/question8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cswangyuhui/AILaw/7747b53c4e5aeb3af4f6f3d39eeb6d61bd907d9a/LittleDemo/src/question8.png -------------------------------------------------------------------------------- /LittleDemo/src/question9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cswangyuhui/AILaw/7747b53c4e5aeb3af4f6f3d39eeb6d61bd907d9a/LittleDemo/src/question9.png -------------------------------------------------------------------------------- /LittleDemo/src/search3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cswangyuhui/AILaw/7747b53c4e5aeb3af4f6f3d39eeb6d61bd907d9a/LittleDemo/src/search3.png -------------------------------------------------------------------------------- /LittleDemo/src/search5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cswangyuhui/AILaw/7747b53c4e5aeb3af4f6f3d39eeb6d61bd907d9a/LittleDemo/src/search5.png -------------------------------------------------------------------------------- /LittleDemo/src/search6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cswangyuhui/AILaw/7747b53c4e5aeb3af4f6f3d39eeb6d61bd907d9a/LittleDemo/src/search6.png -------------------------------------------------------------------------------- /LittleDemo/src/search7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cswangyuhui/AILaw/7747b53c4e5aeb3af4f6f3d39eeb6d61bd907d9a/LittleDemo/src/search7.png -------------------------------------------------------------------------------- /LittleDemo/src/search8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cswangyuhui/AILaw/7747b53c4e5aeb3af4f6f3d39eeb6d61bd907d9a/LittleDemo/src/search8.png -------------------------------------------------------------------------------- /LittleDemo/src/search9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cswangyuhui/AILaw/7747b53c4e5aeb3af4f6f3d39eeb6d61bd907d9a/LittleDemo/src/search9.png -------------------------------------------------------------------------------- /LittleDemo/src/֪ʶ5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cswangyuhui/AILaw/7747b53c4e5aeb3af4f6f3d39eeb6d61bd907d9a/LittleDemo/src/֪ʶ5.png -------------------------------------------------------------------------------- /LittleDemo/src/֪ʶ6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cswangyuhui/AILaw/7747b53c4e5aeb3af4f6f3d39eeb6d61bd907d9a/LittleDemo/src/֪ʶ6.png -------------------------------------------------------------------------------- /LittleDemo/src/֪ʶ7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cswangyuhui/AILaw/7747b53c4e5aeb3af4f6f3d39eeb6d61bd907d9a/LittleDemo/src/֪ʶ7.png -------------------------------------------------------------------------------- /LittleDemo/src/֪ʶ8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cswangyuhui/AILaw/7747b53c4e5aeb3af4f6f3d39eeb6d61bd907d9a/LittleDemo/src/֪ʶ8.png -------------------------------------------------------------------------------- /LittleDemo/src/֪ʶ9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cswangyuhui/AILaw/7747b53c4e5aeb3af4f6f3d39eeb6d61bd907d9a/LittleDemo/src/֪ʶ9.png -------------------------------------------------------------------------------- /LittleDemo/wxstyle/base/fn.wxss: -------------------------------------------------------------------------------- 1 | /*! 2 | * WeUI v1.1.1 (https://github.com/weui/weui-wxss) 3 | * Copyright 2017 Tencent, Inc. 4 | * Licensed under the MIT license 5 | */ 6 | -------------------------------------------------------------------------------- /LittleDemo/wxstyle/base/mixin/setArrow.wxss: -------------------------------------------------------------------------------- 1 | /*! 2 | * WeUI v1.1.1 (https://github.com/weui/weui-wxss) 3 | * Copyright 2017 Tencent, Inc. 4 | * Licensed under the MIT license 5 | */ 6 | -------------------------------------------------------------------------------- /LittleDemo/wxstyle/base/mixin/setOnepx.wxss: -------------------------------------------------------------------------------- 1 | /*! 2 | * WeUI v1.1.1 (https://github.com/weui/weui-wxss) 3 | * Copyright 2017 Tencent, Inc. 4 | * Licensed under the MIT license 5 | */ 6 | -------------------------------------------------------------------------------- /LittleDemo/wxstyle/base/mixin/text.wxss: -------------------------------------------------------------------------------- 1 | /*! 2 | * WeUI v1.1.1 (https://github.com/weui/weui-wxss) 3 | * Copyright 2017 Tencent, Inc. 4 | * Licensed under the MIT license 5 | */ 6 | -------------------------------------------------------------------------------- /LittleDemo/wxstyle/base/reset.wxss: -------------------------------------------------------------------------------- 1 | /*! 2 | * WeUI v1.1.1 (https://github.com/weui/weui-wxss) 3 | * Copyright 2017 Tencent, Inc. 4 | * Licensed under the MIT license 5 | */ 6 | page{line-height:1.6;font-family:-apple-system-font,Helvetica Neue,sans-serif}icon{vertical-align:middle} -------------------------------------------------------------------------------- /LittleDemo/wxstyle/base/variable/color.wxss: -------------------------------------------------------------------------------- 1 | /*! 2 | * WeUI v1.1.1 (https://github.com/weui/weui-wxss) 3 | * Copyright 2017 Tencent, Inc. 4 | * Licensed under the MIT license 5 | */ 6 | -------------------------------------------------------------------------------- /LittleDemo/wxstyle/base/variable/global.wxss: -------------------------------------------------------------------------------- 1 | /*! 2 | * WeUI v1.1.1 (https://github.com/weui/weui-wxss) 3 | * Copyright 2017 Tencent, Inc. 4 | * Licensed under the MIT license 5 | */ 6 | -------------------------------------------------------------------------------- /LittleDemo/wxstyle/base/variable/weui-button.wxss: -------------------------------------------------------------------------------- 1 | /*! 2 | * WeUI v1.1.1 (https://github.com/weui/weui-wxss) 3 | * Copyright 2017 Tencent, Inc. 4 | * Licensed under the MIT license 5 | */ 6 | -------------------------------------------------------------------------------- /LittleDemo/wxstyle/base/variable/weui-cell.wxss: -------------------------------------------------------------------------------- 1 | /*! 2 | * WeUI v1.1.1 (https://github.com/weui/weui-wxss) 3 | * Copyright 2017 Tencent, Inc. 4 | * Licensed under the MIT license 5 | */ 6 | -------------------------------------------------------------------------------- /LittleDemo/wxstyle/base/variable/weui-dialog.wxss: -------------------------------------------------------------------------------- 1 | /*! 2 | * WeUI v1.1.1 (https://github.com/weui/weui-wxss) 3 | * Copyright 2017 Tencent, Inc. 4 | * Licensed under the MIT license 5 | */ 6 | -------------------------------------------------------------------------------- /LittleDemo/wxstyle/base/variable/weui-grid.wxss: -------------------------------------------------------------------------------- 1 | /*! 2 | * WeUI v1.1.1 (https://github.com/weui/weui-wxss) 3 | * Copyright 2017 Tencent, Inc. 4 | * Licensed under the MIT license 5 | */ 6 | -------------------------------------------------------------------------------- /LittleDemo/wxstyle/base/variable/weui-msg.wxss: -------------------------------------------------------------------------------- 1 | /*! 2 | * WeUI v1.1.1 (https://github.com/weui/weui-wxss) 3 | * Copyright 2017 Tencent, Inc. 4 | * Licensed under the MIT license 5 | */ 6 | -------------------------------------------------------------------------------- /LittleDemo/wxstyle/base/variable/weui-progress.wxss: -------------------------------------------------------------------------------- 1 | /*! 2 | * WeUI v1.1.1 (https://github.com/weui/weui-wxss) 3 | * Copyright 2017 Tencent, Inc. 4 | * Licensed under the MIT license 5 | */ 6 | -------------------------------------------------------------------------------- /LittleDemo/wxstyle/widget/weui-agree/weui-agree.wxss: -------------------------------------------------------------------------------- 1 | /*! 2 | * WeUI v1.1.1 (https://github.com/weui/weui-wxss) 3 | * Copyright 2017 Tencent, Inc. 4 | * Licensed under the MIT license 5 | */ 6 | .weui-agree{display:block;padding:.5em 15px;font-size:13px}.weui-agree__text{color:#999}.weui-agree__link{display:inline;color:#586c94}.weui-agree__checkbox{position:absolute;left:-9999px}.weui-agree__checkbox-icon{position:relative;top:2px;display:inline-block;border:1px solid #d1d1d1;background-color:#fff;border-radius:3px;width:11px;height:11px}.weui-agree__checkbox-icon-check{position:absolute;top:1px;left:1px} -------------------------------------------------------------------------------- /LittleDemo/wxstyle/widget/weui-animate/weui-animate.wxss: -------------------------------------------------------------------------------- 1 | /*! 2 | * WeUI v1.1.1 (https://github.com/weui/weui-wxss) 3 | * Copyright 2017 Tencent, Inc. 4 | * Licensed under the MIT license 5 | */ 6 | @-webkit-keyframes a{0%{-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}to{-webkit-transform:translateZ(0);transform:translateZ(0)}}@keyframes a{0%{-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}to{-webkit-transform:translateZ(0);transform:translateZ(0)}}.weui-animate-slide-up{-webkit-animation:a ease .3s forwards;animation:a ease .3s forwards}@-webkit-keyframes b{0%{-webkit-transform:translateZ(0);transform:translateZ(0)}to{-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}}@keyframes b{0%{-webkit-transform:translateZ(0);transform:translateZ(0)}to{-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}}.weui-animate-slide-down{-webkit-animation:b ease .3s forwards;animation:b ease .3s forwards}@-webkit-keyframes c{0%{opacity:0}to{opacity:1}}@keyframes c{0%{opacity:0}to{opacity:1}}.weui-animate-fade-in{-webkit-animation:c ease .3s forwards;animation:c ease .3s forwards}@-webkit-keyframes d{0%{opacity:1}to{opacity:0}}@keyframes d{0%{opacity:1}to{opacity:0}}.weui-animate-fade-out{-webkit-animation:d ease .3s forwards;animation:d ease .3s forwards} -------------------------------------------------------------------------------- /LittleDemo/wxstyle/widget/weui-button/weui-button.wxss: -------------------------------------------------------------------------------- 1 | /*! 2 | * WeUI v1.1.1 (https://github.com/weui/weui-wxss) 3 | * Copyright 2017 Tencent, Inc. 4 | * Licensed under the MIT license 5 | */ 6 | .weui-btn{margin-top:15px}.weui-btn:first-child{margin-top:0}.weui-btn-area{margin:1.17647059em 15px .3em} -------------------------------------------------------------------------------- /LittleDemo/wxstyle/widget/weui-cell/weui-access.wxss: -------------------------------------------------------------------------------- 1 | /*! 2 | * WeUI v1.1.1 (https://github.com/weui/weui-wxss) 3 | * Copyright 2017 Tencent, Inc. 4 | * Licensed under the MIT license 5 | */ 6 | .weui-cell_access{color:inherit}.weui-cell__ft_in-access{padding-right:13px;position:relative}.weui-cell__ft_in-access:after{content:" ";display:inline-block;height:6px;width:6px;border-width:2px 2px 0 0;border-color:#c8c8cd;border-style:solid;-webkit-transform:matrix(.71,.71,-.71,.71,0,0);transform:matrix(.71,.71,-.71,.71,0,0);position:relative;top:-2px;position:absolute;top:50%;margin-top:-4px;right:2px}.weui-cell_link{color:#586c94;font-size:14px}.weui-cell_link:active{background-color:#ececec}.weui-cell_link:first-child:before{display:block} -------------------------------------------------------------------------------- /LittleDemo/wxstyle/widget/weui-cell/weui-cell.wxss: -------------------------------------------------------------------------------- 1 | /*! 2 | * WeUI v1.1.1 (https://github.com/weui/weui-wxss) 3 | * Copyright 2017 Tencent, Inc. 4 | * Licensed under the MIT license 5 | */ 6 | .weui-cells{position:relative;margin-top:1.17647059em;background-color:#fff;line-height:1.41176471;font-size:17px}.weui-cells:before{top:0;border-top:1rpx solid #d9d9d9}.weui-cells:after,.weui-cells:before{content:" ";position:absolute;left:0;right:0;height:1px;color:#d9d9d9}.weui-cells:after{bottom:0;border-bottom:1rpx solid #d9d9d9}.weui-cells__title{margin-top:.77em;margin-bottom:.3em;padding-left:15px;padding-right:15px;color:#999;font-size:14px}.weui-cells_after-title{margin-top:0}.weui-cells__tips{margin-top:.3em;color:#999;padding-left:15px;padding-right:15px;font-size:14px}.weui-cell{padding:10px 15px;position:relative;display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center}.weui-cell:before{content:" ";position:absolute;left:0;top:0;right:0;height:1px;border-top:1rpx solid #d9d9d9;color:#d9d9d9;left:15px}.weui-cell:first-child:before{display:none}.weui-cell_active{background-color:#ececec}.weui-cell_primary{-webkit-box-align:start;-webkit-align-items:flex-start;align-items:flex-start}.weui-cell__bd{-webkit-box-flex:1;-webkit-flex:1;flex:1}.weui-cell__ft{text-align:right;color:#999} -------------------------------------------------------------------------------- /LittleDemo/wxstyle/widget/weui-cell/weui-check.wxss: -------------------------------------------------------------------------------- 1 | /*! 2 | * WeUI v1.1.1 (https://github.com/weui/weui-wxss) 3 | * Copyright 2017 Tencent, Inc. 4 | * Licensed under the MIT license 5 | */ 6 | .weui-icon-radio{margin-left:3.2px;margin-right:3.2px}.weui-icon-checkbox_circle,.weui-icon-checkbox_success{margin-left:4.6px;margin-right:4.6px}.weui-check__label:active{background-color:#ececec}.weui-check{position:absolute;left:-9999px}.weui-check__hd_in-checkbox{padding-right:.35em}.weui-cell__ft_in-radio{padding-left:.35em} -------------------------------------------------------------------------------- /LittleDemo/wxstyle/widget/weui-cell/weui-form/weui-form-preview.wxss: -------------------------------------------------------------------------------- 1 | /*! 2 | * WeUI v1.1.1 (https://github.com/weui/weui-wxss) 3 | * Copyright 2017 Tencent, Inc. 4 | * Licensed under the MIT license 5 | */ 6 | .weui-form-preview{position:relative;background-color:#fff}.weui-form-preview:before{top:0;border-top:1rpx solid #d9d9d9}.weui-form-preview:after,.weui-form-preview:before{content:" ";position:absolute;left:0;right:0;height:1px;color:#d9d9d9}.weui-form-preview:after{bottom:0;border-bottom:1rpx solid #d9d9d9}.weui-form-preview__value{font-size:14px}.weui-form-preview__value_in-hd{font-size:26px}.weui-form-preview__hd{position:relative;padding:10px 15px;text-align:right;line-height:2.5em}.weui-form-preview__hd:after{content:" ";position:absolute;left:0;bottom:0;right:0;height:1px;border-bottom:1rpx solid #d9d9d9;color:#d9d9d9;left:15px}.weui-form-preview__bd{padding:10px 15px;font-size:.9em;text-align:right;color:#999;line-height:2}.weui-form-preview__ft{position:relative;line-height:50px;display:-webkit-box;display:-webkit-flex;display:flex}.weui-form-preview__ft:after{content:" ";position:absolute;left:0;top:0;right:0;height:1px;border-top:1rpx solid #d5d5d6;color:#d5d5d6}.weui-form-preview__item{overflow:hidden}.weui-form-preview__label{float:left;margin-right:1em;min-width:4em;color:#999;text-align:justify;text-align-last:justify}.weui-form-preview__value{display:block;overflow:hidden;word-break:normal;word-wrap:break-word}.weui-form-preview__btn{position:relative;display:block;-webkit-box-flex:1;-webkit-flex:1;flex:1;color:#3cc51f;text-align:center}.weui-form-preview__btn:after{content:" ";position:absolute;left:0;top:0;width:1px;bottom:0;border-left:1rpx solid #d5d5d6;color:#d5d5d6}.weui-form-preview__btn:first-child:after{display:none}.weui-form-preview__btn_active{background-color:#eee}.weui-form-preview__btn_default{color:#999}.weui-form-preview__btn_primary{color:#0bb20c} -------------------------------------------------------------------------------- /LittleDemo/wxstyle/widget/weui-cell/weui-form/weui-form_common.wxss: -------------------------------------------------------------------------------- 1 | /*! 2 | * WeUI v1.1.1 (https://github.com/weui/weui-wxss) 3 | * Copyright 2017 Tencent, Inc. 4 | * Licensed under the MIT license 5 | */ 6 | .weui-cell_input{padding-top:0;padding-bottom:0}.weui-label{width:105px;word-wrap:break-word;word-break:break-all}.weui-input{height:2.58823529em;min-height:2.58823529em;line-height:2.58823529em}.weui-toptips{position:fixed;-webkit-transform:translateZ(0);transform:translateZ(0);top:0;left:0;right:0;padding:5px;font-size:14px;text-align:center;color:#fff;z-index:5000;word-wrap:break-word;word-break:break-all}.weui-toptips_warn{background-color:#e64340}.weui-textarea{display:block;width:100%}.weui-textarea-counter{color:#b2b2b2;text-align:right}.weui-cell_warn,.weui-textarea-counter_warn{color:#e64340} -------------------------------------------------------------------------------- /LittleDemo/wxstyle/widget/weui-cell/weui-form/weui-select.wxss: -------------------------------------------------------------------------------- 1 | /*! 2 | * WeUI v1.1.1 (https://github.com/weui/weui-wxss) 3 | * Copyright 2017 Tencent, Inc. 4 | * Licensed under the MIT license 5 | */ 6 | .weui-cell_select{padding:0}.weui-select{position:relative;padding-left:15px;padding-right:30px;height:2.58823529em;min-height:2.58823529em;line-height:2.58823529em;border-right:1rpx solid #d9d9d9}.weui-select:before{content:" ";display:inline-block;height:6px;width:6px;border-width:2px 2px 0 0;border-color:#c8c8cd;border-style:solid;-webkit-transform:matrix(.71,.71,-.71,.71,0,0);transform:matrix(.71,.71,-.71,.71,0,0);position:relative;top:-2px;position:absolute;top:50%;right:15px;margin-top:-4px}.weui-select_in-select-after{padding-left:0}.weui-cell__bd_in-select-before,.weui-cell__hd_in-select-after{padding-left:15px} -------------------------------------------------------------------------------- /LittleDemo/wxstyle/widget/weui-cell/weui-form/weui-vcode.wxss: -------------------------------------------------------------------------------- 1 | /*! 2 | * WeUI v1.1.1 (https://github.com/weui/weui-wxss) 3 | * Copyright 2017 Tencent, Inc. 4 | * Licensed under the MIT license 5 | */ 6 | .weui-cell_vcode{padding-right:0}.weui-vcode-btn,.weui-vcode-img{margin-left:5px;height:2.58823529em;vertical-align:middle}.weui-vcode-btn{display:inline-block;padding:0 .6em 0 .7em;border-left:1px solid #e5e5e5;line-height:2.58823529em;font-size:17px;color:#3cc51f;white-space:nowrap}.weui-vcode-btn:active{color:#52a341} -------------------------------------------------------------------------------- /LittleDemo/wxstyle/widget/weui-cell/weui-switch.wxss: -------------------------------------------------------------------------------- 1 | /*! 2 | * WeUI v1.1.1 (https://github.com/weui/weui-wxss) 3 | * Copyright 2017 Tencent, Inc. 4 | * Licensed under the MIT license 5 | */ 6 | .weui-cell_switch{padding-top:6px;padding-bottom:6px} -------------------------------------------------------------------------------- /LittleDemo/wxstyle/widget/weui-cell/weui-uploader.wxss: -------------------------------------------------------------------------------- 1 | /*! 2 | * WeUI v1.1.1 (https://github.com/weui/weui-wxss) 3 | * Copyright 2017 Tencent, Inc. 4 | * Licensed under the MIT license 5 | */ 6 | .weui-uploader__hd{display:-webkit-box;display:-webkit-flex;display:flex;padding-bottom:10px;-webkit-box-align:center;-webkit-align-items:center;align-items:center}.weui-uploader__title{-webkit-box-flex:1;-webkit-flex:1;flex:1}.weui-uploader__info{color:#b2b2b2}.weui-uploader__bd{margin-bottom:-4px;margin-right:-9px;overflow:hidden}.weui-uploader__file{float:left;margin-right:9px;margin-bottom:9px}.weui-uploader__img{display:block;width:79px;height:79px}.weui-uploader__file_status{position:relative}.weui-uploader__file_status:before{content:" ";position:absolute;top:0;right:0;bottom:0;left:0;background-color:rgba(0,0,0,.5)}.weui-uploader__file-content{position:absolute;top:50%;left:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%);color:#fff}.weui-uploader__input-box{float:left;position:relative;margin-right:9px;margin-bottom:9px;width:77px;height:77px;border:1px solid #d9d9d9}.weui-uploader__input-box:after,.weui-uploader__input-box:before{content:" ";position:absolute;top:50%;left:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%);background-color:#d9d9d9}.weui-uploader__input-box:before{width:2px;height:39.5px}.weui-uploader__input-box:after{width:39.5px;height:2px}.weui-uploader__input-box:active{border-color:#999}.weui-uploader__input-box:active:after,.weui-uploader__input-box:active:before{background-color:#999}.weui-uploader__input{position:absolute;z-index:1;top:0;left:0;width:100%;height:100%;opacity:0} -------------------------------------------------------------------------------- /LittleDemo/wxstyle/widget/weui-flex/weui-flex.wxss: -------------------------------------------------------------------------------- 1 | /*! 2 | * WeUI v1.1.1 (https://github.com/weui/weui-wxss) 3 | * Copyright 2017 Tencent, Inc. 4 | * Licensed under the MIT license 5 | */ 6 | .weui-flex{display:-webkit-box;display:-webkit-flex;display:flex}.weui-flex__item{-webkit-box-flex:1;-webkit-flex:1;flex:1} -------------------------------------------------------------------------------- /LittleDemo/wxstyle/widget/weui-footer/weui-footer.wxss: -------------------------------------------------------------------------------- 1 | /*! 2 | * WeUI v1.1.1 (https://github.com/weui/weui-wxss) 3 | * Copyright 2017 Tencent, Inc. 4 | * Licensed under the MIT license 5 | */ 6 | .weui-footer{color:#999;font-size:14px;text-align:center}.weui-footer_fixed-bottom{position:fixed;bottom:.52em;left:0;right:0}.weui-footer__links{font-size:0}.weui-footer__link{display:inline-block;vertical-align:top;margin:0 .62em;position:relative;font-size:14px;color:#586c94}.weui-footer__link:before{content:" ";position:absolute;left:0;top:0;width:1px;bottom:0;border-left:1rpx solid #c7c7c7;color:#c7c7c7;left:-.65em;top:.36em;bottom:.36em}.weui-footer__link:first-child:before{display:none}.weui-footer__text{padding:0 .34em;font-size:12px} -------------------------------------------------------------------------------- /LittleDemo/wxstyle/widget/weui-grid/weui-grid.wxss: -------------------------------------------------------------------------------- 1 | /*! 2 | * WeUI v1.1.1 (https://github.com/weui/weui-wxss) 3 | * Copyright 2017 Tencent, Inc. 4 | * Licensed under the MIT license 5 | */ 6 | .weui-grids{border-top:1rpx solid #d9d9d9;border-left:1rpx solid #d9d9d9;overflow:hidden}.weui-grid{position:relative;float:left;padding:20px 10px;width:33.33333333%;box-sizing:border-box;border-right:1rpx solid #d9d9d9;border-bottom:1rpx solid #d9d9d9}.weui-grid_active{background-color:#ececec}.weui-grid__icon{display:block;width:28px;height:28px;margin:0 auto}.weui-grid__label{margin-top:5px;display:block;text-align:center;color:#000;font-size:14px;white-space:nowrap;text-overflow:ellipsis;overflow:hidden} -------------------------------------------------------------------------------- /LittleDemo/wxstyle/widget/weui-media-box/weui-media-box.wxss: -------------------------------------------------------------------------------- 1 | /*! 2 | * WeUI v1.1.1 (https://github.com/weui/weui-wxss) 3 | * Copyright 2017 Tencent, Inc. 4 | * Licensed under the MIT license 5 | */ 6 | .weui-media-box{padding:15px;position:relative}.weui-media-box:before{content:" ";position:absolute;left:0;top:0;right:0;height:1px;border-top:1rpx solid #e5e5e5;color:#e5e5e5;left:15px}.weui-media-box:first-child:before{display:none}.weui-media-box__title{font-weight:400;font-size:17px;width:auto;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;word-wrap:normal;word-wrap:break-word;word-break:break-all}.weui-media-box__desc{color:#999;font-size:13px;line-height:1.2;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2}.weui-media-box__info{margin-top:15px;padding-bottom:5px;font-size:13px;color:#cecece;line-height:1em;list-style:none;overflow:hidden}.weui-media-box__info__meta{float:left;padding-right:1em}.weui-media-box__info__meta_extra{padding-left:1em;border-left:1px solid #cecece}.weui-media-box__title_in-text{margin-bottom:8px}.weui-media-box_appmsg{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center}.weui-media-box__thumb{width:100%;height:100%;vertical-align:top}.weui-media-box__hd_in-appmsg{margin-right:.8em;width:60px;height:60px;line-height:60px;text-align:center}.weui-media-box__bd_in-appmsg{-webkit-box-flex:1;-webkit-flex:1;flex:1;min-width:0}.weui-media-box_small-appmsg{padding:0}.weui-cells_in-small-appmsg{margin-top:0}.weui-cells_in-small-appmsg:before{display:none} -------------------------------------------------------------------------------- /LittleDemo/wxstyle/widget/weui-page/weui-article.wxss: -------------------------------------------------------------------------------- 1 | /*! 2 | * WeUI v1.1.1 (https://github.com/weui/weui-wxss) 3 | * Copyright 2017 Tencent, Inc. 4 | * Licensed under the MIT license 5 | */ 6 | .weui-article{padding:20px 15px;font-size:15px}.weui-article__section{margin-bottom:1.5em}.weui-article__h1{font-size:18px;font-weight:400;margin-bottom:.9em}.weui-article__h2{font-size:16px;font-weight:400;margin-bottom:.34em}.weui-article__h3{font-weight:400;font-size:15px;margin-bottom:.34em}.weui-article__p{margin:0 0 .8em} -------------------------------------------------------------------------------- /LittleDemo/wxstyle/widget/weui-page/weui-msg.wxss: -------------------------------------------------------------------------------- 1 | /*! 2 | * WeUI v1.1.1 (https://github.com/weui/weui-wxss) 3 | * Copyright 2017 Tencent, Inc. 4 | * Licensed under the MIT license 5 | */ 6 | .weui-msg{padding-top:36px;text-align:center}.weui-msg__link{display:inline;color:#586c94}.weui-msg__icon-area{margin-bottom:30px}.weui-msg__text-area{margin-bottom:25px;padding:0 20px}.weui-msg__title{margin-bottom:5px;font-weight:400;font-size:20px}.weui-msg__desc{font-size:14px;color:#999}.weui-msg__opr-area{margin-bottom:25px}.weui-msg__extra-area{margin-bottom:15px;font-size:14px;color:#999}@media screen and (min-height:438px){.weui-msg__extra-area{position:fixed;left:0;bottom:0;width:100%;text-align:center}} -------------------------------------------------------------------------------- /LittleDemo/wxstyle/widget/weui-panel/weui-panel.wxss: -------------------------------------------------------------------------------- 1 | /*! 2 | * WeUI v1.1.1 (https://github.com/weui/weui-wxss) 3 | * Copyright 2017 Tencent, Inc. 4 | * Licensed under the MIT license 5 | */ 6 | .weui-panel{background-color:#fff;margin-top:10px;position:relative;overflow:hidden}.weui-panel:first-child{margin-top:0}.weui-panel:before{top:0;border-top:1rpx solid #e5e5e5}.weui-panel:after,.weui-panel:before{content:" ";position:absolute;left:0;right:0;height:1px;color:#e5e5e5}.weui-panel:after{bottom:0;border-bottom:1rpx solid #e5e5e5}.weui-panel__hd{padding:14px 15px 10px;color:#999;font-size:13px;position:relative}.weui-panel__hd:after{content:" ";position:absolute;left:0;bottom:0;right:0;height:1px;border-bottom:1rpx solid #e5e5e5;color:#e5e5e5;left:15px} -------------------------------------------------------------------------------- /LittleDemo/wxstyle/widget/weui-progress/weui-progress.wxss: -------------------------------------------------------------------------------- 1 | /*! 2 | * WeUI v1.1.1 (https://github.com/weui/weui-wxss) 3 | * Copyright 2017 Tencent, Inc. 4 | * Licensed under the MIT license 5 | */ 6 | .weui-progress{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center}.weui-progress__bar{-webkit-box-flex:1;-webkit-flex:1;flex:1}.weui-progress__opr{margin-left:15px;font-size:0} -------------------------------------------------------------------------------- /LittleDemo/wxstyle/widget/weui-searchbar/weui-searchbar.wxss: -------------------------------------------------------------------------------- 1 | /*! 2 | * WeUI v1.1.1 (https://github.com/weui/weui-wxss) 3 | * Copyright 2017 Tencent, Inc. 4 | * Licensed under the MIT license 5 | */ 6 | .weui-search-bar{position:relative;padding:8px 10px;display:-webkit-box;display:-webkit-flex;display:flex;box-sizing:border-box;background-color:#efeff4;border-top:1rpx solid #d7d6dc;border-bottom:1rpx solid #d7d6dc}.weui-icon-search{margin-right:8px;font-size:inherit}.weui-icon-search_in-box{position:absolute;left:10px;top:7px}.weui-search-bar__text{display:inline-block;font-size:14px;vertical-align:middle}.weui-search-bar__form{position:relative;-webkit-box-flex:1;-webkit-flex:auto;flex:auto;border-radius:5px;background:#fff;border:1rpx solid #e6e6ea}.weui-search-bar__box{position:relative;padding-left:30px;padding-right:30px;width:100%;box-sizing:border-box;z-index:1}.weui-search-bar__input{height:28px;line-height:28px;font-size:14px}.weui-icon-clear{position:absolute;top:0;right:0;padding:7px 8px;font-size:0}.weui-search-bar__label{position:absolute;top:0;right:0;bottom:0;left:0;z-index:2;border-radius:3px;text-align:center;color:#9b9b9b;background:#fff;line-height:28px}.weui-search-bar__cancel-btn{margin-left:10px;line-height:28px;color:#09bb07;white-space:nowrap} -------------------------------------------------------------------------------- /LittleDemo/wxstyle/widget/weui-tab/weui-navbar.wxss: -------------------------------------------------------------------------------- 1 | /*! 2 | * WeUI v1.1.1 (https://github.com/weui/weui-wxss) 3 | * Copyright 2017 Tencent, Inc. 4 | * Licensed under the MIT license 5 | */ 6 | .weui-navbar{display:-webkit-box;display:-webkit-flex;display:flex;position:absolute;z-index:500;top:0;width:100%;border-bottom:1rpx solid #ccc}.weui-navbar__item{position:relative;display:block;-webkit-box-flex:1;-webkit-flex:1;flex:1;padding:13px 0;text-align:center;font-size:0}.weui-navbar__item.weui-bar__item_on{color:#1aad19}.weui-navbar__slider{position:absolute;content:" ";left:0;bottom:0;width:6em;height:3px;background-color:#1aad19;-webkit-transition:-webkit-transform .3s;transition:-webkit-transform .3s;transition:transform .3s;transition:transform .3s,-webkit-transform .3s}.weui-navbar__title{display:inline-block;font-size:15px;max-width:8em;width:auto;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;word-wrap:normal} -------------------------------------------------------------------------------- /LittleDemo/wxstyle/widget/weui-tab/weui-tab.wxss: -------------------------------------------------------------------------------- 1 | /*! 2 | * WeUI v1.1.1 (https://github.com/weui/weui-wxss) 3 | * Copyright 2017 Tencent, Inc. 4 | * Licensed under the MIT license 5 | */ 6 | .weui-navbar{display:-webkit-box;display:-webkit-flex;display:flex;position:absolute;z-index:500;top:0;width:100%;border-bottom:1rpx solid #ccc}.weui-navbar__item{position:relative;display:block;-webkit-box-flex:1;-webkit-flex:1;flex:1;padding:13px 0;text-align:center;font-size:0}.weui-navbar__item.weui-bar__item_on{color:#1aad19}.weui-navbar__slider{position:absolute;content:" ";left:0;bottom:0;width:6em;height:3px;background-color:#1aad19;-webkit-transition:-webkit-transform .3s;transition:-webkit-transform .3s;transition:transform .3s;transition:transform .3s,-webkit-transform .3s}.weui-navbar__title{display:inline-block;font-size:15px;max-width:8em;width:auto;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;word-wrap:normal}.weui-tab{position:relative;height:100%}.weui-tab__panel{box-sizing:border-box;height:100%;padding-top:50px;overflow:auto;-webkit-overflow-scrolling:touch} -------------------------------------------------------------------------------- /LittleDemo/wxstyle/widget/weui-tips/weui-badge.wxss: -------------------------------------------------------------------------------- 1 | /*! 2 | * WeUI v1.1.1 (https://github.com/weui/weui-wxss) 3 | * Copyright 2017 Tencent, Inc. 4 | * Licensed under the MIT license 5 | */ 6 | .weui-badge{display:inline-block;padding:.15em .4em;min-width:8px;border-radius:18px;background-color:#e64340;color:#fff;line-height:1.2;text-align:center;font-size:12px;vertical-align:middle}.weui-badge_dot{padding:.4em;min-width:0} -------------------------------------------------------------------------------- /LittleDemo/wxstyle/widget/weui-tips/weui-loadmore.wxss: -------------------------------------------------------------------------------- 1 | /*! 2 | * WeUI v1.1.1 (https://github.com/weui/weui-wxss) 3 | * Copyright 2017 Tencent, Inc. 4 | * Licensed under the MIT license 5 | */ 6 | .weui-loadmore{width:65%;margin:1.5em auto;line-height:1.6em;font-size:14px;text-align:center}.weui-loadmore__tips{display:inline-block;vertical-align:middle}.weui-loadmore_line{border-top:1px solid #e5e5e5;margin-top:2.4em}.weui-loadmore__tips_in-line{position:relative;top:-.9em;padding:0 .55em;background-color:#fff;color:#999}.weui-loadmore__tips_in-dot{position:relative;padding:0 .16em;width:4px;height:1.6em}.weui-loadmore__tips_in-dot:before{content:" ";position:absolute;top:50%;left:50%;margin-top:-1px;margin-left:-2px;width:4px;height:4px;border-radius:50%;background-color:#e5e5e5} -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # AILaw 2 | 法律小智囊微信小程序 3 | 4 | ## 项目背景 5 | ``` 6 | 在现实生活中,不少人民群众遇到法律问题时,因为法律意识淡薄或寻求法律援助困难,并没有使法律成为保护自身合法权益的有效武器 7 | 或不小心踏入法律的“雷区”。法律小智囊微信小程序立足法律智能为公众提供法律服务,包含法律智能问答,刑事案件罪名、所犯法律条 8 | 文和量刑期限推理以及法律条文搜索引擎等功能。 9 | ``` 10 | 11 | ## 文件介绍 12 | 文件名|作用| 13 | |:---|:---| 14 | |LittleDemo|微信小程序源代码| 15 | |criminal|法律条文搜索引擎服务源代码| 16 | |kg|法律智能问答服务和热门法律知识浏览服务源代码| 17 | |lawPredict|根据法律文书预测嫌疑人罪名、触犯法律条文和量刑期限服务源代码| 18 | 19 | ## 项目说明 20 | ``` 21 | 此项目后台采用SpringBoot开发,用到了MySql、ElasticSearch和MongoDB三种存储技术,参考微服务的设计思想将程序功能水平分解, 22 | 并采用Nginx作为反向代理服务器。后台还用到了腾讯云的语音识别、手写体识别和印刷体识别三种API,这部分源代码并未提供。本项目未进 23 | 行商业化,但是用到的数据却是有价值的,所以并未提供,读者可以根据下一小节的内容自己去下载或爬取构建语料库。 24 | ``` 25 | 26 | ## 数据获取 27 | [刑事案件智能推理(预测罪名、量刑期限和所触犯的法律条文)数据集](https://github.com/cswangyuhui/CAIL) 28 | 29 | [法律问答数据语料库](http://www.64365.com/zs/quanbufenlei/) 30 | 31 | [法律条文语料库](https://www.66law.cn/tiaoli/) 32 | 33 | ### 项目成果 34 | 35 |
36 | 37 | ### 项目截图 38 | 39 |
40 | 41 | 42 | 43 | -------------------------------------------------------------------------------- /criminal/HELP.md: -------------------------------------------------------------------------------- 1 | # Getting Started 2 | 3 | ### Reference Documentation 4 | For further reference, please consider the following sections: 5 | 6 | * [Official Apache Maven documentation](https://maven.apache.org/guides/index.html) 7 | 8 | ### Guides 9 | The following guides illustrate how to use some features concretely: 10 | 11 | * [Building a RESTful Web Service](https://spring.io/guides/gs/rest-service/) 12 | * [Serving Web Content with Spring MVC](https://spring.io/guides/gs/serving-web-content/) 13 | * [Building REST services with Spring](https://spring.io/guides/tutorials/bookmarks/) 14 | 15 | -------------------------------------------------------------------------------- /criminal/src/main/java/com/law/criminal/CriminalApplication.java: -------------------------------------------------------------------------------- 1 | package com.law.criminal; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | import org.springframework.boot.builder.SpringApplicationBuilder; 6 | import org.springframework.boot.web.servlet.support.SpringBootServletInitializer; 7 | 8 | @SpringBootApplication(scanBasePackages="com.law.criminal") 9 | public class CriminalApplication extends SpringBootServletInitializer { 10 | 11 | public static void main(String[] args) { 12 | SpringApplication.run(CriminalApplication.class, args); 13 | } 14 | @Override//为了打包springboot项目 15 | protected SpringApplicationBuilder configure( 16 | SpringApplicationBuilder builder) { 17 | return builder.sources(this.getClass()); 18 | } 19 | 20 | } 21 | -------------------------------------------------------------------------------- /criminal/src/main/java/com/law/criminal/comm/CivilTableOutput.java: -------------------------------------------------------------------------------- 1 | package com.law.criminal.comm; 2 | 3 | public class CivilTableOutput { 4 | 5 | private Integer partnum; 6 | 7 | private String part; 8 | 9 | private Integer chapternum; 10 | 11 | private String chapter; 12 | 13 | private Integer sectionnum; 14 | 15 | private String section; 16 | 17 | public CivilTableOutput(Integer partnum, String part, Integer chapternum, String chapter, Integer sectionnum, String section) { 18 | this.partnum = partnum; 19 | this.part = part; 20 | this.chapternum = chapternum; 21 | this.chapter = chapter; 22 | this.sectionnum = sectionnum; 23 | this.section = section; 24 | } 25 | 26 | public CivilTableOutput() { 27 | } 28 | 29 | @Override 30 | public String toString() { 31 | return "CivilTableOutput{" + 32 | "partnum=" + partnum + 33 | ", part='" + part + '\'' + 34 | ", chapternum=" + chapternum + 35 | ", chapter='" + chapter + '\'' + 36 | ", sectionnum=" + sectionnum + 37 | ", section='" + section + '\'' + 38 | '}'; 39 | } 40 | 41 | public Integer getPartnum() { 42 | return partnum; 43 | } 44 | 45 | public void setPartnum(Integer partnum) { 46 | this.partnum = partnum; 47 | } 48 | 49 | public String getPart() { 50 | return part; 51 | } 52 | 53 | public void setPart(String part) { 54 | this.part = part; 55 | } 56 | 57 | public Integer getChapternum() { 58 | return chapternum; 59 | } 60 | 61 | public void setChapternum(Integer chapternum) { 62 | this.chapternum = chapternum; 63 | } 64 | 65 | public String getChapter() { 66 | return chapter; 67 | } 68 | 69 | public void setChapter(String chapter) { 70 | this.chapter = chapter; 71 | } 72 | 73 | public Integer getSectionnum() { 74 | return sectionnum; 75 | } 76 | 77 | public void setSectionnum(Integer sectionnum) { 78 | this.sectionnum = sectionnum; 79 | } 80 | 81 | public String getSection() { 82 | return section; 83 | } 84 | 85 | public void setSection(String section) { 86 | this.section = section; 87 | } 88 | } 89 | -------------------------------------------------------------------------------- /criminal/src/main/java/com/law/criminal/comm/CommonTableOutput.java: -------------------------------------------------------------------------------- 1 | package com.law.criminal.comm; 2 | 3 | public class CommonTableOutput { 4 | private Integer chapterNum; 5 | private String chapter; 6 | 7 | public CommonTableOutput(Integer chapterNum, String chapter) { 8 | this.chapterNum = chapterNum; 9 | this.chapter = chapter; 10 | } 11 | 12 | public CommonTableOutput() { 13 | } 14 | 15 | public Integer getChapterNum() { 16 | return chapterNum; 17 | } 18 | 19 | public void setChapterNum(Integer chapterNum) { 20 | this.chapterNum = chapterNum; 21 | } 22 | 23 | public String getChapter() { 24 | return chapter; 25 | } 26 | 27 | public void setChapter(String chapter) { 28 | this.chapter = chapter; 29 | } 30 | 31 | @Override 32 | public String toString() { 33 | return "CommonTableOutput{" + 34 | "chapterNum=" + chapterNum + 35 | ", chapter='" + chapter + '\'' + 36 | '}'; 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /criminal/src/main/java/com/law/criminal/comm/LawTableOutput.java: -------------------------------------------------------------------------------- 1 | package com.law.criminal.comm; 2 | 3 | import java.io.Serializable; 4 | 5 | public class LawTableOutput implements Serializable { 6 | private Integer partnum; 7 | 8 | private String part; 9 | 10 | private Integer chapternum; 11 | 12 | private String chapter; 13 | 14 | private Integer sectionnum; 15 | 16 | private String section; 17 | 18 | public LawTableOutput() { 19 | } 20 | 21 | public LawTableOutput(Integer partnum, String part, Integer chapternum, String chapter, Integer sectionnum, String section) { 22 | this.partnum = partnum; 23 | this.part = part; 24 | this.chapternum = chapternum; 25 | this.chapter = chapter; 26 | this.sectionnum = sectionnum; 27 | this.section = section; 28 | } 29 | 30 | @Override 31 | public String toString() { 32 | return "LawTableOutput{" + 33 | "partnum=" + partnum + 34 | ", part='" + part + '\'' + 35 | ", chapternum=" + chapternum + 36 | ", chapter='" + chapter + '\'' + 37 | ", sectionnum=" + sectionnum + 38 | ", section='" + section + '\'' + 39 | '}'; 40 | } 41 | 42 | public Integer getPartnum() { 43 | return partnum; 44 | } 45 | 46 | public void setPartnum(Integer partnum) { 47 | this.partnum = partnum; 48 | } 49 | 50 | public String getPart() { 51 | return part; 52 | } 53 | 54 | public void setPart(String part) { 55 | this.part = part; 56 | } 57 | 58 | public Integer getChapternum() { 59 | return chapternum; 60 | } 61 | 62 | public void setChapternum(Integer chapternum) { 63 | this.chapternum = chapternum; 64 | } 65 | 66 | public String getChapter() { 67 | return chapter; 68 | } 69 | 70 | public void setChapter(String chapter) { 71 | this.chapter = chapter; 72 | } 73 | 74 | public Integer getSectionnum() { 75 | return sectionnum; 76 | } 77 | 78 | public void setSectionnum(Integer sectionnum) { 79 | this.sectionnum = sectionnum; 80 | } 81 | 82 | public String getSection() { 83 | return section; 84 | } 85 | 86 | public void setSection(String section) { 87 | this.section = section; 88 | } 89 | } 90 | -------------------------------------------------------------------------------- /criminal/src/main/java/com/law/criminal/comm/QAOutput.java: -------------------------------------------------------------------------------- 1 | package com.law.criminal.comm; 2 | 3 | import com.law.criminal.model.elasticsearch.QAData; 4 | 5 | import java.util.Arrays; 6 | import java.util.List; 7 | 8 | public class QAOutput { 9 | private String result; 10 | private String [] demoQuestion; 11 | private List successData; 12 | 13 | public QAOutput() { 14 | } 15 | 16 | public QAOutput(String result, String[] demoQuestion, List successData) { 17 | this.result = result; 18 | this.demoQuestion = demoQuestion; 19 | this.successData = successData; 20 | } 21 | 22 | @Override 23 | public String toString() { 24 | return "QAOutput{" + 25 | "result='" + result + '\'' + 26 | ", demoQuestion=" + Arrays.toString(demoQuestion) + 27 | ", successData=" + successData + 28 | '}'; 29 | } 30 | 31 | public String getResult() { 32 | return result; 33 | } 34 | 35 | public void setResult(String result) { 36 | this.result = result; 37 | } 38 | 39 | public String[] getDemoQuestion() { 40 | return demoQuestion; 41 | } 42 | 43 | public void setDemoQuestion(String[] demoQuestion) { 44 | this.demoQuestion = demoQuestion; 45 | } 46 | 47 | public List getSuccessData() { 48 | return successData; 49 | } 50 | 51 | public void setSuccessData(List successData) { 52 | this.successData = successData; 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /criminal/src/main/java/com/law/criminal/comm/SecurityTableOutput.java: -------------------------------------------------------------------------------- 1 | package com.law.criminal.comm; 2 | 3 | public class SecurityTableOutput { 4 | private Integer chapternum; 5 | 6 | private String chapter; 7 | 8 | private Integer sectionnum; 9 | 10 | private String section; 11 | 12 | public SecurityTableOutput(Integer chapternum, String chapter, Integer sectionnum, String section) { 13 | this.chapternum = chapternum; 14 | this.chapter = chapter; 15 | this.sectionnum = sectionnum; 16 | this.section = section; 17 | } 18 | 19 | public SecurityTableOutput() { 20 | } 21 | 22 | @Override 23 | public String toString() { 24 | return "SecurityTableOutput{" + 25 | "chapternum=" + chapternum + 26 | ", chapter='" + chapter + '\'' + 27 | ", sectionnum=" + sectionnum + 28 | ", section='" + section + '\'' + 29 | '}'; 30 | } 31 | 32 | public Integer getChapternum() { 33 | return chapternum; 34 | } 35 | 36 | public void setChapternum(Integer chapternum) { 37 | this.chapternum = chapternum; 38 | } 39 | 40 | public String getChapter() { 41 | return chapter; 42 | } 43 | 44 | public void setChapter(String chapter) { 45 | this.chapter = chapter; 46 | } 47 | 48 | public Integer getSectionnum() { 49 | return sectionnum; 50 | } 51 | 52 | public void setSectionnum(Integer sectionnum) { 53 | this.sectionnum = sectionnum; 54 | } 55 | 56 | public String getSection() { 57 | return section; 58 | } 59 | 60 | public void setSection(String section) { 61 | this.section = section; 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /criminal/src/main/java/com/law/criminal/comm/TrafficTableOutput.java: -------------------------------------------------------------------------------- 1 | package com.law.criminal.comm; 2 | 3 | import java.io.Serializable; 4 | 5 | public class TrafficTableOutput implements Serializable { 6 | private Integer chapternum; 7 | 8 | private String chapter; 9 | 10 | private Integer sectionnum; 11 | 12 | private String section; 13 | 14 | public Integer getChapternum() { 15 | return chapternum; 16 | } 17 | 18 | public void setChapternum(Integer chapternum) { 19 | this.chapternum = chapternum; 20 | } 21 | 22 | public String getChapter() { 23 | return chapter; 24 | } 25 | 26 | public void setChapter(String chapter) { 27 | this.chapter = chapter; 28 | } 29 | 30 | public Integer getSectionnum() { 31 | return sectionnum; 32 | } 33 | 34 | public void setSectionnum(Integer sectionnum) { 35 | this.sectionnum = sectionnum; 36 | } 37 | 38 | public String getSection() { 39 | return section; 40 | } 41 | 42 | public void setSection(String section) { 43 | this.section = section; 44 | } 45 | 46 | public TrafficTableOutput(Integer chapternum, String chapter, Integer sectionnum, String section) { 47 | this.chapternum = chapternum; 48 | this.chapter = chapter; 49 | this.sectionnum = sectionnum; 50 | this.section = section; 51 | } 52 | 53 | public TrafficTableOutput() { 54 | } 55 | 56 | @Override 57 | public String toString() { 58 | return "TrafficTableOutput{" + 59 | "chapternum=" + chapternum + 60 | ", chapter='" + chapter + '\'' + 61 | ", sectionnum=" + sectionnum + 62 | ", section='" + section + '\'' + 63 | '}'; 64 | } 65 | } 66 | -------------------------------------------------------------------------------- /criminal/src/main/java/com/law/criminal/config/MyServerConfig.java: -------------------------------------------------------------------------------- 1 | package com.law.criminal.config; 2 | 3 | import org.apache.catalina.Context; 4 | import org.apache.catalina.connector.Connector; 5 | import org.apache.tomcat.util.descriptor.web.SecurityCollection; 6 | import org.apache.tomcat.util.descriptor.web.SecurityConstraint; 7 | import org.springframework.beans.factory.annotation.Value; 8 | import org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory; 9 | import org.springframework.boot.web.server.ConfigurableWebServerFactory; 10 | import org.springframework.boot.web.server.WebServerFactoryCustomizer; 11 | import org.springframework.context.annotation.Bean; 12 | import org.springframework.context.annotation.Configuration; 13 | 14 | @Configuration 15 | public class MyServerConfig { 16 | 17 | // @Value("${http.port}") 18 | // Integer httpPort; 19 | // 20 | // @Value("${server.port}") 21 | // Integer httpsPort; 22 | // 23 | // @Bean 24 | // public WebServerFactoryCustomizer webServerFactoryCustomizer(){ 25 | // return new WebServerFactoryCustomizer() { 26 | // @Override 27 | // public void customize(ConfigurableWebServerFactory factory) { 28 | // factory.setPort(httpsPort); 29 | // } 30 | // }; 31 | // } 32 | // 33 | // @Bean 34 | // public TomcatServletWebServerFactory servletContainer() { 35 | // TomcatServletWebServerFactory tomcat = new TomcatServletWebServerFactory() { 36 | // @Override 37 | // protected void postProcessContext(Context context) { 38 | // SecurityConstraint constraint = new SecurityConstraint(); 39 | // constraint.setUserConstraint("CONFIDENTIAL"); 40 | // SecurityCollection collection = new SecurityCollection(); 41 | // collection.addPattern("/*"); 42 | // constraint.addCollection(collection); 43 | // context.addConstraint(constraint); 44 | // } 45 | // }; 46 | // tomcat.addAdditionalTomcatConnectors(httpConnector()); 47 | // return tomcat; 48 | // } 49 | // 50 | // @Bean 51 | // public Connector httpConnector() { 52 | // Connector connector = new Connector("org.apache.coyote.http11.Http11NioProtocol"); 53 | // connector.setScheme("http"); 54 | // //Connector监听的http的端口号 55 | // connector.setPort(httpPort); 56 | // connector.setSecure(false); 57 | // //监听到http的端口号后转向到的https的端口号 58 | // connector.setRedirectPort(httpsPort); 59 | // return connector; 60 | // } 61 | 62 | } 63 | -------------------------------------------------------------------------------- /criminal/src/main/java/com/law/criminal/model/elasticsearch/ConsumerLaw.java: -------------------------------------------------------------------------------- 1 | package com.law.criminal.model.elasticsearch; 2 | 3 | import org.springframework.data.annotation.Id; 4 | import org.springframework.data.elasticsearch.annotations.Document; 5 | import org.springframework.data.elasticsearch.annotations.Field; 6 | import org.springframework.data.elasticsearch.annotations.FieldType; 7 | 8 | 9 | @Document(indexName = "consumer_law", type = "doc", shards = 5, replicas = 1) 10 | public class ConsumerLaw { 11 | @Id 12 | private String id; 13 | 14 | @Field(type = FieldType.Integer) 15 | private int chapterNum; 16 | 17 | @Field(type = FieldType.Text,analyzer = "ik_smart",searchAnalyzer = "ik_smart") 18 | private String chapter; 19 | 20 | @Field(type = FieldType.Integer) 21 | private int itemNum; 22 | 23 | @Field(type = FieldType.Text,analyzer = "ik_max_word",searchAnalyzer = "ik_max_word") 24 | private String item; 25 | 26 | public ConsumerLaw() { 27 | } 28 | 29 | public ConsumerLaw(String id, int chapterNum, String chapter, int itemNum, String item) { 30 | this.id = id; 31 | this.chapterNum = chapterNum; 32 | this.chapter = chapter; 33 | this.itemNum = itemNum; 34 | this.item = item; 35 | } 36 | 37 | public String getId() { 38 | return id; 39 | } 40 | 41 | public void setId(String id) { 42 | this.id = id; 43 | } 44 | 45 | public int getChapterNum() { 46 | return chapterNum; 47 | } 48 | 49 | public void setChapterNum(int chapterNum) { 50 | this.chapterNum = chapterNum; 51 | } 52 | 53 | public String getChapter() { 54 | return chapter; 55 | } 56 | 57 | public void setChapter(String chapter) { 58 | this.chapter = chapter; 59 | } 60 | 61 | public int getItemNum() { 62 | return itemNum; 63 | } 64 | 65 | public void setItemNum(int itemNum) { 66 | this.itemNum = itemNum; 67 | } 68 | 69 | public String getItem() { 70 | return item; 71 | } 72 | 73 | public void setItem(String item) { 74 | this.item = item; 75 | } 76 | } 77 | -------------------------------------------------------------------------------- /criminal/src/main/java/com/law/criminal/model/elasticsearch/FundLaw.java: -------------------------------------------------------------------------------- 1 | package com.law.criminal.model.elasticsearch; 2 | 3 | import org.springframework.data.annotation.Id; 4 | import org.springframework.data.elasticsearch.annotations.Document; 5 | import org.springframework.data.elasticsearch.annotations.Field; 6 | import org.springframework.data.elasticsearch.annotations.FieldType; 7 | 8 | @Document(indexName = "fund_law", type = "doc", shards = 5, replicas = 1) 9 | public class FundLaw { 10 | @Id 11 | private String id; 12 | 13 | @Field(type = FieldType.Integer) 14 | private int chapterNum; 15 | 16 | @Field(type = FieldType.Text,analyzer = "ik_smart",searchAnalyzer = "ik_smart") 17 | private String chapter; 18 | 19 | @Field(type = FieldType.Integer) 20 | private int itemNum; 21 | 22 | @Field(type = FieldType.Text,analyzer = "ik_max_word",searchAnalyzer = "ik_max_word") 23 | private String item; 24 | 25 | public FundLaw(String id, int chapterNum, String chapter, int itemNum, String item) { 26 | this.id = id; 27 | this.chapterNum = chapterNum; 28 | this.chapter = chapter; 29 | this.itemNum = itemNum; 30 | this.item = item; 31 | } 32 | 33 | public FundLaw() { 34 | } 35 | 36 | @Override 37 | public String toString() { 38 | return "FundLaw{" + 39 | "id='" + id + '\'' + 40 | ", chapterNum=" + chapterNum + 41 | ", chapter='" + chapter + '\'' + 42 | ", itemNum=" + itemNum + 43 | ", item='" + item + '\'' + 44 | '}'; 45 | } 46 | 47 | public String getId() { 48 | return id; 49 | } 50 | 51 | public void setId(String id) { 52 | this.id = id; 53 | } 54 | 55 | public int getChapterNum() { 56 | return chapterNum; 57 | } 58 | 59 | public void setChapterNum(int chapterNum) { 60 | this.chapterNum = chapterNum; 61 | } 62 | 63 | public String getChapter() { 64 | return chapter; 65 | } 66 | 67 | public void setChapter(String chapter) { 68 | this.chapter = chapter; 69 | } 70 | 71 | public int getItemNum() { 72 | return itemNum; 73 | } 74 | 75 | public void setItemNum(int itemNum) { 76 | this.itemNum = itemNum; 77 | } 78 | 79 | public String getItem() { 80 | return item; 81 | } 82 | 83 | public void setItem(String item) { 84 | this.item = item; 85 | } 86 | } 87 | -------------------------------------------------------------------------------- /criminal/src/main/java/com/law/criminal/model/elasticsearch/LaborLaw.java: -------------------------------------------------------------------------------- 1 | package com.law.criminal.model.elasticsearch; 2 | 3 | import org.springframework.data.annotation.Id; 4 | import org.springframework.data.elasticsearch.annotations.Document; 5 | import org.springframework.data.elasticsearch.annotations.Field; 6 | import org.springframework.data.elasticsearch.annotations.FieldType; 7 | 8 | @Document(indexName = "labor_law", type = "doc", shards = 5, replicas = 1) 9 | public class LaborLaw { 10 | @Id 11 | private String id; 12 | 13 | @Field(type = FieldType.Integer) 14 | private int chapterNum; 15 | 16 | @Field(type = FieldType.Text,analyzer = "ik_smart",searchAnalyzer = "ik_smart") 17 | private String chapter; 18 | 19 | @Field(type = FieldType.Integer) 20 | private int itemNum; 21 | 22 | @Field(type = FieldType.Text,analyzer = "ik_max_word",searchAnalyzer = "ik_max_word") 23 | private String item; 24 | 25 | @Override 26 | public String toString() { 27 | return "LaborLaw{" + 28 | "id='" + id + '\'' + 29 | ", chapterNum=" + chapterNum + 30 | ", chapter='" + chapter + '\'' + 31 | ", itemNum=" + itemNum + 32 | ", item='" + item + '\'' + 33 | '}'; 34 | } 35 | 36 | public LaborLaw() { 37 | } 38 | 39 | public LaborLaw(String id, int chapterNum, String chapter, int itemNum, String item) { 40 | this.id = id; 41 | this.chapterNum = chapterNum; 42 | this.chapter = chapter; 43 | this.itemNum = itemNum; 44 | this.item = item; 45 | } 46 | 47 | public String getId() { 48 | return id; 49 | } 50 | 51 | public void setId(String id) { 52 | this.id = id; 53 | } 54 | 55 | public int getChapterNum() { 56 | return chapterNum; 57 | } 58 | 59 | public void setChapterNum(int chapterNum) { 60 | this.chapterNum = chapterNum; 61 | } 62 | 63 | public String getChapter() { 64 | return chapter; 65 | } 66 | 67 | public void setChapter(String chapter) { 68 | this.chapter = chapter; 69 | } 70 | 71 | public int getItemNum() { 72 | return itemNum; 73 | } 74 | 75 | public void setItemNum(int itemNum) { 76 | this.itemNum = itemNum; 77 | } 78 | 79 | public String getItem() { 80 | return item; 81 | } 82 | 83 | public void setItem(String item) { 84 | this.item = item; 85 | } 86 | } 87 | -------------------------------------------------------------------------------- /criminal/src/main/java/com/law/criminal/model/elasticsearch/ProtectLaw.java: -------------------------------------------------------------------------------- 1 | package com.law.criminal.model.elasticsearch; 2 | 3 | import org.springframework.data.annotation.Id; 4 | import org.springframework.data.elasticsearch.annotations.Document; 5 | import org.springframework.data.elasticsearch.annotations.Field; 6 | import org.springframework.data.elasticsearch.annotations.FieldType; 7 | 8 | @Document(indexName = "protect_law", type = "doc", shards = 5, replicas = 1) 9 | public class ProtectLaw { 10 | @Id 11 | private String id; 12 | 13 | @Field(type = FieldType.Integer) 14 | private int itemNum; 15 | 16 | @Field(type = FieldType.Text,analyzer = "ik_smart",searchAnalyzer = "ik_smart") 17 | private String itemField; 18 | 19 | @Field(type = FieldType.Text,analyzer = "ik_max_word",searchAnalyzer = "ik_max_word") 20 | private String item; 21 | 22 | public ProtectLaw() { 23 | } 24 | 25 | public ProtectLaw(String id, int itemNum, String itemField, String item) { 26 | this.id = id; 27 | this.itemNum = itemNum; 28 | this.itemField = itemField; 29 | this.item = item; 30 | } 31 | 32 | public String getId() { 33 | return id; 34 | } 35 | 36 | public void setId(String id) { 37 | this.id = id; 38 | } 39 | 40 | public int getItemNum() { 41 | return itemNum; 42 | } 43 | 44 | public void setItemNum(int itemNum) { 45 | this.itemNum = itemNum; 46 | } 47 | 48 | public String getItemField() { 49 | return itemField; 50 | } 51 | 52 | public void setItemField(String itemField) { 53 | this.itemField = itemField; 54 | } 55 | 56 | public String getItem() { 57 | return item; 58 | } 59 | 60 | public void setItem(String item) { 61 | this.item = item; 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /criminal/src/main/java/com/law/criminal/model/elasticsearch/QAData.java: -------------------------------------------------------------------------------- 1 | package com.law.criminal.model.elasticsearch; 2 | 3 | import org.springframework.data.annotation.Id; 4 | import org.springframework.data.elasticsearch.annotations.Document; 5 | import org.springframework.data.elasticsearch.annotations.Field; 6 | import org.springframework.data.elasticsearch.annotations.FieldType; 7 | @Document(indexName = "qadata", type = "doc", shards = 5, replicas = 1) 8 | public class QAData { 9 | 10 | @Id 11 | private String id; 12 | @Field(type = FieldType.Text,analyzer = "ik_smart",searchAnalyzer = "ik_smart") 13 | private String question; 14 | @Field(type = FieldType.Text,index = false) 15 | private String answer; 16 | 17 | public QAData() { 18 | } 19 | 20 | public QAData(String id, String question, String answer) { 21 | this.id = id; 22 | this.question = question; 23 | this.answer = answer; 24 | } 25 | 26 | public String getId() { 27 | return id; 28 | } 29 | 30 | public void setId(String id) { 31 | this.id = id; 32 | } 33 | 34 | @Override 35 | public String toString() { 36 | return "QAData{" + 37 | "question='" + question + '\'' + 38 | ", answer='" + answer + '\'' + 39 | '}'; 40 | } 41 | 42 | public String getQuestion() { 43 | return question; 44 | } 45 | 46 | public void setQuestion(String question) { 47 | this.question = question; 48 | } 49 | 50 | public String getAnswer() { 51 | return answer; 52 | } 53 | 54 | public void setAnswer(String answer) { 55 | this.answer = answer; 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /criminal/src/main/java/com/law/criminal/model/elasticsearch/TrafficScoreLaw.java: -------------------------------------------------------------------------------- 1 | package com.law.criminal.model.elasticsearch; 2 | 3 | import org.springframework.data.annotation.Id; 4 | import org.springframework.data.elasticsearch.annotations.Document; 5 | import org.springframework.data.elasticsearch.annotations.Field; 6 | import org.springframework.data.elasticsearch.annotations.FieldType; 7 | 8 | @Document(indexName = "traffic_score_law", type = "doc", shards = 5, replicas = 1) 9 | public class TrafficScoreLaw { 10 | @Id 11 | private String id; 12 | 13 | @Field(type = FieldType.Integer) 14 | private int chapterNum; 15 | 16 | @Field(type = FieldType.Text,analyzer = "ik_smart",searchAnalyzer = "ik_smart") 17 | private String chapter; 18 | 19 | @Field(type = FieldType.Integer) 20 | private int itemNum; 21 | 22 | @Field(type = FieldType.Text,analyzer = "ik_max_word",searchAnalyzer = "ik_max_word") 23 | private String item; 24 | 25 | public String getId() { 26 | return id; 27 | } 28 | 29 | public void setId(String id) { 30 | this.id = id; 31 | } 32 | 33 | public int getChapterNum() { 34 | return chapterNum; 35 | } 36 | 37 | public void setChapterNum(int chapterNum) { 38 | this.chapterNum = chapterNum; 39 | } 40 | 41 | public String getChapter() { 42 | return chapter; 43 | } 44 | 45 | public void setChapter(String chapter) { 46 | this.chapter = chapter; 47 | } 48 | 49 | public int getItemNum() { 50 | return itemNum; 51 | } 52 | 53 | public void setItemNum(int itemNum) { 54 | this.itemNum = itemNum; 55 | } 56 | 57 | public String getItem() { 58 | return item; 59 | } 60 | 61 | public void setItem(String item) { 62 | this.item = item; 63 | } 64 | 65 | public TrafficScoreLaw(String id, int chapterNum, String chapter, int itemNum, String item) { 66 | this.id = id; 67 | this.chapterNum = chapterNum; 68 | this.chapter = chapter; 69 | this.itemNum = itemNum; 70 | this.item = item; 71 | } 72 | 73 | public TrafficScoreLaw() { 74 | } 75 | 76 | @Override 77 | public String toString() { 78 | return "TrafficScoreLaw{" + 79 | "id='" + id + '\'' + 80 | ", chapterNum=" + chapterNum + 81 | ", chapter='" + chapter + '\'' + 82 | ", itemNum=" + itemNum + 83 | ", item='" + item + '\'' + 84 | '}'; 85 | } 86 | } 87 | -------------------------------------------------------------------------------- /criminal/src/main/java/com/law/criminal/model/mysql/Civil.java: -------------------------------------------------------------------------------- 1 | package com.law.criminal.model.mysql; 2 | 3 | 4 | import javax.persistence.Column; 5 | import javax.persistence.EmbeddedId; 6 | import javax.persistence.Entity; 7 | import javax.persistence.Table; 8 | 9 | @Entity 10 | @Table(name="civil_table") 11 | public class Civil { 12 | 13 | @EmbeddedId 14 | private CivilKey id; 15 | 16 | @Column(name="part") 17 | private String part; 18 | 19 | @Column(name="chapter") 20 | private String chapter; 21 | 22 | @Column(name="section") 23 | private String section; 24 | 25 | @Column(name="item") 26 | private String item; 27 | 28 | public Civil(CivilKey id, String part, String chapter, String section, String item) { 29 | this.id = id; 30 | this.part = part; 31 | this.chapter = chapter; 32 | this.section = section; 33 | this.item = item; 34 | } 35 | 36 | public Civil() { 37 | } 38 | 39 | @Override 40 | public String toString() { 41 | return "Civil{" + 42 | "id=" + id + 43 | ", part='" + part + '\'' + 44 | ", chapter='" + chapter + '\'' + 45 | ", section='" + section + '\'' + 46 | ", item='" + item + '\'' + 47 | '}'; 48 | } 49 | 50 | public CivilKey getId() { 51 | return id; 52 | } 53 | 54 | public void setId(CivilKey id) { 55 | this.id = id; 56 | } 57 | 58 | public String getPart() { 59 | return part; 60 | } 61 | 62 | public void setPart(String part) { 63 | this.part = part; 64 | } 65 | 66 | public String getChapter() { 67 | return chapter; 68 | } 69 | 70 | public void setChapter(String chapter) { 71 | this.chapter = chapter; 72 | } 73 | 74 | public String getSection() { 75 | return section; 76 | } 77 | 78 | public void setSection(String section) { 79 | this.section = section; 80 | } 81 | 82 | public String getItem() { 83 | return item; 84 | } 85 | 86 | public void setItem(String item) { 87 | this.item = item; 88 | } 89 | } 90 | -------------------------------------------------------------------------------- /criminal/src/main/java/com/law/criminal/model/mysql/CivilKey.java: -------------------------------------------------------------------------------- 1 | package com.law.criminal.model.mysql; 2 | 3 | import javax.persistence.Column; 4 | import javax.persistence.Embeddable; 5 | import java.io.Serializable; 6 | @Embeddable 7 | public class CivilKey implements Serializable { 8 | 9 | @Column(name="partnum") 10 | private Integer partnum; 11 | 12 | @Column(name="chapternum") 13 | private Integer chapternum; 14 | 15 | @Column(name="sectionnum") 16 | private Integer sectionnum; 17 | 18 | @Column(name="itemnum") 19 | private Integer itemnum; 20 | 21 | public CivilKey(Integer partnum, Integer chapternum, Integer sectionnum, Integer itemnum) { 22 | this.partnum = partnum; 23 | this.chapternum = chapternum; 24 | this.sectionnum = sectionnum; 25 | this.itemnum = itemnum; 26 | } 27 | 28 | public CivilKey() { 29 | } 30 | 31 | @Override 32 | public String toString() { 33 | return "CivilKey{" + 34 | "partnum=" + partnum + 35 | "chapternum=" + chapternum + 36 | ", sectionnum=" + sectionnum + 37 | ", itemnum=" + itemnum + 38 | '}'; 39 | } 40 | 41 | public Integer getChapternum() { 42 | return chapternum; 43 | } 44 | 45 | public void setChapternum(Integer chapternum) { 46 | this.chapternum = chapternum; 47 | } 48 | 49 | public Integer getSectionnum() { 50 | return sectionnum; 51 | } 52 | 53 | public void setSectionnum(Integer sectionnum) { 54 | this.sectionnum = sectionnum; 55 | } 56 | 57 | public Integer getItemnum() { 58 | return itemnum; 59 | } 60 | 61 | public void setItemnum(Integer itemnum) { 62 | this.itemnum = itemnum; 63 | } 64 | public Integer getPartnum() { 65 | return partnum; 66 | } 67 | 68 | public void setPartnum(Integer partnum) { 69 | this.partnum = partnum; 70 | } 71 | } 72 | -------------------------------------------------------------------------------- /criminal/src/main/java/com/law/criminal/model/mysql/Contract.java: -------------------------------------------------------------------------------- 1 | package com.law.criminal.model.mysql; 2 | 3 | import javax.persistence.EmbeddedId; 4 | import javax.persistence.Entity; 5 | import javax.persistence.Table; 6 | 7 | @Entity 8 | @Table(name="contract_table") 9 | public class Contract { 10 | @EmbeddedId 11 | private ContractKey id; 12 | 13 | private String chapter; 14 | 15 | private Integer sectionnum; 16 | 17 | private String section; 18 | 19 | private String item; 20 | 21 | public Contract() { 22 | } 23 | 24 | public Contract(ContractKey id, String chapter, Integer sectionnum, String section, String item) { 25 | this.id = id; 26 | this.chapter = chapter; 27 | this.sectionnum = sectionnum; 28 | this.section = section; 29 | this.item = item; 30 | } 31 | 32 | public ContractKey getId() { 33 | return id; 34 | } 35 | 36 | public void setId(ContractKey id) { 37 | this.id = id; 38 | } 39 | 40 | public String getChapter() { 41 | return chapter; 42 | } 43 | 44 | public void setChapter(String chapter) { 45 | this.chapter = chapter; 46 | } 47 | 48 | public Integer getSectionnum() { 49 | return sectionnum; 50 | } 51 | 52 | public void setSectionnum(Integer sectionnum) { 53 | this.sectionnum = sectionnum; 54 | } 55 | 56 | public String getSection() { 57 | return section; 58 | } 59 | 60 | public void setSection(String section) { 61 | this.section = section; 62 | } 63 | 64 | public String getItem() { 65 | return item; 66 | } 67 | 68 | public void setItem(String item) { 69 | this.item = item; 70 | } 71 | 72 | @Override 73 | public String toString() { 74 | return "Contract{" + 75 | "id=" + id + 76 | ", chapter='" + chapter + '\'' + 77 | ", sectionnum=" + sectionnum + 78 | ", section='" + section + '\'' + 79 | ", item='" + item + '\'' + 80 | '}'; 81 | } 82 | } 83 | -------------------------------------------------------------------------------- /criminal/src/main/java/com/law/criminal/model/mysql/ContractKey.java: -------------------------------------------------------------------------------- 1 | package com.law.criminal.model.mysql; 2 | 3 | import javax.persistence.Column; 4 | import javax.persistence.Embeddable; 5 | import java.io.Serializable; 6 | @Embeddable 7 | public class ContractKey implements Serializable { 8 | @Column(name="chapternum") 9 | private Integer chapternum; 10 | 11 | @Column(name="itemnum") 12 | private Integer itemnum; 13 | 14 | public ContractKey(Integer chapternum, Integer itemnum) { 15 | this.chapternum = chapternum; 16 | this.itemnum = itemnum; 17 | } 18 | 19 | public ContractKey() { 20 | } 21 | 22 | @Override 23 | public String toString() { 24 | return "ContractKey{" + 25 | "chapternum=" + chapternum + 26 | ", itemnum=" + itemnum + 27 | '}'; 28 | } 29 | 30 | public Integer getChapternum() { 31 | return chapternum; 32 | } 33 | 34 | public void setChapternum(Integer chapternum) { 35 | this.chapternum = chapternum; 36 | } 37 | 38 | public Integer getItemnum() { 39 | return itemnum; 40 | } 41 | 42 | public void setItemnum(Integer itemnum) { 43 | this.itemnum = itemnum; 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /criminal/src/main/java/com/law/criminal/model/mysql/Insurance.java: -------------------------------------------------------------------------------- 1 | package com.law.criminal.model.mysql; 2 | 3 | import javax.persistence.EmbeddedId; 4 | import javax.persistence.Entity; 5 | import javax.persistence.Table; 6 | 7 | @Entity 8 | @Table(name="insurance_table") 9 | public class Insurance { 10 | @EmbeddedId 11 | private InsuranceKey id; 12 | 13 | private String chapter; 14 | 15 | private Integer sectionnum; 16 | 17 | private String section; 18 | 19 | private String item; 20 | 21 | public Insurance() { 22 | } 23 | 24 | public Insurance(InsuranceKey id, String chapter, Integer sectionnum, String section, String item) { 25 | this.id = id; 26 | this.chapter = chapter; 27 | this.sectionnum = sectionnum; 28 | this.section = section; 29 | this.item = item; 30 | } 31 | 32 | public InsuranceKey getId() { 33 | return id; 34 | } 35 | 36 | public void setId(InsuranceKey id) { 37 | this.id = id; 38 | } 39 | 40 | public String getChapter() { 41 | return chapter; 42 | } 43 | 44 | public void setChapter(String chapter) { 45 | this.chapter = chapter; 46 | } 47 | 48 | public Integer getSectionnum() { 49 | return sectionnum; 50 | } 51 | 52 | public void setSectionnum(Integer sectionnum) { 53 | this.sectionnum = sectionnum; 54 | } 55 | 56 | public String getSection() { 57 | return section; 58 | } 59 | 60 | public void setSection(String section) { 61 | this.section = section; 62 | } 63 | 64 | public String getItem() { 65 | return item; 66 | } 67 | 68 | public void setItem(String item) { 69 | this.item = item; 70 | } 71 | 72 | @Override 73 | public String toString() { 74 | return "Insurance{" + 75 | "id=" + id + 76 | ", chapter='" + chapter + '\'' + 77 | ", sectionnum=" + sectionnum + 78 | ", section='" + section + '\'' + 79 | ", item='" + item + '\'' + 80 | '}'; 81 | } 82 | } 83 | -------------------------------------------------------------------------------- /criminal/src/main/java/com/law/criminal/model/mysql/InsuranceKey.java: -------------------------------------------------------------------------------- 1 | package com.law.criminal.model.mysql; 2 | 3 | import javax.persistence.Column; 4 | import javax.persistence.Embeddable; 5 | import java.io.Serializable; 6 | 7 | @Embeddable 8 | public class InsuranceKey implements Serializable { 9 | @Column(name="chapternum") 10 | private Integer chapternum; 11 | 12 | @Column(name="itemnum") 13 | private Integer itemnum; 14 | 15 | public InsuranceKey(Integer chapternum, Integer itemnum) { 16 | this.chapternum = chapternum; 17 | this.itemnum = itemnum; 18 | } 19 | 20 | public InsuranceKey() { 21 | } 22 | 23 | @Override 24 | public String toString() { 25 | return "InsuranceKey{" + 26 | "chapternum=" + chapternum + 27 | ", itemnum=" + itemnum + 28 | '}'; 29 | } 30 | 31 | public Integer getChapternum() { 32 | return chapternum; 33 | } 34 | 35 | public void setChapternum(Integer chapternum) { 36 | this.chapternum = chapternum; 37 | } 38 | 39 | public Integer getItemnum() { 40 | return itemnum; 41 | } 42 | 43 | public void setItemnum(Integer itemnum) { 44 | this.itemnum = itemnum; 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /criminal/src/main/java/com/law/criminal/model/mysql/Law.java: -------------------------------------------------------------------------------- 1 | package com.law.criminal.model.mysql; 2 | 3 | import javax.persistence.Column; 4 | import javax.persistence.EmbeddedId; 5 | import javax.persistence.Entity; 6 | import javax.persistence.Table; 7 | 8 | @Entity 9 | @Table(name="law_table") 10 | public class Law{ 11 | @EmbeddedId 12 | private LawKey id; 13 | 14 | @Column(name="part") 15 | private String part; 16 | 17 | @Column(name="chapter") 18 | private String chapter; 19 | 20 | @Column(name="section") 21 | private String section; 22 | 23 | @Column(name="itemfield") 24 | private String itemfield; 25 | 26 | @Column(name="item") 27 | private String item; 28 | 29 | public Law() { 30 | } 31 | 32 | public Law(LawKey id, String part, String chapter, String section, String itemfield, String item) { 33 | this.id = id; 34 | this.part = part; 35 | this.chapter = chapter; 36 | this.section = section; 37 | this.itemfield = itemfield; 38 | this.item = item; 39 | } 40 | 41 | @Override 42 | public String toString() { 43 | return "Law{" + 44 | "id=" + id + 45 | ", part='" + part + '\'' + 46 | ", chapter='" + chapter + '\'' + 47 | ", section='" + section + '\'' + 48 | ", itemfield='" + itemfield + '\'' + 49 | ", item='" + item + '\'' + 50 | '}'; 51 | } 52 | 53 | public LawKey getId() { 54 | return id; 55 | } 56 | 57 | public void setId(LawKey id) { 58 | this.id = id; 59 | } 60 | 61 | public String getPart() { 62 | return part; 63 | } 64 | 65 | public void setPart(String part) { 66 | this.part = part; 67 | } 68 | 69 | public String getChapter() { 70 | return chapter; 71 | } 72 | 73 | public void setChapter(String chapter) { 74 | this.chapter = chapter; 75 | } 76 | 77 | public String getSection() { 78 | return section; 79 | } 80 | 81 | public void setSection(String section) { 82 | this.section = section; 83 | } 84 | 85 | public String getItemfield() { 86 | return itemfield; 87 | } 88 | 89 | public void setItemfield(String itemfield) { 90 | this.itemfield = itemfield; 91 | } 92 | 93 | public String getItem() { 94 | return item; 95 | } 96 | 97 | public void setItem(String item) { 98 | this.item = item; 99 | } 100 | } 101 | -------------------------------------------------------------------------------- /criminal/src/main/java/com/law/criminal/model/mysql/LawKey.java: -------------------------------------------------------------------------------- 1 | package com.law.criminal.model.mysql; 2 | 3 | import javax.persistence.Column; 4 | import javax.persistence.Embeddable; 5 | import java.io.Serializable; 6 | 7 | @Embeddable 8 | public class LawKey implements Serializable { 9 | @Column(name="partnum") 10 | private Integer partnum; 11 | 12 | @Column(name="chapternum") 13 | private Integer chapternum; 14 | 15 | @Column(name="sectionnum") 16 | private Integer sectionnum; 17 | 18 | @Column(name="itemnum") 19 | private Integer itemnum; 20 | 21 | public LawKey() { 22 | } 23 | 24 | public LawKey(Integer partnum, Integer chapternum, Integer sectionnum, Integer itemnum) { 25 | this.partnum = partnum; 26 | this.chapternum = chapternum; 27 | this.sectionnum = sectionnum; 28 | this.itemnum = itemnum; 29 | } 30 | 31 | @Override 32 | public String toString() { 33 | return "LawKey{" + 34 | "partnum=" + partnum + 35 | ", chapternum=" + chapternum + 36 | ", sectionnum=" + sectionnum + 37 | ", itemnum=" + itemnum + 38 | '}'; 39 | } 40 | 41 | public Integer getPartnum() { 42 | return partnum; 43 | } 44 | 45 | public void setPartnum(Integer partnum) { 46 | this.partnum = partnum; 47 | } 48 | 49 | public Integer getChapternum() { 50 | return chapternum; 51 | } 52 | 53 | public void setChapternum(Integer chapternum) { 54 | this.chapternum = chapternum; 55 | } 56 | 57 | public Integer getSectionnum() { 58 | return sectionnum; 59 | } 60 | 61 | public void setSectionnum(Integer sectionnum) { 62 | this.sectionnum = sectionnum; 63 | } 64 | 65 | public Integer getItemnum() { 66 | return itemnum; 67 | } 68 | 69 | public void setItemnum(Integer itemnum) { 70 | this.itemnum = itemnum; 71 | } 72 | } 73 | -------------------------------------------------------------------------------- /criminal/src/main/java/com/law/criminal/model/mysql/Security.java: -------------------------------------------------------------------------------- 1 | package com.law.criminal.model.mysql; 2 | 3 | import javax.persistence.EmbeddedId; 4 | import javax.persistence.Entity; 5 | import javax.persistence.Table; 6 | 7 | @Entity 8 | @Table(name="security_table") 9 | public class Security { 10 | @EmbeddedId 11 | private SecurityKey id; 12 | 13 | private String chapter; 14 | 15 | private Integer sectionnum; 16 | 17 | private String section; 18 | 19 | private String item; 20 | 21 | public Security(SecurityKey id, String chapter, Integer sectionnum, String section, String item) { 22 | this.id = id; 23 | this.chapter = chapter; 24 | this.sectionnum = sectionnum; 25 | this.section = section; 26 | this.item = item; 27 | } 28 | 29 | public Security() { 30 | } 31 | 32 | @Override 33 | public String toString() { 34 | return "Security{" + 35 | "id=" + id + 36 | ", chapter='" + chapter + '\'' + 37 | ", sectionnum=" + sectionnum + 38 | ", section='" + section + '\'' + 39 | ", item='" + item + '\'' + 40 | '}'; 41 | } 42 | 43 | public SecurityKey getId() { 44 | return id; 45 | } 46 | 47 | public void setId(SecurityKey id) { 48 | this.id = id; 49 | } 50 | 51 | public String getChapter() { 52 | return chapter; 53 | } 54 | 55 | public void setChapter(String chapter) { 56 | this.chapter = chapter; 57 | } 58 | 59 | public Integer getSectionnum() { 60 | return sectionnum; 61 | } 62 | 63 | public void setSectionnum(Integer sectionnum) { 64 | this.sectionnum = sectionnum; 65 | } 66 | 67 | public String getSection() { 68 | return section; 69 | } 70 | 71 | public void setSection(String section) { 72 | this.section = section; 73 | } 74 | 75 | public String getItem() { 76 | return item; 77 | } 78 | 79 | public void setItem(String item) { 80 | this.item = item; 81 | } 82 | } 83 | -------------------------------------------------------------------------------- /criminal/src/main/java/com/law/criminal/model/mysql/SecurityKey.java: -------------------------------------------------------------------------------- 1 | package com.law.criminal.model.mysql; 2 | 3 | import javax.persistence.Column; 4 | import javax.persistence.Embeddable; 5 | import java.io.Serializable; 6 | 7 | @Embeddable 8 | public class SecurityKey implements Serializable { 9 | @Column(name="chapternum") 10 | private Integer chapternum; 11 | @Column(name="itemnum") 12 | private Integer itemnum; 13 | 14 | public SecurityKey(Integer chapternum, Integer itemnum) { 15 | this.chapternum = chapternum; 16 | this.itemnum = itemnum; 17 | } 18 | 19 | public SecurityKey() { 20 | } 21 | 22 | @Override 23 | public String toString() { 24 | return "SecurityKey{" + 25 | "chapternum=" + chapternum + 26 | ", itemnum=" + itemnum + 27 | '}'; 28 | } 29 | 30 | public Integer getChapternum() { 31 | return chapternum; 32 | } 33 | 34 | public void setChapternum(Integer chapternum) { 35 | this.chapternum = chapternum; 36 | } 37 | 38 | public Integer getItemnum() { 39 | return itemnum; 40 | } 41 | 42 | public void setItemnum(Integer itemnum) { 43 | this.itemnum = itemnum; 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /criminal/src/main/java/com/law/criminal/model/mysql/Traffic.java: -------------------------------------------------------------------------------- 1 | package com.law.criminal.model.mysql; 2 | 3 | 4 | import javax.persistence.EmbeddedId; 5 | import javax.persistence.Entity; 6 | import javax.persistence.Table; 7 | 8 | @Entity 9 | @Table(name="traffic_table") 10 | public class Traffic { 11 | @EmbeddedId 12 | private TrafficKey id; 13 | 14 | private String chapter; 15 | 16 | private Integer sectionnum; 17 | 18 | private String section; 19 | 20 | private String item; 21 | 22 | public Traffic() { 23 | } 24 | 25 | public Traffic(TrafficKey id, String chapter, Integer sectionnum, String section, String item) { 26 | this.id = id; 27 | this.chapter = chapter; 28 | this.sectionnum = sectionnum; 29 | this.section = section; 30 | this.item = item; 31 | } 32 | 33 | public TrafficKey getId() { 34 | return id; 35 | } 36 | 37 | public void setId(TrafficKey id) { 38 | this.id = id; 39 | } 40 | 41 | public String getChapter() { 42 | return chapter; 43 | } 44 | 45 | public void setChapter(String chapter) { 46 | this.chapter = chapter; 47 | } 48 | 49 | public Integer getSectionnum() { 50 | return sectionnum; 51 | } 52 | 53 | public void setSectionnum(Integer sectionnum) { 54 | this.sectionnum = sectionnum; 55 | } 56 | 57 | public String getSection() { 58 | return section; 59 | } 60 | 61 | public void setSection(String section) { 62 | this.section = section; 63 | } 64 | 65 | public String getItem() { 66 | return item; 67 | } 68 | 69 | public void setItem(String item) { 70 | this.item = item; 71 | } 72 | 73 | @Override 74 | public String toString() { 75 | return "Traffic{" + 76 | "id=" + id + 77 | ", chapter='" + chapter + '\'' + 78 | ", sectionnum=" + sectionnum + 79 | ", section='" + section + '\'' + 80 | ", item='" + item + '\'' + 81 | '}'; 82 | } 83 | } 84 | -------------------------------------------------------------------------------- /criminal/src/main/java/com/law/criminal/model/mysql/TrafficKey.java: -------------------------------------------------------------------------------- 1 | package com.law.criminal.model.mysql; 2 | 3 | import javax.persistence.Column; 4 | import javax.persistence.Embeddable; 5 | import java.io.Serializable; 6 | 7 | @Embeddable 8 | public class TrafficKey implements Serializable { 9 | @Column(name="chapternum") 10 | private Integer chapternum; 11 | 12 | @Column(name="itemnum") 13 | private Integer itemnum; 14 | 15 | public TrafficKey(Integer chapternum, Integer itemnum) { 16 | this.chapternum = chapternum; 17 | this.itemnum = itemnum; 18 | } 19 | 20 | public TrafficKey() { 21 | } 22 | 23 | @Override 24 | public String toString() { 25 | return "TrafficKey{" + 26 | "chapternum=" + chapternum + 27 | ", itemnum=" + itemnum + 28 | '}'; 29 | } 30 | 31 | public Integer getChapternum() { 32 | return chapternum; 33 | } 34 | 35 | public void setChapternum(Integer chapternum) { 36 | this.chapternum = chapternum; 37 | } 38 | 39 | public Integer getItemnum() { 40 | return itemnum; 41 | } 42 | 43 | public void setItemnum(Integer itemnum) { 44 | this.itemnum = itemnum; 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /criminal/src/main/java/com/law/criminal/repository/elasticsearch/CivilLawSearchReposity.java: -------------------------------------------------------------------------------- 1 | package com.law.criminal.repository.elasticsearch; 2 | 3 | import com.law.criminal.model.elasticsearch.CivilLaw; 4 | import org.springframework.data.domain.Page; 5 | import org.springframework.data.domain.Pageable; 6 | import org.springframework.data.elasticsearch.annotations.Query; 7 | import org.springframework.data.elasticsearch.repository.ElasticsearchRepository; 8 | 9 | public interface CivilLawSearchReposity extends ElasticsearchRepository { 10 | Page findCivilLawByChapterNum(int number, Pageable pageable); 11 | 12 | Page findCivilLawByChapterNumAndSectionNum(int number,int sectionNum,Pageable pageable); 13 | 14 | CivilLaw findCivilLawByItemNum(int itemNum); 15 | 16 | Page findCivilLawByPartNum(int partNum, Pageable pageable); 17 | 18 | @Query("{ \"multi_match\": {\"query\": \"?0\",\"fields\": [\"part^2\",\"chapter^2\",\"section^2\",\"item\"]}}") 19 | Page getCivilLawByQueryString(String queryString, Pageable pageable); 20 | } 21 | -------------------------------------------------------------------------------- /criminal/src/main/java/com/law/criminal/repository/elasticsearch/ConsumerLawSearchRepository.java: -------------------------------------------------------------------------------- 1 | package com.law.criminal.repository.elasticsearch; 2 | 3 | import com.law.criminal.model.elasticsearch.ConsumerLaw; 4 | import org.springframework.data.domain.Page; 5 | import org.springframework.data.domain.Pageable; 6 | import org.springframework.data.elasticsearch.annotations.Query; 7 | import org.springframework.data.elasticsearch.repository.ElasticsearchRepository; 8 | 9 | public interface ConsumerLawSearchRepository extends ElasticsearchRepository { 10 | Page findConsumerLawByChapterNum(int number, Pageable pageable); 11 | 12 | ConsumerLaw findConsumerLawByItemNum(int itemNum); 13 | 14 | @Query("{ \"multi_match\": {\"query\": \"?0\",\"fields\": [\"chapter^2\",\"item\"]}}") 15 | Page getConsumerLawByQueryString(String queryString, Pageable pageable); 16 | } 17 | -------------------------------------------------------------------------------- /criminal/src/main/java/com/law/criminal/repository/elasticsearch/ContractLawSearchRepository.java: -------------------------------------------------------------------------------- 1 | package com.law.criminal.repository.elasticsearch; 2 | 3 | import com.law.criminal.model.elasticsearch.ContractLaw; 4 | import org.springframework.data.domain.Page; 5 | import org.springframework.data.domain.Pageable; 6 | import org.springframework.data.elasticsearch.annotations.Query; 7 | import org.springframework.data.elasticsearch.repository.ElasticsearchRepository; 8 | 9 | public interface ContractLawSearchRepository extends ElasticsearchRepository { 10 | ContractLaw findContractLawByItemNum(int itemNum); 11 | 12 | Page findContractLawByChapterNum(int number, Pageable pageable); 13 | 14 | Page findContractLawByChapterNumAndSectionNum(int number,int sectionNum,Pageable pageable); 15 | 16 | @Query("{ \"multi_match\": {\"query\": \"?0\",\"fields\": [\"chapter^2\",\"section^2\",\"item\"]}}") 17 | Page getContractLawByQueryString(String queryString, Pageable pageable); 18 | } 19 | -------------------------------------------------------------------------------- /criminal/src/main/java/com/law/criminal/repository/elasticsearch/CriminaLawSearchReposity.java: -------------------------------------------------------------------------------- 1 | package com.law.criminal.repository.elasticsearch; 2 | 3 | import com.law.criminal.model.elasticsearch.CriminalLaw; 4 | import org.springframework.data.domain.Page; 5 | import org.springframework.data.domain.Pageable; 6 | import org.springframework.data.elasticsearch.annotations.Query; 7 | import org.springframework.data.elasticsearch.repository.ElasticsearchRepository; 8 | 9 | 10 | public interface CriminaLawSearchReposity extends ElasticsearchRepository { 11 | 12 | Page findCriminalLawByChapterNum(int number,Pageable pageable); 13 | 14 | Page findCriminalLawByPartNumAndChapterNumAndSectionNum(int partNum, int number,int sectionNum,Pageable pageable); 15 | 16 | CriminalLaw findCriminalLawByItemNum(int itemNum); 17 | 18 | Page findCriminalLawByPartNum(int partNum, Pageable pageable); 19 | 20 | @Query("{ \"multi_match\": {\"query\": \"?0\",\"fields\": [\"part^2\",\"chapter^2\",\"section^2\",\"itemField^2\",\"item\"]}}") 21 | Page getCriminalLawByQueryString(String queryString, Pageable pageable); 22 | 23 | Page findCriminalLawByPartNumAndChapterNum(int partNum, int chapterNum, Pageable pageable); 24 | } 25 | -------------------------------------------------------------------------------- /criminal/src/main/java/com/law/criminal/repository/elasticsearch/FundLawSearchReposity.java: -------------------------------------------------------------------------------- 1 | package com.law.criminal.repository.elasticsearch; 2 | 3 | import com.law.criminal.model.elasticsearch.FundLaw; 4 | import org.springframework.data.domain.Page; 5 | import org.springframework.data.domain.Pageable; 6 | import org.springframework.data.elasticsearch.annotations.Query; 7 | import org.springframework.data.elasticsearch.repository.ElasticsearchRepository; 8 | 9 | public interface FundLawSearchReposity extends ElasticsearchRepository { 10 | Page findFundLawByChapterNum(int number, Pageable pageable); 11 | FundLaw findFundLawByItemNum(int itemNum); 12 | 13 | @Query("{ \"multi_match\": {\"query\": \"?0\",\"fields\": [\"chapter^2\",\"item\"]}}") 14 | Page getFundLawByQueryString(String queryString, Pageable pageable); 15 | } -------------------------------------------------------------------------------- /criminal/src/main/java/com/law/criminal/repository/elasticsearch/InsuranceLawSearchRepository.java: -------------------------------------------------------------------------------- 1 | package com.law.criminal.repository.elasticsearch; 2 | 3 | import com.law.criminal.model.elasticsearch.InsuranceLaw; 4 | import org.springframework.data.domain.Page; 5 | import org.springframework.data.domain.Pageable; 6 | import org.springframework.data.elasticsearch.annotations.Query; 7 | import org.springframework.data.elasticsearch.repository.ElasticsearchRepository; 8 | 9 | public interface InsuranceLawSearchRepository extends ElasticsearchRepository { 10 | InsuranceLaw findInsuranceLawByItemNum(int itemNum); 11 | 12 | Page findInsuranceLawByChapterNum(int number, Pageable pageable); 13 | 14 | Page findInsuranceLawByChapterNumAndSectionNum(int number,int sectionNum,Pageable pageable); 15 | 16 | @Query("{ \"multi_match\": {\"query\": \"?0\",\"fields\": [\"chapter^2\",\"section^2\",\"item\"]}}") 17 | Page getInsuranceLawByQueryString(String queryString, Pageable pageable); 18 | } 19 | -------------------------------------------------------------------------------- /criminal/src/main/java/com/law/criminal/repository/elasticsearch/LaborLawSearchReposity.java: -------------------------------------------------------------------------------- 1 | package com.law.criminal.repository.elasticsearch; 2 | 3 | import com.law.criminal.model.elasticsearch.LaborLaw; 4 | import org.springframework.data.domain.Page; 5 | import org.springframework.data.domain.Pageable; 6 | import org.springframework.data.elasticsearch.annotations.Query; 7 | import org.springframework.data.elasticsearch.repository.ElasticsearchRepository; 8 | 9 | public interface LaborLawSearchReposity extends ElasticsearchRepository { 10 | Page findLaborLawByChapterNum(int number, Pageable pageable); 11 | LaborLaw findLaborLawByItemNum(int itemNum); 12 | 13 | @Query("{ \"multi_match\": {\"query\": \"?0\",\"fields\": [\"chapter^2\",\"item\"]}}") 14 | Page getLaborLawByQueryString(String queryString, Pageable pageable); 15 | } 16 | -------------------------------------------------------------------------------- /criminal/src/main/java/com/law/criminal/repository/elasticsearch/MarriageSearchReposity.java: -------------------------------------------------------------------------------- 1 | package com.law.criminal.repository.elasticsearch; 2 | 3 | import com.law.criminal.model.elasticsearch.MarriageLaw; 4 | import org.springframework.data.domain.Page; 5 | import org.springframework.data.domain.Pageable; 6 | import org.springframework.data.elasticsearch.annotations.Query; 7 | import org.springframework.data.elasticsearch.repository.ElasticsearchRepository; 8 | 9 | public interface MarriageSearchReposity extends ElasticsearchRepository { 10 | Page findMarriageLawByChapterNum(int number, Pageable pageable); 11 | 12 | MarriageLaw findMarriageLawByItemNum(int itemNum); 13 | 14 | @Query("{ \"multi_match\": {\"query\": \"?0\",\"fields\": [\"chapter^2\",\"itemField^2\",\"item\"]}}") 15 | Page getMarriageLawByQueryString(String queryString, Pageable pageable); 16 | } 17 | -------------------------------------------------------------------------------- /criminal/src/main/java/com/law/criminal/repository/elasticsearch/ProtectLawSearchRepository.java: -------------------------------------------------------------------------------- 1 | package com.law.criminal.repository.elasticsearch; 2 | 3 | import com.law.criminal.model.elasticsearch.ProtectLaw; 4 | import org.springframework.data.domain.Page; 5 | import org.springframework.data.domain.Pageable; 6 | import org.springframework.data.elasticsearch.annotations.Query; 7 | import org.springframework.data.elasticsearch.repository.ElasticsearchRepository; 8 | 9 | public interface ProtectLawSearchRepository extends ElasticsearchRepository { 10 | ProtectLaw findProtectLawByItemNum(int itemNum); 11 | 12 | @Query("{ \"multi_match\": {\"query\": \"?0\",\"fields\": [\"itemField^2\",\"item\"]}}") 13 | Page getProtectLawByQueryString(String queryString, Pageable pageable); 14 | } 15 | -------------------------------------------------------------------------------- /criminal/src/main/java/com/law/criminal/repository/elasticsearch/QADataSearchReposity.java: -------------------------------------------------------------------------------- 1 | package com.law.criminal.repository.elasticsearch; 2 | 3 | import com.law.criminal.model.elasticsearch.QAData; 4 | import org.springframework.data.domain.Pageable; 5 | import org.springframework.data.elasticsearch.repository.ElasticsearchRepository; 6 | 7 | import java.util.List; 8 | 9 | public interface QADataSearchReposity extends ElasticsearchRepository { 10 | 11 | List findByQuestionMatches(String question, Pageable pageable); 12 | 13 | } 14 | -------------------------------------------------------------------------------- /criminal/src/main/java/com/law/criminal/repository/elasticsearch/SecuritylawSearchReposity.java: -------------------------------------------------------------------------------- 1 | package com.law.criminal.repository.elasticsearch; 2 | 3 | import com.law.criminal.model.elasticsearch.SecurityLaw; 4 | import org.springframework.data.domain.Page; 5 | import org.springframework.data.domain.Pageable; 6 | import org.springframework.data.elasticsearch.annotations.Query; 7 | import org.springframework.data.elasticsearch.repository.ElasticsearchRepository; 8 | 9 | public interface SecuritylawSearchReposity extends ElasticsearchRepository { 10 | Page findSecurityLawByChapterNum(int number, Pageable pageable); 11 | 12 | Page findSecurityLawByChapterNumAndSectionNum(int number,int sectionNum,Pageable pageable); 13 | 14 | SecurityLaw findCivilLawByItemNum(int itemNum); 15 | 16 | @Query("{ \"multi_match\": {\"query\": \"?0\",\"fields\": [\"chapter^2\",\"section^2\",\"item\"]}}") 17 | Page getSecurityLawByQueryString(String queryString, Pageable pageable); 18 | } 19 | -------------------------------------------------------------------------------- /criminal/src/main/java/com/law/criminal/repository/elasticsearch/TrafficLawSearchReposity.java: -------------------------------------------------------------------------------- 1 | package com.law.criminal.repository.elasticsearch; 2 | 3 | import com.law.criminal.model.elasticsearch.TrafficLaw; 4 | import org.springframework.data.domain.Page; 5 | import org.springframework.data.domain.Pageable; 6 | import org.springframework.data.elasticsearch.annotations.Query; 7 | import org.springframework.data.elasticsearch.repository.ElasticsearchRepository; 8 | 9 | public interface TrafficLawSearchReposity extends ElasticsearchRepository { 10 | Page findTrafficLawByChapterNum(int chapterNumber, Pageable pageable); 11 | Page findTrafficLawByChapterNumAndSectionNum(int chapterNum, int sectionNum, Pageable pageable); 12 | TrafficLaw findTrafficLawByItemNum(int itemNum); 13 | @Query("{ \"multi_match\": {\"query\": \"?0\",\"fields\": [\"chapter^2\",\"section^2\",\"item\"]}}") 14 | Page getTrafficLawByQueryString(String queryString, Pageable pageable); 15 | 16 | } 17 | -------------------------------------------------------------------------------- /criminal/src/main/java/com/law/criminal/repository/elasticsearch/TrafficScoreSearchRepository.java: -------------------------------------------------------------------------------- 1 | package com.law.criminal.repository.elasticsearch; 2 | 3 | 4 | import com.law.criminal.model.elasticsearch.TrafficScoreLaw; 5 | import org.springframework.data.domain.Page; 6 | import org.springframework.data.domain.Pageable; 7 | import org.springframework.data.elasticsearch.annotations.Query; 8 | import org.springframework.data.elasticsearch.repository.ElasticsearchRepository; 9 | 10 | public interface TrafficScoreSearchRepository extends ElasticsearchRepository { 11 | Page findTrafficScoreLawByChapterNum(int number, Pageable pageable); 12 | TrafficScoreLaw findTrafficScoreLawByChapterNumAndAndItemNum(int chapterNum, int itemNum); 13 | 14 | @Query("{ \"multi_match\": {\"query\": \"?0\",\"fields\": [\"chapter^2\",\"item\"]}}") 15 | Page getTrafficScoreLawByQueryString(String queryString, Pageable pageable); 16 | } 17 | -------------------------------------------------------------------------------- /criminal/src/main/java/com/law/criminal/repository/mysql/LawSearchRepository.java: -------------------------------------------------------------------------------- 1 | package com.law.criminal.repository.mysql; 2 | 3 | import com.law.criminal.comm.CivilTableOutput; 4 | import com.law.criminal.comm.LawTableOutput; 5 | import com.law.criminal.comm.SecurityTableOutput; 6 | import com.law.criminal.comm.TrafficTableOutput; 7 | import com.law.criminal.model.mysql.Law; 8 | import com.law.criminal.model.mysql.LawKey; 9 | import org.springframework.data.jpa.repository.JpaRepository; 10 | import org.springframework.data.jpa.repository.Query; 11 | 12 | import java.util.List; 13 | 14 | public interface LawSearchRepository extends JpaRepository { 15 | 16 | @Query(value = "select distinct new com.law.criminal.comm.LawTableOutput(l.id.partnum,l.part,l.id.chapternum,l.chapter,l.id.sectionnum,l.section) from Law l") 17 | public List getLawTable(); 18 | 19 | @Query(value = "select distinct new com.law.criminal.comm.TrafficTableOutput(l.id.chapternum,l.chapter,l.sectionnum,l.section) from Traffic l") 20 | public List getTrafficTable(); 21 | 22 | @Query(value = "select distinct new com.law.criminal.comm.CivilTableOutput(l.id.partnum, l.part, l.id.chapternum,l.chapter,l.id.sectionnum,l.section) from Civil l") 23 | public List getCivilTable(); 24 | 25 | @Query(value = "select distinct new com.law.criminal.comm.SecurityTableOutput(l.id.chapternum,l.chapter,l.sectionnum,l.section) from Security l") 26 | public List getSecurityTable(); 27 | 28 | @Query(value = "select distinct new com.law.criminal.comm.TrafficTableOutput(l.id.chapternum,l.chapter,l.sectionnum,l.section) from Insurance l") 29 | public List getInsuranceLawTable(); 30 | 31 | @Query(value = "select distinct new com.law.criminal.comm.TrafficTableOutput(l.id.chapternum,l.chapter,l.sectionnum,l.section) from Contract l") 32 | public List getContractLawTable(); 33 | 34 | } 35 | -------------------------------------------------------------------------------- /criminal/src/main/java/com/law/criminal/service/CivilLawSearchService.java: -------------------------------------------------------------------------------- 1 | package com.law.criminal.service; 2 | 3 | import com.law.criminal.comm.CivilTableOutput; 4 | import com.law.criminal.model.elasticsearch.CivilLaw; 5 | import org.springframework.data.domain.Page; 6 | import org.springframework.data.domain.Pageable; 7 | 8 | import java.util.List; 9 | 10 | public interface CivilLawSearchService { 11 | Page findCivilLawByChapterNum(int number, Integer pageSize, Integer pageNum); 12 | 13 | Page findCivilLawByChapterNumAndSectionNum(int number,int sectionNum,Integer pageSize, Integer pageNum); 14 | 15 | CivilLaw findCivilLawByItemNum(int itemNum); 16 | 17 | Page findCivilLawByPartNum(int partNum, Integer pageSize, Integer pageNum); 18 | 19 | Page getCivilLawByQueryString(String queryString, Integer pageSize, Integer pageNum); 20 | 21 | List getLawTable(); 22 | } 23 | -------------------------------------------------------------------------------- /criminal/src/main/java/com/law/criminal/service/CriminalLawSearchService.java: -------------------------------------------------------------------------------- 1 | package com.law.criminal.service; 2 | 3 | import com.law.criminal.comm.LawTableOutput; 4 | import com.law.criminal.model.elasticsearch.CriminalLaw; 5 | import org.springframework.data.domain.Page; 6 | import org.springframework.data.domain.Pageable; 7 | 8 | import java.util.List; 9 | 10 | public interface CriminalLawSearchService { 11 | Page findCriminalLawByChapterNum(int number, Integer pageSize, Integer pageNum); 12 | 13 | Page findCriminalLawByQueryString(String queryString, Integer pageSize, Integer pageNum); 14 | 15 | Page findCriminalLawByPartNumAndChapterNumAndSectionNum(int partNum, int number,int sectionNum, Integer pageSize, Integer pageNum); 16 | 17 | CriminalLaw findCriminalLawByItemNum(int itemNum); 18 | 19 | Page findCriminalLawByPartNum(int partNum, Integer pageSize, Integer pageNum); 20 | 21 | List getLawTable(); 22 | 23 | Page findCriminalLawByPartNumAndChapterNum(int partNum, int chapterNum , int pageSize, int pageNum); 24 | } 25 | -------------------------------------------------------------------------------- /criminal/src/main/java/com/law/criminal/service/FundLawSearchService.java: -------------------------------------------------------------------------------- 1 | package com.law.criminal.service; 2 | 3 | import com.law.criminal.comm.CommonTableOutput; 4 | import com.law.criminal.model.elasticsearch.FundLaw; 5 | import com.law.criminal.model.elasticsearch.FundLaw; 6 | import org.springframework.data.domain.Page; 7 | 8 | import java.util.List; 9 | 10 | public interface FundLawSearchService { 11 | Page findFundLawByChapterNum(int chapterNum, Integer pageSize, Integer pageNum); 12 | 13 | FundLaw findFundLawByItemNum(int itemNum); 14 | 15 | Page findFundLawByQueryString(String queryString, Integer pageSize, Integer pageNum); 16 | 17 | List getFundLawTable(); 18 | } 19 | -------------------------------------------------------------------------------- /criminal/src/main/java/com/law/criminal/service/LaborLawSearchService.java: -------------------------------------------------------------------------------- 1 | package com.law.criminal.service; 2 | 3 | import com.law.criminal.comm.CommonTableOutput; 4 | import com.law.criminal.model.elasticsearch.LaborLaw; 5 | import org.springframework.data.domain.Page; 6 | 7 | import java.util.List; 8 | 9 | public interface LaborLawSearchService { 10 | Page findLaborLawByChapterNum(int chapterNum, Integer pageSize, Integer pageNum); 11 | 12 | LaborLaw findLaborLawByItemNum(int itemNum); 13 | 14 | Page findLaborLawByQueryString(String queryString, Integer pageSize, Integer pageNum); 15 | 16 | List getLaborLawTable(); 17 | 18 | } 19 | -------------------------------------------------------------------------------- /criminal/src/main/java/com/law/criminal/service/MarriageLawSearchService.java: -------------------------------------------------------------------------------- 1 | package com.law.criminal.service; 2 | 3 | import com.law.criminal.comm.CommonTableOutput; 4 | import com.law.criminal.model.elasticsearch.MarriageLaw; 5 | import org.springframework.data.domain.Page; 6 | 7 | import java.util.List; 8 | 9 | public interface MarriageLawSearchService { 10 | Page findMarriageLawByChapterNum(int chapterNum, Integer pageSize, Integer pageNum); 11 | 12 | MarriageLaw findMarriageLawByItemNum(int itemNum); 13 | 14 | Page findMarriageLawByQueryString(String queryString, Integer pageSize, Integer pageNum); 15 | 16 | List getMarriageLawTable(); 17 | } 18 | -------------------------------------------------------------------------------- /criminal/src/main/java/com/law/criminal/service/QASearchService.java: -------------------------------------------------------------------------------- 1 | package com.law.criminal.service; 2 | 3 | import com.law.criminal.model.elasticsearch.QAData; 4 | 5 | import java.util.List; 6 | 7 | public interface QASearchService { 8 | List findQADataByQuestion(String question); 9 | } 10 | -------------------------------------------------------------------------------- /criminal/src/main/java/com/law/criminal/service/SecurityLawSearchService.java: -------------------------------------------------------------------------------- 1 | package com.law.criminal.service; 2 | 3 | import com.law.criminal.comm.SecurityTableOutput; 4 | import com.law.criminal.model.elasticsearch.SecurityLaw; 5 | import org.springframework.data.domain.Page; 6 | 7 | import java.util.List; 8 | 9 | public interface SecurityLawSearchService { 10 | Page findSecurityLawByChapterNum(int chapterNumber, Integer pageSize, Integer pageNum); 11 | Page findSecurityLawByChapterNumAndSectionNum(int chapterNum, int sectionNum, Integer pageSize, Integer pageNum); 12 | SecurityLaw findSecurityLawByItemNum(int itemNum); 13 | Page getSecurityLawByQueryString(String queryString, Integer pageSize, Integer pageNum); 14 | 15 | List getLawTable(); 16 | } 17 | -------------------------------------------------------------------------------- /criminal/src/main/java/com/law/criminal/service/TrafficLawSearchService.java: -------------------------------------------------------------------------------- 1 | package com.law.criminal.service; 2 | 3 | import com.law.criminal.comm.TrafficTableOutput; 4 | import com.law.criminal.model.elasticsearch.TrafficLaw; 5 | import org.springframework.data.domain.Page; 6 | 7 | import java.util.List; 8 | 9 | public interface TrafficLawSearchService { 10 | Page findTrafficLawByChapterNum(int chapterNumber, Integer pageSize, Integer pageNum); 11 | Page findTrafficLawByChapterNumAndSectionNum(int chapterNum, int sectionNum, Integer pageSize, Integer pageNum); 12 | TrafficLaw findTrafficLawByItemNum(int itemNum); 13 | Page getTrafficLawByQueryString(String queryString,Integer pageSize, Integer pageNum); 14 | 15 | List getLawTable(); 16 | } 17 | -------------------------------------------------------------------------------- /criminal/src/main/java/com/law/criminal/service/TrafficScoreLawSearchService.java: -------------------------------------------------------------------------------- 1 | package com.law.criminal.service; 2 | 3 | import com.law.criminal.comm.CommonTableOutput; 4 | import com.law.criminal.model.elasticsearch.TrafficScoreLaw; 5 | import org.springframework.data.domain.Page; 6 | 7 | import java.util.List; 8 | 9 | public interface TrafficScoreLawSearchService { 10 | Page findTrafficScoreLawByChapterNum(int chapterNum, Integer pageSize, Integer pageNum); 11 | 12 | TrafficScoreLaw findTrafficScoreLawByChapterNumAndItemNum(int chapterNum, int itemNum); 13 | 14 | Page findTrafficScoreLawByQueryString(String queryString, Integer pageSize, Integer pageNum); 15 | 16 | List getTrafficScoreLawTable(); 17 | 18 | } 19 | -------------------------------------------------------------------------------- /criminal/src/main/java/com/law/criminal/service/impl/QASearchServiceImpl.java: -------------------------------------------------------------------------------- 1 | package com.law.criminal.service.impl; 2 | 3 | import com.law.criminal.model.elasticsearch.QAData; 4 | import com.law.criminal.repository.elasticsearch.QADataSearchReposity; 5 | import com.law.criminal.service.QASearchService; 6 | import org.springframework.beans.factory.annotation.Autowired; 7 | import org.springframework.data.domain.PageRequest; 8 | import org.springframework.data.domain.Pageable; 9 | import org.springframework.stereotype.Service; 10 | 11 | import java.util.List; 12 | @Service("qaSearchService") 13 | public class QASearchServiceImpl implements QASearchService { 14 | @Autowired 15 | QADataSearchReposity qaDataSearchReposity; 16 | 17 | @Override 18 | public List findQADataByQuestion(String question) { 19 | Pageable pageable = PageRequest.of(0,10); 20 | return qaDataSearchReposity.findByQuestionMatches(question,pageable); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /criminal/src/main/java/com/law/criminal/web/FundSearchController.java: -------------------------------------------------------------------------------- 1 | package com.law.criminal.web; 2 | 3 | import com.law.criminal.comm.CommonTableOutput; 4 | import com.law.criminal.model.elasticsearch.FundLaw; 5 | import com.law.criminal.service.FundLawSearchService; 6 | import org.slf4j.Logger; 7 | import org.slf4j.LoggerFactory; 8 | import org.springframework.beans.factory.annotation.Autowired; 9 | import org.springframework.data.domain.Page; 10 | import org.springframework.web.bind.annotation.RequestMapping; 11 | import org.springframework.web.bind.annotation.RestController; 12 | 13 | import java.util.List; 14 | 15 | @RestController 16 | @RequestMapping("/fundsearch") 17 | public class FundSearchController { 18 | @Autowired 19 | FundLawSearchService fundLawSearchService; 20 | 21 | Logger logger= LoggerFactory.getLogger(this.getClass()); 22 | 23 | @RequestMapping("/getFundLawByChapterNum") 24 | public Page getFundLawByChapterNum(int chapterNum, int pageSize, int pageNum){ 25 | logger.info("FundSearchController,getFundLawByChapterNum:{},{},{}",chapterNum,pageSize,pageNum); 26 | return fundLawSearchService.findFundLawByChapterNum(chapterNum,pageSize,pageNum); 27 | } 28 | 29 | @RequestMapping("/getFundLawByQueryString") 30 | public Page getFundLawByQueryString(String queryString, Integer pageSize, Integer pageNum){ 31 | logger.info("FundSearchController,getFundLawByQueryString:{},{},{}",queryString,pageSize,pageNum); 32 | return fundLawSearchService.findFundLawByQueryString(queryString, pageSize, pageNum); 33 | } 34 | @RequestMapping("/getLaborLawTable") 35 | public List getFundLawTable(){ 36 | return fundLawSearchService.getFundLawTable(); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /criminal/src/main/java/com/law/criminal/web/LaborSearchController.java: -------------------------------------------------------------------------------- 1 | package com.law.criminal.web; 2 | 3 | 4 | import com.law.criminal.comm.CommonTableOutput; 5 | import com.law.criminal.model.elasticsearch.LaborLaw; 6 | import com.law.criminal.service.LaborLawSearchService; 7 | import org.slf4j.Logger; 8 | import org.slf4j.LoggerFactory; 9 | import org.springframework.beans.factory.annotation.Autowired; 10 | import org.springframework.data.domain.Page; 11 | import org.springframework.web.bind.annotation.RequestMapping; 12 | import org.springframework.web.bind.annotation.RestController; 13 | 14 | import java.util.List; 15 | 16 | @RestController 17 | @RequestMapping("/laborsearch") 18 | public class LaborSearchController { 19 | 20 | @Autowired 21 | LaborLawSearchService laborLawSearchService; 22 | 23 | Logger logger= LoggerFactory.getLogger(this.getClass()); 24 | 25 | @RequestMapping("/getLaborLawByChapterNum") 26 | public Page getLaborLawByChapterNum(int chapterNum, int pageSize, int pageNum){ 27 | logger.info("LaborSearchController,getLaborLawByChapterNum:{},{},{}",chapterNum,pageSize,pageNum); 28 | return laborLawSearchService.findLaborLawByChapterNum(chapterNum,pageSize,pageNum); 29 | } 30 | 31 | @RequestMapping("/getLaborLawByQueryString") 32 | public Page getLaborLawByQueryString(String queryString, Integer pageSize, Integer pageNum){ 33 | logger.info("LaborSearchController,getLaborLawByQueryString:{},{},{}",queryString,pageSize,pageNum); 34 | return laborLawSearchService.findLaborLawByQueryString(queryString, pageSize, pageNum); 35 | } 36 | @RequestMapping("/getLaborLawTable") 37 | public List getLaborLawTable(){ 38 | return laborLawSearchService.getLaborLawTable(); 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /criminal/src/main/java/com/law/criminal/web/MarriageSearchController.java: -------------------------------------------------------------------------------- 1 | package com.law.criminal.web; 2 | 3 | 4 | import com.law.criminal.comm.CommonTableOutput; 5 | import com.law.criminal.model.elasticsearch.MarriageLaw; 6 | import com.law.criminal.service.MarriageLawSearchService; 7 | import org.slf4j.Logger; 8 | import org.slf4j.LoggerFactory; 9 | import org.springframework.beans.factory.annotation.Autowired; 10 | import org.springframework.data.domain.Page; 11 | import org.springframework.web.bind.annotation.RequestMapping; 12 | import org.springframework.web.bind.annotation.RestController; 13 | 14 | import java.util.List; 15 | 16 | @RestController 17 | @RequestMapping("/marriagesearch") 18 | public class MarriageSearchController { 19 | @Autowired 20 | MarriageLawSearchService marriageLawSearchService; 21 | 22 | Logger logger= LoggerFactory.getLogger(this.getClass()); 23 | 24 | @RequestMapping("/getMarriageLawByChapterNum") 25 | public Page getMarriageLawByChapterNum(int chapterNum, int pageSize, int pageNum){ 26 | logger.info("MarriageSearchController,getMarriageLawByChapterNum:{},{},{}",chapterNum,pageSize,pageNum); 27 | return marriageLawSearchService.findMarriageLawByChapterNum(chapterNum,pageSize,pageNum); 28 | } 29 | 30 | @RequestMapping("/getMarriageLawByQueryString") 31 | public Page getMarriageLawByQueryString(String queryString, Integer pageSize, Integer pageNum){ 32 | logger.info("MarriageSearchController,getMarriageLawByQueryString:{},{},{}",queryString,pageSize,pageNum); 33 | return marriageLawSearchService.findMarriageLawByQueryString(queryString, pageSize, pageNum); 34 | } 35 | @RequestMapping("/getMarriageLawTable") 36 | public List getMarriageLawTable(){ 37 | return marriageLawSearchService.getMarriageLawTable(); 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /criminal/src/main/java/com/law/criminal/web/QAController.java: -------------------------------------------------------------------------------- 1 | package com.law.criminal.web; 2 | 3 | import com.law.criminal.comm.QAOutput; 4 | import com.law.criminal.model.elasticsearch.QAData; 5 | import com.law.criminal.service.QASearchService; 6 | import org.slf4j.Logger; 7 | import org.slf4j.LoggerFactory; 8 | import org.springframework.beans.factory.annotation.Autowired; 9 | import org.springframework.util.StringUtils; 10 | import org.springframework.web.bind.annotation.RequestMapping; 11 | import org.springframework.web.bind.annotation.RestController; 12 | 13 | import java.util.ArrayList; 14 | import java.util.List; 15 | 16 | @RestController 17 | @RequestMapping("/qa") 18 | public class QAController { 19 | Logger logger= LoggerFactory.getLogger(this.getClass()); 20 | 21 | @Autowired 22 | private QASearchService qaSearchService; 23 | 24 | private String[] demoQuestionList = new String[]{ 25 | "买房被骗怎么投诉", 26 | "准备离婚 选择协议离婚还是诉讼离婚", 27 | "违章停车贴条怎么处理", 28 | "劳动合同到期不续签怎么补偿", 29 | "可以先修车再理赔吗", 30 | "员工辞职公司要赔钱吗", 31 | "殴打他人的治安处罚", 32 | "支付宝盗窃后怎么处理", 33 | "在朋友圈骂人构成侵权吗", 34 | "投案自首减刑多少"}; 35 | 36 | @RequestMapping("/getAnswerOfQuestion") 37 | QAOutput getAnswerOfQuestion(String question) { 38 | 39 | if(StringUtils.isEmpty(question)){ 40 | return new QAOutput("failure",demoQuestionList,null); 41 | } 42 | List result = qaSearchService.findQADataByQuestion(question); 43 | QAOutput qaOutput = new QAOutput(); 44 | if(result.size() == 0){ 45 | qaOutput.setResult("failure"); 46 | qaOutput.setDemoQuestion(demoQuestionList); 47 | qaOutput.setSuccessData(null); 48 | return qaOutput; 49 | } 50 | qaOutput.setResult("success"); 51 | qaOutput.setDemoQuestion(null); 52 | qaOutput.setSuccessData(result); 53 | return qaOutput; 54 | } 55 | 56 | @RequestMapping("/randomGetDemoQuestion") 57 | String randomGetDemoQuestion(String question) { 58 | return demoQuestionList[(int)(Math.random()*10)]; 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /criminal/src/main/java/com/law/criminal/web/TrafficScoreSearchController.java: -------------------------------------------------------------------------------- 1 | package com.law.criminal.web; 2 | 3 | 4 | import com.law.criminal.comm.CommonTableOutput; 5 | import com.law.criminal.model.elasticsearch.TrafficScoreLaw; 6 | import com.law.criminal.model.mysql.Traffic; 7 | import com.law.criminal.service.TrafficScoreLawSearchService; 8 | import org.slf4j.Logger; 9 | import org.slf4j.LoggerFactory; 10 | import org.springframework.beans.factory.annotation.Autowired; 11 | import org.springframework.data.domain.Page; 12 | import org.springframework.web.bind.annotation.RequestMapping; 13 | import org.springframework.web.bind.annotation.RestController; 14 | 15 | import java.util.List; 16 | 17 | @RestController 18 | @RequestMapping("/trafficscoresearch") 19 | public class TrafficScoreSearchController { 20 | 21 | @Autowired 22 | TrafficScoreLawSearchService trafficScoreLawSearchService; 23 | 24 | Logger logger= LoggerFactory.getLogger(this.getClass()); 25 | 26 | @RequestMapping("/getTrafficScoreLawByChapterNum") 27 | public Page getTrafficScoreLawByChapterNum(int chapterNum, int pageSize, int pageNum){ 28 | logger.info("TrafficScoreSearchController,getTrafficScoreLawByChapterNum:{},{},{}",chapterNum,pageSize,pageNum); 29 | return trafficScoreLawSearchService.findTrafficScoreLawByChapterNum(chapterNum,pageSize,pageNum); 30 | } 31 | 32 | @RequestMapping("/getTrafficScoreLawByQueryString") 33 | public Page getTrafficScoreLawByQueryString(String queryString, Integer pageSize, Integer pageNum){ 34 | logger.info("TrafficScoreSearchController,getTrafficScoreLawByQueryString:{},{},{}",queryString,pageSize,pageNum); 35 | return trafficScoreLawSearchService.findTrafficScoreLawByQueryString(queryString, pageSize, pageNum); 36 | } 37 | 38 | @RequestMapping("/getTrafficScoreLawTable") 39 | public List getTrafficScoreLawTable(){ 40 | return trafficScoreLawSearchService.getTrafficScoreLawTable(); 41 | } 42 | 43 | 44 | } 45 | -------------------------------------------------------------------------------- /criminal/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | http.port=9800 2 | server.port=9801 3 | # server.ssl.key-store=2171334_www.wangyuhui.site.pfx 4 | # server.ssl.key-store-password=KwlOV0f1 5 | 6 | spring.data.elasticsearch.cluster-name=wangyuhui 7 | spring.data.elasticsearch.cluster-nodes=Elasticsearch-IP:9300,Elasticsearch-IP:9301 8 | 9 | spring.datasource.url=jdbc:mysql://mysql-IP:3306/wechatDB?serverTimezone=UTC&useUnicode=true&characterEncoding=utf-8&useSSL=true 10 | spring.datasource.username=root 11 | spring.datasource.password=root 12 | spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver 13 | 14 | spring.jpa.properties.hibernate.hbm2ddl.auto=update 15 | spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.MySQL5InnoDBDialect 16 | #SQL 输出 17 | #spring.jpa.show-sql=true 18 | #format 一下 SQL 进行输出 19 | #spring.jpa.properties.hibernate.format_sql=true 20 | -------------------------------------------------------------------------------- /criminal/src/test/java/com/law/criminal/CriminalApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.law.criminal; 2 | 3 | import org.junit.Test; 4 | import org.junit.runner.RunWith; 5 | import org.springframework.boot.test.context.SpringBootTest; 6 | import org.springframework.test.context.junit4.SpringRunner; 7 | 8 | @RunWith(SpringRunner.class) 9 | @SpringBootTest 10 | public class CriminalApplicationTests { 11 | 12 | @Test 13 | public void contextLoads() { 14 | } 15 | 16 | } 17 | -------------------------------------------------------------------------------- /criminal/src/test/java/com/law/criminal/HelloTest.java: -------------------------------------------------------------------------------- 1 | package com.law.criminal; 2 | 3 | import com.law.criminal.web.CriminalSearchController; 4 | import org.hamcrest.Matchers; 5 | import org.junit.Before; 6 | import org.junit.Test; 7 | import org.springframework.boot.test.context.SpringBootTest; 8 | import org.springframework.http.MediaType; 9 | import org.springframework.test.web.servlet.MockMvc; 10 | import org.springframework.test.web.servlet.MockMvcBuilder; 11 | import org.springframework.test.web.servlet.request.MockMvcRequestBuilders; 12 | import org.springframework.test.web.servlet.result.MockMvcResultMatchers; 13 | import org.springframework.test.web.servlet.setup.MockMvcBuilders; 14 | import static org.springframework.test.web.servlet.result.MockMvcResultHandlers.*; 15 | 16 | @SpringBootTest 17 | public class HelloTest { 18 | private MockMvc mockMvc; 19 | 20 | @Test 21 | public void hello(){ 22 | System.out.println("hello world"); 23 | } 24 | 25 | @Before 26 | public void setUp() throws Exception{ 27 | mockMvc = MockMvcBuilders.standaloneSetup(new CriminalSearchController()).build(); 28 | } 29 | 30 | @Test 31 | public void getHello() throws Exception { 32 | // mockMvc.perform(MockMvcRequestBuilders.post("/param_hello?name=小明") 33 | // //.accept(MediaType.APPLICATION_JSON_UTF8)).andDo(print()); 34 | // .accept(MediaType.APPLICATION_JSON_UTF8)).andExpect(MockMvcResultMatchers.content().string(Matchers.containsString("小明"))); 35 | } 36 | 37 | } 38 | -------------------------------------------------------------------------------- /image/weixin1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cswangyuhui/AILaw/7747b53c4e5aeb3af4f6f3d39eeb6d61bd907d9a/image/weixin1.png -------------------------------------------------------------------------------- /image/weixin2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cswangyuhui/AILaw/7747b53c4e5aeb3af4f6f3d39eeb6d61bd907d9a/image/weixin2.png -------------------------------------------------------------------------------- /kg/HELP.md: -------------------------------------------------------------------------------- 1 | # Getting Started 2 | 3 | ### Reference Documentation 4 | For further reference, please consider the following sections: 5 | 6 | * [Official Apache Maven documentation](https://maven.apache.org/guides/index.html) 7 | 8 | ### Guides 9 | The following guides illustrate how to use some features concretely: 10 | 11 | * [Building a RESTful Web Service](https://spring.io/guides/gs/rest-service/) 12 | * [Serving Web Content with Spring MVC](https://spring.io/guides/gs/serving-web-content/) 13 | * [Building REST services with Spring](https://spring.io/guides/tutorials/bookmarks/) 14 | 15 | -------------------------------------------------------------------------------- /kg/src/main/java/com/law/kg/KgApplication.java: -------------------------------------------------------------------------------- 1 | package com.law.kg; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | @SpringBootApplication 7 | public class KgApplication { 8 | 9 | public static void main(String[] args) { 10 | SpringApplication.run(KgApplication.class, args); 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /kg/src/main/java/com/law/kg/comm/KnowledgeType.java: -------------------------------------------------------------------------------- 1 | package com.law.kg.comm; 2 | 3 | import org.springframework.stereotype.Component; 4 | 5 | public enum KnowledgeType { 6 | marriage_family("婚姻家庭", 0,3), criminal_defense("刑事辩护", 1,3), traffic_accident("交通事故", 2,3), work_injuries("劳动工伤", 3,3), 7 | house_disputes("房产纠纷", 4,3), credit_right("债权债务", 5,3), contract_affairs("合同事务", 6,3), medical_disputes("医疗纠纷", 7,3), 8 | company_operation("公司经营", 8,3), intellectual_property("知识产权", 9,3), compensation_damages("损害赔偿", 10,3), construction_disputes("建设工程纠纷", 11,3), 9 | financial_insurance("金融保险", 12,3), litigation_arbitration("诉讼仲裁", 13,3), land_affairs("征地拆迁", 14,3), foreign_expertise("涉外专长", 15,3), 10 | internet_disputes("互联网纠纷", 16,3), tax_disputes("税务类纠纷", 17,3); 11 | // 成员变量 12 | private String name; 13 | private int index; 14 | private int count; 15 | // 构造方法 16 | private KnowledgeType(String name, int index, int count) { 17 | this.name = name; 18 | this.index = index; 19 | this.count = count; 20 | } 21 | 22 | // 普通方法 23 | public static String getName(int index) { 24 | for (KnowledgeType c : KnowledgeType.values()) { 25 | if (c.getIndex() == index) { 26 | return c.name; 27 | } 28 | } 29 | 30 | return null; 31 | } 32 | // get set 方法 33 | public String getName() { 34 | return name; 35 | } 36 | public void setName(String name) { 37 | this.name = name; 38 | } 39 | public int getIndex() { 40 | return index; 41 | } 42 | public void setIndex(int index) { 43 | this.index = index; 44 | } 45 | public int getCount() { 46 | return count; 47 | } 48 | 49 | public void setCount(int count) { 50 | this.count = count; 51 | } 52 | 53 | public static Integer count() { 54 | return KnowledgeType.values().length; 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /kg/src/main/java/com/law/kg/comm/QAOutput.java: -------------------------------------------------------------------------------- 1 | package com.law.kg.comm; 2 | 3 | 4 | import com.law.kg.model.elasticsearch.QAData; 5 | 6 | import java.util.Arrays; 7 | import java.util.List; 8 | 9 | public class QAOutput { 10 | private String result; 11 | private String [] demoQuestion; 12 | private List successData; 13 | 14 | public QAOutput() { 15 | } 16 | 17 | public QAOutput(String result, String[] demoQuestion, List successData) { 18 | this.result = result; 19 | this.demoQuestion = demoQuestion; 20 | this.successData = successData; 21 | } 22 | 23 | @Override 24 | public String toString() { 25 | return "QAOutput{" + 26 | "result='" + result + '\'' + 27 | ", demoQuestion=" + Arrays.toString(demoQuestion) + 28 | ", successData=" + successData + 29 | '}'; 30 | } 31 | 32 | public String getResult() { 33 | return result; 34 | } 35 | 36 | public void setResult(String result) { 37 | this.result = result; 38 | } 39 | 40 | public String[] getDemoQuestion() { 41 | return demoQuestion; 42 | } 43 | 44 | public void setDemoQuestion(String[] demoQuestion) { 45 | this.demoQuestion = demoQuestion; 46 | } 47 | 48 | public List getSuccessData() { 49 | return successData; 50 | } 51 | 52 | public void setSuccessData(List successData) { 53 | this.successData = successData; 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /kg/src/main/java/com/law/kg/comm/RandomUtil.java: -------------------------------------------------------------------------------- 1 | package com.law.kg.comm; 2 | 3 | import java.util.Random; 4 | import java.util.SortedSet; 5 | import java.util.TreeSet; 6 | 7 | public class RandomUtil { 8 | public static Random ran = new Random(); 9 | public static SortedSet set = new TreeSet(); 10 | public static void randomSet(int n, int m,int bound,int begin) { 11 | if (begin == 1) { 12 | set.clear(); 13 | begin = 0; 14 | } 15 | for (int i = 0; i < n; i++) { 16 | set.add(ran.nextInt(bound) + 1); 17 | } 18 | if (set.size() < m) { 19 | randomSet(m - set.size(), m,bound,begin); 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /kg/src/main/java/com/law/kg/model/Knowledge.java: -------------------------------------------------------------------------------- 1 | package com.law.kg.model; 2 | 3 | import lombok.Data; 4 | import org.springframework.data.mongodb.core.index.Indexed; 5 | import org.springframework.data.mongodb.core.mapping.Document; 6 | import org.springframework.data.mongodb.core.mapping.Field; 7 | 8 | @Document(collection = "kg_yl") 9 | @Data 10 | public class Knowledge { 11 | @Indexed(unique=true) 12 | private String question; 13 | private String answer; 14 | private Integer number; 15 | private String big; 16 | private String small; 17 | } 18 | -------------------------------------------------------------------------------- /kg/src/main/java/com/law/kg/model/elasticsearch/QAData.java: -------------------------------------------------------------------------------- 1 | package com.law.kg.model.elasticsearch; 2 | 3 | import org.springframework.data.annotation.Id; 4 | import org.springframework.data.elasticsearch.annotations.Document; 5 | import org.springframework.data.elasticsearch.annotations.Field; 6 | import org.springframework.data.elasticsearch.annotations.FieldType; 7 | @Document(indexName = "qadata", type = "doc", shards = 5, replicas = 1) 8 | public class QAData { 9 | 10 | @Id 11 | private String id; 12 | @Field(type = FieldType.Text,analyzer = "ik_smart",searchAnalyzer = "ik_smart") 13 | private String question; 14 | @Field(type = FieldType.Text,index = false) 15 | private String answer; 16 | 17 | public QAData() { 18 | } 19 | 20 | public QAData(String id, String question, String answer) { 21 | this.id = id; 22 | this.question = question; 23 | this.answer = answer; 24 | } 25 | 26 | public String getId() { 27 | return id; 28 | } 29 | 30 | public void setId(String id) { 31 | this.id = id; 32 | } 33 | 34 | @Override 35 | public String toString() { 36 | return "QAData{" + 37 | "question='" + question + '\'' + 38 | ", answer='" + answer + '\'' + 39 | '}'; 40 | } 41 | 42 | public String getQuestion() { 43 | return question; 44 | } 45 | 46 | public void setQuestion(String question) { 47 | this.question = question; 48 | } 49 | 50 | public String getAnswer() { 51 | return answer; 52 | } 53 | 54 | public void setAnswer(String answer) { 55 | this.answer = answer; 56 | } 57 | } 58 | 59 | -------------------------------------------------------------------------------- /kg/src/main/java/com/law/kg/repository/KnowledgeRepository.java: -------------------------------------------------------------------------------- 1 | package com.law.kg.repository; 2 | 3 | import com.law.kg.model.Knowledge; 4 | import org.springframework.data.mongodb.repository.MongoRepository; 5 | 6 | public interface KnowledgeRepository extends MongoRepository { 7 | 8 | long countKnowledgeByBig(String big); 9 | Knowledge getByBigAndNumber(String big,Integer number); 10 | } 11 | -------------------------------------------------------------------------------- /kg/src/main/java/com/law/kg/repository/QADataSearchReposity.java: -------------------------------------------------------------------------------- 1 | package com.law.kg.repository; 2 | 3 | 4 | import com.law.kg.model.elasticsearch.QAData; 5 | import org.springframework.data.domain.Pageable; 6 | import org.springframework.data.elasticsearch.repository.ElasticsearchRepository; 7 | 8 | import java.util.List; 9 | 10 | public interface QADataSearchReposity extends ElasticsearchRepository { 11 | 12 | List findByQuestionMatches(String question, Pageable pageable); 13 | 14 | } 15 | -------------------------------------------------------------------------------- /kg/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | http.port=7800 2 | server.port=7801 3 | 4 | spring.data.mongodb.uri=mongodb://MONGODB数据库IP:27017/law 5 | 6 | spring.data.elasticsearch.cluster-name=wangyuhui 7 | spring.data.elasticsearch.cluster-nodes=ELASTICSEARCH—IP:9300,ELASTICSEARCH—IP:9301 -------------------------------------------------------------------------------- /kg/src/test/java/com/law/kg/KgApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.law.kg; 2 | 3 | import org.junit.Test; 4 | import org.junit.runner.RunWith; 5 | import org.springframework.boot.test.context.SpringBootTest; 6 | import org.springframework.test.context.junit4.SpringRunner; 7 | 8 | @RunWith(SpringRunner.class) 9 | @SpringBootTest 10 | public class KgApplicationTests { 11 | 12 | @Test 13 | public void contextLoads() { 14 | } 15 | 16 | } 17 | -------------------------------------------------------------------------------- /lawPredict/src/main/java/com/wangyuhui/App.java: -------------------------------------------------------------------------------- 1 | package com.wangyuhui; 2 | 3 | /** 4 | * Hello world! 5 | * 6 | */ 7 | public class App 8 | { 9 | public static void main( String[] args ) 10 | { 11 | System.out.println( "Hello World!" ); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /lawPredict/src/main/java/predict/IClassificationPredictService.java: -------------------------------------------------------------------------------- 1 | package predict; 2 | 3 | import predict.pojo.PredictResult; 4 | 5 | import java.util.List; 6 | 7 | public interface IClassificationPredictService { 8 | public List predict(String content, int k); 9 | } 10 | -------------------------------------------------------------------------------- /lawPredict/src/main/java/predict/IRegressionPredictService.java: -------------------------------------------------------------------------------- 1 | package predict; 2 | 3 | public interface IRegressionPredictService { 4 | Object predict(String text); 5 | } 6 | -------------------------------------------------------------------------------- /lawPredict/src/main/java/predict/impl/PredictXqService.java: -------------------------------------------------------------------------------- 1 | package predict.impl; 2 | 3 | import org.apache.commons.io.IOUtils; 4 | import org.tensorflow.Graph; 5 | import org.tensorflow.Session; 6 | import org.tensorflow.Tensor; 7 | import predict.IRegressionPredictService; 8 | import predict.PredictService; 9 | 10 | import java.io.InputStream; 11 | 12 | public class PredictXqService extends PredictService implements IRegressionPredictService { 13 | 14 | private int MAX_LENGTH = 600; 15 | private int HIDDEN_SIZE = 256; 16 | 17 | private Graph graph; 18 | 19 | 20 | public void init() { 21 | try { 22 | super.init(); 23 | graph = new Graph(); 24 | InputStream stream = ClassLoader.getSystemResourceAsStream("predict/xq/output.pb"); 25 | byte[] data = IOUtils.toByteArray(stream); 26 | graph.importGraphDef(data); 27 | } catch (Exception e) { 28 | throw new RuntimeException("读取刑期预测模型出错"); 29 | } 30 | } 31 | 32 | @Override 33 | public Object predict(String text) { 34 | Float f = predictFloat(text); 35 | int i = f.intValue(); 36 | if ((f - i) >= 0.5) { 37 | i++; 38 | } 39 | if (i >= 325 && i <= 375) { 40 | return "无期徒刑"; 41 | } else if (i > 375) { 42 | return "死刑"; 43 | } else { 44 | int year = i / 12; 45 | int month = i % 12; 46 | if (year != 0) { 47 | return String.format("有期徒刑%s年%s个月", year, month); 48 | } else { 49 | return String.format("有期徒刑%s个月", month); 50 | } 51 | } 52 | } 53 | 54 | private float predictFloat(String text) { 55 | try (Session sess = new Session(graph)) { 56 | Session.Runner runner = sess.runner(); 57 | int[][] wordIds = new int[1][]; 58 | wordIds[0] = preprocess(text, MAX_LENGTH); 59 | runner.feed("input_x", Tensor.create(wordIds)); 60 | runner.feed("pad", Tensor.create(new float[1][MAX_LENGTH][HIDDEN_SIZE])); 61 | runner.feed("keep_prob", Tensor.create(1.0f)); 62 | runner.fetch("score/fc3/BiasAdd"); 63 | Tensor pred = runner.run().get(0); 64 | float[][] labelIds = (float[][]) pred.copyTo(new float[1][1]); 65 | return labelIds[0][0]; 66 | } 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /lawPredict/src/main/java/predict/pojo/PredictResult.java: -------------------------------------------------------------------------------- 1 | package predict.pojo; 2 | 3 | public class PredictResult { 4 | private String label; 5 | 6 | private double score; 7 | 8 | public PredictResult(String label,double score){ 9 | this.label=label; 10 | this.score=score; 11 | } 12 | 13 | public String getLabel() { 14 | return label; 15 | } 16 | 17 | public void setLabel(String label) { 18 | this.label = label; 19 | } 20 | 21 | public double getScore() { 22 | return score; 23 | } 24 | 25 | public void setScore(double score) { 26 | this.score = score; 27 | } 28 | } 29 | --------------------------------------------------------------------------------