diff --git a/app.json b/app.json
index c5208eb..c82e400 100644
--- a/app.json
+++ b/app.json
@@ -16,7 +16,8 @@
"pages/user/myMessage/index",
"pages/user/myTopics/index",
"pages/user/myInfo/index",
- "pages/topics/interactive/submitTopic/index"
+ "pages/topics/interactive/submitTopic/index",
+ "pages/topics/interactive/topicArticle/index"
],
"window": {
"backgroundTextStyle": "light",
diff --git a/pages/topics/index.js b/pages/topics/index.js
index 6de0a68..5616eeb 100644
--- a/pages/topics/index.js
+++ b/pages/topics/index.js
@@ -5,7 +5,7 @@ Page({
* 页面的初始数据
*/
data: {
- headerTitles: ['互动区', '金点子', '留言箱', '1', '2', '3', '4', '5', '6'],
+ headerTitles: ['互动区', '金点子', '留言箱'],
selectedTitle: 0
},
diff --git a/pages/topics/interactive/index.js b/pages/topics/interactive/index.js
index 0e7b4fa..5df8e77 100644
--- a/pages/topics/interactive/index.js
+++ b/pages/topics/interactive/index.js
@@ -54,6 +54,10 @@ Component({
clickListItem(e) {
const articleId = e.detail.articleId;
console.log(articleId);
+
+ wx.navigateTo({
+ url: `/pages/topics/interactive/topicArticle/index?id=${articleId}`,
+ })
}
}
})
diff --git a/pages/topics/interactive/submitTopic/index.js b/pages/topics/interactive/submitTopic/index.js
index 30bd674..0d85e75 100644
--- a/pages/topics/interactive/submitTopic/index.js
+++ b/pages/topics/interactive/submitTopic/index.js
@@ -5,15 +5,20 @@ Page({
* 页面的初始数据
*/
data: {
-
+ topicTitle:String,
+ topicDetail:String,
+ files:[]
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
-
- },
+ this.setData({
+ selectFile: this.selectFile.bind(this),
+ uplaodFile: this.uplaodFile.bind(this)
+ })
+ },
/**
* 生命周期函数--监听页面初次渲染完成
*/
@@ -55,11 +60,68 @@ Page({
onReachBottom: function () {
},
-
+ bindTextInput(e){
+ this.setData({
+ topicTitle:e.detail.value
+ })
+ },
+ bindTextAreaInput(e){
+ this.setData({
+ topicDetail: e.detail.value
+ })
+ },
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
+ },
+ chooseImage: function (e) {
+ console.log(e)
+ var that = this;
+ wx.chooseImage({
+ sizeType: ['original', 'compressed'], // 可以指定是原图还是压缩图,默认二者都有
+ sourceType: ['album', 'camera'], // 可以指定来源是相册还是相机,默认二者都有
+ success: function (res) {
+ // 返回选定照片的本地文件路径列表,tempFilePath可以作为img标签的src属性显示图片
+ that.setData({
+ files: that.data.files.concat(res.tempFilePaths)
+ });
+ }
+ })
+ },
+ previewImage: function (e) {
+ console.log(e)
+ wx.previewImage({
+ current: e.currentTarget.id, // 当前显示图片的http链接
+ urls: this.data.files // 需要预览的图片http链接列表
+ })
+ },
+ uploadError(e) {
+ console.log('upload error', e.detail)
+ },
+ uploadSuccess(e) {
+ console.log('upload success', e.detail)
+ },
+ selectFile(files) {
+ console.log('files', files)
+ // 返回false可以阻止某次文件上传
+ },
+ uplaodFile(files) {
+ console.log('upload files', files)
+ // 文件上传的函数,返回一个promise
+ return new Promise((resolve, reject) => {
+ setTimeout(() => {
+ reject('some error')
+ }, 1000)
+ })
+ },
+ deleteFile(e){
+ console.log(e.detai)
+ },
+
+ submit(){
+ console.log(this.data.topicTitle,this.data.topicDetail)
+ console.log(this.data.files)
}
})
diff --git a/pages/topics/interactive/submitTopic/index.json b/pages/topics/interactive/submitTopic/index.json
index f485038..e443919 100644
--- a/pages/topics/interactive/submitTopic/index.json
+++ b/pages/topics/interactive/submitTopic/index.json
@@ -1,4 +1,9 @@
{
"navigationBarTitleText": "新建议题",
- "usingComponents": {}
+ "usingComponents": {
+ "e-ibutton": "/components/image-button/index",
+ "mp-cells": "/components/weui/cells/cells",
+ "mp-cell": "/components/weui/cell/cell",
+ "mp-uploader": "/components/weui/uploader/uploader"
+ }
}
\ No newline at end of file
diff --git a/pages/topics/interactive/submitTopic/index.wxml b/pages/topics/interactive/submitTopic/index.wxml
index 56316dd..7058635 100644
--- a/pages/topics/interactive/submitTopic/index.wxml
+++ b/pages/topics/interactive/submitTopic/index.wxml
@@ -3,7 +3,12 @@
+
+
+
+
+
-
+
diff --git a/pages/topics/interactive/submitTopic/index.wxss b/pages/topics/interactive/submitTopic/index.wxss
index 503810b..69ea933 100644
--- a/pages/topics/interactive/submitTopic/index.wxss
+++ b/pages/topics/interactive/submitTopic/index.wxss
@@ -16,20 +16,28 @@
.btnView{
position: fixed;
- width: 90%;
- height: 45px;
- bottom: 10px;
-}
-.submitBtn{
- /* background-image: url("/images/common/btn_bg.png"); */
- height: 45px;
- line-height: 40px;
- border-radius: 5px;
- color: white;
+ padding: 10px 20px 20px 20px;
+ bottom: 0;
+ left: 0;
+ right: 0;
+}
+.uploader_bd .weui-cell{
+ padding: 10px 0 10px 0;
+}
+/* .uploader_bd ::before{
+ border-top: none;
+} */
+.uploader_bd .weui-uploader__title,.weui-uploader__info{
font-size: 14px;
- background-image: linear-gradient(
- to right,
- #FD6553 30%,
- #D70403 100%
- );
}
+.uploader_bd .weui-uploader__input,
+.uploader_bd .weui-uploader__input-box,
+.uploader_bd .weui-uploader__file_status,
+.uploader_bd .weui-uploader__img{
+ width: 77px;
+ height: 77px;
+}
+/* .uploader_bd .weui-uploader__input-box{
+ width: 60px;
+ height: 60px;
+} */
diff --git a/pages/topics/interactive/topicArticle/index.js b/pages/topics/interactive/topicArticle/index.js
new file mode 100644
index 0000000..b6c31b5
--- /dev/null
+++ b/pages/topics/interactive/topicArticle/index.js
@@ -0,0 +1,119 @@
+// pages/topics/interactive/article/index.js
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ title:"市北区举行国际航运贸易金融创新中心核心区产业建设",
+ time:"6月7日",
+ userInfo:{
+ icon:"",
+ name:"用户名",
+ company:"青岛誉群投资有限公司",
+ position:"董事长"
+ },
+ detail:"9月16日晚7时,市北区委、区政府在区机关二楼会议厅举行国际航运贸易金融创新中心核心区产业招商工作方案答辩。这是市北区借鉴市委、市政府推动15个攻势作战经验,围绕创新中心核心区建设举行的首场答辩。区委书记张新竹主持答辩并讲话。",
+ imgArr:['http://bpic.588ku.com/element_origin_min_pic/16/10/30/528aa13209e86d5d9839890967a6b9c1.jpg',
+ 'http://bpic.588ku.com/element_origin_min_pic/16/10/30/54fcef525fa8f6037d180f3c26f3be65.jpg',
+ 'http://bpic.588ku.com/element_origin_min_pic/16/10/30/62e3ca3a02dddb002eff00482078d194.jpg',
+ 'http://bpic.588ku.com/element_origin_min_pic/16/10/31/c7167fcfb4ebcd12621c05b0c852e98e.jpg'
+ ],
+
+ comments:[
+ {
+ userIcon:"",
+ userName:"用户名",
+ detail:"评论内容",
+ time:"刚刚",
+ praiseNum:"30"
+ },
+ {
+ userIcon: "",
+ userName: "用户名",
+ detail: "评论内容",
+ time: "1小时前",
+ praiseNum: "30"
+ }
+ ],
+
+ unStar: '/images/common/star.png',
+ star: '/images/common/star_light.png',
+ isStar:true
+ },
+
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad: function (options) {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面初次渲染完成
+ */
+ onReady: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面隐藏
+ */
+ onHide: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面卸载
+ */
+ onUnload: function () {
+
+ },
+
+ /**
+ * 页面相关事件处理函数--监听用户下拉动作
+ */
+ onPullDownRefresh: function () {
+
+ },
+
+ /**
+ * 页面上拉触底事件的处理函数
+ */
+ onReachBottom: function () {
+
+ },
+
+ /**
+ * 用户点击右上角分享
+ */
+ onShareAppMessage: function () {
+
+ },
+ onClickCollect() {
+ this.setData({
+ isStar: !this.data.isStar
+ })
+ // 收藏功能
+ },
+
+ previewImg: function (e) {
+ console.log(e.currentTarget.dataset.index);
+ var index = e.currentTarget.dataset.index;
+ var imgArr = this.data.imgArr;
+ wx.previewImage({
+ current: imgArr[index], //当前图片地址
+ urls: imgArr, //所有要预览的图片的地址集合 数组形式
+ success: function (res) { },
+ fail: function (res) { },
+ complete: function (res) { },
+ })
+ }
+})
\ No newline at end of file
diff --git a/pages/topics/interactive/topicArticle/index.json b/pages/topics/interactive/topicArticle/index.json
new file mode 100644
index 0000000..8835af0
--- /dev/null
+++ b/pages/topics/interactive/topicArticle/index.json
@@ -0,0 +1,3 @@
+{
+ "usingComponents": {}
+}
\ No newline at end of file
diff --git a/pages/topics/interactive/topicArticle/index.wxml b/pages/topics/interactive/topicArticle/index.wxml
new file mode 100644
index 0000000..2ccfe49
--- /dev/null
+++ b/pages/topics/interactive/topicArticle/index.wxml
@@ -0,0 +1,61 @@
+
+
+
+
+ {{title}}
+
+
+
+ {{time}}
+
+
+
+
+
+
+
+
+
+
+
+ {{userInfo.name}}
+
+
+ {{userInfo.company + ' ' + userInfo.position}}
+
+
+
+
+
+
+ {{detail}}
+
+
+
+
+
+
+
+
+
+
diff --git a/pages/topics/interactive/topicArticle/index.wxss b/pages/topics/interactive/topicArticle/index.wxss
new file mode 100644
index 0000000..7ec1ba0
--- /dev/null
+++ b/pages/topics/interactive/topicArticle/index.wxss
@@ -0,0 +1,156 @@
+.container{
+ display: flex;
+ flex-direction: column;
+}
+.topic_info{
+ display: flex;
+ flex-direction: column;
+ padding: 10px 20px 10px 20px;
+}
+.topic_title{
+ font-size: 18px;
+}
+.topic_time{
+ display: flex;
+ flex-direction: row;
+ align-items: center;
+ justify-content: space-between;
+ padding: 10px 0 10px 0;
+}
+.topic_time_left{
+ font-size: 13px;
+ color: #B3B3B3;
+}
+.topic_time_right{
+ padding: 0 10px;
+ width: 20px;
+ height: 20px;
+ line-height: -10px;
+}
+image{
+ width: 100%;
+ height: 100%;
+}
+.topic_userInfo{
+ border-radius: 5px;
+ padding: 10px;
+ background-color: #FEFAF6;
+ display: flex;
+ flex-direction: row;
+ align-items: center;
+}
+.user_icon{
+ width: 30px;
+ height: 30px;
+ border-radius: 50%;
+ background-color: #EFECE8;
+}
+.user_text{
+ display: flex;
+ flex-direction: column;
+ color: #808B8C;
+ padding: 0 10px;
+ font-weight: 0;
+}
+.user_text :first-child{
+ font-size: 14px;
+}
+.user_text :last-child{
+ font-size: 12px;
+}
+.topic_detail{
+ display: flex;
+ flex-direction: column;
+ padding: 20px 20px;
+ /* border-bottom: 7px solid #FAFAFA; */
+}
+.topic_detail_text{
+ color: #373737;
+ font-size: 15px;
+}
+.section_line {
+ padding: 0;
+ height: 7px;
+ width: 100%;
+ background-color: #FAFAFA;
+}
+.topic_detail_imgs{
+ width: 100%;
+ padding: 10px 0;
+ display: flex;
+ justify-content: flex-start;
+ flex-wrap: wrap;
+
+}
+.imgList-li {
+ width: 100px;
+ height: 100px;
+ margin: 5px 5px;
+}
+.img{
+ width: 100%;
+ height: 100%;
+}
+.topic_comment{
+ padding: 10px 20px;
+ display: flex;
+ flex-direction: column;
+}
+.topic_comment_top{
+ height: 40px;
+ border-bottom: 1px solid #E7E7E7;
+}
+.comment_info{
+ padding: 10px 0;
+ display: flex;
+ flex-direction: row;
+ border-bottom: 1px solid #E7E7E7;
+}
+.comment_info_left{
+ width: 30px;
+ height: 30px;
+ border-radius: 50%;
+ background-color: red;
+}
+.comment_icon{
+ width: 30px;
+ height: 30px;
+}
+.comment_info_right{
+ width: 100%;
+ display: flex;
+ flex-direction: column;
+ padding: 0 10px;
+}
+.comment_info_userName{
+ font-size: 14px;
+ color: #66708B;
+}
+.comment_info_detail{
+ font-size: 14px;
+ color: #3B3B3B;
+}
+.comment_info_time{
+ display: flex;
+ flex-direction: row;
+ align-items: center;
+ justify-content: space-between;
+}
+.comment_info_time_left{
+ font-size: 10px;
+ color: #999999;
+}
+.comment_info_time_right{
+ display: flex;
+ flex-direction: row;
+ align-items: center;
+}
+.praiseNum{
+ font-size: 10px;
+ color: #ABABAB;
+}
+.praiseIcon{
+ margin-left: 5px;
+ width: 10px;
+ height: 10px;
+}
\ No newline at end of file
diff --git a/pages/topics/message/index.json b/pages/topics/message/index.json
index e8cfaaf..93850f5 100644
--- a/pages/topics/message/index.json
+++ b/pages/topics/message/index.json
@@ -1,4 +1,6 @@
{
"component": true,
- "usingComponents": {}
+ "usingComponents": {
+ "e-ibutton": "/components/image-button/index"
+ }
}
\ No newline at end of file
diff --git a/pages/topics/message/index.wxml b/pages/topics/message/index.wxml
index 7c8c0cb..73a8c5e 100644
--- a/pages/topics/message/index.wxml
+++ b/pages/topics/message/index.wxml
@@ -4,7 +4,7 @@
-
+
diff --git a/pages/topics/message/index.wxss b/pages/topics/message/index.wxss
index 30144d6..4475ca1 100644
--- a/pages/topics/message/index.wxss
+++ b/pages/topics/message/index.wxss
@@ -14,9 +14,10 @@
}
.btnView{
position: fixed;
- width: 90%;
- height: 45px;
- bottom: 10px;
+ padding: 10px 20px 20px 20px;
+ bottom: 0;
+ left: 0;
+ right: 0;
}
.submitBtn{
/* width: 100%; */