This commit is contained in:
yziiy
2025-09-22 16:24:41 +08:00
parent 4e5cd87cad
commit 3ab6aa6edb
28 changed files with 7965 additions and 261 deletions

View File

@@ -1,7 +1,6 @@
<template>
<view class="view-page" :style="{backgroundImage : `url('${ThemeData?.app_bg ?? $config.PRIMARY_BGURL}')`}">
<headerHeight />
<navBar :navTitle="'青少年模式'" :emitBack="true" @backEvent="back">
<navBar :style="{marginTop: `${statusBarHeight}${uni.getSystemInfoSync().platform === 'ios' ? 'px': 'dp'}`}" :navTitle="'青少年模式'" :emitBack="true" @backEvent="back">
</navBar>
<view class="content-view">
<view class="flex-line">
@@ -9,7 +8,7 @@
</NavigationTabs>
</view>
<view class="">
<view class="flex-line flex-spaceB w-fill new-box" v-for="(item, index) in dataList" :key="index">
<view class="flex-line flex-spaceB w-fill new-box" v-for="(item, index) in dataList" :key="index" @click="openDetail(item)">
<view class="">
<view class="color-3 font-32 font-w500">
{{ item.title }}
@@ -31,12 +30,10 @@
<script>
import http from '@/until/http.js';
import headerHeight from '@/component/headerHeight.vue';
import navBar from '@/component/nav.vue';
import NavigationTabs from '@/component/tab.vue';
export default {
components: {
headerHeight,
navBar,
NavigationTabs
},
@@ -44,6 +41,7 @@ export default {
return {
errorPage: true,
currentIndex: 0,
statusBarHeight:0,
pageConfig: {
pageSize: 10,
currentPage: 1,
@@ -65,9 +63,12 @@ export default {
this.errorPage = true
this.dataList = []
const {
id
id,
h
} = options
uni.setStorageSync('token', id)
this.statusBarHeight = h
uni.setStorageSync('BarHeight', h)
if (uni.getStorageSync('token')) this.getUnderageTypeList()
if (uni.getStorageSync('Theme_Data')) {
this.ThemeData = JSON.parse(uni.getStorageSync('Theme_Data'))
@@ -147,6 +148,11 @@ export default {
this.pageConfig.currentPage = 1
this.pageConfig.pageSize = 10
this.getUnderageModeList(data.tab.type)
},
openDetail(data){
uni.navigateTo({
url: `/pages/feedback/teenageDetail?dataId=${data.id}`
});
}
}
}

View File

@@ -0,0 +1,111 @@
<template>
<view class="view-page" :style="{backgroundImage : `url('${ThemeData?.app_bg ?? $config.PRIMARY_BGURL}')`}">
<headerHeight />
<navBar :navTitle="'内容详情'">
</navBar>
<template v-if="detailData">
<view class="" v-if="detailData.from === 2">
<iframe id="myIframe" :src="detailData.url" style="width: 100%;border: none;height: 100dvh;"></iframe>
<!-- <web-view :src="detailData.url"></web-view> -->
</view>
<view class="detailContent" v-else>
<!-- from 1站内 2 外链 -->
<view class="">
<view class="detailTitle">
{{detailData.title}}
</view>
<!-- 内容 -->
<view class="detailData" v-html="detailData.content || ''">
</view>
</view>
</view>
</template>
</view>
</template>
<script>
import headerHeight from '@/component/headerHeight.vue';
import navBar from '@/component/nav.vue';
import http from '@/until/http.js';
export default {
components: {
headerHeight,
navBar
},
data() {
return {
detailData: null,
ThemeData: null,
BarHeight:0
}
},
onLoad(options) {
const {
dataId
} = options
if (dataId) {
this.getDetail(dataId)
}
if (uni.getStorageSync('Theme_Data')) {
this.ThemeData = JSON.parse(uni.getStorageSync('Theme_Data'))
}
this.BarHeight = uni.getStorageSync('BarHeight')
},
methods: {
// 获取公会信息
async getDetail(Id) {
uni.showLoading({
mask: true,
title: '加载中'
})
http.get('/api/Usermode/getUnderageModeContent', {
id: Id,
token: uni.getStorageSync('token') ?? ''
}).then(response => {
uni.hideLoading()
const {
data,
code
} = response
this.detailData = code ? data : null
console.log(this.detailData)
})
},
}
}
</script>
<style lang="scss" scoped>
.view-page {
// padding: 32rpx;
display: flex;
flex-direction: column;
background-image: url('@/static/image/help/bg.png');
background-repeat: no-repeat;
background-size: 100% 100%;
min-height: 100vh;
.detailContent {
padding: 0 32rpx;
flex: 1;
/* 关键:撑满剩余空间 */
overflow: auto;
/* 允许内容滚动 */
.detailTitle {
font-size: 32rpx;
font-weight: 700;
color: #333;
line-height: 1.4;
padding-bottom: 48rpx;
text-align: center;
}
.detailData{
padding: 0 32rpx;
}
}
}
</style>

View File

@@ -19,7 +19,7 @@
</view>
</view>
<view class="swiper-view" v-if="levelActiveData.length">
<view class="swiper-image" :style="{ 'background-image' : `url(${levelActiveData[0].bg_image})`}">
<view class="swiper-image" :style="{ 'background-image' : `url('${levelActiveData[0].bg_image}')` }">
<view class="view-level">
<view class="">
<view class="level-str" :style="{textShadow : `0px 0px 5px ${levelActiveData[0].color}`}">
@@ -105,7 +105,7 @@
<view class="image">
<img :src="item.base_image || logo" alt="" />
</view>
<view class="color-3 font-28">
<view class="color-3 font-28 title truncate">
{{item.title}}
</view>
<view class="font-24 color-9">
@@ -452,7 +452,7 @@
flex: 0 0 calc(25% - 10px);
/* 基础宽度25% 减去间隔 */
margin: 5px;
min-height: 220rpx;
min-height: 260rpx;
padding: 20rpx 0;
/* 元素间距 */
box-sizing: border-box;
@@ -465,15 +465,14 @@
.image{
width: 100%;
height: 60%;
margin-bottom: 24rpx;
margin-bottom: 14rpx;
img{
width: 80%;
}
}
// .image {
// width: 80%;
// height: 120rpx;
// }
.title{
max-width: 60px;
}
}
}
}

View File

@@ -41,13 +41,13 @@
<view class="flex-line w-fill flex-spaceB">
<view class="">
<view class="color-3 font-32 font-w500">
羽声语音
{{ConfigData.BASE_NAME}}
</view>
<view class="color-3 font-32 font-w500">
<view class="color-3 font-32 mt-24 font-w500">
邀请码
</view>
<view class="color-6 font-24 mt-24">
一级充值的4%为邀请收益
一级充值的{{detailData.invited_draw || 0}}%为邀请收益
</view>
</view>
<view class="QRCodeImage">
@@ -56,7 +56,7 @@
</view>
<view class="flex-line w-fill mt-24 flex-spaceB">
<view class="Code-view color-3 font-w500" style="letter-spacing: 44rpx;text-align: center;">
{{detailData.init_code}}
{{detailData.init_code}}
</view>
<view class="copy-button color-3 font-w500 font-24" @click="copyText(detailData.init_code)">
复制
@@ -75,28 +75,30 @@
</view>
</view>
</view>
<uni-popup ref="bindPopup" type="center" background-color="#fff" border-radius="32rpx">
<middle-popup ref="bindPopup" v-show="PopupStatus">
<view class="bindPopup-view">
<view class="bind-title font-32 font-w500 color-3">
<view class="">
手动绑定
<view class="bindPopup-Content">
<view class="bind-title font-32 font-w500 color-3">
<view class="">
手动绑定
</view>
<img @click="closeBind" class="closeIcon" src="@/static/image/income/close.png" alt="" />
</view>
<img @click="closeBind" class="closeIcon" src="@/static/image/income/close.png" alt="" />
</view>
<view class="bind-input">
<input class="uni-input" v-model="bindValue" placeholder="输入好友邀请码" />
</view>
<view class="color-3 font-w400 font-24" style="text-align: left;">
{{detailData.explain}}
</view>
<view class="bind-footer" @click="decorate">
<view class="confirm-button flex-line">
确定
<view class="bind-input">
<input class="uni-input" v-model="bindValue" placeholder="输入好友邀请码" />
</view>
<view class="color-3 font-w400 font-24" style="text-align: left;">
{{detailData.explain}}
</view>
<view class="bind-footer" @click="decorate">
<view class="confirm-button flex-line">
确定
</view>
</view>
</view>
</view>
</uni-popup>
</middle-popup>
</view>
</template>
<script>
@@ -112,14 +114,19 @@
import PYQ from '@/static/image/income/pyq.png';
import Qcode from '@/static/image/income/Qcode.png';
import QQ from '@/static/image/income/QQ.png';
import Config from '@/until/config.js';
import MiddlePopup from '@/component/MiddlePopup.vue'
export default {
components: {
NavigationTabs,
headerHeight,
Table
Table,
MiddlePopup
},
data() {
return {
ConfigData: Config,
PopupStatus: false,
errorPage: false,
detailData: null,
currentIndex: 0,
@@ -131,13 +138,13 @@
title: '钻石余额'
},
{
icon: Coin,
icon: ZS,
value: 200,
prop: 'today_earnings',
title: '今日收益'
},
{
icon: Coin,
icon: ZS,
value: 200,
prop: 'total_earnings',
title: '累计收益'
@@ -146,11 +153,26 @@
statusBarHeight: 0,
bindValue: '',
dataList: [],
columns: [
{ title: '昵称', key: 'nickname', width: '20%' },
{ title: '时间', key: 'createtime', width: '35%' },
{ title: '充值金额', key: 'coin', width: '30%' },
{ title: '获得收益', key: 'earnings', width: '30%' }
columns: [{
title: '昵称',
key: 'nickname',
width: '20%'
},
{
title: '时间',
key: 'createtime',
width: '35%'
},
{
title: '充值金币',
key: 'coin',
width: '30%'
},
{
title: '获得收益',
key: 'earnings',
width: '30%'
}
]
}
},
@@ -163,10 +185,11 @@
if (uni.getStorageSync('token')) this.gettabs()
this.statusBarHeight = this.getStatusBarHeight()
this.statusBarHeight = h
console.log(Config.BASE_NAME)
},
methods: {
copyText(text) {
if(text) {
if (text) {
if (uni.getSystemInfoSync().platform === 'h5') {
const textarea = document.createElement('textarea');
textarea.value = text;
@@ -174,7 +197,7 @@
textarea.select();
document.execCommand('copy');
document.body.removeChild(textarea);
uni.showToast({
title: '复制成功',
icon: 'none',
@@ -324,10 +347,13 @@
},
// 绑定
bind() {
this.$refs.bindPopup.open('center')
this.PopupStatus = true
this.$refs.bindPopup.openPopup()
},
closeBind() {
this.$refs.bindPopup.close()
this.$refs.bindPopup.closePopup()
this.PopupStatus = false
},
decorate() {
if (this.bindValue) {
@@ -376,6 +402,13 @@
}
}
</script>
<style>
/* 覆盖uni-popup的动画 */
::v-deep .uni-popup .uni-popup__wrapper {
transition: none !important;
transform: translateZ(0) !important;
}
</style>
<style scoped lang="scss">
.view-page {
width: 100vw;
@@ -519,7 +552,8 @@
.copy-button {
// width: 112rpx;
border-radius: 4rpx;
background-color: #0DFFB9;
background: var(--primary-color);
color: var(--font-button-color);
text-align: center;
padding: 12rpx 24rpx;
}
@@ -554,89 +588,55 @@
}
}
.popup-view {
padding: 32rpx;
min-height: 300rpx;
font-family: Source Han Sans CN, Source Han Sans CN;
// background: #FFFFFF;
.share-view {
display: flex;
/* 启用 Flex 布局 */
flex-wrap: wrap;
/* 允许换行 */
justify-content: center;
margin-top: 32rpx;
}
.share-item {
flex: 0 0 calc(25% - 10px);
/* 基础宽度25% 减去间隔 */
margin: 5px;
/* 元素间距 */
box-sizing: border-box;
/* 包含内边距和边框 */
border-radius: 14rpx;
/* 样式美化(可选) */
// background-color: #fff;
// padding: 20rpx;
// text-align: center;
display: inline-flex;
align-items: center;
flex-wrap: wrap;
justify-content: space-evenly;
.share-icon {
width: 90rpx;
height: 90rpx;
}
.title {
text-align: center;
margin-top: 24rpx;
}
}
}
.bindPopup-view {
font-family: Source Han Sans CN, Source Han Sans CN;
padding: 24rpx;
width: 70vw;
text-align: center;
position: relative;
width: 100%;
display: inline-flex;
justify-content: center;
.closeIcon {
width: 22rpx;
height: 26rpx;
position: absolute;
top: 34rpx;
right: 34rpx;
}
.bindPopup-Content {
padding: 24rpx;
width: 80%;
background-color: #fff;
border-radius: 32rpx;
text-align: center;
position: relative;
.bind-title {
display: inline-flex;
}
.closeIcon {
width: 22rpx;
height: 26rpx;
position: absolute;
top: 34rpx;
right: 34rpx;
}
.bind-input {
background: #EFF2F8;
border-radius: 22rpx;
padding: 18rpx 32rpx;
margin: 70rpx 0;
}
.bind-title {
display: inline-flex;
}
.bind-footer {
display: inline-flex;
justify-content: center;
margin-top: 78rpx;
.bind-input {
background: #EFF2F8;
border-radius: 22rpx;
padding: 18rpx 32rpx;
margin: 70rpx 0;
}
.confirm-button {
width: 356rpx;
height: 84rpx;
background: #0DFFB9;
border-radius: 106rpx;
.bind-footer {
display: inline-flex;
justify-content: center;
margin-top: 78rpx;
.confirm-button {
width: 356rpx;
height: 84rpx;
background: var(--primary-color);
color: var(--font-button-color);
border-radius: 106rpx;
justify-content: center;
}
}
}
}
.footer {

View File

@@ -371,6 +371,7 @@
this.msgType = 'success'
this.messageText = `操作成功,将返回上一页!`
this.$refs.message.open()
uni.$emit('refreshList');
uni.navigateBack()
} else {
this.messageText = msg
@@ -409,7 +410,7 @@
}
</script>
<style lang="scss">
<style lang="scss" scoped>
.view-page {
// padding: 32rpx;
display: flex;
@@ -468,8 +469,8 @@
}
.confirm-button {
background: var(--primary-color);
color: var(--font-button-color);
background: var(--primary-color);
color: var(--font-button-color);
}
}

View File

@@ -1,5 +1,5 @@
<template>
<view class="view-page" :style="{backgroundImage : `url('${ThemeData?.app_bg ?? $config.PRIMARY_BGURL}')`}">
<view class="view-page" :style="{backgroundImage : `url('${ThemeData?.app_bg ?? $config.PRIMARY_BGURL}')`}">
<navBar :style="{marginTop: `${statusBarHeight}${uni.getSystemInfoSync().platform === 'ios' ? 'px': 'dp'}`}"
:navTitle="'公会中心'" :emitBack="true" @backEvent="back">
<template #rightView>
@@ -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,28 +47,29 @@
<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="apply-button">
<!-- <view class="apply-button">
申请
</view> -->
<view class="online-view">
<div v-show="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">
<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>
</div>
<view class="online-people truncate-three">
{{data.num}}
</view>
</div>
</view>
</view>
<view class="online-people">
{{data.num}}
</view>
</view>
</view>
</view>
@@ -97,7 +102,8 @@
listData: [],
UnionByUser: null,
statusBarHeight: 0,
ThemeData:null
ThemeData: null,
swiperList: []
}
},
onLoad(options) {
@@ -109,12 +115,22 @@
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) {
@@ -131,6 +147,11 @@
this.listData = []
this.getList()
},
refreshList() {
this.searchValue = ''
this.search()
this.getInfo()
},
closeWeb() {
const platform = uni.getSystemInfoSync().platform;
// console.log(platform, '打印设备参数')
@@ -146,6 +167,18 @@
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') ?? ''
@@ -205,8 +238,8 @@
});
},
copyData(text) {
if(text) {
if (text) {
if (uni.getSystemInfoSync().platform === 'h5') {
const textarea = document.createElement('textarea');
textarea.value = text;
@@ -214,7 +247,7 @@
textarea.select();
document.execCommand('copy');
document.body.removeChild(textarea);
uni.showToast({
title: '复制成功',
icon: 'none',
@@ -251,7 +284,7 @@
}
</script>
<style lang="scss">
<style lang="scss" scoped>
.view-page {
// padding: 32rpx;
// min-height: 100vh;
@@ -260,9 +293,11 @@
// background-image: url('@/static/image/help/bg.png');
background-repeat: no-repeat;
background-size: 100% 100%;
.minUnicon{
.minUnicon {
color: var(--primary-color);
}
.content {
padding: 0 32rpx;
}
@@ -325,12 +360,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.jpg');
background-repeat: no-repeat;
background-size: 100% 100%;
// background-image: url('/static/image/swiper.jpg');
// background-repeat: no-repeat;
// background-size: 100% 100%;
}
.title {
@@ -383,7 +418,7 @@
/* 会长样式 */
.chairman {
width: 106rpx;
min-width: 106rpx;
height: 36rpx;
padding: 0 12rpx;
color: #fff;
@@ -395,9 +430,12 @@
position: relative;
left: 10rpx;
margin: 32rpx 0;
.truncate-three{
display: inline-flex;
.truncate-three {
text-align: left;
}
.chairman-portrait {
width: 50rpx;
height: 50rpx;
@@ -413,6 +451,10 @@
border-radius: 50%;
}
}
.chairman-name {
margin-left: 0.9rem;
}
}
.id-title {
@@ -448,6 +490,7 @@
/* 右边按钮 */
.right-button {
text-align: center;
.apply-button {
display: inline-block;
background: var(--primary-color);
@@ -481,6 +524,12 @@
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;
}
}
}