前台:
//微信接口校验
$(function () {
wxJsapi();
})
//微信jsdk认证
function wxJsapi() {
var data = '<%=JsApiirray()%>';
data = eval("(" + data + ")");//实例化
wxconfig(data);
}
后台:
public string JsApiirray()
{
jsApi wxjs = new jsApi();
string corpId = "**********";
string corpsecret = "**********";
string strReturn = wxjs.GetJsApiInfo(corpId, corpsecret);
return strReturn;
}