Commit 43f221eb by zeven

修复eslint

parent f638d60e
...@@ -3,6 +3,7 @@ module.exports = { ...@@ -3,6 +3,7 @@ module.exports = {
extends: '@react-native-community', extends: '@react-native-community',
rules: { rules: {
"react-native/no-inline-styles": 0, "react-native/no-inline-styles": 0,
"no-eval": 0 "no-unused-vars": 2,
"no-eval": 0,
} }
}; };
android @ 3f5301de
Subproject commit f8c6045f7a1ca9399d92b24074cc2e2530015106 Subproject commit 3f5301de4268f6fd7567abfcba2646c277fa0d13
import React, {Component} from 'react'; import React, {Component} from 'react';
import {Modal, View, Text, Image, FlatList, Dimensions} from 'react-native'; import {Modal, View, Text, Image, FlatList} from 'react-native';
import Icon from 'react-native-vector-icons/Ionicons'; import Icon from 'react-native-vector-icons/Ionicons';
import AsyncStorage from '@react-native-community/async-storage'; import AsyncStorage from '@react-native-community/async-storage';
import ModalStyles from './Modal/styles'; import ModalStyles from './Modal/styles';
...@@ -119,12 +119,10 @@ class OrderDetailsModal extends Component { ...@@ -119,12 +119,10 @@ class OrderDetailsModal extends Component {
const {contact, storeName} = this.state; const {contact, storeName} = this.state;
let goodsLength = Math.ceil(parseFloat(goodsArr.length / pageSize)); let goodsLength = Math.ceil(parseFloat(goodsArr.length / pageSize));
let gaTemp = goodsArr.slice((current - 1) * pageSize, current * pageSize); let gaTemp = goodsArr.slice((current - 1) * pageSize, current * pageSize);
let total = 0; // 总数量
let totalPrice = 0; // 总价 let totalPrice = 0; // 总价
let totalCount = 0; // 总优惠 let totalCount = 0; // 总优惠
goodsArr.map(item => { goodsArr.map(item => {
// item.url = config.imgUrl + item.barcode + config.watermark; // item.url = config.imgUrl + item.barcode + config.watermark;
total += item.num;
if (item.price) { if (item.price) {
totalPrice += item.price * item.num; totalPrice += item.price * item.num;
totalCount += (item.prePrice - item.price) * item.num; totalCount += (item.prePrice - item.price) * item.num;
......
import React, {Component} from 'react'; import React, {Component} from 'react';
import {View, Text, Image} from 'react-native'; import {View} from 'react-native';
import QRCode from 'react-native-qrcode-svg'; import QRCode from 'react-native-qrcode-svg';
import io from 'socket.io-client'; import io from 'socket.io-client';
import axios from 'axios'; import axios from 'axios';
......
...@@ -47,10 +47,10 @@ class FacePage extends Component { ...@@ -47,10 +47,10 @@ class FacePage extends Component {
this.listen(); this.listen();
} }
onSubmit = async phone => { onSubmit = async _phone => {
const res = await this.props.dispatch({ const res = await this.props.dispatch({
type: 'store/sendsms', type: 'store/sendsms',
phone, phone: _phone,
}); });
if (res.code === 1) { if (res.code === 1) {
if (/^\d+$/.test(res.msg)) { if (/^\d+$/.test(res.msg)) {
...@@ -58,7 +58,7 @@ class FacePage extends Component { ...@@ -58,7 +58,7 @@ class FacePage extends Component {
} else { } else {
Speech.speak('请输入验证码'); Speech.speak('请输入验证码');
} }
this.phone = phone; this.phone = _phone;
this.setState({ this.setState({
phoneModal: false, phoneModal: false,
verifyCodeModal: true, verifyCodeModal: true,
......
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