diff --git a/src/assets/info.png b/src/assets/info.png new file mode 100644 index 0000000..b28e4f9 Binary files /dev/null and b/src/assets/info.png differ diff --git a/src/components/sp-filter-bar-new/index.js b/src/components/sp-filter-bar-new/index.js index da31d1c..a54f247 100755 --- a/src/components/sp-filter-bar-new/index.js +++ b/src/components/sp-filter-bar-new/index.js @@ -88,15 +88,16 @@ export default class SpFilterBar extends Component { {item.icon && } ))} */} - }> + {/* 2024年02月21日暂时不做了,胡和客户开会沟通过了 */} + {false && }> false && this.setState({ showFilter: true })}> 筛选 {/* */} - + } }> - + 排序 diff --git a/src/components/sp-page/index.scss b/src/components/sp-page/index.scss index 6cd4293..dfcf1f3 100755 --- a/src/components/sp-page/index.scss +++ b/src/components/sp-page/index.scss @@ -28,7 +28,7 @@ &.ipx { padding-bottom: 20px; .sp-page-footer { - height: $page-ipx-footer-height; + min-height: $page-ipx-footer-height; } .sp-float-layout-ft { padding-bottom: 40px; @@ -63,7 +63,7 @@ bottom: 0; left: 0; right: 0; - height: $toolbar-height; //+20 + // height: $toolbar-height; //+20 z-index: $z-index-level-3; background: #fff; } diff --git a/src/hooks/usePayment.js b/src/hooks/usePayment.js index a2d6127..d12f222 100755 --- a/src/hooks/usePayment.js +++ b/src/hooks/usePayment.js @@ -19,7 +19,8 @@ export default (props = {}) => { // const { params, orderInfo } = state const cashierResultUrl = `/pages/cart/cashier-result` const $instance = getCurrentInstance() - const currentPath = $instance.router.path + console.log("🚀 ~ $instance.router:", $instance.router) + const currentPath = $instance.router?.path const cashierPayment = (params, orderInfo) => { console.log(`cashierPayment:`, params, orderInfo) @@ -101,13 +102,13 @@ export default (props = {}) => { // 是否开启adapay小程序插件 if (process.env.APP_ADAPAY == 'true') { - const adapayPlugin = requirePlugin("Adapay"); + const adapayPlugin = requirePlugin("Adapay") adapayPlugin.requestPay(weappOrderInfo.expend, () => { paySuccess(params, orderInfo) }, (e) => { console.error('adapayPlugin:', e) payError(orderInfo) - }); + }) } else { await Taro.requestPayment(weappOrderInfo) paySuccess(params, orderInfo) diff --git a/src/marketing/pages/member/address.js b/src/marketing/pages/member/address.js index ed95387..d8673db 100755 --- a/src/marketing/pages/member/address.js +++ b/src/marketing/pages/member/address.js @@ -1,10 +1,11 @@ import React, { useEffect } from 'react' import { useImmer } from 'use-immer' import Taro, { getCurrentInstance, getCurrentPages } from '@tarojs/taro' -import { View, Text } from '@tarojs/components' +import { View, Text, Image } from '@tarojs/components' import { AtButton, AtSwipeAction } from 'taro-ui' import { useDispatch, useSelector } from 'react-redux' -import { SpToast, SpNavBar, SpPage } from '@/components' +import { SpToast, SpNavBar, SpPage, SpCheckboxNew } from '@/components' +import { classNames } from '@/utils' import S from '@/spx' import api from '@/api' @@ -15,7 +16,11 @@ const ADDRESS_ID = 'address_id' const initialState = { list: [], isPicker: false, - selectedId: null + selectedId: null, + isSelected: '', + selItem: null, + editId: null, + visible: false } function AddressIndex (props) { @@ -34,12 +39,17 @@ function AddressIndex (props) { } const fetch = async (isDelete = false) => { - const { isPicker, receipt_type = '', city = '' } = $instance.router.params + const { isPicker, isSelected = '', receipt_type = '', city = '' } = $instance.router.params if (isPicker) { setState(draft => { draft.isPicker = true }) } + if (isSelected) { + setState(draft => { + draft.isSelected = isSelected + }) + } Taro.showLoading({ title: '' }) const { list } = await api.member.addressList() Taro.hideLoading() @@ -64,9 +74,14 @@ function AddressIndex (props) { } else { selectedId = list.find((addr) => addr.is_def > 0) || null } + let item = null + if (isSelected) { + item = list.find((addr) => addr[ADDRESS_ID] == isSelected) + } setState(draft => { draft.list = newList draft.selectedId = selectedId + draft.selItem = item }) } @@ -168,7 +183,7 @@ function AddressIndex (props) { Taro.navigateBack() } - const { selectedId, isPicker, list } = state + const { selectedId, isPicker, list, isSelected, selItem, editId, visible } = state const options = [ { text: '', @@ -180,15 +195,30 @@ function AddressIndex (props) { } } ] + const editAddr = async () => { + setState(draft => { + draft.visible = true + }) + setTimeout(() => { + setState(draft => { + draft.visible = false + }) + // Taro.navigateBack() + }, 700) + } return ( - + 新增地址 + {!!isSelected && + 确认修改 + } } > @@ -214,6 +244,35 @@ function AddressIndex (props) { )} */} + {selectedId && selItem && <> + + + + + 修改后会影响物流时效、送货上门等服务,只能原价修改且付款后只能修改一次。 + 若因商品换仓、已发货、运费变更等原因导致修改失败,请您谅解。 + + + + + + + + 原地址 + + + + + {selItem.province} + {selItem.city} + {selItem.county} + {selItem.adrdetail} + + + {selItem.username} {selItem.telephone} + + + } {list?.length > 0 && list.map((item, index) => { return ( handleDelete(e, item, index)} key={item[ADDRESS_ID]}> - - - - {item.username} - handleClickToEdit(e, item)}>编辑 - - {item.telephone} - - - - {item.province} - {item.city} - {item.county} - {item.adrdetail} - - - {isPicker && !item.disabled && ( - handleClickChecked(e, item)}> - {item[ADDRESS_ID] === selectedId ? ( - - ) : ( - - {' '} - - )} + { + !!selectedId && setState(draft => { + draft.editId = item[ADDRESS_ID] + }) + }}> + {!!isSelected && ''} />} + + + + {item.username} + {!isSelected && handleClickToEdit(e, item)}>编辑} + + {item.telephone} + + + + {item.province} + {item.city} + {item.county} + {item.adrdetail} - )} - - - handleChangeDefault(e, item)} - > - {item.is_def ? ( - <> - - {' '} - - 已设为默认 - - ) : ( - <> - - {' '} - - 设为默认 - + {isPicker && !item.disabled && ( + handleClickChecked(e, item)}> + {item[ADDRESS_ID] === selectedId ? ( + + ) : ( + + {' '} + + )} + )} - {/* - handleDelete(e, item, index)}> - - 删除 + + {!isSelected && + handleChangeDefault(e, item)} + > + {item.is_def ? ( + <> + + {' '} + + 已设为默认 + + ) : ( + <> + + {' '} + + 设为默认 + + )} - handleClickToEdit(e, item)}> - - 编辑 - - */} + {/* + handleDelete(e, item, index)}> + + 删除 + + handleClickToEdit(e, item)}> + + 编辑 + + */} + } @@ -303,6 +369,12 @@ function AddressIndex (props) { })} + + + 修改成功 + ) diff --git a/src/marketing/pages/member/address.scss b/src/marketing/pages/member/address.scss index 68a07c8..352521b 100755 --- a/src/marketing/pages/member/address.scss +++ b/src/marketing/pages/member/address.scss @@ -4,11 +4,16 @@ // background: #f5f5f5; padding: 20px; .btn-wrap { - padding: 0 50px; + padding: 20px 50px 0; border: transparent 1px solid; .at-button__text { font-size: 32px; } + .at-button { + &:not(:first-child) { + margin: 30px 0 100px; + } + } } .member-address-list { // /* #ifdef h5 */ @@ -63,6 +68,16 @@ // margin-left: 12px; padding: 40px 30px; color: #000; + .info-icon { + width: 26px; + height: 26px; + } + .info__txt { + flex: 1; + font-size: 18px; + line-height: 1.8; + margin-left: 20px; + } } &__title { color: #010101; @@ -89,7 +104,7 @@ } &__detail { @include multi-ellipsis(2); - margin: 0 30px 50px 0; + // margin: 0 30px 50px 0; color: #959595; } .at-swipe-action { @@ -107,6 +122,7 @@ .address-item__footer { display: flex; justify-content: space-between; + margin-top: 50px; // color: #9d9d9d; // padding-top: 19px; &_default { @@ -158,4 +174,30 @@ line-height: 80px; font-size: 26px; } + .toast { + position: fixed; + z-index: 2; + top: 50%; + left: 50%; + transform: translate(-50%, -50%); + opacity: 0; + visibility: hidden; + transition: all 0.3s ease; + display: flex; + justify-content: center; + align-items: center; + flex-direction: column; + width: 400px; + height: 120px; + background: #666; + color: #fff; + border-radius: 10px; + view { + font-size: 30px; + } + &.visible { + visibility: visible; + opacity: 1; + } + } } diff --git a/src/pages/cart/espier-checkout.js b/src/pages/cart/espier-checkout.js index b394c42..0932d77 100755 --- a/src/pages/cart/espier-checkout.js +++ b/src/pages/cart/espier-checkout.js @@ -948,7 +948,7 @@ function CartCheckout (props) { // : '' return ( - + {isObjectsValue(shoppingGuideData) && ( 此订单商品来自“{shoppingGuideData.store_name}”导购“ {shoppingGuideData.name}”的推荐 @@ -1022,7 +1022,7 @@ function CartCheckout (props) { value={couponText || '请选择'} /> )} */} - {/* {isWeixin && !bargain_id && totalInfo.invoice_status && ( + {isWeixin && !bargain_id && totalInfo.invoice_status && ( } /> - )} */} + )} {packInfo.is_open && ( )} - {validCart.length == 0 && invalidCart.length == 0 && ( + {/* && invalidCart.length == 0 */} + {validCart.length == 0 && ( {/* diff --git a/src/pages/recommend/list.js b/src/pages/recommend/list.js index 8451fa1..1a8f9da 100755 --- a/src/pages/recommend/list.js +++ b/src/pages/recommend/list.js @@ -724,7 +724,7 @@ export default class RecommendList extends Component { */} - - - - - - - - + + + + + + + + } diff --git a/src/style/taro-ui-mod.scss b/src/style/taro-ui-mod.scss index 7570f19..6312c25 100755 --- a/src/style/taro-ui-mod.scss +++ b/src/style/taro-ui-mod.scss @@ -191,8 +191,10 @@ } &--normal { /* prettier-ignore */ - border: 1PX solid #E5E5E5; - color: #444; + // border: 1PX solid #E5E5E5; + // color: #444; + border: 1px solid #000; + color: #000; } &--default { border-color: var(--color-primary) !important; diff --git a/src/subpage/pages/trade/cancel.scss b/src/subpage/pages/trade/cancel.scss index a30452d..64fbab7 100755 --- a/src/subpage/pages/trade/cancel.scss +++ b/src/subpage/pages/trade/cancel.scss @@ -14,6 +14,9 @@ border-color: #000; background-color: #fff; } + .at-textarea { + border-color: #00000080; + } } .cancel-reason { margin: 0 6px 0 0; diff --git a/src/subpage/pages/trade/comps/new-item.js b/src/subpage/pages/trade/comps/new-item.js index 095d09d..f32d9c8 100755 --- a/src/subpage/pages/trade/comps/new-item.js +++ b/src/subpage/pages/trade/comps/new-item.js @@ -72,6 +72,13 @@ export default class TradeItem extends Component { ) } + // 修改地址 + clickToEditAddress (choose) { + Taro.navigateTo({ + url: `/marketing/pages/member/address?isSelected=${choose}` + }) + } + render () { const { customFooter, @@ -134,7 +141,7 @@ export default class TradeItem extends Component { ) : null}