master
lion 9 months ago
parent ec3f9edf04
commit 71f6444a81

@ -55,6 +55,14 @@ export function destroy(params) {
})
}
export function deCode(data) {
return request({
method: "post",
url: "/api/web/cart/decode",
data
})
}

@ -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>

@ -71,6 +71,13 @@
</el-table-column>
</el-table-column>
</template>
<template v-slot:card>
<el-table-column align='left' label="Card" width="240" header-align="center">
<template slot-scope="scope">
<div style="color:blue;cursor: pointer;text-decoration: underline;" @click="toDecode(scope.row.card)">{{scope.row.card}}</div>
</template>
</el-table-column>
</template>
<template v-slot:btns>
<el-table-column align='center' fixed="right" label="Operate" width="120" header-align="center">
@ -245,7 +252,10 @@
console.log(error)
reject(error)
})
},
},
toDecode(code){
this.$router.push({ path: '/order/decode', query: { code: code } })
}
}
}
</script>

Loading…
Cancel
Save