浏览代码

bug修改

1004749546@qq.com 4 年之前
父节点
当前提交
dd2ed4cab1
共有 3 个文件被更改,包括 26 次插入40 次删除
  1. 1 1
      pages/index/addData.vue
  2. 20 16
      pages/index/index.vue
  3. 5 23
      pages/userCenter/index.vue

+ 1 - 1
pages/index/addData.vue

@@ -24,7 +24,7 @@
 			<view class="form-data qyImg">
 				<text>清运照片</text>
 				<view class="info-main">
-					<view v-if="photograph.length<3" class="camera-btn">
+					<view v-if="photograph.length<3 && !isView" class="camera-btn">
 						<view @click="goPhotograph" class="photograph-camera">
 							<u-icon name="camera" color="#bfbfbf" size="60" ></u-icon>
 						</view>

+ 20 - 16
pages/index/index.vue

@@ -2,25 +2,26 @@
 	<view class="content">
 		<view class="header">
 			<view>
-				<text>{{searchForm.beginDate}}至{{searchForm.endDate}}</text>
+				<text v-if="searchForm.beginDate">{{searchForm.beginDate}}至{{searchForm.endDate}}</text>
+				<text v-else>全部</text>
 				<u-image v-if="hasLogin" @click="openScreen=true" class="filter-img" width="36rpx" height="36rpx" src="/static/filter.png"></u-image>
 			</view>
 			<!-- 总计 -->
 			<view class="header-cont">
 				<view class="cont-item">
 					<text>其它垃圾</text>
-					<text v-if="status !='loading'" class="other">{{otherTotal}}kg</text>
-					<u-loading :show="status =='loading'"></u-loading>
+					<text v-if="!titleStatus" class="other">{{otherTotal}}kg</text>
+					<u-loading :show="titleStatus"></u-loading>
 				</view>
 				<view class="cont-item">
-					<text>建筑垃圾</text>
-					<text v-if="status !='loading'" class="jianzhu">{{jianzhuTotal}}kg</text>
-					<u-loading :show="status =='loading'"></u-loading>
+					<text>厨余垃圾</text>
+					<text v-if="!titleStatus" class="chuyu">{{chuyuTotal}}kg</text>
+					<u-loading :show="titleStatus"></u-loading>
 				</view>
 				<view class="cont-item">
-					<text>厨余垃圾</text>
-					<text v-if="status !='loading'" class="chuyu">{{chuyuTotal}}kg</text>
-					<u-loading :show="status =='loading'"></u-loading>
+					<text>建筑垃圾</text>
+					<text v-if="!titleStatus" class="jianzhu">{{jianzhuTotal}}kg</text>
+					<u-loading :show="titleStatus"></u-loading>
 				</view>
 			</view>
 		</view>
@@ -42,16 +43,16 @@
 						<u-image src="/static/index/other.png"></u-image>
 						<text>{{item.gatherOther? (item.gatherOther/1000).toFixed(3)/1 :0}}kg</text>
 					</view>
-					<!-- 建筑垃圾 -->
-					<view class="cont-item">
-						<u-image src="/static/index/jianzhu.png"></u-image>
-						<text>{{item.gatherBuilding ? (item.gatherBuilding/1000).toFixed(3)/1 :0}}kg</text>
-					</view>
 					<!-- 厨余垃圾 -->
 					<view class="cont-item">
 						<u-image src="/static/index/chuyu.png"></u-image>
 						<text>{{item.gatherKitchen ? (item.gatherKitchen/1000).toFixed(3)/1 :0}}kg</text>
 					</view>
+					<!-- 建筑垃圾 -->
+					<view class="cont-item">
+						<u-image src="/static/index/jianzhu.png"></u-image>
+						<text>{{item.gatherBuilding ? (item.gatherBuilding/1000).toFixed(3)/1 :0}}kg</text>
+					</view>
 				</view>
 			</view>
 			<view class="nodata" v-if="listdata.length==0 && status!='loading'">
@@ -90,6 +91,7 @@
 				total: 0,  //  数据总条数
 				noDataText: '暂无数据',  //  列表请求状态提示语
 				status: 'loadmore',  //  加载中状态
+				titleStatus: false,  //  顶部加载中状态
 				openScreen: false,  //  是否打开筛选
 				searchForm: {  //  查询条件
 					beginDate: getDate.getRecentday().starttime,  //  创建时间默认筛选近7天
@@ -149,8 +151,8 @@
 				gatherList({
 					pageNo: this.pageNo,
 					pageSize: this.pageSize,
-					beginDate: this.searchForm.beginDate+' 00:00:00',
-					endDate: this.searchForm.endDate+' 23:59:59',
+					beginDate: this.searchForm.beginDate?moment(this.searchForm.beginDate).format('YYYY-MM-DD 00:00:00'):'',
+					endDate: this.searchForm.endDate ? moment(this.searchForm.endDate).format('YYYY-MM-DD 23:59:59'):'',
 				}).then(res => {
 					if (res.status == 200) {
 						if(this.pageNo>1){
@@ -182,6 +184,7 @@
 			},
 			// 总计
 			getTotal(){
+				this.titleStatus = true
 				gatherTotal({
 					beginDate: this.searchForm.beginDate,
 					endDate: this.searchForm.endDate}).then(res=>{
@@ -191,6 +194,7 @@
 							this.chuyuTotal=res.data.GATHER_KITCHEN? (res.data.GATHER_KITCHEN/1000).toFixed(3)/1:0
 						}
 					console.log(res)
+					this.titleStatus = false
 				})
 			},
 			// 打开垃圾数据录入页面

+ 5 - 23
pages/userCenter/index.vue

@@ -1,13 +1,14 @@
 <template>
 	<view class="user-content">
 		<!-- 头部 -->
-		<view class="user-head" @click="toUserPage">
+		<view class="user-head" >
 			<view class="user-photo">
-				<open-data type="userAvatarUrl"></open-data>
+				<open-data class="user-photo" type="userAvatarUrl"></open-data>
 				<u-image v-show="!hasLogin" src="/static/logo.png" width="100" height="100"></u-image>
 			</view>
 			<view class="user-info">
-				<view v-if="hasLogin" class="user-info-item">{{userData.stationName || ''}}</view>
+				<!-- <view v-if="hasLogin" class="user-info-item">{{userData.stationName || ''}}</view> -->
+				<view v-if="hasLogin" class="user-info-item">hjh更合适的股份回购</view>
 				<view v-if="hasLogin" class="user-info-item">{{userData.gatherName||''}} {{userData.gatherPhone || ''}}</view>
 				<u-button v-else="!hasLogin" plain size="mini" shape="circle" @click="toLoginPage">立即登录</u-button>
 			</view>
@@ -105,26 +106,7 @@
 				  }
 				})
 			},
-			//  跳转
-			toUserPage(){
-				//  未登录跳转登录,已登录跳转用户信息页
-				if(this.hasLogin){
-					uni.navigateTo({
-						url: '/pages/userCenter/userInfo/userInfo'
-					})
-				}else{
-					this.toLoginPage()
-				}
-			},
-			//  乐豆明细
-			toLdPage(){
-				uni.navigateTo({
-					url: '/pages/userCenter/ldDetailed'
-				})
-			},
-			bindGetUserInfo(res){
-				console.log(res)
-			},
+			
 			toLoginPage(){
 				uni.navigateTo({
 					url: '/pages/login/login'