Commit 077c4c03 by 肖康

网站注册调整

parent dfcc7742
......@@ -59,11 +59,15 @@ const SearchH = () => {
<div className={`${styles.cons} row bothSide boxsiz`}>
<Link href='/'><img className={styles.logoImg} src='/images/logo.png' alt='' /></Link>
<div className={`${styles.searchInputBox} row boxsiz`}>
{
router.pathname=="/login"|| router.pathname=="/reg"?'':
<div className={`${styles.searchInputBox} row boxsiz`}>
<input type='text' className={`${styles.inputGoods} boxsiz`} value={key} onKeyPress={(e) => { handleKeyPress(e.key) }} onChange={(e) => { setKey(e.target.value) }} placeholder='请输入元器件型号、参数查找' />
<input type='text' className={`${styles.inputNums} boxsiz`} value={num} placeholder='需求数量' onKeyPress={(e) => { handleKeyPress(e.key) }} onChange={(e) => { changeNum(e) }} />
<div className={`${styles.searchbtn} row rowCenter verCenter`} onClick={goSearch}><i className='icon iconfont icon-iconfontsousuo '></i></div>
</div>
</div>
}
<>
<ShopCart></ShopCart>
{/* <div>
......
......@@ -21,7 +21,7 @@ const TopH=()=>{
useEffect(() => {
setBackUrl(encodeURIComponent(window.location.href));
if(router.pathname=="/login"||router.pathname=="/passwordRecover"){
if(router.pathname=="/login"||router.pathname=="/passwordRecover"||router.pathname=="/reg"||router.pathname=="/regChoose"){
setTopheadtype("1")
}
}, [router.asPath]);
......@@ -54,7 +54,7 @@ const TopH=()=>{
<>
<Link href={'/login?type=1&backUrl='+backUrl}>立即登录</Link>
<span className={styles.line}></span>
<Link href={'/login?type=2&backUrl='+backUrl}>立即注册</Link>
<Link href={'/reg?backUrl='+backUrl}>立即注册</Link>
<span className={styles.line}></span>
</>
) : (
......
......@@ -2,5 +2,5 @@ const os = require('os');
export const QQURL='https://wpa.qq.com/msgrd?v=3&amp;uin=1908059998&amp;site=qq&amp;menu=yes'
export const API_URL=((os.hostname()=="MS-NDPSTQVAWPAX"||os.hostname()=="dev235"||os.hostname()=="localhost"||os.hostname()=="erpweb.liexindev.com")?'http://erpweb.liexindev.net':'http://api.chiplinks.net')
export const API_URL=((os.hostname()=="192.168.1.62"||os.hostname()=="MS-NDPSTQVAWPAX"||os.hostname()=="dev235"||os.hostname()=="localhost"||os.hostname()=="erpweb.liexindev.com")?'http://erpweb.liexindev.net':'http://api.chiplinks.net')
......@@ -44,7 +44,8 @@ export const useSeoTitle = (props?:any) => {
'/about.html': { title: '关于我们' },
'/contact.html': { title: '联系我们' },
'/notice.html': { title: '公告' },
'/login': { title: '登录/注册' },
'/login': { title: '登录' },
'/reg': { title: '注册' },
'/regChoose': { title: '注册发票' },
'/customer': { title: '会员中心' ,needLogin:true},
'/myOrder': { title: '我的订单',needLogin:true },
......
......@@ -137,22 +137,26 @@ const Page = () => {
messageRef.current("登录成功")
loginRequest({ url: '/api/userInfo/userInvoiceList?limit=100', method: 'get'}).then((res) => {
if (res?.code === 0) {
if(res?.data?.list.length>0){
if(query.backUrl){
window.location.href=String(query.backUrl)
return
}
router.push("/")
}else{
router.push("/regChoose?backUrl="+encodeURIComponent(String(query.backUrl)))
}
} else {
messageRef.current(res?.msg)
}
})
if(query.backUrl){
window.location.href=String(query.backUrl)
return
}
router.push("/")
// loginRequest({ url: '/api/userInfo/userInvoiceList?limit=100', method: 'get'}).then((res) => {
// if (res?.code === 0) {
// if(res?.data?.list.length>0){
// if(query.backUrl){
// window.location.href=String(query.backUrl)
// return
// }
// router.push("/")
// }else{
// router.push("/regChoose?backUrl="+encodeURIComponent(String(query.backUrl)))
// }
// } else {
// messageRef.current(res?.msg)
// }
// })
}
......@@ -216,7 +220,7 @@ const Page = () => {
</div>
<button type="submit" className={style.loginButton} >登录</button>
<div className={style.registerButton}>
<span className={style.cursorPointer} onClick={() => handleTypeChange('2')}>立即注册</span>
<Link href="/reg" className={style.cursorPointer} >立即注册</Link>
</div>
</>
) : (
......@@ -231,7 +235,7 @@ const Page = () => {
<input type="contacts_tel" value={count} className={style.areaInput} placeholder='请输入手机号' onChange={handleCountChange} required />
</div>
<div>
<input type="password" value={code} className={style.registerInput} placeholder='请输入短信验证码' onChange={handleCodeChange} required />
<input type="text" value={code} className={style.registerInput} placeholder='请输入短信验证码' onChange={handleCodeChange} required />
<button className={codeText=='发送验证码'?`${style.codeButton }`:`${style.codeButton } ${style.dis}`} onClick={handleCodeSend}>{codeText}</button>
</div>
<div className={style.registerTips}>未注册的手机号将自动完成注册</div>
......
......@@ -81,21 +81,21 @@ const TopH = (props: { cateList: ResponseTypeCateList }) =>{
handleDataInit()
}, [query,sourceType])
// useEffect(() => {
// if(userInfo){return}
// userRequest({ url: '/api/userInfo/userInfo', method: 'get', data: { } }).then((res) => {
useEffect(() => {
if(userInfo){return}
userRequest({ url: '/api/userInfo/userInfo', method: 'get', data: { } }).then((res) => {
// if (res?.code === 0) {
// setUserInfo(res?.data)
// if(res?.data.audit_status!=1){
// message("请先审核用户发票!",3000)
// }
// }else{
// message(res?.msg)
// }
// })
if (res?.code === 0) {
setUserInfo(res?.data)
if(res?.data.audit_status!=1){
message("请先审核用户发票!",3000)
}
}else{
message(res?.msg)
}
})
// }, [])
}, [])
useEffect(() => {
handleInvoiceInit()
handleAddressInit()
......@@ -189,10 +189,10 @@ const TopH = (props: { cateList: ResponseTypeCateList }) =>{
}
const handleOrderSubmit = async () => {
// if(userInfo?.audit_status!=1){
// message("请先审核用户发票!",3000)
// return
// }
if(userInfo?.audit_status!=1){
message("请先审核用户发票!",3000)
return
}
const param = {
goods_list: disList.map((disItem:any) => {
return {
......
......@@ -205,7 +205,7 @@ const Page = () => {
<input type="contacts_tel" value={count} className={style.areaInput} placeholder='请输入手机号' onChange={handleCountChange} required />
</div>
<div>
<input type="password" value={code} className={style.registerInput} placeholder='请输入短信验证码' onChange={handleCodeChange} required />
<input type="text" value={code} className={style.registerInput} placeholder='请输入短信验证码' onChange={handleCodeChange} required />
<button className={codeText=='发送验证码'?`${style.codeButton }`:`${style.codeButton } ${style.dis}`} onClick={handleCodeSend}>{codeText}</button>
</div>
{ showMsg && (
......
.loginPage {
background: #fff;
padding: 40px 0;
height: 740px;
width: 100%;
border-top: 1px solid #FF9A00;
position: relative;
}
.loginPage .codeButton {
display: inline-block;
width: 100px;
height: 32px;
line-height: 32px;
background: #FF9A00;
border-radius: 1px;
font-size: 14px;
color: #FFFFFF;
cursor: pointer;
vertical-align: center;
}
.loginPage .codeButton.dis {
background: #ccc;
cursor: not-allowed;
}
.loginPage .loginBox {
width: 500px;
height: 100%;
position: absolute;
left: 50%;
transform: translate(-50%);
text-align: center;
}
.loginPage .loginBox .typeBox {
padding: 10px 110px 22px 200px;
display: flex;
justify-content: space-between;
cursor: pointer;
}
.loginPage .loginBox .typeBox .typeButton {
color: #808080;
}
.loginPage .loginBox .typeBox .typeButton:hover {
color: #FF9A00;
}
.loginPage .loginBox .typeBox .typeButtonChoosen {
color: #FF9A00;
font-weight: bold;
}
.loginPage .loginButton {
width: 300px;
height: 36px;
background: #FF9A00;
border-radius: 1px;
font-size: 18px;
color: #FFFFFF;
cursor: pointer;
position: relative;
left: 50px;
}
.loginPage .modalContent {
padding: 30px 0;
box-sizing: border-box;
}
.loginPage .modalContent :global .ant-form-item {
margin-bottom: 20px;
}
.loginPage .modalContent :global .ant-select-selection-item {
text-align: left !important;
}
.loginPage{background:#fff;padding:40px 0;height:740px;width:100%;border-top:1px solid #FF9A00;position:relative}.loginPage .codeButton{display:inline-block;width:100px;height:32px;line-height:32px;background:#FF9A00;border-radius:1px;font-size:14px;color:#FFFFFF;cursor:pointer;vertical-align:center}.loginPage .codeButton.dis{background:#ccc;cursor:not-allowed}.loginPage .loginBox{width:500px;height:100%;position:absolute;left:50%;transform:translate(-50%);text-align:center}.loginPage .loginBox .typeBox{padding:10px 110px 22px 200px;display:flex;justify-content:space-between;cursor:pointer}.loginPage .loginBox .typeBox .typeButton{color:#808080}.loginPage .loginBox .typeBox .typeButton:hover{color:#FF9A00}.loginPage .loginBox .typeBox .typeButtonChoosen{color:#FF9A00;font-weight:bold}.loginPage .loginButton{width:300px;height:36px;background:#FF9A00;border-radius:1px;font-size:18px;color:#FFFFFF;cursor:pointer;position:relative;left:50px}.loginPage .modalContent{padding:30px 0;box-sizing:border-box}.loginPage .modalContent :global .ant-form-item{margin-bottom:20px}.loginPage .modalContent :global .ant-select-selection-item{text-align:left !important}
.loginPage{
background: #fff;
padding:40px 0;
height: 740px;
width: 100%;
border-top: 1px solid #FF9A00;
position: relative;
.codeButton {
display: inline-block;
width: 100px;
height: 32px;
line-height: 32px;
background: #FF9A00;
border-radius: 1px;
font-size: 14px;
color: #FFFFFF;
cursor: pointer;
vertical-align: center;
&.dis{
background: #ccc;
cursor: not-allowed;
}
}
.loginBox {
width: 500px;
height: 100%;
position: absolute;
left: 50%;
transform: translate(-50%);
text-align: center;
.typeBox {
padding: 10px 110px 22px 200px;
display: flex;
justify-content: space-between;
cursor: pointer;
.typeButton {
color: #808080;
&:hover {
color: #FF9A00;
}
}
.typeButtonChoosen {
color: #FF9A00;
font-weight: bold;
}
}
}
.loginButton {
width: 300px;
height: 36px;
background: #FF9A00;
border-radius: 1px;
font-size: 18px;
color: #FFFFFF;
cursor: pointer;
position: relative;
left:50px;
}
.modalContent {
padding: 30px 0;
box-sizing: border-box;
:global {
.ant-form-item {
margin-bottom:20px;
}
.ant-select-selection-item {
text-align: left !important;
}
}
}
}
\ No newline at end of file
......@@ -274,6 +274,7 @@ html {
color: #313131;
}
.ant-pagination {
display: flex;
justify-content: flex-end;
......
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 sign in to comment