Giter Site home page Giter Site logo

Comments (5)

SilurianYang avatar SilurianYang commented on August 16, 2024

问题描述过于笼统 为什么不行? 具体变现在? history模式下是单针对华为还是其他安卓都是? 提问题的时候能不能详细点 如果你是作者 你会是怎么样的感受 这种其实我可以无视并关闭的

from uni-simple-router.

minkuan avatar minkuan commented on August 16, 2024

还好你没有无视关闭,那都默默放弃了。。你知道耽误多少时间吗?你知道uni-simple-router把空query {}打进URL会影响微信JS签名吗?
router最核心的就是处理URL及其参数,encode/decode, parse/stringify
useUniConfig: true 结果还是需要routes配置

from uni-simple-router.

SilurianYang avatar SilurianYang commented on August 16, 2024

看起来 你好像没搞明白 useUniConfig: true 的含义, 他的作用是页面样式包括组件 都会是采用pages.json中的配置。这样就是完全使用uni-app开发模式!而你改为false 就表明着你不会采用uni-app配置开发 所有页面都会去除样式及组件、生命周期。并不是说不需要配置 routes 项。 对于你说的参数问题,在不同的模式下 url表现不同 模式不兼容则去除掉参数。所以如果你在微信公众号开发 你应该配置 encodeURI:false

from uni-simple-router.

minkuan avatar minkuan commented on August 16, 2024

根本不需要encodeURI: false这样的配置项。router需要确保出去的所有URL都是URL安全的:

  1. 对于所出去的URL,可以保持简单形式,例如?a=1&b=2;
  2. 同时,router作为强大的存在当然自动支持JSON复杂URL参数,此时所出去的也仍然是URL安全即经过encodeURIComponent的;
  3. 短链接兴起自有其原因,微信BUG般存在对动态URL进行签名,这就对router的URL参数处理提出了更高的要求。
    综上,对于最好用的router来说,所面临的核心问题肯定是快速搞定浏览器环境的要求,哪怕是微信BUG般存在。所以encodeURL: false这样的配置项其实有点生造而略显多余

from uni-simple-router.

SilurianYang avatar SilurianYang commented on August 16, 2024

作为开发人员你应该时刻明白不是所有人都能按照编写并传递严格的json格式 所以会提供这个的配置给开发者自行断言 当模式与传递的参数不匹配时,参数被裁掉。开发者心里是明白的!适用的人群不同 暂时只能用这种方式处理

1.如果你是来解决问题的,那么请明确你的问题。

2.如果你是来提出改进或批评的,你可以选择pr,每个issue及pr我都会认真处理

from uni-simple-router.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.