Git Product home page Git Product logo

Comments (11)

howie95 avatar howie95 commented on May 21, 2024

查了一下资料感觉是前后端数据类型不匹配的原因,具体原因还是没搞明白,但是换了weex的stream模块之后就可以取到数据了。

from eros.

PerseveranceZ avatar PerseveranceZ commented on May 21, 2024

@howie95 需要提供下截图 抓包看下你的请求头和返回头

from eros.

howie95 avatar howie95 commented on May 21, 2024

image
返回头是这样的,似乎用weex的stream模块也要写明响应类型type为json,不然返回的data就会解析成下面这样。。
image
写明type:json之后就是下面这样的
image

from eros.

PerseveranceZ avatar PerseveranceZ commented on May 21, 2024

@howie95 嗯 建议你服务器端声明默认 application/json ,就能使用 $fetch,使用 eros 封装的请求会好些,可以切换 mock,动态参数 , cookie 等

from eros.

howie95 avatar howie95 commented on May 21, 2024

感谢!是后端输出的问题,已经解决了~
另外还遇到一个问题,不知道能不能在这里问下,我仿照demo里将首页的状态栏样式改为了白色
image
然后用router.open跳往一个新页面
image
可是我点击导航栏的返回按钮返回首页的时候状态栏样式又变成黑色了,然而我看demo里并不是这样的,请问是怎样可以保持状态栏样式一直是白色呢。

from eros.

PerseveranceZ avatar PerseveranceZ commented on May 21, 2024

@howie95 statusBar 是个全局单例 应该是你打开有的页面并没有设置 statusBarsStyle,而在 widget 里面每次跳转都默认了 Default 属性,所以就变成黑色了,我们这块 widget 在优化一下 改一下这个逻辑,你先看看你的跳转逻辑。

from eros.

howie95 avatar howie95 commented on May 21, 2024

image
我是在首页触发orderlist模块里的checkOrder方法跳转的,orderlist也在created里设置了statusbarsStyle为白色,是因为这个的原因吗

from eros.

PerseveranceZ avatar PerseveranceZ commented on May 21, 2024

@howie95 嗯 你去掉试试 看下所有 open 的方法中 是不是有没写 statusBarStyle 的

from eros.

howie95 avatar howie95 commented on May 21, 2024

发现问题了,刚才比较粗心,调试登陆页面的时候把登陆页面设置为了app主页,首页其实是登陆页面跳转过去的,可是我把首页设置为app主页之后,有没有办法让它一直显示导航栏呢,我在首页created里面写了navShow: true,可是跳转到别到页面之后,点击导航的返回键,首页的导航栏就不见了

from eros.

PerseveranceZ avatar PerseveranceZ commented on May 21, 2024

@howie95 你可以在 beforeAppear beforeBackAppear 里面都写上,或者首页自己用 weex 来实现导航条,因为首页比较特殊

from eros.

howie95 avatar howie95 commented on May 21, 2024

了解了,你真是太有耐心了,非常感谢! ;D

from eros.

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.