- 今天在小程序数据显示的时候遇到了这个错误:
- {
data: "<script> Sfdump = window.Sfdump || (function (doc)…re><script>Sfdump("sf-dump-1805557920")</script>?", header: {…}, statusCode: 200, errMsg: "request:ok"}
- data:"<script> Sfdump = window.Sfdump || (function (doc) { var refStyle = doc.createElement('style'), rxEsc = /([.*+?^${}()|\[\]\/\\])/g, idRx = /\bsf-dump-\d+-ref[012]\w+\b/, keyHint = 0 <= navigator.platform.toUpperCase().indexOf('MAC') ? 'Cmd' : 'Ctrl', addEventListener = function (e, n, cb) { e.addEventListener(n, cb, false); }; (doc.documentElement.firstElementChild || doc.documentElement.children[0]).appendChild(refStyle); if (!doc.addEventListener) { addEventListener = function (element, eventName, callback) { element.attachEvent('on' + eventName, function (e) { e.preventDefault = function () {e.returnValue = false;}; e.target = e.srcElement; callback(e); }); }; } function toggle(a, recursive) { var s = a.nextSibling || {}, oldClass = s.className, arrow, newClass; if ('sf-dump-compact' == oldClass) { arrow = '▼'; newClass = 'sf-dump-expanded'; } else if ('sf-dump-expanded' == oldClass) { arrow = '▶'; newClass = 'sf-dump-compact'; } else { return false; } a.lastChild.innerHTML = arrow; s.className = newClass; if (recursive) { try { a = s.querySelectorAll('.'+oldClass); for (s = 0; s < a.length; ++s) { if (a[s].className !== newClass) { a[s].className = newClass; a[s].previousSibling.lastChild.innerHTML = arrow; } } } catch (e) { } } return true; }; return function (root) { root = doc.getElementById(root); function a(e, f) { addEventListener(root, e, function (e) { if ('A' == e.target.tagName) { f(e.target, e); } else if ('A' == e.target.parentNode.tagName) { f(e.target.parentNode, e); } }); }; function isCtrlKey(e) { return e.ctrlKey || e.metaKey; } addEventListener(root, 'mouseover', function (e) { if ('' != refStyle.innerHTML) { refStyle.innerHTML = ''; } }); a('mouseover', function (a) { if (a = idRx.exec(a.className)) { try { refStyle.innerHTML = 'pre.sf-dump .'+a[0]+'{background-color: #B729D9; color: #FFF !important; border-radius: 2px}'; } catch (e) { } } }); a('click', function (a, e) { if (/\bsf-dump-toggle\b/.test(a.className)) { e.preventDefault(); if (!toggle(a, isCtrlKey(e))) { var r = doc.getElementById(a.getAttribute('href').substr(1)), s = r.previousSibling, f = r.parentNode, t = a.parentNode; t.replaceChild(r, a); f.replaceChild(a, s); t.insertBefore(s, r); f = f.firstChild.nodeValue.match(indentRx); t = t.firstChild.nodeValue.match(indentRx); if (f && t && f[0] !== t[0]) { r.innerHTML = r.innerHTML.replace(new RegExp('^'+f[0].replace(rxEsc, '\\$1'), 'mg'), t[0]); } if ('sf-dump-compact' == r.className) { toggle(s, isCtrlKey(e)); } } if (doc.getSelection) { try { doc.getSelection().removeAllRanges(); } catch (e) { doc.getSelection().empty(); } } else { doc.selection.empty(); } } }); var indentRx = new RegExp('^('+(root.getAttribute('data-indent-pad') || ' ').replace(rxEsc, '\\$1')+')+', 'm'), elt = root.getElementsByTagName('A'), len = elt.length, i = 0, t = []; while (i < len) t.push(elt[i++]); elt = root.getElementsByTagName('SAMP'); len = elt.length; i = 0; while (i < len) t.push(elt[i++]); root = t; len = t.length; i = t = 0; while (i < len) { elt = root[i]; if ("SAMP" == elt.tagName) { elt.className = "sf-dump-expanded"; a = elt.previousSibling || {}; if ('A' != a.tagName) { a = doc.createElement('A'); a.className = 'sf-dump-ref'; elt.parentNode.insertBefore(a, elt); } else { a.innerHTML += ' '; } a.title = (a.title ? a.title+'\n[' : '[')+keyHint+'+click] Expand all children'; a.innerHTML += '<span>▼</span>'; a.className += ' sf-dump-toggle'; if ('sf-dump' != elt.parentNode.className) { toggle(a); } } else if ("sf-dump-ref" == elt.className && (a = elt.getAttribute('href'))) { a = a.substr(1); elt.className += ' '+a; if (/[\[{]$/.test(elt.previousSibling.nodeValue)) { a = a != elt.nextSibling.id && doc.getElementById(a); try { t = a.nextSibling; elt.appendChild(a); t.parentNode.insertBefore(a, t); if (/^[@#]/.test(elt.innerHTML)) { elt.innerHTML += ' <span>▶</span>'; } else { elt.innerHTML = '<span>▶</span>'; elt.className = 'sf-dump-ref'; } elt.className += ' sf-dump-toggle'; } catch (e) { if ('&' == elt.innerHTML.charAt(0)) { elt.innerHTML = '…'; elt.className = 'sf-dump-ref'; } } } } ++i; } }; })(document); </script> <style> pre.sf-dump { display: block; white-space: pre; padding: 5px; } pre.sf-dump span { display: inline; } pre.sf-dump .sf-dump-compact { display: none; } pre.sf-dump abbr { text-decoration: none; border: none; cursor: help; } pre.sf-dump a { text-decoration: none; cursor: pointer; border: 0; outline: none; }pre.sf-dump{background-color:#fff; color:#222; line-height:1.2em; font-weight:normal; font:12px Monaco, Consolas, monospace; word-wrap: break-word; white-space: pre-wrap; position:relative; z-index:100000}pre.sf-dump .sf-dump-num{color:#a71d5d}pre.sf-dump .sf-dump-const{color:#795da3}pre.sf-dump .sf-dump-str{color:#df5000}pre.sf-dump .sf-dump-cchr{color:#222}pre.sf-dump .sf-dump-note{color:#a71d5d}pre.sf-dump .sf-dump-ref{color:#a0a0a0}pre.sf-dump .sf-dump-public{color:#795da3}pre.sf-dump .sf-dump-protected{color:#795da3}pre.s…-dump-ref>#43</a><samp>? #<span class=sf-dump-protected title="Protected property">parameters</span>: []? </samp>}? +<span class=sf-dump-public title="Public property">headers</span>: <abbr title="Symfony\Component\HttpFoundation\HeaderBag" class=sf-dump-note>HeaderBag</abbr> {<a class=sf-dump-ref>#46</a><samp>? #<span class=sf-dump-protected title="Protected property">headers</span>: <span class=sf-dump-note>array:10</span> [<samp>? "<span class=sf-dump-key>host</span>" => <span class=sf-dump-note>array:1</span> [<samp>? <span class=sf-dump-index>0</span> => "<span class=sf-dump-str title="14 characters">localhost:8000</span>"? </samp>]? "<span class=sf-dump-key>connection</span>" => <span class=sf-dump-note>array:1</span> [<samp>? <span class=sf-dump-index>0</span> => "<span class=sf-dump-str title="10 characters">keep-alive</span>"? </samp>]? "<span class=sf-dump-key>pragma</span>" => <span class=sf-dump-note>array:1</span> [<samp>? <span class=sf-dump-index>0</span> => "<span class=sf-dump-str title="8 characters">no-cache</span>"? </samp>]? "<span class=sf-dump-key>cache-control</span>" => <span class=sf-dump-note>array:1</span> [<samp>? <span class=sf-dump-index>0</span> => "<span class=sf-dump-str title="8 characters">no-cache</span>"? </samp>]? "<span class=sf-dump-key>user-agent</span>" => <span class=sf-dump-note>array:1</span> [<samp>? <span class=sf-dump-index>0</span> => "<span class=sf-dump-str title="206 characters">Mozilla/5.0 (iPhone; CPU iPhone OS 9_1 like Mac OS X) AppleWebKit/601.1.46 (KHTML, like Gecko) Version/9.0 Mobile/13B143 Safari/601.1 wechatdevtools/1.02.1804251 MicroMessenger/6.5.7 Language/zh_CN webview/</span>"? </samp>]? "<span class=sf-dump-key>content-type</span>" => <span class=sf-dump-note>array:1</span> [<samp>? <span class=sf-dump-index>0</span> => "<span class=sf-dump-str title="16 characters">application/json</span>"? </samp>]? "<span class=sf-dump-key>accept</span>" => <span class=sf-dump-note>array:1</span> [<samp>? <span class=sf-dump-index>0</span> => "<span class=sf-dump-str title="3 characters">*/*</span>"? </samp>]? "<span class=sf-dump-key>referer</span>" => <span class=sf-dump-note>array:1</span> [<samp>? <span class=sf-dump-index>0</span> => "<span class=sf-dump-str title="69 characters">https://servicewechat.com/wx114e84c6dbdcd490/devtools/page-frame.html</span>"? </samp>]? "<span class=sf-dump-key>accept-encoding</span>" => <span class=sf-dump-note>array:1</span> [<samp>? <span class=sf-dump-index>0</span> => "<span class=sf-dump-str title="17 characters">gzip, deflate, br</span>"? </samp>]? "<span class=sf-dump-key>accept-language</span>" => <span class=sf-dump-note>array:1</span> [<samp>? <span class=sf-dump-index>0</span> => "<span class=sf-dump-str title="14 characters">zh-CN,zh;q=0.8</span>"? </samp>]? </samp>]? #<span class=sf-dump-protected title="Protected property">cacheControl</span>: <span class=sf-dump-note>array:1</span> [<samp>? "<span class=sf-dump-key>no-cache</span>" => <span class=sf-dump-const>true</span>? </samp>]? </samp>}? #<span class=sf-dump-protected title="Protected property">content</span>: ""? #<span class=sf-dump-protected title="Protected property">languages</span>: <span class=sf-dump-const>null</span>? #<span class=sf-dump-protected title="Protected property">charsets</span>: <span class=sf-dump-const>null</span>? #<span class=sf-dump-protected title="Protected property">encodings</span>: <span class=sf-dump-const>null</span>? #<span class=sf-dump-protected title="Protected property">acceptableContentTypes</span>: <span class=sf-dump-const>null</span>? #<span class=sf-dump-protected title="Protected property">pathInfo</span>: "<span class=sf-dump-str title="21 characters">/wxApp/showMentorInfo</span>"? #<span class=sf-dump-protected title="Protected property">requestUri</span>: "<span class=sf-dump-str title="45 characters">/wxApp/showMentorInfo?user_id=options.user_id</span>"? #<span class=sf-dump-protected title="Protected property">baseUrl</span>: ""? #<span class=sf-dump-protected title="Protected property">basePath</span>: <span class=sf-dump-const>null</span>? #<span class=sf-dump-protected title="Protected property">method</span>: "<span class=sf-dump-str title="3 characters">GET</span>"? #<span class=sf-dump-protected title="Protected property">format</span>: <span class=sf-dump-const>null</span>? #<span class=sf-dump-protected title="Protected property">session</span>: <span class=sf-dump-const>null</span>? #<span class=sf-dump-protected title="Protected property">locale</span>: <span class=sf-dump-const>null</span>? #<span class=sf-dump-protected title="Protected property">defaultLocale</span>: "<span class=sf-dump-str title="2 characters">en</span>"?</samp>}?</pre><script>Sfdump("sf-dump-1805557920")</script>?"
- errMsg:"request:ok"
原因:
在laravel框架中没有数据传输过来,并且有打印dd();的存在