diff --git a/.gitignore b/.gitignore
index 4bf1f92..f5e4500 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,22 +1 @@
-# Build and Release Folders
-bin-debug/
-bin-release/
-[Oo]bj/
-[Bb]in/
-
-# Other files and folders
-.settings/
-
-# Executables
-*.swf
-*.air
-*.ipa
-*.apk
-
-# Project files, i.e. `.project`, `.actionScriptProperties` and `.flexProperties`
-# should NOT be excluded as they contain compiler settings and other important
-# information for Eclipse / Flash Builder.
-docker_env/mysql/data/
-docker_env/redis/data/
*/.idea
-dvadmin-doc/docs/.vuepress/dist
\ No newline at end of file
diff --git a/kinit-admin/src/permission.ts b/kinit-admin/src/permission.ts
index b14a408..e97e708 100644
--- a/kinit-admin/src/permission.ts
+++ b/kinit-admin/src/permission.ts
@@ -12,7 +12,7 @@ const { start, done } = useNProgress()
const { loadStart, loadDone } = usePageLoading()
-const whiteList = ['/login'] // 不重定向白名单
+const whiteList = ['/login', '/docs/privacy', '/docs/agreement'] // 不重定向白名单
router.beforeEach(async (to, from, next) => {
start()
diff --git a/kinit-admin/src/router/index.ts b/kinit-admin/src/router/index.ts
index d54cea2..7f6ea9b 100644
--- a/kinit-admin/src/router/index.ts
+++ b/kinit-admin/src/router/index.ts
@@ -70,6 +70,37 @@ export const constantRouterMap: AppRouteRecordRaw[] = [
noTagsView: true
}
},
+ {
+ path: '/docs',
+ name: 'Docs',
+ meta: {
+ hidden: true,
+ title: '在线文档',
+ noTagsView: true
+ },
+ children: [
+ {
+ path: 'privacy',
+ name: 'Privacy',
+ component: () => import('@/views/Vadmin/Docs/Privacy.vue'),
+ meta: {
+ hidden: true,
+ title: '隐私政策',
+ noTagsView: true
+ }
+ },
+ {
+ path: 'agreement',
+ name: 'Agreement',
+ component: () => import('@/views/Vadmin/Docs/Agreement.vue'),
+ meta: {
+ hidden: true,
+ title: '用户协议',
+ noTagsView: true
+ }
+ }
+ ]
+ },
{
path: '/404',
component: () => import('@/views/Error/404.vue'),
@@ -115,7 +146,17 @@ const router = createRouter({
})
export const resetRouter = (): void => {
- const resetWhiteNameList = ['Login', 'NoFind', 'Root', 'ResetPassword', 'Redirect', 'Home']
+ const resetWhiteNameList = [
+ 'Login',
+ 'NoFind',
+ 'Root',
+ 'ResetPassword',
+ 'Redirect',
+ 'Home',
+ 'Docs',
+ 'Privacy',
+ 'Agreement'
+ ]
router.getRoutes().forEach((route) => {
const { name } = route
if (name && !resetWhiteNameList.includes(name as string)) {
diff --git a/kinit-admin/src/views/Vadmin/Docs/Agreement.vue b/kinit-admin/src/views/Vadmin/Docs/Agreement.vue
new file mode 100644
index 0000000..2cb1164
--- /dev/null
+++ b/kinit-admin/src/views/Vadmin/Docs/Agreement.vue
@@ -0,0 +1,29 @@
+
+
+
+
+
+
+
diff --git a/kinit-admin/src/views/Vadmin/Docs/Privacy.vue b/kinit-admin/src/views/Vadmin/Docs/Privacy.vue
new file mode 100644
index 0000000..b7324cf
--- /dev/null
+++ b/kinit-admin/src/views/Vadmin/Docs/Privacy.vue
@@ -0,0 +1,29 @@
+
+
+
+
+
+
+
diff --git a/kinit-api/apps/vadmin/system/views.py b/kinit-api/apps/vadmin/system/views.py
index 83d5a08..2dfec84 100644
--- a/kinit-api/apps/vadmin/system/views.py
+++ b/kinit-api/apps/vadmin/system/views.py
@@ -170,12 +170,12 @@ async def get_setting_base_config(db: AsyncSession = Depends(db_getter)):
@app.get("/settings/privacy", summary="获取隐私协议")
-async def get_settings_privacy(auth: Auth = Depends(FullAdminAuth())):
+async def get_settings_privacy(auth: Auth = Depends(OpenAuth())):
return SuccessResponse((await crud.SettingsDal(auth.db).get_data(config_key="web_privacy")).config_value)
@app.get("/settings/agreement", summary="获取用户协议")
-async def get_settings_agreement(auth: Auth = Depends(FullAdminAuth())):
+async def get_settings_agreement(auth: Auth = Depends(OpenAuth())):
return SuccessResponse((await crud.SettingsDal(auth.db).get_data(config_key="web_agreement")).config_value)
diff --git a/kinit-uni/main.js b/kinit-uni/main.js
index ea0a4c3..b448f59 100644
--- a/kinit-uni/main.js
+++ b/kinit-uni/main.js
@@ -26,6 +26,11 @@ uni.$u.setConfig({
size: 33,
labelSize: 30
},
+ checkbox: {
+ size: 33,
+ labelSize: 30,
+ iconSize: 20
+ },
button: {
loadingSize: 28
},
diff --git a/kinit-uni/pages/login/login.vue b/kinit-uni/pages/login/login.vue
index 44aec52..e33801e 100644
--- a/kinit-uni/pages/login/login.vue
+++ b/kinit-uni/pages/login/login.vue
@@ -30,23 +30,42 @@
+
+
+
+
+
+
+
+
+
+
+
+ 允许我们在必要场景下,合理使用您的个人信息,且阅读并同意
+ 《用户协议》、
+ 《隐私协议》、
+ 等内容
+
+
-
- 登录即代表同意
- 《用户协议》
- 《隐私协议》
-
-
-
@@ -60,7 +79,9 @@ export default {
loginForm: {
telephone: '15020221010',
password: 'kinit2022'
- }
+ },
+ isAgrement: false,
+ tooltipVisible: false
}
},
computed: {
@@ -96,14 +117,18 @@ export default {
},
// 登录方法
async handleLogin() {
- if (this.loginForm.telephone === '') {
- this.$modal.msgError('请输入您的手机号')
- } else if (this.loginForm.password === '') {
- this.$modal.msgError('请输入您的密码')
- } else {
- this.$modal.loading('正在登录中...')
- this.pwdLogin()
- }
+ if (this.isAgrement) {
+ if (this.loginForm.telephone === '') {
+ this.$modal.msgError('请输入您的手机号')
+ } else if (this.loginForm.password === '') {
+ this.$modal.msgError('请输入您的密码')
+ } else {
+ this.$modal.loading('正在登录中...')
+ this.pwdLogin()
+ }
+ } else {
+ this.tooltipVisible = true
+ }
},
// 密码登录
async pwdLogin() {
@@ -122,10 +147,23 @@ export default {
},
// 微信一键登录
wxLogin(detail) {
- this.onGetPhoneNumber(detail).then((res) => {
- this.loginSuccess()
- })
- }
+ if (this.isAgrement) {
+ this.onGetPhoneNumber(detail).then((res) => {
+ this.loginSuccess()
+ })
+ } else {
+ this.tooltipVisible = true
+ }
+ },
+ // 用户协议事件监听
+ checkboxChange() {
+ this.isAgrement = !this.isAgrement
+ this.tooltipClose()
+ },
+ // 关闭提示
+ tooltipClose() {
+ this.tooltipVisible = false
+ }
}
}
@@ -156,7 +194,7 @@ page {
}
.login-form-content {
- text-align: center;
+ // text-align: center;
margin: 20px auto;
margin-top: 15%;
width: 80%;
diff --git a/kinit-uni/uni_modules/zb-tooltip/changelog.md b/kinit-uni/uni_modules/zb-tooltip/changelog.md
new file mode 100644
index 0000000..530e053
--- /dev/null
+++ b/kinit-uni/uni_modules/zb-tooltip/changelog.md
@@ -0,0 +1,24 @@
+## 1.0.11(2023-01-29)
+优化点击,加入点击自己再次点击也会关闭
+## 1.0.10(2023-01-17)
+优化
+## 1.0.9(2023-01-17)
+增加注释
+## 1.0.8(2022-08-18)
+优化细节
+## 1.0.67(2022-05-09)
+修复安卓报错
+## 1.0.6(2022-05-07)
+修改默认展示
+## 1.0.5(2022-04-28)
+进行优化
+## 1.0.4(2022-04-27)
+进行优化
+## 1.0.3(2022-04-25)
+去掉多余得注释
+## 1.0.2(2022-04-25)
+增加自定义主题颜色
+## 1.0.1(2022-04-25)
+进行优化显示
+## 1.0.0(2022-04-24)
+初始化
diff --git a/kinit-uni/uni_modules/zb-tooltip/components/zb-tooltip/zb-tooltip.vue b/kinit-uni/uni_modules/zb-tooltip/components/zb-tooltip/zb-tooltip.vue
new file mode 100644
index 0000000..210a1bc
--- /dev/null
+++ b/kinit-uni/uni_modules/zb-tooltip/components/zb-tooltip/zb-tooltip.vue
@@ -0,0 +1,290 @@
+
+
+
+
+ {}"
+ :style="[style,{
+ visibility:isShow?'visible':'hidden',
+ color:color==='white'?'':'#fff',
+ boxShadow: color==='white'?'0 3px 6px -4px #0000001f, 0 6px 16px #00000014, 0 9px 28px 8px #0000000d':''
+ }]" >
+ {{content}}
+
+
+
+
+
+
+
+
+
+
+
diff --git a/kinit-uni/uni_modules/zb-tooltip/package.json b/kinit-uni/uni_modules/zb-tooltip/package.json
new file mode 100644
index 0000000..3417218
--- /dev/null
+++ b/kinit-uni/uni_modules/zb-tooltip/package.json
@@ -0,0 +1,83 @@
+{
+ "id": "zb-tooltip",
+ "displayName": "zb-tooltip (文字提示气泡框)",
+ "version": "1.0.11",
+ "description": "简单的文字提示气泡框,可以自定义皮肤颜色",
+ "keywords": [
+ "tooltip",
+ "tip",
+ "文字提示",
+ "气泡框",
+ "自定义皮肤颜色、Popover"
+],
+ "repository": "",
+"engines": {
+ },
+ "dcloudext": {
+ "category": [
+ "前端组件",
+ "通用组件"
+ ],
+ "sale": {
+ "regular": {
+ "price": "0.00"
+ },
+ "sourcecode": {
+ "price": "0.00"
+ }
+ },
+ "contact": {
+ "qq": ""
+ },
+ "declaration": {
+ "ads": "无",
+ "data": "无",
+ "permissions": "无"
+ },
+ "npmurl": ""
+ },
+ "uni_modules": {
+ "dependencies": [],
+ "encrypt": [],
+ "platforms": {
+ "cloud": {
+ "tcb": "y",
+ "aliyun": "y"
+ },
+ "client": {
+ "Vue": {
+ "vue2": "y",
+ "vue3": "y"
+ },
+ "App": {
+ "app-vue": "y",
+ "app-nvue": "u"
+ },
+ "H5-mobile": {
+ "Safari": "y",
+ "Android Browser": "y",
+ "微信浏览器(Android)": "y",
+ "QQ浏览器(Android)": "y"
+ },
+ "H5-pc": {
+ "Chrome": "y",
+ "IE": "y",
+ "Edge": "y",
+ "Firefox": "y",
+ "Safari": "y"
+ },
+ "小程序": {
+ "微信": "y",
+ "阿里": "y",
+ "百度": "y",
+ "字节跳动": "y",
+ "QQ": "y"
+ },
+ "快应用": {
+ "华为": "y",
+ "联盟": "y"
+ }
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/kinit-uni/uni_modules/zb-tooltip/readme.md b/kinit-uni/uni_modules/zb-tooltip/readme.md
new file mode 100644
index 0000000..c21389f
--- /dev/null
+++ b/kinit-uni/uni_modules/zb-tooltip/readme.md
@@ -0,0 +1,30 @@
+## 介绍
+基于uni-app开发的一个普通的提示组件,功能点击提示
+
+
+## 友情链接
+#### vue-admin-perfect —— [企业级、通用型中后台前端解决方案 预览地址](http://182.61.5.190:8889/)
+#### vue-admin-perfect —— [企业级、通用型中后台前端解决方案(基于vue3.0+TS+Element-Plus 最新版,同时支持电脑,手机,平板)](https://github.com/zouzhibin/vue-admin-perfect)
+
+
+## Tooltip 属性
+| 参数 | 说明 | 类型 | 可选值 | 默认值 |
+| ------ | ------ | ------ | ------ | ------ |
+| visible | 是否显示 tooltip,支持 .sync 修饰符 | Boolean |visible.sync | false |
+| content | 显示的内容,也可以通过 slot#content | String |-- | ' ' |
+| color | 自定义主题颜色| String |'#303133' | '#303133' |
+| placement | Tooltip 的出现位置 | String |top/top-start/top-end/bottom/bottom-start/bottom-end/left/left-start/left-end/right/right-start/right-end | top |
+
+
+## Slot 插槽
+| 参数 | 说明 |
+| ------ | ------ |
+| content | 显示提示框得内容 |
+
+
+```
+因为uniapp 中小程序中没有window对象,需手动调用 关闭
+ 第一种办法关闭:this.$refs.tooltip.close()
+ 第二种办法关闭:visible.sync = false
+
+```