小程序前端接入微信登录与环境配置

This commit is contained in:
stu2not
2026-04-16 18:18:48 +08:00
parent 1b4c47f77a
commit db888df50f
7 changed files with 81 additions and 58 deletions

View File

@@ -3,7 +3,10 @@ module.exports = {
NODE_ENV: '"development"'
},
defineConstants: {
__APP_ENV__: '"development"',
// Local backend for daily development.
__API_BASE_URL__: '"http://192.168.101.78:8001"'
},
mini: {},
h5: {}
}
}

View File

@@ -1,6 +1,6 @@
const path = require('path')
module.exports = {
const config = {
projectName: 'banban-mini',
date: '2025-3-3',
designWidth: 750,
@@ -59,4 +59,13 @@ module.exports = {
}
}
}
}
}
module.exports = function (merge) {
const envConfig =
process.env.NODE_ENV === 'development'
? require('./dev')
: require('./prod')
return merge({}, config, envConfig)
}

View File

@@ -3,7 +3,10 @@ module.exports = {
NODE_ENV: '"production"'
},
defineConstants: {
__APP_ENV__: '"production"',
// Replace with the production backend before publishing a release build.
__API_BASE_URL__: '"http://192.168.101.78:8001"'
},
mini: {},
h5: {}
}
}