Merge Request #6

Merged
Created by Adam

Master

index页面发起网络请求,并做了H5跨域请求处理。

Assignee: Adam
Milestone: None

Merged by Adam

Commits (2)
1 participants
1 <script lang="ts"> 1 <script lang="ts">
2 import Vue from 'vue'; 2 import Vue from 'vue';
3 export default Vue.extend({ 3 export default Vue.extend({
4 mpType: 'app', 4 mpType: 'app',
5 onLaunch() { 5 onLaunch() {
6 console.log('App Launch') 6 console.log('App Launch')
7 }, 7 },
8 onShow() { 8 onShow() {
9
9 10 console.log('App Show')
10 console.log('App Show') 11 },
11 }, 12 onHide() {
12 onHide() { 13 console.log('App Hide')
13 console.log('App Hide') 14 }
14 } 15 });
15 }); 16 </script>
16 </script> 17
17 18 <style>
18 <style> 19 /*每个页面公共css */
19 /*每个页面公共css */ 20 </style>
20 </style> 21
File was created 1 // const webpackApiMocker = require('mocker-api')
2
3 // module.exports = {
4 // devServer: {
5 // before(app) {
6 // webpackApiMocker(app, path.resolve('./mock/index.js'))
7 // },
8 // proxy: {
9 // '/app/prod/list': {
10 // target: 'https://api.glass.xiuyetang.com/',
11 // pathRewrite: {
12 // '^/app': ''
13 // }
14 // }
15 // },
16 // }
17 // }