commit
Showing
3 changed files
with
157 additions
and
1 deletions
src/page/testHouLi.vue
0 → 100644
| 1 | <template xmlns:el-col="http://www.w3.org/1999/html"> | ||
| 2 | <div> | ||
| 3 | <br/> | ||
| 4 | <span>自动化测试-吼礼活动</span> | ||
| 5 | <el-table | ||
| 6 | :data="userActivityAward" | ||
| 7 | border | ||
| 8 | style="width: 100%" | ||
| 9 | :header-cell-style="{background: 'deepskyblue', color: 'snow'}"> | ||
| 10 | <el-table-column | ||
| 11 | prop="awardName" | ||
| 12 | label="奖品名称" | ||
| 13 | min-width="2"> | ||
| 14 | </el-table-column> | ||
| 15 | <el-table-column | ||
| 16 | prop="awardWorth" | ||
| 17 | label="奖品价值" | ||
| 18 | min-width="1"> | ||
| 19 | </el-table-column> | ||
| 20 | <el-table-column | ||
| 21 | prop="createTime" | ||
| 22 | label="创建时间" | ||
| 23 | min-width="2"> | ||
| 24 | </el-table-column> | ||
| 25 | </el-table> | ||
| 26 | </div> | ||
| 27 | </template> | ||
| 28 | |||
| 29 | <script> | ||
| 30 | export default { | ||
| 31 | data() { | ||
| 32 | return { | ||
| 33 | actid: this.$route.query.actid, | ||
| 34 | phone: this.$route.query.phone, | ||
| 35 | userActivityAward: [] | ||
| 36 | } | ||
| 37 | }, | ||
| 38 | mounted() { | ||
| 39 | this.activity() | ||
| 40 | }, | ||
| 41 | methods: { | ||
| 42 | activity() { | ||
| 43 | const loading = this.$loading({ | ||
| 44 | lock: true, | ||
| 45 | text: '加载中...', | ||
| 46 | spinner: 'el-icon-loading', | ||
| 47 | background: 'rgba(0, 0, 0, 0.7)' | ||
| 48 | }); | ||
| 49 | let config = { | ||
| 50 | headers: { | ||
| 51 | 'Content-Type': 'application/x-www-form-urlencoded' | ||
| 52 | } | ||
| 53 | } | ||
| 54 | this.$http.get('/tool/testHouLiAward?'+this.$qs.stringify({ | ||
| 55 | actid: this.actid, | ||
| 56 | phone: this.phone | ||
| 57 | }),config).then((res)=>{ | ||
| 58 | console.log(res.data) | ||
| 59 | this.userActivityAward=res.data.userActivityAward | ||
| 60 | loading.close(); | ||
| 61 | }).catch(error=>{ | ||
| 62 | console.log(error); | ||
| 63 | loading.close(); | ||
| 64 | this.$message({ | ||
| 65 | showClose: true, | ||
| 66 | message: '服务器处理失败,请核对参数!', | ||
| 67 | type: 'error' | ||
| 68 | }); | ||
| 69 | }) | ||
| 70 | } | ||
| 71 | } | ||
| 72 | } | ||
| 73 | </script> |
| ... | @@ -699,6 +699,40 @@ | ... | @@ -699,6 +699,40 @@ |
| 699 | </span> | 699 | </span> |
| 700 | </el-dialog> | 700 | </el-dialog> |
| 701 | </el-col> | 701 | </el-col> |
| 702 | <el-col :span="8"> | ||
| 703 | <el-form ref="testHouLi" :model="testHouLi" label-width="0px"> | ||
| 704 | <el-card class="darkred" shadow="always"> | ||
| 705 | <div slot="header" class="clearfix"> | ||
| 706 | <span>自动化测试-吼礼活动</span> | ||
| 707 | </div> | ||
| 708 | <div class="text item"> | ||
| 709 | <el-form-item> | ||
| 710 | <el-input placeholder="请输入活动ID" v-model="testHouLi.actid" clearable></el-input> | ||
| 711 | </el-form-item> | ||
| 712 | <div style="margin: 15px 0;"></div> | ||
| 713 | <el-form-item> | ||
| 714 | <el-input placeholder="请输入吼礼关键词" v-model="testHouLi.keyword" clearable></el-input> | ||
| 715 | </el-form-item> | ||
| 716 | <div style="margin: 15px 0;"></div> | ||
| 717 | <el-form-item> | ||
| 718 | <el-input placeholder="请输入手机号" v-model="testHouLi.phone" clearable></el-input> | ||
| 719 | </el-form-item> | ||
| 720 | <div style="margin: 15px 0;"></div> | ||
| 721 | <el-form-item> | ||
| 722 | <el-tooltip placement="right"> | ||
| 723 | <div slot="content"> | ||
| 724 | 测试步骤:<br/> | ||
| 725 | 1、自动报名活动<br/> | ||
| 726 | 2、说出密语口令<br/> | ||
| 727 | 3、查询中奖列表接口<br/> | ||
| 728 | </div> | ||
| 729 | <el-button round @click="testHouLiSubmit">提交测试</el-button> | ||
| 730 | </el-tooltip> | ||
| 731 | </el-form-item> | ||
| 732 | </div> | ||
| 733 | </el-card> | ||
| 734 | </el-form> | ||
| 735 | </el-col> | ||
| 702 | </el-row> | 736 | </el-row> |
| 703 | </div> | 737 | </div> |
| 704 | </template> | 738 | </template> |
| ... | @@ -1026,7 +1060,12 @@ | ... | @@ -1026,7 +1060,12 @@ |
| 1026 | },{ | 1060 | },{ |
| 1027 | value: '4', | 1061 | value: '4', |
| 1028 | label: '工号冻结' | 1062 | label: '工号冻结' |
| 1029 | }] | 1063 | }], |
| 1064 | testHouLi: { | ||
| 1065 | actid: '', | ||
| 1066 | keyword: '', | ||
| 1067 | phone: '' | ||
| 1068 | }, | ||
| 1030 | // activityConfigRules: { | 1069 | // activityConfigRules: { |
| 1031 | // id: [ | 1070 | // id: [ |
| 1032 | // { required: true, message: '请输入活动ID', trigger: 'blur' } | 1071 | // { required: true, message: '请输入活动ID', trigger: 'blur' } |
| ... | @@ -1787,6 +1826,41 @@ | ... | @@ -1787,6 +1826,41 @@ |
| 1787 | }).catch(error=>{ | 1826 | }).catch(error=>{ |
| 1788 | console.log(error); | 1827 | console.log(error); |
| 1789 | }) | 1828 | }) |
| 1829 | }, | ||
| 1830 | testHouLiSubmit() { | ||
| 1831 | const loading = this.$loading({ | ||
| 1832 | lock: true, | ||
| 1833 | text: '加载中...', | ||
| 1834 | spinner: 'el-icon-loading', | ||
| 1835 | background: 'rgba(0, 0, 0, 0.7)' | ||
| 1836 | }); | ||
| 1837 | let config = { | ||
| 1838 | headers: { | ||
| 1839 | 'Content-Type': 'application/x-www-form-urlencoded' | ||
| 1840 | } | ||
| 1841 | } | ||
| 1842 | this.$http.get('/tool/testHouLi?'+this.$qs.stringify({ | ||
| 1843 | actid: this.testHouLi.actid, | ||
| 1844 | keyword: this.testHouLi.keyword, | ||
| 1845 | phone: this.testHouLi.phone | ||
| 1846 | }),config).then((res)=>{ | ||
| 1847 | console.log(res); | ||
| 1848 | loading.close(); | ||
| 1849 | if(res.data=='success') { | ||
| 1850 | const {href} = this.$router.resolve({ name:'testHouLi', query: | ||
| 1851 | {actid: this.testHouLi.actid, phone: this.testHouLi.phone}}) | ||
| 1852 | window.open(href, '_blank') | ||
| 1853 | } else { | ||
| 1854 | this.$message({ | ||
| 1855 | showClose: true, | ||
| 1856 | message: res.data, | ||
| 1857 | type: 'error' | ||
| 1858 | }); | ||
| 1859 | } | ||
| 1860 | }).catch(error=>{ | ||
| 1861 | console.log(error); | ||
| 1862 | loading.close(); | ||
| 1863 | }) | ||
| 1790 | } | 1864 | } |
| 1791 | } | 1865 | } |
| 1792 | } | 1866 | } | ... | ... |
| ... | @@ -20,6 +20,7 @@ import queryProvince from '@/page/queryProvince' | ... | @@ -20,6 +20,7 @@ import queryProvince from '@/page/queryProvince' |
| 20 | import selectActStart from '@/page/selectActStart' | 20 | import selectActStart from '@/page/selectActStart' |
| 21 | import androidCode from '@/page/androidCode' | 21 | import androidCode from '@/page/androidCode' |
| 22 | import queryTjAccount from '@/page/queryTjAccount' | 22 | import queryTjAccount from '@/page/queryTjAccount' |
| 23 | import testHouLi from '@/page/testHouLi' | ||
| 23 | 24 | ||
| 24 | Vue.use(Router) | 25 | Vue.use(Router) |
| 25 | 26 | ||
| ... | @@ -156,6 +157,14 @@ export default new Router({ | ... | @@ -156,6 +157,14 @@ export default new Router({ |
| 156 | meta: { | 157 | meta: { |
| 157 | title: '测试工具平台' | 158 | title: '测试工具平台' |
| 158 | } | 159 | } |
| 160 | }, | ||
| 161 | { | ||
| 162 | path: '/testHouLi', | ||
| 163 | component: testHouLi, | ||
| 164 | name: 'testHouLi', | ||
| 165 | meta: { | ||
| 166 | title: '测试工具平台' | ||
| 167 | } | ||
| 159 | } | 168 | } |
| 160 | ] | 169 | ] |
| 161 | }, | 170 | }, | ... | ... |
-
Please register or sign in to post a comment