diff --git a/app.json b/app.json index c05617c..8f4b521 100644 --- a/app.json +++ b/app.json @@ -8,8 +8,7 @@ "pages/mine/mine", "pages/webView/webView", "pages/statistics/statistics", - "pages/setup/setup", - "pages/resetPassword/resetPassword" + "pages/setup/setup" ], "subPackages": [ { @@ -74,6 +73,13 @@ "pages/dissatisfied/searchResi/searchResi" ] + }, + { + "root": "subpages/settings", + "name": "settings", + "pages": [ + "pages/index/index" + ] } ], "window": { diff --git a/images/card.png b/images/card.png new file mode 100644 index 0000000..a81bf3f Binary files /dev/null and b/images/card.png differ diff --git a/images/message/header_bg.jpg b/images/message/header_bg.jpg index d4a1aaf..79eb993 100644 Binary files a/images/message/header_bg.jpg and b/images/message/header_bg.jpg differ diff --git a/pages/mine/mine.js b/pages/mine/mine.js index a4cde51..e640447 100644 --- a/pages/mine/mine.js +++ b/pages/mine/mine.js @@ -86,5 +86,10 @@ Page({ wx.navigateTo({ url: '/subpages/communitySelfInsp/pages/followUpList/followUpList', }) + }, + toSettings(){ + wx.navigateTo({ + url: '/subpages/settings/pages/index/index', + }) } }) \ No newline at end of file diff --git a/pages/mine/mine.wxml b/pages/mine/mine.wxml index e14927b..af2d416 100644 --- a/pages/mine/mine.wxml +++ b/pages/mine/mine.wxml @@ -45,12 +45,12 @@ - + - - 设置 - - + + 设置 + + diff --git a/pages/resetPassword/resetPassword.json b/pages/resetPassword/resetPassword.json deleted file mode 100644 index 3928faa..0000000 --- a/pages/resetPassword/resetPassword.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "usingComponents": {} -} \ No newline at end of file diff --git a/pages/resetPassword/resetPassword.wxml b/pages/resetPassword/resetPassword.wxml deleted file mode 100644 index 286d75d..0000000 --- a/pages/resetPassword/resetPassword.wxml +++ /dev/null @@ -1,2 +0,0 @@ - -pages/resetPassword/resetPassword.wxml \ No newline at end of file diff --git a/pages/resetPassword/resetPassword.wxss b/pages/resetPassword/resetPassword.wxss deleted file mode 100644 index 1245d5f..0000000 --- a/pages/resetPassword/resetPassword.wxss +++ /dev/null @@ -1 +0,0 @@ -/* pages/resetPassword/resetPassword.wxss */ \ No newline at end of file diff --git a/pages/work/work.js b/pages/work/work.js index 6fd10a6..bd95d81 100644 --- a/pages/work/work.js +++ b/pages/work/work.js @@ -195,12 +195,17 @@ Page({ }, toSynthesis(){ wx.navigateTo({ - url: '/subpages/communitySelfInsp/pages/synthesis/synthesis', - }) + url: `/subpages/communitySelfInsp/pages/synthesis/synthesis?inspRecordId=${this.data.communitySelfInspTop.id}`, + }) }, toWebView(){ wx.navigateTo({ - url: '/subpages/communitySelfInsp/pages/synthesis/synthesis', + url: `/subpages/communitySelfInsp/pages/synthesis/synthesis?inspRecordId=${this.data.communitySelfInspTop.id}`, + }) + }, + toDetail(e){ + wx.navigateTo({ + url: `/subpages/communitySelfInsp/pages/synthesis/synthesis?inspRecordId=${e.currentTarget.dataset.item.id}`, }) }, handelClickShare(e) { diff --git a/pages/work/work.wxml b/pages/work/work.wxml index c778ccb..07c7a6c 100644 --- a/pages/work/work.wxml +++ b/pages/work/work.wxml @@ -57,7 +57,7 @@ - + 满意度自查 @@ -80,7 +80,7 @@ - + {{item.agencyName}}{{item.monthName}}月份满意度自查 已提交:{{item.personQty}}人 diff --git a/project.private.config.json b/project.private.config.json index 53d4e06..5ca9880 100644 --- a/project.private.config.json +++ b/project.private.config.json @@ -8,6 +8,13 @@ "condition": { "miniprogram": { "list": [ + { + "name": "设置", + "pathName": "subpages/settings/pages/index/index", + "query": "", + "launchMode": "default", + "scene": null + }, { "name": "选择居民", "pathName": "subpages/demandCheck/pages/dissatisfied/searchResi/searchResi", diff --git a/subpages/communitySelfInsp/pages/historyQuery/historyQuery.js b/subpages/communitySelfInsp/pages/historyQuery/historyQuery.js index f109d92..e946ccc 100644 --- a/subpages/communitySelfInsp/pages/historyQuery/historyQuery.js +++ b/subpages/communitySelfInsp/pages/historyQuery/historyQuery.js @@ -150,7 +150,9 @@ Page({ // url: `/subpages/addhouse/pages/addhouse/addhouse?type=edit&houseId=${e.currentTarget.dataset.item.id}`, // }) // } - + wx.navigateTo({ + url: `/subpages/communitySelfInsp/pages/synthesis/synthesis?inspRecordId=${e.currentTarget.dataset.item.id}`, + }) }, back() { //返回上一级,关闭当前页面 diff --git a/subpages/communitySelfInsp/pages/synthesis/synthesis.js b/subpages/communitySelfInsp/pages/synthesis/synthesis.js index b0f2268..737bd14 100644 --- a/subpages/communitySelfInsp/pages/synthesis/synthesis.js +++ b/subpages/communitySelfInsp/pages/synthesis/synthesis.js @@ -20,9 +20,11 @@ Page({ * 生命周期函数--监听页面加载 */ onLoad(options) { + console.log(options); this.setData({ statusHeight: app.globalData.deviceInfo.statusHeight, navigationHeight: app.globalData.deviceInfo.navigationHeight, + inspRecordId:options.inspRecordId }) this.getSynthesis() @@ -30,8 +32,8 @@ Page({ getSynthesis(){ let parm = { - period:'2023-09', - inspRecordId:'' + period:'', + inspRecordId:this.data.inspRecordId } getSynthesis(parm).then(res=>{ this.setData({ diff --git a/subpages/demandCheck/pages/dissatisfied/demandCheck/demandCheck.js b/subpages/demandCheck/pages/dissatisfied/demandCheck/demandCheck.js index bb78275..7dc5ce2 100644 --- a/subpages/demandCheck/pages/dissatisfied/demandCheck/demandCheck.js +++ b/subpages/demandCheck/pages/dissatisfied/demandCheck/demandCheck.js @@ -19,13 +19,16 @@ Page({ voiceList:[], latitude:"", longitude:"", - resiId:"1698525635288653825", + resiId:"", happenTime:"", content:"",//内容 - address:""//地址 + address:"",//地址 + wantServiceTime:"", + reportType:'' }, minDate: '2018-01-01 00:00:00', - timeLabel: '', + + tabVal:"0", uploadImageList: [],//图片上传的数组 streetList: [], // 街道 @@ -61,21 +64,25 @@ Page({ // defaultFieldNames: { label: 'agencyName', value: 'agencyId', children: 'subAgencyList' }, angencyVisible: false, - angencyValue: [], + + measureList:[], + measureValue:'', + measureVisible:false, + + reportUserName:'', + reportUserMobile:'', + + showWantServiceTimeTime:'', + + reportTypeList:[],//上报类型 + reportTypeVisible:false }, /** * 生命周期函数--监听页面加载 */ onLoad(options) { - console.log(options); - if(options.resiId){ - this.setData({ - "fmData.resiId":options.resiId, - resiName:options.resiName, - resiMobile:options.mobile - }) - } + this.data.qqMapWX = new QQMapWX({ key: 'CMJBZ-4DECI-JXGGN-5B4WU-QLV2H-B5BEJ' }) @@ -84,9 +91,13 @@ Page({ }) this.setData({ 'fmData.time': Date.now(), - angencyId:app.globalData.user.agencyId + angencyId:app.globalData.user.agencyId, + reportUserName:app.globalData.user.realName, + reportUserMobile:app.globalData.user.phone, }) this.getAgencygridtree() + this.getDemandoption() + this.getDictList() }, // 组织树 getAgencygridtree() { @@ -103,15 +114,33 @@ Page({ console.log(err); }) }, - - + getDictList(){ + api.getDictList('user_demand_report_type').then(res=>{ + console.log(res); + this.setData({ + reportTypeList:res.data + }) + }).catch(err=>{ + console.log(err); + }) + }, + getDemandoption(){ + api.getDemandoption().then(res=>{ + console.log(res); + this.setData({ + measureList:res.data + }) + }).catch(err=>{ + console.log(err); + }) + }, // 触底函数 onReachBottom() { if (this.projectlist) { this.projectlist.onReachBottom() } }, - + //跳转地图选点 toughGetLocation() { this.getLocation(false); wx.chooseLocation({ @@ -180,20 +209,82 @@ Page({ } if (this.data.uploadImageList.length > 0) { this.data.uploadImageList.forEach(item => { - imagesList.push(item.ossUrl) + imagesList.push({format:item.format,originFileName:item.originFileName,url:item.ossUrl.url,type:item.type}) }) } this.setData({ 'fmData.attachmentList': imagesList, }) - console.log(this.data.fmData); - this.submitItem() + console.log(this.data.tabVal); + if(!this.data.fmData.gridId){ + this.showToast('所属组织不能为空') + return + } + if(this.data.tabVal === '1'){ + if(!this.data.fmData.content){ + this.showToast('需求描述不能为空') + return + } + if(!this.data.fmData.content){ + this.showToast('需求描述不能为空') + return + } + if(!this.data.fmData.categoryCode){ + this.showToast('需求类型不能为空') + return + } + if(!this.data.fmData.reportType){ + this.showToast('上报类型不能为空') + return + } + if(!this.data.fmData.happenTime){ + this.showToast('需求时间不能为空') + return + } + if(!this.data.fmData.wantServiceTime){ + this.showToast('服务时间不能为空') + return + } + if(!this.data.fmData.resiId){ + this.showToast('需求人不能为空') + return + } + if(!this.data.resiMobile){ + this.showToast('需求人电话不能为空') + return + } + }else{ + if(!this.data.fmData.content){ + this.showToast('事件描述不能为空') + return + } + if(!this.data.fmData.happenTime){ + this.showToast('发生时间不能为空') + return + } + if(!this.data.fmData.address){ + this.showToast('发生地点不能为空') + return + } + if(!this.data.fmData.resiId){ + this.showToast('联系人不能为空') + return + } + if(!this.data.resiMobile){ + this.showToast('联系人电话不能为空') + return + } + } + if(this.data.tabVal ==='1'){ + + this.submitMeasure() + }else{ + this.submitEven() + } }, - - - // 提交接口 - submitItem() { + // 事件提交接口 + submitEven() { wx.showLoading({ title: '提交中...', mask: true @@ -202,35 +293,127 @@ Page({ submitDisabled: true }) const para = this.data.fmData - para.resiId = '1501821695344775169' - para.gridId = '9c55c566524a8b171df57a792d2933bd' - para.happenTime = '2023-04-05 03:07:00' + console.log(para,'事件'); api.addEvent(para).then(res => { + wx.hideLoading() + console.log(res); + if (res.code === 0) { + wx.showModal({ + title: '提示', + content: `您的诉求我们已经查收,正在快马加鞭办理,请您耐心等待`, + confirmText: '确认', + showCancel: false, + success: res => { + this.setData({ + submitDisabled: false, + uploadImageList: [], + uploadRecord: { + uploaded: true, + url: "" + }, + agencyName:'', + showTime:'', + resiName:'', + resiMobile:'', + 'fmData.time':'', + 'fmData.gridId':'', + 'fmData.attachmentList':[],//图片 + 'fmData.voiceList':[], + 'fmData.latitude':"", + 'fmData.longitude':"", + 'fmData.resiId':"", + 'fmData.happenTime':"", + 'fmData.content':"",//内容 + 'fmData.address':"",//地址 + 'fmData.wantServiceTime':"", + 'fmData.reportType':'' + }) + } + }) + wx.removeStorageSync('resiDetail') + } else { + wx.showToast({ + title: "提交失败,请重试~", + icon: "none", + duration: 1500 + }) + this.setData({ + submitDisabled: false + }) + } + }).catch(err => { + console.log(err) + wx.hideLoading() + this.setData({ + submitDisabled: false + }) + }) + }, + // 个性服务提交 + submitMeasure(){ + wx.showLoading({ + title: '提交中...', + mask: true + }) + + this.setData({ + submitDisabled: true + }) + let {categoryCode,content,happenTime,resiId,gridId,attachmentList,voiceList,wantServiceTime,parentCode,reportType} = this.data.fmData + const para ={ + categoryCode, + content, + reportUserName:this.data.reportUserName, + reportTime:happenTime, + reportUserMobile:this.data.reportUserMobile, + demandUserId:resiId, + gridId, + reportType, + attachmentList:[...attachmentList,...voiceList], + wantServiceTime, + parentCode:parentCode + } + console.log(para,'服务'); + api.addMeasure(para).then(res => { wx.hideLoading() console.log(res); if (res.data) { wx.showModal({ title: '提示', - content: `您的诉求我们已经查收,正在快马加鞭办理,请您耐心等待\r\n诉求编号为:${res.data}`, + content: `您的需求我们已经查收,正在快马加鞭办理,请您耐心等待`, confirmText: '确认', showCancel: false, success: res => { this.setData({ submitDisabled: false, - 'personalInfo.nickname': '', - 'personalInfo.itemContent': '', - 'personalInfo.itemVoice': '', - 'personalInfo.duration': '', - 'personalInfo.images': [], uploadImageList: [], uploadRecord: { uploaded: true, url: "" }, + agencyName:'', + showTime:'', + resiName:'', + resiMobile:'', + categoryName:'', + reportTypeName:'', + showWantServiceTimeTime:'', + 'fmData.time':'', + 'fmData.gridId':'', + 'fmData.attachmentList':[],//图片 + 'fmData.voiceList':[], + 'fmData.latitude':"", + 'fmData.longitude':"", + 'fmData.resiId':"", + 'fmData.happenTime':"", + 'fmData.content':"",//内容 + 'fmData.address':"",//地址 + 'fmData.wantServiceTime':"", + 'fmData.reportType':'' }) - this.projectlist = this.selectComponent('#projectlist') } }) + wx.removeStorageSync('resiDetail') } else { wx.showToast({ title: "提交失败,请重试~", @@ -249,8 +432,6 @@ Page({ }) }) }, - - // 双向绑定 内容输入框 bindTextareaInput(e) { this.setData({ @@ -266,8 +447,6 @@ Page({ }) }, - - // 录音end // 选择图片 上传弹窗 - 上传图片方式 - 选择图片 - 上传图片 - 回调赋值 chooseImage() { if (this.data.uploadImageList.length > 3) { @@ -281,24 +460,28 @@ Page({ $wuxActionSheet().showSheet({ buttons: [ { text: '拍照' }, - { text: '从相册中获取' }, + { text: '从相册中获取',openType:null, }, ], className: 'dialog-class', buttonClicked(index) { if (index === 0) { - wx.chooseImage({ + wx.chooseMedia({ count: 1, sizeType: ['original', 'compressed'], sourceType: ['camera'], success(res) { + console.log(res); let deleteLength = _this.data.uploadImageList.length const uploadImageList = [..._this.data.uploadImageList] if (res.tempFiles[0].size <= 5 * 1024 * 1024) { uploadImageList.push({ uploaded: false, ossUrl: '', - imgUrl: res.tempFiles[0].path, - imageId: ++_this.data.imageId + imgUrl: res.tempFiles[0].tempFilePath, + imageId: ++_this.data.imageId, + type:res.tempFiles[0].tempFilePath.substr(res.tempFiles[0].tempFilePath.length -3,3), + format:"image", + name:'wximage' }) } else { _this.showToast('图片上限5M,请压缩后重试~') @@ -309,7 +492,7 @@ Page({ }) wx.uploadFile({ url: `${config.BASEURL()}oss/file/uploadvariedfile`, - filePath: res.tempFilePaths[0], + filePath: res.tempFiles[0].tempFilePath, name: 'file', header: { 'Content-type': 'application/json;charset=UTF-8', @@ -344,23 +527,25 @@ Page({ } }) } else if (index === 1) { - wx.chooseImage({ + wx.chooseMedia({ count: 1, - sizeType: ['original', 'compressed'], + type:'image', sourceType: ['album'], success(res) { - console.log(res,'图片上传的res'); - + console.log(res,'图片上传的res'); let deleteLength = _this.data.uploadImageList.length const uploadImageList = [] const endIndex = _this.data.uploadImageList.length - res.tempFiles.forEach(item => { + res.tempFiles.forEach((item,index) => { if (item.size <= 5 * 1024 * 1024) { uploadImageList.push({ uploaded: false, ossUrl: '', - imgUrl: item.path, - imageId: ++_this.data.imageId + imgUrl: item.tempFilePath, + imageId: ++_this.data.imageId, + format:"image", + type:item.tempFilePath.substr(item.tempFilePath.length -3,3), + originFileName:'image' + index + 1 }) } else { _this.showToast('图片上限5M,请压缩后重试~') @@ -373,7 +558,7 @@ Page({ return (function (index) { wx.uploadFile({ url: `${config.BASEURL()}oss/file/uploadvariedfile`, - filePath: res.tempFilePaths[index], + filePath: res.tempFiles[index].tempFilePath, name: 'file', header: { 'Content-type': 'application/json;charset=UTF-8', @@ -394,7 +579,6 @@ Page({ uploadImageList: [..._this.data.uploadImageList, ...uploadImageList] }) } - console.log(_this.data.uploadImageList.length, '图片上传长度'); }, fail(fileRes) { _this.setData({ @@ -434,37 +618,6 @@ Page({ }) }, - // 街道社区 - getDeptTree() { - getDeptTree().then(res => { - this.setData({ - streetList: res.data[0].children - }) - if (this.data.personalInfo.streetId && this.data.personalInfo.communityId) { - this.data.streetList.forEach(element => { - if (element.value == this.data.personalInfo.streetId) { - this.setData({ - 'personalInfo.street': element.label, - communityList: element.children // 社区 - }) - // 循环社区 - element.children.forEach(community => { - if (community.value == this.data.personalInfo.communityId) { - this.setData({ - 'personalInfo.community': community.label, - gridList: community.children - // 'personalInfo.grid': community.children[0].label, // 网格默认选择第一个 - // 'personalInfo.gridId': community.children[0].value // 网格 - }) - } - }); - } - }); - } - }).catch(err => { - console.log(err) - }) - }, // 单选点击事件 inputSyncPicker(e) { let { @@ -518,8 +671,6 @@ Page({ if (this.data.personalInfo.communityId == element.value) { this.setData({ gridList: element.children - // 'personalInfo.grid': element.children[0].label, // 网格默认选择第一个 - // 'personalInfo.gridId': element.children[0].value // 网格 }) } }); @@ -532,12 +683,10 @@ Page({ success(res) { console.log(res); _this.setData({ - fmData: { - addressContent: res.result.address, - address: res.result.address, - longitude:res.result.location.lng, - latitude:res.result.location.lat - }, + addressContent:res.result.address, + 'fmData.address': res.result.address, + 'fmData.longitude':res.result.location.lng, + 'fmData.latitude':res.result.location.lat, }) }, fail(err) { @@ -547,32 +696,54 @@ Page({ }, onConfirmDate(e) { - console.log(e); this.setData({ 'fmData.happenTime': e.detail.label + ':00', - timeLabel: e.detail.displayValue.join(' '), - visibleTime: false + visibleTime: false, + showTime:e.detail.label + ':00' + }) + }, + onConfirmWantServiceTime(e){ + this.setData({ + 'fmData.wantServiceTime': e.detail.label + ':00', + visibleTimeWantServiceTime: false, + showWantServiceTimeTime:e.detail.label + ':00' }) }, - onVisibleChange(e) { - this.setData({ - // timeLabel: e.detail.displayValue.join(' '), - }) + //时间组件隐藏 + onCancel(e) { + this.setData({ + visibleTime: false, + visibleTimeWantServiceTime:false + }) }, - onCancel() { + bindMobile(e){ this.setData({ - visibleTime: false + resiMobile:e.detail.value }) }, - showTimePicker() { + getCurrentDateTime() { + const date = new Date(); + const year = date.getFullYear(); + const month = (1 + date.getMonth()).toString().padStart(2, '0'); // Months are zero-based. + const day = date.getDate().toString().padStart(2, '0'); + const hours = date.getHours().toString().padStart(2, '0'); + const minutes = date.getMinutes().toString().padStart(2, '0'); + const seconds = date.getSeconds().toString().padStart(2, '0'); + return year + '-' + month + '-' + day + ' ' + hours + ':' + minutes + ':' + seconds; + }, + showTimePicker(e) { this.setData({ - visibleTime: true + visibleTime: true, + maxDate:this.getCurrentDateTime(), + 'fmData.happenTime':this.getCurrentDateTime(), }) }, - onPageScroll: function (e) { - if (this.projectlist) { - this.projectlist.onPageScroll(e) - } + showTimePickerW(e) { + this.setData({ + visibleTimeWantServiceTime: true, + maxDate:this.getCurrentDateTime(), + 'fmData.wantServiceTime':this.getCurrentDateTime(), + }) }, /** @@ -586,21 +757,28 @@ Page({ * 生命周期函数--监听页面显示 */ onShow() { - + let resiDetail = wx.getStorageSync('resiDetail') + if(resiDetail){ + this.setData({ + "fmData.resiId":resiDetail.resiId, + resiName:resiDetail.resiName, + resiMobile:resiDetail.resiMobile + }) + } }, /** * 生命周期函数--监听页面隐藏 */ onHide() { - + wx.removeStorageSync('resiDetail') }, /** * 生命周期函数--监听页面卸载 */ onUnload() { - + wx.removeStorageSync('resiDetail') }, /** @@ -616,9 +794,7 @@ Page({ */ // /page/user?id=123 onShareAppMessage() { - return { - path: 'pages/peopleLivelihood/peopleLivelihood', - } + }, handleRecordDel() { const { hasStop, isStart } = this.data @@ -700,20 +876,21 @@ Page({ recordingTime: '00:00' }) } else { - let { recordingLength } = this.data - if (duration - (recordingLength * 1000) > 1000 ) duration = recordingLength * 1000 + // let { recordingLength } = this.data + // if (duration - (recordingLength * 1000) > 1000 ) duration = recordingLength * 1000 + let url = JSON.parse(fileRes.data).data.url + let fileName = Date.now()+ Math.floor(Math.random() * 1000) this.setData({ "uploadRecord.uploaded": true, - "uploadRecord.url": JSON.parse(fileRes.data).data, - 'fmData.voiceList':[JSON.parse(fileRes.data).data], + "uploadRecord.url": url, + 'fmData.voiceList':[{url:url,format:null,type:'mp3',duration,originFileName:fileName.toString()}], showRecord: false, hasStart: false, isStart: false, recordingTime: '00:00', - duration }) this.downLoadAudio() - console.log(this.data.uploadRecord); + console.log(this.data.fmData.voiceList); } }, fail: (fileRes) => { @@ -869,7 +1046,7 @@ Page({ showRecord: false }) }, - hidePicker() { + hidePickerAngency() { this.setData({ angencyVisible: false }) @@ -880,18 +1057,25 @@ Page({ }) }, onConfirmAngecy(e) { - console.log(e); this.setData({ agencyName: e.detail.label, 'fmData.gridId': e.detail.value[e.detail.value.length - 1], angencyVisible: false }) - console.log(this.data.fmData); }, - onValueChange(e) { + onConfirmReportType(e){ console.log(e); + this.setData({ + reportTypeName: e.detail.label, + 'fmData.reportType': e.detail.value[0], + reportTypeVisible: false + }) + }, + hidePickerReportType(){ + this.setData({ + reportTypeVisible: false + }) }, - // 播放逻辑 initDuration() { var _a = this.data, duration = _a.duration; @@ -905,7 +1089,7 @@ Page({ downLoadAudio() { var _this = this; wx.downloadFile({ - url: this.data.uploadRecord.url.url, + url: this.data.uploadRecord.url, success(res) { console.log(res); if (res.statusCode === 200) { @@ -995,6 +1179,16 @@ Page({ }); console.log('innerAudioContext', innerAudioContext); }, + // 需求分类 + onConfirmMeasure(e){ + console.log(e); + this.setData({ + 'fmData.categoryCode':e.detail.selectedValue[1], + 'fmData.parentCode':e.detail.selectedValue[0], + categoryName:e.detail.label, + measureVisible:false + }) + }, slideChange(e) { this.audioPause(); var value = e.detail.value; @@ -1017,6 +1211,27 @@ Page({ 'fmData.voiceList':[] }) }, + + showMeasurePicker(){ + this.setData({ + measureVisible:true + }) + }, + showReportTypePicker(){ + this.setData({ + reportTypeVisible:true + }) + }, + hidePickerMeasure(){ + this.setData({ + measureVisible:false + }) + }, + handleChangeType(e){ + this.setData({ + tabVal:e.detail.value + }) + }, format(num) { let min = parseInt(num / 1000 / 60) let second = parseInt(num / 1000) % 60 diff --git a/subpages/demandCheck/pages/dissatisfied/demandCheck/demandCheck.wxml b/subpages/demandCheck/pages/dissatisfied/demandCheck/demandCheck.wxml index 3d9f6bc..49fc886 100644 --- a/subpages/demandCheck/pages/dissatisfied/demandCheck/demandCheck.wxml +++ b/subpages/demandCheck/pages/dissatisfied/demandCheck/demandCheck.wxml @@ -3,29 +3,49 @@ + - - * - 所属组织 - - - {{agencyName?agencyName:'请选择'}} + + * + 所属组织 + + + {{agencyName?agencyName:'请选择'}} + + - - * 诉求类型 - - 事件上报 - 居民需求 + + 事件上报 + 居民需求 - + + + * + 需求类型 + + + {{categoryName?categoryName:'请选择'}} + + + + + + * + 上报类型 + + + {{reportTypeName?reportTypeName:'请选择'}} + + + @@ -34,10 +54,10 @@ * - 事件描述 + {{tabVal==='1'?'需求描述':'事件描述'}} - @@ -79,27 +99,37 @@ * - 发生时间 + {{tabVal === '1'?'需求时间':'发生时间'}} - {{timeLabel?timeLabel:'请选择发生时间'}} + {{showTime?showTime:'请选择'}} - + + + * + 服务时间 + + + {{showWantServiceTimeTime?showWantServiceTimeTime:'请选择'}} + + + + * 发生地点 - {{fmData.addressContent}} + {{addressContent}} * - 联系人 + {{tabVal === '1'?'需求人':'联系人'}} @@ -114,9 +144,10 @@ 联系电话 - + + @@ -160,25 +191,60 @@ + + + + + + + + \ No newline at end of file diff --git a/subpages/demandCheck/pages/dissatisfied/searchResi/searchResi.js b/subpages/demandCheck/pages/dissatisfied/searchResi/searchResi.js index 207274b..329caaa 100644 --- a/subpages/demandCheck/pages/dissatisfied/searchResi/searchResi.js +++ b/subpages/demandCheck/pages/dissatisfied/searchResi/searchResi.js @@ -285,8 +285,17 @@ Page({ }, toDemandCheck(){ console.log(111); - wx.navigateTo({ - url: '/subpages/demandCheck/pages/dissatisfied/demandCheck/demandCheck?resiId=' + this.data.resiId + '&mobile=' + this.data.resiMobile + "&resiName=" + this.data.resiName, - }) + // wx.navigateTo({ + // url: '/subpages/demandCheck/pages/dissatisfied/demandCheck/demandCheck?resiId=' + this.data.resiId + '&mobile=' + this.data.resiMobile + "&resiName=" + this.data.resiName, + // }) + wx.navigateBack({ + delta:1 + }) + let obj ={ + resiId : this.data.resiId, + resiMobile : this.data.resiMobile, + resiName:this.data.resiName + } + wx.setStorageSync('resiDetail',obj) } }) \ No newline at end of file diff --git a/subpages/demandCheck/pages/dissatisfied/searchResi/searchResi.wxml b/subpages/demandCheck/pages/dissatisfied/searchResi/searchResi.wxml index 1504fe4..1b510e6 100644 --- a/subpages/demandCheck/pages/dissatisfied/searchResi/searchResi.wxml +++ b/subpages/demandCheck/pages/dissatisfied/searchResi/searchResi.wxml @@ -26,7 +26,7 @@ 地址:{{item.homeName}} - + @@ -103,7 +103,9 @@ {{loadMoreVisible?'如果找不到该居民的信息,您也可以先':'加载中...'}}新增居民 - - 身份证识别 + + + 身份识别:是在居民出示身份证原件或图片得到场合下,通过OCR技术拍摄识别身份证信息 + - + diff --git a/subpages/demandCheck/pages/dissatisfied/searchResi/searchResi.wxss b/subpages/demandCheck/pages/dissatisfied/searchResi/searchResi.wxss index 0b39bb6..c1e3830 100644 --- a/subpages/demandCheck/pages/dissatisfied/searchResi/searchResi.wxss +++ b/subpages/demandCheck/pages/dissatisfied/searchResi/searchResi.wxss @@ -9,7 +9,7 @@ page{ color: white; } .header{ - min-height: 90rpx; + min-height: 70rpx; display: flex; flex-direction: column; background-color: #ffff; @@ -248,4 +248,10 @@ button{ .form_card .form_item .input image{ height: 22rpx; width: 22rpx; +} +.card{ + padding: 100rpx 60rpx 0; + box-sizing: border-box; + display: flex; + flex-direction: column; } \ No newline at end of file diff --git a/pages/resetPassword/resetPassword.js b/subpages/settings/pages/index/index.js similarity index 53% rename from pages/resetPassword/resetPassword.js rename to subpages/settings/pages/index/index.js index 5e107e7..500c79f 100644 --- a/pages/resetPassword/resetPassword.js +++ b/subpages/settings/pages/index/index.js @@ -1,4 +1,5 @@ -// pages/resetPassword/resetPassword.js +// subpages/settings/pages/index/index.js +import api from "../../../../utils/api" Page({ /** @@ -62,5 +63,27 @@ Page({ */ onShareAppMessage() { + }, + handelLogout(){ + wx.showModal({ + title: '提示', + content: `确定退出?`, + confirmText: '确认', + showCancel: false, + success: res => { + api.logout().then(res=>{ + wx.reLaunch({ + url: '/pages/login/login', + }) + wx.removeStorage({ + key: 'token', + }) + console.log(res); + }).catch(err=>{ + console.log(err); + }) + } + }) + } }) \ No newline at end of file diff --git a/subpages/settings/pages/index/index.json b/subpages/settings/pages/index/index.json new file mode 100644 index 0000000..2bd39b1 --- /dev/null +++ b/subpages/settings/pages/index/index.json @@ -0,0 +1,4 @@ +{ + "usingComponents": {}, + "navigationBarTitleText": "设置" +} \ No newline at end of file diff --git a/subpages/settings/pages/index/index.wxml b/subpages/settings/pages/index/index.wxml new file mode 100644 index 0000000..24d15bf --- /dev/null +++ b/subpages/settings/pages/index/index.wxml @@ -0,0 +1,23 @@ + + + + + 用户协议 + + + + + + 隐私协议 + + + + + + 修改密码 + + + + + + \ No newline at end of file diff --git a/subpages/settings/pages/index/index.wxss b/subpages/settings/pages/index/index.wxss new file mode 100644 index 0000000..b9f580f --- /dev/null +++ b/subpages/settings/pages/index/index.wxss @@ -0,0 +1,42 @@ +/* subpages/settings/pages/index/index.wxss */ +page{ + background-color:#f7f7f7 ; + overflow: hidden; + padding:20rpx; + box-sizing: border-box; +} +.card{ + border-radius: 20rpx; + background-color: #fff; + padding: 0 20rpx; + box-sizing: border-box; + +} +.card .item{ + display: flex; + justify-content: space-between; + height: 100rpx; + align-items: center; + font-size: 32rpx; + font-family: PingFang SC; + font-weight: 500; + color: #333333; + border-bottom: 2rpx solid #f7f7f7; +} +.card .item image{ + width: 20rpx; + height: 20rpx; +} +button{ + background: linear-gradient(to right, #82b4fd, #3e93fe); + font-size: 33rpx; + width: 600rpx !important; + height: 84rpx; + text-align: center; + color: #fff; + border-radius: 84rpx; + position: fixed; + bottom: 100rpx; + left: 50%; + transform: translateX(-300rpx); +} \ No newline at end of file diff --git a/utils/api.js b/utils/api.js index 158d8fb..ff11011 100644 --- a/utils/api.js +++ b/utils/api.js @@ -37,7 +37,9 @@ module.exports = { logout, getAgencygridtree, addEvent, - getResidentBaseInfoPage + getResidentBaseInfoPage, + getDemandoption, + addMeasure } // 消息列表 function getIntelligentMessage(param){ @@ -188,7 +190,15 @@ function getAgencygridtree () { function addEvent (parm) { return fly.post(`governance/icEvent/add-event-resi`,parm) } -// 上报诉求 +// 上报诉求中选择居民 function getResidentBaseInfoPage (parm) { return fly.post(`actual/base/residentBaseInfo/page`,parm) } +// 获取需求分类树 +function getDemandoption (parm) { + return fly.post(`governance/icresidemanddict/demandoption`,parm) +} +// 上报诉求 +function addMeasure(parm) { + return fly.post(`governance/userdemand/add`,parm) +} diff --git a/utils/config.js b/utils/config.js index 3f03bfa..f262e68 100644 --- a/utils/config.js +++ b/utils/config.js @@ -7,8 +7,7 @@ module.exports = { function BASEURL() { // return 'https://epdc-shibei.elinkservice.cn/epdc-api/api/' // 正式环境 - // return 'https://epmet-preview.elinkservice.cn/api/' // 演示环境 - return 'http://localhost:8080/api/' // 演示环境 + return 'https://epmet-preview.elinkservice.cn/api/' // 演示环境 // return 'http://192.168.1.144/api/' //测试环境 }