You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
60 lines
1.0 KiB
60 lines
1.0 KiB
'use strict';
|
|
|
|
import {
|
|
getTestList,
|
|
postTestList
|
|
} from '@/api/@pathname@';
|
|
|
|
const state = {};
|
|
|
|
const actions = {
|
|
/**
|
|
* @description postTestList
|
|
* @param commit
|
|
* @param params
|
|
* @returns {Promise<unknown>}
|
|
*/
|
|
getTestList({commit}, params) {
|
|
return new Promise((resolve, reject) => {
|
|
getTestList(params)
|
|
.then((res) => {
|
|
console.log('getTestList.res', res.data);
|
|
resolve(res.data);
|
|
})
|
|
.catch((error) => {
|
|
reject(error);
|
|
})
|
|
})
|
|
},
|
|
|
|
/**
|
|
* @description 描述
|
|
* @param commit
|
|
* @param params
|
|
* @returns {Promise<unknown>}
|
|
*/
|
|
postTestList({commit}, params) {
|
|
return new Promise((resolve, reject) => {
|
|
postTestList(params)
|
|
.then((res) => {
|
|
console.log('postTestList.res', res.data);
|
|
resolve(res.data);
|
|
})
|
|
.catch((error) => {
|
|
reject(error);
|
|
})
|
|
})
|
|
},
|
|
};
|
|
|
|
const getters = {};
|
|
|
|
const mutations = {};
|
|
|
|
export default {
|
|
namespaced: true,
|
|
state,
|
|
getters,
|
|
actions,
|
|
mutations
|
|
};
|