workflow脚本js获取web.config写法说明

workflow脚本js获取web.config写法说明
获取客户端应用系统编号getApplicationConfigValue(“clientID”);

var loginUserID      = GetUrlJson().useroid;
var appID = getApplicationID();    //获取当前登陆的应用系统编号
var appName = getApplicationName();  //获取当前登陆的应用系统名称
var clientID         = getApplicationConfigValue("clientID");   //从数据库中获取授权中心的租户编号clientID值
//获取当前登陆用户的已授权的资源集合
var resList          = GetLicensedResources(clientID,userID,'menu',loginUserID);
var flowList         = GetLicensedResources(clientID,userID,'flow',loginUserID);
var xzqList          = GetLicensedResources(clientID,userID,'xzq',loginUserID);
var orgList          = GetLicensedResources(clientID,userID,'org',loginUserID);
var flowinstanceList = GetLicensedResources(clientID,userID,'flowinstance',loginUserID);

获取web.config文件中用户表单编号GetWebConfigValue(“userinfo_formid”);
// ‘487ac775-3d93-4e7d-8e12-96483e2c13bc-275’;
//系统管理/显示用户信息表单编号

var t_cfoid = GetWebConfigValue('userinfo_formid');

js定时脚本调用方法
setInterval(displayWeather,3000); 间隔3秒调用一次显示天气信息

function displayWeather(){
    var citykey = '101270101';  // GetUrlJson().xzqdm;
    //citykey          = GetValue('citykey');
    var t_weatherUrl = 'http://wthrcdn.etouch.cn/weather_mini?citykey=';
    var t_url        = t_weatherUrl+citykey;
    $.ajax({
        headers: { 'Content-Type': 'application/json' },
        type: "get",
        url: t_url,
        cache: false,
        async: false,  //同步
        dataType: "jsonp",
        success: function (data) {   
                  //ShowJsonEq(data); 
                  //ShowJsonEq(data.data);
                  if(data.desc != "OK"){
                       alert("请求地区有误");}
                  //
                    var t ="今天天气:";
                    t+= "\r\n城市:"+data.data["city"]+ " 空气质量指数:"+data.data["aqi"];
                    t+= "\r\n实时温度:"+data.data["wendu"]+"  "+data.data["ganmao"];
                    t+= "\r\n\r\n昨天天气:\r\n";
                    var yday = data.data["yesterday"];
                    t+=yday.date+" "+yday.type+" 温度:"+yday.low+"-"+yday.high;//+"风力:"+yday.fl+"风向:"+yday.fx;
                    t+= "\r\n\r\n今天天气预测:";
                    var forecast=data.data["forecast"];
                    //ShowJsonEq(yday);
                    for(index in forecast)
                    {
                       var t_date=forecast[index];
                       t+="\r\n"+t_date.date+" "+t_date.type+" 温度:"+t_date.low+"-"+t_date.high;//+"风力:"+t_date.fengli+"风向:"+t_date.fengxiang;
                    }
                    SetValue('textbox1',t);
                  //
         },
         error:function(){
            console.log("请求失败");
         }
    });
};
//定时刷新天气信息
displayWeather();
setInterval(displayWeather,3000);
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值