Commit 251e7966 by 姜雷

调整部分编译警告

parent eb8f5c21
...@@ -5,13 +5,12 @@ import { View, ScrollView, Image, Text, WebView } from '@tarojs/components'; ...@@ -5,13 +5,12 @@ import { View, ScrollView, Image, Text, WebView } from '@tarojs/components';
import AnnIcon from '../../images/icon/ann_tongzhi_icon@2x.png'; import AnnIcon from '../../images/icon/ann_tongzhi_icon@2x.png';
import { fetchAllAnn, AnnItem } from '../../api/announcement'; import { fetchAllAnn, AnnItem } from '../../api/announcement';
import { connect } from '@tarojs/redux'; import { connect } from '@tarojs/redux';
import { UserState } from '../../store/rootReducers/userinfo';
import './Announcement.scss'; import './Announcement.scss';
import { ANN_LINK_URL } from '../../constants'; import { Customer } from '@/types/Customer/Customer';
type PageStateProps = { type PageStateProps = {
userinfo: UserState; userinfo: Customer;
}; };
type PageOwnProps = {}; type PageOwnProps = {};
type PageState = { type PageState = {
...@@ -56,7 +55,7 @@ class Announcement extends Component { ...@@ -56,7 +55,7 @@ class Announcement extends Component {
console.log(err); console.log(err);
}); });
} }
geAnnDetail(id: number, title: string) { geAnnDetail(id: number) {
Taro.navigateTo({ Taro.navigateTo({
url: `/pages/Content/Content?id=${id}`, url: `/pages/Content/Content?id=${id}`,
}); });
...@@ -70,7 +69,7 @@ class Announcement extends Component { ...@@ -70,7 +69,7 @@ class Announcement extends Component {
<View <View
key={annItem.id} key={annItem.id}
className='Announcement-item' className='Announcement-item'
onClick={() => this.geAnnDetail(annItem.id, annItem.title)}> onClick={() => this.geAnnDetail(annItem.id)}>
<Image <Image
className='Announcement-item-img' className='Announcement-item-img'
src={annItem.linkUrls[0]} src={annItem.linkUrls[0]}
......
...@@ -3,7 +3,6 @@ import Taro, { Component, Config } from '@tarojs/taro'; ...@@ -3,7 +3,6 @@ import Taro, { Component, Config } from '@tarojs/taro';
import { View, Textarea, Button } from '@tarojs/components'; import { View, Textarea, Button } from '@tarojs/components';
import { fetchFeedback } from '../../api/customer'; import { fetchFeedback } from '../../api/customer';
import { connect } from '@tarojs/redux'; import { connect } from '@tarojs/redux';
import { UserState } from 'src/store/rootReducers/userinfo';
import './Feedback.scss'; import './Feedback.scss';
......
...@@ -173,7 +173,7 @@ class Home extends Component { ...@@ -173,7 +173,7 @@ class Home extends Component {
let newPhone = phone.replace(/([0-9]{3})([0-9]{4})([0-9]{4})/, '$1****$3'); let newPhone = phone.replace(/([0-9]{3})([0-9]{4})([0-9]{4})/, '$1****$3');
return newPhone; return newPhone;
}; };
geAnnDetail(id: number, title: string) { geAnnDetail(id: number) {
console.log(id); console.log(id);
Taro.navigateTo({ Taro.navigateTo({
url: `/pages/Content/Content?id=${id}`, url: `/pages/Content/Content?id=${id}`,
...@@ -271,9 +271,7 @@ class Home extends Component { ...@@ -271,9 +271,7 @@ class Home extends Component {
{annItem.items.length && ( {annItem.items.length && (
<View <View
className='Home-Announcement-Content' className='Home-Announcement-Content'
onClick={() => onClick={() => this.geAnnDetail(annItem.items[0].id)}>
this.geAnnDetail(annItem.items[0].id, annItem.items[0].title)
}>
<Text className='Home-Announcement-Content-title'> <Text className='Home-Announcement-Content-title'>
{annItem.items[0].title} {annItem.items[0].title}
</Text> </Text>
......
...@@ -141,7 +141,7 @@ class OrderDetail extends Component { ...@@ -141,7 +141,7 @@ class OrderDetail extends Component {
</View> </View>
{deductionBean ? ( {deductionBean ? (
<View className='OrderDetail-payinfo'> <View className='OrderDetail-payinfo'>
<Text>{serviceName}豆抵扣</Text> <Text>{serviceName ? serviceName : ''}豆抵扣</Text>
<Text className='deduction'>{deductionBean.toFixed(2)}</Text> <Text className='deduction'>{deductionBean.toFixed(2)}</Text>
</View> </View>
) : null} ) : null}
......
...@@ -8,16 +8,16 @@ import { fetchOrderDetailAndPay } from '../../../api/order'; ...@@ -8,16 +8,16 @@ import { fetchOrderDetailAndPay } from '../../../api/order';
import './OrderPay.scss'; import './OrderPay.scss';
import { import {
ConsumeOrder,
CustomerBeanAccountVo, CustomerBeanAccountVo,
PaymentAndActiveInfo, PaymentAndActiveInfo,
} from '../../../api/baseClass'; } from '../../../api/baseClass';
import { connect } from '@tarojs/redux'; import { connect } from '@tarojs/redux';
import { UserState } from '../../../store/rootReducers/userinfo';
import OrderPayway from '../components/OrderPayway/OrderPayway'; import OrderPayway from '../components/OrderPayway/OrderPayway';
import Order from '@/types/Order/Order';
import { Customer } from '@/types/Customer/Customer';
type PageStateProps = { type PageStateProps = {
userinfo: UserState; userinfo: Customer;
}; };
type PageProps = { type PageProps = {
id?: number; id?: number;
...@@ -25,7 +25,7 @@ type PageProps = { ...@@ -25,7 +25,7 @@ type PageProps = {
type PageState = { type PageState = {
prePay: boolean; prePay: boolean;
accounts: CustomerBeanAccountVo[]; accounts: CustomerBeanAccountVo[];
orderInfo: ConsumeOrder; orderInfo: Order;
payInfos: { payInfos: {
paymentAndActiveInfos: PaymentAndActiveInfo[]; paymentAndActiveInfos: PaymentAndActiveInfo[];
paymentConfId: number; paymentConfId: number;
...@@ -48,20 +48,20 @@ class OrderPay extends Component { ...@@ -48,20 +48,20 @@ class OrderPay extends Component {
prePay: true, prePay: true,
accounts: [], accounts: [],
orderInfo: { orderInfo: {
actualMoney: undefined, actualMoney: 0,
areaId: undefined, areaId: 0,
areaName: '', areaName: '',
consumeType: '', consumeType: '',
createAt: '', createAt: '',
customerCellphone: '', customerCellphone: '',
customerId: undefined, customerId: 0,
customerName: '', customerName: '',
deductionBean: undefined, deductionBean: 0,
deductionMoney: undefined, deductionMoney: 0,
equipmentNum: '', equipmentNum: '',
equipmentPosition: '', equipmentPosition: '',
id: undefined, id: 0,
operateId: undefined, operateId: 0,
operateName: '', operateName: '',
operationMode: '', operationMode: '',
orderName: '', orderName: '',
...@@ -69,10 +69,10 @@ class OrderPay extends Component { ...@@ -69,10 +69,10 @@ class OrderPay extends Component {
orderState: '', orderState: '',
outTradeNo: '', outTradeNo: '',
payType: '', payType: '',
payableMoney: undefined, payableMoney: 0,
serviceId: undefined, serviceId: 0,
serviceName: '', serviceName: '',
thirdDiscountMoney: undefined, thirdDiscountMoney: 0,
thirdTradeNumber: '', thirdTradeNumber: '',
updateDate: '', updateDate: '',
}, },
...@@ -109,7 +109,6 @@ class OrderPay extends Component { ...@@ -109,7 +109,6 @@ class OrderPay extends Component {
payDoneHandle() { payDoneHandle() {
Taro.navigateBack(); Taro.navigateBack();
} }
render() { render() {
......
...@@ -67,9 +67,34 @@ class OrderPayway extends Component { ...@@ -67,9 +67,34 @@ class OrderPayway extends Component {
paymentAndActiveInfos: [], paymentAndActiveInfos: [],
paymentConfId: 0, paymentConfId: 0,
}, },
orderInfo: { orderInfo: {
actualMoney: 0,
areaId: 0,
areaName: '',
consumeType: '',
createAt: '',
customerCellphone: '',
customerId: 0,
customerName: '',
deductionBean: 0,
deductionMoney: 0,
equipmentNum: '',
equipmentPosition: '',
id: 0,
operateId: 0,
operateName: '',
operationMode: '',
orderName: '',
orderNumber: '',
orderState: '',
outTradeNo: '',
payType: '',
payableMoney: 0, payableMoney: 0,
serviceId: 0,
serviceName: '',
thirdDiscountMoney: 0,
thirdTradeNumber: '',
updateDate: '',
}, },
}; };
constructor(props: PageOwnProps) { constructor(props: PageOwnProps) {
......
...@@ -7,7 +7,6 @@ import { connect } from '@tarojs/redux'; ...@@ -7,7 +7,6 @@ import { connect } from '@tarojs/redux';
import { updateUserInfo, UserState } from '../../store/rootReducers/userinfo'; import { updateUserInfo, UserState } from '../../store/rootReducers/userinfo';
import { appLogin } from '../../api/customer'; import { appLogin } from '../../api/customer';
import { NotRegisterCode } from '@/constants';
type PageDispatchProps = { type PageDispatchProps = {
updateUserInfo: (e: UserState | { token: string }) => void; updateUserInfo: (e: UserState | { token: string }) => void;
......
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