diff --git a/epdc-resident-mp-yushan/app.json b/epdc-resident-mp-yushan/app.json
index 19629c0..a2ddb61 100644
--- a/epdc-resident-mp-yushan/app.json
+++ b/epdc-resident-mp-yushan/app.json
@@ -1,5 +1,6 @@
{
"pages": [
+ "pages/welcome/welcome",
"pages/index/index",
"pages/toRegister/toRegister",
"pages/heart/heart",
@@ -110,6 +111,13 @@
"pages/changeToIssue/changeToIssue",
"pages/myTopic/myTopic"
]
+ },
+ {
+ "root": "subpages/safety",
+ "name": "safety",
+ "pages": [
+ "pages/index/index"
+ ]
}
],
"preloadRule": {
diff --git a/epdc-resident-mp-yushan/images/property/star.png b/epdc-resident-mp-yushan/images/property/star.png
new file mode 100644
index 0000000..af14687
Binary files /dev/null and b/epdc-resident-mp-yushan/images/property/star.png differ
diff --git a/epdc-resident-mp-yushan/pages/index/components/sudoku/sudoku.js b/epdc-resident-mp-yushan/pages/index/components/sudoku/sudoku.js
index 343002d..4ff2d46 100644
--- a/epdc-resident-mp-yushan/pages/index/components/sudoku/sudoku.js
+++ b/epdc-resident-mp-yushan/pages/index/components/sudoku/sudoku.js
@@ -32,13 +32,11 @@ Component({
},
// 跳转到平安榆山
navigateToSafe () {
- this.showNotAvailable();
- // this.triggerEvent('navigateToSafe')
+ this.triggerEvent('navigateToSafe')
},
// 跳转到政策法规
navigateToPolicy () {
- this.showNotAvailable();
- // this.triggerEvent('navigateToPolicy')
+ this.triggerEvent('navigateToPolicy')
},
// 跳转到综合服务
navigateToSyntheticalService () {
diff --git a/epdc-resident-mp-yushan/pages/index/components/sudoku/sudoku.wxml b/epdc-resident-mp-yushan/pages/index/components/sudoku/sudoku.wxml
index e3226c2..0b75dc0 100644
--- a/epdc-resident-mp-yushan/pages/index/components/sudoku/sudoku.wxml
+++ b/epdc-resident-mp-yushan/pages/index/components/sudoku/sudoku.wxml
@@ -17,16 +17,16 @@
互帮互助
-
+
平安榆山
+
+
+ 政策法规
+
社区教育
-
-
-
- 政策法规
diff --git a/epdc-resident-mp-yushan/pages/index/index.js b/epdc-resident-mp-yushan/pages/index/index.js
index 2835833..ccbcec2 100644
--- a/epdc-resident-mp-yushan/pages/index/index.js
+++ b/epdc-resident-mp-yushan/pages/index/index.js
@@ -260,6 +260,11 @@ Page({
url: '/pages/property/property'
})
},
+ navigateToSafe(){
+ wx.navigateTo({
+ url: '/subpages/safety/pages/index/index',
+ })
+ },
// 初始化加载
initLoad () {
this.setData({
@@ -307,5 +312,11 @@ Page({
url: `/subpages/home/pages/newsDetail/newsDetail?id=${id}`
})
}
+ },
+ //政策法规
+ navigateToPolicy(){
+ wx.navigateTo({
+ url: '/subpages/home/pages/notice/notice'
+ })
}
})
\ No newline at end of file
diff --git a/epdc-resident-mp-yushan/pages/property/property.js b/epdc-resident-mp-yushan/pages/property/property.js
index 05a3baf..753b18f 100644
--- a/epdc-resident-mp-yushan/pages/property/property.js
+++ b/epdc-resident-mp-yushan/pages/property/property.js
@@ -18,7 +18,9 @@ Page({
isLoading: true,
timeStamp:'',
refreshFlag:true,
- completeInfoDialogVisible:false
+ completeInfoDialogVisible:false,
+ tempScore:'',
+ showSubmit:false
},
onHide:function(){
if(this.data.refreshFlag){
@@ -54,6 +56,10 @@ Page({
* 生命周期函数--监听页面显示
*/
onShow: function () {
+ this.setData({
+ showSubmit:false,
+ tempScore:""
+ })
if(this.data.refreshFlag){
this.setData({
isLoading:true
@@ -87,6 +93,10 @@ Page({
});
},
initPropertyInfo(id){
+ this.setData({
+ showSubmit:false,
+ tempScore:''
+ })
wx.showLoading({
title:'载入中'
});
@@ -94,6 +104,7 @@ Page({
this.setData({
projectInfo:res.data,
isLoading:false,
+ tempScore:res.data.userScore
})
wx.hideLoading({
complete: (res) => {},
@@ -108,6 +119,35 @@ Page({
})
});
},
+ handleScoreInput(e){
+ this.setData({
+ tempScore:e.detail.value
+ })
+ },
+ changeScore(){
+ this.setData({
+ showSubmit:true
+ })
+ },
+ submitScore(){
+ //0~100
+ let score = Number(this.data.tempScore.trim());
+ if(isNaN(score) || this.data.tempScore.indexOf('.') != -1 || score < 0 || score >100 || this.data.tempScore.trim() == ''){
+ wx.showToast({
+ title: '请输入0~100的整数',
+ icon:'none'
+ })
+ return false;
+ }
+ let param = {
+ 'propertyId':this.data.projectInfo.propertyId,
+ 'projectId':this.data.tabList[this.data.currentTabIndex].id,
+ 'score':score
+ }
+ api.submitScore(param).then(res=>{
+ this.initPropertyInfo(this.data.tabList[this.data.currentTabIndex].id)
+ })
+ },
// getRecommend(){
// var list=[];
// var item={
diff --git a/epdc-resident-mp-yushan/pages/property/property.wxml b/epdc-resident-mp-yushan/pages/property/property.wxml
index 41a0344..e07dfa5 100644
--- a/epdc-resident-mp-yushan/pages/property/property.wxml
+++ b/epdc-resident-mp-yushan/pages/property/property.wxml
@@ -13,7 +13,10 @@
- 物业项目信息
+ 物业项目信息
+ 综合评分
+ {{projectInfo.avaScore==''||projectInfo.avaScore==undefined?'暂无评分':(projectInfo.avaScore+'分')}}
+
@@ -39,6 +42,17 @@
物业地址:
{{projectInfo.propertyAddress}}
+
+
+
+ 我的物业评分:
+
+
+
+
+ {{projectInfo.userScore==''?'打分':'修改'}}
+ 确定
+
diff --git a/epdc-resident-mp-yushan/pages/property/property.wxss b/epdc-resident-mp-yushan/pages/property/property.wxss
index 49fdef9..f7a7893 100644
--- a/epdc-resident-mp-yushan/pages/property/property.wxss
+++ b/epdc-resident-mp-yushan/pages/property/property.wxss
@@ -277,4 +277,21 @@ page {
width: 150rpx;
right: 0;
bottom: 0;
+}
+.scoreBtn{
+ height: 55rpx;
+ width: 110rpx;
+ border-radius: 60rpx;
+ border: 1rpx solid #333;
+ background: #fff;
+ color: #333;
+ font-size: 30rpx;
+ text-align: center;
+ line-height: 50rpx;
+ margin-top: 20rpx;
+ margin-left: 112rpx;
+}
+.scoreInput{
+ height: 100%;
+ width: 200rpx;
}
\ No newline at end of file
diff --git a/epdc-resident-mp-yushan/pages/welcome/welcome.js b/epdc-resident-mp-yushan/pages/welcome/welcome.js
new file mode 100644
index 0000000..a634d93
--- /dev/null
+++ b/epdc-resident-mp-yushan/pages/welcome/welcome.js
@@ -0,0 +1,84 @@
+const app = getApp()
+
+Page({
+ data: {
+ deviceHeight: 0,
+ countdownNum: 0,
+ bgImage: '',
+ timer: '',
+ scene: '',
+ imgList: [],
+ datanum: 0, //第几个数组
+ datalength: 0, //数组长度
+ allTime: 3,//总时间
+ },
+ onLoad(options) {
+ if (options.scene) {
+ this.data.scene = options.scene
+ }
+ this.setData({
+ deviceHeight: app.globalData.height
+ })
+ this.getStartupPage()
+ },
+ // 倒计时进入
+ countDown() {
+ this.data.timer = setInterval(() => {
+ if (this.data.countdownNum > 1) {
+ this.data.allTime--
+ this.data.countdownNum--
+ this.setData({
+ countdownNum: this.data.countdownNum,
+ allTime: this.data.allTime
+ })
+ } else {
+ this.data.allTime--
+ this.setData({
+ datanum: this.data.datanum + 1,
+ allTime: this.data.allTime
+ })
+ clearInterval(this.data.timer)
+ if (this.data.scene) {
+ wx.reLaunch({
+ url: `/pages/index/index?scene=${this.data.scene}`
+ })
+ } else {
+ wx.reLaunch({
+ url: '/pages/index/index'
+ })
+ }
+ }
+ }, 1000)
+ },
+ // 立即进入
+ immeEnter() {
+ clearInterval(this.data.timer)
+ if (this.data.scene) {
+ wx.reLaunch({
+ url: `/pages/index/index?scene=${this.data.scene}`
+ })
+ } else {
+ wx.reLaunch({
+ url: '/pages/index/index'
+ })
+ }
+ },
+ // 获取启动页信息
+ getStartupPage() {
+ this.setData({
+ datalength: 1,
+ imgList: [{imgUrl:'https://epdc-yushan.elinkservice.cn/files-pro/20200522/02c3341b36d746338918c17676b2a864.png',duration:'3'}]
+ })
+ this.getloop()
+ },
+ //数组循环
+ getloop() {
+ if (this.data.imgList[this.data.datanum].duration > 0) {
+ this.setData({
+ bgImage: this.data.imgList[this.data.datanum].imgUrl,
+ countdownNum: this.data.imgList[this.data.datanum].duration
+ })
+ this.countDown()
+ }
+ }
+})
\ No newline at end of file
diff --git a/epdc-resident-mp-yushan/pages/welcome/welcome.json b/epdc-resident-mp-yushan/pages/welcome/welcome.json
new file mode 100644
index 0000000..37f535b
--- /dev/null
+++ b/epdc-resident-mp-yushan/pages/welcome/welcome.json
@@ -0,0 +1,4 @@
+{
+ "navigationBarTitleText": "欢迎页",
+ "navigationStyle": "custom"
+}
\ No newline at end of file
diff --git a/epdc-resident-mp-yushan/pages/welcome/welcome.wxml b/epdc-resident-mp-yushan/pages/welcome/welcome.wxml
new file mode 100644
index 0000000..601219c
--- /dev/null
+++ b/epdc-resident-mp-yushan/pages/welcome/welcome.wxml
@@ -0,0 +1,16 @@
+
+
+
+
+
+
+
+ {{allTime}}s | 跳过
+
+
+
+
+
+
\ No newline at end of file
diff --git a/epdc-resident-mp-yushan/pages/welcome/welcome.wxss b/epdc-resident-mp-yushan/pages/welcome/welcome.wxss
new file mode 100644
index 0000000..c4320e7
--- /dev/null
+++ b/epdc-resident-mp-yushan/pages/welcome/welcome.wxss
@@ -0,0 +1,81 @@
+page {
+ width: 100%;
+ height: 100vh;
+}
+.welcome {
+ width: 100%;
+ height: 100vh;
+ background: #fff;
+ position: relative;
+ overflow: hidden;
+}
+.welcome .bg-img {
+ width: 100%;
+ height: 100vh;
+ position: absolute;
+ left: 0;
+ top: 0;
+}
+.welcome .bg-img image {
+ width: 100%;
+ height:100%;
+}
+
+.welcome .content {
+ width: 100%;
+ position: relative;
+ z-index: 10;
+ display: flex;
+ flex-direction: column;
+ justify-content: space-between;
+ align-items: center;
+ box-sizing: border-box;
+ padding-bottom: 100rpx;
+}
+.welcome .content .countdown {
+ width: 100%;
+ height: 50rpx;
+ display: flex;
+ align-items: flex-start;
+ justify-content: flex-end;
+ box-sizing: border-box;
+ padding: 0 20rpx;
+}
+.welcome .content .countdown .time {
+ font-size: 28rpx;
+ color: #333;
+ width: 150rpx;
+ height: 50rpx;
+ line-height: 50rpx;
+ text-align: center;
+ background: rgba(255,255,255,0.5);
+ border-radius: 30rpx;
+}
+.welcome .content .countdown .hover-skip {
+ background: rgba(255,255,255,0.2);
+}
+
+.imme-enter {
+ width: 100%;
+ height: 84rpx;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+}
+.imme-enter button {
+ background-image: linear-gradient(to right , #ff2d29, #ff4e4e);
+ height:84rpx;
+ line-height: 84rpx;
+ text-align:center;
+ color: #fff;
+ font-size: 36rpx;
+ border-radius: 16rpx;
+ padding: 0;
+ margin: 0;
+ outline: 0;
+ font-weight: normal;
+ width: 560rpx;
+}
+.imme-enter .hover-btn {
+ background: red;
+}
\ No newline at end of file
diff --git a/epdc-resident-mp-yushan/project.config.json b/epdc-resident-mp-yushan/project.config.json
index 3d1c52c..3ad1d0f 100644
--- a/epdc-resident-mp-yushan/project.config.json
+++ b/epdc-resident-mp-yushan/project.config.json
@@ -92,9 +92,51 @@
"scene": null
},
{
- "id": 7,
- "name": "pages/index/index",
- "pathName": "pages/index/index",
+ "id": 5,
+ "name": "1",
+ "pathName": "subpages/home/pages/notice/notice",
+ "query": "",
+ "scene": null
+ },
+ {
+ "id": -1,
+ "name": "pages/toRegister/toRegister",
+ "pathName": "pages/toRegister/toRegister",
+ "query": "",
+ "scene": null
+ },
+ {
+ "id": -1,
+ "name": "subpages/safety/pages/index/index",
+ "pathName": "subpages/safety/pages/index/index",
+ "query": "",
+ "scene": null
+ },
+ {
+ "id": -1,
+ "name": "pages/property/property",
+ "pathName": "pages/property/property",
+ "query": "",
+ "scene": null
+ },
+ {
+ "id": -1,
+ "name": "pages/register/register",
+ "pathName": "pages/register/register",
+ "query": "",
+ "scene": null
+ },
+ {
+ "id": -1,
+ "name": "subpages/discussion/pages/addIssue/addIssue",
+ "pathName": "subpages/discussion/pages/addIssue/addIssue",
+ "query": "",
+ "scene": null
+ },
+ {
+ "id": -1,
+ "name": "subpages/discussion/pages/categoryList/categoryList",
+ "pathName": "subpages/discussion/pages/categoryList/categoryList",
"query": "",
"scene": null
}
diff --git a/epdc-resident-mp-yushan/subpages/discussion/components/tipDialog/tipDialog.wxss b/epdc-resident-mp-yushan/subpages/discussion/components/tipDialog/tipDialog.wxss
index 81065f4..be6e1f6 100644
--- a/epdc-resident-mp-yushan/subpages/discussion/components/tipDialog/tipDialog.wxss
+++ b/epdc-resident-mp-yushan/subpages/discussion/components/tipDialog/tipDialog.wxss
@@ -7,7 +7,8 @@
background: rgba(0,0,0, 0.6);
display: flex;
justify-content: center;
- align-items: center
+ align-items: center;
+ z-index:100;
}
.tip-dialog .content {
diff --git a/epdc-resident-mp-yushan/subpages/home/pages/notice/notice.json b/epdc-resident-mp-yushan/subpages/home/pages/notice/notice.json
index 8b3c515..d77d900 100644
--- a/epdc-resident-mp-yushan/subpages/home/pages/notice/notice.json
+++ b/epdc-resident-mp-yushan/subpages/home/pages/notice/notice.json
@@ -1,5 +1,5 @@
{
"usingComponents": {
},
- "navigationBarTitleText": "通知"
+ "navigationBarTitleText": "政策法规"
}
\ No newline at end of file
diff --git a/epdc-resident-mp-yushan/subpages/home/pages/notice/notice.wxml b/epdc-resident-mp-yushan/subpages/home/pages/notice/notice.wxml
index f79c8e5..2e7df46 100644
--- a/epdc-resident-mp-yushan/subpages/home/pages/notice/notice.wxml
+++ b/epdc-resident-mp-yushan/subpages/home/pages/notice/notice.wxml
@@ -13,7 +13,7 @@
- {{item.deptName}}-通知
+ {{item.deptName}}-政策法规
{{item.noticeTime}}
diff --git a/epdc-resident-mp-yushan/subpages/home/pages/noticeDetail/noticeDetail.json b/epdc-resident-mp-yushan/subpages/home/pages/noticeDetail/noticeDetail.json
index 780adef..43492be 100644
--- a/epdc-resident-mp-yushan/subpages/home/pages/noticeDetail/noticeDetail.json
+++ b/epdc-resident-mp-yushan/subpages/home/pages/noticeDetail/noticeDetail.json
@@ -1,5 +1,5 @@
{
"usingComponents": {
},
- "navigationBarTitleText": "通知详情"
+ "navigationBarTitleText": "政策法规详情"
}
\ No newline at end of file
diff --git a/epdc-resident-mp-yushan/subpages/property/pages/myTopic/myTopic.wxml b/epdc-resident-mp-yushan/subpages/property/pages/myTopic/myTopic.wxml
index 8a9a09c..81500f4 100644
--- a/epdc-resident-mp-yushan/subpages/property/pages/myTopic/myTopic.wxml
+++ b/epdc-resident-mp-yushan/subpages/property/pages/myTopic/myTopic.wxml
@@ -14,6 +14,6 @@
您还未发布话题
- 快到物业群里发布吧~
+ 快到群里发布吧~
\ No newline at end of file
diff --git a/epdc-resident-mp-yushan/subpages/safety/components/announcementList/announcementList.js b/epdc-resident-mp-yushan/subpages/safety/components/announcementList/announcementList.js
new file mode 100644
index 0000000..4c1a455
--- /dev/null
+++ b/epdc-resident-mp-yushan/subpages/safety/components/announcementList/announcementList.js
@@ -0,0 +1,13 @@
+Component({
+ properties: {
+ newsList: {
+ type: Array,
+ value: []
+ }
+ },
+ methods: {
+ navigatetoNewsDetail (e) {
+ this.triggerEvent('navigatetoNewsDetail', {newsId: e.currentTarget.dataset.newsid})
+ }
+ }
+})
\ No newline at end of file
diff --git a/epdc-resident-mp-yushan/subpages/safety/components/announcementList/announcementList.json b/epdc-resident-mp-yushan/subpages/safety/components/announcementList/announcementList.json
new file mode 100644
index 0000000..32640e0
--- /dev/null
+++ b/epdc-resident-mp-yushan/subpages/safety/components/announcementList/announcementList.json
@@ -0,0 +1,3 @@
+{
+ "component": true
+}
\ No newline at end of file
diff --git a/epdc-resident-mp-yushan/subpages/safety/components/announcementList/announcementList.wxml b/epdc-resident-mp-yushan/subpages/safety/components/announcementList/announcementList.wxml
new file mode 100644
index 0000000..6b5d165
--- /dev/null
+++ b/epdc-resident-mp-yushan/subpages/safety/components/announcementList/announcementList.wxml
@@ -0,0 +1,24 @@
+
+
+
+
+
+
+
+ {{item.newsTitle}}
+
+ {{item.deptName}}-{{item.newsCategoryName}}
+ {{filters.formatTimestamp(item.newsStartTime)}}
+
+
+
+
\ No newline at end of file
diff --git a/epdc-resident-mp-yushan/subpages/safety/components/announcementList/announcementList.wxss b/epdc-resident-mp-yushan/subpages/safety/components/announcementList/announcementList.wxss
new file mode 100644
index 0000000..db50b9b
--- /dev/null
+++ b/epdc-resident-mp-yushan/subpages/safety/components/announcementList/announcementList.wxss
@@ -0,0 +1,70 @@
+.news-list {
+ width: 100%;
+ background: #fff;
+ box-sizing: border-box;
+ padding: 0 35rpx;
+ margin-top: 20rpx;
+}
+.news-list .list-item {
+ width: 100%;
+ height: 205rpx;
+ box-sizing: border-box;
+ padding: 30rpx 0;
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+}
+.news-list .list-item .right {
+ width: calc(100% - 50rpx - 220rpx);
+ height: 146rpx;
+}
+.news-list .list-item .right .title {
+ color: #3f3f3f;
+ font-size: 30rpx;
+ line-height: 45rpx;
+ display: -webkit-box;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ word-wrap: break-word;
+ white-space: normal !important;
+ -webkit-line-clamp: 2;
+ -webkit-box-orient: vertical;
+}
+.news-list .list-item .right .bottom {
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ padding-top: 20rpx;
+}
+.news-list .list-item .right .bottom .category {
+ color: #aaa;
+ font-size: 22rpx;
+ line-height: 48rpx;
+ width: calc(100% - 150rpx);
+ white-space: nowrap;
+ overflow: hidden;
+ text-overflow: ellipsis;
+}
+.news-list .list-item .right .bottom .time {
+ color: #aaa;
+ font-size: 22rpx;
+ line-height: 48rpx;
+ width: 150rpx;
+ text-align: right;
+}
+.news-list .list-item .left {
+ width: 250rpx;
+ height: 146rpx;
+ border-radius: 12rpx;
+ overflow: hidden;
+}
+.news-list .list-item .left image {
+ width: 100%;
+ height:100%;
+}
+.news-list .list-item + .list-item {
+ border-top: 1rpx solid #ece9ec;
+}
+.news-list .hover-sudoku {
+ background: rgba(0,0,0,0.1);
+}
\ No newline at end of file
diff --git a/epdc-resident-mp-yushan/subpages/safety/components/banner/banner.js b/epdc-resident-mp-yushan/subpages/safety/components/banner/banner.js
new file mode 100644
index 0000000..03cd34a
--- /dev/null
+++ b/epdc-resident-mp-yushan/subpages/safety/components/banner/banner.js
@@ -0,0 +1,42 @@
+Component({
+ data: {
+ currentIndex: 0,
+ autoplay:false,
+ bannerInterval:0
+ },
+ properties: {
+ bannerList: {
+ type: Array,
+ value: []
+ }
+ },
+ lifetimes: {
+
+ },
+ pageLifetimes: {
+ show:function(){
+ console.log("show")
+ this.setData({
+ autoplay:true,
+ bannerInterval:3000
+ })
+ },
+ hide:function(){
+ this.setData({
+ autoplay:false,
+ bannerInterval:0
+ })
+ }
+ },
+ methods: {
+ swiperChange (e) {
+ this.setData({
+ currentIndex: e.detail.current
+ })
+ },
+ navigatetoBannerDetail (e) {
+ const { id, url, newsflag } = e.currentTarget.dataset
+ this.triggerEvent('navigatetoBannerDetail', {id, url, newsFlag: newsflag} )
+ }
+ }
+})
\ No newline at end of file
diff --git a/epdc-resident-mp-yushan/subpages/safety/components/banner/banner.json b/epdc-resident-mp-yushan/subpages/safety/components/banner/banner.json
new file mode 100644
index 0000000..32640e0
--- /dev/null
+++ b/epdc-resident-mp-yushan/subpages/safety/components/banner/banner.json
@@ -0,0 +1,3 @@
+{
+ "component": true
+}
\ No newline at end of file
diff --git a/epdc-resident-mp-yushan/subpages/safety/components/banner/banner.wxml b/epdc-resident-mp-yushan/subpages/safety/components/banner/banner.wxml
new file mode 100644
index 0000000..858dfba
--- /dev/null
+++ b/epdc-resident-mp-yushan/subpages/safety/components/banner/banner.wxml
@@ -0,0 +1,28 @@
+
+
+
+
+
+
+
+ {{item.title}}
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/epdc-resident-mp-yushan/subpages/safety/components/banner/banner.wxss b/epdc-resident-mp-yushan/subpages/safety/components/banner/banner.wxss
new file mode 100644
index 0000000..7f84fde
--- /dev/null
+++ b/epdc-resident-mp-yushan/subpages/safety/components/banner/banner.wxss
@@ -0,0 +1,80 @@
+.banner {
+ width: 100%;
+ height: 320rpx;
+ padding: 20rpx 0;
+ background: #fff;
+}
+.banner swiper {
+ width: 94%;
+ height: 320rpx;
+ margin:0 auto;
+}
+.banner-item {
+ width: 100%;
+ height: 320rpx;
+ position: relative;
+}
+.banner-item .banner-img {
+ position: absolute;
+ left: 0;
+ top: 0;
+ width: 100%;
+ height: 100%;
+}
+.banner-item .banner-content {
+ position: relative;
+ width: 100%;
+ height: 100%;
+ top: 0;
+ left: 0;
+ z-index: 100;
+ display: flex;
+ align-items: flex-end;
+}
+.banner-item .banner-content .title {
+ width: 100%;
+ height: 50rpx;
+ background: rgba(0,0,0, 0.4);
+ box-sizing: border-box;
+ padding: 0 20rpx;
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+}
+.banner-item .banner-content .title .title-text {
+ width: 75%;
+ height: 50rpx;
+ color: #fff;
+ font-size: 26rpx;
+ line-height: 50rpx;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+}
+
+/* 自定义轮播指示点样式 */
+.indication {
+ height: 50rpx;
+ display:flex;
+ position: absolute;
+ bottom: -2rpx;
+ right: 20rpx;
+ flex-direction:row;
+ align-items:center;
+ justify-content:center;
+}
+/* 未选中指示点样式 */
+.spot{
+ width: 15rpx;
+ height: 15rpx;
+ border-radius: 50%;
+ margin-right: 10rpx;
+ background-color: #c6c6c8;
+}
+/*选中指示样式 */
+.spot.active{
+ width: 15rpx;
+ height: 15rpx;
+ border-radius: 50%;
+ background-color: #fff;
+}
diff --git a/epdc-resident-mp-yushan/subpages/safety/components/loadMore/loadMore.js b/epdc-resident-mp-yushan/subpages/safety/components/loadMore/loadMore.js
new file mode 100644
index 0000000..bde42e0
--- /dev/null
+++ b/epdc-resident-mp-yushan/subpages/safety/components/loadMore/loadMore.js
@@ -0,0 +1,14 @@
+Component({
+ data: {
+ },
+ properties: {
+ loadMoreVisible: {
+ type: Boolean,
+ value: false
+ },
+ loadMoreType: {
+ type: String,
+ value: 'loading'
+ }
+ }
+})
\ No newline at end of file
diff --git a/epdc-resident-mp-yushan/subpages/safety/components/loadMore/loadMore.json b/epdc-resident-mp-yushan/subpages/safety/components/loadMore/loadMore.json
new file mode 100644
index 0000000..32640e0
--- /dev/null
+++ b/epdc-resident-mp-yushan/subpages/safety/components/loadMore/loadMore.json
@@ -0,0 +1,3 @@
+{
+ "component": true
+}
\ No newline at end of file
diff --git a/epdc-resident-mp-yushan/subpages/safety/components/loadMore/loadMore.wxml b/epdc-resident-mp-yushan/subpages/safety/components/loadMore/loadMore.wxml
new file mode 100644
index 0000000..573e607
--- /dev/null
+++ b/epdc-resident-mp-yushan/subpages/safety/components/loadMore/loadMore.wxml
@@ -0,0 +1,7 @@
+
+
+
+ 正在加载中...
+
+ 没有更多了~
+
\ No newline at end of file
diff --git a/epdc-resident-mp-yushan/subpages/safety/components/loadMore/loadMore.wxss b/epdc-resident-mp-yushan/subpages/safety/components/loadMore/loadMore.wxss
new file mode 100644
index 0000000..dbb07cd
--- /dev/null
+++ b/epdc-resident-mp-yushan/subpages/safety/components/loadMore/loadMore.wxss
@@ -0,0 +1,18 @@
+.load-more {
+ width: 100%;
+ height: 100rpx;
+ background: #f7f7f7;
+ display: flex;
+ justify-content: center;
+ align-items: center;
+}
+.load-more .load-text {
+ color: #999;
+ font-size: 26rpx;
+}
+.load-more .load-image {
+ width: 30rpx;
+ height: 30rpx;
+ object-fit: cover;
+ margin-right: 10rpx;
+}
\ No newline at end of file
diff --git a/epdc-resident-mp-yushan/subpages/safety/components/policeInfo/policeInfo.js b/epdc-resident-mp-yushan/subpages/safety/components/policeInfo/policeInfo.js
new file mode 100644
index 0000000..c97d417
--- /dev/null
+++ b/epdc-resident-mp-yushan/subpages/safety/components/policeInfo/policeInfo.js
@@ -0,0 +1,21 @@
+Component({
+ properties: {
+ sudokuState: {
+ type: Object,
+ value: {
+ consultAvailable: '0',
+ appraiseAvailable: '0'
+ }
+ },
+ policeInfo:{
+ type:Object
+ }
+ },
+ data:{
+ },
+ methods: {
+ joinGroup(e){
+ this.triggerEvent("joinGroup",e);
+ }
+ }
+})
\ No newline at end of file
diff --git a/epdc-resident-mp-yushan/subpages/safety/components/policeInfo/policeInfo.json b/epdc-resident-mp-yushan/subpages/safety/components/policeInfo/policeInfo.json
new file mode 100644
index 0000000..32640e0
--- /dev/null
+++ b/epdc-resident-mp-yushan/subpages/safety/components/policeInfo/policeInfo.json
@@ -0,0 +1,3 @@
+{
+ "component": true
+}
\ No newline at end of file
diff --git a/epdc-resident-mp-yushan/subpages/safety/components/policeInfo/policeInfo.wxml b/epdc-resident-mp-yushan/subpages/safety/components/policeInfo/policeInfo.wxml
new file mode 100644
index 0000000..d68814f
--- /dev/null
+++ b/epdc-resident-mp-yushan/subpages/safety/components/policeInfo/policeInfo.wxml
@@ -0,0 +1,33 @@
+
+
+
+
+
+
+
+
+ 姓名:{{item.policeName}}
+
+
+
+ 联系方式:{{item.policeTel}}
+
+
+
+
+
+
+ {{policeInfo.groupName}}
+ 共{{policeInfo.numberGroupMember}}人 {{policeInfo.numberGroupPartyMember}}名党员
+
+
+
+
+ {{policeInfo.groupMemberFlag=='0'?'加入':policeInfo.groupMemberFlag=='1'?'待审核':'进入'}}
+
+
+
+
+ 暂无民警信息~
+
+
\ No newline at end of file
diff --git a/epdc-resident-mp-yushan/subpages/safety/components/policeInfo/policeInfo.wxss b/epdc-resident-mp-yushan/subpages/safety/components/policeInfo/policeInfo.wxss
new file mode 100644
index 0000000..bcf8fc4
--- /dev/null
+++ b/epdc-resident-mp-yushan/subpages/safety/components/policeInfo/policeInfo.wxss
@@ -0,0 +1,119 @@
+.sudoku {
+ background:#fff;
+ margin-top: 20rpx;
+}
+.content {
+ width: 100%;
+ display: grid;
+ grid-template-columns: 1fr 1fr 1fr;
+ grid-template-rows: 215rpx;
+ box-sizing: border-box;
+ padding-bottom: 20rpx;
+}
+.item {
+ display: flex;
+ flex-direction: column;
+ justify-content: center;
+ align-items: center;
+}
+.item image {
+ width:126rpx;
+ height:126rpx;
+}
+.item .name {
+ font-size: 28rpx;
+ color: #3f3f3f;
+}
+.sudoku .hover-sudoku {
+ background: rgba(0,0,0,0.1);
+}
+.info-group{
+ width: 94%;
+ margin-left: 20rpx;
+ display: flex;
+ line-height: 100rpx;
+ padding-top: 20rpx;
+}
+.group-pic{
+ width: 120rpx;
+ height: 120rpx;
+ border-radius: 60px;
+ padding: 20rpx;
+}
+.group-detail{
+ width: 50%;
+ display: inline-block;
+ padding-left: 40rpx;
+ height: 120rpx;
+}
+.group-name{
+ font-size: 30rpx;
+ font-weight: bold;
+ height: 75rpx;
+ word-break: break-all;
+ line-height: 50rpx;
+}
+.group-number{
+ font-size: 25rpx;
+ color: #999;
+ height: 30rpx;
+}
+.group-join{
+ display: inline-block;
+ margin:0 auto;
+}
+.join-button{
+ height: 55rpx;
+ width: 110rpx;
+ border-radius: 60rpx;
+ background: #F82424;
+ color: white;
+ font-size: 30rpx;
+ text-align: center;
+ line-height: 50rpx;
+ margin-top: 50rpx;
+}
+.join-text{
+ font-size: 30rpx;
+ position: relative;
+ color: #fff;
+ margin-top: -120rpx;
+ margin-left: 20rpx;
+}
+.info-police{
+ width: 94%;
+ margin-left: 20rpx;
+ display: flex;
+ line-height: 100rpx;
+ padding-top: 20rpx;
+}
+.group-pic{
+ width: 120rpx;
+ height: 120rpx;
+ border-radius: 60px;
+ padding: 20rpx;
+}
+.police-detail{
+ display: grid;
+ padding-left: 40rpx;
+ height: 120rpx;
+ width: 70%;
+}
+.police-name{
+ font-size: 30rpx;
+ height: 75rpx;
+ word-break: break-all;
+ line-height: 75rpx;
+ display: inline-flex;
+}
+.no-police-data{
+ text-align: center;
+ height: 400rpx;
+ line-height: 400rpx;
+}
+.info-img{
+ height: 45rpx;
+ width: 45rpx;
+ padding-top: 15rpx;
+ display: inline-block;
+}
\ No newline at end of file
diff --git a/epdc-resident-mp-yushan/subpages/safety/components/precautionList/precautionList.js b/epdc-resident-mp-yushan/subpages/safety/components/precautionList/precautionList.js
new file mode 100644
index 0000000..4c1a455
--- /dev/null
+++ b/epdc-resident-mp-yushan/subpages/safety/components/precautionList/precautionList.js
@@ -0,0 +1,13 @@
+Component({
+ properties: {
+ newsList: {
+ type: Array,
+ value: []
+ }
+ },
+ methods: {
+ navigatetoNewsDetail (e) {
+ this.triggerEvent('navigatetoNewsDetail', {newsId: e.currentTarget.dataset.newsid})
+ }
+ }
+})
\ No newline at end of file
diff --git a/epdc-resident-mp-yushan/subpages/safety/components/precautionList/precautionList.json b/epdc-resident-mp-yushan/subpages/safety/components/precautionList/precautionList.json
new file mode 100644
index 0000000..32640e0
--- /dev/null
+++ b/epdc-resident-mp-yushan/subpages/safety/components/precautionList/precautionList.json
@@ -0,0 +1,3 @@
+{
+ "component": true
+}
\ No newline at end of file
diff --git a/epdc-resident-mp-yushan/subpages/safety/components/precautionList/precautionList.wxml b/epdc-resident-mp-yushan/subpages/safety/components/precautionList/precautionList.wxml
new file mode 100644
index 0000000..6b5d165
--- /dev/null
+++ b/epdc-resident-mp-yushan/subpages/safety/components/precautionList/precautionList.wxml
@@ -0,0 +1,24 @@
+
+
+
+
+
+
+
+ {{item.newsTitle}}
+
+ {{item.deptName}}-{{item.newsCategoryName}}
+ {{filters.formatTimestamp(item.newsStartTime)}}
+
+
+
+
\ No newline at end of file
diff --git a/epdc-resident-mp-yushan/subpages/safety/components/precautionList/precautionList.wxss b/epdc-resident-mp-yushan/subpages/safety/components/precautionList/precautionList.wxss
new file mode 100644
index 0000000..db50b9b
--- /dev/null
+++ b/epdc-resident-mp-yushan/subpages/safety/components/precautionList/precautionList.wxss
@@ -0,0 +1,70 @@
+.news-list {
+ width: 100%;
+ background: #fff;
+ box-sizing: border-box;
+ padding: 0 35rpx;
+ margin-top: 20rpx;
+}
+.news-list .list-item {
+ width: 100%;
+ height: 205rpx;
+ box-sizing: border-box;
+ padding: 30rpx 0;
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+}
+.news-list .list-item .right {
+ width: calc(100% - 50rpx - 220rpx);
+ height: 146rpx;
+}
+.news-list .list-item .right .title {
+ color: #3f3f3f;
+ font-size: 30rpx;
+ line-height: 45rpx;
+ display: -webkit-box;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ word-wrap: break-word;
+ white-space: normal !important;
+ -webkit-line-clamp: 2;
+ -webkit-box-orient: vertical;
+}
+.news-list .list-item .right .bottom {
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ padding-top: 20rpx;
+}
+.news-list .list-item .right .bottom .category {
+ color: #aaa;
+ font-size: 22rpx;
+ line-height: 48rpx;
+ width: calc(100% - 150rpx);
+ white-space: nowrap;
+ overflow: hidden;
+ text-overflow: ellipsis;
+}
+.news-list .list-item .right .bottom .time {
+ color: #aaa;
+ font-size: 22rpx;
+ line-height: 48rpx;
+ width: 150rpx;
+ text-align: right;
+}
+.news-list .list-item .left {
+ width: 250rpx;
+ height: 146rpx;
+ border-radius: 12rpx;
+ overflow: hidden;
+}
+.news-list .list-item .left image {
+ width: 100%;
+ height:100%;
+}
+.news-list .list-item + .list-item {
+ border-top: 1rpx solid #ece9ec;
+}
+.news-list .hover-sudoku {
+ background: rgba(0,0,0,0.1);
+}
\ No newline at end of file
diff --git a/epdc-resident-mp-yushan/subpages/safety/components/pullingRefresh/pullingRefresh.js b/epdc-resident-mp-yushan/subpages/safety/components/pullingRefresh/pullingRefresh.js
new file mode 100644
index 0000000..ac0a9bf
--- /dev/null
+++ b/epdc-resident-mp-yushan/subpages/safety/components/pullingRefresh/pullingRefresh.js
@@ -0,0 +1,72 @@
+let lastY = 0 // 上一次滚动的位置
+let scale = 750 / wx.getSystemInfoSync().windowWidth // rpx转化比例
+Component({
+ options: {
+ multipleSlots: true
+ },
+ data: {
+ scrollTop: 0,
+ translateHeight: 0, // 平移距离
+ state: -1,
+ lastY: 0,
+ enablePullDown: true
+ },
+ properties: {
+ // 触发下拉刷新的距离
+ upperDistance: {
+ type: Number,
+ value: 150
+ }
+ },
+ methods: {
+ // 监听滚动,获取scrollTop
+ onPageScroll (e) {
+ this.data.scrollTop = e.scrollTop
+ },
+ touchStart (e) {
+ this.data.lastY = e.touches[0].clientY
+ if (this.data.scrollTop === 0) {
+ this.data.enablePullDown = true
+ } else {
+ this.data.enablePullDown = false
+ }
+ },
+ touchMove (e) {
+ let clientY = e.touches[0].clientY
+ let offset = clientY - this.data.lastY
+ if (this.data.scrollTop > 0 || offset < 0) return
+ this.data.translateHeight += offset
+ this.data.state = 0
+ this.data.lastY = e.touches[0].clientY
+ if (this.data.enablePullDown) {
+ if (this.data.translateHeight - this.data.scrollTop * scale > this.data.upperDistance) {
+ this.data.state = 1
+ }
+ this.setData({
+ translateHeight: this.data.translateHeight > 80 ? 80 : this.data.translateHeight,
+ state: this.data.state
+ })
+ }
+ },
+ touchEnd (e) {
+ if (this.data.translateHeight - this.data.scrollTop * scale > this.data.upperDistance) {
+ if (this.data.enablePullDown) {
+ this.setData({
+ translateHeight: 80,
+ state: 2
+ })
+ this.triggerEvent('scrolltoupper')
+ }
+ } else if (this.data.scrollTop <= 0) {
+ this.stopRefresh()
+ }
+ },
+ // 停止刷新
+ stopRefresh () {
+ this.setData({
+ translateHeight: 0,
+ state: -1
+ })
+ }
+ }
+})
\ No newline at end of file
diff --git a/epdc-resident-mp-yushan/subpages/safety/components/pullingRefresh/pullingRefresh.json b/epdc-resident-mp-yushan/subpages/safety/components/pullingRefresh/pullingRefresh.json
new file mode 100644
index 0000000..32640e0
--- /dev/null
+++ b/epdc-resident-mp-yushan/subpages/safety/components/pullingRefresh/pullingRefresh.json
@@ -0,0 +1,3 @@
+{
+ "component": true
+}
\ No newline at end of file
diff --git a/epdc-resident-mp-yushan/subpages/safety/components/pullingRefresh/pullingRefresh.wxml b/epdc-resident-mp-yushan/subpages/safety/components/pullingRefresh/pullingRefresh.wxml
new file mode 100644
index 0000000..034cc8c
--- /dev/null
+++ b/epdc-resident-mp-yushan/subpages/safety/components/pullingRefresh/pullingRefresh.wxml
@@ -0,0 +1,9 @@
+
+
+
+ {{state === 0 ? '下拉刷新' : state === 1? '松开刷新' : '刷新中...'}}
+
+
+
+
+
\ No newline at end of file
diff --git a/epdc-resident-mp-yushan/subpages/safety/components/pullingRefresh/pullingRefresh.wxss b/epdc-resident-mp-yushan/subpages/safety/components/pullingRefresh/pullingRefresh.wxss
new file mode 100644
index 0000000..4c17c21
--- /dev/null
+++ b/epdc-resident-mp-yushan/subpages/safety/components/pullingRefresh/pullingRefresh.wxss
@@ -0,0 +1,30 @@
+.scroll {
+ width: 100%;
+ margin-top: 94rpx;
+ margin-bottom: 98rpx;
+}
+.animation {
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ width: 100%;
+ height: 80rpx;
+ background-color: #f7f7f7;
+ margin-bottom: -80rpx;
+}
+.loading {
+ width: 30rpx;
+ height: 30rpx;
+ object-fit: cover;
+}
+.loading image {
+ width: 100%;
+ height: 100%;
+ object-fit: cover;
+}
+
+.tip {
+ margin-left: 10rpx;
+ color: #999;
+ font-size: 26rpx;
+}
\ No newline at end of file
diff --git a/epdc-resident-mp-yushan/subpages/safety/components/sudoku/sudoku.js b/epdc-resident-mp-yushan/subpages/safety/components/sudoku/sudoku.js
new file mode 100644
index 0000000..cc1a432
--- /dev/null
+++ b/epdc-resident-mp-yushan/subpages/safety/components/sudoku/sudoku.js
@@ -0,0 +1,24 @@
+Component({
+ properties: {
+ sudokuState: {
+ type: Object,
+ value: {
+ consultAvailable: '0',
+ appraiseAvailable: '0'
+ }
+ },
+ },
+ data:{
+ },
+ methods: {
+ showMyPolice(){
+ this.triggerEvent('showMyPolice')
+ },
+ showPrecaution(){
+ this.triggerEvent('showPrecaution')
+ },
+ showAnnouncement(){
+ this.triggerEvent('showAnnouncement')
+ }
+}
+})
\ No newline at end of file
diff --git a/epdc-resident-mp-yushan/subpages/safety/components/sudoku/sudoku.json b/epdc-resident-mp-yushan/subpages/safety/components/sudoku/sudoku.json
new file mode 100644
index 0000000..32640e0
--- /dev/null
+++ b/epdc-resident-mp-yushan/subpages/safety/components/sudoku/sudoku.json
@@ -0,0 +1,3 @@
+{
+ "component": true
+}
\ No newline at end of file
diff --git a/epdc-resident-mp-yushan/subpages/safety/components/sudoku/sudoku.wxml b/epdc-resident-mp-yushan/subpages/safety/components/sudoku/sudoku.wxml
new file mode 100644
index 0000000..1fb76fb
--- /dev/null
+++ b/epdc-resident-mp-yushan/subpages/safety/components/sudoku/sudoku.wxml
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/epdc-resident-mp-yushan/subpages/safety/components/sudoku/sudoku.wxss b/epdc-resident-mp-yushan/subpages/safety/components/sudoku/sudoku.wxss
new file mode 100644
index 0000000..5751c44
--- /dev/null
+++ b/epdc-resident-mp-yushan/subpages/safety/components/sudoku/sudoku.wxss
@@ -0,0 +1,111 @@
+.sudoku {
+ background:#fff;
+ padding: 0 10rpx;
+ margin-top: 20rpx;
+}
+.content {
+ width: 100%;
+ display: grid;
+ grid-template-columns: 1fr 1fr 1fr;
+ grid-template-rows: 215rpx;
+ box-sizing: border-box;
+}
+.item {
+ display: flex;
+ flex-direction: column;
+ justify-content: center;
+ align-items: center;
+}
+.item image {
+ width:220rpx;
+ height:130rpx;
+}
+.item .name {
+ font-size: 28rpx;
+ color: #3f3f3f;
+}
+.sudoku .hover-sudoku {
+ background: rgba(0,0,0,0.1);
+}
+.info-group{
+ width: 94%;
+ margin-left: 20rpx;
+ display: flex;
+ line-height: 100rpx;
+ padding-top: 20rpx;
+}
+.group-pic{
+ width: 120rpx;
+ height: 120rpx;
+ border-radius: 60px;
+ padding: 20rpx;
+}
+.group-detail{
+ width: 50%;
+ display: inline-block;
+ padding-left: 40rpx;
+ height: 120rpx;
+}
+.group-name{
+ font-size: 30rpx;
+ font-weight: bold;
+ height: 75rpx;
+ word-break: break-all;
+ line-height: 50rpx;
+}
+.group-number{
+ font-size: 25rpx;
+ color: #999;
+ height: 30rpx;
+}
+.group-join{
+ display: inline-block;
+ margin:0 auto;
+}
+.join-button{
+ height: 55rpx;
+ width: 110rpx;
+ border-radius: 60rpx;
+ background: #F82424;
+ color: white;
+ font-size: 30rpx;
+ text-align: center;
+ line-height: 50rpx;
+ margin-top: 50rpx;
+}
+.join-text{
+ font-size: 30rpx;
+ position: relative;
+ color: #fff;
+ margin-top: -120rpx;
+ margin-left: 20rpx;
+}
+.info-police{
+ width: 94%;
+ margin-left: 20rpx;
+ display: flex;
+ line-height: 100rpx;
+ padding-top: 20rpx;
+}
+.group-pic{
+ width: 120rpx;
+ height: 120rpx;
+ border-radius: 60px;
+ padding: 20rpx;
+}
+.police-detail{
+ width: 50%;
+ display: inline-block;
+ padding-left: 40rpx;
+ height: 120rpx;
+}
+.police-name{
+ font-size: 30rpx;
+ height: 75rpx;
+ word-break: break-all;
+ line-height: 50rpx;
+}
+.no-police-data{
+ margin-top: 200rpx;
+ text-align: center;
+}
\ No newline at end of file
diff --git a/epdc-resident-mp-yushan/subpages/safety/images/back.png b/epdc-resident-mp-yushan/subpages/safety/images/back.png
new file mode 100644
index 0000000..5d9fe80
Binary files /dev/null and b/epdc-resident-mp-yushan/subpages/safety/images/back.png differ
diff --git a/epdc-resident-mp-yushan/subpages/safety/images/loading.gif b/epdc-resident-mp-yushan/subpages/safety/images/loading.gif
new file mode 100644
index 0000000..915c198
Binary files /dev/null and b/epdc-resident-mp-yushan/subpages/safety/images/loading.gif differ
diff --git a/epdc-resident-mp-yushan/subpages/safety/images/minjing.png b/epdc-resident-mp-yushan/subpages/safety/images/minjing.png
new file mode 100644
index 0000000..a7e791d
Binary files /dev/null and b/epdc-resident-mp-yushan/subpages/safety/images/minjing.png differ
diff --git a/epdc-resident-mp-yushan/subpages/safety/images/name.png b/epdc-resident-mp-yushan/subpages/safety/images/name.png
new file mode 100644
index 0000000..d508c4f
Binary files /dev/null and b/epdc-resident-mp-yushan/subpages/safety/images/name.png differ
diff --git a/epdc-resident-mp-yushan/subpages/safety/images/pingan.png b/epdc-resident-mp-yushan/subpages/safety/images/pingan.png
new file mode 100644
index 0000000..6b663ac
Binary files /dev/null and b/epdc-resident-mp-yushan/subpages/safety/images/pingan.png differ
diff --git a/epdc-resident-mp-yushan/subpages/safety/images/tel.png b/epdc-resident-mp-yushan/subpages/safety/images/tel.png
new file mode 100644
index 0000000..8360bfc
Binary files /dev/null and b/epdc-resident-mp-yushan/subpages/safety/images/tel.png differ
diff --git a/epdc-resident-mp-yushan/subpages/safety/images/temp.png b/epdc-resident-mp-yushan/subpages/safety/images/temp.png
new file mode 100644
index 0000000..6184675
Binary files /dev/null and b/epdc-resident-mp-yushan/subpages/safety/images/temp.png differ
diff --git a/epdc-resident-mp-yushan/subpages/safety/images/tongbao.png b/epdc-resident-mp-yushan/subpages/safety/images/tongbao.png
new file mode 100644
index 0000000..196a2ee
Binary files /dev/null and b/epdc-resident-mp-yushan/subpages/safety/images/tongbao.png differ
diff --git a/epdc-resident-mp-yushan/subpages/safety/pages/index/index.js b/epdc-resident-mp-yushan/subpages/safety/pages/index/index.js
new file mode 100644
index 0000000..53d56ee
--- /dev/null
+++ b/epdc-resident-mp-yushan/subpages/safety/pages/index/index.js
@@ -0,0 +1,233 @@
+const api = require('../../utils/api')
+const config = require('../../../../utils/config')
+import { getTimestamp } from '../../../../utils/common'
+const app = getApp()
+Page({
+ data: {
+ statusHeight: 0, // 自定义头部状态栏高度
+ navigationHeight: 0, // 自定义头部导航栏高度
+ sudokuHeight:0,
+ bannerList: [], // banner列表,
+ policeInfo:{},
+ precautionList:[],
+ announcementList:[],
+ showMyPoliceFlag:false,
+ showAnnouncementFlag:false,
+ showPrecautionFlag:false,
+ loadMoreType:'more',
+ loadMoreVisible:true,
+ pageNo:1,
+ pageSize:10,
+ loading:false,
+ timestamp:'',
+ completeInfoDialogVisible:false
+ },
+ onShow () {
+
+ },
+ onLoad (options) {
+ this.setData({
+ statusHeight: app.globalData.deviceInfo.statusHeight,
+ navigationHeight: app.globalData.deviceInfo.navigationHeight,
+ sudokuHeight:app.globalData.deviceInfo.statusHeight+app.globalData.deviceInfo.navigationHeight,
+ timestamp:getTimestamp()
+ })
+ this.getBannerList();
+ this.getPoliceInfo();
+ },
+ naviBack(){
+ wx.navigateBack({
+ delta:1,
+ complete: (res) => {},
+ })
+ },
+ // 获取banner列表
+ getBannerList () {
+ api.getBannerList().then(res => {
+ console.log('首页banner列表', res)
+ this.setData({
+ bannerList: res.data
+ })
+ }).catch(() => {
+ console.log('获取banner列表失败')
+ this.setData({
+ bannerList: [{'imgUrl':'../../images/temp.png','title':'防范火灾 平安假日'}]
+ })
+ })
+ },
+ getPoliceInfo(){
+ api.getPoliceInfo().then(res=>{
+ this.setData({
+ policeInfo:res.data
+ })
+ }).catch(err=>{
+ this.setData({
+ policeInfo:{}
+ })
+ })
+ },
+ joinGroup(e){
+ if (app.globalData.infoCompleted == 0) {
+ this.setData({
+ completeInfoDialogVisible: !this.data.completeInfoDialogVisible
+ })
+ return false
+ }
+ const { groupMemberFlag, groupId, groupName,groupState } = this.data.policeInfo
+ if(groupMemberFlag == '0'){
+ wx.showModal({
+ title:'提示',
+ content:'尚未加入群组,是否申请加入?',
+ confirmText:'申请',
+ cancelColor: 'cancelColor',
+ success:(res)=>{
+ if(res.cancel){
+
+ }else{
+ api.applyForGroup(groupId).then(res=>{
+ if(res.code == '0'){
+ wx.showToast({
+ title: '申请成功'
+ })
+ let info = this.data.policeInfo;
+ info.groupMemberFlag = '1';
+ this.setData({
+ policeInfo:info
+ })
+ }else{
+ wx.showToast({
+ title: '申请失败',
+ icon:"none"
+ })
+ }
+ }).catch(err=>{
+
+ })
+ }
+ }
+ })
+ }else if(groupMemberFlag == '1'){
+ wx.showToast({
+ title: '您已申请过加入该社群,请等待群主审核',
+ icon:"none"
+ })
+ }else if(groupMemberFlag == '2'){
+ wx.navigateTo({
+ url: `/subpages/property/pages/topicList/topicList?groupId=${groupId}&groupName=${groupName}&state=${groupState}`
+ })
+ }
+ },
+ navigateToPrecaution(){
+ wx.navigateTo({
+ url: '/subpages/safety/pages/precaution/precaution'
+ })
+ },
+ showMyPolice(){
+ this.setData({
+ showMyPoliceFlag:true,
+ showPrecautionFlag:false,
+ showAnnouncementFlag:false
+ })
+ },
+ showPrecaution(){
+ this.setData({
+ showMyPoliceFlag:false,
+ showPrecautionFlag:true,
+ showAnnouncementFlag:false,
+ loadMoreType:'loading',
+ pageNo:1,
+ loading:true,
+ precautionList:[],
+ timestamp:getTimestamp()
+ })
+ this.getPrecautionList();
+ },
+ showAnnouncement(){
+ this.setData({
+ showMyPoliceFlag:false,
+ showPrecautionFlag:false,
+ showAnnouncementFlag:true,
+ pageNo:1,
+ loadMoreType:'loading',
+ loading:true,
+ announcementList:[],
+ timestamp:getTimestamp()
+ })
+ this.getAnnouncementList()
+ },
+ // 获取平安防范列表
+ getPrecautionList () {
+ let para = {
+ pageIndex: this.data.pageNo,
+ pageSize: this.data.pageSize,
+ timestamp: this.data.timestamp
+ }
+ api.getPrecautionList(para).then((res) => {
+ this.setData({
+ loadMoreType: res.data.length === this.data.pageSize ? 'more': 'none',
+ precautionList: this.data.precautionList.concat(res.data),
+ loading:false
+ })
+ }).catch(() => {
+ this.setData({
+ loadMoreType: 'none',
+ precautionList: [],
+ loading:false
+ })
+ })
+ },
+ // 获取警情通报列表
+ getAnnouncementList () {
+ let para = {
+ pageIndex: this.data.pageNo,
+ pageSize: this.data.pageSize,
+ timestamp: this.data.timestamp
+ }
+ api.getAnnouncementList(para).then((res) => {
+ this.setData({
+ loadMoreType: res.data.length === this.data.pageSize ? 'more': 'none',
+ announcementList: this.data.announcementList.concat(res.data),
+ loading:false
+ })
+ }).catch(() => {
+ this.setData({
+ loadMoreType: 'none',
+ announcementList: [],
+ loading:false
+ })
+ })
+ },
+ onReachBottom () {
+ if(!this.data.showMyPoliceFlag && !this.data.loading){
+ this.setData({
+ loadMoreVisible: true,
+ loading:true
+ })
+ if (this.data.loadMoreType === 'more') {
+ this.setData({
+ loadMoreType:'loading'
+ })
+ this.data.pageNo += 1
+ if(this.data.showPrecautionFlag){
+ this.getPrecautionList();
+ }
+ else if(this.data.showAnnouncementFlag){
+ this.getAnnouncementList();
+ }
+ }
+ }
+ },
+ // 跳转到banner详情
+ navigatetoBannerDetail (e) {
+ const { id, url, newsFlag } = e.detail
+ if (newsFlag == '0') {
+ wx.navigateTo({
+ url: `/subpages/home/pages/webview/webview?url=${url}`
+ })
+ } else if (newsFlag == '1') {
+ wx.navigateTo({
+ url: `/subpages/home/pages/newsDetail/newsDetail?id=${id}`
+ })
+ }
+ }
+})
\ No newline at end of file
diff --git a/epdc-resident-mp-yushan/subpages/safety/pages/index/index.json b/epdc-resident-mp-yushan/subpages/safety/pages/index/index.json
new file mode 100644
index 0000000..a020ed7
--- /dev/null
+++ b/epdc-resident-mp-yushan/subpages/safety/pages/index/index.json
@@ -0,0 +1,13 @@
+{
+ "usingComponents": {
+ "banner":"../../components/banner/banner",
+ "sudoku":"../../components/sudoku/sudoku",
+ "policeInfo":"../../components/policeInfo/policeInfo",
+ "announcementList":"../../components/announcementList/announcementList",
+ "precautionList":"../../components/precautionList/precautionList",
+ "load-more":"../../components/loadMore/loadMore",
+ "complete-info-dialog": "../../../../components/completeInfoDialog/completeInfoDialog"
+ },
+ "navigationStyle": "custom",
+ "navigationBarTextStyle": "white"
+}
\ No newline at end of file
diff --git a/epdc-resident-mp-yushan/subpages/safety/pages/index/index.wxml b/epdc-resident-mp-yushan/subpages/safety/pages/index/index.wxml
new file mode 100644
index 0000000..36943d8
--- /dev/null
+++ b/epdc-resident-mp-yushan/subpages/safety/pages/index/index.wxml
@@ -0,0 +1,35 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/epdc-resident-mp-yushan/subpages/safety/pages/index/index.wxss b/epdc-resident-mp-yushan/subpages/safety/pages/index/index.wxss
new file mode 100644
index 0000000..600f2a5
--- /dev/null
+++ b/epdc-resident-mp-yushan/subpages/safety/pages/index/index.wxss
@@ -0,0 +1,42 @@
+page {
+ width: 100%;
+ height: auto;
+ overflow-y: auto;
+ background: #f7f7f7;
+}
+
+.header {
+ position: fixed;
+ width: 100%;
+ top: 0;
+ left: 0;
+ z-index: 1000;
+}
+.header .header-bg {
+ width: 100%;
+ height: 100%;
+ position: absolute;
+ z-index: 10;
+ left: 0;
+ top: 0;
+}
+.header .navigation {
+ width: 100%;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ color: rgba(255,255,255, 0.9);
+ font-size: 32rpx;
+ position: relative;
+ z-index: 100;
+}
+.home {
+ width: 100%;
+}
+.header-back{
+ height: 33rpx;
+ width: 18rpx;
+ position: fixed;
+ margin-left: 30rpx;
+ z-index: 101;
+}
\ No newline at end of file
diff --git a/epdc-resident-mp-yushan/subpages/safety/utils/api.js b/epdc-resident-mp-yushan/subpages/safety/utils/api.js
new file mode 100644
index 0000000..b0dd3cb
--- /dev/null
+++ b/epdc-resident-mp-yushan/subpages/safety/utils/api.js
@@ -0,0 +1,249 @@
+const request = require('../../../utils/request')
+/**
+ * banner
+ */
+export function getBannerList () {
+ return request.get('property/safety/bannerList',{
+ "position":'2'
+ })
+}
+/**
+ * 平安防范
+ */
+export function getPrecautionList (param) {
+ return request.get('property/safety/newsList/safety_precautions',param)
+}
+/**
+ * 警情通报
+ */
+export function getAnnouncementList (param) {
+ return request.get('property/safety/newsList/police_notice',param)
+}
+/**
+ * 民警信息及警民群信息
+ */
+export function getPoliceInfo () {
+ return request.get('property/safety/policeGroupInfo')
+}
+/********警民群-申请入群 ********/
+export function applyForGroup(groupId){
+ return request.post('property/group/applyForGroup',{
+ groupId:groupId
+ })
+}
+/**
+ * 社群详情
+ */
+export function getAssociationDetail (id) {
+ return request.get(`property/group/detail/${id}`)
+}
+
+/**
+ * 修改群头像
+ */
+export function modifyAvatar ({id, groupAvatar}) {
+ return request.post('property/group/modifyAvatar', {
+ id,
+ groupAvatar
+ })
+}
+/**
+ * 加入社群
+ */
+
+ export function joinAssociation (groupId) {
+ return request.post('property/group/applyForGroup', {
+ groupId
+ })
+ }
+
+ /**
+ * 修改群介绍
+ */
+ export function changeIntroduce ({id, groupIntroduction}) {
+ return request.post('property/group/modifyIntroduction', {
+ id,
+ groupIntroduction
+ })
+ }
+
+ /**
+ * 群成员列表 审核通过/待审核
+ */
+ export function getAssociationMember ({groupId, state}) {
+ return request.get('property/group/listOfMember', {
+ groupId,
+ state
+ })
+ }
+
+ /**
+ * 删除群成员
+ */
+ export function deleteMember ({groupId, userId}) {
+ return request.post('property/group/removeMember', {
+ groupId,
+ userId
+ })
+ }
+
+ /**
+ * 审核入群成员
+ */
+ export function incomingVerify ({ groupId, members }) {
+ return request.post('property/group/reviewApply', {
+ groupId,
+ members
+ })
+ }
+
+ /**
+ * 添加好友列表
+ */
+ export function getInviteList ({groupId, mobile, road, lastName}) {
+ return request.get('property/group/getInviteList', {
+ groupId,
+ mobile,
+ road,
+ lastName
+ })
+ }
+
+ /**
+ * 添加好友
+ */
+ export function addMember ({ groupId, members}) {
+ return request.post('property/group/addMember', {
+ groupId,
+ members
+ })
+ }
+
+ /**
+ * 发布话题
+ */
+ export function addTopic ({topicContent, topicAddress, topicLatitude, topicLongitude, groupId, groupName, images}) {
+ return request.post('property/topic/submit', {
+ topicContent,
+ topicAddress,
+ topicLatitude,
+ topicLongitude,
+ groupId,
+ groupName,
+ images
+ })
+ }
+
+ /**
+ * 话题列表
+ */
+ export function getTopicList ({ pageIndex, pageSize, timestamp, groupId, topicId }) {
+ return request.get('property/topic/list', {
+ pageIndex,
+ pageSize,
+ timestamp,
+ groupId,
+ topicId
+ })
+ }
+
+ /**
+ * 话题详情
+ */
+export function getTopicDetail (id) {
+ return request.get(`property/topic/detail/${id}`)
+}
+
+/**
+ * 退群
+ * @param groupId
+ */
+export function withdrawGroup (groupId) {
+ return request.post('property/group/quitGroup', {
+ groupId
+ })
+}
+
+/**
+ * 评论最新最热列表
+ */
+export function getRemarkList({ pageIndex, pageSize, timestamp, orderType, topicId }) {
+ return request.get('property/comment/list', {
+ pageIndex,
+ pageSize,
+ timestamp,
+ orderType,
+ topicId
+ })
+}
+
+/**
+ * 评论或者回复
+ */
+export function remarkOrReply ({ topicId, faCommentId, content }) {
+ return request.post('property/comment/submit', {
+ topicId,
+ faCommentId,
+ content
+ })
+}
+
+/**
+ * 关闭话题
+ */
+export function closeTopic ({ id, processingOpinions }) {
+ return request.post('property/topic/close', {
+ id,
+ processingOpinions
+ })
+}
+
+/**
+ * 分类列表
+ */
+export function getClassifyList () {
+ return request.get('events/issue/category/list')
+}
+
+/**
+ * 话题转议题
+ */
+export function changeToIssue ({ id, categoryId, advice }) {
+ return request.post('property/topic/changeToIssue', {
+ id,
+ categoryId,
+ advice
+ })
+}
+
+/**
+ * 支持/反对 表态
+ */
+export function publishStatement ({ attitude, commentId, topicId }) {
+ return request.post('property/comment/statement', {
+ attitude,
+ commentId,
+ topicId
+ })
+}
+
+/**
+ * 生成网格小程序码
+ */
+
+ export function createQRCode ({ gridId, inviteUserId }) {
+ return request.get('app-user/user/createQRCode', {
+ gridId,
+ inviteUserId
+ })
+ }
+ /**
+ * 我的话题列表
+ */
+export function getMyTopicList ({ pageIndex , pageSize , groupId}) {
+ return request.get('property/topic/listOfMine', {
+ pageIndex,
+ pageSize,
+ groupId
+ })
+}
\ No newline at end of file
diff --git a/epdc-resident-mp-yushan/subpages/safety/utils/common.js b/epdc-resident-mp-yushan/subpages/safety/utils/common.js
new file mode 100644
index 0000000..6e6ecb9
--- /dev/null
+++ b/epdc-resident-mp-yushan/subpages/safety/utils/common.js
@@ -0,0 +1,11 @@
+export function getTimestamp () {
+ const date = new Date()
+ const year = date.getFullYear()
+ const month = date.getMonth() + 1 > 9 ? date.getMonth() + 1 : `0${date.getMonth() + 1}`
+ const day = date.getDate() > 9 ? date.getDate() : `0${date.getDate()}`
+ const hour = date.getHours() > 9 ? date.getHours() : `0${date.getHours()}`
+ const minute = date.getMinutes() > 9 ? date.getMinutes() : `0${date.getMinutes()}`
+ const second = date.getSeconds() > 9 ? date.getSeconds() : `0${date.getSeconds()}`
+
+ return `${year}-${month}-${day} ${hour}:${minute}:${second}`
+}
\ No newline at end of file
diff --git a/epdc-resident-mp-yushan/utils/api.js b/epdc-resident-mp-yushan/utils/api.js
index 4398199..af40e0c 100644
--- a/epdc-resident-mp-yushan/utils/api.js
+++ b/epdc-resident-mp-yushan/utils/api.js
@@ -51,7 +51,8 @@ module.exports = {
getWxPhone: getWxPhone,
getPropertyProjectList:getPropertyProjectList,
getPropertyProjectDetail:getPropertyProjectDetail,
- applyForGroup:applyForGroup
+ applyForGroup:applyForGroup,
+ submitScore:submitScore
}
function getToken(wxCode) {
@@ -426,7 +427,7 @@ function getPropertyProjectList(){
/********物业项目-物业项目详情 ********/
function getPropertyProjectDetail(propertyProjectId){
- return fly.get(`property/projectDetail/${propertyProjectId}`)
+ return fly.get(`property/v2/projectDetail/${propertyProjectId}`)
}
/********物业群-申请入群 ********/
@@ -435,5 +436,8 @@ function applyForGroup(groupId){
groupId:groupId
})
}
-
+ /********物业-打分*******/
+ function submitScore(param){
+ return fly.get('property/projectScore',param)
+ }