Browse Source

一键服务-锦水清风增加我要举报功能;

feature/optimise
ZhaoTongYao 5 years ago
parent
commit
1402707153
  1. 5
      app.json
  2. 11
      project.config.json
  3. 65
      subpages/oneKeyService/compontents/notice/notice.js
  4. 6
      subpages/oneKeyService/compontents/notice/notice.json
  5. 16
      subpages/oneKeyService/compontents/notice/notice.wxml
  6. 84
      subpages/oneKeyService/compontents/notice/notice.wxss
  7. BIN
      subpages/oneKeyService/images/jubaojilu.png
  8. BIN
      subpages/oneKeyService/images/radio.png
  9. BIN
      subpages/oneKeyService/images/radiochecked.png
  10. BIN
      subpages/oneKeyService/images/reportissue.png
  11. BIN
      subpages/oneKeyService/images/submitbk.png
  12. 27
      subpages/oneKeyService/pages/moduleList/moduleList.js
  13. 1
      subpages/oneKeyService/pages/moduleList/moduleList.json
  14. 9
      subpages/oneKeyService/pages/moduleList/moduleList.wxml
  15. 33
      subpages/oneKeyService/pages/moduleList/moduleList.wxss
  16. 174
      subpages/oneKeyService/pages/reportIssue/reportIssue.js
  17. 6
      subpages/oneKeyService/pages/reportIssue/reportIssue.json
  18. 38
      subpages/oneKeyService/pages/reportIssue/reportIssue.wxml
  19. 119
      subpages/oneKeyService/pages/reportIssue/reportIssue.wxss
  20. 80
      subpages/oneKeyService/pages/reportIssueDetail/reportIssueDetail.js
  21. 4
      subpages/oneKeyService/pages/reportIssueDetail/reportIssueDetail.json
  22. 28
      subpages/oneKeyService/pages/reportIssueDetail/reportIssueDetail.wxml
  23. 41
      subpages/oneKeyService/pages/reportIssueDetail/reportIssueDetail.wxss
  24. 116
      subpages/oneKeyService/pages/reportIssueList/reportIssueList.js
  25. 7
      subpages/oneKeyService/pages/reportIssueList/reportIssueList.json
  26. 13
      subpages/oneKeyService/pages/reportIssueList/reportIssueList.wxml
  27. 84
      subpages/oneKeyService/pages/reportIssueList/reportIssueList.wxss
  28. 18
      utils/api.js

5
app.json

@ -138,7 +138,10 @@
"pages/search/search", "pages/search/search",
"pages/laobingzaixian/laobingzaixian", "pages/laobingzaixian/laobingzaixian",
"pages/laobingzaixianDict/laobingzaixianDict", "pages/laobingzaixianDict/laobingzaixianDict",
"pages/moduleList/moduleList" "pages/moduleList/moduleList",
"pages/reportIssue/reportIssue",
"pages/reportIssueList/reportIssueList",
"pages/reportIssueDetail/reportIssueDetail"
] ]
} }
], ],

11
project.config.json

@ -25,11 +25,14 @@
"disablePlugins": [], "disablePlugins": [],
"outputPath": "" "outputPath": ""
}, },
"bundle": false,
"useIsolateContext": true, "useIsolateContext": true,
"useCompilerModule": true, "useCompilerModule": true,
"userConfirmedUseCompilerModuleSwitch": false, "userConfirmedUseCompilerModuleSwitch": false,
"userConfirmedBundleSwitch": false,
"packNpmManually": false, "packNpmManually": false,
"packNpmRelationList": [] "packNpmRelationList": [],
"minifyWXSS": true
}, },
"compileType": "miniprogram", "compileType": "miniprogram",
"libVersion": "2.8.2", "libVersion": "2.8.2",
@ -119,6 +122,12 @@
"pathName": "subpages/heart/pages/leaderboardNew/leaderboardNew", "pathName": "subpages/heart/pages/leaderboardNew/leaderboardNew",
"query": "", "query": "",
"scene": null "scene": null
},
{
"name": "subpages/oneKeyService/pages/reportIssue/reportIssue",
"pathName": "subpages/oneKeyService/pages/reportIssue/reportIssue",
"query": "",
"scene": null
} }
] ]
} }

65
subpages/oneKeyService/compontents/notice/notice.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: Array,
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/notice/notice.json

@ -0,0 +1,6 @@
{
"component": true,
"usingComponents": {
"wux-icon": "../../../../dist/icon/index"
}
}

16
subpages/oneKeyService/compontents/notice/notice.wxml

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

84
subpages/oneKeyService/compontents/notice/notice.wxss

@ -0,0 +1,84 @@
.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: 490rpx;
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: auto;
width: 100%;
padding-bottom: 35rpx;
}
.notice .box .content cover-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 cover-view {
flex: 1;
color: #999;
font-size: 36rpx;
width: 49%;
height: 100%;
line-height: 75rpx;
text-align:center;
}
.notice .box .operation .confirm{
color: #04BCA0;
}

BIN
subpages/oneKeyService/images/jubaojilu.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

BIN
subpages/oneKeyService/images/radio.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

BIN
subpages/oneKeyService/images/radiochecked.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

BIN
subpages/oneKeyService/images/reportissue.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

BIN
subpages/oneKeyService/images/submitbk.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.6 KiB

27
subpages/oneKeyService/pages/moduleList/moduleList.js

@ -1,5 +1,5 @@
// subpages/understandJs/pages/archives/archives.js
const api = require('../../../../utils/understandJs') const api = require('../../../../utils/understandJs')
const app = getApp()
Page({ Page({
/** /**
@ -26,6 +26,7 @@ Page({
moduleInfo: {}, //pid, bannerflag, categorycode, modulestyle, categoryname moduleInfo: {}, //pid, bannerflag, categorycode, modulestyle, categoryname
preloadVisible: true, //type-8 预加载 preloadVisible: true, //type-8 预加载
lastPlayVideo: '', //正在播放的视频 lastPlayVideo: '', //正在播放的视频
completeInfoDialogVisible: false, //完善信息
}, },
/** /**
@ -310,5 +311,27 @@ Page({
nodata: false nodata: false
}) })
this.getNoticelist(e.detail.newsCategoryId) this.getNoticelist(e.detail.newsCategoryId)
} },
//type-2 锦水清风-我要举报
toReportIssue (e) {
if (this.verifyCompleteInfo()) {
return false
}
wx.navigateTo({
url: "/subpages/oneKeyService/pages/reportIssue/reportIssue"
})
},
// 检查 是否完善信息
verifyCompleteInfo () {
if (app.globalData.infoCompleted == 0) {
this.setData({
completeInfoDialogVisible: !this.data.completeInfoDialogVisible
})
return true
} else {
return false
}
},
}) })

1
subpages/oneKeyService/pages/moduleList/moduleList.json

@ -3,6 +3,7 @@
"usingComponents": { "usingComponents": {
"load-more": "../../../../components/loadMore/loadMore", "load-more": "../../../../components/loadMore/loadMore",
"no-data":"../../../../components/nodata/nodata", "no-data":"../../../../components/nodata/nodata",
"complete-info-dialog": "../../../../components/completeInfoDialog/completeInfoDialog",
"news-list": "./components/newsList/newsList" "news-list": "./components/newsList/newsList"
} }
} }

9
subpages/oneKeyService/pages/moduleList/moduleList.wxml

@ -54,6 +54,13 @@
</view> </view>
<image src="../../images/right.png" class="list-arrow"></image> <image src="../../images/right.png" class="list-arrow"></image>
</view> </view>
<movable-area class="movable-area" wx:if="{{moduleInfo.categorycode == 'notice_jsqf'}}">
<movable-view class="movable-view" direction="all" inertia="true" friction="10">
<view class="report-issue" bindtap="toReportIssue">
<image src="../../images/reportissue.png" />
</view>
</movable-view>
</movable-area>
</view> </view>
<!-- 3. 标题、内容 --> <!-- 3. 标题、内容 -->
@ -116,6 +123,8 @@
</view> </view>
<complete-info-dialog completeInfoDialogVisible="{{completeInfoDialogVisible}}"></complete-info-dialog>
<load-more loadMoreType="{{loadMoreType}}" loadMoreVisible="{{loadMoreVisible && isLoadMore}}"></load-more> <load-more loadMoreType="{{loadMoreType}}" loadMoreVisible="{{loadMoreVisible && isLoadMore}}"></load-more>
<no-data isShow="{{nodata}}"></no-data> <no-data isShow="{{nodata}}"></no-data>

33
subpages/oneKeyService/pages/moduleList/moduleList.wxss

@ -244,6 +244,39 @@ swiper {
height: 106rpx; height: 106rpx;
margin-right: 14rpx; margin-right: 14rpx;
} }
.movable-area{
pointer-events:none;
z-index: 100;
width: 100%;
height: 100%;
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
}
.movable-view{
pointer-events:auto;
width: 178rpx;
height: 178rpx;
transform: translateX(560rpx) translateY(680rpx) translateZ(0rpx) scale(1);
transform-origin: center center;
will-change: auto;
position: absolute;
top: 650rpx;
left: 560rpx;
}
.report-issue {
width: 178rpx;
height: 178rpx;
}
.report-issue image {
width: 100%;
height: 100%;
object-fit: cover;
}
/* type-2 end */ /* type-2 end */
/* type-3 start */ /* type-3 start */

174
subpages/oneKeyService/pages/reportIssue/reportIssue.js

@ -0,0 +1,174 @@
// subpages/heart/pages/myApply/myApply.js
const api = require("../../../../utils/api")
Page({
/**
* 页面的初始数据
*/
data: {
showPicker: false, //是否显示底部时间选择器插件
dataForm: {
content: '',
anonymousFlag: '1', //0-不匿名 1-匿名
reportUser: '',
reportUserMobile: '',
images: [] //当前未要求
},
dialogVisible: false, //提示框
dialogTitle: '提交成功', //提交提示,成功还是失败
errMsg: [], //提交失败msg
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
// onShareAppMessage: function () {
// }
//是否匿名
onChangeRadio (e) {
this.setData({
'dataForm.anonymousFlag': e.currentTarget.dataset.flag
})
},
onInputContent (e) {
this.setData({
'dataForm.content': e.detail.value
})
},
onInputUser (e) {
this.setData({
'dataForm.reportUser': e.detail.value
})
},
onInputMobile (e) {
this.setData({
'dataForm.reportUserMobile': e.detail.value
})
},
//提交申请
submitIssue () {
if (!this.data.dataForm.content) {
this.showToast("请填写举报的问题")
return false
}
if ( this.data.dataForm.anonymousFlag == '0') {
if (!this.data.dataForm.reportUser) {
this.showToast("请填写举报人姓名")
return false
}
if (this.data.dataForm.reportUser.length > 50) {
this.showToast("姓名超过字符限制(50字以内)")
return false
}
if (!this.data.dataForm.reportUserMobile) {
this.showToast("请填写举报人电话")
return false
}
if (this.data.dataForm.reportUserMobile.length > 20) {
this.showToast("电话号码超过字符限制(20位)")
return false
}
}
const para = { ...this.data.dataForm }
console.log('submit issue', para)
api.reportIssue(para).then(res => {
if (res.code == 0 && res.msg == 'success') {
this.data.errMsg = []
this.setData({
dialogTitle: '提交成功',
errMsg: this.data.errMsg,
dialogVisible: !this.data.dialogVisible
})
// wx.navigateBack()
} else {
this.data.errMsg[0] = res.msg
this.setData({
dialogTitle: '提交失败',
errMsg: this.data.errMsg,
dialogVisible: !this.data.dialogVisible
})
}
})
},
//简化提示
showToast (title) {
wx.showToast({
title: title,
icon: "none",
duration: 2000
})
},
//跳转到我的举报列表
toIssueList () {
wx.navigateTo({
url: "/subpages/oneKeyService/pages/reportIssueList/reportIssueList"
})
},
//关闭弹框
// closeDialog () {
// wx.navigateBack()
// },
//弹框确定按钮
confirmDialog () {
if (this.data.errMsg.length == 0) {
wx.navigateBack()
}
}
})

6
subpages/oneKeyService/pages/reportIssue/reportIssue.json

@ -0,0 +1,6 @@
{
"navigationBarTitleText": "我要举报",
"usingComponents": {
"notice": "../../compontents/notice/notice"
}
}

38
subpages/oneKeyService/pages/reportIssue/reportIssue.wxml

@ -0,0 +1,38 @@
<view class="report-issue">
<view class="issue-list">
<view class="report-issue-img" bindtap="toIssueList">
<image src="../../images/jubaojilu.png" />
</view>
<view class="issue-item text-item">
<view class="item-title">举报的问题</view>
<textarea class="item-content text-content" maxlength="500" placeholder="请详细描述您要举报的问题(500字以内)" value="{{dataForm.content}}" bindinput="onInputContent"></textarea>
</view>
<view class="issue-item">
<view class="item-title">举报方式</view>
<view class="radio-group">
<view class="radio-item" bindtap="onChangeRadio" data-flag="1">
<image class="radio-img" src="../../images/radiochecked.png" wx:if="{{dataForm.anonymousFlag == '1'}}"/>
<image class="radio-img" src="../../images/radio.png" wx:else/>
<view class="radio-text">匿名举报</view>
</view>
<view class="line"></view>
<view class="radio-item" bindtap="onChangeRadio" data-flag="0">
<image class="radio-img" src="../../images/radiochecked.png" wx:if="{{dataForm.anonymousFlag == '0'}}"/>
<image class="radio-img" src="../../images/radio.png" wx:else/>
<view class="radio-text">实名举报</view>
</view>
<view class="radio-info" hidden="{{dataForm.anonymousFlag == '1'}}">
<input type="text" class="info" placeholder="请输入姓名" value="{{dataForm.reportUser}}" bindinput="onInputUser"></input>
<view class="line2"></view>
<input type="text" class="info" placeholder="请输入电话" value="{{dataForm.reportUserMobile}}" bindinput="onInputMobile"></input>
</view>
</view>
</view>
</view>
<view class="submit" bindtap="submitIssue">
<image class="submit-bk" src="../../images/submitbk.png" />
<view class="submit-text">提交</view>
</view>
</view>
<notice bind:close="closeDialog" bind:confirm="confirmDialog" dialogVisible="{{dialogVisible}}" title="{{dialogTitle}}" content="{{errMsg}}" confirmText="知道了"></notice>

119
subpages/oneKeyService/pages/reportIssue/reportIssue.wxss

@ -0,0 +1,119 @@
/* subpages/heart/pages/myApply/myApply.wxss */
page {
width: 100%;
overflow-y: auto;
background: #f7f7f7;
}
.issue-list {
position: relative;
overflow: hidden;
}
.issue-list .report-issue-img {
position: absolute;
right: -10rpx;
top: 16rpx;
}
.issue-list .report-issue-img image {
width: 164rpx;
height: 76rpx;
}
.issue-list .issue-item {
width: 100%;
background-color: white;
display: flex;
flex-direction: column;
align-items: flex-start;
justify-content: center;
padding: 0rpx 30rpx;
margin-top: 16rpx;
box-sizing: border-box;
}
.issue-list .text-item {
height: 450rpx;
}
.line {
width: 690rpx;
height: 1px;
background: #DCDCDC;
border-radius: 1px;
}
.line2 {
width: 625rpx;
height: 1px;
background: #DCDCDC;
border-radius: 1px;
}
.issue-list .issue-item .item-title {
height: 50rpx;
line-height: 50rpx;
font-size: 32rpx;
font-family: PingFang SC;
font-weight: bold;
color: #333333;
margin: 28rpx 0rpx 12rpx 0rpx;
}
.issue-list .issue-item .item-content {
width: 100%;
height: 44rpx;
line-height: 44rpx;
font-size: 32rpx;
font-family: PingFang SC;
font-weight: 500;
color: #666666;
}
.issue-list .issue-item .text-content {
font-weight: 400;
height: 350rpx;
}
.submit {
width: 592rpx;
height: 116rpx;
position: relative;
margin: 78rpx auto 0rpx;
}
.submit .submit-bk {
width: 100%;
height: 100%;
position: absolute;
z-index: -1;
}
.submit .submit-text {
font-size: 34rpx;
font-family: PingFang SC;
font-weight: 500;
color: #FFFFFF;
height: 100rpx;
line-height: 100rpx;
text-align: center;
}
.radio-group {
width: 100%;
}
.radio-group .radio-item:first-child {
margin-top: 0rpx;
}
.radio-group .radio-item {
display: flex;
justify-content: flex-start;
align-items: center;
margin: 30rpx 0rpx;
}
.radio-group .radio-item .radio-img {
width: 34rpx;
height: 34rpx;
}
.radio-group .radio-item .radio-text {
margin-left: 32rpx;
font-size: 32rpx;
font-family: PingFang SC;
font-weight: 500;
color: #666666;
}
.radio-group .radio-info {
margin-left: 66rpx;
}
.radio-group .radio-info .info {
margin: 30rpx 0rpx;
}

80
subpages/oneKeyService/pages/reportIssueDetail/reportIssueDetail.js

@ -0,0 +1,80 @@
const api = require("../../../../utils/api")
Page({
/**
* 页面的初始数据
*/
data: {
issueId: '',
issueDetails: {}
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
this.setData({
issueId: options.id
})
this.getIssueDetail()
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
// onShareAppMessage: function () {
// },
getIssueDetail () {
api.reportIssueDetail(this.data.issueId).then(res => {
// console.log(res.data)
this.setData({
issueDetails: res.data
})
})
},
})

4
subpages/oneKeyService/pages/reportIssueDetail/reportIssueDetail.json

@ -0,0 +1,4 @@
{
"navigationBarTitleText": "举报详情",
"usingComponents": {}
}

28
subpages/oneKeyService/pages/reportIssueDetail/reportIssueDetail.wxml

@ -0,0 +1,28 @@
<view class="report-issue">
<view class="issue-detail">
<view class="issue-item">
<view class="item-title">举报内容</view>
<view class="item-content">{{issueDetails.content}}</view>
</view>
<view class="issue-item">
<view class="item-title">是否匿名举报</view>
<view class="item-content">
{{issueDetails.anonymousFlag=='1'?'是':'否'}}
</view>
</view>
<block wx:if="{{issueDetails.anonymousFlag=='0'}}">
<view class="issue-item">
<view class="item-title">举报人姓名</view>
<view class="item-content">{{issueDetails.reportUser}}</view>
</view>
<view class="issue-item">
<view class="item-title">举报人电话</view>
<view class="item-content">{{issueDetails.reportUserMobile}}</view>
</view>
</block>
<view class="issue-item">
<view class="item-title">举报时间</view>
<view class="item-content">{{issueDetails.createdTime}}</view>
</view>
</view>
</view>

41
subpages/oneKeyService/pages/reportIssueDetail/reportIssueDetail.wxss

@ -0,0 +1,41 @@
/* subpages/heart/pages/myApplyDetail/myApplyDetail.wxss */
page {
width: 100%;
height: auto;
overflow-y: auto;
background: #f7f7f7;
}
.issue-detail {
margin-bottom: 60rpx;
}
.issue-detail .issue-item {
width: 100%;
background-color: white;
display: flex;
flex-direction: column;
align-items: flex-start;
justify-content: center;
padding: 40rpx 30rpx;
margin-top: 16rpx;
box-sizing: border-box;
}
.issue-detail .issue-item .item-title {
font-size: 32rpx;
font-family: PingFang SC;
font-weight: bold;
color: #333333;
}
.issue-detail .issue-item .item-content {
font-size: 32rpx;
font-family: PingFang SC;
font-weight: 500;
color: #666666;
margin-top: 28rpx;
}
.issue-detail .issue-item .line {
width: 100%;
height: 1px;
background: #F2F2F2;
border-radius: 1px;
margin: 28rpx 0rpx;
}

116
subpages/oneKeyService/pages/reportIssueList/reportIssueList.js

@ -0,0 +1,116 @@
const api = require("../../../../utils/api")
Page({
/**
* 页面的初始数据
*/
data: {
pageIndex: 1,
pageSize: 10,
nodata: false,
loadMoreType: 'none',
loadMoreVisible: false,
issuelist: []
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
this.getIssueList()
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
this.setData({
loadMoreVisible: true
})
if (this.data.loadMoreType === "loading") {
this.setData({
pageIndex: this.data.pageIndex + 1
})
this.getIssueList()
}
},
/**
* 用户点击右上角分享
*/
// onShareAppMessage: function () {
// }
getIssueList () {
const para = {
pageIndex: this.data.pageIndex,
pageSize: this.data.pageSize
}
api.reportIssueList(para).then(res => {
console.log(res)
this.setData({
issuelist: [...this.data.issuelist,...res.data],
loadMoreType: res.data.length === this.data.pageSize ? 'loading' : 'none',
loadMoreVisible: res.data.length === this.data.pageSize ? false : true
})
if (this.data.issuelist.length == 0) {
this.setData({
nodata: true,
loadMoreType: 'none',
loadMoreVisible: false,
})
}
}).catch(err => {
this.setData({
issuelist: [],
nodata: true,
loadMoreType: 'none',
loadMoreVisible: false,
})
console.log(err)
})
},
//跳转到申请信息详情
toIssueDetail (e) {
console.log('跳转举报详情', e.currentTarget.dataset.id)
wx.navigateTo({
url: `/subpages/oneKeyService/pages/reportIssueDetail/reportIssueDetail?id=${e.currentTarget.dataset.id}`
})
}
})

7
subpages/oneKeyService/pages/reportIssueList/reportIssueList.json

@ -0,0 +1,7 @@
{
"navigationBarTitleText": "举报记录",
"usingComponents": {
"load-more": "/components/loadMore/loadMore",
"no-data": "/components/nodata/nodata"
}
}

13
subpages/oneKeyService/pages/reportIssueList/reportIssueList.wxml

@ -0,0 +1,13 @@
<view class="report-issue">
<view class="issue-list">
<view class="issue-item" data-id="{{item.id}}" bindtap="toIssueDetail" wx:for="{{issuelist}}" wx:for-index="index" wx:for-item="item" wx:key="index">
<view class="item-title">{{item.content}}</view>
<!-- <view class="line"></view> -->
<view class="item-time">提交时间:{{item.createdTime}}</view>
</view>
</view>
</view>
<load-more loadMoreType="{{loadMoreType}}" loadMoreVisible="{{loadMoreVisible}}"></load-more>
<no-data isShow="{{nodata}}"></no-data>

84
subpages/oneKeyService/pages/reportIssueList/reportIssueList.wxss

@ -0,0 +1,84 @@
/* subpages/heart/pages/myApplyList/myApplyList.wxss */
page {
width: 100%;
height: auto;
overflow-y: auto;
background: #f7f7f7;
}
.issue-list {
}
.issue-list .my-apply-img {
position: absolute;
right: -10rpx;
}
.issue-list .my-apply-img image {
width: 208rpx;
height: 76rpx;
}
.issue-list .issue-item {
width: 100%;
background-color: white;
display: flex;
flex-direction: column;
align-items: flex-start;
justify-content: center;
padding: 0rpx 30rpx 30rpx;
margin-top: 16rpx;
box-sizing: border-box;
}
.issue-list .issue-item .item-title {
font-size: 32rpx;
font-family: PingFang SC;
font-weight: bold;
color: #333333;
margin: 32rpx 0rpx;
overflow: hidden;
text-overflow: ellipsis;
display: box;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
}
.issue-list .issue-item .item-content {
width: 100%;
height: 44rpx;
line-height: 44rpx;
font-size: 32rpx;
font-family: PingFang SC;
font-weight: 500;
color: #999999;
}
.issue-list .issue-item .text-content {
height: 88rpx;
color: #666666;
}
.issue-list .issue-item .line {
width: 100%;
height: 1px;
background: #F2F2F2;
border-radius: 1px;
margin: 28rpx 0rpx;
}
.issue-list .issue-item .item-time {
font-size: 30rpx;
font-family: PingFang SC;
font-weight: 400;
color: #666666;
}
.issue-list .issue-item .item-state {
margin: 26rpx 0rpx 28rpx;
font-size: 30rpx;
font-family: PingFang SC;
font-weight: 400;
color: #666666;
}
.issue-list .issue-item .item-state .state-0 {
color: #FB9F00;
}
.issue-list .issue-item .item-state .state-1 {
color: #28C896;
}
.issue-list .issue-item .item-state .state-2 {
color: #D80000;
}

18
utils/api.js

@ -57,7 +57,10 @@ module.exports = {
getHomePhone:getHomePhone, getHomePhone:getHomePhone,
gradeRankinglist:gradeRankinglist, gradeRankinglist:gradeRankinglist,
userInfoSignUp:userInfoSignUp, userInfoSignUp:userInfoSignUp,
moduleCategory: moduleCategory moduleCategory: moduleCategory,
reportIssue: reportIssue,
reportIssueList: reportIssueList,
reportIssueDetail: reportIssueDetail
} }
function getToken (wxCode) { function getToken (wxCode) {
@ -536,3 +539,16 @@ function userInfoSignUp () {
function moduleCategory(params) { function moduleCategory(params) {
return fly.get('news/module/moduleCategory', params) return fly.get('news/module/moduleCategory', params)
} }
// 锦水清风-我要举报
function reportIssue (para) {
return fly.post("custom/reportissue/submit", para)
}
// 一键服务-锦水清风-举报问题列表接口
function reportIssueList(para) {
return fly.get('custom/reportissue/list', para)
}
//一键服务-锦水清风-举报问题详情接口
function reportIssueDetail (id) {
return fly.get(`custom/reportissue/detail/${id}`)
}
Loading…
Cancel
Save