功能:同步小程序流程

This commit is contained in:
xiaowang
2026-05-23 18:45:41 +08:00
parent 844516988b
commit 30ae763e18
117 changed files with 8823 additions and 76 deletions
+20
View File
@@ -1,6 +1,18 @@
/**
* Purpose: assert supports theme.test.js by holding or executing the assert page or API role.
* Usage: import, call, read, or update this const from the owning page/module while preserving the surrounding loading and permission flow.
*/
const assert = require('assert')
/**
* Purpose: theme supports theme.test.js by holding or executing the theme page or API role.
* Usage: import, call, read, or update this const from the owning page/module while preserving the surrounding loading and permission flow.
*/
const theme = require('./theme')
/**
* Purpose: customized supports theme.test.js by holding or executing the customized page or API role.
* Usage: import, call, read, or update this const from the owning page/module while preserving the surrounding loading and permission flow.
*/
const customized = theme.resolveShopTheme({
themePrimaryColor: '#8b4f65',
themeSecondaryColor: '#f2c9d4',
@@ -19,10 +31,18 @@ assert.strictEqual(customized.backgroundImageFileId, 'bg-file')
assert.ok(customized.styleVars.includes('--theme-primary: #8B4F65;'))
assert.ok(customized.styleVars.includes('--theme-gradient: linear-gradient(135deg, #8B4F65 0%, #F2C9D4 100%);'))
/**
* Purpose: themedPageData supports theme.test.js by holding or executing the themed page data page or API role.
* Usage: import, call, read, or update this const from the owning page/module while preserving the surrounding loading and permission flow.
*/
const themedPageData = theme.pageThemeData(customized, 'https://static.example.test/bg.jpg')
assert.ok(themedPageData.themeVars.includes('background-image: url("https://static.example.test/bg.jpg");'))
assert.strictEqual(themedPageData.theme.backgroundImageUrl, 'https://static.example.test/bg.jpg')
/**
* Purpose: fallback supports theme.test.js by holding or executing the fallback page or API role.
* Usage: import, call, read, or update this const from the owning page/module while preserving the surrounding loading and permission flow.
*/
const fallback = theme.resolveShopTheme({
themePrimaryColor: '#fff',
themeSecondaryColor: 'blue'