q-koa 12.6.5 → 12.6.7

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.
@@ -1242,6 +1242,7 @@ exports.qr_code = async (ctx) => {
1242
1242
  scene,
1243
1243
  is_oss = false,
1244
1244
  config = 'weixin_mp',
1245
+ width,
1245
1246
  } = ctx.request.body
1246
1247
 
1247
1248
  if (!app.service.weixin) throw new Error(`weixin可能没有service.js`)
@@ -1252,6 +1253,7 @@ exports.qr_code = async (ctx) => {
1252
1253
  scene,
1253
1254
  is_oss,
1254
1255
  config,
1256
+ width,
1255
1257
  })
1256
1258
 
1257
1259
  return ctx.SUCCESS(result)
@@ -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.5",
3
+ "version": "12.6.7",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {