q-koa 12.6.6 → 12.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/core/app.js CHANGED
@@ -1139,6 +1139,15 @@ class APP {
1139
1139
  }
1140
1140
  }
1141
1141
 
1142
+ if (
1143
+ item.hasOwnProperty('$lte') &&
1144
+ typeof item.$lte === 'string'
1145
+ ) {
1146
+ return {
1147
+ $lte: Sequelize.literal(item.$lte),
1148
+ }
1149
+ }
1150
+
1142
1151
  if (
1143
1152
  item.hasOwnProperty('$gt') &&
1144
1153
  typeof item.$gt === 'string'
@@ -1147,6 +1156,15 @@ class APP {
1147
1156
  $gt: Sequelize.literal(item.$gt),
1148
1157
  }
1149
1158
  }
1159
+
1160
+ if (
1161
+ item.hasOwnProperty('$gte') &&
1162
+ typeof item.$gte === 'string'
1163
+ ) {
1164
+ return {
1165
+ $gte: Sequelize.literal(item.$gte),
1166
+ }
1167
+ }
1150
1168
  return item
1151
1169
  } else {
1152
1170
  return item
@@ -54,7 +54,9 @@ module.exports = class Singleton {
54
54
  async getToLngAndLat(name) {
55
55
  if (!name) throw new Error('没输入地理名称')
56
56
  if (!this.key) throw new Error('没有key')
57
- const url = encodeURI(util.format(toLngAndLatUrl, `${name}`, this.key))
57
+ const url = encodeURI(
58
+ util.format(toLngAndLatUrl, `${name.replace(/\#/g, '-')}`, this.key)
59
+ )
58
60
  const data = await axios.get(url).then((res) => res.data)
59
61
 
60
62
  if (data.status === 0) return data.result
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "q-koa",
3
- "version": "12.6.6",
3
+ "version": "12.7.0",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {