X(3QNcc+X;5#+Z4-4y%NITf*6doAwI^0D$^`07`+R{{R30
literal 0
HcmV?d00001
diff --git a/subpages/conflictMediation/pages/historyDetail/historyDetail.js b/subpages/conflictMediation/pages/historyDetail/historyDetail.js
new file mode 100644
index 0000000..017e189
--- /dev/null
+++ b/subpages/conflictMediation/pages/historyDetail/historyDetail.js
@@ -0,0 +1,28 @@
+const app = getApp()
+const api = require('../../../../api/conflict')
+Page({
+ data: {
+ detail:{}
+ },
+ onHide:function(){
+
+ },
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad: function (options) {
+ let id = options.id;
+ api.getHistoryById(id).then(res=>{
+ this.setData({
+ detail:res.data
+ })
+ })
+ },
+ // this.getRecommend();
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow: function () {
+
+ },
+})
\ No newline at end of file
diff --git a/subpages/conflictMediation/pages/historyDetail/historyDetail.json b/subpages/conflictMediation/pages/historyDetail/historyDetail.json
new file mode 100644
index 0000000..caf3a8a
--- /dev/null
+++ b/subpages/conflictMediation/pages/historyDetail/historyDetail.json
@@ -0,0 +1,5 @@
+{
+ "navigationBarTitleText": "详情",
+ "usingComponents": {
+ }
+}
\ No newline at end of file
diff --git a/subpages/conflictMediation/pages/historyDetail/historyDetail.wxml b/subpages/conflictMediation/pages/historyDetail/historyDetail.wxml
new file mode 100644
index 0000000..c0cb123
--- /dev/null
+++ b/subpages/conflictMediation/pages/historyDetail/historyDetail.wxml
@@ -0,0 +1,42 @@
+
+
+ 矛盾纠纷类型
+
+
+
+ 形成原因
+
+
+
+ 涉及人数
+
+
+
+ 挑头骨干人员
+
+
+
+ 责任单位
+
+
+
+ 责任人
+
+
+
+ 主要采取措施
+
+
+
+ 目前稳控情况
+
+
+
+ 备注
+
+
+
+ 提报时间
+
+
+
\ No newline at end of file
diff --git a/subpages/conflictMediation/pages/historyDetail/historyDetail.wxss b/subpages/conflictMediation/pages/historyDetail/historyDetail.wxss
new file mode 100644
index 0000000..b6a3520
--- /dev/null
+++ b/subpages/conflictMediation/pages/historyDetail/historyDetail.wxss
@@ -0,0 +1,55 @@
+page {
+ width: 100%;
+ height: auto;
+ overflow-y: scroll;
+ background: #f7f7f7;
+}
+.toptabs{
+ border-bottom: 1px solid #EDEFF0;
+ position: fixed;
+ top: 0;
+ z-index: 999999;
+ width: 100%;
+ background: #ffffff;
+}
+.wux-tabs__tab {
+ font-size:32rpx!important;
+ color: #8393A0!important;
+}
+.wux-tabs__tab--current {
+ color:#333333!important;
+ font-weight: bold;
+ font-size: 40rpx!important;
+}
+.wux-tabs__tab-bar{
+ background: #ffffff!important;
+}
+.newhot-tabs{
+ display: flex;
+ width: 100%;
+ margin: 10px;
+ height: 50rpx;
+}
+.edit{
+ width: 100%;
+}
+.edit .edit-item{
+ width: 100%;
+ background-color: #fff;
+ margin-top: 15rpx;
+}
+.edit .edit-item .title{
+ color: #333333;
+ font-size: 32rpx;
+ margin:0 20rpx;
+ padding: 20rpx 0;
+ border-bottom: 0.5px solid #E7EEEE;
+}
+.edit .edit-item .textarea{
+ color: #333333;
+ font-size: 32rpx;
+ margin:0 20rpx;
+ padding: 20rpx 0;
+ border-bottom: 0.5px solid #E7EEEE;
+ width: 96%;
+}
\ No newline at end of file
diff --git a/subpages/conflictMediation/pages/index/index.js b/subpages/conflictMediation/pages/index/index.js
new file mode 100644
index 0000000..8c10cba
--- /dev/null
+++ b/subpages/conflictMediation/pages/index/index.js
@@ -0,0 +1,278 @@
+const api = require('../../../../api/conflict')
+import { formatTimestamp } from '../../../../utils/util'
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ loadMoreType: 'loading',
+ loadMoreVisible: true,
+ tabList:['编辑上报','历史上报'],//tab列表
+ currentTabIndex:0,
+ pageNo: 1, // 分页页码
+ pageSize: 20, // 分页页长
+ isLoading: true,
+ timestamp:'',
+ conflictType:'',
+ reason:'',
+ peopleNumber:'',
+ peopleLeader:'',
+ dutyUnit:'',
+ dutyPerson:'',
+ mainMeasure:'',
+ statusNow:'',
+ remark:'',
+ temp_datetime:[],
+ datetime:'',
+ historyList:[],
+ pickerVisible:false
+ },
+
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad: function (options) {
+ let date=new Date();
+ this.setData({
+ temp_datetime:[date.getFullYear().toString(),date.getMonth().toString(),date.getDate().toString()]
+ })
+ },
+
+ /**
+ * 页面上拉触底事件的处理函数
+ */
+ onReachBottom: function () {
+ if(this.data.currentTabIndex ==='1' && !this.data.isLoading && this.data.loadMoreType!='none'){
+ this.setData({
+ loadMoreType:'loading',
+ loadMoreVisible:true,
+ pageNo:this.data.pageNo+1,
+ isLoading:true
+ })
+ let param = {
+ pageIndex:this.data.pageNo,
+ pageSize:this.data.pageSize,
+ timestamp:this.data.timestamp
+ }
+ this.getHistory(param)
+ }
+ },
+ onConfirmDatetime(e){
+ console.log(e.detail)
+ this.setData({
+ datetime:e.detail.label,
+ pickerVisible:false
+ })
+ },
+ changeTab(e){
+ this.setData({
+ currentTabIndex:e.detail.key
+ })
+ if(e.detail.key==="1"){
+ this.setData({
+ loadMoreType:'loading',
+ loadMoreVisible:true,
+ pageNo:1,
+ historyList:[],
+ isLoading:true,
+ timestamp:formatTimestamp(new Date())
+ })
+ let param = {
+ pageIndex:this.data.pageNo,
+ pageSize:this.data.pageSize,
+ timestamp:this.data.timestamp
+ }
+ this.getHistory(param)
+ }
+ },
+ getHistory(param){
+ api.getHistory(param).then((res)=>{
+ this.setData({
+ historyList:this.data.historyList.concat(res.data),
+ isLoading:false
+ })
+ if(res.data.length<20){
+ this.setData({
+ loadMoreType:'none',
+ loadMoreVisible:true,
+ })
+ }else{
+ this.setData({
+ loadMoreType:"more",
+ loadMoreVisible:false
+ })
+ }
+ })
+ },
+ handleConflictType(e){
+ this.setData({
+ conflictType:e.detail.value
+ })
+ },
+ handleReason(e){
+ this.setData({
+ reason:e.detail.value
+ })
+ },
+ handlePeopleNumber(e){
+ this.setData({
+ peopleNumber:e.detail.value
+ })
+ },
+ handlePeopleLeader(e){
+ this.setData({
+ peopleLeader:e.detail.value
+ })
+ }
+ ,
+ handleDutyUnit(e){
+ this.setData({
+ dutyUnit:e.detail.value
+ })
+ },
+ handleDutyPerson(e){
+ this.setData({
+ dutyPerson:e.detail.value
+ })
+ },
+ handleMainMeasure(e){
+ this.setData({
+ mainMeasure:e.detail.value
+ })
+ },
+ handleStatusNow(e){
+ this.setData({
+ statusNow:e.detail.value
+ })
+ },
+ handleRemark(e){
+ this.setData({
+ remark:e.detail.value
+ })
+ },
+ showPicker(){
+ this.setData({
+ pickerVisible:!this.data.pickerVisible
+ })
+ },
+ navigateToDetail(e){
+ wx.navigateTo({
+ url: '../historyDetail/historyDetail?id='+e.currentTarget.dataset.id,
+ })
+ },
+ submit(){
+ if(this.data.conflictType===''){
+ wx.showToast({
+ title: '请输入矛盾纠纷类型',
+ icon:"none"
+ })
+ return false
+ }
+ if(this.data.reason===''){
+ wx.showToast({
+ title: '请输入形成原因',
+ icon:"none"
+ })
+ return false
+ }
+ if(this.data.peopleNumber===''){
+ wx.showToast({
+ title: '请输入涉及人数',
+ icon:"none"
+ })
+ return false
+ }
+ if(this.data.peopleLeader===''){
+ wx.showToast({
+ title: '请输入挑头骨干人员',
+ icon:"none"
+ })
+ return false
+ }
+ if(this.data.dutyUnit===''){
+ wx.showToast({
+ title: '请输入责任单位',
+ icon:"none"
+ })
+ return false
+ }
+ if(this.data.dutyPerson===''){
+ wx.showToast({
+ title: '请输入责任人',
+ icon:"none"
+ })
+ return false
+ }
+ if(this.data.mainMeasure===''){
+ wx.showToast({
+ title: '请输入主要采取措施',
+ icon:"none"
+ })
+ return false
+ }
+ if(this.data.statusNow===''){
+ wx.showToast({
+ title: '请输入目前稳控状况',
+ icon:"none"
+ })
+ return false
+ }
+ if(this.data.datetime===''){
+ wx.showToast({
+ title: '请选择提报时间',
+ icon:"none"
+ })
+ return false
+ }
+ let num = new Number(this.data.peopleNumber)
+ if(isNaN(num)||num<0 || this.data.peopleNumber.indexOf('.')!=-1){
+ wx.showToast({
+ title: '请输入正确的人数',
+ icon:"none"
+ })
+ return false
+ }
+ let param = {
+ conflictType:this.data.conflictType,
+ conflictReason:this.data.reason,
+ involvedNum:parseInt(this.data.peopleNumber),
+ mainstayLeader:this.data.peopleLeader,
+ responsibleDept:this.data.dutyUnit,
+ responsiblePeople:this.data.dutyPerson,
+ majorMeasures:this.data.mainMeasure,
+ currentSituation:this.data.statusNow,
+ remark:this.data.remark,
+ submitTime:this.data.datetime
+ }
+ wx.showLoading({
+ title:'提交中'
+ })
+ api.submitConflict(param).then(()=>{
+ this.setData({
+ conflictType:'',
+ reason:'',
+ peopleNumber:'',
+ peopleLeader:'',
+ dutyUnit:'',
+ dutyPerson:'',
+ mainMeasure:'',
+ statusNow:'',
+ remark:'',
+ datetime:''
+ })
+ wx.hideLoading({
+ complete: (res) => {
+ wx.showToast({
+ title: '上报成功',
+ icon:'none'
+ })},
+ })
+
+ }).catch(err=>{
+ wx.hideLoading({
+
+ })
+ })
+ }
+})
\ No newline at end of file
diff --git a/subpages/conflictMediation/pages/index/index.json b/subpages/conflictMediation/pages/index/index.json
new file mode 100644
index 0000000..2a78e22
--- /dev/null
+++ b/subpages/conflictMediation/pages/index/index.json
@@ -0,0 +1,11 @@
+{
+ "navigationBarTitleText": "综治矛调",
+ "usingComponents": {
+ "load-more": "../../components/loadMore/loadMore",
+ "pulldown-refresh": "../../components/pullDownRefresh/pullDownRefresh",
+ "wux-tabs": "../../../../dist/tabs/index",
+ "wux-tab": "../../dist/tab/index",
+ "wux-date-picker":"../../../../dist/date-picker/index",
+ "wux-cell":"../../../../dist/cell/index"
+ }
+}
\ No newline at end of file
diff --git a/subpages/conflictMediation/pages/index/index.wxml b/subpages/conflictMediation/pages/index/index.wxml
new file mode 100644
index 0000000..8416523
--- /dev/null
+++ b/subpages/conflictMediation/pages/index/index.wxml
@@ -0,0 +1,80 @@
+
+
+
+
+
+
+
+
+
+ 矛盾纠纷类型
+
+ {{util.length(conflictType)}}/50
+
+
+ 形成原因
+
+ {{util.length(reason)}}/200
+
+
+ 涉及人数
+
+
+
+ 挑头骨干人员
+
+ {{util.length(peopleLeader)}}/100
+
+
+ 责任单位
+
+ {{util.length(dutyUnit)}}/150
+
+
+ 责任人
+
+ {{util.length(dutyPerson)}}/150
+
+
+ 主要采取措施
+
+ {{util.length(mainMeasure)}}/500
+
+
+ 目前稳控情况
+
+ {{util.length(statusNow)}}/500
+
+
+ 备注
+
+ {{util.length(remark)}}/500
+
+
+
+
+ 提报时间
+
+
+
+ 提交
+
+
+
+ 上报时间:{{item.submitTime}}
+
+
+
+
+
+
+function length(str){
+ return str.length
+}
+module.exports = {
+ length: length
+}
+
+
diff --git a/subpages/conflictMediation/pages/index/index.wxss b/subpages/conflictMediation/pages/index/index.wxss
new file mode 100644
index 0000000..96f0b68
--- /dev/null
+++ b/subpages/conflictMediation/pages/index/index.wxss
@@ -0,0 +1,93 @@
+page {
+ width: 100%;
+ height: auto;
+ overflow-y: scroll;
+ background: #f7f7f7;
+}
+.toptabs{
+ border-bottom: 1px solid #EDEFF0;
+ position: fixed;
+ top: 0;
+ z-index: 999999;
+ width: 100%;
+ background: #ffffff;
+}
+.wux-tabs__tab {
+ font-size:32rpx!important;
+ color: #8393A0!important;
+}
+.wux-tabs__tab--current {
+ color:#333333!important;
+ font-weight: bold;
+ font-size: 40rpx!important;
+}
+.wux-tabs__tab-bar{
+ background: #ffffff!important;
+}
+.newhot-tabs{
+ display: flex;
+ width: 100%;
+ margin: 10px;
+ height: 50rpx;
+}
+.edit{
+ margin-top: 100rpx;
+ width: 100%;
+ height: calc(100vh - 100rpx);
+}
+.edit .edit-item{
+ width: 100%;
+ background-color: #fff;
+ margin-bottom: 15rpx;
+}
+.edit .edit-item .title{
+ color: #333333;
+ font-size: 32rpx;
+ margin:0 20rpx;
+ padding: 20rpx 0;
+ border-bottom: 0.5px solid #E7EEEE;
+}
+.edit .edit-item .textarea{
+ color: #333333;
+ font-size: 32rpx;
+ margin:0 20rpx;
+ padding: 20rpx 0;
+ border-bottom: 0.5px solid #E7EEEE;
+ padding-bottom: 45rpx;
+ width: 96%;
+}
+.history{
+ margin-top: 100rpx;
+ width: 100%;
+}
+.history .history-item{
+ width: 100%;
+ background-color: #fff;
+ margin-top: 15rpx;
+ height: 80rpx;
+ line-height: 80rpx;
+}
+.history .history-item .title{
+ color: #333333;
+ font-size: 32rpx;
+ margin:0 20rpx;
+}
+
+.submit{
+ width: 70%;
+ height: 100rpx;
+ margin: 30rpx auto;
+ background-color: #fa2626;
+ border-radius: 36rpx;
+ line-height: 100rpx;
+ text-align: center;
+ font-size: 34rpx;
+ color: #FFF;
+}
+.text-limit{
+ float:right;
+ margin-top:-48rpx;
+ margin-right:20rpx;
+ font-size:30rpx;
+ color:#999;
+}
\ No newline at end of file
diff --git a/subpages/consult/components/loadMore/loadMore.js b/subpages/consult/components/loadMore/loadMore.js
new file mode 100644
index 0000000..bde42e0
--- /dev/null
+++ b/subpages/consult/components/loadMore/loadMore.js
@@ -0,0 +1,14 @@
+Component({
+ data: {
+ },
+ properties: {
+ loadMoreVisible: {
+ type: Boolean,
+ value: false
+ },
+ loadMoreType: {
+ type: String,
+ value: 'loading'
+ }
+ }
+})
\ No newline at end of file
diff --git a/subpages/consult/components/loadMore/loadMore.json b/subpages/consult/components/loadMore/loadMore.json
new file mode 100644
index 0000000..32640e0
--- /dev/null
+++ b/subpages/consult/components/loadMore/loadMore.json
@@ -0,0 +1,3 @@
+{
+ "component": true
+}
\ No newline at end of file
diff --git a/subpages/consult/components/loadMore/loadMore.wxml b/subpages/consult/components/loadMore/loadMore.wxml
new file mode 100644
index 0000000..573e607
--- /dev/null
+++ b/subpages/consult/components/loadMore/loadMore.wxml
@@ -0,0 +1,7 @@
+
+
+
+ 正在加载中...
+
+ 没有更多了~
+
\ No newline at end of file
diff --git a/subpages/consult/components/loadMore/loadMore.wxss b/subpages/consult/components/loadMore/loadMore.wxss
new file mode 100644
index 0000000..dbb07cd
--- /dev/null
+++ b/subpages/consult/components/loadMore/loadMore.wxss
@@ -0,0 +1,18 @@
+.load-more {
+ width: 100%;
+ height: 100rpx;
+ background: #f7f7f7;
+ display: flex;
+ justify-content: center;
+ align-items: center;
+}
+.load-more .load-text {
+ color: #999;
+ font-size: 26rpx;
+}
+.load-more .load-image {
+ width: 30rpx;
+ height: 30rpx;
+ object-fit: cover;
+ margin-right: 10rpx;
+}
\ No newline at end of file
diff --git a/subpages/consult/components/pullDownRefresh/pullDownRefresh.js b/subpages/consult/components/pullDownRefresh/pullDownRefresh.js
new file mode 100644
index 0000000..b76e2ec
--- /dev/null
+++ b/subpages/consult/components/pullDownRefresh/pullDownRefresh.js
@@ -0,0 +1,70 @@
+Component({
+ data: {
+ lastY: '',
+ translateHeight: 0,
+ state: -1,
+ scrollTop: 0,
+ enablePulldownFresh: false
+ },
+ options: {
+ multipleSlots: true
+ },
+ properties: {
+ upperDistance: {
+ type: Number,
+ value: 80
+ }
+ },
+ methods: {
+ onPageScroll (e) {
+ this.data.scrollTop = e.scrollTop
+ this.data.enablePulldownFresh = false
+ },
+ touchstart (e) {
+ this.data.lastY = e.touches[0].clientY
+ if (this.data.scrollTop === 0) {
+ this.data.enablePulldownFresh = true
+ } else {
+ this.data.enablePulldownFresh = false
+ }
+ },
+ touchmove (e) {
+ let clientY = e.touches[0].clientY
+ let offset = clientY - this.data.lastY
+ if (this.data.scrollTop > 0 || offset < 0) {
+ return false
+ }
+ this.data.translateHeight = offset
+ this.data.state = 1
+
+ if (this.data.enablePulldownFresh) {
+ if (this.data.translateHeight > this.data.upperDistance) {
+ this.data.state = 2
+ }
+ this.setData({
+ translateHeight: this.data.translateHeight > 100 ? 100 : this.data.translateHeight,
+ state: this.data.state
+ })
+ }
+ },
+ touchend (e) {
+ if (this.data.translateHeight > this.data.upperDistance) {
+ if (this.data.enablePulldownFresh) {
+ this.setData({
+ translateHeight: 100,
+ state: 3
+ })
+ this.triggerEvent('pullDownRefresh')
+ }
+ } else if (this.data.scrollTop <= 0) {
+ this.stopRefresh()
+ }
+ },
+ stopRefresh () {
+ this.setData({
+ translateHeight: 0,
+ state: -1
+ })
+ }
+ }
+})
\ No newline at end of file
diff --git a/subpages/consult/components/pullDownRefresh/pullDownRefresh.json b/subpages/consult/components/pullDownRefresh/pullDownRefresh.json
new file mode 100644
index 0000000..32640e0
--- /dev/null
+++ b/subpages/consult/components/pullDownRefresh/pullDownRefresh.json
@@ -0,0 +1,3 @@
+{
+ "component": true
+}
\ No newline at end of file
diff --git a/subpages/consult/components/pullDownRefresh/pullDownRefresh.wxml b/subpages/consult/components/pullDownRefresh/pullDownRefresh.wxml
new file mode 100644
index 0000000..cf6780f
--- /dev/null
+++ b/subpages/consult/components/pullDownRefresh/pullDownRefresh.wxml
@@ -0,0 +1,9 @@
+
+
+
+ {{state == 1 ? '下拉刷新' : state == 2 ? '松开刷新' : '刷新中...'}}
+
+
+
+
+
\ No newline at end of file
diff --git a/subpages/consult/components/pullDownRefresh/pullDownRefresh.wxss b/subpages/consult/components/pullDownRefresh/pullDownRefresh.wxss
new file mode 100644
index 0000000..7ee6289
--- /dev/null
+++ b/subpages/consult/components/pullDownRefresh/pullDownRefresh.wxss
@@ -0,0 +1,27 @@
+.pulldown-refresh {
+ width:100%;
+ background: #f7f7f7;
+}
+.pulldown-refresh .pulldown-state {
+ width:100%;
+ height: 100rpx;
+ display:flex;
+ justify-content: center;
+ align-items: center;
+ margin-bottom: -100rpx;
+}
+.pulldown-refresh .pulldown-state .loading {
+ width: 30rpx;
+ height: 30rpx;
+ margin-right: 10rpx;
+}
+.pulldown-refresh .pulldown-state .loading-state {
+ font-size: 25rpx;
+ color:#666;
+}
+
+.pulldown-refresh .pulldown-content {
+ width:100%;
+ height:auto;
+ transition: transform 0.05s linear;
+}
\ No newline at end of file
diff --git a/subpages/consult/components/questionList/questionList.js b/subpages/consult/components/questionList/questionList.js
new file mode 100644
index 0000000..5b73271
--- /dev/null
+++ b/subpages/consult/components/questionList/questionList.js
@@ -0,0 +1,59 @@
+Component({
+ /**
+ * 组件的属性列表
+ */
+ properties: {
+ questionList:{
+ type:Array
+ },
+ currentTab:{
+ type:Number
+ },
+ currentQuestion:{
+ type:String
+ }
+ },
+ /**
+ * 组件的初始数据
+ */
+ data: {
+ answerInput:''
+ },
+
+ /**
+ * 组件的方法列表
+ */
+ methods: {
+ clearInput(){
+ this.setData({
+ answerInput:''
+ })
+ },
+ handleInput(e){
+ this.setData({
+ answerInput:e.detail.value
+ })
+ },
+ openInput(e){
+ if(this.data.currentQuestion != e.currentTarget.dataset.index){
+ this.setData({
+ answerInput:''
+ })
+ }
+ this.triggerEvent("changeCurrentQuestion",e.currentTarget.dataset.index);
+ },
+ submitAnswer(e){
+ if(this.data.answerInput===''){
+ wx.showToast({
+ title: '请输入回答',
+ icon:"none"
+ })
+ return false
+ }
+ this.triggerEvent("submitAnswer",{id:e.currentTarget.dataset.questionid,answer:this.data.answerInput});
+ },
+ changeCollapse(e){
+ this.triggerEvent("changeCollapse",e);
+ },
+ }
+})
diff --git a/subpages/consult/components/questionList/questionList.json b/subpages/consult/components/questionList/questionList.json
new file mode 100644
index 0000000..e8cfaaf
--- /dev/null
+++ b/subpages/consult/components/questionList/questionList.json
@@ -0,0 +1,4 @@
+{
+ "component": true,
+ "usingComponents": {}
+}
\ No newline at end of file
diff --git a/subpages/consult/components/questionList/questionList.wxml b/subpages/consult/components/questionList/questionList.wxml
new file mode 100644
index 0000000..f873f59
--- /dev/null
+++ b/subpages/consult/components/questionList/questionList.wxml
@@ -0,0 +1,49 @@
+
+
+
+
+ {{item.questionTime}}
+
+
+ 回复
+
+
+
+
+
+
+ {{tools.length(answerInput)|0}}/500
+ 确定
+
+
+
+ {{answer.answerContent}}
+ {{answer.collapse?'全文':'收起'}}
+
+
+
+
+
+
+function toString(a){
+ return a.toString();
+}
+function length(str){
+ return str.length;
+}
+module.exports = {
+ toString: toString,
+ length:length
+}
+
\ No newline at end of file
diff --git a/subpages/consult/components/questionList/questionList.wxss b/subpages/consult/components/questionList/questionList.wxss
new file mode 100644
index 0000000..82cdacf
--- /dev/null
+++ b/subpages/consult/components/questionList/questionList.wxss
@@ -0,0 +1,117 @@
+/* subpages/consult/components/questionList.wxss */
+.home{
+ width: 100%;
+}
+.list-item{
+ background-color: #fff;
+ margin-top: 20rpx;
+ padding: 0 20rpx;
+}
+.list-item .item-header{
+ display: inline-block;
+ width: 100%;
+}
+.list-item .item-header .index{
+ display: inline-block;
+ width: 4%;
+ height: 100rpx;
+ line-height: 100rpx;
+ font-size: 30rpx;
+}
+.list-item .item-header .question{
+ display: inline-block;
+ line-height: 50rpx;
+ font-size: 35rpx;
+ letter-spacing: 2rpx;
+}
+.list-item .item-button .time{
+ display: inline-block;
+ width: 40%;
+ font-size: 25rpx;
+ color: #AAA;
+}
+.list-item .item-button{
+ height: 60rpx;
+ width: 100%;
+ padding-top: 20rpx;
+}
+
+.list-item .item-button .reply{
+ height: 50rpx;
+ width: 20%;
+ font-size: 30rpx;
+ line-height: 50rpx;
+ text-align: center;
+ float: right;
+}
+.list-item .item-button .reply .button-img{
+ height: 25rpx;
+ width: 25rpx;
+ margin-left: -5rpx;
+}
+.list-item .item-button .reply .button-text{
+ color: #F71A1A;
+ font-size: 30rpx;
+ display: inline-block;
+ margin-left: 10rpx;
+}
+.item-reply{
+ width: 100%;
+ min-height: 300rpx;
+}
+.item-reply .textarea{
+ width: 100%;
+ min-height: 300rpx;
+ background-color: #f2f2f2;
+}
+.answer-content{
+ width: 100%;
+ font-size: 30rpx;
+ color: #777;
+}
+.reply-button{
+ border-radius: 35rpx;
+ background-color: #e02d22;
+ height: 55rpx;
+ width: 120rpx;
+ color: #fff;
+ line-height: 50rpx;
+ text-align: center;
+ margin-right: 20rpx;
+ float: right;
+ font-size: 30rpx;
+}
+.answer-footer{
+ padding: 20rpx 0;
+ font-size: 30rpx;
+ color: #c3c3c3;
+}
+.answer-content text{
+ line-height: 50rpx;
+ display: block;
+}
+.question text{
+ line-height: 50rpx;
+}
+
+.answer-content text.text-collapse{
+ display:-webkit-box;
+ -webkit-box-orient:vertical;
+ -webkit-line-clamp:3;
+ overflow: hidden;
+ text-overflow: ellipsis;
+}
+.text-collapse{
+ display:-webkit-box;
+ -webkit-box-orient:vertical;
+ -webkit-line-clamp:2;
+ overflow: hidden;
+ text-overflow: ellipsis;
+}
+
+.coll-p{
+ font-size: 30rpx;
+ color: #5064A3;
+ margin-top: 10rpx;
+ margin-right: 20rpx;
+}
\ No newline at end of file
diff --git a/subpages/consult/images/input.png b/subpages/consult/images/input.png
new file mode 100644
index 0000000000000000000000000000000000000000..eda2e427e8364bdaf3881d2ef38ef6933f697368
GIT binary patch
literal 896
zcmV-`1AqL9P)2vF-Oh&+|Xe8E6L|vY{bh
zYT6ay@f-s49NG3Q3=e-&1a`_0%99uxdbwke)zox}m~Rt6
zIgkQ>l4Tv-F-UdBYHq$k!1Y|nc?~@MFX+#K0}*(=6=h83ZZNOzAiU8`+!
zswn{(Omq~nSaM5HCKRe>V1TlN-vBZgXh$serEuevtteAfRSjJqARtog^abywg+j*0
zW{Rz~l2E3yvIah%s>Gd1PQnUXXPC^L`uO;Csohx=QV4lG4&t6VKguoyAyTGock0Px
z(Mn3DPPL1e2MNfpq&Q@FRGbrubu%eDBL|Vv9lX07izJMg4WDJTV|I2!B=3H-?Dy}7
z&-Yd`N043hWgtV^c85MUSGHa2;{BLNbnV{#k${%$wso$RVh}N>2~bGM!Iw;3CJ;C!
zg?N;+ZHq!+PD#t^)KjTVSCSWorC_iR%w6RmH4{kLuBTF)n#sB_ED!}Ng2C@#*2_Q!
zfNdjA7?y*<6O!mz!5z_UovMU|=-5uX^1|>d5a1tw*wN@~Vm<<3MnMk=XeMA-
z0(~a%s&a90vDD6535U-Tb2qU%Kb`SSPY=n)#=Vxu^Uk^ch#rV|ygLg$0do@p-~Is-
WI{R~{P*4#70000W{1IHt@N6}hUdxX|LC|ZiP)QVZ!9&H_3bfMI&rl`GQ1hF>}Bq6b5#GVmi
z6r~7i2DPcto_f<>@B5yf>pI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yKsKRBIZtEH(%wT4)IGTR+<$37c$4dG;jM#|Kb
zsm<6p&ubKRH_k59aPV<=^t+`+%f^}zIVUpjK#KydiU>e{OMB{7y#B8FhG3*|SJps^
zWmMzq=0=B0QIDD_LvE&WzR$RU;XodLhy_E4RaiuLWRyj092XqU9Tjav;}ntTf1Ab$
zO5+srlat<0PPcw?(xPz^s#E>RN$D3(!8qX_;a;DQ6Ez}~C%&M`spjd$rB8D!;@u)N
zP9np^^^LJFYvQ}dE+6)u+$ZZ?_j5M;Mo%@c0fip103CIld30r%<(Ya=+iFpF;@0LPo=X;3Ys)!ZqqRBLpG1_
z|6;D|r*MH7mfq3y+Sw8n&eO5-i(6@MxzaPv2Wq$*!{jgOU$8UFUws1t->3t_fO_6E
zA?bSFjE>fE)`|~@K{S(7QtxYL#E8)6)8EOBKp^wYicq{5%Z#tZl3BY?W;%lX~$6AI6Ho6O$c!)97aXxq0HJCE<~k4E4{t?^U*R
zc9iz^<24VD@@{@}5eKk0dP|
zU!Glxp|uR^XUkxFTgyv^kniSG<#t$S&M~rkMd;2mpi2N57X*}Rkly){v~AXfyuzXL-uiAHZ5cy7NIOK1$VKC(y|nEWpW8Vr=rpd
zuSnlQf1yFHwUrBdwX5rV(T(12a=99X(3QNcc+X;5#+Z4-4y%NITf*6doAwI^0D$^`07`+R{{R30
literal 0
HcmV?d00001
diff --git a/subpages/consult/pages/consultIndex/consultIndex.js b/subpages/consult/pages/consultIndex/consultIndex.js
new file mode 100644
index 0000000..3804fe9
--- /dev/null
+++ b/subpages/consult/pages/consultIndex/consultIndex.js
@@ -0,0 +1,234 @@
+const app = getApp()
+const api = require('../../../../api/consult')
+import { formatTimestamp } from '../../../../utils/util'
+Page({
+ data: {
+ loadMoreType: 'loading',
+ loadMoreVisible: true,
+ tabList:['我的待回答','公共待回答','已经回答'],//tab列表
+ currentTabIndex:0,
+ currentQuestion:'',
+ pageNo: 1, // 分页页码
+ pageSize: 10, // 分页页长
+ isLoading: true,
+ timestamp:'',
+ answerInput:'',
+ questionList:[],
+ },
+ onHide:function(){
+
+ },
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad: function (options) {
+ this.setData({
+ timestamp:formatTimestamp(new Date())
+ })
+ let param = {
+ pageIndex:this.data.pageNo,
+ pageSize:this.data.pageSize,
+ timestamp:this.data.timestamp,
+ designatedFlag:this.data.currentTabIndex==0?'1':'0'
+ }
+ this.getQuestionList(param)
+ },
+ getQuestionList(param){
+ api.getQuestionList(param).then((res)=>{
+ this.setData({
+ questionList:this.data.questionList.concat(res.data),
+ isLoading:false
+ })
+ this.setCollapse();
+ if(res.data.length<10){
+ this.setData({
+ loadMoreType:'none',
+ loadMoreVisible:true,
+ })
+ }else{
+ this.setData({
+ loadMoreType:"more",
+ loadMoreVisible:false
+ })
+ }
+ }).catch(err=>{
+ this.setData({
+ questionList:[],
+ isLoading:false,
+ loadMoreType:'none',
+ loadMoreVisible:true
+ })
+ })
+ },
+ getMyQuestionList(param){
+ api.getMyQuestionList(param).then((res)=>{
+ this.setData({
+ questionList:this.data.questionList.concat(res.data),
+ isLoading:false
+ })
+ this.setCollapse();
+ if(res.data.length<10){
+ this.setData({
+ loadMoreType:'none',
+ loadMoreVisible:true,
+ })
+ }else{
+ this.setData({
+ loadMoreType:"more",
+ loadMoreVisible:false
+ })
+ }
+ }).catch(err=>{
+ this.setData({
+ questionList:[],
+ isLoading:false,
+ loadMoreType:'none',
+ loadMoreVisible:true
+ })
+ })
+ },
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow: function () {
+
+ },
+ onReachBottom(){
+ if(!this.data.isLoading && this.data.loadMoreType!='none'){
+ this.setData({
+ isLoading:true,
+ loadMoreVisible:true,
+ loadMoreType:'loading',
+ pageNo:this.data.pageNo+1
+ })
+ if(this.data.currentTabIndex!=2){
+ let param = {
+ pageIndex:this.data.pageNo,
+ pageSize:this.data.pageSize,
+ timestamp:this.data.timestamp,
+ designatedFlag:this.data.currentTabIndex==0?'1':'0'
+ }
+ this.getQuestionList(param)
+ }else{
+ let param = {
+ pageIndex:this.data.pageNo,
+ pageSize:this.data.pageSize,
+ timestamp:this.data.timestamp,
+ }
+ this.getMyQuestionList(param)
+ }
+ }
+ },
+ handleInput(e){
+ this.setData({
+ answerInput:e.detail.value
+ })
+ },
+ changeTab(e){
+ if(this.data.isLoading){
+ return false;
+ }
+ this.setData({
+ questionList:[],
+ currentQuestion:'',
+ answerInput:'',
+ currentTabIndex:e.detail.key,
+ loadMoreType:'loading',
+ loadMoreVisible:true,
+ isLoading:true,
+ pageSize:10,
+ pageNo:1,
+ timestamp:formatTimestamp(new Date())
+ })
+ this.selectComponent("#question-list").clearInput();
+ if(e.detail.key!=2){
+ let param = {
+ pageIndex:this.data.pageNo,
+ pageSize:this.data.pageSize,
+ timestamp:this.data.timestamp,
+ designatedFlag:this.data.currentTabIndex==0?'1':'0'
+ }
+ this.getQuestionList(param)
+ }else{
+ let param = {
+ pageIndex:this.data.pageNo,
+ pageSize:this.data.pageSize,
+ timestamp:this.data.timestamp,
+ }
+ this.getMyQuestionList(param)
+ }
+ },
+ openInput(e){
+ this.setData({
+ currentQuestion:e.detail,
+ answerInput:''
+ })
+ },
+ submitAnswer(e){
+ let param = {
+ questionId:e.detail.id,
+ answerContent:e.detail.answer
+ }
+ api.submitAnswer(param).then(()=>{
+ this.data.questionList.splice(this.data.currentQuestion,1);
+ this.selectComponent("#question-list").clearInput();
+ wx.showToast({
+ title: '回复成功',
+ icon:"none"
+ })
+ this.setData({
+ questionList:this.data.questionList,
+ currentQuestion:''
+ })
+ }).catch(err=>{
+
+ })
+ },
+ setCollapse: function() {
+ var query = wx.createSelectorQuery();
+ var that = this;
+ query.in(this.selectComponent('#question-list')).selectAll('#questionContent').boundingClientRect(function (rect) {
+ rect.forEach((v, i) => {
+ if (v.height > 60) { //判断高度,根据各种高度取折中
+ var set = "questionList[" + i + "].collapse";
+ var set1 = "questionList[" + i + "].showCollapse";
+ that.setData({
+ [set]: true,
+ [set1]: true,
+ })
+ }
+ })
+ }).exec();
+ query.in(this.selectComponent('#question-list')).selectAll('#answerContent').boundingClientRect(function (rect) {
+ rect.forEach((v, i) => {
+ console.log(v)
+ console.log(v.dataset.question)
+ if (v.height > 70) {
+ var set = "questionList[" + v.dataset.question + "].answerList[0].collapse";
+ var set1 = "questionList[" + v.dataset.question + "].answerList[0].showCollapse";
+ that.setData({
+ [set]: true,
+ [set1]: true,
+ })
+ }
+ })
+ }).exec();
+ },
+ //点击全文收起
+ changeCollapse: function(e){
+ var index = e.detail.currentTarget.dataset.index;
+ var questionIndex=e.detail.currentTarget.dataset.questionindex;
+ if(questionIndex===undefined){
+ var set = "questionList[" + index + "].collapse";
+ this.setData({
+ [set]: !this.data.questionList[index].collapse
+ })
+ }else{
+ var set = "questionList[" + questionIndex + "].answerList[0].collapse";
+ console.log(set)
+ this.setData({
+ [set]: !this.data.questionList[questionIndex].answerList[0].collapse
+ })
+ }
+ }
+})
\ No newline at end of file
diff --git a/subpages/consult/pages/consultIndex/consultIndex.json b/subpages/consult/pages/consultIndex/consultIndex.json
new file mode 100644
index 0000000..159baf3
--- /dev/null
+++ b/subpages/consult/pages/consultIndex/consultIndex.json
@@ -0,0 +1,10 @@
+{
+ "navigationBarTitleText": "心理咨询",
+ "usingComponents": {
+ "load-more": "../../components/loadMore/loadMore",
+ "pulldown-refresh": "../../components/pullDownRefresh/pullDownRefresh",
+ "wux-tabs": "../../../../dist/tabs/index",
+ "wux-tab": "../../dist/tab/index",
+ "question-list":"../../components/questionList/questionList"
+ }
+}
\ No newline at end of file
diff --git a/subpages/consult/pages/consultIndex/consultIndex.wxml b/subpages/consult/pages/consultIndex/consultIndex.wxml
new file mode 100644
index 0000000..d683eb1
--- /dev/null
+++ b/subpages/consult/pages/consultIndex/consultIndex.wxml
@@ -0,0 +1,25 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/subpages/consult/pages/consultIndex/consultIndex.wxss b/subpages/consult/pages/consultIndex/consultIndex.wxss
new file mode 100644
index 0000000..37c0f2b
--- /dev/null
+++ b/subpages/consult/pages/consultIndex/consultIndex.wxss
@@ -0,0 +1,128 @@
+page {
+ width: 100%;
+ height: auto;
+ overflow-y: scroll;
+ background: #f7f7f7;
+}
+.toptabs{
+ border-bottom: 1px solid #EDEFF0;
+ position: fixed;
+ top: 0;
+ z-index: 999999;
+ width: 100%;
+ background: #ffffff;
+}
+.wux-tabs__tab {
+ font-size:32rpx!important;
+ color: #8393A0!important;
+}
+.wux-tabs__tab--current {
+ color:#333333!important;
+ font-weight: bold;
+ font-size: 40rpx!important;
+}
+.wux-tabs__tab-bar{
+ background: #ffffff!important;
+}
+.newhot-tabs{
+ display: flex;
+ width: 100%;
+ margin: 10px;
+ height: 50rpx;
+}
+.header {
+ position: fixed;
+ width: 100%;
+ top: 0;
+ left: 0;
+ z-index: 1000;
+}
+.header .header-bg {
+ width: 100%;
+ height: 100%;
+ position: absolute;
+ z-index: 10;
+ left: 0;
+ top: 0;
+}
+.header .navigation {
+ width: 100%;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ color: rgba(255,255,255, 0.9);
+ font-size: 32rpx;
+ position: relative;
+ z-index: 100;
+}
+.home {
+ width: 100%;
+ overflow-y: scroll;
+}
+.nothing-to-show{
+ width: 100%;
+ height: 100vh;
+ background: #f7f7f7;
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ justify-content: center;
+}
+.nothing-img{
+ width: 500rpx;
+ height:245rpx;
+ object-fit: cover;
+
+}
+.tab{
+ width: 100%;
+ height: 100rpx;
+ background: #fff;
+ overflow-x: scroll;
+ display: inline-block;
+ white-space: nowrap;
+ margin:0 auto;
+ -webkit-overflow-scrolling: touch;
+ position: fixed;
+ top: 0;
+}
+.tab-item{
+ height: 100%;
+ min-width: 33%;
+ margin:0 auto;
+ display: inline-block;
+ box-sizing: border-box;
+}
+.tab-name{
+ text-align: center;
+ margin:0 auto;
+ height: 80%;
+ font-size: 25rpx;
+ line-height: 100rpx;
+ padding: 0 20rpx;
+ color: #999;
+}
+.tab-name.active{
+ text-align: center;
+ margin:0 auto;
+ height: 80%;
+ font-size: 30rpx;
+ line-height: 100rpx;
+ padding: 0 20rpx;
+ color: #BB0300;
+}
+.tab-line.active{
+ border-top: 4rpx solid #BB0300;
+ width: 30%;
+ margin: 0 auto;
+ margin-top: 10rpx;
+}
+.list{
+ margin: 0 auto;
+ margin-top: 120rpx;
+}
+.questionList{
+ width: 100%;
+}
+
+