✨ feat: 组合商品新增微信立减金打开方式
This commit is contained in:
parent
04ab296f0a
commit
c8662fbd9b
|
@ -77,7 +77,8 @@ const Combining = forwardRef((props, ref) => {
|
||||||
timer: [],
|
timer: [],
|
||||||
group_cover: "",
|
group_cover: "",
|
||||||
group_image: [],
|
group_image: [],
|
||||||
instructionType: 1
|
instructionType: 1,
|
||||||
|
is_webview: 0
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -199,9 +200,10 @@ const Combining = forwardRef((props, ref) => {
|
||||||
})
|
})
|
||||||
|
|
||||||
const { quantity, group_info, title, begin_time, end_time } = propsData
|
const { quantity, group_info, title, begin_time, end_time } = propsData
|
||||||
const { channel, receive_mode, instruction, group_image, time_limit } = group_info
|
const { channel, receive_mode, instruction, group_image, time_limit, is_webview } = group_info
|
||||||
setInfo({
|
setInfo({
|
||||||
quantity,
|
quantity,
|
||||||
|
is_webview: Number(is_webview),
|
||||||
instructionType: Number(group_info.instructionType) || 1,
|
instructionType: Number(group_info.instructionType) || 1,
|
||||||
code_name: title,
|
code_name: title,
|
||||||
date_time: [begin_time, end_time],
|
date_time: [begin_time, end_time],
|
||||||
|
@ -234,6 +236,7 @@ const Combining = forwardRef((props, ref) => {
|
||||||
recharge_type: 2,
|
recharge_type: 2,
|
||||||
group_info: {
|
group_info: {
|
||||||
type: 2,
|
type: 2,
|
||||||
|
is_webview: info.is_webview,
|
||||||
instructionType: info.instructionType,
|
instructionType: info.instructionType,
|
||||||
quantity: info.quantity,
|
quantity: info.quantity,
|
||||||
group_cover: "",
|
group_cover: "",
|
||||||
|
@ -444,6 +447,19 @@ const Combining = forwardRef((props, ref) => {
|
||||||
</Pop>
|
</Pop>
|
||||||
</RadioGroup>
|
</RadioGroup>
|
||||||
</FormItem>
|
</FormItem>
|
||||||
|
{info.channel == 2 ? (
|
||||||
|
<FormItem labelname="打开方式" prop="is_webview" id="is_webview" key="is_webview">
|
||||||
|
<RadioGroup
|
||||||
|
onChange={({ target }) => {
|
||||||
|
setInfo({ is_webview: target.value })
|
||||||
|
}}
|
||||||
|
value={info.is_webview}
|
||||||
|
>
|
||||||
|
<RadioButton value={0}>小程序</RadioButton>
|
||||||
|
<RadioButton value={1}>公众号</RadioButton>
|
||||||
|
</RadioGroup>
|
||||||
|
</FormItem>
|
||||||
|
) : null}
|
||||||
{info.channel == 1 ? (
|
{info.channel == 1 ? (
|
||||||
<FormItem labelname="领取方式" prop="receive_mode" id="receive_mode">
|
<FormItem labelname="领取方式" prop="receive_mode" id="receive_mode">
|
||||||
<RadioGroup
|
<RadioGroup
|
||||||
|
|
|
@ -837,7 +837,7 @@ export default class addKnockGold extends Component {
|
||||||
)}
|
)}
|
||||||
</RadioGroup>
|
</RadioGroup>
|
||||||
</FormItem>
|
</FormItem>
|
||||||
{this.state.model.channel == 2 ? (
|
{this.state.model.channel == 2 && !this.props.combining ? (
|
||||||
<FormItem labelname="打开方式" prop="is_webview" id="is_webview" key="is_webview">
|
<FormItem labelname="打开方式" prop="is_webview" id="is_webview" key="is_webview">
|
||||||
<RadioGroup
|
<RadioGroup
|
||||||
onChange={({ target }) => {
|
onChange={({ target }) => {
|
||||||
|
|
|
@ -143,11 +143,12 @@ export default class combiningAdd extends React.Component {
|
||||||
let reqCopy = cloneDeep(req)
|
let reqCopy = cloneDeep(req)
|
||||||
this.codeStatus = req.status
|
this.codeStatus = req.status
|
||||||
const resData = this.transFormData(reqCopy.goods)
|
const resData = this.transFormData(reqCopy.goods)
|
||||||
const { channel, receive_mode, instruction, group_image, time_limit } =
|
const { channel, receive_mode, instruction, group_image, time_limit, is_webview } =
|
||||||
reqCopy.group_info
|
reqCopy.group_info
|
||||||
reqCopy.goods = resData
|
reqCopy.goods = resData
|
||||||
let codeInfo = {
|
let codeInfo = {
|
||||||
code_name: reqCopy.title,
|
code_name: reqCopy.title,
|
||||||
|
is_webview: Number(is_webview),
|
||||||
issued: reqCopy.quantity,
|
issued: reqCopy.quantity,
|
||||||
instructionType: Number(reqCopy.group_info.instructionType) || 1,
|
instructionType: Number(reqCopy.group_info.instructionType) || 1,
|
||||||
stock: reqCopy.stock,
|
stock: reqCopy.stock,
|
||||||
|
@ -423,6 +424,7 @@ export default class combiningAdd extends React.Component {
|
||||||
restrict: 1,
|
restrict: 1,
|
||||||
group_info: {
|
group_info: {
|
||||||
type: 2,
|
type: 2,
|
||||||
|
is_webview: codeInfo.is_webview,
|
||||||
quantity: codeInfo.quantity,
|
quantity: codeInfo.quantity,
|
||||||
instructionType: codeInfo.instructionType,
|
instructionType: codeInfo.instructionType,
|
||||||
group_cover: "",
|
group_cover: "",
|
||||||
|
@ -473,6 +475,7 @@ export default class combiningAdd extends React.Component {
|
||||||
recharge_type: 2,
|
recharge_type: 2,
|
||||||
group_info: {
|
group_info: {
|
||||||
type: 2,
|
type: 2,
|
||||||
|
is_webview: codeInfo.is_webview,
|
||||||
quantity: codeInfo.quantity,
|
quantity: codeInfo.quantity,
|
||||||
instructionType: codeInfo.instructionType,
|
instructionType: codeInfo.instructionType,
|
||||||
group_cover: "",
|
group_cover: "",
|
||||||
|
@ -1058,6 +1061,19 @@ export default class combiningAdd extends React.Component {
|
||||||
</Pop>
|
</Pop>
|
||||||
</RadioGroup>
|
</RadioGroup>
|
||||||
</FormItem>
|
</FormItem>
|
||||||
|
{this.state.codeInfo.channel == 2 ? (
|
||||||
|
<FormItem labelname="打开方式" prop="is_webview" id="is_webview" key="is_webview">
|
||||||
|
<RadioGroup
|
||||||
|
onChange={({ target }) => {
|
||||||
|
this.handleChange(target.value, "is_webview")
|
||||||
|
}}
|
||||||
|
value={this.state.codeInfo.is_webview}
|
||||||
|
>
|
||||||
|
<RadioButton value={0}>小程序</RadioButton>
|
||||||
|
<RadioButton value={1}>公众号</RadioButton>
|
||||||
|
</RadioGroup>
|
||||||
|
</FormItem>
|
||||||
|
) : null}
|
||||||
{this.state.codeInfo.channel == 1 ? (
|
{this.state.codeInfo.channel == 1 ? (
|
||||||
<FormItem labelname="领取方式" prop="receive_mode" id="receive_mode">
|
<FormItem labelname="领取方式" prop="receive_mode" id="receive_mode">
|
||||||
<RadioGroup
|
<RadioGroup
|
||||||
|
|
|
@ -161,7 +161,8 @@ export const init = () => {
|
||||||
timer_type: 1,
|
timer_type: 1,
|
||||||
channel: "1",
|
channel: "1",
|
||||||
receive_mode: 1,
|
receive_mode: 1,
|
||||||
instructionType: 1
|
instructionType: 1,
|
||||||
|
is_webview: 0
|
||||||
},
|
},
|
||||||
isload: false,
|
isload: false,
|
||||||
tempdata: [],
|
tempdata: [],
|
||||||
|
|
Loading…
Reference in New Issue