156 lines
4.7 KiB
HTML
156 lines
4.7 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>
|
|
<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/cdn/jquery/3.6.0/jquery.min.js"></script>
|
|
<script src="/static/js/functions.js"></script>
|
|
</head>
|
|
<style>
|
|
*{margin:0;padding: 0;}
|
|
.logoTitle{
|
|
font-size: 22px;
|
|
text-align: center;
|
|
font-style: normal;
|
|
color: #333;
|
|
margin-top: 10px;
|
|
margin-bottom: 30px;
|
|
}
|
|
.loginBox{
|
|
width: 100%;
|
|
height: 100%;
|
|
position: absolute;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
}
|
|
.loginBg{
|
|
background: #3b8aff;
|
|
width: 100%;
|
|
height: 55%;
|
|
top: 0;
|
|
position: fixed;
|
|
z-index: 0;
|
|
}
|
|
.signin{
|
|
margin: 0 auto;
|
|
width: 70%;
|
|
background-color: #fff;
|
|
box-shadow: none;
|
|
padding: 20px;
|
|
border-radius: 10px;
|
|
z-index: 2;
|
|
box-shadow: 0px 3px 20px rgb(0 20 41 / 6%);
|
|
}
|
|
.loginInput {
|
|
font-size: 14px;
|
|
}
|
|
.loginBtn{
|
|
border-radius: 26px;
|
|
font-size: 14px;
|
|
padding: 6px 0px;
|
|
background: linear-gradient(90deg, #3875EA 0%, #1890FC 100%);
|
|
color: #fff;
|
|
margin: 0 auto;
|
|
display: block;
|
|
}
|
|
.modifyUrl{
|
|
font-size: 12px;
|
|
padding-top: 20px;
|
|
text-align: center;
|
|
}
|
|
</style>
|
|
<body>
|
|
<body>
|
|
<div id="app">
|
|
<template>
|
|
<div class="loginBox">
|
|
<div class="loginBg"></div>
|
|
<div class="signin">
|
|
<div class="logoTitle">授权查询</div>
|
|
<el-form ref="form" :model="form" :rules="formRule">
|
|
<el-form-item prop="realname">
|
|
<el-input class="loginInput" v-model="form.realname" placeholder="授权名称"></el-input>
|
|
</el-form-item>
|
|
<el-form-item prop="consumer_sn">
|
|
<el-input class="loginInput" v-model="form.consumer_sn" placeholder="授权编号"></el-input>
|
|
</el-form-item>
|
|
<el-button @click="searchAuth('form')" class="loginBtn" type="primary" round>提交查询</el-button>
|
|
</el-form>
|
|
</div>
|
|
</div>
|
|
|
|
<el-dialog
|
|
title="结果"
|
|
:visible.sync="dialog"
|
|
width="90%"
|
|
:close-on-click-modal="false"
|
|
>
|
|
<el-result icon="success" title="查询成功" subTitle="已获得授权">
|
|
</el-result>
|
|
<span slot="footer" class="dialog-footer">
|
|
<el-button @click="dialog = false">取消</el-button>
|
|
<el-button type="primary" @click="window.location.href=chatUrl">在线咨询</el-button>
|
|
</span>
|
|
</el-dialog>
|
|
</template>
|
|
</div>
|
|
</body>
|
|
|
|
|
|
<script>
|
|
new Vue({
|
|
el: '#app',
|
|
delimiters:["<{","}>"],
|
|
data: {
|
|
window:window,
|
|
form:{
|
|
realname:"",
|
|
consumer_sn:"",
|
|
},
|
|
dialog:false,
|
|
chatUrl:"",
|
|
formRule:{
|
|
realname: [
|
|
{ required: true, message: '授权名称不能为空', trigger: 'blur' },
|
|
],
|
|
consumer_sn: [
|
|
{ required: true, message: '授权编号不能为空', trigger: 'blur' },
|
|
],
|
|
},
|
|
},
|
|
methods: {
|
|
searchAuth(formName){
|
|
let _this=this;
|
|
this.$refs[formName].validate((valid) => {
|
|
if (!valid) {
|
|
return false;
|
|
} else {
|
|
sendAjax("/other/searchAuth","post",_this.form,function (res) {
|
|
if(res.code!=200){
|
|
_this.$message({
|
|
message: _this.form.realname+"未获得授权!",
|
|
type: 'error'
|
|
});
|
|
return;
|
|
}
|
|
_this.dialog=true;
|
|
_this.chatUrl="/chatIndex?ent_id="+res.result.ent_id+"&kefu_name="+res.result.kefu_name+
|
|
"&visitor_name="+_this.form.realname
|
|
});
|
|
}
|
|
});
|
|
|
|
}
|
|
},
|
|
mounted:function(){
|
|
},
|
|
created: function () {
|
|
}
|
|
})
|
|
</script>
|
|
</html>
|