diff --git a/src/pages/home/wgts/helper.js b/src/pages/home/wgts/helper.js index 0c541865e..21b3b4c3b 100644 --- a/src/pages/home/wgts/helper.js +++ b/src/pages/home/wgts/helper.js @@ -130,28 +130,30 @@ export function getGlobalBaseStyle(baseStyle) { const bgType = baseStyle.bgType const style = {} - style.padding = `${Taro.pxTransform(baseStyle.paddedt || 0)} ${Taro.pxTransform(baseStyle.paddedr || 0)} ${Taro.pxTransform(baseStyle.paddedb || 0)} ${Taro.pxTransform(baseStyle.paddedl || 0)}` + style.padding = `${Taro.pxTransform(baseStyle.paddedt || 0)} ${Taro.pxTransform( + baseStyle.paddedr || 0 + )} ${Taro.pxTransform(baseStyle.paddedb || 0)} ${Taro.pxTransform(baseStyle.paddedl || 0)}` if (bgType === 'color' && baseStyle.bgColor) { - if(isWeb){ + if (isWeb) { style['background-color'] = baseStyle.bgColor } else { style.backgroundColor = baseStyle.bgColor } } else if (bgType === 'pic' && baseStyle.bgPic) { - if(isWeb){ + if (isWeb) { style['background-image'] = `url('${baseStyle.bgPic}')` style['background-size'] = '100% 100%' style['background-position'] = 'center' style['background-repeat'] = 'no-repeat' } else { - style.backgroundImage = `url('${baseStyle.bgPic}')` - style.backgroundSize = '100% 100%' - style.backgroundPosition = 'center' - style.backgroundRepeat = 'no-repeat' + style.backgroundImage = `url('${baseStyle.bgPic}')` + style.backgroundSize = '100% 100%' + style.backgroundPosition = 'center' + style.backgroundRepeat = 'no-repeat' } } else if (bgType === 'gradient' && baseStyle.startColor) { const endColor = baseStyle.endColor || baseStyle.startColor - if(isWeb){ + if (isWeb) { style['background-image'] = `linear-gradient(${baseStyle.startColor}, ${endColor})` style['background-size'] = 'cover' } else { diff --git a/src/pages/purchase/auth.js b/src/pages/purchase/auth.js index aa43ffbd2..6941f712f 100644 --- a/src/pages/purchase/auth.js +++ b/src/pages/purchase/auth.js @@ -238,7 +238,7 @@ function PurchaseAuth() { draft.activity_id = _id || '' draft.enterprise_id = enterprise_id || '' }) - return { id:_id, enterprise_id, code } + return { id: _id, enterprise_id, code } } catch (error) { return {} } diff --git a/src/pages/recommend/detail.js b/src/pages/recommend/detail.js index 117c2e14a..405a75cca 100644 --- a/src/pages/recommend/detail.js +++ b/src/pages/recommend/detail.js @@ -89,10 +89,16 @@ function GuideRecommendDetail(props) { }) } } - const { itemId, title, summary, articleFocusNum, content, updated, isPraise, articlePraiseNum } = pickBy( - res, - doc.article.ARTICLE_ITEM - ) + const { + itemId, + title, + summary, + articleFocusNum, + content, + updated, + isPraise, + articlePraiseNum + } = pickBy(res, doc.article.ARTICLE_ITEM) setState((draft) => { draft.itemId = itemId diff --git a/src/subpages/dianwu/comps/comp-dianwu-select-member.js b/src/subpages/dianwu/comps/comp-dianwu-select-member.js index 15fe7da9e..ea51d4359 100644 --- a/src/subpages/dianwu/comps/comp-dianwu-select-member.js +++ b/src/subpages/dianwu/comps/comp-dianwu-select-member.js @@ -61,8 +61,7 @@ function CompDianwuSelectMember({ open, onClose, onAfterSelect, distributor_id } showError: false }) } catch (e) { - const msg = - e?.message || e?.res?.data?.data?.message || $t('09e29d60.g3q6mc') + const msg = e?.message || e?.res?.data?.data?.message || $t('09e29d60.g3q6mc') showToast(msg) } const { couponNum, point, vipDiscount } = pickBy(userInfo, doc.dianwu.MEMBER_INFO) diff --git a/src/subpages/purchase/activity-list.js b/src/subpages/purchase/activity-list.js index b0954d750..19f902e30 100644 --- a/src/subpages/purchase/activity-list.js +++ b/src/subpages/purchase/activity-list.js @@ -79,7 +79,7 @@ function PurchaseActivityList() { if (pageIndex === 1) { if (VERSION_IN_PURCHASE) { const data = await api.purchase.getUserEnterprises({ - disabled: 0, + disabled: 0 }) const validIdentityLen = data.filter((item) => item.disabled == 0).length if (!validIdentityLen) { @@ -264,7 +264,11 @@ function PurchaseActivityList() { return ( - + { try { const data = await api.purchase.getUserEnterprises({ - disabled: 0, + disabled: 0 }) const found = data?.find((x) => x.enterprise_id == eid) setEnterpriseName(found?.name || found?.enterprise_name || '') diff --git a/src/subpages/purchase/espier-detail.js b/src/subpages/purchase/espier-detail.js index a9e3b29de..a00082309 100644 --- a/src/subpages/purchase/espier-detail.js +++ b/src/subpages/purchase/espier-detail.js @@ -253,7 +253,7 @@ function EspierDetail(props) { const loadEnterpriseName = async () => { try { const data = await api.purchase.getUserEnterprises({ - disabled: 0, + disabled: 0 }) const found = data?.find((x) => x.enterprise_id == eid) setEnterpriseName(found?.name || found?.enterprise_name || '') diff --git a/src/subpages/purchase/espier-index.js b/src/subpages/purchase/espier-index.js index 4cca9dba1..2828085e5 100644 --- a/src/subpages/purchase/espier-index.js +++ b/src/subpages/purchase/espier-index.js @@ -154,7 +154,7 @@ function CartIndex() { const load = async () => { try { const data = await api.purchase.getUserEnterprises({ - disabled: 0, + disabled: 0 }) const found = data?.find((x) => x.enterprise_id == eid) setEnterpriseName(found?.name || found?.enterprise_name || '') diff --git a/src/subpages/purchase/list.js b/src/subpages/purchase/list.js index cd0a72150..e719727fe 100644 --- a/src/subpages/purchase/list.js +++ b/src/subpages/purchase/list.js @@ -141,7 +141,7 @@ function ItemList() { const loadEnterpriseName = async () => { try { const data = await api.purchase.getUserEnterprises({ - disabled: 0, + disabled: 0 }) const found = data?.find((x) => x.enterprise_id == eid) setEnterpriseName(found?.name || found?.enterprise_name || '') diff --git a/src/subpages/purchase/select-company-email.js b/src/subpages/purchase/select-company-email.js index 5d9685c63..fd459d6db 100644 --- a/src/subpages/purchase/select-company-email.js +++ b/src/subpages/purchase/select-company-email.js @@ -79,7 +79,7 @@ function PurchaseAuthEmail() { const syncEnterpriseName = async () => { try { const list = await api.purchase.getUserEnterprises({ - disabled: 0, + disabled: 0 }) const found = (list || []).find( (item) => String(item?.id ?? item?.enterprise_id) === String(enterprise_id) @@ -235,11 +235,7 @@ function PurchaseAuthEmail() { return ( - + item.disabled == 0).length if (!validIdentityLen) { diff --git a/src/subpages/purchase/share.js b/src/subpages/purchase/share.js index 9aebbb038..052517d9b 100644 --- a/src/subpages/purchase/share.js +++ b/src/subpages/purchase/share.js @@ -62,7 +62,7 @@ export default class PurchaseIndex extends Component { } try { const data = await api.purchase.getUserEnterprises({ - disabled: 0, + disabled: 0 }) const found = data?.find((x) => x.enterprise_id == eid) this.setState({ diff --git a/src/subpages/store/nearby-list.js b/src/subpages/store/nearby-list.js index 58c56dffc..e78faaec7 100644 --- a/src/subpages/store/nearby-list.js +++ b/src/subpages/store/nearby-list.js @@ -112,8 +112,7 @@ const LocationRegionPicker = memo(function LocationRegionPicker({ onConfirm({ province: province?.label || PLACEHOLDER_PROVINCE, city: city?.label || PLACEHOLDER_CITY, - district: - districtIndex === 0 ? DISTRICT_UNLIMITED : district?.label || PLACEHOLDER_DISTRICT + district: districtIndex === 0 ? DISTRICT_UNLIMITED : district?.label || PLACEHOLDER_DISTRICT }) } diff --git a/src/subpages/trade/after-sale.js b/src/subpages/trade/after-sale.js index dc88725e6..c67fe2230 100644 --- a/src/subpages/trade/after-sale.js +++ b/src/subpages/trade/after-sale.js @@ -279,237 +279,235 @@ function TradeAfterSale(props) { } > - { - setState((draft) => { - draft.curTabIdx = e - }) - }} - /> + { + setState((draft) => { + draft.curTabIdx = e + }) + }} + /> - - - {info?.items.map((item, index) => ( - - - - - - - - - - {item?.isPrescription == 1 && ( - {$t('44d65d28.e8b7e1')} - )} - {item.itemName} - + + + {info?.items.map((item, index) => ( + + + + + + + + + + {item?.isPrescription == 1 && ( + {$t('44d65d28.e8b7e1')} + )} + {item.itemName} + + + + + {item.itemSpecDesc && ( + {`${item.itemSpecDesc}`} + )} - - - {item.itemSpecDesc && ( - {`${item.itemSpecDesc}`} - )} - - - x{' '} - {item.num} - - - - {$t('44d65d28.3a1664')} - onChangeItemNum(e, index)} - /> + + x{' '} + {item.num} + + {$t('44d65d28.3a1664')} + onChangeItemNum(e, index)} + /> + - ))} - - - - - { - setState((draft) => { - draft.reasonIndex = e.detail.value - }) - }} - > - {`${reasons?.[reasonIndex] || $t('44d65d28.cf234c')}`}} - > - - - - - {/* 输入的运费不能大于可退款的运费 */} - {info?.freightFee != 0 && offline_freight_status && ( - - { - setState((draft) => { - draft.offline_freight = e - }) - }} - /> - } - > - )} - - - - - - - {/* */} - - + ))} + - {currentAftersalesType === 'REFUND_GOODS' && ( - + + { + setState((draft) => { + draft.reasonIndex = e.detail.value + }) + }} + > + {`${reasons?.[reasonIndex] || $t('44d65d28.cf234c')}`}} + > + + + + + {/* 输入的运费不能大于可退款的运费 */} + {info?.freightFee != 0 && offline_freight_status && ( + { - setState((draft) => { - draft.openRefundType = true - draft.selectRefundValue = refundType - }) - }} + title={info?.freightType == 'cash' ? $t('44d65d28.093620') : $t('44d65d28.e4f346')} + value={ + { + setState((draft) => { + draft.offline_freight = e + }) + }} + /> + } > - {refundType == 'offline' && - ((offlineAftersalesIsOpen && VERSION_STANDARD) || - (VERSION_PLATFORM && offlineAftersales)) && ( - <> - - {refundStore ? refundStore.name : $t('44d65d28.504d95')} - - } - onClick={() => { - Taro.navigateTo({ - url: `/subpages/trade/store-picker?distributor_id=${info.distributorId}&refund_store=${refundStore?.address_id}` - }) - }} - /> - { - setState((draft) => { - draft.contact = e - }) - }} - /> - } - > - { - setState((draft) => { - draft.mobile = e - }) - }} - /> - } - > - - )} )} - - {$t('44d65d28.f55683')} - - - { - setState((draft) => { - draft.description = e - }) - }} - /> - - { + + + + + + {/* */} + + + + + {currentAftersalesType === 'REFUND_GOODS' && ( + + { setState((draft) => { - draft.pic = val + draft.openRefundType = true + draft.selectRefundValue = refundType + }) + }} + > + {refundType == 'offline' && + ((offlineAftersalesIsOpen && VERSION_STANDARD) || + (VERSION_PLATFORM && offlineAftersales)) && ( + <> + + {refundStore ? refundStore.name : $t('44d65d28.504d95')} + + } + onClick={() => { + Taro.navigateTo({ + url: `/subpages/trade/store-picker?distributor_id=${info.distributorId}&refund_store=${refundStore?.address_id}` + }) + }} + /> + { + setState((draft) => { + draft.contact = e + }) + }} + /> + } + > + { + setState((draft) => { + draft.mobile = e + }) + }} + /> + } + > + + )} + + )} + + + {$t('44d65d28.f55683')} + + + { + setState((draft) => { + draft.description = e }) }} /> + { + setState((draft) => { + draft.pic = val + }) + }} + /> + - {afterSaleDesc.is_open && ( - - - - {$t('44d65d28.be1476')} - - + {afterSaleDesc.is_open && ( + + + + {$t('44d65d28.be1476')} - )} + + + )}