Browse Source

fix(): 修改资讯管理页面

tags/PMS_Frontend_v1.0.6-develop
fengxiang 2 years ago
parent
commit
c32ff0c530
  1. BIN
      src/assets/images/top.png
  2. 4
      src/pages/OperationCenter/OperationSales/AdsMgm/index.scss
  3. 17
      src/pages/OperationCenter/OperationSales/AdsMgm/loadable.jsx
  4. 4
      src/pages/OperationCenter/OperationSales/AppPushMgm/index.scss
  5. 16
      src/pages/OperationCenter/OperationSales/InformationMgm/index.scss
  6. 557
      src/pages/OperationCenter/OperationSales/InformationMgm/loadable.jsx
  7. 21
      src/services/OperationCenter/OperationMarket/information.js

BIN
src/assets/images/top.png

After

Width: 40  |  Height: 40  |  Size: 861 B

4
src/pages/OperationCenter/OperationSales/AdsMgm/index.scss

@ -148,11 +148,11 @@
.r-con {
flex: 1;
.row-lg {
>.row-lg {
width: 100%;
}
.row-sm {
>.row-sm {
width: 40%;
}
}

17
src/pages/OperationCenter/OperationSales/AdsMgm/loadable.jsx

@ -774,19 +774,22 @@ function AdsMgm() {
</div>
<div className="form-box">
<div className="form-txt">区域</div>
<TreeSelect
{/* <TreeSelect */}
<Cascader
className="form-con"
allowClear
placeholder="全部"
treeCheckable={true}
multiple
maxTagCount="responsive"
showCheckedStrategy={TreeSelect.SHOW_CHILD}
// treeCheckable={true}
// showCheckedStrategy={TreeSelect.SHOW_CHILD}
fieldNames={{
label: "name",
value: "id",
children: "children",
}}
treeData={areaList || []}
options={areaList || []}
// treeData={areaList || []}
value={formData?.areaIds || []}
onChange={(e) => setFormData({ ...formData, areaIds: e })}
/>
@ -954,19 +957,17 @@ function AdsMgm() {
<div className="row-line">
<div className="r-txt required">区域</div>
<div className="r-con">
<TreeSelect
<Cascader
className="row-lg"
allowClear
placeholder="请选择"
treeCheckable={true}
maxTagCount="responsive"
showCheckedStrategy={TreeSelect.SHOW_CHILD}
fieldNames={{
label: "name",
value: "id",
children: "children",
}}
treeData={areaList || []}
options={areaList || []}
value={rowData?.areaIds || []}
onChange={(e) => handleForm("areaIds", e)}
/>

4
src/pages/OperationCenter/OperationSales/AppPushMgm/index.scss

@ -154,11 +154,11 @@
.r-con {
flex: 1;
.row-lg {
>.row-lg {
width: 100%;
}
.row-sm {
>.row-sm {
width: 40%;
}

16
src/pages/OperationCenter/OperationSales/InformationMgm/index.scss

@ -117,6 +117,18 @@
.ant-image {
margin-right: 3px;
width: 30px;
height: 30px;
}
}
.ant-table-cell {
position: relative;
.stick-pic {
position: absolute;
top: 0;
left: 0;
}
}
@ -160,11 +172,11 @@
.r-con {
flex: 1;
.row-lg {
>.row-lg {
width: 100%;
}
.row-sm {
>.row-sm {
width: 40%;
}

557
src/pages/OperationCenter/OperationSales/InformationMgm/loadable.jsx

@ -30,20 +30,14 @@ import {
QuestionCircleFilled,
} from "@ant-design/icons";
// import { useSessionStorageState, useUpdateEffect, useSize, useUpdate } from 'ahooks';
import {
ResultPanel,
FormRangePicker,
AreaCascader,
ImgResize,
ImgZoom,
} from "@/components";
import { dictionary, utils } from "@/config/common";
// import ajax from "@/services";
import ajaxCom from "@/services";
import ajax from "@/services/OperationCenter/OperationMarket";
import moment from "moment";
import { getToken } from "@/config/cookie";
import { Editor, Toolbar } from "@wangeditor/editor-for-react";
import "./index.scss";
import errorImg from "@/assets/images/layout/error.png";
import topImg from "@/assets/images/top.png";
// import { useLocation } from "react-router-dom";
//
@ -52,19 +46,19 @@ function InformationMgm() {
const [pageType, setPageType] = useState("1");
//
const defaultData = {
moduleIds: "", //
areaIds: "", //
categoryIds: "", //
putStatuses: "", //
showTimes: "", //
updateTimes: "", //
advertId: "", // 广ID
informationId: "", // ID
title: "", //
isStick: "", //
categoryId: [], //
status: [], //
areaId: [], //
releaseType: [], //
updateTimes: "", //
};
//
const [pageInfo, setPageInfo] = useState({
pageNum: 1,
pageSize: 20,
pageSize: 15,
});
//
const [formData, setFormData] = useState(defaultData);
@ -83,14 +77,28 @@ function InformationMgm() {
});
//
const defRowData = {
title: "",
categoryId: "",
areaIds: [],
moduleId: "",
location: "",
imgUrl: "",
jumpUrlType: "1",
jumpUrl: "",
isReprint: "0", // 0= 1=
coverType: "0", // 0= 1=
coverUrl: [], //
title: "", //
author: "", //
areaId: [], //
releaseType: [], //
shareTitle: "", //
shareDescribe: "", //
shareImgUrl: "", //
introduction: "", //
isStick: "0", //
categoryId: "", //
readBasics: "", // -
userRead: "0", //
readMultiple: "", //
pointBasics: "", // -
userPoint: "0", //
pointMultiple: "", //
jumpUrl: "", //
upperTime: "", //
lowerTime: "", //
};
//
const [rowData, setRowData] = useState(defRowData);
@ -108,8 +116,19 @@ function InformationMgm() {
const [general, setGeneral] = useState(""); //
const [content, setContent] = useState("<p><br></p>"); //
//
const [areaList, setAreaList] = useState([]);
//
const [allSelect, setAllSelect] = useState({
release: [], //
status: [], //
isStick: [], //
category: [], //
});
// 访
useEffect(() => {
getSelectList();
getTypeList();
}, []);
@ -131,20 +150,31 @@ function InformationMgm() {
{ key: "1", label: <span>详情</span> },
{ key: "2", label: <span>编辑</span> },
{ key: "3", label: <span>上架</span> },
{ key: "4", label: <span>封存</span> },
{ key: "4", label: <span>下架</span> },
{ key: "5", label: <span>封存</span> },
];
//
const columns = [
{
title: "资讯ID",
dataIndex: "advertId",
dataIndex: "informationId",
align: "center",
},
{
title: "标题",
dataIndex: "title",
align: "center",
render: (val, row, index) => {
return (
<>
{row?.isStick == 1 ? (
<img className="stick-pic" src={topImg} />
) : null}
{val}
</>
);
},
},
{
title: "分类",
@ -153,43 +183,97 @@ function InformationMgm() {
},
{
title: "区域",
dataIndex: "areaNames",
dataIndex: "areaName",
align: "center",
render: (val, row, index) => {
return (
<Tooltip placement="top" title={val}>
{val}
</Tooltip>
);
},
},
{
title: "发布渠道",
dataIndex: "areaNames",
dataIndex: "releaseName",
align: "center",
render: (val, row, index) => {
return (
<Tooltip placement="top" title={val}>
{val}
</Tooltip>
);
},
},
{
title: "阅读数",
dataIndex: "location",
dataIndex: "readNumber",
align: "center",
sorter: (a, b) => parseInt(a.location) - parseInt(b.location),
sorter: (a, b) => parseInt(a.readNumber) - parseInt(b.readNumber),
render: (val, row, index) => {
return (
<Tooltip
placement="top"
title={`基础值(${row?.readBasics || 0})+实际用户操作值(${
row?.userRead || 0
})*放大倍数(${row?.readMultiple || 0})`}
>
{val}
</Tooltip>
);
},
},
{
title: "点赞数",
dataIndex: "location",
dataIndex: "pointNumber",
align: "center",
sorter: (a, b) => parseInt(a.location) - parseInt(b.location),
sorter: (a, b) => parseInt(a.pointNumber) - parseInt(b.pointNumber),
render: (val, row, index) => {
return (
<Tooltip
placement="top"
title={`基础值(${row?.pointBasics || 0})+实际用户操作值(${
row?.userPoint || 0
})*放大倍数(${row?.pointMultiple || 0})`}
>
{val}
</Tooltip>
);
},
},
{
title: "状态",
dataIndex: "putStatus",
dataIndex: "status",
align: "center",
render: (val, row, index) => {
return getStatusText(row?.status);
},
},
{
title: "定时计划",
dataIndex: "jumpUrl",
dataIndex: "upperTime",
align: "center",
render: (val, row, index) => {
return <CalendarOutlined />;
return (
<Tooltip
placement="top"
title={
<>
定时上架时间{row?.upperTime || "-"}
<br />
定时下架时间{row?.lowerTime || "-"}
</>
}
>
<CalendarOutlined />
</Tooltip>
);
},
},
{
title: "最后操作人",
dataIndex: "updateUser",
dataIndex: "updateUserName",
align: "center",
},
{
@ -229,17 +313,31 @@ function InformationMgm() {
},
];
//
const clickDropDown = (param, record) => {
console.log(param.key);
setRowData(record);
if (param.key == "3") {
//
if (param.key == "1") {
//
setPageType("3");
} else if (param.key == "2") {
//
setPageType("2");
setGeneral("");
setContent(record?.content || "<p><br></p>");
} else if (param.key == "3") {
//
} else if (param.key == "4") {
//
} else if (param.key == "5") {
//
} else {
//
setPageType("3");
//
if (record?.jumpUrl) {
window.open(record?.jumpUrl);
} else {
message.warn("暂时无法预览!");
}
}
};
@ -252,7 +350,7 @@ function InformationMgm() {
total: resultData?.total,
showTotal: () => `${resultData.total || 0}`,
pageSize: pageInfo.pageSize,
pageSizeOptions: dictionary?.pageSizeOptions,
pageSizeOptions: [15, 30, 50, 100],
onChange: (current, size) => {
setPageInfo({
...pageInfo,
@ -270,22 +368,23 @@ function InformationMgm() {
}
//
const newObj = {
moduleIds: postData?.moduleIds,
areaIds: postData?.areaIds,
categoryIds: postData?.categoryIds,
putStatuses: postData?.putStatuses,
updateStartTime: postData?.updateTimes?.length
isStick: postData?.isStick,
categoryId: postData?.categoryId,
status: postData?.status,
areaId: postData?.areaId,
releaseType: postData?.releaseType,
modifyStartTime: postData?.updateTimes?.length
? postData?.updateTimes[0].format("YYYY-MM-DD HH:mm:ss")
: "",
updateEndTime: postData?.updateTimes?.length
modifyEndTime: postData?.updateTimes?.length
? postData?.updateTimes[1].format("YYYY-MM-DD HH:mm:ss")
: "",
advertId: postData?.advertId,
informationId: postData?.informationId,
title: postData?.title,
};
// console.log(postData, newObj);
setTabLoading(true);
ajax.getAdvertList({ ...newObj, ...pageInfo }).then(
ajax.getInformationList({ ...newObj, ...pageInfo }).then(
(res) => {
if (parseInt(res?.status) === 20000) {
setResultData(res?.data || {});
@ -310,6 +409,40 @@ function InformationMgm() {
setHoldData(formData);
setIsAjax(!isAjax);
};
//
const getSelectList = () => {
ajax.getInformationLabel().then(
(res) => {
if (parseInt(res?.status) === 20000) {
setAllSelect(res?.data || {});
} else {
message.error(res?.message);
}
},
(err) => {
console.log(err);
}
);
//
ajaxCom.getAreaTree().then(
(res) => {
if (parseInt(res?.status) === 20000) {
setAreaList(res?.data || []);
} else {
message.error(res?.message);
}
},
(err) => {
console.log(err);
}
);
};
//
const getStatusText = (val) => {
const obj = allSelect?.status.filter((v, i) => v.value == val);
return obj?.length ? obj[0].label : "-";
};
//
const getTypeList = () => {
@ -509,10 +642,14 @@ function InformationMgm() {
return current && current < moment().subtract(1, "days");
};
//
const handleSaveAds = (flag) => {
//
const handleSaveInfo = () => {
console.log(rowData);
ajax.getAdvertList({ ...rowData, flag }).then(
ajax[rowData?.informationId ? "doInformationEdit" : "doInformationInsert"]({
...rowData,
general,
content,
}).then(
(res) => {
if (parseInt(res?.status) === 20000) {
message.success(res?.message);
@ -543,9 +680,9 @@ function InformationMgm() {
<Input
className="form-con"
placeholder="请输入准确信息"
value={formData?.advertId}
value={formData?.informationId}
onChange={(e) =>
setFormData({ ...formData, advertId: e.target.value })
setFormData({ ...formData, informationId: e.target.value })
}
/>
</div>
@ -564,40 +701,29 @@ function InformationMgm() {
<div className="form-txt">是否置顶</div>
<Select
className="form-con"
// allowClear
options={statusArr}
placeholder="全部"
value={formData?.moduleIds || undefined}
onChange={(e) => setFormData({ ...formData, moduleIds: e })}
/>
</div>
<div className="form-box">
<div className="form-txt">展示位</div>
<Select
className="form-con"
allowClear
showSearch
mode="multiple"
maxTagCount="responsive"
optionFilterProp="label"
options={statusArr}
options={allSelect?.isStick || []}
placeholder="全部"
value={formData?.moduleName || []}
onChange={(e) => setFormData({ ...formData, moduleName: e })}
value={formData?.isStick || undefined}
onChange={(e) => setFormData({ ...formData, isStick: e })}
/>
</div>
<div className="form-box">
<div className="form-txt">分类</div>
<TreeSelect
<Cascader
className="form-con"
allowClear
placeholder="全部"
treeCheckable={true}
multiple
maxTagCount="responsive"
showCheckedStrategy={TreeSelect.SHOW_CHILD}
treeData={statusArr || []}
value={formData?.categoryIds || []}
onChange={(e) => setFormData({ ...formData, categoryIds: e })}
fieldNames={{
label: "name",
value: "id",
children: "children",
}}
options={allSelect?.category || []}
value={formData?.categoryId || []}
onChange={(e) => setFormData({ ...formData, categoryId: e })}
/>
</div>
<div className="form-box">
@ -609,24 +735,32 @@ function InformationMgm() {
mode="multiple"
maxTagCount="responsive"
optionFilterProp="label"
options={statusArr}
options={allSelect?.status || []}
placeholder="全部"
value={formData?.putStatuses || []}
onChange={(e) => setFormData({ ...formData, putStatuses: e })}
value={formData?.status || []}
onChange={(e) => setFormData({ ...formData, status: e })}
/>
</div>
<div className="form-box">
<div className="form-txt">区域</div>
<TreeSelect
{/* <TreeSelect */}
<Cascader
className="form-con"
allowClear
placeholder="全部"
treeCheckable={true}
multiple
maxTagCount="responsive"
showCheckedStrategy={TreeSelect.SHOW_CHILD}
treeData={statusArr || []}
value={formData?.areaIds || []}
onChange={(e) => setFormData({ ...formData, areaIds: e })}
// treeCheckable={true}
// showCheckedStrategy={TreeSelect.SHOW_CHILD}
fieldNames={{
label: "name",
value: "id",
children: "children",
}}
options={areaList || []}
// treeData={areaList || []}
value={formData?.areaId || []}
onChange={(e) => setFormData({ ...formData, areaId: e })}
/>
</div>
<div className="form-box">
@ -638,9 +772,9 @@ function InformationMgm() {
treeCheckable={true}
maxTagCount="responsive"
showCheckedStrategy={TreeSelect.SHOW_CHILD}
treeData={statusArr || []}
value={formData?.areaIds || []}
onChange={(e) => setFormData({ ...formData, areaIds: e })}
treeData={allSelect?.release || []}
value={formData?.releaseType || []}
onChange={(e) => setFormData({ ...formData, releaseType: e })}
/>
</div>
<div className="form-box">
@ -664,6 +798,8 @@ function InformationMgm() {
className="green"
onClick={() => {
setRowData(defRowData);
setGeneral("");
setContent("<p><br></p>");
setPageType("2");
}}
>
@ -697,20 +833,30 @@ function InformationMgm() {
<div className={pageType === "2" ? "wraper" : "wraper hidden"}>
<div className="row-operate">
<div>
<Radio.Group defaultValue="1" buttonStyle="solid">
<Radio.Button value="1">原创</Radio.Button>
<Radio.Button value="2">转载</Radio.Button>
<Radio.Group
value={rowData?.isReprint}
buttonStyle="solid"
onChange={(e) => handleForm("isReprint", e.target.value)}
>
<Radio.Button value="0">原创</Radio.Button>
<Radio.Button value="1">转载</Radio.Button>
</Radio.Group>
</div>
<div>
<Button
type="primary"
className="green"
onClick={() => handleSaveAds(1)}
onClick={() => {
if (rowData?.jumpUrl) {
window.open(rowData?.jumpUrl);
} else {
message.warn("暂时无法预览!");
}
}}
>
预览
</Button>
<Button type="primary" onClick={() => handleSaveAds(2)}>
<Button type="primary" onClick={() => handleSaveInfo()}>
保存
</Button>
<Button onClick={() => handleBack()}>返回</Button>
@ -723,30 +869,32 @@ function InformationMgm() {
<div className="r-txt">封面图片</div>
<div className="r-con">
<Radio.Group
value={rowData?.jumpUrlType + ""}
onChange={(e) => handleForm("jumpUrlType", e.target.value)}
value={rowData?.coverType + ""}
onChange={(e) => handleForm("coverType", e.target.value)}
>
<Radio value="1">单图模式</Radio>
<Radio value="2">三图模式</Radio>
<Radio value="0">单图模式</Radio>
<Radio value="1">三图模式</Radio>
</Radio.Group>
<div>
<div
className={`${!rowData?.imgUrl ? "hidden" : "pic-box"}`}
className={`${!rowData?.coverUrl ? "hidden" : "pic-box"}`}
>
<Image
width={148}
height={148}
preview={false}
src={rowData?.imgUrl || "error"}
src={rowData?.coverUrl || "error"}
fallback={errorImg}
/>
<DeleteOutlined
className="delete-btn"
onClick={() => handleForm("imgUrl", "")}
onClick={() => handleForm("coverUrl", "")}
/>
</div>
<Upload
className={`${rowData?.imgUrl ? "hidden" : "upload-box"}`}
className={`${
rowData?.coverUrl ? "hidden" : "upload-box"
}`}
{...upArgs}
>
<div className="upload-btn">
@ -781,8 +929,8 @@ function InformationMgm() {
showCount
placeholder="请输入文章作者"
maxLength={20}
value={rowData?.title || ""}
onChange={(e) => handleForm("title", e.target.value)}
value={rowData?.author || ""}
onChange={(e) => handleForm("author", e.target.value)}
/>
</div>
</div>
@ -791,13 +939,18 @@ function InformationMgm() {
<div className="r-con">
<Cascader
className="row-sm"
allowClear
placeholder="请选择"
multiple
maxTagCount="responsive"
showCheckedStrategy={Cascader.SHOW_CHILD}
placeholder="请选择"
options={statusArr}
value={rowData?.jumpUrl || []}
onChange={(e) => handleForm("jumpUrl", e)}
fieldNames={{
label: "name",
value: "id",
children: "children",
}}
options={areaList || []}
value={rowData?.areaId || []}
onChange={(e) => handleForm("areaId", e)}
/>
</div>
</div>
@ -810,8 +963,8 @@ function InformationMgm() {
{ value: "2", label: "微信小程序" },
{ value: "3", label: "支付宝小程序" },
]}
// value={rowData?.categoryId || []}
onChange={(e) => handleForm("categoryId", e)}
value={rowData?.releaseType || []}
onChange={(e) => handleForm("releaseType", e)}
/>
</div>
</div>
@ -823,8 +976,8 @@ function InformationMgm() {
showCount
placeholder="请输入文章分享后的显示标题"
maxLength={30}
value={rowData?.title || ""}
onChange={(e) => handleForm("title", e.target.value)}
value={rowData?.shareTitle || ""}
onChange={(e) => handleForm("shareTitle", e.target.value)}
/>
</div>
</div>
@ -836,8 +989,10 @@ function InformationMgm() {
showCount
placeholder="请输入文章分享后的显示描述"
maxLength={30}
value={rowData?.title || ""}
onChange={(e) => handleForm("title", e.target.value)}
value={rowData?.shareDescribe || ""}
onChange={(e) =>
handleForm("shareDescribe", e.target.value)
}
/>
</div>
</div>
@ -846,22 +1001,26 @@ function InformationMgm() {
<div className="r-con">
<div>
<div
className={`${!rowData?.imgUrl ? "hidden" : "pic-box"}`}
className={`${
!rowData?.shareImgUrl ? "hidden" : "pic-box"
}`}
>
<Image
width={148}
height={148}
preview={false}
src={rowData?.imgUrl || "error"}
src={rowData?.shareImgUrl || "error"}
fallback={errorImg}
/>
<DeleteOutlined
className="delete-btn"
onClick={() => handleForm("imgUrl", "")}
onClick={() => handleForm("shareImgUrl", "")}
/>
</div>
<Upload
className={`${rowData?.imgUrl ? "hidden" : "upload-box"}`}
className={`${
rowData?.shareImgUrl ? "hidden" : "upload-box"
}`}
{...upArgs}
>
<div className="upload-btn">
@ -885,8 +1044,8 @@ function InformationMgm() {
placeholder="请输入文章简介"
maxLength={120}
autoSize={{ minRows: 3, maxRows: 3 }}
value={rowData?.title || ""}
onChange={(e) => handleForm("title", e.target.value)}
value={rowData?.introduction || ""}
onChange={(e) => handleForm("introduction", e.target.value)}
/>
</div>
</div>
@ -894,11 +1053,11 @@ function InformationMgm() {
<div className="r-txt">是否置顶</div>
<div className="r-con">
<Radio.Group
value={rowData?.jumpUrlType + ""}
onChange={(e) => handleForm("jumpUrlType", e.target.value)}
value={rowData?.isStick + ""}
onChange={(e) => handleForm("isStick", e.target.value)}
>
<Radio value="1"></Radio>
<Radio value="2"></Radio>
<Radio value="0"></Radio>
</Radio.Group>
</div>
</div>
@ -907,11 +1066,14 @@ function InformationMgm() {
<div className="r-con">
<Cascader
className="row-sm"
// multiple
// maxTagCount="responsive"
// showCheckedStrategy={Cascader.SHOW_CHILD}
allowClear
placeholder="请选择"
options={statusArr}
fieldNames={{
label: "name",
value: "id",
children: "children",
}}
options={allSelect?.category || []}
value={rowData?.categoryId || []}
onChange={(e) => handleForm("categoryId", e)}
/>
@ -931,16 +1093,18 @@ function InformationMgm() {
<div className="line-count">
<Input
placeholder="基础值"
value={rowData?.title || ""}
onChange={(e) => handleForm("title", e.target.value)}
value={rowData?.readBasics || ""}
onChange={(e) => handleForm("readBasics", e.target.value)}
/>
<span>+</span>
<Input disabled value={113} />
<Input disabled value={rowData?.userRead} />
<span>×</span>
<Input
placeholder="放大倍数"
value={rowData?.title || ""}
onChange={(e) => handleForm("title", e.target.value)}
value={rowData?.readMultiple || ""}
onChange={(e) =>
handleForm("readMultiple", e.target.value)
}
/>
</div>
</div>
@ -959,16 +1123,20 @@ function InformationMgm() {
<div className="line-count">
<Input
placeholder="基础值"
value={rowData?.title || ""}
onChange={(e) => handleForm("title", e.target.value)}
value={rowData?.pointBasics || ""}
onChange={(e) =>
handleForm("pointBasics", e.target.value)
}
/>
<span>+</span>
<Input disabled value={2} />
<Input disabled value={rowData?.userPoint} />
<span>×</span>
<Input
placeholder="放大倍数"
value={rowData?.title || ""}
onChange={(e) => handleForm("title", e.target.value)}
value={rowData?.pointMultiple || ""}
onChange={(e) =>
handleForm("pointMultiple", e.target.value)
}
/>
</div>
</div>
@ -979,8 +1147,8 @@ function InformationMgm() {
<Input
className="row-lg"
placeholder="请输入转发的原文地址"
value={rowData?.title || ""}
onChange={(e) => handleForm("title", e.target.value)}
value={rowData?.jumpUrl || ""}
onChange={(e) => handleForm("jumpUrl", e.target.value)}
/>
</div>
</div>
@ -990,11 +1158,8 @@ function InformationMgm() {
<DatePicker
showTime
placeholder="非必填,按需计划任务"
value={parseDate(
rowData?.createTime,
"YYYY-MM-DD HH:mm:ss"
)}
onChange={(e, str) => handleForm("createTime", str)}
value={parseDate(rowData?.upperTime, "YYYY-MM-DD HH:mm:ss")}
onChange={(e, str) => handleForm("upperTime", str)}
/>
</div>
<div className="r-txt">定时下架时间</div>
@ -1002,11 +1167,8 @@ function InformationMgm() {
<DatePicker
showTime
placeholder="非必填,按需计划任务"
value={parseDate(
rowData?.createTime,
"YYYY-MM-DD HH:mm:ss"
)}
onChange={(e, str) => handleForm("createTime", str)}
value={parseDate(rowData?.lowerTime, "YYYY-MM-DD HH:mm:ss")}
onChange={(e, str) => handleForm("lowerTime", str)}
/>
</div>
</div>
@ -1022,8 +1184,8 @@ function InformationMgm() {
<div className="r-con r-sm">
<Input
placeholder="上传成功后资源的路径会显示在这里"
value={rowData?.title || ""}
onChange={(e) => handleForm("title", e.target.value)}
value={rowData?.jumpUrl || ""}
onChange={(e) => handleForm("jumpUrl", e.target.value)}
/>
</div>
</div>
@ -1045,22 +1207,32 @@ function InformationMgm() {
{/* 详情 */}
<div className={pageType === "3" ? "wraper" : "wraper hidden"}>
<div className="row-operate">
<Button onClick={() => handleBack()}>原创</Button>
<Button>{rowData?.isReprint == 1 ? "转载" : "原创"}</Button>
<Button onClick={() => handleBack()}>返回</Button>
</div>
<div className="full-group">
<div className="full-wrap">
<div className="edit-group">
<div className="lt-box">
<div className="row-line">
<div className="r-txt">资讯ID</div>
<div className="r-con">{rowData?.advertId || "-"}</div>
<div className="r-con">{rowData?.informationId || "-"}</div>
</div>
<div className="row-line">
<div className="r-txt">状态</div>
<div className="r-con">{rowData?.putStatus || "-"}</div>
<div className="r-con">{getStatusText(rowData?.status)}</div>
</div>
<div className="row-line">
<div className="r-txt">图片</div>
<div className="r-con">{rowData?.imgUrl || "-"}</div>
<div className="r-txt"></div>
<div className="r-con">
<Image
width={120}
height={120}
preview={false}
src={rowData?.coverUrl || "error"}
fallback={errorImg}
/>
{rowData?.imgUrl || "-"}
</div>
</div>
<div className="row-line">
<div className="r-txt">标题</div>
@ -1068,15 +1240,15 @@ function InformationMgm() {
</div>
<div className="row-line">
<div className="r-txt">简介</div>
<div className="r-con">{rowData?.moduleName || "-"}</div>
<div className="r-con">{rowData?.introduction || "-"}</div>
</div>
<div className="row-line">
<div className="r-txt">作者</div>
<div className="r-con">{rowData?.id || "-"}</div>
<div className="r-con">{rowData?.author || "-"}</div>
</div>
<div className="row-line">
<div className="r-txt">分类</div>
<div className="r-con">{rowData?.class || "-"}</div>
<div className="r-con">{rowData?.categoryName || "-"}</div>
</div>
<div className="row-line">
<div className="r-txt">区域</div>
@ -1084,53 +1256,71 @@ function InformationMgm() {
</div>
<div className="row-line">
<div className="r-txt">是否置顶</div>
<div className="r-con">{rowData?.id || "-"}</div>
<div className="r-con">
{rowData?.isStick == 1 ? "是" : "否"}
</div>
</div>
<div className="row-line">
<div className="r-txt">发布渠道</div>
<div className="r-con">{rowData?.id || "-"}</div>
<div className="r-con">{rowData?.releaseName || "-"}</div>
</div>
<div className="row-line">
<div className="r-txt">阅读数3</div>
<div className="r-txt">
阅读数{rowData?.readNumber || "0"}
</div>
<div className="r-con">
基础值1+实际用户操作值2*放大倍数1
基础值{rowData?.readBasics || "0"}+实际用户操作值
{rowData?.userRead || "0"}*放大倍数
{rowData?.readMultiple || "0"}
</div>
</div>
<div className="row-line">
<div className="r-txt">点赞数1</div>
<div className="r-txt">
点赞数{rowData?.pointNumber || "0"}
</div>
<div className="r-con">
基础值1+实际用户操作值0*放大倍数1
基础值{rowData?.pointBasics || "0"}+实际用户操作值
{rowData?.userPoint || "0"}*放大倍数
{rowData?.pointMultiple || "0"}
</div>
</div>
</div>
<div className="rt-box">
<div className="row-line">
<div className="r-txt">定时上架时间</div>
<div className="r-con">{rowData?.jumpUrlType || "-"}</div>
<div className="r-con">{rowData?.upperTime || "-"}</div>
</div>
<div className="row-line">
<div className="r-txt">定时下架时间</div>
<div className="r-con">{rowData?.createTime || "-"}</div>
<div className="r-con">{rowData?.lowerTime || "-"}</div>
</div>
<div className="row-line">
<div className="r-txt">分享标题</div>
<div className="r-con">{rowData?.createTime || "-"}</div>
<div className="r-con">{rowData?.shareTitle || "-"}</div>
</div>
<div className="row-line">
<div className="r-txt">分享描述</div>
<div className="r-con">{rowData?.createTime || "-"}</div>
<div className="r-con">{rowData?.shareDescribe || "-"}</div>
</div>
<div className="row-line">
<div className="r-txt">分享缩略图</div>
<div className="r-con">{rowData?.createTime || "-"}</div>
<div className="r-con">
<Image
width={120}
height={120}
preview={false}
src={rowData?.shareImgUrl || "error"}
fallback={errorImg}
/>
</div>
</div>
<div className="row-line">
<div className="r-txt">预览链接</div>
<div className="r-con">{rowData?.createTime || "-"}</div>
<div className="r-con">{rowData?.jumpUrl || "-"}</div>
</div>
<div className="row-line">
<div className="r-txt">最后操作人</div>
<div className="r-con">{rowData?.updateUser || "-"}</div>
<div className="r-con">{rowData?.updateUserName || "-"}</div>
</div>
<div className="row-line">
<div className="r-txt">最后修改时间</div>
@ -1138,9 +1328,22 @@ function InformationMgm() {
</div>
<div className="row-line">
<div className="r-txt">初始创建时间</div>
<div className="r-con">{rowData?.updateTime || "-"}</div>
<div className="r-con">{rowData?.createTime || "-"}</div>
</div>
</div>
</div>
{/* <div className="extra-group">
<div className="row-box">
<div className="r-txt">上传资源</div>
<div className="r-con r-sm">{rowData?.jumpUrl || "-"}</div>
</div>
<div className="row-box">
<div className="r-txt">内容</div>
<div className="r-con">
<div dangerouslySetInnerHTML={{ __html: rowData?.content }} />
</div>
</div>
</div> */}
</div>
</div>
{/* 设置 */}

21
src/services/OperationCenter/OperationMarket/information.js

@ -2,19 +2,20 @@ import ajax from "@/config/ajax";
// --资讯管理--
export default {
// 所有下拉
// getPushLabel: (data) =>
// ajax({ url: "/api/ope/push/get_label", type: "get", data }),
getInformationLabel: (data) =>
ajax({ url: "/api/ope/information/get_label", type: "get", data }),
// // 应用路径
// getPushPath: (data) =>
// ajax({ url: "/api/ope/push/get_path", type: "get", data }),
// // 列表
// getPushList: (data) =>
// ajax({ url: "/api/ope/push/list", type: "post", data }),
// // 新增
// doPushInsert: (data) =>
// ajax({ url: "/api/ope/push/insert", type: "post", data }),
// // 修改
// doPushEdit: (data) => ajax({ url: "/api/ope/push/edit", type: "post", data }),
// 列表
getInformationList: (data) =>
ajax({ url: "/api/ope/information/list", type: "post", data }),
// 新增
doInformationInsert: (data) =>
ajax({ url: "/api/ope/information/insert", type: "post", data }),
// 修改
doInformationEdit: (data) =>
ajax({ url: "/api/ope/information/edit", type: "post", data }),
// // 删除
// doPushDelete: (data) =>
// ajax({ url: "/api/ope/push/delete", type: "post", data }),

Loading…
Cancel
Save