Commit 8788e509 8788e509fd4f0d0b45c97429c77482e64d7b6378 by zhanghao

commit

1 parent 9f67f62b
<template xmlns:el-col="http://www.w3.org/1999/html">
<div>
<json-viewer
:value="jsonData"
:expand-depth=10
copyable></json-viewer>
</div>
</template>
<script>
export default {
data() {
return {
actid: this.$route.query.actid,
keyword: this.$route.query.keyword,
phone: this.$route.query.phone,
code: this.$route.query.code,
type: this.$route.query.type,
jsonData: ''
}
},
mounted() {
this.activity()
},
methods: {
activity() {
const loading = this.$loading({
lock: true,
text: '加载中...',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)'
});
let config = {
headers: {
'Content-Type': 'application/x-www-form-urlencoded'
}
}
this.$http.get('/tool2/chouJiang?'+this.$qs.stringify({
actid: this.actid,
keyword: this.keyword,
phone: this.phone,
code: this.code,
type: this.type
}),config).then((res)=>{
console.log(res.data)
this.jsonData=res.data
loading.close();
}).catch(error=>{
console.log(error);
loading.close();
this.$message({
showClose: true,
message: '服务器处理失败,请核对参数!',
type: 'error'
});
})
}
}
}
</script>
......@@ -129,6 +129,42 @@
</el-card>
</el-form>
</el-col>
<el-col :span="8">
<el-form ref="chouJiang" :model="chouJiang" label-width="0px">
<el-card class="darkred" shadow="always">
<div slot="header" class="clearfix">
<span>AI2.0抽奖</span>
</div>
<div class="text item">
<el-form-item>
<el-input placeholder="请输入活动ID" v-model="chouJiang.actid" clearable></el-input>
</el-form-item>
<el-form-item>
<el-input placeholder="请输入吼礼关键词,普通抽奖不需要输入" v-model="chouJiang.keyword" clearable></el-input>
</el-form-item>
<el-form-item>
<el-input placeholder="请输入手机号" v-model="chouJiang.phone" clearable></el-input>
</el-form-item>
<el-form-item>
<el-input placeholder="请输入手机登录验证码" v-model="chouJiang.code" clearable></el-input>
</el-form-item>
<el-form-item>
<el-select v-model="chouJiang.type" placeholder="请选择抽奖接口">
<el-option
v-for="item in chouJiangOptions"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
</el-form-item>
<el-form-item>
<el-button round @click="chouJiangSubmit">抽奖</el-button>
</el-form-item>
</div>
</el-card>
</el-form>
</el-col>
</el-row>
</div>
</template>
......@@ -252,6 +288,20 @@
}, {
value: 'recommend',
label: 'recommend'
}],
chouJiang: {
actid: '',
keyword: '',
phone: '',
code: '',
type: []
},
chouJiangOptions: [{
value: '1',
label: '普通抽奖接口'
},{
value: '2',
label: '吼礼抽奖接口'
}]
}
},
......@@ -407,7 +457,12 @@
type: 'error'
});
})
}
},
chouJiangSubmit() {
const {href} = this.$router.resolve({ name:'chouJiang', query:
{actid: this.chouJiang.actid, keyword: this.chouJiang.keyword, phone: this.chouJiang.phone, code: this.chouJiang.code, type: this.chouJiang.type.toString()}})
window.open(href, '_blank')
},
}
}
</script>
......
......@@ -21,6 +21,7 @@ import selectActStart from '@/page/selectActStart'
import androidCode from '@/page/androidCode'
import queryTjAccount from '@/page/queryTjAccount'
import testHouLi from '@/page/testHouLi'
import chouJiang from '@/page/chouJiang'
Vue.use(Router)
......@@ -199,6 +200,14 @@ export default new Router({
meta: {
title: '测试工具平台'
}
},
{
path: '/chouJiang',
component: chouJiang,
name: 'chouJiang',
meta: {
title: '测试工具平台'
}
}
]
})
......