621a64ec by renchao@pashanhoo.com

feat:api初始化的完成

1 parent 7150b0af
1 <!-- 1 <!--
2 * @Description: 2 * @Description:
3 * @Autor: renchao 3 * @Autor: renchao
4 * @LastEditTime: 2023-04-26 09:35:33 4 * @LastEditTime: 2023-05-05 10:00:05
5 --> 5 -->
6 <!DOCTYPE html> 6 <!DOCTYPE html>
7 <html> 7 <html>
...@@ -17,6 +17,14 @@ ...@@ -17,6 +17,14 @@
17 <%= webpackConfig.name %> 17 <%= webpackConfig.name %>
18 </title> 18 </title>
19 </head> 19 </head>
20 <script>
21 const appConfig = fetch('<%= BASE_URL %>config.json')
22 .then(response => response.json())
23 .then(config => {
24 window.config = config
25 console.log(11111111111111);
26 });
27 </script>
20 28
21 <body> 29 <body>
22 <div id="app"></div> 30 <div id="app"></div>
...@@ -24,6 +32,7 @@ ...@@ -24,6 +32,7 @@
24 </body> 32 </body>
25 33
26 </html> 34 </html>
35
27 <script> 36 <script>
28 window.baseUrl = location.origin || location.protocol + '//' + location.host 37 window.baseUrl = location.origin || location.protocol + '//' + location.host
29 // window.authorization = 'bearer AT-14-h4UlUGjPvgmrIgnDO-3QgMP0m4YJGQTR'; 38 // window.authorization = 'bearer AT-14-h4UlUGjPvgmrIgnDO-3QgMP0m4YJGQTR';
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
4 * @LastEditTime: 2023-04-20 09:40:17 4 * @LastEditTime: 2023-04-20 09:40:17
5 */ 5 */
6 import request from '@/utils/request'; 6 import request from '@/utils/request';
7 let SERVER = JSON.parse(localStorage.getItem('ApiUrl')) 7 let SERVER = window.config ? window.config : JSON.parse(localStorage.getItem('ApiUrl'))
8 8
9 // 获取不动产权证列表 9 // 获取不动产权证列表
10 export function getBdcqzList (params) { 10 export function getBdcqzList (params) {
......
1 /* 1 /*
2 * @Description: 2 * @Description:
3 * @Autor: renchao 3 * @Autor: renchao
4 * @LastEditTime: 2023-04-20 09:40:36 4 * @LastEditTime: 2023-05-06 09:15:02
5 */ 5 */
6 import request from '@/utils/request' 6 import request from '@/utils/request'
7 let SERVER = JSON.parse(localStorage.getItem('ApiUrl')) 7 let SERVER = window.config ? window.config : JSON.parse(localStorage.getItem('ApiUrl'))
8 8
9 // 材料目录明细初始化 9 // 材料目录明细初始化
10 export function InitClml (data) { 10 export function InitClml (data) {
......
1 import request from '@/utils/request' 1 let SERVER = window.config ? window.config : JSON.parse(localStorage.getItem('ApiUrl'))
2 let SERVER = JSON.parse(localStorage.getItem('ApiUrl'))
3 export function uploadUrl () { 2 export function uploadUrl () {
4 return process.env.VUE_APP_BASE_API + SERVER.SERVERAPI + '/file/upload' 3 return process.env.VUE_APP_BASE_API + SERVER.SERVERAPI + '/file/upload'
5 } 4 }
......
1 /*
2 * @Description:
3 * @Autor: renchao
4 * @LastEditTime: 2023-05-06 09:17:56
5 */
1 import request from '@/utils/request' 6 import request from '@/utils/request'
2 let SERVER = JSON.parse(localStorage.getItem('ApiUrl')) 7 let SERVER = window.config ? window.config : JSON.parse(localStorage.getItem('ApiUrl'))
3 // 转出 8 // 转出
4 export function completeTask (data) { 9 export function completeTask (data) {
5 return request({ 10 return request({
......
1 import request from '@/utils/request' 1 import request from '@/utils/request'
2 let SERVER = JSON.parse(localStorage.getItem('ApiUrl')) 2 let SERVER = window.config ? window.config : JSON.parse(localStorage.getItem('ApiUrl'))
3 3
4 // 新增平台接口 4 // 新增平台接口
5 export function addSysInterface (data) { 5 export function addSysInterface (data) {
......
1 /*
2 * @Description:
3 * @Autor: renchao
4 * @LastEditTime: 2023-05-06 09:17:41
5 */
1 import request from '@/utils/request' 6 import request from '@/utils/request'
2 let SERVER = JSON.parse(localStorage.getItem('ApiUrl')) 7 let SERVER = window.config ? window.config : JSON.parse(localStorage.getItem('ApiUrl'))
3 const url = SERVER.LPBSERVERAPI + '/rest/zhcx/lpcx/' 8 const url = SERVER.LPBSERVERAPI + '/rest/zhcx/lpcx/'
4 /* 9 /*
5 楼盘查询 10 楼盘查询
...@@ -7,7 +12,6 @@ const url = SERVER.LPBSERVERAPI + '/rest/zhcx/lpcx/' ...@@ -7,7 +12,6 @@ const url = SERVER.LPBSERVERAPI + '/rest/zhcx/lpcx/'
7 // 根据条件进行列表查询 12 // 根据条件进行列表查询
8 export function getLpZrz (data) { 13 export function getLpZrz (data) {
9 return request({ 14 return request({
10 // url: SERVER.SERVERAPI + '/rest/zhcx/lpcx/getLpZrz',
11 url: 'service-lpb/rest/zhcx/lpcx/getLpZrz', 15 url: 'service-lpb/rest/zhcx/lpcx/getLpZrz',
12 method: 'post', 16 method: 'post',
13 data: data 17 data: data
...@@ -18,7 +22,6 @@ export function getLpZrz (data) { ...@@ -18,7 +22,6 @@ export function getLpZrz (data) {
18 export function getLpb (zrzbsm) { 22 export function getLpb (zrzbsm) {
19 return request({ 23 return request({
20 url: url + 'getLpb?scyclx=1&zrzbsm=' + zrzbsm, 24 url: url + 'getLpb?scyclx=1&zrzbsm=' + zrzbsm,
21 // url: 'service-lpb/rest/zhcx/lpcx/getLpb?zrzbsm=' + zrzbsm ,
22 method: 'get' 25 method: 'get'
23 }) 26 })
24 } 27 }
......
1 import request from '@/utils/request' 1 import request from '@/utils/request'
2 let SERVER = JSON.parse(localStorage.getItem('ApiUrl')) 2 let SERVER = window.config ? window.config : JSON.parse(localStorage.getItem('ApiUrl'))
3 /* 3 /*
4 登记簿详情页 4 登记簿详情页
5 */ 5 */
......
1 import request from '@/utils/request' 1 import request from '@/utils/request'
2 let SERVER = JSON.parse(localStorage.getItem('ApiUrl')) 2 let SERVER = window.config ? window.config : JSON.parse(localStorage.getItem('ApiUrl'))
3 3
4 4
5 // 获取自然幢下其他户 5 // 获取自然幢下其他户
......
1 import request from '@/utils/request' 1 import request from '@/utils/request'
2 let SERVER = JSON.parse(localStorage.getItem('ApiUrl')) 2 let SERVER = window.config ? window.config : JSON.parse(localStorage.getItem('ApiUrl'))
3 // 获取申请查询列表 3 // 获取申请查询列表
4 export function getSqcxPage (data) { 4 export function getSqcxPage (data) {
5 return request({ 5 return request({
......
1 import request from '@/utils/request' 1 import request from '@/utils/request'
2 let SERVER = JSON.parse(localStorage.getItem('ApiUrl')) 2 let SERVER = window.config ? window.config : JSON.parse(localStorage.getItem('ApiUrl'))
3 3
4 // 上传单个文件 4 // 上传单个文件
5 export function upload (data) { 5 export function upload (data) {
......
1 import request from '@/utils/request' 1 import request from '@/utils/request'
2 let SERVER = JSON.parse(localStorage.getItem('ApiUrl')) 2 let SERVER = window.config ? window.config : JSON.parse(localStorage.getItem('ApiUrl'))
3
4 // 用户首页 3 // 用户首页
5 // 获取首页通知公告列表 4 // 获取首页通知公告列表
6 export function getHomeNoticeList () { 5 export function getHomeNoticeList () {
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
4 * @LastEditTime: 2023-04-20 09:39:44 4 * @LastEditTime: 2023-04-20 09:39:44
5 */ 5 */
6 import request from '@/utils/request' 6 import request from '@/utils/request'
7 let SERVER = JSON.parse(localStorage.getItem('ApiUrl')) 7 let SERVER = window.config ? window.config : JSON.parse(localStorage.getItem('ApiUrl'))
8 8
9 //批量初始化 9 //批量初始化
10 export function BatchInit (data) { 10 export function BatchInit (data) {
......
1 import request from '@/utils/request' 1 import request from '@/utils/request'
2 let SERVER = JSON.parse(localStorage.getItem('ApiUrl')) 2 let SERVER = window.config ? window.config : JSON.parse(localStorage.getItem('ApiUrl'))
3 3
4 // 初始化内容 4 // 初始化内容
5 export function Init (data) { 5 export function Init (data) {
......
1 import request from '@/utils/request' 1 import request from '@/utils/request'
2 let SERVER = JSON.parse(localStorage.getItem('ApiUrl')) 2 let SERVER = window.config ? window.config : JSON.parse(localStorage.getItem('ApiUrl'))
3 // 初始化内容 3 // 初始化内容
4 export function Init (data) { 4 export function Init (data) {
5 let apiUrl = ""; 5 let apiUrl = "";
......
1 import request from '@/utils/request' 1 import request from '@/utils/request'
2 let SERVER = JSON.parse(localStorage.getItem('ApiUrl')) 2 let SERVER = window.config ? window.config : JSON.parse(localStorage.getItem('ApiUrl'))
3 3
4 // 初始化内容 4 // 初始化内容
5 export function Init (data) { 5 export function Init (data) {
......
1 import request from '@/utils/request' 1 import request from '@/utils/request'
2 let SERVER = JSON.parse(localStorage.getItem('ApiUrl')) 2 let SERVER = window.config ? window.config : JSON.parse(localStorage.getItem('ApiUrl'))
3 3
4 // 初始化内容 4 // 初始化内容
5 export function Init (data) { 5 export function Init (data) {
......
1 import request from '@/utils/request' 1 import request from '@/utils/request'
2 let SERVER = JSON.parse(localStorage.getItem('ApiUrl')) 2 let SERVER = window.config ? window.config : JSON.parse(localStorage.getItem('ApiUrl'))
3 // 初始化内容 3 // 初始化内容
4 export function Init (data) { 4 export function Init (data) {
5 let apiUrl = ""; 5 let apiUrl = "";
......
1 import request from '@/utils/request' 1 import request from '@/utils/request'
2 let SERVER = JSON.parse(localStorage.getItem('ApiUrl')) 2 let SERVER = window.config ? window.config : JSON.parse(localStorage.getItem('ApiUrl'))
3 // 初始化内容 3 // 初始化内容
4 export function Init (data) { 4 export function Init (data) {
5 let apiUrl = ""; 5 let apiUrl = "";
......
1 import request from '@/utils/request' 1 import request from '@/utils/request'
2 let SERVER = JSON.parse(localStorage.getItem('ApiUrl')) 2 let SERVER = window.config ? window.config : JSON.parse(localStorage.getItem('ApiUrl'))
3 3
4 // 初始化内容 4 // 初始化内容
5 export function Init (data) { 5 export function Init (data) {
......
1 import request from '@/utils/request' 1 import request from '@/utils/request'
2 let SERVER = JSON.parse(localStorage.getItem('ApiUrl')) 2 let SERVER = window.config ? window.config : JSON.parse(localStorage.getItem('ApiUrl'))
3 /* 3 /*
4 系统监控 -获取错误日志列表 4 系统监控 -获取错误日志列表
5 */ 5 */
......
1 import request from '@/utils/request' 1 import request from '@/utils/request'
2 let SERVER = JSON.parse(localStorage.getItem('ApiUrl')) 2 let SERVER = window.config ? window.config : JSON.parse(localStorage.getItem('ApiUrl'))
3 /* 3 /*
4 业务办理-获取收藏业务集合 4 业务办理-获取收藏业务集合
5 */ 5 */
......
1 import request from '@/utils/request' 1 import request from '@/utils/request'
2 let SERVER = JSON.parse(localStorage.getItem('ApiUrl')) 2 let SERVER = window.config ? window.config : JSON.parse(localStorage.getItem('ApiUrl'))
3 /* 3 /*
4 综合查询 4 综合查询
5 */ 5 */
......
1 import request from '@/utils/request' 1 import request from '@/utils/request'
2 let SERVER = JSON.parse(localStorage.getItem('ApiUrl')) 2 let SERVER = window.config ? window.config : JSON.parse(localStorage.getItem('ApiUrl'))
3 /* 3 /*
4 证书管理-获取序列号 4 证书管理-获取序列号
5 */ 5 */
......
1 /* 1 /*
2 * @Description: 2 * @Description:
3 * @Autor: renchao 3 * @Autor: renchao
4 * @LastEditTime: 2023-04-26 09:36:10 4 * @LastEditTime: 2023-05-06 09:14:47
5 */ 5 */
6 import Vue from 'vue' 6 import Vue from 'vue'
7 import App from './App' 7 import App from './App'
......
...@@ -61,6 +61,9 @@ module.exports = { ...@@ -61,6 +61,9 @@ module.exports = {
61 // configureWebpack通过操作对象的形式,来修改默认的webpack配置 61 // configureWebpack通过操作对象的形式,来修改默认的webpack配置
62 configureWebpack: { 62 configureWebpack: {
63 name: name, 63 name: name,
64 entry: {
65 app: './src/main.js'
66 },
64 resolve: { 67 resolve: {
65 alias: { 68 alias: {
66 '@': resolve('src') 69 '@': resolve('src')
...@@ -70,7 +73,6 @@ module.exports = { ...@@ -70,7 +73,6 @@ module.exports = {
70 }, 73 },
71 // chainWebpack通过链式编程的形式,来修改默认的webpack配置 74 // chainWebpack通过链式编程的形式,来修改默认的webpack配置
72 chainWebpack (config) { 75 chainWebpack (config) {
73 config.entry.app = ['babel-polyfill', './src/main.js'];
74 // it can improve the speed of the first screen, it is recommended to turn on preload 76 // it can improve the speed of the first screen, it is recommended to turn on preload
75 // it can improve the speed of the first screen, it is recommended to turn on preload 77 // it can improve the speed of the first screen, it is recommended to turn on preload
76 config.plugin('preload').tap(() => [ 78 config.plugin('preload').tap(() => [
......