cd839dc6 by sunnie

docs

1 parent 5860dfb8
.DS_Store
node_modules
/dist
/docs
# local env files
.env.local
.env.*.local
......
No preview for this file type
import qs from 'qs'
// axios
import request from '@/utils/request'
//user api
// user api
// 登录
export function login(params) {
......
......@@ -14,9 +14,7 @@
</van-tabbar> -->
</div>
</template>
<script>
export default {
name: 'TabBar',
data() {
......@@ -24,9 +22,7 @@ export default {
active: 0
}
},
methods: {
}
methods: {}
}
</script>
......
......@@ -5,5 +5,5 @@ module.exports = {
baseApi: 'https://test.xxx.com/api', // 本地api请求地址,注意:如果你使用了代理,请设置成'/'
APPID: 'xxx',
APPSECRET: 'xxx',
$cdn:'https://imgs.solui.cn'
$cdn: 'https://imgs.solui.cn'
}
......
......@@ -11,7 +11,7 @@ import store from './store'
// 引入全局样式
import '@/assets/css/index.scss'
// 设置 js中可以访问 $cdn
import {$cdn} from '@/config'
import { $cdn } from '@/config'
Vue.prototype.$cdn = $cdn
// 全局引入按需引入UI库 vant
......
// 按需全局引入 vant组件
import Vue from 'vue'
import {Button, List, Cell, Tabbar, TabbarItem} from 'vant'
import { Button, List, Cell, Tabbar, TabbarItem } from 'vant'
Vue.use(Button)
Vue.use(Cell)
Vue.use(List)
......
......@@ -27,7 +27,7 @@ const createRouter = () =>
new Router({
// mode: 'history', // 如果你是 history模式 需要配置vue.config.js publicPath
// base: '/app/',
scrollBehavior: () => ({y: 0}),
scrollBehavior: () => ({ y: 0 }),
routes: router
})
......
......@@ -8,7 +8,7 @@ const mutations = {
}
const actions = {
// 设置name
setUserName({commit}, name) {
setUserName({ commit }, name) {
commit('SET_USER_NAME', name)
}
}
......
import axios from 'axios'
import store from '@/store'
import {Toast} from 'vant'
import { Toast } from 'vant'
// 根据环境不同引入不同api地址
import {baseApi} from '@/config'
import { baseApi } from '@/config'
// create an axios instance
const service = axios.create({
baseURL: baseApi, // url = base api url + request url
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!