Compare commits
No commits in common. 'aa4e006b00f8c71bf3ec596615874db79bee1fab' and '50bc02a1789e203f84f357a2a9f5d988967fb7d2' have entirely different histories.
aa4e006b00
...
50bc02a178
@ -1,5 +1,5 @@ |
||||
#TARO_APP_API=https://yjx.dev.yaojiankang.top |
||||
TARO_APP_API=https://mooc.yaojiankang.top |
||||
TARO_APP_API=https://yjx.dev.yaojiankang.top |
||||
#TARO_APP_API=https://mooc.yaojiankang.top |
||||
#TARO_APP_API=https://shopfix.yaojiankang.top |
||||
#TARO_APP_API=https://playedu.yaojiankang.top |
||||
TARO_APP_LGOIN=true |
||||
|
@ -1,28 +0,0 @@ |
||||
import Taro from "@tarojs/taro"; |
||||
|
||||
const KEY = 'VIDEO_EVENTS' |
||||
|
||||
interface Data { |
||||
id: number |
||||
view: number |
||||
} |
||||
|
||||
function videoAdd(data: Data) { |
||||
Taro.eventCenter.trigger(KEY + data.id, data) |
||||
} |
||||
|
||||
function videoOn(id: number, fn: (data: Data) => void) { |
||||
Taro.eventCenter.on(KEY + id, fn) |
||||
} |
||||
|
||||
function off(id: number) { |
||||
Taro.eventCenter.off(KEY + id) |
||||
} |
||||
|
||||
const VideoEvent = { |
||||
videoAdd, |
||||
videoOn, |
||||
off |
||||
} |
||||
|
||||
export default VideoEvent |
Before Width: | Height: | Size: 478 B |
Before Width: | Height: | Size: 690 B |
Loading…
Reference in new issue