Skip to content
This repository has been archived by the owner on Dec 31, 2023. It is now read-only.

Commit

Permalink
feat: 新增 收款二维码
Browse files Browse the repository at this point in the history
  • Loading branch information
CaoMeiYouRen committed Sep 28, 2021
1 parent 9228449 commit ed946d5
Show file tree
Hide file tree
Showing 7 changed files with 36 additions and 5 deletions.
2 changes: 2 additions & 0 deletions .env
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,5 @@ VUE_APP_POLICE = '浙公安备33102302000270号'
VUE_APP_ICP = '浙ICP备18041571-4号'
# 网站备案的名称
VUE_APP_ICP_TITLE='个人学习日志记录'
# 启用收款二维码
VUE_APP_ENABLE_QR_CODE=true
2 changes: 1 addition & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const __PROD__ = process.env.NODE_ENV === 'production' ? 2 : 0
// const __PROD__ = process.env.NODE_ENV === 'production' ? 2 : 0
module.exports = {
root: true,
env: {
Expand Down
Binary file added src/assets/wx.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/zfb.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions src/config/env.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,5 @@ export const POLICE = env.VUE_APP_POLICE || ''
export const ICP = env.VUE_APP_ICP || ''

export const ICP_TITLE = env.VUE_APP_ICP_TITLE || ''

export const ENABLE_QR_CODE = env.VUE_APP_ENABLE_QR_CODE === 'true'
26 changes: 24 additions & 2 deletions src/layout/HomeLayout.vue
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,22 @@
<v-divider v-if="index<menuList.length-1" />
</div>
</v-list>
<template v-if="ENABLE_QR_CODE">
<v-img
class="rounded-lg"
:src="wxImg"
width="220"
contain
title="微信支付"
/>
<v-img
class="rounded-lg"
:src="zfbImg"
width="220"
contain
title="支付宝"
/>
</template>
</v-navigation-drawer>
<!-- 顶部导航栏 -->
<v-app-bar
Expand Down Expand Up @@ -118,13 +134,16 @@

<script lang="ts">
import { useOnWindowResize } from '@/composable'
import { NODE_ENV, BASE_URL, BILI_UID, CDN_PATH, GITHUB_LINK } from '@/config/env'
import { NODE_ENV, BASE_URL, BILI_UID, CDN_PATH, GITHUB_LINK, ENABLE_QR_CODE } from '@/config/env'
import { messages } from '@/locales'
import i18n from '@/plugins/i18n'
import vuetify from '@/plugins/vuetify'
import { computed, defineComponent, onUnmounted } from '@vue/composition-api'
import { useOnScroll, useTitle } from 'vue-composable'
import { useOnScroll } from 'vue-composable'
import { safeOpenUrl } from '@/utils/helper'
import wxImg from '@/assets/wx.png'
import zfbImg from '@/assets/zfb.jpg'
/**
* 切换语言
*/
Expand Down Expand Up @@ -199,7 +218,10 @@ export default defineComponent({
langList,
menuList,
backTop,
wxImg,
zfbImg,
scrollTop,
ENABLE_QR_CODE,
}
},
watch: {
Expand Down
9 changes: 7 additions & 2 deletions src/views/Home.vue
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,11 @@
<b>使用指南</b>:点击按钮即可播放对应音声;多次点击可以造成相当鬼畜的效果;开启洗脑循环将会一直播放一个音频;
同时开启循环播放和洗脑循环将会出现 地 狱 绘 卷。<br>
<b>声明</b>:本项目仅为 DD 作品,和 白神遥Haruka、P-SP 官方没有关联<br>
更多内容请参考 <a :href="GITHUB_LINK + '#readme'" target="_blank">README</a>
更多内容请参考 <a :href="GITHUB_LINK + '#readme'" target="_blank">README</a><br>
<template v-if="ENABLE_QR_CODE">
<v-divider />
欢迎赞助本项目!赞助资金将用于本网站的日常运营!也将为草梅继续维护项目提供信心~
</template>
</v-col>
</v-row>
</HarukaCard>
Expand Down Expand Up @@ -213,7 +217,7 @@
<script lang="ts">
import shabao from '@/assets/shabao.jpg'
import shabaoMin from '@/assets/shabao.min.jpg'
import { BILI_UID, RSS_BASE_URL, HTML_TITLE, GITHUB_LINK } from '@/config/env'
import { BILI_UID, RSS_BASE_URL, HTML_TITLE, GITHUB_LINK, ENABLE_QR_CODE } from '@/config/env'
import { friendshipLinks } from '@/config/links'
import voices from '@/config/voices'
import { rssParserString } from '@/utils/rssParser'
Expand Down Expand Up @@ -367,6 +371,7 @@ export default defineComponent({
...dynamic,
HTML_TITLE,
GITHUB_LINK,
ENABLE_QR_CODE,
}
},
})
Expand Down

0 comments on commit ed946d5

Please sign in to comment.