fix(mini-user): use Taro.request for analytics and prod API origin

Replace fetch with wx/Taro.request in client-logging for WeChat mini program; point production build to api.dukanghaoke.com.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-08-03 22:53:35 +08:00
parent 89fd333702
commit c8ea5a3119
7 changed files with 157 additions and 39 deletions
+1 -2
View File
@@ -9,10 +9,9 @@ const isDevMode =
process.argv.includes('development');
/** 小程序/H5 请求的后端 origin(不含 /api);本地默认本机,生产构建默认远程 */
// TODO(prod-release): 发生产前改回 https://api.dukanghaoke.com
const API_ORIGIN =
process.env.VITE_API_TARGET ??
(isDevMode ? 'http://localhost:3000' : 'https://api-test.dukanghaoke.com');
(isDevMode ? 'http://localhost:3000' : 'https://api.dukanghaoke.com');
const requireFromApp = createRequire(path.resolve(__dirname, '../package.json'));