Commit 3a44eacdbb8b6b24536a1326ebdfa57010880b82
Committed by
Gitee
!226 修复升级hutool导致的bug
Merge pull request !226 from xingyu/master
Showing
7 changed files
with
83 additions
and
29 deletions
yudao-framework/yudao-spring-boot-starter-biz-social/pom.xml
| ... | ... | @@ -38,6 +38,12 @@ |
| 38 | 38 | <dependency> |
| 39 | 39 | <groupId>com.xkcoding.justauth</groupId> |
| 40 | 40 | <artifactId>justauth-spring-boot-starter</artifactId> |
| 41 | + <exclusions> | |
| 42 | + <exclusion> | |
| 43 | + <groupId>cn.hutool</groupId> | |
| 44 | + <artifactId>hutool-core</artifactId> | |
| 45 | + </exclusion> | |
| 46 | + </exclusions> | |
| 41 | 47 | </dependency> |
| 42 | 48 | <dependency> |
| 43 | 49 | <groupId>cn.iocoder.boot</groupId> | ... | ... |
yudao-server/src/main/resources/application-dev.yaml
| ... | ... | @@ -146,7 +146,7 @@ spring: |
| 146 | 146 | client: |
| 147 | 147 | url: http://127.0.0.1:${server.port}/${spring.boot.admin.context-path} # 设置 Spring Boot Admin Server 地址 |
| 148 | 148 | instance: |
| 149 | - prefer-ip: true # 注册实例时,优先使用 IP | |
| 149 | + service-host-type: IP # 注册实例时,优先使用 IP [IP, HOST_NAME, CANONICAL_HOST_NAME] | |
| 150 | 150 | # Spring Boot Admin Server 服务端的相关配置 |
| 151 | 151 | context-path: /admin # 配置 Spring |
| 152 | 152 | ... | ... |
yudao-server/src/main/resources/application-local.yaml
| ... | ... | @@ -156,7 +156,7 @@ spring: |
| 156 | 156 | client: |
| 157 | 157 | url: http://127.0.0.1:${server.port}/${spring.boot.admin.context-path} # 设置 Spring Boot Admin Server 地址 |
| 158 | 158 | instance: |
| 159 | - prefer-ip: true # 注册实例时,优先使用 IP | |
| 159 | + service-host-type: IP # 注册实例时,优先使用 IP [IP, HOST_NAME, CANONICAL_HOST_NAME] | |
| 160 | 160 | # Spring Boot Admin Server 服务端的相关配置 |
| 161 | 161 | context-path: /admin # 配置 Spring |
| 162 | 162 | ... | ... |
yudao-ui-admin-vue3/package.json
| ... | ... | @@ -50,18 +50,18 @@ |
| 50 | 50 | "vue-cropper": "^1.0.3", |
| 51 | 51 | "vue-i18n": "9.1.10", |
| 52 | 52 | "vue-router": "^4.1.2", |
| 53 | - "vue-types": "^4.1.1", | |
| 53 | + "vue-types": "^4.2.0", | |
| 54 | 54 | "web-storage-cache": "^1.1.1" |
| 55 | 55 | }, |
| 56 | 56 | "devDependencies": { |
| 57 | 57 | "@commitlint/cli": "^17.0.3", |
| 58 | 58 | "@commitlint/config-conventional": "^17.0.3", |
| 59 | - "@iconify/json": "^2.1.80", | |
| 60 | - "@intlify/vite-plugin-vue-i18n": "^5.0.0", | |
| 59 | + "@iconify/json": "^2.1.81", | |
| 60 | + "@intlify/vite-plugin-vue-i18n": "^5.0.1", | |
| 61 | 61 | "@purge-icons/generated": "^0.8.1", |
| 62 | 62 | "@types/intro.js": "^5.1.0", |
| 63 | 63 | "@types/lodash-es": "^4.17.6", |
| 64 | - "@types/node": "^18.0.6", | |
| 64 | + "@types/node": "^18.6.0", | |
| 65 | 65 | "@types/nprogress": "^0.2.0", |
| 66 | 66 | "@types/qrcode": "^1.4.2", |
| 67 | 67 | "@types/qs": "^6.9.7", |
| ... | ... | @@ -96,11 +96,11 @@ |
| 96 | 96 | "vite-plugin-compression": "^0.5.1", |
| 97 | 97 | "vite-plugin-eslint": "^1.7.0", |
| 98 | 98 | "vite-plugin-html": "^3.2.0", |
| 99 | - "vite-plugin-purge-icons": "^0.8.1", | |
| 99 | + "vite-plugin-purge-icons": "^0.8.2", | |
| 100 | 100 | "vite-plugin-style-import": "^1.4.1", |
| 101 | 101 | "vite-plugin-svg-icons": "^2.0.1", |
| 102 | 102 | "vite-plugin-windicss": "^1.8.7", |
| 103 | - "vue-tsc": "^0.38.9", | |
| 103 | + "vue-tsc": "^0.39.0", | |
| 104 | 104 | "windicss": "^3.5.6", |
| 105 | 105 | "windicss-analysis": "^0.3.5" |
| 106 | 106 | }, | ... | ... |
yudao-ui-admin-vue3/src/api/system/sms/smsTemplate/index.ts
| 1 | 1 | import { useAxios } from '@/hooks/web/useAxios' |
| 2 | -import type { SmsTemplateVO, SmsSendVO } from './types' | |
| 2 | +import type { SmsTemplateVO } from './types' | |
| 3 | 3 | |
| 4 | 4 | const request = useAxios() |
| 5 | 5 | |
| ... | ... | @@ -29,7 +29,7 @@ export const deleteSmsTemplateApi = (id: number) => { |
| 29 | 29 | } |
| 30 | 30 | |
| 31 | 31 | // 发送短信 |
| 32 | -export function sendSms(data: SmsSendVO) { | |
| 32 | +export const sendSmsApi = (data) => { | |
| 33 | 33 | return request.post({ url: '/system/sms-template/send-sms', data }) |
| 34 | 34 | } |
| 35 | 35 | ... | ... |
yudao-ui-admin-vue3/src/views/Profile/components/UserAvatar.vue
| ... | ... | @@ -30,8 +30,6 @@ const editCropper = () => { |
| 30 | 30 | state.dialogVisible = true |
| 31 | 31 | state.cropperVisible = true |
| 32 | 32 | } |
| 33 | -/** 覆盖默认上传行为 */ | |
| 34 | -const requestUpload = () => {} | |
| 35 | 33 | /** 向左旋转 */ |
| 36 | 34 | const rotateLeft = () => { |
| 37 | 35 | cropper.value.rotateLeft() |
| ... | ... | @@ -121,12 +119,7 @@ watch( |
| 121 | 119 | <template #footer> |
| 122 | 120 | <el-row> |
| 123 | 121 | <el-col :lg="2" :md="2"> |
| 124 | - <el-upload | |
| 125 | - action="#" | |
| 126 | - :http-request="requestUpload" | |
| 127 | - :show-file-list="false" | |
| 128 | - :before-upload="beforeUpload" | |
| 129 | - > | |
| 122 | + <el-upload action="#" :show-file-list="false" :before-upload="beforeUpload"> | |
| 130 | 123 | <el-button size="small"> |
| 131 | 124 | <Icon icon="ep:upload-filled" class="mr-5px" /> |
| 132 | 125 | 选择 | ... | ... |
yudao-ui-admin-vue3/src/views/system/sms/smsTemplate/index.vue
| 1 | 1 | <script setup lang="ts"> |
| 2 | -import { reactive, ref, unref } from 'vue' | |
| 2 | +import { ref, unref } from 'vue' | |
| 3 | 3 | import dayjs from 'dayjs' |
| 4 | -import { ElMessage } from 'element-plus' | |
| 4 | +import { ElMessage, ElForm, ElFormItem, ElInput } from 'element-plus' | |
| 5 | 5 | import { DICT_TYPE } from '@/utils/dict' |
| 6 | 6 | import { useTable } from '@/hooks/web/useTable' |
| 7 | 7 | import { useI18n } from '@/hooks/web/useI18n' |
| ... | ... | @@ -82,23 +82,45 @@ const handleDetail = async (row: SmsTemplateVO) => { |
| 82 | 82 | detailRef.value = row |
| 83 | 83 | setDialogTile('detail') |
| 84 | 84 | } |
| 85 | -const sendSmsForm = reactive({ | |
| 85 | +// ========== 测试相关 ========== | |
| 86 | +const sendSmsForm = ref({ | |
| 86 | 87 | content: '', |
| 87 | - params: '', | |
| 88 | - mobile: '', | |
| 88 | + params: {}, | |
| 89 | + mobile: '141', | |
| 89 | 90 | templateCode: '', |
| 90 | 91 | templateParams: {} |
| 91 | 92 | }) |
| 92 | -// TODO 发送短信 | |
| 93 | -// ========== 测试相关 ========== | |
| 93 | +const sendSmsRules = ref({ | |
| 94 | + mobile: [{ required: true, message: '手机不能为空', trigger: 'blur' }], | |
| 95 | + templateCode: [{ required: true, message: '手机不能为空', trigger: 'blur' }], | |
| 96 | + templateParams: {} | |
| 97 | +}) | |
| 98 | +const sendVisible = ref(false) | |
| 99 | + | |
| 94 | 100 | const handleSendSms = (row: any) => { |
| 95 | - sendSmsForm.content = row.content | |
| 96 | - sendSmsForm.params = row.params | |
| 97 | - sendSmsForm.templateCode = row.code | |
| 98 | - sendSmsForm.templateParams = row.params.reduce(function (obj, item) { | |
| 101 | + sendSmsForm.value.content = row.content | |
| 102 | + sendSmsForm.value.params = row.params | |
| 103 | + sendSmsForm.value.templateCode = row.code | |
| 104 | + sendSmsForm.value.templateParams = row.params.reduce(function (obj, item) { | |
| 99 | 105 | obj[item] = undefined |
| 100 | 106 | return obj |
| 101 | 107 | }, {}) |
| 108 | + sendSmsRules.value.templateParams = row.params.reduce(function (obj, item) { | |
| 109 | + obj[item] = { required: true, message: '参数 ' + item + ' 不能为空', trigger: 'change' } | |
| 110 | + return obj | |
| 111 | + }, {}) | |
| 112 | + sendVisible.value = true | |
| 113 | +} | |
| 114 | + | |
| 115 | +const sendSmsTest = () => { | |
| 116 | + const data = { | |
| 117 | + mobile: sendSmsForm.value.mobile, | |
| 118 | + templateCode: sendSmsForm.value.templateCode, | |
| 119 | + templateParams: sendSmsForm.value.templateParams | |
| 120 | + } | |
| 121 | + SmsTemplateApi.sendSmsApi(data) | |
| 122 | + ElMessage.info('发送成功') | |
| 123 | + sendVisible.value = false | |
| 102 | 124 | } |
| 103 | 125 | |
| 104 | 126 | // ========== 初始化 ========== |
| ... | ... | @@ -213,4 +235,37 @@ getList() |
| 213 | 235 | <el-button @click="dialogVisible = false">{{ t('dialog.close') }}</el-button> |
| 214 | 236 | </template> |
| 215 | 237 | </Dialog> |
| 238 | + <Dialog v-model="sendVisible" title="测试"> | |
| 239 | + <el-form :model="sendSmsForm" :rules="sendSmsRules" label-width="140px"> | |
| 240 | + <el-form-item label="模板内容" prop="content"> | |
| 241 | + <el-input | |
| 242 | + v-model="sendSmsForm.content" | |
| 243 | + type="textarea" | |
| 244 | + placeholder="请输入模板内容" | |
| 245 | + readonly | |
| 246 | + /> | |
| 247 | + </el-form-item> | |
| 248 | + <el-form-item label="手机号" prop="mobile"> | |
| 249 | + <el-input v-model="sendSmsForm.mobile" placeholder="请输入手机号" /> | |
| 250 | + </el-form-item> | |
| 251 | + <el-form-item | |
| 252 | + v-for="param in sendSmsForm.params" | |
| 253 | + :key="param" | |
| 254 | + :label="'参数 {' + param + '}'" | |
| 255 | + :prop="'templateParams.' + param" | |
| 256 | + > | |
| 257 | + <el-input | |
| 258 | + v-model="sendSmsForm.templateParams[param]" | |
| 259 | + :placeholder="'请输入 ' + param + ' 参数'" | |
| 260 | + /> | |
| 261 | + </el-form-item> | |
| 262 | + </el-form> | |
| 263 | + <!-- 操作按钮 --> | |
| 264 | + <template #footer> | |
| 265 | + <el-button type="primary" :loading="loading" @click="sendSmsTest"> | |
| 266 | + {{ t('action.test') }} | |
| 267 | + </el-button> | |
| 268 | + <el-button @click="sendVisible = false">{{ t('dialog.close') }}</el-button> | |
| 269 | + </template> | |
| 270 | + </Dialog> | |
| 216 | 271 | </template> | ... | ... |