first commit
This commit is contained in:
37
pgapp/store/modules/survey.js
Normal file
37
pgapp/store/modules/survey.js
Normal file
@@ -0,0 +1,37 @@
|
||||
import config from '@/config'
|
||||
import storage from '@/utils/storage'
|
||||
import constant from '@/utils/constant'
|
||||
import { waitSurvey } from '@/api/survey'
|
||||
import { getToken, setToken, removeToken } from '@/utils/auth'
|
||||
|
||||
const baseUrl = config.baseUrl
|
||||
|
||||
const survey = {
|
||||
state: {
|
||||
},
|
||||
|
||||
mutations: {
|
||||
|
||||
},
|
||||
|
||||
actions: {
|
||||
// 查勘待跟进
|
||||
WaitSurvey({ commit }) {
|
||||
return new Promise((resolve, reject) => {
|
||||
waitSurvey().then(res => {
|
||||
if (res.code != 1) {
|
||||
reject(res)
|
||||
}
|
||||
const data = res.data
|
||||
console.log(data)
|
||||
resolve(data)
|
||||
}).catch(error => {
|
||||
console.log(error)
|
||||
reject(error)
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export default survey
|
||||
Reference in New Issue
Block a user