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

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
+10 -23
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'
Page({
/**
* 页面的初始数据
@@ -83,11 +84,11 @@ Page({
key: 'X-Access-Token',
data: that.data.password
})
// 绑定微信
this.wxBind()
wx.switchTab({
url: '../home/home',
})
// 绑定微信
this.wxBind()
} else {
wx.showToast({
title: '登录失败',
@@ -100,28 +101,14 @@ 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
// 微信和该账号绑定
}
})
} else {
console.log('授权失败!' + res.errMsg)
}
wxBind((res)=>{
// 微信和该账号绑定
let params = {
openId: res.data.openid,
rsaPublicKey: that.data.rsaPublicKey
}
// 需要判断是否绑定过微信,再进行绑定请求
UserApi.wxBind(params).then(res=>{})
})
},
/**