Merge branch 'master' of codeup.aliyun.com:5f9118049cffa29cfdd3be1c/marketing/frontend
This commit is contained in:
commit
021d6e9545
|
@ -77,13 +77,18 @@ export default class adduserinfo extends React.Component{
|
|||
}
|
||||
//获取直连天下商品映射信息
|
||||
getProductInfo(){
|
||||
// getProductInfoSelect().then((res)=>{
|
||||
// handelResponse(res,(req,msg)=>{
|
||||
let product_data = JSON.parse( sessionStorage.getItem("productData")) ;
|
||||
getProductInfoSelect().then((res)=>{
|
||||
handelResponse(res,(req,msg)=>{
|
||||
let product_data = []
|
||||
if(sessionStorage.getItem("productData"))
|
||||
{
|
||||
product_data = JSON.parse( sessionStorage.getItem("productData")) ;
|
||||
}
|
||||
|
||||
let checked_product= product_data ? product_data : [];
|
||||
|
||||
let arr = [];
|
||||
_.map(data,(res)=>{
|
||||
_.map(req.data,(res)=>{
|
||||
let obj = {};
|
||||
obj.key = res.id;
|
||||
obj.text= res.title;
|
||||
|
@ -100,9 +105,9 @@ export default class adduserinfo extends React.Component{
|
|||
console.log(arr)
|
||||
this.setState({"productOption":arr})
|
||||
|
||||
// },(err)=>{
|
||||
// })
|
||||
// })
|
||||
},(err)=>{
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
cancel(){
|
||||
|
|
|
@ -14,7 +14,7 @@ const data = [{"id":21,"title":"爱奇艺周卡组合商品测试专用","type":
|
|||
|
||||
|
||||
|
||||
export default class adduserinfo extends React.Component{
|
||||
export default class exchangedit extends React.Component{
|
||||
constructor(props){
|
||||
super(props)
|
||||
this.state={
|
||||
|
@ -107,7 +107,9 @@ export default class adduserinfo extends React.Component{
|
|||
getProductInfo(){
|
||||
// getProductInfoSelect().then((res)=>{
|
||||
// handelResponse(res,(req,msg)=>{
|
||||
let product_data = JSON.parse( sessionStorage.getItem("productData")) ;
|
||||
let productData = sessionStorage.getItem("productData");
|
||||
if(productData){
|
||||
let product_data = JSON.parse( productData) ;
|
||||
let checked_product= product_data ? product_data : [];
|
||||
|
||||
let arr = [];
|
||||
|
@ -127,7 +129,7 @@ export default class adduserinfo extends React.Component{
|
|||
})
|
||||
console.log(arr)
|
||||
this.setState({"productOption":arr})
|
||||
|
||||
}
|
||||
// },(err)=>{
|
||||
// })
|
||||
// })
|
||||
|
|
|
@ -46,17 +46,22 @@ export default class adduserinfo extends React.Component{
|
|||
}
|
||||
//获取直连天下商品映射信息
|
||||
getProductInfo(){
|
||||
// getProductInfoSelect().then((res)=>{
|
||||
// handelResponse(res,(req,msg)=>{
|
||||
let product_data = JSON.parse( sessionStorage.getItem("productData")) ;
|
||||
getProductInfoSelect().then((res)=>{
|
||||
handelResponse(res,(req,msg)=>{
|
||||
let product_data = []
|
||||
if(sessionStorage.getItem("productData"))
|
||||
{
|
||||
product_data = JSON.parse( sessionStorage.getItem("productData")) ;
|
||||
}
|
||||
|
||||
let checked_product= product_data ? product_data : [];
|
||||
|
||||
let arr = [];
|
||||
_.map(data,(res)=>{
|
||||
_.map(req.data,(res)=>{
|
||||
let obj = {};
|
||||
obj.key = res.id;
|
||||
obj.text= res.title;
|
||||
obj.disabled = checked_product.findIndex((item)=>{return item.product_id == res.id}) > -1;
|
||||
obj.disabled = checked_product.findIndex((item)=>{return item.id == res.id}) > -1;
|
||||
if(obj.disabled)
|
||||
{
|
||||
console.log(obj.text)
|
||||
|
@ -69,9 +74,9 @@ export default class adduserinfo extends React.Component{
|
|||
console.log(arr)
|
||||
this.setState({"productOption":arr})
|
||||
|
||||
// },(err)=>{
|
||||
// })
|
||||
// })
|
||||
},(err)=>{
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
async submit(){
|
||||
|
|
|
@ -18,12 +18,12 @@ export default class edittemplate extends React.Component{
|
|||
model:{
|
||||
id:"",
|
||||
images:["https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/img/top.png","https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/img/center.png","https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/img/bottom.png"],
|
||||
thumb:"",
|
||||
thumb:null,
|
||||
title:"标题",
|
||||
client:1,
|
||||
bg_color:"",
|
||||
button_color:"",
|
||||
top_img:"",
|
||||
top_img:null,
|
||||
|
||||
},
|
||||
preview_visible:false,
|
||||
|
@ -126,13 +126,6 @@ export default class edittemplate extends React.Component{
|
|||
{
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
putMyTheme(this.state.model.id,formdata).then((res)=>{
|
||||
handelResponse(res,(req,msg)=>{
|
||||
Notify.success("保存成功")
|
||||
|
@ -386,7 +379,7 @@ export default class edittemplate extends React.Component{
|
|||
onChange={(e)=>{this.onUploadChange(e)} }
|
||||
onUpload={this.onUpload}
|
||||
onError={this.onUploadError}
|
||||
defaultFileList={ [{src: this.state.model.images[0]}] }
|
||||
|
||||
/>
|
||||
|
||||
</FormItem>
|
||||
|
@ -403,7 +396,7 @@ export default class edittemplate extends React.Component{
|
|||
onChange={(e)=>{this.onUploadChange1(e)}}
|
||||
onUpload={this.onUpload}
|
||||
onError={this.onUploadError}
|
||||
defaultFileList={ [{src: this.state.model.images[1]}] }
|
||||
|
||||
/>
|
||||
|
||||
</FormItem>
|
||||
|
@ -418,7 +411,7 @@ export default class edittemplate extends React.Component{
|
|||
onChange={(e)=>{this.onUploadChange2(e)} }
|
||||
onUpload={this.onUpload}
|
||||
onError={this.onUploadError}
|
||||
defaultFileList={ [{src: this.state.model.images[2]}] }
|
||||
|
||||
/>
|
||||
|
||||
</FormItem>
|
||||
|
@ -433,7 +426,7 @@ export default class edittemplate extends React.Component{
|
|||
onChange={(e)=>{this.onUploadChange3(e)} }
|
||||
onUpload={this.onUpload}
|
||||
onError={this.onUploadError}
|
||||
defaultFileList={ [{src: this.state.model.thumb}] }
|
||||
|
||||
/>
|
||||
|
||||
</FormItem>
|
||||
|
@ -448,7 +441,7 @@ export default class edittemplate extends React.Component{
|
|||
onChange={(e)=>{this.onUploadChange4(e)} }
|
||||
onUpload={this.onUpload}
|
||||
onError={this.onUploadError}
|
||||
defaultFileList={ [{src: this.state.model.top_img}] }
|
||||
|
||||
/>
|
||||
|
||||
</FormItem>
|
||||
|
|
|
@ -42,6 +42,7 @@ function FormDom(props) {
|
|||
let {authorization}=response;
|
||||
sessionStorage.setItem('authorization',authorization);
|
||||
sessionStorage.setItem('linkshowname',"营销计划管理");
|
||||
|
||||
setTimeout(()=>{
|
||||
props.history.push('/home/plan-list')
|
||||
},1000);
|
||||
|
|
|
@ -62,6 +62,8 @@ export default class acclist extends React.Component{
|
|||
|
||||
|
||||
|
||||
|
||||
|
||||
let data = {
|
||||
page:1,
|
||||
limit:10
|
||||
|
|
|
@ -46,8 +46,9 @@ export default class adduserinfo extends React.Component{
|
|||
}
|
||||
//获取直连天下商品映射信息
|
||||
getProductInfo(){
|
||||
// getProductInfoSelect().then((res)=>{
|
||||
// handelResponse(res,(req,msg)=>{
|
||||
|
||||
getProductInfoSelect().then((res)=>{
|
||||
handelResponse(res,(req,msg)=>{
|
||||
let product_data = []
|
||||
if(sessionStorage.getItem("productData"))
|
||||
{
|
||||
|
@ -57,7 +58,7 @@ export default class adduserinfo extends React.Component{
|
|||
let checked_product= product_data ? product_data : [];
|
||||
|
||||
let arr = [];
|
||||
_.map(data,(res)=>{
|
||||
_.map(req.data,(res)=>{
|
||||
let obj = {};
|
||||
obj.key = res.id;
|
||||
obj.text= res.title;
|
||||
|
@ -73,11 +74,11 @@ export default class adduserinfo extends React.Component{
|
|||
})
|
||||
console.log(arr)
|
||||
this.setState({"productOption":arr})
|
||||
}
|
||||
// },(err)=>{
|
||||
// })
|
||||
// })
|
||||
|
||||
},(err)=>{
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
async submit(){
|
||||
if(this.refs.form1.validator())
|
||||
|
|
Loading…
Reference in New Issue