Bläddra i källkod

主要修改refresh token一,还未能实现

“yueshang” 1 år sedan
förälder
incheckning
34439b566e
31 ändrade filer med 348 tillägg och 272 borttagningar
  1. 11 0
      api/login.js
  2. 3 3
      pagesA/fire/architecture/add_architecture/add_architecture.vue
  3. 1 1
      pagesA/fire/archive/add_archive/add_archive2.vue
  4. 1 1
      pagesA/fire/archive/add_archive/add_archive3.vue
  5. 1 1
      pagesA/fire/archive/add_archive/add_archive4.vue
  6. 1 1
      pagesA/fire/archive/add_archive/add_archive5.vue
  7. 1 1
      pagesA/fire/archive/add_archive/add_archive6.vue
  8. 1 1
      pagesA/fire/archive/edit_archive/edit_archive1.vue
  9. 1 1
      pagesA/fire/archive/edit_archive/edit_archive2.vue
  10. 1 1
      pagesA/fire/archive/edit_archive/edit_archive3.vue
  11. 1 1
      pagesA/fire/archive/edit_archive/edit_archive4.vue
  12. 1 1
      pagesA/fire/archive/edit_archive/edit_archive5.vue
  13. 1 1
      pagesA/fire/archive/edit_archive/edit_archive6.vue
  14. 17 9
      pagesA/fire/check_active/check_implement/check_implement.vue
  15. 0 35
      pagesA/fire/check_active/index.vue
  16. 6 3
      pagesA/fire/check_inspection/check_inspection.vue
  17. 8 1
      pagesA/fire/fire_device/add_device/add_device.vue
  18. 8 1
      pagesA/fire/fire_device/edit_device/edit_device.vue
  19. 10 10
      pagesA/fire/fire_inspetItem/add-street/streetCzfpczl.vue
  20. 5 0
      pagesA/fire/fire_inspetItem/add-street/streetDpccdtfpczl.vue
  21. 7 2
      pagesA/fire/fire_inspetItem/add-street/streetDypczl.vue
  22. 7 2
      pagesA/fire/fire_inspetItem/add-street/streetHypczl.vue
  23. 116 107
      pagesA/fire/fire_inspetItem/add-street/streetQypczl.vue
  24. 7 2
      pagesA/fire/fire_inspetItem/add-street/streetTsrqbf.vue
  25. 8 3
      pagesA/fire/fire_inspetItem/add-street/streetXfsssbpczl.vue
  26. 7 2
      pagesA/fire/fire_inspetItem/add-street/streetXftdpczl.vue
  27. 7 2
      pagesA/fire/fire_inspetItem/add-street/streetXfxcjypxyl.vue
  28. 9 7
      pagesA/fire/fire_station/add_fireStation/add_fireStation.vue
  29. 6 0
      static/scss/global.scss
  30. 2 0
      utils/auth.js
  31. 93 72
      utils/request.js

+ 11 - 0
api/login.js

@@ -1,5 +1,16 @@
 import request from "@/utils/request";
 
+// 刷新令牌
+export function refreshToken(data) {
+	return request({
+		url: '/admin-api/system/auth/refresh-token',
+		header: {
+				'content-type': 'application/x-www-form-urlencoded'
+			},
+		method: 'post',
+		data: data
+	})
+}
 // 登录方法
 export function login(username, password,socialCode,socialType,socialState,captchaVerification) {
 	const data = {

+ 3 - 3
pagesA/fire/architecture/add_architecture/add_architecture.vue

@@ -121,6 +121,9 @@
 						<u-input v-model="formData.fireRating" placeholder="请输入耐火等级" />
 					</u-form-item>
 					<u-form-item label="燃气类型	"><u-input v-model="formData.rqlx" placeholder="请输入燃气类型" /></u-form-item>
+					<u-form-item label="重点部位" prop="xfdts">
+						<u-input v-model="formData.zdbw" placeholder="请输入重点部位" />
+					</u-form-item>
 					<u-form-item label="总平面图纸名称	">
 						<!-- 选择文件上传 -->
 						<uni-file-picker v-model="formData.dwpmtzmc" del-icon limit="1" auto-upload file-mediatype="all"
@@ -131,9 +134,6 @@
 								<isLodingModel v-if="loading"></isLodingModel>
 						</uni-file-picker>
 					</u-form-item>
-					<u-form-item label="重点部位" prop="xfdts">
-						<u-input v-model="formData.zdbw" placeholder="请输入重点部位" />
-					</u-form-item>
 				</view>
 				
 			</u--form>

+ 1 - 1
pagesA/fire/archive/add_archive/add_archive2.vue

@@ -163,7 +163,7 @@
 		onLoad: function(option) {
 			// 以下内容都是为了 选择街道
 			const deptValue = uni.getStorageSync('getDepartment_key'); //所有街道
-			const deptId = uni.getStorageSync('getUserInfo_key').streetInfo.id; //登录用户的街道id
+			const deptId = uni.getStorageSync('getUserInfo_key')?.streetInfo?.id; //登录用户的街道id
 			var newArrar = {}; //新对象
 			// 如果存在街道id,就直接取出对应的名称
 			if (deptId) {

+ 1 - 1
pagesA/fire/archive/add_archive/add_archive3.vue

@@ -134,7 +134,7 @@
 
 			// 以下内容都是为了 选择街道
 			const deptValue = uni.getStorageSync('getDepartment_key'); //所有街道
-			const deptId = uni.getStorageSync('getUserInfo_key').streetInfo.id; //登录用户的街道id
+			const deptId = uni.getStorageSync('getUserInfo_key')?.streetInfo?.id; //登录用户的街道id
 			var newArrar = {}; //新对象
 			// 如果存在街道id,就直接取出对应的名称
 			if (deptId) {

+ 1 - 1
pagesA/fire/archive/add_archive/add_archive4.vue

@@ -126,7 +126,7 @@
 		onLoad: function(option) {
 			// 以下内容都是为了 选择街道
 			const deptValue = uni.getStorageSync('getDepartment_key'); //所有街道
-			const deptId = uni.getStorageSync('getUserInfo_key').streetInfo.id; //登录用户的街道id
+			const deptId =uni.getStorageSync('getUserInfo_key')?.streetInfo?.id //登录用户的街道id
 			var newArrar = {}; //新对象
 			// 如果存在街道id,就直接取出对应的名称
 			if (deptId) {

+ 1 - 1
pagesA/fire/archive/add_archive/add_archive5.vue

@@ -149,7 +149,7 @@
 
 			// 以下内容都是为了 选择街道
 			const deptValue = uni.getStorageSync('getDepartment_key'); //所有街道
-			const deptId = uni.getStorageSync('getUserInfo_key').streetInfo.id; //登录用户的街道id
+			const deptId =uni.getStorageSync('getUserInfo_key')?.streetInfo?.id; //登录用户的街道id
 			var newArrar = {}; //新对象
 			// 如果存在街道id,就直接取出对应的名称
 			if (deptId) {

+ 1 - 1
pagesA/fire/archive/add_archive/add_archive6.vue

@@ -108,7 +108,7 @@
 
 			// 以下内容都是为了 选择街道
 			const deptValue = uni.getStorageSync('getDepartment_key'); //所有街道
-			const deptId = uni.getStorageSync('getUserInfo_key').streetInfo.id; //登录用户的街道id
+			const deptId = uni.getStorageSync('getUserInfo_key')?.streetInfo?.id //登录用户的街道id
 			var newArrar = {}; //新对象
 			// 如果存在街道id,就直接取出对应的名称
 			if (deptId) {

+ 1 - 1
pagesA/fire/archive/edit_archive/edit_archive1.vue

@@ -122,7 +122,7 @@
 			});
 			// 以下内容都是为了 选择街道
 			const deptValue = uni.getStorageSync('getDepartment_key'); //所有街道
-			const deptId = uni.getStorageSync('getUserInfo_key').streetInfo.id; //登录用户的街道id
+			const deptId = uni.getStorageSync('getUserInfo_key')?.streetInfo?.id //登录用户的街道id
 			// 如果存在街道id,就直接取出对应的名称
 			if (deptId) {
 				let newArrar = deptValue.find((item) => {

+ 1 - 1
pagesA/fire/archive/edit_archive/edit_archive2.vue

@@ -153,7 +153,7 @@
 			});
 			// 以下内容都是为了 选择街道
 			const deptValue = uni.getStorageSync('getDepartment_key'); //所有街道
-			const deptId = uni.getStorageSync('getUserInfo_key').streetInfo.id; //登录用户的街道id
+			const deptId = uni.getStorageSync('getUserInfo_key')?.streetInfo?.id //登录用户的街道id
 			var newArrar = {}; //新对象
 			// 如果存在街道id,就直接取出对应的名称
 			if (deptId) {

+ 1 - 1
pagesA/fire/archive/edit_archive/edit_archive3.vue

@@ -121,7 +121,7 @@
 			});
 			// 以下内容都是为了 选择街道
 			const deptValue = uni.getStorageSync('getDepartment_key'); //所有街道
-			const deptId = uni.getStorageSync('getUserInfo_key').streetInfo.id; //登录用户的街道id
+			const deptId = uni.getStorageSync('getUserInfo_key')?.streetInfo?.id //登录用户的街道id
 			var newArrar = {}; //新对象
 			// 如果存在街道id,就直接取出对应的名称
 			if (deptId) {

+ 1 - 1
pagesA/fire/archive/edit_archive/edit_archive4.vue

@@ -111,7 +111,7 @@
 			});
 			// 以下内容都是为了 选择街道
 			const deptValue = uni.getStorageSync('getDepartment_key'); //所有街道
-			const deptId = uni.getStorageSync('getUserInfo_key').streetInfo.id; //登录用户的街道id
+			const deptId = uni.getStorageSync('getUserInfo_key')?.streetInfo?.id //登录用户的街道id
 			var newArrar = {}; //新对象
 			// 如果存在街道id,就直接取出对应的名称
 			if (deptId) {

+ 1 - 1
pagesA/fire/archive/edit_archive/edit_archive5.vue

@@ -107,7 +107,7 @@
 			});
 			// 以下内容都是为了 选择街道
 			const deptValue = uni.getStorageSync('getDepartment_key'); //所有街道
-			const deptId = uni.getStorageSync('getUserInfo_key').streetInfo.id; //登录用户的街道id
+			const deptId = uni.getStorageSync('getUserInfo_key')?.streetInfo?.id //登录用户的街道id
 			var newArrar = {}; //新对象
 			// 如果存在街道id,就直接取出对应的名称
 			if (deptId) {

+ 1 - 1
pagesA/fire/archive/edit_archive/edit_archive6.vue

@@ -95,7 +95,7 @@
 			});
 			// 以下内容都是为了 选择街道
 			const deptValue = uni.getStorageSync('getDepartment_key'); //所有街道
-			const deptId = uni.getStorageSync('getUserInfo_key').streetInfo.id; //登录用户的街道id
+			const deptId =uni.getStorageSync('getUserInfo_key')?.streetInfo?.id//登录用户的街道id
 			var newArrar = {}; //新对象
 			// 如果存在街道id,就直接取出对应的名称
 			if (deptId) {

+ 17 - 9
pagesA/fire/check_active/check_implement/check_implement.vue

@@ -43,10 +43,11 @@
 							<uni-grid-item>
 								<view class="grid-item-box" @click="photoUpload(item)">
 									<image :src="photograph" class="tupian"></image>
-									<text class="text">拍照上传</text>
-
+									
+									<!--  -->
+									<uni-load-more v-if="loading" status="loading" :content-text="contentText"/>
+									<text v-else class="text">拍照上传</text>
 								</view>
-
 							</uni-grid-item>
 						</uni-grid>
 						<!-- 线 -->
@@ -62,6 +63,7 @@
 								<u-icon name="close" color="#4CB2B6" size="19" @click="closeImage(item,indexs,index)">
 								</u-icon>
 							</view>
+
 						</view>
 					</view>
 					<view class="slot-contents" v-if="item.showDescription&&item.inspType!='fpd'"
@@ -155,8 +157,7 @@
 					@click="checkImplementConfirm">
 					<!-- 立即处理改为暂存了 -->
 				</u-button>
-				<u-button shape="circle" type="primary" color="#4CB2B6" text="完成任务"
-					@click="checkImplementRelease">
+				<u-button shape="circle" type="primary" color="#4CB2B6" text="完成任务" @click="checkImplementRelease">
 				</u-button>
 			</div>
 		</view>
@@ -223,6 +224,7 @@
 							<image :src="photograph" @click="photoUpload(item)" class="tiantupian"></image> <!-- 加载中 -->
 							<!-- <isLodingModel></isLodingModel> -->
 						</view>
+						<uni-load-more v-show="loading" status="loading" :content-text="contentText" />
 					</view>
 					<view class="uni-grid-wraps">
 						<view style="position: relative;width: 180rpx;float: left;margin: 10rpx 15rpx 0 0rpx;"
@@ -290,6 +292,9 @@
 		},
 		data() {
 			return {
+				contentText: {
+					contentrefresh: '上传照片中',
+				},
 				// ----隐患
 				choiceDanger: getDictDatas(DICT_TYPE.DANGER_TYPE),
 				checkedDanger: [],
@@ -575,10 +580,10 @@
 
 			},
 			closeImage(item, val, k) { //删除图片
-				console.log(item, 'iii', k, this.insTypeData, this.tableData);
-				if (item.fpdType == 'fpd') {
+				console.log(item, 'ddd');
+				if (item.inspType == 'fpd') {
 					this.insTypeData[k].attUrl.splice(val, 1)
-				} else {
+				}else{
 					this.tableData[k].attUrl.splice(val, 1)
 				}
 
@@ -1029,8 +1034,11 @@
 													that.loading = false
 													let imgUrl = JSON.parse(res
 														.data)
+													console.log(val.inspType,
+														'val.inspTyp', val
+														.fpdType);
 													// that.imageList.push(imgUrl.data)
-													if (!val.fpdType || val
+													if (!val.fpdType && val
 														.inspType != 'fpd') {
 														that.tableData.map((i,
 															index) => {

+ 0 - 35
pagesA/fire/check_active/index.vue

@@ -117,10 +117,6 @@
 			</view>
 			<view style="text-align: center;">
 				<view class="text-gray" style="padding-top: 20px;" v-if="tableData.length==0"> 暂无检查任务 </view>
-
-				<!-- 	<view class="" style="padding-top: 40px;width: 120px;">
-						    <image :src="jiezhiTime" @click="addClick" class="caogaoxiang"></image>
-						</view> 草稿箱-->
 			</view>
 			<view>
 				<image :src="Group" @click="addClick" class="tiantupian"></image>
@@ -149,16 +145,11 @@
 						<text @click="showToasts(item.id)" class="detail">发布任务</text>
 						<text @click="goAddCheck(item.id)" class="solve">修改任务</text>
 						<text @click="deletes(item.id)" class="deletes">删除</text>
-						<!-- <u-icon @click="deletes" name="trash-fill" size="20px" color="red"></u-icon> -->
 					</view>
 				</uni-card>
 			</view>
 			<view style="text-align: center;">
 				<view class="text-gray" style="padding-top: 20px;" v-if="tableData.length==0"> 暂无检查任务 </view>
-
-				<!-- 	<view class="" style="padding-top: 40px;width: 120px;">
-						    <image :src="jiezhiTime" @click="addClick" class="caogaoxiang"></image>
-						</view> 草稿箱-->
 			</view>
 			<view>
 				<image :src="Group" @click="addClick" class="tiantupian"></image>
@@ -187,9 +178,6 @@
 			</view>
 			<view style="text-align: center;">
 				<view class="text-gray" style="padding-top: 20px;" v-if="tableData.length==0"> 暂无检查任务 </view>
-				<!-- 	<view class="" style="padding-top: 40px;width: 120px;">
-						    <image :src="jiezhiTime" @click="addClick" class="caogaoxiang"></image>
-						</view> 草稿箱-->
 			</view>
 			<view>
 				<image :src="Group" @click="addClick" class="tiantupian"></image>
@@ -780,25 +768,6 @@
 			// 	this.formdata.pageNo += 1
 			// 	this.getData(this.formdata.pageNo)
 			// },
-
-
-			//日期范围
-			// 开始日期 
-			// confirmStarttime(e) {
-			// 	this.showtimeStart = false;
-			// 	console.log(e.value, e.mode);
-			// 	let value = new Date(e.value);
-			// 	this.formData.start = uni.$u.timeFormat(e.value, 'yyyy/mm/dd');
-			// },
-			// changetime(e) {
-			// 	console.log('change', e)
-			// },
-			// confirmEndtime(e) {
-			// 	this.showtimeEnd = false;
-			// 	console.log(e.value, e.mode);
-			// 	let value = new Date(e.value);
-			// 	this.formData.end = uni.$u.timeFormat(e.value, 'yyyy/mm/dd');
-			// }
 		},
 		// 触底的事件
 		onReachBottom() {
@@ -1133,10 +1102,6 @@
 			.time-item {
 				margin-right: 20rpx;
 			}
-
-			.time-item-check {}
 		}
-
-		.search-icon {}
 	}
 </style>

+ 6 - 3
pagesA/fire/check_inspection/check_inspection.vue

@@ -121,8 +121,8 @@
 						<view class="">巡检拍照:<text style="color:#822e2e;"></text></view>
 						<view class="">
 							<image :src="photograph" @click="photoUpload(item)" class="tiantupian"></image>
-							<isLodingModel></isLodingModel>
 						</view>
+						<uni-load-more v-show="loading" status="loading" :content-text="contentText" />
 					</view>
 					<view class="uni-grid-wraps">
 						<view style="position: relative;width: 180rpx;float: left;margin: 10rpx 15rpx 0 0rpx;"
@@ -218,8 +218,8 @@
 						<view class="">巡检拍照:<text style="color:#822e2e;"></text></view>
 						<view class="">
 							<image :src="photograph" @click="photoUpload(item)" class="tiantupian"></image> <!-- 加载中 -->
-							<isLodingModel></isLodingModel>
 						</view>
+						<uni-load-more v-show="loading" status="loading" :content-text="contentText" />
 					</view>
 					<view class="uni-grid-wraps">
 						<view style="position: relative;width: 180rpx;float: left;margin: 10rpx 15rpx 0 0rpx;"
@@ -326,6 +326,9 @@
 		},
 		data() {
 			return {
+				contentText: {
+					contentrefresh: '上传照片中',
+				},
 				screenHeight: this.$screenHeight,
 				// ----扫码选择隐患
 				showPopupDanger: false,
@@ -1265,7 +1268,7 @@
 	//隐患弹框
 	/deep/.u-popup__content {
 		overflow-y: auto;
-		height: 90vh;
+	
 	}
 
 	.text-xl {

+ 8 - 1
pagesA/fire/fire_device/add_device/add_device.vue

@@ -39,6 +39,10 @@
 						<view class="">
 							<image :src="photograph" @click="photoUpload()" class="tiantupian"></image>
 						</view>
+						<view>
+							拍照上传
+						</view>
+						<uni-load-more v-show="loading" status="loading" :content-text="contentText" />
 					</view>
 
 					<view class="uni-grid-wraps">
@@ -75,7 +79,7 @@
 			<u-action-sheet :show="showSex5" :actions="actions5" title="请选择单位" @close="showSex5 = false"
 				@select="sexSelect5"></u-action-sheet>
 			<!-- 加载中 -->
-			<isLodingModel></isLodingModel>
+			<!-- <isLodingModel></isLodingModel> -->
 		</view>
 		<uni-row class="heigthButton">
 			<u-button @click="submit('customForm')" type="primary" shape="circle" size="large" color="#4CB2B6"
@@ -103,6 +107,9 @@
 	export default {
 		data() {
 			return {
+				contentText: {
+					contentrefresh: '上传照片中',
+				},
 				screenHeight: this.$screenHeight,
 				wheight: '',
 				photograph: `${baseUrlImg}/checkActive/photograph.png`,

+ 8 - 1
pagesA/fire/fire_device/edit_device/edit_device.vue

@@ -47,6 +47,10 @@
 					<view class="">
 						<image :src="photograph" @click="photoUpload()" class="tiantupian"></image>
 					</view>
+					<view>
+						拍照上传
+					</view>
+					<uni-load-more v-show="loading" status="loading" :content-text="contentText" />
 				</view>
 				<view class="uni-grid-wraps" v-if="formData.picVOList">
 					<view v-for="(items,indexs) in formData.picVOList" :key="indexs">
@@ -78,7 +82,7 @@
 			<u-action-sheet :show="showSex5" :actions="actions5" title="请选择单位" @close="showSex5 = false"
 				@select="sexSelect5"></u-action-sheet>
 			<!-- 加载中 -->
-			<isLodingModel></isLodingModel>
+			<!-- <isLodingModel></isLodingModel> -->
 		</view>
 		<uni-row class="heigthButton">
 			<u-button @click="submit('customForm')" type="primary" shape="circle" size="large" color="#4CB2B6"
@@ -107,6 +111,9 @@
 	export default {
 		data() {
 			return {
+				contentText: {
+					contentrefresh: '上传照片中',
+				},
 				screenHeight: this.$screenHeight,
 				wheight: '',
 				photograph: `${baseUrlImg}/checkActive/photograph.png`,

+ 10 - 10
pagesA/fire/fire_inspetItem/add-street/streetCzfpczl.vue

@@ -31,12 +31,13 @@
 						<view class="paizhao-posit" v-if="!isview">
 							<view class="">
 								<image :src="photograph" @click="photoUpload" class="tiantupian-photo"></image>
-								<uni-load-more v-show="loading" status="loading" :content-text="contentText" />
+								
 								<!-- <span v-show="loading" class="photo-loading">上传照片中...</span> -->
 							</view>
 							<view class="">
 								拍照上传
 							</view>
+							<uni-load-more v-show="loading" status="loading" :content-text="contentText" />
 						</view>
 					</view>
 					<view v-if="formData.streetRepPicsDOList" class="show-photo">
@@ -133,14 +134,14 @@
 		onReady() {
 			this.$refs.customForm.setRules(this.rules);
 		},
-		watch: {
-			loading: {
-				handler(newLength, oldLength) {
-					this.$modal.isLoadingModel(this.loading)
-				},
-				immediate: true
-			}
-		},
+		// watch: {
+		// 	loading: {
+		// 		handler(newLength, oldLength) {
+		// 			this.$modal.isLoadingModel(this.loading)
+		// 		},
+		// 		immediate: true
+		// 	}
+		// },
 		onLoad(option) {
 			if (option.editData) {
 				this.isedit = true
@@ -169,7 +170,6 @@
 				this.formData.streetRepPicsDOList.splice(index, 1)
 			},
 			photoUpload() {
-				// this.loading = true
 				takePhotos(this)
 			},
 			bindDateChange(e) {

+ 5 - 0
pagesA/fire/fire_inspetItem/add-street/streetDpccdtfpczl.vue

@@ -36,6 +36,7 @@
 							<view>
 								拍照上传
 							</view>
+							<uni-load-more v-show="loading" status="loading" :content-text="contentText" />
 						</view>
 					</view>
 					<view v-if="formData.streetRepPicsDOList" class="show-photo">
@@ -93,6 +94,10 @@
 	export default {
 		data() {
 			return {
+				contentText: {
+					contentrefresh: '上传照片中',
+				},
+				loading: false,
 				screenHeight: this.$screenHeight,
 				wheight: '',
 				photograph: `${baseUrlImg}/checkActive/photograph.png`,

+ 7 - 2
pagesA/fire/fire_inspetItem/add-street/streetDypczl.vue

@@ -48,6 +48,7 @@
 							<view>
 								拍照上传
 							</view>
+							<uni-load-more v-show="loading" status="loading" :content-text="contentText" />
 						</view>
 					</view>
 					<view v-if="formData.streetRepPicsDOList" class="show-photo">
@@ -104,6 +105,9 @@
 	export default {
 		data() {
 			return {
+				contentText: {
+					contentrefresh: '上传照片中',
+				},
 				screenHeight: this.$screenHeight,
 				wheight: '',
 				photograph: `${baseUrlImg}/checkActive/photograph.png`,
@@ -139,6 +143,7 @@
 				},
 				isedit: false, //编辑
 				isview: false, //查看
+				loading: false
 			}
 		},
 		onReady() {
@@ -200,8 +205,8 @@
 						if (!item.feildname) {
 							item.feildname = '默认名称';
 						}
-						if(this.isedit&&!item.repid){
-							item.repid=this.parentId
+						if (this.isedit && !item.repid) {
+							item.repid = this.parentId
 						}
 					});
 					console.log(formList, 'this.formData');

+ 7 - 2
pagesA/fire/fire_inspetItem/add-street/streetHypczl.vue

@@ -43,6 +43,7 @@
 							<view>
 								拍照上传
 							</view>
+							<uni-load-more v-show="loading" status="loading" :content-text="contentText" />
 						</view>
 					</view>
 					<view v-if="formData.streetRepPicsDOList" class="show-photo">
@@ -100,6 +101,9 @@
 	export default {
 		data() {
 			return {
+				contentText: {
+					contentrefresh: '上传照片中',
+				},
 				screenHeight: this.$screenHeight,
 				wheight: '',
 				photograph: `${baseUrlImg}/checkActive/photograph.png`,
@@ -131,6 +135,7 @@
 				},
 				isedit: false, //编辑
 				isview: false, //查看
+				loading: false
 			}
 		},
 		onReady() {
@@ -192,8 +197,8 @@
 						if (!item.feildname) {
 							item.feildname = '默认名称';
 						}
-						if(this.isedit&&!item.repid){
-							item.repid=this.parentId
+						if (this.isedit && !item.repid) {
+							item.repid = this.parentId
 						}
 					});
 					console.log(formList, 'this.formData');

+ 116 - 107
pagesA/fire/fire_inspetItem/add-street/streetQypczl.vue

@@ -1,88 +1,91 @@
 <template>
 	<view class="uni-container">
 		<view class="example container" :style="'height: ' + (screenHeight - wheight - 75) + 'px'">
-		<u--form ref="customForm" :model="formData" labelPosition="left" labelWidth="100%" labelAlign="left">
-			<view class="juli-bottom">
-				<u-form-item label="检查单位或场所 (家)" prop="jcdwhcs">
-					<u-input v-model="formData.jcdwhcs" placeholder="请输入" :disabled="isview" />
-				</u-form-item>
-				<view class="big-title">
-					整改隐患 (处) :
-				</view>
-				<u-form-item label="用气部位未安装燃气泄漏报警器" prop="yqbwwazrqxlbjq" class="children-text">
-					<u-input v-model="formData.yqbwwazrqxlbjq" placeholder="请输入" :disabled="isview" />
-				</u-form-item>
-				<u-form-item label="使用醇基燃料" prop="sycjrl" class="children-text">
-					<u-input v-model="formData.sycjrl" placeholder="请输入" :disabled="isview" />
-				</u-form-item>
-				<u-form-item label="用气部位不能通风换气" prop="yqbwbntfhq" class="children-text">
-					<u-input v-model="formData.yqbwbntfhq" placeholder="请输入" :disabled="isview" />
-				</u-form-item>
-				<u-form-item label="同一空间使用双气源" prop="tykjsysqy" class="children-text">
-					<u-input v-model="formData.tykjsysqy" placeholder="请输入" :disabled="isview" />
-				</u-form-item>
-				<u-form-item label="热水器烟道未有效伸出室外" prop="rsqydwyxscsw" class="children-text">
-					<u-input v-model="formData.rsqydwyxscsw" placeholder="请输入" :disabled="isview" />
-				</u-form-item>
-				<u-form-item label="软管超长、分管、泄露、穿越墙体或吊顶" prop="rgczfgxlcyqthdd" class="children-text">
-					<u-input v-model="formData.rgczfgxlcyqthdd" placeholder="请输入" :disabled="isview" />
-				</u-form-item>
-				<u-form-item label="燃气具未带熄火保护装置" prop="rqjwdxhbhzz" class="children-text">
-					<u-input v-model="formData.rqjwdxhbhzz" placeholder="请输入" :disabled="isview" />
-				</u-form-item>
-				<u-form-item label="地下室或高层民用建筑内存储、使用瓶装液化石油气" prop="dxshgcmyjznccsypzyhsyq" class="children-text">
-					<u-input v-model="formData.dxshgcmyjznccsypzyhsyq" placeholder="请输入" :disabled="isview" />
-				</u-form-item>
-				<picker mode="date" :value="dateTime" @change="bindDateChange" :disabled="isview">
-					<view class="datatime-street">
-						<u-form-item label="填报日期" prop="reporttime" :required="true">
-							<u-input v-model="formData.reporttime" placeholder="选择日期" class="add-date" :disabled="isview" />
-						</u-form-item>
+			<u--form ref="customForm" :model="formData" labelPosition="left" labelWidth="100%" labelAlign="left">
+				<view class="juli-bottom">
+					<u-form-item label="检查单位或场所 (家)" prop="jcdwhcs">
+						<u-input v-model="formData.jcdwhcs" placeholder="请输入" :disabled="isview" />
+					</u-form-item>
+					<view class="big-title">
+						整改隐患 (处) :
 					</view>
-				</picker>
-				<view>
-					<view class="paizhao">现场照片:</view>
-					<view  class="paizhao-posit" v-if="!isview">
-						<image :src="photograph" @click="photoUpload" class="tiantupian-photo"></image>
-						<view>
-							拍照上传
+					<u-form-item label="用气部位未安装燃气泄漏报警器" prop="yqbwwazrqxlbjq" class="children-text">
+						<u-input v-model="formData.yqbwwazrqxlbjq" placeholder="请输入" :disabled="isview" />
+					</u-form-item>
+					<u-form-item label="使用醇基燃料" prop="sycjrl" class="children-text">
+						<u-input v-model="formData.sycjrl" placeholder="请输入" :disabled="isview" />
+					</u-form-item>
+					<u-form-item label="用气部位不能通风换气" prop="yqbwbntfhq" class="children-text">
+						<u-input v-model="formData.yqbwbntfhq" placeholder="请输入" :disabled="isview" />
+					</u-form-item>
+					<u-form-item label="同一空间使用双气源" prop="tykjsysqy" class="children-text">
+						<u-input v-model="formData.tykjsysqy" placeholder="请输入" :disabled="isview" />
+					</u-form-item>
+					<u-form-item label="热水器烟道未有效伸出室外" prop="rsqydwyxscsw" class="children-text">
+						<u-input v-model="formData.rsqydwyxscsw" placeholder="请输入" :disabled="isview" />
+					</u-form-item>
+					<u-form-item label="软管超长、分管、泄露、穿越墙体或吊顶" prop="rgczfgxlcyqthdd" class="children-text">
+						<u-input v-model="formData.rgczfgxlcyqthdd" placeholder="请输入" :disabled="isview" />
+					</u-form-item>
+					<u-form-item label="燃气具未带熄火保护装置" prop="rqjwdxhbhzz" class="children-text">
+						<u-input v-model="formData.rqjwdxhbhzz" placeholder="请输入" :disabled="isview" />
+					</u-form-item>
+					<u-form-item label="地下室或高层民用建筑内存储、使用瓶装液化石油气" prop="dxshgcmyjznccsypzyhsyq" class="children-text">
+						<u-input v-model="formData.dxshgcmyjznccsypzyhsyq" placeholder="请输入" :disabled="isview" />
+					</u-form-item>
+					<picker mode="date" :value="dateTime" @change="bindDateChange" :disabled="isview">
+						<view class="datatime-street">
+							<u-form-item label="填报日期" prop="reporttime" :required="true">
+								<u-input v-model="formData.reporttime" placeholder="选择日期" class="add-date"
+									:disabled="isview" />
+							</u-form-item>
 						</view>
-					</view>
-				</view>
-				<view v-if="formData.streetRepPicsDOList" class="show-photo">
-					<view v-for="(items,indexs) in formData.streetRepPicsDOList" :key="indexs">
-						<view class="show-photo-main">
-							<view class="show-photo-main-img">
-								<image :src="items.url" class="show-photo-main-img-item">
-									<u-icon name="close" color="#4CB2B6" size="19" @click="closeImage(items,indexs)"  v-if="!isview">
-									</u-icon>
+					</picker>
+					<view>
+						<view class="paizhao">现场照片:</view>
+						<view class="paizhao-posit" v-if="!isview">
+							<image :src="photograph" @click="photoUpload" class="tiantupian-photo"></image>
+							<view>
+								拍照上传
 							</view>
-							<view class="">
-								<view>
-									图片名称
+							<uni-load-more v-show="loading" status="loading" :content-text="contentText" />
+						</view>
+					</view>
+					<view v-if="formData.streetRepPicsDOList" class="show-photo">
+						<view v-for="(items,indexs) in formData.streetRepPicsDOList" :key="indexs">
+							<view class="show-photo-main">
+								<view class="show-photo-main-img">
+									<image :src="items.url" class="show-photo-main-img-item">
+										<u-icon name="close" color="#4CB2B6" size="19" @click="closeImage(items,indexs)"
+											v-if="!isview">
+										</u-icon>
 								</view>
-								<view class="img-name-street">
-									<u-input v-model="items.feildname" placeholder="请输入图片名称"  :disabled="isview"/>
+								<view class="">
+									<view>
+										图片名称
+									</view>
+									<view class="img-name-street">
+										<u-input v-model="items.feildname" placeholder="请输入图片名称" :disabled="isview" />
+									</view>
 								</view>
 							</view>
 						</view>
-					</view>
 
+					</view>
 				</view>
-			</view>
-		</u--form>
-	</view>
-	<view class="sub-botn heigthButton">
-		<u-button v-if="isedit" @click="submit('customForm')" type="primary" shape="circle" size="large"
-			color="#4CB2B6" text="确认修改" style="width:200px">
-		</u-button>
-		<u-button v-else-if="!formData.id" @click="submit('customForm')" type="primary" shape="circle"
-			size="large" color="#4CB2B6" text="确认新增" style="width:200px">
-		</u-button>
-		<u-button v-else-if="isview" @click="submit('customForm')" type="primary" shape="circle" size="large"
-			color="#4CB2B6" text="返回" style="width:200px">
-		</u-button>
-	</view>
+			</u--form>
+		</view>
+		<view class="sub-botn heigthButton">
+			<u-button v-if="isedit" @click="submit('customForm')" type="primary" shape="circle" size="large"
+				color="#4CB2B6" text="确认修改" style="width:200px">
+			</u-button>
+			<u-button v-else-if="!formData.id" @click="submit('customForm')" type="primary" shape="circle" size="large"
+				color="#4CB2B6" text="确认新增" style="width:200px">
+			</u-button>
+			<u-button v-else-if="isview" @click="submit('customForm')" type="primary" shape="circle" size="large"
+				color="#4CB2B6" text="返回" style="width:200px">
+			</u-button>
+		</view>
 	</view>
 </template>
 
@@ -97,38 +100,41 @@
 		takePhotos,
 		NumericRule
 	} from '@/utils/common.js';
-		import config from '@/config'
-		const baseUrlImg = config.baseUrlImg
+	import config from '@/config'
+	const baseUrlImg = config.baseUrlImg
 	export default {
 		data() {
 			return {
+				contentText: {
+					contentrefresh: '上传照片中',
+				},
 				screenHeight: this.$screenHeight,
 				wheight: '',
 				photograph: `${baseUrlImg}/checkActive/photograph.png`,
 				dateTime: '',
 				formData: {
-					jcdwhcs:'',
-					yqbwwazrqxlbjq:'',
-					sycjrl:'',
-					yqbwbntfhq:'',
-					tykjsysqy:'',
-					rsqydwyxscsw:'',
-					rgczfgxlcyqthdd:'',
-					rqjwdxhbhzz:'',
-					dxshgcmyjznccsypzyhsyq:'',
+					jcdwhcs: '',
+					yqbwwazrqxlbjq: '',
+					sycjrl: '',
+					yqbwbntfhq: '',
+					tykjsysqy: '',
+					rsqydwyxscsw: '',
+					rgczfgxlcyqthdd: '',
+					rqjwdxhbhzz: '',
+					dxshgcmyjznccsypzyhsyq: '',
 					reporttime: '',
 					streetRepPicsDOList: []
 				},
 				rules: {
-					jcdwhcs:NumericRule(),
-					yqbwwazrqxlbjq:NumericRule(),
-					sycjrl:NumericRule(),
-					yqbwbntfhq:NumericRule(),
-					tykjsysqy:NumericRule(),
-					rsqydwyxscsw:NumericRule(),
-					rgczfgxlcyqthdd:NumericRule(),
-					rqjwdxhbhzz:NumericRule(),
-					dxshgcmyjznccsypzyhsyq:NumericRule(),
+					jcdwhcs: NumericRule(),
+					yqbwwazrqxlbjq: NumericRule(),
+					sycjrl: NumericRule(),
+					yqbwbntfhq: NumericRule(),
+					tykjsysqy: NumericRule(),
+					rsqydwyxscsw: NumericRule(),
+					rgczfgxlcyqthdd: NumericRule(),
+					rqjwdxhbhzz: NumericRule(),
+					dxshgcmyjznccsypzyhsyq: NumericRule(),
 					reporttime: [{
 						required: true,
 						message: '请输入日期',
@@ -137,6 +143,7 @@
 				},
 				isedit: false, //编辑
 				isview: false, //查看
+				loading: false
 			}
 		},
 		onReady() {
@@ -150,27 +157,29 @@
 		onLoad(option) {
 			if (option.editData) {
 				this.isedit = true
-				this.parentId=option.editData
+				this.parentId = option.editData
 				this.getIdData()
 				// this.formData = JSON.parse(option.editData)
 			} else if (option.viewData) {
 				this.isview = true
-				this.parentId=option.viewData
+				this.parentId = option.viewData
 				this.getIdData()
 				// this.formData = JSON.parse(option.viewData)
 			}
-			
+
 		},
 		methods: {
-			
-			getIdData(){
-				getIdQypczl({id:this.parentId}).then(response=>{
-					this.formData=response.data
-					console.log(response,'response')
+
+			getIdData() {
+				getIdQypczl({
+					id: this.parentId
+				}).then(response => {
+					this.formData = response.data
+					console.log(response, 'response')
 				})
 			},
 			//拍照
-			closeImage(val,index){
+			closeImage(val, index) {
 				this.formData.streetRepPicsDOList.splice(index, 1)
 			},
 			photoUpload() {
@@ -196,8 +205,8 @@
 						if (!item.feildname) {
 							item.feildname = '默认名称';
 						}
-						if(this.isedit&&!item.repid){
-							item.repid=this.parentId
+						if (this.isedit && !item.repid) {
+							item.repid = this.parentId
 						}
 					});
 					console.log(formList, 'this.formData');
@@ -249,8 +258,8 @@
 		box-shadow: 0px 0px 3px 0px rgba(86, 165, 168, 0.15);
 		border-radius: 30rpx;
 	}
-	.example{
+
+	.example {
 		overflow-y: auto;
 	}
-</style>
-
+</style>

+ 7 - 2
pagesA/fire/fire_inspetItem/add-street/streetTsrqbf.vue

@@ -60,6 +60,7 @@
 							<view>
 								拍照上传
 							</view>
+							<uni-load-more v-show="loading" status="loading" :content-text="contentText" />
 						</view>
 					</view>
 					<view v-if="formData.streetRepPicsDOList" class="show-photo">
@@ -116,6 +117,9 @@
 	export default {
 		data() {
 			return {
+				contentText: {
+					contentrefresh: '上传照片中',
+				},
 				screenHeight: this.$screenHeight,
 				wheight: '',
 				photograph: `${baseUrlImg}/checkActive/photograph.png`,
@@ -161,6 +165,7 @@
 				},
 				isedit: false, //编辑
 				isview: false, //查看
+				loading: false
 			}
 		},
 		onReady() {
@@ -221,8 +226,8 @@
 						if (!item.feildname) {
 							item.feildname = '默认名称';
 						}
-						if(this.isedit&&!item.repid){
-							item.repid=this.parentId
+						if (this.isedit && !item.repid) {
+							item.repid = this.parentId
 						}
 					});
 					console.log(formList, 'this.formData');

+ 8 - 3
pagesA/fire/fire_inspetItem/add-street/streetXfsssbpczl.vue

@@ -183,6 +183,7 @@
 							<view class="">
 								拍照上传
 							</view>
+							<uni-load-more v-show="loading" status="loading" :content-text="contentText" />
 						</view>
 					</view>
 					<view v-if="formData.streetRepPicsDOList" class="show-photo">
@@ -238,6 +239,9 @@
 	export default {
 		data() {
 			return {
+				contentText: {
+					contentrefresh: '上传照片中',
+				},
 				screenHeight: this.$screenHeight,
 				wheight: '',
 				photograph: `${baseUrlImg}/checkActive/photograph.png`,
@@ -293,6 +297,7 @@
 				},
 				isedit: false, //编辑
 				isview: false, //查看
+				loading: false
 			}
 		},
 		onReady() {
@@ -355,11 +360,11 @@
 						if (!item.feildname) {
 							item.feildname = '默认名称';
 						}
-						if(this.isedit&&!item.repid){
-							item.repid=this.parentId
+						if (this.isedit && !item.repid) {
+							item.repid = this.parentId
 						}
 					});
-					if (this.isedit) {	
+					if (this.isedit) {
 						updateXfsssbpczl(JSON.stringify(this.formData)).then(res => {
 							this.$modal.msg('修改成功')
 							this.isedit = false

+ 7 - 2
pagesA/fire/fire_inspetItem/add-street/streetXftdpczl.vue

@@ -36,6 +36,7 @@
 							<view class="">
 								拍照上传
 							</view>
+							<uni-load-more v-show="loading" status="loading" :content-text="contentText" />
 						</view>
 					</view>
 					<view v-if="formData.streetRepPicsDOList" class="show-photo">
@@ -91,6 +92,9 @@
 	export default {
 		data() {
 			return {
+				contentText: {
+					contentrefresh: '上传照片中',
+				},
 				screenHeight: this.$screenHeight,
 				wheight: '',
 				photograph: `${baseUrlImg}/checkActive/photograph.png`,
@@ -120,6 +124,7 @@
 				},
 				isedit: false, //编辑
 				isview: false, //查看
+				loading: false
 			}
 		},
 		onReady() {
@@ -180,8 +185,8 @@
 						if (!item.feildname) {
 							item.feildname = '默认名称';
 						}
-						if(this.isedit&&!item.repid){
-							item.repid=this.parentId
+						if (this.isedit && !item.repid) {
+							item.repid = this.parentId
 						}
 					});
 					console.log(formList, 'this.formData');

+ 7 - 2
pagesA/fire/fire_inspetItem/add-street/streetXfxcjypxyl.vue

@@ -42,6 +42,7 @@
 							<view class="">
 								拍照上传
 							</view>
+							<uni-load-more v-show="loading" status="loading" :content-text="contentText" />
 						</view>
 					</view>
 					<view v-if="formData.streetRepPicsDOList" class="show-photo">
@@ -98,6 +99,9 @@
 	export default {
 		data() {
 			return {
+				contentText: {
+					contentrefresh: '上传照片中',
+				},
 				screenHeight: this.$screenHeight,
 				wheight: '',
 				photograph: `${baseUrlImg}/checkActive/photograph.png`,
@@ -131,6 +135,7 @@
 				},
 				isedit: false, //编辑
 				isview: false, //查看
+				loading: false
 			}
 		},
 		onReady() {
@@ -192,8 +197,8 @@
 						if (!item.feildname) {
 							item.feildname = '默认名称';
 						}
-						if(this.isedit&&!item.repid){
-							item.repid=this.parentId
+						if (this.isedit && !item.repid) {
+							item.repid = this.parentId
 						}
 					});
 					console.log(formList, 'this.formData');

+ 9 - 7
pagesA/fire/fire_station/add_fireStation/add_fireStation.vue

@@ -186,14 +186,16 @@
 		onShow() {
 			let empList = localStorage.getItem('empList')
 			empList = JSON.parse(empList)
-			let pack = {
-				duty: empList[0].power,
-				empName: empList[0].name,
-				mobile: empList[0].phone,
-				idcardno: empList[0].userNum
+			console.log(empList,'emplddddddd');
+			if(empList&&empList.length!=0){
+				let pack = {
+					duty: empList[0].power,
+					empName: empList[0].name,
+					mobile: empList[0].phone,
+					idcardno: empList[0].userNum
+				}
+				this.newEmpList = pack
 			}
-			this.newEmpList = pack
-			console.log(pack, 'pack');
 		},
 		methods: {
 			submit(ref) {

+ 6 - 0
static/scss/global.scss

@@ -29,6 +29,12 @@
 	font-size: 18px;
 	vertical-align: middle;
 }
+	
+/deep/.uni-load-more{
+	margin-top: 10px;
+    align-items: flex-start !important;
+    justify-content: flex-start !important;
+}
 //卡片前面位置对齐每日巡查
 .name-align-daily,.name-align-task,.name-align-building{
 	display: inline-block;

+ 2 - 0
utils/auth.js

@@ -5,10 +5,12 @@ const RefreshTokenKey = 'REFRESH_TOKEN'
 
 export function getAccessToken() {
   return uni.getStorageSync(AccessTokenKey)
+   // return uni.getStorageSync(RefreshTokenKey)
 }
 
 export function getRefreshToken() {
   return uni.getStorageSync(RefreshTokenKey)
+   // return uni.getStorageSync(AccessTokenKey)
 }
 
 export function setToken(token) {

+ 93 - 72
utils/request.js

@@ -1,81 +1,102 @@
 import store from '@/store'
 import config from '@/config'
-import { getAccessToken } from '@/utils/auth'
+import {
+	getAccessToken,
+	getRefreshToken,
+	setToken
+} from '@/utils/auth'
+import {
+	refreshToken
+} from '@/api/login'
 import errorCode from '@/utils/errorCode'
-import { toast, showConfirm, tansParams } from '@/utils/common'
+import {
+	toast,
+	showConfirm,
+	tansParams
+} from '@/utils/common'
 
 let timeout = 10000
 const baseUrl = config.baseUrl + config.baseApi;
 
-const request = config => { 
-  // 是否需要设置 token
-  const isToken = (config.headers || {}).isToken === false
-  config.header = config.header || {}
-  if (getAccessToken() && !isToken) {
-    config.header['Authorization'] = 'Bearer ' + getAccessToken()
-  }
-  // 设置租户 TODO 芋艿:强制 1 先
-  config.header['tenant-id'] = '1';
-  // get请求映射params参数
-  if (config.params) {
-    let url = config.url + '?' + tansParams(config.params)
-    url = url.slice(0, -1)
-    config.url = url
-  }
-  return new Promise((resolve, reject) => {
-    uni.request({
-        method: config.method || 'get',
-        timeout: config.timeout ||  timeout,
-        url: config.baseUrl || baseUrl + config.url, 
-        data: config.data,
-        // header: config.header,
-        header: config.header,
-        dataType: 'json'
-      }).then(response => {
-        let [error, res] = response
-        if (error) {
-          toast('后端接口连接异常')
-          reject('后端接口连接异常')
-          return
-        }
-        const code = res.data.code || 200
-        const msg = errorCode[code] || res.data.msg || errorCode['default']
-        if (code === 401) {
-          showConfirm('登录状态已过期,您可以继续留在该页面,或者重新登录?').then(res => {
-            if (res.confirm) {
-							uni.navigateTo({
-								url:'/pages/login'
-							})
-							
-              // store.dispatch('LogOut').then(res => {
-                // uni.reLaunch({ url: '/pages/login' })
-              // })
-						
-            }
-          })
-          reject('无效的会话,或者会话已过期,请重新登录。')
-        } else if (code === 500) {
-          toast(msg)
-          reject('500')
-        } else if (code !== 200) {
-          toast(msg)
-          reject(code)
-        }
-        resolve(res.data)
-      })
-      .catch(error => {
-        let { message } = error
-        if (message === 'Network Error') {
-          message = '后端接口连接异常'
-        } else if (message.includes('timeout')) {
-          message = '系统接口请求超时'
-        } else if (message.includes('Request failed with status code')) {
-          message = '系统接口' + message.substr(message.length - 3) + '异常'
-        }
-        toast(message) 
-        reject(error)
-      })
-  })
+
+
+const request = config => {
+
+	// 是否需要设置 token
+	const isToken = (config.headers || {}).isToken === false
+	config.header = config.header || {}
+	if (getAccessToken() && !isToken) {
+		config.header['Authorization'] = 'Bearer ' + getAccessToken()
+	}
+	// 设置租户 TODO 芋艿:强制 1 先
+	config.header['tenant-id'] = '1';
+	// get请求映射params参数
+	if (config.params) {
+		let url = config.url + '?' + tansParams(config.params)
+		url = url.slice(0, -1)
+		config.url = url
+	}
+	return new Promise((resolve, reject) => {
+		uni.request({
+				method: config.method || 'get',
+				timeout: config.timeout || timeout,
+				url: config.baseUrl || baseUrl + config.url,
+				data: config.data,
+				// header: config.header,
+				header: config.header,
+				dataType: 'json'
+			}).then(response => {
+				let [error, res] = response
+				if (error) {
+					toast('后端接口连接异常')
+					reject('后端接口连接异常')
+					return
+				}
+				const code = res.data.code || 200
+				const msg = errorCode[code] || res.data.msg || errorCode['default']
+				if (code === 401) {
+					// 判断是否已经刷新过 token
+					refreshToken({
+							refreshToken: getRefreshToken()
+						})
+						.then((res) => {
+							setToken(res.data)
+							config.header['Authorization'] = 'Bearer ' + res.data.accessToken
+						})
+						.catch(() => {
+							showConfirm('登录状态已过期,您可以继续留在该页面,或者重新登录?').then(res => {
+								if (res.confirm) {
+									uni.navigateTo({
+										url: '/pages/login'
+									})
+								}
+							});
+							reject('无效的会话,或者会话已过期,请重新登录。');
+						})
+				} else if (code === 500) {
+					toast(msg)
+					reject('500')
+				} else if (code !== 200) {
+					toast(msg)
+					reject(code)
+				}
+				resolve(res.data)
+			})
+			.catch(error => {
+				let {
+					message
+				} = error
+				if (message === 'Network Error') {
+					message = '后端接口连接异常'
+				} else if (message.includes('timeout')) {
+					message = '系统接口请求超时'
+				} else if (message.includes('Request failed with status code')) {
+					message = '系统接口' + message.substr(message.length - 3) + '异常'
+				}
+				toast(message)
+				reject(error)
+			})
+	})
 }
 
-export default request
+export default request