duhanyu
李劲龙 1 year ago
parent 95de90081d
commit bcb850eef0

@ -5,7 +5,7 @@ VUE_APP_TITLE = 若依管理系统
ENV = 'development' ENV = 'development'
# 若依管理系统/开发环境 # 若依管理系统/开发环境
VUE_APP_BASE_API = 'https://vue.ruoyi.vip/prod-api' VUE_APP_BASE_API = https://dev-mssm-liaoning.imian.org.cn/ggfw-api
# 路由懒加载 # 路由懒加载
VUE_CLI_BABEL_TRANSPILE_MODULES = true VUE_CLI_BABEL_TRANSPILE_MODULES = true

@ -0,0 +1,7 @@
// 召回
import login from "./myAPI/login.js";
export default {
login
};

@ -0,0 +1,29 @@
import request from "@/utils/request";
// 本地
// let api = "API"
// 线上
let api = location.origin
export default {
frimLogin() {
return request({
baseURL: process.env.VUE_APP_USER_LOGIN,
url: "/pharmaceuticals/login",
headers: {
"Content-Type": "application/json",
isToken: true,
repeatSubmit: false,
},
method: "POST",
timeout: 60000,
data: {
pdma: "MTExMTEx",
urne: "2112042170015",
},
});
},
};

@ -39,6 +39,8 @@ import VueMeta from 'vue-meta'
import DictData from '@/components/DictData' import DictData from '@/components/DictData'
//计算rem基准 //计算rem基准
import '@/utils/rem.js' import '@/utils/rem.js'
// 引用api
import API from '@/api/index.js'
// 全局方法挂载 // 全局方法挂载
@ -51,6 +53,7 @@ Vue.prototype.selectDictLabel = selectDictLabel
Vue.prototype.selectDictLabels = selectDictLabels Vue.prototype.selectDictLabels = selectDictLabels
Vue.prototype.download = download Vue.prototype.download = download
Vue.prototype.handleTree = handleTree Vue.prototype.handleTree = handleTree
Vue.prototype.$api = API
// 全局组件挂载 // 全局组件挂载
Vue.component('DictTag', DictTag) Vue.component('DictTag', DictTag)
@ -66,6 +69,15 @@ Vue.use(plugins)
Vue.use(VueMeta) Vue.use(VueMeta)
DictData.install() DictData.install()
// 临时获取token
let token = async()=>{
let Authentication = await API.login.frimLogin();
localStorage.setItem(
"MSSM-LIAONING__TOKEN",
Authentication.data.result.userToken
);
}
token()
/** /**
* If you don't want to use mock-server * If you don't want to use mock-server
* you want to use MockJs for mock api * you want to use MockJs for mock api

Loading…
Cancel
Save