Commit 8455fdac 8455fdac3305e3cd1f520e28a36cbc62d4bbd5b6 by zhanghao

commit

1 parent 4d2b26e7
......@@ -5,11 +5,14 @@
<el-table
:data="activityDialAwards"
border
highlight-current-row
style="width: 100%"
:header-cell-style="{background: 'deepskyblue', color: 'snow'}">
:header-cell-style="{background: 'deepskyblue', color: 'snow'}"
:default-sort = "{prop: 'startTime', order: 'ascending'}">
<el-table-column
prop="name"
label="奖品名称"
sortable
min-width="2">
</el-table-column>
<el-table-column
......@@ -45,11 +48,13 @@
<el-table-column
prop="startTime"
label="开始时间"
sortable
min-width="2">
</el-table-column>
<el-table-column
prop="endTime"
label="结束时间"
sortable
min-width="2">
</el-table-column>
<el-table-column
......@@ -256,7 +261,7 @@
data() {
return {
actid: this.$route.query.id,
huangjing: this.$route.query.huangjing,
huanjing: this.$route.query.huanjing,
activityDialAwards: [],
activityDialConfigs: [],
activityInfos: [],
......@@ -283,7 +288,7 @@
}
this.$http.get('/activity/router?'+this.$qs.stringify({
act_id: this.actid,
huanjing: this.huangjing
huanjing: this.huanjing
}),config).then((res)=>{
console.log(res.data)
this.activityDialAwards=res.data.activityDialAwards
......
<template xmlns:el-col="http://www.w3.org/1999/html">
<div>
<br/>
<span>redis缓存-活动配置奖品表(health_activity.tbl_activity_dial_award)</span>
<el-table
:data="redisActivityDialAwards"
border
highlight-current-row
style="width: 100%"
:header-cell-style="{background: 'deepskyblue', color: 'snow'}"
:default-sort = "{prop: 'startTime', order: 'ascending'}">
<el-table-column
prop="name"
label="奖品名称"
sortable
min-width="2">
</el-table-column>
<el-table-column
prop="awardTotalCount"
label="奖品数量"
min-width="1">
</el-table-column>
<el-table-column
prop="awardUseCount"
label="奖品使用数量"
min-width="1">
</el-table-column>
<el-table-column
prop="weight"
label="概率权重"
min-width="1">
</el-table-column>
<el-table-column
prop="userGroupType"
label="用户角色"
min-width="1">
</el-table-column>
<el-table-column
prop="userMaxCount"
label="实物互斥"
min-width="1">
</el-table-column>
<el-table-column
prop="coinRangeData"
label="健康币随机范围"
min-width="2">
</el-table-column>
<el-table-column
prop="startTime"
label="开始时间"
sortable
min-width="2">
</el-table-column>
<el-table-column
prop="endTime"
label="结束时间"
sortable
min-width="2">
</el-table-column>
<el-table-column
prop="extData"
label="地区配置"
min-width="4">
</el-table-column>
<el-table-column
prop="defAward"
label="默认奖品"
min-width="1">
</el-table-column>
</el-table>
</div>
</template>
<script>
export default {
data() {
return {
actid: this.$route.query.id,
huanjing: this.$route.query.huanjing,
redisActivityDialAwards: []
}
},
mounted() {
this.activity()
},
methods: {
activity() {
const loading = this.$loading({
lock: true,
text: 'Loading',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)'
});
let config = {
headers: {
'Content-Type': 'application/x-www-form-urlencoded'
}
}
this.$http.get('/activityRedis/router?'+this.$qs.stringify({
act_id: this.actid,
huanjing: this.huanjing
}),config).then((res)=>{
console.log(res.data)
this.redisActivityDialAwards=res.data.redisActivityDialAwards
loading.close();
}).catch(error=>{
console.log(error);
loading.close();
this.$message({
showClose: true,
message: '服务器处理失败,请核对参数!',
type: 'error'
});
})
}
}
}
</script>
......@@ -140,19 +140,19 @@
</el-form>
</el-col>
<el-col :span="8">
<el-form ref="queryPhoneCode" :model="queryPhoneCode" label-width="0px">
<el-form ref="activityConfig" :model="activityConfigRedis" label-width="0px">
<el-card class="darkred" shadow="always">
<div slot="header" class="clearfix">
<span>查询短信验证码</span>
<span>查询活动配置的redis</span>
</div>
<div class="text item">
<el-form-item>
<el-input placeholder="请输入手机号" v-model="queryPhoneCode.phone" clearable></el-input>
<el-input placeholder="请输入活动ID" v-model="activityConfigRedis.id" clearable></el-input>
</el-form-item>
<el-form-item>
<el-select v-model="queryPhoneCode.huanjing" placeholder="请选择执行环境">
<el-select v-model="activityConfigRedis.huanjing" placeholder="请选择执行环境">
<el-option
v-for="item in queryPhoneCodeOptions"
v-for="item in activityConfigRedisOptions"
:key="item.value"
:label="item.label"
:value="item.value">
......@@ -161,20 +161,11 @@
</el-form-item>
<div style="margin: 15px 0;"></div>
<el-form-item>
<el-button round @click="queryPhoneCodeSubmit">查询验证码</el-button>
<el-button round @click="activityConfigRedisSubmit">查询redis配置</el-button>
</el-form-item>
</div>
</el-card>
</el-form>
<el-dialog
title="短信验证码:"
:visible.sync="dialogQueryPhoneCode"
width="30%">
<span>{{myQueryPhoneCode}}</span>
<span slot="footer" class="dialog-footer">
<el-button type="primary" v-clipboard:copy="JSON.stringify(myQueryPhoneCode)" v-clipboard:success="onCopy" @click="dialogQueryPhoneCode = false">点击复制</el-button>
</span>
</el-dialog>
</el-col>
</el-row>
<el-row style="margin-bottom: 15px;">
......@@ -197,28 +188,19 @@
</el-form>
</el-col>
<el-col :span="8">
<el-form ref="createAPI" :model="createAPI" label-width="0px">
<el-form ref="queryPhoneCode" :model="queryPhoneCode" label-width="0px">
<el-card class="darkred" shadow="always">
<div slot="header" class="clearfix">
<span>生成接口请求参数</span>
<span>查询短信验证码</span>
</div>
<div class="text item">
<el-form-item>
<el-input placeholder="请输入method" v-model="createAPI.method" clearable></el-input>
</el-form-item>
<el-form-item>
<el-input placeholder="请输入biz_data" v-model="createAPI.biz_data" clearable></el-input>
</el-form-item>
<el-form-item>
<el-input placeholder="请输入uid" v-model="createAPI.uid" clearable></el-input>
</el-form-item>
<el-form-item>
<el-input placeholder="请输入token" v-model="createAPI.token" clearable></el-input>
<el-input placeholder="请输入手机号" v-model="queryPhoneCode.phone" clearable></el-input>
</el-form-item>
<el-form-item>
<el-select v-model="createAPI.huanjing" placeholder="请选择执行环境">
<el-select v-model="queryPhoneCode.huanjing" placeholder="请选择执行环境">
<el-option
v-for="item in createAPIoptions"
v-for="item in queryPhoneCodeOptions"
:key="item.value"
:label="item.label"
:value="item.value">
......@@ -227,18 +209,18 @@
</el-form-item>
<div style="margin: 15px 0;"></div>
<el-form-item>
<el-button round @click="createApi">生成参数</el-button>
<el-button round @click="queryPhoneCodeSubmit">查询验证码</el-button>
</el-form-item>
</div>
</el-card>
</el-form>
<el-dialog
title="接口请求参数:"
:visible.sync="dialogCreateApi"
title="短信验证码:"
:visible.sync="dialogQueryPhoneCode"
width="30%">
<span>{{myApi}}</span>
<span>{{myQueryPhoneCode}}</span>
<span slot="footer" class="dialog-footer">
<el-button type="primary" v-clipboard:copy="JSON.stringify(myApi)" v-clipboard:success="onCopy" @click="dialogCreateApi = false">点击复制</el-button>
<el-button type="primary" v-clipboard:copy="JSON.stringify(myQueryPhoneCode)" v-clipboard:success="onCopy" @click="dialogQueryPhoneCode = false">点击复制</el-button>
</span>
</el-dialog>
</el-col>
......@@ -291,6 +273,52 @@
</el-card>
</el-form>
</el-col>
<el-col :span="8">
<el-form ref="createAPI" :model="createAPI" label-width="0px">
<el-card class="darkred" shadow="always">
<div slot="header" class="clearfix">
<span>生成接口请求参数</span>
</div>
<div class="text item">
<el-form-item>
<el-input placeholder="请输入method" v-model="createAPI.method" clearable></el-input>
</el-form-item>
<el-form-item>
<el-input placeholder="请输入biz_data" v-model="createAPI.biz_data" clearable></el-input>
</el-form-item>
<el-form-item>
<el-input placeholder="请输入uid" v-model="createAPI.uid" clearable></el-input>
</el-form-item>
<el-form-item>
<el-input placeholder="请输入token" v-model="createAPI.token" clearable></el-input>
</el-form-item>
<el-form-item>
<el-select v-model="createAPI.huanjing" placeholder="请选择执行环境">
<el-option
v-for="item in createAPIoptions"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
</el-form-item>
<div style="margin: 15px 0;"></div>
<el-form-item>
<el-button round @click="createApi">生成参数</el-button>
</el-form-item>
</div>
</el-card>
</el-form>
<el-dialog
title="接口请求参数:"
:visible.sync="dialogCreateApi"
width="30%">
<span>{{myApi}}</span>
<span slot="footer" class="dialog-footer">
<el-button type="primary" v-clipboard:copy="JSON.stringify(myApi)" v-clipboard:success="onCopy" @click="dialogCreateApi = false">点击复制</el-button>
</span>
</el-dialog>
</el-col>
</el-row>
</div>
</template>
......@@ -400,6 +428,17 @@
value: 'release',
label: '线上环境'
}],
activityConfigRedis: {
id: '',
huanjing: []
},
activityConfigRedisOptions: [{
value: 'debug',
label: '测试环境'
}, {
value: 'release-test',
label: '线上环境'
}],
createUserInfo: {
phone: '',
agentPhone: ''
......@@ -604,7 +643,12 @@
// }
// })
const {href} = this.$router.resolve({ name:'activityConfig', query:
{id: this.activityConfig.id, huangjing: this.activityConfig.huanjing.toString()}})
{id: this.activityConfig.id, huanjing: this.activityConfig.huanjing.toString()}})
window.open(href, '_blank')
},
activityConfigRedisSubmit() {
const {href} = this.$router.resolve({ name:'activityConfigRedis', query:
{id: this.activityConfigRedis.id, huanjing: this.activityConfigRedis.huanjing.toString()}})
window.open(href, '_blank')
},
createApi() {
......
......@@ -3,6 +3,7 @@ import Router from 'vue-router'
import index from '@/page/index'
import tool from '@/page/tool'
import activityConfig from '@/page/activityConfig'
import activityConfigRedis from '@/page/activityConfigRedis'
import userInfo from '@/page/userInfo'
Vue.use(Router)
......@@ -39,6 +40,14 @@ export default new Router({
}
},
{
path: '/activityConfigRedis',
component: activityConfigRedis,
name: 'activityConfigRedis',
meta: {
title: '测试工具平台'
}
},
{
path: '/userInfo',
component: userInfo,
name: 'userInfo',
......