Browse Source

阿里云上传文件路径修改20240708

kitchenmanage
gwbvipvip 4 months ago
parent
commit
2e9a006447
6 changed files with 11 additions and 11 deletions
  1. +1
    -1
      src/pages/database/goods/goodsInfo/index.jsx
  2. +2
    -2
      src/pages/database/goods/newgoods/components/CreateForm.jsx
  3. +3
    -3
      src/pages/database/goods/newgoods/index.jsx
  4. +2
    -2
      src/pages/device/deviceVesion/components/CreateForm.jsx
  5. +1
    -1
      src/pages/device/deviceVesion/index.jsx
  6. +2
    -2
      src/pages/device/technology/index.jsx

+ 1
- 1
src/pages/database/goods/goodsInfo/index.jsx View File

@@ -79,7 +79,7 @@ const Advanced = (props) => {
customRequest({
file,
}) {
GetAliyunRequestURL({ directory: "goods", buildUniqueDirectory: false }).then((res) => {
GetAliyunRequestURL({ directory: "hkerp/test/goods", buildUniqueDirectory: false }).then((res) => {
if (res.success_Action_Status == 200) {
var formData = new FormData(); //注意formData里append添加的键的大小写
formData.append("name", file.name); //文件名


+ 2
- 2
src/pages/database/goods/newgoods/components/CreateForm.jsx View File

@@ -67,7 +67,7 @@ const CreateForm = (props) => {
customRequest({
file,
}) {
GetAliyunRequestURL({ directory: "goods", buildUniqueDirectory: false }).then((res) => {
GetAliyunRequestURL({ directory: "hkerp/test/goods", buildUniqueDirectory: false }).then((res) => {
if (res.success_Action_Status == 200) {
var formData = new FormData(); //注意formData里append添加的键的大小写
formData.append("name", file.name); //文件名
@@ -183,7 +183,7 @@ const CreateForm = (props) => {
<Form.Item name="imgUrl" hidden={true} >
<Input />
</Form.Item>
<Form.Item name="imgUrl1" label="商品图片地址">
<Form.Item name="imgUrl1" label="商品图片">
<Upload {...uploadProp} showUploadList={false}>
<div
style={{


+ 3
- 3
src/pages/database/goods/newgoods/index.jsx View File

@@ -9,7 +9,7 @@ import CreateForm from './components/CreateForm';
import { getDataBaseUrl } from '@/global_data';
import { gettree, goods, removeGoods, addGoods, updateGoods, GetDeviceTechnology, TechnologyTemplateExport, GoodsTechnologyExport, GetAliyunRequestURL, Getgoodslist } from './service';

const aliyunHostUrl = 'https://bpa.oss-cn-chengdu.aliyuncs.com/goods/';
const aliyunHostUrl = 'https://bpa.oss-cn-chengdu.aliyuncs.com/hkerp/test/goods/';

const GoodsManage = () => {
const [goodsTypes, setGoodsTypes] = useState([]);
@@ -331,7 +331,7 @@ const GoodsManage = () => {
: Upload.LIST_IGNORE;
},
name: 'file',
action: getDataBaseUrl()+'/api/goods/exportgood',
action: getDataBaseUrl()+'/api/goods/GoodsImport',
headers: {
// authorization: 'authorization-text',
Authorization: 'Bearer ' + localStorage.getItem('token')
@@ -483,7 +483,7 @@ const GoodsManage = () => {
key="primary"
onClick={async () => {
const link = document.createElement('a');
link.href = "https://bpa.oss-cn-chengdu.aliyuncs.com/newGoods/商品信息导入模板.xlsx";
link.href = "https://bpa.oss-cn-chengdu.aliyuncs.com/hkerp/test/goods/商品导入模版.xlsx";
link.click();
}}
>


+ 2
- 2
src/pages/device/deviceVesion/components/CreateForm.jsx View File

@@ -8,12 +8,12 @@ const CreateForm = (props) => {
const [modalContent, setModalContent] = useState('');
const [url, setUrl] = useState(props.values ? props.values.productUrl : null);
const [hovered, setHovered] = useState(false);
const aliyunHostUrl = 'https://bpa.oss-cn-chengdu.aliyuncs.com/deviceVesion/';
const aliyunHostUrl = 'https://bpa.oss-cn-chengdu.aliyuncs.com/hkerp/test/deviceVesion/';
const uploadProp = {
customRequest({
file,
}) {
GetAliyunRequestURL({ directory: "deviceVesion", buildUniqueDirectory: false }).then((res) => {
GetAliyunRequestURL({ directory: "hkerp/test/deviceVesion", buildUniqueDirectory: false }).then((res) => {
if (res.success_Action_Status == 200) {
var formData = new FormData(); //注意formData里append添加的键的大小写
formData.append("name", file.name); //文件名


+ 1
- 1
src/pages/device/deviceVesion/index.jsx View File

@@ -8,7 +8,7 @@ import CreateForm from './components/CreateForm';
import { GetDeviceVesionPage, AddDeviceVesion, DelDeviceVesion, UpdateDeviceVesion, GetProductList,UpdateStatus } from "./services"
import { history } from 'umi';
const key = 'message';
const aliyunHostUrl = 'https://bpa.oss-cn-chengdu.aliyuncs.com/deviceVesion/';
const aliyunHostUrl = 'https://bpa.oss-cn-chengdu.aliyuncs.com/hkerp/test/deviceVesion/';


const GoodsTypeManage = () => {


+ 2
- 2
src/pages/device/technology/index.jsx View File

@@ -26,7 +26,7 @@ const GoodsTypeManage = () => {
const [deviceTypeKey, setdeviceTypeKey] = useState('');
const [version, setversion] = useState('');
const [url, setUrl] = useState('');
let aliyunHostUrl = 'https://bpa.oss-cn-chengdu.aliyuncs.com/technology/';
let aliyunHostUrl = 'https://bpa.oss-cn-chengdu.aliyuncs.com/hkerp/test/technology/';
const props = {
beforeUpload: (file) => {
setUrl(aliyunHostUrl+file.name);
@@ -75,7 +75,7 @@ const GoodsTypeManage = () => {
}
};
function putAliyunUrl(file) {
GetAliyunRequestURL({ directory: "technology", buildUniqueDirectory: false }).then((res) => {
GetAliyunRequestURL({ directory: "hkerp/test/technology", buildUniqueDirectory: false }).then((res) => {
if (res.success_Action_Status == 200) {
var formData = new FormData(); //注意formData里append添加的键的大小写
formData.append("name", file.name); //文件名


Loading…
Cancel
Save