37 lines
941 B
TypeScript
37 lines
941 B
TypeScript
import type { Playlist, TerminalBinding } from '@/types/terminal'
|
|
|
|
const MOCK_BOUND_KEY = 'wallace:screen:mock-bound'
|
|
|
|
export const getMockBinding = (): TerminalBinding => ({
|
|
bound: Boolean(uni.getStorageSync(MOCK_BOUND_KEY)),
|
|
storeName: '华莱士·演示门店',
|
|
token: 'mock-terminal-token'
|
|
})
|
|
|
|
export const completeMockBinding = () => {
|
|
uni.setStorageSync(MOCK_BOUND_KEY, true)
|
|
}
|
|
|
|
export const mockPlaylist: Playlist = {
|
|
revision: 'mock-20260820-01',
|
|
items: [
|
|
{
|
|
id: 'mock-image-1',
|
|
type: 'image',
|
|
url: 'https://images.unsplash.com/photo-1562967914-608f82629710?auto=format&fit=crop&w=1920&q=85',
|
|
duration: 8
|
|
},
|
|
{
|
|
id: 'mock-video-1',
|
|
type: 'video',
|
|
url: 'https://interactive-examples.mdn.mozilla.net/media/cc0-videos/flower.mp4'
|
|
},
|
|
{
|
|
id: 'mock-image-2',
|
|
type: 'image',
|
|
url: 'https://images.unsplash.com/photo-1550547660-d9450f859349?auto=format&fit=crop&w=1920&q=85',
|
|
duration: 8
|
|
}
|
|
]
|
|
}
|