Git Product home page Git Product logo

Comments (4)

songyumeng avatar songyumeng commented on May 11, 2024

谢谢您报的issue。

iClient站点当前对于cookie的处理情况是:
默认cookie中不存在language值,显示语言为当前浏览器语言(仅支持中英文)。
当通过站点界面切换语言时,cookie中language存入的值仅会为“en-US”或“zh-CN”。

可以简单描述下是什么场景或者什么操作让您的浏览器cookie中的language的值成为‘guage=zh-CN’?

from iclient-javascript.

codingmiao avatar codingmiao commented on May 11, 2024

大致排查了一下,我们用nginx作为网关,把iclient站点及一个thinkphp开发的web程序在同一ip同一端口对外暴露,thinkphp向cookie中存入值think_language=zh-CN,导致此函数解析出现问题:

    function getCookie(cKey) {
        var name = cKey + "=";
        var ca = document.cookie.split(';');
        for (var i = 0; i < ca.length; i++) {
            var c = ca[i];
            while (c.charAt(0) === ' ') c = c.substring(1);
            if (c.indexOf(name) !== -1) return c.substring(name.length, c.length);//indexOf判断出错
        }
        return "";
    }

from iclient-javascript.

Waylawww avatar Waylawww commented on May 11, 2024

??

from iclient-javascript.

songyumeng avatar songyumeng commented on May 11, 2024

问题已经被修复,请更新代码验证。如有问题再反馈

from iclient-javascript.

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.