微信小程序——知乎仿写
最全的微信小程序代码大全https://blog.csdn.net/slqgenius/article/details/79515133
源码下载链接https://github.com/RebeccaHanjw/weapp-wechat-zhihu
以下是显示效果图
微信开发者工具目录
以下为小程序源码
- data-data_discovery.js
/**
* Created by Rebecca_Han on 16/10/26.
*/
module.exports = {
}
var discovery= {
"id": 3,
"data": [
{
"question_id": 1,
"answer_id": 3,
"feed_source_id": 23,
"feed_source_name": "Rebecca1",
"feed_source_txt": "赞了回答1",
"feed_source_img": "../../images/icon1.jpeg",
"question": "选择 Kindle 而不是纸质书的原因是什么?",
"answer_ctnt": "难道不明白纸质书更贵啊!!! 若觉得kindle更贵,我觉得要么阅读量太少,那确实没有买kindle的必要。要么买的都是盗版的纸质书?我不清楚不加以评论。。。 另外,用kindle看小说的怎么真心不懂了...",
"good_num": "112",
"comment_num": "18"
},
{
"question_id": 2,
"answer_id": 25,
"feed_source_id": 24,
"feed_source_name": "Alex2",
"feed_source_txt": "回答了问题2",
"feed_source_img": "../../images/icon8.jpg",
"question": "如何评价周杰伦的「中文歌才是最屌的」的言论?",
"answer_ctnt": "不知道题主是否是学音乐的。 音乐有公认的经典,也有明显的流行趋势没有错。但归根结底,音乐是一种艺术,艺术是很主观的东西。跟画作一个道理,毕加索是大家,但很多人看不懂他的话,甚至觉得很难看...",
"good_num": "112",
"comment_num": "18"
},
{
"question_id": 3,
"answer_id": 61,
"feed_source_id": 25,
"feed_source_name": "George3",
"feed_source_txt": "赞了回答3",
"feed_source_img": "../../images/icon9.jpeg",
"question": "气象铁塔的辐射大吗?",
"answer_ctnt": "我不知道那个铁塔的情况,不过气象铁塔上会有一些测太阳辐射的设备,如果说辐射的话,太阳辐射那么多,大家赶紧躲进地底下呀~~~~~要不然辐射量这么大,会变异的呀~~~~",
"good_num": "112",
"comment_num": "18"
},
{
"question_id": 4,
"answer_id": 3,
"feed_source_id": 23,
"feed_source_name": "Rebecca4",
"feed_source_txt": "赞了回答4",
"feed_source_img": "../../images/icon1.jpeg",
"question": "选择 Kindle 而不是纸质书的原因是什么?",
"answer_ctnt": "难道不明白纸质书更贵啊!!! 若觉得kindle更贵,我觉得要么阅读量太少,那确实没有买kindle的必要。要么买的都是盗版的纸质书?我不清楚不加以评论。。。 另外,用kindle看小说的怎么真心不懂了...",
"good_num": "112",
"comment_num": "18"
},
{
"question_id": 5,
"answer_id": 25,
"feed_source_id": 24,
"feed_source_name": "Alex5",
"feed_source_txt": "回答了问题5",
"feed_source_img": "../../images/icon8.jpg",
"question": "如何评价周杰伦的「中文歌才是最屌的」的言论?",
"answer_ctnt": "不知道题主是否是学音乐的。 音乐有公认的经典,也有明显的流行趋势没有错。但归根结底,音乐是一种艺术,艺术是很主观的东西。跟画作一个道理,毕加索是大家,但很多人看不懂他的话,甚至觉得很难看...",
"good_num": "112",
"comment_num": "18"
},
{
"question_id": 6,
"answer_id": 61,
"feed_source_id": 25,
"feed_source_name": "George6",
"feed_source_txt": "赞了回答6",
"feed_source_img": "../../images/icon9.jpeg",
"question": "气象铁塔的辐射大吗?",
"answer_ctnt": "我不知道那个铁塔的情况,不过气象铁塔上会有一些测太阳辐射的设备,如果说辐射的话,太阳辐射那么多,大家赶紧躲进地底下呀~~~~~要不然辐射量这么大,会变异的呀~~~~",
"good_num": "112",
"comment_num": "18"
},
{
"question_id": 7,
"answer_id": 3,
"feed_source_id": 23,
"feed_source_name": "Rebecca7",
"feed_source_txt": "赞了回答7",
"feed_source_img": "../../images/icon1.jpeg",
"question": "选择 Kindle 而不是纸质书的原因是什么?",
"answer_ctnt": "难道不明白纸质书更贵啊!!! 若觉得kindle更贵,我觉得要么阅读量太少,那确实没有买kindle的必要。要么买的都是盗版的纸质书?我不清楚不加以评论。。。 另外,用kindle看小说的怎么真心不懂了...",
"good_num": "112",
"comment_num": "18"
},
{
"question_id": 8,
"answer_id": 25,
"feed_source_id": 24,
"feed_source_name": "Alex8",
"feed_source_txt": "回答了问题8",
"feed_source_img": "../../images/icon8.jpg",
"question": "如何评价周杰伦的「中文歌才是最屌的」的言论?",
"answer_ctnt": "不知道题主是否是学音乐的。 音乐有公认的经典,也有明显的流行趋势没有错。但归根结底,音乐是一种艺术,艺术是很主观的东西。跟画作一个道理,毕加索是大家,但很多人看不懂他的话,甚至觉得很难看...",
"good_num": "112",
"comment_num": "18"
}
]
}
module.exports.discovery = discovery;
- data-data_discovery_next.js
/**
* Created by Rebecca_Han on 16/10/27.
*/
module.exports={
};
var next = {
"id": 4,
"data": [
{
"question_id": 9,
"answer_id": 61,
"feed_source_id": 25,
"feed_source_name": "George9",
"feed_source_txt": "赞了回答9",
"feed_source_img": "../../images/icon9.jpeg",
"question": "气象铁塔的辐射大吗?",
"answer_ctnt": "我不知道那个铁塔的情况,不过气象铁塔上会有一些测太阳辐射的设备,如果说辐射的话,太阳辐射那么多,大家赶紧躲进地底下呀~~~~~要不然辐射量这么大,会变异的呀~~~~",
"good_num": "112",
"comment_num": "18"
},
{
"question_id": 10,
"answer_id": 3,
"feed_source_id": 23,
"feed_source_name": "Rebecca10",
"feed_source_txt": "赞了回答10",
"feed_source_img": "../../images/icon1.jpeg",
"question": "选择 Kindle 而不是纸质书的原因是什么?",
"answer_ctnt": "难道不明白纸质书更贵啊!!! 若觉得kindle更贵,我觉得要么阅读量太少,那确实没有买kindle的必要。要么买的都是盗版的纸质书?我不清楚不加以评论。。。 另外,用kindle看小说的怎么真心不懂了...",
"good_num": "112",
"comment_num": "18"
},
{
"question_id": 11,
"answer_id": 25,
"feed_source_id": 24,
"feed_source_name": "Alex11",
"feed_source_txt": "回答了问题11",
"feed_source_img": "../../images/icon8.jpg",
"question": "如何评价周杰伦的「中文歌才是最屌的」的言论?",
"answer_ctnt": "不知道题主是否是学音乐的。 音乐有公认的经典,也有明显的流行趋势没有错。但归根结底,音乐是一种艺术,艺术是很主观的东西。跟画作一个道理,毕加索是大家,但很多人看不懂他的话,甚至觉得很难看...",
"good_num": "112",
"comment_num": "18"
},
{
"question_id": 12,
"answer_id": 61,
"feed_source_id": 25,
"feed_source_name": "George12",
"feed_source_txt": "赞了回答12",
"feed_source_img": "../../images/icon9.jpeg",
"question": "气象铁塔的辐射大吗?",
"answer_ctnt": "我不知道那个铁塔的情况,不过气象铁塔上会有一些测太阳辐射的设备,如果说辐射的话,太阳辐射那么多,大家赶紧躲进地底下呀~~~~~要不然辐射量这么大,会变异的呀~~~~",
"good_num": "112",
"comment_num": "18"
},
{
"question_id": 13,
"answer_id": 3,
"feed_source_id": 23,
"feed_source_name": "Rebecca13",
"feed_source_txt": "赞了回答13",
"feed_source_img": "../../images/icon1.jpeg",
"question": "选择 Kindle 而不是纸质书的原因是什么?",
"answer_ctnt": "难道不明白纸质书更贵啊!!! 若觉得kindle更贵,我觉得要么阅读量太少,那确实没有买kindle的必要。要么买的都是盗版的纸质书?我不清楚不加以评论。。。 另外,用kindle看小说的怎么真心不懂了...",
"good_num": "112",
"comment_num": "18"
},
{
"question_id": 14,
"answer_id": 25,
"feed_source_id": 24,
"feed_source_name": "Alex14",
"feed_source_txt": "回答了问题14",
"feed_source_img": "../../images/icon8.jpg",
"question": "如何评价周杰伦的「中文歌才是最屌的」的言论?",
"answer_ctnt": "不知道题主是否是学音乐的。 音乐有公认的经典,也有明显的流行趋势没有错。但归根结底,音乐是一种艺术,艺术是很主观的东西。跟画作一个道理,毕加索是大家,但很多人看不懂他的话,甚至觉得很难看...",
"good_num": "112",
"comment_num": "18"
},
{
"question_id": 15,
"answer_id": 61,
"feed_source_id": 25,
"feed_source_name": "George15",
"feed_source_txt": "赞了回答15",
"feed_source_img": "../../images/icon9.jpeg",
"question": "气象铁塔的辐射大吗?",
"answer_ctnt": "我不知道那个铁塔的情况,不过气象铁塔上会有一些测太阳辐射的设备,如果说辐射的话,太阳辐射那么多,大家赶紧躲进地底下呀~~~~~要不然辐射量这么大,会变异的呀~~~~",
"good_num": "112",
"comment_num": "18"
},
{
"question_id": 16,
"answer_id": 3,
"feed_source_id": 23,
"feed_source_name": "Rebecca16",
"feed_source_txt": "赞了回答16",
"feed_source_img": "../../images/icon1.jpeg",
"question": "选择 Kindle 而不是纸质书的原因是什么?",
"answer_ctnt": "难道不明白纸质书更贵啊!!! 若觉得kindle更贵,我觉得要么阅读量太少,那确实没有买kindle的必要。要么买的都是盗版的纸质书?我不清楚不加以评论。。。 另外,用kindle看小说的怎么真心不懂了...",
"good_num": "112",
"comment_num": "18"
}
]
}
module.exports.next = next;
- data-data_index.js
/**
* Created by Rebecca_Han on 16/10/26.
*/
module.exports = {
}
var index= {
"id": 1,
"data": [
{
"question_id": 1,
"answer_id": 3,
"feed_source_id": 23,
"feed_source_name": "Rebecca",
"feed_source_txt": "赞了回答1",
"feed_source_img": "../../images/icon1.jpeg",
"question": "选择 Kindle 而不是纸质书的原因是什么?",
"answer_ctnt": "难道不明白纸质书更贵啊!!! 若觉得kindle更贵,我觉得要么阅读量太少,那确实没有买kindle的必要。要么买的都是盗版的纸质书?我不清楚不加以评论。。。 另外,用kindle看小说的怎么真心不懂了...",
"good_num": "112",
"comment_num": "18"
},
{
"question_id": 2,
"answer_id": 25,
"feed_source_id": 24,
"feed_source_name": "Alex",
"feed_source_txt": "回答了问题2",
"feed_source_img": "../../images/icon8.jpg",
"question": "如何评价周杰伦的「中文歌才是最屌的」的言论?",
"answer_ctnt": "不知道题主是否是学音乐的。 音乐有公认的经典,也有明显的流行趋势没有错。但归根结底,音乐是一种艺术,艺术是很主观的东西。跟画作一个道理,毕加索是大家,但很多人看不懂他的话,甚至觉得很难看...",
"good_num": "112",
"comment_num": "18"
},
{
"question_id": 3,
"answer_id": 61,
"feed_source_id": 25,
"feed_source_name": "George",
"feed_source_txt": "赞了回答3",
"feed_source_img": "../../images/icon9.jpeg",
"question": "气象铁塔的辐射大吗?",
"answer_ctnt": "我不知道那个铁塔的情况,不过气象铁塔上会有一些测太阳辐射的设备,如果说辐射的话,太阳辐射那么多,大家赶紧躲进地底下呀~~~~~要不然辐射量这么大,会变异的呀~~~~",
"good_num": "112",
"comment_num": "18"
},
{
"question_id": 4,
"answer_id": 3,
"feed_source_id": 23,
"feed_source_name": "Rebecca",
"feed_source_txt": "赞了回答4",
"feed_source_img": "../../images/icon1.jpeg",
"question": "选择 Kindle 而不是纸质书的原因是什么?",
"answer_ctnt": "难道不明白纸质书更贵啊!!! 若觉得kindle更贵,我觉得要么阅读量太少,那确实没有买kindle的必要。要么买的都是盗版的纸质书?我不清楚不加以评论。。。 另外,用kindle看小说的怎么真心不懂了...",
"good_num": "112",
"comment_num": "18"
},
{
"question_id": 5,
"answer_id": 25,
"feed_source_id": 24,
"feed_source_name": "Alex",
"feed_source_txt": "回答了问题5",
"feed_source_img": "../../images/icon8.jpg",
"question": "如何评价周杰伦的「中文歌才是最屌的」的言论?",
"answer_ctnt": "不知道题主是否是学音乐的。 音乐有公认的经典,也有明显的流行趋势没有错。但归根结底,音乐是一种艺术,艺术是很主观的东西。跟画作一个道理,毕加索是大家,但很多人看不懂他的话,甚至觉得很难看...",
"good_num": "112",
"comment_num": "18"
},
{
"question_id": 6,
"answer_id": 61,
"feed_source_id": 25,
"feed_source_name": "George",
"feed_source_txt": "赞了回答6",
"feed_source_img": "../../images/icon9.jpeg",
"question": "气象铁塔的辐射大吗?",
"answer_ctnt": "我不知道那个铁塔的情况,不过气象铁塔上会有一些测太阳辐射的设备,如果说辐射的话,太阳辐射那么多,大家赶紧躲进地底下呀~~~~~要不然辐射量这么大,会变异的呀~~~~",
"good_num": "112",
"comment_num": "18"
},
{
"question_id": 7,
"answer_id": 3,
"feed_source_id": 23,
"feed_source_name": "Rebecca",
"feed_source_txt": "赞了回答7",
"feed_source_img": "../../images/icon1.jpeg",
"question": "选择 Kindle 而不是纸质书的原因是什么?",
"answer_ctnt": "难道不明白纸质书更贵啊!!! 若觉得kindle更贵,我觉得要么阅读量太少,那确实没有买kindle的必要。要么买的都是盗版的纸质书?我不清楚不加以评论。。。 另外,用kindle看小说的怎么真心不懂了...",
"good_num": "112",
"comment_num": "18"
},
{
"question_id": 8,
"answer_id": 25,
"feed_source_id": 24,
"feed_source_name": "Alex",
"feed_source_txt": "回答了问题8",
"feed_source_img": "../../images/icon8.jpg",
"question": "如何评价周杰伦的「中文歌才是最屌的」的言论?",
"answer_ctnt": "不知道题主是否是学音乐的。 音乐有公认的经典,也有明显的流行趋势没有错。但归根结底,音乐是一种艺术,艺术是很主观的东西。跟画作一个道理,毕加索是大家,但很多人看不懂他的话,甚至觉得很难看...",
"good_num": "112",
"comment_num": "18"
}
]
}
module.exports.index = index;
- data-data_index_next.js
/**
* Created by Rebecca_Han on 16/10/27.
*/
module.exports={
};
var next = {
"id": 2,
"data": [
{
"question_id": 9,
"answer_id": 61,
"feed_source_id": 25,
"feed_source_name": "George",
"feed_source_txt": "赞了回答9",
"feed_source_img": "../../images/icon9.jpeg",
"question": "气象铁塔的辐射大吗?",
"answer_ctnt": "我不知道那个铁塔的情况,不过气象铁塔上会有一些测太阳辐射的设备,如果说辐射的话,太阳辐射那么多,大家赶紧躲进地底下呀~~~~~要不然辐射量这么大,会变异的呀~~~~",
"good_num": "112",
"comment_num": "18"
},
{
"question_id": 10,
"answer_id": 3,
"feed_source_id": 23,
"feed_source_name": "Rebecca",
"feed_source_txt": "赞了回答10",
"feed_source_img": "../../images/icon1.jpeg",
"question": "选择 Kindle 而不是纸质书的原因是什么?",
"answer_ctnt": "难道不明白纸质书更贵啊!!! 若觉得kindle更贵,我觉得要么阅读量太少,那确实没有买kindle的必要。要么买的都是盗版的纸质书?我不清楚不加以评论。。。 另外,用kindle看小说的怎么真心不懂了...",
"good_num": "112",
"comment_num": "18"
},
{
"question_id": 11,
"answer_id": 25,
"feed_source_id": 24,
"feed_source_name": "Alex",
"feed_source_txt": "回答了问题11",
"feed_source_img": "../../images/icon8.jpg",
"question": "如何评价周杰伦的「中文歌才是最屌的」的言论?",
"answer_ctnt": "不知道题主是否是学音乐的。 音乐有公认的经典,也有明显的流行趋势没有错。但归根结底,音乐是一种艺术,艺术是很主观的东西。跟画作一个道理,毕加索是大家,但很多人看不懂他的话,甚至觉得很难看...",
"good_num": "112",
"comment_num": "18"
},
{
"question_id": 12,
"answer_id": 61,
"feed_source_id": 25,
"feed_source_name": "George",
"feed_source_txt": "赞了回答12",
"feed_source_img": "../../images/icon9.jpeg",
"question": "气象铁塔的辐射大吗?",
"answer_ctnt": "我不知道那个铁塔的情况,不过气象铁塔上会有一些测太阳辐射的设备,如果说辐射的话,太阳辐射那么多,大家赶紧躲进地底下呀~~~~~要不然辐射量这么大,会变异的呀~~~~",
"good_num": "112",
"comment_num": "18"
},
{
"question_id": 13,
"answer_id": 3,
"feed_source_id": 23,
"feed_source_name": "Rebecca",
"feed_source_txt": "赞了回答13",
"feed_source_img": "../../images/icon1.jpeg",
"question": "选择 Kindle 而不是纸质书的原因是什么?",
"answer_ctnt": "难道不明白纸质书更贵啊!!! 若觉得kindle更贵,我觉得要么阅读量太少,那确实没有买kindle的必要。要么买的都是盗版的纸质书?我不清楚不加以评论。。。 另外,用kindle看小说的怎么真心不懂了...",
"good_num": "112",
"comment_num": "18"
},
{
"question_id": 14,
"answer_id": 25,
"feed_source_id": 24,
"feed_source_name": "Alex",
"feed_source_txt": "回答了问题14",
"feed_source_img": "../../images/icon8.jpg",
"question": "如何评价周杰伦的「中文歌才是最屌的」的言论?",
"answer_ctnt": "不知道题主是否是学音乐的。 音乐有公认的经典,也有明显的流行趋势没有错。但归根结底,音乐是一种艺术,艺术是很主观的东西。跟画作一个道理,毕加索是大家,但很多人看不懂他的话,甚至觉得很难看...",
"good_num": "112",
"comment_num": "18"
},
{
"question_id": 15,
"answer_id": 61,
"feed_source_id": 25,
"feed_source_name": "George",
"feed_source_txt": "赞了回答15",
"feed_source_img": "../../images/icon9.jpeg",
"question": "气象铁塔的辐射大吗?",
"answer_ctnt": "我不知道那个铁塔的情况,不过气象铁塔上会有一些测太阳辐射的设备,如果说辐射的话,太阳辐射那么多,大家赶紧躲进地底下呀~~~~~要不然辐射量这么大,会变异的呀~~~~",
"good_num": "112",
"comment_num": "18"
},
{
"question_id": 16,
"answer_id": 3,
"feed_source_id": 23,
"feed_source_name": "Rebecca",
"feed_source_txt": "赞了回答16",
"feed_source_img": "../../images/icon1.jpeg",
"question": "选择 Kindle 而不是纸质书的原因是什么?",
"answer_ctnt": "难道不明白纸质书更贵啊!!! 若觉得kindle更贵,我觉得要么阅读量太少,那确实没有买kindle的必要。要么买的都是盗版的纸质书?我不清楚不加以评论。。。 另外,用kindle看小说的怎么真心不懂了...",
"good_num": "112",
"comment_num": "18"
}
]
}
module.exports.next = next;
- util.js
function formatTime(date) {
var year = date.getFullYear()
var month = date.getMonth() + 1
var day = date.getDate()
var hour = date.getHours()
var minute = date.getMinutes()
var second = date.getSeconds()
return [year, month, day].map(formatNumber).join('/') + ' ' + [hour, minute, second].map(formatNumber).join(':')
}
function formatNumber(n) {
n = n.toString()
return n[1] ? n : '0' + n
}
module.exports = {
formatTime: formatTime
};
var index = require('../data/data_index.js')
var index_next = require('../data/data_index_next.js')
var discovery = require('../data/data_discovery.js')
var discovery_next = require('../data/data_discovery_next.js')
function getData(url){
return new Promise(function(resolve, reject){
wx.request({
url: url,
data: {},
header: {
//'Content-Type': 'application/json'
},
success: function(res) {
console.log("success")
resolve(res)
},
fail: function (res) {
reject(res)
console.log("failed")
}
})
})
}
function getData2(){
return index.index;
}
function getNext(){
return index_next.next;
}
function getDiscovery(){
return discovery.discovery;
}
function discoveryNext(){
return discovery_next.next;
}
module.exports.getData = getData;
module.exports.getData2 = getData2;
module.exports.getNext = getNext;
module.exports.getDiscovery = getDiscovery;
module.exports.discoveryNext = discoveryNext;
- app.js
//app.js
App({
onLaunch: function () {
//调用API从本地缓存中获取数据
var logs = wx.getStorageSync('logs') || []
logs.unshift(Date.now())
wx.setStorageSync('logs', logs)
},
getUserInfo:function(cb){
var that = this
if(this.globalData.userInfo){
typeof cb == "function" && cb(this.globalData.userInfo)
}else{
//调用登录接口
wx.login({
success: function () {
wx.getUserInfo({
success: function (res) {
that.globalData.userInfo = res.userInfo
typeof cb == "function" && cb(that.globalData.userInfo)
}
})
}
})
}
},
globalData:{
userInfo:null
}
})
- app.json
{
"pages": [
"pages/index/index",
"pages/discovery/discovery",
"pages/notify/notify",
"pages/chat/chat",
"pages/more/more",
"pages/answer/answer",
"pages/question/question"
],
"window": {
"backgroundTextStyle": "light",
"navigationBarBackgroundColor": "#0068C4",
"navigationBarTitleText": "知乎",
"navigationBarTextStyle": "white",
"enablePullDownRefresh": true
},
"tabBar": {
"color": "#626567",
"selectedColor": "#2A8CE5",
"backgroundColor": "#FBFBFB",
"borderStyle": "white",
"list": [
{
"pagePath": "pages/index/index",
"text": "",
"iconPath": "images/index.png",
"selectedIconPath": "images/index_focus.png"
},
{
"pagePath": "pages/discovery/discovery",
"text": "",
"iconPath": "images/discovery.png",
"selectedIconPath": "images/discovery_focus.png"
},
{
"pagePath": "pages/notify/notify",
"text": "",
"iconPath": "images/ring.png",
"selectedIconPath": "images/ring_focus.png"
},
{
"pagePath": "pages/chat/chat",
"text": "",
"iconPath": "images/chat.png",
"selectedIconPath": "images/chat_focus.png"
},
{
"pagePath": "pages/more/more",
"text": "",
"iconPath": "images/burger.png",
"selectedIconPath": "images/burger_focus.png"
}
]
},
"networkTimeout": {
"request": 10000,
"downloadFile": 10000
},
"debug": true,
"sitemapLocation": "sitemap.json"
}
- app.wxss
/**app.wxss**/
.container {
height: 100%;
display: flex;
flex-direction: column;
align-items: center;
justify-content: space-between;
/*padding: 200rpx 0;*/
box-sizing: border-box;
background: #F0F4F3;
}
.container.withtab{
margin: 105rpx 0 0 0;
/*top: 105rpx;*/
}
.flex-wrp{
display: flex;
}
.flex-tab{
flex-flow: row nowrap;
justify-content: space-around;
align-items: stretch;
}
.flex-item{
flex-grow: 1;
text-align: center;
}
.top-tab{
width: 750rpx;
height: 100rpx;
background: #298DE5;
color: #8CCEFD;
font-size: 28rpx;
line-height: 100rpx;
box-shadow: 0 2px 2px #bebebe;
margin: 0 0 8rpx 0;
position: fixed;
top: 0;
z-index: 9999;
}
.toptab.active{
color: #ffffff;
border-bottom: solid 2px #ffffff;
}
.container{
padding: 0;
font-size: 14rpx;
color: #000;
}
.container .feed-item{
width: 690rpx;
padding: 30rpx 30rpx 20rpx;
margin: 7rpx 0 6rpx 0;
background: #ffffff;
border-top: 1px solid #eee;
border-bottom: 1px solid #eee;
box-shadow: 0 2px 5px #eeeeee;
}
.container .feed-item .feed-source{
width: 690rpx;
left: 0;
height: 50rpx;
}
.container .feed-item .feed-source .avatar{
position: relative;
display: inline-block;
}
.container .feed-item .feed-source a{
display: inline-block;
height: 40rpx;
}
.container .feed-item .feed-source .avatar image{
/*position: absolute;*/
display: inline-block;
width: 45rpx;
height: 45rpx;
border-radius: 45rpx;
top: 10rpx;
vertical-align: middle;
}
.container .feed-item .feed-source text{
/*position: absolute;*/
display: inline-block;
height: 40rpx;
line-height: 40rpx;
vertical-align: middle;
margin: 0 0 0 15rpx;
color: #a0acac;
font-size: 26rpx;
}
.container .feed-item .feed-source .item-more{
display: inline-block;
width: 40rpx;
height: 45rpx;
float: right;
}
.container .feed-item .feed-content{
padding: 10rpx 0 0 0;
}
.container .feed-item .feed-content .question text{
font-size: 28rpx;
font-weight: 600px;
line-height: 40rpx;
text-space: 5rpx;
}
.container .feed-item .feed-content .answer-body{
padding: 10rpx 0 0 0;
/*height: 10rpx;*/
font-size: 24rpx;
line-height: 28rpx;
color: #5b5b5b;
}
.container .feed-item .feed-content .answer-actions{
width: 690rpx;
padding: 10rpx 0 0;
color: #a0acac;
}
.container .feed-item .feed-content .answer-actions view{
display: inline-block;
vertical-align: text-bottom;
padding: 0 10rpx 0 0;
font-size: 24rpx;
}
.container .feed-item .feed-content .answer-actions .dot ::after{
content: "•";
}
- project.config.json
{
"description": "项目配置文件",
"packOptions": {
"ignore": []
},
"setting": {
"urlCheck": true,
"es6": true,
"postcss": true,
"minified": true,
"newFeature": true,
"autoAudits": false,
"coverView": true
},
"compileType": "miniprogram",
"libVersion": "2.8.2",
"appid": "wxb50b35bc365594c4",
"projectname": "%E7%9F%A5%E4%B9%8E",
"debugOptions": {
"hidedInDevtools": []
},
"isGameTourist": false,
"simulatorType": "wechat",
"simulatorPluginLibVersion": {},
"condition": {
"search": {
"current": -1,
"list": []
},
"conversation": {
"current": -1,
"list": []
},
"game": {
"currentL": -1,
"list": []
},
"miniprogram": {
"current": -1,
"list": []
}
}
}
想要完整源码请自行下载该源码