更新羽声语音h5

This commit is contained in:
yziiy
2025-10-23 16:04:28 +08:00
parent f77801f9a1
commit 4fc72fbffe
228 changed files with 5384 additions and 4065 deletions

View File

@@ -1,9 +1,9 @@
<template>
<view class="view-page" :style="{backgroundImage : `url('${ThemeData?.app_bg ?? 'https://vespa.qxmier.com/image/bg.png'}')`}">
<view class="view-page" :style="{backgroundImage: `url('${ThemeData?.app_bg || baseBgUrl}')`}">
<navBar :style="{marginTop: `${statusBarHeight}${uni.getSystemInfoSync().platform === 'ios' ? 'px': 'dp'}`}"
:navTitle="'公会中心'" :emitBack="true" @backEvent="back">
<template #rightView>
<view v-if="isMerber" @click="jumpMineUnion" class="font-24" style="color:#FF8ACC;white-space: nowrap">
<view v-if="isMerber" @click="jumpMineUnion" class="font-24 minUnicon" style="white-space: nowrap">
我的公会
</view>
</template>
@@ -17,9 +17,13 @@
搜索
</view>
</view>
<view class="swipe-view">
</view>
<swiper class="swipe-view" circular :autoplay="true" :interval="2000" :duration="500">
<swiper-item v-for="item in swiperList" :key="item">
<view class="swiper-item uni-bg-red">
<img :src="item.image" alt="" />
</view>
</swiper-item>
</swiper>
<view class="title">
热门公会
</view>
@@ -43,20 +47,27 @@
<view class="chairman-portrait">
<img :src="data.user_avatar" alt="暂无头像" />
</view>
<view class="truncate-three">
<view class="chairman-name">
{{data.user_name}}
</view>
</view>
</view>
</view>
<view class="right-button">
<view class="online-view" v-if="data.guild_user_list.length">
<div class="avatars-container" v-for="ele in data.guild_user_list.slice(0,3)" :key="ele.id">
<view class="avatar">
<img :src="ele.avatar" alt="" />
<!-- <view class="apply-button">
申请
</view> -->
<view class="online-view">
<view v-show="data.guild_user_list.length">
<view class="avatars-container">
<view class="avatar" v-for="ele in data.guild_user_list.slice(0,3)" :key="ele.id">
<img :src="ele.avatar" alt="" />
</view>
</view>
</div>
<view class="online-people truncate-three">
</view>
<view class="online-people">
{{data.num}}
</view>
</view>
@@ -72,6 +83,7 @@
import navBar from '@/component/nav.vue';
import http from '@/until/http.js';
import logo from '@/static/image/logo.png';
import baseBgUrl from '@/static/image/general/fy_bg.jpg';
export default {
components: {
navBar
@@ -79,6 +91,7 @@
data() {
return {
searchValue: '',
baseBgUrl,
logo,
loading: false,
noMore: false,
@@ -91,7 +104,8 @@
listData: [],
UnionByUser: null,
statusBarHeight: 0,
ThemeData:null
ThemeData: null,
swiperList: []
}
},
onLoad(options) {
@@ -99,16 +113,26 @@
id,
h
} = options
uni.setStorageSync('token', id || '14a62bb9dac0eebf7fb9643639a7e172')
uni.setStorageSync('token', id || '')
if (uni.getStorageSync('token')) {
this.getList()
this.getInfo()
this.getSwiper()
}
this.statusBarHeight = h
uni.setStorageSync('BarHeight', h)
if(uni.getStorageSync('Theme_Data')) {
if (uni.getStorageSync('Theme_Data')) {
this.ThemeData = JSON.parse(uni.getStorageSync('Theme_Data'))
}
// 监听事件,事件名如 'refreshList'
uni.$on('refreshList', (data) => {
this.refreshList(); // 执行刷新方法
// 如果传递了数据,可以从 data 中获取
});
},
onUnload() {
// 页面卸载时移除事件监听,避免内存泄漏和重复监听
uni.$off('refreshList');
},
onReachBottom() {
if (!this.loading && !this.noMore) {
@@ -125,6 +149,11 @@
this.listData = []
this.getList()
},
refreshList() {
this.searchValue = ''
this.search()
this.getInfo()
},
closeWeb() {
const platform = uni.getSystemInfoSync().platform;
// console.log(platform, '打印设备参数')
@@ -140,9 +169,21 @@
window.Android.closeWeb();
}
},
async getSwiper() {
http.get('/api/banner/get_banner_list', {
token: uni.getStorageSync('token') || '',
show_type: 5
}).then(response => {
const {
data,
code
} = response
this.swiperList = code ? data : []
})
},
async getInfo() {
http.get('/api/Guild/is_guild_member', {
token: uni.getStorageSync('token') ?? ''
token: uni.getStorageSync('token') || ''
}).then(response => {
const {
data,
@@ -161,7 +202,7 @@
page: this.pageConfig.currentPage,
limit: this.pageConfig.pageSize,
search_id: this.searchValue,
token: uni.getStorageSync('token') ?? ''
token: uni.getStorageSync('token') || ''
}).then(response => {
const {
data,
@@ -199,8 +240,8 @@
});
},
copyData(text) {
if(text) {
if (text) {
if (uni.getSystemInfoSync().platform === 'h5') {
const textarea = document.createElement('textarea');
textarea.value = text;
@@ -208,7 +249,7 @@
textarea.select();
document.execCommand('copy');
document.body.removeChild(textarea);
uni.showToast({
title: '复制成功',
icon: 'none',
@@ -245,7 +286,7 @@
}
</script>
<style lang="scss">
<style lang="scss" scoped>
.view-page {
// padding: 32rpx;
// min-height: 100vh;
@@ -255,6 +296,10 @@
background-repeat: no-repeat;
background-size: 100% 100%;
.minUnicon {
color: var(--primary-color);
}
.content {
padding: 0 32rpx;
}
@@ -317,12 +362,12 @@
.swipe-view {
width: 100%;
height: 200rpx;
background-color: antiquewhite;
// background-color: antiquewhite;
border-radius: 14rpx;
margin-top: 36rpx;
background-image: url('/static/image/swiper.png');
background-repeat: no-repeat;
background-size: 100% 100%;
// background-image: url('/static/image/swiper.jpg');
// background-repeat: no-repeat;
// background-size: 100% 100%;
}
.title {
@@ -351,8 +396,8 @@
/* 头像 */
.head-portrait {
width: 100rpx;
height: 100rpx;
width: 120rpx;
height: 120rpx;
border-radius: 50%;
img {
@@ -375,18 +420,23 @@
/* 会长样式 */
.chairman {
width: 106rpx;
min-width: 106rpx;
height: 36rpx;
padding: 0 12rpx;
color: #fff;
font-size: 24rpx;
text-align: right;
background: #333333;
background: var(--subss-color);
border-radius: 116rpx 116rpx 116rpx 116rpx;
border: 2rpx solid #333333;
border: 2rpx solid var(--subss-color);
position: relative;
left: 10rpx;
margin: 32rpx 0;
display: inline-flex;
.truncate-three {
text-align: left;
}
.chairman-portrait {
width: 50rpx;
@@ -403,6 +453,10 @@
border-radius: 50%;
}
}
.chairman-name {
margin-left: 0.9rem;
}
}
.id-title {
@@ -437,31 +491,28 @@
/* 右边按钮 */
.right-button {
text-align: right;
text-align: center;
.apply-button {
display: inline-block;
// width: 98rpx;
// height: 46rpx;
background: #0DFFB9;
background: var(--primary-color);
font-size: var(--font-button-size);
color: var(--font-button-color);
border-radius: 68rpx;
text-align: center;
padding: 4rpx 40rpx;
padding: 4rpx 30rpx;
}
.online-view {
// display: inline-block;
margin-top: 24rpx;
padding: 12rpx 8rpx;
// background: #333333;
// border-radius: 92rpx;
// font-size: 24rpx;
// color: #FFFFFF;
text-align: right;
width: 160rpx;
height: 44rpx;
line-height: 44rpx;
background: #333333;
// background: #333333;
border-radius: 92rpx 92rpx 92rpx 92rpx;
position: relative;
@@ -472,8 +523,15 @@
}
.online-people {
color: #FFFFFF;
color: rgba(0, 0, 0, 0.5);
font-size: 24rpx;
text-align: left;
display: inline-block;
/* width: 6ch; */
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
word-break: keep-all;
}
}
}