Browse Source

12.4最后提交

Hongxilin
donghaolin 5 months ago
parent
commit
9ef74969a4
  1. 9
      vue/gold-system/src/api/index.js
  2. 7
      vue/gold-system/src/views/recharge/addRecharge.vue
  3. 3
      vue/gold-system/src/views/refund/addRefund.vue

9
vue/gold-system/src/api/index.js

@ -0,0 +1,9 @@
import http from '../util/http.js';
const API={
post: function(url,data){
return http({url:url,method:'post',data:data})
},
};
export default API;

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

@ -5,6 +5,7 @@ import { ElMessage } from "element-plus";
import { Plus } from "@element-plus/icons-vue";
import axios from "axios";
import { ElMessageBox } from "element-plus";
import API from "../../api/index.js";
//
const addRecharge = ref({
@ -19,7 +20,7 @@ const addRecharge = ref({
const add = async function () {
try {
// POST
const result = await axios.post(
const result = await API.post(
"http://192.168.8.93:10010/recharge/recharge/add",
addRecharge.value
);
@ -85,7 +86,7 @@ const user = ref({});
const getUser = async function (jwcode) {
try {
// POST
const result = await axios.post("http://192.168.8.93:10020/recharge/user", {
const result = await API.post("http://192.168.8.93:10020/recharge/user", {
jwcode: jwcode,
});
@ -111,7 +112,7 @@ const activity = ref([]);
const getActivity = async function () {
try {
// POST
const result = await axios.post(
const result = await API.post(
"http://192.168.8.93:10010/recharge/activity/select",
{}
);

3
vue/gold-system/src/views/refund/addRefund.vue

@ -5,7 +5,6 @@ import { ElMessage } from "element-plus";
import { Plus } from "@element-plus/icons-vue";
import axios from "axios";
import { ElMessageBox } from "element-plus";
import http from "src/util/http.js";
//
const addRefund = ref({
@ -90,7 +89,7 @@ const user = ref({});
const getUser = async function (jwcode) {
try {
// POST
const result = await http.post("http://192.168.8.93:10020/recharge/user", {
const result = await axios.post("http://192.168.8.93:10020/recharge/user", {
jwcode: jwcode,
});

Loading…
Cancel
Save