Commit 5affa698 authored by 赵振东's avatar 赵振东

feat: 登录页面初步改造

parent 1c6b2de1
......@@ -7,21 +7,11 @@
"businessTypes": [
{
"businessTypeId": 3,
"businessTypeName": "SRM采购商"
"businessTypeName": "集团采购商"
},
{
"businessTypeId": 5,
"businessTypeName": "B2B采购商"
}
]
},
{
"memberTypeId": 2,
"memberTypeName": "个人会员",
"businessTypes": [
{
"businessTypeId": 6,
"businessTypeName": "C端采购商"
"businessTypeId": 4,
"businessTypeName": "客户"
}
]
}
......@@ -30,309 +20,111 @@
"web": {
"shopInfo": [
{
"id": 32,
"name": "建材自营H5",
"type": 1,
"environment": 2,
"property": 4,
"self": 1,
"memberOperate": 0,
"openMro": 0,
"logoUrl": "https://shushangyun01.oss-cn-shenzhen.aliyuncs.com/demo logo 136x485c1637c713ad4ceab09af4dd290ef049e94b0165c4394526aa73f739c2f545ef.png",
"describe": null,
"state": 1,
"url": "/",
"isDefault": 1,
"createTime": 1667831274973,
"currencyName": null,
"isHelp": null
},
{
"id": 35,
"name": "行情资讯",
"type": 9,
"environment": 1,
"property": 1,
"self": null,
"memberOperate": 0,
"openMro": 0,
"logoUrl": "https://shushangyun01.oss-cn-shenzhen.aliyuncs.com/demo logo 136x485c1637c713ad4ceab09af4dd290ef049fa55cd93e3a944e5bbdbc21c25346ed1.png",
"describe": null,
"state": 1,
"url": "lingxi-info-test-1030",
"isDefault": 0,
"createTime": 1667831424789,
"currencyName": null,
"isHelp": null
},
{
"id": 34,
"name": "建材自营APP",
"id": 2,
"name": "HighChem中文站-APP",
"type": 1,
"environment": 4,
"property": 3,
"self": 1,
"memberOperate": 0,
"openMro": 0,
"logoUrl": "https://shushangyun01.oss-cn-shenzhen.aliyuncs.com/demo logo 136x485c1637c713ad4ceab09af4dd290ef049607a9dfdc39c4e82bf3be4b56de01a4b.png",
"describe": null,
"state": 1,
"url": "/",
"isDefault": 1,
"createTime": 1667831357661,
"currencyName": null,
"isHelp": null
},
{
"id": 37,
"name": "b2b建材测试",
"type": 1,
"environment": 1,
"property": 3,
"self": 1,
"memberOperate": 0,
"openMro": 1,
"logoUrl": "https://shushangyun01.oss-cn-shenzhen.aliyuncs.com/Snipaste_2022-10-09_16-34-103134aa486ab846ed8a247fedfdeb9d01.png",
"describe": null,
"state": 1,
"url": "lx_b2b",
"isDefault": 0,
"createTime": 1667873159837,
"currencyName": "USD",
"isHelp": null
},
{
"id": 39,
"name": "欧美老干妈商城联营",
"type": 1,
"environment": 1,
"property": 1,
"self": 0,
"memberOperate": 0,
"openMro": 0,
"logoUrl": "https://shushangyun01.oss-cn-shenzhen.aliyuncs.com/QQ截图20180529111401325a3779a46e4c409bddeabfd29b7252.png",
"describe": null,
"state": 1,
"url": "www",
"isDefault": 0,
"createTime": 1667889869604,
"currencyName": "USD",
"isHelp": null
},
{
"id": 43,
"name": "积分商城",
"type": 2,
"environment": 1,
"property": 2,
"self": null,
"memberOperate": 0,
"openMro": 0,
"logoUrl": "https://shushangyun01.oss-cn-shenzhen.aliyuncs.com/QQ截图2018051416555323e8d24e773f400fa54b4b419def0e29.png",
"describe": null,
"state": 1,
"url": "/",
"isDefault": 0,
"createTime": 1668568595942,
"currencyName": null,
"isHelp": null
},
{
"id": 33,
"name": "建材自营小程序",
"type": 1,
"environment": 3,
"property": 4,
"self": 1,
"memberOperate": 0,
"openMro": 0,
"logoUrl": "https://shushangyun01.oss-cn-shenzhen.aliyuncs.com/demo logo 136x485c1637c713ad4ceab09af4dd290ef049a94015c8070e4f94b1b22218b5a05d27.png",
"logoUrl": "https://shushangyun01.oss-cn-shenzhen.aliyuncs.com/167177935715680725f642048465689ea9f4886f867c9.jpg",
"describe": null,
"state": 1,
"url": "/",
"isDefault": 1,
"createTime": 1667831311434,
"currencyName": "USD",
"isHelp": null
},
{
"id": 36,
"name": "采购门户",
"type": 6,
"environment": 1,
"property": 1,
"self": null,
"memberOperate": 0,
"openMro": 0,
"logoUrl": "https://shushangyun01.oss-cn-shenzhen.aliyuncs.com/demo logo 136x485c1637c713ad4ceab09af4dd290ef049f877d03d262942388a69ae2a188feae7.png",
"describe": null,
"state": 1,
"url": "lingxi-srm-test-1030",
"isDefault": 0,
"createTime": 1667831544408,
"currencyName": null,
"createTime": 1672282318877,
"currencyName": "RMB",
"isHelp": null
},
{
"id": 27,
"name": "建材商城",
"id": 3,
"name": "HighChem英文站",
"type": 1,
"environment": 1,
"property": 1,
"self": 0,
"memberOperate": 0,
"openMro": 1,
"logoUrl": "https://shushangyun01.oss-cn-shenzhen.aliyuncs.com/demo logo 136x485c1637c713ad4ceab09af4dd290ef04909e2967925d64d429291ae108cb72b73.png",
"openMro": 0,
"logoUrl": "https://shushangyun01.oss-cn-shenzhen.aliyuncs.com/高化学74e6743a96cc49a49aa36181d0ef0bdb.jpg",
"describe": null,
"state": 1,
"url": "lingxi-b2b-test-1030",
"url": "gaohuaxue-b2b-test-en",
"isDefault": 0,
"createTime": 1667831027544,
"currencyName": "USD",
"createTime": 1672284187693,
"currencyName": "RMB",
"isHelp": null
},
{
"id": 28,
"name": "建材商城H5",
"id": 1,
"name": "HighChem中文站",
"type": 1,
"environment": 2,
"environment": 1,
"property": 1,
"self": 0,
"memberOperate": 0,
"openMro": 0,
"logoUrl": "https://shushangyun01.oss-cn-shenzhen.aliyuncs.com/demo logo 136x485c1637c713ad4ceab09af4dd290ef0493989dabb2e0b4b7fafb3ad89df6c0eca.png",
"logoUrl": "https://shushangyun01.oss-cn-shenzhen.aliyuncs.com/16717793571563d3ce876676a435b92640fccf126e905.jpg",
"describe": null,
"state": 1,
"url": "/",
"url": "gaohuaxue-b2b-test",
"isDefault": 1,
"createTime": 1667831063330,
"currencyName": null,
"createTime": 1672282289779,
"currencyName": "RMB",
"isHelp": null
},
{
"id": 30,
"name": "建材商城APP",
"id": 4,
"name": "高化学商城APP",
"type": 1,
"environment": 4,
"property": 1,
"self": 0,
"memberOperate": 0,
"openMro": 0,
"logoUrl": "https://shushangyun01.oss-cn-shenzhen.aliyuncs.com/demo logo 136x485c1637c713ad4ceab09af4dd290ef0497b02e3a5e0c64b799fc366946fb94d21.png",
"logoUrl": "https://shushangyun01.oss-cn-shenzhen.aliyuncs.com/高化学3a8aede8ee78426bbff008e8940ee1b4.jpg",
"describe": null,
"state": 1,
"url": "/",
"isDefault": 0,
"createTime": 1667831129988,
"currencyName": null,
"createTime": 1672284249354,
"currencyName": "RMB",
"isHelp": null
},
{
"id": 38,
"name": "欧美老干妈商城",
"id": 5,
"name": "HighChem日文站",
"type": 1,
"environment": 1,
"property": 3,
"self": 1,
"memberOperate": 0,
"openMro": 0,
"logoUrl": "https://shushangyun01.oss-cn-shenzhen.aliyuncs.com/QQ截图201805141655340e9dfac5fb2e4e32baf15f94096ab94a.png",
"describe": null,
"state": 1,
"url": "www",
"isDefault": 0,
"createTime": 1667889704948,
"currencyName": "USD",
"isHelp": null
},
{
"id": 29,
"name": "建材商城小程序",
"type": 1,
"environment": 3,
"property": 1,
"self": 0,
"memberOperate": 0,
"openMro": 0,
"logoUrl": "https://shushangyun01.oss-cn-shenzhen.aliyuncs.com/demo logo 136x485c1637c713ad4ceab09af4dd290ef04963d1ced30abe4251b1c5da278cbbd284.png",
"logoUrl": "https://shushangyun01.oss-cn-shenzhen.aliyuncs.com/高化学717fcad33b9c4f2ab9212a8b9773bb04.jpg",
"describe": null,
"state": 1,
"url": "/",
"url": "gaohuaxue-b2b-test-jp",
"isDefault": 0,
"createTime": 1667831104338,
"currencyName": "USD",
"createTime": 1672284310614,
"currencyName": "RMB",
"isHelp": null
},
{
"id": 31,
"name": "建材自营商城",
"type": 1,
"environment": 1,
"property": 3,
"self": 1,
"memberOperate": 0,
"openMro": 1,
"logoUrl": "https://shushangyun01.oss-cn-shenzhen.aliyuncs.com/demo logo 136x485c1637c713ad4ceab09af4dd290ef049eab5bc8e8f24472e938b4ba7fbd7babb.png",
"describe": null,
"state": 1,
"url": "lingxi-self-test-1030",
"isDefault": 1,
"createTime": 1667831219399,
"currencyName": "USD",
"isHelp": null
},
{
"id": 41,
"name": "zy商城",
"id": 6,
"name": "HighChem日文站",
"type": 1,
"environment": 3,
"environment": 4,
"property": 1,
"self": 0,
"memberOperate": 0,
"openMro": 0,
"logoUrl": "https://shushangyun01.oss-cn-shenzhen.aliyuncs.com/demo logo 136x485c1637c713ad4ceab09af4dd290ef04909e2967925d64d429291ae108cb72b73cd8ef69d50c440c8957d5ab52812ff05.png",
"logoUrl": "https://shushangyun01.oss-cn-shenzhen.aliyuncs.com/高化学7a41cf2f630e4470a49c2ddf2bb656a7.jpg",
"describe": null,
"state": 1,
"url": "/",
"isDefault": 0,
"createTime": 1667984413549,
"currencyName": "USD",
"isHelp": null
},
{
"id": 44,
"name": "建材商城11",
"type": 1,
"environment": 1,
"property": 3,
"self": 1,
"memberOperate": 0,
"openMro": 0,
"logoUrl": "https://shushangyun01.oss-cn-shenzhen.aliyuncs.com/demo logo 136x485c1637c713ad4ceab09af4dd290ef04909e2967925d64d429291ae108cb72b730936f852034c4aa2b82aa91390ed450e.png",
"describe": null,
"state": 1,
"url": "lingxi-b2b-test-1030",
"isDefault": 0,
"createTime": 1668994733479,
"currencyName": "USD",
"isHelp": null
},
{
"id": 45,
"name": "新联营商城",
"type": 1,
"environment": 1,
"property": 1,
"self": 0,
"memberOperate": 0,
"openMro": 0,
"logoUrl": "https://shushangyun01.oss-cn-shenzhen.aliyuncs.com/demo logo 136x485c1637c713ad4ceab09af4dd290ef04909e2967925d64d429291ae108cb72b735807060ac97e4a8f95436a336e60b85d.png",
"describe": null,
"state": 1,
"url": "lingxi-b2b-test-1030",
"isDefault": 0,
"createTime": 1669000746370,
"currencyName": "USD",
"createTime": 1672284351328,
"currencyName": "RMB",
"isHelp": null
}
],
......@@ -659,25 +451,14 @@
"global": {
"siteInfo": {
"id": 1,
"name": "中国站点",
"logo": "https://shushangyun01.oss-cn-shenzhen.aliyuncs.com/中国国旗-小图eb0ccf30eaf7412486552efe80ca5e3b59f4058181024c66b377a468380f0d4c.jpg",
"siteUrl": "lingxi-www-test-1030.shushangyun.com:12880",
"symbol": "$",
"language": "China",
"name": "HighChem多商城",
"logo": "https://shushangyun01.oss-cn-shenzhen.aliyuncs.com/16717793571569180c644fdbf48858f076811836d5b29.jpg",
"siteUrl": "gaohuaxue-b2b-test.shushangyun.com:14880",
"symbol": "",
"language": null,
"enableMultiTenancy": 0
},
"customerServiceInfo": {
"id": 1,
"platformName": "\t瓴犀云信大客服服务IM系统",
"type": 1,
"paramConfigList": [
{
"code": "ee",
"value": "ee",
"description": null
}
]
}
"customerServiceInfo": null
},
"publicSelect": {
"siteList": [
......
......@@ -23,6 +23,7 @@
"@types/qs": "^6.9.7",
"@types/react-native-vector-icons": "^6.4.12",
"crypto-es": "^1.2.7",
"eslint-plugin-prettier": "^4.2.1",
"i18next": "^20.5.0",
"mobx": "^6.7.0",
"mobx-react-lite": "^3.4.0",
......
export interface BusinessType {
businessTypeId: number;
businessTypeName: string;
businessTypeId: number;
businessTypeName: string;
}
export interface UseType {
memberTypeId: number;
memberTypeName: string;
businessTypes: BusinessType[];
memberTypeId: number;
memberTypeName: string;
businessTypes: BusinessType[];
}
export interface UserRegister {
useType: UseType[];
useType: UseType[];
}
export interface ShopInfo {
id: number;
name: string;
type: number;
environment: number;
property: number;
self: number;
memberOperate: number;
openMro: number;
logoUrl: string;
describe?: any;
state: number;
url: string;
isDefault: number;
createTime: number;
currencyName?: any;
isHelp?: any;
id: number;
name: string;
type: number;
environment: number;
property: number;
self: number;
memberOperate: number;
openMro: number;
logoUrl: string;
describe?: any;
state: number;
url: string;
isDefault: number;
createTime: number;
currencyName: string;
isHelp?: any;
}
export interface OrderMode {
id: number;
platformType: number;
platformWayName: string;
isPitchOn: number;
platformTypeName: string;
id: number;
platformType: number;
platformWayName: string;
isPitchOn: number;
platformTypeName: string;
}
export interface OrderType {
id: number;
platformType: number;
platformWayName: string;
isPitchOn: number;
platformTypeName: string;
id: number;
platformType: number;
platformWayName: string;
isPitchOn: number;
platformTypeName: string;
}
export interface Web {
shopInfo: ShopInfo[];
orderMode: OrderMode[];
orderType: OrderType[];
shopInfo: ShopInfo[];
orderMode: OrderMode[];
orderType: OrderType[];
}
export interface SiteInfo {
id: number;
name: string;
logo: string;
siteUrl: string;
symbol: string;
language: string;
enableMultiTenancy: number;
}
export interface ParamConfigList {
code: string;
value: string;
description?: any;
}
export interface CustomerServiceInfo {
id: number;
platformName: string;
type: number;
paramConfigList: ParamConfigList[];
id: number;
name: string;
logo: string;
siteUrl: string;
symbol: string;
language?: any;
enableMultiTenancy: number;
}
export interface Global {
siteInfo: SiteInfo;
customerServiceInfo: CustomerServiceInfo;
siteInfo: SiteInfo;
customerServiceInfo?: any;
}
export interface SiteList {
name: string;
key: string;
icon: string;
name: string;
key: string;
icon: string;
}
export interface PublicSelect {
siteList: SiteList[];
siteList: SiteList[];
}
export interface RootObject {
userRegister: UserRegister;
web: Web;
global: Global;
publicSelect: PublicSelect;
}
userRegister: UserRegister;
web: Web;
global: Global;
publicSelect: PublicSelect;
}
\ No newline at end of file
/* eslint-disable import/prefer-default-export */
/* 这个文件是动态生成的, 请别随意改动 */
export const AUTO_CREATE_THEME_TYPE = 'science';
export const AUTO_CREATE_THEME_TYPE = 'science'
......@@ -18,16 +18,16 @@ export const ROUTERS = {
Login: {
title: '登入',
component: Login,
headerShown: true,
},
LoginAgreement: {
title: '', // 协议
component: LoginAgreement,
headerShown: true,
},
AccountInfo: {
title: '账号信息',
component: AccountInfo,
headerShown: true,
headerShown: false,
},
// LoginAgreement: {
// title: '', // 协议
// component: LoginAgreement,
// headerShown: true,
// },
// AccountInfo: {
// title: '账号信息',
// component: AccountInfo,
// headerShown: true,
// },
};
......@@ -4,8 +4,8 @@ import { View } from 'react-native';
import { WebView } from 'react-native-webview';
import { useSafeAreaInsets } from 'react-native-safe-area-context';
import { RootStackScreenProps } from '../../../routers/types';
import { getManageContentNoticeGet } from '../../../services/ManageV2Api';
import type { GetManageContentNoticeGetResponse } from '../../../services/ManageV2Api';
// import { getManageContentNoticeGet } from '../../../services/ManageV2Api';
// import type { GetManageContentNoticeGetResponse } from '../../../services/ManageV2Api';
type LoginAgreementScreenNavigationProp =
RootStackScreenProps<'LoginAgreement'>;
......@@ -21,26 +21,26 @@ const LoginAgreement: React.FC<LoginAgreementScreenNavigationProp> = ({
const {
params: { id },
} = route;
const [columnTypeList, setcolumnTypeList] =
useState<GetManageContentNoticeGetResponse | null>(null);
// const [columnTypeList, setcolumnTypeList] =
// useState<GetManageContentNoticeGetResponse | null>(null);
const safeInset = useSafeAreaInsets();
const findAllByColumnType = async () => {
const res = await getManageContentNoticeGet({ id: `${id}` });
if (res.code === 1000) {
setcolumnTypeList(res.data);
navigation.setOptions({ title: res.data.title });
}
};
// const findAllByColumnType = async () => {
// const res = await getManageContentNoticeGet({ id: `${id}` });
// if (res.code === 1000) {
// setcolumnTypeList(res.data);
// navigation.setOptions({ title: res.data.title });
// }
// };
useEffect(() => {
findAllByColumnType();
// findAllByColumnType();
}, []);
return (
<View style={{ flex: 1, paddingBottom: safeInset.bottom }}>
<WebView source={{ html: columnTypeList?.content || '' }} />
{/* <WebView source={{ html: columnTypeList?.content || '' }} /> */}
</View>
);
};
......
......@@ -2,10 +2,10 @@ import React, { useEffect, useState } from 'react';
import { View, TextInput, Text, TouchableOpacity } from 'react-native';
import Icons from 'react-native-vector-icons/AntDesign';
import Toast from 'react-native-root-toast';
import {
postMemberMobileWechatAppletSends,
getMemberMobileRegisterCountryList,
} from '../../../../services/MemberV2Api';
// import {
// postMemberMobileWechatAppletSends,
// getMemberMobileRegisterCountryList,
// } from '../../../../services/MemberV2Api';
import useAppStyle from '../../../../hooks/useAppStyle';
import AreaCodePopup from '../../../../components/AreaCodePopup';
import type { AreaCodeOption } from '../../../../components/AreaCodePopup';
......@@ -43,16 +43,16 @@ const MobileView: React.FC<any> = (props: Iprops) => {
});
const [countryList, setCountryList] = useState<AreaCodeOption[]>([]);
const fetchCountryList = () => {
getMemberMobileRegisterCountryList().then(res => {
if (res.code === 1000) {
setCountryList(res.data);
}
});
};
// const fetchCountryList = () => {
// getMemberMobileRegisterCountryList().then(res => {
// if (res.code === 1000) {
// setCountryList(res.data);
// }
// });
// };
useEffect(() => {
fetchCountryList();
// fetchCountryList();
}, []);
/* 倒计时 */
......@@ -73,24 +73,24 @@ const MobileView: React.FC<any> = (props: Iprops) => {
};
// 获取国家代码和手机号码位数
const getcode = async () => {
const phone = from.phone;
if (!btnDisabled) {
if (!phone) {
Toast.show('请输入手机号码', { position: Toast.positions.CENTER });
} else {
const param = {
countryCode,
phone,
};
const res = await postMemberMobileWechatAppletSends(param);
if (res.code === 1000) {
hanleCountdown();
Toast.show('发送成功', { position: Toast.positions.CENTER });
}
}
}
};
// const getcode = async () => {
// const phone = from.phone;
// if (!btnDisabled) {
// if (!phone) {
// Toast.show('请输入手机号码', { position: Toast.positions.CENTER });
// } else {
// const param = {
// countryCode,
// phone,
// };
// const res = await postMemberMobileWechatAppletSends(param);
// if (res.code === 1000) {
// hanleCountdown();
// Toast.show('发送成功', { position: Toast.positions.CENTER });
// }
// }
// }
// };
const setKey = (val: string, key: string) => {
const fromData = from;
......@@ -156,7 +156,7 @@ const MobileView: React.FC<any> = (props: Iprops) => {
style={myStyle['mobileView-fromItem-input']}
/>
<TouchableOpacity
onPress={getcode}
// onPress={getcode}
activeOpacity={0.8}
style={myStyle['mobileView-srmCode']}
>
......
......@@ -62,7 +62,7 @@ export default () =>
},
'mobileView-submit': {
marginTop: 30,
backgroundColor: '#EA5504',
backgroundColor: '#00A990',
borderRadius: 8,
paddingVertical: 10,
},
......
......@@ -62,6 +62,7 @@ const SingView: React.FC<any> = (props: Iprops) => {
style={myStyle['mobileView-fromItem-input']}
/>
</View>
<View style={myStyle['mobileView-fromFlex']}>
<TextInput
value={from.password}
......@@ -81,6 +82,7 @@ const SingView: React.FC<any> = (props: Iprops) => {
/>
</TouchableOpacity>
</View>
<TouchableOpacity
style={myStyle['mobileView-submit']}
onPress={login}
......
......@@ -51,7 +51,7 @@ export default () =>
},
'mobileView-submit': {
marginTop: 30,
backgroundColor: '#EA5504',
backgroundColor: '#00A990',
borderRadius: 8,
paddingVertical: 10,
},
......
......@@ -4,16 +4,16 @@ import Toast from 'react-native-root-toast';
import { setAsyncStorage } from '../../utils/storage';
import { encryptedByAES, decryptedByAES } from '../../utils/cryptoAes';
import { useStores } from '../../hooks/useStores';
import {
postMemberMobileWechatAppletLoginPhone,
postMemberMobileWechatAppletLoginAccount,
} from '../../services/MemberV2Api';
import { getManageContentNoticeFindWithOutContent } from '../../services/ManageV2Api';
// import {
// postMemberMobileWechatAppletLoginPhone,
// postMemberMobileWechatAppletLoginAccount,
// } from '../../services/MemberV2Api';
// import { getManageContentNoticeFindWithOutContent } from '../../services/ManageV2Api';
import useAppStyle from '../../hooks/useAppStyle';
import { RootStackScreenProps } from '../../routers/types';
import { USER_INFO } from '../../constants';
import Checkbox from '../../components/Checkbox';
import zhongranLogo from '../../../assets/images/zhongran_logo.png';
import zhongranLogo from '../../../assets/images/gaohuaxue_logo.png';
import MobileView from './components/Mobile';
import SingView from './components/Sing';
import styles from './styles';
......@@ -30,57 +30,59 @@ const Login: React.FC<LoginScreenNavigationProp> = ({ navigation }) => {
const { userStore } = useStores();
const onSubmit = async (data: any) => {
if (!select) {
Toast.show('请阅读并同意相关协议', { position: Toast.positions.CENTER });
return;
}
let fn: Function | null = null;
let obj: any = {};
// const onSubmit = async (data: any) => {
// if (!select) {
// Toast.show('请阅读并同意相关协议', { position: Toast.positions.CENTER });
// return;
// }
// let fn: Function | null = null;
// let obj: any = {};
switch (current) {
case 1:
fn = postMemberMobileWechatAppletLoginPhone;
break;
default:
fn = postMemberMobileWechatAppletLoginAccount;
obj.account = data.account;
obj.password = encryptedByAES(data.password);
obj.shopType = data.shopType;
break;
}
fn?.(current === 1 ? data : obj).then(res => {
if (res.code === 1000) {
setAsyncStorage(USER_INFO, res.data);
// userStore.setUserInfo(res.data);
navigation.replace('BottomTabs', { screen: 'Home' });
return;
} else {
if (current === 1) {
obj.password = decryptedByAES(obj.password);
}
Toast.show(res.message, { position: Toast.positions.CENTER });
return;
}
});
};
// switch (current) {
// case 1:
// fn = postMemberMobileWechatAppletLoginPhone;
// break;
// default:
// fn = postMemberMobileWechatAppletLoginAccount;
// obj.account = data.account;
// obj.password = encryptedByAES(data.password);
// obj.shopType = data.shopType;
// break;
// }
// fn?.(current === 1 ? data : obj).then(res => {
// if (res.code === 1000) {
// setAsyncStorage(USER_INFO, res.data);
// // userStore.setUserInfo(res.data);
// navigation.replace('BottomTabs', { screen: 'Home' });
// return;
// } else {
// if (current === 1) {
// obj.password = decryptedByAES(obj.password);
// }
// Toast.show(res.message, { position: Toast.positions.CENTER });
// return;
// }
// });
// };
const findAllByColumnType = async () => {
const { code, data, message } =
await getManageContentNoticeFindWithOutContent({ columnType: '2' });
if (code === 1000) {
setColumnTypeList(data);
} else {
Toast.show(message, { position: Toast.positions.CENTER });
}
};
// const findAllByColumnType = async () => {
// const { code, data, message } =
// await getManageContentNoticeFindWithOutContent({ columnType: '2' });
// if (code === 1000) {
// setColumnTypeList(data);
// } else {
// Toast.show(message, { position: Toast.positions.CENTER });
// }
// };
const renderComponentByType = () => {
switch (current) {
case 0:
return <SingView submit={onSubmit} />;
// return <SingView submit={onSubmit} />;
return <SingView />;
case 1:
return <MobileView submit={onSubmit} />;
// return <MobileView submit={onSubmit} />;
return <MobileView />;
default:
return null;
}
......@@ -91,14 +93,15 @@ const Login: React.FC<LoginScreenNavigationProp> = ({ navigation }) => {
};
useEffect(() => {
findAllByColumnType();
// findAllByColumnType();
}, []);
return (
<View style={myStyle.container}>
<View style={myStyle.head}>
<Image source={zhongranLogo} style={myStyle.logo} />
<Text style={myStyle.logoTitle}>欢迎来到慧售卖</Text>
<Text style={myStyle.logoTitle}>你好,</Text>
<Text style={myStyle.logoTitle}>欢迎来到高化学商城</Text>
</View>
{/* 登录方式 */}
<View style={myStyle.loginType}>
......@@ -131,7 +134,7 @@ const Login: React.FC<LoginScreenNavigationProp> = ({ navigation }) => {
<Checkbox checked={select} onChange={value => setSelect(value)} />
</View>
<View style={myStyle['sign-signFlex']}>
<Text style={myStyle['sign-signText']}>阅读并同意</Text>
<Text style={myStyle['sign-signText']}>登录即代表您已同意</Text>
{columnTypeList.map((items: any) => (
<Text
key={items.id}
......
......@@ -25,7 +25,7 @@ export default (theme: ThemeStyle) =>
logoTitle: {
fontSize: 24,
color: '#303133',
marginTop: 12,
fontWeight: '500',
},
loginType: {
marginTop: 20,
......@@ -55,7 +55,8 @@ export default (theme: ThemeStyle) =>
sign: {
flexDirection: 'row',
alignItems: 'center',
marginTop: 182,
// marginTop: 182,
marginTop: 100,
},
'sign-signFlex': {
flexDirection: 'row',
......
......@@ -3274,6 +3274,13 @@ eslint-plugin-prettier@3.1.2:
dependencies:
prettier-linter-helpers "^1.0.0"
eslint-plugin-prettier@^4.2.1:
version "4.2.1"
resolved "http://npm.shushangyun.com/eslint-plugin-prettier/-/eslint-plugin-prettier-4.2.1.tgz#651cbb88b1dab98bfd42f017a12fa6b2d993f94b"
integrity sha512-f/0rXLXUt0oFYs8ra4w49wYZBG5GKZpAYsJSm6rnYL5uVDjd+zowwMwVZHnAjf4edNrKpCDYfXDgmRE/Ak7QyQ==
dependencies:
prettier-linter-helpers "^1.0.0"
eslint-plugin-react-hooks@^4.0.4:
version "4.6.0"
resolved "http://npm.shushangyun.com/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-4.6.0.tgz#4c3e697ad95b77e93f8646aaa1630c1ba607edd3"
......
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