mirror of
https://github.com/yangjian102621/geekai.git
synced 2025-11-08 02:03:42 +08:00
add email white list check in register handler
This commit is contained in:
@@ -400,6 +400,18 @@
|
||||
</el-form>
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
|
||||
<el-tab-pane label="修复数据" name="fixData">
|
||||
<div class="container">
|
||||
<p class="text">有些版本升级的时候更新了数据库的结构,比如字段名字改了,需要把之前的字段的值转移到其他字段,这些无法通过简单的 SQL 语句可以实现的,需要手动写程序修正数据。</p>
|
||||
|
||||
<p class="text">当前版本 v4.1.4 需要修正用户数据,增加了 mobile 和 email 字段,需要把之前用手机号或者邮箱注册的用户的 username 字段数据初始化到 mobile 或者 email 字段。另外,需要把订单的支付渠道从名字称修正为 key。</p>
|
||||
|
||||
<el-text type="danger">请注意:在修复数据前,请先备份好数据库,以免数据丢失!</el-text>
|
||||
|
||||
<p><el-button type="primary" @click="fixData">立即修复</el-button></p>
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</div>
|
||||
</template>
|
||||
@@ -408,7 +420,7 @@
|
||||
import {onMounted, reactive, ref} from "vue";
|
||||
import {httpGet, httpPost} from "@/utils/http";
|
||||
import Compressor from "compressorjs";
|
||||
import {ElMessage} from "element-plus";
|
||||
import {ElMessage, ElMessageBox} from "element-plus";
|
||||
import {InfoFilled, UploadFilled,Select,CloseBold} from "@element-plus/icons-vue";
|
||||
import MdEditor from "md-editor-v3";
|
||||
import 'md-editor-v3/lib/style.css';
|
||||
@@ -463,7 +475,7 @@ onMounted(() => {
|
||||
})
|
||||
|
||||
const fetchLicense = () => {
|
||||
httpGet("/api/admin/config/get/license").then(res => {
|
||||
httpGet("/api/admin/config/license").then(res => {
|
||||
license.value = res.data
|
||||
}).catch(e => {
|
||||
ElMessage.error("获取 License 失败:" + e.message)
|
||||
@@ -502,7 +514,7 @@ const active = () => {
|
||||
if (licenseKey.value === "") {
|
||||
return ElMessage.error("请输入授权码")
|
||||
}
|
||||
httpPost("/api/admin/active", {license: licenseKey.value}).then(res => {
|
||||
httpPost("/api/admin/config/active", {license: licenseKey.value}).then(res => {
|
||||
ElMessage.success("授权成功,机器编码为:" + res.data)
|
||||
fetchLicense()
|
||||
}).catch(e => {
|
||||
@@ -556,6 +568,25 @@ const onUploadImg = (files, callback) => {
|
||||
})
|
||||
};
|
||||
|
||||
const fixData = () => {
|
||||
|
||||
ElMessageBox.confirm(
|
||||
'在修复数据前,请先备份好数据库,以免数据丢失!是否继续操作?',
|
||||
'警告',
|
||||
{
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning',
|
||||
}
|
||||
).then(() => {
|
||||
httpGet("/api/admin/config/fixData").then(() => {
|
||||
ElMessage.success("数据修复成功")
|
||||
}).catch(e => {
|
||||
ElMessage.error("数据修复失败:" + e.message)
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
@@ -606,6 +637,10 @@ const onUploadImg = (files, callback) => {
|
||||
}
|
||||
|
||||
|
||||
.text {
|
||||
font-size 14px
|
||||
}
|
||||
|
||||
.active-info {
|
||||
line-height 1.5
|
||||
padding 10px 0 30px 0
|
||||
|
||||
Reference in New Issue
Block a user