Browse Source

写axios请求时,打不开了

Hongxilin
donghaolin 7 months ago
parent
commit
618fb3225e
  1. 2
      vue/gold-system/src/views/managerecharge/rate.vue
  2. 31
      vue/gold-system/src/views/recharge/addRecharge.vue

2
vue/gold-system/src/views/managerecharge/rate.vue

@ -81,7 +81,7 @@
:size="size" :size="size"
/> />
<!-- 按钮 --> <!-- 按钮 -->
<el-button class="button-item" type="primary" style="float:right" @click="handleSearch">查询</el-button>
<el-button class="button-item" type="primary" style="float:right" @click="handleSearchByTime">查询</el-button>
<el-button class="button-item" style="float:right" @click="handledelete">重置</el-button> <el-button class="button-item" style="float:right" @click="handledelete">重置</el-button>
</div> </div>
</el-card> </el-card>

31
vue/gold-system/src/views/recharge/addRecharge.vue

@ -3,10 +3,22 @@
import { ref } from 'vue' import { ref } from 'vue'
import { ElMessage } from 'element-plus' import { ElMessage } from 'element-plus'
import { Plus } from '@element-plus/icons-vue' import { Plus } from '@element-plus/icons-vue'
import axios from 'axios'
// //
const addRecharge = ref({});
const addRecharge = ref({ homilyId:'1'});
async function getUser(){
const user = await axios({
URL: 'http://192.168.8.93:10020/recharge/user',
method: 'post',
data: { homilyId: addRecharge.homilyId }
})
}
</script> </script>
<template> <template>
@ -16,21 +28,21 @@ const addRecharge = ref({});
<el-form :model="addRecharge" label-width="auto" style="max-width: 600px"> <el-form :model="addRecharge" label-width="auto" style="max-width: 600px">
<el-form-item label="精网号"> <el-form-item label="精网号">
<el-input v-model="homilyId" style="width: 220px;"/>
<el-button type="primary" @click="handleClick" style="margin-left: 20px;">查询</el-button>
<el-input v-model="addRecharge.homilyId" style="width: 220px;" />
<el-button type="primary" @click="getUser" style="margin-left: 20px;">查询</el-button>
</el-form-item> </el-form-item>
<el-form-item label="活动名称"> <el-form-item label="活动名称">
<el-select v-model="activityId" placeholder="请选择" style="width: 300px">
<el-select v-model="addRecharge.activityId" placeholder="请选择" style="width: 300px">
<el-option <el-option
/> />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="充值金币"> <el-form-item label="充值金币">
<el-input v-model="paidGold" style="width: 100px;"/>
<el-input v-model="addRecharge.paidGold" style="width: 100px;"/>
<p style="margin-right: 20px;"></p> <p style="margin-right: 20px;"></p>
<p>免费金币</p> <p>免费金币</p>
<el-input v-model="freeGold" style="width: 100px" />
<el-input v-model="addRecharge.freeGold" style="width: 100px" />
<p></p> <p></p>
</el-form-item> </el-form-item>
<el-form-item label="充值金额"> <el-form-item label="充值金额">
@ -42,7 +54,7 @@ const addRecharge = ref({});
<el-input v-model="rechargeGold" style="width: 225px;"/> <el-input v-model="rechargeGold" style="width: 225px;"/>
</el-form-item> </el-form-item>
<el-form-item label="收款方式"> <el-form-item label="收款方式">
<el-select v-model="rechargeWay" placeholder="请选择" style="width: 300px">
<el-select v-model="addRecharge.rechargeWay" placeholder="请选择" style="width: 300px">
<el-option <el-option
/> />
@ -50,7 +62,7 @@ const addRecharge = ref({});
</el-form-item> </el-form-item>
<el-form-item label="交款时间"> <el-form-item label="交款时间">
<el-date-picker <el-date-picker
v-model="rechargeTime"
v-model="addRecharge.rechargeTime"
type="datetime" type="datetime"
style="width: 300px;" style="width: 300px;"
/> />
@ -70,7 +82,7 @@ const addRecharge = ref({});
</el-form-item> </el-form-item>
<el-form-item label="备注"> <el-form-item label="备注">
<el-input <el-input
v-model="remark"
v-model="addRecharge.remark"
style="width: 300px" style="width: 300px"
:rows="2" :rows="2"
maxlength="100" maxlength="100"
@ -96,6 +108,7 @@ const addRecharge = ref({});
<el-row style="margin-top: 20px;"> <el-row style="margin-top: 20px;">
<el-col :span="12"> <el-col :span="12">
<el-form-item label="姓名" > <el-form-item label="姓名" >
<p></p>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">

Loading…
Cancel
Save