master
parent
ec3f9edf04
commit
71f6444a81
@ -0,0 +1,85 @@
|
|||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<div>
|
||||||
|
<div ref="lxHeader">
|
||||||
|
<lx-header icon="md-apps" :text="$route.meta.title" style="margin-bottom: 10px; border: 0px; margin-top: 15px">
|
||||||
|
<div slot="content">
|
||||||
|
</div>
|
||||||
|
</lx-header>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="decode">
|
||||||
|
<div>
|
||||||
|
<div>
|
||||||
|
<div>Code:</div>
|
||||||
|
<el-input placeholder="Please Input" style="width:100%" v-model="str"></el-input>
|
||||||
|
</div>
|
||||||
|
<div class="btn">
|
||||||
|
<el-button type="" @click="str='',recode=''">clear</el-button>
|
||||||
|
<el-button type="primary" @click="getCode">decode</el-button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<div>Result</div>
|
||||||
|
<div>
|
||||||
|
{{recode}}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import {
|
||||||
|
deCode
|
||||||
|
} from "@/api/order/index.js"
|
||||||
|
export default {
|
||||||
|
components: {},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
str:'',
|
||||||
|
recode:''
|
||||||
|
}
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.str = this.$route.query.code?this.$route.query.code:''
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
getCode(){
|
||||||
|
if(!this.str){
|
||||||
|
this.$Message.warning('Please Input Code')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
deCode({
|
||||||
|
str:this.str
|
||||||
|
}).then(res=>{
|
||||||
|
if(res){
|
||||||
|
this.recode = res
|
||||||
|
this.$Message.success('Success')
|
||||||
|
}else{
|
||||||
|
this.$Message.warning('Please Input Correct Code')
|
||||||
|
}
|
||||||
|
}).catch(err=>{
|
||||||
|
this.$Message.warning('Error')
|
||||||
|
})
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.decode{
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
&>div{
|
||||||
|
width:48%;
|
||||||
|
font-size: 18px;
|
||||||
|
}
|
||||||
|
.btn{
|
||||||
|
margin:20px;
|
||||||
|
margin-right:0;
|
||||||
|
text-align: right;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
Loading…
Reference in new issue