fix warning

This commit is contained in:
Wang Kejun 2022-06-01 17:08:33 +08:00
parent 8c1cc89e41
commit 7aec1819db
1 changed files with 40 additions and 37 deletions

View File

@ -1,42 +1,45 @@
import { expandUuidTo36Bytes } from 'oak-domain/lib/utils/uuid'
OakPage({
path: 'wechatQrCode:scan',
entity: 'wechatQrCode',
projection: {
id: 1,
entity: 1,
entityId: 1,
type: 1,//类型
ticket: 1,
url: 1,
expired: 1,
buffer: 1,
props: 1,
OakPage(
{
path: 'wechatQrCode:scan',
entity: 'wechatQrCode',
projection: {
id: 1,
entity: 1,
entityId: 1,
type: 1, //类型
ticket: 1,
url: 1,
expired: 1,
buffer: 1,
props: 1,
},
isList: true,
filters: [
{
filter: async ({ features, rest, onLoadOptions }) => {
const scene = decodeURIComponent(onLoadOptions.scene!);
const uuid = scene && expandUuidTo36Bytes(scene!);
return {
id: uuid!,
};
},
},
],
formData: async ({ data: wechatQrCodes }) => {
if (wechatQrCodes[0] && !wechatQrCodes[0]?.expired) {
wx.navigateTo({
url: `${wechatQrCodes[0]?.props?.pathname}?oakId=${wechatQrCodes[0]?.props?.props?.id}`,
});
}
return {};
},
},
isList: true,
filter: async (options) => {
const scene = decodeURIComponent(options.scene);
const uuid = expandUuidTo36Bytes(scene);
console.log(options);
console.log(uuid);
return {
id: uuid,
}
},
formData: async ({data: wechatQrCodes}) => {
if (wechatQrCodes[0] && !wechatQrCodes[0]?.expired) {
wx.navigateTo({
url: `${wechatQrCodes[0]?.props?.pathname}?oakId=${wechatQrCodes[0]?.props?.props?.id}`
})
}
},
}, {
data: {
},
lifetimes: {
},
methods: {
{
data: {},
lifetimes: {},
methods: {},
}
});
);