10
This commit is contained in:
@@ -2,27 +2,37 @@
|
||||
<view class="single_settings_container">
|
||||
<custom-nav-bar title="好友设置" />
|
||||
|
||||
<view class="row_wrap">
|
||||
<view class="setting_row info_row">
|
||||
<view @click="toUserCard" class="user_info">
|
||||
<my-avatar :src="storeCurrentConversation.faceURL" :desc="storeCurrentConversation.showName"
|
||||
size="46" />
|
||||
</view>
|
||||
<view @click="invite2group" class="action">
|
||||
<image style="width: 46px; height: 46px" src="@/static/images/single_setting_add.png" alt="" />
|
||||
</view>
|
||||
<view class="setting_row info_row">
|
||||
<view @click="toUserCard" class="user_info">
|
||||
<my-avatar :src="storeCurrentConversation.faceURL" :desc="storeCurrentConversation.showName"
|
||||
size="46" />
|
||||
</view>
|
||||
<view @click="invite2group" class="action">
|
||||
<image style="width: 46px; height: 46px" src="@/static/images/single_setting_add.png" alt="" />
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<uni-list>
|
||||
<uni-list-item title="查找聊天内容" to=""></uni-list-item>
|
||||
</uni-list>
|
||||
<u-gap></u-gap>
|
||||
<uni-list>
|
||||
<uni-list-item title="消息免打扰" @switchChange="updateCoversation('recvMsgOpt',storeCurrentConversation.recvMsgOpt==0 ? 2: 0)" showSwitch :switchChecked="storeCurrentConversation.recvMsgOpt !== 0"></uni-list-item>
|
||||
<uni-list-item title="置顶聊天" @switchChange="updateCoversation('isPinned',!storeCurrentConversation.isPinned)" showSwitch :switchChecked="storeCurrentConversation.isPinned"></uni-list-item>
|
||||
</uni-list>
|
||||
<u-gap></u-gap>
|
||||
<uni-list>
|
||||
<uni-list-item title="删除聊天记录" @click="clearMsg" clickable></uni-list-item>
|
||||
</uni-list>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
mapGetters
|
||||
} from "vuex";
|
||||
import {mapGetters} from "vuex";
|
||||
import CustomNavBar from "@/components/CustomNavBar/index.vue";
|
||||
import MyAvatar from "@/components/MyAvatar/index.vue";
|
||||
import SettingItem from "@/components/SettingItem/index.vue";
|
||||
import IMSDK from "openim-uniapp-polyfill";
|
||||
export default {
|
||||
components: {
|
||||
CustomNavBar,
|
||||
@@ -61,6 +71,22 @@
|
||||
url: `/pages/common/createGroup/index?checkedMemberList=${checkedMemberList}`,
|
||||
});
|
||||
},
|
||||
clearMsg(){
|
||||
IMSDK.asyncApi('clearConversationAndDeleteAllMsg',IMSDK.uuid(), this.storeCurrentConversation.conversationID).then(res=>{
|
||||
uni.navigateBack();
|
||||
}).catch(e=>{
|
||||
console.log(e);
|
||||
})
|
||||
},
|
||||
updateCoversation(field,value1){
|
||||
const data = {conversationID:this.storeCurrentConversation.conversationID};
|
||||
data[field] = value1;
|
||||
IMSDK.asyncApi('setConversation', IMSDK.uuid(),data).then(res=>{
|
||||
console.log(res);
|
||||
}).catch(e=>{
|
||||
console.log(e);
|
||||
})
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user