Z 1 год назад
Родитель
Сommit
15f8ab1f76
3 измененных файлов с 17 добавлено и 12 удалено
  1. 10 10
      hybrid/html/a.html
  2. 3 2
      hybrid/html/c.html
  3. 4 0
      pages/home/wt/components/formParser/routerView.vue

+ 10 - 10
hybrid/html/a.html

@@ -45,7 +45,6 @@
 		<script src="./resource/uni.webview.js"></script>
 		<script src="./resource/uni.webview.js"></script>
 		<script src="./vue-form-making/form-making-v3.umd.js"></script>
 		<script src="./vue-form-making/form-making-v3.umd.js"></script>
 		<script>
 		<script>
-			const APIUrl = 'http://192.168.1.251:51001'
 			let EnvObj = {}
 			let EnvObj = {}
 			uni.getEnv(function(res) {
 			uni.getEnv(function(res) {
 				EnvObj = res;
 				EnvObj = res;
@@ -66,6 +65,7 @@
 				created() {
 				created() {
 					this.headers = this.getQueryParams('headers');
 					this.headers = this.getQueryParams('headers');
 					let params = this.getQueryParams('params');
 					let params = this.getQueryParams('params');
+					const APIUrl = this.headers.serverInfo
 					axios({
 					axios({
 						method: 'get',
 						method: 'get',
 						url: APIUrl + `/flowable/bpmcustomform/getById/${params.id}`,
 						url: APIUrl + `/flowable/bpmcustomform/getById/${params.id}`,
@@ -101,16 +101,16 @@
 							this.isFlag = true
 							this.isFlag = true
 						}
 						}
 					});
 					});
-					// axios({
-					// 	method: 'get',
-					// 	url: APIUrl + `/bpm/task/list-by-process-instance-id?processInstanceId=${params.id}`,
-					// 	headers: this.headers,
-					// }).then((res) => {
-					// 	console.log(res)
-					// 	if (res.data.code != '-1') {
+					axios({
+						method: 'get',
+						url: APIUrl + `/bpm/task/list-by-process-instance-id?processInstanceId=${params.id}`,
+						headers: this.headers,
+					}).then((res) => {
+						console.log(res)
+						if (res.data.code != '-1') {
 						
 						
-					// 	}
-					// });
+						}
+					});
 				
 				
 				
 				
 				},
 				},

+ 3 - 2
hybrid/html/c.html

@@ -44,7 +44,7 @@
 		<script src="./resource/uni.webview.js"></script>
 		<script src="./resource/uni.webview.js"></script>
 		<script src="./vue-form-making/form-making-v3.umd.js"></script>
 		<script src="./vue-form-making/form-making-v3.umd.js"></script>
 		<script>
 		<script>
-			const APIUrl = 'http://192.168.1.105:18086'
+			
 			let EnvObj = {}
 			let EnvObj = {}
 			uni.getEnv(function(res) {
 			uni.getEnv(function(res) {
 				EnvObj = res;
 				EnvObj = res;
@@ -64,7 +64,8 @@
 				created() {
 				created() {
 					this.headers = this.getQueryParams('headers');
 					this.headers = this.getQueryParams('headers');
 					let params = this.getQueryParams('params');
 					let params = this.getQueryParams('params');
-					console.log(params)
+					const APIUrl = this.headers.serverInfo
+					console.log(APIUrl)
 					axios({
 					axios({
 						method: 'get',
 						method: 'get',
 						url: APIUrl + `/bpm/process-instance/get?id=${params.processInstanceId}`,
 						url: APIUrl + `/bpm/process-instance/get?id=${params.processInstanceId}`,

+ 4 - 0
pages/home/wt/components/formParser/routerView.vue

@@ -15,12 +15,16 @@
 		onLoad(option = {}) {
 		onLoad(option = {}) {
 			let headers = {};
 			let headers = {};
 			const value = uni.getStorageSync("token"); //取存本地的token
 			const value = uni.getStorageSync("token"); //取存本地的token
+			const apiInfo = uni.getStorageSync("apiInfo"); //取存本地的token
+			console.log(apiInfo,'=====')
 			  headers = {
 			  headers = {
 			    "content-type": "application/json",
 			    "content-type": "application/json",
 			    "zoomwin-token": value,
 			    "zoomwin-token": value,
 			    Authorization: value,
 			    Authorization: value,
 			    "zoomwin-sid": uni.getStorageSync("userInfo").sessionId,
 			    "zoomwin-sid": uni.getStorageSync("userInfo").sessionId,
+				serverInfo : apiInfo.protocal+ apiInfo.hostname+':'+apiInfo.port+'/api',
 			  };
 			  };
+			  //http://192.168.1.105:18086
 		  setTimeout(()=>{
 		  setTimeout(()=>{
 			  const params =  JSON.parse(option.params)
 			  const params =  JSON.parse(option.params)
 			  let html = params.type =='add'? 'a.html':'c.html'
 			  let html = params.type =='add'? 'a.html':'c.html'