Commit 89549cd6 authored by 前端-钟卫鹏's avatar 前端-钟卫鹏
parents a1631a4f 8658e678
...@@ -37,6 +37,10 @@ const router = [ ...@@ -37,6 +37,10 @@ const router = [
{ {
path: '/user/forget', path: '/user/forget',
component: '@/pages/user/forgetPwd' component: '@/pages/user/forgetPwd'
},
{
path: '/user/agreement',
component: '@/pages/user/agreement'
} }
] ]
}, },
......
...@@ -149,6 +149,7 @@ ...@@ -149,6 +149,7 @@
} }
&>span { &>span {
cursor: pointer;
margin: 0 15px; margin: 0 15px;
} }
} }
......
...@@ -92,6 +92,18 @@ const InformationDetail: React.FC<InformationDetailPropsType> = (props) => { ...@@ -92,6 +92,18 @@ const InformationDetail: React.FC<InformationDetailPropsType> = (props) => {
} }
} }
const lastLinkPath = (lastContentLabel: any) => {
if (lastContentLabel) {
window.location.href = toDetailLink(lastContentLabel.id)
}
}
const nextLinkPath = (nextContentLabel: any) => {
if (nextContentLabel) {
window.location.href = toDetailLink(nextContentLabel.id)
}
}
return ( return (
<div className={styles.information_detail}> <div className={styles.information_detail}>
<div className={styles.information_detail_container}> <div className={styles.information_detail_container}>
...@@ -141,7 +153,7 @@ const InformationDetail: React.FC<InformationDetailPropsType> = (props) => { ...@@ -141,7 +153,7 @@ const InformationDetail: React.FC<InformationDetailPropsType> = (props) => {
<div className={cx(styles.information_detail_pagination_item, styles.left)}> <div className={cx(styles.information_detail_pagination_item, styles.left)}>
<div className={cx(styles.information_detail_pagination_item_line, styles.left)}> <div className={cx(styles.information_detail_pagination_item_line, styles.left)}>
<div className={cx(styles.arrow_icon, styles.left)}></div> <div className={cx(styles.arrow_icon, styles.left)}></div>
<span>上一篇</span> <span onClick={() => lastLinkPath(newsDetail.lastContentLabel)}>上一篇</span>
</div> </div>
{ {
newsDetail.lastContentLabel ? <a href={toDetailLink(newsDetail.lastContentLabel.id)}>{newsDetail.lastContentLabel.title}</a> : <span>没有了</span> newsDetail.lastContentLabel ? <a href={toDetailLink(newsDetail.lastContentLabel.id)}>{newsDetail.lastContentLabel.title}</a> : <span>没有了</span>
...@@ -150,7 +162,7 @@ const InformationDetail: React.FC<InformationDetailPropsType> = (props) => { ...@@ -150,7 +162,7 @@ const InformationDetail: React.FC<InformationDetailPropsType> = (props) => {
<div className={styles.information_detail_pagination_split}></div> <div className={styles.information_detail_pagination_split}></div>
<div className={cx(styles.information_detail_pagination_item, styles.right)}> <div className={cx(styles.information_detail_pagination_item, styles.right)}>
<div className={cx(styles.information_detail_pagination_item_line, styles.right)}> <div className={cx(styles.information_detail_pagination_item_line, styles.right)}>
<span>下一篇</span> <span onClick={() => nextLinkPath(newsDetail.nextContentLabel)}>下一篇</span>
<div className={cx(styles.arrow_icon, styles.right)}></div> <div className={cx(styles.arrow_icon, styles.right)}></div>
</div> </div>
{ {
......
...@@ -293,11 +293,11 @@ const Order: React.FC<OrderPropsType> = (props) => { ...@@ -293,11 +293,11 @@ const Order: React.FC<OrderPropsType> = (props) => {
setConfirmLoading(true) setConfirmLoading(true)
PublicApi.postOrderProcurementOrderAdd(params).then(res => { PublicApi.postOrderProcurementOrderAdd(params).then(res => {
if (res.code === 1000) { if (res.code === 1000) {
if (res.data.isPay === 0) { if (res.data.isPay === 1) {
const data = res.data const data = res.data
history.push(`/pay?orderId=${data.orderId}`) history.push(`/pay?orderId=${data.orderId}`)
} else { } else {
history.push(`/memberCenter/tranactionAbility/purchaseOrder/readyAddOrder/orderDetail?modelType=5&spam_id=${spam_id}`) history.push(`/memberCenter/tranactionAbility/purchaseOrder/orderDetail?modelType=5&spam_id=${spam_id}`)
} }
} }
setConfirmLoading(false) setConfirmLoading(false)
...@@ -368,7 +368,6 @@ const Order: React.FC<OrderPropsType> = (props) => { ...@@ -368,7 +368,6 @@ const Order: React.FC<OrderPropsType> = (props) => {
if (res.code === 1000) { if (res.code === 1000) {
if (res.data.state === 4) { if (res.data.state === 4) {
clearTimeout(timer) clearTimeout(timer)
setAgreeSignLoading(false)
submitOrder() submitOrder()
} else { } else {
timer = setTimeout(() => { timer = setTimeout(() => {
......
...@@ -9,4 +9,26 @@ ...@@ -9,4 +9,26 @@
margin: 0 auto; margin: 0 auto;
} }
}
.errmsg {
text-align: center;
padding: 200px 0;
font-size: 16px;
}
.backbtn {
background: var(--mall_main_color);
border: none;
outline: none;
color: #ffffff;
&:hover,
&:active {
background: var(--mall_main_color);
color: #ffffff;
}
} }
\ No newline at end of file
...@@ -10,6 +10,7 @@ import { PublicApi } from '@/services/api' ...@@ -10,6 +10,7 @@ import { PublicApi } from '@/services/api'
import { GetOrderOrderPayDetailsResponse } from '@/services/OrderApi' import { GetOrderOrderPayDetailsResponse } from '@/services/OrderApi'
import { LAYOUT_TYPE } from '@/constants' import { LAYOUT_TYPE } from '@/constants'
import styles from './index.less' import styles from './index.less'
import { message, Button } from 'antd'
interface PayPagePropsType { interface PayPagePropsType {
location: any; location: any;
...@@ -51,6 +52,7 @@ const PayPage: React.FC<PayPagePropsType> = (props) => { ...@@ -51,6 +52,7 @@ const PayPage: React.FC<PayPagePropsType> = (props) => {
const [pageTitle, setPageTitle] = useState<string>() const [pageTitle, setPageTitle] = useState<string>()
const [payType] = useState<string | number>(PayWayType.bank) const [payType] = useState<string | number>(PayWayType.bank)
const [payInfo, setPayInfo] = useState<GetOrderOrderPayDetailsResponse>() const [payInfo, setPayInfo] = useState<GetOrderOrderPayDetailsResponse>()
const [errMsg, setErrMsg] = useState<string>('')
useEffect(() => { useEffect(() => {
if (orderId) { if (orderId) {
...@@ -60,9 +62,12 @@ const PayPage: React.FC<PayPagePropsType> = (props) => { ...@@ -60,9 +62,12 @@ const PayPage: React.FC<PayPagePropsType> = (props) => {
const fetchOrderInfo = () => { const fetchOrderInfo = () => {
PublicApi.getOrderOrderPayDetails({ id: orderId }).then(res => { PublicApi.getOrderOrderPayDetails({ id: orderId }).then(res => {
message.destroy()
if (res.code === 1000) { if (res.code === 1000) {
setPayInfo(res.data) setPayInfo(res.data)
setPageTitle(getPayTypeTitle(res.data.paymentChannelsId)) setPageTitle(getPayTypeTitle(res.data.paymentChannelsId))
} else {
setErrMsg(res.message)
} }
}) })
} }
...@@ -89,6 +94,9 @@ const PayPage: React.FC<PayPagePropsType> = (props) => { ...@@ -89,6 +94,9 @@ const PayPage: React.FC<PayPagePropsType> = (props) => {
return null return null
} }
} }
const backHome = () => {
window.location.href = '/'
}
return payInfo ? ( return payInfo ? (
<div className={styles.pay}> <div className={styles.pay}>
...@@ -102,7 +110,16 @@ const PayPage: React.FC<PayPagePropsType> = (props) => { ...@@ -102,7 +110,16 @@ const PayPage: React.FC<PayPagePropsType> = (props) => {
} }
</div> </div>
</div> </div>
) : null ) : <div>
<CommonHeader
logoUrl={(layoutType === LAYOUT_TYPE.channel || layoutType === LAYOUT_TYPE.ichannel) ? shopInfo?.logo : mallInfo.logoUrl}
title="支付错误"
/>
<div className={styles.errmsg}>
<p>{errMsg}</p>
<Button type="primary" className={styles.backbtn} onClick={() => backHome()}>返回首页</Button>
</div>
</div>
} }
export default PayPage export default PayPage
@import '~@/global/styles/global.less';
.policyBox {
width: 100%;
// height: 100vh;
background-color: #fff;
&_container {
width: 1200px;
margin: 0 auto;
}
&>h1 {
.font-height-color(24, 96, #303133, #F4F5F7);
.make-center(text)
}
& article {
padding-bottom: 200px;
h4 {
width: 96px;
.font-height-color(16, 48, #303133);
font-weight: 500;
margin-top: 24px;
}
p {
font-size: 14px;
color: rgba(66, 82, 110, 1);
line-height: 22px;
}
}
}
\ No newline at end of file
import React from 'react'
import styles from './index.less'
const Agreement: React.FC = () => {
return (
<div className={styles.policyBox}>
<h1>隐私政策</h1>
<div className={styles.policyBox_container}>
<article>
<h4>一、权利归属</h4>
<main>
<p>1.1. 涂鸦网站的Logo、“涂鸦”、“涂鸦智能”、“tuya”等文字、图形及其组合,以及涂鸦网站的其他标识、徽记、涂鸦服务的名称等为涂鸦及其关联公司在中国和其他国家的注册商标。未经涂鸦书面授权,任何人不得以任何方式展示、使用或做其他处理(包括但不限于复制、传播、展示、镜像、上传、下载),也不得向他人表明您有权展示、使用或做其他处理。</p>
<p>1.2. 涂鸦网站所有的产品、服务、技术与所有程序(以下或简称“技术服务”)的知识产权均归属于涂鸦或归其权利人所有。</p>
<p>1.3. 除非涂鸦另行声明,涂鸦拥有涂鸦在网站内发布文档等信息(包括但不限于文字、图形、图片、照片、音频、视频、图标、色彩、版面设计、电子文档)的所有权利(包括但不限于版权、商标权、专利权、商业秘密和其他所有相关权利)。未经涂鸦许可,任何人不得擅自使用如上内容(包括但不限于通过程序或设备监视、复制、转播、展示、镜像、上传、下载涂鸦网站内的任何内容)。被授权浏览、复制、打印和传播属于涂鸦网站内信息内容的,该等内容都不得用于商业目的且所有信息内容及其任何部分的使用都必须包括此权利声明。</p>
</main>
<h4>二、责任限制</h4>
<main>
<p>2.1. 涂鸦网站的Logo、“涂鸦”、“涂鸦智能”、“tuya”等文字、图形及其组合,以及涂鸦网站的其他标识、徽记、涂鸦服务的名称等为涂鸦及其关联公司在中国和其他国家的注册商标。未经涂鸦书面授权,任何人不得以任何方式展示、使用或做其他处理(包括但不限于复制、传播、展示、镜像、上传、下载),也不得向他人表明您有权展示、使用或做其他处理。</p>
<p>2.2. 涂鸦网站所有的产品、服务、技术与所有程序(以下或简称“技术服务”)的知识产权均归属于涂鸦或归其权利人所有。</p>
<p>2.3. 除非涂鸦另行声明,涂鸦拥有涂鸦在网站内发布文档等信息(包括但不限于文字、图形、图片、照片、音频、视频、图标、色彩、版面设计、电子文档)的所有权利(包括但不限于版权、商标权、专利权、商业秘密和其他所有相关权利)。未经涂鸦许可,任何人不得擅自使用如上内容(包括但不限于通过程序或设备监视、复制、转播、展示、镜像、上传、下载涂鸦网站内的任何内容)。被授权浏览、复制、打印和传播属于涂鸦网站内信息内容的,该等内容都不得用于商业目的且所有信息内容及其任何部分的使用都必须包括此权利声明。</p>
</main>
</article>
</div>
</div>
)
}
export default Agreement
...@@ -216,7 +216,12 @@ const UserRegistry = () => { ...@@ -216,7 +216,12 @@ const UserRegistry = () => {
current: false, current: false,
phoneBefore: <div className={'formBefore'}>+86</div>, phoneBefore: <div className={'formBefore'}>+86</div>,
smsCodeAfter: <Button disabled={isActive} style={{ minWidth: 110, marginLeft: 8 }} size='large' onClick={start}>{text}</Button>, smsCodeAfter: <Button disabled={isActive} style={{ minWidth: 110, marginLeft: 8 }} size='large' onClick={start}>{text}</Button>,
checkBoxChildren: <span style={{ fontSize: 12 }}>阅读并同意<span className='commonPickColor'>《会员服务协议》《法律条款》《隐私政策》</span></span>, checkBoxChildren: <span style={{ fontSize: 12 }}>阅读并同意<span className='commonPickColor'>
<a href="/user/agreement" target="_blank">《会员服务协议》</a>
<a href="/user/agreement" target="_blank">《法律条款》</a>
<a href="/user/agreement" target="_blank">《隐私政策》</a>
</span>
</span>,
memberTypeTitle: <span className={'commonPanelTitle'}>请选择您的身份</span>, memberTypeTitle: <span className={'commonPanelTitle'}>请选择您的身份</span>,
businessTypeTitle: <span className={'commonPanelTitle'}>请选择您要开展的业务</span>, businessTypeTitle: <span className={'commonPanelTitle'}>请选择您要开展的业务</span>,
}} }}
......
...@@ -41,8 +41,9 @@ const errorMessage: httpStatus = { ...@@ -41,8 +41,9 @@ const errorMessage: httpStatus = {
const errorHandler = (error: ResponseError): IRequestError => { const errorHandler = (error: ResponseError): IRequestError => {
const { response } = error const { response } = error
// http状态码非200的错误处理 // http状态码非200的错误处理
const messageText = errorMessage[response.status] const messageText = response.status ? errorMessage[response.status] : ''
if (response) { if (response) {
message.destroy()
message.error('http请求错误: ' + response.status + '->' + messageText, 3) message.error('http请求错误: ' + response.status + '->' + messageText, 3)
} }
// throw可令响应promise走catch, 如需走resolve需直接return // throw可令响应promise走catch, 如需走resolve需直接return
......
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