docs
Showing
10 changed files
with
12 additions
and
16 deletions
No preview for this file type
... | @@ -7,16 +7,14 @@ | ... | @@ -7,16 +7,14 @@ |
7 | <van-tabbar-item to="/about" icon="user-o"> | 7 | <van-tabbar-item to="/about" icon="user-o"> |
8 | 关于我 | 8 | 关于我 |
9 | </van-tabbar-item> | 9 | </van-tabbar-item> |
10 | </van-tabbar> | 10 | </van-tabbar> |
11 | <!-- <van-tabbar fixed v-model="active" @change="onChange"> | 11 | <!-- <van-tabbar fixed v-model="active" @change="onChange"> |
12 | <van-tabbar-item to="/home" icon="home-o">首页</van-tabbar-item> | 12 | <van-tabbar-item to="/home" icon="home-o">首页</van-tabbar-item> |
13 | <van-tabbar-item to="/about" icon="user-o">关于我</van-tabbar-item> | 13 | <van-tabbar-item to="/about" icon="user-o">关于我</van-tabbar-item> |
14 | </van-tabbar> --> | 14 | </van-tabbar> --> |
15 | </div> | 15 | </div> |
16 | </template> | 16 | </template> |
17 | |||
18 | <script> | 17 | <script> |
19 | |||
20 | export default { | 18 | export default { |
21 | name: 'TabBar', | 19 | name: 'TabBar', |
22 | data() { | 20 | data() { |
... | @@ -24,9 +22,7 @@ export default { | ... | @@ -24,9 +22,7 @@ export default { |
24 | active: 0 | 22 | active: 0 |
25 | } | 23 | } |
26 | }, | 24 | }, |
27 | methods: { | 25 | methods: {} |
28 | |||
29 | } | ||
30 | } | 26 | } |
31 | </script> | 27 | </script> |
32 | 28 | ... | ... |
... | @@ -5,5 +5,5 @@ module.exports = { | ... | @@ -5,5 +5,5 @@ module.exports = { |
5 | baseApi: 'https://test.xxx.com/api', // 本地api请求地址,注意:如果你使用了代理,请设置成'/' | 5 | baseApi: 'https://test.xxx.com/api', // 本地api请求地址,注意:如果你使用了代理,请设置成'/' |
6 | APPID: 'xxx', | 6 | APPID: 'xxx', |
7 | APPSECRET: 'xxx', | 7 | APPSECRET: 'xxx', |
8 | $cdn:'https://imgs.solui.cn' | 8 | $cdn: 'https://imgs.solui.cn' |
9 | } | 9 | } | ... | ... |
... | @@ -11,7 +11,7 @@ import store from './store' | ... | @@ -11,7 +11,7 @@ import store from './store' |
11 | // 引入全局样式 | 11 | // 引入全局样式 |
12 | import '@/assets/css/index.scss' | 12 | import '@/assets/css/index.scss' |
13 | // 设置 js中可以访问 $cdn | 13 | // 设置 js中可以访问 $cdn |
14 | import {$cdn} from '@/config' | 14 | import { $cdn } from '@/config' |
15 | Vue.prototype.$cdn = $cdn | 15 | Vue.prototype.$cdn = $cdn |
16 | 16 | ||
17 | // 全局引入按需引入UI库 vant | 17 | // 全局引入按需引入UI库 vant | ... | ... |
1 | // 按需全局引入 vant组件 | 1 | // 按需全局引入 vant组件 |
2 | import Vue from 'vue' | 2 | import Vue from 'vue' |
3 | import {Button, List, Cell, Tabbar, TabbarItem} from 'vant' | 3 | import { Button, List, Cell, Tabbar, TabbarItem } from 'vant' |
4 | Vue.use(Button) | 4 | Vue.use(Button) |
5 | Vue.use(Cell) | 5 | Vue.use(Cell) |
6 | Vue.use(List) | 6 | Vue.use(List) | ... | ... |
... | @@ -27,7 +27,7 @@ const createRouter = () => | ... | @@ -27,7 +27,7 @@ const createRouter = () => |
27 | new Router({ | 27 | new Router({ |
28 | // mode: 'history', // 如果你是 history模式 需要配置vue.config.js publicPath | 28 | // mode: 'history', // 如果你是 history模式 需要配置vue.config.js publicPath |
29 | // base: '/app/', | 29 | // base: '/app/', |
30 | scrollBehavior: () => ({y: 0}), | 30 | scrollBehavior: () => ({ y: 0 }), |
31 | routes: router | 31 | routes: router |
32 | }) | 32 | }) |
33 | 33 | ... | ... |
... | @@ -8,7 +8,7 @@ const mutations = { | ... | @@ -8,7 +8,7 @@ const mutations = { |
8 | } | 8 | } |
9 | const actions = { | 9 | const actions = { |
10 | // 设置name | 10 | // 设置name |
11 | setUserName({commit}, name) { | 11 | setUserName({ commit }, name) { |
12 | commit('SET_USER_NAME', name) | 12 | commit('SET_USER_NAME', name) |
13 | } | 13 | } |
14 | } | 14 | } | ... | ... |
1 | import axios from 'axios' | 1 | import axios from 'axios' |
2 | import store from '@/store' | 2 | import store from '@/store' |
3 | import {Toast} from 'vant' | 3 | import { Toast } from 'vant' |
4 | // 根据环境不同引入不同api地址 | 4 | // 根据环境不同引入不同api地址 |
5 | import {baseApi} from '@/config' | 5 | import { baseApi } from '@/config' |
6 | // create an axios instance | 6 | // create an axios instance |
7 | const service = axios.create({ | 7 | const service = axios.create({ |
8 | baseURL: baseApi, // url = base api url + request url | 8 | baseURL: baseApi, // url = base api url + request url | ... | ... |
-
Please register or sign in to post a comment