|
楼主 |
发表于 2015-7-30 10:52:23
|
显示全部楼层
你发的那个mainActivity.js里面,我将
Model.prototype.functionDialogReceive = function(event){
debugger;
var data = event.data;
var treedata = this.comp("treedata");
treedata.setValue("path",data.row.path.value.latestValue );
var URL = data.row.url.value.latestValue+"?process="+data.row.process.value.latestValue+"&activity="+data.row.activity.value.latestValue;
URL = URL.replace("$UI","../..");
var appid = treedata.val("corpId");
var configKey = treedata.val("corpId")+treedata.val("appID");
var httpURL = treedata.val("httpURL");
// var wxURL = weixinEncoder(URL,appid,configKey,httpURL);
var wxURL = WxCpUtils.createMenuUrl(httpURL,URL,appid,configKey);
treedata.setValue("funcURL",URL);
treedata.setValue("URL",wxURL);
}; 这里我添加了 var wxURL = WxCpUtils.createMenuUrl(httpURL,URL,appid,configKey);,因为你上面注释掉后,下面的wxURL就没定义了
另外一处
Model.prototype.treedataValueChanged = function(event){
if(event.col == "Name"){
var row = event.row.row;
if(row.level.value.latestValue == "一级菜单" && event.value.length>=16){
alert("一级菜单标题不能超过16个字节!");
event.value = row.Name.originalValue;
this.comp('treedata').getCurrentRow().val("Name",event.value);
}
if(row.level.value.latestValue == "二级菜单" && event.value.length>=40){
alert("二级菜单标题不能超过40个字节!");
event.value = row.Name.originalValue;
this.comp('treedata').getCurrentRow().val("Name",event.value);
}
}
if(event.col == "appID" || event.col == "corpId" || event.col == "httpURL" ){
//修改这些数据后,需要重新生成微信菜单的URL
var row = this.comp("treedata").getCurrentRow();
if(row.val("appID")!= "" && row.val("corpId")!= "" && row.val("httpURL")!= "" && row.val("funcURL") != ""){//funcURL
var URL = row.val("funcURL");
var appid = row.val("corpId");
var configKey = row.val("corpId")+row.val("appID");
var httpURL = row.val("httpURL");
// var wxURL = weixinEncoder(URL,appid,configKey,httpURL);
var wxURL = WxCpUtils.createMenuUrl(httpURL,URL,appid,configKey);
this.comp("treedata").setValue("URL",wxURL);
}
}
};我也添加了,但是运行后待办事项还是出错,这时候待办事项URL
<a href="https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx5a3024837d3c6f5f&redirect_uri=http%3A%2F%2Fwxtest7.tunnel.mobi%2F%2Fx5%2FUI2%2FSA%2Fweixin%2FOauth2Callback.j%3FconfigKey%3Dwx5a3024837d3c6f5f9%26pageURL%253DaHR0cDovL3d4dGVzdDcudHVubmVsLm1vYmkvUm91dGVyU2VydmVyL3I_dD1uRWIySWo&response_type=code&scope=snsapi_base&state=STATE#wechat_redirect">部门经理审核:订单系统</a>
|
|