Commit 43dfb83d authored by wang's avatar wang

收集环境

parent 0215b893
......@@ -419,7 +419,23 @@ traverse(ast, {
}
}
})
traverse(ast, {
CallExpression(path){
let {node} = path;
let {callee, arguments} = node;
if(!types.isIdentifier(callee))return;
if (callee.name !== 'C')return;
if (arguments.length !== 1)return;
try{
let res = U(arguments[0].value)
console.log(arguments[0].value, res)
path.replaceWith(types.valueToNode(res))
}catch (e){
}
}
})
//end
console.timeEnd("处理完毕,耗时");
......
This diff is collapsed.
This diff is collapsed.
from flask import Flask, request, render_template, send_file
app = Flask(__name__)
@app.route('/')
def index():
return render_template('index.html')
@app.route('/px.js')
def js():
return send_file('templates/px.js', )
@app.route('/collect', methods=["POST"])
def collect():
print(request.data.decode())
return 'ok'
if __name__ == '__main__':
app.run(host='0.0.0.0',debug=True, port=11233)
\ No newline at end of file
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment