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:
@@ -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'));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user