This commit is contained in:
@@ -8,6 +8,7 @@ platform:
|
||||
|
||||
steps:
|
||||
- name: 测试服-依赖安装&&编译打包
|
||||
pull: if-not-exists
|
||||
image: node:20-alpine
|
||||
when:
|
||||
branch:
|
||||
@@ -22,10 +23,11 @@ steps:
|
||||
- tar -zcvf dist.tar ./dist ./default.conf ./Dockerfile
|
||||
|
||||
- name: 正式服-依赖安装&&编译打包
|
||||
pull: if-not-exists
|
||||
image: node:20-alpine
|
||||
when:
|
||||
branch:
|
||||
- master
|
||||
- main
|
||||
commands:
|
||||
- npm config set registry https://registry.npmmirror.com/
|
||||
- npm install -g pnpm
|
||||
@@ -36,6 +38,7 @@ steps:
|
||||
- tar -zcvf dist.tar ./dist ./default.conf ./Dockerfile
|
||||
|
||||
- name: 测试服-产物上传
|
||||
pull: if-not-exists
|
||||
image: appleboy/drone-scp
|
||||
when:
|
||||
branch:
|
||||
@@ -54,6 +57,7 @@ steps:
|
||||
- ./dist.tar
|
||||
|
||||
- name: 测试服-部署
|
||||
pull: if-not-exists
|
||||
image: appleboy/drone-ssh
|
||||
when:
|
||||
branch:
|
||||
@@ -73,19 +77,14 @@ steps:
|
||||
- rm -rf dist.tar
|
||||
- cd jdt-admin-dev
|
||||
- docker build -t jdt-admin-dev .
|
||||
- target_container="jdt-admin-dev"
|
||||
- if docker ps -a --format '{{.Names}}' | grep -q "^$target_container$"; then
|
||||
- echo "容器存在,执行操作..."
|
||||
- docker stop jdt-admin-dev
|
||||
- docker rm jdt-admin-dev
|
||||
- else
|
||||
- echo "容器不存在"
|
||||
- fi
|
||||
- docker run -d -p 8082:80 --restart=always --name jdt-admin-dev jdt-admin-dev
|
||||
- docker run -d -p 8085:80 --restart=always --name jdt-admin-dev jdt-admin-dev
|
||||
- cd ..
|
||||
- rm -rf jdt-admin-dev
|
||||
|
||||
- name: 正式服-产物上传
|
||||
pull: if-not-exists
|
||||
image: appleboy/drone-scp
|
||||
when:
|
||||
branch:
|
||||
@@ -104,6 +103,7 @@ steps:
|
||||
- ./dist.tar
|
||||
|
||||
- name: 正式服-部署
|
||||
pull: if-not-exists
|
||||
image: appleboy/drone-ssh
|
||||
when:
|
||||
branch:
|
||||
@@ -122,21 +122,23 @@ steps:
|
||||
- tar -xzvf dist.tar -C /www/builder/jdt-admin-prod
|
||||
- rm -rf dist.tar
|
||||
- cd jdt-admin-prod
|
||||
- cd docker build -t jdt-admin-prod .
|
||||
- target_container="jdt-admin-prod"
|
||||
- if docker ps -a --format '{{.Names}}' | grep -q "^$target_container$"; then
|
||||
- echo "容器存在,执行操作..."
|
||||
- docker build -t jdt-admin-prod .
|
||||
- docker stop jdt-admin-prod
|
||||
- docker rm jdt-admin-prod
|
||||
- else
|
||||
- echo "容器不存在"
|
||||
- fi
|
||||
- docker run -d -p 8085:80 --restart=always --name jdt-admin-prod jdt-admin-prod
|
||||
- cd ..
|
||||
- rm -rf jdt-admin-prod
|
||||
|
||||
- name: 微信通知
|
||||
- name: 企业微信通知
|
||||
pull: if-not-exists
|
||||
image: plugins/webhook
|
||||
when:
|
||||
branch:
|
||||
- test
|
||||
- main
|
||||
status:
|
||||
- success
|
||||
- failure
|
||||
settings:
|
||||
urls: https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=a2065e21-4f92-4f5b-a432-2c0cd1d965b5
|
||||
content_type: application/json
|
||||
@@ -151,7 +153,6 @@ steps:
|
||||
>**提交标识**: {{ build.commit }}
|
||||
>**提交发起**: {{ build.author }}
|
||||
>**提交信息**: {{ build.message }}
|
||||
>**构建耗时**: {{ job.started }}s
|
||||
"
|
||||
}
|
||||
}
|
||||
5
.idea/.gitignore
generated
vendored
5
.idea/.gitignore
generated
vendored
@@ -1,5 +0,0 @@
|
||||
# 默认忽略的文件
|
||||
/shelf/
|
||||
/workspace.xml
|
||||
# 基于编辑器的 HTTP 客户端请求
|
||||
/httpRequests/
|
||||
12
.idea/admin.iml
generated
12
.idea/admin.iml
generated
@@ -1,12 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module type="WEB_MODULE" version="4">
|
||||
<component name="NewModuleRootManager">
|
||||
<content url="file://$MODULE_DIR$">
|
||||
<excludeFolder url="file://$MODULE_DIR$/.tmp" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/temp" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/tmp" />
|
||||
</content>
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
</component>
|
||||
</module>
|
||||
68
.idea/codeStyles/Project.xml
generated
68
.idea/codeStyles/Project.xml
generated
@@ -1,68 +0,0 @@
|
||||
<component name="ProjectCodeStyleConfiguration">
|
||||
<code_scheme name="Project" version="173">
|
||||
<option name="LINE_SEPARATOR" value=" " />
|
||||
<HTMLCodeStyleSettings>
|
||||
<option name="HTML_SPACE_INSIDE_EMPTY_TAG" value="true" />
|
||||
<option name="HTML_QUOTE_STYLE" value="Single" />
|
||||
<option name="HTML_ENFORCE_QUOTES" value="true" />
|
||||
</HTMLCodeStyleSettings>
|
||||
<JSCodeStyleSettings version="0">
|
||||
<option name="USE_SEMICOLON_AFTER_STATEMENT" value="false" />
|
||||
<option name="FORCE_SEMICOLON_STYLE" value="true" />
|
||||
<option name="SPACE_BEFORE_FUNCTION_LEFT_PARENTH" value="false" />
|
||||
<option name="USE_DOUBLE_QUOTES" value="false" />
|
||||
<option name="FORCE_QUOTE_STYlE" value="true" />
|
||||
<option name="ENFORCE_TRAILING_COMMA" value="Remove" />
|
||||
<option name="SPACES_WITHIN_OBJECT_LITERAL_BRACES" value="true" />
|
||||
<option name="SPACES_WITHIN_IMPORTS" value="true" />
|
||||
</JSCodeStyleSettings>
|
||||
<TypeScriptCodeStyleSettings version="0">
|
||||
<option name="USE_SEMICOLON_AFTER_STATEMENT" value="false" />
|
||||
<option name="FORCE_SEMICOLON_STYLE" value="true" />
|
||||
<option name="SPACE_BEFORE_FUNCTION_LEFT_PARENTH" value="false" />
|
||||
<option name="USE_DOUBLE_QUOTES" value="false" />
|
||||
<option name="FORCE_QUOTE_STYlE" value="true" />
|
||||
<option name="ENFORCE_TRAILING_COMMA" value="Remove" />
|
||||
<option name="SPACES_WITHIN_OBJECT_LITERAL_BRACES" value="true" />
|
||||
<option name="SPACES_WITHIN_IMPORTS" value="true" />
|
||||
</TypeScriptCodeStyleSettings>
|
||||
<VueCodeStyleSettings>
|
||||
<option name="INTERPOLATION_NEW_LINE_AFTER_START_DELIMITER" value="false" />
|
||||
<option name="INTERPOLATION_NEW_LINE_BEFORE_END_DELIMITER" value="false" />
|
||||
</VueCodeStyleSettings>
|
||||
<codeStyleSettings language="HTML">
|
||||
<option name="SOFT_MARGINS" value="100" />
|
||||
<indentOptions>
|
||||
<option name="INDENT_SIZE" value="2" />
|
||||
<option name="CONTINUATION_INDENT_SIZE" value="2" />
|
||||
<option name="TAB_SIZE" value="2" />
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
<option name="SMART_TABS" value="true" />
|
||||
>>>>>>> test
|
||||
</indentOptions>
|
||||
</codeStyleSettings>
|
||||
<codeStyleSettings language="JavaScript">
|
||||
<option name="SOFT_MARGINS" value="100" />
|
||||
<indentOptions>
|
||||
<option name="INDENT_SIZE" value="2" />
|
||||
<option name="CONTINUATION_INDENT_SIZE" value="2" />
|
||||
<option name="TAB_SIZE" value="2" />
|
||||
</indentOptions>
|
||||
</codeStyleSettings>
|
||||
<codeStyleSettings language="TypeScript">
|
||||
<option name="SOFT_MARGINS" value="100" />
|
||||
<indentOptions>
|
||||
<option name="INDENT_SIZE" value="2" />
|
||||
<option name="CONTINUATION_INDENT_SIZE" value="2" />
|
||||
<option name="TAB_SIZE" value="2" />
|
||||
</indentOptions>
|
||||
</codeStyleSettings>
|
||||
<codeStyleSettings language="Vue">
|
||||
<option name="SOFT_MARGINS" value="100" />
|
||||
<indentOptions>
|
||||
<option name="CONTINUATION_INDENT_SIZE" value="2" />
|
||||
</indentOptions>
|
||||
</codeStyleSettings>
|
||||
</code_scheme>
|
||||
</component>
|
||||
5
.idea/codeStyles/codeStyleConfig.xml
generated
5
.idea/codeStyles/codeStyleConfig.xml
generated
@@ -1,5 +0,0 @@
|
||||
<component name="ProjectCodeStyleConfiguration">
|
||||
<state>
|
||||
<option name="USE_PER_PROJECT_SETTINGS" value="true" />
|
||||
</state>
|
||||
</component>
|
||||
15
.idea/git_toolbox_prj.xml
generated
15
.idea/git_toolbox_prj.xml
generated
@@ -1,15 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="GitToolBoxProjectSettings">
|
||||
<option name="commitMessageIssueKeyValidationOverride">
|
||||
<BoolValueOverride>
|
||||
<option name="enabled" value="true" />
|
||||
</BoolValueOverride>
|
||||
</option>
|
||||
<option name="commitMessageValidationEnabledOverride">
|
||||
<BoolValueOverride>
|
||||
<option name="enabled" value="true" />
|
||||
</BoolValueOverride>
|
||||
</option>
|
||||
</component>
|
||||
</project>
|
||||
6
.idea/inspectionProfiles/Project_Default.xml
generated
6
.idea/inspectionProfiles/Project_Default.xml
generated
@@ -1,6 +0,0 @@
|
||||
<component name="InspectionProjectProfileManager">
|
||||
<profile version="1.0">
|
||||
<option name="myName" value="Project Default" />
|
||||
<inspection_tool class="Eslint" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||
</profile>
|
||||
</component>
|
||||
6
.idea/jsLibraryMappings.xml
generated
6
.idea/jsLibraryMappings.xml
generated
@@ -1,6 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="JavaScriptLibraryMappings">
|
||||
<includedPredefinedLibrary name="Node.js Core" />
|
||||
</component>
|
||||
</project>
|
||||
6
.idea/jsLinters/eslint.xml
generated
6
.idea/jsLinters/eslint.xml
generated
@@ -1,6 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="EslintConfiguration">
|
||||
<option name="fix-on-save" value="true" />
|
||||
</component>
|
||||
</project>
|
||||
12
.idea/modules.xml
generated
12
.idea/modules.xml
generated
@@ -1,12 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectModuleManager">
|
||||
<modules>
|
||||
<<<<<<< HEAD
|
||||
<module fileurl="file://$PROJECT_DIR$/.idea/jdt-admin.iml" filepath="$PROJECT_DIR$/.idea/jdt-admin.iml" />
|
||||
=======
|
||||
<module fileurl="file://$PROJECT_DIR$/.idea/admin.iml" filepath="$PROJECT_DIR$/.idea/admin.iml" />
|
||||
>>>>>>> test
|
||||
</modules>
|
||||
</component>
|
||||
</project>
|
||||
6
.idea/prettier.xml
generated
6
.idea/prettier.xml
generated
@@ -1,6 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="PrettierConfiguration">
|
||||
<option name="myConfigurationMode" value="AUTOMATIC" />
|
||||
</component>
|
||||
</project>
|
||||
6
.idea/vcs.xml
generated
6
.idea/vcs.xml
generated
@@ -1,6 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="VcsDirectoryMappings">
|
||||
<mapping directory="" vcs="Git" />
|
||||
</component>
|
||||
</project>
|
||||
6
src/views/system/agreement/api.js
Normal file
6
src/views/system/agreement/api.js
Normal file
@@ -0,0 +1,6 @@
|
||||
import { request } from '@/utils'
|
||||
|
||||
export default {
|
||||
getAgreement: () => request.post('/agreement'),
|
||||
updateAgreement: (data) => request.post('/edit/agreement', data),
|
||||
}
|
||||
43
src/views/system/agreement/index.vue
Normal file
43
src/views/system/agreement/index.vue
Normal file
@@ -0,0 +1,43 @@
|
||||
<template>
|
||||
<CommonPage show-footer :title="$route.title">
|
||||
<n-tabs type="line" animated>
|
||||
<n-tab-pane name="1" tab="用户协议">
|
||||
<Editor v-model:value-html="model.user" :height="550" />
|
||||
</n-tab-pane>
|
||||
<n-tab-pane name="2" tab="隐私政策">
|
||||
<Editor v-model:value-html="model.policy" :height="550" />
|
||||
</n-tab-pane>
|
||||
<n-tab-pane name="3" tab="积分使用规则">
|
||||
<Editor v-model:value-html="model.integral" :height="550" />
|
||||
</n-tab-pane>
|
||||
</n-tabs>
|
||||
<n-button v-perms="['/admin/edit/agreement']" mt-10 type="primary" @click="save">保存</n-button>
|
||||
</CommonPage>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import api from './api'
|
||||
import Editor from '@/components/Editor.vue'
|
||||
|
||||
const model = ref({
|
||||
user: '',
|
||||
policy: '',
|
||||
integral: '',
|
||||
})
|
||||
|
||||
onMounted(() => {
|
||||
get_agreement()
|
||||
})
|
||||
|
||||
const get_agreement = async () => {
|
||||
const res = await api.getAgreement()
|
||||
model.value = res.data.data
|
||||
}
|
||||
|
||||
const save = async () => {
|
||||
const res = await api.updateAgreement(model.value)
|
||||
$message.success(res.msg)
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped></style>
|
||||
Reference in New Issue
Block a user