some change

master
Hhhhzh 2 years ago
parent d5d07f4a7b
commit b0269c9dfe

@ -1,10 +1,5 @@
''' '''
管理员界面 包含管理员的一些界面 包括登陆界面功能界面等
类名View
属性账号密码
行为管理员界面 管理员登陆 系统功能界面 管理员注销
系统功能开户 查询 取款 存储 转账 改密 销户 退出
''' '''
import check import check
from check import Check from check import Check

@ -1,8 +1,6 @@
''' '''
提款机 提款机
类名ATM 包含功能包括开户,查询,取款,存储,转账,销户,挂失,解锁,改密,退出
属性
行为开户,查询,取款,存储,转账,销户,挂失,解锁,改密,退出
''' '''
import check import check
from check import Check from check import Check
@ -174,7 +172,7 @@ class ATM(object):
# 写入文件 # 写入文件
def writeCard(self): def writeCard(self):
self.appendCard.append('', w='w') self.appendCard.append('', mode='w')
for card in self.cards: for card in self.cards:
self.appendCard.append(card) self.appendCard.append(card)

@ -1,7 +1,5 @@
''' '''
: Card包含属性包括卡号卡密剩余钱身份证手机号码卡是否被上锁
类名:Card
属性卡号7位随机 密码 余额 绑定的身份证号 手机号
''' '''

@ -0,0 +1,3 @@
{"cardN": "510146", "cardPassword": "000000", "cardMoney": 0, "identityId": "370105", "phoneNum": "19580768517", "cardLock": "False"}
{"cardN": "507229", "cardPassword": "000000", "cardMoney": 0, "identityId": "370105", "phoneNum": "15564160506", "cardLock": "False"}
{"cardN": "5488800", "cardPassword": "000000", "cardMoney": 0, "identityId": "370102", "phoneNum": "13278888439", "cardLock": "False"}

@ -1,7 +1,5 @@
''' '''
验证类 包含了用于验证各种选项的函数
用户名密码卡号身份证手机号验证
输入确认
''' '''
@ -121,11 +119,6 @@ class Check(object):
# 用户验证 # 用户验证
def userName(self, admin, password): def userName(self, admin, password):
"""
:param admin: 用户名
:param password: 密码
:return:
"""
self.admin = admin self.admin = admin
self.password = password self.password = password
adminFlag = False adminFlag = False

@ -30,9 +30,8 @@ class AppendCard(Card):
"phoneNum": card.phoneNum, "cardLock": card.cardLock "phoneNum": card.phoneNum, "cardLock": card.cardLock
} }
def append(self, card, w='a'): def append(self, card, mode='a'):
# 清除 if mode == 'w':
if w == 'w':
with open("cardinfo.txt", "w", encoding="utf-8") as fa: with open("cardinfo.txt", "w", encoding="utf-8") as fa:
fa.write('') fa.write('')
else: else:
@ -58,7 +57,7 @@ class Del(object):
return False return False
appendcard = AppendCard() appendcard = AppendCard()
appendcard.append('', w='w') appendcard.append('', mode='w')
for card in cards: for card in cards:
appendcard.append(card) appendcard.append(card)
return True return True

Loading…
Cancel
Save