şunun yansıması
https://github.com/ialley-workshop-open/uni-halo.git
eşitlendi 2026-06-12 13:19:31 +08:00
新增:更新halo.config.js 配置参数;
更新:更新项目UI框架; 修复:修复友链列表丢失白色背景色BUG;
Bu işleme şunda yer alıyor:
@@ -5,11 +5,17 @@
|
||||
<script>
|
||||
export default {
|
||||
onLoad() {
|
||||
this.fnCheckHadStarted();
|
||||
this.fnCheckShowStarted();
|
||||
},
|
||||
methods: {
|
||||
// 检查是否已经启动过
|
||||
fnCheckHadStarted() {
|
||||
// 检查是否需要跳转到启动页
|
||||
fnCheckShowStarted() {
|
||||
if (!getApp().globalData.start.use) {
|
||||
uni.switchTab({
|
||||
url: '/pages/tabbar/home/home'
|
||||
});
|
||||
return;
|
||||
}
|
||||
if (uni.getStorageSync('APP_HAS_STARTED')) {
|
||||
uni.switchTab({
|
||||
url: '/pages/tabbar/home/home'
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<view class="app-page pb-24">
|
||||
<!-- 博主信息 -->
|
||||
<view class="blogger-info">
|
||||
<view class="blogger-info" :style="calcProfileStyle">
|
||||
<image class="avatar" :src="$utils.checkAvatarUrl(bloggerInfo.avatar)" mode="aspectFill" @click="miniProfileCard.show = true"></image>
|
||||
<view class="profile">
|
||||
<view class="author mt-24 text-size-g text-weight-b">{{ bloggerInfo.nickname }}</view>
|
||||
@@ -168,7 +168,19 @@ export default {
|
||||
},
|
||||
computed: {
|
||||
bloggerInfo() {
|
||||
return this.$tm.vx.getters().blogger.getBlogger;
|
||||
return this.$tm.vx.getters().getBlogger;
|
||||
},
|
||||
calcProfileStyle() {
|
||||
let _imgUrlOr = getApp().globalData.aboutProfileImageUrl;
|
||||
if (this.$utils.checkIsUrl(_imgUrlOr)) {
|
||||
return {
|
||||
backgroundImage: `url(${_imgUrlOr})`
|
||||
};
|
||||
} else {
|
||||
return {
|
||||
background: _imgUrlOr
|
||||
};
|
||||
}
|
||||
},
|
||||
calcWaveUrl() {
|
||||
return getApp().globalData.waveImageUrl;
|
||||
@@ -437,10 +449,8 @@ export default {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
height: 600rpx;
|
||||
background-image: url('@/static/summer.jpg');
|
||||
background-size: cover;
|
||||
background-repeat: no-repeat;
|
||||
// box-shadow: 0rpx 2rpx 24rpx rgba(0, 0, 0, 0.05);
|
||||
&:before {
|
||||
content: '';
|
||||
width: 100%;
|
||||
|
||||
@@ -136,9 +136,8 @@ export default {
|
||||
},
|
||||
|
||||
computed: {
|
||||
// 获取博主信息
|
||||
bloggerInfo() {
|
||||
let blogger = this.$tm.vx.getters().blogger.getBlogger;
|
||||
let blogger = this.$tm.vx.getters().getBlogger;
|
||||
blogger.avatar = this.$utils.checkAvatarUrl(blogger.avatar, true);
|
||||
return blogger;
|
||||
}
|
||||
@@ -150,13 +149,6 @@ export default {
|
||||
|
||||
created() {
|
||||
this.fnQuery();
|
||||
this.$httpApi
|
||||
.getOptionList()
|
||||
.then(result => {
|
||||
console.log('配置列表:');
|
||||
console.log(result);
|
||||
})
|
||||
.catch(err => {});
|
||||
},
|
||||
onPullDownRefresh() {
|
||||
this.isLoadMore = false;
|
||||
@@ -177,7 +169,6 @@ export default {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 查询数据
|
||||
fnQuery() {
|
||||
this.fnGetBanner();
|
||||
this.fnGetArticleList();
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<tm-skeleton model="listAvatr"></tm-skeleton>
|
||||
<tm-skeleton model="listAvatr"></tm-skeleton>
|
||||
</view>
|
||||
<view v-else class="content">
|
||||
<view v-else class="content" :class="{ 'bg-white': result.length !== 0 }">
|
||||
<!-- 空数据 -->
|
||||
<view v-if="result.length == 0" class="content-empty flex flex-center"><tm-empty icon="icon-shiliangzhinengduixiang-" label="啊偶,博主还没有朋友呢~"></tm-empty></view>
|
||||
|
||||
@@ -35,35 +35,39 @@
|
||||
<block v-for="(team, index) in result" :key="index">
|
||||
<view class="grey-lighten-4 text text-size-s text-weight-b px-32 py-12">{{ team.title }}</view>
|
||||
<block v-for="(link, linkIndex) in team.children" :key="link.id">
|
||||
<!-- 艳丽版本 -->
|
||||
<view
|
||||
v-if="!globalAppSettings.links.useSimple"
|
||||
class="info flex pa-36"
|
||||
:class="{ 'border-b-1': linkIndex != team.children.length - 1 }"
|
||||
@click="fnOnLinkEvent(link)"
|
||||
>
|
||||
<view class="link-logo"><cache-image class="link-logo_img" radius="12rpx" :url="link.logo" :fileMd5="link.logo" mode="aspectFill"></cache-image></view>
|
||||
<view class="flex flex-col pl-30 info-detail">
|
||||
<view class="link-card_name text-size-l text-weight-b text-red">{{ link.name }}</view>
|
||||
<view class="poup-tag ml--10 mt-6">
|
||||
<tm-tags color="bg-gradient-amber-accent" :shadow="0" size="s" model="fill">ID:{{ link.id }}</tm-tags>
|
||||
<tm-tags color=" bg-gradient-light-blue-lighten" :shadow="0" size="s" model="fill">{{ link.team }}</tm-tags>
|
||||
<tm-translate animation-name="fadeUp" :wait="(linkIndex + 1) * 30">
|
||||
<!-- 色彩版本 -->
|
||||
<view
|
||||
v-if="!globalAppSettings.links.useSimple"
|
||||
class="info flex pa-36"
|
||||
:class="{ 'border-b-1': linkIndex != team.children.length - 1 }"
|
||||
@click="fnOnLinkEvent(link)"
|
||||
>
|
||||
<view class="link-logo">
|
||||
<cache-image class="link-logo_img" radius="12rpx" :url="link.logo" :fileMd5="link.logo" mode="aspectFill"></cache-image>
|
||||
</view>
|
||||
<view class="link-card_desc text-overflow text-size-s mt-4">博客简介:{{ link.description || '这个博主很懒,没写简介~' }}</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 简洁版本 -->
|
||||
<view v-else class="link-card flex ml-24 mr-24 pt-24 pb-24" @click="fnOnLinkEvent(link)">
|
||||
<image class="logo shadow-6" :src="link.logo" mode="aspectFill"></image>
|
||||
<view class="info pl-24">
|
||||
<view class="name text-size-g">{{ link.name }}</view>
|
||||
<view class="desc mt-12 text-size-s text-grey-darken-1">{{ link.description }}</view>
|
||||
<view v-if="false" class="link mt-12 text-size-m text-grey-darken-1">
|
||||
<text class="iconfont icon-link mr-6 text-size-s"></text>
|
||||
{{ link.url }}
|
||||
<view class="flex flex-col pl-30 info-detail">
|
||||
<view class="link-card_name text-size-l text-weight-b text-red">{{ link.name }}</view>
|
||||
<view class="poup-tag ml--10 mt-6">
|
||||
<tm-tags color="bg-gradient-amber-accent" :shadow="0" size="s" model="fill">ID:{{ link.id }}</tm-tags>
|
||||
<tm-tags color=" bg-gradient-light-blue-lighten" :shadow="0" size="s" model="fill">{{ link.team }}</tm-tags>
|
||||
</view>
|
||||
<view class="link-card_desc text-overflow text-size-s mt-4">博客简介:{{ link.description || '这个博主很懒,没写简介~' }}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 简洁版本 -->
|
||||
<view v-else class="link-card flex ml-24 mr-24 pt-24 pb-24" @click="fnOnLinkEvent(link)">
|
||||
<image class="logo shadow-6" :src="link.logo" mode="aspectFill"></image>
|
||||
<view class="info pl-24">
|
||||
<view class="name text-size-g">{{ link.name }}</view>
|
||||
<view class="desc mt-12 text-size-s text-grey-darken-1">{{ link.description }}</view>
|
||||
<view v-if="false" class="link mt-12 text-size-m text-grey-darken-1">
|
||||
<text class="iconfont icon-link mr-6 text-size-s"></text>
|
||||
{{ link.url }}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</tm-translate>
|
||||
</block>
|
||||
</block>
|
||||
</block>
|
||||
@@ -109,7 +113,6 @@ import tmImages from '@/tm-vuetify/components/tm-images/tm-images.vue';
|
||||
import tmPoup from '@/tm-vuetify/components/tm-poup/tm-poup.vue';
|
||||
|
||||
import { GetRandomNumberByRange } from '@/utils/random.js';
|
||||
import findCnChart from '@/tm-vuetify/tool/function/findCnChart.js';
|
||||
export default {
|
||||
components: {
|
||||
tmSkeleton,
|
||||
@@ -177,7 +180,6 @@ export default {
|
||||
// 处理数据
|
||||
const _result = res.data.map(item => {
|
||||
const _team = item.team || '未分组';
|
||||
const _firstChart = _team ? _team.substring(0, 1) : '';
|
||||
const _links = item.links.map(link => {
|
||||
this.linkTotal += 1;
|
||||
link.logo = this.$utils.checkAvatarUrl(link.logo);
|
||||
@@ -185,7 +187,6 @@ export default {
|
||||
});
|
||||
return {
|
||||
title: _team,
|
||||
index: findCnChart(_firstChart),
|
||||
children: _links
|
||||
};
|
||||
});
|
||||
|
||||
Yeni konuda referans
Bir kullanıcı engelle