28 changed files with 1062 additions and 11 deletions
Before Width: | Height: | Size: 3.2 KiB |
After Width: | Height: | Size: 11 KiB |
@ -0,0 +1,69 @@ |
|||
// subpages/heart/pages/scanCodeSignin/scanCodeSignin.js
|
|||
import { getActInfo, signIn } from '../../../../utils/api' |
|||
Page({ |
|||
|
|||
/** |
|||
* 页面的初始数据 |
|||
*/ |
|||
data: { |
|||
actId: '', |
|||
actInfo: {}, //活动信息
|
|||
dialogVisible: false, //提示框
|
|||
lock: false, //debounce
|
|||
}, |
|||
|
|||
/** |
|||
* 生命周期函数--监听页面加载 |
|||
*/ |
|||
onLoad: function (options) { |
|||
this.setData({ |
|||
actId: options.id |
|||
}) |
|||
this.getActInfo() |
|||
}, |
|||
|
|||
//获取活动信息
|
|||
getActInfo () { |
|||
let para = { |
|||
qrCodeId: this.data.actId |
|||
} |
|||
getActInfo(para).then(res => { |
|||
this.setData({ |
|||
actInfo: res.data |
|||
}) |
|||
}) |
|||
}, |
|||
//签到
|
|||
signin () { |
|||
if (this.data.lock) { |
|||
wx.showToast({ |
|||
title: '签到中...', |
|||
icon: 'loading', |
|||
duration: 2000 |
|||
}) |
|||
return |
|||
} |
|||
this.data.lock = true |
|||
console.log('签到状态:', this.data.actInfo.signInStatus) |
|||
if (this.data.actInfo.signInStatus == 0) { |
|||
let para = { |
|||
actId: this.data.actInfo.id |
|||
} |
|||
signIn(para).then(res => { |
|||
console.log(res.data) |
|||
if(res.code == 0) { |
|||
this.setData({ |
|||
dialogVisible: !this.data.dialogVisible |
|||
}) |
|||
} |
|||
}).catch(err => { |
|||
console.log(err) |
|||
this.data.lock = false |
|||
}) |
|||
} |
|||
}, |
|||
//
|
|||
closeDialog () { |
|||
wx.navigateBack() |
|||
}, |
|||
}) |
@ -0,0 +1,9 @@ |
|||
{ |
|||
"usingComponents": { |
|||
"wux-cell": "../../../../dist/cell/index", |
|||
"notice": "../../components/notice/notice" |
|||
}, |
|||
"navigationBarTitleText": "活动签到", |
|||
"navigationBarTextStyle": "white", |
|||
"navigationBarBackgroundColor": "#d53534" |
|||
} |
@ -0,0 +1,29 @@ |
|||
<!--subpages/heart/pages/scanCodeSignin/scanCodeSignin.wxml--> |
|||
<view class="scan-code"> |
|||
<view class="background"></view> |
|||
<view class="actinfo"> |
|||
<view class="top"> |
|||
<view class="left"> |
|||
<image class="image" src="{{actInfo.headPic}}" /> |
|||
</view> |
|||
<view class="right"> |
|||
<view class="act-title">{{actInfo.title}}</view> |
|||
<view class="act-score">奖励积分: +{{actInfo.reward}}</view> |
|||
</view> |
|||
</view> |
|||
<view class="bottom"> |
|||
签到时间:{{common.cutTime(actInfo.signinStartTime)}} 至 {{common.cutTime(actInfo.signinEndTime)}} |
|||
</view> |
|||
</view> |
|||
<view class="submit" bindtap="signin"> |
|||
<image class="submit-bk" src="../../images/submit-bk.png" /> |
|||
<view wx:if="{{actInfo.signInStatus == 1}}" class="submit-text disabled">已签到</view> |
|||
<view wx:else class="submit-text">签到</view> |
|||
</view> |
|||
</view> |
|||
|
|||
<notice bind:close="closeDialog" bind:confirm="closeDialog" dialogVisible="{{dialogVisible}}" title="签到成功" content="" confirmText="确定"></notice> |
|||
|
|||
<wxs module="common"> |
|||
module.exports.cutTime = function(time) { return time.substring(0,16) } |
|||
</wxs> |
@ -0,0 +1,102 @@ |
|||
/* subpages/heart/pages/scanCodeSignin/scanCodeSignin.wxss */ |
|||
page { |
|||
overflow: hidden; |
|||
} |
|||
.background { |
|||
box-sizing: border-box; |
|||
width: 100%; |
|||
height: 80rpx; |
|||
background: #d53534; |
|||
position: absolute; |
|||
z-index: -1; |
|||
top: 0; |
|||
} |
|||
.actinfo { |
|||
width: 690rpx; |
|||
height: 300rpx; |
|||
margin: 40rpx auto 80rpx; |
|||
display: flex; |
|||
flex-direction: column; |
|||
align-items: center; |
|||
justify-content: space-between; |
|||
background-color: #FFFFFF; |
|||
border-radius: 16rpx; |
|||
box-shadow: 10rpx 10rpx 10rpx #bfbfbf; |
|||
box-sizing: border-box; |
|||
padding: 20rpx; |
|||
} |
|||
.actinfo .top { |
|||
width: 100%; |
|||
display: flex; |
|||
justify-content: space-between; |
|||
} |
|||
.top .left { |
|||
width: 176rpx; |
|||
height: 200rpx; |
|||
} |
|||
.top .left .image { |
|||
width: 100%; |
|||
height: 100%; |
|||
border-radius: 10rpx; |
|||
} |
|||
.top .right { |
|||
width: 460rpx; |
|||
height: 200rpx; |
|||
display: flex; |
|||
flex-direction: column; |
|||
justify-content: space-between; |
|||
} |
|||
.top .right .act-title { |
|||
font-size: 36rpx; |
|||
font-family: PingFang SC; |
|||
font-weight: 500; |
|||
color: #333333; |
|||
overflow: hidden; |
|||
text-overflow: ellipsis; |
|||
word-wrap:break-word; |
|||
display: -webkit-box; |
|||
-webkit-box-orient: vertical; |
|||
-webkit-line-clamp: 2; |
|||
display: -webkit-box; |
|||
} |
|||
.top .right .act-score { |
|||
font-size: 28rpx; |
|||
font-family: PingFang SC; |
|||
font-weight: 500; |
|||
color: #E96E00; |
|||
} |
|||
.actinfo .bottom { |
|||
font-size: 24rpx; |
|||
font-family: PingFang SC; |
|||
font-weight: 500; |
|||
color: #A8A8A8; |
|||
width: 100%; |
|||
} |
|||
|
|||
.submit { |
|||
width: 592rpx; |
|||
height: 116rpx; |
|||
position: relative; |
|||
margin: 320rpx 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; |
|||
} |
|||
.submit .disabled { |
|||
background-color: rgba(255,255,255,0.5); |
|||
border-radius: 100rpx; |
|||
height: 100%; |
|||
width: 100%; |
|||
} |
After Width: | Height: | Size: 4.9 KiB |
@ -0,0 +1,31 @@ |
|||
const api = require("../../../../utils/api") |
|||
|
|||
Page({ |
|||
|
|||
/** |
|||
* 页面的初始数据 |
|||
*/ |
|||
data: { |
|||
suggestId: '', |
|||
suggestDetail: {} |
|||
}, |
|||
|
|||
/** |
|||
* 生命周期函数--监听页面加载 |
|||
*/ |
|||
onLoad: function (options) { |
|||
this.setData({ |
|||
suggestId: options.id |
|||
}) |
|||
this.getSuggestDetail() |
|||
}, |
|||
|
|||
getSuggestDetail () { |
|||
api.suggestDetail(this.data.suggestId).then(res => { |
|||
// console.log(res.data)
|
|||
this.setData({ |
|||
suggestDetail: res.data |
|||
}) |
|||
}) |
|||
}, |
|||
}) |
@ -0,0 +1,4 @@ |
|||
{ |
|||
"navigationBarTitleText": "建议详情", |
|||
"usingComponents": {} |
|||
} |
@ -0,0 +1,28 @@ |
|||
<view class="suggest"> |
|||
<view class="suggest-detail"> |
|||
<view class="suggest-item"> |
|||
<view class="item-title">建议内容</view> |
|||
<view class="item-content">{{suggestDetail.content}}</view> |
|||
</view> |
|||
<view class="suggest-item"> |
|||
<view class="item-title">是否匿名</view> |
|||
<view class="item-content"> |
|||
{{suggestDetail.anonymousFlag=='1'?'是':'否'}} |
|||
</view> |
|||
</view> |
|||
<block wx:if="{{suggestDetail.anonymousFlag=='0'}}"> |
|||
<view class="suggest-item"> |
|||
<view class="item-title">建议人姓名</view> |
|||
<view class="item-content">{{suggestDetail.adviceUser}}</view> |
|||
</view> |
|||
<view class="suggest-item"> |
|||
<view class="item-title">建议人电话</view> |
|||
<view class="item-content">{{suggestDetail.adviceUserMobile}}</view> |
|||
</view> |
|||
</block> |
|||
<view class="suggest-item"> |
|||
<view class="item-title">建议时间</view> |
|||
<view class="item-content">{{suggestDetail.createdTime}}</view> |
|||
</view> |
|||
</view> |
|||
</view> |
@ -0,0 +1,40 @@ |
|||
page { |
|||
width: 100%; |
|||
height: auto; |
|||
overflow-y: auto; |
|||
background: #f7f7f7; |
|||
} |
|||
.suggest-detail { |
|||
margin-bottom: 60rpx; |
|||
} |
|||
.suggest-detail .suggest-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; |
|||
} |
|||
.suggest-detail .suggest-item .item-title { |
|||
font-size: 32rpx; |
|||
font-family: PingFang SC; |
|||
font-weight: bold; |
|||
color: #333333; |
|||
} |
|||
.suggest-detail .suggest-item .item-content { |
|||
font-size: 32rpx; |
|||
font-family: PingFang SC; |
|||
font-weight: 500; |
|||
color: #666666; |
|||
margin-top: 28rpx; |
|||
} |
|||
.suggest-detail .suggest-item .line { |
|||
width: 100%; |
|||
height: 1px; |
|||
background: #F2F2F2; |
|||
border-radius: 1px; |
|||
margin: 28rpx 0rpx; |
|||
} |
@ -0,0 +1,274 @@ |
|||
const api = require("../../../../utils/api") |
|||
//const understand_api = require("../../../../utils/understandJs")
|
|||
|
|||
Page({ |
|||
|
|||
/** |
|||
* 页面的初始数据 |
|||
*/ |
|||
data: { |
|||
//showPicker: false, //是否显示底部时间选择器插件
|
|||
dataForm: { |
|||
content: '', |
|||
anonymousFlag: '1', //0-不匿名 1-匿名
|
|||
adviceUser: '', |
|||
adviceUserMobile: '', |
|||
images: [] //当前未要求
|
|||
}, |
|||
dialogVisible: false, //提示框
|
|||
dialogTitle: '提交成功', //提交提示,成功还是失败
|
|||
errMsg: [], //提交失败msg
|
|||
lock: false, //锁定提交状态,防止连击,
|
|||
violationsCount: 0, //内容审核计数
|
|||
isConReview: false, //内容审核标志
|
|||
//isAgree: false, //是否 勾选已阅读
|
|||
//agreement: {}, //须知内容
|
|||
//agreementVisible: false, //是否显示 诉求须知 内容
|
|||
}, |
|||
|
|||
/** |
|||
* 生命周期函数--监听页面加载 |
|||
*/ |
|||
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 => { })
|
|||
}, |
|||
|
|||
/** |
|||
* 生命周期函数--监听页面初次渲染完成 |
|||
*/ |
|||
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.trim(' ') |
|||
}) |
|||
}, |
|||
onInputUser (e) { |
|||
this.setData({ |
|||
'dataForm.adviceUser': e.detail.value.trim(' ') |
|||
}) |
|||
}, |
|||
onInputMobile (e) { |
|||
this.setData({ |
|||
'dataForm.adviceUserMobile': e.detail.value.trim(' ') |
|||
}) |
|||
}, |
|||
//去除 输入内容 首尾空格
|
|||
contentTrim () { |
|||
this.setData({ |
|||
'dataForm.content': this.data.dataForm.content.trim(' '), |
|||
'dataForm.adviceUser': this.data.dataForm.adviceUser.trim(' '), |
|||
'dataForm.adviceUserMobile': this.data.dataForm.adviceUserMobile.trim(' ') |
|||
}) |
|||
}, |
|||
//提交申请
|
|||
submitIssue () { |
|||
// if (!this.data.isAgree) {
|
|||
// this.showToast("请先勾选我已阅读并同意诉求须知")
|
|||
// return false
|
|||
// }
|
|||
if (this.data.lock) { |
|||
this.showToast("正在提交,请耐心等待...") |
|||
return false |
|||
} |
|||
|
|||
this.contentTrim() |
|||
if (!this.data.dataForm.content) { |
|||
this.showToast("请填写建议内容") |
|||
return false |
|||
} |
|||
if ( this.data.dataForm.anonymousFlag == '0') { |
|||
if (!this.data.dataForm.adviceUser) { |
|||
this.showToast("请填写建议人姓名") |
|||
return false |
|||
} |
|||
if (this.data.dataForm.adviceUser.length > 50) { |
|||
this.showToast("姓名超过字符限制(50字以内)") |
|||
return false |
|||
} |
|||
if (!this.data.dataForm.adviceUserMobile) { |
|||
this.showToast("请填写建议人电话") |
|||
return false |
|||
} |
|||
if (this.data.dataForm.adviceUserMobile.length > 20) { |
|||
this.showToast("电话号码超过字符限制(20位)") |
|||
return false |
|||
} |
|||
} |
|||
wx.showLoading({ |
|||
title: "加载中", |
|||
}) |
|||
this.setData({ |
|||
lock: true |
|||
}) |
|||
const para = { ...this.data.dataForm } |
|||
para.isConReview = this.data.isConReview |
|||
console.log('submit suggest', para) |
|||
let that = this |
|||
api.suggestDict(para).then(res => { |
|||
wx.hideLoading() |
|||
this.setData({ |
|||
lock: false |
|||
}) |
|||
if (res.code == 0 && res.msg == 'success') { |
|||
this.data.errMsg = [] |
|||
this.setData({ |
|||
'dataForm.content': '', |
|||
dialogTitle: '提交成功', |
|||
errMsg: this.data.errMsg, |
|||
dialogVisible: !this.data.dialogVisible, |
|||
violationsCount: 0, |
|||
isConReview: false |
|||
}) |
|||
// wx.navigateBack()
|
|||
} else if (res.code == 533) { |
|||
this.data.violationsCount++ |
|||
console.log(this.data.violationsCount) |
|||
if (this.data.violationsCount == 1){ |
|||
wx.showToast({ |
|||
title: res.msg, |
|||
icon: "none", |
|||
duration: 2000 |
|||
}) |
|||
} else if (this.data.violationsCount == 2) { |
|||
wx.showModal({ |
|||
title: '提示', |
|||
content: '您提交的内容再次被判定为违规,您确定是否要提交?', |
|||
success (res) { |
|||
if (res.confirm) { |
|||
console.log('用户点击确定') |
|||
that.data.isConReview = true |
|||
that.submitIssue() |
|||
} else if (res.cancel) { |
|||
console.log('用户点击取消') |
|||
that.setData({ |
|||
violationsCount: 0, |
|||
isConReview: false |
|||
}) |
|||
} |
|||
} |
|||
}) |
|||
} |
|||
} else { |
|||
this.data.errMsg[0] = res.msg |
|||
this.setData({ |
|||
dialogTitle: '提交失败', |
|||
errMsg: this.data.errMsg, |
|||
dialogVisible: !this.data.dialogVisible |
|||
}) |
|||
} |
|||
}).catch(err => { |
|||
console.log(err) |
|||
wx.hideLoading() |
|||
this.setData({ |
|||
lock: false |
|||
}) |
|||
}) |
|||
}, |
|||
|
|||
//简化提示
|
|||
showToast (title) { |
|||
wx.showToast({ |
|||
title: title, |
|||
icon: "none", |
|||
duration: 2000 |
|||
}) |
|||
}, |
|||
//跳转到我的列表
|
|||
toSuggestList () { |
|||
wx.navigateTo({ |
|||
url: "/subpages/oneKeyService/pages/suggestDictList/suggestDictList" |
|||
}) |
|||
}, |
|||
|
|||
//弹框确定按钮
|
|||
confirmDialog () { |
|||
if (this.data.errMsg.length == 0) { |
|||
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
|
|||
// })
|
|||
// }
|
|||
}) |
@ -0,0 +1,7 @@ |
|||
{ |
|||
"navigationBarTitleText": "建议直通", |
|||
"usingComponents": { |
|||
"notice": "../../compontents/notice/notice", |
|||
"rich-text-dialog": "../../compontents/richTextDialog/richTextDialog" |
|||
} |
|||
} |
@ -0,0 +1,48 @@ |
|||
<view class="suggest-dict"> |
|||
<view class="suggest-list"> |
|||
<view class="suggest-dict-img" bindtap="toSuggestList"> |
|||
<image src="../../images/suggest.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.adviceUser}}" bindinput="onInputUser"></input> |
|||
<view class="line2"></view> |
|||
<input type="text" class="info" placeholder="请输入电话" value="{{dataForm.adviceUserMobile}}" bindinput="onInputMobile"></input> |
|||
</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 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> |
|||
|
|||
<!-- <rich-text-dialog bind:confirm="confirmAgreement" dialogVisible="{{agreementVisible}}" title="{{agreement.noticeTitle||'诉求须知'}}" content="{{agreement.noticeContent||'暂无内容~'}}" confirmText="确定"></rich-text-dialog> --> |
@ -0,0 +1,141 @@ |
|||
page { |
|||
width: 100%; |
|||
overflow-y: auto; |
|||
background: #f7f7f7; |
|||
} |
|||
.suggest-list { |
|||
position: relative; |
|||
overflow: hidden; |
|||
} |
|||
.suggest-list .suggest-dict-img { |
|||
position: absolute; |
|||
right: -10rpx; |
|||
top: 16rpx; |
|||
} |
|||
.suggest-list .suggest-dict-img image { |
|||
width: 164rpx; |
|||
height: 76rpx; |
|||
} |
|||
.suggest-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; |
|||
} |
|||
.suggest-list .agree-box { |
|||
height: 80rpx; |
|||
display: flex; |
|||
align-items: center; |
|||
margin-top: 20rpx; |
|||
} |
|||
.suggest-list .agree-box .checkbox-group { |
|||
display: flex; |
|||
align-items: center; |
|||
justify-content: center; |
|||
} |
|||
.suggest-list .agree-box .checkbox { |
|||
margin-left: 22rpx; |
|||
display: flex; |
|||
align-items: center; |
|||
justify-content: center; |
|||
} |
|||
.suggest-list .agree-box .checkbox checkbox { |
|||
transform: scale(0.7); |
|||
} |
|||
.suggest-list .agree-box .agreement { |
|||
color: cornflowerblue; |
|||
} |
|||
.suggest-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; |
|||
} |
|||
.suggest-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; |
|||
} |
|||
.suggest-list .issue-item .item-content { |
|||
width: 100%; |
|||
height: 44rpx; |
|||
line-height: 44rpx; |
|||
font-size: 32rpx; |
|||
font-family: PingFang SC; |
|||
font-weight: 500; |
|||
color: #666666; |
|||
} |
|||
.suggest-list .issue-item .text-content { |
|||
font-weight: 400; |
|||
height: 350rpx; |
|||
} |
|||
.submit { |
|||
width: 592rpx; |
|||
height: 116rpx; |
|||
position: relative; |
|||
margin: 68rpx 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,75 @@ |
|||
const api = require("../../../../utils/api") |
|||
|
|||
Page({ |
|||
|
|||
/** |
|||
* 页面的初始数据 |
|||
*/ |
|||
data: { |
|||
pageIndex: 1, |
|||
pageSize: 10, |
|||
nodata: false, |
|||
loadMoreType: 'none', |
|||
loadMoreVisible: false, |
|||
suggestlist: [] |
|||
}, |
|||
|
|||
/** |
|||
* 生命周期函数--监听页面加载 |
|||
*/ |
|||
onLoad: function (options) { |
|||
this.getSuggestList() |
|||
}, |
|||
|
|||
/** |
|||
* 页面上拉触底事件的处理函数 |
|||
*/ |
|||
onReachBottom: function () { |
|||
this.setData({ |
|||
loadMoreVisible: true |
|||
}) |
|||
if (this.data.loadMoreType === "loading") { |
|||
this.setData({ |
|||
pageIndex: this.data.pageIndex + 1 |
|||
}) |
|||
this.getSuggestList() |
|||
} |
|||
}, |
|||
|
|||
getSuggestList () { |
|||
const para = { |
|||
pageIndex: this.data.pageIndex, |
|||
pageSize: this.data.pageSize |
|||
} |
|||
api.suggestDictList(para).then(res => { |
|||
console.log(res) |
|||
this.setData({ |
|||
suggestlist: [...this.data.suggestlist,...res.data], |
|||
loadMoreType: res.data.length === this.data.pageSize ? 'loading' : 'none', |
|||
loadMoreVisible: res.data.length === this.data.pageSize ? false : true |
|||
}) |
|||
if (this.data.suggestlist.length == 0) { |
|||
this.setData({ |
|||
nodata: true, |
|||
loadMoreType: 'none', |
|||
loadMoreVisible: false, |
|||
}) |
|||
} |
|||
}).catch(err => { |
|||
this.setData({ |
|||
suggestlist: [], |
|||
nodata: true, |
|||
loadMoreType: 'none', |
|||
loadMoreVisible: false, |
|||
}) |
|||
console.log(err) |
|||
}) |
|||
}, |
|||
//跳转到申请信息详情
|
|||
toSuggestDetail (e) { |
|||
console.log('跳转详情', e.currentTarget.dataset.id) |
|||
wx.navigateTo({ |
|||
url: `/subpages/oneKeyService/pages/suggestDetail/suggestDetail?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="suggest-dict"> |
|||
<view class="suggest-list"> |
|||
<view class="suggest-item" data-id="{{item.id}}" bindtap="toSuggestDetail" wx:for="{{suggestlist}}" 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,75 @@ |
|||
page { |
|||
width: 100%; |
|||
height: auto; |
|||
overflow-y: auto; |
|||
background: #f7f7f7; |
|||
} |
|||
.suggest-list { |
|||
|
|||
} |
|||
.suggest-list .suggest-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; |
|||
} |
|||
.suggest-list .suggest-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; |
|||
} |
|||
.suggest-list .suggest-item .item-content { |
|||
width: 100%; |
|||
height: 44rpx; |
|||
line-height: 44rpx; |
|||
font-size: 32rpx; |
|||
font-family: PingFang SC; |
|||
font-weight: 500; |
|||
color: #999999; |
|||
} |
|||
.suggest-list .suggest-item .text-content { |
|||
height: 88rpx; |
|||
color: #666666; |
|||
} |
|||
.suggest-list .suggest-item .line { |
|||
width: 100%; |
|||
height: 1px; |
|||
background: #F2F2F2; |
|||
border-radius: 1px; |
|||
margin: 28rpx 0rpx; |
|||
} |
|||
.suggest-list .suggest-item .item-time { |
|||
font-size: 30rpx; |
|||
font-family: PingFang SC; |
|||
font-weight: 400; |
|||
color: #666666; |
|||
} |
|||
.suggest-list .suggest-item .item-state { |
|||
margin: 26rpx 0rpx 28rpx; |
|||
font-size: 30rpx; |
|||
font-family: PingFang SC; |
|||
font-weight: 400; |
|||
color: #666666; |
|||
} |
|||
.suggest-list .suggest-item .item-state .state-0 { |
|||
color: #FB9F00; |
|||
} |
|||
.suggest-list .suggest-item .item-state .state-1 { |
|||
color: #28C896; |
|||
} |
|||
.suggest-list .suggest-item .item-state .state-2 { |
|||
color: #D80000; |
|||
} |
Loading…
Reference in new issue