mirror of
https://github.com/Lost-MSth/Arcaea-server.git
synced 2026-02-13 11:47:32 +08:00
Update to v2.6.5 without release
- Change something to make that purchase things can have some cores. - Fix the download link of Arcaea client in README > This is a small update.
This commit is contained in:
@@ -847,6 +847,7 @@ def change_purchase_item():
|
||||
purchase_name = request.form['purchase_name']
|
||||
item_id = request.form['item_id']
|
||||
item_type = request.form['type']
|
||||
amount = int(request.form['amount'])
|
||||
except:
|
||||
error = '数据错误 Wrong data.'
|
||||
flash(error)
|
||||
@@ -862,8 +863,8 @@ def change_purchase_item():
|
||||
c.execute(
|
||||
'''select exists(select * from item where item_id=? and type=?)''', (item_id, item_type))
|
||||
if c.fetchone() == (1,):
|
||||
c.execute('''insert into purchase_item values(?,?,?)''',
|
||||
(purchase_name, item_id, item_type))
|
||||
c.execute('''insert into purchase_item values(?,?,?,?)''',
|
||||
(purchase_name, item_id, item_type, amount))
|
||||
flash('''购买项目的物品添加成功 Successfully add the purchase's item.''')
|
||||
else:
|
||||
error = '''物品不存在 The item does not exist.'''
|
||||
|
||||
@@ -301,7 +301,7 @@ def get_all_purchase():
|
||||
items = []
|
||||
if y:
|
||||
for j in y:
|
||||
items.append({'item_id': j[1], 'type': j[2]})
|
||||
items.append({'item_id': j[1], 'type': j[2], 'amount':j[3]})
|
||||
|
||||
re.append({'purchase_name': i[0],
|
||||
'price': i[1],
|
||||
|
||||
Reference in New Issue
Block a user