.Net Core ORM选择之路,哪个才适合你 通用查询类封装之Mongodb篇 Snowflake(雪花算法)的JavaScript实现 【开发记录】如何在B/S项目中使用中国天气的实时天气功能 【开发记录】微信小游戏开发入门——俄罗斯方块

.Net Core ORM选择之路,哪个才适合你

 

因为老板的一句话公司项目需要迁移到.Net Core ,但是以前同事用的ORM不支持.Net Core 开发过程也遇到了各种坑,插入条数多了也特别的慢,导致系统体验比较差好多都改写Sql实现。

所以我打算找一款

性能比较好

功能比较完善

方便以后可以切换数据库(经过我对老板的了解这个功能非常重要)

并且要有一定用户基础的ORM

参赛ORM

能够参赛的ORM必须要有以下个条件

第一、功能方面要比较完善

第二、Github需要有一定人气并且最近有更新

第三、支持多种数据库少写Sql,方便以后

筛选结果:

1、EF Core

2、Dapper+扩展

3、SqlSugar Core

4、Nhibernate Core

5、PetaPoco

第一轮淘汰赛  我们比 人气&功能

经过对这几个ORM的初步了解,对功能方面和人气方面进行了初步评分

1、EF Core     人气10,功能10

2、Dapper+扩展  人气10,功能9

3、SqlSugar Core  人气7,功能10

4、Nhibernate Core 人气7,功能10

5、PetaPoco 人气6,功能6

经过第一轮帅选,我淘淘汰了PetaPoco ORM

最重要的是这个ORM定位比较尴尬 ,功能一般并且扩展插件也比较稀少。现有功能以拼Sql为主满足不了我以后切换数据库的需求,第一轮淘态。

第一轮得分排名

1、EF Core 胜出

2、Dapper+扩展   胜出

3、SqlSugar Core  ,Nhibernate Core 胜出

4、PetaPoco 淘汰

第二轮淘汰赛 我们比易用性

写太牛逼的功能并不是我们所考虑的,需要上手快好用,于是我针对项目中几个需求点进行了上手测试,并给出了评分

1、EF Core  10   轻松满足

2、Dapper+扩展   8  需要找插件比较费时间

3、SqlSugar Core 10   轻松满足

4、Nhibernate Core  1 完全不会用

第二轮得分排名

1、EF Core,SqlSugar Core   胜出

2、Dapper+扩展   胜出

3、Nhibernate Core  淘汰

能够通过精心挑选并且进入前3名,相信这3个ORM都有他们独自的魅力

第三轮淘汰赛 我们比性能

经过对 批量插入、单条插入、批量更新、单条更新、条件查询、多选删除等几种常用场景的并发测试

我意外的发现SqlSugar性能比Dapper更加的优秀,EF Core垫底

第三轮得分排名

1、SqlSugar Core   胜出

2、Dapper+扩展   胜出

3、EF Core  淘汰

通过上面各种环节我们可以发现,我都会淘汰每场比赛表现最差者,因为我想找一个比较平衡的ORM用于项目,不想有短腿。

决赛 我们比大家的建议

目前Dapper+扩展和SqlSugar Core  这2个ORM是最适合我们的团队的,同事之间也各有说词,暂且平手吧。明天我们公司会在进行讨论。写个博文让大家给给建议,进行最终定夺。

下面是这2款ORM地址:

Dapper

https://github.com/StackExchange/Dapper

https://github.com/tmsmith/Dapper-Extensions

SqlSugar

https://github.com/sunkaixuan/SqlSugar

通用查询类封装之Mongodb篇

 

  查询在应用程序中很重要,花样也特别多,不同得业务需求需要不同的查询条件,还要支持and、or ……事实上也确实如此,程序中有N多个查询类,并且很可能其中有多个类查询同一张表,所以特别想弄一个通用的查询类。

  前几天也是因为讨论有关查询的问题,想到了一个点子觉得可行,最近就抓紧实现了一下来验证想法的可行性……

  思路:其实查询类很简单,无非就是你要查询哪个字段—字段名称(Key)、你想搜索的值—字段值(Value)、以及如何进行比较—查询类型(QueryType),这是单个查询条件(之后都叫做查询因子,不知道合适不合适,也是突然间想起来的),如果是多个条件,弄了一个集合就是好了,问题就在于这些查询因子之间的关系(and、or)……既然叫做查询因子,这个集合我们不管他们之间的关系,只是简单的查询因子的集合,我们在弄一个字段来存储他们之间的关系,这里暂时叫做逻辑表达式,例如:((a|b)&c)|((a&b&d)|e),最后我就解析这个表达式就可以了,a、b、c、d、e只要在集合中找到具体的哪个查询因子就可以了,就是这样了。说通用查询类有点惭愧,目前只是在Mongodb下弄了一个简单的实现(重点是思路了,嘿嘿),因为项目上用的是Mongodb所以先实现的肯定是他了,其他的数据库同理……

.Net Core ORM选择之路,哪个才适合你  通用查询类封装之Mongodb篇  Snowflake(雪花算法)的JavaScript实现  【开发记录】如何在B/S项目中使用中国天气的实时天气功能   【开发记录】微信小游戏开发入门——俄罗斯方块
/// <summary>
/// 通用查询类
/// </summary>
public class QueryModel
{
    /// <summary>
    /// 逻辑表达式
    /// </summary>
    public string FilterStr { get; set; }

    /// <summary>
    /// 查询因子字典集合
    /// </summary>
    public Dictionary<string, QueryFactor> DCQueryFactor { get; set; }
}
/// <summary>
/// 查询因子类
/// </summary>
public class QueryFactor
{
    /// <summary>
    /// 查询字段的名称
    /// </summary>
    public string Key { get; set; }

    /// <summary>
    /// 查询字段的值
    /// </summary>
    public object Value { get; set; }

    /// <summary>
    /// 比较类型,支持的类型有:
    /// eq:等于,
    /// ne:不等于
    /// gt:大于
    /// lt:小于
    /// gte:大于等于
    /// lte:小于等于
    /// in:范围查询
    /// like:模糊查询
    /// </summary>
    public string QueryType { get; set; } = "eq";
}
.Net Core ORM选择之路,哪个才适合你  通用查询类封装之Mongodb篇  Snowflake(雪花算法)的JavaScript实现  【开发记录】如何在B/S项目中使用中国天气的实时天气功能   【开发记录】微信小游戏开发入门——俄罗斯方块

  这个倒是没有什么,关键是这个所谓的逻辑表达式不知道如何解析,真是废了半天劲儿……什么类似的堆栈实现计算器、逆波兰式等弄了一大堆,感觉都没有用上,最后对一个例子做了一些改进,才完成的……

.Net Core ORM选择之路,哪个才适合你  通用查询类封装之Mongodb篇  Snowflake(雪花算法)的JavaScript实现  【开发记录】如何在B/S项目中使用中国天气的实时天气功能   【开发记录】微信小游戏开发入门——俄罗斯方块
public class QueryModelForMongodb
{
    private Dictionary<string, FilterDefinition<BsonDocument>> ParenthesesExpressionDic = new Dictionary<string, FilterDefinition<BsonDocument>>();

    /// <summary>
    /// 入口方法
    /// </summary>
    /// <param name="logicalExpression">逻辑表达式</param>
    /// <param name="queryModel">查询类</param>
    /// <returns></returns>
    public FilterDefinition<BsonDocument> ToMongodbFilter(string logicalExpression, QueryModel queryModel)
    {
        int startIndex = logicalExpression.LastIndexOf("(");
        if (startIndex != -1)
        {
            //  截取括号中的表达式
            int endIndex = logicalExpression.IndexOf(")", startIndex);
            int len = endIndex - startIndex - 1;
            string simpleExpress = logicalExpression.Substring(startIndex + 1, len);
            //  处理简单的表达式并结果保存到字典中
            string tempGuid = Guid.NewGuid().ToString();
            FilterDefinition<BsonDocument> fd1 = ToMongodbFilterSimpleLogicalExpression(simpleExpress, queryModel);
            ParenthesesExpressionDic.Add(tempGuid, fd1);
            //  继续处理剩余表达式
            string leftStr = logicalExpression.Substring(0, startIndex);
            string rightStr = logicalExpression.Substring(endIndex + 1);
            return ToMongodbFilter($"{leftStr}{tempGuid}{rightStr}", queryModel);
        }
        return ToMongodbFilterSimpleLogicalExpression(logicalExpression, queryModel);
    }

    /// <summary>
    /// 处理简单的逻辑表达式(不包含圆括号)
    /// </summary>
    /// <param name="logicalExpression"></param>
    /// <param name="queryModel"></param>
    /// <returns></returns>
    private FilterDefinition<BsonDocument> ToMongodbFilterSimpleLogicalExpression(string logicalExpression, QueryModel queryModel)
    {
        //  1、筛选出操作符:&、|
        Queue<char> qOperator = new Queue<char>();
        //Regex regexOperator = new Regex("[&|]");
        //foreach (Match item in regexOperator.Matches(logicalExpression))
        //{
        //    qOperator.Enqueue(item.Value);
        //}
        foreach (char c in logicalExpression)
        {
            if (c == '&' || c == '|')
            {
                qOperator.Enqueue(c);
            }
        }
        //  2、筛选出所有的变量
        Queue<string> qVariable = new Queue<string>();
        string[] tempVariables = logicalExpression.Replace("&", ",").Replace("|", ",").Split(",");
        foreach (string v in tempVariables)
        {
            qVariable.Enqueue(v);
        }
        //  3、返回结果组装
        FilterDefinition<BsonDocument> filter = null;
        if (qVariable.Count >= 1)
        {
            string tempV = qVariable.Dequeue();
            filter = ParenthesesExpressionDic.ContainsKey(tempV) ? ParenthesesExpressionDic[tempV] : QueryFactorToMogodbFilter(queryModel.DCQueryFactor[tempV]);
            while (qVariable.Count > 0)
            {
                string rightV = qVariable.Dequeue();
                var tempFilter = ParenthesesExpressionDic.ContainsKey(rightV) ? ParenthesesExpressionDic[rightV] : QueryFactorToMogodbFilter(queryModel.DCQueryFactor[rightV]);
                char tempOperator = qOperator.Dequeue();
                switch (tempOperator)
                {
                    case '&':
                        {
                            filter = filter & tempFilter;
                            break;
                        }
                    case '|':
                        {
                            filter = filter | tempFilter;
                            break;
                        }
                }
            }
            filter = Builders<BsonDocument>.Filter.Empty & (filter);
        }
        return filter ?? Builders<BsonDocument>.Filter.Empty;
    }

    /// <summary>
    /// 将查询因子转换成Mongodb的Filter
    /// </summary>
    /// <param name="queryFactor"></param>
    /// <returns></returns>
    private FilterDefinition<BsonDocument> QueryFactorToMogodbFilter(QueryFactor queryFactor)
    {
        /// <summary>
        /// 比较类型,支持的类型有:
        /// eq:等于,
        /// ne:不等于
        /// gt:大于
        /// lt:小于
        /// gte:大于等于
        /// lte:小于等于
        /// in:范围查询
        /// like:模糊查询
        /// </summary>
        if (queryFactor == null) return Builders<BsonDocument>.Filter.Empty;
        FilterDefinition<BsonDocument> filter = null;
        switch (queryFactor.QueryType.ToLower())
        {
            case "ne":
                {
                    filter = Builders<BsonDocument>.Filter.Ne(queryFactor.Key, queryFactor.Value);
                    break;
                }
            case "gt":
                {
                    filter = Builders<BsonDocument>.Filter.Gt(queryFactor.Key, queryFactor.Value);
                    break;
                }
            case "gte":
                {
                    filter = Builders<BsonDocument>.Filter.Gte(queryFactor.Key, queryFactor.Value);
                    break;
                }
            case "lt":
                {
                    filter = Builders<BsonDocument>.Filter.Lt(queryFactor.Key, queryFactor.Value);
                    break;
                }
            case "lte":
                {
                    filter = Builders<BsonDocument>.Filter.Lte(queryFactor.Key, queryFactor.Value);
                    break;
                }
            case "in":
                {
                    filter = Builders<BsonDocument>.Filter.In(queryFactor.Key, JsonConvert.DeserializeObject<IList<String>>(JsonConvert.SerializeObject(queryFactor.Value)));
                    break;
                }
            case "like":
                {
                    //filter = filter & Builders<BsonDocument>.Filter.Regex(queryFactor.Key, new BsonRegularExpression(new Regex(Regex.Escape(queryFactor.Value.ToString()), RegexOptions.IgnoreCase)));
                    filter = Builders<BsonDocument>.Filter.Regex(queryFactor.Key, new BsonRegularExpression(new Regex(".*" + Regex.Escape(queryFactor.Value.ToString()) + ".*", RegexOptions.IgnoreCase)));
                    break;
                }
            case "eq":
            default:
                {
                    filter = Builders<BsonDocument>.Filter.Eq(queryFactor.Key, queryFactor.Value);
                    break;
                }
        }
        return filter ?? Builders<BsonDocument>.Filter.Empty;
    }
}
.Net Core ORM选择之路,哪个才适合你  通用查询类封装之Mongodb篇  Snowflake(雪花算法)的JavaScript实现  【开发记录】如何在B/S项目中使用中国天气的实时天气功能   【开发记录】微信小游戏开发入门——俄罗斯方块

  具体的实现思路是这样的,就是逐个的消除表达式中的括号,直到表达式中不包含圆括号,就用上面的表达式来举个例子,((a|b)&c)|((a&b&d)|e)

  1、找到最后一个“(”,之后寻找与之匹配的“)”,处理这对圆括号中的简单表达式,这里是a&b&d,处理完之后将结果放在一个字典之中<guid,filter>,记作<1,filter1>,之后字符串变为((a|b)&c)|(1|e)

  2、参照1的顺序再次处理表达式((a|b)&c)|(1|e),这次处理1|e,字典中添加一项<2,filter2>,字符串变为((a|b)&c)|2

  3、处理a|b,字典中添加一项<3,filter3>,字符串变为(3&c)|2

  4、处理3&c,字典中添加一项<4,filter4>,字符串变为4|2

  5、至此,圆括号已不再,只是简单的表达式,这就简单了

Snowflake(雪花算法)的JavaScript实现

 

  现在好多的ID都是服务器端生成的,当然JS也可以生成GUID或者UUID之类的,但是如果想要有序……这时就想到了雪花算法,但是都知道JS中Number的最大值为Number.MAX_SAFE_INTEGER:9007199254740991。在雪花算法中,有的操作在JS中会溢出。不过还好,网上有好多BigInt的类库,例如本例使用的:http://peterolson.github.io/BigInteger.js/ ,还有就是chrome67 原生支持BigInt类型,这是个好消息……

  参考文章: 理解分布式id生成算法SnowFlake

  类库:http://peterolson.github.io/BigInteger.js/

  CDN:https://cdnjs.com/

  记录一下代码

  类库方式实现:

.Net Core ORM选择之路,哪个才适合你  通用查询类封装之Mongodb篇  Snowflake(雪花算法)的JavaScript实现  【开发记录】如何在B/S项目中使用中国天气的实时天气功能   【开发记录】微信小游戏开发入门——俄罗斯方块
<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>

<body>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/big-integer/1.6.32/BigInteger.min.js"></script>
    <!-- <script src="http://peterolson.github.com/BigInteger.js/BigInteger.min.js"></script> -->
    <script>
        var Snowflake = /** @class */ (function() {
            function Snowflake(_workerId, _dataCenterId, _sequence) {
                // this.twepoch = 1288834974657;
                this.twepoch = 0;
                this.workerIdBits = 5;
                this.dataCenterIdBits = 5;
                this.maxWrokerId = -1 ^ (-1 << this.workerIdBits); // 值为:31
                this.maxDataCenterId = -1 ^ (-1 << this.dataCenterIdBits); // 值为:31
                this.sequenceBits = 12;
                this.workerIdShift = this.sequenceBits; // 值为:12
                this.dataCenterIdShift = this.sequenceBits + this.workerIdBits; // 值为:17
                this.timestampLeftShift = this.sequenceBits + this.workerIdBits + this.dataCenterIdBits; // 值为:22
                this.sequenceMask = -1 ^ (-1 << this.sequenceBits); // 值为:4095
                this.lastTimestamp = -1;
                //设置默认值,从环境变量取
                this.workerId = 1;
                this.dataCenterId = 1;
                this.sequence = 0;
                if (this.workerId > this.maxWrokerId || this.workerId < 0) {
                    throw new Error('config.worker_id must max than 0 and small than maxWrokerId-[' + this.maxWrokerId + ']');
                }
                if (this.dataCenterId > this.maxDataCenterId || this.dataCenterId < 0) {
                    throw new Error('config.data_center_id must max than 0 and small than maxDataCenterId-[' + this.maxDataCenterId + ']');
                }
                this.workerId = _workerId;
                this.dataCenterId = _dataCenterId;
                this.sequence = _sequence;
            }
            Snowflake.prototype.tilNextMillis = function(lastTimestamp) {
                var timestamp = this.timeGen();
                while (timestamp <= lastTimestamp) {
                    timestamp = this.timeGen();
                }
                return timestamp;
            };
            Snowflake.prototype.timeGen = function() {
                //new Date().getTime() === Date.now()
                return Date.now();
            };
            Snowflake.prototype.nextId = function() {
                var timestamp = this.timeGen();
                if (timestamp < this.lastTimestamp) {
                    throw new Error('Clock moved backwards. Refusing to generate id for ' +
                        (this.lastTimestamp - timestamp));
                }
                if (this.lastTimestamp === timestamp) {
                    this.sequence = (this.sequence + 1) & this.sequenceMask;
                    if (this.sequence === 0) {
                        timestamp = this.tilNextMillis(this.lastTimestamp);
                    }
                } else {
                    this.sequence = 0;
                }
                this.lastTimestamp = timestamp;
                var shiftNum = (this.dataCenterId << this.dataCenterIdShift) |
                    (this.workerId << this.workerIdShift) |
                    this.sequence; // dataCenterId:1,workerId:1,sequence:0  shiftNum:135168
                var nfirst = new bigInt(String(timestamp - this.twepoch), 10);
                nfirst = nfirst.shiftLeft(this.timestampLeftShift);
                var nnextId = nfirst.or(new bigInt(String(shiftNum), 10)).toString(10);
                return nnextId;
            };
            return Snowflake;
        }());
        var tempSnowflake = new Snowflake(1, 1, 0);
        var tempIds = [];
        console.time();
        for (var i = 0; i < 10000; i++) {
            var tempId = tempSnowflake.nextId();
            console.log(tempId);
            if (tempIds.indexOf(tempId) < 0) {
                tempIds.push(tempId);
            }
        }
        console.log(tempIds.length);
        console.timeEnd();
    </script>
</body>

</html>
.Net Core ORM选择之路,哪个才适合你  通用查询类封装之Mongodb篇  Snowflake(雪花算法)的JavaScript实现  【开发记录】如何在B/S项目中使用中国天气的实时天气功能   【开发记录】微信小游戏开发入门——俄罗斯方块

  原生BigInt实现:

.Net Core ORM选择之路,哪个才适合你  通用查询类封装之Mongodb篇  Snowflake(雪花算法)的JavaScript实现  【开发记录】如何在B/S项目中使用中国天气的实时天气功能   【开发记录】微信小游戏开发入门——俄罗斯方块
<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>

<body>
    <script>
        var Snowflake = /** @class */ (function() {
            function Snowflake(_workerId, _dataCenterId, _sequence) {
                this.twepoch = 1288834974657n;
                //this.twepoch = 0n;
                this.workerIdBits = 5n;
                this.dataCenterIdBits = 5n;
                this.maxWrokerId = -1n ^ (-1n << this.workerIdBits); // 值为:31
                this.maxDataCenterId = -1n ^ (-1n << this.dataCenterIdBits); // 值为:31
                this.sequenceBits = 12n;
                this.workerIdShift = this.sequenceBits; // 值为:12
                this.dataCenterIdShift = this.sequenceBits + this.workerIdBits; // 值为:17
                this.timestampLeftShift = this.sequenceBits + this.workerIdBits + this.dataCenterIdBits; // 值为:22
                this.sequenceMask = -1n ^ (-1n << this.sequenceBits); // 值为:4095
                this.lastTimestamp = -1n;
                //设置默认值,从环境变量取
                this.workerId = 1n;
                this.dataCenterId = 1n;
                this.sequence = 0n;
                if (this.workerId > this.maxWrokerId || this.workerId < 0) {
                    throw new Error('_workerId must max than 0 and small than maxWrokerId-[' + this.maxWrokerId + ']');
                }
                if (this.dataCenterId > this.maxDataCenterId || this.dataCenterId < 0) {
                    throw new Error('_dataCenterId must max than 0 and small than maxDataCenterId-[' + this.maxDataCenterId + ']');
                }

                this.workerId = BigInt(_workerId);
                this.dataCenterId = BigInt(_dataCenterId);
                this.sequence = BigInt(_sequence);
            }
            Snowflake.prototype.tilNextMillis = function(lastTimestamp) {
                var timestamp = this.timeGen();
                while (timestamp <= lastTimestamp) {
                    timestamp = this.timeGen();
                }
                return BigInt(timestamp);
            };
            Snowflake.prototype.timeGen = function() {
                return BigInt(Date.now());
            };
            Snowflake.prototype.nextId = function() {
                var timestamp = this.timeGen();
                if (timestamp < this.lastTimestamp) {
                    throw new Error('Clock moved backwards. Refusing to generate id for ' +
                        (this.lastTimestamp - timestamp));
                }
                if (this.lastTimestamp === timestamp) {
                    this.sequence = (this.sequence + 1n) & this.sequenceMask;
                    if (this.sequence === 0n) {
                        timestamp = this.tilNextMillis(this.lastTimestamp);
                    }
                } else {
                    this.sequence = 0n;
                }
                this.lastTimestamp = timestamp;
                return ((timestamp - this.twepoch) << this.timestampLeftShift) |
                    (this.dataCenterId << this.dataCenterIdShift) |
                    (this.workerId << this.workerIdShift) |
                    this.sequence;
            };
            return Snowflake;
        }());
        console.time();
        var tempSnowflake = new Snowflake(1n, 1n, 0n);
        var tempIds = [];
        for (var i = 0; i < 10000; i++) {
            var tempId = tempSnowflake.nextId();
            console.log(tempId);
            if (tempIds.indexOf(tempId) < 0) {
                tempIds.push(tempId);
            }
        }
        console.log(tempIds.length);
        console.timeEnd();
    </script>
</body>

</html>
.Net Core ORM选择之路,哪个才适合你  通用查询类封装之Mongodb篇  Snowflake(雪花算法)的JavaScript实现  【开发记录】如何在B/S项目中使用中国天气的实时天气功能   【开发记录】微信小游戏开发入门——俄罗斯方块

  好像原生效果更好一些,到此结束。

【开发记录】如何在B/S项目中使用中国天气的实时天气功能

  好久没有更新我的博客了,正好手头有一个比较合适的项目经验可以分享出来,就是这个如何使用中国天气的天气预报功能,也正好做个项目经验记录。

功能需求

  这个功能需求比较简单,就是想在网页端显示实时天气数据。

  解决方案:

  第一种:使用百度地图的api来做,以定位为例,可以很方便的查找到用的的所在地,进而进行天气查询(或者一步到位,直接能获取到用户所在地的天气信息);然而使用百度地图的api需要去申请一个key才能使用,比较的麻烦,于是就放弃了,有兴趣的园友可以自己去尝试一下;

  第二种:既然方便的方式用不了,那么只能自己去寻找另一种的解决方案了;获取实时天气的步骤我给分了两步,第一步先获取用户的所在地,第二步根据所在地获取实时天气数据。

  跨域的问题:

  先在这里把跨域的问题提一下吧,js的ajax功能为了安全性考虑,只允许ajax访问相同域名下的接口,其他网站是不允许访问的;虽说ajax有jsonp的跨域请求,但是也得要求被访问的接口支持jsonp的数据格式返回(jsonp也是有一定的数据解析格式的),然而本文提到的接口基本上都是返回html或者字符串,是不符合jsonp数据解析的,因此这里需要后台来进行代理请求(就是js访问自己的后台,然后后台进行一次web请求而已)。

代码实现

  获取城市

  第一种:

  http://2018.ip138.com/ic.asp(父网址http://www.ip138.com/),浏览器能直接打开,可以通过F12查看网页的代理请求,发现返回的是html页,不方便确定城市信息字符串的位置,并且使用上述代码返回数据,汉字一直是乱码,所以这个网址接口被pass掉了;

  第二种:

  我也是参考根据IP查询所在城市接口(查询用户所在城市)这个博客来做的,使用的其中的:搜狐IP地址查询接口(可设置编码):http://pv.sohu.com/cityjson?ie=utf-8,这里最好设置编码(ie=utf-8),否则汉字也有可能会乱码,这里返回的结果是

var returnCitySN = {"cip": "", "cid": "370100", "cname": "山东省济南市"};

  调用方式是在html页里面引用就好,也不必再考虑跨域的问题,而且在js里面也可以直接使用returnCitySN 这个对象(object)。

<script src="http://pv.sohu.com/cityjson?ie=utf-8"></script>

  获取到用户所在的城市就可以进行下一步操作了...

  获取实时天气

  使用的是后台来进行代理请求

  获取用户的所在地之后,就能获取实时天气了,这里也是参考园友的博客天气预报接口api(中国天气网)来做的,主要用了里面的城市与其对应的代码,我也给封装了下(原谅我没给换行XD):

.Net Core ORM选择之路,哪个才适合你  通用查询类封装之Mongodb篇  Snowflake(雪花算法)的JavaScript实现  【开发记录】如何在B/S项目中使用中国天气的实时天气功能   【开发记录】微信小游戏开发入门——俄罗斯方块
var cityCode = [
        { city: '北京', code: '101010100' }, { city: '海淀', code: '101010200' }, { city: '朝阳', code: '101010300' }, { city: '顺义', code: '101010400' }, { city: '怀柔', code: '101010500' }, { city: '通州', code: '101010600' }, { city: '昌平', code: '101010700' }, { city: '延庆', code: '101010800' }, { city: '丰台', code: '101010900' }, { city: '石景山', code: '101011000' }, { city: '大兴', code: '101011100' }, { city: '房山', code: '101011200' }, { city: '密云', code: '101011300' }, { city: '门头沟', code: '101011400' }, { city: '平谷', code: '101011500' }, { city: '八达岭', code: '101011600' }, { city: '佛爷顶', code: '101011700' }, { city: '汤河口', code: '101011800' }, { city: '密云上甸子', code: '101011900' }, { city: '斋堂', code: '101012000' }, { city: '霞云岭', code: '101012100' }, { city: '上海', code: '101020100' }, { city: '闵行', code: '101020200' }, { city: '宝山', code: '101020300' }, { city: '川沙', code: '101020400' }, { city: '嘉定', code: '101020500' }, { city: '南汇', code: '101020600' }, { city: '金山', code: '101020700' }, { city: '青浦', code: '101020800' }, { city: '松江', code: '101020900' }, { city: '奉贤', code: '101021000' }, { city: '崇明', code: '101021100' }, { city: '陈家镇', code: '101021101' }, { city: '引水船', code: '101021102' }, { city: '徐家汇', code: '101021200' }, { city: '浦东', code: '101021300' }, { city: '天津', code: '101030100' }, { city: '武清', code: '101030200' }, { city: '宝坻', code: '101030300' }, { city: '东丽', code: '101030400' }, { city: '西青', code: '101030500' }, { city: '北辰', code: '101030600' }, { city: '宁河', code: '101030700' }, { city: '汉沽', code: '101030800' }, { city: '静海', code: '101030900' }, { city: '津南', code: '101031000' }, { city: '塘沽', code: '101031100' }, { city: '大港', code: '101031200' }, { city: '平台', code: '101031300' }, { city: '蓟县', code: '101031400' }, { city: '重庆', code: '101040100' }, { city: '永川', code: '101040200' }, { city: '合川', code: '101040300' }, { city: '南川', code: '101040400' }, { city: '江津', code: '101040500' }, { city: '万盛', code: '101040600' }, { city: '渝北', code: '101040700' }, { city: '北碚', code: '101040800' }, { city: '巴南', code: '101040900' }, { city: '长寿', code: '101041000' }, { city: '黔江', code: '101041100' }, { city: '万州天城', code: '101041200' }, { city: '万州龙宝', code: '101041300' }, { city: '涪陵', code: '101041400' }, { city: '开县', code: '101041500' }, { city: '城口', code: '101041600' }, { city: '云阳', code: '101041700' }, { city: '巫溪', code: '101041800' }, { city: '奉节', code: '101041900' }, { city: '巫山', code: '101042000' }, { city: '潼南', code: '101042100' }, { city: '垫江', code: '101042200' }, { city: '梁平', code: '101042300' }, { city: '忠县', code: '101042400' }, { city: '石柱', code: '101042500' }, { city: '大足', code: '101042600' }, { city: '荣昌', code: '101042700' }, { city: '铜梁', code: '101042800' }, { city: '璧山', code: '101042900' }, { city: '丰都', code: '101043000' }, { city: '武隆', code: '101043100' }, { city: '彭水', code: '101043200' }, { city: '綦江', code: '101043300' }, { city: '酉阳', code: '101043400' }, { city: '金佛山', code: '101043500' }, { city: '秀山', code: '101043600' }, { city: '沙坪坝', code: '101043700' }, { city: '哈尔滨', code: '101050101' }, { city: '双城', code: '101050102' }, { city: '呼兰', code: '101050103' }, { city: '阿城', code: '101050104' }, { city: '宾县', code: '101050105' }, { city: '依兰', code: '101050106' }, { city: '巴彦', code: '101050107' }, { city: '通河', code: '101050108' }, { city: '方正', code: '101050109' }, { city: '延寿', code: '101050110' }, { city: '尚志', code: '101050111' }, { city: '五常', code: '101050112' }, { city: '木兰', code: '101050113' }, { city: '齐齐哈尔', code: '101050201' }, { city: '讷河', code: '101050202' }, { city: '龙江', code: '101050203' }, { city: '甘南', code: '101050204' }, { city: '富裕', code: '101050205' }, { city: '依安', code: '101050206' }, { city: '拜泉', code: '101050207' }, { city: '克山', code: '101050208' }, { city: '克东', code: '101050209' }, { city: '泰来', code: '101050210' }, { city: '牡丹江', code: '101050301' }, { city: '海林', code: '101050302' }, { city: '穆棱', code: '101050303' }, { city: '林口', code: '101050304' }, { city: '绥芬河', code: '101050305' }, { city: '宁安', code: '101050306' }, { city: '东宁', code: '101050307' }, { city: '佳木斯', code: '101050401' }, { city: '汤原', code: '101050402' }, { city: '抚远', code: '101050403' }, { city: '桦川', code: '101050404' }, { city: '桦南', code: '101050405' }, { city: '同江', code: '101050406' }, { city: '富锦', code: '101050407' }, { city: '绥化', code: '101050501' }, { city: '肇东', code: '101050502' }, { city: '安达', code: '101050503' }, { city: '海伦', code: '101050504' }, { city: '明水', code: '101050505' }, { city: '望奎', code: '101050506' }, { city: '兰西', code: '101050507' }, { city: '青冈', code: '101050508' }, { city: '庆安', code: '101050509' }, { city: '绥棱', code: '101050510' }, { city: '黑河', code: '101050601' }, { city: '嫩江', code: '101050602' }, { city: '孙吴', code: '101050603' }, { city: '逊克', code: '101050604' }, { city: '五大连池', code: '101050605' }, { city: '北安', code: '101050606' }, { city: '大兴安岭', code: '101050701' }, { city: '塔河', code: '101050702' }, { city: '漠河', code: '101050703' }, { city: '呼玛', code: '101050704' }, { city: '呼中', code: '101050705' }, { city: '新林', code: '101050706' }, { city: '阿木尔', code: '101050707' }, { city: '加格达奇', code: '101050708' }, { city: '伊春', code: '101050801' }, { city: '乌伊岭', code: '101050802' }, { city: '五营', code: '101050803' }, { city: '铁力', code: '101050804' }, { city: '嘉荫', code: '101050805' }, { city: '大庆', code: '101050901' }, { city: '林甸', code: '101050902' }, { city: '肇州', code: '101050903' }, { city: '肇源', code: '101050904' }, { city: '杜蒙', code: '101050905' }, { city: '七台河', code: '101051002' }, { city: '勃利', code: '101051003' }, { city: '鸡西', code: '101051101' }, { city: '虎林', code: '101051102' }, { city: '密山', code: '101051103' }, { city: '鸡东', code: '101051104' }, { city: '鹤岗', code: '101051201' }, { city: '绥滨', code: '101051202' }, { city: '萝北', code: '101051203' }, { city: '双鸭山', code: '101051301' }, { city: '集贤', code: '101051302' }, { city: '宝清', code: '101051303' }, { city: '饶河', code: '101051304' }, { city: '长春', code: '101060101' }, { city: '农安', code: '101060102' }, { city: '德惠', code: '101060103' }, { city: '九台', code: '101060104' }, { city: '榆树', code: '101060105' }, { city: '双阳', code: '101060106' }, { city: '吉林', code: '101060201' }, { city: '舒兰', code: '101060202' }, { city: '永吉', code: '101060203' }, { city: '蛟河', code: '101060204' }, { city: '磐石', code: '101060205' }, { city: '桦甸', code: '101060206' }, { city: '烟筒山', code: '101060207' }, { city: '延吉', code: '101060301' }, { city: '敦化', code: '101060302' }, { city: '安图', code: '101060303' }, { city: '汪清', code: '101060304' }, { city: '和龙', code: '101060305' }, { city: '天池', code: '101060306' }, { city: '龙井', code: '101060307' }, { city: '珲春', code: '101060308' }, { city: '图们', code: '101060309' }, { city: '松江', code: '101060310' }, { city: '罗子沟', code: '101060311' }, { city: '延边', code: '101060312' }, { city: '四平', code: '101060401' }, { city: '双辽', code: '101060402' }, { city: '梨树', code: '101060403' }, { city: '公主岭', code: '101060404' }, { city: '伊通', code: '101060405' }, { city: '孤家子', code: '101060406' }, { city: '通化', code: '101060501' }, { city: '梅河口', code: '101060502' }, { city: '柳河', code: '101060503' }, { city: '辉南', code: '101060504' }, { city: '集安', code: '101060505' }, { city: '通化县', code: '101060506' }, { city: '白城', code: '101060601' }, { city: '洮南', code: '101060602' }, { city: '大安', code: '101060603' }, { city: '镇赉', code: '101060604' }, { city: '通榆', code: '101060605' }, { city: '辽源', code: '101060701' }, { city: '东丰', code: '101060702' }, { city: '*', code: '101060801' }, { city: '乾安', code: '101060802' }, { city: '前郭', code: '101060803' }, { city: '长岭', code: '101060804' }, { city: '扶余', code: '101060805' }, { city: '白山', code: '101060901' }, { city: '靖宇', code: '101060902' }, { city: '临江', code: '101060903' }, { city: '东岗', code: '101060904' }, { city: '长白', code: '101060905' }, { city: '沈阳', code: '101070101' }, { city: '苏家屯', code: '101070102' }, { city: '辽中', code: '101070103' }, { city: '康平', code: '101070104' }, { city: '法库', code: '101070105' }, { city: '新民', code: '101070106' }, { city: '于洪', code: '101070107' }, { city: '新城子', code: '101070108' }, { city: '大连', code: '101070201' }, { city: '瓦房店', code: '101070202' }, { city: '金州', code: '101070203' }, { city: '普兰店', code: '101070204' }, { city: '旅顺', code: '101070205' }, { city: '长海', code: '101070206' }, { city: '庄河', code: '101070207' }, { city: '皮口', code: '101070208' }, { city: '海洋岛', code: '101070209' }, { city: '鞍山', code: '101070301' }, { city: '台安', code: '101070302' }, { city: '岫岩', code: '101070303' }, { city: '海城', code: '101070304' }, { city: '抚顺', code: '101070401' }, { city: '清原', code: '101070403' }, { city: '章党', code: '101070404' }, { city: '本溪', code: '101070501' }, { city: '本溪县', code: '101070502' }, { city: '草河口', code: '101070503' }, { city: '桓仁', code: '101070504' }, { city: '丹东', code: '101070601' }, { city: '凤城', code: '101070602' }, { city: '宽甸', code: '101070603' }, { city: '东港', code: '101070604' }, { city: '东沟', code: '101070605' }, { city: '锦州', code: '101070701' }, { city: '凌海', code: '101070702' }, { city: '北宁', code: '101070703' }, { city: '义县', code: '101070704' }, { city: '黑山', code: '101070705' }, { city: '北镇', code: '101070706' }, { city: '营口', code: '101070801' }, { city: '大石桥', code: '101070802' }, { city: '盖州', code: '101070803' }, { city: '阜新', code: '101070901' }, { city: '彰武', code: '101070902' }, { city: '辽阳', code: '101071001' }, { city: '辽阳县', code: '101071002' }, { city: '灯塔', code: '101071003' }, { city: '铁岭', code: '101071101' }, { city: '开原', code: '101071102' }, { city: '昌图', code: '101071103' }, { city: '西丰', code: '101071104' }, { city: '朝阳', code: '101071201' }, { city: '建平', code: '101071202' }, { city: '凌源', code: '101071203' }, { city: '喀左', code: '101071204' }, { city: '北票', code: '101071205' }, { city: '羊山', code: '101071206' }, { city: '建平县', code: '101071207' }, { city: '盘锦', code: '101071301' }, { city: '大洼', code: '101071302' }, { city: '盘山', code: '101071303' }, { city: '葫芦岛', code: '101071401' }, { city: '建昌', code: '101071402' }, { city: '绥中', code: '101071403' }, { city: '兴城', code: '101071404' }, { city: '呼和浩特', code: '101080101' }, { city: '土默特左旗', code: '101080102' }, { city: '托克托', code: '101080103' }, { city: '和林格尔', code: '101080104' }, { city: '清水河', code: '101080105' }, { city: '呼和浩特市郊区', code: '101080106' }, { city: '武川', code: '101080107' }, { city: '包头', code: '101080201' }, { city: '白云鄂博', code: '101080202' }, { city: '满都拉', code: '101080203' }, { city: '土默特右旗', code: '101080204' }, { city: '固阳', code: '101080205' }, { city: '达尔罕茂明安联合旗', code: '101080206' }, { city: '石拐', code: '101080207' }, { city: '乌海', code: '101080301' }, { city: '集宁', code: '101080401' }, { city: '卓资', code: '101080402' }, { city: '化德', code: '101080403' }, { city: '商都', code: '101080404' }, { city: '希拉穆仁', code: '101080405' }, { city: '兴和', code: '101080406' }, { city: '凉城', code: '101080407' }, { city: '察哈尔右翼前旗', code: '101080408' }, { city: '察哈尔右翼中旗', code: '101080409' }, { city: '察哈尔右翼后旗', code: '101080410' }, { city: '四子王旗', code: '101080411' }, { city: '丰镇', code: '101080412' }, { city: '通辽', code: '101080501' }, { city: '舍伯吐', code: '101080502' }, { city: '科尔沁左翼中旗', code: '101080503' }, { city: '科尔沁左翼后旗', code: '101080504' }, { city: '青龙山', code: '101080505' }, { city: '开鲁', code: '101080506' }, { city: '库伦旗', code: '101080507' }, { city: '奈曼旗', code: '101080508' }, { city: '扎鲁特旗', code: '101080509' }, { city: '高力板', code: '101080510' }, { city: '巴雅尔吐胡硕', code: '101080511' }, { city: '通辽钱家店', code: '101080512' }, { city: '赤峰', code: '101080601' }, { city: '赤峰郊区站', code: '101080602' }, { city: '阿鲁科尔沁旗', code: '101080603' }, { city: '浩尔吐', code: '101080604' }, { city: '巴林左旗', code: '101080605' }, { city: '巴林右旗', code: '101080606' }, { city: '林西', code: '101080607' }, { city: '克什克腾旗', code: '101080608' }, { city: '翁牛特旗', code: '101080609' }, { city: '岗子', code: '101080610' }, { city: '喀喇沁旗', code: '101080611' }, { city: '八里罕', code: '101080612' }, { city: '宁城', code: '101080613' }, { city: '敖汉旗', code: '101080614' }, { city: '宝过图', code: '101080615' }, { city: '鄂尔多斯', code: '101080701' }, { city: '达拉特旗', code: '101080703' }, { city: '准格尔旗', code: '101080704' }, { city: '鄂托克前旗', code: '101080705' }, { city: '河南', code: '101080706' }, { city: '伊克乌素', code: '101080707' }, { city: '鄂托克旗', code: '101080708' }, { city: '杭锦旗', code: '101080709' }, { city: '乌审旗', code: '101080710' }, { city: '伊金霍洛旗', code: '101080711' }, { city: '乌审召', code: '101080712' }, { city: '东胜', code: '101080713' }, { city: '临河', code: '101080801' }, { city: '五原', code: '101080802' }, { city: '磴口', code: '101080803' }, { city: '乌拉特前旗', code: '101080804' }, { city: '大佘太', code: '101080805' }, { city: '乌拉特中旗', code: '101080806' }, { city: '乌拉特后旗', code: '101080807' }, { city: '海力素', code: '101080808' }, { city: '那仁宝力格', code: '101080809' }, { city: '杭锦后旗', code: '101080810' }, { city: '巴盟农试站', code: '101080811' }, { city: '锡林浩特', code: '101080901' }, { city: '朝克乌拉', code: '101080902' }, { city: '二连浩特', code: '101080903' }, { city: '阿巴嘎旗', code: '101080904' }, { city: '伊和郭勒', code: '101080905' }, { city: '苏尼特左旗', code: '101080906' }, { city: '苏尼特右旗', code: '101080907' }, { city: '朱日和', code: '101080908' }, { city: '东乌珠穆沁旗', code: '101080909' }, { city: '西乌珠穆沁旗', code: '101080910' }, { city: '太仆寺旗', code: '101080911' }, { city: '镶黄旗', code: '101080912' }, { city: '正镶白旗', code: '101080913' }, { city: '正兰旗', code: '101080914' }, { city: '多伦', code: '101080915' }, { city: '博克图', code: '101080916' }, { city: '乌拉盖', code: '101080917' }, { city: '白日乌拉', code: '101080918' }, { city: '那日图', code: '101080919' }, { city: '呼伦贝尔', code: '101081000' }, { city: '海拉尔', code: '101081001' }, { city: '小二沟', code: '101081002' }, { city: '阿荣旗', code: '101081003' }, { city: '莫力达瓦旗', code: '101081004' }, { city: '鄂伦春旗', code: '101081005' }, { city: '鄂温克旗', code: '101081006' }, { city: '陈巴尔虎旗', code: '101081007' }, { city: '新巴尔虎左旗', code: '101081008' }, { city: '新巴尔虎右旗', code: '101081009' }, { city: '满洲里', code: '101081010' }, { city: '牙克石', code: '101081011' }, { city: '扎兰屯', code: '101081012' }, { city: '额尔古纳', code: '101081014' }, { city: '根河', code: '101081015' }, { city: '图里河', code: '101081016' }, { city: '乌兰浩特', code: '101081101' }, { city: '阿尔山', code: '101081102' }, { city: '科尔沁右翼中旗', code: '101081103' }, { city: '胡尔勒', code: '101081104' }, { city: '扎赉特旗', code: '101081105' }, { city: '索伦', code: '101081106' }, { city: '突泉', code: '101081107' }, { city: '霍林郭勒', code: '101081108' }, { city: '阿拉善左旗', code: '101081201' }, { city: '阿拉善右旗', code: '101081202' }, { city: '额济纳旗', code: '101081203' }, { city: '拐子湖', code: '101081204' }, { city: '吉兰太', code: '101081205' }, { city: '锡林高勒', code: '101081206' }, { city: '头道湖', code: '101081207' }, { city: '中泉子', code: '101081208' }, { city: '巴彦诺尔贡', code: '101081209' }, { city: '雅布赖', code: '101081210' }, { city: '乌斯太', code: '101081211' }, { city: '孪井滩', code: '101081212' }, { city: '石家庄', code: '101090101' }, { city: '井陉', code: '101090102' }, { city: '正定', code: '101090103' }, { city: '栾城', code: '101090104' }, { city: '行唐', code: '101090105' }, { city: '灵寿', code: '101090106' }, { city: '高邑', code: '101090107' }, { city: '深泽', code: '101090108' }, { city: '赞皇', code: '101090109' }, { city: '无极', code: '101090110' }, { city: '平山', code: '101090111' }, { city: '元氏', code: '101090112' }, { city: '赵县', code: '101090113' }, { city: '辛集', code: '101090114' }, { city: '藁城', code: '101090115' }, { city: '晋洲', code: '101090116' }, { city: '新乐', code: '101090117' }, { city: '保定', code: '101090201' }, { city: '满城', code: '101090202' }, { city: '阜平', code: '101090203' }, { city: '徐水', code: '101090204' }, { city: '唐县', code: '101090205' }, { city: '高阳', code: '101090206' }, { city: '容城', code: '101090207' }, { city: '紫荆关', code: '101090208' }, { city: '涞源', code: '101090209' }, { city: '望都', code: '101090210' }, { city: '安新', code: '101090211' }, { city: '易县', code: '101090212' }, { city: '涞水', code: '101090213' }, { city: '曲阳', code: '101090214' }, { city: '蠡县', code: '101090215' }, { city: '顺平', code: '101090216' }, { city: '雄县', code: '101090217' }, { city: '涿州', code: '101090218' }, { city: '定州', code: '101090219' }, { city: '安国', code: '101090220' }, { city: '高碑店', code: '101090221' }, { city: '张家口', code: '101090301' }, { city: '宣化', code: '101090302' }, { city: '张北', code: '101090303' }, { city: '康保', code: '101090304' }, { city: '沽源', code: '101090305' }, { city: '尚义', code: '101090306' }, { city: '蔚县', code: '101090307' }, { city: '阳原', code: '101090308' }, { city: '怀安', code: '101090309' }, { city: '万全', code: '101090310' }, { city: '怀来', code: '101090311' }, { city: '涿鹿', code: '101090312' }, { city: '赤城', code: '101090313' }, { city: '崇礼', code: '101090314' }, { city: '承德', code: '101090402' }, { city: '承德县', code: '101090403' }, { city: '兴隆', code: '101090404' }, { city: '平泉', code: '101090405' }, { city: '滦平', code: '101090406' }, { city: '隆化', code: '101090407' }, { city: '丰宁', code: '101090408' }, { city: '宽城', code: '101090409' }, { city: '围场', code: '101090410' }, { city: '塞罕坎', code: '101090411' }, { city: '唐山', code: '101090501' }, { city: '丰南', code: '101090502' }, { city: '丰润', code: '101090503' }, { city: '滦县', code: '101090504' }, { city: '滦南', code: '101090505' }, { city: '乐亭', code: '101090506' }, { city: '迁西', code: '101090507' }, { city: '玉田', code: '101090508' }, { city: '唐海', code: '101090509' }, { city: '遵化', code: '101090510' }, { city: '迁安', code: '101090511' }, { city: '廊坊', code: '101090601' }, { city: '固安', code: '101090602' }, { city: '永清', code: '101090603' }, { city: '香河', code: '101090604' }, { city: '大城', code: '101090605' }, { city: '文安', code: '101090606' }, { city: '大厂', code: '101090607' }, { city: '霸州', code: '101090608' }, { city: '三河', code: '101090609' }, { city: '沧州', code: '101090701' }, { city: '青县', code: '101090702' }, { city: '东光', code: '101090703' }, { city: '海兴', code: '101090704' }, { city: '盐山', code: '101090705' }, { city: '肃宁', code: '101090706' }, { city: '南皮', code: '101090707' }, { city: '吴桥', code: '101090708' }, { city: '献县', code: '101090709' }, { city: '孟村', code: '101090710' }, { city: '泊头', code: '101090711' }, { city: '任丘', code: '101090712' }, { city: '黄骅', code: '101090713' }, { city: '河间', code: '101090714' }, { city: '曹妃甸', code: '101090715' }, { city: '衡水', code: '101090801' }, { city: '枣强', code: '101090802' }, { city: '武邑', code: '101090803' }, { city: '武强', code: '101090804' }, { city: '饶阳', code: '101090805' }, { city: '安平', code: '101090806' }, { city: '故城', code: '101090807' }, { city: '景县', code: '101090808' }, { city: '阜城', code: '101090809' }, { city: '冀州', code: '101090810' }, { city: '深州', code: '101090811' }, { city: '邢台', code: '101090901' }, { city: '临城', code: '101090902' }, { city: '邢台县浆水', code: '101090903' }, { city: '内邱', code: '101090904' }, { city: '柏乡', code: '101090905' }, { city: '隆尧', code: '101090906' }, { city: '南和', code: '101090907' }, { city: '宁晋', code: '101090908' }, { city: '巨鹿', code: '101090909' }, { city: '新河', code: '101090910' }, { city: '广宗', code: '101090911' }, { city: '平乡', code: '101090912' }, { city: '威县', code: '101090913' }, { city: '清河', code: '101090914' }, { city: '临西', code: '101090915' }, { city: '南宫', code: '101090916' }, { city: '沙河', code: '101090917' }, { city: '任县', code: '101090918' }, { city: '邯郸', code: '101091001' }, { city: '峰峰', code: '101091002' }, { city: '临漳', code: '101091003' }, { city: '成安', code: '101091004' }, { city: '大名', code: '101091005' }, { city: '涉县', code: '101091006' }, { city: '磁县', code: '101091007' }, { city: '肥乡', code: '101091008' }, { city: '永年', code: '101091009' }, { city: '邱县', code: '101091010' }, { city: '鸡泽', code: '101091011' }, { city: '广平', code: '101091012' }, { city: '馆陶', code: '101091013' }, { city: '魏县', code: '101091014' }, { city: '曲周', code: '101091015' }, { city: '武安', code: '101091016' }, { city: '秦皇岛', code: '101091101' }, { city: '青龙', code: '101091102' }, { city: '昌黎', code: '101091103' }, { city: '抚宁', code: '101091104' }, { city: '卢龙', code: '101091105' }, { city: '北戴河', code: '101091106' }, { city: '太原', code: '101100101' }, { city: '清徐', code: '101100102' }, { city: '阳曲', code: '101100103' }, { city: '娄烦', code: '101100104' }, { city: '太原古交区', code: '101100105' }, { city: '太原北郊', code: '101100106' }, { city: '太原南郊', code: '101100107' }, { city: '大同', code: '101100201' }, { city: '阳高', code: '101100202' }, { city: '大同县', code: '101100203' }, { city: '天镇', code: '101100204' }, { city: '广灵', code: '101100205' }, { city: '灵邱', code: '101100206' }, { city: '浑源', code: '101100207' }, { city: '左云', code: '101100208' }, { city: '阳泉', code: '101100301' }, { city: '盂县', code: '101100302' }, { city: '平定', code: '101100303' }, { city: '晋中', code: '101100401' }, { city: '榆次', code: '101100402' }, { city: '榆社', code: '101100403' }, { city: '左权', code: '101100404' }, { city: '和顺', code: '101100405' }, { city: '昔阳', code: '101100406' }, { city: '寿阳', code: '101100407' }, { city: '太谷', code: '101100408' }, { city: '祁县', code: '101100409' }, { city: '平遥', code: '101100410' }, { city: '灵石', code: '101100411' }, { city: '介休', code: '101100412' }, { city: '长治', code: '101100501' }, { city: '黎城', code: '101100502' }, { city: '屯留', code: '101100503' }, { city: '潞城', code: '101100504' }, { city: '襄垣', code: '101100505' }, { city: '平顺', code: '101100506' }, { city: '武乡', code: '101100507' }, { city: '沁县', code: '101100508' }, { city: '长子', code: '101100509' }, { city: '沁源', code: '101100510' }, { city: '壶关', code: '101100511' }, { city: '晋城', code: '101100601' }, { city: '沁水', code: '101100602' }, { city: '阳城', code: '101100603' }, { city: '陵川', code: '101100604' }, { city: '高平', code: '101100605' }, { city: '临汾', code: '101100701' }, { city: '曲沃', code: '101100702' }, { city: '永和', code: '101100703' }, { city: '隰县', code: '101100704' }, { city: '大宁', code: '101100705' }, { city: '吉县', code: '101100706' }, { city: '襄汾', code: '101100707' }, { city: '蒲县', code: '101100708' }, { city: '汾西', code: '101100709' }, { city: '洪洞', code: '101100710' }, { city: '霍州', code: '101100711' }, { city: '乡宁', code: '101100712' }, { city: '翼城', code: '101100713' }, { city: '侯马', code: '101100714' }, { city: '浮山', code: '101100715' }, { city: '安泽', code: '101100716' }, { city: '古县', code: '101100717' }, { city: '运城', code: '101100801' }, { city: '临猗', code: '101100802' }, { city: '稷山', code: '101100803' }, { city: '万荣', code: '101100804' }, { city: '河津', code: '101100805' }, { city: '新绛', code: '101100806' }, { city: '绛县', code: '101100807' }, { city: '闻喜', code: '101100808' }, { city: '垣曲', code: '101100809' }, { city: '永济', code: '101100810' }, { city: '芮城', code: '101100811' }, { city: '夏县', code: '101100812' }, { city: '平陆', code: '101100813' }, { city: '朔州', code: '101100901' }, { city: '平鲁', code: '101100902' }, { city: '山阴', code: '101100903' }, { city: '右玉', code: '101100904' }, { city: '应县', code: '101100905' }, { city: '怀仁', code: '101100906' }, { city: '忻州', code: '101101001' }, { city: '定襄', code: '101101002' }, { city: '五台县豆村', code: '101101003' }, { city: '河曲', code: '101101004' }, { city: '偏关', code: '101101005' }, { city: '神池', code: '101101006' }, { city: '宁武', code: '101101007' }, { city: '代县', code: '101101008' }, { city: '繁峙', code: '101101009' }, { city: '五台山', code: '101101010' }, { city: '保德', code: '101101011' }, { city: '静乐', code: '101101012' }, { city: '岢岚', code: '101101013' }, { city: '五寨', code: '101101014' }, { city: '原平', code: '101101015' }, { city: '吕梁', code: '101101100' }, { city: '离石', code: '101101101' }, { city: '临县', code: '101101102' }, { city: '兴县', code: '101101103' }, { city: '岚县', code: '101101104' }, { city: '柳林', code: '101101105' }, { city: '石楼', code: '101101106' }, { city: '方山', code: '101101107' }, { city: '交口', code: '101101108' }, { city: '中阳', code: '101101109' }, { city: '孝义', code: '101101110' }, { city: '汾阳', code: '101101111' }, { city: '文水', code: '101101112' }, { city: '交城', code: '101101113' }, { city: '西安', code: '101110101' }, { city: '长安', code: '101110102' }, { city: '临潼', code: '101110103' }, { city: '蓝田', code: '101110104' }, { city: '周至', code: '101110105' }, { city: '户县', code: '101110106' }, { city: '高陵', code: '101110107' }, { city: '杨凌', code: '101110108' }, { city: '咸阳', code: '101110200' }, { city: '三原', code: '101110201' }, { city: '礼泉', code: '101110202' }, { city: '永寿', code: '101110203' }, { city: '淳化', code: '101110204' }, { city: '泾阳', code: '101110205' }, { city: '武功', code: '101110206' }, { city: '乾县', code: '101110207' }, { city: '彬县', code: '101110208' }, { city: '长武', code: '101110209' }, { city: '旬邑', code: '101110210' }, { city: '兴平', code: '101110211' }, { city: '延安', code: '101110300' }, { city: '延长', code: '101110301' }, { city: '延川', code: '101110302' }, { city: '子长', code: '101110303' }, { city: '宜川', code: '101110304' }, { city: '富县', code: '101110305' }, { city: '志丹', code: '101110306' }, { city: '安塞', code: '101110307' }, { city: '甘泉', code: '101110308' }, { city: '洛川', code: '101110309' }, { city: '黄陵', code: '101110310' }, { city: '黄龙', code: '101110311' }, { city: '吴起', code: '101110312' }, { city: '榆林', code: '101110401' }, { city: '府谷', code: '101110402' }, { city: '神木', code: '101110403' }, { city: '佳县', code: '101110404' }, { city: '定边', code: '101110405' }, { city: '靖边', code: '101110406' }, { city: '横山', code: '101110407' }, { city: '米脂', code: '101110408' }, { city: '子洲', code: '101110409' }, { city: '绥德', code: '101110410' }, { city: '吴堡', code: '101110411' }, { city: '清涧', code: '101110412' }, { city: '渭南', code: '101110501' }, { city: '华县', code: '101110502' }, { city: '潼关', code: '101110503' }, { city: '大荔', code: '101110504' }, { city: '白水', code: '101110505' }, { city: '富平', code: '101110506' }, { city: '蒲城', code: '101110507' }, { city: '澄城', code: '101110508' }, { city: '合阳', code: '101110509' }, { city: '韩城', code: '101110510' }, { city: '华阴', code: '101110511' }, { city: '华山', code: '101110512' }, { city: '商洛', code: '101110601' }, { city: '洛南', code: '101110602' }, { city: '柞水', code: '101110603' }, { city: '镇安', code: '101110605' }, { city: '丹凤', code: '101110606' }, { city: '商南', code: '101110607' }, { city: '山阳', code: '101110608' }, { city: '安康', code: '101110701' }, { city: '*', code: '101110702' }, { city: '石泉', code: '101110703' }, { city: '汉阴', code: '101110704' }, { city: '旬阳', code: '101110705' }, { city: '岚皋', code: '101110706' }, { city: '平利', code: '101110707' }, { city: '白河', code: '101110708' }, { city: '镇坪', code: '101110709' }, { city: '宁陕', code: '101110710' }, { city: '汉中', code: '101110801' }, { city: '略阳', code: '101110802' }, { city: '勉县', code: '101110803' }, { city: '留坝', code: '101110804' }, { city: '洋县', code: '101110805' }, { city: '城固', code: '101110806' }, { city: '西乡', code: '101110807' }, { city: '佛坪', code: '101110808' }, { city: '宁强', code: '101110809' }, { city: '南郑', code: '101110810' }, { city: '镇巴', code: '101110811' }, { city: '宝鸡', code: '101110901' }, { city: '宝鸡县', code: '101110902' }, { city: '千阳', code: '101110903' }, { city: '麟游', code: '101110904' }, { city: '岐山', code: '101110905' }, { city: '凤翔', code: '101110906' }, { city: '扶风', code: '101110907' }, { city: '眉县', code: '101110908' }, { city: '太白', code: '101110909' }, { city: '凤县', code: '101110910' }, { city: '陇县', code: '101110911' }, { city: '铜川', code: '101111001' }, { city: '耀县', code: '101111002' }, { city: '宜君', code: '101111003' }, { city: '济南', code: '101120101' }, { city: '长清', code: '101120102' }, { city: '商河', code: '101120103' }, { city: '章丘', code: '101120104' }, { city: '平阴', code: '101120105' }, { city: '济阳', code: '101120106' }, { city: '青岛', code: '101120201' }, { city: '崂山', code: '101120202' }, { city: '潮连岛', code: '101120203' }, { city: '即墨', code: '101120204' }, { city: '胶州', code: '101120205' }, { city: '胶南', code: '101120206' }, { city: '莱西', code: '101120207' }, { city: '平度', code: '101120208' }, { city: '淄博', code: '101120301' }, { city: '淄川', code: '101120302' }, { city: '博山', code: '101120303' }, { city: '高青', code: '101120304' }, { city: '周村', code: '101120305' }, { city: '沂源', code: '101120306' }, { city: '桓台', code: '101120307' }, { city: '临淄', code: '101120308' }, { city: '德州', code: '101120401' }, { city: '武城', code: '101120402' }, { city: '临邑', code: '101120403' }, { city: '陵县', code: '101120404' }, { city: '齐河', code: '101120405' }, { city: '乐陵', code: '101120406' }, { city: '庆云', code: '101120407' }, { city: '平原', code: '101120408' }, { city: '宁津', code: '101120409' }, { city: '夏津', code: '101120410' }, { city: '禹城', code: '101120411' }, { city: '烟台', code: '101120501' }, { city: '莱州', code: '101120502' }, { city: '长岛', code: '101120503' }, { city: '蓬莱', code: '101120504' }, { city: '龙口', code: '101120505' }, { city: '招远', code: '101120506' }, { city: '栖霞', code: '101120507' }, { city: '福山', code: '101120508' }, { city: '牟平', code: '101120509' }, { city: '莱阳', code: '101120510' }, { city: '海阳', code: '101120511' }, { city: '千里岩', code: '101120512' }, { city: '潍坊', code: '101120601' }, { city: '青州', code: '101120602' }, { city: '寿光', code: '101120603' }, { city: '临朐', code: '101120604' }, { city: '昌乐', code: '101120605' }, { city: '昌邑', code: '101120606' }, { city: '安丘', code: '101120607' }, { city: '高密', code: '101120608' }, { city: '诸城', code: '101120609' }, { city: '济宁', code: '101120701' }, { city: '嘉祥', code: '101120702' }, { city: '微山', code: '101120703' }, { city: '鱼台', code: '101120704' }, { city: '兖州', code: '101120705' }, { city: '金乡', code: '101120706' }, { city: '汶上', code: '101120707' }, { city: '泗水', code: '101120708' }, { city: '梁山', code: '101120709' }, { city: '曲阜', code: '101120710' }, { city: '邹城', code: '101120711' }, { city: '泰安', code: '101120801' }, { city: '新泰', code: '101120802' }, { city: '泰山', code: '101120803' }, { city: '肥城', code: '101120804' }, { city: '东平', code: '101120805' }, { city: '宁阳', code: '101120806' }, { city: '临沂', code: '101120901' }, { city: '莒南', code: '101120902' }, { city: '沂南', code: '101120903' }, { city: '苍山', code: '101120904' }, { city: '临沭', code: '101120905' }, { city: '郯城', code: '101120906' }, { city: '蒙阴', code: '101120907' }, { city: '平邑', code: '101120908' }, { city: '费县', code: '101120909' }, { city: '沂水', code: '101120910' }, { city: '马站', code: '101120911' }, { city: '菏泽', code: '101121001' }, { city: '鄄城', code: '101121002' }, { city: '郓城', code: '101121003' }, { city: '东明', code: '101121004' }, { city: '定陶', code: '101121005' }, { city: '巨野', code: '101121006' }, { city: '曹县', code: '101121007' }, { city: '成武', code: '101121008' }, { city: '单县', code: '101121009' }, { city: '滨州', code: '101121101' }, { city: '博兴', code: '101121102' }, { city: '无棣', code: '101121103' }, { city: '阳信', code: '101121104' }, { city: '惠民', code: '101121105' }, { city: '沾化', code: '101121106' }, { city: '邹平', code: '101121107' }, { city: '东营', code: '101121201' }, { city: '河口', code: '101121202' }, { city: '垦利', code: '101121203' }, { city: '利津', code: '101121204' }, { city: '广饶', code: '101121205' }, { city: '威海', code: '101121301' }, { city: '文登', code: '101121302' }, { city: '荣成', code: '101121303' }, { city: '乳山', code: '101121304' }, { city: '成山头', code: '101121305' }, { city: '石岛', code: '101121306' }, { city: '枣庄', code: '101121401' }, { city: '薛城', code: '101121402' }, { city: '峄城', code: '101121403' }, { city: '台儿庄', code: '101121404' }, { city: '滕州', code: '101121405' }, { city: '日照', code: '101121501' }, { city: '五莲', code: '101121502' }, { city: '莒县', code: '101121503' }, { city: '莱芜', code: '101121601' }, { city: '聊城', code: '101121701' }, { city: '冠县', code: '101121702' }, { city: '阳谷', code: '101121703' }, { city: '高唐', code: '101121704' }, { city: '茌平', code: '101121705' }, { city: '东阿', code: '101121706' }, { city: '临清', code: '101121707' }, { city: '朝城', code: '101121708' }, { city: '莘县', code: '101121709' }, { city: '乌鲁木齐', code: '101130101' }, { city: '蔡家湖', code: '101130102' }, { city: '小渠子', code: '101130103' }, { city: '巴仑台', code: '101130104' }, { city: '达坂城', code: '101130105' }, { city: '十三间房气象站', code: '101130106' }, { city: '天山大西沟', code: '101130107' }, { city: '乌鲁木齐牧试站', code: '101130108' }, { city: '天池', code: '101130109' }, { city: '白杨沟', code: '101130110' }, { city: '克拉玛依', code: '101130201' }, { city: '石河子', code: '101130301' }, { city: '炮台', code: '101130302' }, { city: '莫索湾', code: '101130303' }, { city: '乌兰乌苏', code: '101130304' }, { city: '昌吉', code: '101130401' }, { city: '呼图壁', code: '101130402' }, { city: '米泉', code: '101130403' }, { city: '阜康', code: '101130404' }, { city: '吉木萨尔', code: '101130405' }, { city: '奇台', code: '101130406' }, { city: '玛纳斯', code: '101130407' }, { city: '木垒', code: '101130408' }, { city: '北塔山', code: '101130409' }, { city: '吐鲁番', code: '101130501' }, { city: '托克逊', code: '101130502' }, { city: '吐鲁番东坎', code: '101130503' }, { city: '鄯善', code: '101130504' }, { city: '红柳河', code: '101130505' }, { city: '库尔勒', code: '101130601' }, { city: '轮台', code: '101130602' }, { city: '尉犁', code: '101130603' }, { city: '若羌', code: '101130604' }, { city: '且末', code: '101130605' }, { city: '和静', code: '101130606' }, { city: '焉耆', code: '101130607' }, { city: '和硕', code: '101130608' }, { city: '库米什', code: '101130609' }, { city: '巴音布鲁克', code: '101130610' }, { city: '铁干里克', code: '101130611' }, { city: '博湖', code: '101130612' }, { city: '塔中', code: '101130613' }, { city: '阿拉尔', code: '101130701' }, { city: '阿克苏', code: '101130801' }, { city: '乌什', code: '101130802' }, { city: '温宿', code: '101130803' }, { city: '拜城', code: '101130804' }, { city: '新和', code: '101130805' }, { city: '沙雅', code: '101130806' }, { city: '库车', code: '101130807' }, { city: '柯坪', code: '101130808' }, { city: '阿瓦提', code: '101130809' }, { city: '喀什', code: '101130901' }, { city: '英吉沙', code: '101130902' }, { city: '塔什库尔干', code: '101130903' }, { city: '麦盖提', code: '101130904' }, { city: '莎车', code: '101130905' }, { city: '叶城', code: '101130906' }, { city: '泽普', code: '101130907' }, { city: '巴楚', code: '101130908' }, { city: '岳普湖', code: '101130909' }, { city: '伽师', code: '101130910' }, { city: '伊宁', code: '101131001' }, { city: '察布查尔', code: '101131002' }, { city: '尼勒克', code: '101131003' }, { city: '伊宁县', code: '101131004' }, { city: '巩留', code: '101131005' }, { city: '新源', code: '101131006' }, { city: '昭苏', code: '101131007' }, { city: '特克斯', code: '101131008' }, { city: '霍城', code: '101131009' }, { city: '霍尔果斯', code: '101131010' }, { city: '塔城', code: '101131101' }, { city: '裕民', code: '101131102' }, { city: '额敏', code: '101131103' }, { city: '和布克赛尔', code: '101131104' }, { city: '托里', code: '101131105' }, { city: '乌苏', code: '101131106' }, { city: '沙湾', code: '101131107' }, { city: '和丰', code: '101131108' }, { city: '哈密', code: '101131201' }, { city: '沁城', code: '101131202' }, { city: '巴里坤', code: '101131203' }, { city: '伊吾', code: '101131204' }, { city: '淖毛湖', code: '101131205' }, { city: '和田', code: '101131301' }, { city: '皮山', code: '101131302' }, { city: '策勒', code: '101131303' }, { city: '墨玉', code: '101131304' }, { city: '洛浦', code: '101131305' }, { city: '民丰', code: '101131306' }, { city: '于田', code: '101131307' }, { city: '阿勒泰', code: '101131401' }, { city: '哈巴河', code: '101131402' }, { city: '一八五团', code: '101131403' }, { city: '黑山头', code: '101131404' }, { city: '吉木乃', code: '101131405' }, { city: '布尔津', code: '101131406' }, { city: '福海', code: '101131407' }, { city: '富蕴', code: '101131408' }, { city: '青河', code: '101131409' }, { city: '安德河', code: '101131410' }, { city: '阿图什', code: '101131501' }, { city: '乌恰', code: '101131502' }, { city: '阿克陶', code: '101131503' }, { city: '阿合奇', code: '101131504' }, { city: '吐尔尕特', code: '101131505' }, { city: '博乐', code: '101131601' }, { city: '温泉', code: '101131602' }, { city: '精河', code: '101131603' }, { city: '阿拉山口', code: '101131606' }, { city: '拉萨', code: '101140101' }, { city: '当雄', code: '101140102' }, { city: '尼木', code: '101140103' }, { city: '墨竹贡卡', code: '101140104' }, { city: '日喀则', code: '101140201' }, { city: '拉孜', code: '101140202' }, { city: '南木林', code: '101140203' }, { city: '聂拉木', code: '101140204' }, { city: '定日', code: '101140205' }, { city: '江孜', code: '101140206' }, { city: '帕里', code: '101140207' }, { city: '山南', code: '101140301' }, { city: '贡嘎', code: '101140302' }, { city: '琼结', code: '101140303' }, { city: '加查', code: '101140304' }, { city: '浪卡子', code: '101140305' }, { city: '错那', code: '101140306' }, { city: '隆子', code: '101140307' }, { city: '泽当', code: '101140308' }, { city: '林芝', code: '101140401' }, { city: '波密', code: '101140402' }, { city: '米林', code: '101140403' }, { city: '察隅', code: '101140404' }, { city: '昌都', code: '101140501' }, { city: '丁青', code: '101140502' }, { city: '类乌齐', code: '101140503' }, { city: '洛隆', code: '101140504' }, { city: '左贡', code: '101140505' }, { city: '芒康', code: '101140506' }, { city: '八宿', code: '101140507' }, { city: '那曲', code: '101140601' }, { city: '嘉黎', code: '101140603' }, { city: '班戈', code: '101140604' }, { city: '安多', code: '101140605' }, { city: '索县', code: '101140606' }, { city: '比如', code: '101140607' }, { city: '阿里', code: '101140701' }, { city: '改则', code: '101140702' }, { city: '申扎', code: '101140703' }, { city: '狮泉河', code: '101140704' }, { city: '普兰', code: '101140705' }, { city: '西宁', code: '101150101' }, { city: '大通', code: '101150102' }, { city: '湟源', code: '101150103' }, { city: '湟中', code: '101150104' }, { city: '铁卜加', code: '101150105' }, { city: '铁卜加寺', code: '101150106' }, { city: '中心站', code: '101150107' }, { city: '海东', code: '101150201' }, { city: '乐都', code: '101150202' }, { city: '民和', code: '101150203' }, { city: '互助', code: '101150204' }, { city: '化隆', code: '101150205' }, { city: '循化', code: '101150206' }, { city: '冷湖', code: '101150207' }, { city: '平安', code: '101150208' }, { city: '黄南', code: '101150301' }, { city: '尖扎', code: '101150302' }, { city: '泽库', code: '101150303' }, { city: '河南', code: '101150304' }, { city: '海南', code: '101150401' }, { city: '江西沟', code: '101150402' }, { city: '贵德', code: '101150404' }, { city: '河卡', code: '101150405' }, { city: '兴海', code: '101150406' }, { city: '贵南', code: '101150407' }, { city: '同德', code: '101150408' }, { city: '共和', code: '101150409' }, { city: '果洛', code: '101150501' }, { city: '班玛', code: '101150502' }, { city: '甘德', code: '101150503' }, { city: '达日', code: '101150504' }, { city: '久治', code: '101150505' }, { city: '玛多', code: '101150506' }, { city: '清水河', code: '101150507' }, { city: '玛沁', code: '101150508' }, { city: '玉树', code: '101150601' }, { city: '托托河', code: '101150602' }, { city: '治多', code: '101150603' }, { city: '杂多', code: '101150604' }, { city: '囊谦', code: '101150605' }, { city: '曲麻莱', code: '101150606' }, { city: '海西', code: '101150701' }, { city: '格尔木', code: '101150702' }, { city: '察尔汉', code: '101150703' }, { city: '野牛沟', code: '101150704' }, { city: '五道梁', code: '101150705' }, { city: '小灶火', code: '101150706' }, { city: '天峻', code: '101150708' }, { city: '乌兰', code: '101150709' }, { city: '都兰', code: '101150710' }, { city: '诺木洪', code: '101150711' }, { city: '茫崖', code: '101150712' }, { city: '大柴旦', code: '101150713' }, { city: '茶卡', code: '101150714' }, { city: '香日德', code: '101150715' }, { city: '德令哈', code: '101150716' }, { city: '海北', code: '101150801' }, { city: '门源', code: '101150802' }, { city: '祁连', code: '101150803' }, { city: '海晏', code: '101150804' }, { city: '托勒', code: '101150805' }, { city: '刚察', code: '101150806' }, { city: '兰州', code: '101160101' }, { city: '皋兰', code: '101160102' }, { city: '永登', code: '101160103' }, { city: '榆中', code: '101160104' }, { city: '定西', code: '101160201' }, { city: '通渭', code: '101160202' }, { city: '陇西', code: '101160203' }, { city: '渭源', code: '101160204' }, { city: '临洮', code: '101160205' }, { city: '漳县', code: '101160206' }, { city: '岷县', code: '101160207' }, { city: '安定', code: '101160208' }, { city: '平凉', code: '101160301' }, { city: '泾川', code: '101160302' }, { city: '灵台', code: '101160303' }, { city: '崇信', code: '101160304' }, { city: '华亭', code: '101160305' }, { city: '庄浪', code: '101160306' }, { city: '静宁', code: '101160307' }, { city: '崆峒', code: '101160308' }, { city: '庆阳', code: '101160401' }, { city: '西峰', code: '101160402' }, { city: '环县', code: '101160403' }, { city: '华池', code: '101160404' }, { city: '合水', code: '101160405' }, { city: '正宁', code: '101160406' }, { city: '宁县', code: '101160407' }, { city: '镇原', code: '101160408' }, { city: '庆城', code: '101160409' }, { city: '武威', code: '101160501' }, { city: '民勤', code: '101160502' }, { city: '古浪', code: '101160503' }, { city: '乌鞘岭', code: '101160504' }, { city: '天祝', code: '101160505' }, { city: '金昌', code: '101160601' }, { city: '永昌', code: '101160602' }, { city: '张掖', code: '101160701' }, { city: '肃南', code: '101160702' }, { city: '民乐', code: '101160703' }, { city: '临泽', code: '101160704' }, { city: '高台', code: '101160705' }, { city: '山丹', code: '101160706' }, { city: '酒泉', code: '101160801' }, { city: '鼎新', code: '101160802' }, { city: '金塔', code: '101160803' }, { city: '马鬃山', code: '101160804' }, { city: '瓜州', code: '101160805' }, { city: '肃北', code: '101160806' }, { city: '玉门镇', code: '101160807' }, { city: '敦煌', code: '101160808' }, { city: '天水', code: '101160901' }, { city: '北道区', code: '101160902' }, { city: '清水', code: '101160903' }, { city: '秦安', code: '101160904' }, { city: '甘谷', code: '101160905' }, { city: '武山', code: '101160906' }, { city: '张家川', code: '101160907' }, { city: '麦积', code: '101160908' }, { city: '武都', code: '101161001' }, { city: '成县', code: '101161002' }, { city: '文县', code: '101161003' }, { city: '宕昌', code: '101161004' }, { city: '康县', code: '101161005' }, { city: '西和', code: '101161006' }, { city: '礼县', code: '101161007' }, { city: '徽县', code: '101161008' }, { city: '两当', code: '101161009' }, { city: '临夏', code: '101161101' }, { city: '康乐', code: '101161102' }, { city: '永靖', code: '101161103' }, { city: '广河', code: '101161104' }, { city: '和政', code: '101161105' }, { city: '东乡', code: '101161106' }, { city: '合作', code: '101161201' }, { city: '临潭', code: '101161202' }, { city: '卓尼', code: '101161203' }, { city: '舟曲', code: '101161204' }, { city: '迭部', code: '101161205' }, { city: '玛曲', code: '101161206' }, { city: '碌曲', code: '101161207' }, { city: '夏河', code: '101161208' }, { city: '白银', code: '101161301' }, { city: '靖远', code: '101161302' }, { city: '会宁', code: '101161303' }, { city: '华家岭', code: '101161304' }, { city: '景泰', code: '101161305' }, { city: '银川', code: '101170101' }, { city: '永宁', code: '101170102' }, { city: '灵武', code: '101170103' }, { city: '贺兰', code: '101170104' }, { city: '石嘴山', code: '101170201' }, { city: '惠农', code: '101170202' }, { city: '平罗', code: '101170203' }, { city: '陶乐', code: '101170204' }, { city: '石炭井', code: '101170205' }, { city: '大武口', code: '101170206' }, { city: '吴忠', code: '101170301' }, { city: '同心', code: '101170302' }, { city: '盐池', code: '101170303' }, { city: '韦州', code: '101170304' }, { city: '麻黄山', code: '101170305' }, { city: '青铜峡', code: '101170306' }, { city: '固原', code: '101170401' }, { city: '西吉', code: '101170402' }, { city: '隆德', code: '101170403' }, { city: '泾源', code: '101170404' }, { city: '六盘山', code: '101170405' }, { city: '彭阳', code: '101170406' }, { city: '中卫', code: '101170501' }, { city: '中宁', code: '101170502' }, { city: '兴仁堡', code: '101170503' }, { city: '海原', code: '101170504' }, { city: '郑州', code: '101180101' }, { city: '巩义', code: '101180102' }, { city: '荥阳', code: '101180103' }, { city: '登封', code: '101180104' }, { city: '新密', code: '101180105' }, { city: '新郑', code: '101180106' }, { city: '中牟', code: '101180107' }, { city: '郑州农试站', code: '101180108' }, { city: '安阳', code: '101180201' }, { city: '汤阴', code: '101180202' }, { city: '滑县', code: '101180203' }, { city: '内黄', code: '101180204' }, { city: '林州', code: '101180205' }, { city: '新乡', code: '101180301' }, { city: '获嘉', code: '101180302' }, { city: '原阳', code: '101180303' }, { city: '辉县', code: '101180304' }, { city: '卫辉', code: '101180305' }, { city: '延津', code: '101180306' }, { city: '封丘', code: '101180307' }, { city: '长垣', code: '101180308' }, { city: '许昌', code: '101180401' }, { city: '鄢陵', code: '101180402' }, { city: '襄城', code: '101180403' }, { city: '长葛', code: '101180404' }, { city: '禹州', code: '101180405' }, { city: '平顶山', code: '101180501' }, { city: '郏县', code: '101180502' }, { city: '宝丰', code: '101180503' }, { city: '汝州', code: '101180504' }, { city: '叶县', code: '101180505' }, { city: '舞钢', code: '101180506' }, { city: '鲁山', code: '101180507' }, { city: '信阳', code: '101180601' }, { city: '息县', code: '101180602' }, { city: '罗山', code: '101180603' }, { city: '光山', code: '101180604' }, { city: '新县', code: '101180605' }, { city: '淮滨', code: '101180606' }, { city: '潢川', code: '101180607' }, { city: '固始', code: '101180608' }, { city: '商城', code: '101180609' }, { city: '鸡公山', code: '101180610' }, { city: '信阳地区农试站', code: '101180611' }, { city: '南阳', code: '101180701' }, { city: '南召', code: '101180702' }, { city: '方城', code: '101180703' }, { city: '社旗', code: '101180704' }, { city: '西峡', code: '101180705' }, { city: '内乡', code: '101180706' }, { city: '镇平', code: '101180707' }, { city: '淅川', code: '101180708' }, { city: '新野', code: '101180709' }, { city: '唐河', code: '101180710' }, { city: '邓州', code: '101180711' }, { city: '桐柏', code: '101180712' }, { city: '开封', code: '101180801' }, { city: '杞县', code: '101180802' }, { city: '尉氏', code: '101180803' }, { city: '通许', code: '101180804' }, { city: '兰考', code: '101180805' }, { city: '洛阳', code: '101180901' }, { city: '新安', code: '101180902' }, { city: '孟津', code: '101180903' }, { city: '宜阳', code: '101180904' }, { city: '洛宁', code: '101180905' }, { city: '伊川', code: '101180906' }, { city: '嵩县', code: '101180907' }, { city: '偃师', code: '101180908' }, { city: '栾川', code: '101180909' }, { city: '汝阳', code: '101180910' }, { city: '商丘', code: '101181001' }, { city: '睢阳区', code: '101181002' }, { city: '睢县', code: '101181003' }, { city: '民权', code: '101181004' }, { city: '虞城', code: '101181005' }, { city: '柘城', code: '101181006' }, { city: '宁陵', code: '101181007' }, { city: '夏邑', code: '101181008' }, { city: '永城', code: '101181009' }, { city: '焦作', code: '101181101' }, { city: '修武', code: '101181102' }, { city: '武陟', code: '101181103' }, { city: '沁阳', code: '101181104' }, { city: '博爱', code: '101181106' }, { city: '温县', code: '101181107' }, { city: '孟州', code: '101181108' }, { city: '鹤壁', code: '101181201' }, { city: '浚县', code: '101181202' }, { city: '淇县', code: '101181203' }, { city: '濮阳', code: '101181301' }, { city: '台前', code: '101181302' }, { city: '南乐', code: '101181303' }, { city: '清丰', code: '101181304' }, { city: '范县', code: '101181305' }, { city: '周口', code: '101181401' }, { city: '扶沟', code: '101181402' }, { city: '太康', code: '101181403' }, { city: '淮阳', code: '101181404' }, { city: '西华', code: '101181405' }, { city: '商水', code: '101181406' }, { city: '项城', code: '101181407' }, { city: '郸城', code: '101181408' }, { city: '鹿邑', code: '101181409' }, { city: '沈丘', code: '101181410' }, { city: '黄泛区', code: '101181411' }, { city: '漯河', code: '101181501' }, { city: '临颍', code: '101181502' }, { city: '舞阳', code: '101181503' }, { city: '驻马店', code: '101181601' }, { city: '西平', code: '101181602' }, { city: '遂平', code: '101181603' }, { city: '上蔡', code: '101181604' }, { city: '汝南', code: '101181605' }, { city: '泌阳', code: '101181606' }, { city: '平舆', code: '101181607' }, { city: '新蔡', code: '101181608' }, { city: '确山', code: '101181609' }, { city: '正阳', code: '101181610' }, { city: '三门峡', code: '101181701' }, { city: '灵宝', code: '101181702' }, { city: '渑池', code: '101181703' }, { city: '卢氏', code: '101181704' }, { city: '济源', code: '101181801' }, { city: '南京', code: '101190101' }, { city: '溧水', code: '101190102' }, { city: '高淳', code: '101190103' }, { city: '江宁', code: '101190104' }, { city: '六合', code: '101190105' }, { city: '江浦', code: '101190106' }, { city: '浦口', code: '101190107' }, { city: '无锡', code: '101190201' }, { city: '江阴', code: '101190202' }, { city: '宜兴', code: '101190203' }, { city: '镇江', code: '101190301' }, { city: '丹阳', code: '101190302' }, { city: '扬中', code: '101190303' }, { city: '句容', code: '101190304' }, { city: '丹徒', code: '101190305' }, { city: '苏州', code: '101190401' }, { city: '常熟', code: '101190402' }, { city: '张家港', code: '101190403' }, { city: '昆山', code: '101190404' }, { city: '吴县东山', code: '101190405' }, { city: '吴县', code: '101190406' }, { city: '吴江', code: '101190407' }, { city: '太仓', code: '101190408' }, { city: '南通', code: '101190501' }, { city: '海安', code: '101190502' }, { city: '如皋', code: '101190503' }, { city: '如东', code: '101190504' }, { city: '吕泗', code: '101190505' }, { city: '吕泗渔场', code: '101190506' }, { city: '启东', code: '101190507' }, { city: '海门', code: '101190508' }, { city: '通州', code: '101190509' }, { city: '扬州', code: '101190601' }, { city: '宝应', code: '101190602' }, { city: '仪征', code: '101190603' }, { city: '高邮', code: '101190604' }, { city: '江都', code: '101190605' }, { city: '邗江', code: '101190606' }, { city: '盐城', code: '101190701' }, { city: '响水', code: '101190702' }, { city: '滨海', code: '101190703' }, { city: '阜宁', code: '101190704' }, { city: '射阳', code: '101190705' }, { city: '建湖', code: '101190706' }, { city: '东台', code: '101190707' }, { city: '大丰', code: '101190708' }, { city: '盐都', code: '101190709' }, { city: '徐州', code: '101190801' }, { city: '徐州农试站', code: '101190802' }, { city: '丰县', code: '101190803' }, { city: '沛县', code: '101190804' }, { city: '邳州', code: '101190805' }, { city: '睢宁', code: '101190806' }, { city: '新沂', code: '101190807' }, { city: '淮安', code: '101190901' }, { city: '金湖', code: '101190902' }, { city: '盱眙', code: '101190903' }, { city: '洪泽', code: '101190904' }, { city: '涟水', code: '101190905' }, { city: '淮阴县', code: '101190906' }, { city: '淮阴', code: '101190907' }, { city: '楚州', code: '101190908' }, { city: '连云港', code: '101191001' }, { city: '东海', code: '101191002' }, { city: '赣榆', code: '101191003' }, { city: '灌云', code: '101191004' }, { city: '灌南', code: '101191005' }, { city: '西连岛', code: '101191006' }, { city: '燕尾港', code: '101191007' }, { city: '常州', code: '101191101' }, { city: '溧阳', code: '101191102' }, { city: '金坛', code: '101191103' }, { city: '泰州', code: '101191201' }, { city: '兴化', code: '101191202' }, { city: '泰兴', code: '101191203' }, { city: '姜堰', code: '101191204' }, { city: '靖江', code: '101191205' }, { city: '宿迁', code: '101191301' }, { city: '沭阳', code: '101191302' }, { city: '泗阳', code: '101191303' }, { city: '泗洪', code: '101191304' }, { city: '武汉', code: '101200101' }, { city: '蔡甸', code: '101200102' }, { city: '黄陂', code: '101200103' }, { city: '新洲', code: '101200104' }, { city: '江夏', code: '101200105' }, { city: '襄樊', code: '101200201' }, { city: '襄阳', code: '101200202' }, { city: '保康', code: '101200203' }, { city: '南漳', code: '101200204' }, { city: '宜城', code: '101200205' }, { city: '老河口', code: '101200206' }, { city: '谷城', code: '101200207' }, { city: '枣阳', code: '101200208' }, { city: '鄂州', code: '101200301' }, { city: '孝感', code: '101200401' }, { city: '安陆', code: '101200402' }, { city: '云梦', code: '101200403' }, { city: '大悟', code: '101200404' }, { city: '应城', code: '101200405' }, { city: '汉川', code: '101200406' }, { city: '黄冈', code: '101200501' }, { city: '红安', code: '101200502' }, { city: '麻城', code: '101200503' }, { city: '罗田', code: '101200504' }, { city: '英山', code: '101200505' }, { city: '浠水', code: '101200506' }, { city: '蕲春', code: '101200507' }, { city: '黄梅', code: '101200508' }, { city: '武穴', code: '101200509' }, { city: '黄石', code: '101200601' }, { city: '大冶', code: '101200602' }, { city: '阳新', code: '101200603' }, { city: '咸宁', code: '101200701' }, { city: '赤壁', code: '101200702' }, { city: '嘉鱼', code: '101200703' }, { city: '崇阳', code: '101200704' }, { city: '通城', code: '101200705' }, { city: '通山', code: '101200706' }, { city: '荆州', code: '101200801' }, { city: '江陵', code: '101200802' }, { city: '*', code: '101200803' }, { city: '石首', code: '101200804' }, { city: '监利', code: '101200805' }, { city: '洪湖', code: '101200806' }, { city: '松滋', code: '101200807' }, { city: '宜昌', code: '101200901' }, { city: '远安', code: '101200902' }, { city: '秭归', code: '101200903' }, { city: '兴山', code: '101200904' }, { city: '宜昌县', code: '101200905' }, { city: '五峰', code: '101200906' }, { city: '当阳', code: '101200907' }, { city: '长阳', code: '101200908' }, { city: '宜都', code: '101200909' }, { city: '枝江', code: '101200910' }, { city: '三峡', code: '101200911' }, { city: '夷陵', code: '101200912' }, { city: '恩施', code: '101201001' }, { city: '利川', code: '101201002' }, { city: '建始', code: '101201003' }, { city: '咸丰', code: '101201004' }, { city: '宣恩', code: '101201005' }, { city: '鹤峰', code: '101201006' }, { city: '来凤', code: '101201007' }, { city: '巴东', code: '101201008' }, { city: '绿葱坡', code: '101201009' }, { city: '十堰', code: '101201101' }, { city: '竹溪', code: '101201102' }, { city: '郧西', code: '101201103' }, { city: '郧县', code: '101201104' }, { city: '竹山', code: '101201105' }, { city: '房县', code: '101201106' }, { city: '丹江口', code: '101201107' }, { city: '神农架', code: '101201201' }, { city: '随州', code: '101201301' }, { city: '广水', code: '101201302' }, { city: '荆门', code: '101201401' }, { city: '钟祥', code: '101201402' }, { city: '京山', code: '101201403' }, { city: '天门', code: '101201501' }, { city: '仙桃', code: '101201601' }, { city: '潜江', code: '101201701' }, { city: '杭州', code: '101210101' }, { city: '萧山', code: '101210102' }, { city: '桐庐', code: '101210103' }, { city: '淳安', code: '101210104' }, { city: '建德', code: '101210105' }, { city: '余杭', code: '101210106' }, { city: '临安', code: '101210107' }, { city: '富阳', code: '101210108' }, { city: '湖州', code: '101210201' }, { city: '长兴', code: '101210202' }, { city: '安吉', code: '101210203' }, { city: '德清', code: '101210204' }, { city: '嘉兴', code: '101210301' }, { city: '嘉善', code: '101210302' }, { city: '海宁', code: '101210303' }, { city: '桐乡', code: '101210304' }, { city: '平湖', code: '101210305' }, { city: '海盐', code: '101210306' }, { city: '宁波', code: '101210401' }, { city: '慈溪', code: '101210403' }, { city: '余姚', code: '101210404' }, { city: '奉化', code: '101210405' }, { city: '象山', code: '101210406' }, { city: '石浦', code: '101210407' }, { city: '宁海', code: '101210408' }, { city: '鄞县', code: '101210409' }, { city: '北仑', code: '101210410' }, { city: '鄞州', code: '101210411' }, { city: '镇海', code: '101210412' }, { city: '绍兴', code: '101210501' }, { city: '诸暨', code: '101210502' }, { city: '上虞', code: '101210503' }, { city: '新昌', code: '101210504' }, { city: '嵊州', code: '101210505' }, { city: '台州', code: '101210601' }, { city: '括苍山', code: '101210602' }, { city: '玉环', code: '101210603' }, { city: '三门', code: '101210604' }, { city: '天台', code: '101210605' }, { city: '仙居', code: '101210606' }, { city: '温岭', code: '101210607' }, { city: '大陈', code: '101210608' }, { city: '洪家', code: '101210609' }, { city: '温州', code: '101210701' }, { city: '泰顺', code: '101210702' }, { city: '文成', code: '101210703' }, { city: '平阳', code: '101210704' }, { city: '瑞安', code: '101210705' }, { city: '洞头', code: '101210706' }, { city: '乐清', code: '101210707' }, { city: '永嘉', code: '101210708' }, { city: '苍南', code: '101210709' }, { city: '丽水', code: '101210801' }, { city: '遂昌', code: '101210802' }, { city: '龙泉', code: '101210803' }, { city: '缙云', code: '101210804' }, { city: '青田', code: '101210805' }, { city: '云和', code: '101210806' }, { city: '庆元', code: '101210807' }, { city: '金华', code: '101210901' }, { city: '浦江', code: '101210902' }, { city: '兰溪', code: '101210903' }, { city: '义乌', code: '101210904' }, { city: '东阳', code: '101210905' }, { city: '武义', code: '101210906' }, { city: '永康', code: '101210907' }, { city: '磐安', code: '101210908' }, { city: '衢州', code: '101211001' }, { city: '常山', code: '101211002' }, { city: '开化', code: '101211003' }, { city: '龙游', code: '101211004' }, { city: '*', code: '101211005' }, { city: '舟山', code: '101211101' }, { city: '嵊泗', code: '101211102' }, { city: '嵊山', code: '101211103' }, { city: '岱山', code: '101211104' }, { city: '普陀', code: '101211105' }, { city: '定海', code: '101211106' }, { city: '合肥', code: '101220101' }, { city: '长丰', code: '101220102' }, { city: '肥东', code: '101220103' }, { city: '肥西', code: '101220104' }, { city: '蚌埠', code: '101220201' }, { city: '怀远', code: '101220202' }, { city: '固镇', code: '101220203' }, { city: '五河', code: '101220204' }, { city: '芜湖', code: '101220301' }, { city: '繁昌', code: '101220302' }, { city: '芜湖县', code: '101220303' }, { city: '南陵', code: '101220304' }, { city: '淮南', code: '101220401' }, { city: '凤台', code: '101220402' }, { city: '马鞍山', code: '101220501' }, { city: '当涂', code: '101220502' }, { city: '安庆', code: '101220601' }, { city: '枞阳', code: '101220602' }, { city: '太湖', code: '101220603' }, { city: '潜山', code: '101220604' }, { city: '怀宁', code: '101220605' }, { city: '宿松', code: '101220606' }, { city: '望江', code: '101220607' }, { city: '岳西', code: '101220608' }, { city: '桐城', code: '101220609' }, { city: '宿州', code: '101220701' }, { city: '砀山', code: '101220702' }, { city: '灵璧', code: '101220703' }, { city: '泗县', code: '101220704' }, { city: '萧县', code: '101220705' }, { city: '阜阳', code: '101220801' }, { city: '阜南', code: '101220802' }, { city: '颍上', code: '101220803' }, { city: '临泉', code: '101220804' }, { city: '界首', code: '101220805' }, { city: '太和', code: '101220806' }, { city: '亳州', code: '101220901' }, { city: '涡阳', code: '101220902' }, { city: '利辛', code: '101220903' }, { city: '蒙城', code: '101220904' }, { city: '黄山站', code: '101221001' }, { city: '黄山区', code: '101221002' }, { city: '屯溪', code: '101221003' }, { city: '祁门', code: '101221004' }, { city: '黟县', code: '101221005' }, { city: '歙县', code: '101221006' }, { city: '休宁', code: '101221007' }, { city: '黄山市', code: '101221008' }, { city: '滁州', code: '101221101' }, { city: '凤阳', code: '101221102' }, { city: '明光', code: '101221103' }, { city: '定远', code: '101221104' }, { city: '全椒', code: '101221105' }, { city: '来安', code: '101221106' }, { city: '天长', code: '101221107' }, { city: '淮北', code: '101221201' }, { city: '濉溪', code: '101221202' }, { city: '铜陵', code: '101221301' }, { city: '宣城', code: '101221401' }, { city: '泾县', code: '101221402' }, { city: '旌德', code: '101221403' }, { city: '宁国', code: '101221404' }, { city: '绩溪', code: '101221405' }, { city: '广德', code: '101221406' }, { city: '郎溪', code: '101221407' }, { city: '六安', code: '101221501' }, { city: '霍邱', code: '101221502' }, { city: '寿县', code: '101221503' }, { city: '南溪', code: '101221504' }, { city: '金寨', code: '101221505' }, { city: '霍山', code: '101221506' }, { city: '舒城', code: '101221507' }, { city: '巢湖', code: '101221601' }, { city: '庐江', code: '101221602' }, { city: '无为', code: '101221603' }, { city: '含山', code: '101221604' }, { city: '和县', code: '101221605' }, { city: '池州', code: '101221701' }, { city: '东至', code: '101221702' }, { city: '青阳', code: '101221703' }, { city: '九华山', code: '101221704' }, { city: '石台', code: '101221705' }, { city: '福州', code: '101230101' }, { city: '闽清', code: '101230102' }, { city: '闽侯', code: '101230103' }, { city: '罗源', code: '101230104' }, { city: '连江', code: '101230105' }, { city: '马祖', code: '101230106' }, { city: '永泰', code: '101230107' }, { city: '平潭', code: '101230108' }, { city: '福州郊区', code: '101230109' }, { city: '长乐', code: '101230110' }, { city: '福清', code: '101230111' }, { city: '平潭海峡大桥', code: '101230112' }, { city: '厦门', code: '101230201' }, { city: '同安', code: '101230202' }, { city: '宁德', code: '101230301' }, { city: '古田', code: '101230302' }, { city: '霞浦', code: '101230303' }, { city: '寿宁', code: '101230304' }, { city: '周宁', code: '101230305' }, { city: '福安', code: '101230306' }, { city: '柘荣', code: '101230307' }, { city: '福鼎', code: '101230308' }, { city: '屏南', code: '101230309' }, { city: '莆田', code: '101230401' }, { city: '仙游', code: '101230402' }, { city: '秀屿港', code: '101230403' }, { city: '泉州', code: '101230501' }, { city: '安溪', code: '101230502' }, { city: '九仙山', code: '101230503' }, { city: '永春', code: '101230504' }, { city: '德化', code: '101230505' }, { city: '南安', code: '101230506' }, { city: '崇武', code: '101230507' }, { city: '金山', code: '101230508' }, { city: '晋江', code: '101230509' }, { city: '漳州', code: '101230601' }, { city: '长泰', code: '101230602' }, { city: '南靖', code: '101230603' }, { city: '平和', code: '101230604' }, { city: '龙海', code: '101230605' }, { city: '漳浦', code: '101230606' }, { city: '诏安', code: '101230607' }, { city: '东山', code: '101230608' }, { city: '云霄', code: '101230609' }, { city: '华安', code: '101230610' }, { city: '龙岩', code: '101230701' }, { city: '长汀', code: '101230702' }, { city: '连城', code: '101230703' }, { city: '武平', code: '101230704' }, { city: '上杭', code: '101230705' }, { city: '永定', code: '101230706' }, { city: '漳平', code: '101230707' }, { city: '三明', code: '101230801' }, { city: '宁化', code: '101230802' }, { city: '清流', code: '101230803' }, { city: '泰宁', code: '101230804' }, { city: '将乐', code: '101230805' }, { city: '建宁', code: '101230806' }, { city: '明溪', code: '101230807' }, { city: '沙县', code: '101230808' }, { city: '尤溪', code: '101230809' }, { city: '永安', code: '101230810' }, { city: '大田', code: '101230811' }, { city: '南平', code: '101230901' }, { city: '顺昌', code: '101230902' }, { city: '光泽', code: '101230903' }, { city: '邵武', code: '101230904' }, { city: '武夷山', code: '101230905' }, { city: '浦城', code: '101230906' }, { city: '建阳', code: '101230907' }, { city: '松溪', code: '101230908' }, { city: '政和', code: '101230909' }, { city: '建瓯', code: '101230910' }, { city: '南昌', code: '101240101' }, { city: '新建', code: '101240102' }, { city: '南昌县', code: '101240103' }, { city: '安义', code: '101240104' }, { city: '进贤', code: '101240105' }, { city: '莲塘', code: '101240106' }, { city: '九江', code: '101240201' }, { city: '瑞昌', code: '101240202' }, { city: '庐山', code: '101240203' }, { city: '武宁', code: '101240204' }, { city: '德安', code: '101240205' }, { city: '永修', code: '101240206' }, { city: '湖口', code: '101240207' }, { city: '彭泽', code: '101240208' }, { city: '星子', code: '101240209' }, { city: '都昌', code: '101240210' }, { city: '棠荫', code: '101240211' }, { city: '修水', code: '101240212' }, { city: '上饶', code: '101240301' }, { city: '鄱阳', code: '101240302' }, { city: '婺源', code: '101240303' }, { city: '康山', code: '101240304' }, { city: '余干', code: '101240305' }, { city: '万年', code: '101240306' }, { city: '德兴', code: '101240307' }, { city: '上饶县', code: '101240308' }, { city: '弋阳', code: '101240309' }, { city: '横峰', code: '101240310' }, { city: '铅山', code: '101240311' }, { city: '玉山', code: '101240312' }, { city: '广丰', code: '101240313' }, { city: '波阳', code: '101240314' }, { city: '抚州', code: '101240401' }, { city: '广昌', code: '101240402' }, { city: '乐安', code: '101240403' }, { city: '崇仁', code: '101240404' }, { city: '金溪', code: '101240405' }, { city: '资溪', code: '101240406' }, { city: '宜黄', code: '101240407' }, { city: '南城', code: '101240408' }, { city: '南丰', code: '101240409' }, { city: '黎川', code: '101240410' }, { city: '东乡', code: '101240411' }, { city: '宜春', code: '101240501' }, { city: '铜鼓', code: '101240502' }, { city: '宜丰', code: '101240503' }, { city: '万载', code: '101240504' }, { city: '上高', code: '101240505' }, { city: '靖安', code: '101240506' }, { city: '奉新', code: '101240507' }, { city: '高安', code: '101240508' }, { city: '樟树', code: '101240509' }, { city: '丰城', code: '101240510' }, { city: '吉安', code: '101240601' }, { city: '吉安县', code: '101240602' }, { city: '吉水', code: '101240603' }, { city: '新干', code: '101240604' }, { city: '峡江', code: '101240605' }, { city: '永丰', code: '101240606' }, { city: '永新', code: '101240607' }, { city: '井冈山', code: '101240608' }, { city: '万安', code: '101240609' }, { city: '遂川', code: '101240610' }, { city: '泰和', code: '101240611' }, { city: '安福', code: '101240612' }, { city: '宁冈', code: '101240613' }, { city: '赣州', code: '101240701' }, { city: '崇义', code: '101240702' }, { city: '上犹', code: '101240703' }, { city: '南康', code: '101240704' }, { city: '大余', code: '101240705' }, { city: '信丰', code: '101240706' }, { city: '宁都', code: '101240707' }, { city: '石城', code: '101240708' }, { city: '瑞金', code: '101240709' }, { city: '于都', code: '101240710' }, { city: '会昌', code: '101240711' }, { city: '安远', code: '101240712' }, { city: '全南', code: '101240713' }, { city: '龙南', code: '101240714' }, { city: '定南', code: '101240715' }, { city: '寻乌', code: '101240716' }, { city: '兴国', code: '101240717' }, { city: '景德镇', code: '101240801' }, { city: '乐平', code: '101240802' }, { city: '萍乡', code: '101240901' }, { city: '莲花', code: '101240902' }, { city: '新余', code: '101241001' }, { city: '分宜', code: '101241002' }, { city: '鹰潭', code: '101241101' }, { city: '余江', code: '101241102' }, { city: '贵溪', code: '101241103' }, { city: '长沙', code: '101250101' }, { city: '宁乡', code: '101250102' }, { city: '浏阳', code: '101250103' }, { city: '马坡岭', code: '101250104' }, { city: '湘潭', code: '101250201' }, { city: '韶山', code: '101250202' }, { city: '湘乡', code: '101250203' }, { city: '株洲', code: '101250301' }, { city: '攸县', code: '101250302' }, { city: '醴陵', code: '101250303' }, { city: '株洲县', code: '101250304' }, { city: '茶陵', code: '101250305' }, { city: '炎陵', code: '101250306' }, { city: '衡阳', code: '101250401' }, { city: '衡山', code: '101250402' }, { city: '衡东', code: '101250403' }, { city: '祁东', code: '101250404' }, { city: '衡阳县', code: '101250405' }, { city: '常宁', code: '101250406' }, { city: '衡南', code: '101250407' }, { city: '耒阳', code: '101250408' }, { city: '南岳', code: '101250409' }, { city: '郴州', code: '101250501' }, { city: '桂阳', code: '101250502' }, { city: '嘉禾', code: '101250503' }, { city: '宜章', code: '101250504' }, { city: '临武', code: '101250505' }, { city: '桥口', code: '101250506' }, { city: '资兴', code: '101250507' }, { city: '汝城', code: '101250508' }, { city: '安仁', code: '101250509' }, { city: '永兴', code: '101250510' }, { city: '桂东', code: '101250511' }, { city: '常德', code: '101250601' }, { city: '安乡', code: '101250602' }, { city: '桃源', code: '101250603' }, { city: '汉寿', code: '101250604' }, { city: '澧县', code: '101250605' }, { city: '临澧', code: '101250606' }, { city: '石门', code: '101250607' }, { city: '益阳', code: '101250700' }, { city: '赫山区', code: '101250701' }, { city: '南县', code: '101250702' }, { city: '桃江', code: '101250703' }, { city: '安化', code: '101250704' }, { city: '沅江', code: '101250705' }, { city: '娄底', code: '101250801' }, { city: '双峰', code: '101250802' }, { city: '冷水江', code: '101250803' }, { city: '冷水滩', code: '101250804' }, { city: '新化', code: '101250805' }, { city: '涟源', code: '101250806' }, { city: '邵阳', code: '101250901' }, { city: '隆回', code: '101250902' }, { city: '洞口', code: '101250903' }, { city: '新邵', code: '101250904' }, { city: '邵东', code: '101250905' }, { city: '绥宁', code: '101250906' }, { city: '新宁', code: '101250907' }, { city: '武冈', code: '101250908' }, { city: '城步', code: '101250909' }, { city: '邵阳县', code: '101250910' }, { city: '岳阳', code: '101251001' }, { city: '华容', code: '101251002' }, { city: '湘阴', code: '101251003' }, { city: '汨罗', code: '101251004' }, { city: '平江', code: '101251005' }, { city: '临湘', code: '101251006' }, { city: '张家界', code: '101251101' }, { city: '桑植', code: '101251102' }, { city: '慈利', code: '101251103' }, { city: '怀化', code: '101251201' }, { city: '鹤城区', code: '101251202' }, { city: '沅陵', code: '101251203' }, { city: '辰溪', code: '101251204' }, { city: '靖州', code: '101251205' }, { city: '会同', code: '101251206' }, { city: '通道', code: '101251207' }, { city: '麻阳', code: '101251208' }, { city: '新晃', code: '101251209' }, { city: '芷江', code: '101251210' }, { city: '溆浦', code: '101251211' }, { city: '黔阳', code: '101251301' }, { city: '洪江', code: '101251302' }, { city: '永州', code: '101251401' }, { city: '祁阳', code: '101251402' }, { city: '东安', code: '101251403' }, { city: '双牌', code: '101251404' }, { city: '道县', code: '101251405' }, { city: '宁远', code: '101251406' }, { city: '江永', code: '101251407' }, { city: '蓝山', code: '101251408' }, { city: '新田', code: '101251409' }, { city: '江华', code: '101251410' }, { city: '吉首', code: '101251501' }, { city: '保靖', code: '101251502' }, { city: '永顺', code: '101251503' }, { city: '古丈', code: '101251504' }, { city: '凤凰', code: '101251505' }, { city: '泸溪', code: '101251506' }, { city: '龙山', code: '101251507' }, { city: '花垣', code: '101251508' }, { city: '贵阳', code: '101260101' }, { city: '白云', code: '101260102' }, { city: '花溪', code: '101260103' }, { city: '乌当', code: '101260104' }, { city: '息烽', code: '101260105' }, { city: '开阳', code: '101260106' }, { city: '修文', code: '101260107' }, { city: '清镇', code: '101260108' }, { city: '遵义', code: '101260201' }, { city: '遵义县', code: '101260202' }, { city: '仁怀', code: '101260203' }, { city: '绥阳', code: '101260204' }, { city: '湄潭', code: '101260205' }, { city: '凤冈', code: '101260206' }, { city: '桐梓', code: '101260207' }, { city: '赤水', code: '101260208' }, { city: '习水', code: '101260209' }, { city: '道真', code: '101260210' }, { city: '正安', code: '101260211' }, { city: '务川', code: '101260212' }, { city: '余庆', code: '101260213' }, { city: '汇川', code: '101260214' }, { city: '安顺', code: '101260301' }, { city: '普定', code: '101260302' }, { city: '镇宁', code: '101260303' }, { city: '平坝', code: '101260304' }, { city: '紫云', code: '101260305' }, { city: '关岭', code: '101260306' }, { city: '都匀', code: '101260401' }, { city: '贵定', code: '101260402' }, { city: '瓮安', code: '101260403' }, { city: '长顺', code: '101260404' }, { city: '福泉', code: '101260405' }, { city: '惠水', code: '101260406' }, { city: '龙里', code: '101260407' }, { city: '罗甸', code: '101260408' }, { city: '平塘', code: '101260409' }, { city: '独山', code: '101260410' }, { city: '三都', code: '101260411' }, { city: '荔波', code: '101260412' }, { city: '凯里', code: '101260501' }, { city: '岑巩', code: '101260502' }, { city: '施秉', code: '101260503' }, { city: '镇远', code: '101260504' }, { city: '黄平', code: '101260505' }, { city: '黄平旧洲', code: '101260506' }, { city: '麻江', code: '101260507' }, { city: '丹寨', code: '101260508' }, { city: '三穗', code: '101260509' }, { city: '台江', code: '101260510' }, { city: '剑河', code: '101260511' }, { city: '雷山', code: '101260512' }, { city: '黎平', code: '101260513' }, { city: '天柱', code: '101260514' }, { city: '锦屏', code: '101260515' }, { city: '榕江', code: '101260516' }, { city: '从江', code: '101260517' }, { city: '炉山', code: '101260518' }, { city: '铜仁', code: '101260601' }, { city: '江口', code: '101260602' }, { city: '玉屏', code: '101260603' }, { city: '万山', code: '101260604' }, { city: '思南', code: '101260605' }, { city: '塘头', code: '101260606' }, { city: '印江', code: '101260607' }, { city: '石阡', code: '101260608' }, { city: '沿河', code: '101260609' }, { city: '德江', code: '101260610' }, { city: '松桃', code: '101260611' }, { city: '毕节', code: '101260701' }, { city: '赫章', code: '101260702' }, { city: '金沙', code: '101260703' }, { city: '威宁', code: '101260704' }, { city: '大方', code: '101260705' }, { city: '纳雍', code: '101260706' }, { city: '织金', code: '101260707' }, { city: '六盘水', code: '101260801' }, { city: '六枝', code: '101260802' }, { city: '水城', code: '101260803' }, { city: '盘县', code: '101260804' }, { city: '黔西', code: '101260901' }, { city: '晴隆', code: '101260902' }, { city: '兴仁', code: '101260903' }, { city: '贞丰', code: '101260904' }, { city: '望谟', code: '101260905' }, { city: '兴义', code: '101260906' }, { city: '安龙', code: '101260907' }, { city: '册亨', code: '101260908' }, { city: '普安', code: '101260909' }, { city: '成都', code: '101270101' }, { city: '龙泉驿', code: '101270102' }, { city: '新都', code: '101270103' }, { city: '温江', code: '101270104' }, { city: '金堂', code: '101270105' }, { city: '双流', code: '101270106' }, { city: '郫县', code: '101270107' }, { city: '大邑', code: '101270108' }, { city: '蒲江', code: '101270109' }, { city: '新津', code: '101270110' }, { city: '都江堰', code: '101270111' }, { city: '彭州', code: '101270112' }, { city: '邛崃', code: '101270113' }, { city: '崇州', code: '101270114' }, { city: '崇庆', code: '101270115' }, { city: '彭县', code: '101270116' }, { city: '攀枝花', code: '101270201' }, { city: '仁和', code: '101270202' }, { city: '米易', code: '101270203' }, { city: '盐边', code: '101270204' }, { city: '自贡', code: '101270301' }, { city: '富顺', code: '101270302' }, { city: '荣县', code: '101270303' }, { city: '绵阳', code: '101270401' }, { city: '三台', code: '101270402' }, { city: '盐亭', code: '101270403' }, { city: '安县', code: '101270404' }, { city: '梓潼', code: '101270405' }, { city: '北川', code: '101270406' }, { city: '平武', code: '101270407' }, { city: '江油', code: '101270408' }, { city: '南充', code: '101270501' }, { city: '南部', code: '101270502' }, { city: '营山', code: '101270503' }, { city: '蓬安', code: '101270504' }, { city: '仪陇', code: '101270505' }, { city: '西充', code: '101270506' }, { city: '阆中', code: '101270507' }, { city: '达州', code: '101270601' }, { city: '宣汉', code: '101270602' }, { city: '开江', code: '101270603' }, { city: '大竹', code: '101270604' }, { city: '渠县', code: '101270605' }, { city: '万源', code: '101270606' }, { city: '达川', code: '101270607' }, { city: '遂宁', code: '101270701' }, { city: '蓬溪', code: '101270702' }, { city: '射洪', code: '101270703' }, { city: '广安', code: '101270801' }, { city: '岳池', code: '101270802' }, { city: '武胜', code: '101270803' }, { city: '邻水', code: '101270804' }, { city: '华蓥山', code: '101270805' }, { city: '巴中', code: '101270901' }, { city: '通江', code: '101270902' }, { city: '南江', code: '101270903' }, { city: '平昌', code: '101270904' }, { city: '泸州', code: '101271001' }, { city: '泸县', code: '101271003' }, { city: '合江', code: '101271004' }, { city: '叙永', code: '101271005' }, { city: '古蔺', code: '101271006' }, { city: '纳溪', code: '101271007' }, { city: '宜宾', code: '101271101' }, { city: '宜宾农试站', code: '101271102' }, { city: '宜宾县', code: '101271103' }, { city: '南溪', code: '101271104' }, { city: '江安', code: '101271105' }, { city: '长宁', code: '101271106' }, { city: '高县', code: '101271107' }, { city: '珙县', code: '101271108' }, { city: '筠连', code: '101271109' }, { city: '兴文', code: '101271110' }, { city: '屏山', code: '101271111' }, { city: '内江', code: '101271201' }, { city: '东兴', code: '101271202' }, { city: '威远', code: '101271203' }, { city: '资中', code: '101271204' }, { city: '隆昌', code: '101271205' }, { city: '资阳', code: '101271301' }, { city: '安岳', code: '101271302' }, { city: '乐至', code: '101271303' }, { city: '简阳', code: '101271304' }, { city: '乐山', code: '101271401' }, { city: '犍为', code: '101271402' }, { city: '井研', code: '101271403' }, { city: '夹江', code: '101271404' }, { city: '沐川', code: '101271405' }, { city: '峨边', code: '101271406' }, { city: '马边', code: '101271407' }, { city: '峨眉', code: '101271408' }, { city: '峨眉山', code: '101271409' }, { city: '眉山', code: '101271501' }, { city: '仁寿', code: '101271502' }, { city: '彭山', code: '101271503' }, { city: '洪雅', code: '101271504' }, { city: '丹棱', code: '101271505' }, { city: '青神', code: '101271506' }, { city: '凉山', code: '101271601' }, { city: '木里', code: '101271603' }, { city: '盐源', code: '101271604' }, { city: '德昌', code: '101271605' }, { city: '会理', code: '101271606' }, { city: '会东', code: '101271607' }, { city: '宁南', code: '101271608' }, { city: '普格', code: '101271609' }, { city: '西昌', code: '101271610' }, { city: '金阳', code: '101271611' }, { city: '昭觉', code: '101271612' }, { city: '喜德', code: '101271613' }, { city: '冕宁', code: '101271614' }, { city: '越西', code: '101271615' }, { city: '甘洛', code: '101271616' }, { city: '雷波', code: '101271617' }, { city: '美姑', code: '101271618' }, { city: '布拖', code: '101271619' }, { city: '雅安', code: '101271701' }, { city: '名山', code: '101271702' }, { city: '荣经', code: '101271703' }, { city: '汉源', code: '101271704' }, { city: '石棉', code: '101271705' }, { city: '天全', code: '101271706' }, { city: '芦山', code: '101271707' }, { city: '宝兴', code: '101271708' }, { city: '甘孜', code: '101271801' }, { city: '康定', code: '101271802' }, { city: '泸定', code: '101271803' }, { city: '丹巴', code: '101271804' }, { city: '九龙', code: '101271805' }, { city: '雅江', code: '101271806' }, { city: '道孚', code: '101271807' }, { city: '炉霍', code: '101271808' }, { city: '新龙', code: '101271809' }, { city: '德格', code: '101271810' }, { city: '白玉', code: '101271811' }, { city: '石渠', code: '101271812' }, { city: '色达', code: '101271813' }, { city: '理塘', code: '101271814' }, { city: '巴塘', code: '101271815' }, { city: '乡城', code: '101271816' }, { city: '稻城', code: '101271817' }, { city: '得荣', code: '101271818' }, { city: '阿坝', code: '101271901' }, { city: '汶川', code: '101271902' }, { city: '理县', code: '101271903' }, { city: '茂县', code: '101271904' }, { city: '松潘', code: '101271905' }, { city: '九寨沟', code: '101271906' }, { city: '金川', code: '101271907' }, { city: '小金', code: '101271908' }, { city: '黑水', code: '101271909' }, { city: '马尔康', code: '101271910' }, { city: '壤塘', code: '101271911' }, { city: '若尔盖', code: '101271912' }, { city: '红原', code: '101271913' }, { city: '南坪', code: '101271914' }, { city: '德阳', code: '101272001' }, { city: '中江', code: '101272002' }, { city: '广汉', code: '101272003' }, { city: '什邡', code: '101272004' }, { city: '绵竹', code: '101272005' }, { city: '罗江', code: '101272006' }, { city: '广元', code: '101272101' }, { city: '旺苍', code: '101272102' }, { city: '青川', code: '101272103' }, { city: '剑阁', code: '101272104' }, { city: '苍溪', code: '101272105' }, { city: '广州', code: '101280101' }, { city: '番禺', code: '101280102' }, { city: '从化', code: '101280103' }, { city: '增城', code: '101280104' }, { city: '花都', code: '101280105' }, { city: '天河', code: '101280106' }, { city: '韶关', code: '101280201' }, { city: '乳源', code: '101280202' }, { city: '始兴', code: '101280203' }, { city: '翁源', code: '101280204' }, { city: '乐昌', code: '101280205' }, { city: '仁化', code: '101280206' }, { city: '南雄', code: '101280207' }, { city: '新丰', code: '101280208' }, { city: '曲江', code: '101280209' }, { city: '惠州', code: '101280301' }, { city: '博罗', code: '101280302' }, { city: '惠阳', code: '101280303' }, { city: '惠东', code: '101280304' }, { city: '龙门', code: '101280305' }, { city: '梅州', code: '101280401' }, { city: '兴宁', code: '101280402' }, { city: '蕉岭', code: '101280403' }, { city: '大埔', code: '101280404' }, { city: '丰顺', code: '101280406' }, { city: '平远', code: '101280407' }, { city: '五华', code: '101280408' }, { city: '梅县', code: '101280409' }, { city: '汕头', code: '101280501' }, { city: '潮阳', code: '101280502' }, { city: '澄海', code: '101280503' }, { city: '南澳', code: '101280504' }, { city: '云澳', code: '101280505' }, { city: '南澎岛', code: '101280506' }, { city: '深圳', code: '101280601' }, { city: '珠海', code: '101280701' }, { city: '斗门', code: '101280702' }, { city: '黄茅洲', code: '101280703' }, { city: '佛山', code: '101280800' }, { city: '顺德', code: '101280801' }, { city: '三水', code: '101280802' }, { city: '南海', code: '101280803' }, { city: '肇庆', code: '101280901' }, { city: '广宁', code: '101280902' }, { city: '四会', code: '101280903' }, { city: '德庆', code: '101280905' }, { city: '怀集', code: '101280906' }, { city: '封开', code: '101280907' }, { city: '高要', code: '101280908' }, { city: '湛江', code: '101281001' }, { city: '吴川', code: '101281002' }, { city: '雷州', code: '101281003' }, { city: '徐闻', code: '101281004' }, { city: '廉江', code: '101281005' }, { city: '硇洲', code: '101281006' }, { city: '遂溪', code: '101281007' }, { city: '江门', code: '101281101' }, { city: '开平', code: '101281103' }, { city: '新会', code: '101281104' }, { city: '恩平', code: '101281105' }, { city: '台山', code: '101281106' }, { city: '上川岛', code: '101281107' }, { city: '鹤山', code: '101281108' }, { city: '河源', code: '101281201' }, { city: '紫金', code: '101281202' }, { city: '连平', code: '101281203' }, { city: '和平', code: '101281204' }, { city: '龙川', code: '101281205' }, { city: '清远', code: '101281301' }, { city: '连南', code: '101281302' }, { city: '连州', code: '101281303' }, { city: '连山', code: '101281304' }, { city: '阳山', code: '101281305' }, { city: '佛冈', code: '101281306' }, { city: '英德', code: '101281307' }, { city: '云浮', code: '101281401' }, { city: '罗定', code: '101281402' }, { city: '新兴', code: '101281403' }, { city: '郁南', code: '101281404' }, { city: '潮州', code: '101281501' }, { city: '饶平', code: '101281502' }, { city: '东莞', code: '101281601' }, { city: '中山', code: '101281701' }, { city: '阳江', code: '101281801' }, { city: '阳春', code: '101281802' }, { city: '揭阳', code: '101281901' }, { city: '揭西', code: '101281902' }, { city: '普宁', code: '101281903' }, { city: '惠来', code: '101281904' }, { city: '茂名', code: '101282001' }, { city: '高州', code: '101282002' }, { city: '化州', code: '101282003' }, { city: '电白', code: '101282004' }, { city: '信宜', code: '101282005' }, { city: '汕尾', code: '101282101' }, { city: '海丰', code: '101282102' }, { city: '陆丰', code: '101282103' }, { city: '遮浪', code: '101282104' }, { city: '东沙岛', code: '101282105' }, { city: '昆明', code: '101290101' }, { city: '昆明农试站', code: '101290102' }, { city: '东川', code: '101290103' }, { city: '寻甸', code: '101290104' }, { city: '晋宁', code: '101290105' }, { city: '宜良', code: '101290106' }, { city: '石林', code: '101290107' }, { city: '呈贡', code: '101290108' }, { city: '富民', code: '101290109' }, { city: '嵩明', code: '101290110' }, { city: '禄劝', code: '101290111' }, { city: '安宁', code: '101290112' }, { city: '太华山', code: '101290113' }, { city: '河口', code: '101290114' }, { city: '大理', code: '101290201' }, { city: '云龙', code: '101290202' }, { city: '漾鼻', code: '101290203' }, { city: '永平', code: '101290204' }, { city: '宾川', code: '101290205' }, { city: '弥渡', code: '101290206' }, { city: '祥云', code: '101290207' }, { city: '魏山', code: '101290208' }, { city: '剑川', code: '101290209' }, { city: '洱源', code: '101290210' }, { city: '鹤庆', code: '101290211' }, { city: '南涧', code: '101290212' }, { city: '红河', code: '101290301' }, { city: '石屏', code: '101290302' }, { city: '建水', code: '101290303' }, { city: '弥勒', code: '101290304' }, { city: '元阳', code: '101290305' }, { city: '绿春', code: '101290306' }, { city: '开远', code: '101290307' }, { city: '个旧', code: '101290308' }, { city: '蒙自', code: '101290309' }, { city: '屏边', code: '101290310' }, { city: '泸西', code: '101290311' }, { city: '金平', code: '101290312' }, { city: '曲靖', code: '101290401' }, { city: '沾益', code: '101290402' }, { city: '陆良', code: '101290403' }, { city: '富源', code: '101290404' }, { city: '马龙', code: '101290405' }, { city: '师宗', code: '101290406' }, { city: '罗平', code: '101290407' }, { city: '会泽', code: '101290408' }, { city: '宣威', code: '101290409' }, { city: '保山', code: '101290501' }, { city: '富宁', code: '101290502' }, { city: '龙陵', code: '101290503' }, { city: '施甸', code: '101290504' }, { city: '昌宁', code: '101290505' }, { city: '腾冲', code: '101290506' }, { city: '文山', code: '101290601' }, { city: '西畴', code: '101290602' }, { city: '马关', code: '101290603' }, { city: '麻栗坡', code: '101290604' }, { city: '砚山', code: '101290605' }, { city: '邱北', code: '101290606' }, { city: '广南', code: '101290607' }, { city: '玉溪', code: '101290701' }, { city: '澄江', code: '101290702' }, { city: '江川', code: '101290703' }, { city: '通海', code: '101290704' }, { city: '华宁', code: '101290705' }, { city: '新平', code: '101290706' }, { city: '易门', code: '101290707' }, { city: '峨山', code: '101290708' }, { city: '元江', code: '101290709' }, { city: '楚雄', code: '101290801' }, { city: '大姚', code: '101290802' }, { city: '元谋', code: '101290803' }, { city: '姚安', code: '101290804' }, { city: '牟定', code: '101290805' }, { city: '南华', code: '101290806' }, { city: '武定', code: '101290807' }, { city: '禄丰', code: '101290808' }, { city: '双柏', code: '101290809' }, { city: '永仁', code: '101290810' }, { city: '普洱', code: '101290901' }, { city: '景谷', code: '101290902' }, { city: '景东', code: '101290903' }, { city: '澜沧', code: '101290904' }, { city: '普洱', code: '101290905' }, { city: '墨江', code: '101290906' }, { city: '江城', code: '101290907' }, { city: '孟连', code: '101290908' }, { city: '西盟', code: '101290909' }, { city: '镇源', code: '101290910' }, { city: '镇沅', code: '101290911' }, { city: '宁洱', code: '101290912' }, { city: '昭通', code: '101291001' }, { city: '鲁甸', code: '101291002' }, { city: '彝良', code: '101291003' }, { city: '镇雄', code: '101291004' }, { city: '威信', code: '101291005' }, { city: '巧家', code: '101291006' }, { city: '绥江', code: '101291007' }, { city: '永善', code: '101291008' }, { city: '盐津', code: '101291009' }, { city: '大关', code: '101291010' }, { city: '临沧', code: '101291101' }, { city: '沧源', code: '101291102' }, { city: '耿马', code: '101291103' }, { city: '双江', code: '101291104' }, { city: '凤庆', code: '101291105' }, { city: '永德', code: '101291106' }, { city: '云县', code: '101291107' }, { city: '镇康', code: '101291108' }, { city: '怒江', code: '101291201' }, { city: '福贡', code: '101291203' }, { city: '兰坪', code: '101291204' }, { city: '泸水', code: '101291205' }, { city: '六库', code: '101291206' }, { city: '贡山', code: '101291207' }, { city: '香格里拉', code: '101291301' }, { city: '德钦', code: '101291302' }, { city: '维西', code: '101291303' }, { city: '中甸', code: '101291304' }, { city: '丽江', code: '101291401' }, { city: '永胜', code: '101291402' }, { city: '华坪', code: '101291403' }, { city: '宁蒗', code: '101291404' }, { city: '德宏', code: '101291501' }, { city: '潞江坝', code: '101291502' }, { city: '陇川', code: '101291503' }, { city: '盈江', code: '101291504' }, { city: '畹町镇', code: '101291505' }, { city: '瑞丽', code: '101291506' }, { city: '梁河', code: '101291507' }, { city: '潞西', code: '101291508' }, { city: '景洪', code: '101291601' }, { city: '大勐龙', code: '101291602' }, { city: '勐海', code: '101291603' }, { city: '景洪电站', code: '101291604' }, { city: '勐腊', code: '101291605' }, { city: '南宁', code: '101300101' }, { city: '南宁城区', code: '101300102' }, { city: '邕宁', code: '101300103' }, { city: '横县', code: '101300104' }, { city: '隆安', code: '101300105' }, { city: '马山', code: '101300106' }, { city: '上林', code: '101300107' }, { city: '武鸣', code: '101300108' }, { city: '宾阳', code: '101300109' }, { city: '硕龙', code: '101300110' }, { city: '崇左', code: '101300201' }, { city: '天等', code: '101300202' }, { city: '龙州', code: '101300203' }, { city: '凭祥', code: '101300204' }, { city: '大新', code: '101300205' }, { city: '扶绥', code: '101300206' }, { city: '宁明', code: '101300207' }, { city: '海渊', code: '101300208' }, { city: '柳州', code: '101300301' }, { city: '柳城', code: '101300302' }, { city: '沙塘', code: '101300303' }, { city: '鹿寨', code: '101300304' }, { city: '柳江', code: '101300305' }, { city: '融安', code: '101300306' }, { city: '融水', code: '101300307' }, { city: '三江', code: '101300308' }, { city: '来宾', code: '101300401' }, { city: '忻城', code: '101300402' }, { city: '金秀', code: '101300403' }, { city: '象州', code: '101300404' }, { city: '武宣', code: '101300405' }, { city: '桂林', code: '101300501' }, { city: '桂林农试站', code: '101300502' }, { city: '龙胜', code: '101300503' }, { city: '永福', code: '101300504' }, { city: '临桂', code: '101300505' }, { city: '兴安', code: '101300506' }, { city: '灵川', code: '101300507' }, { city: '全州', code: '101300508' }, { city: '灌阳', code: '101300509' }, { city: '阳朔', code: '101300510' }, { city: '恭城', code: '101300511' }, { city: '平乐', code: '101300512' }, { city: '荔浦', code: '101300513' }, { city: '资源', code: '101300514' }, { city: '梧州', code: '101300601' }, { city: '藤县', code: '101300602' }, { city: '太平', code: '101300603' }, { city: '苍梧', code: '101300604' }, { city: '蒙山', code: '101300605' }, { city: '岑溪', code: '101300606' }, { city: '贺州', code: '101300701' }, { city: '昭平', code: '101300702' }, { city: '富川', code: '101300703' }, { city: '钟山', code: '101300704' }, { city: '信都', code: '101300705' }, { city: '贵港', code: '101300801' }, { city: '桂平', code: '101300802' }, { city: '平南', code: '101300803' }, { city: '玉林', code: '101300901' }, { city: '博白', code: '101300902' }, { city: '北流', code: '101300903' }, { city: '容县', code: '101300904' }, { city: '陆川', code: '101300905' }, { city: '百色', code: '101301001' }, { city: '那坡', code: '101301002' }, { city: '田阳', code: '101301003' }, { city: '德保', code: '101301004' }, { city: '靖西', code: '101301005' }, { city: '田东', code: '101301006' }, { city: '平果', code: '101301007' }, { city: '隆林', code: '101301008' }, { city: '西林', code: '101301009' }, { city: '乐业', code: '101301010' }, { city: '凌云', code: '101301011' }, { city: '田林', code: '101301012' }, { city: '钦州', code: '101301101' }, { city: '浦北', code: '101301102' }, { city: '灵山', code: '101301103' }, { city: '河池', code: '101301201' }, { city: '天峨', code: '101301202' }, { city: '东兰', code: '101301203' }, { city: '巴马', code: '101301204' }, { city: '环江', code: '101301205' }, { city: '罗城', code: '101301206' }, { city: '宜州', code: '101301207' }, { city: '凤山', code: '101301208' }, { city: '南丹', code: '101301209' }, { city: '都安', code: '101301210' }, { city: '北海', code: '101301301' }, { city: '合浦', code: '101301302' }, { city: '涠洲岛', code: '101301303' }, { city: '防城港', code: '101301401' }, { city: '上思', code: '101301402' }, { city: '东兴', code: '101301403' }, { city: '板栏', code: '101301404' }, { city: '防城', code: '101301405' }, { city: '海口', code: '101310101' }, { city: '琼山', code: '101310102' }, { city: '三亚', code: '101310201' }, { city: '东方', code: '101310202' }, { city: '临高', code: '101310203' }, { city: '澄迈', code: '101310204' }, { city: '儋州', code: '101310205' }, { city: '昌江', code: '101310206' }, { city: '白沙', code: '101310207' }, { city: '琼中', code: '101310208' }, { city: '定安', code: '101310209' }, { city: '屯昌', code: '101310210' }, { city: '琼海', code: '101310211' }, { city: '文昌', code: '101310212' }, { city: '清兰', code: '101310213' }, { city: '保亭', code: '101310214' }, { city: '万宁', code: '101310215' }, { city: '陵水', code: '101310216' }, { city: '西沙', code: '101310217' }, { city: '珊瑚岛', code: '101310218' }, { city: '永署礁', code: '101310219' }, { city: '南沙岛', code: '101310220' }, { city: '乐东', code: '101310221' }, { city: '五指山', code: '101310222' }, { city: '通什', code: '101310223' }, { city: '香港', code: '101320101' }, { city: '九龙', code: '101320102' }, { city: '新界', code: '101320103' }, { city: '中环', code: '101320104' }, { city: '铜锣湾', code: '101320105' }, { city: '澳门', code: '101330101' }, { city: '台北县', code: '101340101' }, { city: '台北市', code: '101340102' }, { city: '*', code: '101340201' }, { city: '东港', code: '101340202' }, { city: '大武', code: '101340203' }, { city: '恒春', code: '101340204' }, { city: '兰屿', code: '101340205' }, { city: '台南', code: '101340301' }, { city: '台中', code: '101340401' }, { city: '桃园', code: '101340501' }, { city: '新竹县', code: '101340601' }, { city: '新竹市', code: '101340602' }, { city: '公馆', code: '101340603' }, { city: '宜兰', code: '101340701' }, { city: '马公', code: '101340801' }, { city: '东吉屿', code: '101340802' }, { city: '嘉义', code: '101340901' }, { city: '阿里山', code: '101340902' }, { city: '玉山', code: '101340903' }, { city: '新港', code: '101340904' }
    ];
.Net Core ORM选择之路,哪个才适合你  通用查询类封装之Mongodb篇  Snowflake(雪花算法)的JavaScript实现  【开发记录】如何在B/S项目中使用中国天气的实时天气功能   【开发记录】微信小游戏开发入门——俄罗斯方块

  这样就能根据上面获取对应的城市代码了,以济南(101120101)为例

  1、首先我们先登录到中国天气网,找到济南的天气,点开查看详情,会跳转到详情界面http://www.weather.com.cn/weather1d/101120101.shtml

  2、在详情界面F12能看到这个界面的网络请求,我们会发现有有一个特殊的请求,这里返回了我们需要的数据,也可以看到请求的地址是http://d1.weather.com.cn/sk_2d/101120101.html?_=1544606328541,但是直接打开这个网址或者直接使用后台去请求是不允许的,原因是在请求头少了一个referer的属性,加上就好了

.Net Core ORM选择之路,哪个才适合你  通用查询类封装之Mongodb篇  Snowflake(雪花算法)的JavaScript实现  【开发记录】如何在B/S项目中使用中国天气的实时天气功能   【开发记录】微信小游戏开发入门——俄罗斯方块.Net Core ORM选择之路,哪个才适合你  通用查询类封装之Mongodb篇  Snowflake(雪花算法)的JavaScript实现  【开发记录】如何在B/S项目中使用中国天气的实时天气功能   【开发记录】微信小游戏开发入门——俄罗斯方块

  后台代码如下:

.Net Core ORM选择之路,哪个才适合你  通用查询类封装之Mongodb篇  Snowflake(雪花算法)的JavaScript实现  【开发记录】如何在B/S项目中使用中国天气的实时天气功能   【开发记录】微信小游戏开发入门——俄罗斯方块
    public class WeatherCache
    {
        public string Weather { get; set; }

        public DateTime DateTime { get; set; }
    }

//-------------------------------------华丽分割线-----------------------------------------
        public static Dictionary<string, WeatherCache> WeatherCaches = new Dictionary<string, WeatherCache>();
        public string GetWeatherByCityCode(string code)
        {
            string str = string.Empty;
            if (WeatherCaches.ContainsKey(code))
            {
                if ((DateTime.Now - WeatherCaches[code].DateTime).Minutes > 15)
                {
                    str = await GetWeather(code);
                    WeatherCaches[code].Weather = str;
                    WeatherCaches[code].DateTime = DateTime.Now;
                }
                else
                    str = WeatherCaches[code].Weather;
            }
            else
            {
                str = GetWeather(code);
                WeatherCaches.Add(code, new WeatherCache { Weather = str, DateTime = DateTime.Now });
            }

            return str;
        }
        private string GetWeather(string code)
        {
            Encoding encoding = Encoding.UTF8;
            HttpWebRequest request = (HttpWebRequest)WebRequest.Create("http://d1.weather.com.cn/sk_2d/" + code + ".html");
            request.Method = "GET";
            request.Headers.Add("Referer", "http://www.weather.com.cn/weather1d/" + code + ".shtml");
            HttpWebResponse response = (HttpWebResponse)request.GetResponse();
            string str = string.Empty;
            using (Stream s = response.GetResponseStream())
            {
                StreamReader reader = new StreamReader(s, encoding);
                str = reader.ReadToEnd();
            }

            return str;
        }    
.Net Core ORM选择之路,哪个才适合你  通用查询类封装之Mongodb篇  Snowflake(雪花算法)的JavaScript实现  【开发记录】如何在B/S项目中使用中国天气的实时天气功能   【开发记录】微信小游戏开发入门——俄罗斯方块

  到此为止我们终于获取到了用户所在地的实时天气数据了,返回前台js(同样使用 eval(result)函数处理下返回的字符串就可以了)后怎么展示就不是本章的重点了,可以随便前端折腾。

总结

  总的来说就是适用后台来进行代理请求

  http://pv.sohu.com/cityjson?ie=utf-8 获取城市信息

  http://d1.weather.com.cn/sk_2d/101120101.html 获取城市的实时天气数据

  特别注意,上述接口可能会过期失效,到时留言,我若看到会进行更新

【开发记录】微信小游戏开发入门——俄罗斯方块

叨叨

  我在前一阵子,打算做一个微信小游戏,当然是单机的,只是为了了解小游戏开发的过程,最终选择了俄罗斯方块这一经典小游戏作为demo,源代码已托管值github,当然,这个游戏demo对用不并不友好,但是已经可以让我入门小程序开发了XD。

  demo地址:https://github.com/nbclw/Laya_Brick

准备

  在任何开发前都需要对要开发的东西有一定的了解、准备;

  小游戏原理:微信小游戏是属于H5游戏的一种吧,我是这样理解的;在H5中,有一个叫Canvas(画布)的存在,与电脑的画布很类似,后面的新颜色覆盖旧的颜色,旧的颜色也不进行记录;但是游戏可以有FPS这一概念的存在,比如我们可以使用程序每秒钟绘制50帧的Canvas(画布),也就是FPS是50,那么游戏的各种画面就可以动了;然而小游戏也有一定的限制,比如最终的游戏包(代码+资源)不可超过4M,当然也可以通过分包加载的方式加载游戏,那也最多不可超过8M;

  账号:在开发微信小程序之前,需要到微信公众平台申请一个开发账号,如果只是学习的话,申请一个个人账号也完全ok;申请完成之后,在设置-开发设置里有一个AppID的标识,这个在新建项目时需要用到;另外,平台里也给了很多文档、API供学习查阅;

  开发工具:工具的话微信也给出了专门的开发工具,在微信公众平台即可下载到;

  游戏引擎:无论什么开发,总会有一些方便的集成工具供大家使用,人多力量大;这里我选择的是的LayaBox的游戏引擎,所以,在开发的时候需要再下载一个LayaIDE的开发工具,在这里面编写游戏和发布,最后再在专门的微信开发工具进行最后的调试与上传;

  语言选择:使用LayaIDE来开发小游戏的话,它支持三种语言:ActionScript、JavaScript、TypeScript;首先是ActionScript,我对这个语言没接触过,并且和剩下的两种语言相比,只多了能做flash游戏,我又不懂flash游戏,所以先pass掉;JavaScript语言的话还是比较熟悉的,但是由于是一种弱语言,虽说最近出了很多补偿措施,但是我没有多少时间来做尝试,所以先做保留;最后是TypeScript,这个语言据说是JavaScript的超集,同时具备了类、变量等一些静态语言的特性,是我接手的最佳语言;于是随后选择了使用TypeScript来开发小游戏;补充一下,demo里面包含一分TypeScript的简单的学习文档,可以先大体阅读一遍,相信会有点帮助的;

.Net Core ORM选择之路,哪个才适合你  通用查询类封装之Mongodb篇  Snowflake(雪花算法)的JavaScript实现  【开发记录】如何在B/S项目中使用中国天气的实时天气功能   【开发记录】微信小游戏开发入门——俄罗斯方块

  环境搭建

    1、去微信公众平台申请微信公众平台账号,下载安装 微信web开发者工具;

    2、去LayaBox下载LayaIDE开发工具,根据教程配置TypeScript的编译环境,在官网的技术文档TypeScript专题有教程,此处不过多累述;

开始开发

  其实在使用 微信web开发者工具 开发时,会有一个模板游戏当然也可以根据其架构和API来开发小游戏,但是由于我功力达不到,开发过一版游戏(使用JavaScript),调试运行可以,但是到手机上就不可以了,我也就不过多纠结,直接转入LayaIDE开发,毕竟官网有更多的案例和API,后面的开发除非特殊情况,说的都是LayaIDE开发;

  1、新建项目,这里我们选择2d项目与TypeScript项目,由于小程序的游戏包的大小限制,在我掌握控制资源大小能力的时候,我选择了较为简单的2d项目

.Net Core ORM选择之路,哪个才适合你  通用查询类封装之Mongodb篇  Snowflake(雪花算法)的JavaScript实现  【开发记录】如何在B/S项目中使用中国天气的实时天气功能   【开发记录】微信小游戏开发入门——俄罗斯方块

  2、项目结构:1为项目的入口文件,相当于Main文件,至于为什么是入口文件,下面会提到;2为引用的代码资源,里面封装了2d项目必要的封装类;3为项目的场景资源文件,包括音频、视频、图片等游戏需要的资源;

.Net Core ORM选择之路,哪个才适合你  通用查询类封装之Mongodb篇  Snowflake(雪花算法)的JavaScript实现  【开发记录】如何在B/S项目中使用中国天气的实时天气功能   【开发记录】微信小游戏开发入门——俄罗斯方块

  3、bin文件夹:此文件夹是编译之后运行的文件夹,比较重要,下面来做详细介绍;

    事实上,虽然我们在使用TypeScript开发小游戏,但是最后还是会编译为JavaScript文件,通过执行JavaScript文件来运行小游戏,只是使用TypeScript会比JavaScript开发的更加严谨一些,若你的JavaScript很强,那么也可尝试使用JavaScript来编写;

    .Net Core ORM选择之路,哪个才适合你  通用查询类封装之Mongodb篇  Snowflake(雪花算法)的JavaScript实现  【开发记录】如何在B/S项目中使用中国天气的实时天气功能   【开发记录】微信小游戏开发入门——俄罗斯方块里面的js文件为上面项目结构中的libs编译的结果,将.Net Core ORM选择之路,哪个才适合你  通用查询类封装之Mongodb篇  Snowflake(雪花算法)的JavaScript实现  【开发记录】如何在B/S项目中使用中国天气的实时天气功能   【开发记录】微信小游戏开发入门——俄罗斯方块里面各个封装好的模块编译到各个文件中

    .Net Core ORM选择之路,哪个才适合你  通用查询类封装之Mongodb篇  Snowflake(雪花算法)的JavaScript实现  【开发记录】如何在B/S项目中使用中国天气的实时天气功能   【开发记录】微信小游戏开发入门——俄罗斯方块里面的js文件为上面项目结构中的src编译的结果,将各自ts文件编译到对应的js中;

    .Net Core ORM选择之路,哪个才适合你  通用查询类封装之Mongodb篇  Snowflake(雪花算法)的JavaScript实现  【开发记录】如何在B/S项目中使用中国天气的实时天气功能   【开发记录】微信小游戏开发入门——俄罗斯方块该文件作为微信小游戏的执行文件,在这里可以不过多理会;

    .Net Core ORM选择之路,哪个才适合你  通用查询类封装之Mongodb篇  Snowflake(雪花算法)的JavaScript实现  【开发记录】如何在B/S项目中使用中国天气的实时天气功能   【开发记录】微信小游戏开发入门——俄罗斯方块这个为发布后的微信小程序引用了多少js文件(编译好的libs与js中的文件)用的,若是在程序中没有用到的模块,可以再这里面进行删除,以减少代码的数量

  4、项目编写:项目的大体结构与编译了解的差不多之后,便开始编写我们自己的小程序——俄罗斯方块了,开发过程略,反正就是api的使用,这个在官网有这不少的案例与代码;

    首先将以前的代码、资源文件删除掉,然后建立自己的工程,在发布之前,我将index.html文件中没有使用的js引用注释掉

    .Net Core ORM选择之路,哪个才适合你  通用查询类封装之Mongodb篇  Snowflake(雪花算法)的JavaScript实现  【开发记录】如何在B/S项目中使用中国天气的实时天气功能   【开发记录】微信小游戏开发入门——俄罗斯方块.Net Core ORM选择之路,哪个才适合你  通用查询类封装之Mongodb篇  Snowflake(雪花算法)的JavaScript实现  【开发记录】如何在B/S项目中使用中国天气的实时天气功能   【开发记录】微信小游戏开发入门——俄罗斯方块

  5、发布,选择发布平台,先来个简单的发布吧,不包含版本控制之类的;发布之后,我们会得到一些文件,其实libs这个文件夹并没有多少用的,虽说里面有编译之后的封装文件,但是项目实际运行的所有代码都被LayaIDE自动压缩到code.js文件中,因此,libs文件夹可以删掉,为了减少游戏包体积嘛;还有一个不怎么好的消息,那就是,上面我说的资源文件夹assets是没有被发布出来的,我也没弄清楚怎么回事,只能手动拷贝出来,并且找到code.js文件中的引用路径并修改正确;

    .Net Core ORM选择之路,哪个才适合你  通用查询类封装之Mongodb篇  Snowflake(雪花算法)的JavaScript实现  【开发记录】如何在B/S项目中使用中国天气的实时天气功能   【开发记录】微信小游戏开发入门——俄罗斯方块.Net Core ORM选择之路,哪个才适合你  通用查询类封装之Mongodb篇  Snowflake(雪花算法)的JavaScript实现  【开发记录】如何在B/S项目中使用中国天气的实时天气功能   【开发记录】微信小游戏开发入门——俄罗斯方块.Net Core ORM选择之路,哪个才适合你  通用查询类封装之Mongodb篇  Snowflake(雪花算法)的JavaScript实现  【开发记录】如何在B/S项目中使用中国天气的实时天气功能   【开发记录】微信小游戏开发入门——俄罗斯方块

  6、微信web开发者工具最后的调试,打开开发者工具,打开项目,输入我们的AppID,打开LayaIDE发布出来的项目;若模拟器可以正常运行的话,那么久点击预览吧,就可以在手机上面看到了,手机预览没问题的话,就可以点击上传上传到微信公众平台上去;

.Net Core ORM选择之路,哪个才适合你  通用查询类封装之Mongodb篇  Snowflake(雪花算法)的JavaScript实现  【开发记录】如何在B/S项目中使用中国天气的实时天气功能   【开发记录】微信小游戏开发入门——俄罗斯方块

  7、到此为止的开发都是只有自己能够看到的,若想让别人玩到自己的游戏,那么还需要最后一步,在微信公众平台-开发管理中,将自己刚刚上传的项目发布出来,当然真正的发布游戏是要提交审核的,有很多的东西(各种资料)要准备,我就选择了体验版,只能规定自己指定的人玩,不过也够了,反正别人也玩到了嘛,等到有真正好玩的游戏做出来,在认认真真的发布吧;

.Net Core ORM选择之路,哪个才适合你  通用查询类封装之Mongodb篇  Snowflake(雪花算法)的JavaScript实现  【开发记录】如何在B/S项目中使用中国天气的实时天气功能   【开发记录】微信小游戏开发入门——俄罗斯方块

再次叨叨

  下一步目标:

  1、学会使用分包加载游戏,更大的游戏包带来更好的游戏(虽说最多8M);

  2、学会使用网络,下一步打算做简单的网络游戏;

  3、学会优化代码,去除不必要的资源,精简游戏包大小;

  好不容易做使用LayaBox做的俄罗斯方块可以运行了,尽管游戏功能少,尽管发布到微信公众平台上只是一个体验版,只能指定少数人玩耍(话说也没几个人在玩这游戏了),但是除最后一步的提交审核,别的流程都走了一遍了,总算可以从0到1制作一个微信小游戏了,好开心,在这里把这些日子学到的东西分享出来,希望有人可以用得到,这里就结束了。

上一篇:PAT-乙级-1003. 我要通过!(20)


下一篇:Oracle创建表空间及用户