mirror of
https://gitee.com/ShopeX/ECShopX_mobile-frontend
synced 2026-08-11 06:05:31 +08:00
bug(custom): eCX-7243
This commit is contained in:
@@ -8,9 +8,14 @@ import { useImmer } from 'use-immer'
|
||||
import Taro, { getCurrentInstance, requirePlugin, useRouter } from '@tarojs/taro'
|
||||
import { View } from '@tarojs/components'
|
||||
import { TRANSFORM_PAYTYPE } from '@/consts'
|
||||
import { updateUserInfo } from '@/store/slices/user'
|
||||
import configStore from '@/store'
|
||||
import { isWeixin, isWeb, isWxWeb, requestAlipayminiPayment, isAPP, showToast } from '@/utils'
|
||||
import api from '@/api'
|
||||
|
||||
|
||||
const {store} = configStore()
|
||||
|
||||
const initialState = {
|
||||
params: '',
|
||||
orderInfo: ''
|
||||
@@ -95,7 +100,7 @@ export default (props = {}) => {
|
||||
return router.path?.split('?')[0] == '/subpages/purchase/espier-checkout'
|
||||
}
|
||||
|
||||
const paySuccess = (params, orderInfo) => {
|
||||
const paySuccess = async(params, orderInfo) => {
|
||||
const { activityType } = params
|
||||
const { order_id } = orderInfo
|
||||
if (isTradeDetaiPage()) {
|
||||
@@ -111,6 +116,9 @@ export default (props = {}) => {
|
||||
Taro.redirectTo({ url: `${cashierResultUrl}?order_id=${order_id}` })
|
||||
}
|
||||
}
|
||||
// 更新用户信息
|
||||
const _userInfo = await api.member.memberInfo()
|
||||
store.dispatch(updateUserInfo(_userInfo))
|
||||
}
|
||||
|
||||
const payError = (orderInfo) => {
|
||||
|
||||
@@ -12,9 +12,13 @@ import S from '@/spx'
|
||||
import { classNames } from '@/utils'
|
||||
import api from '@/api'
|
||||
import PaymentPicker from '@/pages/cart/comps/payment-picker'
|
||||
import configStore from '@/store'
|
||||
import { updateUserInfo } from '@/store/slices/user'
|
||||
// /Users/zhangqing/projectTwo/ecshopx-vshop/src/pages/cart/comps/payment-picker.js
|
||||
import './index.scss'
|
||||
|
||||
const {store} = configStore()
|
||||
|
||||
@connect(({ user, colors, sys }) => ({
|
||||
address: user.address,
|
||||
colors: colors.current,
|
||||
@@ -70,6 +74,7 @@ export default class Recharge extends Component {
|
||||
// 获取会员详情
|
||||
getMemberInfo() {
|
||||
api.member.memberInfo().then((res) => {
|
||||
store.dispatch(updateUserInfo(res))
|
||||
this.setState({
|
||||
deposit: res.deposit
|
||||
})
|
||||
|
||||
@@ -162,6 +162,7 @@ function MemberIndex(props) {
|
||||
if (isLogin) {
|
||||
getUserInfo()
|
||||
getMemberCenterData()
|
||||
setMemberBackground()
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user