commit
Showing
4 changed files
with
214 additions
and
38 deletions
| ... | @@ -5,11 +5,14 @@ | ... | @@ -5,11 +5,14 @@ |
| 5 | <el-table | 5 | <el-table |
| 6 | :data="activityDialAwards" | 6 | :data="activityDialAwards" |
| 7 | border | 7 | border |
| 8 | highlight-current-row | ||
| 8 | style="width: 100%" | 9 | style="width: 100%" |
| 9 | :header-cell-style="{background: 'deepskyblue', color: 'snow'}"> | 10 | :header-cell-style="{background: 'deepskyblue', color: 'snow'}" |
| 11 | :default-sort = "{prop: 'startTime', order: 'ascending'}"> | ||
| 10 | <el-table-column | 12 | <el-table-column |
| 11 | prop="name" | 13 | prop="name" |
| 12 | label="奖品名称" | 14 | label="奖品名称" |
| 15 | sortable | ||
| 13 | min-width="2"> | 16 | min-width="2"> |
| 14 | </el-table-column> | 17 | </el-table-column> |
| 15 | <el-table-column | 18 | <el-table-column |
| ... | @@ -45,11 +48,13 @@ | ... | @@ -45,11 +48,13 @@ |
| 45 | <el-table-column | 48 | <el-table-column |
| 46 | prop="startTime" | 49 | prop="startTime" |
| 47 | label="开始时间" | 50 | label="开始时间" |
| 51 | sortable | ||
| 48 | min-width="2"> | 52 | min-width="2"> |
| 49 | </el-table-column> | 53 | </el-table-column> |
| 50 | <el-table-column | 54 | <el-table-column |
| 51 | prop="endTime" | 55 | prop="endTime" |
| 52 | label="结束时间" | 56 | label="结束时间" |
| 57 | sortable | ||
| 53 | min-width="2"> | 58 | min-width="2"> |
| 54 | </el-table-column> | 59 | </el-table-column> |
| 55 | <el-table-column | 60 | <el-table-column |
| ... | @@ -256,7 +261,7 @@ | ... | @@ -256,7 +261,7 @@ |
| 256 | data() { | 261 | data() { |
| 257 | return { | 262 | return { |
| 258 | actid: this.$route.query.id, | 263 | actid: this.$route.query.id, |
| 259 | huangjing: this.$route.query.huangjing, | 264 | huanjing: this.$route.query.huanjing, |
| 260 | activityDialAwards: [], | 265 | activityDialAwards: [], |
| 261 | activityDialConfigs: [], | 266 | activityDialConfigs: [], |
| 262 | activityInfos: [], | 267 | activityInfos: [], |
| ... | @@ -283,7 +288,7 @@ | ... | @@ -283,7 +288,7 @@ |
| 283 | } | 288 | } |
| 284 | this.$http.get('/activity/router?'+this.$qs.stringify({ | 289 | this.$http.get('/activity/router?'+this.$qs.stringify({ |
| 285 | act_id: this.actid, | 290 | act_id: this.actid, |
| 286 | huanjing: this.huangjing | 291 | huanjing: this.huanjing |
| 287 | }),config).then((res)=>{ | 292 | }),config).then((res)=>{ |
| 288 | console.log(res.data) | 293 | console.log(res.data) |
| 289 | this.activityDialAwards=res.data.activityDialAwards | 294 | this.activityDialAwards=res.data.activityDialAwards | ... | ... |
src/page/activityConfigRedis.vue
0 → 100644
| 1 | <template xmlns:el-col="http://www.w3.org/1999/html"> | ||
| 2 | <div> | ||
| 3 | <br/> | ||
| 4 | <span>redis缓存-活动配置奖品表(health_activity.tbl_activity_dial_award)</span> | ||
| 5 | <el-table | ||
| 6 | :data="redisActivityDialAwards" | ||
| 7 | border | ||
| 8 | highlight-current-row | ||
| 9 | style="width: 100%" | ||
| 10 | :header-cell-style="{background: 'deepskyblue', color: 'snow'}" | ||
| 11 | :default-sort = "{prop: 'startTime', order: 'ascending'}"> | ||
| 12 | <el-table-column | ||
| 13 | prop="name" | ||
| 14 | label="奖品名称" | ||
| 15 | sortable | ||
| 16 | min-width="2"> | ||
| 17 | </el-table-column> | ||
| 18 | <el-table-column | ||
| 19 | prop="awardTotalCount" | ||
| 20 | label="奖品数量" | ||
| 21 | min-width="1"> | ||
| 22 | </el-table-column> | ||
| 23 | <el-table-column | ||
| 24 | prop="awardUseCount" | ||
| 25 | label="奖品使用数量" | ||
| 26 | min-width="1"> | ||
| 27 | </el-table-column> | ||
| 28 | <el-table-column | ||
| 29 | prop="weight" | ||
| 30 | label="概率权重" | ||
| 31 | min-width="1"> | ||
| 32 | </el-table-column> | ||
| 33 | <el-table-column | ||
| 34 | prop="userGroupType" | ||
| 35 | label="用户角色" | ||
| 36 | min-width="1"> | ||
| 37 | </el-table-column> | ||
| 38 | <el-table-column | ||
| 39 | prop="userMaxCount" | ||
| 40 | label="实物互斥" | ||
| 41 | min-width="1"> | ||
| 42 | </el-table-column> | ||
| 43 | <el-table-column | ||
| 44 | prop="coinRangeData" | ||
| 45 | label="健康币随机范围" | ||
| 46 | min-width="2"> | ||
| 47 | </el-table-column> | ||
| 48 | <el-table-column | ||
| 49 | prop="startTime" | ||
| 50 | label="开始时间" | ||
| 51 | sortable | ||
| 52 | min-width="2"> | ||
| 53 | </el-table-column> | ||
| 54 | <el-table-column | ||
| 55 | prop="endTime" | ||
| 56 | label="结束时间" | ||
| 57 | sortable | ||
| 58 | min-width="2"> | ||
| 59 | </el-table-column> | ||
| 60 | <el-table-column | ||
| 61 | prop="extData" | ||
| 62 | label="地区配置" | ||
| 63 | min-width="4"> | ||
| 64 | </el-table-column> | ||
| 65 | <el-table-column | ||
| 66 | prop="defAward" | ||
| 67 | label="默认奖品" | ||
| 68 | min-width="1"> | ||
| 69 | </el-table-column> | ||
| 70 | </el-table> | ||
| 71 | </div> | ||
| 72 | </template> | ||
| 73 | |||
| 74 | <script> | ||
| 75 | export default { | ||
| 76 | data() { | ||
| 77 | return { | ||
| 78 | actid: this.$route.query.id, | ||
| 79 | huanjing: this.$route.query.huanjing, | ||
| 80 | redisActivityDialAwards: [] | ||
| 81 | } | ||
| 82 | }, | ||
| 83 | mounted() { | ||
| 84 | this.activity() | ||
| 85 | }, | ||
| 86 | methods: { | ||
| 87 | activity() { | ||
| 88 | const loading = this.$loading({ | ||
| 89 | lock: true, | ||
| 90 | text: 'Loading', | ||
| 91 | spinner: 'el-icon-loading', | ||
| 92 | background: 'rgba(0, 0, 0, 0.7)' | ||
| 93 | }); | ||
| 94 | let config = { | ||
| 95 | headers: { | ||
| 96 | 'Content-Type': 'application/x-www-form-urlencoded' | ||
| 97 | } | ||
| 98 | } | ||
| 99 | this.$http.get('/activityRedis/router?'+this.$qs.stringify({ | ||
| 100 | act_id: this.actid, | ||
| 101 | huanjing: this.huanjing | ||
| 102 | }),config).then((res)=>{ | ||
| 103 | console.log(res.data) | ||
| 104 | this.redisActivityDialAwards=res.data.redisActivityDialAwards | ||
| 105 | loading.close(); | ||
| 106 | }).catch(error=>{ | ||
| 107 | console.log(error); | ||
| 108 | loading.close(); | ||
| 109 | this.$message({ | ||
| 110 | showClose: true, | ||
| 111 | message: '服务器处理失败,请核对参数!', | ||
| 112 | type: 'error' | ||
| 113 | }); | ||
| 114 | }) | ||
| 115 | } | ||
| 116 | } | ||
| 117 | } | ||
| 118 | </script> |
| ... | @@ -140,19 +140,19 @@ | ... | @@ -140,19 +140,19 @@ |
| 140 | </el-form> | 140 | </el-form> |
| 141 | </el-col> | 141 | </el-col> |
| 142 | <el-col :span="8"> | 142 | <el-col :span="8"> |
| 143 | <el-form ref="queryPhoneCode" :model="queryPhoneCode" label-width="0px"> | 143 | <el-form ref="activityConfig" :model="activityConfigRedis" label-width="0px"> |
| 144 | <el-card class="darkred" shadow="always"> | 144 | <el-card class="darkred" shadow="always"> |
| 145 | <div slot="header" class="clearfix"> | 145 | <div slot="header" class="clearfix"> |
| 146 | <span>查询短信验证码</span> | 146 | <span>查询活动配置的redis</span> |
| 147 | </div> | 147 | </div> |
| 148 | <div class="text item"> | 148 | <div class="text item"> |
| 149 | <el-form-item> | 149 | <el-form-item> |
| 150 | <el-input placeholder="请输入手机号" v-model="queryPhoneCode.phone" clearable></el-input> | 150 | <el-input placeholder="请输入活动ID" v-model="activityConfigRedis.id" clearable></el-input> |
| 151 | </el-form-item> | 151 | </el-form-item> |
| 152 | <el-form-item> | 152 | <el-form-item> |
| 153 | <el-select v-model="queryPhoneCode.huanjing" placeholder="请选择执行环境"> | 153 | <el-select v-model="activityConfigRedis.huanjing" placeholder="请选择执行环境"> |
| 154 | <el-option | 154 | <el-option |
| 155 | v-for="item in queryPhoneCodeOptions" | 155 | v-for="item in activityConfigRedisOptions" |
| 156 | :key="item.value" | 156 | :key="item.value" |
| 157 | :label="item.label" | 157 | :label="item.label" |
| 158 | :value="item.value"> | 158 | :value="item.value"> |
| ... | @@ -161,20 +161,11 @@ | ... | @@ -161,20 +161,11 @@ |
| 161 | </el-form-item> | 161 | </el-form-item> |
| 162 | <div style="margin: 15px 0;"></div> | 162 | <div style="margin: 15px 0;"></div> |
| 163 | <el-form-item> | 163 | <el-form-item> |
| 164 | <el-button round @click="queryPhoneCodeSubmit">查询验证码</el-button> | 164 | <el-button round @click="activityConfigRedisSubmit">查询redis配置</el-button> |
| 165 | </el-form-item> | 165 | </el-form-item> |
| 166 | </div> | 166 | </div> |
| 167 | </el-card> | 167 | </el-card> |
| 168 | </el-form> | 168 | </el-form> |
| 169 | <el-dialog | ||
| 170 | title="短信验证码:" | ||
| 171 | :visible.sync="dialogQueryPhoneCode" | ||
| 172 | width="30%"> | ||
| 173 | <span>{{myQueryPhoneCode}}</span> | ||
| 174 | <span slot="footer" class="dialog-footer"> | ||
| 175 | <el-button type="primary" v-clipboard:copy="JSON.stringify(myQueryPhoneCode)" v-clipboard:success="onCopy" @click="dialogQueryPhoneCode = false">点击复制</el-button> | ||
| 176 | </span> | ||
| 177 | </el-dialog> | ||
| 178 | </el-col> | 169 | </el-col> |
| 179 | </el-row> | 170 | </el-row> |
| 180 | <el-row style="margin-bottom: 15px;"> | 171 | <el-row style="margin-bottom: 15px;"> |
| ... | @@ -197,28 +188,19 @@ | ... | @@ -197,28 +188,19 @@ |
| 197 | </el-form> | 188 | </el-form> |
| 198 | </el-col> | 189 | </el-col> |
| 199 | <el-col :span="8"> | 190 | <el-col :span="8"> |
| 200 | <el-form ref="createAPI" :model="createAPI" label-width="0px"> | 191 | <el-form ref="queryPhoneCode" :model="queryPhoneCode" label-width="0px"> |
| 201 | <el-card class="darkred" shadow="always"> | 192 | <el-card class="darkred" shadow="always"> |
| 202 | <div slot="header" class="clearfix"> | 193 | <div slot="header" class="clearfix"> |
| 203 | <span>生成接口请求参数</span> | 194 | <span>查询短信验证码</span> |
| 204 | </div> | 195 | </div> |
| 205 | <div class="text item"> | 196 | <div class="text item"> |
| 206 | <el-form-item> | 197 | <el-form-item> |
| 207 | <el-input placeholder="请输入method" v-model="createAPI.method" clearable></el-input> | 198 | <el-input placeholder="请输入手机号" v-model="queryPhoneCode.phone" clearable></el-input> |
| 208 | </el-form-item> | ||
| 209 | <el-form-item> | ||
| 210 | <el-input placeholder="请输入biz_data" v-model="createAPI.biz_data" clearable></el-input> | ||
| 211 | </el-form-item> | ||
| 212 | <el-form-item> | ||
| 213 | <el-input placeholder="请输入uid" v-model="createAPI.uid" clearable></el-input> | ||
| 214 | </el-form-item> | ||
| 215 | <el-form-item> | ||
| 216 | <el-input placeholder="请输入token" v-model="createAPI.token" clearable></el-input> | ||
| 217 | </el-form-item> | 199 | </el-form-item> |
| 218 | <el-form-item> | 200 | <el-form-item> |
| 219 | <el-select v-model="createAPI.huanjing" placeholder="请选择执行环境"> | 201 | <el-select v-model="queryPhoneCode.huanjing" placeholder="请选择执行环境"> |
| 220 | <el-option | 202 | <el-option |
| 221 | v-for="item in createAPIoptions" | 203 | v-for="item in queryPhoneCodeOptions" |
| 222 | :key="item.value" | 204 | :key="item.value" |
| 223 | :label="item.label" | 205 | :label="item.label" |
| 224 | :value="item.value"> | 206 | :value="item.value"> |
| ... | @@ -227,18 +209,18 @@ | ... | @@ -227,18 +209,18 @@ |
| 227 | </el-form-item> | 209 | </el-form-item> |
| 228 | <div style="margin: 15px 0;"></div> | 210 | <div style="margin: 15px 0;"></div> |
| 229 | <el-form-item> | 211 | <el-form-item> |
| 230 | <el-button round @click="createApi">生成参数</el-button> | 212 | <el-button round @click="queryPhoneCodeSubmit">查询验证码</el-button> |
| 231 | </el-form-item> | 213 | </el-form-item> |
| 232 | </div> | 214 | </div> |
| 233 | </el-card> | 215 | </el-card> |
| 234 | </el-form> | 216 | </el-form> |
| 235 | <el-dialog | 217 | <el-dialog |
| 236 | title="接口请求参数:" | 218 | title="短信验证码:" |
| 237 | :visible.sync="dialogCreateApi" | 219 | :visible.sync="dialogQueryPhoneCode" |
| 238 | width="30%"> | 220 | width="30%"> |
| 239 | <span>{{myApi}}</span> | 221 | <span>{{myQueryPhoneCode}}</span> |
| 240 | <span slot="footer" class="dialog-footer"> | 222 | <span slot="footer" class="dialog-footer"> |
| 241 | <el-button type="primary" v-clipboard:copy="JSON.stringify(myApi)" v-clipboard:success="onCopy" @click="dialogCreateApi = false">点击复制</el-button> | 223 | <el-button type="primary" v-clipboard:copy="JSON.stringify(myQueryPhoneCode)" v-clipboard:success="onCopy" @click="dialogQueryPhoneCode = false">点击复制</el-button> |
| 242 | </span> | 224 | </span> |
| 243 | </el-dialog> | 225 | </el-dialog> |
| 244 | </el-col> | 226 | </el-col> |
| ... | @@ -291,6 +273,52 @@ | ... | @@ -291,6 +273,52 @@ |
| 291 | </el-card> | 273 | </el-card> |
| 292 | </el-form> | 274 | </el-form> |
| 293 | </el-col> | 275 | </el-col> |
| 276 | <el-col :span="8"> | ||
| 277 | <el-form ref="createAPI" :model="createAPI" label-width="0px"> | ||
| 278 | <el-card class="darkred" shadow="always"> | ||
| 279 | <div slot="header" class="clearfix"> | ||
| 280 | <span>生成接口请求参数</span> | ||
| 281 | </div> | ||
| 282 | <div class="text item"> | ||
| 283 | <el-form-item> | ||
| 284 | <el-input placeholder="请输入method" v-model="createAPI.method" clearable></el-input> | ||
| 285 | </el-form-item> | ||
| 286 | <el-form-item> | ||
| 287 | <el-input placeholder="请输入biz_data" v-model="createAPI.biz_data" clearable></el-input> | ||
| 288 | </el-form-item> | ||
| 289 | <el-form-item> | ||
| 290 | <el-input placeholder="请输入uid" v-model="createAPI.uid" clearable></el-input> | ||
| 291 | </el-form-item> | ||
| 292 | <el-form-item> | ||
| 293 | <el-input placeholder="请输入token" v-model="createAPI.token" clearable></el-input> | ||
| 294 | </el-form-item> | ||
| 295 | <el-form-item> | ||
| 296 | <el-select v-model="createAPI.huanjing" placeholder="请选择执行环境"> | ||
| 297 | <el-option | ||
| 298 | v-for="item in createAPIoptions" | ||
| 299 | :key="item.value" | ||
| 300 | :label="item.label" | ||
| 301 | :value="item.value"> | ||
| 302 | </el-option> | ||
| 303 | </el-select> | ||
| 304 | </el-form-item> | ||
| 305 | <div style="margin: 15px 0;"></div> | ||
| 306 | <el-form-item> | ||
| 307 | <el-button round @click="createApi">生成参数</el-button> | ||
| 308 | </el-form-item> | ||
| 309 | </div> | ||
| 310 | </el-card> | ||
| 311 | </el-form> | ||
| 312 | <el-dialog | ||
| 313 | title="接口请求参数:" | ||
| 314 | :visible.sync="dialogCreateApi" | ||
| 315 | width="30%"> | ||
| 316 | <span>{{myApi}}</span> | ||
| 317 | <span slot="footer" class="dialog-footer"> | ||
| 318 | <el-button type="primary" v-clipboard:copy="JSON.stringify(myApi)" v-clipboard:success="onCopy" @click="dialogCreateApi = false">点击复制</el-button> | ||
| 319 | </span> | ||
| 320 | </el-dialog> | ||
| 321 | </el-col> | ||
| 294 | </el-row> | 322 | </el-row> |
| 295 | </div> | 323 | </div> |
| 296 | </template> | 324 | </template> |
| ... | @@ -400,6 +428,17 @@ | ... | @@ -400,6 +428,17 @@ |
| 400 | value: 'release', | 428 | value: 'release', |
| 401 | label: '线上环境' | 429 | label: '线上环境' |
| 402 | }], | 430 | }], |
| 431 | activityConfigRedis: { | ||
| 432 | id: '', | ||
| 433 | huanjing: [] | ||
| 434 | }, | ||
| 435 | activityConfigRedisOptions: [{ | ||
| 436 | value: 'debug', | ||
| 437 | label: '测试环境' | ||
| 438 | }, { | ||
| 439 | value: 'release-test', | ||
| 440 | label: '线上环境' | ||
| 441 | }], | ||
| 403 | createUserInfo: { | 442 | createUserInfo: { |
| 404 | phone: '', | 443 | phone: '', |
| 405 | agentPhone: '' | 444 | agentPhone: '' |
| ... | @@ -604,7 +643,12 @@ | ... | @@ -604,7 +643,12 @@ |
| 604 | // } | 643 | // } |
| 605 | // }) | 644 | // }) |
| 606 | const {href} = this.$router.resolve({ name:'activityConfig', query: | 645 | const {href} = this.$router.resolve({ name:'activityConfig', query: |
| 607 | {id: this.activityConfig.id, huangjing: this.activityConfig.huanjing.toString()}}) | 646 | {id: this.activityConfig.id, huanjing: this.activityConfig.huanjing.toString()}}) |
| 647 | window.open(href, '_blank') | ||
| 648 | }, | ||
| 649 | activityConfigRedisSubmit() { | ||
| 650 | const {href} = this.$router.resolve({ name:'activityConfigRedis', query: | ||
| 651 | {id: this.activityConfigRedis.id, huanjing: this.activityConfigRedis.huanjing.toString()}}) | ||
| 608 | window.open(href, '_blank') | 652 | window.open(href, '_blank') |
| 609 | }, | 653 | }, |
| 610 | createApi() { | 654 | createApi() { | ... | ... |
| ... | @@ -3,6 +3,7 @@ import Router from 'vue-router' | ... | @@ -3,6 +3,7 @@ import Router from 'vue-router' |
| 3 | import index from '@/page/index' | 3 | import index from '@/page/index' |
| 4 | import tool from '@/page/tool' | 4 | import tool from '@/page/tool' |
| 5 | import activityConfig from '@/page/activityConfig' | 5 | import activityConfig from '@/page/activityConfig' |
| 6 | import activityConfigRedis from '@/page/activityConfigRedis' | ||
| 6 | import userInfo from '@/page/userInfo' | 7 | import userInfo from '@/page/userInfo' |
| 7 | 8 | ||
| 8 | Vue.use(Router) | 9 | Vue.use(Router) |
| ... | @@ -39,6 +40,14 @@ export default new Router({ | ... | @@ -39,6 +40,14 @@ export default new Router({ |
| 39 | } | 40 | } |
| 40 | }, | 41 | }, |
| 41 | { | 42 | { |
| 43 | path: '/activityConfigRedis', | ||
| 44 | component: activityConfigRedis, | ||
| 45 | name: 'activityConfigRedis', | ||
| 46 | meta: { | ||
| 47 | title: '测试工具平台' | ||
| 48 | } | ||
| 49 | }, | ||
| 50 | { | ||
| 42 | path: '/userInfo', | 51 | path: '/userInfo', |
| 43 | component: userInfo, | 52 | component: userInfo, |
| 44 | name: 'userInfo', | 53 | name: 'userInfo', | ... | ... |
-
Please register or sign in to post a comment