main
fadeaway 6 months ago
parent ddb3d8f06e
commit ceeb490fb6

@ -5,6 +5,7 @@ const {
addWebpackModuleRule, addWebpackModuleRule,
addWebpackPlugin, addWebpackPlugin,
addWebpackAlias, addWebpackAlias,
overrideDevServer,
} = require('customize-cra'); } = require('customize-cra');
const ArcoWebpackPlugin = require('@arco-plugins/webpack-react'); const ArcoWebpackPlugin = require('@arco-plugins/webpack-react');
const addLessLoader = require('customize-cra-less-loader'); const addLessLoader = require('customize-cra-less-loader');
@ -33,4 +34,23 @@ module.exports = {
'@': path.resolve(__dirname, 'src'), '@': path.resolve(__dirname, 'src'),
}) })
), ),
devServer: overrideDevServer((config) => {
config.proxy = {
'/luoo-music': {
target: 'http://39.103.180.196:9012/luoo-music/',
changeOrigin: true,
pathRewrite: {
'^/luoo-music': '',
},
},
'/user/artist': {
target: 'http://39.103.180.196:9012/user/artist/',
changeOrigin: true,
pathRewrite: {
'^/user/artist': '',
},
},
};
return config;
}),
}; };

@ -7,7 +7,7 @@ const FormHomepageBackground = () => {
<UploadForm <UploadForm
label="主页背景" label="主页背景"
field="backgroundImage" field="backgroundImage"
tip="上传您的头像会在雀乐APP艺人主页展示" tip="上传您的主页背景,会在雀乐 APP 艺人主页展示"
/> />
); );
}; };

@ -4,8 +4,8 @@ import { Form, Select } from '@arco-design/web-react';
// 类型 // 类型
const FormType = () => { const FormType = () => {
const options = [ const options = [
{ label: '个人', value: '个人' }, { label: '个人', value: 0 },
{ label: '团体', value: '团体' }, { label: '团体', value: 1 },
]; ];
return ( return (
<Form.Item <Form.Item

@ -23,10 +23,10 @@ const UploadForm = (props: UploadFormProps) => {
className={styles.uploadForm} className={styles.uploadForm}
> >
<Upload <Upload
action="/" imagePreview
onChange={(fileList, file) => { limit={1}
console.log(fileList, file); // listType="picture-card"
}} action="/luoo-music/cms/song/upload/song"
> >
<div className={styles.uploadTrigger}> <div className={styles.uploadTrigger}>
<img src={pic || UploadDefaultPic} alt="pic" width={64} height={64} /> <img src={pic || UploadDefaultPic} alt="pic" width={64} height={64} />

@ -1,5 +1,6 @@
import React, { useState } from 'react'; import React, { useState } from 'react';
import { Radio, Message, Form, Button } from '@arco-design/web-react'; import { Radio, Message, Form, Button } from '@arco-design/web-react';
import axios from 'axios';
import { import {
FormArtistName, FormArtistName,
FormArtistAvatar, FormArtistAvatar,
@ -29,6 +30,35 @@ function StepArtistInfo() {
Message.warning('请阅读并同意《雀乐音乐用户服务协议》'); Message.warning('请阅读并同意《雀乐音乐用户服务协议》');
return; return;
} }
const {
address,
avatar,
backgroundImage,
description,
nickName,
password,
screenshot,
style,
type,
userName,
} = values;
axios
.post('/user/artist/register', {
address,
avatar: avatar?.[0]?.response?.data?.fullUrl,
backgroundImage: backgroundImage?.[0]?.response?.data?.fullUrl,
// bandUserId: '',
description,
nickName,
password,
screenshot: screenshot?.[0]?.response?.data?.fullUrl,
style,
type,
userName,
})
.then((res) => {
console.log(222, res);
});
}) })
.catch((err) => { .catch((err) => {
console.log(err); console.log(err);

Loading…
Cancel
Save