-
Notifications
You must be signed in to change notification settings - Fork 50
/
main.py
36 lines (32 loc) · 1.16 KB
/
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
import sys
#向path添加文件夹所在路径
sys.path.append(r'D:\Program Files (x86)\JetBrains\PyCharm Community Edition 5.0.4\jre\jre\bin\PycharmProjects\untitled')
from get_coupon import coupon,stocks,jd_review
def main():
print('*===============请选择操作模式================*')
print('* (1)领取优惠券 *')
print('* (2)查商品信息 *')
print('* (3)查商品评价 *')
print('* (0)退出 *')
print('*============================================*')
do_type=input('请输入您的选择:').strip()
if do_type=='1':
c=coupon.Coupon()
c.run()
return main()
elif do_type=='2':
s=stocks.Stock()
s.get_price()
s.get_stock()
return main()
elif do_type=='3':
r=jd_review.reviewer()
r.run_review()
return main()
elif do_type=='0':
print('退出成功')
else:
print('您的输入有误,请重新输入!')
return main()
if __name__=='__main__':
main()