Commit 1b9b0702 by biao

11111

parent 2244b90a
......@@ -49,7 +49,8 @@
"pages/newCircleMoment/newCircleMoment",
"pages/circleEvents/circleEvents",
"pages/editCircle/editCircle",
"pages/editCircle2/editCircle2"
"pages/editCircle2/editCircle2",
"pages/faq/faq"
],
"window": {
"backgroundTextStyle": "light",
......
// pages/myNews/myNews.js
var app = getApp();
Page({
/**
* 页面的初始数据
*/
data: {
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) { },
})
},
//咨询详细页面
faqDetail(e){
let faqId = e.currentTarget.dataset['index']
wx.navigateTo({
url: '../faqDetail/faqDetail?faqId=' + faqId,
})
},
//立即咨询
newFaq(e) {
wx.navigateTo({
url: '../newFaq/newFaq',
})
}
})
\ No newline at end of file
{
"usingComponents": {},
"navigationBarTitleText": "在线答疑",
"onReachBottomDistance":100
}
\ No newline at end of file
<!--pages/myNews/myNews.wxml-->
<custom-navi text="在线答疑" back="{{true}}" home="{{true}}" ></custom-navi>
<view class="titleArea">
<text>亲爱的志愿者\n欢迎来到志愿者服务大厅</text>
</view>
<view class='topTitle'>
<view class='leftLine' style="border-left: 5px solid #eb5e76;"></view>
<text class="title">热门资讯</text>
<view class='rightTitle' bindtap='myFaq'>
<image src="/img/rpoint.png"></image>
<text>我的咨询</text>
</view>
</view>
<view class="hotFaqs">
<view bindtap='faqDetail' wx:for="{{faqList}}" class="faqItem" data-index="{{item.id}}" wx:key="{{index}}">
<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 bindtap='newFaq' class="newFaqButton">立即咨询</view>
\ No newline at end of file
/* pages/myNews/faq.wxss */
.titleArea {
margin-top: 20px;
font-size: 20px;
color: #fff;
background: pink;
text-align: center;
}
.searchArea{
margin: 1%;
width:98%;
white-space:nowrap;
padding: 10px;
}
.topTitle {
position: static;
width: 100%;
height: 30px;
display: flex;
flex-direction: row;
align-items: center;
}
.topTitle .title {
margin-left: 10px;
font-size: 20px;
font-weight: bolder;
color: #000;
}
.topTitle .leftLine {
height: 20px;
border-left: 5px solid #efc04c;
margin-left: 5%;
}
.topTitle .rightTitle {
position: absolute;
right: 5%;
display: flex;
flex-direction: row;
}
.topTitle .rightTitle text {
margin-right: 5px;
}
.topTitle .rightTitle image {
margin-top: 3px;
margin-right: 5px;
width: 12px;
height: 12px;
}
.hotFaqs{
width:100%;
white-space:nowrap;
}
.faqItem{
width:90%;
margin-top: 10px;
margin-left: 0;
margin-right: 0;
padding:10px;
display: flex;
flex-direction: column;
justify-content: space-around;
align-items: center;
border-radius: 5px;
border: 1rpx solid gray;
}
.faqRow1{
width:100%;
display: flex;
flex-direction: row;
justify-content: space-between;
align-items: center;
}
.faqCotent{
font-size: 18px;
}
.faqReplycount{
font-size: 16px;
}
.faqRow2{
width:100%;
display: flex;
flex-direction: row;
justify-content: space-between;
align-items: center;
font-size: 16px;
}
.newFaqButton{
position: fixed;
bottom: 10px;
height: 30px;
line-height: 30px;
border-radius: 15px;
background: linear-gradient(to right, #e85c6d, #fb689b);
color: #fff;
font-size: 14px;
}
......@@ -299,6 +299,13 @@ Page({
})
},
//在线答疑
faqEvent() {
wx.navigateTo({
url: '../faq/faq',
})
},
//跳转到公益课程
mediaCourse() {
wx.navigateTo({
......
......@@ -34,7 +34,7 @@
<image src='../../img/2.png'></image>
<view>亲子活动</view>
</view> -->
<view bindtap="familyEvent">
<view bindtap="faqEvent">
<image src='/img/zxdy.png'></image>
<view>在线答疑</view>
</view>
......
......@@ -94,6 +94,13 @@
"pathName": "pages/circleDetails/circleDetails",
"query": "circleId=5",
"scene": null
},
{
"id": -1,
"name": "在线答疑",
"pathName": "pages/faq/faq",
"query": "",
"scene": null
}
]
}
......
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