Explorar el Código

修改分時段回復url

yu_ber hace 4 años
padre
commit
b953a2afc9

+ 2 - 4
UI/src/pages/sellmanage/pushMessage/pushMessageService.js

@@ -2,18 +2,16 @@ import { request, config } from 'utils'
 import qs from 'qs';
 
 export function submit(param) {
-  //  console.log(param,'zhixing')
     return request({
-      url:config.WXMpAPI+"/wx/timesMessage/saveTimesMessage/"+param.appId,
+      url:config.WXMpAPI+"/wx/keyword/saveTimesMessage/"+param.appId,
       method: 'post',
       data:param
     })
  }
 
  export function getData(param) {
-  //  console.log(param,'zhixing')
     return request({
-      url:config.WXMpAPI+"/wx/timesMessage/getList/"+param.appId,
+      url:config.WXMpAPI+"/wx/keyword/getTimesMsgList/"+param.appId,
       method: 'post',
       data:param
     })

+ 30 - 13
UI/src/pages/sellmanage/templateMessage/index.js

@@ -86,6 +86,15 @@ class TemplateMessage extends React.Component {
     });
 
   };
+  addFans = key => {
+    let inputList = this.props.TemplateMessage.Information.result.contentValueList;
+    for(let i = 0;i<inputList.length;i++){
+      if(i==key){
+        inputList[i].value += "|$fansName$|";
+        this.props.dispatch({ type: 'TemplateMessage/update', payload: { TemplateMessage } });
+      }
+    }
+  }
   callback = key => {
     this.setState({
       keyIndex: key,
@@ -93,7 +102,7 @@ class TemplateMessage extends React.Component {
   }
   fallBack = e => {
     this.setState({
-      size:"small",
+      size: "small",
     })
   }
   handleSubmit = e => {
@@ -252,7 +261,7 @@ class TemplateMessage extends React.Component {
       message.error("请同步微信模板消息");
       return
     }
-    if (this.state.size=="small") {
+    if (this.state.size == "small") {
       let data = {}
       data.appId = this.props.wxAppIdValue
       data.templateId = this.state.templateId
@@ -490,6 +499,7 @@ class TemplateMessage extends React.Component {
                         placement="bottom"
                         title={item.title}
                         trigger="hover"
+                        overlayStyle={{width:"200px"}}
                         overlayClassName="PopoverFile"
                         style={{ display: ("small" === this.state.size) ? "block" : "none" }}
                         visible={this.state.selectIndex == key && this.state.selectState ? true : false}
@@ -526,18 +536,25 @@ class TemplateMessage extends React.Component {
                 <Form horizontal style={{ display: ("default" === self.state.size) ? "block" : "none", marginTop: '20px' }}>
                   {
                     self.props.TemplateMessage && self.props.TemplateMessage.Information && self.props.TemplateMessage.Information.result && self.props.TemplateMessage.Information.result.contentValueList.map((item, key) => {
-                      return <Form.Item {...formItemLayout} label={item.lable} >
-                        {getFieldDecorator(item.lable, {
-                          rules: [
-                            { required: true, message: "請填寫信息" },
-                          ]
-                        })(
-                          <Input placeholder="" style={{ width: 300 }} />
-                        )}
-                      </Form.Item>
+                      return <div style={{display:"flex",justifyContent:"space-between"}}>
+                        <Form.Item {...formItemLayout} label={item.lable} >
+                          {getFieldDecorator(item.lable,{
+                            initialValues:item.value,
+                            rules: [
+                              { required: true, message: "請填寫信息" },
+                            ]
+                          })(
+                            <Input placeholder="" style={{ width: 300 }} />
+                          )}
+
+                        </Form.Item>
+                        {/* <Button style={{ marginLeft: "80px" }} onClick={() => this.addFans(key)}>删除</Button> */}
+                      </div>
                     })
                   }
 
+
+
                   <Tabs defaultActiveKey="1" onChange={self.callback} style={{ display: ("default" === self.state.size) ? "block" : "none", width: "400px", marginLeft: "160px" }}>
                     <TabPane tab="無跳转链接" key="1">
                     </TabPane>
@@ -555,7 +572,7 @@ class TemplateMessage extends React.Component {
                   <div style={{ marginTop: "30px", marginLeft: "160px", width: "400px" }} className={styles.bottomList}>
                     {/* <h2>{this.state.previewDate.title ? this.state.previewDate.title : ""}</h2> */}
                     <p>{this.state.previewDate.example ? this.state.previewDate.example : ""}</p>
-                   
+
                     {/* <div className={styles.seePlay} style={{ display: (2 == self.state.keyIndex || 3 == self.state.keyIndex) ? "block" : "none"}}>
                       <div>查看詳情</div>
                       <div>></div>
@@ -564,7 +581,7 @@ class TemplateMessage extends React.Component {
 
                   <div className={styles.formBotton} style={{ marginTop: "30px", marginLeft: "160px" }}>
                     <Form.Item style={{ display: ("default" === self.state.size) ? "block" : "none" }}>
-                      <Button style={{ marginRight: '30px' }}  onClick={self.fallBack}>上一步</Button>
+                      <Button style={{ marginRight: '30px' }} onClick={self.fallBack}>上一步</Button>
                       <Button style={{ marginRight: '30px' }} onClick={self.handleSubmit}>保存草稿 </Button>
                       <Button type="primary" htmlType="submit" onClick={self.handleSubmit}>
                         保存并发布

+ 6 - 1
UI/src/pages/sellmanage/templateMessage/model.js

@@ -144,6 +144,11 @@ export default {
         ...state,
         ...payload,
       }
-    }
+    },
+    update(state) {
+			return state.concat(state);
+		},
+
+  
   }
 }

+ 3 - 2
UI/src/utils/config.js

@@ -7,8 +7,9 @@ const APIV3Auth = 'http://192.168.50.32:13001/oauth2'
 // const WXAPIV5= 'http://192.168.50.32:7000'
 // const WXMpAPI= 'http://192.168.50.32:13001/mpwechat'
 // const staticMpAPI = 'http://192.168.50.32:8081'
-const WXAPIV5= 'http://192.168.50.32:13001/qiyewechat'
-const WXMpAPI= 'http://192.168.50.32:13001/mpwechat'
+const WXAPIV5= 'http://192.168.50.32:7000'
+// const WXMpAPI= 'http://192.168.50.39:8081'
+const WXMpAPI= 'http://192.168.10.68:8081'
 const staticMpAPI = 'http://192.168.50.39:8081'
 module.exports =  {
   name: '亮健营销平台',