Commit 50fa246e by 姜雷

修改订单逻辑

parent 64a695e5
...@@ -22,9 +22,8 @@ class Response { ...@@ -22,9 +22,8 @@ class Response {
} }
export const fetchAnn = (data: Parmas) => export const fetchAnn = (data: Parmas) =>
schoolMainFetch({ schoolMainFetch({
url: `/dcxy/app/homepage/campus/${data.campusId}/publishedSections/${ url: '/dcxy/wechat/homepage/campus/publishedSections',
data.customerId data: data,
}`,
}).then((res: ResponseDataEntity<Response>) => { }).then((res: ResponseDataEntity<Response>) => {
const data = res.data; const data = res.data;
return data.sections.find(item => item.styleType == 'ANNOUNCEMENT'); return data.sections.find(item => item.styleType == 'ANNOUNCEMENT');
...@@ -64,7 +63,6 @@ export const fetchAllAnn = ( ...@@ -64,7 +63,6 @@ export const fetchAllAnn = (
data: AllParmas, data: AllParmas,
): Promise<ResponseDataEntity<AllResponse>> => ): Promise<ResponseDataEntity<AllResponse>> =>
schoolMainFetch({ schoolMainFetch({
url: `/dcxy/app/homepage/campus/${data.campusId}/publishedItems/${ url: '/dcxy/wechat/homepage/campus/publishedItems',
data.sectionId data: data,
}`,
}); });
import { customerFetch, ResponseDataEntity } from '.'; import { customerFetch } from '.';
import { LoginInfoVo } from './baseClass';
export class LoginParams { export class LoginParams {
/** 登陆标识 */ /** 登陆标识 */
...@@ -18,7 +17,7 @@ export const appLogin = (data: LoginParams) => ...@@ -18,7 +17,7 @@ export const appLogin = (data: LoginParams) =>
export const appLogout = () => export const appLogout = () =>
customerFetch({ customerFetch({
url: '/app/customer/login/out', url: '/dcxy/wechat/applet/login/out',
}); });
export class PwdParams { export class PwdParams {
...@@ -33,6 +32,7 @@ export const changePwdByCellphone = (data: PwdParams) => ...@@ -33,6 +32,7 @@ export const changePwdByCellphone = (data: PwdParams) =>
customerFetch({ customerFetch({
url: '/app/customer/forget/pwd', url: '/app/customer/forget/pwd',
method: 'POST', method: 'POST',
data: data,
}); });
type RegisiterPramas = {}; type RegisiterPramas = {};
...@@ -59,7 +59,7 @@ type perfectionCustomerParams = { ...@@ -59,7 +59,7 @@ type perfectionCustomerParams = {
export const perfectionUserInfo = (entity: perfectionCustomerParams) => export const perfectionUserInfo = (entity: perfectionCustomerParams) =>
customerFetch({ customerFetch({
url: '/app/customer/perfection/customer', url: '/dcxy/wechat/applet/perfection/customer',
method: 'POST', method: 'POST',
data: entity, data: entity,
}); });
import { ConsumeOrderResponse, ConsumeOrder } from './baseClass'; import { customerFetch } from './index';
import { customerFetch, ResponseDataEntity } from './index';
export class Params { export class Params {
/** 会员id */ /** 会员id */
......
...@@ -4,4 +4,5 @@ export const OLD_BASE_SERVER_URL = 'https://ex-dev-selfbase.168cad.top'; ...@@ -4,4 +4,5 @@ export const OLD_BASE_SERVER_URL = 'https://ex-dev-selfbase.168cad.top';
export const BASE_SERVER_URL = 'https://ex-dev-dcxy-base-app.168cad.top'; export const BASE_SERVER_URL = 'https://ex-dev-dcxy-base-app.168cad.top';
export const CUSTOMER_SERVER_URL = export const CUSTOMER_SERVER_URL =
'https://ex-dev-dcxy-customer-app.168cad.top'; 'https://ex-dev-dcxy-customer-app.168cad.top';
export const SCHOOL_MAIN_URL = 'http://internal-dev-school-main.168cad.top'; export const SCHOOL_MAIN_URL = 'https://internal-dev-school-main.168cad.top';
export const ANN_LINK_URL = 'https://internal-dev-school-homepage.168cad.top/';
import { Component } from '@tarojs/taro'; import { Component } from '@tarojs/taro';
import { ComponentClass } from 'react'; import { ComponentClass } from 'react';
import { View, ScrollView, Image, Text } from '@tarojs/components'; 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';
...@@ -8,6 +8,7 @@ import { connect } from '@tarojs/redux'; ...@@ -8,6 +8,7 @@ import { connect } from '@tarojs/redux';
import { UserState } from '../../store/rootReducers/userinfo'; import { UserState } from '../../store/rootReducers/userinfo';
import './Announcement.scss'; import './Announcement.scss';
import { ANN_LINK_URL } from '../../constants';
type PageStateProps = { type PageStateProps = {
userinfo: UserState; userinfo: UserState;
...@@ -17,6 +18,7 @@ type PageState = { ...@@ -17,6 +18,7 @@ type PageState = {
pageNum: number; pageNum: number;
pageSize: number; pageSize: number;
list: AnnItem[]; list: AnnItem[];
linkUrl: string;
}; };
interface Announcement { interface Announcement {
...@@ -34,6 +36,7 @@ class Announcement extends Component { ...@@ -34,6 +36,7 @@ class Announcement extends Component {
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 10,
list: [], list: [],
linkUrl: '',
}; };
} }
componentWillMount() { componentWillMount() {
...@@ -51,63 +54,24 @@ class Announcement extends Component { ...@@ -51,63 +54,24 @@ class Announcement extends Component {
}) })
.catch(err => { .catch(err => {
console.log(err); console.log(err);
this.setState({
pageNum: 1,
pageSize: 10,
pages: 1,
total: 2,
list: [
{
id: 301070,
title: 'ASFDSGSD大苏打',
multiImageType: 'SINGLE',
source: '关机开不开地方',
linkUrls: ['sqwerqwerqwefsf'],
linkType: 'DEFAULT',
jumpUrl: '',
urlParameters: {},
sort: 1,
enabled: true,
loadAd: false,
mandatoryPrompt: false,
effectTime: 1529431320000,
expirationTime: 1530129600000,
createTime: '2018-06-01 10:41:11',
updateTime: '2019-01-25 09:43:17',
},
{
id: 301073,
title: '啊实打实的阿斯顿',
multiImageType: 'SINGLE',
source: '个撒大',
linkUrls: ['sqwerqwerqwefsf'],
linkType: 'DEFAULT',
jumpUrl: '',
urlParameters: {},
sort: 2,
enabled: true,
loadAd: false,
mandatoryPrompt: false,
createTime: '2018-06-12 10:52:15',
updateTime: '2019-01-25 09:47:39',
},
],
});
}); });
} }
geAnnDetail(id: number) { geAnnDetail(id: number, title: string) {
console.log(id); console.log(id);
this.setState({
linkUrl: `${ANN_LINK_URL}/Content/${id}?title=${title}`,
});
} }
render() { render() {
const { list } = this.state; const { list, linkUrl } = this.state;
return ( return (
<ScrollView className='Announcement' scroll-y> <ScrollView className='Announcement' scroll-y>
{linkUrl && <WebView src={linkUrl} />}
{list.map(annItem => ( {list.map(annItem => (
<View <View
key={annItem.id} key={annItem.id}
className='Announcement-item' className='Announcement-item'
onClick={() => this.geAnnDetail(annItem.id)} onClick={() => this.geAnnDetail(annItem.id, annItem.title)}>
>
<Image <Image
className='Announcement-item-img' className='Announcement-item-img'
src={annItem.linkUrls[0]} src={annItem.linkUrls[0]}
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
width: 100%; width: 100%;
height: 100%; height: 100%;
padding: 0 32px; padding: 0 32px;
z-index: 2; z-index: 100;
background-color: rgba(255, 255, 255, 0.5); background-color: rgba(255, 255, 255, 0.5);
} }
.blur { .blur {
...@@ -23,6 +23,8 @@ ...@@ -23,6 +23,8 @@
height: 436px; height: 436px;
} }
.BarCodeImg { .BarCodeImg {
position: relative;
z-index: 1;
flex: 1; flex: 1;
margin: 26px 52px 46px; margin: 26px 52px 46px;
background-color: #fff; background-color: #fff;
......
...@@ -17,7 +17,11 @@ import { ...@@ -17,7 +17,11 @@ import {
import OrderInfo from '../Order/components/OrderInfo/OrderInfo'; import OrderInfo from '../Order/components/OrderInfo/OrderInfo';
import OrderTitle from '../Order/components/OrderTitle/OrderTitle'; import OrderTitle from '../Order/components/OrderTitle/OrderTitle';
import OrderPayway from '../Order/components/OrderPayway/OrderPayway'; import OrderPayway from '../Order/components/OrderPayway/OrderPayway';
import { ConsumeOrder, PaymentAndActiveInfo } from '../../api/baseClass'; import {
ConsumeOrder,
PaymentAndActiveInfo,
CustomerBeanAccountVo,
} from '../../api/baseClass';
type PageStateProps = { type PageStateProps = {
userinfo: UserState; userinfo: UserState;
...@@ -26,6 +30,7 @@ type PageOwnProps = {}; ...@@ -26,6 +30,7 @@ type PageOwnProps = {};
type PageState = { type PageState = {
showPayOrder: boolean; showPayOrder: boolean;
showBig: boolean; showBig: boolean;
accounts: CustomerBeanAccountVo[];
orderInfo: ConsumeOrder; orderInfo: ConsumeOrder;
payInfos: { payInfos: {
paymentAndActiveInfos: PaymentAndActiveInfo[]; paymentAndActiveInfos: PaymentAndActiveInfo[];
...@@ -59,6 +64,7 @@ class BarCode extends Component { ...@@ -59,6 +64,7 @@ class BarCode extends Component {
this.state = { this.state = {
showPayOrder: false, showPayOrder: false,
showBig: false, showBig: false,
accounts: [],
orderInfo: { orderInfo: {
actualMoney: undefined, actualMoney: undefined,
areaId: undefined, areaId: undefined,
...@@ -115,12 +121,13 @@ class BarCode extends Component { ...@@ -115,12 +121,13 @@ class BarCode extends Component {
if (res.data.length) { if (res.data.length) {
this.fetchOrder(res.data[0].id); this.fetchOrder(res.data[0].id);
this.setState({ showPayOrder: true }); this.setState({ showPayOrder: true });
} else {
this.drawBarCode(false);
} }
}) })
.catch(err => { .catch(err => {
console.log(err); console.log(err);
}); });
wxbarcode.barcode('BarCode', userinfo.idBar, 646, 188);
} }
fetchOrder(id: number) { fetchOrder(id: number) {
...@@ -134,23 +141,6 @@ class BarCode extends Component { ...@@ -134,23 +141,6 @@ class BarCode extends Component {
orderInfo: orderInfo, orderInfo: orderInfo,
payInfos: payInfos, payInfos: payInfos,
}); });
fetchDeductionInfo({
orderId: orderInfo.id,
payType: '',
paymentConfId: payInfos.paymentConfId,
})
.then(res => {
this.setState({
deductionInfos: res.data,
});
})
.catch(err => {
console.log(err);
Taro.showToast({
title: '获取抵扣信息失败',
icon: 'none',
});
});
}) })
.catch(err => { .catch(err => {
console.log(err); console.log(err);
...@@ -158,9 +148,15 @@ class BarCode extends Component { ...@@ -158,9 +148,15 @@ class BarCode extends Component {
} }
payDoneHandle() { payDoneHandle() {
this.setState({ const { showBig } = this.state;
this.setState(
{
showPayOrder: false, showPayOrder: false,
}); },
() => {
this.drawBarCode(showBig);
},
);
} }
drawBarCode(showBig: boolean) { drawBarCode(showBig: boolean) {
const { userinfo } = this.props; const { userinfo } = this.props;
...@@ -181,13 +177,7 @@ class BarCode extends Component { ...@@ -181,13 +177,7 @@ class BarCode extends Component {
render() { render() {
const { userinfo } = this.props; const { userinfo } = this.props;
const { const { showPayOrder, showBig, orderInfo, payInfos, accounts } = this.state;
showPayOrder,
showBig,
orderInfo,
payInfos,
deductionInfos,
} = this.state;
return ( return (
<View className='BarCode'> <View className='BarCode'>
{showPayOrder && ( {showPayOrder && (
...@@ -195,11 +185,11 @@ class BarCode extends Component { ...@@ -195,11 +185,11 @@ class BarCode extends Component {
<OrderTitle price={orderInfo.payableMoney} /> <OrderTitle price={orderInfo.payableMoney} />
<OrderInfo orderInfo={orderInfo} /> <OrderInfo orderInfo={orderInfo} />
<OrderPayway <OrderPayway
payDoneCallback={this.payDoneHandle} onPayDoneCallback={this.payDoneHandle}
userinfo={userinfo} userinfo={userinfo}
orderId={orderInfo.id} accounts={accounts}
orderInfo={orderInfo}
payInfos={payInfos} payInfos={payInfos}
deductionInfos={deductionInfos}
/> />
</View> </View>
)} )}
...@@ -207,8 +197,7 @@ class BarCode extends Component { ...@@ -207,8 +197,7 @@ class BarCode extends Component {
<View <View
className={`BarCodeBox ${showPayOrder ? 'blur' : ''} ${ className={`BarCodeBox ${showPayOrder ? 'blur' : ''} ${
showBig ? 'BarCodeBoxBig' : '' showBig ? 'BarCodeBoxBig' : ''
}`} }`}>
>
{showBig ? ( {showBig ? (
<Image className='bg' src={BarCodeBoxBigBg} /> <Image className='bg' src={BarCodeBoxBigBg} />
) : ( ) : (
...@@ -218,7 +207,9 @@ class BarCode extends Component { ...@@ -218,7 +207,9 @@ class BarCode extends Component {
<Image className='BarCodeBox-refresh' src={RefreshIcon} /> <Image className='BarCodeBox-refresh' src={RefreshIcon} />
)} )}
<View className={`BarCodeImg ${showBig ? 'BarCodeImgBig' : ''}`}> <View className={`BarCodeImg ${showBig ? 'BarCodeImgBig' : ''}`}>
{showPayOrder ? null : (
<Canvas className='BarCodeCav' canvasId='BarCode' /> <Canvas className='BarCodeCav' canvasId='BarCode' />
)}
</View> </View>
<View className='toggleBtn' onClick={this.toggleBigBarCode}> <View className='toggleBtn' onClick={this.toggleBigBarCode}>
{showBig ? '缩小' : '放大'} {showBig ? '缩小' : '放大'}
......
...@@ -95,51 +95,51 @@ class Home extends Component { ...@@ -95,51 +95,51 @@ class Home extends Component {
} }
}) })
.catch(err => { .catch(err => {
this.setState({ // this.setState({
annItem: { // annItem: {
id: 896, // id: 896,
styleType: 'ANNOUNCEMENT', // styleType: 'ANNOUNCEMENT',
name: '公告1', // name: '公告1',
titleTypeRemark: '无', // titleTypeRemark: '无',
titleType: 'NONE', // titleType: 'NONE',
titleContent: '', // titleContent: '',
sort: 3, // sort: 3,
updateTime: 1528770103000, // updateTime: 1528770103000,
itemsCount: 10, // itemsCount: 10,
items: [ // items: [
{ // {
id: 301070, // id: 301070,
title: 'ASFDSGSD大苏打', // title: 'ASFDSGSD大苏打',
multiImageType: 'SINGLE', // multiImageType: 'SINGLE',
source: '关机开不开地方', // source: '关机开不开地方',
linkUrls: ['sqwerqwerqwefsf'], // linkUrls: ['sqwerqwerqwefsf'],
linkType: 'DEFAULT', // linkType: 'DEFAULT',
jumpUrl: '', // jumpUrl: '',
urlParameters: {}, // urlParameters: {},
sort: 1, // sort: 1,
loadAd: false, // loadAd: false,
mandatoryPrompt: false, // mandatoryPrompt: false,
createTime: '2018-06-01 10:41:11', // createTime: '2018-06-01 10:41:11',
updateTime: '2019-01-25 09:43:17', // updateTime: '2019-01-25 09:43:17',
}, // },
{ // {
id: 301073, // id: 301073,
title: '啊实打实的阿斯顿', // title: '啊实打实的阿斯顿',
multiImageType: 'SINGLE', // multiImageType: 'SINGLE',
source: '个撒大', // source: '个撒大',
linkUrls: ['sqwerqwerqwefsf'], // linkUrls: ['sqwerqwerqwefsf'],
linkType: 'DEFAULT', // linkType: 'DEFAULT',
jumpUrl: '', // jumpUrl: '',
urlParameters: {}, // urlParameters: {},
sort: 2, // sort: 2,
loadAd: false, // loadAd: false,
mandatoryPrompt: false, // mandatoryPrompt: false,
createTime: '2018-06-12 10:52:15', // createTime: '2018-06-12 10:52:15',
updateTime: '2019-01-25 09:47:39', // updateTime: '2019-01-25 09:47:39',
}, // },
], // ],
}, // },
}); // });
console.error(err); console.error(err);
}); });
} }
......
import { ComponentClass } from 'react'; import { ComponentClass } from 'react';
import Taro, { Component, Config } from '@tarojs/taro'; import Taro, { Component, Config } from '@tarojs/taro';
import { View, Button, Text, Input, Navigator } from '@tarojs/components'; import { View, Button, Input, Navigator } from '@tarojs/components';
import './Login.scss'; import './Login.scss';
import { appLogin } from '../../api/customer'; import { appLogin } from '../../api/customer';
......
...@@ -27,6 +27,9 @@ page { ...@@ -27,6 +27,9 @@ page {
justify-content: space-between; justify-content: space-between;
font-size: 28px; font-size: 28px;
color: #333; color: #333;
.deduction {
color: #ff1010;
}
} }
.OrderDetail-line { .OrderDetail-line {
margin: 10px auto; margin: 10px auto;
......
import { ComponentClass } from 'react'; import { ComponentClass } from 'react';
import Taro, { Component, Config } from '@tarojs/taro'; import Taro, { Component, Config } from '@tarojs/taro';
import { View, Text, Image } from '@tarojs/components'; import { View, Text } from '@tarojs/components';
import OrderTitle from '../components/OrderTitle/OrderTitle'; import OrderTitle from '../components/OrderTitle/OrderTitle';
import OrderInfo from '../components/OrderInfo/OrderInfo'; import OrderInfo from '../components/OrderInfo/OrderInfo';
import comLogo from '../../../images/order/pay_logo_icon@2x.png';
import './OrderDetail.scss'; import './OrderDetail.scss';
import { fetchOrderDetail, fetchOrderDetailAndPay } from '../../../api/order'; import { fetchOrderDetailAndPay } from '../../../api/order';
import { PayType, getPayType } from '../../../utils/payType'; import { PayType, getPayType } from '../../../utils/payType';
type pageProps = {}; type pageProps = {};
type PageState = { type PageState = {
actualMoney: 0; actualMoney: number;
areaId: 0; areaId: number;
areaName: string; areaName: string;
consumeType: string; consumeType: string;
createAt: string; createAt: string;
customerCellphone: string; customerCellphone: string;
customerId: 0; customerId: number;
customerName: string; customerName: string;
deductionBean: 0; deductionBean: number;
deductionMoney: 0; deductionMoney: number;
equipmentNum: string; equipmentNum: string;
equipmentPosition: string; equipmentPosition: string;
id: 0; id: number;
operateId: 0; operateId: number;
operateName: string; operateName: string;
operationMode: string; operationMode: string;
orderName: string; orderName: string;
...@@ -33,10 +32,10 @@ type PageState = { ...@@ -33,10 +32,10 @@ type PageState = {
orderState: string; orderState: string;
outTradeNo: string; outTradeNo: string;
payType: PayType; payType: PayType;
payableMoney: 0; payableMoney: number;
serviceId: 0; serviceId: number;
serviceName: string; serviceName: string;
thirdDiscountMoney: 0; thirdDiscountMoney: number;
thirdTradeNumber: string; thirdTradeNumber: string;
updateDate: string; updateDate: string;
}; };
...@@ -96,6 +95,9 @@ class OrderDetail extends Component { ...@@ -96,6 +95,9 @@ class OrderDetail extends Component {
id: id, id: id,
}) })
.then(res => { .then(res => {
this.setState({
...res.data,
});
console.log(res); console.log(res);
}) })
.catch(err => { .catch(err => {
...@@ -122,12 +124,14 @@ class OrderDetail extends Component { ...@@ -122,12 +124,14 @@ class OrderDetail extends Component {
<View className='OrderDetail'> <View className='OrderDetail'>
<OrderTitle price={payableMoney} /> <OrderTitle price={payableMoney} />
<OrderInfo <OrderInfo
serviceName={serviceName} orderInfo={{
createAt={createAt} serviceName,
orderNumber={orderNumber} createAt,
areaName={areaName} orderNumber,
equipmentNum={equipmentNum} areaName,
equipmentPosition={equipmentPosition} equipmentNum,
equipmentPosition,
}}
/> />
<View className='OrderDetail-line' /> <View className='OrderDetail-line' />
<View className='OrderDetail-payinfo'> <View className='OrderDetail-payinfo'>
...@@ -137,13 +141,13 @@ class OrderDetail extends Component { ...@@ -137,13 +141,13 @@ class OrderDetail extends Component {
{deductionBean ? ( {deductionBean ? (
<View className='OrderDetail-payinfo'> <View className='OrderDetail-payinfo'>
<Text>通用豆抵扣</Text> <Text>通用豆抵扣</Text>
<Text>{deductionBean.toFixed(2)}</Text> <Text className='deduction'>{deductionBean.toFixed(2)}</Text>
</View> </View>
) : null} ) : null}
{deductionMoney ? ( {deductionMoney ? (
<View className='OrderDetail-payinfo'> <View className='OrderDetail-payinfo'>
<Text>艾米抵扣</Text> <Text>艾米抵扣</Text>
<Text>{deductionMoney.toFixed(2)}</Text> <Text className='deduction'>{deductionMoney.toFixed(2)}</Text>
</View> </View>
) : null} ) : null}
......
...@@ -30,17 +30,6 @@ type PageState = { ...@@ -30,17 +30,6 @@ type PageState = {
paymentAndActiveInfos: PaymentAndActiveInfo[]; paymentAndActiveInfos: PaymentAndActiveInfo[];
paymentConfId: number; paymentConfId: number;
}; };
deductionInfos: {
amiAccount: number;
beanAccount: number;
deductionMoney: number;
deductionType: string;
orderMoney: number;
payMoney: number;
payType: string;
remainAccount: number;
titlePerfix: string;
};
}; };
interface OrderPay { interface OrderPay {
...@@ -91,17 +80,6 @@ class OrderPay extends Component { ...@@ -91,17 +80,6 @@ class OrderPay extends Component {
paymentAndActiveInfos: [], paymentAndActiveInfos: [],
paymentConfId: 0, paymentConfId: 0,
}, },
deductionInfos: {
amiAccount: 0,
beanAccount: 0,
deductionMoney: 0,
deductionType: '',
orderMoney: 0,
payMoney: 0,
payType: '',
remainAccount: 0,
titlePerfix: '',
},
}; };
} }
...@@ -123,23 +101,6 @@ class OrderPay extends Component { ...@@ -123,23 +101,6 @@ class OrderPay extends Component {
orderInfo: orderInfo, orderInfo: orderInfo,
payInfos: payInfos, payInfos: payInfos,
}); });
fetchDeductionInfo({
orderId: orderInfo.id,
payType: '',
paymentConfId: payInfos.paymentConfId,
})
.then(res => {
this.setState({
deductionInfos: res.data,
});
})
.catch(err => {
console.log(err);
Taro.showToast({
title: '获取抵扣信息失败',
icon: 'none',
});
});
}) })
.catch(err => { .catch(err => {
console.log(err); console.log(err);
...@@ -152,18 +113,18 @@ class OrderPay extends Component { ...@@ -152,18 +113,18 @@ class OrderPay extends Component {
render() { render() {
const { userinfo } = this.props; const { userinfo } = this.props;
const { orderInfo, payInfos, deductionInfos } = this.state; const { orderInfo, payInfos, accounts } = this.state;
return ( return (
<View className='OrderPay topBr'> <View className='OrderPay topBr'>
<OrderTitle price={orderInfo.payableMoney} /> <OrderTitle price={orderInfo.payableMoney} />
<OrderInfo orderInfo={orderInfo} /> <OrderInfo orderInfo={orderInfo} />
<View className='OrderPay-line' /> <View className='OrderPay-line' />
<OrderPayway <OrderPayway
payDoneCallback={this.payDoneHandle} onPayDoneCallback={this.payDoneHandle}
userinfo={userinfo} userinfo={userinfo}
orderId={orderInfo.id} orderInfo={orderInfo}
accounts={accounts}
payInfos={payInfos} payInfos={payInfos}
deductionInfos={deductionInfos}
/> />
</View> </View>
); );
......
...@@ -19,6 +19,20 @@ interface OrderInfo { ...@@ -19,6 +19,20 @@ interface OrderInfo {
props: PageProps; props: PageProps;
} }
class OrderInfo extends Component { class OrderInfo extends Component {
static defaultProps = {
orderInfo: {
serviceName: '',
createAt: '',
orderNumber: '',
areaName: '',
equipmentNum: '',
equipmentPosition: '',
},
};
constructor(props) {
super(props);
}
render() { render() {
const { const {
orderInfo: { orderInfo: {
......
...@@ -24,6 +24,9 @@ ...@@ -24,6 +24,9 @@
background-color: #ffd506; background-color: #ffd506;
} }
} }
.OrderPay-payway.disabled {
color: #666;
}
.OrderPay-payinfo { .OrderPay-payinfo {
display: flex; display: flex;
height: 60px; height: 60px;
......
...@@ -16,7 +16,6 @@ import agreeIcon from '../../images/login/icon_zhuce_sel@2x.png'; ...@@ -16,7 +16,6 @@ import agreeIcon from '../../images/login/icon_zhuce_sel@2x.png';
import agreeNotIcon from '../../images/login/icon_zhuce_nor@2x.png'; import agreeNotIcon from '../../images/login/icon_zhuce_nor@2x.png';
import { connect } from '@tarojs/redux'; import { connect } from '@tarojs/redux';
import { UserState, updateUserInfo } from '../../store/rootReducers/userinfo'; import { UserState, updateUserInfo } from '../../store/rootReducers/userinfo';
import { getVcode, fetchWxUserRegister } from '../../api/wx';
import { wxUserRegister } from '../../api/customer'; import { wxUserRegister } from '../../api/customer';
type PageStateProps = { type PageStateProps = {
......
...@@ -3,7 +3,7 @@ import Taro, { Component, Config } from '@tarojs/taro'; ...@@ -3,7 +3,7 @@ import Taro, { Component, Config } from '@tarojs/taro';
import { View } from '@tarojs/components'; import { View } from '@tarojs/components';
import './index.scss'; import './index.scss';
import { LoginReponse, login } from '../../api/wx'; import { LoginReponse } from '../../api/wx';
import { connect } from '@tarojs/redux'; import { connect } from '@tarojs/redux';
import { updateUserInfo, UserState } from '../../store/rootReducers/userinfo'; import { updateUserInfo, UserState } from '../../store/rootReducers/userinfo';
......
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