App/Components/ShoppingCart.js

(开头部分) 5KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。








import React, { Component } from 'react';
import {
  StyleSheet,
  Text,
  View,
  InteractionManager,
  PixelRatio
} from 'react-native';
import ShoppingCarListView from '../Pages/ShoppingCarListView';
import ShoppingNavBar from './ShoppingNavBar';
import Buttom from '../Commom/Buttom';
import Common from '../Commom/constants';
import Loading from '../Commom/Loading';
import {ShopCarAction, selectAll, changeShopcar,deleteShopList} from '../Action/ShopCarAction';


let  isSelect = 0;
let isBill = 0;
let isRefreshing = false;
let isLoading = true;

export default class ShoppingCart extends Component {

  constructor(props) {
    super(props);
    this.state = {
      navRightStatus: false,
    }

  }

  componentDidMount() {
    InteractionManager.runAfterInteractions(() => {
      const {dispatch} = this.props;
      dispatch(ShopCarAction(isRefreshing, isLoading));
    });

  }

  shopAllPrices() {
    const { ShopCarReducer} = this.props;
    var price = 0;

    ShopCarReducer.selectShopArr.forEach(function (object) {
      price += parseInt(object.price1.value) * parseInt(object.number);

    }, this);

    return price;
  }

  favorableAllPrices(){
        const { ShopCarReducer} = this.props;
后面还有 120 行代码,购买后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明

AI 解读

登录后可用,每次 10 积分,解读结果公开显示在下面。

还没有人解读过这个文件。