去掉一些无用的代码
This commit is contained in:
parent
fec63694c2
commit
be6c10a69f
|
@ -60,25 +60,7 @@
|
||||||
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 = () => {
|
||||||
const activeTab = unref(activeName);
|
const activeTab = unref(activeName);
|
||||||
|
@ -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})
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue