添加短信查询功能
parent
6ef6ce58b9
commit
c7025b1c05
@ -0,0 +1,168 @@
|
|||||||
|
<template>
|
||||||
|
<div class="msgAuthBox">
|
||||||
|
<!-- {{ authInfo }} -->
|
||||||
|
<div class="authInfoBox" v-loading="authloading">
|
||||||
|
<div class="rabchaser textAreaBox">
|
||||||
|
<h4>公田rabchaser的Authorization</h4>
|
||||||
|
<el-input
|
||||||
|
type="textarea"
|
||||||
|
:rows="5"
|
||||||
|
placeholder="请输入内容"
|
||||||
|
v-model="rabchaser"
|
||||||
|
>
|
||||||
|
</el-input>
|
||||||
|
</div>
|
||||||
|
<div class="dahan textAreaBox">
|
||||||
|
<h4>大汉dahan的Cookie</h4>
|
||||||
|
<el-input
|
||||||
|
type="textarea"
|
||||||
|
:rows="5"
|
||||||
|
placeholder="请输入内容"
|
||||||
|
v-model="dahan"
|
||||||
|
>
|
||||||
|
</el-input>
|
||||||
|
</div>
|
||||||
|
<div class="m2m10086 textAreaBox">
|
||||||
|
<h4>公田m2m10086的Cookie</h4>
|
||||||
|
<el-input
|
||||||
|
type="textarea"
|
||||||
|
:rows="5"
|
||||||
|
placeholder="请输入内容"
|
||||||
|
v-model="m2m10086"
|
||||||
|
>
|
||||||
|
</el-input>
|
||||||
|
</div>
|
||||||
|
<div class="lwwlkj textAreaBox">
|
||||||
|
<h4>安徽lwwlkj的Cookie</h4>
|
||||||
|
<el-input
|
||||||
|
type="textarea"
|
||||||
|
:rows="5"
|
||||||
|
placeholder="请输入内容"
|
||||||
|
v-model="lwwlkj"
|
||||||
|
>
|
||||||
|
</el-input>
|
||||||
|
</div>
|
||||||
|
<div class="btngrop">
|
||||||
|
<el-button type="primary" class="authbtn" @click="refresh"
|
||||||
|
>刷新</el-button
|
||||||
|
>
|
||||||
|
<el-button type="primary" class="authbtn" @click="authGo"
|
||||||
|
>授权</el-button
|
||||||
|
>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
import { getAuthApi, updateAuthApi } from "@/utils/api/index";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: "msgauth",
|
||||||
|
components: {},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
authloading: true,
|
||||||
|
authInfo: "",
|
||||||
|
rabchaser: "",
|
||||||
|
dahan: "",
|
||||||
|
m2m10086: "",
|
||||||
|
lwwlkj: "",
|
||||||
|
};
|
||||||
|
},
|
||||||
|
computed: {},
|
||||||
|
watch: {},
|
||||||
|
mounted() {
|
||||||
|
this.getAuthfn();
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
getAuthfn() {
|
||||||
|
this.authloading = true;
|
||||||
|
getAuthApi()
|
||||||
|
.then((res) => {
|
||||||
|
console.log(res);
|
||||||
|
if (res.code == 200) {
|
||||||
|
this.authloading = false;
|
||||||
|
this.authInfo = res.data;
|
||||||
|
this.rabchaser = res.data.rabchaser;
|
||||||
|
this.dahan = res.data.dahan;
|
||||||
|
this.m2m10086 = res.data.m2m10086;
|
||||||
|
this.lwwlkj = res.data.lwwlkj;
|
||||||
|
} else {
|
||||||
|
this.$message({
|
||||||
|
duration: 1500,
|
||||||
|
showClose: true,
|
||||||
|
message: res.msg,
|
||||||
|
type: "error",
|
||||||
|
});
|
||||||
|
this.authloading = false;
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.catch((err) => {});
|
||||||
|
},
|
||||||
|
//授权
|
||||||
|
authGo() {
|
||||||
|
this.authloading = true;
|
||||||
|
updateAuthApi({
|
||||||
|
rabchaser: this.rabchaser,
|
||||||
|
dahan: this.dahan,
|
||||||
|
m2m10086: this.m2m10086,
|
||||||
|
lwwlkj: this.lwwlkj,
|
||||||
|
})
|
||||||
|
.then((res) => {
|
||||||
|
console.log(res);
|
||||||
|
if (res.code == 200) {
|
||||||
|
this.authloading = false;
|
||||||
|
this.$message({
|
||||||
|
duration: 1500,
|
||||||
|
showClose: true,
|
||||||
|
message: "短信授权成功",
|
||||||
|
type: "success",
|
||||||
|
});
|
||||||
|
this.getAuthfn();
|
||||||
|
} else {
|
||||||
|
this.$message({
|
||||||
|
duration: 1500,
|
||||||
|
showClose: true,
|
||||||
|
message: res.msg,
|
||||||
|
type: "error",
|
||||||
|
});
|
||||||
|
this.authloading = false;
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.catch((err) => {});
|
||||||
|
},
|
||||||
|
//更新
|
||||||
|
refresh() {
|
||||||
|
this.getAuthfn();
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
<style lang="less">
|
||||||
|
.msgAuthBox {
|
||||||
|
height: calc(100% - 24px);
|
||||||
|
width: calc(100% - 24px);
|
||||||
|
padding: 12px;
|
||||||
|
|
||||||
|
.authInfoBox {
|
||||||
|
width: 100%;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
.textAreaBox {
|
||||||
|
display: flex;
|
||||||
|
margin-bottom: 16px;
|
||||||
|
justify-content: space-between;
|
||||||
|
h4 {
|
||||||
|
width: 100px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.btngrop {
|
||||||
|
// display: flex;
|
||||||
|
margin-left: auto;
|
||||||
|
.authbtn {
|
||||||
|
width: 80px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
Loading…
Reference in New Issue