Browse Source

版本 1.6.27 一键服务增加建议直通;志愿者增加扫码签到;

release
ZhaoTongYao 5 years ago
parent
commit
84f0e8dd67
  1. 6
      app.js
  2. 8
      app.json
  3. BIN
      images/home/happy.png
  4. BIN
      images/home/scan.png
  5. 33
      pages/heartNew/heartNew.js
  6. 10
      pages/heartNew/heartNew.wxml
  7. 2
      pages/toRegister/toRegister.js
  8. 69
      subpages/heart/pages/scanCodeSignin/scanCodeSignin.js
  9. 9
      subpages/heart/pages/scanCodeSignin/scanCodeSignin.json
  10. 29
      subpages/heart/pages/scanCodeSignin/scanCodeSignin.wxml
  11. 102
      subpages/heart/pages/scanCodeSignin/scanCodeSignin.wxss
  12. BIN
      subpages/oneKeyService/images/suggest.png
  13. 15
      subpages/oneKeyService/pages/moduleList/moduleList.js
  14. 4
      subpages/oneKeyService/pages/moduleList/moduleList.wxml
  15. 15
      subpages/oneKeyService/pages/reportIssue/reportIssue.js
  16. 31
      subpages/oneKeyService/pages/suggestDetail/suggestDetail.js
  17. 4
      subpages/oneKeyService/pages/suggestDetail/suggestDetail.json
  18. 28
      subpages/oneKeyService/pages/suggestDetail/suggestDetail.wxml
  19. 40
      subpages/oneKeyService/pages/suggestDetail/suggestDetail.wxss
  20. 274
      subpages/oneKeyService/pages/suggestDict/suggestDict.js
  21. 7
      subpages/oneKeyService/pages/suggestDict/suggestDict.json
  22. 48
      subpages/oneKeyService/pages/suggestDict/suggestDict.wxml
  23. 141
      subpages/oneKeyService/pages/suggestDict/suggestDict.wxss
  24. 75
      subpages/oneKeyService/pages/suggestDictList/suggestDictList.js
  25. 7
      subpages/oneKeyService/pages/suggestDictList/suggestDictList.json
  26. 13
      subpages/oneKeyService/pages/suggestDictList/suggestDictList.wxml
  27. 75
      subpages/oneKeyService/pages/suggestDictList/suggestDictList.wxss
  28. 28
      utils/api.js

6
app.js

@ -16,6 +16,8 @@ App({
this.globalData.height = res.statusBarHeight
this.globalData.deviceInfo.statusHeight = res.statusBarHeight
this.globalData.deviceInfo.navigationHeight = menuButtonInfo.height + (menuButtonInfo.top - res.statusBarHeight) * 2
this.globalData.screen.height = res.screenHeight
this.globalData.screen.width = res.screenWidth
}
})
},
@ -44,6 +46,10 @@ App({
deviceInfo: {
statusHeight: 20,
navigationHeight: 40
},
screen: {
width: 375,
height: 667
}
}
})

8
app.json

@ -127,7 +127,8 @@
"pages/groupBuyPublish/groupBuyPublish",
"pages/dropByPublish/dropByPublish",
"pages/noticeNewDetail/noticeNewDetail",
"pages/noticeNewList/noticeNewList"
"pages/noticeNewList/noticeNewList",
"pages/scanCodeSignin/scanCodeSignin"
]
},
{
@ -142,7 +143,10 @@
"pages/moduleList/moduleList",
"pages/reportIssue/reportIssue",
"pages/reportIssueList/reportIssueList",
"pages/reportIssueDetail/reportIssueDetail"
"pages/reportIssueDetail/reportIssueDetail",
"pages/suggestDict/suggestDict",
"pages/suggestDictList/suggestDictList",
"pages/suggestDetail/suggestDetail"
]
}
],

BIN
images/home/happy.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.2 KiB

BIN
images/home/scan.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

33
pages/heartNew/heartNew.js

@ -49,6 +49,8 @@ Page({
}
],
isLoading: false, //防止标签切换加载数据时点击切换标签
btnTop: 0,
btnLeft: 0,
},
/**
@ -73,6 +75,10 @@ Page({
selectedTab:this.data.selectedTab
}
this.selectComponent("#state-0").getActivityList(parms)
this.setData({
btnTop: app.globalData.screen.height * 2 * 0.75,
btnLeft: (app.globalData.screen.width * 2 - 200) * 0.5
})
},
/**
* 生命周期函数--监听页面初次渲染完成
@ -526,5 +532,30 @@ Page({
volunteerTagId: this.data.volunteerTagId
}
this.volunteerlist(parms)
}
},
//扫描签到码
scanCode () {
wx.scanCode({
onlyFromCamera: false,
scanType: ['barCode', 'qrCode', 'datamatrix', 'pdf417'],
success: res => {
if (res.errMsg == 'scanCode:ok') {
wx.navigateTo({
url: `/subpages/heart/pages/scanCodeSignin/scanCodeSignin?id=${res.result}`
})
}
},
fail: res => {
// 接口调用失败
// wx.showToast({
// icon: 'none',
// title: '接口调用失败!'
// })
},
complete: res => {
// 接口调用结束
console.log(res)
}
});
},
})

10
pages/heartNew/heartNew.wxml

@ -119,5 +119,15 @@
button-left="520"
img-url="../../images/heart/apply-new.png"
bindmovebtnCallBack="myApply"></move-btn>
<move-btn
wx:if="{{btnTop!=0}}"
area-top="120"
area-height="90%"
button-width="200"
button-height="200"
button-top="{{btnTop}}"
button-left="{{btnLeft}}"
img-url="../../images/home/scan.png"
bindmovebtnCallBack="scanCode"></move-btn>
<load-more loadMoreVisible="{{loadMoreVisible}}" loadMoreType="{{loadMoreType}}"></load-more>
<completeInfo-dialog completeInfoDialogVisible="{{completeInfoDialogVisible}}"></completeInfo-dialog>

2
pages/toRegister/toRegister.js

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

69
subpages/heart/pages/scanCodeSignin/scanCodeSignin.js

@ -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()
},
})

9
subpages/heart/pages/scanCodeSignin/scanCodeSignin.json

@ -0,0 +1,9 @@
{
"usingComponents": {
"wux-cell": "../../../../dist/cell/index",
"notice": "../../components/notice/notice"
},
"navigationBarTitleText": "活动签到",
"navigationBarTextStyle": "white",
"navigationBarBackgroundColor": "#d53534"
}

29
subpages/heart/pages/scanCodeSignin/scanCodeSignin.wxml

@ -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>

102
subpages/heart/pages/scanCodeSignin/scanCodeSignin.wxss

@ -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%;
}

BIN
subpages/oneKeyService/images/suggest.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.9 KiB

15
subpages/oneKeyService/pages/moduleList/moduleList.js

@ -112,6 +112,15 @@ Page({
pid: this.data.moduleInfo.pid
}
api.moduleCategory(params).then(res => {
//为 多个悬浮按钮设置初始位置
if (this.data.pageIndex == 1) {
let index = 0
res.data.forEach(item => {
if (item.categoryType == 'module_category_type_button') {
item.startY = 600 + 200 * index++ + ''
}
})
}
this.setData({
modulelist: this.data.modulelist.concat(res.data),
loadMoreType: res.data.length === this.data.pageSize ? 'loading' : 'none',
@ -326,7 +335,7 @@ Page({
this.getNoticelist(e.detail.newsCategoryId)
},
//type-2 锦水清风-我要举报
//type-2 我的诉求 / 建议直通
toReportIssue (e) {
if (this.verifyCompleteInfo()) {
return false
@ -335,6 +344,10 @@ Page({
wx.navigateTo({
url: "/subpages/oneKeyService/pages/reportIssue/reportIssue"
})
} else if (e.currentTarget.dataset.code == 'notice_jsqf_jyzt') {
wx.navigateTo({
url: "/subpages/oneKeyService/pages/suggestDict/suggestDict"
})
} else {
wx.showToast({
title: '暂未开放',

4
subpages/oneKeyService/pages/moduleList/moduleList.wxml

@ -48,7 +48,7 @@
<image src="../../images/right.png" class="list-arrow"></image>
</view>
<move-btn button-top="650"
<move-btn button-top="{{item.startY}}"
button-left="560"
button-width="178"
button-height="178"
@ -112,7 +112,7 @@
<view class="type-9" wx:if="{{noticelist.length > 0 && moduleInfo.modulestyle == '9'}}">
<view class="list-item" hover-class="none" hover-stop-propagation="false" wx:for-index="index" wx:for-item="item" wx:key="index" wx:for="{{noticelist}}">
<view class="bottom" hover-class="none" hover-stop-propagation="false">
<view class="name">举报电话:{{item.mobile}}</view>
<view class="name">联系电话:{{item.mobile}}</view>
<image bindtap="mobile" data-mobile="{{item.mobile}}" class="" src="../../images/phone.png" />
</view>
<view class="line"></view>

15
subpages/oneKeyService/pages/reportIssue/reportIssue.js

@ -103,20 +103,28 @@ Page({
onInputContent (e) {
this.setData({
'dataForm.content': e.detail.value
'dataForm.content': e.detail.value.trim(' ')
})
},
onInputUser (e) {
this.setData({
'dataForm.reportUser': e.detail.value
'dataForm.reportUser': e.detail.value.trim(' ')
})
},
onInputMobile (e) {
this.setData({
'dataForm.reportUserMobile': e.detail.value
'dataForm.reportUserMobile': e.detail.value.trim(' ')
})
},
//去除 输入内容 首尾空格
contentTrim () {
this.setData({
'dataForm.content': this.data.dataForm.content.trim(' '),
'dataForm.reportUser': this.data.dataForm.reportUser.trim(' '),
'dataForm.reportUserMobile': this.data.dataForm.reportUserMobile.trim(' ')
})
},
//提交申请
submitIssue () {
if (!this.data.isAgree) {
@ -127,6 +135,7 @@ Page({
this.showToast("正在提交,请耐心等待...")
return false
}
this.contentTrim()
if (!this.data.dataForm.content) {
this.showToast("请填写诉求内容")
return false

31
subpages/oneKeyService/pages/suggestDetail/suggestDetail.js

@ -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
})
})
},
})

4
subpages/oneKeyService/pages/suggestDetail/suggestDetail.json

@ -0,0 +1,4 @@
{
"navigationBarTitleText": "建议详情",
"usingComponents": {}
}

28
subpages/oneKeyService/pages/suggestDetail/suggestDetail.wxml

@ -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>

40
subpages/oneKeyService/pages/suggestDetail/suggestDetail.wxss

@ -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;
}

274
subpages/oneKeyService/pages/suggestDict/suggestDict.js

@ -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
// })
// }
})

7
subpages/oneKeyService/pages/suggestDict/suggestDict.json

@ -0,0 +1,7 @@
{
"navigationBarTitleText": "建议直通",
"usingComponents": {
"notice": "../../compontents/notice/notice",
"rich-text-dialog": "../../compontents/richTextDialog/richTextDialog"
}
}

48
subpages/oneKeyService/pages/suggestDict/suggestDict.wxml

@ -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> -->

141
subpages/oneKeyService/pages/suggestDict/suggestDict.wxss

@ -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;
}

75
subpages/oneKeyService/pages/suggestDictList/suggestDictList.js

@ -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}`
})
}
})

7
subpages/oneKeyService/pages/suggestDictList/suggestDictList.json

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

13
subpages/oneKeyService/pages/suggestDictList/suggestDictList.wxml

@ -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>

75
subpages/oneKeyService/pages/suggestDictList/suggestDictList.wxss

@ -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;
}

28
utils/api.js

@ -65,7 +65,12 @@ module.exports = {
reportIssue: reportIssue,
reportIssueList: reportIssueList,
reportIssueDetail: reportIssueDetail,
getVolunteerTags: getVolunteerTags
getVolunteerTags: getVolunteerTags,
getActInfo: getActInfo,
signIn: signIn,
suggestDict: suggestDict,
suggestDictList: suggestDictList,
suggestDetail: suggestDetail
}
function getToken (wxCode) {
@ -585,4 +590,25 @@ function reportIssueDetail (id) {
//志愿者标签列表
function getVolunteerTags () {
return fly.get(`app-user/volunteer/tags`)
}
//居民扫签到码获取活动信息接口
function getActInfo (para) {
return fly.get(`act/actsignin/actInfo`, para)
}
// 居民签到打卡
function signIn (para) {
return fly.post("act/actsignin/signin", para)
}
// 建议直通-我的建议
function suggestDict (para) {
return fly.post("custom/advice/submit", para)
}
// 一键服务-建议直通-建议列表接口
function suggestDictList(para) {
return fly.get('custom/advice/list', para)
}
//一键服务-建议直通-建议详情接口
function suggestDetail (id) {
return fly.get(`custom/advice/detail/${id}`)
}
Loading…
Cancel
Save