diff --git a/pages/mine_package/mine_order/mine_order.vue b/pages/mine_package/mine_order/mine_order.vue index 71c82b9..9c61e07 100644 --- a/pages/mine_package/mine_order/mine_order.vue +++ b/pages/mine_package/mine_order/mine_order.vue @@ -485,7 +485,7 @@ export default { }); }, onBlur() { - this.loadData(); + this.loadData(1); }, searchFun(val) { console.log("searchFun", val); @@ -532,10 +532,14 @@ export default { return resultM; }, // 加载数据的方法 - async loadData() { - console.log("加载数据的方法"); + async loadData(type = null) { + console.log("加载数据的方法",type); if (this.loading) return; // 如果正在加载,则不重复加载 this.loading = true; // 设置加载状态为true + if(type){ + this.form.page = 1; + this.orderList = []; + } try { // 模拟异步获取数据,实际应用中应该替换为你的数据获取逻辑,例如API调用 const newData = await this.fetchData( @@ -544,7 +548,7 @@ export default { ); if (newData.entitys && newData.entitys.length !== 0) { this.orderList = [...this.orderList, ...newData.entitys]; // 将新数据添加到列表中 - this.form.page++; // 页码加1 + this.form.page++; // 页码加1 console.log("this.orderList", this.orderList); } } catch (error) { diff --git a/utils/config.js b/utils/config.js index 7e63461..c78487b 100644 --- a/utils/config.js +++ b/utils/config.js @@ -2,9 +2,9 @@ // export const BASE_URL="https://frontend.jdns360.com/api"; // 正式环境 // export const BASE_URL="http://cl55un59859.vicp.fun:24346"; // 测试环境 -export const BASE_URL = "https://api.tbmall.xin"; //生产 +// export const BASE_URL = "https://api.tbmall.xin"; //生产 // export const BASE_URL ='http://api.hm.a-d.work:6880' // 测试 -// export const BASE_URL ='http://api.outer.tbmall.xin:6880' // 本地测试 +export const BASE_URL ='http://api.outer.tbmall.xin:6880' // 本地测试