"MiniProgramError\nTypeError\nError: TypeError\nline:6818,column:20,TypeError: undefined is not an object (evaluating 'window') Stack:@https://usr//app-service.js:6818:20\nS@https://lib/WASubContext.js:1:770107\nglobal code@https://usr//app-service.js:6819:17\n@[native code]\nevaluateScriptFile@https://lib/WAServiceMainContext.js:1:2050904\n@https://lib/WAServiceMainContext.js:1:2057800\nforEach@[native code]\nR@https://lib/WAServiceMainContext.js:1:2057714\n@https://lib/WAServiceMainContext.js:1:2058425\nMe@https://lib/WAServiceMainContext.js:1:75622\nMe@[native code]\n@https://lib/WAServiceMainContext.js:1:2058239\n@https://lib/WAServiceMainContext.js:1:2054466\n@https://lib/WAServiceMainContext.js:1:687271\nemit@https://lib/WAServiceMainContext.js:1:692448\n@https://lib/WAServiceMainContext.js:1:1608036\n@https://lib/WAServiceMainContext.js:1:684098\nemit@https://lib/WAServiceMainContext.js:1:82599\nemit@[native code]\nemit@https://lib/WAServiceMainContext.js:1:82218\nsubscribeHandler@https://lib/WAServiceMainContext.js:1:85319"
请具体描述问题出现的流程,并提供能复现问题的简单代码片段(https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html)。