傅行帆 5 年前
父节点
当前提交
f929ea2e9d

+ 8
- 5
src/pages/carouselFigure/customImg/edit.jsx 查看文件

@@ -28,7 +28,7 @@ const XForm = createForm({ onValuesChange: handleFormValueChange })
28 28
 const header = props => {
29 29
   
30 30
   const imgId = props.location.query.imgId
31
-  const [ data, setData ] = useState({})
31
+  const [ data, setData ] = useState({'imgUrl':'https://estateagents.oss-cn-shanghai.aliyuncs.com/miniapp/upload/images/1574145199853-97feda7895c65be33aa234a7b81b37f.jpg','imgType':'index','imgDesc':'小程序首页分享配图','imgDocument': '小程序名字 精准获客平台'})
32 32
   if(imgId){
33 33
     useEffect(() => {
34 34
       getData(imgId);
@@ -63,12 +63,12 @@ const header = props => {
63 63
       label: '类型',
64 64
       name: 'imgType',
65 65
       type: FieldTypes.Select,
66
+      value: 'index',
66 67
       dict: [{
67
-        label: '首页分享',
68
-        value: 'index',
69
-      },
68
+          label: '首页分享',
69
+          value: 'index',
70
+        },
70 71
       ],
71
-      value: data.imgType,
72 72
       rules: [
73 73
         { required: true, message: '请选择类型' },
74 74
       ],
@@ -78,6 +78,9 @@ const header = props => {
78 78
       name: 'imgDocument',
79 79
       type: FieldTypes.Text,
80 80
       value: data.imgDocument,
81
+      rules: [
82
+        { required: true, message: '请输入分享文案' },
83
+      ],
81 84
     },
82 85
   ]
83 86
 

+ 3
- 2
src/pages/carouselFigure/customImg/list.jsx 查看文件

@@ -22,10 +22,11 @@ function header(props) {
22 22
   // 查询列表
23 23
   const getList = (params) => {
24 24
     request({ ...apis.carsuseFigure.customImg, params: { ...params },}).then((data) => {
25
+        console.log(data,"datadata")
25 26
         if(data.records.length > 0){
26 27
           setData(data.records)
27 28
         }else{
28
-          setData([{'imgUrl':'','imgType':'请编辑','imgDesc':'请编辑'}])
29
+          setData([{'imgUrl':'https://estateagents.oss-cn-shanghai.aliyuncs.com/miniapp/upload/images/1574145199853-97feda7895c65be33aa234a7b81b37f.jpg','imgType':'index','imgDesc':'小程序首页分享配图'}])
29 30
         }
30 31
         
31 32
     })
@@ -49,7 +50,7 @@ function header(props) {
49 50
       <Table dataSource={data}>
50 51
         <Column title="图片" dataIndex="imgUrl" key="imgUrl" 
51 52
         render={(text, record) => (
52
-        <img src={record.imgUrl}></img>
53
+        <img src={record.imgUrl} height="120px" width="150px" />
53 54
         )}/>
54 55
         <Column title="类型" dataIndex="imgType" key="imgType" 
55 56
         render={(text, record) => (

+ 5
- 0
src/pages/staff/list/editStaff.jsx 查看文件

@@ -67,6 +67,11 @@ const Edit = (props) => {
67 67
     })
68 68
   }
69 69
 
70
+  if(userData.buildingIds && buildData.length > 0 && !consultantChecked){
71
+      const newBuildings = userData.buildingIds.filter(x => buildData.filter(it => it.buildingId === x)[0])
72
+      userData.buildingIds = newBuildings
73
+  }
74
+
70 75
   useEffect(() => {
71 76
     getTagList();
72 77
     getRoleList();