增加店铺题库类型选择的保存
This commit is contained in:
parent
f694af9603
commit
2c323c9688
@ -119,4 +119,19 @@ class ShopController extends BaseController {
|
|||||||
versionid: shop.gameInfo.versionid
|
versionid: shop.gameInfo.versionid
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@permission('shop:edit')
|
||||||
|
@router('post /shop/save_qtype')
|
||||||
|
async updateQTypes(req, res) {
|
||||||
|
let { shopid, qtypes } = req.params
|
||||||
|
if (!shopid) {
|
||||||
|
throw new ZError(11, 'params mismatch')
|
||||||
|
}
|
||||||
|
let shop = await Shop.findById(shopid)
|
||||||
|
if (!shop) {
|
||||||
|
throw new ZError(12, 'shop not found')
|
||||||
|
}
|
||||||
|
shop.qtypes = qtypes
|
||||||
|
await shop.save()
|
||||||
|
return {}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -102,7 +102,10 @@ class ShopClass extends BaseModule {
|
|||||||
*/
|
*/
|
||||||
@prop()
|
@prop()
|
||||||
public gameInfo?: GameInfo
|
public gameInfo?: GameInfo
|
||||||
|
/**
|
||||||
|
* 已选择的题库分类
|
||||||
|
* @type {string[]}
|
||||||
|
*/
|
||||||
@prop()
|
@prop()
|
||||||
public qtypes: string[]
|
public qtypes: string[]
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user