update 15 files 2-8-1400

master
amir hosein gorji 3 years ago
parent 537c271685
commit 782f30f92d
  1. 14
      public/index.html
  2. 7
      src/AppRouter.js
  3. 10
      src/Redux/store.js
  4. 26
      src/views/Cart/index.js
  5. 4
      src/views/Contact/index.js
  6. 7
      src/views/Download/index.js
  7. 2
      src/views/Home/Download/index.js
  8. 4
      src/views/Home/HomeStatic/Flex/index.js
  9. 7
      src/views/Home/HomeStatic/index.scss
  10. 16
      src/views/Home/index.js
  11. 2
      src/views/Home/index.scss
  12. 11
      src/views/Product/AddToCart/index.js
  13. 2
      src/views/Product/MaterialModal/index.js
  14. 1
      src/views/Product/index.js
  15. 3
      src/views/Support/index.js

@ -14,9 +14,23 @@
<link rel="manifest" href="%PUBLIC_URL%/manifest.json" /> <link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
<title>دانوین</title> <title>دانوین</title>
<!-- Google Tag Manager -->
<script>(function (w, d, s, l, i) {
w[l] = w[l] || []; w[l].push({
'gtm.start':
new Date().getTime(), event: 'gtm.js'
}); var f = d.getElementsByTagName(s)[0],
j = d.createElement(s), dl = l != 'dataLayer' ? '&l=' + l : ''; j.async = true; j.src =
'https://www.googletagmanager.com/gtm.js?id=' + i + dl; f.parentNode.insertBefore(j, f);
})(window, document, 'script', 'dataLayer', 'GTM-WVV8H9L');</script>
<!-- End Google Tag Manager -->
</head> </head>
<body> <body>
<!-- Google Tag Manager (noscript) -->
<noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-WVV8H9L" height="0" width="0"
style="display:none;visibility:hidden"></iframe></noscript>
<!-- End Google Tag Manager (noscript) -->
<div id="root"></div> <div id="root"></div>
<script> <script>
if ("serviceWorker" in navigator) { if ("serviceWorker" in navigator) {

@ -100,6 +100,9 @@ class AppRouter extends Component {
<Route exact path={"/contact"}> <Route exact path={"/contact"}>
<Contact /> <Contact />
</Route> </Route>
<Route exact path={"/download"}>
<Download />
</Route>
<Route exact path={"/blogs"}> <Route exact path={"/blogs"}>
<Blogs /> <Blogs />
</Route> </Route>
@ -325,9 +328,7 @@ class AppRouter extends Component {
/> />
)} )}
</Route> </Route>
<Route exact path={"/download"}>
<Download />
</Route>
<Route exact path={"/chatroom/:id"}> <Route exact path={"/chatroom/:id"}>
{mobile ? ( {mobile ? (
status ? ( status ? (

@ -1,8 +1,8 @@
import { createStore, applyMiddleware } from 'redux'; import { createStore, applyMiddleware } from "redux";
import { composeWithDevTools } from 'redux-devtools-extension'; import { composeWithDevTools } from "redux-devtools-extension";
import { combineReducers } from 'redux'; import { combineReducers } from "redux";
import * as reducers from './reducers'; import * as reducers from "./reducers";
import thunk from 'redux-thunk'; import thunk from "redux-thunk";
const initialState = {}; const initialState = {};
const middleware = [thunk]; const middleware = [thunk];
const store = createStore( const store = createStore(

@ -168,7 +168,7 @@ class Cart extends Component {
<section className="cart__right d-flex flex-column"> <section className="cart__right d-flex flex-column">
<header> <header>
<h1 style={{ fontSize: fontSize.desktop.h1 }}> <h1 style={{ fontSize: fontSize.desktop.h1 }}>
سبد خرید سبد پیش خرید{" "}
</h1> </h1>
</header> </header>
<Table <Table
@ -232,6 +232,7 @@ class Cart extends Component {
))} ))}
</div> </div>
</div> */} </div> */}
<Link <Link
to="/checkout" to="/checkout"
className="cart__left--submit" className="cart__left--submit"
@ -261,7 +262,7 @@ class Cart extends Component {
{window.location.search.includes("NOK") ? ( {window.location.search.includes("NOK") ? (
<div>پرداخت شما با خطا مواجه شد ، لطفا مجدد تلاش نمایید</div> <div>پرداخت شما با خطا مواجه شد ، لطفا مجدد تلاش نمایید</div>
) : null} ) : null}
<h1 style={{ fontSize: fontSize.mobile.h1 }}>سبد خرید</h1> <h1 style={{ fontSize: fontSize.mobile.h1 }}>سبد پیش خرید</h1>
<div className="d-flex"> <div className="d-flex">
<Table <Table
list={list} list={list}
@ -326,7 +327,28 @@ class Cart extends Component {
onClick={() => this.props.payFactor({ userId: userId })} onClick={() => this.props.payFactor({ userId: userId })}
> >
پرداخت پرداخت
</button> */} </button> */}
<br />
<div className="product-addtocart__box--accept d-flex">
<input type="checkbox" checked={true} />
<Link
to="/page/privacy"
style={{ fontSize: "13px", margin: 0, padding: 0 }}
>
شرایط استفاده از دانوین و حریم خصوصی را مطالعه کرده ام
</Link>
</div>
<div className="product-addtocart__box--accept d-flex">
<input type="checkbox" checked={true} />
<Link
to="/page/returning"
style={{ fontSize: "13px", margin: 0, padding: 0 }}
>
شرایط مرجوع کردن کالا در دانوین
</Link>
</div>
<Link <Link
to="/checkout" to="/checkout"
className="mobile-cart__submit" className="mobile-cart__submit"

@ -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 { publicApi, userProduct } from "~/Redux/actions"; import { publicApi } 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";
@ -155,5 +155,5 @@ export default connect(
list: state.userProduct.mylist || [], list: state.userProduct.mylist || [],
//loading: state.publicApi.loading, //loading: state.publicApi.loading,
}), }),
{ getContactData: publicApi.getContactData, getList: userProduct.mylist } { getContactData: publicApi.getContactData }
)(Contact); )(Contact);

@ -26,7 +26,8 @@ const fontSize = {
class AR extends Component { class AR extends Component {
componentDidMount() { componentDidMount() {
window.scrollTo(0, 0); window.scrollTo(0, 0);
this.props.getMyList({ isActive: 1, productType: 3 }); if (this.props.status)
this.props.getMyList({ isActive: 1, productType: 3 });
} }
render() { render() {
@ -64,8 +65,11 @@ class AR extends Component {
href="https://dnvn.ir/ar.apk" href="https://dnvn.ir/ar.apk"
style={{ style={{
color: "white", color: "white",
backgroundColor: "#128c7e",
fontSize: 18, fontSize: 18,
width: "80%", width: "80%",
textDecoration: "none",
borderRadius: 5,
textAlign: "center", textAlign: "center",
}} }}
> >
@ -79,6 +83,7 @@ class AR extends Component {
export default connect( export default connect(
(state) => ({ (state) => ({
status: state.user.status,
arList: state.userProduct.myList || [], arList: state.userProduct.myList || [],
loading: state.loading, loading: state.loading,
}), }),

@ -43,7 +43,7 @@ const H_DownloadApp = () => {
</div> </div>
</div> </div>
) : ( ) : (
<div> <div style={{ maxWidth: 540, margin: "auto" }}>
<a <a
download download
href="https://danovin.ir/app.apk" href="https://danovin.ir/app.apk"

@ -1,10 +1,10 @@
import React from "react"; import React from "react";
import { Link } from "react-router-dom"; import { Link } from "react-router-dom";
const maxMobileSize = 550; const maxMobileSize = 540;
const fontSize = { const fontSize = {
h1: window.innerWidth > maxMobileSize ? 19 : window.innerWidth / 25, h1: window.innerWidth > maxMobileSize ? 19 : window.innerWidth / 28,
span: window.innerWidth > maxMobileSize ? 12 : window.innerWidth / 35, span: window.innerWidth > maxMobileSize ? 12 : window.innerWidth / 35,
}; };

@ -64,9 +64,10 @@
img { img {
// margin-right: 20px; // margin-right: 20px;
// width: 30%; // width: 30%;
margin: 0 10px; margin: 0 2px;
height: 70%; width: 30%;
transform: scale(1.3); max-width: 100%;
// transform: scale(1.3);
} }
&--right { &--right {
margin-left: 10px; margin-left: 10px;

@ -68,7 +68,10 @@ class Home extends Component {
<Loader /> <Loader />
</div> </div>
); );
let scale = Math.max(
1,
mobile ? Math.min(800, window.innerWidth) / 540 : 1
);
return ( return (
<> <>
<> <>
@ -77,13 +80,22 @@ class Home extends Component {
(this.props.status && mobile ? "mobile-home" : "home") + (this.props.status && mobile ? "mobile-home" : "home") +
" d-flex flex-column" " d-flex flex-column"
} }
style={
this.props.status && mobile
? {
transformStyle: "flat",
transformOrigin: "top",
transform: `scale(${scale})`,
}
: null
}
> >
<Navbar page={"home"} /> <Navbar page={"home"} />
{homeData.map((item, i) => ( {homeData.map((item, i) => (
<Identifier item={item} key={i} /> <Identifier item={item} key={i} />
))} ))}
{window.location.host.indexOf("app") > -1 ? null : <Download />}
</div> </div>
{window.location.host.indexOf("app") > -1 ? null : <Download />}
{window.innerWidth > 1000 ? <Footer /> : null} {window.innerWidth > 1000 ? <Footer /> : null}
</> </>

@ -10,7 +10,7 @@
.mobile-home { .mobile-home {
width: 100vw; width: 100vw;
max-width: 600px; max-width: 540px;
margin: 0px auto; margin: 0px auto;
padding: 0px 5px; padding: 0px 5px;
direction: rtl; direction: rtl;

@ -140,11 +140,20 @@ function AddToCart(props) {
<input type="checkbox" checked={true} /> <input type="checkbox" checked={true} />
<Link <Link
to="/page/privacy" to="/page/privacy"
style={{ fontSize: "11px", margin: 0, padding: 0 }} style={{ fontSize: "13px", margin: 0, padding: 0 }}
> >
شرایط استفاده از دانوین و حریم خصوصی را مطالعه کرده ام شرایط استفاده از دانوین و حریم خصوصی را مطالعه کرده ام
</Link> </Link>
</div> </div>
<div className="product-addtocart__box--accept d-flex">
<input type="checkbox" checked={true} />
<Link
to="/page/returning"
style={{ fontSize: "13px", margin: 0, padding: 0 }}
>
شرایط مرجوع کردن کالا در دانوین
</Link>
</div>
</div> </div>
<footer className="product-addtocart__footer d-flex justify-content-between mt-3"> <footer className="product-addtocart__footer d-flex justify-content-between mt-3">
{supportItems.map((item, i) => ( {supportItems.map((item, i) => (

@ -95,7 +95,7 @@ function SimpleModal(props) {
); );
return ( return (
<div> <div style={{ margin: 5 }}>
<Modal <Modal
open={props.openComment} open={props.openComment}
onClose={props.handleOpenComment} onClose={props.handleOpenComment}

@ -259,6 +259,7 @@ class Product extends Component {
مطالعه نمونه کتاب مطالعه نمونه کتاب
</Link> </Link>
</div> </div>
<Addbutton <Addbutton
page={page} page={page}
info={info} info={info}

@ -50,7 +50,8 @@ class Support extends Component {
fileId: null, fileId: null,
}; };
componentDidMount() { componentDidMount() {
if (!this.props.myProductList) this.props.getUserProductList({}); if (!this.props.myProductList && this.props.status)
this.props.getUserProductList({});
} }
onChange = (name, value, type) => { onChange = (name, value, type) => {
if (type === "file") { if (type === "file") {

Loading…
Cancel
Save