更新
This commit is contained in:
@@ -1,7 +1,8 @@
|
|||||||
<template>
|
<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}')`}">
|
||||||
<!-- <headerHeight /> -->
|
<!-- <headerHeight /> -->
|
||||||
<navBar :style="{marginTop: `${statusBarHeight}${uni.getSystemInfoSync().platform === 'ios' ? 'px': 'dp'}`}" :navTitle="'群聊设置'" :emitBack="true" @backEvent="back">
|
<navBar :style="{marginTop: `${statusBarHeight}${uni.getSystemInfoSync().platform === 'ios' ? 'px': 'dp'}`}"
|
||||||
|
:navTitle="'群聊设置'" :emitBack="true" @backEvent="back">
|
||||||
</navBar>
|
</navBar>
|
||||||
<view class="content" v-if="detailData">
|
<view class="content" v-if="detailData">
|
||||||
<view class="name-view flex-line">
|
<view class="name-view flex-line">
|
||||||
@@ -37,17 +38,21 @@
|
|||||||
</view>
|
</view>
|
||||||
<!-- 编辑 -->
|
<!-- 编辑 -->
|
||||||
<view class="edit-name">
|
<view class="edit-name">
|
||||||
<uni-easyinput v-model="guildName" :disabled="detailData.is_deacon !== 1 " primaryColor="#999" :inputBorder="false" :styles="styles" :placeholderStyle="placeholderStyle" placeholder="请输入内容"></uni-easyinput>
|
<uni-easyinput v-model="guildName" :disabled="detailData.is_deacon !== 1 " primaryColor="#999"
|
||||||
|
:inputBorder="false" :styles="styles" :placeholderStyle="placeholderStyle"
|
||||||
|
placeholder="请输入内容"></uni-easyinput>
|
||||||
</view>
|
</view>
|
||||||
<view class="edit-notice">
|
<view class="edit-notice">
|
||||||
<view class="notice-title">
|
<view class="notice-title">
|
||||||
群聊公告
|
群聊公告
|
||||||
</view>
|
</view>
|
||||||
<view class="notice-view">
|
<view class="notice-view">
|
||||||
<uni-easyinput primaryColor="#999" :inputBorder="false" :disabled="detailData.is_deacon !== 1 " :styles="styles" :placeholderStyle="placeholderStyle" type="textarea" autoHeight v-model="detailData.notification" placeholder="请输入群聊公告"></uni-easyinput>
|
<uni-easyinput primaryColor="#999" :inputBorder="false" :disabled="detailData.is_deacon !== 1 "
|
||||||
|
:styles="styles" :placeholderStyle="placeholderStyle" type="textarea" autoHeight
|
||||||
|
v-model="detailData.notification" placeholder="请输入群聊公告"></uni-easyinput>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="footer"v-if="detailData.is_deacon === 1">
|
<view class="footer" v-if="detailData.is_deacon === 1">
|
||||||
<view class="confirm-button" @click="confirmInfo">
|
<view class="confirm-button" @click="confirmInfo">
|
||||||
<view class="button">
|
<view class="button">
|
||||||
确认保存
|
确认保存
|
||||||
@@ -55,6 +60,9 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
<uni-popup ref="message" type="message">
|
||||||
|
<uni-popup-message :type="msgType" :message="messageText" :duration="2000"></uni-popup-message>
|
||||||
|
</uni-popup>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -72,41 +80,46 @@
|
|||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
logo,
|
logo,
|
||||||
guildId:null,
|
guildId: null,
|
||||||
notice:'',
|
notice: '',
|
||||||
value: '',
|
value: '',
|
||||||
guildName:'',
|
guildName: '',
|
||||||
detailData:null,
|
detailData: null,
|
||||||
styles: {
|
styles: {
|
||||||
color: '#333',
|
color: '#333',
|
||||||
borderColor: 'none'
|
borderColor: 'none'
|
||||||
},
|
},
|
||||||
statusBarHeight:0,
|
formType: 0,
|
||||||
|
statusBarHeight: 0,
|
||||||
placeholderStyle: "color:321;font-size:14px",
|
placeholderStyle: "color:321;font-size:14px",
|
||||||
ThemeData:null
|
ThemeData: null,
|
||||||
|
msgType: "",
|
||||||
|
messageText: ""
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad(options) {
|
onLoad(options) {
|
||||||
const {
|
const {
|
||||||
id,
|
id,
|
||||||
guildId,h
|
guildId,
|
||||||
|
h
|
||||||
} = options
|
} = options
|
||||||
uni.setStorageSync('token', id)
|
uni.setStorageSync('token', id)
|
||||||
this.guildId = guildId || ''
|
this.guildId = guildId || ''
|
||||||
|
this.formType = type
|
||||||
if (uni.getStorageSync('token')) {
|
if (uni.getStorageSync('token')) {
|
||||||
this.getInfo()
|
this.getInfo()
|
||||||
}
|
}
|
||||||
this.statusBarHeight = h || uni.getStorageSync('BarHeight')
|
this.statusBarHeight = h || uni.getStorageSync('BarHeight')
|
||||||
if(uni.getStorageSync('Theme_Data')) {
|
if (uni.getStorageSync('Theme_Data')) {
|
||||||
this.ThemeData = JSON.parse(uni.getStorageSync('Theme_Data'))
|
this.ThemeData = JSON.parse(uni.getStorageSync('Theme_Data'))
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods:{
|
methods: {
|
||||||
// 关闭当前公会中心页面
|
// 关闭当前公会中心页面
|
||||||
back() {
|
back() {
|
||||||
this.closeWeb()
|
this.closeWeb()
|
||||||
},
|
},
|
||||||
closeWeb(){
|
closeWeb() {
|
||||||
const platform = uni.getSystemInfoSync().platform;
|
const platform = uni.getSystemInfoSync().platform;
|
||||||
if (platform === 'ios') {
|
if (platform === 'ios') {
|
||||||
// 通过 messageHandlers 调用 iOS 原生方法
|
// 通过 messageHandlers 调用 iOS 原生方法
|
||||||
@@ -128,24 +141,23 @@
|
|||||||
code
|
code
|
||||||
} = response
|
} = response
|
||||||
this.detailData = data || null
|
this.detailData = data || null
|
||||||
if(data) {
|
if (data) {
|
||||||
this.detailData.user_list = data.user_list.slice(0,4)
|
this.detailData.user_list = data.user_list.slice(0, 4)
|
||||||
}
|
}
|
||||||
this.guildName = data.name || null
|
this.guildName = data.name || null
|
||||||
}).catch(error => {
|
}).catch(error => {});
|
||||||
});
|
|
||||||
},
|
},
|
||||||
memberList(){
|
memberList() {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: `/pages/union/memberList?guildId=${this.guildId}`
|
url: `/pages/union/memberList?guildId=${this.guildId}`
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
async confirmInfo(){
|
async confirmInfo() {
|
||||||
if (this.guildName === '') {
|
if (this.guildName === '') {
|
||||||
uni.showToast({
|
this.messageText = "请输入群聊名称"
|
||||||
title: "请输入群聊名称",
|
this.msgType = 'error'
|
||||||
icon: 'none'
|
this.$refs.message.open()
|
||||||
});
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
const parameter = {
|
const parameter = {
|
||||||
@@ -167,26 +179,22 @@
|
|||||||
if (code) {
|
if (code) {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
uni.hideLoading()
|
uni.hideLoading()
|
||||||
uni.showToast({
|
this.messageText = "提交成功"
|
||||||
title: "提交成功",
|
this.msgType = 'success'
|
||||||
icon: 'none',
|
this.$refs.message.open()
|
||||||
mask: true
|
|
||||||
});
|
|
||||||
this.getInfo()
|
this.getInfo()
|
||||||
}, 1000)
|
}, 1000)
|
||||||
} else {
|
} else {
|
||||||
uni.showToast({
|
this.messageText = "提交失败"
|
||||||
title: "提交失败",
|
this.msgType = 'error'
|
||||||
icon: 'none'
|
this.$refs.message.open()
|
||||||
});
|
|
||||||
uni.hideLoading()
|
uni.hideLoading()
|
||||||
}
|
}
|
||||||
|
|
||||||
}).catch(error => {
|
}).catch(error => {
|
||||||
uni.showToast({
|
this.messageText = "提交失败"
|
||||||
title: "提交失败",
|
this.msgType = 'error'
|
||||||
icon: 'error'
|
this.$refs.message.open()
|
||||||
});
|
|
||||||
uni.hideLoading()
|
uni.hideLoading()
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -204,36 +212,43 @@
|
|||||||
background-size: 100% 100%;
|
background-size: 100% 100%;
|
||||||
min-height: 100vh;
|
min-height: 100vh;
|
||||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||||
|
|
||||||
.text-container {
|
.text-container {
|
||||||
width: 150rpx; /* 指定容器宽度 */
|
width: 150rpx;
|
||||||
white-space: nowrap; /* 防止文本换行 */
|
/* 指定容器宽度 */
|
||||||
overflow: hidden; /* 隐藏溢出的文本 */
|
white-space: nowrap;
|
||||||
text-overflow: ellipsis; /* 显示省略号 */
|
/* 防止文本换行 */
|
||||||
|
overflow: hidden;
|
||||||
|
/* 隐藏溢出的文本 */
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
/* 显示省略号 */
|
||||||
}
|
}
|
||||||
|
|
||||||
.footer {
|
.footer {
|
||||||
// background: #f0f0f0;
|
// background: #f0f0f0;
|
||||||
padding: 20rpx;
|
padding: 20rpx;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
/* 适配iPhoneX等刘海屏 */
|
/* 适配iPhoneX等刘海屏 */
|
||||||
padding-bottom: calc(20rpx + env(safe-area-inset-bottom));
|
padding-bottom: calc(20rpx + env(safe-area-inset-bottom));
|
||||||
|
|
||||||
.confirm-button {
|
.confirm-button {
|
||||||
padding: 0 50rpx;
|
padding: 0 50rpx;
|
||||||
|
|
||||||
.button {
|
.button {
|
||||||
display: block;
|
display: block;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 84rpx;
|
height: 84rpx;
|
||||||
border-radius: 106rpx;
|
border-radius: 106rpx;
|
||||||
line-height: 84rpx;
|
line-height: 84rpx;
|
||||||
background: var(--primary-color);
|
background: var(--primary-color);
|
||||||
color: var(--font-button-color);
|
color: var(--font-button-color);
|
||||||
text-align: center;
|
text-align: center;
|
||||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.image-view {
|
.image-view {
|
||||||
width: 100rpx;
|
width: 100rpx;
|
||||||
height: 100rpx;
|
height: 100rpx;
|
||||||
@@ -297,15 +312,17 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.edit-name{
|
|
||||||
|
.edit-name {
|
||||||
margin-top: 24rpx;
|
margin-top: 24rpx;
|
||||||
background: #EFF2F8;
|
background: #EFF2F8;
|
||||||
padding: 24rpx;
|
padding: 24rpx;
|
||||||
border-radius: 22rpx;
|
border-radius: 22rpx;
|
||||||
}
|
}
|
||||||
.edit-notice{
|
|
||||||
|
|
||||||
.notice-title{
|
.edit-notice {
|
||||||
|
|
||||||
|
.notice-title {
|
||||||
padding: 24rpx 0;
|
padding: 24rpx 0;
|
||||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
@@ -315,7 +332,8 @@
|
|||||||
font-style: normal;
|
font-style: normal;
|
||||||
text-transform: none;
|
text-transform: none;
|
||||||
}
|
}
|
||||||
.notice-view{
|
|
||||||
|
.notice-view {
|
||||||
background: #EFF2F8;
|
background: #EFF2F8;
|
||||||
padding: 24rpx;
|
padding: 24rpx;
|
||||||
border-radius: 22rpx;
|
border-radius: 22rpx;
|
||||||
|
|||||||
Reference in New Issue
Block a user