Coder Social home page Coder Social logo

Comments (4)

tower1229 avatar tower1229 commented on August 27, 2024

没有人维护?

from mmrouter.

RubyLouvre avatar RubyLouvre commented on August 27, 2024

听同事说是修好了,你给一些复现步骤

from mmrouter.

tower1229 avatar tower1229 commented on August 27, 2024

好吧,代码刚贴到avalon那边了,再贴一遍,进入框架页面后点二级链接在ie11和android4.0都不触发路由:

<!doctype html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, user-scalable=no" />
<title>pptViewer</title>
<link href="css/style.css" rel="stylesheet" />
<script src="lib/avalon.mobile.min.js"></script>
<script>
require(["ready!", "mmState", "mmRequest.modern"], function() {
    //顶层VM
    avalon.define({
        $id:"app",
        islogin:true,
    });
    // 路由
    avalon.state("ppt",{
        controller:"app",
        url:"/ppt",
        onChange:function(){
            if(!avalon.vmodels.ppt) {
                alert("获取初始数据,马上进入下一层")
                var model = avalon.define({
                    $id:"ppt",
                    currentChannelName :"",
                    ppt :[]
                })
                setTimeout(function(){
                    avalon.router.navigate('/ppt/hot');
                },0)
            };
        },
        views:{
            "":{
                template : "<div>框架界面<div ms-view></div></div>"
            }
        },
        onAfterLoad:function(){

        }
    })

    avalon.state("ppt.list",{
        controller:"ppt",
        url:"/{type}",
        onChange:function(type){
            alert(type);
            if(!avalon.vmodels.ppt) {
                avalon.router.navigate("/ppt");
                return;
            };
        },
        views:{
            "":{
                template:"<p> <a href='#!/ppt/hot'>热门</a> <a href='#!/ppt/all'>全部</a> <a href='#!/ppt/mine'>我的</a></p>"
            }
        }
    })

    avalon.history.start();

    avalon.scan();

})
</script>
</head>
<body ms-controller="app">
    <div ms-view><a href="#!/ppt">点击</a></div>
</body>
</html>

from mmrouter.

gogoyqj avatar gogoyqj commented on August 27, 2024

更新一下js看看,我这边试好像是mobile.js require的路径算不对啊

from mmrouter.

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.