ppypp伦理天堂,91手机在线视频,免费在线观看黄色毛片,夜夜穞天天穞狠狠穞AV美女按摩

聯系官方銷售客服

1835022288

028-61286886

投訴 解決中 / 官方已回 在pc端頁面,調用當前移動端頁面的url,是用哪個標簽 7 0
迅睿CMS版本:4.5.2

我需要,在pc端頁面,調用當前移動端頁面的url,是用哪個標簽,哪個大佬知道,謝謝!

解決方案
  • http://www.zbshanke.com/doc/code/

    PC模板顯示手機地址:{dr_rp($my_web_url, SITE_URL, SITE_MURL)}

    手機模板顯示PC地址:{dr_rp($my_web_url, SITE_MURL, SITE_URL)}

  • 回復@迅睿框架聯合創始人 你好,用這了簽標,生成內容,出現錯誤,我調用的標簽是這樣的,你看下,怎么調標簽

    <meta http-equiv="mobile-agent" content="format=xhtml;url=需要當前移動端url">

    <link rel="alternate" media="only screen and(max-width: 640px)" href="需要當前移動端url">


    調用出現錯誤

    <meta http-equiv="mobile-agent" content="format=xhtml;url={dr_rp($my_web_url, SITE_URL, SITE_MURL)}">

    <link rel="alternate" media="only screen and(max-width: 640px)" href="{dr_rp($my_web_url, SITE_URL, SITE_MURL)}">

  • 回復@liu888

    為了問題能準確又快捷得解決,建議遵從以下操作

    問題三連:

    1、上代碼 (你的代碼);

    2、上截圖 (錯誤信息提示截圖);

    3、上鏈接 (你的問題所在鏈接);

    高端程序員往往采用最樸素的編程方式,若不是貧窮,誰愿意弄的自己一身才華!
  • pc頁面,在移動端打開時,跳轉到移動端頁面,這段js代碼,判斷調用當前移動端url出錯,請幫看下怎么調用這個移動端url,才正確

    <script type="text/javascript">if(window.location.toString().indexOf('pref=padindex') != -1){}else{if(/AppleWebKit.*Mobile/i.test(navigator.userAgent) || (/MIDP|SymbianOS|NOKIA|SAMSUNG|LG|NEC|TCL|Alcatel|BIRD|DBTEL|Dopod|PHILIPS|HAIER|LENOVO|MOT-|Nokia|SonyEricsson|SIE-|Amoi|ZTE/.test(navigator.userAgent))){if(window.location.href.indexOf("?mobile")<0){try{if(/Android|Windows Phone|webOS|iPhone|iPod|BlackBerry/i.test(navigator.userAgent)){window.location.href="{str_replace(SITE_URL, SITE_MURL, $my_web_url)}";}else if(/iPad/i.test(navigator.userAgent)){}else{}}catch(e){}}}}</script>

  • JS部分,{后面加一個空格
  • 回復@逆水行舟 你好,哪一個{后面加一個空格

  • 回復@liu888 試試這個

    <script type="application/javascript">
    var MobileUA = (function() {
        var ua = navigator.userAgent.toLowerCase();
        var mua = {
            IOS: /ipod|iphone|ipad/.test(ua),
            IPHONE: /iphone/.test(ua),
            IPAD: /ipad/.test(ua),
            ANDROID: /android/.test(ua),
            WINDOWS: /windows/.test(ua),
            TOUCH_DEVICE: ('ontouchstart' in window) || /touch/.test(ua),
            MOBILE: /mobile/.test(ua),
            ANDROID_TABLET: false,
            WINDOWS_TABLET: false,
            TABLET: false,
            SMART_PHONE: false
        };
        mua.ANDROID_TABLET = mua.ANDROID && !mua.MOBILE;
        mua.WINDOWS_TABLET = mua.WINDOWS && /tablet/.test(ua);
        mua.TABLET = mua.IPAD || mua.ANDROID_TABLET || mua.WINDOWS_TABLET;
        mua.SMART_PHONE = mua.MOBILE && !mua.TABLET;
        if(ua.match(/MicroMessenger/i)=="micromessenger") {
            mua.SMART_PHONE = true;
        }
        return mua;
    }());
    if (MobileUA.SMART_PHONE) {
        document.location.href = '{str_replace(SITE_URL, SITE_MURL, $my_web_url)}';
    }
    </script>
    高端程序員往往采用最樸素的編程方式,若不是貧窮,誰愿意弄的自己一身才華!