modified: pages/basketballGym/index.js

modified:   pages/basketballGym/index.wxml
modified:   pages/currentEnter/index.wxml
modified:   pages/loginIndex/index.js
modified:   pages/loginIndex/index.wxml
modified:   pages/loginIndex/index.wxss
modified:   pages/myEnters/index.wxml
modified:   utils/api.js
modified:   utils/util.js
This commit is contained in:
2026-04-08 16:40:48 +08:00
parent db13ba7c1c
commit 1559181b2e
9 changed files with 156 additions and 166 deletions

View File

@@ -1,6 +1,6 @@
//testURL
// const BASE_URL = 'http://127.0.0.1:8093';
// const BASE_URL = 'http://192.168.1.3:8093';
// const BASE_URL = 'http://192.168.5.77:8093';
//prodURL
const BASE_URL = 'https://api.hongyutiyu.top';
// const platformId = 1;
@@ -55,7 +55,7 @@ export function fetchPost(url, params, needToken, multiple) {
filePath: params.filePath,
name: 'image',
formData: {},
success: function(response) {
success: function (response) {
console.log(response.data);
let res = JSON.parse(response.data);
console.log(res);
@@ -101,7 +101,7 @@ export function fetchPost(url, params, needToken, multiple) {
reject(response);
}
},
fail: function(err) {
fail: function (err) {
console.log(err);
wx.hideLoading();
wx.showToast({
@@ -123,8 +123,8 @@ export function fetchPost(url, params, needToken, multiple) {
'content-type': 'application/x-www-form-urlencoded'
},
method: 'POST',
success: function(res) {
console.log("POST返回数据", url,res);
success: function (res) {
console.log("POST返回数据", url, res);
if (res.data.err_code == 0) {
wx.hideLoading();
resolve(res.data);
@@ -161,7 +161,7 @@ export function fetchPost(url, params, needToken, multiple) {
}
},
fail: function(res) {
fail: function (res) {
wx.hideLoading();
wx.showToast({
title: '网络错误',
@@ -191,7 +191,7 @@ export function fetchGet(url, params, needToken) {
url: BASE_URL + url,
data: params,
method: 'GET',
success: function(res) {
success: function (res) {
console.log("GET返回数据", url, res);
if (res.statusCode == 200) {
if (res.data.err_code == 0) {
@@ -232,7 +232,7 @@ export function fetchGet(url, params, needToken) {
})
}
},
fail: function(res) {
fail: function (res) {
wx.hideLoading();
reject(res)
wx.showToast({
@@ -310,6 +310,9 @@ export default {
generateBarcode(params) {
return fetchPost('/venue/generate/barcode', params, true);
},
checkBarcode(params) {
return fetchPost('/user/check/barcode', params, true);
},
// 判断是否支付成功
memberIsPayed(params) {
return fetchPost('/member/isPayed', params, true);