123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307 |
- <template>
- <!-- 审核 -->
- <div class="product-details">
- <div class="message">
- <div>
- <el-image :src="data.picture_url" />
- </div>
- <div class="text">
- <p class="p1">
- {{ data.name }}
- </p>
- <p class="p3">
- {{ data.teacher_list.length > 0 ? data.teacher_list[0].teacher_name : '' }}
- </p>
- </div>
- <div class="price">
- <p>¥ {{ data.price }}</p>
- </div>
- </div>
- <div class="total">
- <p class="total-price">
- <span> 一件商品,总金额: </span>
- <span class="co-value">¥ {{ data.price }}</span>
- </p>
- <p class="discount">
- <span> 优惠折扣: </span>
- <span class="co-value">-¥ {{ discount_money }}</span>
- </p>
- <p class="payable">
- <span> 应付: </span>
- <span class="co-value">¥ {{ receivables_money }}</span>
- </p>
- </div>
- <div class="submitBtn">
- <div class="text">
- <img src="../../assets/course_details/auditimg.png" alt="">
- 参加本课程学习需提交申请,审核通过后完成付款即可参加学习。
- </div>
- <button @click="buy">提交申请</button>
- </div>
- <el-dialog
- top="calc(15vh + 140px)"
- width="500px"
- class="guide-dialog"
- :visible="visible"
- :modal="false"
- :show-close="false"
- >
- <div>
- 申请已经提交,请留意系统通知或在 <a class="jump" @click="goPersonal">个人中心-订单管理</a> 页面查询审核结果。
- </div>
- <div slot="footer">
- <el-button type="primary" @click="visible = false">确定</el-button>
- </div>
- </el-dialog>
- </div>
- </template>
- <script>
- import { ApplyJoinCourse } from '@/api/course';
- export default {
- props: {
- data: {
- default: () => {
- return {};
- },
- type: Object
- },
- goodsId: {
- default: '',
- type: String
- },
- goodsType: {
- default: '201',
- type: String
- }
- },
- data() {
- return {
- visible: false,
- discount_code: '', // 优惠码
- discount_money: 0.0, // 优惠金额
- receivables_money: this.data.price // 应收款
- };
- },
- // 方法集合
- methods: {
- // 提交申请
- buy() {
- ApplyJoinCourse({
- course_id: this.goodsId, // 课程 ID
- discount_code: this.discount_code // 优惠码 (目前暂时没有用到)
- }).then(() => {
- this.$message.success('申请加入课程成功');
- this.visible = true;
- });
- },
- goPersonal() {
- window.location.href = `/GCLS-Personal/#/EnterSys?SeleNavId=5`;
- }
- }
- };
- </script>
- <style lang="scss" scoped>
- .product-details {
- .message {
- display: flex;
- width: 656px;
- height: 152px;
- background: rgba(70, 70, 70, 3%);
- border-radius: 8px;
- .el-image {
- width: 120px;
- height: 120px;
- margin-top: 16px;
- margin-left: 16px;
- }
- .text {
- margin-left: 24px;
- .p1 {
- display: box;
- width: 360px;
- max-height: 48px;
- margin-top: 22px;
- overflow: hidden;
- font-size: 16px;
- line-height: 20px;
- color: #2c2c2c;
- text-overflow: ellipsis;
- word-break: break-all;
- -webkit-line-clamp: 2;
- // 多行文本的情况下,用省略号 “...” 隐藏超出范围的文本
- -webkit-box-orient: vertical;
- }
- .p2 {
- margin-top: 10px;
- span {
- width: 64px;
- height: 24px;
- padding: 2px 8px;
- font-size: 12px;
- font-weight: bold;
- line-height: 24px;
- color: $basic-color;
- text-align: center;
- background: #ffefd8;
- border-radius: 4px;
- }
- }
- .p3 {
- margin-top: 10px;
- }
- }
- .price {
- p {
- margin-top: 22px;
- margin-left: 67px;
- font-size: 16px;
- font-weight: bold;
- color: #ff4c00;
- text-align: right;
- }
- }
- }
- .promotionCode {
- display: flex;
- align-self: center;
- justify-content: flex-start;
- width: 100%;
- height: 58px;
- margin-top: 24px;
- line-height: 56px;
- border-top: 1px solid rgba(44, 44, 44, 15%);
- border-bottom: 1px solid rgba(44, 44, 44, 15%);
- .sp1 {
- font-size: 16px;
- color: #000;
- }
- input {
- box-sizing: border-box;
- flex: 1;
- height: 56px;
- padding: 0 24px;
- border: none;
- outline: none;
- }
- .sp2 {
- font-size: 16px;
- color: $basic-color;
- cursor: pointer;
- }
- }
- .total {
- width: 656px;
- padding-top: 24px;
- font-size: 16px;
- color: #000;
- text-align: right;
- .useCode {
- font-size: 12px;
- color: rgba(0, 0, 0, 50%);
- }
- > p {
- > span {
- display: inline-block;
- }
- .co-value {
- width: 160px;
- }
- }
- &-price > span {
- line-height: 24px;
- }
- .discount {
- margin: 16px 0 10px;
- }
- .payable {
- > span {
- line-height: 36px;
- }
- .co-value {
- font-size: 24px;
- color: #ff4c00;
- }
- }
- }
- .submitBtn {
- display: flex;
- align-items: center;
- justify-content: space-between;
- margin-top: 16px;
- .text {
- display: flex;
- align-items: center;
- width: 520px;
- height: 40px;
- color: #fff;
- background: #ff6c69;
- border-radius: 4px;
- img {
- width: 24px;
- margin-right: 10px;
- margin-left: 18px;
- }
- }
- button {
- width: 120px;
- height: 40px;
- line-height: 40px;
- color: #fff;
- cursor: pointer;
- background: $basic-color;
- border: none;
- border-radius: 4px;
- }
- }
- }
- </style>
- <style lang="scss">
- .product-details {
- .guide-dialog {
- .el-dialog__header {
- padding: 0;
- }
- .el-dialog__body {
- padding: 24px 32px 14px;
- font-size: 16px;
- font-weight: 500;
- line-height: 24px;
- .jump {
- color: $basic-color;
- }
- }
- }
- }
- </style>
|