mirror of
https://gitee.com/elegant_wings/dbd-meeting-wx-small.git
synced 2025-06-21 04:59:37 +08:00
描述:登录
This commit is contained in:
parent
f8a9f51f4e
commit
7d8f971852
@ -1,5 +1,7 @@
|
||||
App({
|
||||
// 郑州小程序配置信息
|
||||
APPID: 'wx5582a07c1fbbcf06',
|
||||
APPSECRET: 'ad24130a8919c613efd9538f69abafd3',
|
||||
// 本地测试时不用加/api
|
||||
DOMAIN_NAME: 'http://192.168.0.11:9227', //接口域名
|
||||
IMG_NAME: 'http://192.168.0.11:9227',
|
||||
|
@ -30,6 +30,8 @@ Page({
|
||||
wx.login({
|
||||
success(wxRes) {
|
||||
loginRq({
|
||||
"appId": app.APPID,
|
||||
"appSecret": app.APPSECRET,
|
||||
"jsCode": wxRes.code
|
||||
}).then(res => {
|
||||
console.log('loginRq', res);
|
||||
@ -51,6 +53,8 @@ Page({
|
||||
let _this = this;
|
||||
console.log('getPhoneNumber', e)
|
||||
registerPhone({
|
||||
"appId": app.APPID,
|
||||
"appSecret": app.APPSECRET,
|
||||
"code": e.detail.code,
|
||||
"openid": _this.data.openid
|
||||
}).then(res => {
|
||||
@ -59,7 +63,7 @@ Page({
|
||||
// 跳转首页
|
||||
_this.jumpIndex(res.openid, res.user, res.token.token)
|
||||
} else {
|
||||
app.selfShowMsg(res.msg)
|
||||
app.selfShowMsg(res.msg)
|
||||
}
|
||||
})
|
||||
},
|
||||
|
Loading…
x
Reference in New Issue
Block a user