
正文
sencha touch routes(路由) 传递中文参数
提示:扫一扫查出行【扫一扫了解最新限行尾号】
复制提示
使用路由的时候可以传递参数
如下:
index.html#eaterylist/335/61/61/61/B/商户名称
其中6个参数依次是:商户编号/公众账号/微信号/校验号/服务类型/商户名称
因为最后一个参数是中文,所以普通写法获取不到中文参数,也不能激活路由.
routes: {
'eatery/:mCode/:pAccount/:mSignal/:cNo/:tService/:bName': 'showEatery'
}
经过一番试验,以下写法可以获取到中文参数并且激活路由
routes: {
'eatery/:mCode/:pAccount/:mSignal/:cNo/:tService/:bName': {
action: 'showEatery',
conditions: {
':bName': '.*'
}
}
}





