// 地址(上来默认元宝区)根据选择行政区划请求不同地址
var getJiedaosequ
var getLogin
var getRegister
var getMain
var getHouse
var getResult
var getIgnore
var getEntry
var getAlarmResult
var POSTURL="#########"
getJiedaosequ = POSTURL + "jiedaosequ" // 获取街道社区数据
getLogin = POSTURL + "author" //判断用户是否注册过
getRegister = POSTURL + "GuardReg" //护卫者注册
getMain = POSTURL + "main" //主页 加载用户包保户
getHouse = POSTURL + "house" //具体某一户的信息
getResult = POSTURL + "saveresult" //保存反馈结果
getIgnore = POSTURL + "ignore" //保存反馈结果
getEntry = POSTURL + "Login" //登录
getAlarmResult = POSTURL + "get_alarm_result" //获取反馈详情
var changeUrl=function () {
var xzqh_val=wx.getStorageSync('administrative_area')
if(xzqh_val=='元宝区'){
POSTURL = "#########";
}else{
POSTURL = "##########";
}
wx.setStorageSync('POSTURL',POSTURL)
getJiedaosequ = POSTURL + "jiedaosequ" // 获取街道社区数据
getLogin = POSTURL + "author" //判断用户是否注册过
getRegister = POSTURL + "GuardReg" //护卫者注册
getMain = POSTURL + "main" //主页 加载用户包保户
getHouse = POSTURL + "house" //具体某一户的信息
getResult = POSTURL + "saveresult" //保存反馈结果
getIgnore = POSTURL + "ignore" //保存反馈结果
getEntry = POSTURL + "Login" //登录
getAlarmResult = POSTURL + "get_alarm_result" //获取反馈详情
console.log(getJiedaosequ)
}
module.exports ={
getJiedaosequ:getJiedaosequ,
getRegister:getRegister,
getLogin:getLogin,
getMain:getMain,
getHouse:getHouse,
getResult:getResult,
getIgnore:getIgnore,
getEntry:getEntry,
changeUrl:changeUrl,
getAlarmResult:getAlarmResult
}
console.log(getJiedaosequ) 打印这个倒是变了 但是请求的路径还是原来的