userJoin.vue 1.2 KB
<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>