mydeath.vue
2.33 KB
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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
<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="order-list">
<view class="list" v-for="(item,index) in list" @click="onOrderList" :key="index">
<view class="title-status">
<view class="title">
<text>逝者编号:{{item.orderNumber}}</text>
<image src="../../static/right1.png"></image>
</view>
<view class="status">
<text>待评价</text>
</view>
</view>
<view class="goods-list">
<view class="goods">
<view class="item">
<view class="goods-name">
<view class="goods-name-title">逝者姓名:{{item.deceasedName}}</view>
<view>创建时间:{{item.createdTime}}</view>
</view>
</view>
</view>
</view>
<view class="status-btn">
<view></view>
<view class="btn" @click="mydeathdetail(item)">
<image src="../../static/btn.png" mode="widthFix"></image>
<text>查看详情</text>
</view>
</view>
</view>
</view>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
OrderType: 0,
nvConfig: {
title: "报丧记录",
bgColor: "#ffffff",
color: "#000000",
fixedAssist: {
hide: true,
},
},
info:{
pageNum:1,
pageSize:10,
userId:"",
},
list:[],
};
},
onPageScroll(e) {
this.$refs.nv.pageScroll(e)
},
computed: {
pageTop() {
return parseInt(88 * uni.getSystemInfoSync().windowWidth / 750) + uni.getSystemInfoSync().statusBarHeight
}
},
onLoad(params) {
this.OrderType = params.type;
this.getinfo();
},
methods: {
mydeathdetail(item) {
var info = JSON.stringify(item)
uni.navigateTo({
url: '/pages/mydeathdetail/mydeathdetail?info=' + info
})
},
getinfo(){
this.info.userId = uni.getStorageSync("USERS_KEY").userId
console.log("user",uni.getStorageSync("USERS_KEY"));
this.API.getwsyy(this.info).then(res=>{
console.log("获取网上报丧信息",res);
for(let i = 0;i < res.rows.length;i++){
this.list.push(res.rows[i])
}
})
},
}
}
</script>
<style scoped lang="scss">
@import 'mydeath.scss';
</style>