diff --git a/src/api/req.js b/src/api/req.js
index ea5c7531a..15664814c 100644
--- a/src/api/req.js
+++ b/src/api/req.js
@@ -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
})()
diff --git a/src/app.js b/src/app.js
index 990b0f163..c8a3e625d 100644
--- a/src/app.js
+++ b/src/app.js
@@ -147,7 +147,6 @@ function App({ children }) {
}
getSystemConfig()
})
-
})
useDidShow(async (options) => {
diff --git a/src/components/privacy-confirm-modal/index.js b/src/components/privacy-confirm-modal/index.js
index 55dc83e26..f2d1846b3 100644
--- a/src/components/privacy-confirm-modal/index.js
+++ b/src/components/privacy-confirm-modal/index.js
@@ -116,7 +116,6 @@ export default class PrivacyConfirmModal extends Component {
{$t('ed40c676.e61f2c')}
)}
-
diff --git a/src/components/sp-deliver/index.js b/src/components/sp-deliver/index.js
index f5f24bb58..6b5a58bb3 100644
--- a/src/components/sp-deliver/index.js
+++ b/src/components/sp-deliver/index.js
@@ -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}
- {(zitiAddress?.hour || zitiInfo?.hour) && (
-
- {ti('a47ea9b8.6cd6e3', [zitiAddress?.hour || zitiInfo?.hour])}
-
- )}
+ {(zitiAddress?.hour || zitiInfo?.hour) && (
+
+ {ti('a47ea9b8.6cd6e3', [zitiAddress?.hour || zitiInfo?.hour])}
+
+ )}
)}
@@ -583,7 +586,12 @@ function SpDeliver(props, ref) {
-
+
-
+
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
diff --git a/src/components/sp-page/header.js b/src/components/sp-page/header.js
index 6019a7317..96d4b8120 100644
--- a/src/components/sp-page/header.js
+++ b/src/components/sp-page/header.js
@@ -159,7 +159,9 @@ const CustomNavigationHeader = memo((props) => {
style={{ color: pageConfig?.titleColor }}
>
- {VERSION_STANDARD ? shopInfo?.name || $t('cb50ec48.0d7757') : nearbyText || $t('cb50ec48.e9a36d')}
+ {VERSION_STANDARD
+ ? shopInfo?.name || $t('cb50ec48.0d7757')
+ : nearbyText || $t('cb50ec48.e9a36d')}
@@ -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()}
)}
diff --git a/src/components/sp-price/index.js b/src/components/sp-price/index.js
index 2931dca3e..7684b6d73 100644
--- a/src/components/sp-price/index.js
+++ b/src/components/sp-price/index.js
@@ -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
diff --git a/src/doc/goods.js b/src/doc/goods.js
index a5c537e29..67f8b8f52 100644
--- a/src/doc/goods.js
+++ b/src/doc/goods.js
@@ -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 })
}
diff --git a/src/doc/purchase.js b/src/doc/purchase.js
index 6250d20b1..8d7b2682e 100644
--- a/src/doc/purchase.js
+++ b/src/doc/purchase.js
@@ -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 = {
diff --git a/src/pages/cart/comps/comp-goodsitem.js b/src/pages/cart/comps/comp-goodsitem.js
index 62af41174..ef4ffbeac 100644
--- a/src/pages/cart/comps/comp-goodsitem.js
+++ b/src/pages/cart/comps/comp-goodsitem.js
@@ -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 = (
diff --git a/src/pages/cart/espier-checkout.js b/src/pages/cart/espier-checkout.js
index 60aeaa035..562337084 100644
--- a/src/pages/cart/espier-checkout.js
+++ b/src/pages/cart/espier-checkout.js
@@ -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) {
- {$t('edc703ce.08ea4e')} ({totalInfo.items_count})
+ {$t('edc703ce.08ea4e')}{' '}
+ ({totalInfo.items_count})
{detailInfo.map((item, idx) => (
diff --git a/src/pages/cart/espier-index.js b/src/pages/cart/espier-index.js
index c85e78003..18d712e7e 100644
--- a/src/pages/cart/espier-index.js
+++ b/src/pages/cart/espier-index.js
@@ -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() {
})}
{/** 店铺商品结束 */}
{/** 结算/全选操作开始 */}
-
+
} {/** 视频 */}
{/** 商品 */}
- {item.name === 'goods' && } {/** 商品 */}
+ {item.name === 'goods' && }{' '}
+ {/** 商品 */}
>
))}
diff --git a/src/pages/home/wgts/film/index.jsx b/src/pages/home/wgts/film/index.jsx
index 4116685da..d28c7b527 100644
--- a/src/pages/home/wgts/film/index.jsx
+++ b/src/pages/home/wgts/film/index.jsx
@@ -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
}
diff --git a/src/pages/home/wgts/goodscard.js b/src/pages/home/wgts/goodscard.js
index d15b2333b..d6d701be7 100644
--- a/src/pages/home/wgts/goodscard.js
+++ b/src/pages/home/wgts/goodscard.js
@@ -191,7 +191,10 @@ export default class WgtGoodsCard extends Component {
const isFav = Boolean(item.favStatus ?? favs?.[item.item_id])
return (
-
+
{item.item_name}
@@ -199,7 +202,9 @@ export default class WgtGoodsCard extends Component {
{item.sales > 0 && (
- {ti('a8427e1f.47df99', [item.sales])}
+
+ {ti('a8427e1f.47df99', [item.sales])}
+
)}
diff --git a/src/pages/home/wgts/imghot-zone/index.jsx b/src/pages/home/wgts/imghot-zone/index.jsx
index 6e3329645..c55d0d735 100644
--- a/src/pages/home/wgts/imghot-zone/index.jsx
+++ b/src/pages/home/wgts/imghot-zone/index.jsx
@@ -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 (
-
-
- {isArray(data) && data.length > 0 && data.map(renderHotZone)}
+
+
+ {isArray(data) && data.length > 0 && data.map(renderHotZone)}
diff --git a/src/pages/home/wgts/location-module/index.jsx b/src/pages/home/wgts/location-module/index.jsx
index 44c66481c..583a04540 100644
--- a/src/pages/home/wgts/location-module/index.jsx
+++ b/src/pages/home/wgts/location-module/index.jsx
@@ -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'
diff --git a/src/pages/member/item-fav.config.js b/src/pages/member/item-fav.config.js
index 6095ab004..9678be311 100644
--- a/src/pages/member/item-fav.config.js
+++ b/src/pages/member/item-fav.config.js
@@ -3,5 +3,5 @@
* See LICENSE file for license details.
*/
export default {
- navigationBarTitleText: '我的收藏'
+ navigationBarTitleText: '我的收藏'
}
diff --git a/src/pages/purchase/auth.js b/src/pages/purchase/auth.js
index 1f6c1ea28..9492f8910 100644
--- a/src/pages/purchase/auth.js
+++ b/src/pages/purchase/auth.js
@@ -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 (
{ },
- onHome = () => { },
+ onBack = () => {},
+ onHome = () => {},
navigationRSpace: navigationRSpaceFromPage
} = props
const showHome = btnHome || btnReturn
diff --git a/src/pages/recommend/detail.js b/src/pages/recommend/detail.js
index 93748cde0..ff9734025 100644
--- a/src/pages/recommend/detail.js
+++ b/src/pages/recommend/detail.js
@@ -130,7 +130,6 @@ function GuideRecommendDetail(props) {
}
}
-
return (
- {Array.isArray(content) && content.map((item, idx) => (
-
- {item.name === 'film' && }
- {item.name === 'slider' && }
- {item.name === 'writing' && }
- {item.name === 'heading' && }
- {item.name === 'goodsCard' && }
-
- ))}
+ {Array.isArray(content) &&
+ content.map((item, idx) => (
+
+ {item.name === 'film' && }
+ {item.name === 'slider' && }
+ {item.name === 'writing' && }
+ {item.name === 'heading' && }
+ {item.name === 'goodsCard' && }
+
+ ))}
diff --git a/src/pages/share-land.js b/src/pages/share-land.js
index 26258b502..8e69b7ece 100644
--- a/src/pages/share-land.js
+++ b/src/pages/share-land.js
@@ -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) {
diff --git a/src/plugin/routeIntercept.js b/src/plugin/routeIntercept.js
index 4da06e6da..3a2e26bcd 100644
--- a/src/plugin/routeIntercept.js
+++ b/src/plugin/routeIntercept.js
@@ -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)
)
}
diff --git a/src/store/slices/purchase.js b/src/store/slices/purchase.js
index 9b2648b1b..212b76bad 100644
--- a/src/store/slices/purchase.js
+++ b/src/store/slices/purchase.js
@@ -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) => {
diff --git a/src/subpages/auth/email-activate.js b/src/subpages/auth/email-activate.js
index b3c170845..6e5f73852 100644
--- a/src/subpages/auth/email-activate.js
+++ b/src/subpages/auth/email-activate.js
@@ -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 (
- {deliveryAddress.receiver_name}
+
+ {deliveryAddress.receiver_name}
+
{maskTelDisplay(deliveryAddress.receiver_mobile)}
@@ -986,7 +991,9 @@ function DianwuCheckout(props) {
>
{regionLineText || $t('2b4b2b4f.7fae6a')}
diff --git a/src/subpages/dianwu/collection-result.js b/src/subpages/dianwu/collection-result.js
index f9a19d7d9..e015e2b19 100644
--- a/src/subpages/dianwu/collection-result.js
+++ b/src/subpages/dianwu/collection-result.js
@@ -244,7 +244,11 @@ function DianwuCollectionResult(props) {
-
+
)}
diff --git a/src/subpages/dianwu/comps/comp-dianwu-platform-order.js b/src/subpages/dianwu/comps/comp-dianwu-platform-order.js
index e1a971b2b..c5b594339 100644
--- a/src/subpages/dianwu/comps/comp-dianwu-platform-order.js
+++ b/src/subpages/dianwu/comps/comp-dianwu-platform-order.js
@@ -73,7 +73,12 @@ function CompDianwuPlatformOrder({ open, item, distributor_id, onClose, onEventF
{item.itemSpecDesc ? {item.itemSpecDesc} : null}
{$t('eac57497.0bf60b')}
- setNum(Number(v) || 1)} />
+ setNum(Number(v) || 1)}
+ />
{ti('eac57497.5591b7', [maxStock])}
diff --git a/src/subpages/dianwu/list.js b/src/subpages/dianwu/list.js
index aecfcec6d..6058abdf1 100644
--- a/src/subpages/dianwu/list.js
+++ b/src/subpages/dianwu/list.js
@@ -155,7 +155,9 @@ function DianWuList() {
{list.map((items, idx) => {
return items.map((item, sidx) => (
diff --git a/src/subpages/doc/dianwu.js b/src/subpages/doc/dianwu.js
index bfa59bf41..3f33160ec 100644
--- a/src/subpages/doc/dianwu.js
+++ b/src/subpages/doc/dianwu.js
@@ -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 = {
diff --git a/src/subpages/guide/recommend/detail.js b/src/subpages/guide/recommend/detail.js
index 775e8e96a..7665772b5 100644
--- a/src/subpages/guide/recommend/detail.js
+++ b/src/subpages/guide/recommend/detail.js
@@ -85,7 +85,6 @@ function GuideRecommendDetail(props) {
})
}
-
return (
}
{item.name === 'writing' && }
{item.name === 'heading' && }
- {item.name === 'goodsCard' && (
-
- )}
+ {item.name === 'goodsCard' && }
))}
diff --git a/src/subpages/i18n/resources.js b/src/subpages/i18n/resources.js
index e08470620..9abb57072 100644
--- a/src/subpages/i18n/resources.js
+++ b/src/subpages/i18n/resources.js
@@ -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')
}
diff --git a/src/subpages/item/comps/comp-buytoolbar.js b/src/subpages/item/comps/comp-buytoolbar.js
index 0b45f76cf..44a51d47c 100644
--- a/src/subpages/item/comps/comp-buytoolbar.js
+++ b/src/subpages/item/comps/comp-buytoolbar.js
@@ -177,12 +177,7 @@ function CompGoodsBuyToolbar(props) {
-
+
{$t('21544271.ae336c')}
diff --git a/src/subpages/item/list.config.js b/src/subpages/item/list.config.js
index 6b18b6f24..cb1e6f39e 100644
--- a/src/subpages/item/list.config.js
+++ b/src/subpages/item/list.config.js
@@ -6,6 +6,6 @@ export default {
usingComponents: {
//'cell': 'plugin://contactPlugin/cell'
},
- navigationBarTitleText: '商品列表',
+ navigationBarTitleText: '商品列表'
// navigationStyle: 'custom'
}
diff --git a/src/subpages/member/index.js b/src/subpages/member/index.js
index 4cb314b7b..485da9ced 100644
--- a/src/subpages/member/index.js
+++ b/src/subpages/member/index.js
@@ -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,
diff --git a/src/subpages/merchant/login.js b/src/subpages/merchant/login.js
index 044cf817b..1e4228db9 100644
--- a/src/subpages/merchant/login.js
+++ b/src/subpages/merchant/login.js
@@ -170,7 +170,7 @@ const Login = () => {
return (
-
+
{
-
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 }
- />
+ return (
+ }
+ />
+ )
}
-
return (
{badgeText}
diff --git a/src/subpages/purchase/comps/comp-purchase-actionbar.js b/src/subpages/purchase/comps/comp-purchase-actionbar.js
index f5da5279a..cf3d1b048 100644
--- a/src/subpages/purchase/comps/comp-purchase-actionbar.js
+++ b/src/subpages/purchase/comps/comp-purchase-actionbar.js
@@ -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 && (
-
+
{cartCount > 0 && (
{cartCount > 99 ? '99+' : cartCount}
@@ -169,7 +172,11 @@ function CompPurchaseActionbar(props) {
{canShowShareFriend && (
-
+
{$t('f367f1ff.83d472')}
@@ -180,7 +187,11 @@ function CompPurchaseActionbar(props) {
{displayRemainingLabel}
{displayRemainingAmount}
-
+
diff --git a/src/subpages/purchase/comps/comp-purchase-quota-sheet.js b/src/subpages/purchase/comps/comp-purchase-quota-sheet.js
index 2cfc25101..cb4447b6c 100644
--- a/src/subpages/purchase/comps/comp-purchase-quota-sheet.js
+++ b/src/subpages/purchase/comps/comp-purchase-quota-sheet.js
@@ -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 (
-
+
{$t('d64ed906.167e4d')}
- ×
+
+ ×
+
diff --git a/src/subpages/purchase/comps/comp-skuselect.js b/src/subpages/purchase/comps/comp-skuselect.js
index 0ca6460b5..00d8a8718 100644
--- a/src/subpages/purchase/comps/comp-skuselect.js
+++ b/src/subpages/purchase/comps/comp-skuselect.js
@@ -358,9 +358,7 @@ function PurchaseSkuSelect(props) {
{limitQty != null ? ti('47ac6066.f7a2b1', [limitQty]) : ''}
-
- {amountLine || ''}
-
+ {amountLine || ''}
)}
diff --git a/src/subpages/purchase/comps/sp-purchase-deliver/index.js b/src/subpages/purchase/comps/sp-purchase-deliver/index.js
index 8a37b3120..09c245579 100644
--- a/src/subpages/purchase/comps/sp-purchase-deliver/index.js
+++ b/src/subpages/purchase/comps/sp-purchase-deliver/index.js
@@ -445,9 +445,7 @@ function SpPurchaseDeliver(props, ref) {
{/** 普通快递 */}
- {receiptType === 'logistics' && (
-
- )}
+ {receiptType === 'logistics' && }
{/** 自提 */}
{receiptType === 'ziti' && (
diff --git a/src/subpages/purchase/espier-checkout.js b/src/subpages/purchase/espier-checkout.js
index 65b821bca..912979d00 100644
--- a/src/subpages/purchase/espier-checkout.js
+++ b/src/subpages/purchase/espier-checkout.js
@@ -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) {
{$t('f9ef9536.7b2864')}
-
+
{!bargain_id && (
-
+
{$t('250b375e.0c9d2b')}
@@ -796,20 +801,34 @@ function PurchaseCheckout(props) {
{$t('b1a8838b.5fd62d')}
-
+
{$t('a0f401f3.5b921a')}
-
+
{$t('250b375e.9a935b')}
-
+
{(VERSION_STANDARD || VERSION_B2C || (VERSION_PLATFORM && dtid == 0)) &&
pointInfo?.is_open_deduct_point && (
- {ti('edc703ce.74dcf4', [pointName])}
+
+ {ti('edc703ce.74dcf4', [pointName])}
+
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 && (
-
+
{displayItemParams.map((item, index) => (
diff --git a/src/subpages/purchase/espier-index.js b/src/subpages/purchase/espier-index.js
index 507fe3d1f..c2db375c6 100644
--- a/src/subpages/purchase/espier-index.js
+++ b/src/subpages/purchase/espier-index.js
@@ -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 = [] // 没有活动的商品
diff --git a/src/subpages/purchase/index.js b/src/subpages/purchase/index.js
index 0fe8a13ef..ef34aebc9 100644
--- a/src/subpages/purchase/index.js
+++ b/src/subpages/purchase/index.js
@@ -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()
diff --git a/src/subpages/purchase/list.js b/src/subpages/purchase/list.js
index cc1cb7a75..702e6eb95 100644
--- a/src/subpages/purchase/list.js
+++ b/src/subpages/purchase/list.js
@@ -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() {
)}
-
+
{
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 (
-
-
-
+
+
{$t('cedd18d3.5f934d')}
diff --git a/src/subpages/purchase/select-company-email.js b/src/subpages/purchase/select-company-email.js
index b8dc8ade5..653a9eb1c 100644
--- a/src/subpages/purchase/select-company-email.js
+++ b/src/subpages/purchase/select-company-email.js
@@ -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)
diff --git a/src/subpages/purchase/select-company-passcode.js b/src/subpages/purchase/select-company-passcode.js
index 79e097d06..5a6eeb409 100644
--- a/src/subpages/purchase/select-company-passcode.js
+++ b/src/subpages/purchase/select-company-passcode.js
@@ -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
-
-
+ return (
+
+
+
+ )
}
return (
@@ -189,7 +195,9 @@ function PurchasePasscodeAuth() {
})}
onClick={handleSubmit}
>
- {$t('c2581d4c.e83a25')}
+
+ {$t('c2581d4c.e83a25')}
+
diff --git a/src/subpages/purchase/select-company-phone.js b/src/subpages/purchase/select-company-phone.js
index 216209d12..f3f54356b 100644
--- a/src/subpages/purchase/select-company-phone.js
+++ b/src/subpages/purchase/select-company-phone.js
@@ -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 (
-
+
{$t('cedd18d3.5f934d')}
-
- {$t('d0a93b87.4715ea')}
-
+ {$t('d0a93b87.4715ea')}
-
diff --git a/src/subpages/purchase/select-identity.config.js b/src/subpages/purchase/select-identity.config.js
index cdb5fd210..590acbd88 100644
--- a/src/subpages/purchase/select-identity.config.js
+++ b/src/subpages/purchase/select-identity.config.js
@@ -5,5 +5,5 @@
export default {
navigationBarBackgroundColor: '#fff',
navigationBarTitleText: '企业购',
- navigationStyle: 'custom',
+ navigationStyle: 'custom'
}
diff --git a/src/subpages/purchase/share.js b/src/subpages/purchase/share.js
index 8e1c4e8f4..2cf88aa55 100644
--- a/src/subpages/purchase/share.js
+++ b/src/subpages/purchase/share.js
@@ -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 (
{$t('02473b99.0e93e0')}
-
- {location?.address || $t('02473b99.3c7849')}
-
+ {location?.address || $t('02473b99.3c7849')}
- ))
- }
-
+ ))}
+
{$t('9e660622.625fb2')}
@@ -545,9 +544,9 @@ function NearbyList() {
{$t('9e660622.38cf16')}
-
+
)}
-
+
{/* 省市区选择 */}
@@ -649,7 +648,7 @@ function NearbyList() {
))}
-
+
{/* 联系顾问弹框 */}
{
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')}{' '}
-
+ {$t('34d31722.607e7a')}
)
})()}
@@ -897,8 +896,7 @@ function TradeDetail(props) {
className='block-container-link'
onClick={() => dstFilePath(info?.prescriptionData?.dst_file_path)}
>
- {$t('34d31722.607e7a')}{' '}
-
+ {$t('34d31722.607e7a')}
)
})()}
@@ -997,7 +995,11 @@ function TradeDetail(props) {
}}
/>
-
+
{$t('34d31722.afeae3')}
- {info.invoice_type_code === '02'
- ? $t('67cd5a59.747c7a')
- : $t('67cd5a59.515a32')}
+ {info.invoice_type_code === '02' ? $t('67cd5a59.747c7a') : $t('67cd5a59.515a32')}
diff --git a/src/subpages/trade/list.js b/src/subpages/trade/list.js
index 3aad24ced..7612754db 100644
--- a/src/subpages/trade/list.js
+++ b/src/subpages/trade/list.js
@@ -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()
diff --git a/src/utils/upload.js b/src/utils/upload.js
index 32eb22ab5..57935273c 100644
--- a/src/utils/upload.js
+++ b/src/utils/upload.js
@@ -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 },