init version kelfy-mini for new gitea
This commit is contained in:
28
config/common.js
Normal file
28
config/common.js
Normal file
@@ -0,0 +1,28 @@
|
||||
const checkGlobalOpenId = () => {
|
||||
return new Promise((resolve, reject) => {
|
||||
wx.login({
|
||||
success: (res) => {
|
||||
if (res.code) {
|
||||
wx.request({
|
||||
url: 'https://fy.btlsoln.com:8443/getOpenid',
|
||||
method: 'GET',
|
||||
data: {
|
||||
code: res.code
|
||||
},
|
||||
success: res => {
|
||||
if (res.data) {
|
||||
resolve(res.data)
|
||||
}
|
||||
},
|
||||
fail: err => {
|
||||
reject(err)
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
})
|
||||
})
|
||||
}
|
||||
module.exports = {
|
||||
checkGlobalOpenId
|
||||
}
|
||||
Reference in New Issue
Block a user