Jelajahi Sumber

车辆管理

lyqu 5 tahun lalu
induk
melakukan
246c62c74f

+ 30 - 3
App.vue

@@ -41,6 +41,8 @@
 			this.param = e;
 			this.execParam();
 			this.globalData.checkIsIPhoneX();
+			
+			this.getOpenId();
 		},
 		onShow: function(e) {
 			this.param = e;
@@ -71,6 +73,29 @@
 				let reqParam = this.param.referrerInfo.extraData;
 				wx.setStorageSync('reqParam', reqParam);
 				this.param.referrerInfo = null;
+			},
+			getOpenId() {
+			  var that = this;
+			    uni.login({
+			      success: res => {
+			        let params = {};
+			        params['js_code'] = res.code;
+					params['name'] = 'community';
+			        let operation = 'miniprogram/getOpenid'; //发起请求
+			        that.globalData.postRequest(params, operation, function (res) {
+			          //获取成功
+			          if (res.data.result_code == 1) {
+						  console.log("获取openid成功")
+			            //openid存入缓存
+			            uni.setStorageSync("openid", res.data.openid);
+						uni.setStorageSync("appletType", res.data.appletType);
+						that.$u.vuex('vuex_appletType',res.data.appletType)
+			          } else {
+			            that.globalData.oneFailHint(res.data.result_msg);
+			          }
+			        });
+			      }
+			    });
 			}
 		},
 		globalData: {
@@ -79,9 +104,11 @@
 			token: "j2qctr89u1xfmbjkp69hegfmqhwquycw",
 			//对接后台的api地址
 			//远程的
-			apiurl: "https://community.58fo.com/api/app/",
+			// apiurl: "https://community.58fo.com/api/app/",
 			// apiurl: "http://192.168.1.19:9082/app/",
-			// apiurl: "http://192.168.1.117:9082/app/",
+			// apiurl: "http://25d3f66612.zicp.vip/wuye/app-gateway/app/",
+			// apiurl: "http://192.168.1.218:9082/app/",
+			apiurl: "http://192.168.1.244:9082/app/",
 			member: null,
 			//用户信息--后台
 			userInfo: null,
@@ -297,7 +324,7 @@
 			      }
 			    }
 			  });
-			}
+			},
 		},
 	}
 </script>

+ 16 - 2
assets/css/app.css

@@ -13,10 +13,13 @@
 	background-color: #2f7ff5;
 }
 
+.padding-bottom-10,.padding-bottom-sm{
+	padding-bottom: 10rpx;
+}
 
 .line-btn{color: #2f7ff5;}
 
-.bg-btn{
+.bg-btn {
 	color: #FFFFFF;
 	background-color: #2f7ff5;
 }
@@ -35,4 +38,15 @@
 
 .text-info{
 	color: #909399;
-}
+}
+
+.footer-fixed {
+	position: fixed;
+	z-index: 99;
+	width: 100%;
+	bottom: 0;
+	left: 0;
+}
+
+
+

+ 299 - 0
comps/keyboard-package/keyboard-package.vue

@@ -0,0 +1,299 @@
+<template>
+	<uni-popup :custom="true" type="bottom" ref="keyboardPackage">
+		<view class="keyboardbox">
+			<view class="numkeyboard" v-if="type==='number'">
+				<view class="num-area">
+					<view class="row" v-for="(item,index) in numKeybordList" :key="index">
+						<view :class="['item',ite===0?'z':'',(disableDot && ite==='.')?'disabled':'']" v-for="(ite,idx) in item"
+						 hover-class="active" :hover-start-time="0" :hover-stay-time="5" :key="idx" @tap="input(ite)">{{ite}}</view>
+					</view>
+				</view>
+				<view class="btn-area">
+					<view :class="['item','del']" hover-class="active" :hover-start-time="0" :hover-stay-time="5" @tap="deleteVal">
+						删除
+					</view>
+					<view class="confirem item" hover-class="active" :hover-start-time="0" :hover-stay-time="5" @tap="confirm">
+						完成
+					</view>
+				</view>
+			</view>
+
+			<view class="numkeyboard" v-if="type==='idCard'">
+				<view class="num-area">
+					<view class="row" v-for="(item,index) in idCardList" :key="index">
+						<view :class="['item',ite===0?'z':'',(disableDot && ite==='.')?'disabled':'']" v-for="(ite,idx) in item"
+						 hover-class="active" :hover-start-time="0" :hover-stay-time="5" :key="idx" @tap="input(ite)">{{ite}}</view>
+					</view>
+				</view>
+				<view class="btn-area">
+					<view :class="['item','del']" hover-class="active" :hover-start-time="0" :hover-stay-time="5" @tap="deleteVal">
+						删除
+					</view>
+					<view class="confirem item" hover-class="active" :hover-start-time="0" :hover-stay-time="5" @tap="confirm">
+						完成
+					</view>
+				</view>
+			</view>
+
+			<view class="platenumber" v-if="type==='plateNumber'">
+				<view class="header">
+					<view @tap="active=active===1?2:1" hover-class="active" :hover-start-time="0" :hover-stay-time="5">{{active===1?'地区':'车牌号'}}</view>
+					<view hover-class="active" :hover-start-time="0" :hover-stay-time="5" @tap="confirm">完成</view>
+				</view>
+				<view class="main">
+					<view class="normal" v-show="active===1">
+						<view class="row" v-for="(item,index) in EngKeyBoardList" :key="index">
+							<view class="item" v-for="(ite,idx) in item" :key="idx" hover-class="active" :hover-start-time="0" :hover-stay-time="5" @tap="input(ite)">
+								{{ite}}
+							</view>
+							<view class="item img" v-if="index===EngKeyBoardList.length-1" hover-class="active" :hover-start-time="0" :hover-stay-time="5" @tap="deleteVal">
+								<image src="/static/delete.png" mode=""></image>
+							</view>
+						</view>
+					</view>
+					<view class="area" v-show="active===2">
+						<view class="row" v-for="(item,index) in areaList" :key="index">
+							<view class="item" v-for="(ite,idx) in item" :key="idx" hover-class="active" :hover-start-time="0" :hover-stay-time="5" @tap="input(ite)">
+								{{ite}}
+							</view>
+							<view class="item img" v-if="index===EngKeyBoardList.length-1" hover-class="active" :hover-start-time="0" :hover-stay-time="5" @tap="deleteVal">
+								<image src="/static/delete.png" mode=""></image>
+							</view>
+						</view>
+					</view>
+				</view>
+			</view>
+		</view>
+		<view class="safe-area" v-if="safeAreaInsetBottom"></view>
+	</uni-popup>
+</template>
+
+<script>
+	import uniPopup from "@/comps/uni-popup/uni-popup.vue"
+	export default {
+		components: {
+			uniPopup
+		},
+		props: {
+			type: {
+				type: String,
+				default: 'number'
+			},
+			safeAreaInsetBottom: { //是否设置安全区
+				type: Boolean,
+				default: false
+			},
+			disableDot: { //数字键盘是否禁止点击.仅type为number生效
+				type: Boolean,
+				default: false
+			}
+		},
+		data() {
+			return {
+				numKeybordList: [
+					[1, 2, 3],
+					[4, 5, 6],
+					[7, 8, 9],
+					[0, '.']
+				],
+				idCardList: [
+					[1, 2, 3],
+					[4, 5, 6],
+					[7, 8, 9],
+					[0, 'X']
+				],
+				areaList: [
+					['京', '沪', '粤', '津', '冀', '豫', '云', '辽', '黑', '湘'],
+					['皖', '鲁', '苏', '浙', '赣', '鄂', '桂', '甘', '晋', '陕'],
+					['蒙', '吉', '闽', '贵', '渝', '川', '青', '琼', '宁'],
+					['藏', '新', '使', '港', '澳', '学']
+				],
+				EngKeyBoardList: [
+					[1, 2, 3, 4, 5, 6, 7, 8, 9, 0],
+					['Q', 'W', 'E', 'R', 'T', 'Y', 'U', 'I', 'O', 'P'],
+					['A', 'S', 'D', 'F', 'G', 'H', 'J', 'K', 'L'],
+					['Z', 'X', 'C', 'V', 'B', 'N', 'M']
+				],
+				active: 2
+			};
+		},
+		methods: {
+			open() {
+				this.$refs.keyboardPackage.open();
+			},
+			confirm() {
+				this.close();
+				this.$emit('onConfirm');
+			},
+			deleteVal() {
+				this.$emit('onDelete');
+			},
+			input(val) {
+				if (val === '.' && this.disableDot) return;
+				this.$emit('onInput', val);
+				if(this.active === 2){
+					this.active = 1;
+				}
+			},
+			close() {
+				this.$refs.keyboardPackage.close();
+			}
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+	.keyboardbox {
+		background-color: #FFFFFF;
+
+		.numkeyboard {
+			height: 432rpx;
+			display: flex;
+			background-color: #ebedf0;
+
+			.btn-area {
+				width: 180rpx;
+				height: 100%;
+				display: flex;
+				flex-direction: column;
+
+				.item {
+					width: 100%;
+					display: flex;
+					justify-content: center;
+					align-items: center;
+					flex-grow: 1;
+				}
+
+				.del {
+					background-color: #ebedf0;
+					color: #333;
+
+					&.active {
+						background-color: #f1f3f5;
+					}
+				}
+
+				.confirem {
+					background-color: $base-color;
+					color: #FFFFFF;
+
+					&.active {
+						background-color: #0570db;
+					}
+				}
+			}
+
+			.num-area {
+				flex-grow: 1;
+				display: flex;
+				flex-wrap: wrap;
+
+				.row {
+					width: 100%;
+					height: 25%;
+					display: flex;
+					margin-top: 1px;
+
+					.item {
+						flex-grow: 1;
+						height: 100%;
+						display: flex;
+						justify-content: center;
+						align-items: center;
+						background-color: #FFFFFF;
+						border-right: 1px solid #ebedf0;
+						width: 33.33%;
+						
+						&.active {
+							background-color: #ebedf0;
+						}
+
+						&.z {
+							flex-grow: 2;
+							width: 66.66%;
+						}
+
+						&.disabled {
+							background: #FFFFFF;
+							color: #B9B9B9;
+						}
+					}
+				}
+
+			}
+		}
+	}
+
+	.safe-area {
+		padding-bottom: 0rpx;
+		padding-bottom: constant(safe-area-inset-bottom);
+		padding-bottom: env(safe-area-inset-bottom);
+	}
+
+	.platenumber {
+		background-color: #f5f5f5;
+
+		.header {
+			height: 76rpx;
+			background-color: #FFFFFF;
+			display: flex;
+			justify-content: space-between;
+			align-items: center;
+			font-size: 28rpx;
+			border-top: 1px solid #f5f5f5;
+
+			&>view {
+				padding: 0 45rpx;
+				color: $base-color;
+				height: 100%;
+				display: flex;
+				align-items: center;
+				&.active {
+					background-color: #ebedf0;
+				}
+			}
+		}
+
+		.main {
+			height: 435rpx;
+
+			.row {
+				margin: 13rpx 0;
+				display: flex;
+				justify-content: center;
+				align-items: center;
+
+				.item {
+					width: 56rpx;
+					height: 94rpx;
+					display: flex;
+					justify-content: center;
+					align-items: center;
+					background-color: #FFFFFF;
+					border-radius: 6rpx;
+					margin: 0 7rpx;
+					font-size: 24rpx;
+					&.active {
+						background-color: #ebedf0;
+					}
+
+					&.img {
+						background-color: #c2cacc;
+						width: 94rpx;
+
+						&.active {
+							background-color: #ddd;
+						}
+
+						&>image {
+							width: 49rpx;
+							height: 48rpx;
+						}
+					}
+				}
+			}
+
+		}
+	}
+</style>

+ 1 - 1
comps/mescroll-body/mescroll-body.vue

@@ -2,7 +2,7 @@
 	<view 
 	class="mescroll-body mescroll-render-touch" 
 	:class="{'mescorll-sticky': sticky}"
-	:style="{'minHeight':minHeight, 'padding-top': padTop, 'padding-bottom': padBottom,'background-color': isShowEmpty?'#FFFFFF':'#f1f1f1'}" 
+	:style="{'minHeight':minHeight, 'padding-top': padTop, 'padding-bottom': padBottom}" 
 	@touchstart="wxsBiz.touchstartEvent" 
 	@touchmove="wxsBiz.touchmoveEvent" 
 	@touchend="wxsBiz.touchendEvent" 

+ 4 - 1
comps/mescroll-body/mescroll-mixins.js

@@ -10,7 +10,10 @@ const MescrollMixin = {
 	// },
 	data() {
 		return {
-			mescroll: null //mescroll实例对象
+			mescroll: null, //mescroll实例对象
+			downOption:{
+				auto:false
+			}
 		}
 	},
 	// 注册系统自带的下拉刷新 (配置down.native为true时生效, 还需在pages配置enablePullDownRefresh:true;详请参考mescroll-native的案例)

+ 2 - 2
comps/mescroll-body/mescroll-uni-option.js

@@ -27,8 +27,8 @@ const GlobalOption = {
 		},
 		empty: {
 			use: true, // 是否显示空布局
-			icon: "http://139.9.103.171:1888/miniofile/xlyq/empty/empty.png", // 图标路径 (建议放入static目录, 如 /static/img/mescroll-empty.png )
-			tip: '数据为空' // 提示
+			icon: "/static/common/empty.png", // 图标路径 (建议放入static目录, 如 /static/img/mescroll-empty.png )
+			tip: '暂无数据' // 提示
 		}
 	}
 }

+ 3 - 9
comps/mescroll-body/mescroll-uni.vue

@@ -1,5 +1,5 @@
 <template>
-	<view class="mescroll-uni-warp" :class="isShowEmpty?'page':''">
+	<view class="mescroll-uni-warp">
 		<scroll-view :id="viewId" class="mescroll-uni" :class="{'mescroll-uni-fixed':isFixed}" :style="{'height':scrollHeight,'padding-top':padTop,'padding-bottom':padBottom,'top':fixedTop,'bottom':fixedBottom}" :scroll-top="scrollTop" :scroll-with-animation="scrollAnim" @scroll="scroll" :scroll-y='scrollable' :enable-back-to-top="true" :throttle="false">
 			<view class="mescroll-uni-content mescroll-render-touch"
 			@touchstart="wxsBiz.touchstartEvent" 
@@ -25,7 +25,7 @@
 					<slot></slot>
 
 					<!-- 空布局 -->
-					<mescroll-empty  v-if="isShowEmpty" :option="mescroll.optUp.empty" @emptyclick="emptyClick"></mescroll-empty>
+					<mescroll-empty v-if="isShowEmpty" :option="mescroll.optUp.empty" @emptyclick="emptyClick"></mescroll-empty>
 
 					<!-- 上拉加载区域 (下拉刷新时不显示, 支付宝小程序子组件传参给子子组件仍报单项数据流的异常,暂时不通过mescroll-up组件实现)-->
 					<!-- <mescroll-up v-if="mescroll.optUp.use && !isDownLoading && upLoadType!==3" :option="mescroll.optUp" :type="upLoadType"></mescroll-up> -->
@@ -417,13 +417,7 @@
 	}
 </script>
 
-<style lang="scss">
-	
-	.page{
-		background-color: #FFFFFF;
-		min-height: calc(100vh - 90rpx);
-	}
-	
+<style>
 	@import "./mescroll-uni.css";
 	@import "./components/mescroll-down.css";
 	@import './components/mescroll-up.css';

+ 22 - 0
comps/uni-popup/message.js

@@ -0,0 +1,22 @@
+export default {
+	created() {
+		if (this.type === 'message') {
+			// 不显示遮罩
+			this.maskShow = false 
+			// 获取子组件对象
+			this.childrenMsg = null
+		}
+	},
+	methods: {
+		customOpen() {
+			if (this.childrenMsg) {
+				this.childrenMsg.open()
+			}
+		},
+		customClose() {
+			if (this.childrenMsg) {
+				this.childrenMsg.close()
+			}
+		}
+	}
+}

+ 25 - 0
comps/uni-popup/popup.js

@@ -0,0 +1,25 @@
+import message from './message.js';
+// 定义 type 类型:弹出类型:top/bottom/center
+const config = {
+	// 顶部弹出
+	top:'top',
+	// 底部弹出
+	bottom:'bottom',
+	// 居中弹出
+	center:'center',
+	// 消息提示
+	message:'top',
+	// 对话框
+	dialog:'center',
+	// 分享
+	share:'bottom',
+}
+
+export default {
+	data(){
+		return {
+			config:config
+		}
+	},
+	mixins: [message],
+}

+ 243 - 0
comps/uni-popup/uni-popup-dialog.vue

@@ -0,0 +1,243 @@
+<template>
+	<view class="uni-popup-dialog">
+		<view class="uni-dialog-title">
+			<text class="uni-dialog-title-text" :class="['uni-popup__'+dialogType]">{{title}}</text>
+		</view>
+		<view class="uni-dialog-content">
+			<text class="uni-dialog-content-text" v-if="mode === 'base'">{{content}}</text>
+			<input v-else class="uni-dialog-input" v-model="val" type="text" :placeholder="placeholder" :focus="focus" >
+		</view>
+		<view class="uni-dialog-button-group">
+			<view class="uni-dialog-button" @click="close">
+				<text class="uni-dialog-button-text">取消</text>
+			</view>
+			<view class="uni-dialog-button uni-border-left" @click="onOk">
+				<text class="uni-dialog-button-text uni-button-color">确定</text>
+			</view>
+		</view>
+
+	</view>
+</template>
+
+<script>
+	/**
+	 * PopUp 弹出层-对话框样式
+	 * @description 弹出层-对话框样式
+	 * @tutorial https://ext.dcloud.net.cn/plugin?id=329
+	 * @property {String} value input 模式下的默认值
+	 * @property {String} placeholder input 模式下输入提示
+	 * @property {String} type = [success|warning|info|error] 主题样式
+	 *  @value success 成功
+	 * 	@value warning 提示
+	 * 	@value info 消息
+	 * 	@value error 错误
+	 * @property {String} mode = [base|input] 模式、
+	 * 	@value base 基础对话框
+	 * 	@value input 可输入对话框
+	 * @property {String} content 对话框内容
+	 * @property {Boolean} beforeClose 是否拦截取消事件
+	 * @event {Function} confirm 点击确认按钮触发
+	 * @event {Function} close 点击取消按钮触发
+	 */
+
+	export default {
+		name: "uniPopupDialog",
+		props: {
+			value: {
+				type: [String, Number],
+				default: ''
+			},
+			placeholder: {
+				type: [String, Number],
+				default: '请输入内容'
+			},
+			/**
+			 * 对话框主题 success/warning/info/error	  默认 success
+			 */
+			type: {
+				type: String,
+				default: 'error'
+			},
+			/**
+			 * 对话框模式 base/input
+			 */
+			mode: {
+				type: String,
+				default: 'base'
+			},
+			/**
+			 * 对话框标题
+			 */
+			title: {
+				type: String,
+				default: '提示'
+			},
+			/**
+			 * 对话框内容
+			 */
+			content: {
+				type: String,
+				default: ''
+			},
+			/**
+			 * 拦截取消事件 ,如果拦截取消事件,必须监听close事件,执行 done()
+			 */
+			beforeClose: {
+				type: Boolean,
+				default: false
+			}
+		},
+		data() {
+			return {
+				dialogType: 'error',
+				focus: false,
+				val: ""
+			}
+		},
+		inject: ['popup'],
+		watch: {
+			type(val) {
+				this.dialogType = val
+			},
+			mode(val) {
+				if (val === 'input') {
+					this.dialogType = 'info'
+				}
+			},
+			value(val) {
+				this.val = val
+			}
+		},
+		created() {
+			// 对话框遮罩不可点击
+			this.popup.mkclick = false
+			if (this.mode === 'input') {
+				this.dialogType = 'info'
+				this.val = this.value
+			} else {
+				this.dialogType = this.type
+			}
+		},
+		mounted() {
+			this.focus = true
+		},
+		methods: {
+			/**
+			 * 点击确认按钮
+			 */
+			onOk() {
+				this.$emit('confirm', () => {
+					this.popup.close()
+					if (this.mode === 'input') this.val = this.value
+				}, this.mode === 'input' ? this.val : '')
+			},
+			/**
+			 * 点击取消按钮
+			 */
+			close() {
+				if (this.beforeClose) {
+					this.$emit('close', () => {
+						this.popup.close()
+					})
+					return
+				}
+				this.popup.close()
+			}
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+	.uni-popup-dialog {
+		width: 300px;
+		border-radius: 15px;
+		background-color: #fff;
+	}
+
+	.uni-dialog-title {
+		/* #ifndef APP-NVUE */
+		display: flex;
+		/* #endif */
+		flex-direction: row;
+		justify-content: center;
+		padding-top: 15px;
+		padding-bottom: 5px;
+	}
+
+	.uni-dialog-title-text {
+		font-size: 16px;
+		font-weight: 500;
+	}
+
+	.uni-dialog-content {
+		/* #ifndef APP-NVUE */
+		display: flex;
+		/* #endif */
+		flex-direction: row;
+		justify-content: center;
+		align-items: center;
+		padding: 5px 15px 15px 15px;
+	}
+
+	.uni-dialog-content-text {
+		font-size: 14px;
+		color: #6e6e6e;
+	}
+
+	.uni-dialog-button-group {
+		/* #ifndef APP-NVUE */
+		display: flex;
+		/* #endif */
+		flex-direction: row;
+		border-top-color: #f5f5f5;
+		border-top-style: solid;
+		border-top-width: 1px;
+	}
+
+	.uni-dialog-button {
+		/* #ifndef APP-NVUE */
+		display: flex;
+		/* #endif */
+
+		flex: 1;
+		flex-direction: row;
+		justify-content: center;
+		align-items: center;
+		height: 45px;
+	}
+
+	.uni-border-left {
+		border-left-color: #f0f0f0;
+		border-left-style: solid;
+		border-left-width: 1px;
+	}
+
+	.uni-dialog-button-text {
+		font-size: 14px;
+	}
+
+	.uni-button-color {
+		color: $uni-color-primary;
+	}
+
+	.uni-dialog-input {
+		flex: 1;
+		font-size: 14px;
+	}
+
+	.uni-popup__success {
+		color: $uni-color-success;
+	}
+
+	.uni-popup__warn {
+		color: $uni-color-warning;
+	}
+
+	.uni-popup__error {
+		color: $uni-color-error;
+	}
+
+	.uni-popup__info {
+		color: #909399;
+	}
+</style>

+ 116 - 0
comps/uni-popup/uni-popup-message.vue

@@ -0,0 +1,116 @@
+<template>
+	<view class="uni-popup-message" :class="'uni-popup__'+[type]">
+		<text class="uni-popup-message-text" :class="'uni-popup__'+[type]+'-text'">{{message}}</text>
+	</view>
+</template>
+
+<script>
+	
+	/**
+	 * PopUp 弹出层-消息提示
+	 * @description 弹出层-消息提示
+	 * @tutorial https://ext.dcloud.net.cn/plugin?id=329
+	 * @property {String} type = [success|warning|info|error] 主题样式
+	 *  @value success 成功
+	 * 	@value warning 提示
+	 * 	@value info 消息
+	 * 	@value error 错误
+	 * @property {String} message 消息提示文字
+	 * @property {String} duration 显示时间,设置为 0 则不会自动关闭
+	 */
+	
+	export default {
+		name: 'UniPopupMessage',
+		props: {
+			/**
+			 * 主题 success/warning/info/error	  默认 success
+			 */
+			type: {
+				type: String,
+				default: 'success'
+			},
+			/**
+			 * 消息文字
+			 */
+			message: {
+				type: String,
+				default: ''
+			},
+			/**
+			 * 显示时间,设置为 0 则不会自动关闭
+			 */
+			duration: {
+				type: Number,
+				default: 3000
+			}
+		},
+		inject: ['popup'],
+		data() {
+			return {}
+		},
+		created() {
+			this.popup.childrenMsg = this
+		},
+		methods: {
+			open() {
+				if (this.duration === 0) return
+				clearTimeout(this.popuptimer)
+				this.popuptimer = setTimeout(() => {
+					this.popup.close()
+				}, this.duration)
+			},
+			close() {
+				clearTimeout(this.popuptimer)
+			}
+		}
+	}
+</script>
+<style lang="scss" scoped>
+	.uni-popup-message {
+		/* #ifndef APP-NVUE */
+		display: flex;
+		/* #endif */
+		flex-direction: row;
+		background-color: #e1f3d8;
+		padding: 10px 15px;
+		border-color: #eee;
+		border-style: solid;
+		border-width: 1px;
+	}
+	.uni-popup-message-text {
+		font-size: 14px;
+		padding: 0;
+	}
+
+	.uni-popup__success {
+		background-color: #e1f3d8;
+	}
+
+	.uni-popup__success-text {
+		color: #67C23A;
+	}
+
+	.uni-popup__warn {
+		background-color: #faecd8;
+	}
+
+	.uni-popup__warn-text {
+		color: #E6A23C;
+	}
+
+	.uni-popup__error {
+		background-color: #fde2e2;
+	}
+
+	.uni-popup__error-text {
+		color: #F56C6C;
+	}
+
+	.uni-popup__info {
+		background-color: #F2F6FC;
+	}
+
+	.uni-popup__info-text {
+		color: #909399;
+	}
+</style>

+ 165 - 0
comps/uni-popup/uni-popup-share.vue

@@ -0,0 +1,165 @@
+<template>
+	<view class="uni-popup-share">
+		<view class="uni-share-title"><text class="uni-share-title-text">{{title}}</text></view>
+		<view class="uni-share-content">
+			<view class="uni-share-content-box">
+				<view class="uni-share-content-item" v-for="(item,index) in bottomData" :key="index" @click.stop="select(item,index)">
+					<image class="uni-share-image" :src="item.icon" mode="aspectFill"></image>
+					<text class="uni-share-text">{{item.text}}</text>
+				</view>
+
+			</view>
+		</view>
+		<view class="uni-share-button-box">
+			<button class="uni-share-button" @click="close">取消</button>
+		</view>
+	</view>
+</template>
+
+<script>
+	export default {
+		name: 'UniPopupShare',
+		props: {
+			title: {
+				type: String,
+				default: '分享到'
+			}
+		},
+		inject: ['popup'],
+		data() {
+			return {
+				bottomData: [{
+						text: '微信',
+						icon: 'https://img-cdn-qiniu.dcloud.net.cn/uni-ui/grid-2.png',
+						name: 'wx'
+					},
+					{
+						text: '支付宝',
+						icon: 'https://img-cdn-qiniu.dcloud.net.cn/uni-ui/grid-8.png',
+						name: 'wx'
+					},
+					{
+						text: 'QQ',
+						icon: 'https://img-cdn-qiniu.dcloud.net.cn/uni-ui/gird-3.png',
+						name: 'qq'
+					},
+					{
+						text: '新浪',
+						icon: 'https://img-cdn-qiniu.dcloud.net.cn/uni-ui/grid-1.png',
+						name: 'sina'
+					},
+					{
+						text: '百度',
+						icon: 'https://img-cdn-qiniu.dcloud.net.cn/uni-ui/grid-7.png',
+						name: 'copy'
+					},
+					{
+						text: '其他',
+						icon: 'https://img-cdn-qiniu.dcloud.net.cn/uni-ui/grid-5.png',
+						name: 'more'
+					}
+				]
+			}
+		},
+		created() {},
+		methods: {
+			/**
+			 * 选择内容
+			 */
+			select(item, index) {
+				this.$emit('select', {
+					item,
+					index
+				}, () => {
+					this.popup.close()
+				})
+			},
+			/**
+			 * 关闭窗口
+			 */
+			close() {
+				this.popup.close()
+			}
+		}
+	}
+</script>
+<style lang="scss" scoped>
+	.uni-popup-share {
+		background-color: #fff;
+	}
+	.uni-share-title {
+		/* #ifndef APP-NVUE */
+		display: flex;
+		/* #endif */
+		flex-direction: row;
+		align-items: center;
+		justify-content: center;
+		height: 40px;
+	}
+	.uni-share-title-text {
+		font-size: 14px;
+		color: #666;
+	}
+	.uni-share-content {
+		/* #ifndef APP-NVUE */
+		display: flex;
+		/* #endif */
+		flex-direction: row;
+		justify-content: center;
+		padding-top: 10px;
+	}
+	
+	.uni-share-content-box {
+		/* #ifndef APP-NVUE */
+		display: flex;
+		/* #endif */
+		flex-direction: row;
+		flex-wrap: wrap;
+		width: 360px;
+	}
+	
+	.uni-share-content-item {
+		width: 90px;
+		/* #ifndef APP-NVUE */
+		display: flex;
+		/* #endif */
+		flex-direction: column;
+		justify-content: center;
+		padding: 10px 0;
+		align-items: center;
+	}
+	
+	.uni-share-content-item:active {
+		background-color: #f5f5f5;
+	}
+	
+	.uni-share-image {
+		width: 30px;
+		height: 30px;
+	}
+	
+	.uni-share-text {
+		margin-top: 10px;
+		font-size: 14px;
+		color: #3B4144;
+	}
+	
+	.uni-share-button-box {
+		/* #ifndef APP-NVUE */
+		display: flex;
+		/* #endif */
+		flex-direction: row;
+		padding: 10px 15px;
+	}
+	
+	.uni-share-button {
+		flex: 1;
+		border-radius: 50px;
+		color: #666;
+		font-size: 16px;
+	}
+	
+	.uni-share-button::after {
+		border-radius: 50px;
+	}
+</style>

+ 294 - 0
comps/uni-popup/uni-popup.vue

@@ -0,0 +1,294 @@
+<template>
+	<view v-if="showPopup" class="uni-popup" :class="[popupstyle]" @touchmove.stop.prevent="clear">
+		<uni-transition v-if="maskShow" :mode-class="['fade']" :styles="maskClass" :duration="duration" :show="showTrans"
+		 @click="onTap" />
+		<uni-transition :mode-class="ani" :styles="transClass" :duration="duration" :show="showTrans" @click="onTap">
+			<view class="uni-popup__wrapper-box" @click.stop="clear">
+				<slot />
+			</view>
+		</uni-transition>
+	</view>
+</template>
+
+<script>
+	import uniTransition from '../uni-transition/uni-transition.vue'
+	import popup from './popup.js'
+	/**
+	 * PopUp 弹出层
+	 * @description 弹出层组件,为了解决遮罩弹层的问题
+	 * @tutorial https://ext.dcloud.net.cn/plugin?id=329
+	 * @property {String} type = [top|center|bottom] 弹出方式
+	 * 	@value top 顶部弹出
+	 * 	@value center 中间弹出
+	 * 	@value bottom 底部弹出
+	 * 	@value message 消息提示
+	 * 	@value dialog 对话框
+	 * 	@value share 底部分享示例
+	 * @property {Boolean} animation = [ture|false] 是否开启动画
+	 * @property {Boolean} maskClick = [ture|false] 蒙版点击是否关闭弹窗
+	 * @event {Function} change 打开关闭弹窗触发,e={show: false}
+	 */
+
+	export default {
+		name: 'UniPopup',
+		components: {
+			uniTransition
+		},
+		props: {
+			// 开启动画
+			animation: {
+				type: Boolean,
+				default: true
+			},
+			// 弹出层类型,可选值,top: 顶部弹出层;bottom:底部弹出层;center:全屏弹出层
+			// message: 消息提示 ; dialog : 对话框
+			type: {
+				type: String,
+				default: 'center'
+			},
+			// maskClick
+			maskClick: {
+				type: Boolean,
+				default: true
+			}
+		},
+		provide() {
+			return {
+				popup: this
+			}
+		},
+		mixins: [popup],
+		watch: {
+			/**
+			 * 监听type类型
+			 */
+			type: {
+				handler: function(newVal) {
+					this[this.config[newVal]]()
+				},
+				immediate: true
+			},
+			/**
+			 * 监听遮罩是否可点击
+			 * @param {Object} val
+			 */
+			maskClick(val) {
+				this.mkclick = val
+			}
+		},
+		data() {
+			return {
+				duration: 300,
+				ani: [],
+				showPopup: false,
+				showTrans: false,
+				maskClass: {
+					'position': 'fixed',
+					'bottom': 0,
+					'top': 0,
+					'left': 0,
+					'right': 0,
+					'backgroundColor': 'rgba(0, 0, 0, 0.4)'
+				},
+				transClass: {
+					'position': 'fixed',
+					'left': 0,
+					'right': 0,
+				},
+				maskShow: true,
+				mkclick: true,
+				popupstyle: 'top'
+			}
+		},
+		created() {
+			this.mkclick = this.maskClick
+			if (this.animation) {
+				this.duration = 300
+			} else {
+				this.duration = 0
+			}
+		},
+		methods: {
+			clear(e) {
+				// TODO nvue 取消冒泡
+				e.stopPropagation()
+			},
+			open() {
+				this.showPopup = true
+				this.$nextTick(() => {
+					new Promise(resolve => {
+						clearTimeout(this.timer)
+						this.timer = setTimeout(() => {
+							this.showTrans = true
+							// fixed by mehaotian 兼容 app 端
+							this.$nextTick(() => {
+								resolve();
+							})
+						}, 50);
+					}).then(res => {
+						// 自定义打开事件
+						clearTimeout(this.msgtimer)
+						this.msgtimer = setTimeout(() => {
+							this.customOpen && this.customOpen()
+						}, 100)
+						this.$emit('change', {
+							show: true,
+							type: this.type
+						})
+					})
+				})
+			},
+			close(type) {
+				this.showTrans = false
+				this.$nextTick(() => {
+					this.$emit('change', {
+						show: false,
+						type: this.type
+					})
+					clearTimeout(this.timer)
+					// 自定义关闭事件
+					this.customOpen && this.customClose()
+					this.timer = setTimeout(() => {
+						this.showPopup = false
+					}, 300)
+				})
+			},
+			onTap() {
+				if (!this.mkclick) return
+				this.close()
+			},
+			/**
+			 * 顶部弹出样式处理
+			 */
+			top() {
+				this.popupstyle = 'top'
+				this.ani = ['slide-top']
+				this.transClass = {
+					'position': 'fixed',
+					'left': 0,
+					'right': 0,
+				}
+			},
+			/**
+			 * 底部弹出样式处理
+			 */
+			bottom() {
+				this.popupstyle = 'bottom'
+				this.ani = ['slide-bottom']
+				this.transClass = {
+					'position': 'fixed',
+					'left': 0,
+					'right': 0,
+					'bottom': 0
+				}
+			},
+			/**
+			 * 中间弹出样式处理
+			 */
+			center() {
+				this.popupstyle = 'center'
+				this.ani = ['zoom-out', 'fade']
+				this.transClass = {
+					'position': 'fixed',
+					/* #ifndef APP-NVUE */
+					'display': 'flex',
+					'flexDirection': 'column',
+					/* #endif */
+					'bottom': 0,
+					'left': 0,
+					'right': 0,
+					'top': 0,
+					'justifyContent': 'center',
+					'alignItems': 'center'
+				}
+			}
+		}
+	}
+</script>
+<style lang="scss" scoped>
+	.uni-popup {
+		position: fixed;
+		/* #ifndef APP-NVUE */
+		z-index: 99;
+		/* #endif */
+	}
+
+	.uni-popup__mask {
+		position: absolute;
+		top: 0;
+		bottom: 0;
+		left: 0;
+		right: 0;
+		background-color: $uni-bg-color-mask;
+		opacity: 0;
+	}
+
+	.mask-ani {
+		transition-property: opacity;
+		transition-duration: 0.2s;
+	}
+
+	.uni-top-mask {
+		opacity: 1;
+	}
+
+	.uni-bottom-mask {
+		opacity: 1;
+	}
+
+	.uni-center-mask {
+		opacity: 1;
+	}
+
+	.uni-popup__wrapper {
+		/* #ifndef APP-NVUE */
+		display: block;
+		/* #endif */
+		position: absolute;
+	}
+
+	.top {
+		/* #ifdef H5 */
+		top: var(--window-top);
+		/* #endif */
+		/* #ifndef H5 */
+		top: 0;
+		/* #endif */
+	}
+
+	.bottom {
+		bottom: 0;
+	}
+
+	.uni-popup__wrapper-box {
+		/* #ifndef APP-NVUE */
+		display: block;
+		/* #endif */
+		position: relative;
+		/* iphonex 等安全区设置,底部安全区适配 */
+		/* #ifndef APP-NVUE */
+		padding-bottom: constant(safe-area-inset-bottom);
+		padding-bottom: env(safe-area-inset-bottom);
+		/* #endif */
+	}
+
+	.content-ani {
+		// transition: transform 0.3s;
+		transition-property: transform, opacity;
+		transition-duration: 0.2s;
+	}
+
+
+	.uni-top-content {
+		transform: translateY(0);
+	}
+
+	.uni-bottom-content {
+		transform: translateY(0);
+	}
+
+	.uni-center-content {
+		transform: scale(1);
+		opacity: 1;
+	}
+</style>

+ 279 - 0
comps/uni-transition/uni-transition.vue

@@ -0,0 +1,279 @@
+<template>
+	<view v-if="isShow" ref="ani" class="uni-transition" :class="[ani.in]" :style="'transform:' +transform+';'+stylesObject"
+	 @click="change">
+		 <slot></slot>
+	</view>
+</template>
+
+<script>
+	// #ifdef APP-NVUE
+	const animation = uni.requireNativePlugin('animation');
+	// #endif
+	/**
+	 * Transition 过渡动画
+	 * @description 简单过渡动画组件
+	 * @tutorial https://ext.dcloud.net.cn/plugin?id=985
+	 * @property {Boolean} show = [false|true] 控制组件显示或隐藏
+     * @property {Array} modeClass = [fade|slide-top|slide-right|slide-bottom|slide-left|zoom-in|zoom-out] 过渡动画类型
+     *  @value fade 渐隐渐出过渡
+     *  @value slide-top 由上至下过渡
+     *  @value slide-right 由右至左过渡
+     *  @value slide-bottom 由下至上过渡
+     *  @value slide-left 由左至右过渡
+     *  @value zoom-in 由小到大过渡
+     *  @value zoom-out 由大到小过渡
+	 * @property {Number} duration 过渡动画持续时间
+	 * @property {Object} styles 组件样式,同 css 样式,注意带’-‘连接符的属性需要使用小驼峰写法如:`backgroundColor:red`
+	 */
+	export default {
+		name: 'uniTransition',
+		props: {
+			show: {
+				type: Boolean,
+				default: false
+			},
+			modeClass: {
+				type: Array,
+				default () {
+					return []
+				}
+			},
+			duration: {
+				type: Number,
+				default: 300
+			},
+			styles: {
+				type: Object,
+				default () {
+					return {}
+				}
+			}
+		},
+		data() {
+			return {
+				isShow: false,
+				transform: '',
+				ani: { in: '',
+					active: ''
+				}
+			};
+		},
+		watch: {
+			show: {
+				handler(newVal) {
+					if (newVal) {
+						this.open()
+					} else {
+						this.close()
+					}
+				},
+				immediate: true
+			}
+		},
+		computed: {
+			stylesObject() {
+				let styles = {
+					...this.styles,
+					'transition-duration': this.duration / 1000 + 's'
+				}
+				let transfrom = ''
+				for (let i in styles) {
+					let line = this.toLine(i)
+					transfrom += line + ':' + styles[i] + ';'
+				}
+				return transfrom
+			}
+		},
+		created() {
+			// this.timer = null
+			// this.nextTick = (time = 50) => new Promise(resolve => {
+			// 	clearTimeout(this.timer)
+			// 	this.timer = setTimeout(resolve, time)
+			// 	return this.timer
+			// });
+		},
+		methods: {
+			change() {
+				this.$emit('click', {
+					detail: this.isShow
+				})
+			},
+			open() {
+				clearTimeout(this.timer)
+				this.isShow = true
+				this.transform = ''
+				this.ani.in = ''
+				for (let i in this.getTranfrom(false)) {
+					if (i === 'opacity') {
+						this.ani.in = 'fade-in'
+					} else {
+						this.transform += `${this.getTranfrom(false)[i]} `
+					}
+				}
+				this.$nextTick(() => {
+					setTimeout(() => {
+						this._animation(true)
+					}, 50)
+				})
+
+			},
+			close(type) {
+				clearTimeout(this.timer)
+				this._animation(false)
+			},
+			_animation(type) {
+				let styles = this.getTranfrom(type)
+				// #ifdef APP-NVUE
+				if(!this.$refs['ani']) return
+				animation.transition(this.$refs['ani'].ref, {
+					styles,
+					duration: this.duration, //ms
+					timingFunction: 'ease',
+					needLayout: false,
+					delay: 0 //ms
+				}, () => {
+					if (!type) {
+						this.isShow = false
+					}
+					this.$emit('change', {
+						detail: this.isShow
+					})
+				})
+				// #endif
+				// #ifndef APP-NVUE
+				this.transform = ''
+				for (let i in styles) {
+					if (i === 'opacity') {
+						this.ani.in = `fade-${type?'out':'in'}`
+					} else {
+						this.transform += `${styles[i]} `
+					}
+				}
+				this.timer = setTimeout(() => {
+					if (!type) {
+						this.isShow = false
+					}
+					this.$emit('change', {
+						detail: this.isShow
+					})
+
+				}, this.duration)
+				// #endif
+
+			},
+			getTranfrom(type) {
+				let styles = {
+					transform: ''
+				}
+				this.modeClass.forEach((mode) => {
+					switch (mode) {
+						case 'fade':
+							styles.opacity = type ? 1 : 0
+							break;
+						case 'slide-top':
+							styles.transform += `translateY(${type?'0':'-100%'}) `
+							break;
+						case 'slide-right':
+							styles.transform += `translateX(${type?'0':'100%'}) `
+							break;
+						case 'slide-bottom':
+							styles.transform += `translateY(${type?'0':'100%'}) `
+							break;
+						case 'slide-left':
+							styles.transform += `translateX(${type?'0':'-100%'}) `
+							break;
+						case 'zoom-in':
+							styles.transform += `scale(${type?1:0.8}) `
+							break;
+						case 'zoom-out':
+							styles.transform += `scale(${type?1:1.2}) `
+							break;
+					}
+				})
+				return styles
+			},
+			_modeClassArr(type) {
+				let mode = this.modeClass
+				if (typeof(mode) !== "string") {
+					let modestr = ''
+					mode.forEach((item) => {
+						modestr += (item + '-' + type + ',')
+					})
+					return modestr.substr(0, modestr.length - 1)
+				} else {
+					return mode + '-' + type
+				}
+			},
+			// getEl(el) {
+			// 	console.log(el || el.ref || null);
+			// 	return el || el.ref || null
+			// },
+			toLine(name) {
+				return name.replace(/([A-Z])/g, "-$1").toLowerCase();
+			}
+		}
+	}
+</script>
+
+<style>
+	.uni-transition {
+		transition-timing-function: ease;
+		transition-duration: 0.3s;
+		transition-property: transform, opacity;
+	}
+
+	.fade-in {
+		opacity: 0;
+	}
+
+	.fade-active {
+		opacity: 1;
+	}
+
+	.slide-top-in {
+		/* transition-property: transform, opacity; */
+		transform: translateY(-100%);
+	}
+
+	.slide-top-active {
+		transform: translateY(0);
+		/* opacity: 1; */
+	}
+
+	.slide-right-in {
+		transform: translateX(100%);
+	}
+
+	.slide-right-active {
+		transform: translateX(0);
+	}
+
+	.slide-bottom-in {
+		transform: translateY(100%);
+	}
+
+	.slide-bottom-active {
+		transform: translateY(0);
+	}
+
+	.slide-left-in {
+		transform: translateX(-100%);
+	}
+
+	.slide-left-active {
+		transform: translateX(0);
+		opacity: 1;
+	}
+
+	.zoom-in-in {
+		transform: scale(0.8);
+	}
+
+	.zoom-out-active {
+		transform: scale(1);
+	}
+
+	.zoom-out-in {
+		transform: scale(1.2);
+	}
+</style>

+ 18 - 0
pages.json

@@ -573,6 +573,24 @@
             }
             
         }
+        ,{
+            "path" : "pages/myCar/myCar",
+            "style" :                                                                                    
+            {
+                "navigationBarTitleText": "我的车辆",
+				"enablePullDownRefresh": false
+            }
+            
+        }
+        ,{
+            "path" : "pages/myCar/add",
+            "style" :                                                                                    
+            {
+                "navigationBarTitleText": "添加车辆",
+                "enablePullDownRefresh": false
+            }
+            
+        }
     ],
 	 "subPackages": [{
 	 	"root": "pagesM/",

+ 10 - 0
pages/device/device.vue

@@ -38,6 +38,11 @@
 								</view>
 							</view>
 						</view>
+						<view class="footer-fixed">
+							<view class="margin">
+								<u-button type="primary" shape="circle" @click="subscribeMessage">订阅设备告警通知</u-button>
+							</view>
+						</view>
 					</scroll-view>
 				</swiper-item>
 				<swiper-item >
@@ -168,6 +173,11 @@
 				this.swiperCurrent = current;
 				this.subsectionCurrent = current;
 			},
+			//订阅消息通知
+			subscribeMessage() {
+				console.log("订阅消息")
+				this.$util.subscribe(["nSBYQTAe7wtQFPyHLXkacYF3IxwkYKjzWxsiVMzx-xM"]);
+			}
 		}
 	}
 </script>

+ 8 - 8
pages/index/index.vue

@@ -216,7 +216,7 @@
 			}
 		},
 		onShow() {
-			this.fetchNoticeList()
+			// this.fetchNoticeList()
 			//获取访客授权待审核的数量
 			if (this.canReset) this.fetchAuthRecordNum() 
 			this.canReset=true
@@ -422,7 +422,7 @@
 			  Promise.all([_this.getRoomByMemberId()]).then(result => {
 			    let value = _this.plotArray[e.detail.value];
 			    let residentialId = _this.residentialIdList[e.detail.value];
-				
+				_this.fetchNoticeList(residentialId);
 				let residentialList= uni.getStorageSync('residentialList')
 				
 				uni.setStorageSync("personTel", residentialList[e.detail.value].personTel);
@@ -486,10 +486,11 @@
 			    }
 			  });
 			},
-			fetchNoticeList(){
+			fetchNoticeList(id){
 				let that=this
 				let operation='notice/noticeList'
-				let params={}
+				let params = {}
+				params.residentialId = id;
 				app.globalData.postRequest(params, operation, function (res) {
 				  //获取成功
 				  that.noticeList=res.data.noticeList
@@ -532,6 +533,7 @@
 				  let res=await app.globalData.postRequestAsync(params, operation)
 				  if (res.data.result_code == 1) {
 				    app.globalData.member = res.data.member;
+					uni.setStorageSync("myPhone", res.data.member.tel);
 				    that.$u.vuex('vuex_member',res.data.member)
 				    app.globalData.anyHousePass = res.data.anyHousePass; //获取房屋列表
 				    _this.getRoomByMemberId();
@@ -571,6 +573,7 @@
 				let personTelList=[]
 				
 			    if (res.data.result_code == 1) {
+					that.fetchNoticeList(res.data.list[0].residentialId);
 					app.globalData.userId=res.data.list[0].userId
 			       res.data.list.map(item => {
 			        if (list.indexOf(item.residentialName) == -1) {
@@ -683,10 +686,7 @@
 			          break;
 			        case 3:
 			          //我的车辆
-			          uni.showToast({
-			          	title:"待开发",
-						icon:"none"
-			          })
+			          url = "/pages/myCar/myCar";
 			          break;
 			        case 4:
 			          //访客授权

+ 403 - 0
pages/myCar/add.vue

@@ -0,0 +1,403 @@
+<template>
+	<view>
+		<view class="form">
+			<view class="flex">
+				<image style="width: 35rpx;height: 35rpx;display: block;padding-top: 6rpx;padding-right: 10rpx;" src="/static/myCar/tag1.png" mode=""></image>
+				<text class="text-lg text-bold">请选择基本信息</text>
+			</view>
+			<view class="card">
+				<u-form :model="model"  ref="uForm" >
+					<u-form-item :required="true"  :label-width="labelWidth"   label="车牌号码" >
+						<u-input  type="text"  v-model="model.number" disabled @click="openKeyBoard"  placeholder="请填写车牌号码" ></u-input>
+					</u-form-item>
+					<u-form-item :required="true"  :label-width="labelWidth"   label="车辆类型" >
+						<u-input  type="select" :select-open="carTypeShow" v-model="carTypeLabel"  placeholder="请选择车辆类型" @click="carTypeShow=true"></u-input>
+					</u-form-item>
+					<u-form-item :required="true"  :label-width="labelWidth"   label="车辆性质" >
+						<u-input  type="select" :select-open="carPropertiesShow" v-model="carPropertiesLabel" placeholder="请选择车辆性质" @click="carPropertiesShow=true"></u-input>
+					</u-form-item>
+					<u-form-item :required="true"  :label-width="labelWidth"   label="燃油类别" >
+						<u-input  type="select" :select-open="fuelCategoryShow" v-model="fuelCategoryLabel" placeholder="请选择燃油类别" @click="fuelCategoryShow=true"></u-input>
+					</u-form-item>
+				</u-form>
+			</view>
+		</view>
+		<view class="form">
+			<view class="flex">
+				<image style="width: 35rpx;height: 35rpx;display: block;padding-top: 6rpx;padding-right: 10rpx;" src="/static/myCar/tag1.png" mode=""></image>
+				<text class="text-lg text-bold">请上传车辆照片</text>
+			</view>
+			<view class="card">
+				<view style="padding: 20rpx 0;" @click="chooseImage(1)"  class="flex justify-center ">
+					<view class=" ">
+						<upload-img
+						   :width="width"
+						   :height="height"
+						  :currentImage="model.carImg"
+						  bgsrc="/static/myCar/upload.png"
+						  >
+						</upload-img>
+						<view class="text-center  padding-top-20 base-color" >
+						 <text class="cuIcon-camera padding-right-sm" style="font-size: 30rpx;"></text>
+						 <text v-if="$isEmpty(model.carImg)">点击上传车辆照片</text>
+						 <text style="margin-top: 40rpx;display: inline-block;" v-else>点击重新上传</text>
+						</view>
+					</view>
+				</view>
+			</view>
+		</view>
+		<view class="form">
+			<view class="flex">
+				<image style="width: 35rpx;height: 35rpx;display: block;padding-top: 6rpx;padding-right: 10rpx;" src="/static/myCar/tag1.png" mode=""></image>
+				<text class="text-lg text-bold">请上传行驶证正面</text>
+			</view>
+			<view class="card">
+				<view style="padding: 20rpx 0;" @click="chooseImage(2)"  class="flex justify-center ">
+					<view class=" ">
+						<upload-img
+						   :width="width"
+						   :height="height"
+						  :currentImage="model.vehicleDrivingLicense1"
+						  bgsrc="/static/myCar/zm.png"
+						  >
+						</upload-img>
+						<view class="text-center  padding-top-20 base-color" >
+						 <text class="cuIcon-camera padding-right-sm" style="font-size: 30rpx;"></text>
+						 <text v-if="$isEmpty(model.carImg)">点击上传行驶证正面</text>
+						 <text style="margin-top: 40rpx;display: inline-block;" v-else>点击重新上传</text>
+						</view>
+					</view>
+				</view>
+			</view>
+		</view>
+		<view class="form">
+			<view class="flex">
+				<image style="width: 35rpx;height: 35rpx;display: block;padding-top: 6rpx;padding-right: 10rpx;" src="/static/myCar/tag1.png" mode=""></image>
+				<text class="text-lg text-bold">请上传行驶证反面</text>
+			</view>
+			<view class="card">
+				<view style="padding: 20rpx 0;" @click="chooseImage(3)"  class="flex justify-center ">
+					<view class=" ">
+						<upload-img
+						   :width="width"
+						   :height="height"
+						  :currentImage="model.vehicleDrivingLicense2"
+						  bgsrc="/static/myCar/fm.png"
+						  >
+						</upload-img>
+						<view class="text-center  padding-top-20 base-color" >
+						 <text class="cuIcon-camera padding-right-sm" style="font-size: 30rpx;"></text>
+						 <text v-if="$isEmpty(model.carImg)">点击上传行驶证反面</text>
+						 <text style="margin-top: 40rpx;display: inline-block;" v-else>点击重新上传</text>
+						</view>
+					</view>
+				</view>
+			</view>
+		</view>
+		
+		<view >
+			<view class="bg-white" style="height: 80rpx;"></view>
+			<view class="" @click="submit" style="width: 90%;margin: 0 auto ;margin-bottom: 10%;">
+				<view  class="cu-btn round base-bg-color" style="padding: 40rpx;width: 100%;" >
+					<text class="cuIcon-add"></text>
+					<text v-text="model.id?'重新审核':'确认添加'"></text>
+				</view>
+			</view>
+		</view>
+		<u-select @confirm="carTypeConfirm" v-model="carTypeShow" :list="carTypeList"></u-select>
+		<u-select @confirm="carPropertiesConfirm" v-model="carPropertiesShow" :list="carPropertiesList"></u-select>
+		<u-select @confirm="fuelCategoryConfirm" v-model="fuelCategoryShow" :list="fuelCategoryList"></u-select>
+		<keyboard-package z-index="999" ref="plateNumber" type="plateNumber"  @onInput="onInput" @onDelete="onDelete" @onConfirm="onConfirm"/>
+	</view>
+</template>
+
+<script>
+	import keyboardPackage from "@/comps/keyboard-package/keyboard-package.vue"
+	import uploadImg from '@/comps/uploadimg/uploadImg.vue'
+	var that;
+	var app = getApp();
+	export default {
+		components: {
+			uploadImg, keyboardPackage
+		},
+		data() {
+			return {
+				labelWidth:'200',
+				width:480,
+				height:320,
+				
+				//车牌号
+				carNoInputList:[],
+				
+				//车辆类型
+				carTypeList:[],
+				carTypeShow:false,
+				carTypeLabel:'',
+				
+				//车辆性质
+				carPropertiesList:[],
+				carPropertiesShow:false,
+				carPropertiesLabel:'',
+				
+				//燃油类别
+				fuelCategoryList:[],
+				fuelCategoryShow:false,
+				fuelCategoryLabel:'',
+				
+				model:{
+					type:'',//车辆类型的key
+					number:'',//车牌号
+					properties:'',//车辆性质的key,
+					fuelCategory:'',//燃油类别的key
+					carImg:'',//车辆照片
+					vehicleDrivingLicense1:'',//行驶证正面
+					vehicleDrivingLicense2:'',//行驶证反面
+					personId:'',
+					residentialId:'',
+				},
+			}
+		},
+		onLoad(options) {
+			that = this;
+			this.model.residentialId = uni.getStorageSync('residentialId')
+			this.model.personId = app.globalData.userId;
+			//获取字典
+			this.getDict()
+			this.parseParams(options)
+		},
+		computed: {
+			plateNumberStr() {
+				let str = '';
+				this.carNoInputList.forEach(item=>{
+					str += item.toString();
+				})
+				this.model.number=str
+				return str;
+			}
+		},
+		methods: {
+			parseParams(options){
+				if (this.$isEmpty(options)) {
+					return
+				}
+				this.model=options
+				this.carNoInputList=options.number.split('')
+				this.carTypeList.forEach(item=>{
+					if (item.value==options.type) {
+						this.carTypeLabel=item.label
+					}
+				})
+				this.carPropertiesList.forEach(item=>{
+					if (item.value==options.properties) {
+						this.carPropertiesLabel=item.label
+					}
+				})
+				this.fuelCategoryList.forEach(item=>{
+					if (item.value==options.fuelCategory) {
+						this.fuelCategoryLabel=item.label
+					}
+				})
+			},
+			submit(){
+				if (this.$isEmpty(this.model.number)) {
+					this.$u.toast('请填写车牌号')
+					return
+				}
+				if (this.$isEmpty(this.model.type)) {
+					this.$u.toast('请选择车辆类型')
+					return
+				}
+				if (this.$isEmpty(this.model.properties)) {
+					this.$u.toast('请选择车辆性质')
+					return
+				}
+				if (this.$isEmpty(this.model.fuelCategory)) {
+					this.$u.toast('请选择燃油类型')
+					return
+				}
+				if (this.$isEmpty(this.model.carImg)) {
+					this.$u.toast('请上传车辆照片')
+					return
+				}
+				if (this.$isEmpty(this.model.vehicleDrivingLicense1)) {
+					this.$u.toast('请上传行驶证正面')
+					return
+				}
+				if (this.$isEmpty(this.model.vehicleDrivingLicense2)) {
+					this.$u.toast('请上传行驶证反面')
+					return
+				}
+				let that = this;
+				let operation = 'car/saveOrUpdate';
+				app.globalData.postRequest(this.model, operation, function (res) {
+					console.log(res);
+					if (res.data.result) {
+						that.$util.showModal('操作成功!',false).then(res=>{
+							that.$util.isReloadAndBack()
+						})
+					} else {
+						that.$util.showModal("提交失败",false);
+					}
+				})
+			},
+			getDict() {
+				let carType = uni.getStorageSync("carType");
+				let carProperty = uni.getStorageSync("carProperty");
+				let fuelCategory = uni.getStorageSync("fuelCategory");
+				if (carType && carProperty && fuelCategory) {
+					this.carTypeList = carType;
+					this.carPropertiesList = carProperty;
+					this.fuelCategoryList = fuelCategory;
+					return;
+				}
+				
+				let operation = 'permissions/dict/getByCode?code=car_type';
+				let that = this;
+				let params = {};
+				//车辆类型
+				app.globalData.postRequest(params, operation, function (res) {
+					if (res.data.code != 200) {
+						app.globalData.oneFailHint(res.data.msg, function () {
+					    uni.switchTab({
+					    	url:"../index/index"
+					    })
+					  });
+					}
+					res.data.list.forEach((item) => {
+						let tmp = {
+							value: item.dictKey,
+							label: item.dictValue
+						}
+						that.carTypeList.push(tmp)
+					})
+				});
+				
+				//车辆性质
+				operation = "permissions/dict/getByCode?code=car_properties"
+				app.globalData.postRequest(params, operation, function (res) {
+					if (res.data.code != 200) {
+						app.globalData.oneFailHint(res.data.msg, function () {
+					    uni.switchTab({
+					    	url:"../index/index"
+					    })
+					  });
+					}
+					res.data.list.forEach((item) => {
+						let tmp = {
+							value:item.dictKey,
+							label:item.dictValue
+						}
+						that.carPropertiesList.push(tmp)
+					})
+				});
+				
+				//燃油类别
+				operation = "permissions/dict/getByCode?code=fuel_category"
+				app.globalData.postRequest(params, operation, function (res) {
+					if (res.data.code != 200) {
+						app.globalData.oneFailHint(res.data.msg, function () {
+					    uni.switchTab({
+					    	url:"../index/index"
+					    })
+					  });
+					}
+					res.data.list.forEach((item)=>{
+						let tmp = {
+							value:item.dictKey,
+							label:item.dictValue
+						}
+						that.fuelCategoryList.push(tmp);
+					})
+				});
+			},
+			carTypeConfirm(e){
+				this.model.type=e[0].value
+				this.carTypeLabel=e[0].label
+			},
+			carPropertiesConfirm(e){
+				this.model.properties=e[0].value
+				this.carPropertiesLabel=e[0].label
+			},
+			fuelCategoryConfirm(e){
+				this.model.fuelCategory=e[0].value
+				this.fuelCategoryLabel=e[0].label
+			},
+			//上传图片
+			chooseImage(type) {
+			  uni.chooseImage({
+			    count: 1,
+			    //最多可以选择的图片张数,默认9
+			    sourceType: ['album'],
+			    sizeType: ['compressed'],
+			    //可选择原图或压缩后的图片
+			    success: res => {
+					this.uploadImage(res.tempFilePaths[0], type);
+			    }
+			  });
+			},
+			/**上传图片
+			 * @param {Object} imgUrl 图片url
+			 */
+			uploadImage(imgUrl, type) {
+				var that = this;
+				//是否需要md5加密上传人脸照
+				let is_need_md5 = false;
+				uni.getFileSystemManager().readFile({
+				  filePath: imgUrl,
+				  //选择图片返回的相对路径
+				  encoding: 'base64',
+				  //编码格式
+				  success: res => {
+				    //成功的回调
+				    app.globalData.uploadBase64('data:image/jpeg;base64,' + res.data, is_need_md5, function (result) {
+						if (type == 1) {
+							that.model.carImg = result.data.showUri;
+						} else if (type == 2) {
+							that.model.vehicleDrivingLicense1 = result.data.showUri;
+						} else if (type == 3) {
+							that.model.vehicleDrivingLicense2 = result.data.showUri;
+						}
+				    });
+				  }
+				});
+			},
+			//车牌号键盘
+			onInput(val){
+				this.carNoInputList.push(val)
+			},
+			onDelete(){
+				this.carNoInputList.pop();
+			},
+			onConfirm(){
+				this.model.number=this.plateNumberStr
+			},
+			openKeyBoard() {
+				this.$refs.plateNumber.open();
+			},
+		}
+	}
+</script>
+
+<style>
+	page{
+		background-color: #FFFFFF;
+	}
+</style>
+
+<style lang="scss" scoped>
+	.form {
+		padding: 40rpx 30rpx;
+		.card {
+			margin-top: 20rpx;
+			padding: 0 30rpx;
+			box-sizing: border-box;
+			border-radius: 12rpx;
+			box-shadow: 0 -10rpx rgba(248, 248, 248,.9) ,0 10rpx rgba(248, 248, 248,.9) , -10rpx 0rpx rgba(248, 248, 248,.9) ,10rpx 0rpx rgba(248, 248, 248,.9);
+			.item {
+				padding:30rpx 0;
+				display: flex;
+				justify-content: space-between;
+			}
+		}
+	}
+</style>

+ 369 - 0
pages/myCar/myCar.vue

@@ -0,0 +1,369 @@
+<template>
+	<view>
+		<mescroll-body ref="mescrollRef" @init="mescrollInit" @down="downCallback" @up="upCallback" :down="downOption" :up="upOption">
+			<!-- <myCarCard @delItem="delItem" :list="list"></myCarCard> -->
+			<u-popup v-model="detailShow" mode="center" width="670" :closeable="true" border-radius="10">
+				<view style="padding: 60rpx 5rpx 40rpx;">
+					<u-cell-group >
+						<u-cell-item :icon-style="iconStyle"  :border-top="false" :arrow="false"  icon="eye-fill"  title="车牌号码:" :value="detailData.number"></u-cell-item>
+						<u-cell-item :key="index" v-for="(item,index) in carTypeList" v-if="item.value==detailData.type"  :value="item.label" :icon-style="iconStyle"  :arrow="false"  icon="car-fill"  title="车辆类型:" ></u-cell-item>
+						<u-cell-item :key="index" v-for="(item,index) in carPropertiesList" v-if="item.value==detailData.properties"  :value="item.label" :icon-style="iconStyle"  :arrow="false"  icon="error-circle-fill"  title="车辆性质:" ></u-cell-item>
+						<u-cell-item value-style="{'color':'#5064eb'}" :key="index" v-for="(item,index) in fuelCategoryList"  v-if="item.value==detailData.fuelCategory"  :value="item.label" :icon-style="iconStyle"  :border-bottom="false" :arrow="false"  icon="grid-fill"  title="燃油类别:" ></u-cell-item>
+						<u-cell-item v-if="detailData.opinion" :icon-style="iconStyle"  :border-top="false" :arrow="false"  icon="more-circle-fill"  title="审核意见:" :value="detailData.opinion"></u-cell-item>
+					</u-cell-group>
+					<view class="detail-img">
+						<view @click.stop="$util.preview(detailData.vehicleDrivingLicense1)">
+							<text>行驶证【正面】</text>
+							<image style="width: 100%;height: 300rpx" :src="detailData.vehicleDrivingLicense1" mode=""></image>
+						</view>
+						<view @click.stop="$util.preview(detailData.vehicleDrivingLicense2)">
+							<text>行驶证【反面】</text>
+							<image style="width: 100%;height: 300rpx" :src="detailData.vehicleDrivingLicense2" mode=""></image>
+						</view>
+					</view>
+				</view>
+			</u-popup>
+			
+			<block v-if="list.length > 0">
+				<view @click="detailData=item;detailShow=true" class="card" v-for="(item,index) in list" :key="index">
+					<view class="top" >
+						<text class="number">车牌号:{{item.number}}</text>
+						<!-- <text @click.stop="jump('/pages/index/car/list?carNo='+item.number)" style="text-decoration: underline;margin-top: 10rpx;">出入记录</text> -->
+					</view>
+					<view class="center">
+						<view style="display: flex;">
+							<view @click.stop="$util.preview(item.carImg)" class="justify-center align-center">
+								<image :src="item.carImg" mode=""></image>
+							</view>
+							<view class="content">
+								<text class="padding-bottom-10">车主姓名:{{item.personName}}</text>
+								<text class="padding-bottom-10">车主电话:{{item.personPhone}}</text>
+								<view class="padding-bottom-10">
+									审核状态:
+									<text style="color: #008f69;" v-if="item.auditStatus==1">已通过</text>
+									<text style="color: #ea7500;" v-if="item.auditStatus==0">待审核</text>
+									<text style="color: #da0000;" v-if="item.auditStatus==-1">未通过</text>
+								</view>
+							</view>
+						</view>
+						
+					</view>
+					<view class="bottom" >
+						<view @click.stop="edit(item)" style="font-size: 22rpx;" class="cu-btn  sm round  base-line margin-right-20" >
+							<u-icon name="edit-pen-fill" style="padding-right: 10rpx;"></u-icon>
+							编辑
+						</view>
+						<!-- <view @click.stop="delItem(item)" style="font-size: 22rpx;" class="cu-btn  sm round red-line" >
+							<u-icon name="edit-pen-fill" style="padding-right: 10rpx;"></u-icon>
+							删除
+						</view> -->
+					</view>
+				</view>
+			</block>
+			<block v-else>
+				<DtEmpty type="1" wrapBgColor="#f1f1f1"></DtEmpty>
+			</block>
+			<view style="height: 80rpx;" v-if="status">
+				<u-divider bgColor="#f1f1f1;"  height="80">到底了</u-divider>
+			</view>
+		</mescroll-body>
+		<view class="addCar" @click="add">
+			<u-icon name="plus-circle-fill" size="70" color="#5064eb"></u-icon>
+		</view>
+	</view>
+</template>
+
+<script>
+	import MescrollMixin from "@/comps/mescroll-body/mescroll-mixins.js";
+	import DtEmpty from '@/comps/dt_empty.vue';
+	var app = getApp();
+	export default {
+		mixins: [MescrollMixin], // 使用mixin
+		components: {
+			DtEmpty
+		},
+		data() {
+			return {
+				list: [],
+				iconStyle: {
+					color: '#5064eb'
+				},
+				page: {
+					current: 1,
+					size:30,
+				},
+				status: false,
+				//详情
+				detailShow: false,
+				detailData: {},		
+				carTypeList: [],
+				carPropertiesList: [],
+				fuelCategoryList: []
+			}
+		},
+		onLoad() {
+			// this.personId = this.$cache.get('userId');
+			this.getDict();
+		},
+		onShow() {
+			//刷新mescroll数据
+			this.$util.reload(this.mescroll);
+		},
+		methods: {
+			add() {
+				uni.navigateTo({
+					url: "add"
+				})
+			},
+			delItem(item) {
+				this.$util.showModal('确认要删除此记录吗?').then(res => {
+					// this.$api.car.carRemove(item.id).then(res => {
+					// 	if (res.success == true) {
+					// 		this.$u.toast('操作成功')
+					// 		this.mescroll.resetUpScroll();
+					// 	} else {
+					// 		this.$util.showModal(res.msg, false)
+					// 	}
+					// })
+				})
+			},
+			edit(item) {
+				//重新编辑,审核状态重置为0
+				let params = {
+					id: item.id,
+					auditOpinion: "",
+					auditStatus: 0,
+					carImg: item.carImg,
+					fuelCategory: item.fuelCategory,
+					number: item.number,
+					properties: item.properties,
+					type: item.type,
+					vehicleDrivingLicense1: item.vehicleDrivingLicense1,
+					vehicleDrivingLicense2: item.vehicleDrivingLicense2
+				}
+				console.log(params);
+				uni.navigateTo({
+					url:"/pages/myCar/add"+this.$u.queryParams(params)
+				})
+			},
+			jump(url) {
+				if (!this.$isEmpty(url)) {
+					uni.navigateTo({
+						url
+					})
+				}
+			},
+			getDict() {
+				let carType = uni.getStorageSync("carType");
+				let carProperty = uni.getStorageSync("carProperty");
+				let fuelCategory = uni.getStorageSync("fuelCategory");
+				if (carType && carProperty && fuelCategory) {
+					this.carTypeList = carType;
+					this.carPropertiesList = carProperty;
+					this.fuelCategoryList = fuelCategory;
+					return;
+				}
+				
+				let operation = 'permissions/dict/getByCode?code=car_type';
+				let that = this;
+				let params = {};
+				//车辆类型
+				app.globalData.postRequest(params, operation, function (res) {
+					if (res.data.code != 200) {
+						app.globalData.oneFailHint(res.data.msg, function () {
+					    uni.switchTab({
+					    	url:"../index/index"
+					    })
+					  });
+					}
+					res.data.list.forEach((item) => {
+						let tmp = {
+							value: item.dictKey,
+							label: item.dictValue
+						}
+						that.carTypeList.push(tmp)
+					})
+					uni.setStorageSync("carType",that.carTypeList)
+				});
+				
+				//车辆性质
+				operation = "permissions/dict/getByCode?code=car_properties"
+				app.globalData.postRequest(params, operation, function (res) {
+					if (res.data.code != 200) {
+						app.globalData.oneFailHint(res.data.msg, function () {
+					    uni.switchTab({
+					    	url:"../index/index"
+					    })
+					  });
+					}
+					res.data.list.forEach((item) => {
+						let tmp = {
+							value:item.dictKey,
+							label:item.dictValue
+						}
+						that.carPropertiesList.push(tmp)
+					})
+					uni.setStorageSync("carProperty",that.carPropertiesList)
+				});
+				
+				//燃油类别
+				operation = "permissions/dict/getByCode?code=fuel_category"
+				app.globalData.postRequest(params, operation, function (res) {
+					if (res.data.code != 200) {
+						app.globalData.oneFailHint(res.data.msg, function () {
+					    uni.switchTab({
+					    	url:"../index/index"
+					    })
+					  });
+					}
+					res.data.list.forEach((item)=>{
+						let tmp = {
+							value:item.dictKey,
+							label:item.dictValue
+						}
+						that.fuelCategoryList.push(tmp);
+					})
+					uni.setStorageSync("fuelCategory",that.fuelCategoryList)
+				});
+			},
+			downCallback(mescroll){
+				setTimeout(()=>{
+					this.mescroll.resetUpScroll()
+				},1500)
+			},
+			upCallback(mescroll) {
+				let that = this;
+				let params = {
+					page: {
+						current: mescroll.num,
+						size: 20,
+					},
+					// selectType: 3,//员工,我的车辆
+					personPhone:uni.getStorageSync("myPhone")
+				}
+				let operation = 'car/page';
+				try {
+					app.globalData.postRequest(params, operation, function (res) {
+						console.log(res);
+						let data = res.data.carPage.records
+						let total = res.data.carPage.total;
+						mescroll.endBySize(data.length, total);
+						if (mescroll.num == 1) {
+							that.list = []; //如果是第一页需手动制空列表
+						}
+						that.list = that.list.concat(data); //追加新数据
+					});
+				} catch(e) {
+					this.mescroll.endErr()
+				}
+			}
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+	
+	.detail-img {
+		display: flex;
+		justify-content: space-around;
+		text-align: center;
+		color: #707175;
+		
+		view {
+			display: flex;
+			flex-direction: column;
+			width: 48%;
+			height: 300rpx;
+			
+			text{
+				padding: 10rpx 0;
+			}
+		}
+	}
+	
+	.addCar {
+		width: 100upx;
+		height: 90upx;
+		border-radius: 60upx 0 0 60upx;
+		position: fixed;
+		bottom: 200upx;
+		right: 0;
+		z-index: 999;
+		display: flex;
+		justify-content: center;
+		align-items: center;
+		background: #ffffff;
+		box-shadow: -4upx -4upx 30upx #888888;
+	}
+	
+	.base-line{
+		font-weight: 800;
+		color: #5064eb;
+		border: 1rpx solid #5064eb;
+	}
+	
+	.red-line{
+		font-weight: 800;
+		color: #da0000;
+		border: 1rpx solid #da0000;
+	}
+	
+	.card {
+		background-color: #FFFFFF;
+		margin: 20rpx;
+		padding: 0 40rpx;
+		border-radius: 20rpx;
+		display: flex;
+		flex-direction: column;
+		image{
+			width: 120rpx;
+			height: 120rpx;
+		}
+		
+		.top {
+			display: flex;
+			justify-content: space-between;
+			padding: 20rpx 0 20rpx 0rpx;
+			border-bottom: 1rpx solid #e5e5e5;
+			.number {
+				font-size: 34rpx;
+			}
+			
+			.audit {
+				font-size: 30rpx;
+			}
+		}
+		
+		.center {
+			padding: 40rpx 0;
+			border-bottom: 1rpx solid #e5e5e5;
+			display: flex;
+			justify-content: space-between;
+			.content {
+				padding-left: 30rpx;
+				display: flex;
+				flex-direction: column;
+				font-size: 30rpx;
+				
+				text {
+					padding-bottom: 10rpx;
+				}
+				
+			}
+			.record {
+				display: flex;
+				justify-content: center;
+				align-items: center;
+				color: #545454;
+			}
+			
+		}
+		
+		.bottom {
+			display: flex;
+			justify-content: flex-end;
+			padding: 20rpx 0;
+		}
+	}
+</style>
+

+ 1 - 0
pages/notice/notice.vue

@@ -138,6 +138,7 @@
 						let that=this
 						let operation='notice/noticeList'
 						let params={}
+						params.residentialId = uni.getStorageSync("residentialId");
 						app.globalData.postRequest(params, operation, function (res) {
 						  //获取成功
 						  done(res.data.noticeList);

TEMPAT SAMPAH
static/delete.png


TEMPAT SAMPAH
static/myCar/fm.png


TEMPAT SAMPAH
static/myCar/tag1.png


TEMPAT SAMPAH
static/myCar/upload.png


TEMPAT SAMPAH
static/myCar/zm.png


+ 1 - 0
uni.scss

@@ -21,6 +21,7 @@ $rgba-09 : rgba(212,58,57,0.9); // 基础色透明度0.8
 /* 颜色变量 */
 
 /* 行为相关颜色 */
+$base-color:#5064eb;
 $dt-color-blue: #3250E8;
 $dt-color-primary: #E42F2F;
 $dt-color-success: #4cd964;

+ 68 - 0
utils/util2.js

@@ -421,4 +421,72 @@ util.updateManager = () => {
     })
   }
 }
+
+util.preview=async (src)=> {
+	const urls = typeof src === 'string' ? [src] : src
+	const filePath = async src => src.match(/^http/) ? src : (await uni.compressImage({ src, quality: 100 }))[1].tempFilePath
+	for (let i = 0; i < urls.length; i++) {
+		urls[i] = await filePath(urls[i])
+	}
+	uni.previewImage({ urls })
+}
+
+/**
+ * 订阅认证信息
+ */
+util.subscribe = (tmplIds) => {
+	return new Promise((resolve, reject) => {
+	  uni.requestSubscribeMessage({
+		tmplIds,
+		success(res) {
+		  resolve(res)
+		},
+		fail(err) {
+		  reject(err)
+		}
+	  })
+	})
+}
+
+//回到上一页刷新页面
+util.isReloadAndBack = () => {
+    let prePage=util.getPageCtx(1)
+	prePage.setData({
+		"reload":true
+	})
+	uni.navigateBack({
+		delta:1
+	})
+}
+
+//onshow方法通过刷新mescroll数据
+util.reload = (mescroll) => {
+    let page= util.getPageCtx()
+    if (page.data.reload) {
+    	mescroll.resetUpScroll();
+    	page.data.reload=false  
+    }
+}
+
+util.showModal=(content,isShowCancel=true,title='提示',)=>{
+    return new Promise((resolve,reject)=>{
+        uni.showModal({
+			title: title,
+			content: content,
+			showCancel:isShowCancel,
+			success: (res)=>{
+				if (res.confirm) {
+					resolve(res)
+				} 
+			}
+		});
+	})
+}
+
+util.showLoading=(title='加载中...')=>{
+	uni.showLoading({
+		title
+	})
+}
+
 export default util