@@ -0,0 +1 @@
+window.GLOBAL={SERVICE_URL:"http://192.168.1.70:8081/"}
@@ -6,7 +6,9 @@
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<!-- <meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests" /> -->
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
- <title><%= webpackConfig.name %></title>
+ <title><%= webpackConfig.name %></title>
+ <script src="config.js?v=<%=new Date().getTime()%>"></script>
+
</head>
<body>
<noscript>
@@ -5,7 +5,8 @@ import { getToken } from '@/utils/auth'
//获取当前url
-var aa = process.env.VUE_APP_BASE_API
+var aa = window.GLOBAL.SERVICE_URL
+// var aa = process.env.VUE_APP_BASE_API
if(aa.indexOf('/')==0 && aa.length==1){
aa= window.location.protocol + "//"+window.location.host+aa
@@ -276,7 +276,7 @@ export default {
handleEnableChange(index, row) {
let url = 'api/v1/ops/pasture/is_show'
let data = {
- "pasture_id":row.pasture_id,
+ "pasture_id":row.id,
"is_show":row.is_show
}
postJson(url,data).then(response => {