diff --git a/pages/topics/activity/activityDetail/index.wxss b/pages/topics/activity/activityDetail/index.wxss index 25d19c9..d0696be 100644 --- a/pages/topics/activity/activityDetail/index.wxss +++ b/pages/topics/activity/activityDetail/index.wxss @@ -138,8 +138,8 @@ } .praiseIcon{ margin-left: 5px; - width: 10px; - height: 10px; + width: 14px; + height: 14px; } .section_line { padding: 0; diff --git a/pages/topics/attract/oceanDetail/index.js b/pages/topics/attract/oceanDetail/index.js index 5bc6e70..57dd4af 100644 --- a/pages/topics/attract/oceanDetail/index.js +++ b/pages/topics/attract/oceanDetail/index.js @@ -105,6 +105,7 @@ Page({ }, //关联链接跳转 goLinkPage(e) { + console.log('链接--',e) if (e.currentTarget.dataset.association == '1') { app.globalData.currentTab = "3" wx.switchTab({ diff --git a/pages/topics/index.js b/pages/topics/index.js index d21edfa..9fb04a0 100644 --- a/pages/topics/index.js +++ b/pages/topics/index.js @@ -72,9 +72,8 @@ Page({ centerList: [], activityList: [], page: 1, - next: true + next: true, }) - if (!this.data.tab) { this.setData({ tab: '1' @@ -116,8 +115,6 @@ Page({ } }) } - - } } else { console.log('未绑定微信') @@ -159,21 +156,22 @@ Page({ } }, changeTabs: function (e) { + console.log('点击tab--',e) var tab = e.detail.name; this.setData({ page: 1, next: true, tab: tab, + active: tab, topicList: [], centerList: [], activityList: [], }) - this.getData(tab); }, getData: function (tab) { - console.log(tab) + console.log('tab--',tab) switch (tab) { case "3": return this.fetchCenterList() @@ -232,6 +230,7 @@ Page({ //赋能中心 fetchCenterList() { // let page = this.data.currPage; + console.log('fetchCenterList赋能中心') var th = this; var page = th.data.page; var list = th.data.centerList; diff --git a/pages/topics/interactive/topicArticle/index.wxss b/pages/topics/interactive/topicArticle/index.wxss index 64f7ed9..9e389b5 100644 --- a/pages/topics/interactive/topicArticle/index.wxss +++ b/pages/topics/interactive/topicArticle/index.wxss @@ -165,8 +165,8 @@ image{ } .praiseIcon{ margin-left: 5px; - width: 10px; - height: 10px; + width: 14px; + height: 14px; } .touch-item { diff --git a/pages/topics/reportDemand/index.wxml b/pages/topics/reportDemand/index.wxml index f4643c9..2883f3c 100644 --- a/pages/topics/reportDemand/index.wxml +++ b/pages/topics/reportDemand/index.wxml @@ -34,7 +34,7 @@ - + 工作单位 diff --git a/pages/topics/reportDemand/index.wxss b/pages/topics/reportDemand/index.wxss index f38f961..bee1295 100644 --- a/pages/topics/reportDemand/index.wxss +++ b/pages/topics/reportDemand/index.wxss @@ -85,15 +85,16 @@ /* margin-bottom: 100px; */ } .select-mark{ - width:15px; + width:30px; + text-align: center; } .select-picker{ flex: 1; - margin:0px 20px; + margin:0px 10px; } .select-con{ - margin-left:20px; + margin-left:10px; flex:1; display: flex; justify-content: space-between; diff --git a/pages/user/index.js b/pages/user/index.js index 80e9cec..255e623 100644 --- a/pages/user/index.js +++ b/pages/user/index.js @@ -349,7 +349,6 @@ Page({ if (type === 'myInfo') { console.log('进入个人信息页面'); console.log(this.data.userInfo); - wx.navigateTo({ url: `/pages/user/${type}/index?userIcon=${this.data.userInfo.avatarUrl}&userName=${this.data.userInfo.nickName}&userPhone=${this.data.userInfo.phone || ''}&company=${this.data.userInfo.company || ''}&position=${this.data.userInfo.position || ''}&street=${this.data.userInfo.departId || ''}&age=${this.data.userInfo.age || ''}&genderIndex=${this.data.userInfo.gender || ''}&education=${this.data.userInfo.education || ''}&professionalTitle=${this.data.userInfo.title || ''}&talentTitle=${this.data.userInfo.designation || ''}&prize=${this.data.userInfo.honor || ''}`, }) diff --git a/pages/user/index.wxml b/pages/user/index.wxml index 210ecfd..57b7268 100644 --- a/pages/user/index.wxml +++ b/pages/user/index.wxml @@ -26,7 +26,6 @@ - @@ -34,13 +33,12 @@ - 人才服务 - 我的服务我的服务 @@ -105,7 +103,7 @@ - diff --git a/pages/user/myFavorite/index.wxml b/pages/user/myFavorite/index.wxml index 41aa738..65489ec 100644 --- a/pages/user/myFavorite/index.wxml +++ b/pages/user/myFavorite/index.wxml @@ -30,7 +30,14 @@ - + + + diff --git a/pages/user/myInfo/index.js b/pages/user/myInfo/index.js index cc5f1af..20ad823 100644 --- a/pages/user/myInfo/index.js +++ b/pages/user/myInfo/index.js @@ -1,8 +1,16 @@ // pages/user/myInfo/index.js -import { store } from '../../../utils/store.js' -import { config } from '../../../config.js' -import { UserModel } from '../../../models/user.js' -import { TopicModel } from '../../../models/topic.js' +import { + store +} from '../../../utils/store.js' +import { + config +} from '../../../config.js' +import { + UserModel +} from '../../../models/user.js' +import { + TopicModel +} from '../../../models/topic.js' let topicModel = new TopicModel() let userModel = new UserModel() @@ -12,30 +20,30 @@ Page({ * 页面的初始数据 */ data: { - avatarUrl:String, + avatarUrl: String, nickName: String, phone: String, company: String, - position: String, - streets:[], - streetsIndex:0, - streetsID:String, - age:String, - gender:['','男','女'], - genderIndex:Number, - educationIndex:Number, - education:['','高中','专科','本科','硕士','博士'], - professionalTitle:String, - talentTitle:String, - prize:String, + position: String, + streets: [], + streetsIndex: 0, + streetsID: String, + age: String, + gender: ['', '男', '女'], + genderIndex: Number, + educationIndex: Number, + education: ['', '高中', '专科', '本科', '硕士', '博士'], + professionalTitle: String, + talentTitle: String, + prize: String, show: false, - tempData:String, - realData:String, - temp:String, - type:String, - value:String, - defaultValue:'请输入', - inputConfirm:false + tempData: String, + realData: String, + temp: String, + type: String, + value: String, + defaultValue: '请输入', + inputConfirm: false }, getUserInfo(event) { @@ -43,220 +51,236 @@ Page({ console.log(event); }, onClose() { - this.setData({ close: false }); + this.setData({ + close: false + }); }, - vantConfirm(){ + vantConfirm() { this.setData({ - realData:this.data.tempData + realData: this.data.tempData }) - //判断名字长度,限制名字长度10个字之内,姓名不能为空 - if(this.data.type === 'userName'){ + //判断名字长度,限制名字长度10个字之内,姓名不能为空 + if (this.data.type === 'userName') { console.log("username"); - if(this.data.realData.length > 10){ + if (this.data.realData.length > 10) { wx.showToast({ title: '姓名长度应小于10', icon: 'none', duration: 2000, }) - }else if(this.data.realData.length == 0||this.data.realData.name=="String"){ + } else if (this.data.realData.length == 0 || this.data.realData.name == "String") { wx.showToast({ title: '姓名不能为空', icon: 'none', duration: 2000, }) - }else{ + } else { console.log("nickName修改了"); - this.setData({ - nickName:this.data.realData - }) - console.log(this.data.nickName); + this.setData({ + nickName: this.data.realData + }) + console.log(this.data.nickName); } - } - if(this.data.type === 'userAge'){ - console.log("confirm userAge"); - if((this.data.realData.length == 0||this.data.realData.name=="String")&&!this.data.inputConfirm){ - this.setData({ - age:this.data.value + } + if (this.data.type === 'userAge') { + console.log("confirm userAge"); + if ((this.data.realData.length == 0 || this.data.realData.name == "String") && !this.data.inputConfirm) { + this.setData({ + age: this.data.value }) - }else{ - this.setData({ - age:this.data.realData - }) - } + } else { + this.setData({ + age: this.data.realData + }) + } } - if(this.data.type === 'workUnit'){ - if((this.data.realData.length == 0||this.data.realData.name=="String")&&!this.data.inputConfirm){ - this.setData({ - company:this.data.value + if (this.data.type === 'workUnit') { + if ((this.data.realData.length == 0 || this.data.realData.name == "String") && !this.data.inputConfirm) { + this.setData({ + company: this.data.value }) - }else{ - this.setData({ - company:this.data.realData - }) - } - } - if(this.data.type === 'position'){ - if((this.data.realData.length == 0||this.data.realData.name=="String")&&!this.data.inputConfirm){ - this.setData({ - position:this.data.value + } else { + this.setData({ + company: this.data.realData }) - }else{ - this.setData({ - position:this.data.realData - }) - } + } } - if(this.data.type === 'userProfessionalTitle'){ - if((this.data.realData.length == 0||this.data.realData.name=="String")&&!this.data.inputConfirm){ - this.setData({ - professionalTitle:this.data.value + if (this.data.type === 'position') { + if ((this.data.realData.length == 0 || this.data.realData.name == "String") && !this.data.inputConfirm) { + this.setData({ + position: this.data.value + }) + } else { + this.setData({ + position: this.data.realData }) - }else{ - this.setData({ - professionalTitle:this.data.realData - }) - } + } } - if(this.data.type === 'userTalentTitle'){ - if((this.data.realData.length == 0||this.data.realData.name=="String")&&!this.data.inputConfirm){ - this.setData({ - talentTitle:this.data.value + if (this.data.type === 'userProfessionalTitle') { + if ((this.data.realData.length == 0 || this.data.realData.name == "String") && !this.data.inputConfirm) { + this.setData({ + professionalTitle: this.data.value + }) + } else { + this.setData({ + professionalTitle: this.data.realData }) - }else{ - this.setData({ - talentTitle:this.data.realData - }) - } + } } - if(this.data.type === 'userPrize'){ - if((this.data.realData.length == 0||this.data.realData.name=="String")&&!this.data.inputConfirm){ - this.setData({ - prize:this.data.value + if (this.data.type === 'userTalentTitle') { + if ((this.data.realData.length == 0 || this.data.realData.name == "String") && !this.data.inputConfirm) { + this.setData({ + talentTitle: this.data.value }) - }else{ - this.setData({ - prize:this.data.realData - }) - } + } else { + this.setData({ + talentTitle: this.data.realData + }) + } + } + if (this.data.type === 'userPrize') { + if ((this.data.realData.length == 0 || this.data.realData.name == "String") && !this.data.inputConfirm) { + this.setData({ + prize: this.data.value + }) + } else { + this.setData({ + prize: this.data.realData + }) + } } this.setData({ - value:'', - realData:'', - tempData:'', - defaultValue:'请输入', - inputConfirm:false + value: '', + realData: '', + tempData: '', + defaultValue: '请输入', + inputConfirm: false }) }, - tempData: function(e){ + tempData: function (e) { this.setData({ - tempData:e.detail.value, - inputConfirm:true + tempData: e.detail.value, + inputConfirm: true }) console.log('temp'); console.log(this.data.tempData) }, onLoad: function (options) { + console.log(options) this.setData({ avatarUrl: options.userIcon, nickName: options.userName, phone: options.userPhone || '', company: options.company || '', position: options.position || '', - streetsID:options.street || '',//得到streetsID的值 - age:options.age || '', - genderIndex:options.genderIndex || '', - educationIndex:options.education || '', - professionalTitle:options.professionalTitle || '', - talentTitle:options.talentTitle || '', - prize:options.prize || '', + streetsID: options.street || '', //得到streetsID的值 + age: options.age || '', + genderIndex: options.genderIndex || '', + educationIndex: options.education || '', + professionalTitle: options.professionalTitle || '', + talentTitle: this.getTalentTitle(options.talentTitle) || '', + prize: options.prize || '', }) - topicModel.getStreetList(res=>{ + topicModel.getStreetList(res => { var resultss = res.result var streett = [] - resultss.forEach((value,index)=>{ + resultss.forEach((value, index) => { streett[index] = value.departName }) - streett.unshift('') + streett.unshift('') this.setData({ - streets: streett//得到street列表 + streets: streett //得到street列表 }) - resultss.forEach((value,index)=>{ - if(value.id == this.data.streetsID){ - return this.setData({streetsIndex: index+1}) + resultss.forEach((value, index) => { + if (value.id == this.data.streetsID) { + return this.setData({ + streetsIndex: index + 1 + }) } }) }) }, - + getTalentTitle(item) { + switch (item) { + case '0': + return '普通人才'; + case '1': + return '高层次人才' + case '2': + return '企业人才' + } + }, onTapItem(e) { - const { type } = e.currentTarget.dataset + const { + type + } = e.currentTarget.dataset console.log('onTapItem'); console.log(type); console.log(e); this.setData({ - type:type + type: type }) - if(type === 'userIcon'){ + if (type === 'userIcon') { this.upload() return - }else{ + } else { this.setData({ - show:true + show: true }) //姓名 - if(type =='userName'&&this.data.nickName!=''){ + if (type == 'userName' && this.data.nickName != '') { this.setData({ - value:this.data.nickName + value: this.data.nickName }) } //年龄 - if(type =='userAge'&&this.data.age!=''){ + if (type == 'userAge' && this.data.age != '') { this.setData({ - value:this.data.age + value: this.data.age }) } //工作单位 - if(type =='workUnit'&&this.data.company!=''){ + if (type == 'workUnit' && this.data.company != '') { this.setData({ - value:this.data.company + value: this.data.company }) } //职务 - if(type =='position'&&this.data.position!=''){ + if (type == 'position' && this.data.position != '') { this.setData({ - value:this.data.position + value: this.data.position }) } //职称 - if(type =='userProfessionalTitle'&&this.data.professionalTitle!=''){ + if (type == 'userProfessionalTitle' && this.data.professionalTitle != '') { this.setData({ - value:this.data.professionalTitle + value: this.data.professionalTitle }) } //人才称号 - if(type =='userTalentTitle'&&this.data.talentTitle!=''){ + if (type == 'userTalentTitle' && this.data.talentTitle != '') { this.setData({ - value:this.data.talentTitle + value: this.data.talentTitle }) } //荣誉 - if(type =='userPrize'&&this.data.prize!=''){ + if (type == 'userPrize' && this.data.prize != '') { this.setData({ - value:this.data.prize + value: this.data.prize }) } return } this.setData({ - defaultValue:'请输入修改后的内容' + defaultValue: '请输入修改后的内容' }) }, - upload(){ - let that = this + upload() { + let that = this wx.chooseImage({ success(res) { wx.showLoading() @@ -279,7 +303,7 @@ Page({ } that.setData({ avatarUrl: image.url - },()=>{ + }, () => { wx.hideLoading() }) } @@ -307,52 +331,52 @@ Page({ // position: e.detail.value // }) // }, - bindGenderChange: function(e) { + bindGenderChange: function (e) { this.setData({ - genderIndex:e.detail.value + genderIndex: e.detail.value }) }, - bindEducationChange:function(e){ + bindEducationChange: function (e) { this.setData({ - educationIndex:e.detail.value + educationIndex: e.detail.value }) - }, - bindstreetChange:function(e){ + }, + bindstreetChange: function (e) { // console.log("bindstreetChange"); // console.log(e.detail.value); - var i = e.detail.value-1 - topicModel.getStreetList(res=>{ + var i = e.detail.value - 1 + topicModel.getStreetList(res => { this.setData({ - streetsIndex:e.detail.value, - streetsID:res.result[i].id + streetsIndex: e.detail.value, + streetsID: res.result[i].id }) - }) + }) }, - onTapPhone:function(){ + onTapPhone: function () { wx.navigateTo({ - url:'../myInfo/register/index' + url: '../myInfo/register/index' }) }, - submit(){ + submit() { console.log("submit"); // console.log(this.data.nickName.length); // console.log(this.data.nickName); // console.log(this.data); userModel.updateUserInfo(this.data, res => { - if(res.code === 200){ + if (res.code === 200) { store.saveUserInfo({ nickName: this.data.nickName, avatarUrl: this.data.avatarUrl, phone: this.data.phone || '', - departId:this.data.streetsID, - age:this.data.age, - gender:this.data.genderIndex, - company:this.data.company, - position:this.data.position, - education:this.data.educationIndex, - title:this.data.professionalTitle, - designation:this.data.talentTitle, - honor:this.data.prize + departId: this.data.streetsID, + age: this.data.age, + gender: this.data.genderIndex, + company: this.data.company, + position: this.data.position, + education: this.data.educationIndex, + title: this.data.professionalTitle, + designation: this.data.talentTitle, + honor: this.data.prize }) wx.showToast({ title: '修改成功', @@ -368,6 +392,6 @@ Page({ }) } }) - + } }) \ No newline at end of file diff --git a/pages/user/myInfo/index.wxml b/pages/user/myInfo/index.wxml index eb5c193..6526c6d 100644 --- a/pages/user/myInfo/index.wxml +++ b/pages/user/myInfo/index.wxml @@ -110,13 +110,15 @@ - + + + - - + + -->