var userids=getCurrentDocument().getItemValueAsString("抄送人员");//表单,获取接收人的值
var touser="";
if(userids!=""&&userids!=null){
userids = userids.split(';');
for (var i=0; i < userids.length; i++ ) {
var touserid=userids[i];
touser+=getUserById(touserid).getLoginno()+"|";
}
touser=touser.substring(0,touser.length-1);
}
var formid=getCurrentDocument().getFormid();
var applicationId=getApplication();
var domainId=getDomainid();
var docid=getCurrentDocument().getId();
var request = $WEB.getParamsTable().getHttpRequest();//获取当前request
//如果服务器本身就可以访问,就可以通过函数获取
var url0="http://"+request.getServerName()+":"+request.getServerPort()+getContextPath();
var url1="http://dali.hengxinglvyou.com/obpm"+"/portal/dynaform/document/view.action?_docid="+docid+"&_formid="+formid+"&application="+applicationId;
//打开的url需要转码
url1=encodeURIComponent(url1);
var url = "https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx8742f81683920a60&redirect_uri="+url1+"&response_type=code&scope=snsapi_base&state="+domainId+"#wechat_redirect