/*
 * @Author: howie
 * @Date: 2022-06-18 14:33:08
 * @LastEditors: howie
 * @LastEditTime: 2022-07-13 17:13:15
 * @FilePath: \supply-front\src\store\modules\sales.js
 * @Description:
 *
 * Copyright (c) 2022, All Rights Reserved.
 */
import { getId } from '@/api/policy_list'

const state = {
  code: '',
  searchForm: {
    code: '',
    endTime: '',
    imgSrc: '',
    remark: '',
    startTime: '',
    title: '',
    type: ''
  },
  fileList: []
}

const mutations = {
  setId(state, id) {
    state.code = id
    console.log('setId', id)
  }
}

const actions = {
  hanlenewInfo({ commit }) {
    return new Promise((resolve, reject) => {
      getId().then(res => {
        // commit('setId',res.data)
        resolve()
      })
    })
  }
}

export default {
  namespaced: true,
  state,
  mutations,
  actions
}
