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