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