var userInfo = {}//将用户信息设置为全局变量
function initInterface(){
	createInterface(interfaceList)//接口初始化
	///获取用户信息并设定为全局变量
	getLocalUserInfo().then(function(res){
		console.info("SSS:::",JSON.stringify(res))
	    var infoObj = res.list[res.list.length - 1]
	    userInfo = {
	      userCode: infoObj.USERCODE,
	      branchId: infoObj.USER_BRANCHID,
	      cifAccount: infoObj.USER_CIFACCOUNT,
	      custId: infoObj.USER_CUSTID,
	      longCustId: '03' + ('000000000000' + infoObj.USER_CUSTID).substr(-12),
	      busiId: infoObj.USER_FUNDID,
	      longBusiId: '03' + infoObj.USER_BRANCHID + ('0000000000' + infoObj.USER_FUNDID).substr(-10),
	      userName: infoObj.USER_NAME
	    }
	})
}
initInterface()
function requestInterface (reqObj) {//reqObj {name:,data:{}} 接口名，入参
      var interfaceName = reqObj.name//接口名称
      var postData = reqObj.data//接口入参
      for (var key in postData) {//全局变量替换 将#{{}}内的内容替换成实际信息
        if (postData.hasOwnProperty(key)) {
          var regStr = /^#\{\{(\w+)\}\}$/
          var result = regStr.exec(postData[key])
          if (result) {
            postData[key] = userInfo[result[1]]
          }
        }
      }
      // console.info(postData)
      return getInterface(interfaceName, postData)
    }