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) {
|
||||
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 = {
|
||||
md5,
|
||||
sha256,
|
||||
base64,
|
||||
base64Decode,
|
||||
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_PROJECT_PATH=https://github.com/certd/certd
|
||||
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 { mitter } from "/@/utils/util.mitt";
|
||||
import { useI18n } from "vue-i18n";
|
||||
|
||||
import { env } from "/@/utils/util.env";
|
||||
const { t } = useI18n();
|
||||
|
||||
const settingStore = useSettingStore();
|
||||
|
@ -231,6 +231,10 @@ function openUpgrade() {
|
|||
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 vipTypeDefine = {
|
||||
free: {
|
||||
|
@ -258,7 +262,7 @@ function openUpgrade() {
|
|||
get() {
|
||||
return (
|
||||
<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")}
|
||||
</a-button>
|
||||
</a-tooltip>
|
||||
|
@ -291,7 +295,7 @@ function openUpgrade() {
|
|||
content: () => {
|
||||
let activationCodeGetWay = (
|
||||
<span>
|
||||
<a href="https://afdian.com/a/greper" target="_blank">
|
||||
<a href={goBuyUrl} target="_blank">
|
||||
{t("vip.get_pro_code_after_support")}
|
||||
</a>
|
||||
<span> {t("vip.business_contact_author")}</span>
|
||||
|
|
|
@ -6,22 +6,28 @@ export function getEnvValue(key: string) {
|
|||
|
||||
export class EnvConfig {
|
||||
MODE: string = import.meta.env.MODE;
|
||||
API: string = import.meta.env.VITE_APP_API;
|
||||
STORAGE: string = import.meta.env.VITE_APP_STORAGE;
|
||||
TITLE: string = import.meta.env.VITE_APP_TITLE;
|
||||
SLOGAN: string = import.meta.env.VITE_APP_SLOGAN;
|
||||
LOGO: string = import.meta.env.VITE_APP_LOGO;
|
||||
LOGIN_LOGO: string = import.meta.env.VITE_APP_LOGIN_LOGO;
|
||||
ICP_NO: string = import.meta.env.VITE_APP_ICP_NO;
|
||||
COPYRIGHT_YEAR: string = import.meta.env.VITE_APP_COPYRIGHT_YEAR;
|
||||
COPYRIGHT_NAME: string = import.meta.env.VITE_APP_COPYRIGHT_NAME;
|
||||
COPYRIGHT_URL: string = import.meta.env.VITE_APP_COPYRIGHT_URL;
|
||||
PM_ENABLED: string = import.meta.env.VITE_APP_PM_ENABLED;
|
||||
API: string;
|
||||
STORAGE: string;
|
||||
TITLE: string;
|
||||
SLOGAN: string;
|
||||
LOGO: string;
|
||||
LOGIN_LOGO: string;
|
||||
ICP_NO: string;
|
||||
COPYRIGHT_YEAR: string;
|
||||
COPYRIGHT_NAME: string;
|
||||
COPYRIGHT_URL: string;
|
||||
PM_ENABLED: string;
|
||||
VIP_PRODUCT_URL: string;
|
||||
|
||||
init(env: any) {
|
||||
constructor() {
|
||||
this.init();
|
||||
}
|
||||
init() {
|
||||
const env = import.meta.env;
|
||||
for (const key in this) {
|
||||
if (this.hasOwnProperty(key)) {
|
||||
this[key] = env[key];
|
||||
const metaKey = "VITE_APP_" + key;
|
||||
if (this.hasOwnProperty(key) && env.hasOwnProperty(metaKey)) {
|
||||
this[key] = env[metaKey];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -252,7 +252,7 @@ export default function ({ crudExpose, context }: CreateCrudOptionsProps): Creat
|
|||
},
|
||||
},
|
||||
createTime: {
|
||||
title: t("certd.create_time"),
|
||||
title: t("certd.createTime"),
|
||||
type: "datetime",
|
||||
form: {
|
||||
show: false,
|
||||
|
@ -264,7 +264,7 @@ export default function ({ crudExpose, context }: CreateCrudOptionsProps): Creat
|
|||
},
|
||||
},
|
||||
updateTime: {
|
||||
title: t("certd.update_time"),
|
||||
title: t("certd.updateTime"),
|
||||
type: "datetime",
|
||||
form: {
|
||||
show: false,
|
||||
|
|
|
@ -375,7 +375,7 @@ export default function ({ crudExpose, context }: CreateCrudOptionsProps): Creat
|
|||
},
|
||||
},
|
||||
createTime: {
|
||||
title: t("certd.create_time"),
|
||||
title: t("certd.createTime"),
|
||||
type: "datetime",
|
||||
form: {
|
||||
show: false,
|
||||
|
@ -387,7 +387,7 @@ export default function ({ crudExpose, context }: CreateCrudOptionsProps): Creat
|
|||
},
|
||||
},
|
||||
updateTime: {
|
||||
title: t("certd.update_time"),
|
||||
title: t("certd.updateTime"),
|
||||
type: "datetime",
|
||||
form: {
|
||||
show: false,
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
typeorm:
|
||||
dataSource:
|
||||
default:
|
||||
database: './data/db-plus-dev-1.sqlite'
|
||||
database: './data/db-plus-dev.sqlite'
|
||||
|
||||
# plus server: 'http://127.0.0.1:11007'
|
||||
|
||||
|
|
|
@ -128,6 +128,8 @@ export class CnameRecordService extends BaseService<CnameRecordEntity> {
|
|||
if (!param.id) {
|
||||
throw new ValidateException('id不能为空');
|
||||
}
|
||||
//hostRecord包含所有权校验信息,不允许用户修改hostRecord
|
||||
delete param.hostRecord
|
||||
|
||||
const old = await this.info(param.id);
|
||||
if (!old) {
|
||||
|
|
Loading…
Reference in New Issue