share.js 18.9 KB
Newer Older
zhanghaozhe committed
1 2 3 4 5 6 7
import React, { Component } from "react"
import "./share.scss"
import { http, getParam, browser, wxShare } from "src/utils"
import { Toast } from "antd-mobile"
import { connect } from "react-redux"
import { Link } from "react-router-dom"
import showAlert from "src/common/deposit/end-expansion-alert"
xuzhenghua committed
8 9

class ExpandShare extends Component {
zhanghaozhe committed
10
  state = {
zhanghaozhe committed
11
    isShow: false, //活动规则
zhanghaozhe committed
12
    step: 0, // 区分弹窗
zhanghaozhe committed
13 14
    data: "", //膨胀券相关
    courseList: [], // 预售课程列表
zhanghaozhe committed
15
    isshowMore: true, // 是否显示查看更多
zhanghaozhe committed
16 17 18
    pageCount: 1, // 页码
    helpData: "", // 帮助好友助力数据
    courseListMore: "", // 所有课程
zhanghaozhe committed
19 20 21 22 23 24 25
  }

  componentDidMount() {
    this.getListorData()
    this.getCourseList()
    if (browser.isWeixin) {
      wxShare({
zhanghaozhe committed
26 27
        title: "AI充电节,预热来袭!80元红包送给你,手要快!",
        desc: "积福气享1折秒课,超10万元奖品来就送--七月在线",
zhanghaozhe committed
28
        link: window.location.href,
29
        imgUrl: "https://cdn.julyedu.com/active19_1111/m/dj-share-img.png",
zhanghaozhe committed
30
      })
xuzhenghua committed
31
    }
zhanghaozhe committed
32
  }
xuzhenghua committed
33

zhanghaozhe committed
34 35
  // 获取膨胀券相关
  getListorData = () => {
zhanghaozhe committed
36 37 38 39 40 41 42 43 44 45 46 47
    http
      .get(`${API["base-api"]}/sys/help_list/${getParam("deposit_code")}`)
      .then((res) => {
        const { data, errno, msg } = res.data
        if (errno === 200) {
          this.setState({
            data: data,
          })
        } else {
          Toast.info(msg, 2)
        }
      })
zhanghaozhe committed
48 49 50 51 52
  }

  // 获取课程列表
  getCourseList = () => {
    const _this = this
zhanghaozhe committed
53 54
    http.get(`${API["base-api"]}/anniversary2019/pre_course`).then((res) => {
      const { data, errno, msg } = res.data
zhanghaozhe committed
55
      if (errno === 200) {
zhanghaozhe committed
56
        if (JSON.stringify(data) === "{}") {
zhanghaozhe committed
57 58 59 60 61 62 63 64 65
          _this.setState({
            isshowMore: false,
            courseList: [],
          })
        } else if (data.length <= 6) {
          _this.setState({
            isshowMore: false,
            courseList: data,
          })
xuzhenghua committed
66
        } else {
zhanghaozhe committed
67 68 69 70 71
          _this.setState({
            isshowMore: true,
            courseList: data.slice(0, 6),
            courseListMore: data,
          })
xuzhenghua committed
72
        }
zhanghaozhe committed
73 74 75 76 77 78 79 80 81 82 83 84 85 86 87
      } else {
        Toast.info(msg, 2)
      }
    })
  }

  // 获取更多课程
  getMoreCourseList = () => {
    this.setState({
      courseList: this.state.courseListMore,
      isshowMore: false,
    })
  }
  // 立即付定金
  expandPaydj = (courseId) => {
zhanghaozhe committed
88 89
    const { user } = this.props
    const uid = user && user.data && user.data.uid
zhanghaozhe committed
90
    if (!uid) {
zhanghaozhe committed
91
      this.props.history.push("/passport/login")
zhanghaozhe committed
92
    } else {
zhanghaozhe committed
93 94 95 96 97
      this.props.history.push(`/deposit-order?oid=${courseId}&source=${1}`, {
        id: courseId,
        isexpand: 1,
        sourcenum: 1,
      })
xuzhenghua committed
98
    }
zhanghaozhe committed
99 100 101
  }
  // 立即付尾款
  expandPaywk = (courseId, time, day) => {
zhanghaozhe committed
102 103
    const { user } = this.props
    const uid = user && user.data && user.data.uid
zhanghaozhe committed
104
    if (!uid) {
zhanghaozhe committed
105
      this.props.history.push("/passport/login")
zhanghaozhe committed
106
    } else {
zhanghaozhe committed
107
      let timeStamp = Date.parse(new Date()) / 1000
zhanghaozhe committed
108
      if (timeStamp >= time) {
zhanghaozhe committed
109 110 111 112
        this.props.history.push("/final-deposit-order?source=1", {
          id: courseId,
          sourcenum: 1,
        })
zhanghaozhe committed
113
      } else {
zhanghaozhe committed
114
        Toast.info("付尾款时间将在" + day + "开启", 2)
zhanghaozhe committed
115
      }
xuzhenghua committed
116
    }
zhanghaozhe committed
117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132
  }
  // 去学习
  tostudy = (courseId) => {
    this.props.history.push(`/getDetail?id=${courseId}`)
  }

  // 显示活动规则
  showRule = () => {
    this.setState({
      isShow: true,
      step: 1,
    })
  }

  // 邀请好友
  share = () => {
zhanghaozhe committed
133 134
    const { user } = this.props
    const uid = user && user.data && user.data.uid
zhanghaozhe committed
135
    if (!uid) {
zhanghaozhe committed
136
      this.props.history.push("/passport/login")
zhanghaozhe committed
137 138 139 140 141
    } else {
      this.setState({
        isShow: true,
        step: 0,
      })
xuzhenghua committed
142
    }
zhanghaozhe committed
143 144 145 146
  }

  // 帮好友助力
  helpFriend = (id) => {
zhanghaozhe committed
147 148
    const { user } = this.props
    const uid = user && user.data && user.data.uid
zhanghaozhe committed
149
    if (!uid) {
zhanghaozhe committed
150
      this.props.history.push("/passport/login")
zhanghaozhe committed
151
    } else {
zhanghaozhe committed
152 153
      http.post(`${API["base-api"]}/sys/help/${id}`).then((res) => {
        const { data, errno, msg } = res.data
zhanghaozhe committed
154 155
        if (errno === 200) {
          this.setState({
xuzhenghua committed
156
            isShow: true,
zhanghaozhe committed
157 158 159 160 161 162 163 164 165
            step: 2,
            helpData: data,
          })
          this.getListorData()
        } else if (errno === 17018 || errno === 17020) {
          this.setState({
            isShow: true,
            step: 4,
          })
xuzhenghua committed
166
        } else {
zhanghaozhe committed
167
          Toast.info(msg, 2)
xuzhenghua committed
168
        }
zhanghaozhe committed
169
      })
xuzhenghua committed
170
    }
zhanghaozhe committed
171 172 173 174
  }

  // 结束助力
  isendExpand = (data) => {
zhanghaozhe committed
175 176
    const { user } = this.props
    const uid = user && user.data && user.data.uid
zhanghaozhe committed
177
    if (!uid) {
zhanghaozhe committed
178
      this.props.history.push("/passport/login")
zhanghaozhe committed
179
    } else {
zhanghaozhe committed
180
      const { amount, limit_amount, id } = data
zhanghaozhe committed
181 182 183 184 185 186 187 188 189
      showAlert({
        amount,
        limit_amount,
        onCancel: () => {
          this.setState({
            isShow: false,
          })
        },
        onConfirm: () => {
zhanghaozhe committed
190 191 192 193 194 195
          http
            .post(`${API["base-api"]}/sys/end_expansion`, {
              id,
            })
            .then((res) => {
              const { errno, msg } = res.data
zhanghaozhe committed
196 197 198 199 200 201 202 203
              if (errno === 200) {
                this.setState({
                  isShow: false,
                })
                this.getListorData()
              } else {
                Toast.info(msg)
              }
xuzhenghua committed
204
            })
zhanghaozhe committed
205 206
        },
      })
xuzhenghua committed
207
    }
zhanghaozhe committed
208
  }
xuzhenghua committed
209

zhanghaozhe committed
210 211 212 213 214 215
  // 关闭弹窗
  close = () => {
    this.setState({
      isShow: false,
    })
  }
xuzhenghua committed
216

zhanghaozhe committed
217
  render() {
zhanghaozhe committed
218
    const { isShow, step, data, courseList, isshowMore, helpData } = this.state
zhanghaozhe committed
219 220 221
    return (
      <div className="expand-box">
        <div className="banner">
zhanghaozhe committed
222
          <img
223
            src="https://cdn.julyedu.com/active19_1111/m/dj-banner.png"
zhanghaozhe committed
224 225 226
            alt=""
          />
          <span onClick={() => this.showRule()} />
zhanghaozhe committed
227 228 229 230
        </div>
        <div className="all-contnet">
          <div className="content">
            {/*进度||膨胀券*/}
zhanghaozhe committed
231
            {<ExpansionStatus data={data} />}
zhanghaozhe committed
232 233
            {/*button*/}
            {
zhanghaozhe committed
234 235 236 237 238 239
              <ButtonStatus
                data={data}
                share={this.share}
                helpFriend={this.helpFriend}
                isendExpand={this.isendExpand}
              />
zhanghaozhe committed
240 241 242
            }
          </div>
          {/*好友助力列表*/}
zhanghaozhe committed
243 244
          {(data.oneself === 1 || data.help_list) &&
            data.help_list.length !== 0 && <FriendList data={data} />}
zhanghaozhe committed
245 246
          {/*预售课程列表*/}
          {
zhanghaozhe committed
247 248 249 250 251 252 253
            <CourseList
              data={courseList}
              isshowMore={isshowMore}
              getMoreCourseList={this.getMoreCourseList}
              expandPaydj={this.expandPaydj}
              expandPaywk={this.expandPaywk}
              tostudy={this.tostudy}
zhanghaozhe committed
254 255 256
            />
          }
        </div>
xuzhenghua committed
257

zhanghaozhe committed
258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276
        {isShow && (
          <div className="mbc-box">
            {step === 0 && (
              <ShareBox close={this.close} share={this.share} data={data} />
            )}
            {step === 1 && <ActiveRule />}

            {step === 2 && (
              <AssistanceSuccess
                share={this.share}
                data={data}
                helpData={helpData}
              />
            )}
            {step === 4 && <AssistanceErron close={this.close} />}
            {(step === 1 || step === 2) && (
              <img
                className="close"
                onClick={() => this.close()}
277
                src="https://cdn.julyedu.com/Public/img/guanbi_icon.png"
zhanghaozhe committed
278 279 280
                alt=""
              />
            )}
zhanghaozhe committed
281
          </div>
zhanghaozhe committed
282
        )}
zhanghaozhe committed
283 284 285
      </div>
    )
  }
xuzhenghua committed
286 287 288 289
}

// 活动规则
function ActiveRule() {
zhanghaozhe committed
290
  return (
zhanghaozhe committed
291
    <div className="content active-rule">
zhanghaozhe committed
292
      <div className="title">活动规则</div>
zhanghaozhe committed
293 294 295
      <p>
        1、本活动期间,可以助力1位好友不同课程发起的膨胀,但是只能为同一好友;
      </p>
zhanghaozhe committed
296
      <p>2、好友发起膨胀后,可以随时终止膨胀;</p>
zhanghaozhe committed
297 298 299
      <p>
        3、膨胀券膨胀完成后,以优惠券形式发放到参与活动的账号(包括所有助力好友),该膨胀券为全场通用券,可在购买任一课程后进行抵扣(包括已付定金课程);
      </p>
zhanghaozhe committed
300 301 302 303
      <p>4、如有疑问,可联系七月在线客服微信:julyedukefu</p>
      <p>*本活动最终解释权归七月在线所有</p>
    </div>
  )
xuzhenghua committed
304 305 306 307
}

// 邀请好友 分享弹窗
function ShareBox(props) {
zhanghaozhe committed
308
  const { close, data } = props
zhanghaozhe committed
309
  return (
zhanghaozhe committed
310
    <div className="content">
zhanghaozhe committed
311 312
      <div onClick={() => close()} className="fiexd"></div>
      <div className="share-box">
zhanghaozhe committed
313
        {browser.isWeixin && (
314
          <img src="//cdn.julyedu.com/share/throw_icon.png" alt="" />
zhanghaozhe committed
315
        )}
zhanghaozhe committed
316
        <p>邀请好友助力</p>
zhanghaozhe committed
317 318 319
        <p>
          膨胀券翻倍膨胀,{data.start_amount}元变{data.limit_amount}元!
        </p>
zhanghaozhe committed
320 321 322 323
        <span>送助力好友{data.limit_amount}</span>
      </div>
    </div>
  )
xuzhenghua committed
324 325 326 327
}

//助力成功弹窗
function AssistanceSuccess(props) {
zhanghaozhe committed
328
  const { helpData, share, data } = props
zhanghaozhe committed
329
  return (
zhanghaozhe committed
330
    <div className="content assistance-success">
zhanghaozhe committed
331 332
      <div className="title">助力成功</div>
      <p className="add-price">
zhanghaozhe committed
333
        <img
334
          src="https://cdn.julyedu.com/active19_717/m/add-money.png"
zhanghaozhe committed
335 336
          alt=""
        />
zhanghaozhe committed
337 338 339 340 341
        +{helpData.help_amount}
      </p>
      <p className="all-price">
        <span>{helpData.sale_amount}</span>
      </p>
zhanghaozhe committed
342 343 344 345 346 347 348 349
      <p className="assistance-tip">
        感谢你的助力,你们离{data.limit_amount}元又更近了哦!
        <br />
        可以邀请其他小伙伴一起助力~
      </p>
      <button onClick={() => share()}>
        邀请更多好友拿{data.limit_amount}
      </button>
zhanghaozhe committed
350 351
    </div>
  )
xuzhenghua committed
352 353 354 355
}

// 助力失败弹窗
function AssistanceErron(props) {
zhanghaozhe committed
356
  const { close } = props
zhanghaozhe committed
357 358 359 360 361 362 363 364 365
  return (
    <div className="content assistance-erron">
      <div className="title">温馨提示</div>
      <p>很遗憾~</p>
      <p>你已经帮别的好友助过力了,</p>
      <p>不能再帮这位好友助力!</p>
      <button onClick={() => close()}>知道了</button>
    </div>
  )
xuzhenghua committed
366 367 368 369
}

// 判断是否结束膨胀
function ExpansionStatus(props) {
zhanghaozhe committed
370
  const { data } = props
zhanghaozhe committed
371 372 373
  //is_end: 0 判断活动是否结束  0否1是
  // is_end_expansion: 0,是否是自己结束膨胀  0否1是
  if (data.is_end === 0 && data.is_end_expansion === 0) {
zhanghaozhe committed
374
    return <ProgressData data={data} />
zhanghaozhe committed
375
  } else {
zhanghaozhe committed
376
    return <EndExpansion data={data} />
zhanghaozhe committed
377
  }
xuzhenghua committed
378 379 380 381
}

// 没有结束膨胀的情况
function ProgressData(props) {
zhanghaozhe committed
382 383 384 385
  const data = props.data
  return (
    <div>
      <div className="user-mess">
zhanghaozhe committed
386
        <img src={data.avatar_file} alt="user" />
zhanghaozhe committed
387 388 389 390
        帮我助力,送你{data.limit_amount}
      </div>
      <div className="progress-box">
        <div className="progress-base">
zhanghaozhe committed
391 392 393 394 395 396 397 398 399 400 401 402 403 404
          <span
            className="progress-active"
            style={{
              width:
                ((data.amount - data.start_amount) / data.limit_amount) * 100 +
                "%",
            }}
          >
            <span className="ending">
              <span className="tip">
                {data.amount} <i />
              </span>
            </span>
          </span>
xuzhenghua committed
405
        </div>
zhanghaozhe committed
406 407 408 409 410
        <div className="progress-price">
          <span>{data.start_amount}</span>
          <span>{data.limit_amount}</span>
        </div>
      </div>
zhanghaozhe committed
411 412 413 414 415 416 417 418 419 420
      {data.help_list.length === 0 && (
        <div className="help-mess no">
          还没有好友为{data.oneself === 1 ? "你" : "Ta"}助力哦~
        </div>
      )}
      {data.help_list.length > 0 && (
        <div className="help-mess has">
          已有<span className="FF19A0">{data.help_list.length}</span>位好友助
        </div>
      )}
zhanghaozhe committed
421 422
    </div>
  )
xuzhenghua committed
423 424 425 426
}

// 结束膨胀的情况
function EndExpansion(props) {
zhanghaozhe committed
427 428
  const data = props.data
  return (
zhanghaozhe committed
429
    <div className="coupon-box">
zhanghaozhe committed
430 431
      <div className="coupon">
        <p className="coupon-name">红包膨胀优惠券</p>
zhanghaozhe committed
432 433 434
        <p className="coupon-price">
          <span>{data.amount}</span>
        </p>
zhanghaozhe committed
435 436 437 438
        <p className="coupon-time">有效期至:{data.expire_time}</p>
      </div>
      <div className="tip">
        <ul>
zhanghaozhe committed
439 440 441
          {new Array(19).fill("1").map((item, index) => {
            return <li key={index} />
          })}
zhanghaozhe committed
442 443 444 445 446 447 448
        </ul>
        全场通用
      </div>
      <p className="over-mess">该礼券已成功发放至账户</p>
      <p className="over-mess">可在七月在线pc/app-我的-优惠券查看</p>
    </div>
  )
xuzhenghua committed
449 450 451 452
}

// 按钮
function ButtonStatus(props) {
zhanghaozhe committed
453
  const { data, share, helpFriend, isendExpand } = props
zhanghaozhe committed
454 455 456 457 458 459
  // data.oneself 判断是否是自己  0帮好友助力 1自己
  // data.is_help  是否已经帮好友助力  0 未助力 1已助力
  // data.s_end: 0 判断活动是否结束  0否1是
  // data.is_end_expansion: 0,是否是自己结束膨胀  0否1是
  return (
    <div>
zhanghaozhe committed
460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503
      {data.is_end === 0 && (
        <div className="btns">
          {data.oneself === 1 && data.is_end_expansion === 0 && (
            <button className="active" onClick={() => share()}>
              邀请好友助力
            </button>
          )}
          {data.oneself === 1 &&
            data.is_end_expansion === 1 &&
            data.amount !== data.limit_amount && (
              <button className="over">您已结束膨胀</button>
            )}
          {data.oneself === 1 &&
            data.is_end_expansion === 1 &&
            data.amount === data.limit_amount && (
              <button className="over">达到膨胀上限,快去使用吧</button>
            )}

          {data.oneself === 0 &&
            data.is_help === 0 &&
            data.is_end_expansion === 0 && (
              <button className="active" onClick={() => helpFriend(data.id)}>
                ta助力
              </button>
            )}

          {data.oneself === 0 &&
            data.is_help === 1 &&
            data.is_end_expansion === 0 && (
              <button className="active" onClick={() => share()}>
                邀请更多好友拿{data.limit_amount}
              </button>
            )}
          {data.oneself === 0 &&
            data.is_end_expansion === 1 &&
            data.amount === data.limit_amount && (
              <button className="over">达到膨胀上限,快去使用吧</button>
            )}

          {data.oneself === 0 &&
            data.is_end_expansion === 1 &&
            data.amount !== data.limit_amount && (
              <button className="over">你的好友已结束助力</button>
            )}
zhanghaozhe committed
504
        </div>
zhanghaozhe committed
505 506
      )}
      {data.is_end === 1 && (
zhanghaozhe committed
507 508 509
        <div className="btns">
          <button className="over">活动已结束</button>
        </div>
zhanghaozhe committed
510
      )}
xuzhenghua committed
511

zhanghaozhe committed
512
      {data.is_end === 0 && data.is_end_expansion === 0 && data.oneself === 1 && (
zhanghaozhe committed
513 514
        <div className="overBtn">
          <p onClick={() => isendExpand(data)}>结束助力使用礼券</p>
xuzhenghua committed
515
        </div>
zhanghaozhe committed
516
      )}
zhanghaozhe committed
517 518
    </div>
  )
xuzhenghua committed
519 520 521 522
}

// 好友助力列表
function FriendList(props) {
zhanghaozhe committed
523 524 525 526
  const data = props.data
  return (
    <div className="friend-list">
      <p className="title">
zhanghaozhe committed
527
        <img
528
          src="https://cdn.julyedu.com/active19_717/m/expand-right.png"
zhanghaozhe committed
529 530
          alt=""
        />
zhanghaozhe committed
531
        <span>好友助力</span>
zhanghaozhe committed
532
        <img
533
          src="https://cdn.julyedu.com/active19_717/m/expand-left.png"
zhanghaozhe committed
534 535
          alt=""
        />
zhanghaozhe committed
536
      </p>
zhanghaozhe committed
537
      {data.help_list.length === 0 && (
zhanghaozhe committed
538 539 540 541
        <div className="null-list">
          <p className="tips first-tips">还没有好友为你助力,</p>
          <p className="tips">赶紧去邀请好友吧!</p>
        </div>
zhanghaozhe committed
542 543
      )}
      {data.help_list.length > 0 && (
zhanghaozhe committed
544
        <div className="all-list">
zhanghaozhe committed
545 546 547 548
          <p className="friend-status">
            <span className="FF19A0">{data.help_list.length}</span>位好友共助
            <span className="FF19A0">{data.amount - data.start_amount}</span>
          </p>
zhanghaozhe committed
549
          <ul className="all-list-box">
zhanghaozhe committed
550 551 552 553 554 555 556 557 558
            {data.help_list.map((item, index) => {
              return (
                <li className="item" key={index}>
                  <img className="avait" src={item.avatar} alt="" />
                  <span className="time">助力时间:{item.add_time}</span>
                  <span className="zlprice FF19A0">{item.amount}</span>
                </li>
              )
            })}
zhanghaozhe committed
559
          </ul>
xuzhenghua committed
560
        </div>
zhanghaozhe committed
561
      )}
zhanghaozhe committed
562 563
    </div>
  )
xuzhenghua committed
564 565 566 567
}

//预售课程
function CourseList(props) {
zhanghaozhe committed
568 569 570 571 572 573 574 575
  const {
    data,
    isshowMore,
    getMoreCourseList,
    expandPaydj,
    expandPaywk,
    tostudy,
  } = props
zhanghaozhe committed
576 577 578
  return (
    <div className="advance-sale-course">
      <p className="title">
zhanghaozhe committed
579
        <img
580
          src="https://cdn.julyedu.com/active19_717/m/expand-right.png"
zhanghaozhe committed
581 582
          alt=""
        />
zhanghaozhe committed
583
        <span>预售课程</span>
zhanghaozhe committed
584
        <img
585
          src="https://cdn.julyedu.com/active19_717/m/expand-left.png"
zhanghaozhe committed
586 587
          alt=""
        />
zhanghaozhe committed
588 589 590
      </p>
      <div className="course-list">
        <ul>
zhanghaozhe committed
591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645
          {data.map((item, index) => {
            return (
              <li className="course-item" key={index}>
                <Link to={`/getDetail?id=${item.course_id}`}>
                  <img className="course-img" src={item.image_name} alt="" />
                </Link>
                <p className="old-price">
                  原价:<span>¥{item.price}</span>
                </p>
                <p className="handsel">
                  定金¥{item.deposit_amount},可抵扣¥{item.deduction_amount}
                </p>
                <div className="btn">
                  {item.is_buy === 0 && (
                    /*eslint-disable-next-line*/
                    <a
                      className="to-expand-buy1"
                      href={"#"}
                      onClick={(e) => {
                        e.preventDefault()
                        expandPaydj(item.course_id)
                      }}
                    >
                      立即付定金
                    </a>
                  )}
                  {item.is_buy === 1 && (
                    /*eslint-disable-next-line*/
                    <a
                      className="to-expand-buy2"
                      href="#"
                      onClick={(e) => {
                        e.preventDefault()
                        expandPaywk(
                          item.course_id,
                          item.start_timestamp,
                          item.final_start_time
                        )
                      }}
                    >
                      立即付尾款
                    </a>
                  )}
                  {item.is_buy === 2 && (
                    <button
                      className="to-study"
                      onClick={() => tostudy(item.course_id)}
                    >
                      开始学习
                    </button>
                  )}
                </div>
              </li>
            )
          })}
zhanghaozhe committed
646 647
        </ul>
      </div>
zhanghaozhe committed
648
      {isshowMore && (
zhanghaozhe committed
649 650 651
        <div className="more">
          <div onClick={() => getMoreCourseList()}>
            查看更多
zhanghaozhe committed
652
            <img
653
              src="https://cdn.julyedu.com/active19_717/m/expand-btm.png"
zhanghaozhe committed
654 655
              alt=""
            />
zhanghaozhe committed
656
          </div>
xuzhenghua committed
657
        </div>
zhanghaozhe committed
658
      )}
zhanghaozhe committed
659 660
    </div>
  )
xuzhenghua committed
661 662
}

zhanghaozhe committed
663 664 665
export default connect((state) => ({
  user: state.user,
}))(ExpandShare)