Browse Source

改善者提交改善计划,优化弹窗

xieyunhui 4 years ago
parent
commit
82d2e511ea
4 changed files with 32 additions and 30 deletions
  1. 23 21
      pages/home/home.vue
  2. 3 3
      pages/mission-action/components/modal.vue
  3. 3 3
      utils/requestUrl.js
  4. 3 3
      utils/uploadImg.js

+ 23 - 21
pages/home/home.vue

@@ -179,27 +179,23 @@
 				}
 			});
 		},
-		methods: {
-			logOut() {
-				this.$store.dispatch({
-					type: 'home/commActions',
-					payload: {
-						key: 'logout',
-					}
-				}).then((data) => {
-					if (data) {
-						uni.redirectTo({
-							url: `/pages/login/login?hospSign=${uni.getStorageSync('hospSign')}`
-						});
-					}
-				});
-			},
-			switchRole() {
-				uni.navigateTo({
-					url: '/pages/role-switching/role-switching'
-				});
-			}
-		},
+		// methods: {
+		// 	logOut() {
+		// 		this.$store.dispatch({
+		// 			type: 'home/commActions',
+		// 			payload: {
+		// 				key: 'logout',
+		// 			}
+		// 		}).then((data) => {
+		// 			if (data) {
+		// 				uni.redirectTo({
+		// 					url: `/pages/login/login?hospSign=${uni.getStorageSync('hospSign')}`
+		// 				});
+		// 			}
+		// 		});
+		// 	},
+			
+		// },
 		created: function() {
 			this.$store.dispatch({
 				type: 'home/commActions',
@@ -272,6 +268,12 @@
 						}
 					}
 				});
+			},
+			switchRole() {
+				console.log('切换角色');
+				uni.navigateTo({
+					url: '/pages/role-switching/role-switching'
+				});
 			},
 			showVersionInfo(){
 				this.$store.dispatch({

+ 3 - 3
pages/mission-action/components/modal.vue

@@ -4,15 +4,15 @@
       <view class="title">
       	<text>方案名称</text>
       </view>
-			<view class="label">
+			<!-- <view class="label">
 				<text>请输入方案的名称</text>
-			</view>
+			</view> -->
 			<view class="input-box">
 			  <input
 				  class="input"
 					maxlength="16"
 					placeholder="限2~16个字符"
-					placeholder-style="color: #666E80"
+					placeholder-style="color: #A1A7B3"
 					@blur="changeImproveScheme"
 				/>
 			</view>

+ 3 - 3
utils/requestUrl.js

@@ -6,14 +6,14 @@
  * @Description: In User Settings Edit
  * @FilePath: /web_TracerMethodology/utils/requestUrl.js
  */
-const base = '192.168.51.80:8801/imed/pfm/';
-export const URL = `//${base}`; // 本地
+// const base = '192.168.51.80:8801/imed/pfm/';
+export const URL = '192.168.51.80:8801/imed/pfm/'; // 本地
 // export const URL = '192.168.38.174:8088/imed/pfm/';
 // export const URL = '192.168.1.45:8088/imed/pfm/'; //内网
 // export const URL = 's1.nsloop.com:5137/imed/pfm/';  // 外网
 // export const URL = '121.43.139.179:8801/imed/pfm/';  // 云端服务1
 // export const URL = '172.18.116.20:8801/imed/pfm/';  // 云端服务2
 export const wsURL = (hiId, user, permission) => {
-	return `ws://${base}websocket/${hiId}/${user}/${permission}`;
+	return `ws://${URL}websocket/${hiId}/${user}/${permission}`;
 }
 

+ 3 - 3
utils/uploadImg.js

@@ -8,10 +8,10 @@ const uploadImage = (params) => {
 		let uploads = [];
 		(params.tempFilePaths).forEach((item, i) => {
 			uploads[i] = new Promise((resolve) => {
-				console.log({URL});
+				// console.log({URL});
 				uni.uploadFile({
-		  url: `${URL}/file/uploadImg`,
-          fileType: 'image',
+				  url: `http://${URL}/file/uploadImg`,
+				  fileType: 'image',
 					filePath: item,
 					name: 'file',
 					formData: {