//=>防抖:每隔wait时间只可以执行一次 function debounce(func, wait, immediate) { let result = null, timeout = null; return function(...args) { let context = this, // Read More
posted @ 2022-12-06 16:56 暗夜精灵123 Views(14) Comments(0) Diggs(0) Edit
点击查看代码 <!-- axios基础用法 --> <script> /** * axios:一款基于promise设计模式封装的ajax库(JQ中的ajax就是最普通的ajax库,没有基于promise管理) */ //=> axios.get([URL],[OPTIONS]); // axios Read More
posted @ 2022-12-05 22:38 暗夜精灵123 Views(219) Comments(0) Diggs(0) Edit
@app.route(’/user/<username>’) @app.route(’/post/<int:post_id>’) @app.route(’/post/<float:post_id>’) @app.route(’/post/<path:path>’) @app.route(’/logi Read More
posted @ 2020-12-01 23:33 暗夜精灵123 Views(70) Comments(0) Diggs(0) Edit
from flask import Flask, url_forapp = Flask(__name__)endpoint:用来给url起别名,通过url_for来反向生成url,如果不写则默认是函数名@app.route('/index', methods=['GET', 'POST'], end Read More
posted @ 2020-12-01 23:32 暗夜精灵123 Views(103) Comments(0) Diggs(0) Edit
方式一:字段赋值方式导入 1 2 3 4 5 6 7 8 9 10 11 12 13 14 from flask import Flask app = Flask(__name__) app.config["debug"] = True app.secret_key = 'afadfadfaf' @ Read More
posted @ 2020-12-01 23:29 暗夜精灵123 Views(158) Comments(0) Diggs(0) Edit