Initial commit of the WeChat mini program, Express backend, and admin console. Co-authored-by: Cursor <cursoragent@cursor.com>
10 lines
191 B
JavaScript
10 lines
191 B
JavaScript
const config = require('../config')
|
|
|
|
function absUrl(url) {
|
|
if (!url) return ''
|
|
if (/^https?:\/\//.test(url)) return url
|
|
return config.BASE + url
|
|
}
|
|
|
|
module.exports = { absUrl: absUrl }
|