|
@@ -126,13 +126,17 @@ const Model = {
|
|
|
//todo:获取bug列表
|
|
|
* getCaseBugList({ payload }, { call, put , take}) {
|
|
|
let bugIdList = yield call(getCaseBugList, payload);//bug id list
|
|
|
+ // let newBugList = [];
|
|
|
+ yield put({ type: 'getBugInfo', payload: { bugIdList } });
|
|
|
+ // yield take('getBugInfo/@@end');
|
|
|
+ },
|
|
|
+ //todo:获取bug详情
|
|
|
+ * getBugInfo({ payload }, { call, put }) {
|
|
|
+ const { bugIdList } = payload;
|
|
|
let newBugList = [];
|
|
|
for (const item of bugIdList) {
|
|
|
- let p = yield put({ type: 'getBugInfo', payload: { item } });
|
|
|
- yield take('getBugInfo/@@end');
|
|
|
- p.then(res => {
|
|
|
- newBugList = [...newBugList,res];
|
|
|
- });
|
|
|
+ let newBugInfo = yield call(getBugInfo, item);
|
|
|
+ newBugList = [...newBugList,newBugInfo]
|
|
|
}
|
|
|
yield put({
|
|
|
type: 'saveCaseBugList',
|
|
@@ -140,12 +144,6 @@ const Model = {
|
|
|
});
|
|
|
return newBugList;
|
|
|
},
|
|
|
- //todo:获取bug详情
|
|
|
- * getBugInfo({ payload }, { call, put }) {
|
|
|
- const { item } = payload;
|
|
|
- let bugInfo = yield call(getBugInfo, item);
|
|
|
- return bugInfo;
|
|
|
- },
|
|
|
//todo:保存bug
|
|
|
* createCaseBug({ payload }, { call, put }) {
|
|
|
const { useCase,formData } = payload;
|