initital commit
This commit is contained in:
@@ -0,0 +1,43 @@
|
||||
import http from './http.js'
|
||||
|
||||
// let baseUrl = 'https://share.hzwlsoft.com'
|
||||
// let baseUrl = 'http://localhost:8080'
|
||||
let baseUrl = 'http://10.0.1.63:8080'
|
||||
// let baseUrl = 'http://192.168.1.110:8080'
|
||||
/* 配置路径 */
|
||||
|
||||
|
||||
let apiUrl = {
|
||||
// 登录
|
||||
wxLoginByUserName: '/api/sys/login', //微信账号密码登陆--1
|
||||
}
|
||||
|
||||
export default {
|
||||
baseUrl,
|
||||
//微信账号密码登陆--1
|
||||
wxLoginByUserName(option, success, error) {
|
||||
http.post1(baseUrl + apiUrl.wxLoginByUserName, option).then(res => {
|
||||
return success && success(res)
|
||||
}).catch(err => {
|
||||
return error && error(err)
|
||||
})
|
||||
},
|
||||
|
||||
//微信小程序授权--2
|
||||
wxAuthorization(option, success, error) {
|
||||
http.post1(baseUrl + apiUrl.wxAuthorization, option).then(res => {
|
||||
return success && success(res)
|
||||
}).catch(err => {
|
||||
return error && error(err)
|
||||
})
|
||||
},
|
||||
|
||||
//微信小程序登录
|
||||
wxLoginByOpenId(option, success, error) {
|
||||
http.post(baseUrl + apiUrl.wxLoginByOpenId, option).then(res => {
|
||||
return success && success(res)
|
||||
}).catch(err => {
|
||||
return error && error(err)
|
||||
})
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user