更新羽声语音h5
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
<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 || $config.PRIMARY_BGURL}')`}">
|
||||
<headerHeight />
|
||||
<navBar :navTitle="`公会成员`">
|
||||
<template #rightView>
|
||||
@@ -94,305 +93,305 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import headerHeight from '@/component/headerHeight.vue';
|
||||
import navBar from '@/component/nav.vue';
|
||||
import http from '@/until/http.js';
|
||||
import logo from '@/static/image/logo.png'
|
||||
export default {
|
||||
components: {
|
||||
headerHeight,
|
||||
navBar
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dateSearch: [new Date(), new Date()],
|
||||
currentDate: +new Date(),
|
||||
logo,
|
||||
loading: false,
|
||||
noMore: false,
|
||||
detailData: null,
|
||||
pageConfig: {
|
||||
pageSize: 10,
|
||||
currentPage: 1,
|
||||
total: 0
|
||||
},
|
||||
searchParams: {
|
||||
guild_id: 0,
|
||||
start_time: '',
|
||||
end_time: '',
|
||||
token: uni.getStorageSync('token') ?? '',
|
||||
page: 1,
|
||||
page_size: 20
|
||||
},
|
||||
leaderStatus: null,
|
||||
flowDetail: null,
|
||||
msgType: '',
|
||||
messageText: '',
|
||||
messageContent: '',
|
||||
dataList: [],
|
||||
currentUserData: null,
|
||||
ThemeData: null
|
||||
}
|
||||
},
|
||||
onLoad(options) {
|
||||
const {
|
||||
id,
|
||||
leader
|
||||
} = options
|
||||
|
||||
this.leaderStatus = +leader
|
||||
this.searchParams.guild_id = id
|
||||
this.searchParams.start_time = this.formatDate(new Date())
|
||||
this.searchParams.end_time = this.formatDate(new Date())
|
||||
if (id) this.getList()
|
||||
if (uni.getStorageSync('Theme_Data')) {
|
||||
this.ThemeData = JSON.parse(uni.getStorageSync('Theme_Data'))
|
||||
}
|
||||
},
|
||||
onReachBottom() {
|
||||
if (!this.loading && !this.noMore) {
|
||||
this.getList()
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
application() {
|
||||
uni.navigateTo({
|
||||
url: `/pages/union/exitApplication?id=${this.searchParams.guild_id}`
|
||||
});
|
||||
import headerHeight from '@/component/headerHeight.vue';
|
||||
import navBar from '@/component/nav.vue';
|
||||
import http from '@/until/http.js';
|
||||
import logo from '@/static/image/logo.png'
|
||||
export default {
|
||||
components: {
|
||||
headerHeight,
|
||||
navBar
|
||||
},
|
||||
formatDate(timestamp) {
|
||||
const date = new Date(timestamp);
|
||||
const year = date.getFullYear();
|
||||
const month = String(date.getMonth() + 1).padStart(2, '0'); // 月份从0开始需+1
|
||||
const day = String(date.getDate()).padStart(2, '0');
|
||||
return `${year}-${month}-${day}`;
|
||||
data() {
|
||||
return {
|
||||
dateSearch: [new Date(), new Date()],
|
||||
currentDate: +new Date(),
|
||||
logo,
|
||||
loading: false,
|
||||
noMore: false,
|
||||
detailData: null,
|
||||
pageConfig: {
|
||||
pageSize: 10,
|
||||
currentPage: 1,
|
||||
total: 0
|
||||
},
|
||||
searchParams: {
|
||||
guild_id: 0,
|
||||
start_time: '',
|
||||
end_time: '',
|
||||
token: uni.getStorageSync('token') || '',
|
||||
page: 1,
|
||||
page_size: 20
|
||||
},
|
||||
leaderStatus: null,
|
||||
flowDetail: null,
|
||||
msgType: '',
|
||||
messageText: '',
|
||||
messageContent: '',
|
||||
dataList: [],
|
||||
currentUserData: null,
|
||||
ThemeData: null
|
||||
}
|
||||
},
|
||||
// 获取成员列表
|
||||
async getList() {
|
||||
onLoad(options) {
|
||||
const {
|
||||
code,
|
||||
data
|
||||
} = await http.get('/api/Guild/get_guild_member_list', {
|
||||
...this.searchParams,
|
||||
page: this.pageConfig.currentPage,
|
||||
page_limit: this.pageConfig.pageSize,
|
||||
})
|
||||
if (code) {
|
||||
this.flowDetail = data
|
||||
this.pageConfig.total = data.count
|
||||
this.loading = false
|
||||
const newData = data.list || []
|
||||
if (newData.length === 0) {
|
||||
this.noMore = true
|
||||
return
|
||||
}
|
||||
this.dataList = [...this.dataList, ...newData]
|
||||
this.pageConfig.currentPage++
|
||||
if (this.dataList.length === this.pageConfig.total) {
|
||||
this.noMore = true
|
||||
return
|
||||
}
|
||||
id,
|
||||
leader
|
||||
} = options
|
||||
|
||||
this.leaderStatus = +leader
|
||||
this.searchParams.guild_id = id
|
||||
this.searchParams.start_time = this.formatDate(new Date())
|
||||
this.searchParams.end_time = this.formatDate(new Date())
|
||||
if (id) this.getList()
|
||||
if (uni.getStorageSync('Theme_Data')) {
|
||||
this.ThemeData = JSON.parse(uni.getStorageSync('Theme_Data'))
|
||||
}
|
||||
},
|
||||
// 日期范围
|
||||
changeDate(date) {
|
||||
this.searchParams.start_time = date.length ? date[0] : ''
|
||||
this.searchParams.end_time = date.length ? date[1] : ''
|
||||
this.getList()
|
||||
onReachBottom() {
|
||||
if (!this.loading && !this.noMore) {
|
||||
this.getList()
|
||||
}
|
||||
},
|
||||
// 踢出公会
|
||||
kickGuild(userData) {
|
||||
this.currentUserData = userData
|
||||
this.messageContent = `亲爱的会长,您当前操作将踢出该成员,是否继续?`
|
||||
this.$refs.popup.open('center')
|
||||
},
|
||||
jumpHomePage(data) {
|
||||
const platform = uni.getSystemInfoSync().platform;
|
||||
if (platform === 'ios') {
|
||||
window.webkit.messageHandlers.nativeHandler.postMessage({
|
||||
'action': 'jumpWebPage',
|
||||
'data': {
|
||||
userId: data.user_id
|
||||
}
|
||||
methods: {
|
||||
application() {
|
||||
uni.navigateTo({
|
||||
url: `/pages/union/exitApplication?id=${this.searchParams.guild_id}`
|
||||
});
|
||||
} else if (platform === 'android') {
|
||||
window.Android.jumpWebPage(data.user_id);
|
||||
}
|
||||
},
|
||||
confirmPopup() {
|
||||
this.kickUser()
|
||||
},
|
||||
closePopup() {
|
||||
this.currentUserData = null
|
||||
this.messageContent = ""
|
||||
this.$refs.popup.close()
|
||||
},
|
||||
async kickUser() {
|
||||
http.post('/api/Guild/kick_guild_member', {
|
||||
guild_id: this.currentUserData.guild_id,
|
||||
user_id: this.currentUserData.user_id,
|
||||
token: uni.getStorageSync('token') ?? ''
|
||||
}).then(response => {
|
||||
},
|
||||
formatDate(timestamp) {
|
||||
const date = new Date(timestamp);
|
||||
const year = date.getFullYear();
|
||||
const month = String(date.getMonth() + 1).padStart(2, '0'); // 月份从0开始需+1
|
||||
const day = String(date.getDate()).padStart(2, '0');
|
||||
return `${year}-${month}-${day}`;
|
||||
},
|
||||
// 获取成员列表
|
||||
async getList() {
|
||||
const {
|
||||
data,
|
||||
code,
|
||||
msg
|
||||
} = response
|
||||
data
|
||||
} = await http.get('/api/Guild/get_guild_member_list', {
|
||||
...this.searchParams,
|
||||
page: this.pageConfig.currentPage,
|
||||
page_limit: this.pageConfig.pageSize,
|
||||
})
|
||||
if (code) {
|
||||
this.msgType = 'success'
|
||||
this.messageText = `操作成功`
|
||||
this.$refs.message.open()
|
||||
this.dataList = []
|
||||
this.pageConfig.currentPage = 1
|
||||
this.getList()
|
||||
} else {
|
||||
this.messageText = msg
|
||||
this.msgType = 'error'
|
||||
this.$refs.message.open()
|
||||
this.flowDetail = data
|
||||
this.pageConfig.total = data.count
|
||||
this.loading = false
|
||||
const newData = data.list || []
|
||||
if (newData.length === 0) {
|
||||
this.noMore = true
|
||||
return
|
||||
}
|
||||
this.dataList = [...this.dataList, ...newData]
|
||||
this.pageConfig.currentPage++
|
||||
if (this.dataList.length === this.pageConfig.total) {
|
||||
this.noMore = true
|
||||
return
|
||||
}
|
||||
}
|
||||
},
|
||||
// 日期范围
|
||||
changeDate(date) {
|
||||
this.searchParams.start_time = date.length ? date[0] : ''
|
||||
this.searchParams.end_time = date.length ? date[1] : ''
|
||||
this.getList()
|
||||
},
|
||||
// 踢出公会
|
||||
kickGuild(userData) {
|
||||
this.currentUserData = userData
|
||||
this.messageContent = `亲爱的会长,您当前操作将踢出该成员,是否继续?`
|
||||
this.$refs.popup.open('center')
|
||||
},
|
||||
jumpHomePage(data) {
|
||||
const platform = uni.getSystemInfoSync().platform;
|
||||
if (platform === 'ios') {
|
||||
window.webkit.messageHandlers.nativeHandler.postMessage({
|
||||
'action': 'jumpWebPage',
|
||||
'data': {
|
||||
userId: data.user_id
|
||||
}
|
||||
});
|
||||
} else if (platform === 'android') {
|
||||
window.Android.jumpWebPage(data.user_id);
|
||||
}
|
||||
},
|
||||
confirmPopup() {
|
||||
this.kickUser()
|
||||
},
|
||||
closePopup() {
|
||||
this.currentUserData = null
|
||||
this.closePopup()
|
||||
})
|
||||
this.messageContent = ""
|
||||
this.$refs.popup.close()
|
||||
},
|
||||
async kickUser() {
|
||||
http.post('/api/Guild/kick_guild_member', {
|
||||
guild_id: this.currentUserData.guild_id,
|
||||
user_id: this.currentUserData.user_id,
|
||||
token: uni.getStorageSync('token') || ''
|
||||
}).then(response => {
|
||||
const {
|
||||
data,
|
||||
code,
|
||||
msg
|
||||
} = response
|
||||
if (code) {
|
||||
this.msgType = 'success'
|
||||
this.messageText = `操作成功`
|
||||
this.$refs.message.open()
|
||||
this.dataList = []
|
||||
this.pageConfig.currentPage = 1
|
||||
this.getList()
|
||||
} else {
|
||||
this.messageText = msg
|
||||
this.msgType = 'error'
|
||||
this.$refs.message.open()
|
||||
}
|
||||
this.currentUserData = null
|
||||
this.closePopup()
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.view-page {
|
||||
// padding: 24rpx 32rpx;
|
||||
min-height: 100vh;
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
// background-image: url('@/static/image/help/bg.png');
|
||||
background-repeat: no-repeat;
|
||||
background-size: 100% 100%;
|
||||
|
||||
.content_view {
|
||||
padding: 0 24rpx;
|
||||
}
|
||||
|
||||
.popup_view {
|
||||
width: 550rpx;
|
||||
// height: 40vh;
|
||||
background-color: #fff;
|
||||
border-radius: 32rpx;
|
||||
padding: 32rpx;
|
||||
|
||||
.popup_title {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.messageContent {
|
||||
margin: 24rpx 0;
|
||||
}
|
||||
|
||||
.popup_button {
|
||||
margin-top: 24rpx;
|
||||
width: 100%;
|
||||
justify-content: space-around;
|
||||
|
||||
.close_button,
|
||||
.confirm-button {
|
||||
width: 200rpx;
|
||||
height: 84rpx;
|
||||
background: #F3F3F3;
|
||||
border-radius: 106rpx;
|
||||
color: #999999;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.confirm-button {
|
||||
background: #0DFFB9;
|
||||
color: #333;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.header-view {
|
||||
padding: 24rpx;
|
||||
margin-top: 24rpx;
|
||||
background-image: url('/static/image/union/flowbg.png');
|
||||
.view-page {
|
||||
// padding: 24rpx 32rpx;
|
||||
min-height: 100vh;
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
// background-image: url('@/static/image/help/bg.png');
|
||||
background-repeat: no-repeat;
|
||||
background-size: 100% 100%;
|
||||
height: 152rpx;
|
||||
|
||||
.flow-view {
|
||||
font-weight: 400;
|
||||
font-size: 24rpx;
|
||||
.content_view {
|
||||
padding: 0 24rpx;
|
||||
}
|
||||
|
||||
.flowNumber {
|
||||
|
||||
font-weight: 500;
|
||||
font-size: 40rpx;
|
||||
color: #004D3C;
|
||||
margin-top: 24rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.room-list {
|
||||
flex-wrap: wrap;
|
||||
width: 100%;
|
||||
|
||||
.operate_button {
|
||||
border-top: 1rpx solid #E2E2E2;
|
||||
margin-top: 24rpx;
|
||||
padding-top: 24rpx;
|
||||
|
||||
.button {
|
||||
padding: 12rpx 24rpx;
|
||||
background-color: #333;
|
||||
display: inline-flex;
|
||||
border-radius: 32rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.room-line {
|
||||
width: 100%;
|
||||
// background-color: #004D3C;
|
||||
margin-bottom: 24rpx;
|
||||
padding: 24rpx;
|
||||
border-radius: 10rpx;
|
||||
.popup_view {
|
||||
width: 550rpx;
|
||||
// height: 40vh;
|
||||
background-color: #fff;
|
||||
border-radius: 32rpx;
|
||||
padding: 32rpx;
|
||||
|
||||
.flowIcon {
|
||||
width: 48rpx;
|
||||
height: 48rpx;
|
||||
.popup_title {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.head-portrait {
|
||||
width: 100rpx;
|
||||
height: 100rpx;
|
||||
border-radius: 50%;
|
||||
.messageContent {
|
||||
margin: 24rpx 0;
|
||||
}
|
||||
|
||||
.popup_button {
|
||||
margin-top: 24rpx;
|
||||
width: 100%;
|
||||
justify-content: space-around;
|
||||
|
||||
img {
|
||||
border-radius: 50%;
|
||||
.close_button,
|
||||
.confirm-button {
|
||||
width: 200rpx;
|
||||
height: 84rpx;
|
||||
background: #F3F3F3;
|
||||
border-radius: 106rpx;
|
||||
color: #999999;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.confirm-button {
|
||||
background: var(--primary-color);
|
||||
color: var(--font-button-color);
|
||||
}
|
||||
}
|
||||
|
||||
.head-portrait-view {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.header-view {
|
||||
padding: 24rpx;
|
||||
margin-top: 24rpx;
|
||||
background-image: url('/static/image/union/flowbg.png');
|
||||
background-repeat: no-repeat;
|
||||
background-size: 100% 100%;
|
||||
height: 152rpx;
|
||||
|
||||
.flow-view {
|
||||
font-weight: 400;
|
||||
font-size: 24rpx;
|
||||
}
|
||||
|
||||
.flowNumber {
|
||||
|
||||
font-weight: 500;
|
||||
font-size: 40rpx;
|
||||
color: #333;
|
||||
margin-top: 24rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.room-list {
|
||||
flex-wrap: wrap;
|
||||
width: 100%;
|
||||
|
||||
.operate_button {
|
||||
border-top: 1rpx solid #E2E2E2;
|
||||
margin-top: 24rpx;
|
||||
padding-top: 24rpx;
|
||||
|
||||
.button {
|
||||
padding: 12rpx 24rpx;
|
||||
background-color: #333;
|
||||
display: inline-flex;
|
||||
border-radius: 32rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.room-line {
|
||||
width: 100%;
|
||||
// background-color: #004D3C;
|
||||
margin-bottom: 24rpx;
|
||||
padding: 24rpx;
|
||||
border-radius: 10rpx;
|
||||
background-color: #fff;
|
||||
|
||||
.flowIcon {
|
||||
width: 48rpx;
|
||||
height: 48rpx;
|
||||
}
|
||||
|
||||
.head-portrait {
|
||||
width: 100rpx;
|
||||
height: 100rpx;
|
||||
border-radius: 50%;
|
||||
|
||||
.tip {
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
left: 5rpx;
|
||||
right: 0;
|
||||
width: 96rpx;
|
||||
height: 26rpx;
|
||||
border-radius: 0;
|
||||
|
||||
img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border-radius: 50%;
|
||||
}
|
||||
}
|
||||
|
||||
.head-portrait-view {
|
||||
position: relative;
|
||||
|
||||
.tip {
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
left: 5rpx;
|
||||
right: 0;
|
||||
width: 96rpx;
|
||||
height: 26rpx;
|
||||
border-radius: 0;
|
||||
|
||||
img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user