123456789101112131415161718192021 |
- //服务器传来的data
- class ServerDataMgr{
- constructor() {
- console.log('ServerDataMgr初始化');
- }
- setGameGoods(goodsMap){ //赋值商品列表
- this.m_mapGoods = goodsMap;
- }
- }
- let instance = null;
- ServerDataMgr.getInstance = function(){
- if(!instance){
- instance = new ServerDataMgr();
- }
- return instance;
- }
- export default ServerDataMgr.getInstance();
|