Commit 76f7a4ee by lixinming

no message

parent 94a62cc6
......@@ -4,6 +4,32 @@
"lockfileVersion": 1,
"requires": true,
"dependencies": {
"@alicloud/credentials": {
"version": "2.3.0",
"resolved": "https://registry.npmmirror.com/@alicloud/credentials/-/credentials-2.3.0.tgz",
"integrity": "sha512-x0vf/m1BzkqYXAj2Hkd22O35josx5P4VCzq/9EvTBjA7aGLX/P6JDz7QVp+gnhLjPJyvwAbErvJRYq4gIo4IMA==",
"requires": {
"@alicloud/tea-typescript": "^1.5.3",
"httpx": "^2.2.0",
"ini": "^1.3.5",
"kitx": "^2.0.0"
},
"dependencies": {
"@types/node": {
"version": "12.20.55",
"resolved": "https://registry.npmmirror.com/@types/node/-/node-12.20.55.tgz",
"integrity": "sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ=="
},
"kitx": {
"version": "2.1.0",
"resolved": "https://registry.npmmirror.com/kitx/-/kitx-2.1.0.tgz",
"integrity": "sha512-C/5v9MtIX7aHGOjwn5BmrrbNkJSf7i0R5mRzmh13GSAdRqQ7bYQo/Su2pTYNylFicqKNTVX3HML9k1u8k51+pQ==",
"requires": {
"@types/node": "^12.0.2"
}
}
}
},
"@alicloud/dybaseapi": {
"version": "1.0.0",
"resolved": "https://registry.npm.taobao.org/@alicloud/dybaseapi/download/@alicloud/dybaseapi-1.0.0.tgz",
......@@ -12,6 +38,18 @@
"@alicloud/pop-core": "^1.3.3"
}
},
"@alicloud/dypnsapi20170525": {
"version": "1.2.1",
"resolved": "https://registry.npmmirror.com/@alicloud/dypnsapi20170525/-/dypnsapi20170525-1.2.1.tgz",
"integrity": "sha512-JAPkItcfrd/t8M9u7YBcuMdgmVFUGdBtE2NdrlmWuOJlzXYQbCWsUqbBsIXDTF58OigekkUjABZAlEA4h1DcwQ==",
"requires": {
"@alicloud/endpoint-util": "^0.0.1",
"@alicloud/openapi-client": "^0.4.7",
"@alicloud/openapi-util": "^0.3.2",
"@alicloud/tea-typescript": "^1.7.1",
"@alicloud/tea-util": "^1.4.7"
}
},
"@alicloud/dysmsapi-2017-05-25": {
"version": "1.0.1",
"resolved": "https://registry.npm.taobao.org/@alicloud/dysmsapi-2017-05-25/download/@alicloud/dysmsapi-2017-05-25-1.0.1.tgz",
......@@ -20,6 +58,39 @@
"@alicloud/pop-core": "^1.5.1"
}
},
"@alicloud/endpoint-util": {
"version": "0.0.1",
"resolved": "https://registry.npmmirror.com/@alicloud/endpoint-util/-/endpoint-util-0.0.1.tgz",
"integrity": "sha512-+pH7/KEXup84cHzIL6UJAaPqETvln4yXlD9JzlrqioyCSaWxbug5FUobsiI6fuUOpw5WwoB3fWAtGbFnJ1K3Yg==",
"requires": {
"@alicloud/tea-typescript": "^1.5.1",
"kitx": "^2.0.0"
},
"dependencies": {
"@types/node": {
"version": "12.20.55",
"resolved": "https://registry.npmmirror.com/@types/node/-/node-12.20.55.tgz",
"integrity": "sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ=="
},
"kitx": {
"version": "2.1.0",
"resolved": "https://registry.npmmirror.com/kitx/-/kitx-2.1.0.tgz",
"integrity": "sha512-C/5v9MtIX7aHGOjwn5BmrrbNkJSf7i0R5mRzmh13GSAdRqQ7bYQo/Su2pTYNylFicqKNTVX3HML9k1u8k51+pQ==",
"requires": {
"@types/node": "^12.0.2"
}
}
}
},
"@alicloud/gateway-spi": {
"version": "0.0.8",
"resolved": "https://registry.npmmirror.com/@alicloud/gateway-spi/-/gateway-spi-0.0.8.tgz",
"integrity": "sha512-KM7fu5asjxZPmrz9sJGHJeSU+cNQNOxW+SFmgmAIrITui5hXL2LB+KNRuzWmlwPjnuA2X3/keq9h6++S9jcV5g==",
"requires": {
"@alicloud/credentials": "^2",
"@alicloud/tea-typescript": "^1.7.1"
}
},
"@alicloud/mns": {
"version": "1.0.0",
"resolved": "https://registry.npm.taobao.org/@alicloud/mns/download/@alicloud/mns-1.0.0.tgz",
......@@ -31,6 +102,45 @@
"xml2js": "^0.4.17"
}
},
"@alicloud/openapi-client": {
"version": "0.4.8",
"resolved": "https://registry.npmmirror.com/@alicloud/openapi-client/-/openapi-client-0.4.8.tgz",
"integrity": "sha512-l4g+M2i2SIlbTBpEitTac8e64OyESc0xLNf2FwQ5MV4wdEqRYxu8fuSCMVd5dNxhF7HvgvokJDma+WN/a9HLbg==",
"requires": {
"@alicloud/credentials": "^2",
"@alicloud/gateway-spi": "^0.0.8",
"@alicloud/openapi-util": "^0.3.2",
"@alicloud/tea-typescript": "^1.7.1",
"@alicloud/tea-util": "^1.4.7",
"@alicloud/tea-xml": "0.0.3"
}
},
"@alicloud/openapi-util": {
"version": "0.3.2",
"resolved": "https://registry.npmmirror.com/@alicloud/openapi-util/-/openapi-util-0.3.2.tgz",
"integrity": "sha512-EC2JvxdcOgMlBAEG0+joOh2IB1um8CPz9EdYuRfTfd1uP8Yc9D8QRUWVGjP6scnj6fWSOaHFlit9H6PrJSyFow==",
"requires": {
"@alicloud/tea-typescript": "^1.7.1",
"@alicloud/tea-util": "^1.3.0",
"kitx": "^2.1.0",
"sm3": "^1.0.3"
},
"dependencies": {
"@types/node": {
"version": "12.20.55",
"resolved": "https://registry.npmmirror.com/@types/node/-/node-12.20.55.tgz",
"integrity": "sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ=="
},
"kitx": {
"version": "2.1.0",
"resolved": "https://registry.npmmirror.com/kitx/-/kitx-2.1.0.tgz",
"integrity": "sha512-C/5v9MtIX7aHGOjwn5BmrrbNkJSf7i0R5mRzmh13GSAdRqQ7bYQo/Su2pTYNylFicqKNTVX3HML9k1u8k51+pQ==",
"requires": {
"@types/node": "^12.0.2"
}
}
}
},
"@alicloud/pop-core": {
"version": "1.7.10",
"resolved": "https://registry.npm.taobao.org/@alicloud/pop-core/download/@alicloud/pop-core-1.7.10.tgz?cache=0&sync_timestamp=1603357203292&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40alicloud%2Fpop-core%2Fdownload%2F%40alicloud%2Fpop-core-1.7.10.tgz",
......@@ -69,6 +179,67 @@
"babel-runtime": "^6.26.0"
}
},
"@alicloud/tea-typescript": {
"version": "1.8.0",
"resolved": "https://registry.npmmirror.com/@alicloud/tea-typescript/-/tea-typescript-1.8.0.tgz",
"integrity": "sha512-CWXWaquauJf0sW30mgJRVu9aaXyBth5uMBCUc+5vKTK1zlgf3hIqRUjJZbjlwHwQ5y9anwcu18r48nOZb7l2QQ==",
"requires": {
"@types/node": "^12.0.2",
"httpx": "^2.2.6"
},
"dependencies": {
"@types/node": {
"version": "12.20.55",
"resolved": "https://registry.npmmirror.com/@types/node/-/node-12.20.55.tgz",
"integrity": "sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ=="
}
}
},
"@alicloud/tea-util": {
"version": "1.4.7",
"resolved": "https://registry.npmmirror.com/@alicloud/tea-util/-/tea-util-1.4.7.tgz",
"integrity": "sha512-Lrpfk9kxihHsit3oMoeIMjk783AxjOvzMhLAbZcIzazKiVg3Zk/209XDe9r1lXqxII59j3V4rhC9X14y6WGYyg==",
"requires": {
"@alicloud/tea-typescript": "^1.5.1",
"kitx": "^2.0.0"
},
"dependencies": {
"@types/node": {
"version": "12.20.55",
"resolved": "https://registry.npmmirror.com/@types/node/-/node-12.20.55.tgz",
"integrity": "sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ=="
},
"kitx": {
"version": "2.1.0",
"resolved": "https://registry.npmmirror.com/kitx/-/kitx-2.1.0.tgz",
"integrity": "sha512-C/5v9MtIX7aHGOjwn5BmrrbNkJSf7i0R5mRzmh13GSAdRqQ7bYQo/Su2pTYNylFicqKNTVX3HML9k1u8k51+pQ==",
"requires": {
"@types/node": "^12.0.2"
}
}
}
},
"@alicloud/tea-xml": {
"version": "0.0.3",
"resolved": "https://registry.npmmirror.com/@alicloud/tea-xml/-/tea-xml-0.0.3.tgz",
"integrity": "sha512-+/9GliugjrLglsXVrd1D80EqqKgGpyA0eQ6+1ZdUOYCaRguaSwz44trX3PaxPu/HhIPJg9PsGQQ3cSLXWZjbAA==",
"requires": {
"@alicloud/tea-typescript": "^1",
"@types/xml2js": "^0.4.5",
"xml2js": "^0.6.0"
},
"dependencies": {
"xml2js": {
"version": "0.6.2",
"resolved": "https://registry.npmmirror.com/xml2js/-/xml2js-0.6.2.tgz",
"integrity": "sha512-T4rieHaC1EXcES0Kxxj4JWgaUQHDk+qwHcYOCFHfiwKz7tOVPLq7Hjq9dM1WCMhylqMEfP7hMcOIChvotiZegA==",
"requires": {
"sax": ">=0.6.0",
"xmlbuilder": "~11.0.0"
}
}
}
},
"@babel/runtime": {
"version": "7.13.10",
"resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.13.10.tgz",
......@@ -145,6 +316,14 @@
"resolved": "https://registry.npmmirror.com/@types/validator/-/validator-13.11.8.tgz",
"integrity": "sha512-c/hzNDBh7eRF+KbCf+OoZxKbnkpaK/cKp9iLQWqB7muXtM+MtL9SUUH8vCFcLn6dH1Qm05jiexK0ofWY7TfOhQ=="
},
"@types/xml2js": {
"version": "0.4.14",
"resolved": "https://registry.npmmirror.com/@types/xml2js/-/xml2js-0.4.14.tgz",
"integrity": "sha512-4YnrRemBShWRO2QjvUin8ESA41rH+9nQGLUGZV/1IDhi3SL9OhdpNC/MrulTWuptXKwhx/aDxE7toV0f/ypIXQ==",
"requires": {
"@types/node": "*"
}
},
"accepts": {
"version": "1.3.7",
"resolved": "https://registry.npm.taobao.org/accepts/download/accepts-1.3.7.tgz",
......@@ -163,29 +342,6 @@
"printj": "~1.1.0"
}
},
"agent-base": {
"version": "6.0.2",
"resolved": "https://registry.npmmirror.com/agent-base/-/agent-base-6.0.2.tgz",
"integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==",
"requires": {
"debug": "4"
},
"dependencies": {
"debug": {
"version": "4.3.4",
"resolved": "https://registry.npmmirror.com/debug/-/debug-4.3.4.tgz",
"integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==",
"requires": {
"ms": "2.1.2"
}
},
"ms": {
"version": "2.1.2",
"resolved": "https://registry.npmmirror.com/ms/-/ms-2.1.2.tgz",
"integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w=="
}
}
},
"ajv": {
"version": "6.12.6",
"resolved": "https://registry.npm.taobao.org/ajv/download/ajv-6.12.6.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fajv%2Fdownload%2Fajv-6.12.6.tgz",
......@@ -870,11 +1026,6 @@
"has-symbols": "^1.0.3"
}
},
"get-stream": {
"version": "6.0.1",
"resolved": "https://registry.npmmirror.com/get-stream/-/get-stream-6.0.1.tgz",
"integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg=="
},
"getpass": {
"version": "0.1.7",
"resolved": "https://registry.npm.taobao.org/getpass/download/getpass-0.1.7.tgz",
......@@ -955,30 +1106,6 @@
"sshpk": "^1.7.0"
}
},
"https-proxy-agent": {
"version": "5.0.1",
"resolved": "https://registry.npmmirror.com/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz",
"integrity": "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==",
"requires": {
"agent-base": "6",
"debug": "4"
},
"dependencies": {
"debug": {
"version": "4.3.4",
"resolved": "https://registry.npmmirror.com/debug/-/debug-4.3.4.tgz",
"integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==",
"requires": {
"ms": "2.1.2"
}
},
"ms": {
"version": "2.1.2",
"resolved": "https://registry.npmmirror.com/ms/-/ms-2.1.2.tgz",
"integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w=="
}
}
},
"httpx": {
"version": "2.2.7",
"resolved": "https://registry.npm.taobao.org/httpx/download/httpx-2.2.7.tgz",
......@@ -1045,6 +1172,11 @@
"resolved": "https://registry.npm.taobao.org/inherits/download/inherits-2.0.3.tgz",
"integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4="
},
"ini": {
"version": "1.3.8",
"resolved": "https://registry.npmmirror.com/ini/-/ini-1.3.8.tgz",
"integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew=="
},
"ipaddr.js": {
"version": "1.9.1",
"resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz",
......@@ -1060,11 +1192,6 @@
"resolved": "https://registry.npmmirror.com/is-property/-/is-property-1.0.2.tgz",
"integrity": "sha512-Ks/IoX00TtClbGQr4TWXemAnktAQvYB7HzcCxDGqEZU6oCmb2INHuOoKxbtR+HFkmYWBKv/dOZtGRiAjDhj92g=="
},
"is-stream": {
"version": "2.0.1",
"resolved": "https://registry.npmmirror.com/is-stream/-/is-stream-2.0.1.tgz",
"integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg=="
},
"is-typedarray": {
"version": "1.0.0",
"resolved": "https://registry.npm.taobao.org/is-typedarray/download/is-typedarray-1.0.0.tgz",
......@@ -1471,14 +1598,6 @@
"resolved": "https://registry.npm.taobao.org/negotiator/download/negotiator-0.6.2.tgz",
"integrity": "sha1-/qz3zPUlp3rpY0Q2pkiD/+yjRvs="
},
"node-fetch": {
"version": "2.7.0",
"resolved": "https://registry.npmmirror.com/node-fetch/-/node-fetch-2.7.0.tgz",
"integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==",
"requires": {
"whatwg-url": "^5.0.0"
}
},
"node-xlsx": {
"version": "0.16.1",
"resolved": "https://registry.npmjs.org/node-xlsx/-/node-xlsx-0.16.1.tgz",
......@@ -1949,6 +2068,11 @@
"resolved": "https://registry.npm.taobao.org/sliced/download/sliced-1.0.1.tgz",
"integrity": "sha1-CzpmK10Ewxd7GSa+qCsD+Dei70E="
},
"sm3": {
"version": "1.0.3",
"resolved": "https://registry.npmmirror.com/sm3/-/sm3-1.0.3.tgz",
"integrity": "sha512-KyFkIfr8QBlFG3uc3NaljaXdYcsbRy1KrSfc4tsQV8jW68jAktGeOcifu530Vx/5LC+PULHT0Rv8LiI8Gw+c1g=="
},
"sparse-bitfield": {
"version": "3.0.3",
"resolved": "https://registry.npm.taobao.org/sparse-bitfield/download/sparse-bitfield-3.0.3.tgz",
......@@ -2153,32 +2277,6 @@
}
}
},
"tencentcloud-sdk-nodejs": {
"version": "4.0.821",
"resolved": "https://registry.npmmirror.com/tencentcloud-sdk-nodejs/-/tencentcloud-sdk-nodejs-4.0.821.tgz",
"integrity": "sha512-rQ9RWpOkowAo55zx6fhS+bYpjxdZWQcYaHEty69ezf2rzM0G0ffYUUF8cH4P5w2o/48WguUEDMiUafhpXwgU/g==",
"requires": {
"form-data": "^3.0.0",
"get-stream": "^6.0.0",
"https-proxy-agent": "^5.0.0",
"is-stream": "^2.0.0",
"json-bigint": "^1.0.0",
"node-fetch": "^2.2.0",
"tslib": "1.13.0"
},
"dependencies": {
"form-data": {
"version": "3.0.1",
"resolved": "https://registry.npmmirror.com/form-data/-/form-data-3.0.1.tgz",
"integrity": "sha512-RHkBKtLWUVwd7SqRIvCZMEvAMoGUp0XU+seQiZejj0COz3RI3hWP4sCv3gZWWLjJTd7rGwcsF5eKZGii0r/hbg==",
"requires": {
"asynckit": "^0.4.0",
"combined-stream": "^1.0.8",
"mime-types": "^2.1.12"
}
}
}
},
"tiny-inflate": {
"version": "1.0.3",
"resolved": "https://registry.npm.taobao.org/tiny-inflate/download/tiny-inflate-1.0.3.tgz",
......@@ -2203,16 +2301,6 @@
"punycode": "^2.1.1"
}
},
"tr46": {
"version": "0.0.3",
"resolved": "https://registry.npmmirror.com/tr46/-/tr46-0.0.3.tgz",
"integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw=="
},
"tslib": {
"version": "1.13.0",
"resolved": "https://registry.npmmirror.com/tslib/-/tslib-1.13.0.tgz",
"integrity": "sha512-i/6DQjL8Xf3be4K/E6Wgpekn5Qasl1usyw++dAA35Ue5orEn65VIxOA+YvNNl9HV3qv70T7CNwjODHZrLwvd1Q=="
},
"tunnel-agent": {
"version": "0.6.0",
"resolved": "https://registry.npm.taobao.org/tunnel-agent/download/tunnel-agent-0.6.0.tgz",
......@@ -2288,11 +2376,6 @@
"extsprintf": "^1.2.0"
}
},
"webidl-conversions": {
"version": "3.0.1",
"resolved": "https://registry.npmmirror.com/webidl-conversions/-/webidl-conversions-3.0.1.tgz",
"integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ=="
},
"wechatpay-node-v3": {
"version": "2.2.0",
"resolved": "https://registry.npmmirror.com/wechatpay-node-v3/-/wechatpay-node-v3-2.2.0.tgz",
......@@ -2302,15 +2385,6 @@
"superagent": "^8.0.6"
}
},
"whatwg-url": {
"version": "5.0.0",
"resolved": "https://registry.npmmirror.com/whatwg-url/-/whatwg-url-5.0.0.tgz",
"integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==",
"requires": {
"tr46": "~0.0.3",
"webidl-conversions": "^3.0.0"
}
},
"wkx": {
"version": "0.5.0",
"resolved": "https://registry.npmmirror.com/wkx/-/wkx-0.5.0.tgz",
......
......@@ -4,6 +4,7 @@
"description": "",
"main": "main.ts",
"dependencies": {
"@alicloud/dypnsapi20170525": "^1.2.1",
"@alicloud/sms-sdk": "^1.1.6",
"@types/node": "^10.12.18",
"compression": "^1.7.4",
......@@ -25,7 +26,6 @@
"request": "^2.88.0",
"sequelize": "^6.35.2",
"svg-captcha": "^1.3.12",
"tencentcloud-sdk-nodejs": "^4.0.821",
"wechatpay-node-v3": "^2.2.0",
"ws": "^5.2.2",
"xml2js": "^0.4.23"
......
......@@ -109,8 +109,8 @@ export async function memberChangePwdSendCode({phone}) {
const NowMs = new Date().valueOf();
let codeSelectParam = { phone, isUse:false, type:CODETYPE.修改密码, sendMs:{"$gt":getTodayMs()} }
let lastCodeInfo = await findOnceToSort(TABLEENUM.验证码表, codeSelectParam, {sendMs:-1});
let codeNum = lastCodeInfo.codeNum;
if (codeNum) {
if (lastCodeInfo && lastCodeInfo.codeNum) {
if ( (lastCodeInfo.sendMs + (60*1000)) > NowMs ) throw new BizError(ERRORENUM.频繁操作请稍后再试);
/**校验今日同类型验证码次数 */
let todayNotUseCount = await findCount(TABLEENUM.验证码表, codeSelectParam);
......
......@@ -33,12 +33,17 @@ export async function list({userId, type}) {
await addManyData(TABLEENUM.文字资料, addList);
}
dataList.sort((a:any, b:any) => {return a.rank - b.rank });
dbList.forEach(info => {
for (let i =0; i < dbList.length; i++) {
let info= dbList[i];
let item:any = extractData(info, ["id", "title", "rank", "position", "articleTitle" ]);
if (!item.position) item.position = "未选择";
else item.position = changeEnumValue(ARTICLEPOSITION, item.position);
let articleInfo = await findOnce(TABLEENUM.文章管理, {id:item.articleTitle}, ["id", "title"]);
item.articleTitle = articleInfo && articleInfo.id ? articleInfo.title : '';
dataList.push(item);
});
}
return {dataList};
}
......
......@@ -123,3 +123,9 @@ export async function getTitleList({type}) {
});
return {dataList}
}
//todo
export async function statsWenZhangCount(type:number) {
}
\ No newline at end of file
......@@ -31,13 +31,19 @@ export async function list({userId}) {
}
await addManyData(TABLEENUM.专题系列, addList);
}
dataList.sort((a:any, b:any) => {return a.rank - b.rank });
dbList.forEach(info => {
dbList.sort((a:any, b:any) => {return a.rank - b.rank });
for (let i= 0; i < dbList.length; i++) {
let info = dbList[i];
let item:any = extractData(info, ["id", "title", "articleUrl", "position", "articleTitle", "imgUrl"]);
if (!item.position) item.position = "未选择";
else item.position = changeEnumValue(ARTICLEPOSITION, item.position);
let articleInfo = await findOnce(TABLEENUM.文章管理, {id:item.articleTitle}, ["id", "title"]);
item.articleTitle = articleInfo && articleInfo.id ? articleInfo.title : '';
dataList.push(item);
});
}
return {dataList};
}
......
......@@ -274,8 +274,8 @@ export async function memberRegisterSendCode({phone}) {
const NowMs = new Date().valueOf();
let codeSelectParam = { phone, isUse:false, type:CODETYPE.用户注册, sendMs:{"$gt":sysTools.getTodayMs()} }
let lastCodeInfo = await findOnceToSort(TABLEENUM.验证码表, codeSelectParam, {sendMs:-1});
let codeNum = lastCodeInfo.codeNum;
if (codeNum) {
if (lastCodeInfo && lastCodeInfo.codeNum) {
if ( (lastCodeInfo.sendMs + (60*1000)) > NowMs ) throw new BizError(ERRORENUM.频繁操作请稍后再试);
/**校验今日同类型验证码次数 */
let todayNotUseCount = await findCount(TABLEENUM.验证码表, codeSelectParam);
......
/**
* 短信主要逻辑
*/
const tencentcloud = require("tencentcloud-sdk-nodejs");
const smsClient = tencentcloud.sms.v20210111.Client;
import { SMSTYPE } from "../config/enum";
import { ERRORENUM } from "../config/errorEnum";
import { systemConfig } from "../config/serverConfig";
import { BizError } from "../util/bizError";
var client;
export function initSMS() {
client = new smsClient({
credential: {
/* 必填:腾讯云账户密钥对secretId,secretKey。
* 这里采用的是从环境变量读取的方式,需要在环境变量中先设置这两个值。
* 你也可以直接在代码中写死密钥对,但是小心不要将代码复制、上传或者分享给他人,
* 以免泄露密钥对危及你的财产安全。
* SecretId、SecretKey 查询: https://console.cloud.tencent.com/cam/capi */
secretId: "AKIDHUYO0Xq0wc1DD2e1CJ1xpuqYIxQo0yrd",
secretKey: "zl01oOkswmXJ4apnaUJsCW5PivudLtFP",
},
/* 必填:地域信息,可以直接填写字符串ap-guangzhou,支持的地域列表参考 https://cloud.tencent.com/document/api/382/52071#.E5.9C.B0.E5.9F.9F.E5.88.97.E8.A1.A8 */
region: "ap-guangzhou",
/* 非必填:
* 客户端配置对象,可以指定超时时间等配置 */
profile: {
/* SDK默认用TC3-HMAC-SHA256进行签名,非必要请不要修改这个字段 */
signMethod: "HmacSHA256",
httpProfile: {
/* SDK默认使用POST方法。
* 如果你一定要使用GET方法,可以在这里设置。GET方法无法处理一些较大的请求 */
reqMethod: "POST",
/* SDK有默认的超时时间,非必要请不要进行调整
* 如有需要请在代码中查阅以获取最新的默认值 */
reqTimeout: 30,
/**
* 指定接入地域域名,默认就近地域接入域名为 sms.tencentcloudapi.com ,也支持指定地域域名访问,例如广州地域的域名为 sms.ap-guangzhou.tencentcloudapi.com
*/
endpoint: "sms.tencentcloudapi.com"
},
},
})
}
/**
* 给特定账号发送信息
* @param phone 需要发送的电话数组
* @param type 类别
* @param params 参数数组
*/
function sendMsmToPhoneNumber(phone, type:number, params) {
let phoneAreaList = [];
phone.forEach(info => {
phoneAreaList.push(`+86${info}`);
// This file is auto-generated, don't edit it
// 依赖的模块可通过下载工程中的模块依赖文件或右上角的获取 SDK 依赖信息查看
const Dypnsapi20170525 = require('@alicloud/dypnsapi20170525');
const OpenApi = require('@alicloud/openapi-client');
const Util = require('@alicloud/tea-util');
const Tea = require('@alicloud/tea-typescript');
let smsClient;
function initSMS() {}
class Client {
/**
* 使用AK&SK初始化账号Client
* @param accessKeyId
* @param accessKeySecret
* @return Client
* @throws Exception
*/
static createClient() {
// 工程代码泄露可能会导致 AccessKey 泄露,并威胁账号下所有资源的安全性。以下代码示例仅供参考。
// 建议使用更安全的 STS 方式,更多鉴权访问方式请参见:https://help.aliyun.com/document_detail/378664.html。
let config = new OpenApi.Config({
// 必填,请确保代码运行环境设置了环境变量 ALIBABA_CLOUD_ACCESS_KEY_ID。
accessKeyId: 'LTAI5tD7Finu3fxFMCi3415S',
// 必填,请确保代码运行环境设置了环境变量 ALIBABA_CLOUD_ACCESS_KEY_SECRET。
accessKeySecret: 'sbPR0AdDPfjm7v2NSffk5apPm6UClV',
});
let templateId = -1;
if (type == SMSTYPE.单位会员注册) templateId = systemConfig.smsUnitMemberRegister;
const sendParam = {
/* 短信应用ID: 短信SmsSdkAppId在 [短信控制台] 添加应用后生成的实际SmsSdkAppId,示例如1400006666 */
// 应用 ID 可前往 [短信控制台](https://console.cloud.tencent.com/smsv2/app-manage) 查看
SmsSdkAppId: systemConfig.smsSDKId,
/* 短信签名内容: 使用 UTF-8 编码,必须填写已审核通过的签名 */
// 签名信息可前往 [国内短信](https://console.cloud.tencent.com/smsv2/csms-sign) 或 [国际/港澳台短信](https://console.cloud.tencent.com/smsv2/isms-sign) 的签名管理查看
SignName: systemConfig.smsSign,
/* 模板 ID: 必须填写已审核通过的模板 ID */
// 模板 ID 可前往 [国内短信](https://console.cloud.tencent.com/smsv2/csms-template) 或 [国际/港澳台短信](https://console.cloud.tencent.com/smsv2/isms-template) 的正文模板管理查看
TemplateId: templateId,
/* 模板参数: 模板参数的个数需要与 TemplateId 对应模板的变量个数保持一致,若无模板参数,则设置为空 */
TemplateParamSet: params,
/* 下发手机号码,采用 e.164 标准,+[国家或地区码][手机号]
/* 用户的 session 内容(无需要可忽略): 可以携带用户侧 ID 等上下文信息,server 会原样返回 */
SessionContext: "",
PhoneNumberSet: phoneAreaList,
/* 短信码号扩展号(无需要可忽略): 默认未开通,如需开通请联系 [腾讯云短信小助手] */
ExtendCode: "",
/* 国际/港澳台短信 senderid(无需要可忽略): 国内短信填空,默认未开通,如需开通请联系 [腾讯云短信小助手] */
SenderId: "",
}
return new Promise( (resolve, reject) => {
client.SendSms(sendParam, function (err, response) {
let isError = false;
let msg = "";
if (err) {
msg = err;
isError = true;
}
resolve({isError, msg});
});
})
}
// Endpoint 请参考 https://api.aliyun.com/product/Dypnsapi
config.endpoint = `dypnsapi.aliyuncs.com`;
return new Dypnsapi20170525.default(config);
}
static async main(args) {
let client = Client.createClient();
let sendSmsVerifyCodeRequest = new Dypnsapi20170525.SendSmsVerifyCodeRequest({ });
let runtime = new Util.RuntimeOptions({ });
try {
// 复制代码运行请自行打印 API 的返回值
await client.sendSmsVerifyCodeWithOptions(sendSmsVerifyCodeRequest, runtime);
} catch (error) {
// 此处仅做打印展示,请谨慎对待异常处理,在工程项目中切勿直接忽略异常。
// 错误 message
console.log(error.message);
// 诊断地址
console.log(error.data["Recommend"]);
}
}
/**
* 发送单位会员注册的短信验证码
* @param phone
* @param code
*/
export async function sendRegisterCode(phone:string, code:string, codeType) {
let sendPhoneList = [phone];
let params = [code];
let sendRes:any = await sendMsmToPhoneNumber(sendPhoneList, codeType, params);
return sendRes.isError;
}
exports.Client = Client;
Client.main(process.argv.slice(2));
\ No newline at end of file
......@@ -346,7 +346,7 @@ const ModelArray = [
session:'Number',//届次
paymentStatus:'Number',//支付状态 PAYMENTSTATUS
isInput:{type:'Boolean', default:false},//是否是导入用户
inputUserChangePwd:{type:'Boolean', default:false},//导入账号修改密码
inputUserChangePwd:{type:'Boolean', default:false},
/**管理员字段 */
adminType:{type:'Number'},//管理员类别 ADMINTYPE
adminLv:"[Number]",//管理员等级 多选 ADMINLV
......@@ -424,7 +424,6 @@ const ModelArray = [
jiaoXueFuZeRenDianHua:'String',//教学负责人电话
/**第三步流程表单(单位)【申请表上传】 */
applicationForm:'String',//入会申请表
}
},
{
......
......@@ -42,4 +42,21 @@ export async function findToSort(tableEnumValue:string, param, sortParam, files?
files = files || [];
let data = await dataModels[tableEnumValue].find(param, files).sort(sortParam);
return data;
}
/**
* 统计数据
* @param tableEnumValue
* @param param
* @param group
* @returns
*/
export async function statsData(tableEnumValue:string, param, group) {
let dataList = await dataModels[tableEnumValue].aggregate([
{"$match":param},
{"$group":group}
]);
return dataList;
}
\ No newline at end of file
import { bizlive } from "tencentcloud-sdk-nodejs";
import { ERRORCODEENUM } from "../config/errorEnum";
/**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment