zhangwei
2024-09-06 b172667f354f7f00fe14809e66cbf12362fbc646
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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
<template>
    <view class="content">
        <view class="chuany-flex chuany-flex-direction chuany-paddingbottom-100 chuany-align-center">
            <view class="logo">
                <image mode="widthFix" src="/static/boss.png"></image>
            </view>
            <text class="title chuany-padding18 c-m-t-10">欢迎来到寿安工业区</text>
            <text class="title"> </text>
            <text class="title">兼职用工信息发布平台</text>
        </view>
        <view class="titlecon chuany-flex chuany-align-center" @click="goEnterprise">
            <view class="logo">
                <image mode="widthFix" src="/static/logo.png"></image>
            </view>
            <view class="chuany-flex chuany-justify-between chuany-paddingleft-28 vwidth">
                <text class="chuany-font36">我是企业</text>
                <up-icon name="arrow-right" color="#1f1f1f"></up-icon>
                <!-- <text class="chuany-font13 titletext">给您推荐附近好工作</text> -->
            </view>
        </view>
        <view class="titlecon chuany-flex chuany-align-center c-m-b-140" @click="goWorker">
            <view class="logo">
                <image mode="widthFix" src="/static/worker.png"></image>
            </view>
            <view class="chuany-flex chuany-justify-between chuany-paddingleft-28 vwidth">
                <text class="chuany-font36">我是工人</text>
                <up-icon name="arrow-right" color="#1f1f1f"></up-icon>
                <!-- <text class="chuany-font13 titletext">免费发布招工,工人主动联系你</text> -->
            </view>
        </view>
    </view>
</template>
 
<script>
    export default {
        data() {
            return {
                title: 'Hello'
            }
        },
        onLoad() {
            uni.getStorage({
                key: 'identity',
                success: function (res) {
                    console.log('identity',res.data);
                    if(res.data){
                        uni.switchTab({
                            url: '/pages/index/index'
                        });
                    }
                }
            });
        },
        methods: {
            goEnterprise() {
                uni.setStorage({
                    key: 'identity',
                    data: 'enterprise',
                    success: function () {
                        uni.switchTab({
                            url: '/pages/index/index'
                        });
                    }
                });
                
            },
            goWorker() {
                uni.setStorage({
                    key: 'identity',
                    data: 'worker',
                    success: function () {
                        uni.switchTab({
                            url: '/pages/index/index'
                        });
                    }
                });
                
            }
        }
    }
</script>
 
<style lang="scss">
    .content {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        background: linear-gradient(to bottom, #B4DEFF, #ffffff);
        height: 100vh;
    }
 
    .logo {
        height: 160rpx;
        width: 160rpx;
        /* margin-top: 200rpx; */
        /* margin-left: auto;
        margin-right: auto; */
        /* margin-bottom: 50rpx; */
        overflow: hidden;
 
        /* 超出容器的图片部分将被隐藏 */
        image {
            width: 80%;
            /* 图片宽度自适应容器宽度 */
            height: 100%;
            /* 图片高度自适应容器高度 */
            object-fit: cover;
            /* 图片将覆盖整个容器,可能被裁剪 */
        }
    }
 
    /* .text-area {
        display: flex;
        justify-content: center;
    } */
    .titlecon {
        width: 91%;
        box-sizing: border-box;
        background-color: #fff;
        border-radius: 30rpx;
        margin-bottom: 60rpx;
        padding: 25rpx;
    }
 
    .title {
        font-size: 32rpx;
        color: #333333;
    }
 
    .titletext {
        color: #8c8d8f;
    }
 
    .vwidth {
        width: 70%;
    }
</style>