General.Web/wwwroot/js/xcity.js

(开头部分) 56KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

$.fn.xcity = function(pName,cName,aName){

    this.p = $(this).find('select[lay-filter=province]');

    this.c = $(this).find('select[lay-filter=city]');

    this.a = $(this).find('select[lay-filter=area]');

    this.cityList = [];

    this.reaList = [];

    this.showP  = function(provinceList) {

        this.p.html('');

        is_pName = false;
        
        for (var i in provinceList) {
            
            if(pName==provinceList[i].name){
                is_pName = true;
                this.cityList = provinceList[i].cityList;
                this.p.append("<option selected value='"+provinceList[i].name+"'>"+provinceList[i].name+"</option>")
            }else{
                this.p.append("<option value='"+provinceList[i].name+"'>"+provinceList[i].name+"</option>")
            }
        }
        if(!is_pName){
            this.cityList = provinceList[0].cityList;
        }
        
    }

    this.showC = function (cityList) {

        this.c.html('');

        is_cName = false;

        for (var i in cityList) {
            if(cName==cityList[i].name){
                is_cName = true;
                this.areaList = cityList[i].areaList;
                this.c.append("<option selected value='"+cityList[i].name+"'>"+cityList[i].name+"</option>")
            }else{
                this.c.append("<option value='"+cityList[i].name+"'>"+cityList[i].name+"</option>")
            }
        }

        if(!is_cName){
            this.areaList = cityList[0].areaList;
        }
    }

    this.showA = function (areaList) {
        this.a.html('');

        for (var i in areaList) {
            
后面还有 446 行代码,解锁后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明

AI 解读

登录后可用,每次 10 积分,解读结果公开显示在下面。

还没有人解读过这个文件。