oak-pay-business/es/components/ship/wechatMpShip/index.js

59 lines
1.4 KiB
JavaScript

export default OakComponent({
entity: 'wechatMpShip',
projection: {
id: 1,
wpProduct: {
application: {
name: 1,
},
},
disabled: 1,
sort: 1,
},
isList: true,
formData({ data, features }) {
const { systemId } = this.props;
const wpProducts = features.cache.get('wpProduct', {
data: {
id: 1,
application: {
name: 1,
}
},
filter: {
application: {
systemId,
},
type: 'mp',
},
});
return {
ships: data.filter(ele => ele.$$createAt$$ > 1),
wpProducts,
};
},
properties: {
systemId: '',
},
lifetimes: {
ready() {
const { systemId } = this.props;
return this.features.cache.refresh('wpProduct', {
data: {
id: 1,
application: {
id: 1,
name: 1,
}
},
filter: {
application: {
systemId,
},
type: 'mp',
},
});
}
}
});