Ver Fonte

URL挂载

李天标 há 6 anos atrás
pai
commit
a80377c83f
2 ficheiros alterados com 4 adições e 2 exclusões
  1. 2 0
      main.js
  2. 2 2
      pages/User/user.vue

+ 2 - 0
main.js

@@ -11,6 +11,8 @@ Vue.config.productionTip = !!env.isProduction;
 
 App.mpType = 'app'
 
+Vue.prototype.serverurl="http://127.0.0.1:8090";
+
 Vue.prototype.$store = store;
 
 const app = new Vue({

+ 2 - 2
pages/User/user.vue

@@ -87,12 +87,12 @@
 				this.showOrNo = "none";
 			},
 			updata() {
-
+				var serverurl = this.serverurl;
 				var id = this.id;
 				var value = this.value;
 				if (value != null && value != '') {
 					uni.request({
-						url: 'http://127.0.0.1:8090/TEquipment/updateName',
+						url: serverurl+'/TEquipment/updateName',
 						data: {
 							id: id,
 							name: value