张晓波
2023-09-19 164694c47c35d6654df69b533e8dbf8b5423efc5
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
<template>
    <view class="user_index">
        <view class="user_index_info">
            <text class="info_title">{{userData.examName}}</text>
            <view class="user_info_user">
                <view style="margin-bottom: 10px;">答题人</view>
                <u-icon 
                    name="account-fill"
                    color="#1976FF"
                    size="22px"
                    :label="realName"
                    labelSize="22px"
                    labelColor="#1976FF">
                </u-icon>
            </view>
            <view class="user_info_button">
                <u-button type="primary" color="#1976FF" text="开始答题" @click="startCheck()"></u-button>
            </view>
        </view>
    </view>
</template>
 
<script>
    export default {
        data() {
            return {
                userData: {},
                realName: ''
            }
        },
        onLoad(option) {
            const data = JSON.parse(option.data);
            this.userData = data;
            this.realName = uni.getStorageSync('realName');
            console.log(data,'=====');
        },
        methods: {
            // 开始答题
            startCheck() {
                uni.navigateTo({
                    url: './topic?examId=' + this.userData.examId
                })
            }
        }
    }
</script>
 
<style scoped lang="scss">
.user_index {
    height: 100vh;
    padding: 10px 10px 0;
    background: #DBDDDF;
    height: calc(100vh - 10px);
    
    .user_index_info {
        display: flex;
        flex-direction: column;
        align-items: center;
        padding: 30px 15px;
        background: #FFFFFF;
        border-radius: 8px;
        
        .info_title {
            font-size: 20px;
        }
    }
    
    .user_info_user {
        margin: 40px 0 50px;
        color: #9E9E9E;
        font-size: 14px;
        
        &>view {
            text-align: center;
        }
    }
    
    .user_info_button {
        width: 100%;
    }
}
</style>