提交 753b2757 authored 作者: matian's avatar matian

updates

上级 6cde4d3f
...@@ -231,7 +231,7 @@ const handlePrev = () => { ...@@ -231,7 +231,7 @@ const handlePrev = () => {
/> />
<div class="radio_tit">支付宝支付</div> <div class="radio_tit">支付宝支付</div>
<div <div
:class="payMode === '12' ? 'radio_check_active' : 'radio_check'" :class="payMode === 1 ? 'radio_check_active' : 'radio_check'"
@click="checkdChange('12')" @click="checkdChange('12')"
> >
<template v-if="currentCheck === '12'"> <template v-if="currentCheck === '12'">
...@@ -245,7 +245,7 @@ const handlePrev = () => { ...@@ -245,7 +245,7 @@ const handlePrev = () => {
/> />
<div class="radio_tit">微信支付</div> <div class="radio_tit">微信支付</div>
<div <div
:class="payMode === '4' ? 'radio_check_active' : 'radio_check'" :class="payMode === 2 ? 'radio_check_active' : 'radio_check'"
@click="checkdChange('4')" @click="checkdChange('4')"
> >
<template v-if="currentCheck === '4'"> <template v-if="currentCheck === '4'">
......
...@@ -2,10 +2,11 @@ ...@@ -2,10 +2,11 @@
import { Swiper, SwiperSlide } from 'swiper/vue' import { Swiper, SwiperSlide } from 'swiper/vue'
import { Grid, Navigation } from 'swiper' import { Grid, Navigation } from 'swiper'
import { useDevice } from '@/composables/useDevice' import { useDevice } from '@/composables/useDevice'
const { mobile } = useDevice()
import 'swiper/css' import 'swiper/css'
import 'swiper/css/grid' import 'swiper/css/grid'
import 'swiper/css/navigation' import 'swiper/css/navigation'
const { mobile } = useDevice()
defineProps({ defineProps({
lecturerList: { lecturerList: {
type: Array type: Array
...@@ -20,28 +21,6 @@ function prev(swiper) { ...@@ -20,28 +21,6 @@ function prev(swiper) {
function next(swiper) { function next(swiper) {
swiper?.slideNext() swiper?.slideNext()
} }
const list = [
{
avatar: 'https://webapp-pub.ezijing.com/project_online/fi/teacher_01.png',
name: '张伟张伟张伟张伟张伟张伟张伟张伟张伟张伟张伟张伟',
title_list: ['清华大学国家金融研究院副院长、副研究员']
},
{
avatar: 'https://webapp-pub.ezijing.com/project_online/fi/teacher_02.png',
name: '高皓',
title_list: ['清华大学五道口金融学院全球家族企业研究中心主任']
},
{
avatar: 'https://webapp-pub.ezijing.com/project_online/fi/teacher_03.png',
name: '肇越',
title_list: ['清华大学五道口金融学院硕士生导师首席经济学家']
},
{
avatar: 'https://webapp-pub.ezijing.com/project_online/fi/teacher_04.png',
name: '陈秉正',
title_list: ['清华大学经济管理学院金融系教授', '中国保险与风险管理研究中心主任']
}
]
</script> </script>
<template> <template>
...@@ -57,12 +36,19 @@ const list = [ ...@@ -57,12 +36,19 @@ const list = [
:spaceBetween="20" :spaceBetween="20"
:slidePreview="1" :slidePreview="1"
:modules="[Navigation, Grid]" :modules="[Navigation, Grid]"
@swiper="swiper => (swiper1 = swiper)" @swiper="(swiper) => (swiper1 = swiper)"
>
<SwiperSlide
v-for="(item, index) in lecturerList"
:key="index"
class="teacher-item"
> >
<SwiperSlide v-for="(item, index) in lecturerList" :key="index" class="teacher-item">
<div class="item_top"> <div class="item_top">
<img <img
:src="item.avatar || 'https://webapp-pub.ezijing.com/project_online/fi/teacher_04.png'" :src="
item.avatar ||
'https://webapp-pub.ezijing.com/project_online/fi/teacher_04.png'
"
class="top_img" class="top_img"
/> />
<div class="top_name">{{ item.name }}</div> <div class="top_name">{{ item.name }}</div>
...@@ -84,13 +70,20 @@ const list = [ ...@@ -84,13 +70,20 @@ const list = [
</div> </div>
</div> </div>
</div> </div>
<div class="teacher_list" v-else > <div class="teacher_list" v-else>
<div class="con_tit">讲师介绍</div> <div class="con_tit">讲师介绍</div>
<div class="con_teacher"> <div class="con_teacher">
<div v-for="(item, index) in lecturerList" :key="index" class="teacher-item"> <div
v-for="(item, index) in lecturerList"
:key="index"
class="teacher-item"
>
<div class="item_top"> <div class="item_top">
<img <img
:src="item.avatar || 'https://webapp-pub.ezijing.com/project_online/fi/teacher_04.png'" :src="
item.avatar ||
'https://webapp-pub.ezijing.com/project_online/fi/teacher_04.png'
"
class="top_img" class="top_img"
/> />
<div class="top_name">{{ item.name }}</div> <div class="top_name">{{ item.name }}</div>
...@@ -108,10 +101,8 @@ const list = [ ...@@ -108,10 +101,8 @@ const list = [
</template> </template>
<style lang="scss" scoped> <style lang="scss" scoped>
.is-pc{ .is-pc {
.teacher_list {
.teacher_list {
.list_con { .list_con {
width: 396px; width: 396px;
height: 433px; height: 433px;
...@@ -181,8 +172,8 @@ const list = [ ...@@ -181,8 +172,8 @@ const list = [
} }
} }
} }
} }
.my-swiper { .my-swiper {
--swiper-navigation-size: 14px; --swiper-navigation-size: 14px;
--swiper-navigation-color: #333333; --swiper-navigation-color: #333333;
position: relative; position: relative;
...@@ -191,27 +182,27 @@ const list = [ ...@@ -191,27 +182,27 @@ const list = [
:deep(.swiper-slide) { :deep(.swiper-slide) {
height: 33%; height: 33%;
} }
} }
.swiper-button-prev { .swiper-button-prev {
left: 5px; left: 5px;
top: -6%; top: -6%;
color: #333333; color: #333333;
} }
.swiper-button-next { .swiper-button-next {
right: 5px; right: 5px;
top: -6%; top: -6%;
color: #333333; color: #333333;
} }
.swiper-button-next:after { .swiper-button-next:after {
font-size: 12px; font-size: 12px;
} }
.swiper-button-prev:after { .swiper-button-prev:after {
font-size: 12px; font-size: 12px;
}
} }
} .is-h5 {
.is-h5{ .teacher_list {
.teacher_list { margin-top: 0.3rem;
margin-top:0.3rem;
.con_tit { .con_tit {
font-size: 0.28rem; font-size: 0.28rem;
font-weight: 500; font-weight: 500;
...@@ -219,24 +210,23 @@ const list = [ ...@@ -219,24 +210,23 @@ const list = [
color: #333333; color: #333333;
} }
.con_teacher {
.con_teacher{
overflow-x: auto; overflow-x: auto;
display: flex; display: flex;
.teacher-item{ .teacher-item {
width: 5.49rem; width: 5.49rem;
background: #F4F8FB; background: #f4f8fb;
padding:0.27rem 0.2rem; padding: 0.27rem 0.2rem;
border-radius: 0.16rem; border-radius: 0.16rem;
margin-right:0.2rem; margin-right: 0.2rem;
.item_top{ .item_top {
display: flex; display: flex;
align-items: center; align-items: center;
.top_img{ .top_img {
width:0.86rem; width: 0.86rem;
} }
.top_name{ .top_name {
font-size: 0.28rem; font-size: 0.28rem;
color: #333333; color: #333333;
margin-left: 0.15rem; margin-left: 0.15rem;
...@@ -259,7 +249,6 @@ const list = [ ...@@ -259,7 +249,6 @@ const list = [
} }
} }
} }
}
} }
}
</style> </style>
...@@ -14,11 +14,11 @@ import * as api from '@/api/base' ...@@ -14,11 +14,11 @@ import * as api from '@/api/base'
/** /**
* 获取微信openId * 获取微信openId
* */ * */
export function getOpenId(code:any, callback:any) { export function getOpenId(code, callback) {
if (!code) { if (!code) {
return getCode() return getCode()
} }
api.getOpenId({ code, identity: 'ezijing' }).then((resp:any) => { api.getOpenId({ code, identity: 'ezijing' }).then((resp) => {
const openId = resp.data.openid const openId = resp.data.openid
openId && localStorage.setItem('openId', openId) openId && localStorage.setItem('openId', openId)
callback && callback(openId) callback && callback(openId)
...@@ -28,13 +28,13 @@ import * as api from '@/api/base' ...@@ -28,13 +28,13 @@ import * as api from '@/api/base'
/** /**
* 微信JSAPI支付 * 微信JSAPI支付
* */ * */
export function wxJSPay(order:any, callback:any) { export function wxJSPay(order, callback) {
if (!order.payment_more_info) { if (!order.payment_more_info) {
alert('订单创建错误') alert('订单创建错误')
return return
} }
const payInfo = JSON.parse(order.payment_more_info) const payInfo = JSON.parse(order.payment_more_info)
WeixinJSBridge.invoke('getBrandWCPayRequest', payInfo, (resp:any) => { window.WeixinJSBridge.invoke('getBrandWCPayRequest', payInfo, (resp) => {
callback && callback(resp) callback && callback(resp)
}) })
} }
\ No newline at end of file
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论