mirror of
https://github.com/hi2shark/nazhua.git
synced 2026-01-16 17:20:42 +08:00
✨ 支持针对单个服务器设置购买按钮的文案和图标
This commit is contained in:
parent
25c68fa64e
commit
8d7c815461
BIN
.github/images/remixicon-select.jpg
vendored
Normal file
BIN
.github/images/remixicon-select.jpg
vendored
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 18 KiB |
@ -16,7 +16,7 @@
|
|||||||
"echarts": "^5.5.1",
|
"echarts": "^5.5.1",
|
||||||
"flag-icons": "^7.2.3",
|
"flag-icons": "^7.2.3",
|
||||||
"font-logos": "^1.3.0",
|
"font-logos": "^1.3.0",
|
||||||
"remixicon": "^4.5.0",
|
"remixicon": "^4.6.0",
|
||||||
"uniqolor": "^1.1.1",
|
"uniqolor": "^1.1.1",
|
||||||
"vue": "^3.5.12",
|
"vue": "^3.5.12",
|
||||||
"vue-echarts": "^7.0.3",
|
"vue-echarts": "^7.0.3",
|
||||||
|
|||||||
@ -4,6 +4,7 @@ window.$$nazhuaConfig = {
|
|||||||
// freeAmount: '白嫖', // 免费服务的费用名称
|
// freeAmount: '白嫖', // 免费服务的费用名称
|
||||||
// infinityCycle: '长期有效', // 无限周期名称
|
// infinityCycle: '长期有效', // 无限周期名称
|
||||||
// buyBtnText: '购买', // 购买按钮文案
|
// buyBtnText: '购买', // 购买按钮文案
|
||||||
|
// buyBtnIcon: '', // 购买按钮图标,取自remixicon
|
||||||
// customBackgroundImage: '', // 自定义的背景图片地址
|
// customBackgroundImage: '', // 自定义的背景图片地址
|
||||||
// lightBackground: true, // 启用了浅色系背景图,会强制关闭点点背景
|
// lightBackground: true, // 启用了浅色系背景图,会强制关闭点点背景
|
||||||
// showFireworks: true, // 是否显示烟花,建议开启浅色系背景
|
// showFireworks: true, // 是否显示烟花,建议开启浅色系背景
|
||||||
|
|||||||
@ -16,6 +16,14 @@
|
|||||||
2. 本主题是一个纯前端项目,需要解决跨域问题,通常需要一个nginx或者caddy反代请求解决跨域问题。
|
2. 本主题是一个纯前端项目,需要解决跨域问题,通常需要一个nginx或者caddy反代请求解决跨域问题。
|
||||||
3. 我不会提供任何技术支持,如果你有问题,可以提issue,但是我不保证会回答,可能询问GPT会更快。
|
3. 我不会提供任何技术支持,如果你有问题,可以提issue,但是我不保证会回答,可能询问GPT会更快。
|
||||||
|
|
||||||
|
## 功能更新说明
|
||||||
|
### v0.5.3更新
|
||||||
|
新增:支持单独给服务器设置购买按钮的文案和图标,需要在公开备注的customData中添加`buyBtnText`和`buyBtnIcon`字段。
|
||||||
|
使用方法:`buyBtnText`用于设置购买按钮的文案,`buyBtnIcon`用于设置购买按钮的图标,图标支持Remixicon的图标名称,例如:`ri-gift-2-line`。
|
||||||
|
示例:点击复制图标名称,然后填写到`buyBtnIcon`字段中,补齐`ri-`前缀即可。
|
||||||
|

|
||||||
|
在线图标网站:[www.remixicon.com](https://www.remixicon.com/) 目前支持版本为4.6.0
|
||||||
|
|
||||||
## V0/V1的使用区别
|
## V0/V1的使用区别
|
||||||
### Docker版本的nazhua
|
### Docker版本的nazhua
|
||||||
使用V1必须在`config.js`中指定`nezhaVersion`的版本为`v1`,**大小写敏感*
|
使用V1必须在`config.js`中指定`nezhaVersion`的版本为`v1`,**大小写敏感*
|
||||||
|
|||||||
@ -231,7 +231,7 @@
|
|||||||
@click.stop="toBuy"
|
@click.stop="toBuy"
|
||||||
>
|
>
|
||||||
<span class="icon">
|
<span class="icon">
|
||||||
<span class="ri-shopping-bag-3-line" />
|
<span :class="buyBtnIcon" />
|
||||||
</span>
|
</span>
|
||||||
<span class="text">{{ buyBtnText }}</span>
|
<span class="text">{{ buyBtnText }}</span>
|
||||||
</div>
|
</div>
|
||||||
@ -260,7 +260,18 @@ const props = defineProps({
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
const buyBtnText = computed(() => config.nazhua.buyBtnText || '购买');
|
const buyBtnIcon = computed(() => {
|
||||||
|
if (props.info?.PublicNote?.customData?.buyBtnIcon) {
|
||||||
|
return props.info?.PublicNote?.customData?.buyBtnIcon;
|
||||||
|
}
|
||||||
|
return config.nazhua.buyBtnIcon || 'ri-shopping-bag-3-line';
|
||||||
|
});
|
||||||
|
const buyBtnText = computed(() => {
|
||||||
|
if (props.info?.PublicNote?.customData?.buyBtnText) {
|
||||||
|
return props.info?.PublicNote?.customData?.buyBtnText;
|
||||||
|
}
|
||||||
|
return config.nazhua.buyBtnText || '购买';
|
||||||
|
});
|
||||||
const showBuyBtn = computed(() => !!props.info?.PublicNote?.customData?.orderLink);
|
const showBuyBtn = computed(() => !!props.info?.PublicNote?.customData?.orderLink);
|
||||||
|
|
||||||
function toBuy() {
|
function toBuy() {
|
||||||
|
|||||||
@ -63,7 +63,7 @@
|
|||||||
@click.stop="toBuy"
|
@click.stop="toBuy"
|
||||||
>
|
>
|
||||||
<span class="icon">
|
<span class="icon">
|
||||||
<span class="ri-shopping-bag-3-line" />
|
<span :class="buyBtnIcon" />
|
||||||
</span>
|
</span>
|
||||||
<span class="text">{{ buyBtnText }}</span>
|
<span class="text">{{ buyBtnText }}</span>
|
||||||
</div>
|
</div>
|
||||||
@ -96,7 +96,18 @@ const {
|
|||||||
props,
|
props,
|
||||||
});
|
});
|
||||||
|
|
||||||
const buyBtnText = computed(() => config.nazhua.buyBtnText || '购买');
|
const buyBtnIcon = computed(() => {
|
||||||
|
if (props.info?.PublicNote?.customData?.buyBtnIcon) {
|
||||||
|
return props.info?.PublicNote?.customData?.buyBtnIcon;
|
||||||
|
}
|
||||||
|
return config.nazhua.buyBtnIcon || 'ri-shopping-bag-3-line';
|
||||||
|
});
|
||||||
|
const buyBtnText = computed(() => {
|
||||||
|
if (props.info?.PublicNote?.customData?.buyBtnText) {
|
||||||
|
return props.info?.PublicNote?.customData?.buyBtnText;
|
||||||
|
}
|
||||||
|
return config.nazhua.buyBtnText || '购买';
|
||||||
|
});
|
||||||
const showBuyBtn = computed(() => !!props.info?.PublicNote?.customData?.orderLink);
|
const showBuyBtn = computed(() => !!props.info?.PublicNote?.customData?.orderLink);
|
||||||
|
|
||||||
function toBuy() {
|
function toBuy() {
|
||||||
|
|||||||
@ -62,7 +62,12 @@ const {
|
|||||||
props,
|
props,
|
||||||
});
|
});
|
||||||
|
|
||||||
const buyBtnText = computed(() => config.nazhua.buyBtnText || '购买');
|
const buyBtnText = computed(() => {
|
||||||
|
if (props.info?.PublicNote?.customData?.buyBtnText) {
|
||||||
|
return props.info?.PublicNote?.customData?.buyBtnText;
|
||||||
|
}
|
||||||
|
return config.nazhua.buyBtnText || '购买';
|
||||||
|
});
|
||||||
const showBuyBtn = computed(() => !!props.info?.PublicNote?.customData?.orderLink);
|
const showBuyBtn = computed(() => !!props.info?.PublicNote?.customData?.orderLink);
|
||||||
|
|
||||||
function toBuy() {
|
function toBuy() {
|
||||||
|
|||||||
@ -2532,10 +2532,10 @@ regexp.prototype.flags@^1.5.2, regexp.prototype.flags@^1.5.3:
|
|||||||
es-errors "^1.3.0"
|
es-errors "^1.3.0"
|
||||||
set-function-name "^2.0.2"
|
set-function-name "^2.0.2"
|
||||||
|
|
||||||
remixicon@^4.5.0:
|
remixicon@^4.6.0:
|
||||||
version "4.5.0"
|
version "4.6.0"
|
||||||
resolved "https://registry.yarnpkg.com/remixicon/-/remixicon-4.5.0.tgz#75d625b89a98ae0322a5d39935366d59143172ee"
|
resolved "https://registry.yarnpkg.com/remixicon/-/remixicon-4.6.0.tgz#f2adafd18aaa983d61f8c9f7274fa17706da4ddc"
|
||||||
integrity sha512-IP/wNQGG3JCigaeFF3DERSTqMIZBlNu1yu8clNGB7wFe7ZN/ueKMplFHL5uEbnGpCzqfY6MlxIYn2vRzub+5cQ==
|
integrity sha512-bKM5odjqE1yzVxEZGJE7F79WHhNrJFIKHXR+GG+P1IWXn8AnJZhl8SbIRDJsNAvIqx4VPkNwjuHfc42tutMDpQ==
|
||||||
|
|
||||||
resolve-from@^4.0.0:
|
resolve-from@^4.0.0:
|
||||||
version "4.0.0"
|
version "4.0.0"
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user