Commit 251e7966 by 姜雷

调整部分编译警告

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