🎈 perf(优化跳转):
This commit is contained in:
parent
65ae8143ac
commit
1167acaf24
@ -10,7 +10,7 @@ import Qs from 'qs'
|
|||||||
type ParamLink = 'navigateTo' | 'switchTab' | 'reLaunch' | 'redirectTo'
|
type ParamLink = 'navigateTo' | 'switchTab' | 'reLaunch' | 'redirectTo'
|
||||||
export const goLink = (path = '', params = null, way: ParamLink = 'navigateTo') => {
|
export const goLink = (path = '', params = null, way: ParamLink = 'navigateTo') => {
|
||||||
if (path) {
|
if (path) {
|
||||||
let params_str = Qs.stringify(params || {})
|
let params_str = Qs.stringify(params || {}, { encode: false })
|
||||||
path = params_str ? path + '?' + params_str : path
|
path = params_str ? path + '?' + params_str : path
|
||||||
console.log('path::', way)
|
console.log('path::', way)
|
||||||
Taro[way]({ url: path })
|
Taro[way]({ url: path })
|
||||||
|
Loading…
x
Reference in New Issue
Block a user