Simple Linux Panel
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
mdserver-web/class/core/vip_api.py

49 lines
1.4 KiB

2 years ago
# coding:utf-8
# ---------------------------------------------------------------------------------
# MW-Linux面板
# ---------------------------------------------------------------------------------
# copyright (c) 2018-∞(https://github.com/midoks/mdserver-web) All rights reserved.
# ---------------------------------------------------------------------------------
# Author: midoks <midoks@163.com>
# ---------------------------------------------------------------------------------
# ---------------------------------------------------------------------------------
# VIP用户管理
# ---------------------------------------------------------------------------------
import mw
2 years ago
from flask import request
2 years ago
import requests
2 years ago
2 years ago
class vip_api:
1 year ago
api_url = 'https://wo.midoks.icu/api/wp-json/vip'
2 years ago
2 years ago
def __init__(self):
pass
def loginApi(self):
2 years ago
username = request.form.get('username', '')
password = request.form.get('password', '')
2 years ago
password = mw.aesEncrypt(password)
2 years ago
2 years ago
headers = {
"Content-Type": "application/x-www-form-urlencoded",
}
2 years ago
print("name:", str(username))
print("pwd:", str(password))
2 years ago
args = {
'name': username,
'pass': password
}
data = requests.post(self.api_url + '/v1/login',
data=args, headers=headers)
print(data.text)
2 years ago
return mw.returnJson(False, "测试中!")