Commit c7063d12 authored by 前端-许佳敏's avatar 前端-许佳敏

fix: 更改v2order token

parent 4d0c08ac
...@@ -141,18 +141,35 @@ const Phone = (props) => { ...@@ -141,18 +141,35 @@ const Phone = (props) => {
const handleStartSms = () => { const handleStartSms = () => {
setLoading(true) setLoading(true)
form.setFieldState('phone', state => { if (form.getFieldValue('phone')) {
state.smsLoading = instanceRef.current.canIUseSms form.setFieldState('phone', state => {
}) state.smsLoading = instanceRef.current.canIUseSms
PublicApi.postMemberRegisterSms({ })
countryCode: '+86', PublicApi.postMemberRegisterSms({
width: String(remoteImg.x), countryCode: '+86',
imgId: remoteImg.imgId, width: remoteImg.x,
phone: encryptedByAES(form.getFieldValue('phone')) imgId: remoteImg.imgId,
}).finally(() => { phone: encryptedByAES(form.getFieldValue('phone'))
start() }).finally(() => {
setLoading(false) start()
}) setLoading(false)
})
}
if (form.getFieldValue('account')) {
form.setFieldState('account', state => {
state.smsLoading = instanceRef.current.canIUseSms
})
PublicApi.postMemberRegisterPswSms({
countryCode: '+86',
width: remoteImg.x,
imgId: remoteImg.imgId,
phone: encryptedByAES(form.getFieldValue('account'))
}).finally(() => {
start()
setLoading(false)
})
}
} }
const handleCheckSuccess = (reset) => { const handleCheckSuccess = (reset) => {
......
...@@ -17,6 +17,8 @@ import { constructTableData, transformDataForNiceForm } from '../../effect' ...@@ -17,6 +17,8 @@ import { constructTableData, transformDataForNiceForm } from '../../effect'
import PriceModal from './priceModal' import PriceModal from './priceModal'
import ProductModal from './productModal' import ProductModal from './productModal'
import MemberModal from './memberModal' import MemberModal from './memberModal'
import { useAsyncSelect } from '@/formSchema/effects/useAsyncSelect'
import { fectchShopListsSource } from '@/utils/type'
const { Search } = Input const { Search } = Input
...@@ -27,6 +29,10 @@ export interface PriceSettingProps { ...@@ -27,6 +29,10 @@ export interface PriceSettingProps {
formSubmit?(values), formSubmit?(values),
} }
const fetchShopLists = async () => {
return await fectchShopListsSource({type: 1})
}
const PriceSetting:React.FC<PriceSettingProps> = (props) => { const PriceSetting:React.FC<PriceSettingProps> = (props) => {
const { addSchemaAction, schema, formSubmit, onFieldChange = () => {} } = props const { addSchemaAction, schema, formSubmit, onFieldChange = () => {} } = props
const priceRef = useRef<any>({}) const priceRef = useRef<any>({})
...@@ -92,7 +98,6 @@ const PriceSetting:React.FC<PriceSettingProps> = (props) => { ...@@ -92,7 +98,6 @@ const PriceSetting:React.FC<PriceSettingProps> = (props) => {
} }
const handleSetProductPrice = (record: any) => { const handleSetProductPrice = (record: any) => {
console.log(record, 'record')
if(record?.id) { if(record?.id) {
priceRef.current.setVisible(true) priceRef.current.setVisible(true)
priceRef.current.setCurrentSetPriceRow(record) priceRef.current.setCurrentSetPriceRow(record)
...@@ -225,7 +230,7 @@ const PriceSetting:React.FC<PriceSettingProps> = (props) => { ...@@ -225,7 +230,7 @@ const PriceSetting:React.FC<PriceSettingProps> = (props) => {
FormEffectHooks.onFormInputChange$().subscribe(() => { FormEffectHooks.onFormInputChange$().subscribe(() => {
onFieldChange() onFieldChange()
}) })
useAsyncSelect('shopId', fetchShopLists, ['name', 'id'])
$('onFieldValueChange', 'shopId').subscribe(parentState => { $('onFieldValueChange', 'shopId').subscribe(parentState => {
if (parentState.value) { if (parentState.value) {
ctx.setFieldState('shopId', state => { ctx.setFieldState('shopId', state => {
......
...@@ -72,7 +72,7 @@ const baseRequest = extend({ ...@@ -72,7 +72,7 @@ const baseRequest = extend({
timeout: 30 * 1000, timeout: 30 * 1000,
headers: defaultHeaders, headers: defaultHeaders,
credentials: 'include', // 默认请求是否带上cookie credentials: 'include', // 默认请求是否带上cookie
errorHandler errorHandler,
}); });
const cache = {} const cache = {}
......
...@@ -20,7 +20,7 @@ const tokenList = [ ...@@ -20,7 +20,7 @@ const tokenList = [
{ name: 'SettleV2', token: 'fed8d45aa92e7f0e382a3dcc5e0ef63f13f0badeabab76d6a6e2db49aa403346', categoryIds: [0] }, { name: 'SettleV2', token: 'fed8d45aa92e7f0e382a3dcc5e0ef63f13f0badeabab76d6a6e2db49aa403346', categoryIds: [0] },
{ name: 'TransactionV2', token: '3ad04435494d01c359b9f07948338e019133a3e6c0fccdbe1bc3adc19cf1e0b1', categoryIds: [0] }, // 交易服务V2 { name: 'TransactionV2', token: '3ad04435494d01c359b9f07948338e019133a3e6c0fccdbe1bc3adc19cf1e0b1', categoryIds: [0] }, // 交易服务V2
{ name: 'ContractV2', token: 'bbf1f327cfe7c59d1e7fd9c5d25119829dd79d238b1f1c79ed97331e220721a4', categoryIds: [0] }, // 合同能力V2 { name: 'ContractV2', token: 'bbf1f327cfe7c59d1e7fd9c5d25119829dd79d238b1f1c79ed97331e220721a4', categoryIds: [0] }, // 合同能力V2
{ name: 'OrderV2', token: '033f83bd5f519506f65f46d1513b1f8028a1dc1b5238d22edd0a2feb53cd3a19', categoryIds: [0], }, //订单服务V2 { name: 'OrderV2', token: '89202a7986a86e7306925203d7eea0d999af8bb98d70a210d217a470d44b2dba', categoryIds: [0], }, //订单服务V2
{ name: 'OrderV2New', token: 'c11d6e07d958caff4fc5e26feaeb2637e38f1619e850cd2b6e7d5e7072d4989a', categoryIds: [0], }, //订单服务V2 New { name: 'OrderV2New', token: 'c11d6e07d958caff4fc5e26feaeb2637e38f1619e850cd2b6e7d5e7072d4989a', categoryIds: [0], }, //订单服务V2 New
{ name: 'Platform', token: 'db3b086157528c865a1a1a9fafffa574e9c3f098c0518a7c374a72988ba1edbb', categoryIds: [0] }, // 平台后台v2 { name: 'Platform', token: 'db3b086157528c865a1a1a9fafffa574e9c3f098c0518a7c374a72988ba1edbb', categoryIds: [0] }, // 平台后台v2
{ name: 'ProductV2', token: 'b915026587fa1f6edf056f3335817fe2d4b350b0aa84da456786e15e83d45827', categoryIds: [0], }, // 商品服务V2 { name: 'ProductV2', token: 'b915026587fa1f6edf056f3335817fe2d4b350b0aa84da456786e15e83d45827', categoryIds: [0], }, // 商品服务V2
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment