fix: resolve miniapp compile errors
This commit is contained in:
@@ -45,7 +45,11 @@ const appStyle = read('miniapp/app.wxss')
|
||||
assert.match(appStyle, /--color-bg-page:\s*#FAFAF8/i, '全局背景令牌必须为 #FAFAF8')
|
||||
assert.match(appStyle, /--spacing-section:\s*48rpx/i, '模块间距必须为 24px(48rpx)')
|
||||
|
||||
const sharedServiceStyle = read('miniapp/styles/service-page.wxss')
|
||||
assert.doesNotMatch(sharedServiceStyle, /@import\s+["']\.\.\/\.\.\/app\.wxss["']/, '共享页面样式不能错误导入 ../../app.wxss')
|
||||
const homeMarkup = read('miniapp/pages/index/index.wxml')
|
||||
assert.doesNotMatch(homeMarkup, /<[^>]+wx:elif="\{\{recommendations\.length\}\}"[^>]+wx:for=/, '推荐条件分支与循环必须分离,避免 wx:else 失联')
|
||||
assert.match(homeMarkup, /<block wx:elif="\{\{recommendations\.length\}\}">/, '推荐列表必须使用 block 条件分支')
|
||||
assertInOrder(homeMarkup, [
|
||||
'品牌区', '用户状态条', 'Banner 轮播', '8个核心入口', '今日推荐',
|
||||
'善缘公益服务', '近期公益活动', '善缘服务站', '婚恋课堂', '安全提醒',
|
||||
|
||||
Reference in New Issue
Block a user