nuxt-olight-redirect
v1.0.1
Published
Nuxt module to dynamically redirect of oMall
Downloads
5
Readme
Redirect Module 🔀 nuxt-redirect-module of oMall.
[![npm version][npm-version-src]][npm-version-href] [![npm downloads][npm-downloads-src]][npm-downloads-href] [![Circle CI][circle-ci-src]][circle-ci-href] [![Codecov][codecov-src]][codecov-href] [![Dependencies][david-dm-src]][david-dm-href] [![Standard JS][standard-js-src]][standard-js-href]
Nuxt module to dynamically redirect initial requests
Features
Nuxt module to dynamically redirect
The current redirect is a personal project, please do not use it, it is still in the development stage
Setup
- Add the
nuxt-olight-redirect
dependency withyarn
ornpm
to your project - Add
nuxt-olight-redirect
to themodules
section ofnuxt.config.js
: - Configure it:
{
modules: [
['nuxt-olight-redirect']
]
}
Using top level options
{
modules: [
'nuxt-olight-redirect'
],
redirects: {
// Redirect options here
}
}
Options
url
- url:
api
Backend api interface.
type
- Default:
'PC'
- Optional value:
'H5' || 'PC'
Distinguish device type.
callback
- Default:
(data) => {}
You can set redirects list.
Usage
Simply add the links you want to redirect as objects to the module option Object:
redirects: {
url: `/config/api/seo/redirect/list`
},
Development
- Clone this repository
- Install dependencies using
yarn install
ornpm install
- Start development server using
npm run dev
License
Copyright (c) Alexander Lichter [email protected]