Commit c686e4d3 by wangshuo

Merge branch 'dev'

parents 2add0450 e43c1313
......@@ -60,6 +60,20 @@ class BtnStatus extends Component {
})
}
}
// 直接购买 TODO 等弄清楚了逻辑 再和加入购物车合并
toBuy = () => {
let data = {
course_id: getParam('id')
};
http.post(`${api.home}/m/cart/add`, data).then((res) => {
if(res.data.code !== 200) {
Toast.info(res.data.msg, 2);
return;
}
this.props.history.replace('/shopcart');
})
}
// 取消砍价
cancel = () => {
......
......@@ -16,13 +16,16 @@ function OrderList(props) {
<div>
{
listData.map((item, index) => {
console.log(item);
const { is_coupon, course_id, image_name, price1, price0, simpledescription, course_title, coupon_num, coupon_desc } = item;
const Info = (
<div className="order-info">
<Link to={`/detail?id=${course_id}`}><p className='order-title' style={{ overflow: 'hidden', textOverflow: 'ellipsis', whiteSpace: 'nowrap' }}>{course_title}</p></Link>
<p className='order-content' style={{ WebkitBoxOrient: 'vertical', WebkitLineClamp: '2', wordBreak: 'break-all', overflow: 'hidden', textOverflow: 'ellipsis', display: '-webkit-box' }}>{simpledescription}</p>
<p className='order-des'>
<span className='order-newprice'>¥{price1}</span>
{
props.courseId === undefined ? (<span className='order-newprice'>¥{price1}</span>) : (<span className='order-newprice'>¥{item.pdd_group_info.price}</span>)
}
<span className='order-price'>¥{price0}</span>
</p>
</div>
......@@ -168,10 +171,10 @@ class Order extends Component {
componentDidMount() {
let _this = this;
if(getParam('id') !== undefined) {
Promise.all([http.get(`${api.home}/m/order/preorder`), http.get(`${api.home}/m/course/detail/${getParam('id')}`)]).then(res => {
Promise.all([http.get(`${api.home}/m/del_cart_order/${getParam('id')}`), http.get(`${api.home}/m/order/preorder`), http.get(`${api.home}/m/course/detail/${getParam('id')}`)]).then(res => {
let preorder = res[0],
detail = res[1],
let preorder = res[1],
detail = res[2],
orderList = [];
console.log(detail);
if(preorder.data.code !== 200) {
......@@ -287,7 +290,7 @@ class Order extends Component {
</div>
}
<div className="order-list">
<OrderList list={orderList} compute={this.computedMoney} />
<OrderList list={orderList} compute={this.computedMoney} courseId={getParam('id')} />
</div>
<div className="order-balance">
<List>
......
import React, { Component } from 'react';
import { Flex, WhiteSpace, WingBlank } from 'antd-mobile';
import './DrawDocument.scss'
import './DrawDocument.scss';
import OpenApp from '@/common/CallApp';
export default class DrawDocument extends Component {
constructor(props) {
......@@ -35,7 +36,8 @@ export default class DrawDocument extends Component {
<WingBlank>
<Flex justify='between' align='center' style={{height: '44px'}}>
<p className={'tip'}>收支明细及待确认金额请前往App查看</p>
<div className={'app'}>APP打开</div>
{/* <div className={'app'}>在APP打开</div> */}
<OpenApp />
</Flex>
</WingBlank>
</div>
......
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