mirror of https://github.com/certd/certd
chore: buy page and login
parent
bc174f7054
commit
54365528a8
|
@ -17,10 +17,26 @@ function base64(data: string) {
|
||||||
function base64Decode(data: string) {
|
function base64Decode(data: string) {
|
||||||
return Buffer.from(data, "base64").toString("utf8");
|
return Buffer.from(data, "base64").toString("utf8");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function toHex(data: number | string) {
|
||||||
|
if (typeof data === "number") {
|
||||||
|
return data.toString(16);
|
||||||
|
}
|
||||||
|
return Buffer.from(data).toString("hex");
|
||||||
|
}
|
||||||
|
function hexToStr(data: string) {
|
||||||
|
return Buffer.from(data, "hex").toString("utf8");
|
||||||
|
}
|
||||||
|
function hexToNumber(data: string) {
|
||||||
|
return parseInt(data, 16);
|
||||||
|
}
|
||||||
export const hashUtils = {
|
export const hashUtils = {
|
||||||
md5,
|
md5,
|
||||||
sha256,
|
sha256,
|
||||||
base64,
|
base64,
|
||||||
base64Decode,
|
base64Decode,
|
||||||
hmacSha256,
|
hmacSha256,
|
||||||
|
toHex,
|
||||||
|
hexToStr,
|
||||||
|
hexToNumber
|
||||||
};
|
};
|
||||||
|
|
|
@ -10,4 +10,4 @@ VITE_APP_LOGO=static/images/logo/logo.svg
|
||||||
VITE_APP_LOGIN_LOGO=static/images/logo/rect-black.svg
|
VITE_APP_LOGIN_LOGO=static/images/logo/rect-black.svg
|
||||||
VITE_APP_PROJECT_PATH=https://github.com/certd/certd
|
VITE_APP_PROJECT_PATH=https://github.com/certd/certd
|
||||||
VITE_APP_NAMESPACE=fs
|
VITE_APP_NAMESPACE=fs
|
||||||
VITE_APP_VIP_PRODUCT_URL=http://localhost:1017/subject#/product/list
|
VITE_APP_VIP_PRODUCT_URL="http://localhost:1017/subject#/product/list"
|
|
@ -21,7 +21,7 @@ import { useRouter } from "vue-router";
|
||||||
import { useUserStore } from "/@/store/user";
|
import { useUserStore } from "/@/store/user";
|
||||||
import { mitter } from "/@/utils/util.mitt";
|
import { mitter } from "/@/utils/util.mitt";
|
||||||
import { useI18n } from "vue-i18n";
|
import { useI18n } from "vue-i18n";
|
||||||
|
import { env } from "/@/utils/util.env";
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
|
|
||||||
const settingStore = useSettingStore();
|
const settingStore = useSettingStore();
|
||||||
|
@ -231,6 +231,10 @@ function openUpgrade() {
|
||||||
title = t("vip.renew_pro_upgrade_business");
|
title = t("vip.renew_pro_upgrade_business");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// const goBuyUrl = "https://afdian.com/a/greper"
|
||||||
|
const subjectId = settingStore.installInfo.siteId;
|
||||||
|
const appKey = settingStore.installInfo.appKey;
|
||||||
|
const goBuyUrl = `${env.VIP_PRODUCT_URL}?appKey=${appKey}&subjectId=${subjectId}`;
|
||||||
const productInfo = settingStore.productInfo;
|
const productInfo = settingStore.productInfo;
|
||||||
const vipTypeDefine = {
|
const vipTypeDefine = {
|
||||||
free: {
|
free: {
|
||||||
|
@ -258,7 +262,7 @@ function openUpgrade() {
|
||||||
get() {
|
get() {
|
||||||
return (
|
return (
|
||||||
<a-tooltip title={t("vip.afdian_support_vip")}>
|
<a-tooltip title={t("vip.afdian_support_vip")}>
|
||||||
<a-button size="small" type="primary" href="https://afdian.com/a/greper" target="_blank">
|
<a-button size="small" type="primary" href={goBuyUrl} target="_blank">
|
||||||
{t("vip.get_after_support")}
|
{t("vip.get_after_support")}
|
||||||
</a-button>
|
</a-button>
|
||||||
</a-tooltip>
|
</a-tooltip>
|
||||||
|
@ -291,7 +295,7 @@ function openUpgrade() {
|
||||||
content: () => {
|
content: () => {
|
||||||
let activationCodeGetWay = (
|
let activationCodeGetWay = (
|
||||||
<span>
|
<span>
|
||||||
<a href="https://afdian.com/a/greper" target="_blank">
|
<a href={goBuyUrl} target="_blank">
|
||||||
{t("vip.get_pro_code_after_support")}
|
{t("vip.get_pro_code_after_support")}
|
||||||
</a>
|
</a>
|
||||||
<span> {t("vip.business_contact_author")}</span>
|
<span> {t("vip.business_contact_author")}</span>
|
||||||
|
|
|
@ -6,22 +6,28 @@ export function getEnvValue(key: string) {
|
||||||
|
|
||||||
export class EnvConfig {
|
export class EnvConfig {
|
||||||
MODE: string = import.meta.env.MODE;
|
MODE: string = import.meta.env.MODE;
|
||||||
API: string = import.meta.env.VITE_APP_API;
|
API: string;
|
||||||
STORAGE: string = import.meta.env.VITE_APP_STORAGE;
|
STORAGE: string;
|
||||||
TITLE: string = import.meta.env.VITE_APP_TITLE;
|
TITLE: string;
|
||||||
SLOGAN: string = import.meta.env.VITE_APP_SLOGAN;
|
SLOGAN: string;
|
||||||
LOGO: string = import.meta.env.VITE_APP_LOGO;
|
LOGO: string;
|
||||||
LOGIN_LOGO: string = import.meta.env.VITE_APP_LOGIN_LOGO;
|
LOGIN_LOGO: string;
|
||||||
ICP_NO: string = import.meta.env.VITE_APP_ICP_NO;
|
ICP_NO: string;
|
||||||
COPYRIGHT_YEAR: string = import.meta.env.VITE_APP_COPYRIGHT_YEAR;
|
COPYRIGHT_YEAR: string;
|
||||||
COPYRIGHT_NAME: string = import.meta.env.VITE_APP_COPYRIGHT_NAME;
|
COPYRIGHT_NAME: string;
|
||||||
COPYRIGHT_URL: string = import.meta.env.VITE_APP_COPYRIGHT_URL;
|
COPYRIGHT_URL: string;
|
||||||
PM_ENABLED: string = import.meta.env.VITE_APP_PM_ENABLED;
|
PM_ENABLED: string;
|
||||||
|
VIP_PRODUCT_URL: string;
|
||||||
|
|
||||||
init(env: any) {
|
constructor() {
|
||||||
|
this.init();
|
||||||
|
}
|
||||||
|
init() {
|
||||||
|
const env = import.meta.env;
|
||||||
for (const key in this) {
|
for (const key in this) {
|
||||||
if (this.hasOwnProperty(key)) {
|
const metaKey = "VITE_APP_" + key;
|
||||||
this[key] = env[key];
|
if (this.hasOwnProperty(key) && env.hasOwnProperty(metaKey)) {
|
||||||
|
this[key] = env[metaKey];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -252,7 +252,7 @@ export default function ({ crudExpose, context }: CreateCrudOptionsProps): Creat
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
createTime: {
|
createTime: {
|
||||||
title: t("certd.create_time"),
|
title: t("certd.createTime"),
|
||||||
type: "datetime",
|
type: "datetime",
|
||||||
form: {
|
form: {
|
||||||
show: false,
|
show: false,
|
||||||
|
@ -264,7 +264,7 @@ export default function ({ crudExpose, context }: CreateCrudOptionsProps): Creat
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
updateTime: {
|
updateTime: {
|
||||||
title: t("certd.update_time"),
|
title: t("certd.updateTime"),
|
||||||
type: "datetime",
|
type: "datetime",
|
||||||
form: {
|
form: {
|
||||||
show: false,
|
show: false,
|
||||||
|
|
|
@ -375,7 +375,7 @@ export default function ({ crudExpose, context }: CreateCrudOptionsProps): Creat
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
createTime: {
|
createTime: {
|
||||||
title: t("certd.create_time"),
|
title: t("certd.createTime"),
|
||||||
type: "datetime",
|
type: "datetime",
|
||||||
form: {
|
form: {
|
||||||
show: false,
|
show: false,
|
||||||
|
@ -387,7 +387,7 @@ export default function ({ crudExpose, context }: CreateCrudOptionsProps): Creat
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
updateTime: {
|
updateTime: {
|
||||||
title: t("certd.update_time"),
|
title: t("certd.updateTime"),
|
||||||
type: "datetime",
|
type: "datetime",
|
||||||
form: {
|
form: {
|
||||||
show: false,
|
show: false,
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
typeorm:
|
typeorm:
|
||||||
dataSource:
|
dataSource:
|
||||||
default:
|
default:
|
||||||
database: './data/db-plus-dev-1.sqlite'
|
database: './data/db-plus-dev.sqlite'
|
||||||
|
|
||||||
# plus server: 'http://127.0.0.1:11007'
|
# plus server: 'http://127.0.0.1:11007'
|
||||||
|
|
||||||
|
|
|
@ -128,6 +128,8 @@ export class CnameRecordService extends BaseService<CnameRecordEntity> {
|
||||||
if (!param.id) {
|
if (!param.id) {
|
||||||
throw new ValidateException('id不能为空');
|
throw new ValidateException('id不能为空');
|
||||||
}
|
}
|
||||||
|
//hostRecord包含所有权校验信息,不允许用户修改hostRecord
|
||||||
|
delete param.hostRecord
|
||||||
|
|
||||||
const old = await this.info(param.id);
|
const old = await this.info(param.id);
|
||||||
if (!old) {
|
if (!old) {
|
||||||
|
|
Loading…
Reference in New Issue