main
fadeaway 6 months ago
parent ddb3d8f06e
commit ceeb490fb6

@ -5,6 +5,7 @@ const {
addWebpackModuleRule,
addWebpackPlugin,
addWebpackAlias,
overrideDevServer,
} = require('customize-cra');
const ArcoWebpackPlugin = require('@arco-plugins/webpack-react');
const addLessLoader = require('customize-cra-less-loader');
@ -33,4 +34,23 @@ module.exports = {
'@': 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
label="主页背景"
field="backgroundImage"
tip="上传您的头像会在雀乐APP艺人主页展示"
tip="上传您的主页背景,会在雀乐 APP 艺人主页展示"
/>
);
};

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

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

@ -1,5 +1,6 @@
import React, { useState } from 'react';
import { Radio, Message, Form, Button } from '@arco-design/web-react';
import axios from 'axios';
import {
FormArtistName,
FormArtistAvatar,
@ -29,6 +30,35 @@ function StepArtistInfo() {
Message.warning('请阅读并同意《雀乐音乐用户服务协议》');
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) => {
console.log(err);

Loading…
Cancel
Save