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