From 738bc1c7089e3b92f91219920b5d3294655f0e09 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?TOP=E7=B3=AF=E7=B1=B3?= <1130395124@qq.com> Date: Thu, 16 Feb 2023 23:27:42 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9EtoPage=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/core/libs/utils.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/core/libs/utils.js b/src/core/libs/utils.js index ff67ddf..8a53f99 100644 --- a/src/core/libs/utils.js +++ b/src/core/libs/utils.js @@ -156,6 +156,13 @@ function rpx2px(rpx) { return (rpx / 750) * windowWidth; } +function toPage(url, options) { + uni.navigateTo({ + ...{ url: url, }, + ...options + }); +} + export default { time, datetime, @@ -166,4 +173,5 @@ export default { debounce, px2rpx, rpx2px, + toPage, }