diff --git a/models/user.js b/models/user.js
index a838d69..b9a82cc 100644
--- a/models/user.js
+++ b/models/user.js
@@ -1,17 +1,47 @@
import { HTTP, Method} from '../utils/http.js'
const UserConst = {
- user_info: '', // 个人信息
+ user_getInfo_url: '/api/miniuser/getInfo', // 个人信息
user_unMessage_url:'/api/message/page', // 我的消息未读
user_myMessage_url:'/api/message/page', // 我的消息
user_myFavorite_url: '/api/collect/collectionList', // 我的收藏
user_goldenList_url: '/api/comment/goldenList', // 我的金点子
user_myTopics_url:'/api/group/groupByUser', // 我的议题
- user_myActivity_url:'/api/activity/activityList' // 我的活动
+ user_myActivity_url:'/api/activity/activityList', // 我的活动
+
+ user_updateUserInfo_url:'/api/miniuser/updateUserInfo' // 更新用户信息
}
class UserModel extends HTTP {
constructor () {
super()
}
+
+ getUserInfo(success){
+ let params = {
+ url: UserConst.user_getInfo_url,
+ method: Method.GET,
+ success: success,
+ }
+ this.request(params)
+ }
+
+
+ updateUserInfo(avatarUrl, city, country, gender, nickName, province, success){
+ let params = {
+ url: UserConst.user_updateUserInfo_url,
+ method: Method.POST,
+ data: {
+ avatarUrl: avatarUrl,
+ city: city,
+ country: country,
+ gender, gender,
+ nickName: nickName,
+ province: province,
+ },
+ success: success
+ }
+ this.request(params)
+ }
+
getMyMessageList(page, success){
let params = {
url: UserConst.user_myMessage_url,
diff --git a/pages/topics/goodIdea/index.js b/pages/topics/goodIdea/index.js
index 35d4e66..69baa7c 100644
--- a/pages/topics/goodIdea/index.js
+++ b/pages/topics/goodIdea/index.js
@@ -14,40 +14,7 @@ Component({
* 组件的初始数据
*/
data: {
- list: [
- {
- ideaId: '1',
- userIcon: "",
- userName: "用户名",
- time: "刚刚",
- isGoodIdea: 1,
- praiseNum: "30",
- detail: {
- title: "习近平主持政治局第十七次集体... 拷贝",
- userIcon: "",
- userName: "用户名",
- time: "刚刚",
- commentNum: "33",
- text: "【内容以实际活动为准】市北区位于青岛市主城区地理位置的中心,西部濒临胶州湾,东部与崂山区为邻,北部与李沧区接壤,南部与市南区毗"
- }
- },
- {
- ideaId: "2",
- userIcon: "",
- userName: "用户名",
- time: "1分钟前",
- isGoodIdea: 0,
- praiseNum: "30",
- detail: {
- title: "习近平主持政治局第十七次集体... 拷贝",
- userIcon: "",
- userName: "用户名",
- time: "刚刚",
- commentNum: "33",
- text: "市北区位于青岛市主城区地理位置的中心,西部濒临胶州湾,东部与崂山区为邻,北部与李沧区接壤,南部与市南区毗连,东西最大距离11. 拷贝 2"
- }
- }
- ]
+ list: []
},
/**
diff --git a/pages/topics/index.js b/pages/topics/index.js
index 302060a..930d4e2 100644
--- a/pages/topics/index.js
+++ b/pages/topics/index.js
@@ -25,7 +25,7 @@ Page({
*/
onLoad: function () {
- if (!store.hasPhone()) {
+ if (store.hasPhone()) {
console.log('已经绑定手机号码')
} else {
console.log('未绑定手机号码')
diff --git a/pages/topics/interactive/topicArticle/index.js b/pages/topics/interactive/topicArticle/index.js
index ac23ba9..d4cf630 100644
--- a/pages/topics/interactive/topicArticle/index.js
+++ b/pages/topics/interactive/topicArticle/index.js
@@ -12,38 +12,15 @@ 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"
- // }
- ],
-
+ title:String,
+ time: String,
+ groupAvator: String,
+ author:String,
+ company:String,
+ position:String,
+ detail: String,
+ imgArr:[],
+ comments:[],
unStar: '/images/common/star.png',
star: '/images/common/star_light.png',
isStar:false,
@@ -88,12 +65,10 @@ Page({
isCollect: data.isCollect,
title:data.title,
time: data.createTime,
- userInfo:{
- icon: data.groupAvator,
- name:data.author,
- company: data.company,
- position: data.position,
- },
+ groupAvator: data.groupAvator,
+ author: data.author,
+ company: data.company,
+ position: data.position,
detail:data.content,
imgArr: data.images.split(";").slice(0, -1)
})
@@ -212,6 +187,9 @@ Page({
})
this.fetchTopicCommentPraise(selectItem.id)
// 评论点赞
+ },
+ onTapComment(){
+
},
previewImg: function (e) {
console.log(e.currentTarget.dataset.index);
diff --git a/pages/topics/interactive/topicArticle/index.wxml b/pages/topics/interactive/topicArticle/index.wxml
index d1a5538..5bb3b96 100644
--- a/pages/topics/interactive/topicArticle/index.wxml
+++ b/pages/topics/interactive/topicArticle/index.wxml
@@ -14,14 +14,14 @@
-
+
- {{userInfo.name}}
+ {{author}}
- {{userInfo.company}} {{userInfo.position || ''}}
+ {{company}} {{position || ''}}
@@ -39,7 +39,10 @@