<% local XQVersion = require("xiaoqiang.XQVersion") local XQSysUtil = require ("xiaoqiang.util.XQSysUtil") local XQLanWanUtil = require("xiaoqiang.util.XQLanWanUtil") local ver = XQVersion.webVersion local monitor = XQLanWanUtil.getWanMonitorStat() local pcClient = XQVersion.pcClientServer local macClient = XQVersion.macClientServer local androidClient = XQVersion.androidClientServer if monitor.WANLINKSTAT ~= "UP" then pcClient = XQVersion.pcClientRouter macClient = XQVersion.macClientRouter androidClient = XQVersion.androidClientRouter end local remote_addr = luci.http.getenv("REMOTE_ADDR") local mac = luci.sys.net.ip4mac(remote_addr) -- URL ENV SWTICH local XQConfigs = require "xiaoqiang.common.XQConfigs" local pspBaseUrl local xmServerUrl if XQConfigs.SERVER_CONFIG == 0 then pspBaseUrl = XQConfigs.PASSPORT_CONFIG_ONLINE_URL xmServerUrl = XQConfigs.XQ_SERVER_ONLINE_API_URL elseif XQConfigs.SERVER_CONFIG == 1 then pspBaseUrl = XQConfigs.PASSPORT_CONFIG_PREVIEW_URL xmServerUrl = XQConfigs.XQ_SERVER_STAGING_API_URL end %>