delete-conversation.vue 900 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. <template>
  2. <uni-popup ref="popup" type="center">
  3. <view class="main" @click="deletes()">
  4. 删除会话
  5. </view>
  6. </uni-popup>
  7. </template>
  8. <script>
  9. import uniPopup from '@/components/uni-popup/uni-popup.vue';
  10. export default {
  11. components: {
  12. uniPopup
  13. },
  14. data() {
  15. return {
  16. page: 1,
  17. list: [],
  18. groupID: "",
  19. hasMore: true,
  20. conversationID: ""
  21. }
  22. },
  23. methods: {
  24. async open(conversationID) {
  25. this.$refs.popup.open();
  26. this.conversationID = conversationID
  27. console.log(conversationID)
  28. },
  29. deletes() {
  30. this.TIM.deleteConversations(this.conversationID)
  31. this.$refs.popup.close(false)
  32. uni.showToast({
  33. title: "操作成功"
  34. })
  35. }
  36. }
  37. }
  38. </script>
  39. <style lang="scss" scoped>
  40. .main {
  41. padding: 4rpx 50rpx;
  42. line-height: 80rpx;
  43. text-align: center;
  44. color: #8e8e8e;
  45. background-color: #fff;
  46. border-radius: 12rpx;
  47. }
  48. </style>