为什么80%的码农都做不了架构师?>>>
<script type="text/javascript">
wx.config({
debug: false, // 开启调试模式,调用的所有api的返回值会在客户端alert出来,若要查看传入的参数,可以在pc端打开,参数信息会通过log打出,仅在pc端时才会打印。
appId: '{$sign.appId}', // 必填,公众号的唯一标识
timestamp:'{$sign.timestamp}', // 必填,生成签名的时间戳
nonceStr: '{$sign.nonceStr}', // 必填,生成签名的随机串
signature: '{$sign.signature}',// 必填,签名,见附录1
jsApiList: [
'checkJsApi',
'chooseImage',
'previewImage',
'uploadImage',
'downloadImage',
]
});
wx.ready(function () {
//提示
layer.open({
content: ''
,skin: 'msg'
,time: 2 //2秒后自动关闭
});
//询问框
layer.open({
content: '{$info}'
,btn: ['{$yes}','返回']
,yes: function(index){
window.location.href="{$url}";
layer.close(index);
}
,no:function(index){
WeixinJSBridge.invoke('closeWindow',{},function(res){
console.log(res.err_msg);
});
layer.close(index);
}
});
})
//
</script>