Commit 3146b935 by biao

1111

parent dabb884a
......@@ -51,7 +51,8 @@
"pages/editCircle/editCircle",
"pages/editCircle2/editCircle2",
"pages/faq/faq",
"pages/myFaq/myFaq"
"pages/myFaq/myFaq",
"pages/faqSearch/faqSearch"
],
"window": {
"backgroundTextStyle": "light",
......
......@@ -77,6 +77,10 @@ Page({
});
return;
}
//跳转到检索页面
wx.navigateTo({
url: '../faqSearch/faqSearch?key=' + this.data.keyword,
})
},
//咨询详细页面
......
......@@ -28,7 +28,7 @@
<view bindtap='faqDetail' wx:for="{{faqList}}" class="faqItem" data-index="{{item.id}}" wx:key="{{index}}">
<view class="faqContent">
<view class="faqRow1">
<view class="faqCotent">{{item.content}}</view>
<text>{{item.content}}</text>
<view class="faqReplycount">回复:{{item.reply_count}}</view>
</view>
<view class="faqRow2">最佳答案:{{item.best_detail_content}}</view>
......
......@@ -80,7 +80,7 @@
.topTitle {
position: fixed;
top: 38%;
top: 40%;
width: 100%;
height: 35px;
display: flex;
......@@ -139,7 +139,7 @@
width: 100%;
height: 100%;
position: absolute;
top: 45%;
top: 47%;
}
.hotFaqs {
......@@ -170,6 +170,14 @@
margin-bottom: 10px;
}
.faqRow1 text{
font-size: 16px;
}
.faqReplycount {
font-size: 14px;
}
.newFaqButton {
position: fixed;
bottom: 0;
......
// pages/myNews/myNews.js
var app = getApp();
Page({
/**
* 页面的初始数据
*/
data: {
keyword: '',
faqList: []
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
this.getFaqList();
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {},
//获取在线答疑列表
getFaqList() {
var that = this;
var config = wx.getStorageSync('config');
//获取用户消息列表
wx.request({
url: app.url + 'ajax_get_faq_top_dat.php',
header: {
'content-type': 'application/json'
},
data: {
unionId: config.unionId,
},
method: 'GET',
dataType: 'json',
success: function (res) {
console.log(res.data)
if (res.statusCode == 200) {
that.setData({
faqList: res.data.result.faqList
})
}
},
fail: function (res) {},
complete: function (res) {},
})
},
keywordInput(e) {
this.setData({
keyword: e.detail.value
})
},
searchFaq() {
if (this.data.keyword == null || this.data.keyword == '') {
wx.showToast({
title: '请输入关键词',
icon: 'success',
duration: 1500
});
return;
}
},
//咨询详细页面
faqDetail(e) {
let faqId = e.currentTarget.dataset['index']
wx.navigateTo({
url: '../faqDetail/faqDetail?faqId=' + faqId,
})
},
//我的咨询
myFaq(e) {
wx.navigateTo({
url: '../myFaq/myFaq',
})
},
//立即咨询
newFaq(e) {
wx.navigateTo({
url: '../newFaq/newFaq',
})
},
back: function () {
wx.navigateBack({
delta: 1
})
},
})
\ No newline at end of file
{
"usingComponents": {},
"navigationBarTitleText": "在线答疑",
"onReachBottomDistance":100
}
\ No newline at end of file
<!--pages/myNews/myNews.wxml-->
<view class="topBg">
<image class='background-image' src='/img/faqTop.png' mode="widthFix"></image>
</view>
<view class="title" bindtap='back'>
<image src="/img/left1.png" style="width:40px;height:40px;margin-right:5px"></image>在线答疑
</view>
<view class="titleArea">
<text>亲爱的志愿者\n欢迎来到志愿者服务大厅</text>
</view>
<view class="searchArea">
<text>关键词索引</text>
<input class="input" name="keyword" placeholder="搜索从这里开始" bindinput="keywordInput" placeholder-class="input_center" />
<view bindtap="searchFaq">搜索</view>
</view>
<view class='topTitle'>
<view class='leftTitle'>
<view class='leftLine'></view>
<text class="hot_title">热门资讯</text>
</view>
<view class='rightTitle' bindtap='myFaq'>
<text>我的咨询</text>
<view></view>
</view>
</view>
<view class="content">
<view class="hotFaqs">
<view bindtap='faqDetail' wx:for="{{faqList}}" class="faqItem" data-index="{{item.id}}" wx:key="{{index}}">
<view class="faqContent">
<view class="faqRow1">
<view class="faqCotent">{{item.content}}</view>
<view class="faqReplycount">回复:{{item.reply_count}}</view>
</view>
<view class="faqRow2">最佳答案:{{item.best_detail_content}}</view>
</view>
</view>
</view>
<view bindtap='newFaq' class="newFaqButton">
<view>立即咨询</view>
</view>
</view>
\ No newline at end of file
/* pages/myNews/faq.wxss */
.background-image {
position: fixed;
width: 100%;
left: 0;
top: 0;
background: #fff;
z-index: 200;
}
.title {
position: fixed;
top: 4%;
left: 2%;
display: flex;
align-items: center;
font-size: 18px;
color: #fff;
z-index: 201;
}
.titleArea {
position: fixed;
top: 12%;
width: 100%;
display: flex;
align-items: center;
justify-content: center;
z-index: 200;
}
.titleArea text {
text-align: center;
font-size: 20px;
font-weight: 500;
color: #fff;
}
.searchArea {
position: fixed;
top: 30%;
width: 100%;
height: 60px;
background-color: #fff;
z-index: 190;
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
}
.searchArea text {
font-size: 16px;
font-weight: 400;
margin: 0 10px;
}
.searchArea>input {
flex: 1;
margin-right:10px;
height: 40px;
line-height: 40px;
font-size: 14px;
background: #f6f6f6;
border-radius: 30px;
text-align: center;
}
.searchArea view {
font-size: 16px;
color: #fb689b;
font-weight: 400;
margin: 0 10px;
}
.input_center {
text-align: center;
color: #bcbcbc;
}
.topTitle {
position: fixed;
top: 38%;
width: 100%;
height: 35px;
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
background-color: #fff;
z-index: 200;
}
.topTitle .leftTitle {
width: 100%;
display: flex;
flex-direction: row;
align-items: center;
}
.topTitle .leftTitle .leftLine {
height: 20px;
width: 6px;
border-radius: 3px;
background-color: #ed5f77;
margin-left: 5%;
}
.topTitle .leftTitle .hot_title {
margin-left: 10px;
font-size: 20px;
font-weight: bolder;
color: #000;
}
.topTitle .rightTitle {
width: 100%;
display: flex;
flex-direction: row-reverse;
align-items: center;
margin-right: 5%;
}
.topTitle .rightTitle view {
background-color: #e70012;
width: 10px;
height: 10px;
border-radius: 50%;
}
.topTitle .rightTitle text {
margin-left: 10px;
font-size: 16px;
font-weight: 400;
border-bottom: 1px solid #333333;
}
.content {
width: 100%;
height: 100%;
position: absolute;
top: 45%;
}
.hotFaqs {
width: 100%;
display: flex;
flex-direction: column;
align-items: center;
}
.faqItem {
width: 100%;
margin-top: 20px;
}
.faqContent {
margin: 0 3%;
padding: 3% 5%;
display: flex;
flex-direction: column;
border-radius: 10px;
box-shadow: 0 0 15px -3px rgb(0, 0, 0, 0.3);
}
.faqRow1 {
display: flex;
flex-direction: row;
justify-content: space-between;
margin-bottom: 10px;
}
.newFaqButton {
position: fixed;
bottom: 0;
width: 100%;
display: flex;
align-items: center;
/* background: #fff; */
}
.newFaqButton view {
text-align: center;
margin: 0 auto;
width: 80%;
height: 50px;
line-height: 50px;
border-radius: 25px;
margin-bottom: 10px;
background: linear-gradient(to right, #e85c6d, #fb689b);
color: #fff;
font-size: 18px;
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment