index.js 874 B

1234567891011121314151617181920212223242526272829303132333435
  1. //index.js
  2. var demoSdk = require('../../demo-sdk');
  3. var simpleUpload = require('../../demo-no-sdk');
  4. var postUpload = require('../../demo-post-policy');
  5. var option = {
  6. data: {
  7. listMap: {},
  8. title: {
  9. toolsDao: '工具函数',
  10. bucketDao: '存储桶操作',
  11. objectDao: '对象操作',
  12. advanceObjectDao: '高级操作',
  13. ciObjectDao: '数据万象示例',
  14. },
  15. },
  16. };
  17. for (var key in demoSdk) {
  18. if (demoSdk.hasOwnProperty(key)) {
  19. var sublist = [];
  20. var subDemoSdk = demoSdk[key];
  21. for (var subkey in subDemoSdk){
  22. sublist.push(subkey);
  23. option[subkey] = subDemoSdk[subkey];
  24. }
  25. option.data.listMap[key] = sublist;
  26. }
  27. }
  28. option.postUpload = postUpload;
  29. option.simpleUpload = simpleUpload;
  30. //获取应用实例
  31. Page(option);