mirror of
https://gitee.com/ShopeX/ECShopX_mobile-frontend
synced 2026-08-14 17:41:45 +08:00
no message
This commit is contained in:
@@ -49,6 +49,11 @@ export default class AddressPicker extends Component {
|
||||
}
|
||||
|
||||
changeSelection (params = {}) {
|
||||
if (!params || !params.address_id) {
|
||||
this.props.onChange(null)
|
||||
return
|
||||
}
|
||||
|
||||
const { address_id } = params
|
||||
const { list } = this.state
|
||||
const address = find(list, addr => address_id ? address_id === addr.address_id : addr.def_addr > 0) || list[0] || null
|
||||
|
||||
@@ -28,8 +28,6 @@ export default function withBackToTop (Component) {
|
||||
const { scrollTop, scrollHeight } = e.detail
|
||||
const offset = 300
|
||||
|
||||
console.log(scrollTop)
|
||||
|
||||
this.setState({
|
||||
scrollTop
|
||||
})
|
||||
|
||||
@@ -192,6 +192,11 @@ export default class CartCheckout extends Component {
|
||||
}
|
||||
|
||||
handleAddressChange = (address) => {
|
||||
if (!address) {
|
||||
this.toggleAddressPicker(true)
|
||||
return
|
||||
}
|
||||
|
||||
address = pickBy(address, {
|
||||
state: 'province',
|
||||
city: 'city',
|
||||
@@ -257,7 +262,7 @@ export default class CartCheckout extends Component {
|
||||
|
||||
handlePay = async () => {
|
||||
if (!this.state.address) {
|
||||
return S.notify('请选择地址')
|
||||
return S.toast('请选择地址')
|
||||
}
|
||||
|
||||
Taro.showLoading({
|
||||
@@ -300,6 +305,7 @@ export default class CartCheckout extends Component {
|
||||
: coupon.type === 'member'
|
||||
? '会员折扣'
|
||||
: ((coupon.value && coupon.value.title) || '')
|
||||
const isBtnDisabled = !address || !address.address.addr_id
|
||||
|
||||
return (
|
||||
<View className='page-checkout'>
|
||||
@@ -513,6 +519,7 @@ export default class CartCheckout extends Component {
|
||||
circle
|
||||
type='primary'
|
||||
className='btn-confirm-order'
|
||||
disabled={isBtnDisabled}
|
||||
onClick={this.handlePay}
|
||||
>提交订单</AtButton>
|
||||
</View>
|
||||
|
||||
@@ -2,8 +2,6 @@ import Taro from '@tarojs/taro'
|
||||
import { WGTS_NAV_MAP } from '@/consts'
|
||||
|
||||
export function linkPage (type, id) {
|
||||
console.log(type, id)
|
||||
debugger
|
||||
let url = ''
|
||||
|
||||
switch (type) {
|
||||
|
||||
Reference in New Issue
Block a user