Browse Source

Merge pull request 'Xfy' (#3) from Xfy into ly

Reviewed-on: http://8.137.125.67:4000/SwtTt29/Mini-Program/pulls/3
ly 2 months ago
parent
commit
c0df75cd28
  1. 134
      ers18477Desktopmodemode; git remote -v
  2. 729
      package-lock.json
  3. 3
      package.json
  4. 44
      pages/chat/index.js
  5. 17
      pages/chat/index.wxml
  6. 31
      pages/chat/index.wxss
  7. 75
      pages/goods-detail/goods-detail.js
  8. 31
      pages/goods-detail/goods-detail.wxml
  9. 43
      pages/goods-detail/goods-detail.wxss
  10. 209
      pages/index/index.js
  11. 26
      pages/index/index.wxml
  12. 25
      pages/index/index.wxss
  13. 1
      pages/settlement/index.wxml
  14. 71
      pages/settlement/index.wxss
  15. 2
      project.private.config.json
  16. 2
      server-example/server-mysql.js

134
ers18477Desktopmodemode; git remote -v

@ -1,134 +0,0 @@
Main
New2
Swt
* Xfy
mian_ly
remotes/mini-program/HEAD -> mini-program/Xfy
remotes/mini-program/Xfy
remotes/mini-program/xxfy
remotes/new-origin/AI
remotes/new-origin/Backup
remotes/new-origin/HEAD -> new-origin/master
remotes/new-origin/Ly
remotes/new-origin/Main
remotes/new-origin/New
remotes/new-origin/New2
remotes/new-origin/SSSSS
remotes/new-origin/Swt
remotes/new-origin/Xfy
remotes/new-origin/fff
remotes/new-origin/index
remotes/new-origin/master
remotes/new-origin/mian_ly
remotes/new-origin/new2-branch
remotes/new-origin/wechat
remotes/new-origin/wxss
remotes/new-origin/xxfy
remotes/new-origin/xxx
remotes/new-origin/首页样式最新
remotes/new-repo/AI
remotes/new-repo/Backup
remotes/new-repo/HEAD -> new-repo/master
remotes/new-repo/Main
remotes/new-repo/Main2
remotes/new-repo/New
remotes/new-repo/New2
remotes/new-repo/SSSSS
remotes/new-repo/Swt
remotes/new-repo/Xfy
remotes/new-repo/fff
remotes/new-repo/index
remotes/new-repo/main_ly
remotes/new-repo/master
remotes/new-repo/mian_ly
remotes/new-repo/new2-branch
remotes/new-repo/wechat
remotes/new-repo/wxss
remotes/new-repo/xxx
remotes/new-repo/首页样式最新
remotes/origin/AI
remotes/origin/Backup
remotes/origin/HEAD -> origin/master
remotes/origin/Ly
remotes/origin/Main
remotes/origin/New
remotes/origin/New2
remotes/origin/SSSSS
remotes/origin/Swt
remotes/origin/Xfy
remotes/origin/fff
remotes/origin/index
remotes/origin/master
remotes/origin/mian_ly
remotes/origin/new2-branch
remotes/origin/wechat
remotes/origin/wxss
remotes/origin/xxx
remotes/origin/首页样式最新
Main
New2
Swt
* Xfy
mian_ly
remotes/mini-program/HEAD -> mini-program/Xfy
remotes/mini-program/Xfy
remotes/mini-program/xxfy
remotes/new-origin/AI
remotes/new-origin/Backup
remotes/new-origin/HEAD -> new-origin/master
remotes/new-origin/Ly
remotes/new-origin/Main
remotes/new-origin/New
remotes/new-origin/New2
remotes/new-origin/SSSSS
remotes/new-origin/Swt
remotes/new-origin/Xfy
remotes/new-origin/fff
remotes/new-origin/index
remotes/new-origin/master
remotes/new-origin/mian_ly
remotes/new-origin/new2-branch
remotes/new-origin/wechat
remotes/new-origin/wxss
remotes/new-origin/xxfy
remotes/new-origin/xxx
remotes/new-origin/首页样式最新
remotes/new-repo/AI
remotes/new-repo/Backup
remotes/new-repo/HEAD -> new-repo/master
remotes/new-repo/Main
remotes/new-repo/Main2
remotes/new-repo/New
remotes/new-repo/New2
remotes/new-repo/SSSSS
remotes/new-repo/Swt
remotes/new-repo/Xfy
remotes/new-repo/fff
remotes/new-repo/index
remotes/new-repo/main_ly
remotes/new-repo/master
remotes/new-repo/mian_ly
remotes/new-repo/new2-branch
remotes/new-repo/wechat
remotes/new-repo/wxss
remotes/new-repo/xxx
remotes/new-repo/首页样式最新
remotes/origin/AI
remotes/origin/Backup
remotes/origin/HEAD -> origin/master
remotes/origin/Ly
remotes/origin/Main
remotes/origin/New
remotes/origin/New2
remotes/origin/SSSSS
remotes/origin/Swt
remotes/origin/Xfy
remotes/origin/fff
remotes/origin/index
remotes/origin/master
remotes/origin/mian_ly
remotes/origin/new2-branch
remotes/origin/wechat
remotes/origin/wxss
remotes/origin/xxx
remotes/origin/首页样式最新

729
package-lock.json

@ -9,10 +9,13 @@
"version": "1.0.0", "version": "1.0.0",
"license": "ISC", "license": "ISC",
"dependencies": { "dependencies": {
"ali-oss": "^6.23.0",
"axios": "^1.13.2", "axios": "^1.13.2",
"cors": "^2.8.5", "cors": "^2.8.5",
"dotenv": "^17.2.3",
"express": "^5.1.0", "express": "^5.1.0",
"form-data": "^4.0.4", "form-data": "^4.0.4",
"multer": "^2.0.2",
"mysql2": "^3.15.3", "mysql2": "^3.15.3",
"sequelize": "^6.37.7", "sequelize": "^6.37.7",
"socket.io-client": "^4.8.1", "socket.io-client": "^4.8.1",
@ -89,6 +92,84 @@
"node": ">= 0.6" "node": ">= 0.6"
} }
}, },
"node_modules/address": {
"version": "1.2.2",
"resolved": "https://registry.npmjs.org/address/-/address-1.2.2.tgz",
"integrity": "sha512-4B/qKCfeE/ODUaAUpSwfzazo5x29WD4r3vXiWsB7I2mSDAihwEqKO+g8GELZUQSSAo5e1XTYh3ZVfLyxBc12nA==",
"license": "MIT",
"engines": {
"node": ">= 10.0.0"
}
},
"node_modules/agentkeepalive": {
"version": "3.5.3",
"resolved": "https://registry.npmjs.org/agentkeepalive/-/agentkeepalive-3.5.3.tgz",
"integrity": "sha512-yqXL+k5rr8+ZRpOAntkaaRgWgE5o8ESAj5DyRmVTCSoZxXmqemb9Dd7T4i5UzwuERdLAJUy6XzR9zFVuf0kzkw==",
"license": "MIT",
"dependencies": {
"humanize-ms": "^1.2.1"
},
"engines": {
"node": ">= 4.0.0"
}
},
"node_modules/ali-oss": {
"version": "6.23.0",
"resolved": "https://registry.npmjs.org/ali-oss/-/ali-oss-6.23.0.tgz",
"integrity": "sha512-FipRmyd16Pr/tEey/YaaQ/24Pc3HEpLM9S1DRakEuXlSLXNIJnu1oJtHM53eVYpvW3dXapSjrip3xylZUTIZVQ==",
"license": "MIT",
"dependencies": {
"address": "^1.2.2",
"agentkeepalive": "^3.4.1",
"bowser": "^1.6.0",
"copy-to": "^2.0.1",
"dateformat": "^2.0.0",
"debug": "^4.3.4",
"destroy": "^1.0.4",
"end-or-error": "^1.0.1",
"get-ready": "^1.0.0",
"humanize-ms": "^1.2.0",
"is-type-of": "^1.4.0",
"js-base64": "^2.5.2",
"jstoxml": "^2.0.0",
"lodash": "^4.17.21",
"merge-descriptors": "^1.0.1",
"mime": "^2.4.5",
"platform": "^1.3.1",
"pump": "^3.0.0",
"qs": "^6.4.0",
"sdk-base": "^2.0.1",
"stream-http": "2.8.2",
"stream-wormhole": "^1.0.4",
"urllib": "^2.44.0",
"utility": "^1.18.0",
"xml2js": "^0.6.2"
},
"engines": {
"node": ">=8"
}
},
"node_modules/ali-oss/node_modules/merge-descriptors": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.3.tgz",
"integrity": "sha512-gaNvAS7TZ897/rVaZ0nMtAyxNyi/pdbjbAwUpFQpN70GqnVfOiXpeUUMKRBmzXaSQ8DdTX4/0ms62r2K+hE6mQ==",
"license": "MIT",
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/any-promise": {
"version": "1.3.0",
"resolved": "https://registry.npmjs.org/any-promise/-/any-promise-1.3.0.tgz",
"integrity": "sha512-7UvmKalWRt1wgjL1RrGxoSJW/0QZFIegpeGvZG9kjp8vrRu55XTHbwnqq2GpXm9uLbcuhxm3IqX9OB4MZR1b2A==",
"license": "MIT"
},
"node_modules/append-field": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/append-field/-/append-field-1.0.0.tgz",
"integrity": "sha512-klpgFSWLW1ZEs8svjfb7g4qWY0YS5imI82dTg+QahUvJ8YqAY0P10Uk8tTyh9ZGuYEZEMaeJYCF5BFuX552hsw==",
"license": "MIT"
},
"node_modules/asynckit": { "node_modules/asynckit": {
"version": "0.4.0", "version": "0.4.0",
"resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz",
@ -139,6 +220,35 @@
"url": "https://opencollective.com/express" "url": "https://opencollective.com/express"
} }
}, },
"node_modules/bowser": {
"version": "1.9.4",
"resolved": "https://registry.npmjs.org/bowser/-/bowser-1.9.4.tgz",
"integrity": "sha512-9IdMmj2KjigRq6oWhmwv1W36pDuA4STQZ8q6YO9um+x07xgYNCD3Oou+WP/3L1HNz7iqythGet3/p4wvc8AAwQ==",
"license": "MIT"
},
"node_modules/buffer-from": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz",
"integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==",
"license": "MIT"
},
"node_modules/builtin-status-codes": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/builtin-status-codes/-/builtin-status-codes-3.0.0.tgz",
"integrity": "sha512-HpGFw18DgFWlncDfjTa2rcQ4W88O1mC8e8yZ2AvQY5KDaktSTwo+KRf6nHK6FRI5FyRyb/5T6+TSxfP7QyGsmQ==",
"license": "MIT"
},
"node_modules/busboy": {
"version": "1.6.0",
"resolved": "https://registry.npmjs.org/busboy/-/busboy-1.6.0.tgz",
"integrity": "sha512-8SFQbg/0hQ9xy3UNTB0YEnsNBbWfhf7RtnzpL7TkBiTBRfrQ9Fxcnz7VJsleJpyp6rVLvXiuORqjlHi5q+PYuA==",
"dependencies": {
"streamsearch": "^1.1.0"
},
"engines": {
"node": ">=10.16.0"
}
},
"node_modules/bytes": { "node_modules/bytes": {
"version": "3.1.2", "version": "3.1.2",
"resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz", "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz",
@ -189,6 +299,21 @@
"node": ">= 0.8" "node": ">= 0.8"
} }
}, },
"node_modules/concat-stream": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-2.0.0.tgz",
"integrity": "sha512-MWufYdFw53ccGjCA+Ol7XJYpAlW6/prSMzuPOTRnJGcGzuhLn4Scrz7qf6o8bROZ514ltazcIFJZevcfbo0x7A==",
"engines": [
"node >= 6.0"
],
"license": "MIT",
"dependencies": {
"buffer-from": "^1.0.0",
"inherits": "^2.0.3",
"readable-stream": "^3.0.2",
"typedarray": "^0.0.6"
}
},
"node_modules/content-disposition": { "node_modules/content-disposition": {
"version": "1.0.0", "version": "1.0.0",
"resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-1.0.0.tgz", "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-1.0.0.tgz",
@ -228,6 +353,18 @@
"node": ">=6.6.0" "node": ">=6.6.0"
} }
}, },
"node_modules/copy-to": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/copy-to/-/copy-to-2.0.1.tgz",
"integrity": "sha512-3DdaFaU/Zf1AnpLiFDeNCD4TOWe3Zl2RZaTzUvWiIk5ERzcCodOE20Vqq4fzCbNoHURFHT4/us/Lfq+S2zyY4w==",
"license": "MIT"
},
"node_modules/core-util-is": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz",
"integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==",
"license": "MIT"
},
"node_modules/cors": { "node_modules/cors": {
"version": "2.8.5", "version": "2.8.5",
"resolved": "https://registry.npmjs.org/cors/-/cors-2.8.5.tgz", "resolved": "https://registry.npmjs.org/cors/-/cors-2.8.5.tgz",
@ -241,6 +378,15 @@
"node": ">= 0.10" "node": ">= 0.10"
} }
}, },
"node_modules/dateformat": {
"version": "2.2.0",
"resolved": "https://registry.npmjs.org/dateformat/-/dateformat-2.2.0.tgz",
"integrity": "sha512-GODcnWq3YGoTnygPfi02ygEiRxqUxpJwuRHjdhJYuxpcZmDq4rjBiXYmbCCzStxo176ixfLT6i4NPwQooRySnw==",
"license": "MIT",
"engines": {
"node": "*"
}
},
"node_modules/debug": { "node_modules/debug": {
"version": "4.4.3", "version": "4.4.3",
"resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz", "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz",
@ -258,6 +404,18 @@
} }
} }
}, },
"node_modules/default-user-agent": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/default-user-agent/-/default-user-agent-1.0.0.tgz",
"integrity": "sha512-bDF7bg6OSNcSwFWPu4zYKpVkJZQYVrAANMYB8bc9Szem1D0yKdm4sa/rOCs2aC9+2GMqQ7KnwtZRvDhmLF0dXw==",
"license": "MIT",
"dependencies": {
"os-name": "~1.0.3"
},
"engines": {
"node": ">= 0.10.0"
}
},
"node_modules/delayed-stream": { "node_modules/delayed-stream": {
"version": "1.0.0", "version": "1.0.0",
"resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz",
@ -285,6 +443,37 @@
"node": ">= 0.8" "node": ">= 0.8"
} }
}, },
"node_modules/destroy": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz",
"integrity": "sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==",
"license": "MIT",
"engines": {
"node": ">= 0.8",
"npm": "1.2.8000 || >= 1.4.16"
}
},
"node_modules/digest-header": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/digest-header/-/digest-header-1.1.0.tgz",
"integrity": "sha512-glXVh42vz40yZb9Cq2oMOt70FIoWiv+vxNvdKdU8CwjLad25qHM3trLxhl9bVjdr6WaslIXhWpn0NO8T/67Qjg==",
"license": "MIT",
"engines": {
"node": ">= 8.0.0"
}
},
"node_modules/dotenv": {
"version": "17.2.3",
"resolved": "https://registry.npmjs.org/dotenv/-/dotenv-17.2.3.tgz",
"integrity": "sha512-JVUnt+DUIzu87TABbhPmNfVdBDt18BLOWjMUFJMSi/Qqg7NTYtabbvSNJGOJ7afbRuv9D/lngizHtP7QyLQ+9w==",
"license": "BSD-2-Clause",
"engines": {
"node": ">=12"
},
"funding": {
"url": "https://dotenvx.com"
}
},
"node_modules/dottie": { "node_modules/dottie": {
"version": "2.0.6", "version": "2.0.6",
"resolved": "https://registry.npmjs.org/dottie/-/dottie-2.0.6.tgz", "resolved": "https://registry.npmjs.org/dottie/-/dottie-2.0.6.tgz",
@ -320,6 +509,24 @@
"node": ">= 0.8" "node": ">= 0.8"
} }
}, },
"node_modules/end-of-stream": {
"version": "1.4.5",
"resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.5.tgz",
"integrity": "sha512-ooEGc6HP26xXq/N+GCGOT0JKCLDGrq2bQUZrQ7gyrJiZANJ/8YDTxTpQBXGMn+WbIQXNVpyWymm7KYVICQnyOg==",
"license": "MIT",
"dependencies": {
"once": "^1.4.0"
}
},
"node_modules/end-or-error": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/end-or-error/-/end-or-error-1.0.1.tgz",
"integrity": "sha512-OclLMSug+k2A0JKuf494im25ANRBVW8qsjmwbgX7lQ8P82H21PQ1PWkoYwb9y5yMBS69BPlwtzdIFClo3+7kOQ==",
"license": "MIT",
"engines": {
"node": ">= 0.11.14"
}
},
"node_modules/engine.io-client": { "node_modules/engine.io-client": {
"version": "6.6.3", "version": "6.6.3",
"resolved": "https://registry.npmjs.org/engine.io-client/-/engine.io-client-6.6.3.tgz", "resolved": "https://registry.npmjs.org/engine.io-client/-/engine.io-client-6.6.3.tgz",
@ -504,6 +711,18 @@
"node": ">= 0.6" "node": ">= 0.6"
} }
}, },
"node_modules/extend-shallow": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz",
"integrity": "sha512-zCnTtlxNoAiDc3gqY2aYAWFx7XWWiasuF2K8Me5WbN8otHKTUKBwjPtNpRs/rbUZm7KxWAaNj7P1a/p52GbVug==",
"license": "MIT",
"dependencies": {
"is-extendable": "^0.1.0"
},
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/finalhandler": { "node_modules/finalhandler": {
"version": "2.1.0", "version": "2.1.0",
"resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-2.1.0.tgz", "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-2.1.0.tgz",
@ -557,6 +776,18 @@
"node": ">= 6" "node": ">= 6"
} }
}, },
"node_modules/formstream": {
"version": "1.5.2",
"resolved": "https://registry.npmjs.org/formstream/-/formstream-1.5.2.tgz",
"integrity": "sha512-NASf0lgxC1AyKNXQIrXTEYkiX99LhCEXTkiGObXAkpBui86a4u8FjH1o2bGb3PpqI3kafC+yw4zWeK6l6VHTgg==",
"license": "MIT",
"dependencies": {
"destroy": "^1.0.4",
"mime": "^2.5.2",
"node-hex": "^1.0.1",
"pause-stream": "~0.0.11"
}
},
"node_modules/forwarded": { "node_modules/forwarded": {
"version": "0.2.0", "version": "0.2.0",
"resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz", "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz",
@ -630,6 +861,12 @@
"node": ">= 0.4" "node": ">= 0.4"
} }
}, },
"node_modules/get-ready": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/get-ready/-/get-ready-1.0.0.tgz",
"integrity": "sha512-mFXCZPJIlcYcth+N8267+mghfYN9h3EhsDa6JSnbA3Wrhh/XFpuowviFcsDeYZtKspQyWyJqfs4O6P8CHeTwzw==",
"license": "MIT"
},
"node_modules/gopd": { "node_modules/gopd": {
"version": "1.2.0", "version": "1.2.0",
"resolved": "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz", "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz",
@ -701,6 +938,15 @@
"url": "https://opencollective.com/express" "url": "https://opencollective.com/express"
} }
}, },
"node_modules/humanize-ms": {
"version": "1.2.1",
"resolved": "https://registry.npmjs.org/humanize-ms/-/humanize-ms-1.2.1.tgz",
"integrity": "sha512-Fl70vYtsAFb/C06PTS9dZBo7ihau+Tu/DNCk/OyHhea07S+aeMWpFFkUaXRa8fI+ScZbEI8dfSxwY7gxZ9SAVQ==",
"license": "MIT",
"dependencies": {
"ms": "^2.0.0"
}
},
"node_modules/iconv-lite": { "node_modules/iconv-lite": {
"version": "0.7.0", "version": "0.7.0",
"resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.7.0.tgz", "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.7.0.tgz",
@ -741,6 +987,21 @@
"node": ">= 0.10" "node": ">= 0.10"
} }
}, },
"node_modules/is-class-hotfix": {
"version": "0.0.6",
"resolved": "https://registry.npmjs.org/is-class-hotfix/-/is-class-hotfix-0.0.6.tgz",
"integrity": "sha512-0n+pzCC6ICtVr/WXnN2f03TK/3BfXY7me4cjCAqT8TYXEl0+JBRoqBo94JJHXcyDSLUeWbNX8Fvy5g5RJdAstQ==",
"license": "MIT"
},
"node_modules/is-extendable": {
"version": "0.1.1",
"resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz",
"integrity": "sha512-5BMULNob1vgFX6EjQw5izWDxrecWK9AM72rugNr0TFldMOi0fj6Jk+zeKIt0xGj4cEfQIJth4w3OKWOJ4f+AFw==",
"license": "MIT",
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/is-promise": { "node_modules/is-promise": {
"version": "4.0.0", "version": "4.0.0",
"resolved": "https://registry.npmjs.org/is-promise/-/is-promise-4.0.0.tgz", "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-4.0.0.tgz",
@ -753,6 +1014,41 @@
"integrity": "sha512-Ks/IoX00TtClbGQr4TWXemAnktAQvYB7HzcCxDGqEZU6oCmb2INHuOoKxbtR+HFkmYWBKv/dOZtGRiAjDhj92g==", "integrity": "sha512-Ks/IoX00TtClbGQr4TWXemAnktAQvYB7HzcCxDGqEZU6oCmb2INHuOoKxbtR+HFkmYWBKv/dOZtGRiAjDhj92g==",
"license": "MIT" "license": "MIT"
}, },
"node_modules/is-type-of": {
"version": "1.4.0",
"resolved": "https://registry.npmjs.org/is-type-of/-/is-type-of-1.4.0.tgz",
"integrity": "sha512-EddYllaovi5ysMLMEN7yzHEKh8A850cZ7pykrY1aNRQGn/CDjRDE9qEWbIdt7xGEVJmjBXzU/fNnC4ABTm8tEQ==",
"license": "MIT",
"dependencies": {
"core-util-is": "^1.0.2",
"is-class-hotfix": "~0.0.6",
"isstream": "~0.1.2"
}
},
"node_modules/isarray": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz",
"integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==",
"license": "MIT"
},
"node_modules/isstream": {
"version": "0.1.2",
"resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz",
"integrity": "sha512-Yljz7ffyPbrLpLngrMtZ7NduUgVvi6wG9RJ9IUcyCd59YQ911PBJphODUcbOVbqYfxe1wuYf/LJ8PauMRwsM/g==",
"license": "MIT"
},
"node_modules/js-base64": {
"version": "2.6.4",
"resolved": "https://registry.npmjs.org/js-base64/-/js-base64-2.6.4.tgz",
"integrity": "sha512-pZe//GGmwJndub7ZghVHz7vjb2LgC1m8B07Au3eYqeqv9emhESByMXxaEgkUkEqJe87oBbSniGYoQNIBklc7IQ==",
"license": "BSD-3-Clause"
},
"node_modules/jstoxml": {
"version": "2.2.9",
"resolved": "https://registry.npmjs.org/jstoxml/-/jstoxml-2.2.9.tgz",
"integrity": "sha512-OYWlK0j+roh+eyaMROlNbS5cd5R25Y+IUpdl7cNdB8HNrkgwQzIS7L9MegxOiWNBj9dQhA/yAxiMwCC5mwNoBw==",
"license": "MIT"
},
"node_modules/lodash": { "node_modules/lodash": {
"version": "4.17.21", "version": "4.17.21",
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz",
@ -819,6 +1115,18 @@
"url": "https://github.com/sponsors/sindresorhus" "url": "https://github.com/sponsors/sindresorhus"
} }
}, },
"node_modules/mime": {
"version": "2.6.0",
"resolved": "https://registry.npmjs.org/mime/-/mime-2.6.0.tgz",
"integrity": "sha512-USPkMeET31rOMiarsBNIHZKLGgvKc/LrjofAnBlOttf5ajRvqiRA8QsenbcooctK6d6Ts6aqZXBA+XbkKthiQg==",
"license": "MIT",
"bin": {
"mime": "cli.js"
},
"engines": {
"node": ">=4.0.0"
}
},
"node_modules/mime-db": { "node_modules/mime-db": {
"version": "1.52.0", "version": "1.52.0",
"resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz",
@ -840,6 +1148,27 @@
"node": ">= 0.6" "node": ">= 0.6"
} }
}, },
"node_modules/minimist": {
"version": "1.2.8",
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz",
"integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==",
"license": "MIT",
"funding": {
"url": "https://github.com/sponsors/ljharb"
}
},
"node_modules/mkdirp": {
"version": "0.5.6",
"resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.6.tgz",
"integrity": "sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==",
"license": "MIT",
"dependencies": {
"minimist": "^1.2.6"
},
"bin": {
"mkdirp": "bin/cmd.js"
}
},
"node_modules/moment": { "node_modules/moment": {
"version": "2.30.1", "version": "2.30.1",
"resolved": "https://registry.npmjs.org/moment/-/moment-2.30.1.tgz", "resolved": "https://registry.npmjs.org/moment/-/moment-2.30.1.tgz",
@ -867,6 +1196,46 @@
"integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",
"license": "MIT" "license": "MIT"
}, },
"node_modules/multer": {
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/multer/-/multer-2.0.2.tgz",
"integrity": "sha512-u7f2xaZ/UG8oLXHvtF/oWTRvT44p9ecwBBqTwgJVq0+4BW1g8OW01TyMEGWBHbyMOYVHXslaut7qEQ1meATXgw==",
"license": "MIT",
"dependencies": {
"append-field": "^1.0.0",
"busboy": "^1.6.0",
"concat-stream": "^2.0.0",
"mkdirp": "^0.5.6",
"object-assign": "^4.1.1",
"type-is": "^1.6.18",
"xtend": "^4.0.2"
},
"engines": {
"node": ">= 10.16.0"
}
},
"node_modules/multer/node_modules/media-typer": {
"version": "0.3.0",
"resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz",
"integrity": "sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==",
"license": "MIT",
"engines": {
"node": ">= 0.6"
}
},
"node_modules/multer/node_modules/type-is": {
"version": "1.6.18",
"resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz",
"integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==",
"license": "MIT",
"dependencies": {
"media-typer": "0.3.0",
"mime-types": "~2.1.24"
},
"engines": {
"node": ">= 0.6"
}
},
"node_modules/mysql2": { "node_modules/mysql2": {
"version": "3.15.3", "version": "3.15.3",
"resolved": "https://registry.npmjs.org/mysql2/-/mysql2-3.15.3.tgz", "resolved": "https://registry.npmjs.org/mysql2/-/mysql2-3.15.3.tgz",
@ -887,6 +1256,17 @@
"node": ">= 8.0" "node": ">= 8.0"
} }
}, },
"node_modules/mz": {
"version": "2.7.0",
"resolved": "https://registry.npmjs.org/mz/-/mz-2.7.0.tgz",
"integrity": "sha512-z81GNO7nnYMEhrGh9LeymoE4+Yr0Wn5McHIZMK5cfQCl+NDX08sCZgUc9/6MHni9IWuFLm1Z3HTCXu2z9fN62Q==",
"license": "MIT",
"dependencies": {
"any-promise": "^1.0.0",
"object-assign": "^4.0.1",
"thenify-all": "^1.0.0"
}
},
"node_modules/named-placeholders": { "node_modules/named-placeholders": {
"version": "1.1.3", "version": "1.1.3",
"resolved": "https://registry.npmjs.org/named-placeholders/-/named-placeholders-1.1.3.tgz", "resolved": "https://registry.npmjs.org/named-placeholders/-/named-placeholders-1.1.3.tgz",
@ -908,6 +1288,15 @@
"node": ">= 0.6" "node": ">= 0.6"
} }
}, },
"node_modules/node-hex": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/node-hex/-/node-hex-1.0.1.tgz",
"integrity": "sha512-iwpZdvW6Umz12ICmu9IYPRxg0tOLGmU3Tq2tKetejCj3oZd7b2nUXwP3a7QA5M9glWy8wlPS1G3RwM/CdsUbdQ==",
"license": "MIT",
"engines": {
"node": ">=8.0.0"
}
},
"node_modules/object-assign": { "node_modules/object-assign": {
"version": "4.1.1", "version": "4.1.1",
"resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz",
@ -950,6 +1339,37 @@
"wrappy": "1" "wrappy": "1"
} }
}, },
"node_modules/os-name": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/os-name/-/os-name-1.0.3.tgz",
"integrity": "sha512-f5estLO2KN8vgtTRaILIgEGBoBrMnZ3JQ7W9TMZCnOIGwHe8TRGSpcagnWDo+Dfhd/z08k9Xe75hvciJJ8Qaew==",
"license": "MIT",
"dependencies": {
"osx-release": "^1.0.0",
"win-release": "^1.0.0"
},
"bin": {
"os-name": "cli.js"
},
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/osx-release": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/osx-release/-/osx-release-1.1.0.tgz",
"integrity": "sha512-ixCMMwnVxyHFQLQnINhmIpWqXIfS2YOXchwQrk+OFzmo6nDjQ0E4KXAyyUh0T0MZgV4bUhkRrAbVqlE4yLVq4A==",
"license": "MIT",
"dependencies": {
"minimist": "^1.1.0"
},
"bin": {
"osx-release": "cli.js"
},
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/parseurl": { "node_modules/parseurl": {
"version": "1.3.3", "version": "1.3.3",
"resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz",
@ -969,12 +1389,36 @@
"url": "https://opencollective.com/express" "url": "https://opencollective.com/express"
} }
}, },
"node_modules/pause-stream": {
"version": "0.0.11",
"resolved": "https://registry.npmjs.org/pause-stream/-/pause-stream-0.0.11.tgz",
"integrity": "sha512-e3FBlXLmN/D1S+zHzanP4E/4Z60oFAa3O051qt1pxa7DEJWKAyil6upYVXCWadEnuoqa4Pkc9oUx9zsxYeRv8A==",
"license": [
"MIT",
"Apache2"
],
"dependencies": {
"through": "~2.3"
}
},
"node_modules/pg-connection-string": { "node_modules/pg-connection-string": {
"version": "2.9.1", "version": "2.9.1",
"resolved": "https://registry.npmjs.org/pg-connection-string/-/pg-connection-string-2.9.1.tgz", "resolved": "https://registry.npmjs.org/pg-connection-string/-/pg-connection-string-2.9.1.tgz",
"integrity": "sha512-nkc6NpDcvPVpZXxrreI/FOtX3XemeLl8E0qFr6F2Lrm/I8WOnaWNhIPK2Z7OHpw7gh5XJThi6j6ppgNoaT1w4w==", "integrity": "sha512-nkc6NpDcvPVpZXxrreI/FOtX3XemeLl8E0qFr6F2Lrm/I8WOnaWNhIPK2Z7OHpw7gh5XJThi6j6ppgNoaT1w4w==",
"license": "MIT" "license": "MIT"
}, },
"node_modules/platform": {
"version": "1.3.6",
"resolved": "https://registry.npmjs.org/platform/-/platform-1.3.6.tgz",
"integrity": "sha512-fnWVljUchTro6RiCFvCXBbNhJc2NijN7oIQxbwsyL0buWJPG85v81ehlHI9fXrJsMNgTofEoWIQeClKpgxFLrg==",
"license": "MIT"
},
"node_modules/process-nextick-args": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz",
"integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==",
"license": "MIT"
},
"node_modules/proxy-addr": { "node_modules/proxy-addr": {
"version": "2.0.7", "version": "2.0.7",
"resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz", "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz",
@ -994,6 +1438,16 @@
"integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==", "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==",
"license": "MIT" "license": "MIT"
}, },
"node_modules/pump": {
"version": "3.0.3",
"resolved": "https://registry.npmjs.org/pump/-/pump-3.0.3.tgz",
"integrity": "sha512-todwxLMY7/heScKmntwQG8CXVkWUOdYxIvY2s0VWAAMh/nd8SoYiRaKjlr7+iCs984f2P8zvrfWcDDYVb73NfA==",
"license": "MIT",
"dependencies": {
"end-of-stream": "^1.1.0",
"once": "^1.3.1"
}
},
"node_modules/qs": { "node_modules/qs": {
"version": "6.14.0", "version": "6.14.0",
"resolved": "https://registry.npmjs.org/qs/-/qs-6.14.0.tgz", "resolved": "https://registry.npmjs.org/qs/-/qs-6.14.0.tgz",
@ -1033,6 +1487,20 @@
"node": ">= 0.10" "node": ">= 0.10"
} }
}, },
"node_modules/readable-stream": {
"version": "3.6.2",
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz",
"integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==",
"license": "MIT",
"dependencies": {
"inherits": "^2.0.3",
"string_decoder": "^1.1.1",
"util-deprecate": "^1.0.1"
},
"engines": {
"node": ">= 6"
}
},
"node_modules/retry-as-promised": { "node_modules/retry-as-promised": {
"version": "7.1.1", "version": "7.1.1",
"resolved": "https://registry.npmjs.org/retry-as-promised/-/retry-as-promised-7.1.1.tgz", "resolved": "https://registry.npmjs.org/retry-as-promised/-/retry-as-promised-7.1.1.tgz",
@ -1081,6 +1549,21 @@
"integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==",
"license": "MIT" "license": "MIT"
}, },
"node_modules/sax": {
"version": "1.4.3",
"resolved": "https://registry.npmjs.org/sax/-/sax-1.4.3.tgz",
"integrity": "sha512-yqYn1JhPczigF94DMS+shiDMjDowYO6y9+wB/4WgO0Y19jWYk0lQ4tuG5KI7kj4FTp1wxPj5IFfcrz/s1c3jjQ==",
"license": "BlueOak-1.0.0"
},
"node_modules/sdk-base": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/sdk-base/-/sdk-base-2.0.1.tgz",
"integrity": "sha512-eeG26wRwhtwYuKGCDM3LixCaxY27Pa/5lK4rLKhQa7HBjJ3U3Y+f81MMZQRsDw/8SC2Dao/83yJTXJ8aULuN8Q==",
"license": "MIT",
"dependencies": {
"get-ready": "~1.0.0"
}
},
"node_modules/semver": { "node_modules/semver": {
"version": "7.7.3", "version": "7.7.3",
"resolved": "https://registry.npmjs.org/semver/-/semver-7.7.3.tgz", "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.3.tgz",
@ -1385,6 +1868,108 @@
"node": ">= 0.8" "node": ">= 0.8"
} }
}, },
"node_modules/stream-http": {
"version": "2.8.2",
"resolved": "https://registry.npmjs.org/stream-http/-/stream-http-2.8.2.tgz",
"integrity": "sha512-QllfrBhqF1DPcz46WxKTs6Mz1Bpc+8Qm6vbqOpVav5odAXwbyzwnEczoWqtxrsmlO+cJqtPrp/8gWKWjaKLLlA==",
"license": "MIT",
"dependencies": {
"builtin-status-codes": "^3.0.0",
"inherits": "^2.0.1",
"readable-stream": "^2.3.6",
"to-arraybuffer": "^1.0.0",
"xtend": "^4.0.0"
}
},
"node_modules/stream-http/node_modules/readable-stream": {
"version": "2.3.8",
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz",
"integrity": "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==",
"license": "MIT",
"dependencies": {
"core-util-is": "~1.0.0",
"inherits": "~2.0.3",
"isarray": "~1.0.0",
"process-nextick-args": "~2.0.0",
"safe-buffer": "~5.1.1",
"string_decoder": "~1.1.1",
"util-deprecate": "~1.0.1"
}
},
"node_modules/stream-http/node_modules/safe-buffer": {
"version": "5.1.2",
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
"integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==",
"license": "MIT"
},
"node_modules/stream-http/node_modules/string_decoder": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz",
"integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==",
"license": "MIT",
"dependencies": {
"safe-buffer": "~5.1.0"
}
},
"node_modules/stream-wormhole": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/stream-wormhole/-/stream-wormhole-1.1.0.tgz",
"integrity": "sha512-gHFfL3px0Kctd6Po0M8TzEvt3De/xu6cnRrjlfYNhwbhLPLwigI2t1nc6jrzNuaYg5C4YF78PPFuQPzRiqn9ew==",
"license": "MIT",
"engines": {
"node": ">=4.0.0"
}
},
"node_modules/streamsearch": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/streamsearch/-/streamsearch-1.1.0.tgz",
"integrity": "sha512-Mcc5wHehp9aXz1ax6bZUyY5afg9u2rv5cqQI3mRrYkGC8rW2hM02jWuwjtL++LS5qinSyhj2QfLyNsuc+VsExg==",
"engines": {
"node": ">=10.0.0"
}
},
"node_modules/string_decoder": {
"version": "1.3.0",
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz",
"integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==",
"license": "MIT",
"dependencies": {
"safe-buffer": "~5.2.0"
}
},
"node_modules/thenify": {
"version": "3.3.1",
"resolved": "https://registry.npmjs.org/thenify/-/thenify-3.3.1.tgz",
"integrity": "sha512-RVZSIV5IG10Hk3enotrhvz0T9em6cyHBLkH/YAZuKqd8hRkKhSfCGIcP2KUY0EPxndzANBmNllzWPwak+bheSw==",
"license": "MIT",
"dependencies": {
"any-promise": "^1.0.0"
}
},
"node_modules/thenify-all": {
"version": "1.6.0",
"resolved": "https://registry.npmjs.org/thenify-all/-/thenify-all-1.6.0.tgz",
"integrity": "sha512-RNxQH/qI8/t3thXJDwcstUO4zeqo64+Uy/+sNVRBx4Xn2OX+OZ9oP+iJnNFqplFra2ZUVeKCSa2oVWi3T4uVmA==",
"license": "MIT",
"dependencies": {
"thenify": ">= 3.1.0 < 4"
},
"engines": {
"node": ">=0.8"
}
},
"node_modules/through": {
"version": "2.3.8",
"resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz",
"integrity": "sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==",
"license": "MIT"
},
"node_modules/to-arraybuffer": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/to-arraybuffer/-/to-arraybuffer-1.0.1.tgz",
"integrity": "sha512-okFlQcoGTi4LQBG/PgSYblw9VOyptsz2KJZqc6qtgGdes8VktzUQkj4BI2blit072iS8VODNcMA+tvnS9dnuMA==",
"license": "MIT"
},
"node_modules/toidentifier": { "node_modules/toidentifier": {
"version": "1.0.1", "version": "1.0.1",
"resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz", "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz",
@ -1439,12 +2024,30 @@
"url": "https://opencollective.com/express" "url": "https://opencollective.com/express"
} }
}, },
"node_modules/typedarray": {
"version": "0.0.6",
"resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz",
"integrity": "sha512-/aCDEGatGvZ2BIk+HmLf4ifCJFwvKFNb9/JeZPMulfgFracn9QFcAf5GO8B/mweUjSoblS5In0cWhqpfs/5PQA==",
"license": "MIT"
},
"node_modules/undici-types": { "node_modules/undici-types": {
"version": "7.16.0", "version": "7.16.0",
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.16.0.tgz", "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.16.0.tgz",
"integrity": "sha512-Zz+aZWSj8LE6zoxD+xrjh4VfkIG8Ya6LvYkZqtUQGJPZjYl53ypCaUwWqo7eI0x66KBGeRo+mlBEkMSeSZ38Nw==", "integrity": "sha512-Zz+aZWSj8LE6zoxD+xrjh4VfkIG8Ya6LvYkZqtUQGJPZjYl53ypCaUwWqo7eI0x66KBGeRo+mlBEkMSeSZ38Nw==",
"license": "MIT" "license": "MIT"
}, },
"node_modules/unescape": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/unescape/-/unescape-1.0.1.tgz",
"integrity": "sha512-O0+af1Gs50lyH1nUu3ZyYS1cRh01Q/kUKatTOkSs7jukXE6/NebucDVxyiDsA9AQ4JC1V1jUH9EO8JX2nMDgGQ==",
"license": "MIT",
"dependencies": {
"extend-shallow": "^2.0.1"
},
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/unpipe": { "node_modules/unpipe": {
"version": "1.0.0", "version": "1.0.0",
"resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz",
@ -1454,6 +2057,80 @@
"node": ">= 0.8" "node": ">= 0.8"
} }
}, },
"node_modules/urllib": {
"version": "2.44.0",
"resolved": "https://registry.npmjs.org/urllib/-/urllib-2.44.0.tgz",
"integrity": "sha512-zRCJqdfYllRDA9bXUtx+vccyRqtJPKsw85f44zH7zPD28PIvjMqIgw9VwoTLV7xTBWZsbebUFVHU5ghQcWku2A==",
"license": "MIT",
"dependencies": {
"any-promise": "^1.3.0",
"content-type": "^1.0.2",
"default-user-agent": "^1.0.0",
"digest-header": "^1.0.0",
"ee-first": "~1.1.1",
"formstream": "^1.1.0",
"humanize-ms": "^1.2.0",
"iconv-lite": "^0.6.3",
"pump": "^3.0.0",
"qs": "^6.4.0",
"statuses": "^1.3.1",
"utility": "^1.16.1"
},
"engines": {
"node": ">= 0.10.0"
},
"peerDependencies": {
"proxy-agent": "^5.0.0"
},
"peerDependenciesMeta": {
"proxy-agent": {
"optional": true
}
}
},
"node_modules/urllib/node_modules/iconv-lite": {
"version": "0.6.3",
"resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz",
"integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==",
"license": "MIT",
"dependencies": {
"safer-buffer": ">= 2.1.2 < 3.0.0"
},
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/urllib/node_modules/statuses": {
"version": "1.5.0",
"resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz",
"integrity": "sha512-OpZ3zP+jT1PI7I8nemJX4AKmAX070ZkYPVWV/AaKTJl+tXCTGyVdC1a4SL8RUQYEwk/f34ZX8UTykN68FwrqAA==",
"license": "MIT",
"engines": {
"node": ">= 0.6"
}
},
"node_modules/util-deprecate": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz",
"integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==",
"license": "MIT"
},
"node_modules/utility": {
"version": "1.18.0",
"resolved": "https://registry.npmjs.org/utility/-/utility-1.18.0.tgz",
"integrity": "sha512-PYxZDA+6QtvRvm//++aGdmKG/cI07jNwbROz0Ql+VzFV1+Z0Dy55NI4zZ7RHc9KKpBePNFwoErqIuqQv/cjiTA==",
"license": "MIT",
"dependencies": {
"copy-to": "^2.0.1",
"escape-html": "^1.0.3",
"mkdirp": "^0.5.1",
"mz": "^2.7.0",
"unescape": "^1.0.1"
},
"engines": {
"node": ">= 0.12.0"
}
},
"node_modules/uuid": { "node_modules/uuid": {
"version": "8.3.2", "version": "8.3.2",
"resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz",
@ -1481,6 +2158,27 @@
"node": ">= 0.8" "node": ">= 0.8"
} }
}, },
"node_modules/win-release": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/win-release/-/win-release-1.1.1.tgz",
"integrity": "sha512-iCRnKVvGxOQdsKhcQId2PXV1vV3J/sDPXKA4Oe9+Eti2nb2ESEsYHRYls/UjoUW3bIc5ZDO8dTH50A/5iVN+bw==",
"license": "MIT",
"dependencies": {
"semver": "^5.0.1"
},
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/win-release/node_modules/semver": {
"version": "5.7.2",
"resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz",
"integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==",
"license": "ISC",
"bin": {
"semver": "bin/semver"
}
},
"node_modules/wkx": { "node_modules/wkx": {
"version": "0.5.0", "version": "0.5.0",
"resolved": "https://registry.npmjs.org/wkx/-/wkx-0.5.0.tgz", "resolved": "https://registry.npmjs.org/wkx/-/wkx-0.5.0.tgz",
@ -1517,6 +2215,28 @@
} }
} }
}, },
"node_modules/xml2js": {
"version": "0.6.2",
"resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.6.2.tgz",
"integrity": "sha512-T4rieHaC1EXcES0Kxxj4JWgaUQHDk+qwHcYOCFHfiwKz7tOVPLq7Hjq9dM1WCMhylqMEfP7hMcOIChvotiZegA==",
"license": "MIT",
"dependencies": {
"sax": ">=0.6.0",
"xmlbuilder": "~11.0.0"
},
"engines": {
"node": ">=4.0.0"
}
},
"node_modules/xmlbuilder": {
"version": "11.0.1",
"resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-11.0.1.tgz",
"integrity": "sha512-fDlsI/kFEx7gLvbecc0/ohLG50fugQp8ryHzMTuW9vSa1GJ0XYWKnhsUx7oie3G98+r56aTQIUB4kht42R3JvA==",
"license": "MIT",
"engines": {
"node": ">=4.0"
}
},
"node_modules/xmlhttprequest-ssl": { "node_modules/xmlhttprequest-ssl": {
"version": "2.1.2", "version": "2.1.2",
"resolved": "https://registry.npmjs.org/xmlhttprequest-ssl/-/xmlhttprequest-ssl-2.1.2.tgz", "resolved": "https://registry.npmjs.org/xmlhttprequest-ssl/-/xmlhttprequest-ssl-2.1.2.tgz",
@ -1524,6 +2244,15 @@
"engines": { "engines": {
"node": ">=0.4.0" "node": ">=0.4.0"
} }
},
"node_modules/xtend": {
"version": "4.0.2",
"resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz",
"integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==",
"license": "MIT",
"engines": {
"node": ">=0.4"
}
} }
} }
} }

3
package.json

@ -12,10 +12,13 @@
"author": "", "author": "",
"license": "ISC", "license": "ISC",
"dependencies": { "dependencies": {
"ali-oss": "^6.23.0",
"axios": "^1.13.2", "axios": "^1.13.2",
"cors": "^2.8.5", "cors": "^2.8.5",
"dotenv": "^17.2.3",
"express": "^5.1.0", "express": "^5.1.0",
"form-data": "^4.0.4", "form-data": "^4.0.4",
"multer": "^2.0.2",
"mysql2": "^3.15.3", "mysql2": "^3.15.3",
"sequelize": "^6.37.7", "sequelize": "^6.37.7",
"socket.io-client": "^4.8.1", "socket.io-client": "^4.8.1",

44
pages/chat/index.js

@ -28,7 +28,9 @@ Page({
debugCount: 0, // 调试信息输出计数器 debugCount: 0, // 调试信息输出计数器
loginToastShown: false, // 登录提示是否已显示 loginToastShown: false, // 登录提示是否已显示
lastLoadTime: 0, // 用于节流的时间戳 lastLoadTime: 0, // 用于节流的时间戳
chatContentCache: {} // 缓存聊天项的内容,避免重复获取 chatContentCache: {}, // 缓存聊天项的内容,避免重复获取
isRefreshing: false, // 下拉刷新状态
refreshingMessage: '' // 刷新提示消息
}, },
onLoad: function (options) { onLoad: function (options) {
@ -601,8 +603,48 @@ Page({
}); });
}, },
// 下拉刷新恢复处理
onRestore: function () {
console.log('下拉刷新恢复');
},
onPullDownRefresh: function () { onPullDownRefresh: function () {
if (this.data.isRefreshing) {
return;
}
console.log('开始下拉刷新聊天列表...');
// 设置刷新状态和提示消息
this.setData({
isRefreshing: true,
refreshingMessage: '正在刷新...'
});
// 清除缓存,确保获取最新数据
this.setData({
chatContentCache: {},
lastLoadTime: 0 // 重置时间戳,强制刷新
}, () => {
// 执行刷新
this.loadChatList(); this.loadChatList();
// 3秒后自动隐藏刷新提示
setTimeout(() => {
this.setData({
isRefreshing: false,
refreshingMessage: '刷新完成'
});
// 再过1秒后隐藏"刷新完成"提示
setTimeout(() => {
this.setData({
refreshingMessage: ''
});
}, 1000);
}, 3000);
});
wx.stopPullDownRefresh(); wx.stopPullDownRefresh();
}, },

17
pages/chat/index.wxml

@ -12,8 +12,23 @@
/> />
</view> </view>
<!-- 刷新提示条 -->
<view wx:if="{{isRefreshing || refreshingMessage}}" class="refresh-tip">
<view class="refresh-spinner"></view>
<text class="refresh-text">{{refreshingMessage || '正在刷新...'}}</text>
</view>
<!-- 聊天列表 --> <!-- 聊天列表 -->
<scroll-view scroll-y="true" class="chat-scroll-view"> <scroll-view
scroll-y="true"
class="chat-scroll-view"
refresher-enabled="{{true}}"
refresher-triggered="{{isRefreshing}}"
refresher-default-style="black"
refresher-background="transparent"
bindrefresherrefresh="onPullDownRefresh"
bindrefresherrestore="onRestore"
>
<view <view
wx:for="{{filteredChatList}}" wx:for="{{filteredChatList}}"
wx:key="id" wx:key="id"

31
pages/chat/index.wxss

@ -138,3 +138,34 @@
color: #999; color: #999;
text-align: center; text-align: center;
} }
/* 刷新提示条样式 */
.refresh-tip {
display: flex;
align-items: center;
justify-content: center;
padding: 20rpx;
background-color: #f0f0f0;
border-bottom: 1rpx solid #e5e5e5;
min-height: 60rpx;
}
.refresh-spinner {
width: 30rpx;
height: 30rpx;
border: 3rpx solid #ddd;
border-top: 3rpx solid #007aff;
border-radius: 50%;
animation: spin 1s linear infinite;
margin-right: 15rpx;
}
.refresh-text {
font-size: 26rpx;
color: #666;
}
@keyframes spin {
0% { transform: rotate(0deg); }
100% { transform: rotate(360deg); }
}

75
pages/goods-detail/goods-detail.js

@ -11,6 +11,37 @@ function getSourceTypeColor(sourceType) {
return colorMap[sourceType] || '#4d9dff'; return colorMap[sourceType] || '#4d9dff';
} }
// 媒体类型判断函数
function isVideoUrl(url) {
if (!url || typeof url !== 'string') {
return false;
}
// 转换为小写,确保大小写不敏感
const lowerUrl = url.toLowerCase();
// 支持的视频格式
const videoExtensions = ['.mp4', '.mov', '.avi', '.wmv', '.flv', '.webm', '.m4v', '.3gp'];
// 检查URL是否以视频扩展名结尾
for (const ext of videoExtensions) {
if (lowerUrl.endsWith(ext)) {
return true;
}
}
return false;
}
// 预处理媒体URL,返回包含type字段的媒体对象数组
function processMediaUrls(urls) {
if (!urls || !Array.isArray(urls)) {
return [];
}
return urls.map(url => {
return {
url: url,
type: isVideoUrl(url) ? 'video' : 'image'
};
});
}
// 格式化毛重显示的辅助函数 // 格式化毛重显示的辅助函数
function formatGrossWeight(grossWeight, weight) { function formatGrossWeight(grossWeight, weight) {
console.log('===== formatGrossWeight 函数调用 ====='); console.log('===== formatGrossWeight 函数调用 =====');
@ -354,6 +385,21 @@ Page({
// 不再使用selected或reservationCount字段计算,确保收藏人数显示正确 // 不再使用selected或reservationCount字段计算,确保收藏人数显示正确
const finalReservationCount = product.reservedCount || 0; const finalReservationCount = product.reservedCount || 0;
// 调试:打印imageUrls信息
console.log('商品imageUrls:', product.imageUrls);
console.log('imageUrls类型:', typeof product.imageUrls);
console.log('imageUrls是否为数组:', Array.isArray(product.imageUrls));
// 确保imageUrls是数组
let imageUrls = product.imageUrls || [];
if (!Array.isArray(imageUrls)) {
console.error('imageUrls不是数组,转换为数组');
imageUrls = [imageUrls];
}
// 调试:打印处理后的imageUrls
console.log('处理后的imageUrls:', imageUrls);
// 处理grossWeight为null或无效的情况,返回空字符串以支持文字输入 // 处理grossWeight为null或无效的情况,返回空字符串以支持文字输入
const grossWeightValue = product.grossWeight !== null && product.grossWeight !== undefined ? product.grossWeight : ''; const grossWeightValue = product.grossWeight !== null && product.grossWeight !== undefined ? product.grossWeight : '';
@ -475,6 +521,10 @@ Page({
} }
if (!region) region = '地区未知'; if (!region) region = '地区未知';
// 预处理媒体URL,添加类型信息
const mediaItems = processMediaUrls(imageUrls || []);
console.log('预处理后的媒体数据:', mediaItems);
// 转换商品数据格式 // 转换商品数据格式
const formattedGoods = { const formattedGoods = {
id: productIdStr, id: productIdStr,
@ -487,7 +537,9 @@ Page({
spec: product.spec || product.specification || '暂无规格', spec: product.spec || product.specification || '暂无规格',
region: region, region: region,
// 保留原始字段引用,确保数据完整性 // 保留原始字段引用,确保数据完整性
imageUrls: product.imageUrls || product.images || [], imageUrls: imageUrls || [],
// 添加预处理后的媒体数据,包含类型信息
mediaItems: mediaItems,
displayGrossWeight: formatGrossWeight(grossWeightValue, product.weight), displayGrossWeight: formatGrossWeight(grossWeightValue, product.weight),
isReserved: reservedGoodsIds.some(itemId => String(itemId) === productIdStr), isReserved: reservedGoodsIds.some(itemId => String(itemId) === productIdStr),
created_at: product.created_at || product.createdAt, created_at: product.created_at || product.createdAt,
@ -512,6 +564,10 @@ Page({
weightQuantityData: weightQuantityData weightQuantityData: weightQuantityData
}; };
// 调试:打印formattedGoods的imageUrls和mediaItems
console.log('formattedGoods.imageUrls:', formattedGoods.imageUrls);
console.log('formattedGoods.mediaItems:', formattedGoods.mediaItems);
console.log('最终格式化后的数据:', { console.log('最终格式化后的数据:', {
product_contact: formattedGoods.product_contact, product_contact: formattedGoods.product_contact,
contact_phone: formattedGoods.contact_phone, contact_phone: formattedGoods.contact_phone,
@ -752,20 +808,31 @@ Page({
} }
}, },
// 预览图片 // 预览媒体(只对图片执行预览操作)
previewImage(e) { previewImage(e) {
const { urls, index } = e.currentTarget.dataset; const { urls, index } = e.currentTarget.dataset;
if (!urls || urls.length === 0) { if (!urls || urls.length === 0) {
wx.showToast({ wx.showToast({
title: '没有图片可预览', title: '没有内容可预览',
icon: 'none' icon: 'none'
}); });
return; return;
} }
// 检查当前点击的是否为图片
const currentUrl = urls[index];
const isVideo = currentUrl.includes('.mp4') || currentUrl.includes('.mov') || currentUrl.includes('.avi') || currentUrl.includes('.wmv') || currentUrl.includes('.flv') || currentUrl.includes('.webm');
if (isVideo) {
// 视频不执行预览,直接播放
console.log('当前是视频,不执行预览操作');
return;
}
// 只对图片执行预览操作
this.setData({ this.setData({
showImagePreview: true, showImagePreview: true,
previewImageUrls: urls, previewImageUrls: urls.filter(url => !url.includes('.mp4') && !url.includes('.mov') && !url.includes('.avi') && !url.includes('.wmv') && !url.includes('.flv') && !url.includes('.webm')),
previewImageIndex: parseInt(index || 0) previewImageIndex: parseInt(index || 0)
}); });
this.resetZoom(); this.resetZoom();

31
pages/goods-detail/goods-detail.wxml

@ -2,7 +2,7 @@
<view class="goods-detail-page"> <view class="goods-detail-page">
<!-- 商品详情内容 --> <!-- 商品详情内容 -->
<view class="goods-detail-content"> <view class="goods-detail-content">
<!-- 商品图片轮播 --> <!-- 商品媒体轮播(支持图片和视频) -->
<view class="goods-image-slider"> <view class="goods-image-slider">
<swiper <swiper
indicator-dots="{{true}}" indicator-dots="{{true}}"
@ -13,12 +13,33 @@
indicator-active-color="#ffffff" indicator-active-color="#ffffff"
circular="{{true}}" circular="{{true}}"
> >
<block wx:for="{{goodsDetail.imageUrls}}" wx:key="index"> <block wx:for="{{goodsDetail.mediaItems}}" wx:key="index">
<swiper-item> <swiper-item>
<!-- 视频处理:根据类型字段判断 -->
<video
wx:if="{{item.type === 'video'}}"
src="{{item.url}}"
class="slider-media"
mode="aspectFill"
show-center-play-btn="{{true}}"
show-play-btn="{{false}}"
controls="{{true}}"
autoplay="{{true}}"
loop="{{true}}"
muted="{{true}}"
initial-time="0"
show-mute-btn="{{true}}"
enable-progress-gesture="{{true}}"
enable-play-gesture="{{true}}"
object-fit="fill"
poster="" >
</video>
<!-- 图片处理 -->
<image <image
src="{{item}}" wx:else
src="{{item.url}}"
mode="aspectFill" mode="aspectFill"
class="slider-image" class="slider-media"
bindtap="previewImage" bindtap="previewImage"
data-urls="{{goodsDetail.imageUrls}}" data-urls="{{goodsDetail.imageUrls}}"
data-index="{{index}}" data-index="{{index}}"
@ -30,7 +51,7 @@
</view> </view>
<!-- 商品基本信息 --> <!-- 商品基本信息 -->
<view class="goods-info" style="margin-top: -40rpx;"> <view class="goods-info">
<view style="display: flex; align-items: center; justify-content: space-between; margin-bottom: 10rpx;"> <view style="display: flex; align-items: center; justify-content: space-between; margin-bottom: 10rpx;">
<view style="display: flex; align-items: center; flex: 1;"> <view style="display: flex; align-items: center; flex: 1;">
<view style="display: inline-block; margin-right: 10rpx; font-size: 18rpx; color: #fff; background: rgba(218, 165, 32, 0.8); padding: 4rpx 10rpx; border-radius: 15rpx; vertical-align: middle; backdrop-filter: blur(10rpx); border: 1rpx solid rgba(255, 255, 255, 0.3); box-shadow: 0 4rpx 12rpx rgba(0, 0, 0, 0.15), inset 0 1rpx 0 rgba(255, 255, 255, 0.5); text-shadow: 0 1rpx 2rpx rgba(0, 0, 0, 0.2); font-weight: bold; margin-top: -20rpx;">{{goodsDetail.supplyStatus || '暂无状态'}}</view> <view style="display: inline-block; margin-right: 10rpx; font-size: 18rpx; color: #fff; background: rgba(218, 165, 32, 0.8); padding: 4rpx 10rpx; border-radius: 15rpx; vertical-align: middle; backdrop-filter: blur(10rpx); border: 1rpx solid rgba(255, 255, 255, 0.3); box-shadow: 0 4rpx 12rpx rgba(0, 0, 0, 0.15), inset 0 1rpx 0 rgba(255, 255, 255, 0.5); text-shadow: 0 1rpx 2rpx rgba(0, 0, 0, 0.2); font-weight: bold; margin-top: -20rpx;">{{goodsDetail.supplyStatus || '暂无状态'}}</view>

43
pages/goods-detail/goods-detail.wxss

@ -93,19 +93,56 @@
box-sizing: border-box; box-sizing: border-box;
} }
.slider-image { .slider-media {
width: 100%; width: 100%;
height: 100%; height: 100%;
object-fit: contain; object-fit: cover;
border-radius: 8px; border-radius: 8px;
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08); box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
transition: transform 0.3s ease; transition: transform 0.3s ease;
} }
.slider-image:active { .slider-media:active {
transform: scale(0.98); transform: scale(0.98);
} }
/* 视频样式增强 */
video.slider-media {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
object-fit: fill;
z-index: 1;
}
/* 视频控制器样式 - 调整进度条位置 */
video.slider-media .wx-video-controlbar {
bottom: 50px !important;
padding-bottom: 15px !important;
height: 60px !important;
z-index: 10 !important;
}
/* 视频播放按钮样式 */
video.slider-media .wx-video-play-btn {
width: 80rpx;
height: 80rpx;
}
video.slider-media .wx-video-play-btn::after {
border-radius: 50%;
background-color: rgba(0, 0, 0, 0.6);
}
/* 视频静音图标样式 */
video.slider-media .wx-video-volume-icon {
background-image: url('https://img.icons8.com/windows/32/mute.png') !important;
background-size: contain !important;
background-repeat: no-repeat !important;
}
/* 商品基本信息 */ /* 商品基本信息 */
.goods-info { .goods-info {
background-color: #ffffff; background-color: #ffffff;

209
pages/index/index.js

@ -1,5 +1,51 @@
// pages/index/index.js // pages/index/index.js
const API = require('../../utils/api.js'); const API = require('../../utils/api.js');
// 媒体类型判断函数
function isVideoUrl(url) {
if (!url || typeof url !== 'string') {
return false;
}
// 转换为小写,确保大小写不敏感
const lowerUrl = url.toLowerCase();
// 支持的视频格式
const videoExtensions = ['.mp4', '.mov', '.avi', '.wmv', '.flv', '.webm', '.m4v', '.3gp'];
// 检查URL是否以视频扩展名结尾
for (const ext of videoExtensions) {
if (lowerUrl.endsWith(ext)) {
return true;
}
}
return false;
}
// 预处理单个商品的媒体URL
function processGoodsMedia(goods) {
if (!goods || !Array.isArray(goods)) {
return [];
}
return goods.map(item => {
// 确保imageUrls是数组
let imageUrls = item.imageUrls || [];
if (!Array.isArray(imageUrls)) {
imageUrls = [imageUrls];
}
// 预处理媒体URL,添加类型信息
const mediaItems = imageUrls.map(url => {
return {
url: url,
type: isVideoUrl(url) ? 'video' : 'image'
};
});
return {
...item,
mediaItems: mediaItems,
// 确保imageUrls是数组
imageUrls: imageUrls
};
});
}
Page({ Page({
data: { data: {
currentUserType: null, currentUserType: null,
@ -362,10 +408,21 @@ Page({
hasMoreData: true, hasMoreData: true,
goods: existingGoods, goods: existingGoods,
filteredGoods: [], filteredGoods: [],
// 清除缓存以确保获取最新数据
categoryQueryCache: {},
lastDataTimestamp: 0,
}) })
const timestamp = new Date().getTime(); const timestamp = new Date().getTime();
// 强制刷新:清除所有缓存并重新从数据库加载
this.setData({
// 清除商品数据缓存
goodsCache: [],
// 重置缓存时间戳
lastDataTimestamp: 0
});
API.getProductList('published', { API.getProductList('published', {
timestamp: timestamp, timestamp: timestamp,
viewMode: 'shopping', viewMode: 'shopping',
@ -489,6 +546,14 @@ Page({
// 确保商品ID的一致性 // 确保商品ID的一致性
const productId = product.productId || product.id; const productId = product.productId || product.id;
// 预处理媒体URL,添加类型信息
const mediaItems = formattedImageUrls.map(url => {
return {
url: url,
type: isVideoUrl(url) ? 'video' : 'image'
};
});
// 计算库存总数 - 支持逗号分隔的数字字符串 // 计算库存总数 - 支持逗号分隔的数字字符串
const calculateTotalStock = (value) => { const calculateTotalStock = (value) => {
if (!value) return 0; if (!value) return 0;
@ -511,15 +576,17 @@ Page({
const primaryStock = quantity || minOrder || stock || inventory || availableStock || totalAvailable; const primaryStock = quantity || minOrder || stock || inventory || availableStock || totalAvailable;
const totalStock = primaryStock; const totalStock = primaryStock;
// 智能库存显示 - 有数据时显示具体数字,没有数据时显示"充足" // 智能库存显示 - 库存>=10000显示"库存充足",库存=0显示"暂无",其他显示具体数字
let displayStock; let displayStock;
if (totalStock > 0) { if (totalStock >= 10000) {
displayStock = totalStock; // 库存>=10000时显示"库存充足"
} else if (stock > 0 || inventory > 0 || availableStock > 0 || totalAvailable > 0) {
displayStock = stock || inventory || availableStock || totalAvailable;
} else {
// 如果有商品数据但没有库存信息,显示"充足"
displayStock = '充足'; displayStock = '充足';
} else if (totalStock === 0) {
// 库存=0时显示"暂无"
displayStock = '暂无';
} else {
// 其他情况显示具体数字
displayStock = totalStock;
} }
console.log('库存计算详情:', { console.log('库存计算详情:', {
@ -560,6 +627,8 @@ Page({
isFavorite: false, isFavorite: false,
currentImageIndex: 0, currentImageIndex: 0,
imageUrls: formattedImageUrls, imageUrls: formattedImageUrls,
// 添加预处理后的媒体数据,包含类型信息
mediaItems: mediaItems,
totalStock: displayStock, // 使用优化后的库存显示值 totalStock: displayStock, // 使用优化后的库存显示值
originalTotalStock: totalStock, // 保留原始计算值用于调试 originalTotalStock: totalStock, // 保留原始计算值用于调试
displaySpecification: formattedSpec.displaySpec, // 格式化后的规格 displaySpecification: formattedSpec.displaySpec, // 格式化后的规格
@ -637,7 +706,9 @@ Page({
filteredGoods: filteredGoods, filteredGoods: filteredGoods,
loadingMore: false, loadingMore: false,
isLoading: false, isLoading: false,
page: this.data.page + 1 page: this.data.page + 1,
// 更新缓存时间戳
lastDataTimestamp: new Date().getTime()
}) })
}, },
@ -696,12 +767,25 @@ Page({
const filteredGoods = this.applyFilters(updatedGoods, false) const filteredGoods = this.applyFilters(updatedGoods, false)
const currentCategory = this.data.selectedCategory === '全部' ? '' : this.data.selectedCategory;
const currentKeyword = this.data.searchKeyword;
const cacheKey = `${currentCategory}_${currentKeyword}`;
this.setData({ this.setData({
goods: updatedGoods, goods: updatedGoods,
filteredGoods: filteredGoods, filteredGoods: filteredGoods,
loadingMore: false, loadingMore: false,
isLoading: false, isLoading: false,
page: this.data.page + 1 page: this.data.page + 1,
// 更新缓存时间戳
lastDataTimestamp: new Date().getTime()
})
// 更新分类查询缓存
const newCategoryQueryCache = { ...this.data.categoryQueryCache };
newCategoryQueryCache[cacheKey] = updatedGoods;
this.setData({
categoryQueryCache: newCategoryQueryCache
}) })
}, },
@ -914,15 +998,17 @@ Page({
const primaryStock = quantity || minOrder || stock || inventory || availableStock || totalAvailable; const primaryStock = quantity || minOrder || stock || inventory || availableStock || totalAvailable;
const totalStock = primaryStock; const totalStock = primaryStock;
// 智能库存显示 - 有数据时显示具体数字,没有数据时显示"充足" // 智能库存显示 - 库存>=10000显示"库存充足",库存=0显示"暂无",其他显示具体数字
let displayStock; let displayStock;
if (totalStock > 0) { if (totalStock >= 10000) {
displayStock = totalStock; // 库存>=10000时显示"库存充足"
} else if (stock > 0 || inventory > 0 || availableStock > 0 || totalAvailable > 0) { displayStock = '库存充足';
displayStock = stock || inventory || availableStock || totalAvailable; } else if (totalStock === 0) {
// 库存=0时显示"暂无"
displayStock = '暂无';
} else { } else {
// 如果有商品数据但没有库存信息,显示"充足" // 其他情况显示具体数字
displayStock = '充足'; displayStock = totalStock;
} }
const processedProduct = { const processedProduct = {
@ -974,16 +1060,21 @@ Page({
}); });
}, },
// 刷新商品列表 // 刷新商品列表 - 强制刷新机制
refreshGoodsList: function() { refreshGoodsList: function() {
this.setData({ this.setData({
page: 1, page: 1,
hasMoreData: true, hasMoreData: true,
goods: [], goods: [],
filteredGoods: [], filteredGoods: [],
loadingMore: false loadingMore: false,
// 清除所有缓存以获取最新数据
categoryQueryCache: {},
lastDataTimestamp: 0,
goodsCache: []
}, () => { }, () => {
this.loadGoods() console.log('refreshGoodsList:清除缓存并重新加载数据');
this.loadGoods(false, true); // 第二个参数true表示强制刷新
}) })
}, },
@ -1265,7 +1356,7 @@ Page({
}) })
}, },
// 选择地区(实时更新 // 选择地区(强制刷新机制
selectRegion: function(e) { selectRegion: function(e) {
const region = e.currentTarget.dataset.region const region = e.currentTarget.dataset.region
@ -1282,19 +1373,21 @@ Page({
app.globalData.showTabBar = true; app.globalData.showTabBar = true;
} }
// 如果从局部地区切换到全国地区,重新加载所有商品 // 清除缓存并重新加载数据 - 仿照下拉刷新机制
if (region === '全国' && this.data.selectedCategory === '全部' && !this.data.searchKeyword) {
// 重新加载商品数据
this.refreshGoodsList();
} else {
// 否则仅对本地商品进行筛选
const filteredGoods = this.applyFilters(this.data.goods, false)
const groupedGoods = this.groupGoodsForStaggeredLayout(filteredGoods)
this.setData({ this.setData({
filteredGoods: filteredGoods, page: 1,
groupedGoods: groupedGoods, hasMoreData: true,
}) goods: [],
} filteredGoods: [],
loadingMore: false,
// 清除所有缓存以获取最新数据
categoryQueryCache: {},
lastDataTimestamp: 0,
goodsCache: []
});
console.log('地区选择:清除缓存并重新加载数据,地区:', region);
this.loadGoods(false, true); // 强制刷新
}, },
// 阻止事件冒泡 // 阻止事件冒泡
@ -1302,7 +1395,7 @@ Page({
// 空函数,用于阻止事件冒泡 // 空函数,用于阻止事件冒泡
}, },
// 选择品种 // 选择品种 - 使用下拉刷新机制
selectCategory: function(e) { selectCategory: function(e) {
// 重新显示tabBar // 重新显示tabBar
const app = getApp(); const app = getApp();
@ -1315,55 +1408,25 @@ Page({
return // 如果选择的分类和当前相同,不重复加载 return // 如果选择的分类和当前相同,不重复加载
} }
// 如果有现有的商品数据,先基于现有数据进行筛选,而不是清空 // 清除缓存并重新加载数据 - 仿照下拉刷新机制
const originalGoods = this.data.goods;
const hasOriginalGoods = originalGoods && originalGoods.length > 0;
this.setData({ this.setData({
selectedCategory: category, selectedCategory: category,
searchKeyword: '', // 清除搜索关键词,筛选框优先级更高 searchKeyword: '', // 清除搜索关键词,筛选框优先级更高
loadingMore: false loadingMore: false,
});
if (hasOriginalGoods) {
// 使用现有商品数据进行筛选
console.log('使用现有商品数据进行分类筛选,原始商品数量:', originalGoods.length);
const filteredGoods = this.applyFilters(originalGoods, false);
const groupedGoods = this.groupGoodsForStaggeredLayout(filteredGoods);
this.setData({
filteredGoods: filteredGoods,
groupedGoods: groupedGoods,
isLoading: false
});
} else {
// 如果没有现有数据,清空并重新加载
this.setData({
page: 1, page: 1,
hasMoreData: true, hasMoreData: true,
goods: [], goods: [],
filteredGoods: [], filteredGoods: [],
isLoading: true isLoading: true,
// 清除所有缓存以获取最新数据
categoryQueryCache: {},
lastDataTimestamp: 0,
goodsCache: []
}); });
const currentCategory = category === '全部' ? '' : category; // 强制刷新:从数据库重新加载数据
const currentKeyword = this.data.searchKeyword; console.log('筛选操作:清除缓存并重新加载数据,分类:', category);
const cacheKey = `${currentCategory}_${currentKeyword}`; this.loadGoods(false, true); // 第二个参数true表示强制刷新
const now = new Date().getTime();
// 检查缓存(首次加载时使用缓存,加载更多时不用)
if (this.data.categoryQueryCache[cacheKey] &&
(now - this.data.lastDataTimestamp) < this.data.cacheValidDuration) {
console.log('selectCategory使用缓存数据,cacheKey:', cacheKey);
const cachedGoods = this.data.categoryQueryCache[cacheKey];
// 更新timestamp以确保缓存有效
this.setData({ lastDataTimestamp: now });
this.processCachedGoods(cachedGoods, false);
} else {
// 重新从服务器加载数据
this.loadGoods(false);
}
}
}, },
// 查看商品详情 // 查看商品详情

26
pages/index/index.wxml

@ -151,20 +151,38 @@
> >
<view class="product-card"> <view class="product-card">
<view class="product-image-wrapper"> <view class="product-image-wrapper">
<!-- 视频处理:根据mediaItems中的类型字段判断 -->
<video
wx:if="{{item.mediaItems && item.mediaItems.length > 0 && item.mediaItems[0].type === 'video'}}"
class="product-media"
src="{{item.mediaItems[0].url}}"
mode="aspectFill"
show-center-play-btn="{{true}}"
show-play-btn="{{false}}"
controls="{{true}}"
autoplay="{{true}}"
loop="{{true}}"
muted="{{true}}"
object-fit="fill"
poster=""
style="height: 270rpx; display: block; box-sizing: border-box; width: 337rpx; position: absolute; top: 0; left: 0; right: 0; bottom: 0; z-index: 1;">
</video>
<!-- 图片处理 -->
<image <image
class="product-image" wx:else
src="{{item.imageUrls && item.imageUrls.length > 0 ? item.imageUrls[0] : '/images/default-avatar.png'}}" class="product-media"
src="{{item.mediaItems && item.mediaItems.length > 0 ? item.mediaItems[0].url : '/images/default-avatar.png'}}"
mode="aspectFill" mode="aspectFill"
lazy-load="true" lazy-load="true"
bindload="onImageLoad" bindload="onImageLoad"
data-index="{{index}}" data-index="{{index}}"
style="height: 270rpx; display: block; box-sizing: border-box; width: 337rpx"></image> style="height: 270rpx; display: block; box-sizing: border-box; width: 337rpx; position: absolute; top: 0; left: 0; right: 0; bottom: 0; z-index: 1;"></image>
<view wx:if="{{item.supplyStatus === '预售'}}" class="promo-tag presale">预售</view> <view wx:if="{{item.supplyStatus === '预售'}}" class="promo-tag presale">预售</view>
<view wx:if="{{item.supplyStatus === '现货'}}" class="promo-tag in-stock">现货</view> <view wx:if="{{item.supplyStatus === '现货'}}" class="promo-tag in-stock">现货</view>
</view> </view>
<view class="product-info" style="height: 181rpx; display: flex; box-sizing: border-box"> <view class="product-info" style="height: 181rpx; display: flex; box-sizing: border-box">
<view class="product-title" style="height: 35rpx; display: -webkit-box; box-sizing: border-box">{{item.name}}</view> <view class="product-title" style="height: 35rpx; display: -webkit-box; box-sizing: border-box">{{item.name}}</view>
<view class="product-spec" style="width: 280rpx; height: 30rpx; display: block; box-sizing: border-box">{{item.displaySpecification}}<text wx:if="{{item.displayYolk}}"> | {{item.displayYolk}}</text></view> <view class="product-spec" style="width: 308rpx; height: 29rpx; display: block; box-sizing: border-box">{{item.displaySpecification}}<text wx:if="{{item.displayYolk}}"> | {{item.displayYolk}}</text></view>
<view class="product-status-row" style="width: 325rpx; display: block; box-sizing: border-box; height: 60rpx"> <view class="product-status-row" style="width: 325rpx; display: block; box-sizing: border-box; height: 60rpx">
<view class="status-tag source-{{item.sourceType === '三方认证' ? 'third' : (item.sourceType === '平台货源' ? 'platform' : 'unverified')}}">{{item.sourceType || ''}}</view> <view class="status-tag source-{{item.sourceType === '三方认证' ? 'third' : (item.sourceType === '平台货源' ? 'platform' : 'unverified')}}">{{item.sourceType || ''}}</view>
<view class="status-tag negotiate-{{item.negotiateStatus === '可议价' ? 'yes' : 'no'}}" style="width: 70rpx; display: inline-block; box-sizing: border-box">{{item.negotiateStatus}}</view> <view class="status-tag negotiate-{{item.negotiateStatus === '可议价' ? 'yes' : 'no'}}" style="width: 70rpx; display: inline-block; box-sizing: border-box">{{item.negotiateStatus}}</view>

25
pages/index/index.wxss

@ -103,8 +103,9 @@ page {
.goods-list { .goods-list {
flex: 1; flex: 1;
padding-top: 240rpx; padding-top: 240rpx;
height: 100%; padding-bottom: 20rpx;
min-height: 100vh; height: auto;
min-height: auto;
box-sizing: border-box; box-sizing: border-box;
overflow-y: auto; overflow-y: auto;
-webkit-overflow-scrolling: touch; -webkit-overflow-scrolling: touch;
@ -141,18 +142,15 @@ page {
/* 确保滚动视图有正确的容器高度 */ /* 确保滚动视图有正确的容器高度 */
.goods-section { .goods-section {
flex: 1;
display: flex;
flex-direction: column;
height: auto; height: auto;
min-height: calc(100vh - 60rpx); min-height: auto;
position: relative; position: relative;
background: #f5f5f5; background: #f5f5f5;
padding-bottom: calc(env(safe-area-inset-bottom) ); padding-bottom: calc(env(safe-area-inset-bottom) + 120rpx);
} overflow: hidden;
.goods-list {
height: auto;
box-sizing: border-box;
background: #f5f5f5;
padding-bottom: calc(env(safe-area-inset-bottom) );
} }
/* 标题样式 */ /* 标题样式 */
@ -1279,6 +1277,11 @@ wx-button:not([size=mini]) {
background-color: #f5f5f5; background-color: #f5f5f5;
} }
/* 视频样式增强 */
video.product-media {
object-fit: fill;
}
/* 促销标签 */ /* 促销标签 */
.promo-tag { .promo-tag {
position: absolute; position: absolute;

1
pages/settlement/index.wxml

@ -4,6 +4,7 @@
<!-- 引导页 --> <!-- 引导页 -->
<view class="guide-page" wx:if="{{showGuidePage}}"> <view class="guide-page" wx:if="{{showGuidePage}}">
<view class="guide-content"> <view class="guide-content">
<image class="guide-image" src="/images/立即入驻7.jpg" mode="scaleToFill"></image>
<view class="guide-title">成为供应商</view> <view class="guide-title">成为供应商</view>
<view class="guide-description">完成入驻后即可发布货源,开展鸡蛋贸易</view> <view class="guide-description">完成入驻后即可发布货源,开展鸡蛋贸易</view>
<button class="guide-button btn btn-primary" bindtap="startSettlement">立即入驻</button> <button class="guide-button btn btn-primary" bindtap="startSettlement">立即入驻</button>

71
pages/settlement/index.wxss

@ -64,12 +64,45 @@
justify-content: center; justify-content: center;
align-items: center; align-items: center;
min-height: 80vh; min-height: 80vh;
padding: 0 40rpx; padding: 0 20rpx;
} }
.guide-content { .guide-content {
text-align: center; text-align: center;
width: 100%; width: 100%;
transform: translateY(-160rpx);
}
.guide-image {
display: block;
width: 800rpx;
height: 550rpx;
border-radius: 24rpx;
margin: 0 auto 48rpx;
box-shadow: 0 12rpx 40rpx rgba(0, 0, 0, 0.15);
object-fit: fill;
background-color: #f5f5f5;
transition: all 0.3s ease;
position: relative;
left: 50%;
transform: translateX(-50%) translateY(0);
animation: guideImageSlideIn 0.8s cubic-bezier(0.4, 0, 0.2, 1) backwards;
}
.guide-image:hover {
transform: translateX(-50%) translateY(-8rpx);
box-shadow: 0 16rpx 50rpx rgba(0, 0, 0, 0.2);
}
@keyframes guideImageSlideIn {
from {
opacity: 0;
transform: translateX(-50%) translateY(40rpx) scale(0.9);
}
to {
opacity: 1;
transform: translateX(-50%) translateY(0) scale(1);
}
} }
.guide-title { .guide-title {
@ -77,6 +110,7 @@
font-weight: bold; font-weight: bold;
color: #333; color: #333;
margin-bottom: 20rpx; margin-bottom: 20rpx;
animation: guideTitleSlideIn 0.8s cubic-bezier(0.4, 0, 0.2, 1) 0.2s backwards;
} }
.guide-description { .guide-description {
@ -84,6 +118,7 @@
color: #666; color: #666;
margin-bottom: 60rpx; margin-bottom: 60rpx;
line-height: 40rpx; line-height: 40rpx;
animation: guideDescSlideIn 0.8s cubic-bezier(0.4, 0, 0.2, 1) 0.4s backwards;
} }
.guide-button { .guide-button {
@ -91,6 +126,40 @@
height: 96rpx; height: 96rpx;
font-size: 32rpx; font-size: 32rpx;
border-radius: 48rpx; border-radius: 48rpx;
animation: guideButtonSlideIn 0.8s cubic-bezier(0.4, 0, 0.2, 1) 0.6s backwards;
}
@keyframes guideTitleSlideIn {
from {
opacity: 0;
transform: translateY(20rpx);
}
to {
opacity: 1;
transform: translateY(0);
}
}
@keyframes guideDescSlideIn {
from {
opacity: 0;
transform: translateY(20rpx);
}
to {
opacity: 1;
transform: translateY(0);
}
}
@keyframes guideButtonSlideIn {
from {
opacity: 0;
transform: translateY(20rpx) scale(0.95);
}
to {
opacity: 1;
transform: translateY(0) scale(1);
}
} }
@keyframes contentFadeIn { @keyframes contentFadeIn {

2
project.private.config.json

@ -1,6 +1,6 @@
{ {
"libVersion": "3.10.3", "libVersion": "3.10.3",
"projectname": "Mini-New2", "projectname": "Mini-Program",
"setting": { "setting": {
"urlCheck": false, "urlCheck": false,
"coverView": true, "coverView": true,

2
server-example/server-mysql.js

@ -145,7 +145,7 @@ const storage = multer.diskStorage({
}); });
// 为了解决URL重复问题,添加GET方法支持和URL修复处理 // 为了解决URL重复问题,添加GET方法支持和URL修复处理
app.get('/api/wechat/getOpenid*', async (req, res) => { app.get('/api/wechat/getOpenid', async (req, res) => {
// 无论URL格式如何,都返回正确的响应格式 // 无论URL格式如何,都返回正确的响应格式
res.json({ res.json({
success: false, success: false,

Loading…
Cancel
Save