diff --git a/models/topic.js b/models/topic.js index 1878575..b86a8fb 100644 --- a/models/topic.js +++ b/models/topic.js @@ -381,13 +381,14 @@ class TopicModel extends HTTP { this.request(params) } // 在线报名 - onlineSign(aId,id,phone,nickName,company, success) { + onlineSign(aId,memo,id,phone,nickName,company, success) { let params = { url: TopicBaseUrl.activity_online_url, success: success, method: Method.GET, data: { activityId: aId, + memo:memo, id:id, phone:phone, nickName:nickName, diff --git a/pages/billboards/firm/index.js b/pages/billboards/firm/index.js index 835c282..e0ffc1e 100644 --- a/pages/billboards/firm/index.js +++ b/pages/billboards/firm/index.js @@ -25,6 +25,10 @@ Page({ */ onLoad: function (options) { this.fetchTags() // 获取Tags + wx.showShareMenu({ + withShareTicket: true, + menus: ['shareAppMessage'] + }); }, tapSegemnt (e) { console.log(e.detail) diff --git a/pages/billboards/index.js b/pages/billboards/index.js index add4078..a40b293 100644 --- a/pages/billboards/index.js +++ b/pages/billboards/index.js @@ -20,12 +20,12 @@ Page({ menus: ['shareAppMessage'] }); }, - onShareAppMessage: function (res) { - return { - title: '市北人才赋能平台', - path: 'pages/home/index', - } - }, + // onShareAppMessage: function (res) { + // return { + // title: '市北人才赋能平台', + // path: 'pages/home/index', + // } + // }, // onShareTimeline: function (res) { // return { // title: '市北人才赋能平台', diff --git a/pages/billboards/park/index.js b/pages/billboards/park/index.js index d98d3c2..0e83679 100644 --- a/pages/billboards/park/index.js +++ b/pages/billboards/park/index.js @@ -14,7 +14,10 @@ Page({ * 生命周期函数--监听页面加载 */ onLoad: function (options) { - + wx.showShareMenu({ + withShareTicket: true, + menus: ['shareAppMessage'] + }); }, onClickItem(e) { const { code, title } = e.currentTarget.dataset diff --git a/pages/billboards/policy/index.js b/pages/billboards/policy/index.js index 84e7c85..1e3107a 100644 --- a/pages/billboards/policy/index.js +++ b/pages/billboards/policy/index.js @@ -25,6 +25,10 @@ Page({ onLoad: function (options) { this.fetchPolicyTags() this.fetchPolicyList() + wx.showShareMenu({ + withShareTicket: true, + menus: ['shareAppMessage'] + }); }, onSearchClear (e) { this.setData({ diff --git a/pages/topics/activity/activitySign/index.js b/pages/topics/activity/activitySign/index.js index 2a116be..0cbcf09 100644 --- a/pages/topics/activity/activitySign/index.js +++ b/pages/topics/activity/activitySign/index.js @@ -17,7 +17,8 @@ Page({ username: '', company: '', phone: '', - id:'' + id:'', + remark:'' }, /** * 生命周期函数--监听页面加载 @@ -31,13 +32,13 @@ Page({ }, initFormData() { let { - nickName, + // nickName, phone, id } = store.readUserInfo() console.log(store.readUserInfo()) this.setData({ - username: nickName, + // username: nickName, phone: phone, id:id }) @@ -68,6 +69,11 @@ Page({ phone: e.detail.value }) }, + changeRemark:function(e){ + this.setData({ + remark: e.detail.value + }) + }, isPhone(value) { if (!/^1(3|4|5|7|8)\d{9}$/.test(value)) { return false @@ -80,7 +86,7 @@ Page({ if (this.data.username === '') { wx.showModal({ title: '提示', - content: '请输入姓名', + content: '请输入您的真实姓名', showCancel: false }) return @@ -97,8 +103,8 @@ Page({ }, //在线报名 onlineSignApi() { - console.log(this.data.aId,this.data.id,this.data.phone,this.data.username,this.data.company) - topicModel.onlineSign(this.data.aId,this.data.id,this.data.phone,this.data.username,this.data.company, res => { + console.log(this.data.aId,this.data.id,this.data.phone,this.data.username,this.data.company,this.data.remark) + topicModel.onlineSign(this.data.aId,this.data.remark,this.data.id,this.data.phone,this.data.username,this.data.company, res => { if (res.code == 200) { console.log(res.code); wx.showModal({ diff --git a/pages/topics/activity/activitySign/index.wxml b/pages/topics/activity/activitySign/index.wxml index 2190660..e5276dd 100644 --- a/pages/topics/activity/activitySign/index.wxml +++ b/pages/topics/activity/activitySign/index.wxml @@ -1,26 +1,33 @@ - + 姓名 - - + 工作单位 - - + 联系电话 - + + + 备注 + + + diff --git a/pages/topics/activity/activitySign/index.wxss b/pages/topics/activity/activitySign/index.wxss index c7e7d44..dc771ea 100644 --- a/pages/topics/activity/activitySign/index.wxss +++ b/pages/topics/activity/activitySign/index.wxss @@ -4,17 +4,18 @@ } .select-view{ display: flex; - padding: 32rpx 0; + padding: 32rpx 20rpx; border-bottom: 1px solid #ededed; font-size: 34rpx; /* btnView是position:fix,所以为防止遮挡,设置街道选择盒子下边框margin-bottom为100px */ /* margin-bottom: 100px; */ } .select-con{ - margin-left:20px; + margin-left:6rpx; flex:1; display: flex; justify-content: space-between; + box-sizing: border-box; } input{ @@ -22,6 +23,11 @@ input{ margin-left:20px; margin-top: 3px; } +textarea{ + flex:1; + margin-left:20px; + margin-top: 3px; +} .btnView{ position: fixed; height:50px; @@ -30,4 +36,15 @@ input{ left: 0; right: 0; background-color: white; +} +.required-star::before{ + content: '*'; + display: inline-block; + color: red; +} +.required-star:last-child::before{ + content: '*'; + display: inline-block; + color: red; + opacity: 0; } \ No newline at end of file diff --git a/pages/topics/index.js b/pages/topics/index.js index e51987d..4d76c81 100644 --- a/pages/topics/index.js +++ b/pages/topics/index.js @@ -54,12 +54,12 @@ Page({ menus: ['shareAppMessage'] }); }, - onShareAppMessage: function (res) { - return { - title: '市北人才赋能平台', - path: 'pages/home/index' - } - }, + // onShareAppMessage: function (res) { + // return { + // title: '市北人才赋能平台', + // path: 'pages/home/index' + // } + // }, // onShareTimeline: function (res) { // return { // title: '市北人才赋能平台', diff --git a/pages/user/index.js b/pages/user/index.js index bd2c2b6..ba0ed90 100644 --- a/pages/user/index.js +++ b/pages/user/index.js @@ -197,24 +197,6 @@ Page({ menus: ['shareAppMessage'] }); }, - onShareAppMessage: function (res) { - return { - title: '市北人才赋能平台', - path: 'pages/home/index', - // imageUrl:this.data.banners[0].image?this.data.banners[0].image:'' - } - }, - // onShareTimeline: function (res) { - // return { - // title: '市北人才赋能平台', - // success: function (res) { - // // 转发成功 - // }, - // fail: function (res) { - // // 转发失败 - // } - // } - // }, fetchHomeBanner() { this.setData({ banners: [] @@ -281,7 +263,7 @@ Page({ // 获取用户信息 getUserInfo() { userModel.getUserInfo(res => { - console.log("getUserInfo"); + console.log("--getUserInfo--"); console.log(res) let nickName = res.result.nickName let avatarUrl = res.result.avatarUrl diff --git a/pages/weChatAuth/index.js b/pages/weChatAuth/index.js index 09b4e7f..933680e 100644 --- a/pages/weChatAuth/index.js +++ b/pages/weChatAuth/index.js @@ -14,6 +14,7 @@ Page({ data: { titlePic:config.api_url + "/image/head.jpg", canIUse: wx.canIUse('button.open-type.getUserInfo'), + canIUseGetUserProfile: false, nickName: '', avatarUrl: '', userInfo: { @@ -28,12 +29,35 @@ Page({ * 生命周期函数--监听页面加载 */ onLoad: function (options) { + console.log(wx.getUserProfile) + if (wx.getUserProfile) { + this.setData({ + canIUseGetUserProfile: true + }) + } this.setData({ type:options.type, tabType:options.tabType }) }, - + getUserProfile(e) { + // 推荐使用wx.getUserProfile获取用户信息,开发者每次通过该接口获取用户个人信息均需用户确认 + // 开发者妥善保管用户快速填写的头像昵称,避免重复弹窗 + wx.getUserProfile({ + desc: '用于完善会员资料', // 声明获取用户个人信息后的用途,后续会展示在弹窗中,请谨慎填写 + success: (res) => { + console.log('用户信息--',res) + let avatarUrl =res.userInfo.avatarUrl + let nickName = res.userInfo.nickName + store.saveUserInfo({ + nickName: nickName, + avatarUrl: avatarUrl, + phone: '' + }) + this.sendUserInfo(res.userInfo) + } + }) + }, /** * 生命周期函数--监听页面显示 */ diff --git a/pages/weChatAuth/index.wxml b/pages/weChatAuth/index.wxml index 4d85e51..e3df129 100644 --- a/pages/weChatAuth/index.wxml +++ b/pages/weChatAuth/index.wxml @@ -17,7 +17,8 @@ 授权后,可以更好的体验我们哦~ - + + 请升级微信版本 diff --git a/project.private.config.json b/project.private.config.json index 0c4236f..4e157d5 100644 --- a/project.private.config.json +++ b/project.private.config.json @@ -134,9 +134,31 @@ "pathName": "pages/user/index", "query": "", "scene": null + }, + { + "name": "sign", + "pathName": "pages/topics/activity/activitySign/index", + "query": "activityId=44439f1f8264a988390310568588897f", + "launchMode": "default", + "scene": null + }, + { + "name": "注册", + "pathName": "pages/home/index", + "query": "", + "launchMode": "default", + "scene": null + }, + { + "name": "授权", + "pathName": "pages/user/index", + "query": "", + "launchMode": "default", + "scene": null } ] } }, - "description": "项目私有配置文件。此文件中的内容将覆盖 project.config.json 中的相同字段。项目的改动优先同步到此文件中。详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html" + "description": "项目私有配置文件。此文件中的内容将覆盖 project.config.json 中的相同字段。项目的改动优先同步到此文件中。详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html", + "libVersion": "2.16.0" } \ No newline at end of file