2023-02-23
功能完善
This commit is contained in:
@@ -72,7 +72,7 @@
|
||||
couponId: item.id
|
||||
};
|
||||
this.clickSubMethod(item)
|
||||
// let data = await Api.apiCall('post', Api.index.acceptCoupon, params);
|
||||
let data = await Api.apiCall('post', Api.index.acceptCoupon, params);
|
||||
// console.log("data?????", data);
|
||||
// if (data) {
|
||||
// // this.$api.msg(data);
|
||||
|
||||
@@ -369,10 +369,7 @@
|
||||
this.$refs.SubComponent.callSubMethod()
|
||||
},
|
||||
callParentMethod(val) {
|
||||
let info = val
|
||||
console.log('callParentMethod: ' + val)
|
||||
console.log('val: ' + val.id)
|
||||
console.log('val: ' + info.id)
|
||||
// 默认去遍历list集合,将集合中的每个元素传入到function的item里,
|
||||
var index = this.couponList.findIndex(
|
||||
// function(item) {
|
||||
@@ -380,9 +377,9 @@
|
||||
// console.log('val: ' + val)
|
||||
// return item.id == val.id;
|
||||
item => {
|
||||
console.log('item: ' + JSON.stringify(item).id)
|
||||
console.log('val: ' + val.id)
|
||||
if (item == val) {
|
||||
console.log('item_id: ' +JSON.parse(JSON.stringify(item)).id)
|
||||
console.log('val_id: ' +JSON.parse(val).id)
|
||||
if (JSON.parse(JSON.stringify(item)).id == JSON.parse(val).id) {
|
||||
return true
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user