[Vuejs]-Netlify error-mixed Content, The page was loaded over HTTPS, but requested a HTTP insecure script

0๐Ÿ‘

//-------------in login.js---------------------
import request from 'path here'

const userAccountLogin = ({ account, password }) => {
  return request('/login', 'post', { account, password })
}


// ----------in request.js--------------------
import axios from 'axios'

const baseURL = 'http://apiserver.net/'

const instance = axios.create({
  baseURL,
  timeout: 5000
})

export default (url, method, submitData) => {
  return instance({
    url,
    method,
    [method.toLowerCase() === 'get' ? 'params' : 'data']: submitData
  })
}

Leave a comment