请求二次封装
This commit is contained in:
17
.eslintrc.js
17
.eslintrc.js
@@ -29,15 +29,16 @@ module.exports = {
|
||||
}
|
||||
],
|
||||
'vue/max-attributes-per-line': [
|
||||
2,
|
||||
{
|
||||
singleline: 10,
|
||||
multiline: {
|
||||
max: 1,
|
||||
allowFirstLine: true
|
||||
'error',
|
||||
{
|
||||
'singleline': {
|
||||
'max': 1
|
||||
},
|
||||
'multiline': {
|
||||
'max': 1
|
||||
}
|
||||
}
|
||||
],
|
||||
},
|
||||
],
|
||||
'vue/singleline-html-element-content-newline': 'off',
|
||||
'vue/multiline-html-element-content-newline': 'off',
|
||||
'vue/require-v-for-key': 'off',
|
||||
|
||||
7
main.js
7
main.js
@@ -1,6 +1,5 @@
|
||||
import App from './App'
|
||||
|
||||
//引入uView-ui组件库(注意这两行要放在 import Vue 之后)
|
||||
// 引入uView-ui组件库(注意这两行要放在 import Vue 之后)
|
||||
import uView from 'uview-ui'
|
||||
Vue.use(uView)
|
||||
|
||||
@@ -9,7 +8,7 @@ import Vue from 'vue'
|
||||
Vue.config.productionTip = false
|
||||
App.mpType = 'app'
|
||||
const app = new Vue({
|
||||
...App
|
||||
...App
|
||||
})
|
||||
app.$mount()
|
||||
// #endif
|
||||
@@ -22,4 +21,4 @@ export function createApp() {
|
||||
app
|
||||
}
|
||||
}
|
||||
// #endif
|
||||
// #endif
|
||||
|
||||
@@ -5,7 +5,9 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {apiService} from '../../service/request.js'
|
||||
export default {
|
||||
computed: {},
|
||||
data() {
|
||||
return {
|
||||
list: [{
|
||||
@@ -24,7 +26,11 @@
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
|
||||
console.log('--------------')
|
||||
apiService.getCategories().then(res => {
|
||||
const {message} = res.data
|
||||
console.log(message)
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user