import http from './http.js' import { baseUrl, URL_CONFIG } from '../project.config' /* 配置路径 */ let apiUrl = { // 登录 wxLoginByUserName: '/api/sys/login', //微信账号密码登陆--1 } export default { //微信账号密码登陆--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) }) } }