commit
Showing
4 changed files
with
112 additions
and
7 deletions
src/page/qrCode.vue
0 → 100644
| 1 | <template xmlns:el-col="http://www.w3.org/1999/html"> | ||
| 2 | <div> | ||
| 3 | <br/> | ||
| 4 | <vue-qr :text="vueQrText" :size="180"></vue-qr> | ||
| 5 | <br/> | ||
| 6 | <br/> | ||
| 7 | </div> | ||
| 8 | </template> | ||
| 9 | |||
| 10 | <script> | ||
| 11 | import vueQr from 'vue-qr' | ||
| 12 | export default { | ||
| 13 | components: { | ||
| 14 | vueQr | ||
| 15 | }, | ||
| 16 | data() { | ||
| 17 | return { | ||
| 18 | phone: this.$route.query.phone, | ||
| 19 | huanjing: this.$route.query.huanjing, | ||
| 20 | vueQrText: '' | ||
| 21 | } | ||
| 22 | }, | ||
| 23 | mounted() { | ||
| 24 | this.activity() | ||
| 25 | }, | ||
| 26 | methods: { | ||
| 27 | activity() { | ||
| 28 | const loading = this.$loading({ | ||
| 29 | lock: true, | ||
| 30 | text: '加载中...', | ||
| 31 | spinner: 'el-icon-loading', | ||
| 32 | background: 'rgba(0, 0, 0, 0.7)' | ||
| 33 | }); | ||
| 34 | let config = { | ||
| 35 | headers: { | ||
| 36 | 'Content-Type': 'application/x-www-form-urlencoded' | ||
| 37 | } | ||
| 38 | } | ||
| 39 | this.$http.get('/tool/queryQRCode?'+this.$qs.stringify({ | ||
| 40 | phone: this.phone, | ||
| 41 | type: this.huanjing | ||
| 42 | }),config).then((res)=>{ | ||
| 43 | console.log(res.data) | ||
| 44 | this.vueQrText=res.data.qrcode | ||
| 45 | loading.close(); | ||
| 46 | }).catch(error=>{ | ||
| 47 | console.log(error); | ||
| 48 | loading.close(); | ||
| 49 | this.$message({ | ||
| 50 | showClose: true, | ||
| 51 | message: '服务器处理失败,请核对参数!', | ||
| 52 | type: 'error' | ||
| 53 | }); | ||
| 54 | }) | ||
| 55 | } | ||
| 56 | } | ||
| 57 | } | ||
| 58 | </script> |
| ... | @@ -826,6 +826,34 @@ | ... | @@ -826,6 +826,34 @@ |
| 826 | </el-card> | 826 | </el-card> |
| 827 | </el-form> | 827 | </el-form> |
| 828 | </el-col> | 828 | </el-col> |
| 829 | <el-col :span="8"> | ||
| 830 | <el-form ref="queryQRCode" :model="queryQRCode" label-width="0px"> | ||
| 831 | <el-card class="darkred" shadow="always"> | ||
| 832 | <div slot="header" class="clearfix"> | ||
| 833 | <span>查询二维码</span> | ||
| 834 | </div> | ||
| 835 | <div class="text item"> | ||
| 836 | <el-form-item> | ||
| 837 | <el-input placeholder="代理人手机号" v-model="queryQRCode.agentPhone" clearable></el-input> | ||
| 838 | </el-form-item> | ||
| 839 | <el-form-item> | ||
| 840 | <el-select v-model="queryQRCode.huanjing" placeholder="请选择执行环境"> | ||
| 841 | <el-option | ||
| 842 | v-for="item in queryQRCodeOptions" | ||
| 843 | :key="item.value" | ||
| 844 | :label="item.label" | ||
| 845 | :value="item.value"> | ||
| 846 | </el-option> | ||
| 847 | </el-select> | ||
| 848 | </el-form-item> | ||
| 849 | <div style="margin: 15px 0;"></div> | ||
| 850 | <el-form-item> | ||
| 851 | <el-button round @click="queryQRCodeSubmit">查询二维码</el-button> | ||
| 852 | </el-form-item> | ||
| 853 | </div> | ||
| 854 | </el-card> | ||
| 855 | </el-form> | ||
| 856 | </el-col> | ||
| 829 | </el-row> | 857 | </el-row> |
| 830 | </div> | 858 | </div> |
| 831 | </template> | 859 | </template> |
| ... | @@ -993,6 +1021,17 @@ | ... | @@ -993,6 +1021,17 @@ |
| 993 | value: '1', | 1021 | value: '1', |
| 994 | label: '线上环境' | 1022 | label: '线上环境' |
| 995 | }], | 1023 | }], |
| 1024 | queryQRCode: { | ||
| 1025 | agentPhone: '', | ||
| 1026 | huanjing: [] | ||
| 1027 | }, | ||
| 1028 | queryQRCodeOptions: [{ | ||
| 1029 | value: '0', | ||
| 1030 | label: '测试环境' | ||
| 1031 | }, { | ||
| 1032 | value: '1', | ||
| 1033 | label: '线上环境' | ||
| 1034 | }], | ||
| 996 | queryPhoneCode: { | 1035 | queryPhoneCode: { |
| 997 | phone: '', | 1036 | phone: '', |
| 998 | huanjing: [] | 1037 | huanjing: [] |
| ... | @@ -1689,6 +1728,11 @@ | ... | @@ -1689,6 +1728,11 @@ |
| 1689 | {phone: this.queryUserInfo.agentPhone, huanjing: this.queryUserInfo.huanjing.toString()}}) | 1728 | {phone: this.queryUserInfo.agentPhone, huanjing: this.queryUserInfo.huanjing.toString()}}) |
| 1690 | window.open(href, '_blank') | 1729 | window.open(href, '_blank') |
| 1691 | }, | 1730 | }, |
| 1731 | queryQRCodeSubmit() { | ||
| 1732 | const {href} = this.$router.resolve({ name:'qrCode', query: | ||
| 1733 | {phone: this.queryQRCode.agentPhone, huanjing: this.queryQRCode.huanjing.toString()}}) | ||
| 1734 | window.open(href, '_blank') | ||
| 1735 | }, | ||
| 1692 | callLinuxCommandSubmit() { | 1736 | callLinuxCommandSubmit() { |
| 1693 | const {href} = this.$router.resolve({ name:'callLinuxCommand', query: | 1737 | const {href} = this.$router.resolve({ name:'callLinuxCommand', query: |
| 1694 | {size: this.callLinuxCommand.size, huanjing: this.callLinuxCommand.huanjing.toString()}}) | 1738 | {size: this.callLinuxCommand.size, huanjing: this.callLinuxCommand.huanjing.toString()}}) | ... | ... |
| ... | @@ -28,7 +28,6 @@ | ... | @@ -28,7 +28,6 @@ |
| 28 | min-width="1"> | 28 | min-width="1"> |
| 29 | </el-table-column> | 29 | </el-table-column> |
| 30 | </el-table> | 30 | </el-table> |
| 31 | <vue-qr :text="vueQrText" :size="180"></vue-qr> | ||
| 32 | <br/> | 31 | <br/> |
| 33 | <br/> | 32 | <br/> |
| 34 | <span>激活此用户的代理人(tbl_agent_properties)</span> | 33 | <span>激活此用户的代理人(tbl_agent_properties)</span> |
| ... | @@ -214,11 +213,7 @@ | ... | @@ -214,11 +213,7 @@ |
| 214 | </template> | 213 | </template> |
| 215 | 214 | ||
| 216 | <script> | 215 | <script> |
| 217 | import vueQr from 'vue-qr' | ||
| 218 | export default { | 216 | export default { |
| 219 | components: { | ||
| 220 | vueQr | ||
| 221 | }, | ||
| 222 | data() { | 217 | data() { |
| 223 | return { | 218 | return { |
| 224 | phone: this.$route.query.phone, | 219 | phone: this.$route.query.phone, |
| ... | @@ -227,8 +222,7 @@ | ... | @@ -227,8 +222,7 @@ |
| 227 | tblAgentProperties: [], | 222 | tblAgentProperties: [], |
| 228 | tblAgentCustomers: [], | 223 | tblAgentCustomers: [], |
| 229 | tblAgentCustomersAll: [], | 224 | tblAgentCustomersAll: [], |
| 230 | tblJiHuoAgentProperties: [], | 225 | tblJiHuoAgentProperties: [] |
| 231 | vueQrText: 'Zn2YEd1Xq/qHH8B3j0KxsMSfsA55IsYY+lbrIdIZS62EHl45vYrVcfYejpjPwpEoFtO+yU66GxBGrU8lwJ3WmMzMzziUWIVeg75IYjzBIompmi/uFOHKxCTgC/rjtWW6/o4SFl0tWbU8M2RjLB1bYWJdf7PONFQeGOQ8gttIeTHPeOIROOWbLDcoPqzLWcnDaYkAM8g+fPvF9xMex32Rxg==' | ||
| 232 | } | 226 | } |
| 233 | }, | 227 | }, |
| 234 | mounted() { | 228 | mounted() { | ... | ... |
| ... | @@ -33,6 +33,7 @@ import selectActOnline from '@/page/selectActOnline' | ... | @@ -33,6 +33,7 @@ import selectActOnline from '@/page/selectActOnline' |
| 33 | import selectActOnlineShenZhen from '@/page/selectActOnlineShenZhen' | 33 | import selectActOnlineShenZhen from '@/page/selectActOnlineShenZhen' |
| 34 | import toolWaiBao from '@/page/toolWaiBao' | 34 | import toolWaiBao from '@/page/toolWaiBao' |
| 35 | import select20Act from '@/page/select20Act' | 35 | import select20Act from '@/page/select20Act' |
| 36 | import qrCode from '@/page/qrCode' | ||
| 36 | 37 | ||
| 37 | Vue.use(Router) | 38 | Vue.use(Router) |
| 38 | 39 | ||
| ... | @@ -105,6 +106,14 @@ export default new Router({ | ... | @@ -105,6 +106,14 @@ export default new Router({ |
| 105 | } | 106 | } |
| 106 | }, | 107 | }, |
| 107 | { | 108 | { |
| 109 | path: '/qrCode', | ||
| 110 | component: qrCode, | ||
| 111 | name: 'qrCode', | ||
| 112 | meta: { | ||
| 113 | title: '测试工具平台' | ||
| 114 | } | ||
| 115 | }, | ||
| 116 | { | ||
| 108 | path: '/callLinuxCommand', | 117 | path: '/callLinuxCommand', |
| 109 | component: callLinuxCommand, | 118 | component: callLinuxCommand, |
| 110 | name: 'callLinuxCommand', | 119 | name: 'callLinuxCommand', | ... | ... |
-
Please register or sign in to post a comment