import { Apis } from '@/gen/Apis'
import { getApiLoading } from '@/common/libraries/apiLoading'
import userLoginStatus from '@/common/libraries/userUserLogin'
import { showToastBack, showToast } from '@/common/libraries/naviHelper'
import { useWeAppAuthStore, useWorkStore } from '@/common'
import useModel from './model'
const work = useWorkStore()
const auth = useWeAppAuthStore()
const getQrCode = (res: { id: number }) => {
  getApiLoading(Apis.GoodsReleases.GoodsReleases.GoodsQrCode, res).then(res => {
    useModel.qrCode.value = res?.data?.qr_code
    console.log(res)
  })
}

export default {
  getShow(res: { id: number }) {
    getApiLoading(Apis.GoodsReleases.GoodsReleases.Show, res).then(res => {
      useModel.showData.value = res?.data
      getQrCode(res?.data)
      console.log(res)
    })
  }
}
