159 lines
6.2 KiB
Vue
Raw Normal View History

2024-01-29 09:26:07 +08:00
<template>
2024-01-31 11:50:30 +08:00
<div style="background-color: #EFEFEF;width: 100%;">
<div style="padding: 0rem 9rem;color: #A1A1A1;font-size: 0.75rem;height: 2.125rem;line-height: 2.125rem;">
<n-flex justify="space-between">
<div>您好欢迎来到洛阳百姓问政</div>
<div v-if="userPhone==''" style="cursor: pointer" @click="tn('/login')">
<span style="color:#7B83FF">登录</span><span style="color:#7B83FF">注册</span>
</div>
<div v-if="userPhone!=''" style="cursor: pointer" @click="tn('/login')">
<span @click="tn('/user');">{{userPhone}}</span><span @click="quit" style="color:#7B83FF;margin-left: 20px">退出</span>
</div>
</n-flex>
</div>
</div>
<div class="b1-back">
<div style="padding:0 0 0 9rem;font-weight: 600;">
<div>
2024-01-29 17:57:41 +08:00
<div style="font-size: 2.5rem;color: #FFFFFF;;">洛阳百姓问政</div>
<div style="font-size: 1.19rem;color: #FFFFFF;letter-spacing: 0.52rem;margin-top: -0.9rem;">
wz.lytv.com.cn
</div>
</div>
<div style="position: absolute;text-align: center;top: 25px;left: 405px">
<img src="/src/assets/img/logo.png" style="width: 45px">
<div style="color: #FFFFFF;font-size: 12px">洛阳广播电视台</div>
</div>
2024-01-31 11:50:30 +08:00
</div>
<div style="font-weight: 600;padding:0px 9rem;">
<n-input-group>
<n-input placeholder="请输入想找的问题" style="width: 17rem;"/>
<n-flex :size="[1,0]">
<div>
<n-button :round="false" :bordered="false" color="#0051B1">
搜索
</n-button>
</div>
<div>
<n-button :theme-overrides="buttonThemeOverrides" :round="false" color="#0051B1">
<img src="../assets/img/brush.png" style="width: 1.5625rem;height: 1.5625rem;">
<span style="margin-left: 0.625rem;">我要投诉</span>
</n-button>
</div>
</n-flex>
</n-input-group>
</div>
</div>
<div style="padding: 5px 0px;">
<n-flex justify="center" align="center" :size="[141,10]">
<div class="left-line"></div>
<n-button @click="tn('/')" text color="#0051B1">
<template #default>
<span style="font-weight: 600;font-size: 1.25rem;">首页</span>
</template>
</n-button>
<div class="left-line"></div>
<n-button text color="#000000">
<template #default>
<span style="font-size: 1.25rem;">部门</span>
</template>
</n-button>
<div class="left-line"></div>
<n-button text color="#000000">
<template #default>
<span style="font-size: 1.25rem;">提问</span>
</template>
</n-button>
<div class="left-line"></div>
<n-button text color="#000000">
<template #default>
<span style="font-size: 1.25rem;">直播</span>
</template>
</n-button>
<div class="left-line"></div>
<n-button @click="tn('/user')" text color="#000000">
<template #default>
<span style="font-size: 1.25rem;">我的</span>
</template>
</n-button>
<div class="left-line"></div>
</n-flex>
</div>
<div style="width: 100%;background-color: #7261D9;height: 0.05rem;opacity: 0.35;"></div>
<div style="background: #D9D9D9;width: 120px;height: 180px;text-align: center;padding: 5px 0px 10px 0px;position: fixed;top: 40%;left: 10px">
<div style="text-align: right;padding-right: 5px">
<svg style="width: 20px;height: 20px;color: #999797" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 512 512"><path d="M256 48C141.31 48 48 141.31 48 256s93.31 208 208 208s208-93.31 208-208S370.69 48 256 48zm86.63 272L320 342.63l-64-64l-64 64L169.37 320l64-64l-64-64L192 169.37l64 64l64-64L342.63 192l-64 64z" fill="currentColor"></path></svg>
</div>
<div style="color: #0051B1;font-size: 12px">洛阳百姓问政</div>
<div style="color: #0051B1;font-size: 12px">公众号</div>
<div>
<img src="@/assets/img/qrcode1.png" style="width: 100px;height: 100px;margin-top: 10px">
</div>
</div>
<div style="background: #D9D9D9;width: 120px;height: 180px;text-align: center;padding: 5px 0px 10px 0px;position: fixed;top: 40%;right: 10px">
<div style="text-align: right;padding-right: 5px">
<svg style="width: 20px;height: 20px;color: #999797" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 512 512"><path d="M256 48C141.31 48 48 141.31 48 256s93.31 208 208 208s208-93.31 208-208S370.69 48 256 48zm86.63 272L320 342.63l-64-64l-64 64L169.37 320l64-64l-64-64L192 169.37l64 64l64-64L342.63 192l-64 64z" fill="currentColor"></path></svg>
</div>
<div style="color: #0051B1;font-size: 12px">洛阳百姓问政</div>
<div style="color: #0051B1;font-size: 12px">公众号</div>
<div>
<img src="@/assets/img/qrcode1.png" style="width: 100px;height: 100px;margin-top: 10px">
</div>
</div>
2024-01-29 09:26:07 +08:00
</template>
<script setup lang="ts">
2024-01-31 11:50:30 +08:00
import {useRouter} from "vue-router";
2024-01-29 17:57:41 +08:00
import {ref, reactive, onMounted} from 'vue'
2024-01-31 11:50:30 +08:00
import {ButtonProps, useMessage} from 'naive-ui'
type ButtonThemeOverrides = NonNullable<ButtonProps['themeOverrides']>
const buttonThemeOverrides: ButtonThemeOverrides = {
borderRadius: '0px'
}
const message = useMessage()
const router = useRouter()
const userPhone=ref();
2024-01-29 17:57:41 +08:00
onMounted(() => {
2024-01-31 11:50:30 +08:00
var item = sessionStorage.getItem('user');
const jsonArray = JSON.parse(item);
const hiddenPhoneNumber = jsonArray.mobile.substring(0, 3) + "****" + jsonArray.mobile.substring(7);
userPhone.value=hiddenPhoneNumber;
2024-01-29 17:57:41 +08:00
})
2024-01-31 11:50:30 +08:00
const quit = () => {
sessionStorage.removeItem('user');
userPhone.value='';
}
const tn = (url) => {
if(url=='/user'&&userPhone.value==''){
message.error('请登录!')
return;
}
router.push(url)
}
2024-01-29 09:26:07 +08:00
</script>
<style scoped>
2024-01-31 11:50:30 +08:00
.left-line {
height: 1.2rem;
background-color: #000000;
width: 0.05rem;
opacity: 0.15;
}
2024-01-29 09:26:07 +08:00
2024-01-31 11:50:30 +08:00
.n-button {
border-radius: 0px;
height: 2.25rem;
}
2024-01-29 09:26:07 +08:00
2024-01-31 11:50:30 +08:00
.b1-back {
display: flex;
justify-content: space-between;
align-items: center;
align-self: center;
position: relative;
width: 100%;
height: 6.25rem;
background: url('../assets/img/b1.png') no-repeat;
}
2024-01-29 17:57:41 +08:00
</style>