q-koa 13.8.0 → 13.8.2

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
@@ -6,7 +6,7 @@ const fs = require('fs')
6
6
  const fsPromise = require('fs/promises')
7
7
  const Sequelize = require('sequelize')
8
8
  const redis = require('redis')
9
- const moment = require('dayjs')
9
+ const moment = require('moment')
10
10
  const { EventEmitter } = require('events')
11
11
  const nodeVm = require('vm')
12
12
  const { LRUCache } = require('lru-cache')
@@ -1,7 +1,7 @@
1
1
  const { getConfig, ServiceError } = require('q-koa')
2
2
  const axios = require('axios')
3
3
  const XLSX = require('xlsx')
4
- const moment = require('dayjs')
4
+ const moment = require('moment')
5
5
 
6
6
  exports.gpt = async ({ app, content }) => {
7
7
  if (!content) throw new ServiceError('?content')
@@ -1326,14 +1326,15 @@ exports.union_pay = async (ctx) => {
1326
1326
  acct: userDetail.openid,
1327
1327
  })
1328
1328
 
1329
+ const payInfo = JSON.parse(res.payinfo)
1329
1330
  const obj = {
1330
1331
  signData: JSON.stringify({
1331
1332
  requestPaymentInfo: {
1332
- timeStamp: JSON.parse(res.payinfo).timeStamp,
1333
- package: JSON.parse(res.payinfo).package,
1334
- signType: JSON.parse(res.payinfo).signType,
1335
- paySign: JSON.parse(res.payinfo).paySign,
1336
- nonceStr: JSON.parse(res.payinfo).nonceStr,
1333
+ timeStamp: payInfo.timeStamp,
1334
+ package: payInfo.package,
1335
+ signType: payInfo.signType,
1336
+ paySign: payInfo.paySign,
1337
+ nonceStr: payInfo.nonceStr,
1337
1338
  },
1338
1339
  }),
1339
1340
  mode: 'retail_pay_indirect_goods',
@@ -9,7 +9,7 @@ const yly = require('yly-nodejs-sdk')
9
9
  module.exports = class Singleton {
10
10
  static _instanceMap = new Map()
11
11
  constructor(config) {
12
- const key = config.cid
12
+ const key = `${config.cid}_${config.machine_code}`
13
13
  if (Singleton._instanceMap.has(key)) {
14
14
  return Singleton._instanceMap.get(key)
15
15
  }
@@ -1,5 +1,5 @@
1
1
  const cheerio = require('cheerio')
2
- const moment = require('dayjs')
2
+ const moment = require('moment')
3
3
 
4
4
  exports.handleHtml = async function (html) {
5
5
  const $ = cheerio.load(html, {
@@ -1,7 +1,7 @@
1
1
  const { lodash } = require('q-koa')
2
2
  const Sequelize = require('sequelize')
3
3
  const md5 = require('md5')
4
- const moment = require('dayjs')
4
+ const moment = require('moment')
5
5
  const _ = require('lodash')
6
6
 
7
7
  const findConfig = (type) => (item) =>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "q-koa",
3
- "version": "13.8.0",
3
+ "version": "13.8.2",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -62,6 +62,7 @@
62
62
  "xlsx": "^0.18.5",
63
63
  "pm2": "^7.0.1",
64
64
  "dayjs": "^1.11.13",
65
+ "moment": "^2.30.1",
65
66
  "form-data": "^4.0.0",
66
67
  "adm-zip": "^0.6.0"
67
68
  },