master
amir hosein gorji 3 years ago
parent 98221e85ae
commit de02a9aa00
  1. BIN
      public/logo.png
  2. 4
      public/offline.html
  3. 36
      src/AppRouter.js
  4. 5
      src/Redux/actions/activation.js
  5. 3
      src/Redux/actions/transport.js
  6. 7
      src/Redux/proxy.js
  7. 9
      src/Redux/reducers/activation.js
  8. 5
      src/Redux/reducers/blog.js
  9. 5
      src/Redux/reducers/book.js
  10. 3
      src/Redux/reducers/comment.js
  11. 2
      src/Redux/reducers/file.js
  12. 4
      src/Redux/reducers/public.js
  13. 4
      src/Redux/reducers/qr.js
  14. 3
      src/Redux/reducers/transport.js
  15. 4
      src/Redux/reducers/user.js
  16. 4
      src/Redux/reducers/userFactor.js
  17. 5
      src/Redux/reducers/userProduct.js
  18. BIN
      src/assets/images/about-lg.png
  19. BIN
      src/assets/images/pic.png
  20. 9
      src/views/AR/Item/index.js
  21. 4
      src/views/AR/index.js
  22. 71
      src/views/About/index.js
  23. 39
      src/views/About/index.scss
  24. 34
      src/views/Activation/index.js
  25. 6
      src/views/Cart/DeliveryMethod/index.js
  26. 12
      src/views/Cart/Factor/index.js
  27. 20
      src/views/Cart/Table/index.js
  28. 64
      src/views/Cart/index.js
  29. 13
      src/views/Contact/index.js
  30. 2
      src/views/Faq/index.js
  31. 8
      src/views/Home/Footer/index.js
  32. 2
      src/views/Home/HomeSearch/index.js
  33. 6
      src/views/Home/HomeSlider/Simple/index.scss
  34. 6
      src/views/Home/HomeSlider/index.js
  35. 3
      src/views/Home/Navbar/Laptop/index.js
  36. 2
      src/views/Home/SingleBlog/index.js
  37. 4
      src/views/MyBooks/index.js
  38. 12
      src/views/Products/Product/index.js
  39. 4
      src/views/QR/VideoBox/index.js
  40. 4
      src/views/Support/index.js

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

@ -5,7 +5,7 @@
<meta charset="UTF-8" /> <meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" /> <meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>دعوت</title> <title>دانوین</title>
<style type="text/css"> <style type="text/css">
* { * {
box-sizing: border-box !important; box-sizing: border-box !important;
@ -75,7 +75,7 @@
<body> <body>
<div class="splash"> <div class="splash">
<img src="assets/icons/logo.png" alt="لوگو" /> <img src="logo.png" alt="لوگو" />
<span>دسترسی شما به اینترنت قطع میباشد.</span> <span>دسترسی شما به اینترنت قطع میباشد.</span>
</div> </div>
</body> </body>

@ -9,7 +9,6 @@ import {
import { connect } from "react-redux"; import { connect } from "react-redux";
import { user } from "~/Redux/actions"; import { user } from "~/Redux/actions";
import { userProduct } from "~/Redux/actions"; import { userProduct } from "~/Redux/actions";
import proxy from "./Redux/proxy"; import proxy from "./Redux/proxy";
import Home from "./views/Home/index"; import Home from "./views/Home/index";
import Faq from "./views/Faq/index"; import Faq from "./views/Faq/index";
@ -61,7 +60,8 @@ class AppRouter extends Component {
} }
componentDidMount() { componentDidMount() {
if (proxy.status()) this.props.getUserProductList(); // if (proxy.status() && this.props.userProductList == null)
// this.props.getUserProductList();
} }
render() { render() {
@ -242,44 +242,14 @@ class AppRouter extends Component {
)} )}
</Route> </Route>
<Route exact path={"/cart"}> <Route exact path={"/cart"}>
{mobile ? ( {status ? (
status ? (
this.props.userProductList.length > 0 ||
!this.state.cartControll ? (
<Cart /> <Cart />
) : (
<Redirect
to={{
pathname: "/products",
search: "cart",
}}
/>
)
) : ( ) : (
<Redirect <Redirect
to={{ to={{
pathname: "/", pathname: "/",
}} }}
/> />
)
) : status ? (
!this.state.cartControll ||
this.props.userProductList.length > 0 ? (
<Cart />
) : (
<Redirect
to={{
pathname: "/products",
search: "cart",
}}
/>
)
) : (
<Redirect
to={{
pathname: "/auth",
}}
/>
)} )}
</Route> </Route>
<Route exact path={"/mybooks"}> <Route exact path={"/mybooks"}>

@ -10,6 +10,11 @@ const activation = {
await proxy.put("activation/update", data); await proxy.put("activation/update", data);
await proxy.get("activation/list", data2, { dispatch }); await proxy.get("activation/list", data2, { dispatch });
}, },
updateStatus:
(data = {}) =>
async (dispatch) => {
await proxy.put("activation/updateStatus", data, { dispatch });
},
add: add:
(data = {}) => (data = {}) =>
async (dispatch) => { async (dispatch) => {

@ -24,8 +24,7 @@ const transport = {
(data = {}, data2 = {}, data3 = {}) => (data = {}, data2 = {}, data3 = {}) =>
async (dispatch) => { async (dispatch) => {
await proxy.post("transport/setTransport", data); await proxy.post("transport/setTransport", data);
await proxy.get("userFactor/info", data3, { dispatch }); await proxy.get("userFactor/info", data2, { dispatch });
await proxy.get("transport/list", data2, { dispatch });
}, },
del: del:
(data = {}, data2 = {}) => (data = {}, data2 = {}) =>

@ -59,7 +59,11 @@ class Proxy {
} }
break; break;
default: default:
dispatch({ type: "error", data: response.data, params }); dispatch({
type: url.split("/")[0] + "/" + "error",
data: response.data,
params,
});
} }
return false; return false;
}; };
@ -68,6 +72,7 @@ class Proxy {
let refresh = localStorage.getItem("refresh"); let refresh = localStorage.getItem("refresh");
if (!refresh) window.location.href = "/"; if (!refresh) window.location.href = "/";
let login = await this.login( let login = await this.login(
"user/login",
{}, {},
{ headers: { Authorization: `Bearer ${refresh}` } } { headers: { Authorization: `Bearer ${refresh}` } }
); );

@ -4,6 +4,7 @@ const initialState = {
loading: false, loading: false,
error: null, error: null,
list: [], list: [],
updateStatus: false,
}; };
export default function activation(state = initialState, action) { export default function activation(state = initialState, action) {
let { type, data } = action; let { type, data } = action;
@ -12,14 +13,18 @@ export default function activation(state = initialState, action) {
return { ...state, loading: false, list: data, error: null }; return { ...state, loading: false, list: data, error: null };
case "activation/update": case "activation/update":
return { ...state, loading: false, error: null }; return { ...state, loading: false, error: null };
case "activation/updateStatus":
toast.success("کتاب شما با موفقیت فعال گردید.");
return { ...state, loading: false, error: null, updateStatus: true };
case "activation/add": case "activation/add":
toast.sucess("کتاب شما با موفقیت فعال گردید."); toast.success("کتاب شما با موفقیت فعال گردید.");
return { ...state, loading: false, error: null }; return { ...state, loading: false, error: null };
case "activation/delete": case "activation/delete":
return { ...state, loading: false, error: null }; return { ...state, loading: false, error: null };
case "loading": case "loading":
return { ...state, loading: true }; return { ...state, loading: true };
case "error": case "activation/error":
toast.error(data.message);
return { ...state, loading: false, error: data.message }; return { ...state, loading: false, error: data.message };
default: default:
return state; return state;

@ -1,3 +1,5 @@
import { toast } from "react-toastify";
const initialState = { const initialState = {
loading: false, loading: false,
error: null, error: null,
@ -17,7 +19,8 @@ export default function blog(state = initialState, action) {
///////////// /////////////
case "loading": case "loading":
return { ...state, loading: true }; return { ...state, loading: true };
case "error": case "blog/error":
toast.error(data.message);
return { ...state, loading: false, error: data.message }; return { ...state, loading: false, error: data.message };
default: default:
return state; return state;

@ -1,3 +1,5 @@
import { toast } from "react-toastify";
const initialState = { const initialState = {
loading: false, loading: false,
error: null, error: null,
@ -113,7 +115,8 @@ export default function book(state = initialState, action) {
}; };
case "loading": case "loading":
return { ...state, loading: true }; return { ...state, loading: true };
case "error": case "book/error":
toast.error(data.message);
return { ...state, loading: false, error: data.message }; return { ...state, loading: false, error: data.message };
default: default:
return state; return state;

@ -26,7 +26,8 @@ export default function comment(state = initialState, action) {
}; };
case "loading": case "loading":
return { ...state, loading: true }; return { ...state, loading: true };
case "error": case "comment/error":
toast.error(data.message);
return { ...state, loading: false, error: data.message }; return { ...state, loading: false, error: data.message };
default: default:
return state; return state;

@ -18,7 +18,7 @@ export default function file(state = initialState, action) {
}; };
case "loading": case "loading":
return { ...state, loading: true }; return { ...state, loading: true };
case "error": case "file/error":
return { ...state, loading: false, error: data.message }; return { ...state, loading: false, error: data.message };
default: default:
return state; return state;

@ -1,3 +1,4 @@
import { toast } from "react-toastify";
const initialState = { const initialState = {
homeData: [], homeData: [],
newProducts: [], newProducts: [],
@ -168,7 +169,8 @@ export default function publicApi(state = initialState, action) {
return { ...state, loading: false, error: null, blog: data }; return { ...state, loading: false, error: null, blog: data };
case "loading": case "loading":
return { ...state, loading: true }; return { ...state, loading: true };
case "error": case "public/error":
toast.error(data.message);
return { ...state, loading: false, error: data.message }; return { ...state, loading: false, error: data.message };
default: default:

@ -1,3 +1,4 @@
import { toast } from "react-toastify";
const initialState = { const initialState = {
loading: false, loading: false,
error: null, error: null,
@ -24,7 +25,8 @@ export default function qr(state = initialState, action) {
///////////// /////////////
case "loading": case "loading":
return { ...state, loading: true }; return { ...state, loading: true };
case "error": case "qr/error":
toast.error(data.message);
return { ...state, loading: false, error: data.message }; return { ...state, loading: false, error: data.message };
default: default:
return state; return state;

@ -23,7 +23,8 @@ export default function transport(state = initialState, action) {
return { ...state, loading: false, error: null }; return { ...state, loading: false, error: null };
case "loading": case "loading":
return { ...state, loading: true }; return { ...state, loading: true };
case "error": case "transport/error":
toast.error(data.message);
return { ...state, loading: false, error: data.message }; return { ...state, loading: false, error: data.message };
default: default:
return state; return state;

@ -50,8 +50,8 @@ export default function user(state = initialState, action) {
return { ...state, loading: false, error: null, setDone: true }; return { ...state, loading: false, error: null, setDone: true };
case "loading": case "loading":
return { ...state, loading: true }; return { ...state, loading: true };
case "error": case "user/error":
// toast.error(data.message); toast.error(data.message);
return { ...state, loading: false, error: data.message }; return { ...state, loading: false, error: data.message };
default: default:
return state; return state;

@ -39,8 +39,8 @@ export default function userFactor(state = initialState, action) {
return { ...state, loading: false, error: null, isVerified: true }; return { ...state, loading: false, error: null, isVerified: true };
case "loading": case "loading":
return { ...state, loading: true }; return { ...state, loading: true };
case "error": case "userFactor/error":
// toast.error(data.message); toast.error(data.message);
return { ...state, loading: false, error: data.message }; return { ...state, loading: false, error: data.message };
default: default:
return state; return state;

@ -3,7 +3,7 @@ import { toast } from "react-toastify";
const initialState = { const initialState = {
loading: false, loading: false,
error: null, error: null,
list: [], list: null,
info: null, info: null,
sum: null, sum: null,
checkEmpty: false, checkEmpty: false,
@ -44,7 +44,8 @@ export default function userProduct(state = initialState, action) {
return { ...state, loading: false, error: null }; return { ...state, loading: false, error: null };
case "loading": case "loading":
return { ...state, loading: true }; return { ...state, loading: true };
case "error": case "userProduct/error":
toast.error(data.message);
return { ...state, loading: false, error: data.message }; return { ...state, loading: false, error: data.message };
default: default:
return state; return state;

Binary file not shown.

Before

Width:  |  Height:  |  Size: 659 KiB

After

Width:  |  Height:  |  Size: 901 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 487 KiB

After

Width:  |  Height:  |  Size: 1.0 MiB

@ -38,18 +38,19 @@ export default class Item extends Component {
<> <>
{window.innerWidth < 1000 ? ( {window.innerWidth < 1000 ? (
<a <a
href={`https://ar.dnvn.ir/lunch?id=${data.id}`} href={`https://ar.dnvn.ir/lunch?id=${data.product?.ARId}`}
target="_blank" target="_blank"
rel="noreferrer"
className="mobile-products-product d-flex flex-column" className="mobile-products-product d-flex flex-column"
> >
<img <img
src={`https://dnvn.ir/api/v1/file/${data["product.book.fileIds"]}`} src={`https://dnvn.ir/api/v1/file/${data.product?.book?.fileIds}`}
alt={data.title} alt={data.title}
/> />
<div className="mobile-products-product__info d-flex flex-column"> <div className="mobile-products-product__info d-flex flex-column">
<h1 style={{ fontSize: fontSize.mobile.h1 }}> <h1 style={{ fontSize: fontSize.mobile.h1 }}>
{data["product.book.name"]}{" "} {data.product?.book?.name}{" "}
{grades[+data["product.book.gradeId"]]} {grades[+data.product?.book?.gradeId]}
</h1> </h1>
</div> </div>
</a> </a>

@ -95,7 +95,9 @@ class AR extends Component {
export default connect( export default connect(
(state) => ({ (state) => ({
arList: state.userProduct.myList || [], arList:
state.userProduct.myList.filter((product) => product.productType == 3) ||
[],
loading: state.loading, loading: state.loading,
}), }),
{ {

@ -30,40 +30,60 @@ const fontSize = {
export default class About extends Component { export default class About extends Component {
state = { state = {
first: {
title: "درباره ما",
text: "ما در دانوین با هدف ایجاد زیرساخت تعاملی و آموزشی با تولید محتوایی جذاب بصورت کتاب با کمک پلتفرم دانوین، قصد تغییراتی بنیادین در نظام آموزش و پرورش کشور داریم. دانوین پلتفرمی شامل کتاب، محتوای الکترونیکی، رویه های آموزشی، پشتیبانی علمی و نرم افزار ارائه خدمات با رویکرد مخاطب محور است.",
},
fury: { fury: {
title: "ماموریت ما در دانوین", title: " ماموریت ما در دانوین چیست ؟",
text: "لورم ایپسوم متن ساختگی با تولید سادگی نامفهوم از صنعت چاپ، و با استفاده از طراحان گرافیک است، چاپگرها و متون بلکه روزنامه و مجله در ستون و سطرآنچنان که لازم است، و برای شرایط فعلی تکنولوژی مورد نیاز، و کاربردهای متنوع با هدف بهبود ابزارهای کاربردی می باشد، کتابهای زیادی در شصت و سه درصد گذشته حال و آینده، شناخت", text: "ارتقای سطح کیفیت و جذابیت آموزش در مدارس بصورت سازگار با نظام رسمی و کنونی آ.پ در راستای نیل به اهداف سند تحول",
}, },
keywords: { keywords: {
title: "کلمات کلیدی ماموریت", title: "کیفیت آموزش را بالا میبریم",
list: [
"شایستگی در ایجاد فهم علمی در موضوع هدف و در موضوعات وابسته به آن",
"شایستگی در ایجاد زمینه ی معرفتی- ارزشی موثر برای محتواهای آموزشی",
],
},
keywords2: {
title: "جذابیت کلید بهبود یادگیری",
list: [ list: [
"کیفیت آموزش", "بکارگیری عوامل متنوع سازگار با ارزشها برای علاقمندی دانش آموز و معلم به استفاده از محتوای دانوین",
"جذابیت", "سازگار با نظام آ.پ : بطوریکه بتواند در مدارس فعلی مورد استفاده قرار گرفته و با نظام رسمی فعلی در تضاد نباشد",
"سازگار با نظام آموزش و پرورش", "در راستای نیل به سند تحول : تلاش برای نزدیکی گام به گام به آرمانها و اهداف سند تحول",
"در راستای نیل به سند تحول",
], ],
}, },
advantages: { advantages: {
title: "مزیت رقابت اصلی", title: " مزیت رقابتی دانوین",
list: [ list: [
"بکارگیری بروزترین تکنولوژی های تولید و مدیریت محتوای آموزشی-تربیتی (مانند واقعیت افزوده)", "بکارگیری بروز ترین تکنولوژی های تولید و مدیریت محتوای آموزشی-تربیتی (مانند واقعیت افزوده)",
"دارای رویکرد آموزش سرگرم کننده", "دارای رویکرد آموزش سرگرم کننده ",
"بستر تعاملی و اشتراک گذاری فیلم و محتوای آموزشی", "بستر تعاملی و اشتراک گذاری فیلم و محتوای آموزشی",
"رویکرد معرفتی - ارزشی", "رویکرد معرفتی-ارزشی",
"ویدیوهای منحصر بفرد", "• ویدئو های منحصر بفرد",
"متن گفتگو محور - روایی- قابل فهم - جذاب و سرگرم کننده", "• متن گفتگو محور ، روایی ، قابل فهم ،جذاب و سرگرم کننده",
], ],
}, },
}; };
render() { render() {
const { fury, advantages, keywords } = this.state; const { fury, advantages, keywords, keywords2, first } = this.state;
return ( return (
<> <>
{window.innerWidth > 1000 ? ( {window.innerWidth > 1000 ? (
<> <>
<div className="about d-flex flex-column align-items-center"> <div className="about d-flex flex-column align-items-center">
<Navbar page={"about"} /> <Navbar page={"about"} />
<div className="about__first d-flex">
<div className="top align-self-start">
<h1 style={{ fontSize: fontSize.desktop.h1 }}>
{first.title}
</h1>
<p style={{ fontSize: fontSize.desktop.p + 2 }}>
{first.text}
</p>
</div>
</div>
<div className="about__fury d-flex"> <div className="about__fury d-flex">
<div className="about__fury--right d-flex flex-column justify-content-center"> <div className="about__fury--right d-flex flex-column justify-content-center">
<div className="right-top align-self-start"> <div className="right-top align-self-start">
@ -72,7 +92,7 @@ export default class About extends Component {
</h1> </h1>
<p style={{ fontSize: fontSize.desktop.p }}>{fury.text}</p> <p style={{ fontSize: fontSize.desktop.p }}>{fury.text}</p>
</div> </div>
<div className="right-bottom align-self-end"> <div className="right-bottom ">
<h2 style={{ fontSize: fontSize.desktop.h2 }}> <h2 style={{ fontSize: fontSize.desktop.h2 }}>
{keywords.title} {keywords.title}
</h2> </h2>
@ -87,6 +107,21 @@ export default class About extends Component {
))} ))}
</ul> </ul>
</div> </div>
<div className="right-bottom align-self-end">
<h2 style={{ fontSize: fontSize.desktop.h2 }}>
{keywords2.title}
</h2>
<ul>
{keywords2.list.map((item, i) => (
<Fragment key={i}>
<li style={{ fontSize: fontSize.desktop.li }}>
{item}
</li>
<br />
</Fragment>
))}
</ul>
</div>
</div> </div>
<div className="about__fury--left d-flex align-items-center"> <div className="about__fury--left d-flex align-items-center">
<img <img
@ -94,9 +129,9 @@ export default class About extends Component {
src={aboutLg} src={aboutLg}
alt="عکس" alt="عکس"
/> />
{this.props.absoluteImages.map((item, i) => ( {/* {this.props.absoluteImages.map((item, i) => (
<img src={item.imageUrl} className={item.class} alt="عکس" /> <img src={item.imageUrl} className={item.class} alt="عکس" />
))} ))} */}
</div> </div>
</div> </div>
<div className="about__advantages d-flex"> <div className="about__advantages d-flex">

@ -6,14 +6,35 @@
direction: rtl; direction: rtl;
min-height: calc(100vh - 288px); min-height: calc(100vh - 288px);
padding-top: 60px; padding-top: 60px;
&__first {
margin-top: 30px;
width: 70%;
.top {
h1 {
display: inline;
letter-spacing: -2px;
font-family: numeralMedium;
background-color: #00cc69;
color: white;
text-align: center;
}
p {
margin-top: 10px;
text-align: justify;
font-family: numeralLight;
color: #6d6d6d;
letter-spacing: -1px;
}
}
}
&__fury { &__fury {
margin-top: 30px; margin-top: 30px;
width: 100%; width: 100%;
height: 650px; margin-bottom: 30px;
justify-content: space-between; justify-content: space-between;
&--right { &--right {
align-items: center; align-items: center;
width: 35%; width: 45%;
.right-top { .right-top {
h1 { h1 {
display: inline; display: inline;
@ -31,7 +52,7 @@
} }
} }
.right-bottom { .right-bottom {
margin-top: 20px; margin: 20px 60px 20px 0px;
h2 { h2 {
display: inline; display: inline;
font-family: numeralMedium; font-family: numeralMedium;
@ -53,18 +74,18 @@
} }
} }
&--left { &--left {
width: 60%; width: 50%;
height: 100%; height: 100%;
position: relative; position: relative;
& img { & img {
position: absolute; position: absolute;
} }
&__1 { &__1 {
top: 0px; top: 100px;
left: 100px; left: 00px;
z-index: 100; z-index: 100;
height: 470px; // height: 470px;
width: 470px; width: 100%;
} }
&__2 { &__2 {
left: 430px; left: 430px;
@ -93,7 +114,7 @@
width: 100%; width: 100%;
height: 300px; height: 300px;
margin-top: 50px; margin-top: 50px;
margin-bottom: 50px; margin-bottom: 10px;
justify-content: space-around; justify-content: space-around;
&--right { &--right {
width: 48%; width: 48%;

@ -35,9 +35,7 @@ class Activation extends Component {
value: null, value: null,
}; };
componentDidMount() { submitAdd() {}
this.props.add({});
}
render() { render() {
const { data } = this.props; const { data } = this.props;
@ -60,25 +58,29 @@ class Activation extends Component {
وارد تا کتاب الکترونیک آن فعالسازی شود وارد تا کتاب الکترونیک آن فعالسازی شود
</p> </p>
</div> </div>
<form <div
className="activation__form d-flex" className="activation__form d-flex"
// onSubmit={() => console.log()} // onSubmit={() => console.log()}
> >
<input <input
id="code" id="code"
type="text" type="text"
maxLength={9} maxLength={30}
autoComplete="off" autoComplete="off"
onChange={(e) => this.setState({ code: e.target.value })} onChange={(e) => this.setState({ code: e.target.value })}
style={{ fontSize: fontSize.desktop.form }} style={{ fontSize: fontSize.desktop.form }}
/> />
<button <button
style={{ fontSize: fontSize.desktop.form }} style={{ fontSize: fontSize.desktop.form }}
type="submit" onClick={() => {
this.props.updateStatus({
activationCode: this.state.code,
});
}}
> >
ثبت کد فعال سازی ثبت کد فعال سازی
</button> </button>
</form> </div>
{/* <div className="activation__support d-flex align-center"> {/* <div className="activation__support d-flex align-center">
<span> <span>
<img src={danger} /> <img src={danger} />
@ -137,7 +139,7 @@ class Activation extends Component {
<Scanner parent={this} /> <Scanner parent={this} />
)} )}
</div> */} </div> */}
<form <div
className="mobile-activation__form d-flex flex-column" className="mobile-activation__form d-flex flex-column"
// onSubmit={() => console.log()} // onSubmit={() => console.log()}
> >
@ -148,17 +150,23 @@ class Activation extends Component {
<input <input
id="code" id="code"
type="text" type="text"
maxLength={9} maxLength={30}
autoComplete="off" autoComplete="off"
onChange={(e) => this.setState({ code: e.target.value })} onChange={(e) => this.setState({ code: e.target.value })}
placeholder={"FC5DFD : مثال"} placeholder={"FC5DFD : مثال"}
style={{ fontSize: fontSize.mobile.form }} style={{ fontSize: fontSize.mobile.form }}
/> />
</div> </div>
<button style={{ fontSize: fontSize.mobile.form }} type="submit"> <button
style={{ fontSize: fontSize.mobile.form }}
// type="submit"
onClick={() => {
this.props.updateStatus({ activationCode: this.state.code });
}}
>
ثبت کد فعال سازی ثبت کد فعال سازی
</button> </button>
</form> </div>
{/* <div className="mobile-activation__support d-flex align-center"> {/* <div className="mobile-activation__support d-flex align-center">
<span> <span>
<img src={danger} /> <img src={danger} />
@ -181,4 +189,6 @@ class Activation extends Component {
} }
} }
export default connect((state) => ({}), { add: activation.add })(Activation); export default connect((state) => ({}), {
updateStatus: activation.updateStatus,
})(Activation);

@ -43,8 +43,7 @@ class DeliveryMethod extends Component {
factorId: factorInfo.id, factorId: factorInfo.id,
transportId: data.id, transportId: data.id,
}, },
{}, {}
{ id: list[0].factorId }
) )
} }
> >
@ -69,8 +68,7 @@ class DeliveryMethod extends Component {
factorId: factorInfo.id, factorId: factorInfo.id,
transportId: data.id, transportId: data.id,
}, },
{}, {}
{ id: list[0].factorId }
) )
} }
> >

@ -54,6 +54,10 @@ const Factor = (props) => {
<strong>میزان تخفیف</strong> <strong>میزان تخفیف</strong>
<span>{factorInfo.offPrice} تومان</span> <span>{factorInfo.offPrice} تومان</span>
</div> </div>
<div className="d-flex justify-content-between">
<strong>مالیات بر ارزش افزوده</strong>
<span>{factorInfo.vatPrice} تومان</span>
</div>
</div> </div>
) : null} ) : null}
{window.innerWidth > 1000 ? ( {window.innerWidth > 1000 ? (
@ -83,6 +87,14 @@ const Factor = (props) => {
{factorInfo.offPrice} تومان {factorInfo.offPrice} تومان
</span> </span>
</div> </div>
<div className="d-flex justify-content-between">
<strong style={{ fontSize: fontSize.desktop.strong }}>
مالیات بر ارزش افزوده
</strong>
<span style={{ fontSize: fontSize.desktop.span }}>
{factorInfo.vatPrice} تومان
</span>
</div>
</div> </div>
) : null} ) : null}
</> </>

@ -195,7 +195,12 @@ const Item = (props) => {
{route !== "callback" ? ( {route !== "callback" ? (
<div className="mobile-cart-table-product__info--delete d-flex align-items-center align-self-end"> <div className="mobile-cart-table-product__info--delete d-flex align-items-center align-self-end">
<DeleteOutlineOutlinedIcon <DeleteOutlineOutlinedIcon
style={{ color: "#FC120A", fontSize: 25, marginLeft: 0 }} style={{
color: "#FC120A",
fontSize: 25,
marginLeft: 0,
cursor: "pointer",
}}
onClick={() => onClick={() =>
pushToCart({ pushToCart({
productId: data.productId, productId: data.productId,
@ -215,6 +220,7 @@ const Item = (props) => {
style={{ style={{
fontSize: fontSize.mobile.delete.span, fontSize: fontSize.mobile.delete.span,
color: "#FC120A", color: "#FC120A",
cursor: "pointer",
}} }}
> >
حذف حذف
@ -369,7 +375,12 @@ const Item = (props) => {
<TableCell> <TableCell>
<div className="cart-item__delete d-flex align-items-center justify-content-center"> <div className="cart-item__delete d-flex align-items-center justify-content-center">
<DeleteOutlineOutlinedIcon <DeleteOutlineOutlinedIcon
style={{ color: "#FC120A", fontSize: 30, marginLeft: 5 }} style={{
color: "#FC120A",
fontSize: 30,
marginLeft: 5,
cursor: "pointer",
}}
// onClick={() => handleDelete(data.id)} // onClick={() => handleDelete(data.id)}
onClick={() => onClick={() =>
pushToCart({ pushToCart({
@ -388,7 +399,10 @@ const Item = (props) => {
count: -data.count, count: -data.count,
}) })
} }
style={{ fontSize: fontSize.desktop.delete.span }} style={{
fontSize: fontSize.desktop.delete.span,
cursor: "pointer",
}}
> >
حذف حذف
</span> </span>

@ -1,6 +1,6 @@
import React, { Component } from "react"; import React, { Component } from "react";
import { connect } from "react-redux"; import { connect } from "react-redux";
import { userProduct, transport, userFactor } from "~/Redux/actions"; import { transport, userFactor } from "~/Redux/actions";
import Navbar from "../Home/Navbar/index"; import Navbar from "../Home/Navbar/index";
import Footer from "../Home/Footer/index"; import Footer from "../Home/Footer/index";
@ -58,31 +58,30 @@ class Cart extends Component {
window.location.hash = "verified"; window.location.hash = "verified";
} }
if (this.props.factorInfo === null && this.state.controlFactorInfoRepeat) { // if (this.props.factorInfo === null && !this.controlFactorInfoRepeat) {
this.props.getFactorInfo({}); // this.props.getFactorInfo({});
this.setState({ // this.controlFactorInfoRepeat = true;
controlFactorInfoRepeat: false, // }
}); // if (this.props.list.length > 0) {
} // let wantedId; //should be zero
if (this.props.list.length > 0) { // for (let item of this.props.list) {
let wantedId; //should be zero // if (item.condition == 2) {
for (let item of this.props.list) { // wantedId = item.id;
if (item.condition == 2) { // break;
wantedId = item.id; // }
break; // }
} // if (this.props.list.length !== 1) {
} // // this.props.getInfo({ id: wantedId });
if (this.props.list.length !== 1) { // }
this.props.getInfo({ id: wantedId }); // } else {
} // // this.props.getFactorInfo({});
} else { // }
this.props.getFactorInfo({});
}
} }
componentDidMount() { componentDidMount() {
window.scrollTo(0, 0); window.scrollTo(0, 0);
this.props.getTransportList(); this.props.getTransportList();
this.props.getFactorInfo({});
} }
handleCounter = (type, id) => { handleCounter = (type, id) => {
@ -119,7 +118,7 @@ class Cart extends Component {
render() { render() {
const { list, payPrice, payMethods, factorInfo, userId, hasPhysical } = const { list, payPrice, payMethods, factorInfo, userId, hasPhysical } =
this.props; this.props;
if (!this.props.factorInfo) if (!factorInfo || list.length == 0)
return ( return (
<div <div
align="center" align="center"
@ -177,7 +176,7 @@ class Cart extends Component {
/> />
</section> </section>
<section className="cart__left d-flex flex-column p-3"> <section className="cart__left d-flex flex-column p-3">
{hasPhysical ? ( {factorInfo.transportId ? (
<header className="cart__left--header d-flex flex-column"> <header className="cart__left--header d-flex flex-column">
<h2 style={{ fontSize: fontSize.desktop.h2 }}> <h2 style={{ fontSize: fontSize.desktop.h2 }}>
روشهای ارسال روشهای ارسال
@ -207,9 +206,7 @@ class Cart extends Component {
</h3> </h3>
<div className="d-flex align-items-center"> <div className="d-flex align-items-center">
<strong style={{ fontSize: fontSize.mobile.h1 }}> <strong style={{ fontSize: fontSize.mobile.h1 }}>
{factorInfo.sumPrice + {factorInfo.payPrice}
factorInfo.transportPrice -
factorInfo.offPrice}
</strong> </strong>
<span style={{ fontSize: fontSize.mobile.h3 }}> <span style={{ fontSize: fontSize.mobile.h3 }}>
تومان تومان
@ -297,9 +294,8 @@ class Cart extends Component {
{factorInfo ? ( {factorInfo ? (
<div className="d-flex align-items-center"> <div className="d-flex align-items-center">
<strong style={{ fontSize: fontSize.mobile.h1 }}> <strong style={{ fontSize: fontSize.mobile.h1 }}>
{factorInfo.sumPrice + {factorInfo.payPrice}
factorInfo.transportPrice - {/* // factorInfo.transportPrice - // factorInfo.offPrice} */}
factorInfo.offPrice}
</strong> </strong>
<span style={{ fontSize: fontSize.mobile.h3 }}>تومان</span> <span style={{ fontSize: fontSize.mobile.h3 }}>تومان</span>
</div> </div>
@ -340,17 +336,19 @@ class Cart extends Component {
export default connect( export default connect(
(state) => ({ (state) => ({
list: state.userProduct.list, list:
state.userFactor.info?.products?.filter((item) => +item.condition < 2) ||
[],
payPrice: state.userProduct.sum, payPrice: state.userProduct.sum,
payMethods: state.transport.list, payMethods: state.transport.list,
factorInfo: state.userFactor.info, factorInfo: state.userFactor.info,
userId: state.user.status.id, userId: state.user.status.id,
hasPhysical: state.userProduct.hasPhysical,
isVerified: state.userFactor.isVerified, isVerified: state.userFactor.isVerified,
}), }),
{ {
getList: userProduct.list, // getList: userProduct.list,
getInfo: userProduct.info, // getInfo: userProduct.info,
getTransportList: transport.list, getTransportList: transport.list,
getFactorInfo: userFactor.info, getFactorInfo: userFactor.info,
payFactor: userFactor.payment, payFactor: userFactor.payment,

@ -41,7 +41,7 @@ class Contact extends Component {
}; };
componentDidMount() { componentDidMount() {
this.props.getList(); // this.props.getList();
this.props.getContactData(); this.props.getContactData();
} }
@ -64,7 +64,10 @@ class Contact extends Component {
</p> </p>
<Input label={"نام و نام خانوادگی"} name={"name"} /> <Input label={"نام و نام خانوادگی"} name={"name"} />
<Input label={"شماره تماس"} name={"mobile"} /> <Input label={"شماره تماس"} name={"mobile"} />
<Select options={["واحد فروش", "واحد محتوا", "واحد فنی"]} /> <Select
parent={this}
options={["واحد فروش", "واحد محتوا", "واحد فنی"]}
/>
<Input label={"موضوع پیام"} name={"subject"} /> <Input label={"موضوع پیام"} name={"subject"} />
<textarea <textarea
placeholder="متن پیام" placeholder="متن پیام"
@ -206,8 +209,8 @@ export default connect(
(state) => ({ (state) => ({
loading: state.publicApi.loading, loading: state.publicApi.loading,
contactData: state.publicApi.contactData, contactData: state.publicApi.contactData,
list: state.userProduct.list, list: state.userProduct.mylist,
loading: state.publicApi.loading, //loading: state.publicApi.loading,
}), }),
{ getContactData: publicApi.getContactData, getList: userProduct.list } { getContactData: publicApi.getContactData, getList: userProduct.mylist }
)(Contact); )(Contact);

@ -89,7 +89,7 @@ class Faq extends Component {
return ( return (
<> <>
{window.innerWidth > 1000 ? ( {window.innerWidth > 1000 ? (
faqList.length > 0 ? ( faqList && faqList.length > 0 ? (
<> <>
<div className="faq d-flex flex-column align-items-center"> <div className="faq d-flex flex-column align-items-center">
<Navbar page={"faq"} /> <Navbar page={"faq"} />

@ -46,8 +46,8 @@ export default class Footer extends Component {
<div className="footer-container__content--box second d-flex flex-column"> <div className="footer-container__content--box second d-flex flex-column">
<h1>دسترسی سریع</h1> <h1>دسترسی سریع</h1>
<ul> <ul>
{fastAccess.map((item) => ( {fastAccess.map((item, i) => (
<li> <li key={i}>
<Link to={item.link}>{item.name}</Link> <Link to={item.link}>{item.name}</Link>
</li> </li>
))} ))}
@ -56,8 +56,8 @@ export default class Footer extends Component {
<div className="footer-container__content--box second d-flex flex-column"> <div className="footer-container__content--box second d-flex flex-column">
<h1>لینک های کاربردی</h1> <h1>لینک های کاربردی</h1>
<ul> <ul>
{fastAccess.map((item) => ( {fastAccess.map((item, i) => (
<li> <li key={i}>
<Link to={item.link}>{item.name}</Link> <Link to={item.link}>{item.name}</Link>
</li> </li>
))} ))}

@ -31,7 +31,7 @@ class HomeSearch extends Component {
placeholder="جستجو در عناوین کتاب ..." placeholder="جستجو در عناوین کتاب ..."
className="home-search__input d-flex" className="home-search__input d-flex"
type="text" type="text"
name="search" name="searchBox"
onChange={(e) => onChange={(e) =>
this.setState({ this.setState({
filters: { ...this.state.filters, search: e.target.value }, filters: { ...this.state.filters, search: e.target.value },

@ -24,7 +24,7 @@
} }
} }
&__notAvailabe { &__notAvailabe {
font-family: numeralMedium; font-family: numeralLight;
width: 100%; width: 100%;
text-align: center; text-align: center;
color: #6f7074; color: #6f7074;
@ -35,7 +35,7 @@
margin-top: 15px; margin-top: 15px;
text-align: center; text-align: center;
&--old { &--old {
font-family: numeralMedium; font-family: numeralLight;
color: #6f7074; color: #6f7074;
position: relative; position: relative;
margin-left: 10px; margin-left: 10px;
@ -51,7 +51,7 @@
} }
&--price { &--price {
color: #02733c; color: #02733c;
font-family: numeralMedium; font-family: numeralLight;
font-size: calc(100vw / 80); font-size: calc(100vw / 80);
} }
} }

@ -27,6 +27,7 @@ const SimpleHeader = (props) => {
<h1 style={{ fontSize: fontSize.desktop.h1 }}>{props.title}</h1> <h1 style={{ fontSize: fontSize.desktop.h1 }}>{props.title}</h1>
<span></span> <span></span>
</div> </div>
{props.more ? (
<Link <Link
to={props.link} to={props.link}
className="home-scroll__header--more d-flex align-items-center" className="home-scroll__header--more d-flex align-items-center"
@ -34,6 +35,7 @@ const SimpleHeader = (props) => {
<span style={{ fontSize: fontSize.desktop.h1 }}>بیشتر</span> <span style={{ fontSize: fontSize.desktop.h1 }}>بیشتر</span>
<img src={dropdown} alt="فلش" /> <img src={dropdown} alt="فلش" />
</Link> </Link>
) : null}
</div> </div>
) : null} ) : null}
{window.innerWidth < 1000 ? ( {window.innerWidth < 1000 ? (
@ -95,7 +97,9 @@ export default class HomeSlider extends Component {
let header; let header;
if (title) { if (title) {
if (designType === "simple" || designType === "blog") { if (designType === "simple" || designType === "blog") {
header = <SimpleHeader title={title} link={link} />; header = (
<SimpleHeader title={title} link={link} more={data.length > number} />
);
} else if (designType === "tab") { } else if (designType === "tab") {
header = <TabHeader title={title} link={link} />; header = <TabHeader title={title} link={link} />;
} }

@ -77,7 +77,8 @@ export default class LaptopNavbar extends Component {
localStorage.removeItem("refresh"); localStorage.removeItem("refresh");
localStorage.removeItem("access"); localStorage.removeItem("access");
localStorage.removeItem("userData"); localStorage.removeItem("userData");
this.setState({ navigatePath: "/auth" }); window.location.reload();
// this.setState({ navigatePath: "/auth" });
}} }}
> >
خروج خروج

@ -32,7 +32,7 @@ export default class SingleBlog extends Component {
style={{ fontSize: fontSize.desktop.a }} style={{ fontSize: fontSize.desktop.a }}
to={"/blogs/" + data.id} to={"/blogs/" + data.id}
> >
بیشتر ادامه
</Link> </Link>
</div> </div>
<div className="single-blog__left d-flex justify-content-center align-items-center"> <div className="single-blog__left d-flex justify-content-center align-items-center">

@ -109,11 +109,11 @@ class MyBooks extends React.Component {
export default connect( export default connect(
(state) => ({ (state) => ({
list: state.userProduct.list, list: state.userProduct.mylist,
checkEmpty: state.userProduct.checkEmpty, checkEmpty: state.userProduct.checkEmpty,
// status: state.user.status, // status: state.user.status,
}), }),
{ getList: userProduct.list } { getList: userProduct.mylist }
)(MyBooks); )(MyBooks);
const Item = (props) => { const Item = (props) => {

@ -1,3 +1,4 @@
/* eslint-disable jsx-a11y/anchor-is-valid */
import React, { Component } from "react"; import React, { Component } from "react";
import { Link } from "react-router-dom"; import { Link } from "react-router-dom";
@ -28,8 +29,8 @@ export default class Product extends Component {
return ( return (
<> <>
{window.innerWidth < 1000 ? ( {window.innerWidth < 1000 ? (
<Link <div
to={`/products/physical/${product.id}`} // to={`/products/physical/${product.id}`}
className="mobile-products-product d-flex flex-column" className="mobile-products-product d-flex flex-column"
> >
<img <img
@ -50,7 +51,8 @@ export default class Product extends Component {
{product.product[1].price} تومان {product.product[1].price} تومان
</span> </span>
</Link> </Link>
<Link <a
href="#"
// to={`/products/digital/${product.id}`} // to={`/products/digital/${product.id}`}
style={{ fontSize: fontSize.mobile.a, opacity: 0.3 }} style={{ fontSize: fontSize.mobile.a, opacity: 0.3 }}
className="mobile-products-product__links--ar d-flex justify-content-between align-items-center" className="mobile-products-product__links--ar d-flex justify-content-between align-items-center"
@ -59,9 +61,9 @@ export default class Product extends Component {
<span style={{ fontSize: fontSize.mobile.h2 }}> <span style={{ fontSize: fontSize.mobile.h2 }}>
{product.product[0].price} تومان {product.product[0].price} تومان
</span> </span>
</Link> </a>
</div>
</div> </div>
</Link>
) : null} ) : null}
{window.innerWidth > 1000 ? ( {window.innerWidth > 1000 ? (
<article className="products-product d-flex flex-column align-items-center"> <article className="products-product d-flex flex-column align-items-center">

@ -24,8 +24,8 @@ export default function VideoBox(props) {
{window.innerWidth > 1000 ? ( {window.innerWidth > 1000 ? (
<div className="d-flex flex-column"> <div className="d-flex flex-column">
<h3 style={{ fontSize: fontSize.desktop.h3 }}> <h3 style={{ fontSize: fontSize.desktop.h3 }}>
<PlayCircleFilledRoundedIcon style={{ fontSize: 35 }} /> {/* <PlayCircleFilledRoundedIcon style={{ fontSize: 35 }} /> */}
فیلمها {/* فیلمها */}
</h3> </h3>
<div className="video-box d-flex flex-column" id="video"> <div className="video-box d-flex flex-column" id="video">
<ReactVideoJsPlayer fileId={data.fileIds} /> <ReactVideoJsPlayer fileId={data.fileIds} />

@ -79,7 +79,7 @@ class Support extends Component {
export default connect( export default connect(
(state) => ({ (state) => ({
list: state.userProduct.list, list: state.userProduct.mylist,
}), }),
{ getList: userProduct.list } { getList: userProduct.mylist }
)(Support); )(Support);

Loading…
Cancel
Save