所有的访问的接口的前面是固定的,如果分明写在各个页面,可能修改的时候就得一个个的改。现在把它放在一个js里面,然后再各个页面引用。修改了这个所有的文件里面也是改的。所以就更加方便管理和修改。
alluse.js里面的内容:
app.server = "https://m2.jft365.cn/index.php/";
app.photourl = "https://m2.jft365.cn";
app.userphotourl = "https://m1.jft365.cn";
app.photourl2 = "http://a.jft365.cn";
app.post= function(act, data, fun, err) {
mui.ajax({
url:app.server + act,