mirror of
https://github.com/yangjian102621/geekai.git
synced 2025-09-18 01:06:39 +08:00
feat: show notice in chat page
This commit is contained in:
parent
de3eb8969c
commit
434fbb3463
@ -169,4 +169,5 @@ type SystemConfig struct {
|
||||
InviteImgCalls int `json:"invite_img_calls"` // 邀请用户注册奖励绘图次数
|
||||
ForceInvite bool `json:"force_invite"` // 是否强制必须使用邀请码才能注册
|
||||
|
||||
ShowDemoNotice bool `json:"show_demo_notice"` // 显示演示站公告
|
||||
}
|
||||
|
@ -286,12 +286,12 @@
|
||||
justify-content: right;
|
||||
align-items: center;
|
||||
}
|
||||
.notice {
|
||||
background-color: #f6deff;
|
||||
width: 100%;
|
||||
padding: 5px 10px;
|
||||
border-radius: 5px;
|
||||
color: #cf49ff;
|
||||
.el-overlay-dialog .el-dialog .el-dialog__body .notice {
|
||||
padding: 0 20px 0 20px;
|
||||
line-height: 1.8;
|
||||
}
|
||||
.el-overlay-dialog .el-dialog .el-dialog__body .notice .el-text {
|
||||
font-size: 16px;
|
||||
}
|
||||
.dialog-service {
|
||||
text-align: center;
|
||||
|
@ -381,12 +381,19 @@ $borderColor = #4676d0;
|
||||
}
|
||||
}
|
||||
|
||||
.notice {
|
||||
background-color #F6DEFF
|
||||
width 100%
|
||||
padding 5px 10px;
|
||||
border-radius 5px;
|
||||
color #CF49FF
|
||||
.el-overlay-dialog {
|
||||
.el-dialog {
|
||||
.el-dialog__body {
|
||||
.notice {
|
||||
padding 0 20px 0 20px
|
||||
line-height 1.8
|
||||
|
||||
.el-text {
|
||||
font-size 16px
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.dialog-service {
|
||||
|
@ -106,13 +106,13 @@ const routes = [
|
||||
path: '/admin/user',
|
||||
name: 'admin-user',
|
||||
meta: {title: '用户管理'},
|
||||
component: () => import('@/views/admin/UserList.vue'),
|
||||
component: () => import('@/views/admin/Users.vue'),
|
||||
},
|
||||
{
|
||||
path: '/admin/role',
|
||||
name: 'admin-role',
|
||||
meta: {title: '角色管理'},
|
||||
component: () => import('@/views/admin/RoleList.vue'),
|
||||
component: () => import('@/views/admin/Roles.vue'),
|
||||
},
|
||||
{
|
||||
path: '/admin/apikey',
|
||||
|
@ -223,6 +223,28 @@
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog
|
||||
v-model="showDemoNotice"
|
||||
:show-close="true"
|
||||
title="网站公告"
|
||||
>
|
||||
<div class="notice">
|
||||
<el-text type="primary">
|
||||
注意:当前站点仅为开源项目
|
||||
<a style="color: #F56C6C" href="https://github.com/yangjian102621/chatgpt-plus">ChatPlus</a>
|
||||
的演示项目,本项目单纯就是给大家体验项目功能使用。<br/>
|
||||
|
||||
体验额度用完之后请不要在当前站点进行任何充值操作!!!<br/>
|
||||
体验额度用完之后请不要在当前站点进行任何充值操作!!!<br/>
|
||||
体验额度用完之后请不要在当前站点进行任何充值操作!!!<br/>
|
||||
</el-text>
|
||||
|
||||
<p style="text-align: right">
|
||||
<el-button @click="notShow" type="success" plain>我知道了,不再显示</el-button>
|
||||
</p>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<config-dialog v-if="isLogin" :show="showConfigDialog" :models="models" @hide="showConfigDialog = false"/>
|
||||
</div>
|
||||
|
||||
@ -278,6 +300,8 @@ const isLogin = ref(false)
|
||||
const showHello = ref(true)
|
||||
const textInput = ref(null)
|
||||
const showFeedbackDialog = ref(false)
|
||||
const showDemoNotice = ref(false)
|
||||
const showNoticeKey = ref("SHOW_DEMO_NOTICE_")
|
||||
|
||||
if (isMobile()) {
|
||||
router.replace("/mobile")
|
||||
@ -326,6 +350,10 @@ onMounted(() => {
|
||||
|
||||
httpGet("/api/admin/config/get?key=system").then(res => {
|
||||
title.value = res.data.title
|
||||
const show = localStorage.getItem(showNoticeKey.value + loginUser.value.mobile)
|
||||
if (!show) {
|
||||
showDemoNotice.value = res.data['show_demo_notice']
|
||||
}
|
||||
}).catch(e => {
|
||||
ElMessage.error("获取系统配置失败:" + e.message)
|
||||
})
|
||||
@ -847,6 +875,12 @@ const getModelValue = (model_id) => {
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
|
||||
const notShow = () => {
|
||||
localStorage.setItem(showNoticeKey.value + loginUser.value.mobile, true)
|
||||
showDemoNotice.value = false
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="stylus">
|
||||
|
@ -78,23 +78,23 @@
|
||||
<el-form-item label="单次绘图价格" prop="img_call_price">
|
||||
<el-input v-model="system['img_call_price']" placeholder="众筹金额跟绘图次数的兑换比例"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="收款二维码" prop="reward_img">
|
||||
<el-input v-model="system['reward_img']" placeholder="众筹收款二维码地址">
|
||||
<template #append>
|
||||
<el-upload
|
||||
:auto-upload="true"
|
||||
:show-file-list="false"
|
||||
:http-request="uploadRewardImg"
|
||||
>
|
||||
<el-icon class="uploader-icon">
|
||||
<UploadFilled/>
|
||||
</el-icon>
|
||||
</el-upload>
|
||||
</template>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</div>
|
||||
|
||||
<el-form-item label="收款二维码" prop="reward_img">
|
||||
<el-input v-model="system['reward_img']" placeholder="众筹收款二维码地址">
|
||||
<template #append>
|
||||
<el-upload
|
||||
:auto-upload="true"
|
||||
:show-file-list="false"
|
||||
:http-request="uploadRewardImg"
|
||||
>
|
||||
<el-icon class="uploader-icon">
|
||||
<UploadFilled/>
|
||||
</el-icon>
|
||||
</el-upload>
|
||||
</template>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="启用支付宝" prop="enabled_alipay">
|
||||
<el-switch v-model="system['enabled_alipay']"/>
|
||||
<el-tooltip
|
||||
@ -108,6 +108,21 @@
|
||||
</el-icon>
|
||||
</el-tooltip>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="显示公告" prop="show_demo_notice">
|
||||
<el-switch v-model="system['show_demo_notice']"/>
|
||||
<el-tooltip
|
||||
effect="dark"
|
||||
content="是否在聊天首页显示演示 Demo 公告,这是专为作者自己开发的功能"
|
||||
raw-content
|
||||
placement="right"
|
||||
>
|
||||
<el-icon>
|
||||
<InfoFilled/>
|
||||
</el-icon>
|
||||
</el-tooltip>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="订单超时时间" prop="order_pay_timeout">
|
||||
<div class="tip-input">
|
||||
<el-input v-model.number="system['order_pay_timeout']" placeholder="单位:秒"/>
|
||||
|
Loading…
Reference in New Issue
Block a user