去掉一些无用的代码

This commit is contained in:
xiaogang 2025-09-18 09:20:50 +08:00
parent fec63694c2
commit be6c10a69f
1 changed files with 1 additions and 36 deletions

View File

@ -60,24 +60,6 @@
const page = ref(1); const page = ref(1);
const list = ref([]); const list = ref([]);
const replace = ref(false); const replace = ref(false);
//
// const enumPage = tabs.reduce((prev,cur) => {
// prev[cur.state] = 1
// return prev
// },{})
// const page = ref(enumPage)
// //
// const enumObj = tabs.reduce((prev,cur) => {
// prev[cur.state] = 0
// return prev
// },{})
// const total = reactive(enumObj);
//
// const enumOrder = tabs.reduce((prev,cur) => {
// prev[cur.state] = []
// return prev
// },{})
// const list = reactive(enumOrder)
// //
const queryOrderList = () => { const queryOrderList = () => {
@ -90,7 +72,6 @@
getOrderList({params}).then(res => { getOrderList({params}).then(res => {
const {count,data} = res const {count,data} = res
total.value = count total.value = count
// Object.assign(list,{[activeTab]:[...list[activeTab],...data]})
if(replace.value){ if(replace.value){
const prevPage = page.value - 1; const prevPage = page.value - 1;
const prevList = list.value.slice(0, prevPage * pageSize); const prevList = list.value.slice(0, prevPage * pageSize);
@ -101,7 +82,6 @@
replace.value = false replace.value = false
}).catch(err => { }).catch(err => {
total.value = 0; total.value = 0;
// Object.assign(list,{[activeTab]:[]})
list.value = [] list.value = []
}) })
} }
@ -109,7 +89,6 @@
function handleClick({index, name}){ function handleClick({index, name}){
page.value = 1; page.value = 1;
total.value = 0; total.value = 0;
// Object.assign(list,{[name]:[]})
list.value = []; list.value = [];
activeName.value = name; activeName.value = name;
// name // name
@ -120,20 +99,6 @@
async function pay(orderData){ async function pay(orderData){
console.log(orderData); console.log(orderData);
const {order_no,notify_url,price,brand,sign,plain_text,id} = orderData; const {order_no,notify_url,price,brand,sign,plain_text,id} = orderData;
// const params = {
// order_id:id,
// order_no: order_no
// }
// const res = await queryOrderDetail({params})
// if(res.third_status === '03'){
// uni.showToast({
// title: '~',
// icon: 'none'
// });
// replace.value = true;
// queryOrderList()
// return
// }
const {payFunc} = usePay(); const {payFunc} = usePay();
payFunc({order_no,notify_url,TranAmt:price,MerName:brand,sign,plain_text}) payFunc({order_no,notify_url,TranAmt:price,MerName:brand,sign,plain_text})
} }