WAService.js:3 appServiceSDKScriptError
URI malformed;at api onAppRoute callback function
URIError: URI malformed
at decodeURIComponent (
)
at Function. (http://1210065392.appservice.open.weixin.qq.com/WAService.js:4:10003)
at http://1210065392.appservice.open.weixin.qq.com/WAService.js:4:22435
at d (http://1210065392.appservice.open.weixin.qq.com/appservice:16:5545)
at f.registerCallback (http://1210065392.appservice.open.weixin.qq.com/appservice:16:5807)
at k.forEach (http://1210065392.appservice.open.weixin.qq.com/appservice:16:3140)
at Array.forEach ()
at d (http://1210065392.appservice.open.weixin.qq.com/appservice:16:3120)
at WebSocket.h.onmessage (http://1210065392.appservice.open.weixin.qq.com/appservice:16:2996)
本文来自微信小程序开发者论坛 微信小程序工厂 http://www.xcxgc.com 转载请保留。
微信小程序开发者回答:
ん***:
你好,请提供一下能复现问题的简单代码示例。
守***:
class="zan-steps__step {{ hasDesc ? 'zan-steps__step--db-title' : '' }} {{ index == 0 ? 'zan-steps__step--first-child' : '' }} {{ index == steps.length - 1 ? 'zan-steps__step--last-child' : '' }} {{ step.done ? 'zan-steps__step--done' : '' }} {{ step.current ? 'zan-steps__step--cur' : '' }}" bindtap="stepTap" data-index="{{index}}"
>
{{ step.text }}
{{ step.desc }}
模板事件绑定如下
stepTap(e) {
let stepIndex = e.currentTarget.dataset.index,
self = this;
wx.navigateTo({
url: '/pages/historydetails/index?noticetitle=' + escape(self.data.steps[stepIndex].text)
});
},
微信小程序销毁
ん***:
如果使用 encodeURIComponent 而非 escape,可以成功吗
守***:
用encodeURIComponent则没有报错,但是为啥不能使用escape呢?
ん***:
可参阅: zhihu.com/question/21861899
开发者工具预览跟手机预览不一样
本文网址:http://www.91bianli.com/weixinxiaochengxu/52187.html