import { getApiLoading } from '@/common/libraries/apiLoading'
import { Apis } from '@/gen/Apis'
import useModel from './model'


export default {
  handlePreview(index?: number | string) {
    uni.previewImage({
      urls: useModel?.showData?.value?.images?.map((i: { url: string }) => i?.url || ''),
      current: index
    })
  },
  getShow(data:any){
     getApiLoading(Apis.Meter.HouseMeterReadings.Show, data).then(res => {
      useModel.showData.value = res?.data
      console.log(res)
    })
  },
}
