userJoin.vue
1.2 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
<template>
<view class="content">
<view class="itemBox" v-for="(item,index) in list" :key="index" @click="goDetail(item.id)">
{{item.name}}
</view>
<!-- <view class="noData" v-if="list.length==0">
暂无结果
</view> -->
</view>
</template>
<script>
import request from '../../utils/request.js'
export default {
data() {
return {
token:'',
list:[]
}
},
onShow() {
this.getList()
},
methods:{
getList(){
request.post('/api/index/certificateList',{}).then(res=>{
this.list=res.data
console.log(res,'res')
console.log(res.data,'data')
console.log(this.list,'list')
}).catch(err=>{
})
},
goDetail(id){
uni.navigateTo({
url:'/pages/index/result-detail?id='+id+'&token='+uni.getStorageSync('token')
})
}
}
}
</script>
<style>
.content {
min-height: 100vh;
width: 100%;
background: #f2f3f5;
}
.itemBox{
padding: 30rpx;
box-sizing: border-box;
font-size:32rpx;
color:#1d4582;
font-weight: 600;
margin-bottom:24rpx;
background-color: #fff;
}
.noData{
width:300rpx;
height: 500rpx;
line-height: 500rpx;
text-align: center;
margin: 0 auto;
font-size: 30rpx;
color: #b8b8b8;
}
</style>