MCPcopy Create free account
hub / github.com/bailicangdu/node-elm / getId

Method getId

prototype/baseComponent.js:62–77  ·  view source on GitHub ↗
(type)

Source from the content-addressed store, hash-verified

60 }
61 //获取id列表
62 async getId(type){
63 if (!this.idList.includes(type)) {
64 console.log('id类型错误');
65 throw new Error('id类型错误');
66 return
67 }
68 try{
69 const idData = await Ids.findOne();
70 idData[type] ++ ;
71 await idData.save();
72 return idData[type]
73 }catch(err){
74 console.log('获取ID数据失败');
75 throw new Error(err)
76 }
77 }
78
79 async uploadImg(req, res, next){
80 const type = req.params.type;

Callers 14

getPathMethod · 0.95
qiniuMethod · 0.95
initDataMethod · 0.80
addCategoryMethod · 0.80
addFoodMethod · 0.80
getSpecfoodsMethod · 0.80
addShopMethod · 0.80
loginMethod · 0.80
checkoutMethod · 0.80
postOrderMethod · 0.80
addAddressMethod · 0.80
loginMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected