Browse Source

一键服务中我要举报改为我的诉求并增加诉求须知协议;

release
ZhaoTongYao 5 years ago
parent
commit
4f66227d0f
  1. 2
      pages/toRegister/toRegister.js
  2. 65
      subpages/oneKeyService/compontents/richTextDialog/richTextDialog.js
  3. 6
      subpages/oneKeyService/compontents/richTextDialog/richTextDialog.json
  4. 16
      subpages/oneKeyService/compontents/richTextDialog/richTextDialog.wxml
  5. 89
      subpages/oneKeyService/compontents/richTextDialog/richTextDialog.wxss
  6. BIN
      subpages/oneKeyService/images/jubaojilu.png
  7. 49
      subpages/oneKeyService/pages/reportIssue/reportIssue.js
  8. 5
      subpages/oneKeyService/pages/reportIssue/reportIssue.json
  9. 14
      subpages/oneKeyService/pages/reportIssue/reportIssue.wxml
  10. 25
      subpages/oneKeyService/pages/reportIssue/reportIssue.wxss
  11. 2
      subpages/oneKeyService/pages/reportIssueDetail/reportIssueDetail.json
  12. 8
      subpages/oneKeyService/pages/reportIssueDetail/reportIssueDetail.wxml
  13. 2
      subpages/oneKeyService/pages/reportIssueList/reportIssueList.json

2
pages/toRegister/toRegister.js

@ -21,7 +21,7 @@ Page({
// } // }
// }) // })
let that = this let that = this
const versionNum = "1.6.22" const versionNum = "1.6.23"
api.getScanSwitch(versionNum).then(function (res) { api.getScanSwitch(versionNum).then(function (res) {
console.log(res.data) console.log(res.data)
let state = res.data.scanFlag let state = res.data.scanFlag

65
subpages/oneKeyService/compontents/richTextDialog/richTextDialog.js

@ -0,0 +1,65 @@
Component({
data: {
visible: false
},
properties: {
dialogVisible: {
type: Boolean,
value: false,
observer: function () {
this.setData({
visible: !this.data.visible
})
}
},
title: {
type: String,
value: ""
},
content: {
type: String,
value: ""
},
confirmText: {
type: String,
value: ""
},
cancelText: {
type: String,
value: ""
}
},
pageLifetimes: {
show () {
},
hide () {
}
},
lifetimes: {
attached () {
},
detached () {
}
},
methods: {
close () {
this.triggerEvent("close")
this.setData({
visible: false
})
},
confirm () {
this.triggerEvent("confirm")
this.setData({
visible: false
})
},
catchmove () {
}
}
})

6
subpages/oneKeyService/compontents/richTextDialog/richTextDialog.json

@ -0,0 +1,6 @@
{
"component": true,
"usingComponents": {
"parser": "../../../../components/parser/parser"
}
}

16
subpages/oneKeyService/compontents/richTextDialog/richTextDialog.wxml

@ -0,0 +1,16 @@
<view class="notice" wx:if="{{visible}}" catchmove="catchmove">
<view class="box">
<view class="close">
<!-- <image bindtap="close" src="../../images/delete.png" /> -->
</view>
<view class="title">{{title}}</view>
<view class="content">
<parser html="{{content}}"></parser>
</view>
<view wx:if="{{cancelText !== '' || confirmText !== ''}}" class="border"></view>
<view class="operation">
<view wx:if="{{cancelText !== ''}}" class="cancel" bindtap="close">{{cancelText}}</view>
<view wx:if="{{confirmText !== ''}}" class="confirm" bindtap="confirm">{{confirmText}}</view>
</view>
</view>
</view>

89
subpages/oneKeyService/compontents/richTextDialog/richTextDialog.wxss

@ -0,0 +1,89 @@
.notice {
width: 100%;
height: 100vh;
position: fixed;
z-index: 100;
left: 0;
top: 0;
background: rgba(0,0,0, 0.4);
display: flex;
justify-content: center;
align-items: center;
}
.notice .box {
width: 480rpx;
background: #fff;
border-radius: 16rpx;
overflow: hidden;
padding: 0 20rpx;
position: relative;
}
.notice .box .close {
width:100%;
height: 60rpx;
display: flex;
justify-content: flex-end;
align-items: center;
}
.notice .box .close cover-image {
width: 40rpx;
height: 40rpx;
object-fit: cover;
}
.notice .box .title {
height: 60rpx;
line-height: 60rpx;
width: 100%;
text-align:center;
font-size: 36rpx;
color: #333;
margin-bottom: 23rpx;
}
.notice .box .content {
height: 480rpx;
width: 100%;
padding-bottom: 35rpx;
white-space: normal;
}
.notice .box .content view {
font-size: 30rpx;
line-height: 50rpx;
height: 50rpx;
width: 100%;
text-align: center;
color: #666;
}
.notice .box .border {
width: 100%;
height: 0;
border: 0.5rpx solid #eaeaea;
border-bottom: 1rpx solid transparent;
position: absolute;
left:0;
bottom: 105rpx;
}
.notice .box .operation {
width: calc(100% - 40rpx);
height: 75rpx;
padding: 15rpx 0;
display: flex;
justify-content: space-around;
align-items: center;
margin-left: 20rpx
}
.notice .box .operation view {
flex: 1;
color: #999;
font-size: 36rpx;
width: 49%;
height: 100%;
line-height: 75rpx;
text-align:center;
}
.notice .box .operation .confirm{
color: #04BCA0;
}
rich-text {
height: 480rpx;
}

BIN
subpages/oneKeyService/images/jubaojilu.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.4 KiB

After

Width:  |  Height:  |  Size: 22 KiB

49
subpages/oneKeyService/pages/reportIssue/reportIssue.js

@ -1,5 +1,6 @@
// subpages/heart/pages/myApply/myApply.js // subpages/heart/pages/myApply/myApply.js
const api = require("../../../../utils/api") const api = require("../../../../utils/api")
const understand_api = require("../../../../utils/understandJs")
Page({ Page({
@ -21,13 +22,27 @@ Page({
lock: false, //锁定提交状态,防止连击, lock: false, //锁定提交状态,防止连击,
violationsCount: 0, //内容审核计数 violationsCount: 0, //内容审核计数
isConReview: false, //内容审核标志 isConReview: false, //内容审核标志
isAgree: false, //是否 勾选已阅读
agreement: {}, //须知内容
agreementVisible: false, //是否显示 诉求须知 内容
}, },
/** /**
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
onLoad: function (options) { onLoad: function (options) {
let params = {
pageIndex: 1,
pageSize: 10,
noticeCategory: 'notice_jsqf_wyjb'
}
understand_api.noticelist(params).then(res => {
console.log(res.data[0])
this.data.agreement = { ...res.data[0] }
this.setData({
agreement: this.data.agreement
})
}).catch(err => { })
}, },
/** /**
@ -104,17 +119,21 @@ Page({
//提交申请 //提交申请
submitIssue () { submitIssue () {
if (!this.data.isAgree) {
this.showToast("请先勾选我已阅读并同意诉求须知")
return false
}
if (this.data.lock) { if (this.data.lock) {
this.showToast("正在提交,请耐心等待...") this.showToast("正在提交,请耐心等待...")
return false return false
} }
if (!this.data.dataForm.content) { if (!this.data.dataForm.content) {
this.showToast("请填写举报的问题") this.showToast("请填写诉求内容")
return false return false
} }
if ( this.data.dataForm.anonymousFlag == '0') { if ( this.data.dataForm.anonymousFlag == '0') {
if (!this.data.dataForm.reportUser) { if (!this.data.dataForm.reportUser) {
this.showToast("请填写举报人姓名") this.showToast("请填写诉求人姓名")
return false return false
} }
if (this.data.dataForm.reportUser.length > 50) { if (this.data.dataForm.reportUser.length > 50) {
@ -122,7 +141,7 @@ Page({
return false return false
} }
if (!this.data.dataForm.reportUserMobile) { if (!this.data.dataForm.reportUserMobile) {
this.showToast("请填写举报人电话") this.showToast("请填写诉求人电话")
return false return false
} }
if (this.data.dataForm.reportUserMobile.length > 20) { if (this.data.dataForm.reportUserMobile.length > 20) {
@ -209,7 +228,7 @@ Page({
duration: 2000 duration: 2000
}) })
}, },
//跳转到我的举报列表 //跳转到我的列表
toIssueList () { toIssueList () {
wx.navigateTo({ wx.navigateTo({
url: "/subpages/oneKeyService/pages/reportIssueList/reportIssueList" url: "/subpages/oneKeyService/pages/reportIssueList/reportIssueList"
@ -225,5 +244,25 @@ Page({
if (this.data.errMsg.length == 0) { if (this.data.errMsg.length == 0) {
wx.navigateBack() wx.navigateBack()
} }
},
checkboxChange (e) {
let value = e.detail.value
this.setData({
isAgree: value.length > 0 ? true : false
})
},
//是否显示 诉求须知 对话框
showAgreement () {
this.setData({
agreementVisible: true
})
},
// 关闭 诉求须知 回调函数
confirmAgreement () {
this.setData({
agreementVisible: false
})
} }
}) })

5
subpages/oneKeyService/pages/reportIssue/reportIssue.json

@ -1,6 +1,7 @@
{ {
"navigationBarTitleText": "我要上访", "navigationBarTitleText": "我的诉求",
"usingComponents": { "usingComponents": {
"notice": "../../compontents/notice/notice" "notice": "../../compontents/notice/notice",
"rich-text-dialog": "../../compontents/richTextDialog/richTextDialog"
} }
} }

14
subpages/oneKeyService/pages/reportIssue/reportIssue.wxml

@ -4,8 +4,8 @@
<image src="../../images/jubaojilu.png" /> <image src="../../images/jubaojilu.png" />
</view> </view>
<view class="issue-item text-item"> <view class="issue-item text-item">
<view class="item-title">上访内容描述</view> <view class="item-title">诉求描述</view>
<textarea class="item-content text-content" maxlength="500" placeholder="请详细描述您要上访的问题(500字以内)" value="{{dataForm.content}}" bindinput="onInputContent"></textarea> <textarea class="item-content text-content" maxlength="500" placeholder="请详细描述您的诉求(500字以内)" value="{{dataForm.content}}" bindinput="onInputContent"></textarea>
</view> </view>
<view class="issue-item"> <view class="issue-item">
<view class="item-title">是否匿名</view> <view class="item-title">是否匿名</view>
@ -28,6 +28,14 @@
</view> </view>
</view> </view>
</view> </view>
<view class="agree-box">
<checkbox-group class="checkbox-group" bindchange="checkboxChange">
<label class="checkbox">
<checkbox value="isAgree" color="#df0006"/>我已阅读并同意
</label>
<text class="agreement" bindtap="showAgreement">《{{agreement.noticeTitle||'诉求须知'}}》</text>
</checkbox-group>
</view>
</view> </view>
<view class="submit" bindtap="submitIssue"> <view class="submit" bindtap="submitIssue">
<image class="submit-bk" src="../../images/submitbk.png" /> <image class="submit-bk" src="../../images/submitbk.png" />
@ -36,3 +44,5 @@
</view> </view>
<notice bind:close="closeDialog" bind:confirm="confirmDialog" dialogVisible="{{dialogVisible}}" title="{{dialogTitle}}" content="{{errMsg}}" confirmText="知道了"></notice> <notice bind:close="closeDialog" bind:confirm="confirmDialog" dialogVisible="{{dialogVisible}}" title="{{dialogTitle}}" content="{{errMsg}}" confirmText="知道了"></notice>
<rich-text-dialog bind:confirm="confirmAgreement" dialogVisible="{{agreementVisible}}" title="{{agreement.noticeTitle||'诉求须知'}}" content="{{agreement.noticeContent||'暂无内容~'}}" confirmText="确定"></rich-text-dialog>

25
subpages/oneKeyService/pages/reportIssue/reportIssue.wxss

@ -28,6 +28,29 @@ page {
margin-top: 16rpx; margin-top: 16rpx;
box-sizing: border-box; box-sizing: border-box;
} }
.issue-list .agree-box {
height: 80rpx;
display: flex;
align-items: center;
margin-top: 20rpx;
}
.issue-list .agree-box .checkbox-group {
display: flex;
align-items: center;
justify-content: center;
}
.issue-list .agree-box .checkbox {
margin-left: 22rpx;
display: flex;
align-items: center;
justify-content: center;
}
.issue-list .agree-box .checkbox checkbox {
transform: scale(0.7);
}
.issue-list .agree-box .agreement {
color: cornflowerblue;
}
.issue-list .text-item { .issue-list .text-item {
height: 450rpx; height: 450rpx;
} }
@ -69,7 +92,7 @@ page {
width: 592rpx; width: 592rpx;
height: 116rpx; height: 116rpx;
position: relative; position: relative;
margin: 78rpx auto 0rpx; margin: 68rpx auto 0rpx;
} }
.submit .submit-bk { .submit .submit-bk {
width: 100%; width: 100%;

2
subpages/oneKeyService/pages/reportIssueDetail/reportIssueDetail.json

@ -1,4 +1,4 @@
{ {
"navigationBarTitleText": "上访详情", "navigationBarTitleText": "诉求详情",
"usingComponents": {} "usingComponents": {}
} }

8
subpages/oneKeyService/pages/reportIssueDetail/reportIssueDetail.wxml

@ -1,7 +1,7 @@
<view class="report-issue"> <view class="report-issue">
<view class="issue-detail"> <view class="issue-detail">
<view class="issue-item"> <view class="issue-item">
<view class="item-title">上访内容</view> <view class="item-title">诉求内容</view>
<view class="item-content">{{issueDetails.content}}</view> <view class="item-content">{{issueDetails.content}}</view>
</view> </view>
<view class="issue-item"> <view class="issue-item">
@ -12,16 +12,16 @@
</view> </view>
<block wx:if="{{issueDetails.anonymousFlag=='0'}}"> <block wx:if="{{issueDetails.anonymousFlag=='0'}}">
<view class="issue-item"> <view class="issue-item">
<view class="item-title">上访人姓名</view> <view class="item-title">诉求人姓名</view>
<view class="item-content">{{issueDetails.reportUser}}</view> <view class="item-content">{{issueDetails.reportUser}}</view>
</view> </view>
<view class="issue-item"> <view class="issue-item">
<view class="item-title">上访人电话</view> <view class="item-title">诉求人电话</view>
<view class="item-content">{{issueDetails.reportUserMobile}}</view> <view class="item-content">{{issueDetails.reportUserMobile}}</view>
</view> </view>
</block> </block>
<view class="issue-item"> <view class="issue-item">
<view class="item-title">上访时间</view> <view class="item-title">诉求时间</view>
<view class="item-content">{{issueDetails.createdTime}}</view> <view class="item-content">{{issueDetails.createdTime}}</view>
</view> </view>
</view> </view>

2
subpages/oneKeyService/pages/reportIssueList/reportIssueList.json

@ -1,5 +1,5 @@
{ {
"navigationBarTitleText": "上访记录", "navigationBarTitleText": "诉求记录",
"usingComponents": { "usingComponents": {
"load-more": "/components/loadMore/loadMore", "load-more": "/components/loadMore/loadMore",
"no-data": "/components/nodata/nodata" "no-data": "/components/nodata/nodata"

Loading…
Cancel
Save