Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
onClickRepo(e) {
e.stopPropagation()
const { item } = this.props
console.log('item',item)
let api = 'https://api.github.com/repos/' + item.username + '/' + item.repo.name
let url = '/pages/repo/repo?url=' + encodeURI(api)
Taro.navigateTo({
url: url
})
}
goToPage = e => {
if (Taro.getEnv() === Taro.ENV_TYPE.WEB) {
Taro.navigateTo({
url: e.currentTarget.dataset.url,
});
} else {
Taro.switchTab({
url: e.currentTarget.dataset.url,
});
}
};
handleNavigate(type) {
const { repo } = this.state
switch (type) {
case NAVIGATE_TYPE.USER: {
Taro.navigateTo({
url: '/pages/account/developerInfo?username=' + repo.owner.login
})
}
break
case NAVIGATE_TYPE.REPO_CONTENT_LIST: {
Taro.navigateTo({
url: '/pages/repo/contentList?repo=' + repo.full_name
})
}
break
case NAVIGATE_TYPE.ISSUES: {
let url = '/pages/repo/issues?url=/repos/' + repo.full_name + '/issues&repo=' + repo.full_name
Taro.navigateTo({
url: url
})
}
break
case NAVIGATE_TYPE.REPO_CONTRIBUTORS_LIST: {
let url = '/pages/repo/contributors?url=/repos/' + repo.full_name + '/contributors'
Taro.navigateTo({
url: url
})
navigateDetail(url,item,cityId){
url = url+`?id=${item.id}&title=${item.nm}&cityId=${cityId}`
Taro.navigateTo({ url: url })
}
getMoviesOnList(){
navigateToMap(url,cinemaData){
url = url+`?lng=${cinemaData.lng}&lat=${cinemaData.lat}&title=${cinemaData.nm}`;
Taro.navigateTo({
url:url
})
}
navigateSeat(url,item){
handlerGohomeClick() {
Taro.navigateTo({
url: '/pages/index/index'
});
}
}
handleClickedItem(item) {
let url = '/pages/repo/repo?url=' + encodeURI(item.url)
Taro.navigateTo({
url: url
})
}
export function* navigateTo() {
while (true) {
const { playload } = yield take(ROUTER.NAVIGATE_TO) as any;
yield Taro.navigateTo(playload);
}
}
onActionSearch () {
Taro.navigateTo({
url: '/pages/search/index'
})
}
goSearch() {
Taro.navigateTo({
url: `/pages/search/index`
})
}