Merge branch 'feature/huiqiyd-173' into 'develop'

Feature/huiqiyd 173

See merge request huiqi/ecshopx-vshop!25
This commit is contained in:
qugao
2025-08-04 10:37:25 +08:00
3 changed files with 49 additions and 12 deletions

View File

@@ -39,3 +39,17 @@ map_key = NWBBZ-NKJ6J-LMOFT-D3LBD-IEYKE-JRFOY
map_name = oneX新零售门店定位
image_cdn = https://b-img-cdn.yuanyuanke.cn/ecshopx-vshop
dianwu_url=
[辉绮测试-生产]
appid = wx7a0b344cdc44144c
base_url = https://dtc.amandax.com.cn/api/h5app/wxapp
app_name = 通用小程序
websocket = wss://dtc.amandax.com.cn/ws
company_id = 1
platform = standard
custom_server = https://dtc.amandax.com.cn
home_page = /pages/index
map_key = NWBBZ-NKJ6J-LMOFT-D3LBD-IEYKE-JRFOY
map_name = oneX新零售门店定位
image_cdn = https://b-img-cdn.yuanyuanke.cn/ecshopx-vshop
dianwu_url=

View File

@@ -9,6 +9,7 @@ import { isWeixin, isAlipay, classNames, showToast, entryLaunch } from '@/utils'
import { SG_SHARER_UID, SG_TRACK_PARAMS, SG_ROUTER_PARAMS, SG_GUIDE_PARAMS } from '@/consts'
import { Tracker } from '@/service'
import { SpPrivacyModal, SpImage, SpCheckbox } from '@/components'
import { useSelector } from 'react-redux'
import { useLogin, useLocation } from '@/hooks'
import './index.scss'
@@ -21,6 +22,8 @@ const initialState = {
function SpLogin(props, ref) {
const { children, className, onChange, newUser = false, onPolicyClose } = props
const { updateAddress } = useLocation()
const { shopInfo } = useSelector((state) => state.shop)
const { isLogin, login, setToken, checkPolicyChange } = useLogin({
policyUpdateHook: (isUpdate) => {
// isUpdate && setPolicyModal(true)
@@ -87,6 +90,10 @@ function SpLogin(props, ref) {
// 分销绑定
params['uid'] = uid
}
if(shopInfo.distributor_id) {
params['distributor_id'] = shopInfo.distributor_id
}
if (dtid && dtid !== 'undefined') {
params['distributor_id'] = dtid
}

View File

@@ -29,13 +29,15 @@ function MemberUserInfo() {
checkboxPickerTitle,
showCheckboxPicker,
checkboxKey,
checkboxList
checkboxList,
dmcrm_is_open
} = state
const { userInfo = {} } = useSelector((_state) => _state.user)
const pageRef = useRef()
const { getUserInfo, logout } = useLogin()
useEffect(() => {
getCommonSetting()
getFormItem()
}, [])
@@ -49,11 +51,19 @@ function MemberUserInfo() {
// console.log('userInfo ******', userInfo)
const getCommonSetting = async () => {
const res = await api.category.getCommonSetting()
setState((draft) => {
draft.dmcrm_is_open = res?.dmcrm_is_open
})
}
const getFormItem = async () => {
const data = await api.user.regParam({
is_edite_page: true
})
const {other_params:{custom_data}} = userInfo
const {
other_params: { custom_data }
} = userInfo
const _formItems = []
const _formUserInfo = {
avatar: userInfo.avatar,
@@ -68,7 +78,10 @@ function MemberUserInfo() {
}
}
if (data[key].element_type == 'checkbox') {
_formUserInfo[key] = value&&value.length>0? value.split(',').map(item=>({name:item,ischecked:true})) : [];
_formUserInfo[key] =
value && value.length > 0
? value.split(',').map((item) => ({ name: item, ischecked: true }))
: []
} else {
_formUserInfo[key] = value || ''
}
@@ -348,15 +361,18 @@ function MemberUserInfo() {
}
></SpCell>
<SpCell
isLink
isLink={!dmcrm_is_open}
title='手机号'
value={userInfo?.mobile}
onClick={() => {
if (dmcrm_is_open) {
return
}
Taro.navigateTo({
url: '/subpages/auth/edit-phone'
})
}}
></SpCell>
/>
</View>
<View className='block-container'>