-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest-settings.js
More file actions
34 lines (29 loc) · 957 Bytes
/
test-settings.js
File metadata and controls
34 lines (29 loc) · 957 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
// 测试BTC和MVC红包设置分离
console.log('测试BTC和MVC红包设置分离功能')
// 模拟BTC设置
const btcSettings = {
amount: 0.00003,
each: 0.00001,
unit: 'BTC',
quantity: 3,
message: 'BTC红包测试',
type: 1
}
// 模拟MVC设置
const mvcSettings = {
amount: 0.1,
each: 0.05,
unit: 'Space',
quantity: 2,
message: 'MVC红包测试',
type: 1
}
// 测试保存和读取
localStorage.setItem('redPacketFormSettings_btc', JSON.stringify(btcSettings))
localStorage.setItem('redPacketFormSettings_mvc', JSON.stringify(mvcSettings))
console.log('BTC设置:', JSON.parse(localStorage.getItem('redPacketFormSettings_btc')))
console.log('MVC设置:', JSON.parse(localStorage.getItem('redPacketFormSettings_mvc')))
// 验证设置互不干扰
console.log('BTC和MVC设置是否不同:',
localStorage.getItem('redPacketFormSettings_btc') !== localStorage.getItem('redPacketFormSettings_mvc')
)