Commit 9cfa93d3 authored by XieZhiXiong's avatar XieZhiXiong

fix: 修复切换配送方式,地址丢失的问题

parent ad3caed1
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: XieZhiXiong * @Author: XieZhiXiong
* @Date: 2020-11-06 09:54:04 * @Date: 2020-11-06 09:54:04
* @LastEditors: XieZhiXiong * @LastEditors: XieZhiXiong
* @LastEditTime: 2021-01-18 15:30:22 * @LastEditTime: 2021-01-21 13:39:26
* @Description: 换货收货地址 * @Description: 换货收货地址
*/ */
import React from 'react'; import React from 'react';
...@@ -145,6 +145,7 @@ const ExchangeAddressInfo: React.FC<ExchangeAddressInfo> = ({ ...@@ -145,6 +145,7 @@ const ExchangeAddressInfo: React.FC<ExchangeAddressInfo> = ({
if (isEdit) { if (isEdit) {
linkage.show('shippingAddress'); linkage.show('shippingAddress');
linkage.hide('pickupAddress'); linkage.hide('pickupAddress');
linkage.value('shippingAddress', undefined);
} else { } else {
linkage.hide('*(shippingAddress,pickupAddress)'); linkage.hide('*(shippingAddress,pickupAddress)');
linkage.show('shippingAddressShow'); linkage.show('shippingAddressShow');
...@@ -156,6 +157,7 @@ const ExchangeAddressInfo: React.FC<ExchangeAddressInfo> = ({ ...@@ -156,6 +157,7 @@ const ExchangeAddressInfo: React.FC<ExchangeAddressInfo> = ({
if (isEdit) { if (isEdit) {
linkage.hide('shippingAddress'); linkage.hide('shippingAddress');
linkage.show('pickupAddress'); linkage.show('pickupAddress');
linkage.value('pickupAddress', undefined);
} else { } else {
setFieldState('shippingAddressShow', fieldState => { setFieldState('shippingAddressShow', fieldState => {
fieldState.title = '换货自提地址' fieldState.title = '换货自提地址'
...@@ -168,6 +170,7 @@ const ExchangeAddressInfo: React.FC<ExchangeAddressInfo> = ({ ...@@ -168,6 +170,7 @@ const ExchangeAddressInfo: React.FC<ExchangeAddressInfo> = ({
// 无需物流 // 无需物流
case 3: { case 3: {
linkage.hide('*(shippingAddress,pickupAddress)'); linkage.hide('*(shippingAddress,pickupAddress)');
linkage.value('*(shippingAddress,pickupAddress)', undefined);
break; break;
}; };
default: default:
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: XieZhiXiong * @Author: XieZhiXiong
* @Date: 2020-11-09 15:56:35 * @Date: 2020-11-09 15:56:35
* @LastEditors: XieZhiXiong * @LastEditors: XieZhiXiong
* @LastEditTime: 2021-01-18 15:34:24 * @LastEditTime: 2021-01-21 13:40:28
* @Description: * @Description:
*/ */
import { ISchema } from '@formily/antd'; import { ISchema } from '@formily/antd';
...@@ -25,6 +25,7 @@ export const schema: ISchema = { ...@@ -25,6 +25,7 @@ export const schema: ISchema = {
type: 'string', type: 'string',
enum: DELIVERY_TYPE_ENUM, enum: DELIVERY_TYPE_ENUM,
'x-component-props': { 'x-component-props': {
placeholder: '请选择',
style: { style: {
width: '80%', width: '80%',
}, },
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: XieZhiXiong * @Author: XieZhiXiong
* @Date: 2020-11-04 17:22:07 * @Date: 2020-11-04 17:22:07
* @LastEditors: XieZhiXiong * @LastEditors: XieZhiXiong
* @LastEditTime: 2021-01-08 11:27:55 * @LastEditTime: 2021-01-21 13:41:41
* @Description: * @Description:
*/ */
import React, { useState } from 'react'; import React, { useState } from 'react';
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment