(str)
| 698 | } |
| 699 | |
| 700 | function dealKey(str) { |
| 701 | const [rootKey, delIndex] = str.split('.') |
| 702 | if (rootKey && rootKey.indexOf('@') > -1 && delIndex !== undefined) { |
| 703 | const key = rootKey.replace('@', '') |
| 704 | const datas = JSON.parse($.getdata(key)) |
| 705 | if (Array.isArray(datas) && delIndex <= datas.length - 1) { |
| 706 | datas.splice(delIndex, 1) |
| 707 | $.setdata(JSON.stringify(datas), key) |
| 708 | } |
| 709 | } |
| 710 | } |
| 711 | |
| 712 | async function apiSave() { |
| 713 | const data = $.toObj($request.body) |