Browse Source

modify bug

master
slj 3 years ago
parent
commit
ab70d7254d
  1. 3
      models/topic.js
  2. 4
      pages/billboards/firm/index.js
  3. 12
      pages/billboards/index.js
  4. 5
      pages/billboards/park/index.js
  5. 4
      pages/billboards/policy/index.js
  6. 18
      pages/topics/activity/activitySign/index.js
  7. 19
      pages/topics/activity/activitySign/index.wxml
  8. 21
      pages/topics/activity/activitySign/index.wxss
  9. 12
      pages/topics/index.js
  10. 20
      pages/user/index.js
  11. 26
      pages/weChatAuth/index.js
  12. 3
      pages/weChatAuth/index.wxml
  13. 24
      project.private.config.json

3
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,

4
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)

12
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: '市北人才赋能平台',

5
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

4
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({

18
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({

19
pages/topics/activity/activitySign/index.wxml

@ -1,26 +1,33 @@
<!--pages/topics/activity/activitySign/index.wxml-->
<view class="container">
<view class="select-view">
<view class="select-view required-star">
<view class="select-con">
<text>姓名</text>
<input style="margin-right:20px;text-align: right;" type="text" bindinput='changeUsername' placeholder="请输入姓名"
<input style="text-align: right;" type="text" bindinput='changeUsername' placeholder="请输入您的真实姓名"
placeholder-style='text-align:right;color:#ACACAE;' value="{{username}}"/>
</view>
</view>
<view class="select-view">
<view class="select-view required-star">
<view class="select-con">
<text>工作单位</text>
<input style="margin-right:20px;text-align: right;" type="text" bindinput='changeCompany' placeholder="请输入工作单位"
<input style="text-align: right;" type="text" bindinput='changeCompany' placeholder="请输入工作单位"
placeholder-style='text-align:right;color:#ACACAE;' value="{{company}}"/>
</view>
</view>
<view class="select-view">
<view class="select-view required-star">
<view class="select-con">
<text>联系电话</text>
<input style="margin-right:20px;text-align: right;" type="text" bindinput='changePhone' placeholder="请输入联系电话"
<input style="text-align: right;" type="text" bindinput='changePhone' placeholder="请输入联系电话"
placeholder-style='text-align:right;color:#ACACAE;' value="{{phone}}"/>
</view>
</view>
<view class="select-view required-star">
<view class="select-con" >
<text>备注</text>
<textarea style="text-align: right;width: 50%;" placeholder="请输入备注"
placeholder-style='text-align:right;color:#ACACAE' bindinput='changeRemark' value="{{remark}}"></textarea>
</view>
</view>
</view>
<view class="btnView">
<e-ibutton title="提交" bind:onTap="submit" />

21
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;
@ -31,3 +37,14 @@ input{
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;
}

12
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: '市北人才赋能平台',

20
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

26
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)
}
})
},
/**
* 生命周期函数--监听页面显示
*/

3
pages/weChatAuth/index.wxml

@ -17,7 +17,8 @@
授权后,可以更好的体验我们哦~
</view>
</view>
<button class="authBtn" type="primary" wx:if="{{canIUse}}" open-type="getUserInfo" bindgetuserinfo="bindGetUserInfo">微信用户登录</button>
<!-- <button class="authBtn" type="primary" wx:if="{{canIUse}}" open-type="getUserInfo" bindgetuserinfo="bindGetUserInfo">微信用户登录</button> -->
<button class="authBtn" type="primary" wx:if="{{canIUseGetUserProfile}}" bindtap="getUserProfile">微信用户登录</button>
<view wx:else>请升级微信版本</view>
</view>
</view>

24
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"
}
Loading…
Cancel
Save