feat: 黄精粉前端功能集成 + 个人中心/资产/公排页面优化 + 去除admin copyright
主要改动: - 个人中心: 去除HjfMemberBadge徽章, 会员等级改显示vip_name, "我的资产"/"公排查询"导航项改为与member-points一致风格 - 我的资产页面: 去除HjfMemberBadge, 美化卡片圆角和阴影 - 公排查询页面: 美化顶部渐变和订单卡片样式 - Admin登录页和后台布局: 彻底删除footer copyright信息 - 新增黄精粉业务页面/组件/API/Mock数据(Phase 1) - 新增PHP环境配置文档和启动脚本 Made-with: Cursor
This commit is contained in:
@@ -18,21 +18,32 @@ module.exports = {
|
||||
}
|
||||
},
|
||||
chainWebpack: config => {
|
||||
// 优先使用 HBuilderX 插件内的 babel 插件,若不存在则使用项目 node_modules(便于命令行运行)
|
||||
const path = require('path')
|
||||
const HX_BABEL = '/Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules'
|
||||
const optionalChaining = require.resolve('@babel/plugin-proposal-optional-chaining', { paths: [HX_BABEL] })
|
||||
const nullishCoalescing = require.resolve('@babel/plugin-proposal-nullish-coalescing-operator', { paths: [HX_BABEL] })
|
||||
config.module.rule('js').use('babel-loader').tap(options => {
|
||||
options = options || {}
|
||||
options.plugins = options.plugins || []
|
||||
const pluginPaths = options.plugins.map(p => (Array.isArray(p) ? p[0] : p))
|
||||
if (!pluginPaths.includes(optionalChaining)) {
|
||||
options.plugins.push(optionalChaining)
|
||||
}
|
||||
if (!pluginPaths.includes(nullishCoalescing)) {
|
||||
options.plugins.push(nullishCoalescing)
|
||||
}
|
||||
return options
|
||||
})
|
||||
const projectRoot = path.resolve(__dirname)
|
||||
let optionalChaining, nullishCoalescing
|
||||
try {
|
||||
optionalChaining = require.resolve('@babel/plugin-proposal-optional-chaining', { paths: [HX_BABEL] })
|
||||
nullishCoalescing = require.resolve('@babel/plugin-proposal-nullish-coalescing-operator', { paths: [HX_BABEL] })
|
||||
} catch (e) {
|
||||
optionalChaining = require.resolve('@babel/plugin-proposal-optional-chaining', { paths: [projectRoot] })
|
||||
nullishCoalescing = require.resolve('@babel/plugin-proposal-nullish-coalescing-operator', { paths: [projectRoot] })
|
||||
}
|
||||
if (config.module.rules.get('js')) {
|
||||
config.module.rule('js').use('babel-loader').tap(options => {
|
||||
options = options || {}
|
||||
options.plugins = options.plugins || []
|
||||
const pluginPaths = options.plugins.map(p => (Array.isArray(p) ? p[0] : p))
|
||||
if (!pluginPaths.includes(optionalChaining)) {
|
||||
options.plugins.push(optionalChaining)
|
||||
}
|
||||
if (!pluginPaths.includes(nullishCoalescing)) {
|
||||
options.plugins.push(nullishCoalescing)
|
||||
}
|
||||
return options
|
||||
})
|
||||
}
|
||||
},
|
||||
configureWebpack: config => {
|
||||
if (process.env.NODE_ENV === 'production') {
|
||||
|
||||
Reference in New Issue
Block a user