Blame view

pages/minorsos/minorsos.vue 1.78 KB
1f3f2378   起风了   我的第一次
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
  <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>