Browse Source

待清运网点选择网点可点区域优化

chenrui 4 years ago
parent
commit
ef7c2bb6c6
4 changed files with 59 additions and 92 deletions
  1. 6 3
      components/uni-navbar/uni-navbar.vue
  2. 52 48
      pages/cleared/chooseNetwork.vue
  3. 1 41
      pages/index/map.vue
  4. BIN
      static/map-icon.png

+ 6 - 3
components/uni-navbar/uni-navbar.vue

@@ -5,7 +5,7 @@
 				<u-icon name="arrow-left" color="#2979ff" size="28"></u-icon>
 			</view>
 			<view v-if="isMap" class="navbar-action_item last map-bar" @tap="toMap">
-				<u-image class="map-icon" width="20rpx" height="30rpx" src="/static/map-icon.png"></u-image>
+				<u-image class="map-icon" width="24rpx" height="36rpx" src="/static/map-icon.png"></u-image>
 				<view class="item-label">配送地图</view>
 			</view>
 	  </view>
@@ -95,7 +95,7 @@
 	    left: 10px;
 	    z-index: 11;
 	    line-height: 1;
-	    padding-top: 4px;
+	    padding-top: 8px;
 	    padding-bottom: 4px;
 	  }
 	  .navbar-action-group {
@@ -111,10 +111,13 @@
 			text-align: center;
 			.map-icon{
 				display: inline-block;
+				margin-right: 10rpx;
 			}
 			.item-label{
+				display: inline-block;
 				font-size: 24rpx;
-				transform: scale(0.6);
+				vertical-align: text-top;
+				color: #07c160;
 			}
 		}
 	  }

+ 52 - 48
pages/cleared/chooseNetwork.vue

@@ -23,31 +23,33 @@
 			<!-- 列表数据 -->
 			<u-checkbox-group class="cell-item-con">
 				<view class="cell-item" v-for="(item, index) in listdata" :key="index">
-					<u-checkbox
-						class="cell-item-checkbox"
-						@change="checkboxChange($event, index)"
-						active-color="#01c9b2"
-						v-model="item.checked"
-						:name="item.id">
-					</u-checkbox>
-					<view class="cell-item-c" @tap="goPage(item)">
-						<view class="cell-item-info">
-							<view class="cell-item-info-network">
-								{{item.stationName || '--'}}
-								<u-badge type="success" bgColor="#c90101" :count="item.unCleanNum" :offset="[-10,-32]" size="mini"></u-badge>
-							</view>
-							<view class="cell-item-info-weight">
-								<view class="cell-item-weight-bar">
-									{{ item.totalWeight }}kg
-									<u-badge class="badge" type="primary" bgColor="#01c9b2" count="总" :offset="[0,0]"></u-badge>
+					<view class="cell-item-c">
+						<u-checkbox
+							class="cell-item-checkbox"
+							@change="checkboxChange($event, index)"
+							active-color="#01c9b2"
+							v-model="item.checked"
+							:name="item.id">
+							<view class="cell-item-info">
+								<view class="cell-item-info-network">
+									{{item.stationName || '--'}}
+									<u-badge type="success" bgColor="#c90101" :count="item.unCleanNum" :offset="[-10,-32]" size="mini"></u-badge>
 								</view>
-								<view class="cell-item-weight-bar">
-									{{ item.maxWeight }}kg
-									<u-badge class="badge" type="warning" bgColor="#05695d" count="最大" :offset="[0,0]"></u-badge>
+								<view class="cell-item-info-weight">
+									<view class="cell-item-weight-bar">
+										{{ item.totalWeight }}kg
+										<u-badge class="badge" type="primary" bgColor="#01c9b2" count="总" :offset="[0,0]"></u-badge>
+									</view>
+									<view class="cell-item-weight-bar">
+										{{ item.maxWeight }}kg
+										<u-badge class="badge" type="warning" bgColor="#05695d" count="最大" :offset="[0,0]"></u-badge>
+									</view>
 								</view>
 							</view>
+						</u-checkbox>
+						<view class="details-con" @tap="goPage(item)">
+							<u-icon name="arrow-right" class="arrow-right" :size="28" color="#999"></u-icon>
 						</view>
-						<u-icon name="arrow-right" class="arrow-right" :size="28" color="#999"></u-icon>
 					</view>
 				</view>
 			</u-checkbox-group>
@@ -272,45 +274,47 @@
 				color: $uni-text-color;
 				font-size: $uni-font-size-base;
 				box-shadow: 3rpx 3rpx 5rpx #eee;
-				display: flex;
-				align-items: center;
-				padding: 40rpx 20rpx;
-				// 多选框
-				.cell-item-checkbox{
-					flex-shrink: 0;
-				}
+				padding: 20rpx 20rpx 20rpx 20rpx;
 				.cell-item-c{
-					flex-grow: 1;
 					display: flex;
 					justify-content: space-around;
 					align-items: center;
-					.cell-item-info{
+					.cell-item-checkbox{
 						flex-grow: 1;
-						.cell-item-info-network{
-							word-break: break-all;
-							margin-bottom: 26rpx;
-							display: inline-block;
-							position: relative;
-						}
-						.cell-item-info-weight{
-							font-size: 24rpx;
-							display: flex;
-							align-items: center;
-							justify-content: space-between;
-							.cell-item-weight-bar{
-								position: relative;
+						.cell-item-info{
+							margin-left: 4rpx;
+							padding: 10rpx 4px;
+							.cell-item-info-network{
+								word-break: break-all;
+								margin-bottom: 22rpx;
 								display: inline-block;
-								padding-right: 50rpx;
-								&:nth-child(2){
-									padding-right: 76rpx;
+								position: relative;
+							}
+							.cell-item-info-weight{
+								font-size: 24rpx;
+								display: flex;
+								align-items: center;
+								justify-content: space-between;
+								.cell-item-weight-bar{
+									position: relative;
+									display: inline-block;
+									padding-right: 50rpx;
+									&:nth-child(2){
+										padding-right: 76rpx;
+										margin-left: 30rpx;
+									}
 								}
 							}
 						}
 					}
-					.arrow-right{
+					.details-con{
 						flex-shrink: 0;
-						margin-left: 64rpx;
+						padding: 30rpx 0;
+						.arrow-right{
+							margin-left: 64rpx;
+						}
 					}
+					
 				}
 			}
 		}

+ 1 - 41
pages/index/map.vue

@@ -21,46 +21,7 @@
 			return{
 				latitude: null,  //  纬度
 				longitude: null,  //  经度
-				markers: [
-					// {
-					// 	latitude: 34.211901,  // 雁塔区
-					// 	longitude: 108.995039,
-					// 	width: '60rpx',
-					// 	height: '60rpx',
-					// 	iconPath: '/static/store.png',
-					// 	label: {
-					// 		content: '文本111',
-					// 		bgColor: '#fff'
-					// 	}
-					// }, {
-					// 	latitude: 34.296789,
-					// 	longitude: 108.971456,
-					// 	width: '60rpx',
-					// 	height: '60rpx',
-					// 	iconPath: '/static/store.png',
-					// 	label: {content:'文本1', bgColor: '#fff'}
-					// }, {
-					// 	latitude: 34.293145,  //  未央区政府
-					// 	longitude: 108.946715,
-					// 	width: '60rpx',
-					// 	height: '60rpx',
-					// 	iconPath: '/static/store-s.png',
-					// 	label: {
-					// 		content: '文本111',
-					// 		bgColor: '#fff'
-					// 	}
-					// }, {
-					// 	latitude: 34.313445,  //  灞桥区
-					// 	longitude: 109.018233,
-					// 	width: '60rpx',
-					// 	height: '60rpx',
-					// 	iconPath: '/static/store.png',
-					// 	label: {
-					// 		content: '文本111',
-					// 		bgColor: '#fff'
-					// 	}
-					// }
-				],
+				markers: [],
 				polyline: null  //  路线
 			}
 		},
@@ -78,7 +39,6 @@
 						_this.latitude = res.latitude  //  纬度
 						_this.longitude = res.longitude  //  经度
 						_this.getCleanWay()  //  获取个人待清运清单
-						// _this.onPolyline()
 				    }
 				})
 			},

BIN
static/map-icon.png