347617796@qq.com 4 年之前
父節點
當前提交
8cfe505def
共有 5 個文件被更改,包括 17 次插入12 次删除
  1. 二進制
      dist.rar
  2. 14 7
      src/api/axios.js
  3. 1 1
      src/index.vue
  4. 1 3
      src/main.js
  5. 1 1
      src/views/set/jurisdiction.vue

二進制
dist.rar


+ 14 - 7
src/api/axios.js

@@ -20,8 +20,8 @@ const service = axios.create({
 service.interceptors.request.use(
 	config => {
 		if (getToken()) {
-			config.headers['A-Token'] = getToken()
-			// config.headers['A-Token'] = ' eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwczpcL1wvdGVzdC1kaW5nLmcxMDcuY29tXC9hcGlcL2RpbmdcL2xvZ2luIiwiaWF0IjoxNjAzNzcwNTM0LCJleHAiOjE2MDQzNzA1MzQsIm5iZiI6MTYwMzc3MDUzNCwianRpIjoid3g4NVZlZzlaYlBydzhBeSIsInN1YiI6MTU5LCJwcnYiOiJjYTY0ODlkNTBmMjQwN2E2NzgzMGU4MDkwZDAxNDg4MzU2ODU5NjJiIiwicm9sZSI6ImVtcGxveWVlIn0.YdaiWSM5iAYm6dwnxLS0L_mkDkFU1VFL1DAQNkz8haw'
+			// config.headers['A-Token'] = getToken()
+			config.headers['A-Token'] = ' eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwczpcL1wvdGVzdC1kaW5nLmcxMDcuY29tXC9hcGlcL2RpbmdcL2xvZ2luIiwiaWF0IjoxNjA1MjQ4MzM1LCJleHAiOjE2MDU4NDgzMzUsIm5iZiI6MTYwNTI0ODMzNSwianRpIjoiU29DNXFjZTY2aDhkbWdtaSIsInN1YiI6MTU5LCJwcnYiOiJjYTY0ODlkNTBmMjQwN2E2NzgzMGU4MDkwZDAxNDg4MzU2ODU5NjJiIiwicm9sZSI6ImVtcGxveWVlIn0.2Ayf0qYdg7cfpFSYGMFDxxE5ypkc5HwbM_QADleNik8'
 		}
 		if (config.url == '/api/integral/statistics/ranking' || config.url == '/api/integral/review/apply'|| config.url == '/api/rule/import') {
 		  config.headers['Accept'] = 'application/vnd.test.v2+json'
@@ -72,12 +72,19 @@ service.interceptors.response.use(
 			// 	type: 'warning',
 			// })
 			return Promise.reject(error.message)
+		}else if(error.message=='Network Error'){
+			Message({
+				message: '网络异常,请检查网络是否畅通,再重新进入应用',
+				type: 'error',
+			})
+			return Promise.reject(error.message)
+		}else{
+			Message({
+				message: error.message,
+				type: 'error',
+			})
+			return Promise.reject(error.message)
 		}
-		Message({
-			message: error.message,
-			type: 'error',
-		})
-		return Promise.reject(error.message)
 	}
 )
 

+ 1 - 1
src/index.vue

@@ -14,7 +14,7 @@
 						<el-tooltip class="item" effect="dark" content="设置向导" placement="bottom">
 							<img src="./assets/image/wn.png" class="wn" @click="showWn">
 						</el-tooltip>
-						<userImage :user_name="userData.name" :img_url="userData.img_url" width="44px" height="44px"></userImage>
+						<!-- <userImage :user_name="userData.name" :img_url="userData.img_url" width="44px" height="44px"></userImage> -->
 					</div>
 				</div>
 			</div>

+ 1 - 3
src/main.js

@@ -17,7 +17,7 @@ Vue.component('userImage', userImage)
 
 Vue.use(ElementUI);
 // if (process.env.NODE_ENV === 'development') {
-  new VConsole()
+  // new VConsole()
 // }
 
 Vue.prototype.$dd=dd;
@@ -29,8 +29,6 @@ Vue.prototype.$getTyps = getTyps
 Vue.prototype.$setTyps = setTyps
 Vue.prototype.$moment = moment
 
-
-
 Vue.prototype.$http= service;
 //Vue函数添加一个原型属性$axios 指向axios,这样vue实例或组件中不用再去重复引用Axios 直接用this.$axios就能执行axios 方法
 var CancelToken = axios.CancelToken;

+ 1 - 1
src/views/set/jurisdiction.vue

@@ -614,7 +614,7 @@ export default {
 				cancelButtonText: '取消',
 				type: 'warning'
 			}).then(() => {
-				this.$axios('DELETE','/api/role/user',{role_id: this.item_info.id,employee_id: this.radioVal}).then(res => {
+				this.$axios('post','/api/role/user/del',{role_id: this.item_info.id,employee_id: this.radioVal}).then(res => {
 					if (res.data.code == 1) {
 						this.$message.success(res.data.msg);
 						this.get_table_list();