Browse Source

2023-12-6

dzl 1 year ago
parent
commit
2dc904428f

+ 2 - 1
App.vue

@@ -6,7 +6,8 @@
 			peoList:[],
 			peoIdList:[],
 			gdId:null,
-			saveUrl:"http://192.168.1.59:8080"
+			saveUrl:"http://121.28.24.104:13898/app/files/",
+			updateUrl:"http://121.28.24.104:13898/app/"
 		},
 		onLaunch: function() {
 			console.warn('当前组件仅支持 uni_modules 目录结构 ,请升级 HBuilderX 到 3.1.0 版本以上!')

+ 1 - 1
manifest.json

@@ -1,5 +1,5 @@
 {
-    "name" : "wjw-app",
+    "name" : "协同办公",
     "appid" : "__UNI__EEB5AF5",
     "description" : "",
     "versionName" : "1.0.0",

+ 78 - 32
pages/dailyWork/dailyWork.vue

@@ -4,7 +4,7 @@
 			<swiper style="height: 100%;background-color:#F3F4F6 ;" :current="current" disable-touch
 				@animationfinish="animationfinish">
 				<swiper-item >
-					<scroll-view scroll-y style="width: 100%;height: 100%;overflow: auto;box-sizing: border-box;" lower-threshold="0" :refresher-enabled="xlList1[0]" :refresher-triggered="xlList2[0]" @scrolltolower="lower(0)" @refresherrefresh="refresherrefresh(0)" @refresherrestore="refresherrestore(0)">
+					<scroll-view scroll-y style="width: 100%;height: 100%;overflow: auto;box-sizing: border-box;" lower-threshold="10" :refresher-enabled="xlList1[0]" :refresher-triggered="xlList2[0]" @scrolltolower="lower(0)" @refresherrefresh="refresherrefresh(0)" @refresherrestore="refresherrestore(0)">
 						<view style="padding: 20rpx;background-color: #fff;">
 							<u-search v-model="db.title" placeholder="请输入标题" :showAction="true" actionText="搜索"
 								:animation="true" @custom="dbsearch" @clear="dbsearch">
@@ -28,8 +28,8 @@
 						</div>
 					</scroll-view>
 				</swiper-item>
-				<swiper-item >
-					<scroll-view scroll-y style="width: 100%;height: 100%;overflow: auto;box-sizing: border-box;" lower-threshold="0" :refresher-enabled="xlList1[1]" :refresher-triggered="xlList2[1]" @scrolltolower="lower(1)" @refresherrefresh="refresherrefresh(1)" @refresherrestore="refresherrestore(1)">
+				<!-- <swiper-item >
+					<scroll-view scroll-y style="width: 100%;height: 100%;overflow: auto;box-sizing: border-box;" lower-threshold="10" :refresher-enabled="xlList1[1]" :refresher-triggered="xlList2[1]" @scrolltolower="lower(1)" @refresherrefresh="refresherrefresh(1)" @refresherrestore="refresherrestore(1)">
 						<view style="padding: 20rpx;background-color: #fff;">
 							<u-search v-model="yb.title" placeholder="请输入标题" :showAction="true" actionText="搜索"
 								:animation="true" @custom="ybsearch" @clear="ybsearch">
@@ -52,12 +52,12 @@
 							<u-empty mode="list" icon="/static/list.png" text="暂无内容" textSize="30rpx"></u-empty>
 						</div>
 					</scroll-view>
-				</swiper-item>
-				<!-- <swiper-item >
+				</swiper-item> -->
+				<swiper-item >
 					<scroll-view scroll-y style="width: 100%;height: 100%;overflow: auto;box-sizing: border-box;" lower-threshold="0" :refresher-enabled="xlList1[1]" :refresher-triggered="xlList2[1]" @scrolltolower="lower(1)" @refresherrefresh="refresherrefresh(1)" @refresherrestore="refresherrestore(1)">
 						<view style="padding: 20rpx;background-color: #fff;">
-							<u-search v-model="yb.title" placeholder="请输入标题" :showAction="true" actionText="搜索"
-								:animation="true" @custom="ybsearch" @clear="ybsearch">
+							<u-search v-model="sq.title" placeholder="请输入标题" :showAction="true" actionText="搜索"
+								:animation="true" @custom="sqsearch" @clear="sqsearch">
 						
 							</u-search>
 						</view>
@@ -70,12 +70,15 @@
 								<view>{{showtime(item.RDT)}}</view>
 							</view>
 						</view>
-						<div style="padding: 10rpx 0;" v-if="statusList[1] == 'loading' || statusList[1] =='nomore'">
+						<div style="padding: 10rpx 0;" v-if="sqList.length > 0">
 							<u-loadmore :status="statusList[1]" />
 						</div>
+						<div v-if="sqList.length == 0">
+							<u-empty mode="list" icon="/static/list.png" text="暂无内容" textSize="30rpx"></u-empty>
+						</div>
 					</scroll-view>
-				</swiper-item> -->
-				<!-- <swiper-item >
+				</swiper-item>
+				<swiper-item >
 					<scroll-view scroll-y style="width: 100%;height: 100%;overflow: auto;box-sizing: border-box;" lower-threshold="0" :refresher-enabled="xlList1[2]" :refresher-triggered="xlList2[2]" @scrolltolower="lower(2)" @refresherrefresh="refresherrefresh(2)" @refresherrestore="refresherrestore(2)">
 						<view style="padding: 20rpx;background-color: #fff;">
 							<u-search v-model="yb.title" placeholder="请输入标题" :showAction="true" actionText="搜索"
@@ -92,23 +95,26 @@
 								<view>{{showtime(item.RDT)}}</view>
 							</view>
 						</view>
-						<div style="padding: 10rpx 0;" v-if="statusList[2] == 'loading' || statusList[2] =='nomore'">
+						<div style="padding: 10rpx 0;" v-if="ybList.length > 0">
 							<u-loadmore :status="statusList[2]" />
 						</div>
+						<div v-if="ybList.length == 0">
+							<u-empty mode="list" icon="/static/list.png" text="暂无内容" textSize="30rpx"></u-empty>
+						</div>
 					</scroll-view>
-				</swiper-item> -->
+				</swiper-item>
 			</swiper>
 		</view>
 		<view style="height: 100rpx;border-top: 2px solid #dadbde;box-sizing: border-box;">
-			<u-grid :border="true" col="2">
+			<u-grid :border="true" col="3">
 				<u-grid-item @click="click(0)">
 					<text class="grid-text" :class="current==0?'choose':''">待办</text>
 				</u-grid-item>
-				<!-- <u-grid-item @click="click(1)">
-					<text class="grid-text" :class="current==1?'choose':''">我申请的</text>
-				</u-grid-item> -->
 				<u-grid-item @click="click(1)">
-					<text class="grid-text" :class="current==1?'choose':''">已办</text>
+					<text class="grid-text" :class="current==1?'choose':''">我申请的</text>
+				</u-grid-item>
+				<u-grid-item @click="click(2)">
+					<text class="grid-text" :class="current==2?'choose':''">已办</text>
 				</u-grid-item>
 			</u-grid>
 		</view>
@@ -163,7 +169,6 @@
 				sqList:[],
 				sqSearch:null,
 				sqTotal:0,
-				
 			}
 		},
 		onLoad(options){
@@ -179,10 +184,6 @@
 			uni.$off()
 			uni.$on('query', (query) => {	
 				if(query.a=='back'){
-					// uni.showLoading({
-					// 	title:'加载中...',
-					// 	mask:true
-					// })
 					setTimeout(()=>{
 						this.db.pageNum = 1
 						this.dbList = []
@@ -198,21 +199,27 @@
 		methods: {
 			//点击已办待办
 			click(i){
-				this.current = i
 				if(i==0){
-					this.xlList1[0] = true
-					this.xlList1[1] = false
+					this.xlList1[i] = true
+					this.xlList1[this.current] = false
+					this.current = i
 					if(this.dbList.length == 0){
 						this.getDbList()
 					}
 				}else if(i==1){
-					this.xlList1[0] = false
-					this.xlList1[1] = true
+					this.xlList1[i] = true
+					this.xlList1[this.current] = false
+					this.current = i
+					if(this.sqList.length == 0){
+						this.getSqList()
+					}
+				}else if(i==2){
+					this.xlList1[i] = true
+					this.xlList1[this.current] = false
+					this.current = i
 					if(this.ybList.length == 0){
 						this.getYbList()
 					}
-				}else if(i==2){
-					
 				}
 			},
 			//swiper切换
@@ -241,12 +248,27 @@
 					uni.hideLoading()
 					this.ybList = [...this.ybList,...res.list]	
 					if(res.total<=this.yb.pageSize){
+						this.statusList[2] = "nomore"
+					}else{
+						this.statusList[2] = "loadmore"
+					}
+					this.$forceUpdate()
+					this.ybTotal = Math.ceil(res.total / this.yb.pageSize)
+				})
+			},
+			//查询我申请的列表
+			getSqList(){
+				uni.$u.http.get('/jflow/restful/DB_MyStartFlowInstanceByFlow',{params:this.sq}).then(res=>{
+					// console.log(res)
+					uni.hideLoading()
+					this.sqList = [...this.sqList,...res.list]	
+					if(res.total<=this.sq.pageSize){
 						this.statusList[1] = "nomore"
 					}else{
 						this.statusList[1] = "loadmore"
 					}
 					this.$forceUpdate()
-					this.ybTotal = Math.ceil(res.total / this.yb.pageSize)
+					this.sqTotal = Math.ceil(res.total / this.sq.pageSize)
 				})
 			},
 			//触底加载
@@ -263,7 +285,16 @@
 						this.statusList[e] = "nomore"
 						this.$forceUpdate()
 					}
-				}else{
+				}else if(e==1){
+					if(this.sq.pageNum != this.sqTotal){
+						this.sq.pageNum++
+						this.getSqList()
+					}else{
+						uni.hideLoading()
+						this.statusList[e] = "nomore"
+						this.$forceUpdate()
+					}
+				}else if(e==2){
 					if(this.yb.pageNum != this.ybTotal){
 						this.yb.pageNum++
 						this.getYbList()
@@ -286,7 +317,16 @@
 						this.xlList2[e] = false
 						this.$forceUpdate()
 					},2000)
-				}else{
+				}else if(e==1){
+					this.xlList2[e] = true
+					this.sq.pageNum = 1
+					this.sqList = []
+					this.getSqList()
+					setTimeout(()=>{
+						this.xlList2[e] = false
+						this.$forceUpdate()
+					},2000)
+				}else if(e==2){
 					this.xlList2[e] = true
 					this.yb.pageNum = 1
 					this.ybList = []
@@ -312,6 +352,12 @@
 				this.ybList = []
 				this.getYbList()
 			},
+			//申请搜索
+			sqsearch(){
+				this.sq.pageNum = 1
+				this.sqList = []
+				this.getSqList()
+			},
 			//查看收文发文详情
 			getinfo(item){
 				uni.navigateTo({

+ 3 - 3
pages/email/email.vue

@@ -117,8 +117,8 @@
 			getUnreadEmail() {
 				uni.$u.http.get('/oa/mail/count/unread').then(res => {
 					if (res == 0) {
-						uni.removeTabBarBadge({
-							index: 2
+						uni.removeTabBarBadge({ //显示数字
+							index: 2, //tabbar下标
 						})
 					} else {
 						this.model.pageNum = 1
@@ -150,7 +150,7 @@
 								}
 							}
 						} else {
-							uni.setTabBarBadge({ //显示数字
+							uni.removeTabBarBadge({ //显示数字
 								index: 1, //tabbar下标
 							})
 						}

+ 9 - 7
pages/emailInfo/emailInfo.vue

@@ -16,16 +16,13 @@
 		<view>
 			<u-parse :content="content.mailContent"></u-parse>
 		</view>
-		<view style="border-radius: 8rpx;background-color: #f3f3f3;margin-top: 40rpx;padding: 20rpx 40rpx;" v-if="content.files != null">
+		<view style="border-radius: 8rpx;background-color: #f3f3f3;margin-top: 40rpx;padding: 20rpx 40rpx;" v-if="content.files != null && content.files.length != 0">
 			<view style="display: flex;align-items: center;margin-bottom: 20rpx;f">
 				<u-icon name="file-text-fill" color="#000"></u-icon>
 				附件
 			</view>
 			<view style="margin-bottom: 30rpx;" v-for="v in content.files" :key="v.fileId">
-				<!-- <u--text :lines="1" mode="link" size="50" :text="v.name" :href="v.url" ></u--text> -->
-				<u--text :lines="1" size="18" color="#2979FF" decoration="underline" :text="v.name" @click="downLoad(v.url)"></u--text>
-				
-				<!-- <a :href="v.url">{{v.name}}</a> -->
+				<u--text :lines="1" size="18" color="#2979FF" decoration="underline" :text="v.name" @click="downLoad(v.path)"></u--text>
 			</view>
 		</view>
 	</view>
@@ -69,11 +66,10 @@
 				let that = this
 				uni.showLoading({
 					title:"打开中...",
-					mask:true
 				})
 				if(that.list1.indexOf(v) == -1){
 					uni.downloadFile({
-					  url:v,
+					  url:getApp().globalData.saveUrl+ v,
 					  success: function(res) {
 					    if (res.statusCode === 200) {
 							that.list1.push(v)
@@ -85,6 +81,12 @@
 							}
 					      });
 					    }
+					  },fail:function(){
+						  uni.hideLoading()
+						  uni.showToast({
+						  	title:"下载失败",
+							icon:'none'
+						  })
 					  }
 					});
 				}else{

+ 8 - 3
pages/fwMessage/fwMessage.vue

@@ -50,7 +50,7 @@
 						<u-form-item label="正文查看:" borderBottom ref="item1">
 							<view>
 								<!-- <u--text mode="link" :text="content.sendFile.name" :href="content.sendFile.url"></u--text> -->
-								<u--text size="30rpx" color="#2979FF" :text="content.sendFile.name" @click="downLoad(content.sendFile.url)"></u--text>
+								<u--text size="30rpx" color="#2979FF" :text="content.sendFile.name" @click="downLoad(content.sendFile.path)"></u--text>
 							</view>
 						</u-form-item>
 						<view v-if="type==0">
@@ -583,11 +583,10 @@
 				let that = this
 				uni.showLoading({
 					title:"打开中...",
-					mask:true
 				})
 				if(that.list3.indexOf(v) == -1){
 					uni.downloadFile({
-					  url:v,
+					  url:getApp().globalData.saveUrl+v,
 					  success: function(res) {
 					    if (res.statusCode === 200) {
 							that.list3.push(v)
@@ -599,6 +598,12 @@
 							}
 					      });
 					    }
+					  },fail:function(){
+						  uni.hideLoading()
+						  uni.showToast({
+						  	title:"下载失败",
+							icon:'none'
+						  })
 					  }
 					});
 				}else{

+ 9 - 4
pages/index/index.vue

@@ -78,8 +78,8 @@
 			getUnreadEmail() {
 				uni.$u.http.get('/oa/mail/count/unread').then(res => {
 					if (res == 0) {
-						uni.removeTabBarBadge({
-							index: 2
+						uni.removeTabBarBadge({ //显示数字
+							index: 2, //tabbar下标
 						})
 					} else {
 						uni.setTabBarBadge({ //显示数字
@@ -191,6 +191,9 @@
 			getLbList(){
 				uni.$u.http.get('/oa/article/listHome?isCarousel=1&pageNum=1&pageSize=100').then(res=>{
 					this.lbList = res.rows
+					for(let i in res.rows){
+						this.lbList[i].imgUrl = getApp().globalData.saveUrl+res.rows[i].imgUrl.split('/public/')[1]
+					}
 				})
 			},
 			//查看轮播详细信息
@@ -237,7 +240,7 @@
 								}
 							}
 						} else {
-							uni.setTabBarBadge({ //显示数字
+							uni.removeTabBarBadge({ //显示数字
 								index: 1, //tabbar下标
 							})
 						}
@@ -254,6 +257,7 @@
 						mask:true
 					})
 					uni.$u.http.post('/app/version/advance/'+wgtinfo.versionCode).then(res => {
+						console.log(res)
 						if(res.code==200){
 							if(res.data != undefined){
 								uni.hideLoading()
@@ -261,8 +265,9 @@
 									title:"提示",
 									content:"有新版本是否进行更新",
 									success(qwe){
+										
 										if(qwe.confirm){
-											_this.upgradeApp(getApp().globalData.saveUrl+res.data.url)
+											_this.upgradeApp(getApp().globalData.updateUrl+res.data.url)
 										}
 									}
 								})

+ 40 - 7
pages/login/login.vue

@@ -13,10 +13,23 @@
 							prefixIconStyle="font-size: 54rpx;color: #409EFF"></u--input>
 					</u-form-item>
 					<u-form-item label="" prop="password" borderBottom ref="item1">
-						<u--input v-model="model.password" placeholder="请输入密码" type="password" border="none"
-							prefixIcon="lock-fill" prefixIconStyle="font-size: 54rpx;color: #409EFF"></u--input>
-						<!-- <u-icon name="eye-off" color="#909399" size="54rpx" @click="type = !type"></u-icon>-->
-						<!-- <u-icon :name="type==true?'eye-off':'eye-fill'" color="#909399" size="54rpx" @click="type = !type"></u-icon> -->
+						<view v-if="type==false">
+							<u--input v-model="model.password" placeholder="请输入密码" type="password" border="none" prefixIcon="lock-fill" prefixIconStyle="font-size: 54rpx;color: #409EFF"  @change="change"></u--input>
+							
+						</view>
+						<view v-if="type == true" style="width: 84%;">
+							<view style="display: flex;align-items: center;">
+								<u-icon name="lock-fill" color="#409EFF" size="54rpx"></u-icon>
+								<view style="">
+									{{model.qwe}}
+								</view>
+							</view>
+							<!-- <u--input v-model="model.qwe" placeholder="请输入密码" type="text" readonly border="none" prefixIcon="lock-fill" prefixIconStyle="font-size: 54rpx;color: #409EFF" ></u--input> -->
+						</view>
+						<view @longpress="longIn" @touchend="leave">
+							<u-icon name="eye-off" color="#909399" size="54rpx" v-if="type == false"></u-icon>
+							<u-icon name="eye-fill" color="#909399" size="54rpx" v-else></u-icon>
+						</view>
 					</u-form-item>
 				</u--form>
 			</view>
@@ -39,7 +52,8 @@
 			return {
 				model: {
 					username: "zxp",
-					password: "Wjw123.0"
+					password: "Wjw123.0",
+					qwe:"Wjw123.0"
 				},
 				//表单验证
 				rules: {
@@ -55,11 +69,15 @@
 					},
 				},
 				//密码可见
-				type: true
+				type: false
 			}
 		},
 		onLoad() {
-			
+			if(uni.getStorageSync('token') != '' && uni.getStorageSync('userInfo') != ''){
+				uni.reLaunch({
+					url:"/pages/index/index"
+				})
+			}
 		},
 		methods: {
 			//登陆按钮
@@ -102,6 +120,21 @@
 					})
 				})
 			},
+			//长按
+			longIn(){
+				this.type = true
+				this.$forceUpdate()
+			},
+			//离开长按
+			leave(){
+				if(this.type==true){
+					this.type = false
+					this.$forceUpdate()
+				}
+			},
+			change(){
+				this.model.qwe = this.model.password
+			}
 		},
 		onReady() {
 			//如果需要兼容微信小程序,并且校验规则中含有方法等,只能通过setRules方法设置规则。

+ 1 - 1
pages/me/me.vue

@@ -69,7 +69,7 @@
 										content:"有新版本是否进行更新",
 										success(qwe){
 											if(qwe.confirm){
-												_this.upgradeApp(getApp().globalData.saveUrl+res.data.url)
+												_this.upgradeApp(getApp().globalData.updateUrl+res.data.url)
 											}
 										}
 									})

+ 50 - 1
pages/newsContent/newsContent.vue

@@ -18,6 +18,15 @@
 		<view>
 			<u-parse :content="content.content"></u-parse>
 		</view>
+		<view style="border-radius: 8rpx;background-color: #f3f3f3;margin-top: 40rpx;padding: 20rpx 40rpx;" v-if="content.fjFiles != null && content.fjFiles.length != 0">
+			<view style="display: flex;align-items: center;margin-bottom: 20rpx;f">
+				<u-icon name="file-text-fill" color="#000"></u-icon>
+				附件
+			</view>
+			<view style="margin-bottom: 30rpx;" v-for="v in content.fjFiles" :key="v.fileId">
+				<u--text :lines="1" size="18" color="#2979FF" decoration="underline" :text="v.name" @click="downLoad(v.path)"></u--text>
+			</view>
+		</view>
 	</view>
 </template>
 
@@ -25,7 +34,9 @@
 	export default {
 		data() {
 			return {
-				content:null
+				content:null,
+				list1:[],
+				list2:[]
 			}
 		},
 		onLoad(options){
@@ -40,6 +51,44 @@
 						title: res.data.title
 					})
 				})
+			},
+			//下载附件
+			downLoad(v){
+				let that = this
+				uni.showLoading({
+					title:"打开中...",
+				})
+				if(that.list1.indexOf(v) == -1){
+					uni.downloadFile({
+					  url:getApp().globalData.saveUrl+v,
+					  success: function(res) {
+					    if (res.statusCode === 200) {
+							that.list1.push(v)
+							that.list2.push(res.tempFilePath)
+					      uni.openDocument({
+					        filePath: res.tempFilePath,
+							success: function (res) {
+								uni.hideLoading();
+							}
+					      });
+					    }
+					  },fail:function(){
+						  uni.hideLoading()
+						  uni.showToast({
+						  	title:"下载失败",
+							icon:'none'
+						  })
+					  }
+					});
+				}else{
+					uni.openDocument({
+					  filePath: that.list2[that.list1.indexOf(v)],
+					  success: function (res) {
+					  	uni.hideLoading();
+					  }
+					});
+				}
+				
 			}
 		}
 	}

+ 9 - 6
pages/shouwen/shouwen.vue

@@ -4,7 +4,7 @@
 			<swiper style="height: 100%;background-color:#F3F4F6 ;" :current="current" disable-touch
 				@animationfinish="animationfinish">
 				<swiper-item >
-					<scroll-view scroll-y style="width: 100%;height: 100%;overflow: auto;box-sizing: border-box;" lower-threshold="0" :refresher-enabled="xlList1[0]" :refresher-triggered="xlList2[0]" @scrolltolower="lower(0)" @refresherrefresh="refresherrefresh(0)" @refresherrestore="refresherrestore(0)">
+					<scroll-view scroll-y style="width: 100%;height: 100%;overflow: auto;box-sizing: border-box;" lower-threshold="10" :refresher-enabled="xlList1[0]" :refresher-triggered="xlList2[0]" @scrolltolower="lower(0)" @refresherrefresh="refresherrefresh(0)" @refresherrestore="refresherrestore(0)">
 						<view style="padding: 20rpx;background-color: #fff;">
 							<u-search v-model="db.title" placeholder="请输入标题" :showAction="true" actionText="搜索"
 								:animation="true" @custom="dbsearch" @clear="dbsearch">
@@ -29,7 +29,7 @@
 					</scroll-view>
 				</swiper-item>
 				<swiper-item >
-					<scroll-view scroll-y style="width: 100%;height: 100%;overflow: auto;box-sizing: border-box;" lower-threshold="0" :refresher-enabled="xlList1[1]" :refresher-triggered="xlList2[1]" @scrolltolower="lower(1)" @refresherrefresh="refresherrefresh(1)" @refresherrestore="refresherrestore(1)">
+					<scroll-view scroll-y style="width: 100%;height: 100%;overflow: auto;box-sizing: border-box;" lower-threshold="10" :refresher-enabled="xlList1[1]" :refresher-triggered="xlList2[1]" @scrolltolower="lower(1)" @refresherrefresh="refresherrefresh(1)" @refresherrestore="refresherrestore(1)">
 						<view style="padding: 20rpx;background-color: #fff;">
 							<u-search v-model="yb.title" placeholder="请输入标题" :showAction="true" actionText="搜索"
 								:animation="true" @custom="ybsearch" @clear="ybsearch">
@@ -178,7 +178,7 @@
 			//查询已办列表
 			getYbList(){
 				uni.$u.http.get('/jflow/restful/MyJoinOneFlows',{params:this.yb}).then(res=>{
-					// console.log(res)
+					console.log(res)
 					uni.hideLoading()
 					this.ybList = [...this.ybList,...res.list]	
 					if(res.total<=this.yb.pageSize){
@@ -192,11 +192,11 @@
 			},
 			//触底加载
 			lower(e){
-				uni.showLoading({
-					title:"加载中..."
-				})
 				if(e==0){
 					if(this.db.pageNum != this.dbTotal){
+						uni.showLoading({
+							title:"加载中..."
+						})
 						this.db.pageNum++
 						this.getDbList()
 					}else{
@@ -206,6 +206,9 @@
 					}
 				}else{
 					if(this.yb.pageNum != this.ybTotal){
+						uni.showLoading({
+							title:"加载中..."
+						})
 						this.yb.pageNum++
 						this.getYbList()
 					}else{

+ 6 - 3
pages/staging/staging.vue

@@ -113,6 +113,7 @@
 				uni.$u.http.get('/jflow/restful/DB_Todolist_Num?token='+uni.getStorageSync('jtoken')).then(res=>{
 					if(res.code==200){
 						this.num = 0
+						this.numList = {}
 						if (res.list.length > 0) {
 							let qwe = 0
 							for(let i in res.list){
@@ -123,6 +124,7 @@
 									this.num++
 								}
 								if(i == res.list.length-1){
+									this.$forceUpdate()
 									uni.setTabBarBadge({ //显示数字
 										index: 1, //tabbar下标
 										text: '' + qwe + '' //数字
@@ -130,7 +132,8 @@
 								}
 							}
 						} else {
-							uni.setTabBarBadge({ //显示数字
+							this.$forceUpdate()
+							uni.removeTabBarBadge({ //显示数字
 								index: 1, //tabbar下标
 							})
 						}
@@ -142,8 +145,8 @@
 			getUnreadEmail() {
 				uni.$u.http.get('/oa/mail/count/unread').then(res => {
 					if (res == 0) {
-						uni.removeTabBarBadge({
-							index: 2
+						uni.removeTabBarBadge({ //显示数字
+							index: 2, //tabbar下标
 						})
 					} else {
 						uni.setTabBarBadge({ //显示数字

+ 10 - 10
pages/swMessage/swMessage.vue

@@ -53,7 +53,7 @@
 						<u-form-item label="正文查看:" borderBottom ref="item1">
 							<view>
 								<!-- <u--text :text="content.sendFile.name" :href="content.sendFile.url"></u--text> -->
-								<u--text size="30rpx" color="#2979FF" :text="content.sendFile.name" @click="downLoad(content.sendFile.url)"></u--text>
+								<u--text size="30rpx" color="#2979FF" :text="content.sendFile.name" @click="downLoad(content.sendFile.path)"></u--text>
 							</view>
 						</u-form-item>
 						<!-- <u-form-item label="附件列表:" borderBottom ref="item1">
@@ -312,11 +312,6 @@
 			uni.setNavigationBarTitle({
 				title: options.title
 			})
-			// if (options.type == 0) {
-			// 	setTimeout(() => {
-			// 		this.isOver(options)
-			// 	}, 500)
-			// }
 			
 		},
 		onShow() {
@@ -340,6 +335,7 @@
 			getContent(id) {
 				uni.$u.http.get('/offcial/receive/sel/' + id).then(res => {
 					this.content = res.data
+					this.content.workid = id
 					if (this.gdType == true) {
 						this.content.typeId = null //归档分类
 						this.content.levels = null //密级
@@ -395,7 +391,6 @@
 						this.content.reviewMsg = null //审批意见
 						this.content.users = null //发送给指定人员
 						this.content.userList = null //人员列表
-						this.content.workid = this.workid
 						// this.id = this.list[0].id
 						// this.content.jdindex = 0 //下一节点索引
 						// this.DeliveryWay = this.list[0].DeliveryWay //下一节点状态
@@ -538,7 +533,7 @@
 							uni.navigateBack()
 						}, 2000)
 					}).catch(res => {
-						// uni.hideLoading()
+						uni.hideLoading()
 					})
 				}
 			},
@@ -602,11 +597,10 @@
 				let that = this
 				uni.showLoading({
 					title:"打开中...",
-					mask:true
 				})
 				if(that.list3.indexOf(v) == -1){
 					uni.downloadFile({
-					  url:v,
+					  url:getApp().globalData.saveUrl+v,
 					  success: function(res) {
 					    if (res.statusCode === 200) {
 							that.list3.push(v)
@@ -618,6 +612,12 @@
 							}
 					      });
 					    }
+					  },fail:function(){
+						  uni.hideLoading()
+						  uni.showToast({
+						  	title:"下载失败",
+							icon:'none'
+						  })
 					  }
 					});
 				}else{

+ 4 - 3
utils/request/index.js

@@ -1,5 +1,5 @@
 // 根域名
-var baseUrl = 'http://192.168.1.59:8080';
+var baseUrl = 'http://121.28.24.104:13898/app/';
 // var baseUrl = 'http://192.168.1.52:8080';
  
 module.exports = (vm) => {
@@ -49,12 +49,13 @@ module.exports = (vm) => {
             // 401为token失效
             // uni.setStorageSync('token', ''); // 缓存token
             uni.$u.toast(res.msg)
-            setTimeout(() => {
+            // setTimeout(() => {
                 // vm.$u.route('/pages/login/login')
+				uni.clearStorageSync()
 				uni.reLaunch({
 					url:"/pages/login/login"
 				})
-            }, 1500)
+            // }, 1500)
             return false;
         } else if (res.code == 405) {
             // 405为token为空