29 changed files with 982 additions and 7 deletions
@ -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 () { |
||||
|
|
||||
|
} |
||||
|
} |
||||
|
}) |
@ -0,0 +1,6 @@ |
|||||
|
{ |
||||
|
"component": true, |
||||
|
"usingComponents": { |
||||
|
"wux-icon": "../../../../dist/icon/index" |
||||
|
} |
||||
|
} |
@ -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> |
@ -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; |
||||
|
} |
After Width: | Height: | Size: 10 KiB |
After Width: | Height: | Size: 2.2 KiB |
After Width: | Height: | Size: 3.2 KiB |
After Width: | Height: | Size: 22 KiB |
After Width: | Height: | Size: 8.6 KiB |
@ -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() |
||||
|
} |
||||
|
} |
||||
|
}) |
@ -0,0 +1,6 @@ |
|||||
|
{ |
||||
|
"navigationBarTitleText": "我要举报", |
||||
|
"usingComponents": { |
||||
|
"notice": "../../compontents/notice/notice" |
||||
|
} |
||||
|
} |
@ -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> |
@ -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; |
||||
|
} |
||||
|
|
@ -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 |
||||
|
}) |
||||
|
}) |
||||
|
}, |
||||
|
}) |
@ -0,0 +1,4 @@ |
|||||
|
{ |
||||
|
"navigationBarTitleText": "举报详情", |
||||
|
"usingComponents": {} |
||||
|
} |
@ -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> |
@ -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; |
||||
|
} |
@ -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}` |
||||
|
}) |
||||
|
} |
||||
|
}) |
@ -0,0 +1,7 @@ |
|||||
|
{ |
||||
|
"navigationBarTitleText": "举报记录", |
||||
|
"usingComponents": { |
||||
|
"load-more": "/components/loadMore/loadMore", |
||||
|
"no-data": "/components/nodata/nodata" |
||||
|
} |
||||
|
} |
@ -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> |
@ -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; |
||||
|
} |
Loading…
Reference in new issue