🎈 perf(优化跳转):

This commit is contained in:
czm 2022-10-21 19:32:17 +08:00
parent 65ae8143ac
commit 1167acaf24

View File

@ -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 })