mirror of
https://github.com/continew-org/continew-admin-ui.git
synced 2025-09-13 14:57:14 +08:00
docs: 更新官网相关链接
This commit is contained in:
@@ -20,8 +20,6 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import axios, { type AxiosRequestConfig, type AxiosResponse } from 'axios'
|
||||
import qs from 'query-string'
|
||||
import { isHttp } from '@/utils/validate'
|
||||
|
||||
export interface DataItem {
|
||||
@@ -33,45 +31,34 @@ export interface DataItem {
|
||||
const images = ref<DataItem[]>([
|
||||
{
|
||||
name: '公众号',
|
||||
img: `https://continew.top/qrcode-text.jpg?${new Date().getTime()}`,
|
||||
url: 'https://continew.top/about/intro.html',
|
||||
img: `https://continew.top/images/sponsor/ads/cn-qrcode.jpg?${new Date().getTime()}`,
|
||||
url: 'https://continew.top/discussion.html',
|
||||
},
|
||||
{
|
||||
name: '赞助',
|
||||
img: `https://continew.top/sponsor.jpg?${new Date().getTime()}`,
|
||||
url: 'https://continew.top/sponsor.html',
|
||||
img: `https://continew.top/images/sponsor/ads/cn-sponsor.jpg?${new Date().getTime()}`,
|
||||
url: 'https://continew.top/sponsor/',
|
||||
},
|
||||
])
|
||||
|
||||
const get = <T = unknown>(url: string, params?: object, config?: AxiosRequestConfig): Promise<ApiRes<T>> => {
|
||||
return new Promise((resolve, reject) => {
|
||||
axios
|
||||
.request<T>({
|
||||
method: 'get',
|
||||
url,
|
||||
params,
|
||||
paramsSerializer: (obj) => {
|
||||
return qs.stringify(obj)
|
||||
},
|
||||
...config,
|
||||
})
|
||||
.then((res: AxiosResponse) => resolve(res.data))
|
||||
.catch((err: { msg: string }) => reject(err))
|
||||
})
|
||||
}
|
||||
|
||||
const dataList = ref<DataItem[]>([])
|
||||
const loading = ref(false)
|
||||
// 查询列表数据
|
||||
const getDataList = async () => {
|
||||
try {
|
||||
loading.value = true
|
||||
const { data } = await get('https://api.charles7c.top/sponsor/platinum')
|
||||
const base = `https://continew.top`
|
||||
const data = await (await fetch(`${base}/sponsor.json`)).json()
|
||||
if (data) {
|
||||
data.forEach((item) => {
|
||||
// 只获取 special 和 platinum 赞助者
|
||||
const sponsors = [...data.special, data.platinum]
|
||||
sponsors.forEach((item) => {
|
||||
if (!item.name) {
|
||||
return
|
||||
}
|
||||
dataList.value.push({
|
||||
name: item.name,
|
||||
img: isHttp(item.img) ? item.img : `https://continew.top${item.img}`,
|
||||
img: isHttp(item.img) ? item.img : `${base}/images/sponsor/ads/${item.img}`,
|
||||
url: item.url,
|
||||
})
|
||||
})
|
||||
|
@@ -25,12 +25,12 @@
|
||||
|
||||
<script setup lang="ts">
|
||||
const links = [
|
||||
{ text: '项目简介', url: 'https://continew.top/admin/intro/what-is.html' },
|
||||
{ text: '快速开始', url: 'https://continew.top/admin/intro/quick-start.html' },
|
||||
{ text: '常见问题', url: 'https://continew.top/faq.html' },
|
||||
{ text: '项目简介', url: 'https://continew.top/admin/guide/introduction.html' },
|
||||
{ text: '快速开始', url: 'https://continew.top/admin/guide/quick-start.html' },
|
||||
{ text: '常见问题', url: 'https://continew.top/admin/faq.html' },
|
||||
{ text: '更新日志', url: 'https://continew.top/admin/other/changelog.html' },
|
||||
{ text: '贡献指南', url: 'https://continew.top/admin/other/contributing.html' },
|
||||
{ text: '赞助支持 💖', url: 'https://continew.top/sponsor.html' },
|
||||
{ text: '贡献指南', url: 'https://continew.top/about/contributing.html' },
|
||||
{ text: '赞助支持 💖', url: 'https://continew.top/sponsor/' },
|
||||
]
|
||||
</script>
|
||||
|
||||
|
Reference in New Issue
Block a user