commit
Showing
1 changed file
with
75 additions
and
7 deletions
| ... | @@ -127,27 +127,63 @@ | ... | @@ -127,27 +127,63 @@ |
| 127 | </el-form> | 127 | </el-form> |
| 128 | </el-col> | 128 | </el-col> |
| 129 | <el-col :span="8"> | 129 | <el-col :span="8"> |
| 130 | <el-form ref="createUserInfo" :model="createUserInfo" label-width="0px"> | 130 | <el-form ref="createAPI" :model="createAPI" label-width="0px"> |
| 131 | <el-card class="CadetBlue" shadow="always"> | 131 | <el-card class="CadetBlue" shadow="always"> |
| 132 | <div slot="header" class="clearfix"> | 132 | <div slot="header" class="clearfix"> |
| 133 | <span>创建指定代理人的健康坊用户</span> | 133 | <span>生成接口请求参数</span> |
| 134 | </div> | 134 | </div> |
| 135 | <div class="text item"> | 135 | <div class="text item"> |
| 136 | <el-form-item> | 136 | <el-form-item> |
| 137 | <el-input placeholder="代理人手机号" v-model="createUserInfo.phone" clearable></el-input> | 137 | <el-input placeholder="请输入method" v-model="createAPI.method" clearable></el-input> |
| 138 | </el-form-item> | ||
| 139 | <el-form-item> | ||
| 140 | <el-input placeholder="请输入biz_data" v-model="createAPI.biz_data" clearable></el-input> | ||
| 141 | </el-form-item> | ||
| 142 | <el-form-item> | ||
| 143 | <el-input placeholder="请输入uid" v-model="createAPI.uid" clearable></el-input> | ||
| 138 | </el-form-item> | 144 | </el-form-item> |
| 139 | <div style="margin: 15px 0;"></div> | ||
| 140 | <el-form-item> | 145 | <el-form-item> |
| 141 | <el-input placeholder="该代理人名下的健康坊用户手机号" v-model="createUserInfo.agentPhone" clearable></el-input> | 146 | <el-input placeholder="请输入token" v-model="createAPI.token" clearable></el-input> |
| 142 | </el-form-item> | 147 | </el-form-item> |
| 143 | <div style="margin: 15px 0;"></div> | 148 | <div style="margin: 15px 0;"></div> |
| 144 | <el-form-item> | 149 | <el-form-item> |
| 145 | <el-button round @click="">创建用户</el-button> | 150 | <el-button round @click="createApi">生成参数</el-button> |
| 146 | </el-form-item> | 151 | </el-form-item> |
| 147 | </div> | 152 | </div> |
| 148 | </el-card> | 153 | </el-card> |
| 149 | </el-form> | 154 | </el-form> |
| 155 | <el-dialog | ||
| 156 | title="接口请求参数:" | ||
| 157 | :visible.sync="dialogCreateApi" | ||
| 158 | width="30%"> | ||
| 159 | <span>{{myApi}}</span> | ||
| 160 | <span slot="footer" class="dialog-footer"> | ||
| 161 | <el-button type="primary" @click="dialogCreateApi = false">确 定</el-button> | ||
| 162 | </span> | ||
| 163 | </el-dialog> | ||
| 150 | </el-col> | 164 | </el-col> |
| 165 | <!-- <el-col :span="8">--> | ||
| 166 | <!-- <el-form ref="createUserInfo" :model="createUserInfo" label-width="0px">--> | ||
| 167 | <!-- <el-card class="CadetBlue" shadow="always">--> | ||
| 168 | <!-- <div slot="header" class="clearfix">--> | ||
| 169 | <!-- <span>创建指定代理人的健康坊用户</span>--> | ||
| 170 | <!-- </div>--> | ||
| 171 | <!-- <div class="text item">--> | ||
| 172 | <!-- <el-form-item>--> | ||
| 173 | <!-- <el-input placeholder="代理人手机号" v-model="createUserInfo.phone" clearable></el-input>--> | ||
| 174 | <!-- </el-form-item>--> | ||
| 175 | <!-- <div style="margin: 15px 0;"></div>--> | ||
| 176 | <!-- <el-form-item>--> | ||
| 177 | <!-- <el-input placeholder="该代理人名下的健康坊用户手机号" v-model="createUserInfo.agentPhone" clearable></el-input>--> | ||
| 178 | <!-- </el-form-item>--> | ||
| 179 | <!-- <div style="margin: 15px 0;"></div>--> | ||
| 180 | <!-- <el-form-item>--> | ||
| 181 | <!-- <el-button round @click="">创建用户</el-button>--> | ||
| 182 | <!-- </el-form-item>--> | ||
| 183 | <!-- </div>--> | ||
| 184 | <!-- </el-card>--> | ||
| 185 | <!-- </el-form>--> | ||
| 186 | <!-- </el-col>--> | ||
| 151 | </el-row> | 187 | </el-row> |
| 152 | </div> | 188 | </div> |
| 153 | </template> | 189 | </template> |
| ... | @@ -242,7 +278,15 @@ | ... | @@ -242,7 +278,15 @@ |
| 242 | createUserInfo: { | 278 | createUserInfo: { |
| 243 | phone: '', | 279 | phone: '', |
| 244 | agentPhone: '' | 280 | agentPhone: '' |
| 245 | } | 281 | }, |
| 282 | createAPI: { | ||
| 283 | method: '', | ||
| 284 | biz_data: '', | ||
| 285 | uid: '5034720', | ||
| 286 | token: 'oVVeAl2eERPxiU1eY1LXf_nteJusfuDzYFQV3s0zhwRwQt1gyo-W13JiPaxE0msWRHSV_3cCrGXbdLUFZjHmJJrPWj4a1hYY2oTWgD2gbgelxZrHQ9D_U9ms-k7LX9Br8SeYfdhUJImw_x_YTEViMw==' | ||
| 287 | }, | ||
| 288 | dialogCreateApi: false, | ||
| 289 | myApi: '' | ||
| 246 | // activityConfigRules: { | 290 | // activityConfigRules: { |
| 247 | // id: [ | 291 | // id: [ |
| 248 | // { required: true, message: '请输入活动ID', trigger: 'blur' } | 292 | // { required: true, message: '请输入活动ID', trigger: 'blur' } |
| ... | @@ -386,6 +430,30 @@ | ... | @@ -386,6 +430,30 @@ |
| 386 | const {href} = this.$router.resolve({ name:'activityConfig', query: | 430 | const {href} = this.$router.resolve({ name:'activityConfig', query: |
| 387 | {id: this.activityConfig.id, huangjing: this.activityConfig.huanjing.toString()}}) | 431 | {id: this.activityConfig.id, huangjing: this.activityConfig.huanjing.toString()}}) |
| 388 | window.open(href, '_blank') | 432 | window.open(href, '_blank') |
| 433 | }, | ||
| 434 | createApi() { | ||
| 435 | let config = { | ||
| 436 | headers: { | ||
| 437 | 'Content-Type': 'application/x-www-form-urlencoded' | ||
| 438 | } | ||
| 439 | } | ||
| 440 | this.$http.get('/tool/jiami?'+this.$qs.stringify({ | ||
| 441 | method: this.createAPI.method, | ||
| 442 | biz_data: this.createAPI.biz_data, | ||
| 443 | uid: this.createAPI.uid, | ||
| 444 | token: this.createAPI.token | ||
| 445 | }),config).then((res)=>{ | ||
| 446 | console.log(res); | ||
| 447 | this.myApi = res.data; | ||
| 448 | this.dialogCreateApi = true; | ||
| 449 | }).catch(error=>{ | ||
| 450 | console.log(error); | ||
| 451 | this.$message({ | ||
| 452 | showClose: true, | ||
| 453 | message: '服务器处理失败,请核对参数!', | ||
| 454 | type: 'error' | ||
| 455 | }); | ||
| 456 | }) | ||
| 389 | } | 457 | } |
| 390 | } | 458 | } |
| 391 | } | 459 | } | ... | ... |
-
Please register or sign in to post a comment