diff --git a/api/index.js b/api/index.js new file mode 100644 index 0000000..b4fc6bf --- /dev/null +++ b/api/index.js @@ -0,0 +1,14 @@ +export default ($axios) => { + return { + getSongListData: () => + $axios.get('/SongList-GBK.csv', { + headers: { + 'Content-Type': 'text/csv' + } + }), + // 有参数的情况 + postData: data => $axios.post('/api/get_index_data', data), + getData: params => $axios.get('/api/get_index_data', { params }) + // ...your other api function + } +} diff --git a/env.js b/env.js index 3638f15..fbf74d6 100644 --- a/env.js +++ b/env.js @@ -2,7 +2,7 @@ module.exports = { // 开发测试环境 dev: { NODE_ENV: 'development', - API_URL: 'https://*****.com/' + API_URL: 'https://cdn.jsdelivr.net/gh/adamaxiao/test@main' }, // 生产环境 pro: { diff --git a/nuxt.config.js b/nuxt.config.js index 7b6ae25..335227e 100644 --- a/nuxt.config.js +++ b/nuxt.config.js @@ -28,7 +28,9 @@ export default { // Plugins to run before rendering page: https://go.nuxtjs.dev/config-plugins plugins: [ - '@/plugins/antd-ui' + '@/plugins/antd-ui', + '@/plugins/vueClipboard2', + '@/plugins/request' ], // Auto import components: https://go.nuxtjs.dev/config-components diff --git a/package.json b/package.json index adc7118..786502d 100644 --- a/package.json +++ b/package.json @@ -16,10 +16,12 @@ "ant-design-vue": "^1.7.8", "core-js": "^3.25.3", "cross-env": "^7.0.3", + "csvtojson": "^2.0.10", "less": "^4.1.3", "less-loader": "7.0.0", "nuxt": "^2.15.8", "vue": "^2.7.10", + "vue-clipboard2": "^0.3.3", "vue-server-renderer": "^2.7.10", "vue-template-compiler": "^2.7.10" }, diff --git a/pages/index.vue b/pages/index.vue index f2603c9..ca6417a 100644 --- a/pages/index.vue +++ b/pages/index.vue @@ -6,7 +6,7 @@ slot="cover" alt="example" src="https://os.alipayobjects.com/rmsportal/QBnOOoLaAfKPirc.png" - style="width: 45px; height: 45px" + style="width: 60px; height: 60px" > 歌单 @@ -15,8 +15,11 @@
Home - List - App + + + 歌单 + +
- +
@@ -60,14 +64,86 @@ - - - - diff --git a/pages/index/song.vue b/pages/index/song.vue index 5bd27b9..cdcbcfd 100644 --- a/pages/index/song.vue +++ b/pages/index/song.vue @@ -2,28 +2,90 @@
- - nms;l + + +
- Footer +