收藏
回答

使用uni-app开发微信小程序,模拟器中请求后台接口返回json没有问题, 手机测试返回html?

"<!DOCTYPE html><html> <head> <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=0"> </head> <body> <script type="text/javascript"> var ua = navigator.userAgent.toLowerCase(); var isWeixin = ua.indexOf('micromessenger') != -1; var isAndroid = ua.indexOf('android') != -1; var isIos = (ua.indexOf('iphone') != -1) || (ua.indexOf('ipad') != -1); if (!isWeixin) { document.head.innerHTML = '<title>��Ǹ�������</title><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=0"><link rel="stylesheet" type="text/css" href="https://res.wx.qq.com/open/libs/weui/0.4.1/weui.css">'; document.body.innerHTML = '<div class="weui_msg"><div class="weui_icon_area"><i class="weui_icon_info weui_icon_msg"></i></div><div class="weui_text_area"><h4 class="weui_msg_title">����΢�ſͻ��˴�t��</h4></div></div>'; } </script> </body></html>"

最后一次编辑于  2019-12-09
回答关注问题邀请回答
收藏

1 个回答

  • one for all
    one for all
    2019-12-09

    全靠猜,是不是302到别的页面了

    2019-12-09
    赞同
    回复
登录 后发表内容
问题标签