kefu/static/templates/default/wechat_kefu_transfer.html

55 lines
1.5 KiB
HTML
Raw Normal View History

2024-12-10 02:50:12 +00:00
<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?v=kjhgsdjduwg34df"></script>
</head>
<body>
<body>
<div id="app">
<template>
<el-result icon="success" title="客服授权跳转">
</el-result>
</template>
</div>
</body>
</body>
<script>
var ENT_ID='{{.EntId}}';
var KEFU_NAME='{{.KefuName}}';
var APP_ID='{{.AppId}}';
var HOST='{{.Host}}';
</script>
<script>
new Vue({
el: '#app',
delimiters:["<{","}>"],
data: {
},
methods: {
redirect(){
var redirect=HOST
+"/wechatKefu" +
"?ent_id="+ENT_ID +
"&kefu_name="+KEFU_NAME;
redirect=urlEncode(redirect);
var url="https://open.weixin.qq.com/connect/oauth2/authorize?appid="+APP_ID
+"&redirect_uri="+redirect
+"&response_type=code&scope=snsapi_userinfo#wechat_redirect"
document.location.href=url;
}
},
mounted:function(){
},
created: function () {
this.redirect();
}
})
</script>
</html>