更新
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,14 +38,18 @@
|
|||||||
</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">
|
||||||
@@ -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>
|
||||||
|
|
||||||
@@ -81,18 +89,23 @@
|
|||||||
color: '#333',
|
color: '#333',
|
||||||
borderColor: 'none'
|
borderColor: 'none'
|
||||||
},
|
},
|
||||||
|
formType: 0,
|
||||||
statusBarHeight: 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()
|
||||||
}
|
}
|
||||||
@@ -132,8 +145,8 @@
|
|||||||
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({
|
||||||
@@ -142,10 +155,9 @@
|
|||||||
},
|
},
|
||||||
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,12 +212,18 @@
|
|||||||
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;
|
||||||
@@ -234,6 +248,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.image-view {
|
.image-view {
|
||||||
width: 100rpx;
|
width: 100rpx;
|
||||||
height: 100rpx;
|
height: 100rpx;
|
||||||
@@ -297,12 +312,14 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.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 {
|
.edit-notice {
|
||||||
|
|
||||||
.notice-title {
|
.notice-title {
|
||||||
@@ -315,6 +332,7 @@
|
|||||||
font-style: normal;
|
font-style: normal;
|
||||||
text-transform: none;
|
text-transform: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.notice-view {
|
.notice-view {
|
||||||
background: #EFF2F8;
|
background: #EFF2F8;
|
||||||
padding: 24rpx;
|
padding: 24rpx;
|
||||||
|
|||||||
Reference in New Issue
Block a user