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" />
<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>
<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>
<script>
if ("serviceWorker" in navigator) {

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

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

@ -168,7 +168,7 @@ class Cart extends Component {
<section className="cart__right d-flex flex-column">
<header>
<h1 style={{ fontSize: fontSize.desktop.h1 }}>
سبد خرید
سبد پیش خرید{" "}
</h1>
</header>
<Table
@ -232,6 +232,7 @@ class Cart extends Component {
))}
</div>
</div> */}
<Link
to="/checkout"
className="cart__left--submit"
@ -261,7 +262,7 @@ class Cart extends Component {
{window.location.search.includes("NOK") ? (
<div>پرداخت شما با خطا مواجه شد ، لطفا مجدد تلاش نمایید</div>
) : null}
<h1 style={{ fontSize: fontSize.mobile.h1 }}>سبد خرید</h1>
<h1 style={{ fontSize: fontSize.mobile.h1 }}>سبد پیش خرید</h1>
<div className="d-flex">
<Table
list={list}
@ -326,7 +327,28 @@ class Cart extends Component {
onClick={() => this.props.payFactor({ userId: userId })}
>
پرداخت
</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
to="/checkout"
className="mobile-cart__submit"

@ -1,6 +1,6 @@
import React, { Component } from "react";
import { connect } from "react-redux";
import { publicApi, userProduct } from "~/Redux/actions";
import { publicApi } from "~/Redux/actions";
import Navbar from "../Home/Navbar/index";
import Footer from "../Home/Footer/index";
@ -155,5 +155,5 @@ export default connect(
list: state.userProduct.mylist || [],
//loading: state.publicApi.loading,
}),
{ getContactData: publicApi.getContactData, getList: userProduct.mylist }
{ getContactData: publicApi.getContactData }
)(Contact);

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

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

@ -1,10 +1,10 @@
import React from "react";
import { Link } from "react-router-dom";
const maxMobileSize = 550;
const maxMobileSize = 540;
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,
};

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

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

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

@ -140,11 +140,20 @@ function AddToCart(props) {
<input type="checkbox" checked={true} />
<Link
to="/page/privacy"
style={{ fontSize: "11px", margin: 0, padding: 0 }}
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>
</div>
<footer className="product-addtocart__footer d-flex justify-content-between mt-3">
{supportItems.map((item, i) => (

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

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

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

Loading…
Cancel
Save