登录完善,会议活动筛选分页,扫码签到完善,分标委列表,详情

This commit is contained in:
姚亚男
2021-10-15 18:35:39 +08:00
parent 6ef45b33f7
commit 280db0a273
46 changed files with 785 additions and 474 deletions
+7 -25
View File
@@ -1,6 +1,7 @@
// pages/meeting/meeting.js
import UserApi from '../../assets/js/http/userApi'
import { encrypt } from '../../assets/js/jsencrypt/rsa'
import { wxBind } from '../../assets/js/common'
// var countdown = 60; // 倒计时秒数
Page({
@@ -138,32 +139,13 @@ Page({
// 绑定微信
wxBind(){
// 获取openid进行手机号和微信的绑定
wx.login({
success (res) {
if (res.code) {
//发起网络请求
wx.request({
url: 'https://api.weixin.qq.com/sns/jscode2session',
data: {
appid: 'wx24914e866df035fb',
secret: '0d2830f26f57722716249f2b2236f409',
js_code: res.code,
grant_type: 'authorization_code'
},
success (res) { // 成功拿到openId
// 微信和该账号绑定
// 微信和该账号绑定
let params = {
openId: res.openId,
rsaPublicKey: that.data.rsaPublicKey
}
UserApi.wxBind(params).then(res=>{})
}
})
} else {
console.log('授权失败!' + res.errMsg)
}
wxBind((res)=>{
let params = {
openId: res.data.openid,
rsaPublicKey: that.data.rsaPublicKey
}
// 需要判断是否绑定过微信,再进行绑定请求
UserApi.wxBind(params).then(res=>{})
})
},
/**