exampleStore.js 1.1 KB

class Store {
  data = {
    locationName: '',
    participatorList: [],
    participatorUserId: [], // 参会人的userId
    roomId: '',
    startTime: '',
    endTime: '',
    originUsers: [],
    originUsersId: [],
    originalData: null,
    indexNeedUpdate: false,
    isIndexAffairListNeedUpdate: false,
    tabBarIndex: '0',
    updateInfo: {
      updateType: '',
      isUpate: false
    },
    onceMeetingContent: null,
    relatedAppNeedUpdate: false,
  }
  resetData() {
    this.data.roomId = ''
    this.data.participatorList = []
    this.data.participatorUserId = []
    this.data.originUsers = []
    this.data.originUsersId = []
    this.data.locationName = ''
    this.data.onceMeetingContent = null
    this.update();
  }
  resetEditData() {
    this.data.roomId = ''
    this.data.participatorList = []
    this.data.originUsers = []
    this.data.originUsersId = []
    this.data.participatorList = []
    this.data.participatorUserId = []
    this.data.locationName = ''
    this.data.updateInfo = {
      updateType: '',
      isUpate: false
    }
    this.update()
  }
}
export default new Store();