27
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
:autoBack="true"
|
||||
>
|
||||
<view class="u-nav-slot" slot="right" v-if="isOwner || isAdmin">
|
||||
<u-button type="primary" size="mini" @click="save">保存</u-button>
|
||||
<u-button type="primary" @click="save">保存</u-button>
|
||||
</view>
|
||||
</u-navbar>
|
||||
<u-parse v-if="!isOwner && !isAdmin" :content="announcement"></u-parse>
|
||||
@@ -16,7 +16,7 @@
|
||||
focus
|
||||
autoHeight
|
||||
height="500"
|
||||
maxlength="-1"
|
||||
maxlength="1500"
|
||||
border="none"
|
||||
:adjustPosition="false"
|
||||
class="textarea"
|
||||
@@ -77,4 +77,9 @@
|
||||
<style scoped lang="scss">
|
||||
.textarea{
|
||||
}
|
||||
.u-nav-slot{
|
||||
.u-button{
|
||||
height: 60rpx;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -47,6 +47,7 @@
|
||||
</view>
|
||||
|
||||
<u-toast ref="uToast"></u-toast>
|
||||
<c-cut-avatar ref="cutAvatar" @save="saveAvatar" />
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@@ -60,6 +61,7 @@
|
||||
import GroupMemberRow from "./components/GroupMemberRow.vue";
|
||||
import {getPurePath} from "@/util/common";
|
||||
import util from "@/util/index.js"
|
||||
import {upload} from "@/api/login.js";
|
||||
|
||||
const ConfirmTypes = {
|
||||
Dismiss: "Dismiss",
|
||||
@@ -273,6 +275,22 @@
|
||||
console.log(e);
|
||||
})
|
||||
},
|
||||
saveAvatar(e){
|
||||
if (!this.isAdmin && !this.isOwner) {
|
||||
return;
|
||||
}
|
||||
this.tempFilePath = e.path;
|
||||
upload(e.path,{
|
||||
'url':"/group/avatar",
|
||||
savePath: "groupavatar",
|
||||
groupID: this.storeCurrentConversation.groupID,
|
||||
}).then((res) => {
|
||||
console.log("上传成功",res);
|
||||
//userStore.selfInfo.faceURL = res.data.faceURL;
|
||||
}).catch((res1) => {
|
||||
console.log("上传失败",res1);
|
||||
});
|
||||
},
|
||||
updateGroupAvatar() {
|
||||
if (!this.isAdmin && !this.isOwner) {
|
||||
return;
|
||||
@@ -285,6 +303,8 @@
|
||||
tempFilePaths
|
||||
}) => {
|
||||
const path = tempFilePaths[0];
|
||||
this.$refs.cutAvatar.enterEditor(path);
|
||||
return ;
|
||||
const nameIdx = path.lastIndexOf("/") + 1;
|
||||
const typeIdx = path.lastIndexOf(".") + 1;
|
||||
const fileName = path.slice(nameIdx);
|
||||
|
||||
Reference in New Issue
Block a user