mirror of
https://gitee.com/ShopeX/ECShopX_mobile-frontend
synced 2026-08-10 05:46:05 +08:00
style(scope): format
This commit is contained in:
@@ -213,7 +213,9 @@ class API {
|
||||
if (company_id) {
|
||||
query['company_id'] = company_id
|
||||
}
|
||||
const lang = normalizeStorageLang(Taro.getStorageSync('lang') || process.env.APP_DEFAULT_LANGUAGE)
|
||||
const lang = normalizeStorageLang(
|
||||
Taro.getStorageSync('lang') || process.env.APP_DEFAULT_LANGUAGE
|
||||
)
|
||||
if (lang) {
|
||||
const langMap = {
|
||||
zhcn: 'zh-CN',
|
||||
@@ -315,41 +317,41 @@ class API {
|
||||
|
||||
this.isRefreshingToken = true
|
||||
this.refreshTokenPromise = (async () => {
|
||||
const token = getS().getAuthToken()
|
||||
console.log('refreshToken', 66)
|
||||
let refreshed = false
|
||||
try {
|
||||
await this.makeReq(
|
||||
{
|
||||
header: {
|
||||
Authorization: `Bearer ${token}`
|
||||
const token = getS().getAuthToken()
|
||||
console.log('refreshToken', 66)
|
||||
let refreshed = false
|
||||
try {
|
||||
await this.makeReq(
|
||||
{
|
||||
header: {
|
||||
Authorization: `Bearer ${token}`
|
||||
},
|
||||
method: 'get',
|
||||
url: this.getReqUrl('/token/refresh'),
|
||||
noPending: true
|
||||
},
|
||||
method: 'get',
|
||||
url: this.getReqUrl('/token/refresh'),
|
||||
noPending: true
|
||||
},
|
||||
(res) => {
|
||||
const { statusCode } = res
|
||||
if (statusCode === HTTP_STATUS.UNAUTHORIZED) {
|
||||
this.handleLogout()
|
||||
return
|
||||
}
|
||||
if (statusCode !== HTTP_STATUS.SUCCESS) {
|
||||
return
|
||||
}
|
||||
(res) => {
|
||||
const { statusCode } = res
|
||||
if (statusCode === HTTP_STATUS.UNAUTHORIZED) {
|
||||
this.handleLogout()
|
||||
return
|
||||
}
|
||||
if (statusCode !== HTTP_STATUS.SUCCESS) {
|
||||
return
|
||||
}
|
||||
|
||||
const newToken = parseRefreshTokenFromResponse(res)
|
||||
if (!newToken) {
|
||||
log.debug('[refreshToken] missing token in response headers/body', res)
|
||||
return
|
||||
const newToken = parseRefreshTokenFromResponse(res)
|
||||
if (!newToken) {
|
||||
log.debug('[refreshToken] missing token in response headers/body', res)
|
||||
return
|
||||
}
|
||||
getS().setAuthToken(newToken)
|
||||
refreshed = true
|
||||
}
|
||||
getS().setAuthToken(newToken)
|
||||
refreshed = true
|
||||
}
|
||||
)
|
||||
} catch (e) {
|
||||
console.log(e, 'refreshToken error')
|
||||
}
|
||||
)
|
||||
} catch (e) {
|
||||
console.log(e, 'refreshToken error')
|
||||
}
|
||||
return refreshed
|
||||
})()
|
||||
|
||||
|
||||
@@ -147,7 +147,6 @@ function App({ children }) {
|
||||
}
|
||||
getSystemConfig()
|
||||
})
|
||||
|
||||
})
|
||||
|
||||
useDidShow(async (options) => {
|
||||
|
||||
@@ -116,7 +116,6 @@ export default class PrivacyConfirmModal extends Component {
|
||||
{$t('ed40c676.e61f2c')}
|
||||
</Button>
|
||||
)}
|
||||
|
||||
</View>
|
||||
</View>
|
||||
</View>
|
||||
|
||||
@@ -35,7 +35,10 @@ const initialState = {
|
||||
rules: {
|
||||
pickerTime: [{ required: true, message: '' }],
|
||||
pickerName: [{ required: true, message: '' }],
|
||||
pickerPhone: [{ required: true, message: '' }, { validate: 'mobile', message: '' }]
|
||||
pickerPhone: [
|
||||
{ required: true, message: '' },
|
||||
{ validate: 'mobile', message: '' }
|
||||
]
|
||||
},
|
||||
weekdays: [],
|
||||
timeSlots: [],
|
||||
@@ -486,11 +489,11 @@ function SpDeliver(props, ref) {
|
||||
{$t('9c730348.7d33dc')}
|
||||
{zitiAddress?.contract_phone}
|
||||
</View>
|
||||
{(zitiAddress?.hour || zitiInfo?.hour) && (
|
||||
<View className='ziti-time'>
|
||||
{ti('a47ea9b8.6cd6e3', [zitiAddress?.hour || zitiInfo?.hour])}
|
||||
</View>
|
||||
)}
|
||||
{(zitiAddress?.hour || zitiInfo?.hour) && (
|
||||
<View className='ziti-time'>
|
||||
{ti('a47ea9b8.6cd6e3', [zitiAddress?.hour || zitiInfo?.hour])}
|
||||
</View>
|
||||
)}
|
||||
</View>
|
||||
</View>
|
||||
)}
|
||||
@@ -583,7 +586,12 @@ function SpDeliver(props, ref) {
|
||||
</Text>
|
||||
</SpCell>
|
||||
</SpFormItem>
|
||||
<SpFormItem label={$t('9c730348.d5403f')} prop='pickerName' type='line' labelWidth='80px'>
|
||||
<SpFormItem
|
||||
label={$t('9c730348.d5403f')}
|
||||
prop='pickerName'
|
||||
type='line'
|
||||
labelWidth='80px'
|
||||
>
|
||||
<AtInput
|
||||
name='pickerName'
|
||||
value={form.pickerName}
|
||||
@@ -591,7 +599,12 @@ function SpDeliver(props, ref) {
|
||||
onChange={onInputChange.bind(this, 'pickerName')}
|
||||
/>
|
||||
</SpFormItem>
|
||||
<SpFormItem label={$t('692ba07e.92448a')} prop='pickerPhone' type='line' labelWidth='80px'>
|
||||
<SpFormItem
|
||||
label={$t('692ba07e.92448a')}
|
||||
prop='pickerPhone'
|
||||
type='line'
|
||||
labelWidth='80px'
|
||||
>
|
||||
<AtInput
|
||||
name='pickerPhone'
|
||||
value={form.pickerPhone}
|
||||
|
||||
@@ -29,7 +29,8 @@ function SpOrderItem(props) {
|
||||
const { market_price: enMarketPrice } = order_page
|
||||
const { priceDisplayConfig = {} } = useSelector((state) => state.purchase)
|
||||
const { order_detail_page = {} } = priceDisplayConfig
|
||||
const { activity_price: enPurActivityPrice = true, sale_price: enPurSalePrice } = order_detail_page
|
||||
const { activity_price: enPurActivityPrice = true, sale_price: enPurSalePrice } =
|
||||
order_detail_page
|
||||
|
||||
if (!info) return null
|
||||
|
||||
|
||||
@@ -159,7 +159,9 @@ const CustomNavigationHeader = memo((props) => {
|
||||
style={{ color: pageConfig?.titleColor }}
|
||||
>
|
||||
<Text className='nearby-function-text'>
|
||||
{VERSION_STANDARD ? shopInfo?.name || $t('cb50ec48.0d7757') : nearbyText || $t('cb50ec48.e9a36d')}
|
||||
{VERSION_STANDARD
|
||||
? shopInfo?.name || $t('cb50ec48.0d7757')
|
||||
: nearbyText || $t('cb50ec48.e9a36d')}
|
||||
</Text>
|
||||
<Text className='nearby-function-icon iconfont icon-arrowDown' />
|
||||
</View>
|
||||
@@ -267,12 +269,12 @@ const CustomNavigationHeader = memo((props) => {
|
||||
className='title-container'
|
||||
style={styleNames({ paddingLeft: !showNavitionLeft ? `20rpx` : `0` })}
|
||||
>
|
||||
{/* 标题区:搜索 */}
|
||||
{showHeaderContent && resolvedTitleStyle === '3' && renderSearch()}
|
||||
{/* 标题区:页面名称 */}
|
||||
{showHeaderContent && resolvedTitleStyle === '1' && renderTitleText()}
|
||||
{/* 标题区:图片 */}
|
||||
{showHeaderContent && resolvedTitleStyle === '2' && renderTitleImage()}
|
||||
{/* 标题区:搜索 */}
|
||||
{showHeaderContent && resolvedTitleStyle === '3' && renderSearch()}
|
||||
{/* 标题区:页面名称 */}
|
||||
{showHeaderContent && resolvedTitleStyle === '1' && renderTitleText()}
|
||||
{/* 标题区:图片 */}
|
||||
{showHeaderContent && resolvedTitleStyle === '2' && renderTitleImage()}
|
||||
</View>
|
||||
</View>
|
||||
)}
|
||||
|
||||
@@ -65,17 +65,8 @@ export default class SpPrice extends Component {
|
||||
}
|
||||
|
||||
renderCardVariant() {
|
||||
const {
|
||||
className,
|
||||
primary,
|
||||
discount,
|
||||
equal,
|
||||
sizePreset,
|
||||
digits,
|
||||
noSymbol,
|
||||
appendText,
|
||||
plus
|
||||
} = this.props
|
||||
const { className, primary, discount, equal, sizePreset, digits, noSymbol, appendText, plus } =
|
||||
this.props
|
||||
const raw = this.resolveRawValue()
|
||||
const unit = this.resolveUnit()
|
||||
let num = raw
|
||||
|
||||
@@ -254,7 +254,10 @@ export const GOODS_INFO = {
|
||||
}
|
||||
if (regions != null && regions !== '') {
|
||||
const parts = Array.isArray(regions) ? regions : [regions]
|
||||
const regionText = parts.filter((x) => x != null && x !== '').join(' ').trim()
|
||||
const regionText = parts
|
||||
.filter((x) => x != null && x !== '')
|
||||
.join(' ')
|
||||
.trim()
|
||||
if (regionText) {
|
||||
res.push({ attribute_name: $t('a12c9ae6.2b6d31'), attribute_value_name: regionText })
|
||||
}
|
||||
|
||||
@@ -45,7 +45,7 @@ export const ACTIVITY_ITEM = {
|
||||
priceDisplayConfig: 'price_display_config',
|
||||
isPassphraseEnabled: ({ is_passphrase_enabled }) => is_passphrase_enabled == 1, //是否开启口令通道 0/1
|
||||
authType: ({ auth_type }) => auth_type, //当前行关联内购企业认证方式:email/account/mobile/qr_code/no_verify 等
|
||||
passphraseUserVerified: ({ passphrase_user_verified }) => passphrase_user_verified, //当前登录用户是否已在该活动+本企业下口令校验成功;未开口令为 0
|
||||
passphraseUserVerified: ({ passphrase_user_verified }) => passphrase_user_verified //当前登录用户是否已在该活动+本企业下口令校验成功;未开口令为 0
|
||||
}
|
||||
|
||||
export const ACTIVITY_LIMIT_ITEM = {
|
||||
|
||||
@@ -83,8 +83,7 @@ function CompGoodsItem(props) {
|
||||
/** 其它行展开时,收起本行 */
|
||||
useEffect(() => {
|
||||
if (!isShowDeleteIcon || swipeRowId == null || !onSwipeOpenChange) return
|
||||
const mine =
|
||||
openSwipeCartId != null && String(openSwipeCartId) === String(swipeRowId)
|
||||
const mine = openSwipeCartId != null && String(openSwipeCartId) === String(swipeRowId)
|
||||
if (!mine && translateRef.current < -0.5) {
|
||||
setTranslateX(0)
|
||||
}
|
||||
@@ -201,8 +200,8 @@ function CompGoodsItem(props) {
|
||||
inputMax != null && inputMax !== ''
|
||||
? inputMax
|
||||
: info?.limitedBuy
|
||||
? info?.limitedBuy?.limit_buy
|
||||
: info.store
|
||||
? info?.limitedBuy?.limit_buy
|
||||
: info.store
|
||||
|
||||
const rowBody = (
|
||||
<View className='comp-goodsitem'>
|
||||
|
||||
@@ -61,12 +61,17 @@ import './espier-checkout.scss'
|
||||
/** 同城配:比较收货城市与店铺城市(去空白、去末尾「市」减少格式差异) */
|
||||
function normalizeCheckoutCity(name) {
|
||||
if (name == null || name === '') return ''
|
||||
return String(name).trim().replace(/市\s*$/u, '')
|
||||
return String(name)
|
||||
.trim()
|
||||
.replace(/市\s*$/u, '')
|
||||
}
|
||||
|
||||
function getShopCityFromShopInfo(shopInfo) {
|
||||
if (!shopInfo || typeof shopInfo !== 'object') return ''
|
||||
const raw = shopInfo.city != null && String(shopInfo.city).trim() !== '' ? shopInfo.city : shopInfo.regions?.[1]
|
||||
const raw =
|
||||
shopInfo.city != null && String(shopInfo.city).trim() !== ''
|
||||
? shopInfo.city
|
||||
: shopInfo.regions?.[1]
|
||||
return raw != null ? String(raw) : ''
|
||||
}
|
||||
|
||||
@@ -1034,7 +1039,8 @@ function CartCheckout(props) {
|
||||
<View className='cart-checkout__group'>
|
||||
<View className='cart-group__cont'>
|
||||
<View className='sp-order-item__idx'>
|
||||
{$t('edc703ce.08ea4e')} <Text style={{ color: '#222' }}>({totalInfo.items_count})</Text>
|
||||
{$t('edc703ce.08ea4e')}{' '}
|
||||
<Text style={{ color: '#222' }}>({totalInfo.items_count})</Text>
|
||||
</View>
|
||||
<View className='goods-list'>
|
||||
{detailInfo.map((item, idx) => (
|
||||
|
||||
@@ -247,10 +247,7 @@ function CartIndex() {
|
||||
if (!res.confirm) return
|
||||
await dispatch(deleteCartItem({ cart_id }))
|
||||
setState((draft) => {
|
||||
if (
|
||||
draft.openSwipeCartId != null &&
|
||||
String(draft.openSwipeCartId) === String(cart_id)
|
||||
) {
|
||||
if (draft.openSwipeCartId != null && String(draft.openSwipeCartId) === String(cart_id)) {
|
||||
draft.openSwipeCartId = null
|
||||
}
|
||||
})
|
||||
@@ -445,7 +442,7 @@ function CartIndex() {
|
||||
})}
|
||||
{/** 店铺商品结束 */}
|
||||
{/** 结算/全选操作开始 */}
|
||||
|
||||
|
||||
<View className='shop-cart-item-ft'>
|
||||
<View className='shop-cart-item-ft__lf'>
|
||||
<SpCheckboxNew
|
||||
|
||||
@@ -190,7 +190,8 @@ function CategoryFlatLayout() {
|
||||
{/** 轮播 */}
|
||||
{item.name === 'film' && <WgtFilm info={item} id={index + 1} />} {/** 视频 */}
|
||||
{/** 商品 */}
|
||||
{item.name === 'goods' && <WgtGoods info={item} id={item.id || idx} />} {/** 商品 */}
|
||||
{item.name === 'goods' && <WgtGoods info={item} id={item.id || idx} />}{' '}
|
||||
{/** 商品 */}
|
||||
</>
|
||||
))}
|
||||
<View className='category-flat-layout__powered-by-wrap'>
|
||||
|
||||
@@ -36,7 +36,6 @@ function WgtFilm(props) {
|
||||
|
||||
const objectFit = config.ratio === 'square' ? 'cover' : 'contain'
|
||||
|
||||
|
||||
if (!info || !data || data.length === 0 || !data[0].url) {
|
||||
return null
|
||||
}
|
||||
|
||||
@@ -191,7 +191,10 @@ export default class WgtGoodsCard extends Component {
|
||||
const isFav = Boolean(item.favStatus ?? favs?.[item.item_id])
|
||||
return (
|
||||
<View key={key} className='goods-card' style={styleNames(goodsCardInnerStyle)}>
|
||||
<View className='goods-card__header' onClick={this.handleClickItem.bind(this, item)}>
|
||||
<View
|
||||
className='goods-card__header'
|
||||
onClick={this.handleClickItem.bind(this, item)}
|
||||
>
|
||||
<SpImage src={item.img_url} width={160} height={160} isOss />
|
||||
<View className='goods-card__info'>
|
||||
<View className='goods-card__info-title'>{item.item_name}</View>
|
||||
@@ -199,7 +202,9 @@ export default class WgtGoodsCard extends Component {
|
||||
<SpPrice unit='cent' value={item.price} size={28} primary noDecimal />
|
||||
</View>
|
||||
{item.sales > 0 && (
|
||||
<View className='goods-card__info-sales'>{ti('a8427e1f.47df99', [item.sales])}</View>
|
||||
<View className='goods-card__info-sales'>
|
||||
{ti('a8427e1f.47df99', [item.sales])}
|
||||
</View>
|
||||
)}
|
||||
</View>
|
||||
</View>
|
||||
|
||||
@@ -38,7 +38,7 @@ function WgtImgHotZone(props) {
|
||||
|
||||
// 容器样式(图片容器)
|
||||
const bodyStyle = useMemo(() => {
|
||||
if(isVertical&&config.imgHeight){
|
||||
if (isVertical && config.imgHeight) {
|
||||
return {
|
||||
height: Taro.pxTransform(config.imgHeight)
|
||||
}
|
||||
@@ -108,22 +108,23 @@ function WgtImgHotZone(props) {
|
||||
|
||||
return (
|
||||
<View
|
||||
className={classNames('wgt-imghot-zone', {
|
||||
})}
|
||||
className={classNames('wgt-imghot-zone', {})}
|
||||
id={`wgt-imghot-zone-${id || ''}`}
|
||||
style={styleNames(outerStyle)}
|
||||
>
|
||||
<View className='wgt-imghot-zone__body' style={styleNames(bodyStyle)}>
|
||||
<View className={classNames('wgt-imghot-zone__body-img-wrapper', {
|
||||
'wgt-imghot-zone__body-img-wrapper__vertical': isVertical,
|
||||
'wgt-imghot-zone__body-img-wrapper__horizontal': !isVertical
|
||||
})}>
|
||||
<SpImage
|
||||
src={config.imgUrl}
|
||||
className='wgt-imghot-zone__body-img'
|
||||
mode={!isVertical ? 'widthFix' : 'heightFix'}
|
||||
/>
|
||||
{isArray(data) && data.length > 0 && data.map(renderHotZone)}
|
||||
<View
|
||||
className={classNames('wgt-imghot-zone__body-img-wrapper', {
|
||||
'wgt-imghot-zone__body-img-wrapper__vertical': isVertical,
|
||||
'wgt-imghot-zone__body-img-wrapper__horizontal': !isVertical
|
||||
})}
|
||||
>
|
||||
<SpImage
|
||||
src={config.imgUrl}
|
||||
className='wgt-imghot-zone__body-img'
|
||||
mode={!isVertical ? 'widthFix' : 'heightFix'}
|
||||
/>
|
||||
{isArray(data) && data.length > 0 && data.map(renderHotZone)}
|
||||
</View>
|
||||
</View>
|
||||
</View>
|
||||
|
||||
@@ -2,7 +2,15 @@
|
||||
* Copyright © ShopeX (http://www.shopex.cn). All rights reserved.
|
||||
* See LICENSE file for license details.
|
||||
*/
|
||||
import React, { Fragment, useState, useMemo, useContext, useRef, useCallback, useLayoutEffect } from 'react'
|
||||
import React, {
|
||||
Fragment,
|
||||
useState,
|
||||
useMemo,
|
||||
useContext,
|
||||
useRef,
|
||||
useCallback,
|
||||
useLayoutEffect
|
||||
} from 'react'
|
||||
import Taro from '@tarojs/taro'
|
||||
import { View } from '@tarojs/components'
|
||||
import { classNames, pxToRpx, getElementRectBox, rpxToPx } from '@/utils'
|
||||
|
||||
@@ -3,5 +3,5 @@
|
||||
* See LICENSE file for license details.
|
||||
*/
|
||||
export default {
|
||||
navigationBarTitleText: '我的收藏'
|
||||
navigationBarTitleText: '我的收藏'
|
||||
}
|
||||
|
||||
@@ -33,7 +33,7 @@ const initialState = {
|
||||
invite_code: '', // 邀请码
|
||||
activity_id: '', // 活动ID
|
||||
enterprise_id: '', // 企业ID
|
||||
authType: '', // 认证方式
|
||||
authType: '' // 认证方式
|
||||
}
|
||||
|
||||
function PurchaseAuth() {
|
||||
@@ -96,7 +96,6 @@ function PurchaseAuth() {
|
||||
init()
|
||||
}, [])
|
||||
|
||||
|
||||
useEffect(() => {
|
||||
fetchActivityConfig()
|
||||
}, [activity_id])
|
||||
@@ -105,9 +104,6 @@ function PurchaseAuth() {
|
||||
fetchEnterpriseInfo()
|
||||
}, [enterprise_id])
|
||||
|
||||
|
||||
|
||||
|
||||
useEffect(() => {
|
||||
if (invite_code && activity_id) {
|
||||
dispatch(updateInviteCode(invite_code))
|
||||
@@ -135,20 +131,20 @@ function PurchaseAuth() {
|
||||
}
|
||||
inviteAutoEnterRef.current = true
|
||||
setIsAutoEntering(true)
|
||||
; (async () => {
|
||||
try {
|
||||
if (userInfo?.is_relative) {
|
||||
await enterInviteActivity()
|
||||
return
|
||||
}
|
||||
await validateRelativeBind()
|
||||
} catch (e) {
|
||||
inviteAutoEnterRef.current = false
|
||||
throw e
|
||||
} finally {
|
||||
setIsAutoEntering(false)
|
||||
;(async () => {
|
||||
try {
|
||||
if (userInfo?.is_relative) {
|
||||
await enterInviteActivity()
|
||||
return
|
||||
}
|
||||
})().catch(() => { })
|
||||
await validateRelativeBind()
|
||||
} catch (e) {
|
||||
inviteAutoEnterRef.current = false
|
||||
throw e
|
||||
} finally {
|
||||
setIsAutoEntering(false)
|
||||
}
|
||||
})().catch(() => {})
|
||||
}, [activity_id, checked, enterprise_id, invite_code, isLogin, isNewUser, userInfo])
|
||||
|
||||
useEffect(() => {
|
||||
@@ -181,7 +177,7 @@ function PurchaseAuth() {
|
||||
}
|
||||
try {
|
||||
const data = await api.purchase.getActivitydata({
|
||||
activity_id: activity_id,
|
||||
activity_id: activity_id
|
||||
})
|
||||
const candidate = data?.pic || ''
|
||||
dispatch(updateCurActivityInfo(data || {}))
|
||||
@@ -222,7 +218,6 @@ function PurchaseAuth() {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
const checkPolicyChangeFunc = async () => {
|
||||
const res = await checkPolicyChange()
|
||||
updateChecked(res)
|
||||
@@ -284,7 +279,6 @@ function PurchaseAuth() {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
const handleBindPhone = async (e) => {
|
||||
const { encryptedData, iv, cloudID } = e.detail
|
||||
if (encryptedData && iv) {
|
||||
@@ -318,9 +312,10 @@ function PurchaseAuth() {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
const buildInviteActivityUrl = () => {
|
||||
return `/subpages/purchase/index?activity_id=${activity_id || ''}&enterprise_id=${enterprise_id || ''}&pages_template_id=${pagesTemplateId || ''}`
|
||||
return `/subpages/purchase/index?activity_id=${activity_id || ''}&enterprise_id=${
|
||||
enterprise_id || ''
|
||||
}&pages_template_id=${pagesTemplateId || ''}`
|
||||
}
|
||||
|
||||
const prepareInviteActivity = async () => {
|
||||
@@ -362,7 +357,6 @@ function PurchaseAuth() {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
const handlePasscodeLandingStart = ({ skipLoginGuard = false } = {}) => {
|
||||
if (isAutoEntering) {
|
||||
return
|
||||
@@ -402,7 +396,9 @@ function PurchaseAuth() {
|
||||
redirectUrl = '/subpages/purchase/select-company-passcode'
|
||||
}
|
||||
if (activity_id && redirectUrl) {
|
||||
redirectUrl = `${redirectUrl}?activity_id=${activity_id}&enterprise_id=${enterprise_id}&pages_template_id=${pagesTemplateId || ''}`
|
||||
redirectUrl = `${redirectUrl}?activity_id=${activity_id}&enterprise_id=${enterprise_id}&pages_template_id=${
|
||||
pagesTemplateId || ''
|
||||
}`
|
||||
}
|
||||
if (!redirectUrl) {
|
||||
pendingAutoStartRef.current = false
|
||||
@@ -413,7 +409,6 @@ function PurchaseAuth() {
|
||||
Taro.navigateTo({ url: redirectUrl })
|
||||
}
|
||||
|
||||
|
||||
return (
|
||||
<SpPage
|
||||
className='purchase-auth purchase-auth--passcode-landing'
|
||||
|
||||
@@ -21,8 +21,8 @@ function CompPurchaseNav(props) {
|
||||
title,
|
||||
btnReturn = false,
|
||||
btnHome = false,
|
||||
onBack = () => { },
|
||||
onHome = () => { },
|
||||
onBack = () => {},
|
||||
onHome = () => {},
|
||||
navigationRSpace: navigationRSpaceFromPage
|
||||
} = props
|
||||
const showHome = btnHome || btnReturn
|
||||
|
||||
@@ -130,7 +130,6 @@ function GuideRecommendDetail(props) {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return (
|
||||
<SpPage
|
||||
className='pages-recommend-detail'
|
||||
@@ -170,15 +169,16 @@ function GuideRecommendDetail(props) {
|
||||
</View>
|
||||
<View className='article-bd'>
|
||||
<View className='wgts-wrap__cont'>
|
||||
{Array.isArray(content) && content.map((item, idx) => (
|
||||
<View className='wgt-wrap' key={`${item.name}${idx}`}>
|
||||
{item.name === 'film' && <WgtFilm info={item} />}
|
||||
{item.name === 'slider' && <WgtSlider info={item} />}
|
||||
{item.name === 'writing' && <WgtWriting info={item} />}
|
||||
{item.name === 'heading' && <WgtHeading info={item} />}
|
||||
{item.name === 'goodsCard' && <WgtGoodsCard info={item} />}
|
||||
</View>
|
||||
))}
|
||||
{Array.isArray(content) &&
|
||||
content.map((item, idx) => (
|
||||
<View className='wgt-wrap' key={`${item.name}${idx}`}>
|
||||
{item.name === 'film' && <WgtFilm info={item} />}
|
||||
{item.name === 'slider' && <WgtSlider info={item} />}
|
||||
{item.name === 'writing' && <WgtWriting info={item} />}
|
||||
{item.name === 'heading' && <WgtHeading info={item} />}
|
||||
{item.name === 'goodsCard' && <WgtGoodsCard info={item} />}
|
||||
</View>
|
||||
))}
|
||||
</View>
|
||||
</View>
|
||||
</ScrollView>
|
||||
|
||||
@@ -131,9 +131,7 @@ function ShareIand() {
|
||||
await reportPurchaseScanBehavior(routeParams)
|
||||
}
|
||||
|
||||
const targetUrl = queryString
|
||||
? `${targetPath}?${queryString}`
|
||||
: targetPath
|
||||
const targetUrl = queryString ? `${targetPath}?${queryString}` : targetPath
|
||||
console.log('导购任务分享跳转:', targetUrl, targetPath)
|
||||
|
||||
if (targetPath) {
|
||||
|
||||
@@ -142,8 +142,7 @@ class RouteIntercept {
|
||||
}
|
||||
|
||||
return (
|
||||
/[?&](activity_id|enterprise_id|invite_code)=/.test(url) ||
|
||||
/[?&]type=passcode(&|$)/.test(url)
|
||||
/[?&](activity_id|enterprise_id|invite_code)=/.test(url) || /[?&]type=passcode(&|$)/.test(url)
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
@@ -24,8 +24,8 @@ const initialState = {
|
||||
curDistributorId: null,
|
||||
curEnterpriseLogo: '',
|
||||
persist_purchase_share_info: {}, //持久化存储最近一次活动,用于内购会员中心额度和分享
|
||||
curActivityInfo: {}, //当前活动信息
|
||||
isPasscodeLogin: false, //是否是口令通道登录
|
||||
curActivityInfo: {}, //当前活动信息
|
||||
isPasscodeLogin: false //是否是口令通道登录
|
||||
}
|
||||
|
||||
export const fetchCartList = createAsyncThunk('purchase/fetchCartList', async (params) => {
|
||||
|
||||
@@ -63,8 +63,7 @@ const EmailActivate = () => {
|
||||
payload.company_id = String(companyIdRaw).trim()
|
||||
}
|
||||
const res = await api.user.memberEmailActivate(payload)
|
||||
const msg =
|
||||
(res && (res.message || res.msg)) || $t('6b6227fd.9aef4a')
|
||||
const msg = (res && (res.message || res.msg)) || $t('6b6227fd.9aef4a')
|
||||
setSuccessHint(msg)
|
||||
setPhase('success')
|
||||
} catch (e) {
|
||||
@@ -86,15 +85,10 @@ const EmailActivate = () => {
|
||||
phase === 'loading'
|
||||
? $t('6b6227fd.7fb60d')
|
||||
: phase === 'success'
|
||||
? $t('6b6227fd.240dec')
|
||||
: $t('6b6227fd.912efd')
|
||||
? $t('6b6227fd.240dec')
|
||||
: $t('6b6227fd.912efd')
|
||||
|
||||
const desc =
|
||||
phase === 'loading'
|
||||
? $t('6b6227fd.368085')
|
||||
: phase === 'success'
|
||||
? successHint
|
||||
: ''
|
||||
const desc = phase === 'loading' ? $t('6b6227fd.368085') : phase === 'success' ? successHint : ''
|
||||
|
||||
return (
|
||||
<SpPage
|
||||
|
||||
@@ -76,7 +76,7 @@ const initialState = {
|
||||
receiver_district: '',
|
||||
receiver_address: ''
|
||||
},
|
||||
cart_type: '', // fastbuy 立即下单
|
||||
cart_type: '' // fastbuy 立即下单
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -540,7 +540,9 @@ function DianwuCheckout(props) {
|
||||
dispatch(selectMember(null))
|
||||
onEventCreateOrder()
|
||||
closeCashSheet()
|
||||
Taro.redirectTo({ url: `/subpages/dianwu/collection-result?order_id=${order_id}&pay_type=pos` })
|
||||
Taro.redirectTo({
|
||||
url: `/subpages/dianwu/collection-result?order_id=${order_id}&pay_type=pos`
|
||||
})
|
||||
} catch (e) {
|
||||
showToast(e?.res?.data?.data?.message || e?.message || $t('2b4b2b4f.5fa802'))
|
||||
}
|
||||
@@ -655,7 +657,8 @@ function DianwuCheckout(props) {
|
||||
} = addrDraft
|
||||
if (!receiver_name?.trim()) return showToast($t('2b4b2b4f.1521d9'))
|
||||
if (!validate.isMobileNum(receiver_mobile)) return showToast($t('2b4b2b4f.18d771'))
|
||||
if (!receiver_state || !receiver_city || !receiver_district) return showToast($t('2b4b2b4f.075488'))
|
||||
if (!receiver_state || !receiver_city || !receiver_district)
|
||||
return showToast($t('2b4b2b4f.075488'))
|
||||
if (!receiver_address?.trim()) return showToast($t('2b4b2b4f.80d685'))
|
||||
const saved = {
|
||||
receiver_name: receiver_name.trim(),
|
||||
@@ -716,7 +719,9 @@ function DianwuCheckout(props) {
|
||||
<>
|
||||
<View className='checkout-delivery-row__main'>
|
||||
<View className='checkout-delivery-row__line1'>
|
||||
<Text className='checkout-delivery-row__name'>{deliveryAddress.receiver_name}</Text>
|
||||
<Text className='checkout-delivery-row__name'>
|
||||
{deliveryAddress.receiver_name}
|
||||
</Text>
|
||||
<Text className='checkout-delivery-row__tel'>
|
||||
{maskTelDisplay(deliveryAddress.receiver_mobile)}
|
||||
</Text>
|
||||
@@ -986,7 +991,9 @@ function DianwuCheckout(props) {
|
||||
>
|
||||
<Text
|
||||
className={
|
||||
regionLineText ? 'checkout-delivery-sheet__region-txt' : 'checkout-delivery-sheet__region-ph'
|
||||
regionLineText
|
||||
? 'checkout-delivery-sheet__region-txt'
|
||||
: 'checkout-delivery-sheet__region-ph'
|
||||
}
|
||||
>
|
||||
{regionLineText || $t('2b4b2b4f.7fae6a')}
|
||||
|
||||
@@ -244,7 +244,11 @@ function DianwuCollectionResult(props) {
|
||||
<SpCell border title={$t('36c99ee5.2e8a41')} value={distributor?.name}></SpCell>
|
||||
<SpCell border title={$t('36c99ee5.f9ac4b')} value={operatorInfo?.username}></SpCell>
|
||||
<SpCell border title={$t('36c99ee5.0c9d2b')} value={payTypeLabel()}></SpCell>
|
||||
<SpCell border title={$t('36c99ee5.7e951d')} value={formatDateTime(info.createTime)}></SpCell>
|
||||
<SpCell
|
||||
border
|
||||
title={$t('36c99ee5.7e951d')}
|
||||
value={formatDateTime(info.createTime)}
|
||||
></SpCell>
|
||||
<SpCell title={$t('36c99ee5.2432b5')} value={info.remark}></SpCell>
|
||||
</View>
|
||||
)}
|
||||
|
||||
@@ -73,7 +73,12 @@ function CompDianwuPlatformOrder({ open, item, distributor_id, onClose, onEventF
|
||||
{item.itemSpecDesc ? <View className='goods-sku'>{item.itemSpecDesc}</View> : null}
|
||||
<View className='row-num'>
|
||||
<Text className='label'>{$t('eac57497.0bf60b')}</Text>
|
||||
<SpInputNumber value={num} min={1} max={maxStock} onChange={(v) => setNum(Number(v) || 1)} />
|
||||
<SpInputNumber
|
||||
value={num}
|
||||
min={1}
|
||||
max={maxStock}
|
||||
onChange={(v) => setNum(Number(v) || 1)}
|
||||
/>
|
||||
</View>
|
||||
<View className='hint'>{ti('eac57497.5591b7', [maxStock])}</View>
|
||||
<AtButton type='primary' className='btn-confirm' onClick={handleConfirm}>
|
||||
|
||||
@@ -155,7 +155,9 @@ function DianWuList() {
|
||||
{list.map((items, idx) => {
|
||||
return items.map((item, sidx) => (
|
||||
<View
|
||||
className={classNames('item-wrap', { 'item-disabled': isDianwuListGoodsDisabled(item) })}
|
||||
className={classNames('item-wrap', {
|
||||
'item-disabled': isDianwuListGoodsDisabled(item)
|
||||
})}
|
||||
key={`item-wrap__${idx}_${sidx}`}
|
||||
>
|
||||
<CompGoods info={item}>
|
||||
|
||||
@@ -22,7 +22,7 @@ export const GOODS_ITEM = {
|
||||
isPrescription: 'is_prescription',
|
||||
isMedicine: 'is_medicine',
|
||||
platformStore: 'platform_store',
|
||||
isTotalStore: 'is_total_store',
|
||||
isTotalStore: 'is_total_store'
|
||||
}
|
||||
|
||||
export const CART_GOODS_ITEM = {
|
||||
|
||||
@@ -85,7 +85,6 @@ function GuideRecommendDetail(props) {
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
return (
|
||||
<SpPage
|
||||
className='guide-recommend-detail'
|
||||
@@ -111,9 +110,7 @@ function GuideRecommendDetail(props) {
|
||||
{item.name === 'slider' && <WgtSlider info={item} />}
|
||||
{item.name === 'writing' && <WgtWriting info={item} />}
|
||||
{item.name === 'heading' && <WgtHeading info={item} />}
|
||||
{item.name === 'goodsCard' && (
|
||||
<WgtGoodsCard info={item} />
|
||||
)}
|
||||
{item.name === 'goodsCard' && <WgtGoodsCard info={item} />}
|
||||
</View>
|
||||
))}
|
||||
</View>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
module.exports = {
|
||||
zhcn: require("./locales/zhcn.json"),
|
||||
en: require("./locales/en.json"),
|
||||
ar: require("./locales/ar.json")
|
||||
zhcn: require('./locales/zhcn.json'),
|
||||
en: require('./locales/en.json'),
|
||||
ar: require('./locales/ar.json')
|
||||
}
|
||||
|
||||
@@ -177,12 +177,7 @@ function CompGoodsBuyToolbar(props) {
|
||||
<View className='comp-goodsbuytoolbar'>
|
||||
<SpLogin className='shoucang-wrap' onChange={onChangeCollection.bind(this)}>
|
||||
<View className='toolbar-item'>
|
||||
<Text
|
||||
className={classNames(
|
||||
'iconfont',
|
||||
isFaved ? 'icon-star_on' : 'icon-star'
|
||||
)}
|
||||
></Text>
|
||||
<Text className={classNames('iconfont', isFaved ? 'icon-star_on' : 'icon-star')}></Text>
|
||||
<Text className='toolbar-item-txt'>{$t('21544271.ae336c')}</Text>
|
||||
</View>
|
||||
</SpLogin>
|
||||
|
||||
@@ -6,6 +6,6 @@ export default {
|
||||
usingComponents: {
|
||||
//'cell': 'plugin://contactPlugin/cell'
|
||||
},
|
||||
navigationBarTitleText: '商品列表',
|
||||
navigationBarTitleText: '商品列表'
|
||||
// navigationStyle: 'custom'
|
||||
}
|
||||
|
||||
@@ -19,12 +19,7 @@ import { buildSharePath, getMemberLevel } from '@/utils'
|
||||
import { SpLogin, SpImage, SpTabbar, SpPage, SpPoweredBy } from '@/components'
|
||||
import api from '@/api'
|
||||
import * as communityApi from '@/api/community'
|
||||
import {
|
||||
log,
|
||||
VERSION_PLATFORM,
|
||||
VERSION_STANDARD,
|
||||
getDistributorId
|
||||
} from '@/utils'
|
||||
import { log, VERSION_PLATFORM, VERSION_STANDARD, getDistributorId } from '@/utils'
|
||||
import {
|
||||
updatePurchaseShareInfo,
|
||||
updateInviteCode,
|
||||
|
||||
@@ -170,7 +170,7 @@ const Login = () => {
|
||||
|
||||
return (
|
||||
<SpPage className={classNames('page-merchant-login')} navbar={false}>
|
||||
<SpImage src='shangjiaruzhu_bg.png' className='login-bg' mode='widthFix'/>
|
||||
<SpImage src='shangjiaruzhu_bg.png' className='login-bg' mode='widthFix' />
|
||||
<View className='page-merchant-login-content'>
|
||||
<MInput
|
||||
prefix={phonePrefix}
|
||||
|
||||
@@ -2,5 +2,4 @@
|
||||
* Copyright © ShopeX (http://www.shopex.cn). All rights reserved.
|
||||
* See LICENSE file for license details.
|
||||
*/
|
||||
export default {
|
||||
}
|
||||
export default {}
|
||||
|
||||
@@ -28,11 +28,7 @@ const initialState = {
|
||||
function getActivityPhase(item) {
|
||||
let begin = Number(item.beginTs)
|
||||
let end = Number(item.endTs)
|
||||
const tsMissing =
|
||||
!begin ||
|
||||
!end ||
|
||||
Number.isNaN(begin) ||
|
||||
Number.isNaN(end)
|
||||
const tsMissing = !begin || !end || Number.isNaN(begin) || Number.isNaN(end)
|
||||
if (tsMissing && item.employeeBeginTime && item.employeeEndTime) {
|
||||
begin = dayjs(item.employeeBeginTime).valueOf()
|
||||
end = dayjs(item.employeeEndTime).valueOf()
|
||||
@@ -80,7 +76,6 @@ function PurchaseActivityList() {
|
||||
}
|
||||
|
||||
const fetch = async ({ pageIndex, pageSize }) => {
|
||||
|
||||
if (pageIndex === 1) {
|
||||
if (VERSION_IN_PURCHASE) {
|
||||
const data = await api.purchase.getUserEnterprises({
|
||||
@@ -176,7 +171,8 @@ function PurchaseActivityList() {
|
||||
})
|
||||
)
|
||||
let url = ''
|
||||
if (isPassphraseEnabled) { //是否开启口令通道
|
||||
if (isPassphraseEnabled) {
|
||||
//是否开启口令通道
|
||||
dispatch(updateIsPasscodeLogin(true))
|
||||
if (passphraseUserVerified == 1) {
|
||||
url = `/subpages/purchase/index?activity_id=${id}&enterprise_id=${enterpriseId}&pages_template_id=${pages_template_id}`
|
||||
@@ -223,13 +219,16 @@ function PurchaseActivityList() {
|
||||
}
|
||||
|
||||
if (is_redirt == 1) {
|
||||
return <SpPage loading title={$t('c2581d4c.6fb7d0')}
|
||||
pageConfig={{ navigateBackgroundColor: '#ffffff' }}
|
||||
renderNavigation={(navProps) => <CompPurchaseNav {...navProps} />}
|
||||
/>
|
||||
return (
|
||||
<SpPage
|
||||
loading
|
||||
title={$t('c2581d4c.6fb7d0')}
|
||||
pageConfig={{ navigateBackgroundColor: '#ffffff' }}
|
||||
renderNavigation={(navProps) => <CompPurchaseNav {...navProps} />}
|
||||
/>
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
return (
|
||||
<SpPage
|
||||
className='page-purchase-index page-purchase-activitylist'
|
||||
@@ -255,20 +254,23 @@ function PurchaseActivityList() {
|
||||
phase === 'upcoming'
|
||||
? $t('e32a7439.b73c8a')
|
||||
: phase === 'ended'
|
||||
? $t('e32a7439.047fab')
|
||||
: $t('da5ae518.fb852f')
|
||||
? $t('e32a7439.047fab')
|
||||
: $t('da5ae518.fb852f')
|
||||
const btnText =
|
||||
phase === 'upcoming'
|
||||
? $t('e32a7439.e82c9f')
|
||||
: phase === 'ended'
|
||||
? $t('e32a7439.047fab')
|
||||
: $t('e32a7439.a61d4e')
|
||||
? $t('e32a7439.047fab')
|
||||
: $t('e32a7439.a61d4e')
|
||||
return (
|
||||
<View key={item.id} className='activity-card'>
|
||||
<View className='activity-card__cover'>
|
||||
<SpImage className='activity-card__img' mode='aspectFill' src={item.pic} />
|
||||
<View
|
||||
className={classNames('activity-card__badge', `activity-card__badge--${phase}`)}
|
||||
className={classNames(
|
||||
'activity-card__badge',
|
||||
`activity-card__badge--${phase}`
|
||||
)}
|
||||
>
|
||||
<Text>{badgeText}</Text>
|
||||
</View>
|
||||
|
||||
@@ -23,9 +23,7 @@ import './comp-purchase-actionbar.scss'
|
||||
function formatRemainingYuan(activityData) {
|
||||
if (!activityData) return '¥0.00'
|
||||
const cents =
|
||||
activityData.surplus_limitfee ??
|
||||
activityData.left_fee ??
|
||||
activityData?.fee?.left_fee
|
||||
activityData.surplus_limitfee ?? activityData.left_fee ?? activityData?.fee?.left_fee
|
||||
if (cents == null || cents === '') return '¥0.00'
|
||||
const n = Number(cents) / 100
|
||||
if (Number.isNaN(n)) return '¥0.00'
|
||||
@@ -61,7 +59,8 @@ function CompPurchaseActionbar(props) {
|
||||
curEnterpriseId
|
||||
|
||||
/** 未传 remainingAmount 时由组件内接口数据展示额度;活动数据始终在有活动/企业上下文时拉取,用于剩余额度与是否展示「分享亲友」 */
|
||||
const useRemoteQuota = remainingAmountFromParent === undefined || remainingAmountFromParent === null
|
||||
const useRemoteQuota =
|
||||
remainingAmountFromParent === undefined || remainingAmountFromParent === null
|
||||
|
||||
const [fetchedActivity, setFetchedActivity] = useState(null)
|
||||
|
||||
@@ -155,7 +154,11 @@ function CompPurchaseActionbar(props) {
|
||||
{!hideCart && (
|
||||
<View className='comp-purchase-actionbar__square' onClick={handleCart}>
|
||||
<View className='comp-purchase-actionbar__icon-wrap'>
|
||||
<SpImage src='purchasecar.png' className='comp-purchase-actionbar__icon' mode='aspectFill' />
|
||||
<SpImage
|
||||
src='purchasecar.png'
|
||||
className='comp-purchase-actionbar__icon'
|
||||
mode='aspectFill'
|
||||
/>
|
||||
{cartCount > 0 && (
|
||||
<Text className='comp-purchase-actionbar__badge'>
|
||||
{cartCount > 99 ? '99+' : cartCount}
|
||||
@@ -169,7 +172,11 @@ function CompPurchaseActionbar(props) {
|
||||
{canShowShareFriend && (
|
||||
<View className='comp-purchase-actionbar__square' onClick={handleShare}>
|
||||
<View className='comp-purchase-actionbar__share-icon'>
|
||||
<SpImage src='purcharefriend.png' className='comp-purchase-actionbar__icon' mode='aspectFill' />
|
||||
<SpImage
|
||||
src='purcharefriend.png'
|
||||
className='comp-purchase-actionbar__icon'
|
||||
mode='aspectFill'
|
||||
/>
|
||||
</View>
|
||||
<Text className='comp-purchase-actionbar__label'>{$t('f367f1ff.83d472')}</Text>
|
||||
</View>
|
||||
@@ -180,7 +187,11 @@ function CompPurchaseActionbar(props) {
|
||||
<Text className='comp-purchase-actionbar__quota-hint'>{displayRemainingLabel}</Text>
|
||||
<Text className='comp-purchase-actionbar__quota-amount'>{displayRemainingAmount}</Text>
|
||||
</View>
|
||||
<SpImage src='purchase_right.png' className='comp-purchase-actionbar__chevron' mode='aspectFill' />
|
||||
<SpImage
|
||||
src='purchase_right.png'
|
||||
className='comp-purchase-actionbar__chevron'
|
||||
mode='aspectFill'
|
||||
/>
|
||||
</View>
|
||||
</View>
|
||||
</View>
|
||||
|
||||
@@ -66,14 +66,17 @@ function CompPurchaseQuotaSheet(props) {
|
||||
return undefined
|
||||
}, [open])
|
||||
|
||||
useEffect(() => () => {
|
||||
if (openTimerRef.current) {
|
||||
clearTimeout(openTimerRef.current)
|
||||
}
|
||||
if (closeTimerRef.current) {
|
||||
clearTimeout(closeTimerRef.current)
|
||||
}
|
||||
}, [])
|
||||
useEffect(
|
||||
() => () => {
|
||||
if (openTimerRef.current) {
|
||||
clearTimeout(openTimerRef.current)
|
||||
}
|
||||
if (closeTimerRef.current) {
|
||||
clearTimeout(closeTimerRef.current)
|
||||
}
|
||||
},
|
||||
[]
|
||||
)
|
||||
|
||||
if (!shouldRender) {
|
||||
return null
|
||||
@@ -84,13 +87,18 @@ function CompPurchaseQuotaSheet(props) {
|
||||
const remainingText = formatQuotaYuan(remainingFeeCents)
|
||||
|
||||
return (
|
||||
<View className={classNames('comp-purchase-quota-sheet', { 'is-active': isActive }, className)} catchMove>
|
||||
<View
|
||||
className={classNames('comp-purchase-quota-sheet', { 'is-active': isActive }, className)}
|
||||
catchMove
|
||||
>
|
||||
<View className='comp-purchase-quota-sheet__mask' onClick={onClose} />
|
||||
<View className='comp-purchase-quota-sheet__panel' catchMove>
|
||||
<View className='comp-purchase-quota-sheet__grabber' />
|
||||
<View className='comp-purchase-quota-sheet__head'>
|
||||
<Text className='comp-purchase-quota-sheet__title'>{$t('d64ed906.167e4d')}</Text>
|
||||
<Text className='comp-purchase-quota-sheet__close-icon' onClick={onClose}>×</Text>
|
||||
<Text className='comp-purchase-quota-sheet__close-icon' onClick={onClose}>
|
||||
×
|
||||
</Text>
|
||||
</View>
|
||||
<View className='comp-purchase-quota-sheet__cols'>
|
||||
<View className='comp-purchase-quota-sheet__col'>
|
||||
|
||||
@@ -358,9 +358,7 @@ function PurchaseSkuSelect(props) {
|
||||
<Text className='sp-sku-select-espier__limit-left'>
|
||||
{limitQty != null ? ti('47ac6066.f7a2b1', [limitQty]) : ''}
|
||||
</Text>
|
||||
<Text className='sp-sku-select-espier__limit-right'>
|
||||
{amountLine || ''}
|
||||
</Text>
|
||||
<Text className='sp-sku-select-espier__limit-right'>{amountLine || ''}</Text>
|
||||
</View>
|
||||
)}
|
||||
<View className='sp-sku-select-espier__bar'>
|
||||
|
||||
@@ -445,9 +445,7 @@ function SpPurchaseDeliver(props, ref) {
|
||||
</View>
|
||||
</View>
|
||||
{/** 普通快递 */}
|
||||
{receiptType === 'logistics' && (
|
||||
<AddressChoose isAddress={address} isPurchase />
|
||||
)}
|
||||
{receiptType === 'logistics' && <AddressChoose isAddress={address} isPurchase />}
|
||||
{/** 自提 */}
|
||||
{receiptType === 'ziti' && (
|
||||
<View className='address-module'>
|
||||
|
||||
@@ -133,9 +133,7 @@ function PurchaseCheckout(props) {
|
||||
|
||||
useEffect(() => {
|
||||
const eid =
|
||||
curEnterpriseId ||
|
||||
router?.params?.enterprise_id ||
|
||||
purchase_share_info?.enterprise_id
|
||||
curEnterpriseId || router?.params?.enterprise_id || purchase_share_info?.enterprise_id
|
||||
if (!eid) {
|
||||
setEnterpriseName('')
|
||||
return
|
||||
@@ -645,7 +643,11 @@ function PurchaseCheckout(props) {
|
||||
</Text>
|
||||
<View className='page-espier-checkout__toolbar-total'>
|
||||
<Text className='page-espier-checkout__toolbar-label'>{$t('f9ef9536.7b2864')}</Text>
|
||||
<SpPrice unit='cent' className='page-espier-checkout__toolbar-price' value={totalInfo.total_fee} />
|
||||
<SpPrice
|
||||
unit='cent'
|
||||
className='page-espier-checkout__toolbar-price'
|
||||
value={totalInfo.total_fee}
|
||||
/>
|
||||
</View>
|
||||
</View>
|
||||
<View
|
||||
@@ -760,7 +762,10 @@ function PurchaseCheckout(props) {
|
||||
</View>
|
||||
|
||||
{!bargain_id && (
|
||||
<View className='page-espier-checkout__card page-espier-checkout__pay' onClick={handlePaymentShow}>
|
||||
<View
|
||||
className='page-espier-checkout__card page-espier-checkout__pay'
|
||||
onClick={handlePaymentShow}
|
||||
>
|
||||
<View className='page-espier-checkout__pay-row'>
|
||||
<Text className='page-espier-checkout__card-title page-espier-checkout__pay-title'>
|
||||
{$t('250b375e.0c9d2b')}
|
||||
@@ -796,20 +801,34 @@ function PurchaseCheckout(props) {
|
||||
</View>
|
||||
<View className='page-espier-checkout__order-row'>
|
||||
<Text className='page-espier-checkout__order-k'>{$t('b1a8838b.5fd62d')}</Text>
|
||||
<SpPrice unit='cent' className='page-espier-checkout__order-v' value={totalInfo.item_fee_new} />
|
||||
<SpPrice
|
||||
unit='cent'
|
||||
className='page-espier-checkout__order-v'
|
||||
value={totalInfo.item_fee_new}
|
||||
/>
|
||||
</View>
|
||||
<View className='page-espier-checkout__order-row'>
|
||||
<Text className='page-espier-checkout__order-k'>{$t('a0f401f3.5b921a')}</Text>
|
||||
<SpPrice unit='cent' className='page-espier-checkout__order-v' value={totalInfo.discount_fee} />
|
||||
<SpPrice
|
||||
unit='cent'
|
||||
className='page-espier-checkout__order-v'
|
||||
value={totalInfo.discount_fee}
|
||||
/>
|
||||
</View>
|
||||
<View className='page-espier-checkout__order-row'>
|
||||
<Text className='page-espier-checkout__order-k'>{$t('250b375e.9a935b')}</Text>
|
||||
<SpPrice unit='cent' className='page-espier-checkout__order-v' value={totalInfo.freight_fee} />
|
||||
<SpPrice
|
||||
unit='cent'
|
||||
className='page-espier-checkout__order-v'
|
||||
value={totalInfo.freight_fee}
|
||||
/>
|
||||
</View>
|
||||
{(VERSION_STANDARD || VERSION_B2C || (VERSION_PLATFORM && dtid == 0)) &&
|
||||
pointInfo?.is_open_deduct_point && (
|
||||
<View className='page-espier-checkout__order-row'>
|
||||
<Text className='page-espier-checkout__order-k'>{ti('edc703ce.74dcf4', [pointName])}</Text>
|
||||
<Text className='page-espier-checkout__order-k'>
|
||||
{ti('edc703ce.74dcf4', [pointName])}
|
||||
</Text>
|
||||
<SpPrice
|
||||
unit='cent'
|
||||
primary
|
||||
|
||||
@@ -94,8 +94,8 @@ function enrichEspierPurchaseDetail(mapped, raw) {
|
||||
Array.isArray(mapped.itemParams) && mapped.itemParams.length > 0
|
||||
? mapped.itemParams
|
||||
: Array.isArray(rawItemParams)
|
||||
? rawItemParams
|
||||
: mapped.itemParams
|
||||
? rawItemParams
|
||||
: mapped.itemParams
|
||||
return {
|
||||
...mapped,
|
||||
activityInfo,
|
||||
@@ -186,9 +186,11 @@ function EspierDetail(props) {
|
||||
const pageRef = useRef()
|
||||
const { userInfo, address } = useSelector((state) => state.user)
|
||||
const { colorPrimary, openRecommend } = useSelector((state) => state.sys)
|
||||
const { purchase_share_info = {}, curDistributorId, curEnterpriseId } = useSelector(
|
||||
(state) => state.purchase
|
||||
)
|
||||
const {
|
||||
purchase_share_info = {},
|
||||
curDistributorId,
|
||||
curEnterpriseId
|
||||
} = useSelector((state) => state.purchase)
|
||||
const { setNavigationBarTitle } = useNavigation()
|
||||
|
||||
const [enterpriseName, setEnterpriseName] = useState('')
|
||||
@@ -760,11 +762,7 @@ function EspierDetail(props) {
|
||||
)}
|
||||
|
||||
{info && displayItemParams.length > 0 && (
|
||||
<AtFloatLayout
|
||||
isOpened={isParameter}
|
||||
title='商品参数'
|
||||
onClose={handleGoodsParamsFlatClose}
|
||||
>
|
||||
<AtFloatLayout isOpened={isParameter} title='商品参数' onClose={handleGoodsParamsFlatClose}>
|
||||
<View className='product-parameter'>
|
||||
<View className='product-parameter-all'>
|
||||
{displayItemParams.map((item, index) => (
|
||||
|
||||
@@ -173,9 +173,7 @@ function CartIndex() {
|
||||
|
||||
const remainingAmountText = useMemo(() => {
|
||||
const cents =
|
||||
activityInfo?.surplus_limitfee ??
|
||||
activityInfo?.left_fee ??
|
||||
activityInfo?.fee?.left_fee
|
||||
activityInfo?.surplus_limitfee ?? activityInfo?.left_fee ?? activityInfo?.fee?.left_fee
|
||||
if (cents == null || cents === '') return '¥0.00'
|
||||
const n = Number(cents) / 100
|
||||
if (Number.isNaN(n)) return '¥0.00'
|
||||
@@ -187,9 +185,7 @@ function CartIndex() {
|
||||
total: activityInfo?.total_limitfee ?? activityInfo?.limit_fee,
|
||||
used: activityInfo?.used_limitfee ?? activityInfo?.aggregate_fee,
|
||||
remaining:
|
||||
activityInfo?.surplus_limitfee ??
|
||||
activityInfo?.left_fee ??
|
||||
activityInfo?.fee?.left_fee
|
||||
activityInfo?.surplus_limitfee ?? activityInfo?.left_fee ?? activityInfo?.fee?.left_fee
|
||||
}),
|
||||
[activityInfo]
|
||||
)
|
||||
@@ -250,9 +246,7 @@ function CartIndex() {
|
||||
const resolveActiveGroup = () => {
|
||||
const groupsList = validCart.map((item) => {
|
||||
// used_activity:满减 activity_grouping:满减&满折 gift_activity:满赠 plus_buy_activity:加价购
|
||||
const {
|
||||
list,
|
||||
plus_buy_activity = [] } = item
|
||||
const { list, plus_buy_activity = [] } = item
|
||||
// 加购价
|
||||
let all_plus_itemid_list = [] // 加价购商品id
|
||||
let no_active_item = [] // 没有活动的商品
|
||||
|
||||
@@ -3,20 +3,10 @@
|
||||
* See LICENSE file for license details.
|
||||
*/
|
||||
import React, { useEffect, useState, useCallback, useMemo, useRef } from 'react'
|
||||
import Taro, {
|
||||
useDidShow,
|
||||
useRouter,
|
||||
useShareAppMessage
|
||||
} from '@tarojs/taro'
|
||||
import Taro, { useDidShow, useRouter, useShareAppMessage } from '@tarojs/taro'
|
||||
import { View, ScrollView, Button } from '@tarojs/components'
|
||||
import { useSelector, useDispatch } from 'react-redux'
|
||||
import {
|
||||
SpPage,
|
||||
SpPrivacyModal,
|
||||
SpPoster,
|
||||
SpImage,
|
||||
SpPurchaseEnterpriseBar
|
||||
} from '@/components'
|
||||
import { SpPage, SpPrivacyModal, SpPoster, SpImage, SpPurchaseEnterpriseBar } from '@/components'
|
||||
import { SharePurchase } from '@/subpages/components'
|
||||
import api from '@/api'
|
||||
import {
|
||||
@@ -30,10 +20,7 @@ import {
|
||||
buildSharePath,
|
||||
navigateTo
|
||||
} from '@/utils'
|
||||
import {
|
||||
updatePurchaseShareInfo,
|
||||
updatePersistPurchaseShareInfo
|
||||
} from '@/store/slices/purchase'
|
||||
import { updatePurchaseShareInfo, updatePersistPurchaseShareInfo } from '@/store/slices/purchase'
|
||||
import doc from '@/doc'
|
||||
import { useImmer } from 'use-immer'
|
||||
import { useLogin, useNavigation } from '@/hooks'
|
||||
@@ -106,9 +93,7 @@ function Home() {
|
||||
|
||||
const remainingAmountText = useMemo(() => {
|
||||
const cents =
|
||||
activityInfo?.surplus_limitfee ??
|
||||
activityInfo?.left_fee ??
|
||||
activityInfo?.fee?.left_fee
|
||||
activityInfo?.surplus_limitfee ?? activityInfo?.left_fee ?? activityInfo?.fee?.left_fee
|
||||
if (cents == null || cents === '') {
|
||||
return '¥0.00'
|
||||
}
|
||||
@@ -125,9 +110,7 @@ function Home() {
|
||||
total: activityInfo?.total_limitfee ?? activityInfo?.limit_fee,
|
||||
used: activityInfo?.used_limitfee ?? activityInfo?.aggregate_fee,
|
||||
remaining:
|
||||
activityInfo?.surplus_limitfee ??
|
||||
activityInfo?.left_fee ??
|
||||
activityInfo?.fee?.left_fee
|
||||
activityInfo?.surplus_limitfee ?? activityInfo?.left_fee ?? activityInfo?.fee?.left_fee
|
||||
}),
|
||||
[activityInfo]
|
||||
)
|
||||
@@ -153,7 +136,6 @@ function Home() {
|
||||
}
|
||||
}, [initState])
|
||||
|
||||
|
||||
useEffect(() => {
|
||||
if (skuPanelOpen) {
|
||||
pageRef.current.pageLock()
|
||||
@@ -263,7 +245,9 @@ function Home() {
|
||||
}
|
||||
|
||||
const res = await api.purchase.getPurchaseStoreHomePage(pages_template_id)
|
||||
const config = Array.isArray(res?.page_template_detail?.config) ? res?.page_template_detail?.config : []
|
||||
const config = Array.isArray(res?.page_template_detail?.config)
|
||||
? res?.page_template_detail?.config
|
||||
: []
|
||||
setState((draft) => {
|
||||
draft.wgts = Array.isArray(config) ? config : []
|
||||
draft.loading = false
|
||||
@@ -325,7 +309,6 @@ function Home() {
|
||||
})
|
||||
})
|
||||
|
||||
|
||||
const handleConfirmModal = useCallback(async () => {
|
||||
setPolicyModal(false)
|
||||
}, [])
|
||||
@@ -334,9 +317,7 @@ function Home() {
|
||||
let filterWgts = wgts.filter((wgt) => wgt.name != 'page' && wgt.name !== 'search')
|
||||
|
||||
const isShowHomeHeader =
|
||||
VERSION_PLATFORM ||
|
||||
(openScanQrcode == 1 && isWeixin) ||
|
||||
(VERSION_STANDARD && entryStoreByLBS)
|
||||
VERSION_PLATFORM || (openScanQrcode == 1 && isWeixin) || (VERSION_STANDARD && entryStoreByLBS)
|
||||
|
||||
const onAddToCart = async ({ itemId, distributorId }) => {
|
||||
Taro.showLoading()
|
||||
|
||||
@@ -8,7 +8,14 @@ import Taro, { getCurrentInstance, useDidShow, useRouter } from '@tarojs/taro'
|
||||
import { useSelector, useDispatch } from 'react-redux'
|
||||
import { useImmer } from 'use-immer'
|
||||
import { AtDrawer, AtTabs } from 'taro-ui'
|
||||
import { SpGoodsItem, SpSearchBar, SpPage, SpScrollView, SpSelect, SpPurchaseEnterpriseBar } from '@/components'
|
||||
import {
|
||||
SpGoodsItem,
|
||||
SpSearchBar,
|
||||
SpPage,
|
||||
SpScrollView,
|
||||
SpSelect,
|
||||
SpPurchaseEnterpriseBar
|
||||
} from '@/components'
|
||||
import { SpFilterBar, SpTagBar, SpDrawer } from '@/subpages/components'
|
||||
import { fetchUserFavs } from '@/store/slices/user'
|
||||
import doc from '@/doc'
|
||||
@@ -71,8 +78,12 @@ function ItemList() {
|
||||
const router = useRouter()
|
||||
const { cat_id, main_cat_id, tag_id, card_id, user_card_id } = routerParams || {}
|
||||
const { shopInfo } = useSelector((state) => state.shop)
|
||||
const { purchase_share_info = {}, curDistributorId, curEnterpriseId, cartCount = 0 } =
|
||||
useSelector((state) => state.purchase)
|
||||
const {
|
||||
purchase_share_info = {},
|
||||
curDistributorId,
|
||||
curEnterpriseId,
|
||||
cartCount = 0
|
||||
} = useSelector((state) => state.purchase)
|
||||
const dispatch = useDispatch()
|
||||
|
||||
const filterList = useMemo(
|
||||
@@ -122,9 +133,7 @@ function ItemList() {
|
||||
|
||||
useEffect(() => {
|
||||
const eid =
|
||||
curEnterpriseId ||
|
||||
router?.params?.enterprise_id ||
|
||||
purchase_share_info?.enterprise_id
|
||||
curEnterpriseId || router?.params?.enterprise_id || purchase_share_info?.enterprise_id
|
||||
if (!eid) {
|
||||
setEnterpriseName('')
|
||||
return
|
||||
@@ -387,7 +396,7 @@ function ItemList() {
|
||||
'has-tagbar': tagList.length > 0,
|
||||
'page-item-list--with-store': VERSION_STANDARD && !!card_id
|
||||
})}
|
||||
onReady={({gNavbarH})=>{
|
||||
onReady={({ gNavbarH }) => {
|
||||
setState((draft) => {
|
||||
draft.navH = gNavbarH
|
||||
})
|
||||
@@ -407,10 +416,7 @@ function ItemList() {
|
||||
<Text className='iconfont icon-qianwang-01'></Text>
|
||||
</View>
|
||||
)}
|
||||
<SpPurchaseEnterpriseBar
|
||||
name={enterpriseName}
|
||||
showSearch={false}
|
||||
/>
|
||||
<SpPurchaseEnterpriseBar name={enterpriseName} showSearch={false} />
|
||||
<View className='purchase-list-top-fixed__search'>
|
||||
<SpSearchBar
|
||||
keyword={keywords}
|
||||
|
||||
@@ -94,7 +94,9 @@ function PurchaseAuthAccount() {
|
||||
dispatch(updateEnterpriseId(_params.enterprise_id))
|
||||
setTimeout(() => {
|
||||
Taro.reLaunch({
|
||||
url: `/subpages/purchase/index?activity_id=${activity_id || ''}&enterprise_id=${_params.enterprise_id || enterprise_id || ''}&pages_template_id=${pages_template_id || ''}`
|
||||
url: `/subpages/purchase/index?activity_id=${activity_id || ''}&enterprise_id=${
|
||||
_params.enterprise_id || enterprise_id || ''
|
||||
}&pages_template_id=${pages_template_id || ''}`
|
||||
})
|
||||
}, 700)
|
||||
} catch (e) {
|
||||
@@ -109,7 +111,9 @@ function PurchaseAuthAccount() {
|
||||
contentAlign: 'center'
|
||||
})
|
||||
Taro.reLaunch({
|
||||
url: `/subpages/purchase/index?activity_id=${activity_id || ''}&enterprise_id=${_params.enterprise_id || enterprise_id || ''}&pages_template_id=${pages_template_id || ''}`
|
||||
url: `/subpages/purchase/index?activity_id=${activity_id || ''}&enterprise_id=${
|
||||
_params.enterprise_id || enterprise_id || ''
|
||||
}&pages_template_id=${pages_template_id || ''}`
|
||||
})
|
||||
} else {
|
||||
showToast(e.message)
|
||||
@@ -137,13 +141,14 @@ function PurchaseAuthAccount() {
|
||||
|
||||
return (
|
||||
<SpPage className='purchase-account-auth'>
|
||||
<SpImage src={curEnterpriseLogo} className='purchase-account-auth__cover-img' mode='widthFix' />
|
||||
|
||||
<SpPurchaseEnterpriseBar
|
||||
showMore={false}
|
||||
showSearch={false}
|
||||
<SpImage
|
||||
src={curEnterpriseLogo}
|
||||
className='purchase-account-auth__cover-img'
|
||||
mode='widthFix'
|
||||
/>
|
||||
|
||||
<SpPurchaseEnterpriseBar showMore={false} showSearch={false} />
|
||||
|
||||
<View className='purchase-account-auth__form-wrap'>
|
||||
<View className='purchase-account-auth__form-card'>
|
||||
<Text className='purchase-account-auth__form-title'>{$t('cedd18d3.5f934d')}</Text>
|
||||
|
||||
@@ -34,7 +34,13 @@ function PurchaseAuthEmail() {
|
||||
const dispatch = useDispatch()
|
||||
const { params } = useRouter()
|
||||
const { appName } = useSelector((state) => state.sys)
|
||||
const { enterprise_id, enterprise_name, activity_id, is_activity = '', pages_template_id = '' } = params
|
||||
const {
|
||||
enterprise_id,
|
||||
enterprise_name,
|
||||
activity_id,
|
||||
is_activity = '',
|
||||
pages_template_id = ''
|
||||
} = params
|
||||
|
||||
const disabled = useMemo(() => !email.trim() || !vcode.trim(), [email, vcode])
|
||||
const sendDisabled = countdown > 0
|
||||
@@ -185,7 +191,9 @@ function PurchaseAuthEmail() {
|
||||
|
||||
setTimeout(() => {
|
||||
Taro.reLaunch({
|
||||
url: `/subpages/purchase/index?activity_id=${activity_id || ''}&enterprise_id=${authParams.enterprise_id || enterprise_id || ''}&pages_template_id=${pages_template_id || ''}`
|
||||
url: `/subpages/purchase/index?activity_id=${activity_id || ''}&enterprise_id=${
|
||||
authParams.enterprise_id || enterprise_id || ''
|
||||
}&pages_template_id=${pages_template_id || ''}`
|
||||
})
|
||||
}, 700)
|
||||
} catch (e) {
|
||||
@@ -200,7 +208,9 @@ function PurchaseAuthEmail() {
|
||||
contentAlign: 'center'
|
||||
})
|
||||
Taro.reLaunch({
|
||||
url: `/subpages/purchase/index?activity_id=${activity_id || ''}&enterprise_id=${authParams.enterprise_id || enterprise_id || ''}&pages_template_id=${pages_template_id || ''}`
|
||||
url: `/subpages/purchase/index?activity_id=${activity_id || ''}&enterprise_id=${
|
||||
authParams.enterprise_id || enterprise_id || ''
|
||||
}&pages_template_id=${pages_template_id || ''}`
|
||||
})
|
||||
} else {
|
||||
showToast(e.message)
|
||||
|
||||
@@ -55,8 +55,6 @@ function PurchasePasscodeAuth() {
|
||||
setPassSheetVisible(true)
|
||||
}, [inviteFromRoute])
|
||||
|
||||
|
||||
|
||||
useEffect(() => {
|
||||
fetchActivity()
|
||||
dispatch(updateEnterpriseId(enterprise_id))
|
||||
@@ -76,7 +74,9 @@ function PurchasePasscodeAuth() {
|
||||
//passphrase_user_verified 0 | 1 当前登录用户是否已在「该活动 + 该企业」下口令校验成功(服务端 Redis 标记)。未开口令或未登录恒为 0。
|
||||
let passphrase_user_verified = data?.passphrase_user_verified || 0
|
||||
if (passphrase_user_verified == 1) {
|
||||
let url = `/subpages/purchase/index?activity_id=${activity_id || ''}&enterprise_id=${enterprise_id || ''}&pages_template_id=${pages_template_id || ''}`
|
||||
let url = `/subpages/purchase/index?activity_id=${activity_id || ''}&enterprise_id=${
|
||||
enterprise_id || ''
|
||||
}&pages_template_id=${pages_template_id || ''}`
|
||||
Taro.reLaunch({ url })
|
||||
return
|
||||
}
|
||||
@@ -132,20 +132,26 @@ function PurchasePasscodeAuth() {
|
||||
S?.set(INVITE_ACTIVITY_ID, activity_id, true)
|
||||
}
|
||||
|
||||
let url = `/subpages/purchase/index?activity_id=${activity_id || ''}&enterprise_id=${enterprise_id || ''}&pages_template_id=${pages_template_id || ''}`
|
||||
let url = `/subpages/purchase/index?activity_id=${activity_id || ''}&enterprise_id=${
|
||||
enterprise_id || ''
|
||||
}&pages_template_id=${pages_template_id || ''}`
|
||||
Taro.reLaunch({ url })
|
||||
}
|
||||
if (loading) {
|
||||
return <SpPage className='passcode-login-page'>
|
||||
<SpLoading />
|
||||
</SpPage>
|
||||
return (
|
||||
<SpPage className='passcode-login-page'>
|
||||
<SpLoading />
|
||||
</SpPage>
|
||||
)
|
||||
}
|
||||
|
||||
return (
|
||||
<SpPage className='passcode-login-page'>
|
||||
<View
|
||||
className='passcode-login-page__poster'
|
||||
style={curActivityInfo?.pic ? { backgroundImage: `url(${curActivityInfo?.pic})` } : undefined}
|
||||
style={
|
||||
curActivityInfo?.pic ? { backgroundImage: `url(${curActivityInfo?.pic})` } : undefined
|
||||
}
|
||||
/>
|
||||
|
||||
<View className='passcode-login-page__landing'>
|
||||
@@ -189,7 +195,9 @@ function PurchasePasscodeAuth() {
|
||||
})}
|
||||
onClick={handleSubmit}
|
||||
>
|
||||
<Text className='purchase-passcode__sheet-confirm-text'>{$t('c2581d4c.e83a25')}</Text>
|
||||
<Text className='purchase-passcode__sheet-confirm-text'>
|
||||
{$t('c2581d4c.e83a25')}
|
||||
</Text>
|
||||
</View>
|
||||
</View>
|
||||
</View>
|
||||
|
||||
@@ -108,7 +108,9 @@ function PurchaseAuthPhone(props) {
|
||||
showToast($t('ace75665.45001d'))
|
||||
setTimeout(() => {
|
||||
Taro.reLaunch({
|
||||
url: `/subpages/purchase/index?activity_id=${activity_id || ''}&enterprise_id=${_params.enterprise_id || enterprise_id || ''}&pages_template_id=${pages_template_id || ''}`
|
||||
url: `/subpages/purchase/index?activity_id=${activity_id || ''}&enterprise_id=${
|
||||
_params.enterprise_id || enterprise_id || ''
|
||||
}&pages_template_id=${pages_template_id || ''}`
|
||||
})
|
||||
}, 2000)
|
||||
} catch (e) {
|
||||
@@ -125,7 +127,9 @@ function PurchaseAuthPhone(props) {
|
||||
contentAlign: 'center'
|
||||
})
|
||||
Taro.reLaunch({
|
||||
url: `/subpages/purchase/index?activity_id=${activity_id || ''}&enterprise_id=${_params.enterprise_id || enterprise_id || ''}&pages_template_id=${pages_template_id || ''}`
|
||||
url: `/subpages/purchase/index?activity_id=${activity_id || ''}&enterprise_id=${
|
||||
_params.enterprise_id || enterprise_id || ''
|
||||
}&pages_template_id=${pages_template_id || ''}`
|
||||
})
|
||||
getLoginCode()
|
||||
}
|
||||
@@ -140,22 +144,21 @@ function PurchaseAuthPhone(props) {
|
||||
|
||||
return (
|
||||
<SpPage className='purchase-phone-auth'>
|
||||
<SpImage src={curEnterpriseLogo} className='purchase-phone-auth__cover-img' mode='aspectFill' />
|
||||
<SpImage
|
||||
src={curEnterpriseLogo}
|
||||
className='purchase-phone-auth__cover-img'
|
||||
mode='aspectFill'
|
||||
/>
|
||||
<SpPurchaseEnterpriseBar showMore={false} showSearch={false} />
|
||||
|
||||
<View className='purchase-phone-auth__form-wrap'>
|
||||
<View className='purchase-phone-auth__form-card'>
|
||||
<Text className='purchase-phone-auth__form-title'>{$t('cedd18d3.5f934d')}</Text>
|
||||
<View className='purchase-phone-auth__field'>
|
||||
<Text className='purchase-phone-auth__hint'>
|
||||
{$t('d0a93b87.4715ea')}
|
||||
</Text>
|
||||
<Text className='purchase-phone-auth__hint'>{$t('d0a93b87.4715ea')}</Text>
|
||||
</View>
|
||||
<View className='purchase-phone-auth__footer'>
|
||||
<Button
|
||||
className='purchase-phone-auth__confirm'
|
||||
onClick={handleBindPhone}
|
||||
>
|
||||
<Button className='purchase-phone-auth__confirm' onClick={handleBindPhone}>
|
||||
<Text className='purchase-phone-auth__confirm-text'>{$t('d0a93b87.a2ac7f')}</Text>
|
||||
</Button>
|
||||
</View>
|
||||
|
||||
@@ -5,5 +5,5 @@
|
||||
export default {
|
||||
navigationBarBackgroundColor: '#fff',
|
||||
navigationBarTitleText: '企业购',
|
||||
navigationStyle: 'custom',
|
||||
navigationStyle: 'custom'
|
||||
}
|
||||
|
||||
@@ -155,9 +155,7 @@ export default class PurchaseIndex extends Component {
|
||||
const { purchase_share_info } = this.props
|
||||
|
||||
const canShareNum = Math.max(0, (info.invite_limit || 0) - (info.invited_num || 0))
|
||||
const activityStartTs = info?.relative_begin_time
|
||||
? info.relative_begin_time * 1000
|
||||
: null
|
||||
const activityStartTs = info?.relative_begin_time ? info.relative_begin_time * 1000 : null
|
||||
|
||||
return (
|
||||
<SpPage
|
||||
|
||||
@@ -336,9 +336,7 @@ function NearlyShop(props) {
|
||||
<View className='location-block'>
|
||||
<View className='block-title'>{$t('02473b99.0e93e0')}</View>
|
||||
<View className='location-wrap'>
|
||||
<Text className='location-address'>
|
||||
{location?.address || $t('02473b99.3c7849')}
|
||||
</Text>
|
||||
<Text className='location-address'>{location?.address || $t('02473b99.3c7849')}</Text>
|
||||
<View className='btn-location' onClick={getLocationInfo}>
|
||||
<Text
|
||||
className={classNames('iconfont icon-zhongxindingwei', {
|
||||
|
||||
@@ -534,9 +534,8 @@ function NearbyList() {
|
||||
)}
|
||||
</View>
|
||||
</View>
|
||||
))
|
||||
}
|
||||
</View >
|
||||
))}
|
||||
</View>
|
||||
<View className='dropdown-actions'>
|
||||
<View className='action-btn reset' onClick={handleResetStoreType}>
|
||||
{$t('9e660622.625fb2')}
|
||||
@@ -545,9 +544,9 @@ function NearbyList() {
|
||||
{$t('9e660622.38cf16')}
|
||||
</View>
|
||||
</View>
|
||||
</View >
|
||||
</View>
|
||||
)}
|
||||
</View >
|
||||
</View>
|
||||
|
||||
{/* 省市区选择 */}
|
||||
<View className='location-row'>
|
||||
@@ -649,7 +648,7 @@ function NearbyList() {
|
||||
</View>
|
||||
</View>
|
||||
))}
|
||||
</SpScrollView>
|
||||
</SpScrollView>
|
||||
|
||||
{/* 联系顾问弹框 */}
|
||||
<ConsultModal
|
||||
|
||||
@@ -238,12 +238,12 @@ function TradeDetail(props) {
|
||||
|
||||
const onClickItem = ({ itemId, distributorId, activityId, orderClass }) => {
|
||||
if (orderClass == 'employee_purchase') {
|
||||
//内购不让跳商品详情
|
||||
// Taro.navigateTo({
|
||||
// url: `/subpages/purchase/espier-detail?id=${itemId}&dtid=${
|
||||
// distributorId || 0
|
||||
// }&activity_id=${activityId}&enterprise_id=${info.enterpriseId}`
|
||||
// })
|
||||
//内购不让跳商品详情
|
||||
// Taro.navigateTo({
|
||||
// url: `/subpages/purchase/espier-detail?id=${itemId}&dtid=${
|
||||
// distributorId || 0
|
||||
// }&activity_id=${activityId}&enterprise_id=${info.enterpriseId}`
|
||||
// })
|
||||
} else if (orderClass == 'pointsmall') {
|
||||
Taro.navigateTo({
|
||||
url: `/subpages/pointshop/espier-detail?id=${itemId}&dtid=${
|
||||
@@ -873,8 +873,7 @@ function TradeDetail(props) {
|
||||
})
|
||||
}}
|
||||
>
|
||||
{$t('34d31722.607e7a')}{' '}
|
||||
<Text className='iconfont icon-qianwang-01' />
|
||||
{$t('34d31722.607e7a')} <Text className='iconfont icon-qianwang-01' />
|
||||
</View>
|
||||
)
|
||||
})()}
|
||||
@@ -897,8 +896,7 @@ function TradeDetail(props) {
|
||||
className='block-container-link'
|
||||
onClick={() => dstFilePath(info?.prescriptionData?.dst_file_path)}
|
||||
>
|
||||
{$t('34d31722.607e7a')}{' '}
|
||||
<Text className='iconfont icon-qianwang-01' />
|
||||
{$t('34d31722.607e7a')} <Text className='iconfont icon-qianwang-01' />
|
||||
</View>
|
||||
)
|
||||
})()}
|
||||
@@ -997,7 +995,11 @@ function TradeDetail(props) {
|
||||
}}
|
||||
/>
|
||||
|
||||
<AtFloatLayout title={$t('34d31722.49e410')} isOpened={prescriptionStatus} onClose={handleClose}>
|
||||
<AtFloatLayout
|
||||
title={$t('34d31722.49e410')}
|
||||
isOpened={prescriptionStatus}
|
||||
onClose={handleClose}
|
||||
>
|
||||
<View className='long-press'>{$t('34d31722.afeae3')}</View>
|
||||
<SpImage
|
||||
src={prescriptionUrl}
|
||||
|
||||
@@ -315,9 +315,7 @@ function Invoice(props) {
|
||||
}}
|
||||
>
|
||||
<View className='cell-wrap__item-text'>
|
||||
{info.invoice_type_code === '02'
|
||||
? $t('67cd5a59.747c7a')
|
||||
: $t('67cd5a59.515a32')}
|
||||
{info.invoice_type_code === '02' ? $t('67cd5a59.747c7a') : $t('67cd5a59.515a32')}
|
||||
</View>
|
||||
<View className='iconfont icon-arrowRight'></View>
|
||||
</View>
|
||||
|
||||
@@ -32,14 +32,7 @@ function TradeList(props) {
|
||||
useTranslation()
|
||||
const { setNavigationBarTitle } = useNavigation()
|
||||
const [state, setState] = useImmer(initialState)
|
||||
const {
|
||||
status,
|
||||
tradeList,
|
||||
refresherTriggered,
|
||||
trackDetailList,
|
||||
openTrackDetail,
|
||||
info
|
||||
} = state
|
||||
const { status, tradeList, refresherTriggered, trackDetailList, openTrackDetail, info } = state
|
||||
const tradeRef = useRef()
|
||||
const router = useRouter()
|
||||
|
||||
|
||||
@@ -309,14 +309,21 @@ const uploadImageFn = async (imgFiles, filetype = 'image', uploadOptions = {}) =
|
||||
// const { driver, token } = await getToken({ filetype, filename })
|
||||
const uploadType = getUploadFun(driver)
|
||||
// console.log('----uploadType----', uploadType)
|
||||
let img = await upload[uploadType](item, { ...token, filetype: item.fileType || filetype }, uploadOptions)
|
||||
let img = await upload[uploadType](
|
||||
item,
|
||||
{ ...token, filetype: item.fileType || filetype },
|
||||
uploadOptions
|
||||
)
|
||||
console.log(uploadType)
|
||||
if (filetype == 'videos' && item.thumb) {
|
||||
const _thumb = {
|
||||
url: item.thumb
|
||||
}
|
||||
const thumbFileName = _thumb.url.slice(_thumb.url.lastIndexOf('/') + 1)
|
||||
const thumbRes = await getToken({ filetype: 'image', filename: thumbFileName }, uploadOptions)
|
||||
const thumbRes = await getToken(
|
||||
{ filetype: 'image', filename: thumbFileName },
|
||||
uploadOptions
|
||||
)
|
||||
const thumbUploadType = getUploadFun(thumbRes.driver)
|
||||
const thumbImg = await upload[thumbUploadType](
|
||||
{ url: _thumb.url },
|
||||
|
||||
Reference in New Issue
Block a user