12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849 |
- import http from '@/http/api.js'
- // 获取token
- const token = (uuid, phone, code) => {
- return http.request({
- url: '/blade-auth/oauth/token',
- method: 'POST',
- header: {
- 'Tenant-Id': '000000',
- },
- params: {
- 'Login-Type':2,
- 'Captcha-Key': uuid,
- 'Phone-Key':phone,
- 'Captcha-Code':code,
- grant_type: "phone",
- scope: "all",
- type:'phone'
- }
- })
- }
- // 获取验证码
- export function getPhoneVerifyCode(data){
- return http.request({
- url: '/blade-auth/verification/getPhoneVerifyCode',
- method: 'GET',
- data
- })
- }
- // 获取用户信息
- const userInfo = () => {
- return http.request({
- url: '/blade-user/info',
- method: 'GET',
- })
- }
- // 获取版本
- const getVersion = (params) => {
- return http.request({
- url: '/store-goods/appversion/getLatestVersion',
- method: 'GET',
- params
- })
- }
- export default {
- token,
- userInfo,
- getVersion
- }
|