From bd3a9d7086f5a428b385599ba2cb08299b22c0df Mon Sep 17 00:00:00 2001
From: riku <risaku@163.com>
Date: 星期四, 15 九月 2022 09:26:18 +0800
Subject: [PATCH] 2022.9.14
---
pages/m_consult/behaviors/b_search.js | 5
pages/m_consult/c_result-item-search/c_result-item-search.js | 41 ++++--
base/behaviors/b_loadingStatus.js | 3
pages/m_consult/base_c/c_result-item/c_result-item.wxml | 2
pages/m_consult/consultonline/consultonline.wxml | 54 +++++---
component/loadingstatus/loadingstatus.wxss | 10 +
pages/m_service/p_schedule/p_schedule.js | 11 +
pages/m_consult/consultonline/consultonline.js | 124 ++++++++++++++++---
pages/m_learn/learn/learn.js | 2
component/loadingstatus/loadingstatus.wxml | 10 +
pages/m_consult/behaviors/b_questions.js | 5
pages/m_learn/learfile/learnfile.js | 2
app.json | 2
component/switchtab/switchtab.js | 20 +++
pages/m_consult/consultonline/consultonline.json | 5
pages/m_learn/behaviors/b_fetch.js | 4
res/icons/avator_sys.png | 0
pages/m_consult/consultonline/consultonline.wxss | 20 ++
service/baserequest.js | 4
pages/m_consult/c_result-item-search/c_result-item-search.wxml | 2
component/switchtab/switchtab.wxml | 2
pages/m_consult/base_c/c_result-item/c_result-item.js | 7 +
component/loadingstatus/loadingstatus.js | 13 ++
23 files changed, 259 insertions(+), 89 deletions(-)
diff --git a/app.json b/app.json
index c283614..3adfbe4 100644
--- a/app.json
+++ b/app.json
@@ -72,7 +72,7 @@
"selectedIconPath": "res/icons/tab_5_select.png"
},
{
- "pagePath": "pages/m_service/p_servicehome/servicehome",
+ "pagePath": "pages/m_promise/promisehome/promise",
"text": "瀹堟硶鎵胯",
"iconPath": "/res/icons/tab_3.png",
"selectedIconPath": "res/icons/tab_3_select.png"
diff --git a/base/behaviors/b_loadingStatus.js b/base/behaviors/b_loadingStatus.js
index ad6bf06..d96ae21 100644
--- a/base/behaviors/b_loadingStatus.js
+++ b/base/behaviors/b_loadingStatus.js
@@ -5,6 +5,7 @@
data: {
cPage: 1,
tPage: 1,
+ perPage: 10,
totalCount: 0,
loading: false,
needLoadMore: false
@@ -59,6 +60,6 @@
if (typeof this.loadComplete === 'function') {
this.loadComplete()
}
- }
+ },
}
})
\ No newline at end of file
diff --git a/component/loadingstatus/loadingstatus.js b/component/loadingstatus/loadingstatus.js
index d6d47cf..f450855 100644
--- a/component/loadingstatus/loadingstatus.js
+++ b/component/loadingstatus/loadingstatus.js
@@ -1,4 +1,9 @@
// component/loadingstatus/loadingstatus.js
+/**
+ * 鍔犺浇鐘舵�佺粍浠�
+ * 閰嶅悎 b_loadingStatus 浣跨敤
+ * @see '/base/behaviors/b_loadingStatus.js'
+ */
Component({
options: {
addGlobalClass: true
@@ -7,6 +12,10 @@
* 缁勪欢鐨勫睘鎬у垪琛�
*/
properties: {
+ scrollable: {
+ type: Boolean,
+ value: true
+ },
loading: {
type: Boolean,
value: false
@@ -32,6 +41,8 @@
* 缁勪欢鐨勬柟娉曞垪琛�
*/
methods: {
-
+ gotoMore() {
+ this.triggerEvent('gotoMore')
+ }
}
})
diff --git a/component/loadingstatus/loadingstatus.wxml b/component/loadingstatus/loadingstatus.wxml
index 2fd736e..b0a8e38 100644
--- a/component/loadingstatus/loadingstatus.wxml
+++ b/component/loadingstatus/loadingstatus.wxml
@@ -2,11 +2,15 @@
<import src="/template/nodata.wxml"></import>
<template wx:if="{{!loading && nodata}}" is="nodataPage"></template>
-<block wx:else="">
+<block wx:else>
<view wx:if="{{!loading}}" class="load-more">
- <text wx:if="{{needLoadMore}}">涓婃粦鍔犺浇</text>
- <text wx:else="">鈥斺�斿埌搴曚簡鈥斺��</text>
+ <view wx:if="{{!scrollable}}" class="btn-more" bindtap="gotoMore">鏌ョ湅鏇村</view>
+ <block wx:else>
+ <text wx:if="{{needLoadMore}}">涓婃粦鍔犺浇</text>
+ <text wx:else="">鈥斺�斿埌搴曚簡鈥斺��</text>
+ </block>
</view>
+
<view wx:else class="load-more">
<mp-loading duration="{{900}}" type="dot-gray" show="{{true}}" animated="{{true}}"></mp-loading>
</view>
diff --git a/component/loadingstatus/loadingstatus.wxss b/component/loadingstatus/loadingstatus.wxss
index 3db6a92..6a4dcfc 100644
--- a/component/loadingstatus/loadingstatus.wxss
+++ b/component/loadingstatus/loadingstatus.wxss
@@ -4,4 +4,14 @@
font-size: 12px;
color: var(--fyui-text-color_3);
padding: 8px;
+}
+
+.btn-more{
+ text-align: center;
+ background-color: white;
+ /* margin: 0 10px; */
+ border-top: 1px solid var(--fyui-BG_1);
+ color: var(--fyui-text-color_2);
+ padding: 8px 8px 0 8px;
+ font-size: 12px;
}
\ No newline at end of file
diff --git a/component/switchtab/switchtab.js b/component/switchtab/switchtab.js
index 48f52b6..fb33732 100644
--- a/component/switchtab/switchtab.js
+++ b/component/switchtab/switchtab.js
@@ -8,6 +8,14 @@
* 缁勪欢鐨勫睘鎬у垪琛�
*/
properties: {
+ extClass: {
+ type: String,
+ value: ''
+ },
+ extClassOn: {
+ type: String,
+ value: ''
+ },
tabList: {
type: Array,
value: []
@@ -29,6 +37,17 @@
// pageheight: '600px',
},
+ pageLifetimes: {
+ // 缁勪欢鎵�鍦ㄩ〉闈㈢殑鐢熷懡鍛ㄦ湡鍑芥暟
+ show: function () {
+ // this.refreshHeight(true)
+
+ },
+ hide: function () { },
+ resize: function () {
+ },
+ },
+
/**
* 缁勪欢鐨勬柟娉曞垪琛�
*/
@@ -38,6 +57,7 @@
if (e) {
setTimeout(() => {
const p = `.page${this.data.currentTab}`
+ console.log(p);
this.tabsHeight(p);
}, 50);
}
diff --git a/component/switchtab/switchtab.wxml b/component/switchtab/switchtab.wxml
index 4baba88..36d92a4 100644
--- a/component/switchtab/switchtab.wxml
+++ b/component/switchtab/switchtab.wxml
@@ -2,7 +2,7 @@
<view class="swiper-tab">
<scroll-view class="swiper-tab_view" scroll-into-view="item{{currentTab}}" scroll-x="true" show-scrollbar="true" scroll-with-animation="true">
<block wx:for="{{tabList}}" wx:key="i">
- <view id="item{{index}}" class="swiper-tab-list {{currentTab==index ? 'on' : ''}}" data-current="{{index}}" bindtap="swichNav">
+ <view id="item{{index}}" class="swiper-tab-list {{extClass}} {{currentTab==index ? 'on ' + extClassOn : ''}}" data-current="{{index}}" bindtap="swichNav">
{{item.name}}
<text wx:if="{{item.tag > 0}}" class="swiper-tab-list__tag">{{item.tag}}</text>
</view>
diff --git a/pages/m_consult/base_c/c_result-item/c_result-item.js b/pages/m_consult/base_c/c_result-item/c_result-item.js
index 2d3a1c6..6423386 100644
--- a/pages/m_consult/base_c/c_result-item/c_result-item.js
+++ b/pages/m_consult/base_c/c_result-item/c_result-item.js
@@ -15,6 +15,10 @@
type: Array,
value: []
},
+ scrollable: {
+ type: Boolean,
+ value: true
+ },
loading: {
type: Boolean,
value: false
@@ -74,5 +78,8 @@
}
},
+ gotoMore() {
+ this.triggerEvent('gotoMore')
+ }
}
})
\ No newline at end of file
diff --git a/pages/m_consult/base_c/c_result-item/c_result-item.wxml b/pages/m_consult/base_c/c_result-item/c_result-item.wxml
index 4d907fd..3bc43c4 100644
--- a/pages/m_consult/base_c/c_result-item/c_result-item.wxml
+++ b/pages/m_consult/base_c/c_result-item/c_result-item.wxml
@@ -109,5 +109,5 @@
</block>
</view>
</block>
- <mp-loadingstatus loading="{{loading}}" needLoadMore="{{needLoadMore}}" nodata="{{results.length == 0}}"></mp-loadingstatus>
+ <mp-loadingstatus scrollable="{{scrollable}}" loading="{{loading}}" needLoadMore="{{needLoadMore}}" nodata="{{results.length == 0}}" bindgotoMore="gotoMore"></mp-loadingstatus>
</view>
\ No newline at end of file
diff --git a/pages/m_consult/behaviors/b_questions.js b/pages/m_consult/behaviors/b_questions.js
index 3dafcf9..979186d 100644
--- a/pages/m_consult/behaviors/b_questions.js
+++ b/pages/m_consult/behaviors/b_questions.js
@@ -22,18 +22,19 @@
* @param page 鍒嗛〉
* @param selectedValues [i, j]锛岄�変腑鐨勫垎绫荤紪鍙穒鍜屽瓙绫荤紪鍙穓锛宨銆乯涓簄ull琛ㄧず鍏ㄩ儴
*/
- getQuestionsByType(page = 1, selectedValues) {
+ getQuestionsByType(page = 1, selectedValues, perPage = this.data.perPage) {
this.selectedValues = selectedValues
this.setData({loading: true})
const t = setTimeout(() => {
this.setData({loading: false})
}, 10000);
var that = this
- consultservice.getQuestionsByType(app.globalData.accessToken.userId, selectedValues[0], selectedValues[1], page, app.globalData.perPage, {
+ consultservice.getQuestionsByType(app.globalData.accessToken.userId, selectedValues[0], selectedValues[1], page, perPage, {
onPage(head) {
that.setData({
cPage: head.page,
tPage: head.totalPage,
+ perPage: perPage,
totalCount: head.totalCount
})
},
diff --git a/pages/m_consult/behaviors/b_search.js b/pages/m_consult/behaviors/b_search.js
index 5a247bd..0d164ad 100644
--- a/pages/m_consult/behaviors/b_search.js
+++ b/pages/m_consult/behaviors/b_search.js
@@ -20,17 +20,18 @@
* @param keyword 鍏抽敭瀛楋紝鑻ュ叧閿瓧涓虹┖鐧斤紝鍒欐寜鐓х儹闂ㄧ殑閫昏緫鎼滅储
* @param type 鏌ヨ绫诲瀷锛屽寘鎷琜1锛氭硶瑙勬枃浠讹紝2锛氭硶瑙勬潯鐩紝3锛氭墽娉曟渚嬶紝4锛氱幆淇濋棶棰榏锛屼笉濉啓鏃惰〃绀烘煡璇㈡墍鏈夌被鍨嬬殑鍓�5鏉�
*/
- search(obj, cPage = 1) {
+ search(obj, cPage = 1, perPage = this.data.perPage) {
this.obj = obj
this.setData({loading: true})
const t = setTimeout(() => { this.setData({loading: false}) }, 10000);
var that = this
const {keyword, type} = obj
- consultservice.searchLaw(app.globalData.accessToken.userId, keyword, cPage, app.globalData.perPage, {
+ consultservice.searchLaw(app.globalData.accessToken.userId, keyword, cPage, perPage, {
onPage(head) {
that.setData({
cPage: head.page,
tPage: head.totalPage,
+ perPage: perPage
})
},
success(res) {
diff --git a/pages/m_consult/c_result-item-search/c_result-item-search.js b/pages/m_consult/c_result-item-search/c_result-item-search.js
index e4a710b..fabb3ed 100644
--- a/pages/m_consult/c_result-item-search/c_result-item-search.js
+++ b/pages/m_consult/c_result-item-search/c_result-item-search.js
@@ -21,38 +21,47 @@
reachBottom: {
type: Boolean,
value: false
+ },
+ scrollable: {
+ type: Boolean,
+ value: true
+ },
+ sPerPage: {
+ type: Number,
+ value: 10
}
},
observers: {
- 'keyobj': function(keyobj) {
- this.search(keyobj)
+ 'keyobj': function (keyobj) {
+ this.search(keyobj, 1, this.data.sPerPage)
},
- // 'reachBottom': function(reachBottom) {
- // if (reachBottom) {
- // this._onReachBottom()
- // }
- // }
},
/**
* 缁勪欢鐨勫垵濮嬫暟鎹�
*/
data: {
-
+
},
/**
* 缁勪欢鐨勬柟娉曞垪琛�
*/
methods: {
- // _onReachBottom() {
- // console.log('_onReachBottom');
- // let {cPage, tPage} = this.data
- // console.log(this.data);
- // if (cPage < tPage) {
- // this.search(this.data.keyobj, ++cPage)
- // }
- // }
+ gotoMore() {
+ this.triggerEvent('gotoMore')
+ const {keyword, type} = this.data.keyobj
+ wx.navigateTo({
+ url: '/pages/m_consult/consultresultmore/consultresultmore',
+ success: (res) => {
+ // 閫氳繃 eventChannel 鍚戣鎵撳紑椤甸潰浼犻�佹暟鎹�
+ res.eventChannel.emit('acceptDataFromOpenerPage', {
+ typeId: type,
+ keyword: keyword
+ })
+ },
+ })
+ }
}
})
\ No newline at end of file
diff --git a/pages/m_consult/c_result-item-search/c_result-item-search.wxml b/pages/m_consult/c_result-item-search/c_result-item-search.wxml
index a05d9e2..122be6e 100644
--- a/pages/m_consult/c_result-item-search/c_result-item-search.wxml
+++ b/pages/m_consult/c_result-item-search/c_result-item-search.wxml
@@ -1 +1 @@
-<c-result-item results="{{results}}" loading="{{loading}}" needLoadMore="{{needLoadMore}}"></c-result-item>
\ No newline at end of file
+<c-result-item results="{{results}}" loading="{{loading}}" needLoadMore="{{needLoadMore}}" scrollable="{{scrollable}}" bindgotoMore="gotoMore"></c-result-item>
\ No newline at end of file
diff --git a/pages/m_consult/consultonline/consultonline.js b/pages/m_consult/consultonline/consultonline.js
index bed0497..1ffaf9f 100644
--- a/pages/m_consult/consultonline/consultonline.js
+++ b/pages/m_consult/consultonline/consultonline.js
@@ -15,17 +15,8 @@
userId: 'system',
userName: '鏅鸿兘瀹㈡湇',
type: 0,
- text: '鐢ㄦ埛鎮ㄥソ锛屽緢楂樺叴涓轰綘鏈嶅姟',
- },
- {
- id: 'system',
- time: '',
- userId: 'system',
- userName: '鏅鸿兘瀹㈡湇',
- type: 0,
- text: '鐢ㄦ埛鎮ㄥソ锛屽緢楂樺叴涓烘偍鏈嶅姟锛屾湰鏈堜俊鐢ㄨ嚜璇勭粨鏋滆緝 濂斤紝缁х画淇濇寔鍝�.鐢ㄦ埛鎮ㄥソ锛屽緢楂樺叴涓烘偍鏈嶅姟锛屾湰鏈堜俊鐢ㄨ嚜璇勭粨鏋滆緝 濂斤紝缁х画淇濇寔鍝�.鐢ㄦ埛鎮ㄥソ锛屽緢楂樺叴涓烘偍鏈嶅姟锛屾湰鏈堜俊鐢ㄨ嚜璇勭粨鏋滆緝 濂斤紝缁х画淇濇寔鍝�.鐢ㄦ埛鎮ㄥソ锛屽緢楂樺叴涓烘偍鏈嶅姟锛屾湰鏈堜俊鐢ㄨ嚜璇勭粨鏋滆緝 濂斤紝缁х画淇濇寔鍝�.鐢ㄦ埛鎮ㄥソ锛屽緢楂樺叴涓烘偍鏈嶅姟锛屾湰鏈堜俊鐢ㄨ嚜璇勭粨鏋滆緝 濂斤紝缁х画淇濇寔鍝�.',
- },
-
+ text: '灏婃暚鐨勭敤鎴凤紝灏忕櫧绔瘹涓烘偍鏈嶅姟锛屾偍鏈変粈涔堥棶棰樺憿',
+ }
],
focus: false,
@@ -60,40 +51,127 @@
time: '',
userId: app.globalData.accessToken.userId,
userName: app.globalData.userInfo.acountname,
+ type: 0,
text: this.data.value,
})
- const keyword = this.data.value
+ this.lastKeyword = this.data.value
this.setData({
record,
value: ''
})
- this.getAnswer(keyword)
+ this.getAnswer()
},
- getAnswer(q) {
+ getAnswer() {
this.search({
- keyword: q,
+ keyword: this.lastKeyword,
type: undefined
- })
+ }, 1, 1)
+ // let record = this.data.record
+ // const r = {
+ // id: 'system',
+ // time: '',
+ // userId: 'system',
+ // userName: '鏅鸿兘瀹㈡湇',
+ // type: 1,
+ // text: {
+ // tabList: [
+ // {name: '闂瓟',tag: 0},
+ // {name: '妗堜緥',tag: 0},
+ // {name: '鏉$洰',tag: 0},
+ // {name: '鏂囦欢',tag: 0}
+ // ],
+ // key1: {keyword: q, type: 1},
+ // key2: {keyword: q, type: 2},
+ // key3: {keyword: q, type: 3},
+ // key4: {keyword: q, type: 4},
+ // // pageList: p
+ // },
+ // }
+ // this.data.record.push(r)
+ // let last = this.data.record.length - 1
+ // this.setData({
+ // [`record[${last}]`]: r
+ // })
+ // this.setData({
+ // record,
+ // })
},
loadComplete() {
const results = this.data.results
- console.log(results);
-
let record = this.data.record
- results.forEach(r => {
+
+ if (results.length == 0) {
record.push({
id: 'system',
time: '',
userId: 'system',
userName: '鏅鸿兘瀹㈡湇',
- type: r.typeId,
- text: r,
+ type: 0,
+ text: '涓嶅ソ鎰忔�濓紝鏆傛棤鐩稿叧瑙g瓟锛岃璇曡瘯鍏朵粬鍏抽敭璇�'
})
- });
+ } else {
+ record.push({
+ id: 'system',
+ time: '',
+ userId: 'system',
+ userName: '鏅鸿兘瀹㈡湇',
+ type: 0,
+ text: '灏忕櫧缁欐偍鎻愪緵鍙傝�冨涓�'
+ })
+ const map = new Map()
+ results.forEach(r => {
+ if (!map.has(r.typeName)) {
+ r.keyword = this.lastKeyword
+ map.set(r.typeName, [])
+ map.get(r.typeName).push(r)
+ }
+ });
+ const t = []
+ const p = []
+ for (let item of map) {
+ t.push({
+ name: item[0],
+ tag: 0
+ })
+ p.push(item[1])
+ }
+ record.push({
+ id: 'system',
+ time: '',
+ userId: 'system',
+ userName: '鏅鸿兘瀹㈡湇',
+ type: 1,
+ refresh: true,
+ text: {
+ tabList: t,
+ pageList: p
+ },
+ })
+ }
+ this.setData({
+ record,
+ })
+ },
- this.setData({record})
+ gotoMore(e) {
+ const iList = e.currentTarget.dataset.index
+ const i1 = iList[0]
+ const i2 = iList[1]
+ const {keyword, typeId} = this.data.record[i1].text.pageList[i2][0]
+ console.log(keyword);
+ console.log(typeId);
+ wx.navigateTo({
+ url: '/pages/m_consult/consultresultmore/consultresultmore',
+ success: (res) => {
+ // 閫氳繃 eventChannel 鍚戣鎵撳紑椤甸潰浼犻�佹暟鎹�
+ res.eventChannel.emit('acceptDataFromOpenerPage', {
+ typeId: typeId,
+ keyword: keyword
+ })
+ },
+ })
}
})
\ No newline at end of file
diff --git a/pages/m_consult/consultonline/consultonline.json b/pages/m_consult/consultonline/consultonline.json
index 6f0e366..248ce6f 100644
--- a/pages/m_consult/consultonline/consultonline.json
+++ b/pages/m_consult/consultonline/consultonline.json
@@ -3,6 +3,9 @@
"navigationBarBackgroundColor": "#EFF9F4",
"navigationBarTextStyle": "black",
"usingComponents": {
- "mp-icon": "/component/icon/icon"
+ "mp-icon": "/component/icon/icon",
+ "switch-tab": "/component/switchtab/switchtab",
+ "c-result-item": "../base_c/c_result-item/c_result-item",
+ "c-result-item-search": "../c_result-item-search/c_result-item-search"
}
}
\ No newline at end of file
diff --git a/pages/m_consult/consultonline/consultonline.wxml b/pages/m_consult/consultonline/consultonline.wxml
index 107a542..6fd14a2 100644
--- a/pages/m_consult/consultonline/consultonline.wxml
+++ b/pages/m_consult/consultonline/consultonline.wxml
@@ -1,28 +1,38 @@
<!--pages/m_consult/consultonline/consultonline.wxml-->
-<view class="consult-record">
- <block wx:for="{{record}}" wx:key="index">
- <view wx:if="{{userId == item.userId}}" class="consult-record_item_user">
- <view class="consult-text_user">{{item.text}}</view>
- </view>
- <view wx:else class="consult-record_item">
- <image src="/res/icons/avator_sys.png" class="consult-avator"></image>
- <view wx:if="{{item.type == 0}}" class="consult-text">{{item.text}}</view>
- <view wx:elif="{{item.type == 1}}" class="consult-text">
- {{item.text.name}}
+<view class="page">
+ <scroll-view class="consult-record" enable-passive="{{true}}" scroll-into-view="item{{record.length - 1}}" scroll-y="true" show-scrollbar="{{false}}" scroll-with-animation="true">
+ <view id="item{{index}}" wx:for="{{record}}" wx:key="index" style="padding-bottom: 2px;">
+ <view wx:if="{{userId == item.userId}}" class="consult-record_item_user">
+ <view class="consult-text_user">{{item.text}}</view>
</view>
- <view wx:elif="{{item.type == 2}}" class="consult-text">{{item.text.name}}</view>
- <view wx:elif="{{item.type == 3}}" class="consult-text">{{item.text.name}}</view>
- <view wx:elif="{{item.type == 4}}" class="consult-text">{{item.text.name}}</view>
+ <view wx:else class="consult-record_item">
+ <image wx:if="{{item.type == 0}}" src="/res/icons/avator_sys.png" class="consult-avator"></image>
+ <view wx:if="{{item.type == 0}}" class="consult-text">{{item.text}}</view>
+ <view wx:elif="{{item.type == 1}}" class="consult-text consult-qa">
+ <switch-tab tabList="{{item.text.tabList}}" refresh="{{item.refresh}}">
+ <block wx:for="{{item.text.pageList}}" wx:key="i" wx:for-item="p" wx:for-index="i">
+ <c-result-item results="{{p}}" loading="{{false}}" needLoadMore="{{false}}" scrollable="{{false}}" slot="slot{{i}}" data-index="{{[index, i]}}" bindgotoMore="gotoMore"></c-result-item>
+ </block>
+ <!-- <c-result-item-search scrollable="{{false}}" slot="slot0" keyobj="{{item.text.key4}}" sPerPage="{{1}}" bindloadComplete="loadComplete"></c-result-item-search>
+ <c-result-item-search scrollable="{{false}}" slot="slot1" keyobj="{{item.text.key3}}" sPerPage="{{1}}"></c-result-item-search>
+ <c-result-item-search scrollable="{{false}}" slot="slot2" keyobj="{{item.text.key2}}" sPerPage="{{1}}"></c-result-item-search>
+ <c-result-item-search scrollable="{{false}}" slot="slot3" keyobj="{{item.text.key1}}" sPerPage="{{1}}"></c-result-item-search> -->
+ </switch-tab>
+ </view>
+ <view wx:elif="{{item.type == 2}}" class="consult-text">{{item.text.name}}</view>
+ <view wx:elif="{{item.type == 3}}" class="consult-text">{{item.text.name}}</view>
+ <view wx:elif="{{item.type == 4}}" class="consult-text">{{item.text.name}}</view>
+ </view>
</view>
- </block>
-</view>
-<view class="consult-input">
- <view class="consult-input_box">
- <view class="search-bar">
- <!-- <mp-icon icon="search" size="15" color="black"></mp-icon> -->
- <input type="text" class="search-bar__input" placeholder="{{placeholder}}" value="{{value}}" focus="{{focus}}" bindinput="inputChange" />
- <text class="weui-icon-clear" hover-class="weui-active" wx:if="{{value.length > 0}}" bindtap="clearInput"></text>
+ </scroll-view>
+ <view class="consult-input">
+ <view class="consult-input_box">
+ <view class="search-bar">
+ <!-- <mp-icon icon="search" size="15" color="black"></mp-icon> -->
+ <input type="text" class="search-bar__input" placeholder="{{placeholder}}" value="{{value}}" focus="{{focus}}" bindinput="inputChange" />
+ <text class="weui-icon-clear" hover-class="weui-active" wx:if="{{value.length > 0}}" bindtap="clearInput"></text>
+ </view>
+ <view wx:if="{{value.length > 0}}" class="btn" bindtap="send">鍙戦��</view>
</view>
- <view wx:if="{{value.length > 0}}" class="btn" bindtap="send">鍙戦��</view>
</view>
</view>
\ No newline at end of file
diff --git a/pages/m_consult/consultonline/consultonline.wxss b/pages/m_consult/consultonline/consultonline.wxss
index fe858d7..b251914 100644
--- a/pages/m_consult/consultonline/consultonline.wxss
+++ b/pages/m_consult/consultonline/consultonline.wxss
@@ -1,8 +1,12 @@
/* pages/m_consult/consultonline/consultonline.wxss */
-.consult-record {
- padding: 8px;
+.page {
background-color: #EFF9F4;
- height: 100vh;
+}
+
+.consult-record {
+ /* padding: 8px 0; */
+ background-color: #EFF9F4;
+ height: 88vh;
}
.consult-record_item {
@@ -10,6 +14,7 @@
align-items: flex-start;
justify-content: flex-start;
margin-bottom: 16px;
+ padding-left: 8px;
}
.consult-record_item_user {
@@ -17,6 +22,7 @@
align-items: flex-start;
justify-content: flex-end;
margin-bottom: 16px;
+ padding-right: 8px;
}
.consult-avator {
@@ -34,6 +40,12 @@
border-top-left-radius: 0;
box-shadow: 1px 1px #CCCCCC;
font-size: 12px;
+}
+
+.consult-qa {
+ padding: 0px;
+ width: 92%;
+ max-width: 100%;
}
.consult-text_user {
@@ -58,6 +70,8 @@
padding-bottom: calc(10px + env(safe-area-inset-bottom));
left: 0;
width: 100%;
+ /* height: 12vh; */
+ /* background-color: #a3be042f; */
}
.consult-input_box {
diff --git a/pages/m_learn/behaviors/b_fetch.js b/pages/m_learn/behaviors/b_fetch.js
index 8653929..ef29943 100644
--- a/pages/m_learn/behaviors/b_fetch.js
+++ b/pages/m_learn/behaviors/b_fetch.js
@@ -14,14 +14,14 @@
},
methods: {
loadmore(cPage) {
- this.getResources(++cPage)
+ this.getResources({cPage: ++cPage})
},
/**
* 鏍规嵁绛涢�夋潯浠惰幏鍙栧畧娉曞涔犳潗鏂�
* @param fileType 鏂囦欢绫诲瀷锛屽寘鎷琜1锛歰ffice鏂囨。锛�2锛氱綉鍧�锛�3锛氶煶棰戯紝4锛氳棰慮锛屼笉濉啓鏃惰〃绀烘煡璇㈡墍鏈夌被鍨�
*/
- getResources(cPage = 1, fileType) {
+ getResources({cPage = 1, fileType}) {
this.setData({loading: true})
const t = setTimeout(() => { this.setData({loading: false}) }, 10000);
var that = this
diff --git a/pages/m_learn/learfile/learnfile.js b/pages/m_learn/learfile/learnfile.js
index d4ee24c..2af1634 100644
--- a/pages/m_learn/learfile/learnfile.js
+++ b/pages/m_learn/learfile/learnfile.js
@@ -15,6 +15,6 @@
* 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍔犺浇
*/
onLoad(options) {
- this.getResources(1, this.data.fileType)
+ this.getResources({cPage: 1, fileType: this.data.fileType})
},
})
\ No newline at end of file
diff --git a/pages/m_learn/learn/learn.js b/pages/m_learn/learn/learn.js
index 537e9f6..2638e28 100644
--- a/pages/m_learn/learn/learn.js
+++ b/pages/m_learn/learn/learn.js
@@ -37,7 +37,7 @@
* 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍔犺浇
*/
onLoad: function (options) {
- this.getResources(1)
+ this.getResources({})
},
loadComplete() {
diff --git a/pages/m_service/p_schedule/p_schedule.js b/pages/m_service/p_schedule/p_schedule.js
index a9c4fa4..3827671 100644
--- a/pages/m_service/p_schedule/p_schedule.js
+++ b/pages/m_service/p_schedule/p_schedule.js
@@ -22,8 +22,8 @@
* 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍔犺浇
*/
onLoad(options) {
- const now = moment()
- const year = moment().year()
+ const now = moment().hour(0).minute(0).second(0).millisecond(0)
+ const year = now.year()
const schedules = []
let totals = 0
for (let m = 1; m <= 12; m++) {
@@ -31,22 +31,23 @@
category: `${year}骞�${m}鏈堢幆淇濆伐浣滄棩绋媊,
details: []
}
+ const mon = m > 9 ? m : `0${m}`
//10,15,20
- let t1 = moment(`${year}-${m}-10`)
+ let t1 = moment(`${year}-${mon}-10`)
let d1 = t1.diff(now, 'days')
s.details.push({
time: t1.format('MM鏈圖D鏃�'),
name: '鐜繚鏃ョ▼鐜繚鏃ョ▼鐜繚鏃ョ▼鐜繚鏃ョ▼鐜繚鏃ョ▼鐜繚鏃ョ▼',
left: d1,
})
- let t2 = moment(`${year}-${m}-15`)
+ let t2 = moment(`${year}-${mon}-15`)
let d2 = t2.diff(now, 'days')
s.details.push({
time: t2.format('MM鏈圖D鏃�'),
name: '鐜繚鏃ョ▼',
left: d2,
})
- let t3 = moment(`${year}-${m}-20`)
+ let t3 = moment(`${year}-${mon}-20`)
let d3 = t3.diff(now, 'days')
s.details.push({
time: t3.format('MM鏈圖D鏃�'),
diff --git a/res/icons/avator_sys.png b/res/icons/avator_sys.png
index a845931..f35bb23 100644
--- a/res/icons/avator_sys.png
+++ b/res/icons/avator_sys.png
Binary files differ
diff --git a/service/baserequest.js b/service/baserequest.js
index 687b48e..0eec8ca 100644
--- a/service/baserequest.js
+++ b/service/baserequest.js
@@ -11,8 +11,8 @@
const originProperties = ['url', 'data', 'header', 'method', 'success', 'fail', 'complete'];
// const baseUrl = "http://127.0.0.1:8080"
-const baseUrl = "http://192.168.0.106:8080"
-// const baseUrl = "https://fyami.com.cn:447"
+// const baseUrl = "http://192.168.0.106:8080"
+const baseUrl = "https://fyami.com.cn:447"
// const basePicUrl = baseUrl + "/images/"
const basePicUrl = "https://fyami.com.cn:447/images/"
const baseIconUrl = "https://fyami.com.cn:447/images/weixin/eplaw/"
--
Gitblit v1.9.3