minorsos.vue 1.78 KB
<template>
	<view class="page">
		<pyh-nv ref="nv" :config="nvConfig"></pyh-nv>
		<view class="listBox" :style="{'padding-top':(pageTop+'px')}">
		<view class="content">
		<!-- 列表 -->
		<view class="user-list">
			<view class="list" @click="minorsosdetail(item)" v-for="item in childData" :key="item.id">
				<view class="title">
					<text>呼叫时间:{{item.emergencyTime}}</text>
				</view>
				<view class="more-content">
					<view class="more-content-img"><image src="../../static/right.png"></image></view>
				</view>
			</view>
		</view>
		</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				nvConfig:{
					title:"SOS呼叫记录",
					bgColor:"#ffffff",
					color:"#000000",
					fixedAssist:{
						hide:true,
					},
				},
				query:{
					phone: '',
					userId: ''
				},
				childData: [],
			}
		},
		onPageScroll(e) {this.$refs.nv.pageScroll(e)},
		computed:{
			pageTop(){return parseInt(88*uni.getSystemInfoSync().windowWidth/750) + uni.getSystemInfoSync().statusBarHeight}
		},
		onLoad() {
			var that = this;
			uni.getSystemInfo({
				success: function(res) {
					that.screenHeight = res.safeArea.height + 'px'
				}
			})
			this.getChild();
		},
		methods:{
			minorsosdetail(item) {
				console.log(item)
				uni.navigateTo({
					url: '/pages/minorsosdetail/minorsosdetail?obj='+ encodeURIComponent(JSON.stringify(item))
				})
			},
			getChild() {
				this.query.phone = uni.getStorageSync("USERS_KEY").phonenumber;
				console.log("userinfo",this.query.phone);
				this.API.getChild(this.query).then(res => {
					this.childData = res.data.chiStaySosEmergencyCallPos;
				})
			},
		}
	}
</script>

<style scoped lang="scss">
	@import 'minorsos.scss';
</style>