49 lines
1.4 KiB
HTML
49 lines
1.4 KiB
HTML
<html lang="cn">
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0;" name="viewport" />
|
|
<title>{{.Title}}</title>
|
|
<link rel="stylesheet" href="/static/cdn/element-ui/2.15.7/theme-chalk/index.min.css">
|
|
<script src="/static/cdn/vue/2.6.11/vue.min.js"></script>
|
|
<script src="/static/cdn/element-ui/2.15.7/index.js"></script>
|
|
<script src="/static/js/functions.js"></script>
|
|
</head>
|
|
<body>
|
|
<body>
|
|
<div id="app">
|
|
<template>
|
|
|
|
</template>
|
|
</div>
|
|
</body>
|
|
|
|
</body>
|
|
<script>
|
|
var KefuName='{{.kefuId}}';
|
|
var ENT_ID='{{.EntId}}';
|
|
var APP_ID='{{.WorkWechatCorpid}}';
|
|
var AGENT_ID='{{.WorkWechatAppAgentId}}';
|
|
</script>
|
|
<script>
|
|
new Vue({
|
|
el: '#app',
|
|
delimiters:["<{","}>"],
|
|
data: {
|
|
},
|
|
methods: {
|
|
redirect(){
|
|
let REDIRECT_URI=urlEncode(getBaseUrl()+"/entWechatAuth?ent_id="+ENT_ID+"&kefu_name="+KefuName);
|
|
let url="https://open.weixin.qq.com/connect/oauth2/authorize?appid="+APP_ID+"&redirect_uri="+REDIRECT_URI
|
|
+"&response_type=code&scope=snsapi_base&state=STATE&agentid="+AGENT_ID+"#wechat_redirect"
|
|
document.location.href=url;
|
|
}
|
|
},
|
|
mounted:function(){
|
|
},
|
|
created: function () {
|
|
this.redirect();
|
|
}
|
|
})
|
|
</script>
|
|
</html>
|