Commit 78aa2af8 by 梁建民

js

parent 931fc388
...@@ -72,48 +72,48 @@ const mutations = { ...@@ -72,48 +72,48 @@ const mutations = {
const actions = { const actions = {
ziYingIndex({commit}, payload) { ziYingIndex({commit}, payload) {
state.loading = true; Toast.loading({
state.finished = false; message: '加载中...',
forbidClick: true,
loadingType: 'spinner'
/* let param = { });
'sample_status/eq': 1
};*/
/* let obj = Object.assign({}, param, payload.params);*/
let obj = { let obj = {
...payload.params, ...payload.params,
'offset':200, 'offset': 200,
'sample_status/eq': 1, 'sample_status/eq': 1,
} };
let params = Util.getParams(obj); let params = Util.getParams(obj);
Services.ZiYingIndex(params).then((res) => { Services.ZiYingIndex(params).then((res) => {
state.loading = false;
let data = res.data; let data = res.data;
if (data.error_code == 0) { if (data.error_code == 0) {
commit({ commit({
type: 'ziYingIndex', type: 'ziYingIndex',
data: data.data data: data.data
}); });
state.finished = true;
} else if (data.error_code == 3) { } else if (data.error_code == 3) {
window.location.reload();
} else { } else {
state.loading = false;
state.finished = true;
Toast({ Toast({
message: data.error_msg, message: data.error_msg,
duration: 3000 duration: 3000
}); });
Toast.clear();
} }
}).catch(function (err) { }).catch(function (err) {
state.loading = false; Toast.clear();
state.finished = true;
}); });
}, },
aggs({commit}, payload) { aggs({commit}, payload) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment