商店刷新更改

This commit is contained in:
Your Name 2023-12-26 14:10:21 +08:00 committed by dy
parent 0e08958202
commit d6c801db91

View File

@ -5,7 +5,7 @@ import {ShiwuFun} from './shiwu';
type shopData = ResOpen; type shopData = ResOpen;
type changeData = { type changeData = {
[k in keyof shopData]: shopData[k] [k in keyof (shopData & { version?: number | string })]: (shopData & { version?: number | string })[k]
}; };
export class ShopFun { export class ShopFun {
@ -115,7 +115,8 @@ export class ShopFun {
} }
if (shopConf.version && shopConf.version != shopData.version) { if (shopConf.version && shopConf.version != shopData.version) {
await this.changeShopData(uid, shopId, {shopItems: this.getShopItems(shopId, lv)}) shopData.shopItems = this.getShopItems(shopId, lv);
await this.changeShopData(uid, shopId, { shopItems: shopData.shopItems, version: shopConf.version });
} }
return shopData return shopData