Browse Source

写axios请求时,打不开了

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

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

@ -81,7 +81,7 @@
: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>
</div>
</el-card>

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

@ -1,12 +1,24 @@
<script setup>
import { reactive } from 'vue';
import { ref } from 'vue'
import { ElMessage } from 'element-plus'
import { Plus } from '@element-plus/icons-vue'
import { ElMessage } from 'element-plus'
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>
<template>
@ -16,21 +28,21 @@ const addRecharge = ref({});
<el-form :model="addRecharge" label-width="auto" style="max-width: 600px">
<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 label="活动名称">
<el-select v-model="activityId" placeholder="请选择" style="width: 300px">
<el-select v-model="addRecharge.activityId" placeholder="请选择" style="width: 300px">
<el-option
/>
</el-select>
</el-form-item>
<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>免费金币</p>
<el-input v-model="freeGold" style="width: 100px" />
<el-input v-model="addRecharge.freeGold" style="width: 100px" />
<p></p>
</el-form-item>
<el-form-item label="充值金额">
@ -42,7 +54,7 @@ const addRecharge = ref({});
<el-input v-model="rechargeGold" style="width: 225px;"/>
</el-form-item>
<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
/>
@ -50,7 +62,7 @@ const addRecharge = ref({});
</el-form-item>
<el-form-item label="交款时间">
<el-date-picker
v-model="rechargeTime"
v-model="addRecharge.rechargeTime"
type="datetime"
style="width: 300px;"
/>
@ -70,7 +82,7 @@ const addRecharge = ref({});
</el-form-item>
<el-form-item label="备注">
<el-input
v-model="remark"
v-model="addRecharge.remark"
style="width: 300px"
:rows="2"
maxlength="100"
@ -96,6 +108,7 @@ const addRecharge = ref({});
<el-row style="margin-top: 20px;">
<el-col :span="12">
<el-form-item label="姓名" >
<p></p>
</el-form-item>
</el-col>
<el-col :span="12">

Loading…
Cancel
Save