yuanyiming 1 anno fa
parent
commit
ba118a134c
2 ha cambiato i file con 5 aggiunte e 2 eliminazioni
  1. 1 1
      api/request.js
  2. 4 1
      pages/login/login.vue

+ 1 - 1
api/request.js

@@ -7,7 +7,7 @@ const request = (url = '', method = 'GET', data = {}, header = {   //这里这
 	return new Promise((resolve, reject) => {
 		// console.log(header);
 		uni.request({
-			url: 'http://10.3.13.84:7003' + url, //接口地址:前缀+方法中传入的地址
+			url: 'http://10.3.13.84:7003/api/pbl' + url, //接口地址:前缀+方法中传入的地址
 			method: method, //请求方法
 			data: data, //传递参数
 			header: header, //自定义头部,和后端商同后编写

+ 4 - 1
pages/login/login.vue

@@ -74,7 +74,10 @@
 			gotoIndex() {
 				const value = uni.setStorageSync('login', '1');
 
-				this.$request('/a','GET',{u:1}).then(res=>{
+				// this.$request('/a','GET',{u:1}).then(res=>{
+				// 	console.log(res);
+				// })
+				this.$request('/insertActive','POST',{insertActive:1}).then(res=>{
 					console.log(res);
 				})
 			},