测试版
This commit is contained in:
1041
pages/visitor/detail.vue
Normal file
1041
pages/visitor/detail.vue
Normal file
File diff suppressed because it is too large
Load Diff
932
pages/visitor/goods.vue
Normal file
932
pages/visitor/goods.vue
Normal file
@@ -0,0 +1,932 @@
|
||||
<template>
|
||||
<view class="commonPageBox commonDetailPage">
|
||||
<z-nav-bar title="商品详情"></z-nav-bar>
|
||||
<view class="contentBox commonPageContentBox" style="padding-bottom: 30rpx;" v-if="!this.$store.state.loadingShow">
|
||||
<swiper :autoplay="true" :interval="3000" :duration="1000"
|
||||
style="width: 100%; height: 750rpx; background-color: #f5f5f5">
|
||||
<swiper-item v-for="(item, index) in swiperList" :key="index" style="width: 100%; height: 100%">
|
||||
<image :src="item" mode="aspectFit" style="width: 100%; height: 100%">
|
||||
</image>
|
||||
</swiper-item>
|
||||
</swiper>
|
||||
|
||||
<view class="goods_box">
|
||||
<view class="curriulum_title_box">
|
||||
<view v-if="this.options.isMiaosha == 1" class="miaosha_box">
|
||||
<view class="price_box">
|
||||
<view class="price_left">
|
||||
<template v-if="
|
||||
curriculumData.activityPrice &&
|
||||
curriculumData.activityPrice > 0
|
||||
">
|
||||
<text class="aui-text-danger price">
|
||||
¥{{ curriculumData.activityPrice }}
|
||||
</text>
|
||||
<text class="price original_price">原价:¥{{ curriculumData.price }}
|
||||
</text>
|
||||
</template>
|
||||
<template v-else>
|
||||
<text class="aui-text-danger price">
|
||||
¥{{ curriculumData.price }}
|
||||
</text>
|
||||
</template>
|
||||
|
||||
<view class="price original_price sales_number">已售 {{ curriculumData.sumSales }}件
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="xianshimaiosha_box">
|
||||
<text class="xianshimaiosha">秒杀商品</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="curriulum_title">{{ curriculumData.productName }}
|
||||
</view>
|
||||
</view>
|
||||
<view v-else class="normal_box">
|
||||
<view class="price_box">
|
||||
<template v-if="
|
||||
curriculumData.activityPrice &&
|
||||
curriculumData.activityPrice > 0
|
||||
">
|
||||
<text class="aui-text-danger price">
|
||||
¥{{ curriculumData.activityPrice }}
|
||||
</text>
|
||||
<text class="price original_price">原价:¥{{ curriculumData.price }}
|
||||
</text>
|
||||
</template>
|
||||
<template v-else>
|
||||
<text class="aui-text-danger price">
|
||||
¥{{ curriculumData.price }}
|
||||
</text>
|
||||
</template>
|
||||
<text class="price original_price sales_number" style="float: right">已售
|
||||
{{ curriculumData.sumSales }}件
|
||||
</text>
|
||||
</view>
|
||||
|
||||
<view class="curriulum_title" style="margin-top: 40rpx">{{ curriculumData.productName }}
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="price_box"> </view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<template>
|
||||
<common-sticky label="title" :itemStyle="`width:${
|
||||
cateList.length == 2 ? '50' : '33'
|
||||
}%;padding-left: 15px; padding-right: 15px; height: 68rpx;`" :list="cateList"
|
||||
:currentCateIndex="currentCateIndex">
|
||||
</common-sticky>
|
||||
</template>
|
||||
<view :class="`dataList parameterList`" v-if="booksList.length > 0">
|
||||
<view class="goods_detail_list_title bg_box_shandow color_shandow bg_color PM_font">
|
||||
<view class="left" style="color: #294a97 !important">
|
||||
<u-icon name="list" color="#294a97" size="23"
|
||||
style="display: inline-block; margin-right: 10rpx"></u-icon>
|
||||
书籍信息
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<common-list imgUrl="url" isNoIcon imgMode="aspectFit" class="color_shandow parameter_box book_box"
|
||||
defaultUrl="" :isCondition="true" :dataList="booksList" label="title">
|
||||
<template slot="labelSlot" slot-scope="slotProps">
|
||||
<!-- isSelectGoods -->
|
||||
<view class="related_courses_name" :class="`goods_item `">
|
||||
<view class="image_box" style="margin-right: 10rpx">
|
||||
<image :src="slotProps.row.images" mode="aspectFit" class="goods_image"></image>
|
||||
</view>
|
||||
<view :class="`goods_info `">
|
||||
<view class="name">
|
||||
<text style="color: #333"> {{ slotProps.row.name }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
</common-list>
|
||||
</view>
|
||||
<view :class="`dataList parameterList`" v-if="coursesList.length > 0">
|
||||
<view class="goods_detail_list_title bg_box_shandow color_shandow bg_color PM_font">
|
||||
<view class="left" style="color: #7dc1f0 !important">
|
||||
<u-icon name="list" color="#7dc1f0" size="23"
|
||||
style="display: inline-block; margin-right: 10rpx"></u-icon>
|
||||
课程信息
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<common-list imgUrl="url" isNoIcon imgMode="aspectFit" class="color_shandow parameter_box" defaultUrl=""
|
||||
:isCondition="true" :dataList="coursesList" label="title">
|
||||
<template slot="labelSlot" slot-scope="slotProps">
|
||||
<!-- isSelectGoods -->
|
||||
<view class="related_courses_name" :class="`goods_item `">
|
||||
<view class="image_box" style="margin-right: 10rpx">
|
||||
<image :src="slotProps.row.images" mode="aspectFit" class="goods_image"></image>
|
||||
</view>
|
||||
<view :class="`goods_info `">
|
||||
<view class="name">
|
||||
<text style="color: #333"> {{ slotProps.row.title }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
</common-list>
|
||||
</view>
|
||||
|
||||
<u-divider text="商品详情" :hairline="true" textColor="#333" lineColor="#b0b0b0"></u-divider>
|
||||
<view class="small_class_teaching_box">
|
||||
<view class="common_divider divider_box"> </view>
|
||||
|
||||
<common-rich-detail :detailInfo="detailInfo" style="padding: 10rpx">
|
||||
<template #richHeadImg></template>
|
||||
</common-rich-detail>
|
||||
<view class="small_class_teaching_content">
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="goods_nav_box" v-if="!this.$store.state.loadingShow">
|
||||
<uni-goods-nav :fill="true" :options="buyOptions" :button-group="customButtonGroup1"
|
||||
@buttonClick="toLogin()" />
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import $http from "@/config/requestConfig.js";
|
||||
import {
|
||||
mapState
|
||||
} from "vuex";
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
detailInfo: {},
|
||||
parameterList: [],
|
||||
booksList: [],
|
||||
coursesList: [],
|
||||
buyOptions: [],
|
||||
|
||||
swiperList: [],
|
||||
goodsList: [],
|
||||
options: {},
|
||||
curriculumData: {},
|
||||
curriculumInfo: {},
|
||||
detailInfo: {},
|
||||
modalInfo: {},
|
||||
|
||||
playData: {},
|
||||
searchValue: "",
|
||||
cateList: [], // 一级分类标题1
|
||||
twoCateList: [], // 二级分类标题
|
||||
dataList: [], // 方剂标题
|
||||
allDataList: [], // 方剂标题
|
||||
currentStatusIndex: 0, // 当前选中的一级分类
|
||||
currentCateIndex: 0, // 当前选中的一级分类
|
||||
curTwoCateIndex: 0, // 当前选中的二级分类
|
||||
searchList: [], // 搜索结果数组
|
||||
urlList: {
|
||||
detailInfo: 'visitor/getProductDetail'
|
||||
},
|
||||
customButtonGroup1: [{
|
||||
with: 200,
|
||||
text: "立即购买",
|
||||
backgroundColor: "linear-gradient(90deg, #FE6035, #EF1224)",
|
||||
color: "#fff",
|
||||
}, ],
|
||||
};
|
||||
},
|
||||
onLoad(options) {
|
||||
this.options = options;
|
||||
},
|
||||
onShow() {
|
||||
this.selectGoodsData = {};
|
||||
this.getCourseDescriptionData();
|
||||
},
|
||||
computed: {
|
||||
...mapState(["userInfo"]),
|
||||
},
|
||||
methods: {
|
||||
//获取数据
|
||||
async getCourseDescriptionData() {
|
||||
var data = {};
|
||||
var that = this;
|
||||
uni.showLoading({
|
||||
title: '加载中'
|
||||
})
|
||||
this.$http.request({
|
||||
url: this.urlList.detailInfo,
|
||||
method: "POST",
|
||||
data: {
|
||||
productId: this.options.id,
|
||||
},
|
||||
header: {
|
||||
"Content-Type": "application/json",
|
||||
},
|
||||
})
|
||||
|
||||
.then(async (res) => {
|
||||
uni.hideLoading();
|
||||
that.selectGoodsData = res.data.GLProducts[0];
|
||||
that.curriculumData = res.data.detail;
|
||||
that.booksList = res.data.books ? res.data.books : [];
|
||||
that.coursesList = res.data.courses ? res.data.courses : [];
|
||||
that.goodsList = res.data.GLProducts;
|
||||
|
||||
that.parameterList = [];
|
||||
|
||||
if (
|
||||
that.curriculumData.productImageList == null ||
|
||||
that.curriculumData.productImageList == ""
|
||||
) {
|
||||
this.swiperList.push(that.curriculumData.explainsImg);
|
||||
} else {
|
||||
that.swiperList = that.curriculumData.productImageList.split(",");
|
||||
}
|
||||
|
||||
this.detailInfo = {
|
||||
content: this.curriculumData.productDetails,
|
||||
};
|
||||
});
|
||||
},
|
||||
toLogin(){
|
||||
uni.navigateTo({
|
||||
url: '/pages/user/login'
|
||||
})
|
||||
}
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@import "@/static/mixin.scss";
|
||||
.searchList {
|
||||
.item {
|
||||
font-size: 28rpx;
|
||||
padding: 20rpx;
|
||||
border-bottom: 1px solid #dadbde;
|
||||
}
|
||||
}
|
||||
|
||||
.scroll-view_H {
|
||||
background-color: #fff;
|
||||
white-space: nowrap;
|
||||
padding: 10rpx;
|
||||
}
|
||||
|
||||
.contentBox {
|
||||
height: calc(100% - 50px);
|
||||
|
||||
.statusList {
|
||||
padding: 10rpx;
|
||||
box-sizing: border-box;
|
||||
justify-content: space-between;
|
||||
|
||||
text {
|
||||
text-align: center;
|
||||
display: inline-block;
|
||||
width: 32%;
|
||||
padding: 20rpx 0;
|
||||
font-size: 34rpx;
|
||||
border-radius: 10rpx;
|
||||
}
|
||||
|
||||
.cur {
|
||||
background-color: $themeColor;
|
||||
color: #fff;
|
||||
box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
}
|
||||
|
||||
.twoCateList {
|
||||
font-size: 28rpx;
|
||||
margin-top: 20rpx;
|
||||
|
||||
.grid-text {
|
||||
padding: 10rpx 0rpx;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.cur {
|
||||
color: $themeColor;
|
||||
}
|
||||
|
||||
// .u-grid-list{border: 0.5px solid #dadbde;}
|
||||
}
|
||||
|
||||
.dataList {
|
||||
font-size: 26rpx;
|
||||
padding-bottom: 40rpx;
|
||||
// margin-top: 20rpx;
|
||||
// padding: 32rpx 0rpx;
|
||||
border-radius: 10rpx;
|
||||
background-color: #fff;
|
||||
box-sizing: border-box;
|
||||
|
||||
.JFtitleItem {
|
||||
background-color: #ffffff;
|
||||
padding: 20rpx 10rpx;
|
||||
width: 100%;
|
||||
border-bottom: 0.5px solid #f8f9fa;
|
||||
}
|
||||
|
||||
.wmzhimg {
|
||||
width: 220rpx;
|
||||
height: 220rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.search_box {
|
||||
margin: 0 auto;
|
||||
overflow: hidden;
|
||||
align-items: center;
|
||||
width: calc(100% - 10px);
|
||||
margin-top: 20rpx;
|
||||
margin-bottom: 20rpx;
|
||||
|
||||
.search {
|
||||
height: 56upx;
|
||||
display: flex;
|
||||
width: 86%;
|
||||
margin: 0 auto;
|
||||
align-items: center;
|
||||
padding: 0upx 40upx;
|
||||
background-color: #fff;
|
||||
border-radius: 20upx;
|
||||
box-shadow: 0 0px 10px 1px #3ab3ae33;
|
||||
}
|
||||
|
||||
.prompt {
|
||||
color: #838383;
|
||||
font-size: 24rpx;
|
||||
}
|
||||
|
||||
.icon_search {
|
||||
background-image: url("@/static/icon/map_ic_search.png");
|
||||
background-position: center center;
|
||||
background-repeat: no-repeat;
|
||||
background-size: cover;
|
||||
width: 36upx;
|
||||
height: 36upx;
|
||||
margin-right: 20upx;
|
||||
}
|
||||
}
|
||||
|
||||
.flexbox {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.uni-modal .uni-modal__bd {
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.limiTy {
|
||||
font-size: 28rpx;
|
||||
line-height: 46rpx;
|
||||
}
|
||||
|
||||
.chImage {
|
||||
height: 100rpx;
|
||||
}
|
||||
|
||||
.dataList {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.titleList2 {
|
||||
height: calc(100% - 150rpx);
|
||||
}
|
||||
|
||||
.priceDetail {
|
||||
height: calc(100% - 180rpx) !important;
|
||||
padding: 0rpx 0;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.componentPage {
|
||||
height: calc(100% - 90rpx) !important;
|
||||
}
|
||||
|
||||
.dateReminder {
|
||||
width: 100%;
|
||||
font-size: 24rpx;
|
||||
text-align: right;
|
||||
line-height: 40rpx;
|
||||
}
|
||||
|
||||
.fdButtonBox {
|
||||
border: 1rpx solid $themeColor;
|
||||
background-color: $themeColor;
|
||||
color: #fff;
|
||||
// width: 100%;
|
||||
float: right;
|
||||
padding: 4rpx 14rpx;
|
||||
font-size: 24rpx;
|
||||
font-weight: 500;
|
||||
line-height: 30rpx;
|
||||
border-radius: 10rpx;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.headImage {
|
||||
|
||||
}
|
||||
|
||||
.commonDetailPage {
|
||||
padding-bottom: 40rpx !important;
|
||||
}
|
||||
|
||||
.goods_box {
|
||||
background-color: #fff;
|
||||
box-sizing: border-box;
|
||||
width: 100%;
|
||||
|
||||
.curriulum_title_box {
|
||||
width: calc(100%) !important;
|
||||
padding-bottom: 20rpx;
|
||||
background-color: #fff;
|
||||
|
||||
.curriulum_title {
|
||||
width: calc(100%);
|
||||
font-weight: 600;
|
||||
font-size: 34rpx;
|
||||
// line-height: 40rpx;
|
||||
// display: flex;
|
||||
// align-items: center;
|
||||
margin-top: 80rpx;
|
||||
margin-bottom: 0rpx;
|
||||
// padding: 20rpx;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.dataList {
|
||||
background-color: #fff !important;
|
||||
padding: 0 30rpx 40rpx !important;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
/deep/.titleItem {
|
||||
// width: calc(100% - 120rpx) !important;
|
||||
}
|
||||
|
||||
/deep/.scroll-view-item:nth-child(2n-1) {
|
||||
background-color: transparent !important;
|
||||
}
|
||||
|
||||
.dataList {
|
||||
height: auto !important;
|
||||
}
|
||||
|
||||
.small_class_teaching_box {
|
||||
padding-top: 20rpx;
|
||||
width: 100%;
|
||||
margin-top: 20rpx;
|
||||
background: #fff;
|
||||
|
||||
.small_class_teaching_top {
|
||||
padding: 20rpx 20rpx 0 10rpx;
|
||||
box-sizing: border-box;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
// background: #EDFCF7;
|
||||
color: #8f8e8e;
|
||||
|
||||
// box-shadow: 0px 0px 6rpx 0px #E9DCCC;
|
||||
.icon1 {
|
||||
width: 50rpx;
|
||||
height: 50rpx;
|
||||
}
|
||||
|
||||
.small_class_teaching_top_left {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
color: #7dc1f0;
|
||||
|
||||
font-family: MicrosoftYaHei;
|
||||
}
|
||||
}
|
||||
|
||||
.small_class_teaching_content {
|
||||
margin-top: 20rpx;
|
||||
// background: #EDFCF7;
|
||||
padding-bottom: 10rpx;
|
||||
|
||||
.top {
|
||||
padding: 20rpx 20rpx;
|
||||
box-sizing: border-box;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
border-bottom: 4rpx solid #fff;
|
||||
|
||||
.top_item {
|
||||
width: 23%;
|
||||
font-family: PangMenZhengDaoBiaoTiTiMianFeiBan;
|
||||
font-weight: normal;
|
||||
font-size: 34rpx;
|
||||
color: #294a97;
|
||||
line-height: 80rpx;
|
||||
background: #cef8ea;
|
||||
text-align: center;
|
||||
border-radius: 10rpx;
|
||||
box-shadow: 0px 0px 6rpx 0px #e9dccc;
|
||||
}
|
||||
}
|
||||
|
||||
.schedule {
|
||||
width: 100%;
|
||||
overflow: hidden;
|
||||
padding: 20rpx 20rpx;
|
||||
box-sizing: border-box;
|
||||
align-items: center;
|
||||
color: #018f89;
|
||||
|
||||
font-family: MicrosoftYaHei;
|
||||
|
||||
.icon_box {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-bottom: 0rpx;
|
||||
|
||||
.icon1 {
|
||||
width: 50rpx;
|
||||
height: 50rpx;
|
||||
margin-right: 10rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.progress_box {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
position: relative;
|
||||
|
||||
.progress_icon {
|
||||
width: calc(100% - 240rpx);
|
||||
}
|
||||
|
||||
.icon1 {
|
||||
width: 60rpx;
|
||||
height: 60rpx;
|
||||
margin: 0 20rpx;
|
||||
}
|
||||
|
||||
.icon2 {
|
||||
width: 140rpx;
|
||||
height: 100rpx;
|
||||
position: absolute;
|
||||
right: 0;
|
||||
// margin-top: -20rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.related_courses_box {
|
||||
background-color: #fff;
|
||||
|
||||
.small_class_teaching_content {
|
||||
padding: 10rpx 20rpx;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
}
|
||||
|
||||
.related_courses_name {
|
||||
display: inline-block;
|
||||
width: calc(100% - 0rpx) !important;
|
||||
|
||||
.aui-text-danger {
|
||||
display: inline-block;
|
||||
float: right;
|
||||
}
|
||||
}
|
||||
|
||||
.original_price {
|
||||
font-size: 28rpx !important;
|
||||
font-weight: 500;
|
||||
color: #999 !important;
|
||||
white-space: nowrap;
|
||||
text-decoration: line-through;
|
||||
float: left;
|
||||
margin-top: 6rpx;
|
||||
}
|
||||
|
||||
.price {
|
||||
font-size: 48rpx;
|
||||
font-weight: 700;
|
||||
float: left;
|
||||
margin-right: 10rpx;
|
||||
// font-family: PangMenZhengDaoBiaoTiTiMianFeiBan;
|
||||
}
|
||||
|
||||
.price_box {
|
||||
width: 100%;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.commonTags {
|
||||
margin-right: 20rpx;
|
||||
margin-top: -5rpx !important;
|
||||
}
|
||||
|
||||
.sales_number {
|
||||
text-decoration: none;
|
||||
color: #b0b0b0;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.miaosha_box {
|
||||
overflow: hidden;
|
||||
|
||||
.countdown {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
color: #fff;
|
||||
font-size: 24rpx;
|
||||
}
|
||||
|
||||
.price_left {
|
||||
width: calc(100% - 300rpx);
|
||||
float: left;
|
||||
}
|
||||
|
||||
.price_box {
|
||||
.price {
|
||||
color: #fff !important;
|
||||
}
|
||||
|
||||
.original_price {
|
||||
color: #e4dede !important;
|
||||
font-weight: 500;
|
||||
margin-left: 20rpx;
|
||||
font-size: 26rpx !important;
|
||||
}
|
||||
|
||||
.sales_number {
|
||||
display: block;
|
||||
width: 100%;
|
||||
color: #fff !important;
|
||||
font-weight: 500;
|
||||
padding-left: 10rpx;
|
||||
margin-left: 0rpx;
|
||||
font-size: 24rpx !important;
|
||||
}
|
||||
|
||||
padding: 30rpx 20rpx 30rpx;
|
||||
background: linear-gradient(to right, #ff2701, #fd8d024d);
|
||||
// height: 100rpx;
|
||||
}
|
||||
|
||||
.curriulum_title {
|
||||
padding: 20rpx 40rpx;
|
||||
margin-top: 20rpx !important;
|
||||
}
|
||||
}
|
||||
|
||||
.normal_box {
|
||||
padding: 40rpx 30rpx;
|
||||
}
|
||||
|
||||
.xianshimaiosha_box {
|
||||
width: 300rpx;
|
||||
height: 100%;
|
||||
float: right;
|
||||
}
|
||||
|
||||
.xianshimaiosha {
|
||||
display: inline-block;
|
||||
width: 100%;
|
||||
line-height: 100rpx;
|
||||
font-family: PangMenZhengDaoBiaoTiTiMianFeiBan;
|
||||
font-weight: blod;
|
||||
font-size: 64rpx;
|
||||
color: red;
|
||||
text-align: right;
|
||||
padding-right: 20rpx;
|
||||
box-sizing: border-box;
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
// .common_curriculum_list{
|
||||
|
||||
// }
|
||||
/deep/.common_curriculum_list {
|
||||
margin-top: 20rpx;
|
||||
padding: 20rpx 20rpx 20rpx;
|
||||
|
||||
.content_item {
|
||||
width: 100% !important;
|
||||
margin-bottom: 0 !important;
|
||||
padding: 15rpx 0 0rpx;
|
||||
border-top: 1rpx solid #f1f0f0;
|
||||
// height: 160rpx;
|
||||
|
||||
.book_image {
|
||||
width: 60rpx !important;
|
||||
height: 60rpx !important;
|
||||
float: left !important;
|
||||
background-color: #f5f5f5;
|
||||
}
|
||||
|
||||
.common_curriculum_item {
|
||||
width: calc(100% - 88rpx);
|
||||
float: right;
|
||||
display: block !important;
|
||||
|
||||
// overflow: hidden;
|
||||
|
||||
.related_courses_name {
|
||||
width: 100% !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.content_item:nth-child(1) {
|
||||
border-top: none !important;
|
||||
}
|
||||
}
|
||||
|
||||
/deep/.common_section {
|
||||
padding: 0 !important;
|
||||
padding-bottom: 20rpx !important;
|
||||
}
|
||||
|
||||
.goods_detail_list_title {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
|
||||
.left {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.right {
|
||||
font-size: 24rpx;
|
||||
font-weight: 500 !important;
|
||||
color: #333;
|
||||
font-family: none;
|
||||
}
|
||||
}
|
||||
|
||||
.commonPageContentBox {
|
||||
height: auto !important;
|
||||
}
|
||||
|
||||
.goods_item {
|
||||
overflow: hidden;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
// margin-bottom: 20rpx;
|
||||
padding: 10rpx 20rpx;
|
||||
border: 2rpx solid #fff;
|
||||
border-radius: 10rpx;
|
||||
}
|
||||
|
||||
.title {
|
||||
box-sizing: border-box;
|
||||
// font-weight: bold;
|
||||
margin-bottom: 40rpx;
|
||||
padding-left: 20rpx;
|
||||
}
|
||||
|
||||
.image_box {
|
||||
width: 70rpx;
|
||||
height: 70rpx;
|
||||
float: left;
|
||||
background-color: #f5f5f5;
|
||||
}
|
||||
|
||||
.goods_image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.goods_info {
|
||||
width: calc(100%);
|
||||
// padding: 10rpx 20rpx;
|
||||
box-sizing: border-box;
|
||||
// height: 100rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
float: left;
|
||||
|
||||
.name {
|
||||
font-size: 26rpx;
|
||||
// font-weight: 600;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.price {
|
||||
font-size: 26rpx;
|
||||
color: #aaa;
|
||||
}
|
||||
}
|
||||
|
||||
.isSelectGoods {
|
||||
color: $themeColor !important;
|
||||
|
||||
.name {
|
||||
color: $themeColor !important;
|
||||
}
|
||||
|
||||
.price {
|
||||
color: $themeColor !important;
|
||||
}
|
||||
|
||||
border: 2rpx solid $themeColor;
|
||||
border-radius: 10rpx;
|
||||
}
|
||||
|
||||
/deep/.list_item {
|
||||
// border-bottom: none;
|
||||
padding: 10rpx 0 !important;
|
||||
padding-right: 0 !important;
|
||||
}
|
||||
|
||||
.parameterList {
|
||||
/deep/.list_item {
|
||||
// border-bottom: none;
|
||||
padding: 0 !important;
|
||||
border: none !important;
|
||||
box-shadow: none !important;
|
||||
}
|
||||
|
||||
.parameter_box {
|
||||
padding: 20rpx 0;
|
||||
}
|
||||
|
||||
.goods_item {
|
||||
padding-top: 5rpx !important;
|
||||
padding-bottom: 5rpx !important;
|
||||
}
|
||||
}
|
||||
|
||||
.parameter_info_box {
|
||||
padding: 0 20rpx;
|
||||
}
|
||||
|
||||
.parameter_info {
|
||||
/deep/.list_item {
|
||||
// border-bottom: none;
|
||||
padding: 0 !important;
|
||||
border: none !important;
|
||||
box-shadow: none !important;
|
||||
}
|
||||
|
||||
.goods_item {
|
||||
border: none !important;
|
||||
}
|
||||
}
|
||||
|
||||
.goodsList {
|
||||
.image_box {
|
||||
width: 80rpx;
|
||||
height: 80rpx;
|
||||
float: left;
|
||||
background-color: #f5f5f5;
|
||||
}
|
||||
}
|
||||
|
||||
/deep/.u-popup__content {
|
||||
background-color: transparent !important;
|
||||
}
|
||||
|
||||
/deep/.u-popup__content__close {
|
||||
color: #fff !important;
|
||||
}
|
||||
|
||||
.title_box {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding-left: 0;
|
||||
|
||||
.title_price {
|
||||
color: #ef1224;
|
||||
font-size: 40rpx;
|
||||
font-weight: 700;
|
||||
}
|
||||
}
|
||||
|
||||
.title_list {
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
|
||||
.book_box {
|
||||
.image_box {
|
||||
width: 160rpx;
|
||||
height: 160rpx;
|
||||
}
|
||||
|
||||
.goods_info {
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
488
pages/visitor/index.vue
Normal file
488
pages/visitor/index.vue
Normal file
@@ -0,0 +1,488 @@
|
||||
<template>
|
||||
<view class="content">
|
||||
<view class="header_box"></view>
|
||||
<view class="main_content_box">
|
||||
<view class="cate_box">
|
||||
<scroll-view scroll-x="true">
|
||||
<view class="cate_list" v-if="cateList.length>0">
|
||||
<view class="cate_item_box" v-for="(item, index) in cateList" @click="handleClickCate(item)">
|
||||
<view class="cate_item_border">
|
||||
<image :src="item.icon"></image>
|
||||
</view>
|
||||
<view class="cate_item_name">{{ item.title }}</view>
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
<view class="miaoSha_box" v-if="seckillLst.length>0">
|
||||
<view class="flash_sale_top">
|
||||
<image class="miaoShaIcon" src="@/static/icon/home_ms.png" mode="aspectFill"></image>
|
||||
<text class="miaoShaTitle">秒杀</text>
|
||||
</view>
|
||||
|
||||
<view class="flash_sale_content">
|
||||
<scroll-view scroll-x="true">
|
||||
<view class="miaosha_list">
|
||||
<view class="miaosha_item"
|
||||
v-for="(v, i) in seckillLst" :key="i" @click="goodsDetail(v)">
|
||||
<image class="book_image" :src="v.productImages" mode="aspectFit"></image>
|
||||
<view class="book_name">{{ v.productName }}</view>
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="learning_box" v-if="flashSaleList.length>0">
|
||||
<view class="learning_box_top">
|
||||
<image src="@/static/icon/homeTitleBg.png"></image>
|
||||
<text>欢迎试听</text>
|
||||
</view>
|
||||
|
||||
<view class="flash_sale_content greenCardBoxContent">
|
||||
<view class="learning_box_list">
|
||||
<view class="learning_item"
|
||||
v-for="(item, index) in flashSaleList" :key="index" @click="goDetail(item)">
|
||||
<image class="book_image" :src="item.image" mode="aspectFit"></image>
|
||||
<view class="book_name">{{ item.title }}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="footer_box">
|
||||
<view class="footer_item">
|
||||
<view class="footer_nav_item" @click="selected=1">
|
||||
<image v-if="selected == 1" class="footer_item_image"
|
||||
src="/static/tab/home_active.png" mode="aspectFit"></image>
|
||||
<image v-else class="footer_item_image" src="/static/tab/home.png" mode="aspectFit">
|
||||
</image>
|
||||
<text class="footer_item_text"
|
||||
:class="[selected == 1 ? 'footer_item_text_active' : '']">首页</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="footer_item" @click="toMine()">
|
||||
<view class="footer_nav_item" @click="selected=4">
|
||||
<image v-if="selected == 4" class="footer_item_image"
|
||||
src="/static/tab/mine_active.png" mode="aspectFit"></image>
|
||||
<image v-else class="footer_item_image" src="/static/tab/mine.png" mode="aspectFit">
|
||||
</image>
|
||||
<text class="footer_item_text"
|
||||
:class="[selected == 4 ? 'footer_item_text_active' : '']">我的</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
selected : 1,
|
||||
cateList: [],
|
||||
seckillLst: [], //秒杀列表
|
||||
flashSaleList: [], //欢迎试听
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
this.getCateList();
|
||||
this.getMarketProductList();
|
||||
this.getMarketCourseList();
|
||||
},
|
||||
methods: {
|
||||
//获取列表数据
|
||||
getCateList(){
|
||||
this.$http.request({
|
||||
url: 'visitor/getCoursePsycheTree',
|
||||
method: "POST",
|
||||
data: {
|
||||
id: 0,
|
||||
},
|
||||
header: {
|
||||
"Content-Type": "application/json",
|
||||
},
|
||||
})
|
||||
.then(res=> {
|
||||
if (res.labels&&res.labels.length>0) {
|
||||
this.cateList = res.labels;
|
||||
}
|
||||
})
|
||||
},
|
||||
//获取秒杀数据
|
||||
getMarketProductList() {
|
||||
this.$http.request({
|
||||
url: 'visitor/getPsycheMarketShopProductList',
|
||||
method: "POST",
|
||||
data: {
|
||||
psycheMarketId: '31',
|
||||
limit: 10,
|
||||
current: 1
|
||||
},
|
||||
header: {
|
||||
"Content-Type": "application/json",
|
||||
},
|
||||
})
|
||||
.then(res=> {
|
||||
if(res.result.records&&res.result.records.length>0){
|
||||
this.seckillLst = res.result.records;
|
||||
}
|
||||
});
|
||||
},
|
||||
//获取欢迎试听数据
|
||||
getMarketCourseList() {
|
||||
this.$http.request({
|
||||
url: 'visitor/getPsycheMarketCourseList',
|
||||
method: "POST",
|
||||
data: {
|
||||
id: 29,
|
||||
limit: 10,
|
||||
page: 1,
|
||||
},
|
||||
header: {
|
||||
"Content-Type": "application/json",
|
||||
},
|
||||
})
|
||||
.then(res=> {
|
||||
if(res.courseList.records&&res.courseList.records.length){
|
||||
this.flashSaleList = res.courseList.records;
|
||||
}
|
||||
});
|
||||
},
|
||||
//课程列表
|
||||
handleClickCate(item){
|
||||
uni.navigateTo({
|
||||
url: `/pages/visitor/list?title=${item.title}&id=${item.id}`,
|
||||
});
|
||||
},
|
||||
//商品详情
|
||||
goodsDetail(item){
|
||||
uni.navigateTo({
|
||||
url: `/pages/visitor/goods?isMiaosha=1&id=${item.productId}`,
|
||||
});
|
||||
},
|
||||
//课程详情
|
||||
goDetail(item){
|
||||
uni.navigateTo({
|
||||
url: `/pages/visitor/detail?navTitle=${item.title}&title=${item.title}&id=${item.id}`,
|
||||
});
|
||||
},
|
||||
//我的
|
||||
toMine(){
|
||||
uni.navigateTo({
|
||||
url: '/pages/visitor/mine'
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.content{
|
||||
background-image: linear-gradient(180deg, #a7defc 0%, #eff5f8 60%);
|
||||
padding-bottom: 100rpx;
|
||||
}
|
||||
.header_box {
|
||||
width: 100%;
|
||||
height: 350rpx;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
overflow: hidden;
|
||||
background-size: 100% 100%;
|
||||
background-image: url("@/static/header_bg.jpeg");
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
.main_content_box{
|
||||
padding: 0 20rpx;
|
||||
color: #333;
|
||||
|
||||
.curriculum_box{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-around;
|
||||
margin-top: 25rpx;
|
||||
|
||||
.curriculum_item_box{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
position: relative;
|
||||
|
||||
.curriculum_item_flag{
|
||||
font-size: 26rpx;
|
||||
color: #294a97;
|
||||
position: absolute;
|
||||
right: 35rpx;
|
||||
}
|
||||
|
||||
.curriculum_item_name{
|
||||
font-size: 30rpx;
|
||||
padding-left: 12rpx;
|
||||
color: #294a97;
|
||||
font-weight: bold;
|
||||
}
|
||||
image{
|
||||
width: 30rpx;
|
||||
height: 37rpx;
|
||||
}
|
||||
}
|
||||
.curriculum_item_box:last-child{
|
||||
border-right: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.cate_box {
|
||||
margin-top: 20rpx;
|
||||
background: #7dc1f0;
|
||||
box-shadow: 0rpx 0rpx 6rpx 0rpx #f9f6ea;
|
||||
border-radius: 10rpx;
|
||||
|
||||
.cate_list{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
.cate_item_box {
|
||||
width: 20%;
|
||||
padding: 40rpx 0 30rpx;
|
||||
text-align: center;
|
||||
|
||||
.cate_item_border {
|
||||
width: 60rpx;
|
||||
height: 60rpx;
|
||||
background-size: 100% 100%;
|
||||
background-image: url("@/static/cate_bg.png");
|
||||
border-radius: 4rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
margin: 0 auto;
|
||||
|
||||
image{
|
||||
width: 46rpx;
|
||||
height: 46rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.cate_item_name {
|
||||
margin-top: 15rpx;
|
||||
font-size: 26rpx;
|
||||
line-height: 34rpx;
|
||||
text-align: center;
|
||||
color: #fff;
|
||||
font-weight: bold;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.notice_box {
|
||||
margin-top: 30rpx;
|
||||
}
|
||||
}
|
||||
.flash_sale_top {
|
||||
width: 100%;
|
||||
height: 60rpx;
|
||||
background-color: rgba(125, 193, 240, 0.1);
|
||||
color: rgb(46, 103, 106);
|
||||
border-color: rgb(197, 227, 215);
|
||||
box-shadow: 0rpx 0rpx 2rpx 0rpx #fcf2f6;
|
||||
border-radius: 6rpx;
|
||||
padding: 3rpx 18rpx 3rpx 10rpx;
|
||||
box-sizing: border-box;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
border: 0.5px solid #7dc1f0;
|
||||
}
|
||||
.miaoShaContent {
|
||||
padding: 0;
|
||||
font-size: 22rpx;
|
||||
color: #ebb76b;
|
||||
font-weight: bold;
|
||||
}
|
||||
.u-notice-bar {
|
||||
background-color: transparent !important;
|
||||
}
|
||||
.noticeIcon{
|
||||
width: 45rpx;
|
||||
height: 45rpx;
|
||||
}
|
||||
.miaoSha_box{
|
||||
margin-top: 30rpx;
|
||||
}
|
||||
.miaoShaIcon{
|
||||
width: 45rpx;
|
||||
height: 45rpx;
|
||||
}
|
||||
.miaoShaTitle {
|
||||
font-family: PangMenZhengDaoBiaoTiTiMianFeiBan;
|
||||
font-size: 32rpx;
|
||||
color: #294a97;
|
||||
line-height: 46rpx;
|
||||
padding-left: 10rpx;
|
||||
}
|
||||
.flash_sale_content{
|
||||
margin-top: 20rpx;
|
||||
}
|
||||
.miaosha_list{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
.miaosha_item{
|
||||
width: 180rpx;
|
||||
margin-right: 20rpx;
|
||||
text-align: center;
|
||||
|
||||
.book_image{
|
||||
width: 180rpx;
|
||||
height: 180rpx;
|
||||
background-color: rgba(125, 193, 240, 0.15);
|
||||
}
|
||||
}
|
||||
.book_name{
|
||||
text-align: center;
|
||||
font-size: 28rpx;
|
||||
color: #333;
|
||||
line-height: 50rpx;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
.learning_box{
|
||||
margin-top: 40rpx;
|
||||
margin-bottom: 30rpx;
|
||||
position: relative;
|
||||
}
|
||||
.learning_box_top{
|
||||
width: 100%;
|
||||
position: relative;
|
||||
z-index: 99;
|
||||
image{
|
||||
width: 290rpx;
|
||||
height: 70rpx;
|
||||
margin: 0 auto;
|
||||
}
|
||||
text{
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
font-size: 32rpx;
|
||||
font-family: PangMenZhengDaoBiaoTiTiMianFeiBan;
|
||||
font-weight: normal;
|
||||
color: #294a97;
|
||||
text-align: center;
|
||||
line-height: 65rpx;
|
||||
}
|
||||
}
|
||||
.learning_box_list{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
flex-wrap: wrap;
|
||||
width: 100%;
|
||||
|
||||
.learning_item{
|
||||
width: 49%;
|
||||
margin-bottom: 20rpx;
|
||||
|
||||
.book_image{
|
||||
background-color: rgba(125, 193, 240, 0.15);
|
||||
display: block;
|
||||
width: 100% !important;
|
||||
height: 168rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.greenCardBoxContent {
|
||||
border: 2rpx solid #7dc1f0;
|
||||
padding: 80rpx 20rpx 20rpx;
|
||||
border-radius: 10rpx;
|
||||
background-image: linear-gradient(180deg, #d8ecf8 20%, #ecf6fc 100%);
|
||||
width: 100%;
|
||||
display: flex;
|
||||
overflow: hidden;
|
||||
height: auto;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.null_text{
|
||||
display: block;
|
||||
width: 100%;
|
||||
padding: 30rpx 0 70rpx;
|
||||
text-align: center;
|
||||
font-size: 30rpx;
|
||||
color: #666;
|
||||
}
|
||||
.appJump {
|
||||
position: fixed;
|
||||
right: 0;
|
||||
top: 100rpx;
|
||||
z-index: 1;
|
||||
|
||||
.app_item {
|
||||
background: rgba(255, 255, 255, 0.9);
|
||||
margin-bottom: 20rpx;
|
||||
border: 1px solid #fff;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding-right: 10rpx;
|
||||
overflow: hidden;
|
||||
border-radius: 50rpx 0 0 50rpx;
|
||||
|
||||
text {
|
||||
font-size: 20rpx;
|
||||
padding-left: 3rpx;
|
||||
}
|
||||
|
||||
.img {
|
||||
padding: 6rpx;
|
||||
overflow: hidden;
|
||||
|
||||
image {
|
||||
width: 36rpx;
|
||||
height: 36rpx;
|
||||
border-radius: 100%;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.footer_box {
|
||||
height: 90rpx;
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
display: flex;
|
||||
box-sizing: content-box;
|
||||
background: #fff;
|
||||
padding-top: 5rpx;
|
||||
}
|
||||
.footer_item {
|
||||
position: relative;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.footer_nav_item {
|
||||
/* #ifndef APP-NVUE */
|
||||
display: flex;
|
||||
/* #endif */
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
height: 100%;
|
||||
}
|
||||
.footer_item_text {
|
||||
font-size: 12px;
|
||||
color: #333;
|
||||
margin-top: 4rpx;
|
||||
}
|
||||
|
||||
.footer_item_text_active {
|
||||
color: #7dc1f0 !important;
|
||||
}
|
||||
|
||||
.footer_item_image {
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
}
|
||||
</style>
|
||||
337
pages/visitor/list.vue
Normal file
337
pages/visitor/list.vue
Normal file
@@ -0,0 +1,337 @@
|
||||
<template>
|
||||
<view class="commonPageBox">
|
||||
<z-nav-bar :title="title"></z-nav-bar>
|
||||
<view class="cateList">
|
||||
<view class="list_block" v-if="!statusXLCP">
|
||||
<view class="list_item" v-for="(item,index) in list" :key="index">
|
||||
<view class="list_item_image">
|
||||
<image v-if="item.image" :src="item.image" mode="aspectFit"></image>
|
||||
<text class="image_null" v-else>暂无封面图</text>
|
||||
</view>
|
||||
<view class="list_item_right">
|
||||
<view class="list_item_title">{{item.title}}</view>
|
||||
<view class="list_item_content" v-html="item.content"></view>
|
||||
<view class="list_item_bt">
|
||||
<text class="list_item_study" @click="toLogin()">了解课程</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<text v-if="statusNull" class="text_null">暂无数据</text>
|
||||
</view>
|
||||
|
||||
<view class="xlcp_block" v-if="statusXLCP">
|
||||
<view class="level_block" @click="toLogin()">
|
||||
<view class="level_item">自恋型人格障碍诊断标准</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import $http from "@/config/requestConfig.js";
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
title: '',
|
||||
id: null,
|
||||
list: [], //列表数据
|
||||
statusNull: null,
|
||||
statusXLCP: null
|
||||
}
|
||||
},
|
||||
onShow(){
|
||||
|
||||
},
|
||||
onLoad(options) {
|
||||
this.title = options.title;
|
||||
this.id = options.id;
|
||||
//如果是心理评测
|
||||
if(this.id==75){
|
||||
this.statusXLCP = true;
|
||||
}else{
|
||||
this.getData();
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
//获取数据
|
||||
getData(){
|
||||
this.$http.request({
|
||||
url: 'visitor/getCourseByPsycheId',
|
||||
method: "POST",
|
||||
data: {
|
||||
psycheId: this.id
|
||||
},
|
||||
header: {
|
||||
"Content-Type": "application/json",
|
||||
},
|
||||
})
|
||||
.then(res => {
|
||||
if(res.courseList&&res.courseList.length>0){
|
||||
this.list = res.courseList;
|
||||
}else{
|
||||
this.list = [];
|
||||
this.statusNull = true;
|
||||
}
|
||||
});
|
||||
},
|
||||
toLogin(){
|
||||
uni.navigateTo({
|
||||
url: '/pages/user/login'
|
||||
})
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.commonPageBox{
|
||||
background: #eff5f8;
|
||||
height: 100vh;
|
||||
}
|
||||
.list_block{
|
||||
padding: 20rpx 20rpx 0;
|
||||
}
|
||||
.list_item{
|
||||
position: relative;
|
||||
background: #fff;
|
||||
box-shadow: 0px 0px 10px 0px #a7bbe4;
|
||||
padding: 30rpx 20rpx 70rpx;
|
||||
margin-bottom: 20rpx;
|
||||
display: flex;
|
||||
border-radius: 10rpx;
|
||||
}
|
||||
.list_item_image,.image_null{
|
||||
width: 250rpx;
|
||||
height: 220rpx;
|
||||
background-color: rgba(125, 193, 240, 0.1);
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
.list_item_image image{
|
||||
width: 100%;
|
||||
}
|
||||
.list_item_right{
|
||||
margin-left: 30rpx;
|
||||
width: calc(100% - 250rpx);
|
||||
}
|
||||
.list_item_title{
|
||||
font-size: 30rpx;
|
||||
line-height: 36rpx;
|
||||
font-weight: bold;
|
||||
color: #333;
|
||||
}
|
||||
.list_item_content{
|
||||
margin-top: 15rpx;
|
||||
font-size: 26rpx;
|
||||
line-height: 36rpx;
|
||||
color: #999;
|
||||
max-height: 108rpx;
|
||||
overflow: hidden;
|
||||
}
|
||||
.list_item_study{
|
||||
line-height: 48rpx;
|
||||
background: #7dc1f0;
|
||||
color: #fff;
|
||||
border-radius: 40rpx;
|
||||
font-size: 24rpx;
|
||||
padding: 0 20rpx;
|
||||
}
|
||||
.list_item_bt{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
position: absolute;
|
||||
right: 20rpx;
|
||||
bottom: 30rpx;
|
||||
}
|
||||
.list_item_price{
|
||||
font-size: 30rpx;
|
||||
font-weight: 500;
|
||||
margin-right: 30rpx;
|
||||
color: red;
|
||||
line-height: 54rpx;
|
||||
}
|
||||
.text_null{
|
||||
display: block;
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
font-size: 26rpx;
|
||||
color: #999;
|
||||
margin: 150rpx 0;
|
||||
}
|
||||
.image_null{
|
||||
color: #999;
|
||||
font-size: 22rpx;
|
||||
}
|
||||
|
||||
.labels_block{
|
||||
width: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
background: #fff;
|
||||
position: fixed;
|
||||
left: 0;
|
||||
z-index: 99;
|
||||
height: 40px;
|
||||
}
|
||||
.labels_item{
|
||||
line-height: 76rpx;
|
||||
text-align: center;
|
||||
font-size: 32rpx;
|
||||
color: #333;
|
||||
}
|
||||
.active_tab{
|
||||
font-size: 36rpx;
|
||||
font-weight: bold;
|
||||
}
|
||||
.line-item{
|
||||
display: none;
|
||||
margin: 0 auto;
|
||||
width: 55rpx;
|
||||
height: 6rpx;
|
||||
background: #7dc1f0;
|
||||
overflow: hidden;
|
||||
}
|
||||
.active_tab .line-item{
|
||||
display: block;
|
||||
}
|
||||
|
||||
.children_block{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin: 50px 10rpx 0;
|
||||
position: relative;
|
||||
z-index: 99;
|
||||
}
|
||||
.children_item{
|
||||
margin: 0 10rpx;
|
||||
line-height: 80rpx;
|
||||
text-align: center;
|
||||
font-size: 28rpx;
|
||||
color: #333;
|
||||
background: #fff;
|
||||
border: 1rpx solid #999;
|
||||
border-radius: 10rpx;
|
||||
}
|
||||
.active_children{
|
||||
color: #fff;
|
||||
background: #7dc1f0;
|
||||
border: 1rpx solid #7dc1f0;
|
||||
}
|
||||
|
||||
.xlcp_block{
|
||||
padding: 0 20rpx;
|
||||
margin-top: 20rpx;
|
||||
}
|
||||
.xlcp_block_2{
|
||||
margin-top: 110rpx;
|
||||
}
|
||||
.form_item{
|
||||
margin-bottom: 50rpx;
|
||||
}
|
||||
.form_solid{
|
||||
border-radius: 10rpx;
|
||||
background-color: #fff;
|
||||
padding: 20rpx 20rpx 50rpx;
|
||||
box-shadow: 0px 0px 10px 0px #a7bbe4;
|
||||
}
|
||||
.form_title{
|
||||
display: inline-block;
|
||||
width: 100%;
|
||||
font-size: 42rpx;
|
||||
color: #333;
|
||||
text-align: center;
|
||||
padding: 30rpx 0 20rpx;
|
||||
}
|
||||
.form_des{
|
||||
font-size: 30rpx;
|
||||
line-height: 48rpx;
|
||||
color: #666;
|
||||
}
|
||||
.form_btn{
|
||||
width: 300rpx;
|
||||
height: 70rpx;
|
||||
margin: 40rpx auto 0;
|
||||
color: #fff;
|
||||
font-size: 28rpx;
|
||||
background: #7dc1f0;
|
||||
border-radius: 10rpx;
|
||||
}
|
||||
|
||||
.popup_mark{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background: #000;
|
||||
opacity: 0.5;
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
z-index: 99;
|
||||
}
|
||||
.popup_block{
|
||||
width: 580rpx;
|
||||
height: 360rpx;
|
||||
position: fixed;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
margin-top: -180rpx;
|
||||
margin-left: -290rpx;
|
||||
background: #fff;
|
||||
z-index: 99;
|
||||
border-radius: 5px;
|
||||
}
|
||||
.popup_title{
|
||||
display: block;
|
||||
height: 90rpx;
|
||||
line-height: 90rpx;
|
||||
font-size: 32rpx;
|
||||
color: #333;
|
||||
text-align: center;
|
||||
border-bottom: 1rpx solid #f0f0f0;
|
||||
}
|
||||
.popup_con{
|
||||
font-size: 28rpx;
|
||||
padding-top: 50rpx;
|
||||
text-align: center;
|
||||
}
|
||||
.popup_picker{
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
width: 100%;
|
||||
}
|
||||
.scale_btn{
|
||||
width: 100%;
|
||||
height: 80rpx;
|
||||
line-height: 80rpx;
|
||||
color: #fff;
|
||||
font-size: 28rpx;
|
||||
background: #294a97;
|
||||
border: none;
|
||||
border-radius: 0 0 5px 5px;
|
||||
}
|
||||
.curseSet{
|
||||
margin-right: 18rpx;
|
||||
font-size: 28rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.level_block{
|
||||
border-radius: 10rpx;
|
||||
background-color: #fff;
|
||||
padding: 20rpx;
|
||||
box-shadow: 0px 0px 10px 0px #a7bbe4;
|
||||
}
|
||||
.level_item{
|
||||
display: inline-block;
|
||||
color: #333;
|
||||
width: 100%;
|
||||
font-size: 32rpx;
|
||||
padding: 20rpx 0;
|
||||
border-bottom: 1rpx solid #f0f0f0;
|
||||
}
|
||||
.level_item:last-child{
|
||||
border-bottom: 0;
|
||||
}
|
||||
</style>
|
||||
257
pages/visitor/mine.vue
Normal file
257
pages/visitor/mine.vue
Normal file
@@ -0,0 +1,257 @@
|
||||
<template>
|
||||
<view class="commonPage commonPageBox">
|
||||
<view class="bg_top">
|
||||
<u-icon @click="goSetting()" class="setIcon" labelColor="#294a97" labelPos="bottom" label="设置" name="setting"
|
||||
:style="`top:${(20 + statusBarHeight) * 2}rpx`" color="#294a97" size="22"></u-icon>
|
||||
</view>
|
||||
|
||||
<view class="mine_box" :style="`top:${(80 + statusBarHeight) * 2}rpx`">
|
||||
<view class="per_mes">
|
||||
<view class="per_mes_user">
|
||||
<view style="display: flex; align-items: center; flex-direction: column">
|
||||
<image src="../../static/logo.png" class="per_mes_img color_shandow"></image>
|
||||
</view>
|
||||
</view>
|
||||
<view class="userInfoBox">
|
||||
<view class="name" style=" font-size: 32rpx;" @click="toLogin()">未登录</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="list_box" style=" margin-top: 50rpx;">
|
||||
<view class="xiugai boxShadow box_fillet">
|
||||
<common-list :dataList="pageList" @hancleClick="handleClickTab" label="name">
|
||||
<template slot="rightSlot" slot-scope="slotProps">
|
||||
<text class="fdButtonBox aui-text-success"
|
||||
style="line-height: 40rpx">{{ slotProps.row.content }}</text>
|
||||
</template>
|
||||
</common-list>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="footer_box">
|
||||
<view class="footer_item" @click="toHome()">
|
||||
<view class="footer_nav_item" @click="selected=1">
|
||||
<image v-if="selected == 1" class="footer_item_image"
|
||||
src="/static/tab/home_active.png" mode="aspectFit"></image>
|
||||
<image v-else class="footer_item_image" src="/static/tab/home.png" mode="aspectFit">
|
||||
</image>
|
||||
<text class="footer_item_text"
|
||||
:class="[selected == 1 ? 'footer_item_text_active' : '']">首页</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="footer_item" @click="toMine()">
|
||||
<view class="footer_nav_item" @click="selected=4">
|
||||
<image v-if="selected == 4" class="footer_item_image"
|
||||
src="/static/tab/mine_active.png" mode="aspectFit"></image>
|
||||
<image v-else class="footer_item_image" src="/static/tab/mine.png" mode="aspectFit">
|
||||
</image>
|
||||
<text class="footer_item_text"
|
||||
:class="[selected == 4 ? 'footer_item_text_active' : '']">我的</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
selected : 4,
|
||||
pageList: [
|
||||
{
|
||||
name: "关于我们",
|
||||
url: "/pages/my/aboutUs",
|
||||
type: "pageJump",
|
||||
}
|
||||
],
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
|
||||
},
|
||||
methods: {
|
||||
//首页
|
||||
toHome(){
|
||||
uni.navigateTo({
|
||||
url: '/pages/visitor/index'
|
||||
})
|
||||
},
|
||||
//跳转设置
|
||||
goSetting() {
|
||||
uni.navigateTo({
|
||||
url: '/pages/my/set?name=visitor',
|
||||
});
|
||||
},
|
||||
//点击切换
|
||||
handleClickTab(v) {
|
||||
switch (v.type) {
|
||||
case "pageJump":
|
||||
this.onPageJump(v.url);
|
||||
break;
|
||||
}
|
||||
},
|
||||
onPageJump(url) {
|
||||
uni.navigateTo({
|
||||
url: url,
|
||||
});
|
||||
},
|
||||
//去登录
|
||||
toLogin(){
|
||||
this.onPageJump('/pages/user/login')
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.commonPage{
|
||||
background-image: linear-gradient(-10deg, #fdf0ed 0%, #bfe3f0 40%, #e4eefa 60%, #bfe3f0 80%, #7dc1f0 100%);
|
||||
}
|
||||
.mine_box {
|
||||
width: 100%;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
padding: 0 0rpx;
|
||||
}
|
||||
.per_mes {
|
||||
padding: 0 20rpx;
|
||||
margin-bottom: 20rpx;
|
||||
position: relative;
|
||||
align-items: center;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
.per_mes_img {
|
||||
width: 120rpx;
|
||||
height: 120rpx;
|
||||
border-radius: 90rpx;
|
||||
margin: 0 0 0 0;
|
||||
float: left;
|
||||
}
|
||||
.userInfoBox{
|
||||
padding-left: 20rpx;
|
||||
}
|
||||
|
||||
view {
|
||||
|
||||
.name {
|
||||
font-weight: bold;
|
||||
width: 100%;
|
||||
font-size: 30rpx;
|
||||
line-height: 40rpx;
|
||||
color: #6990c7 !important;
|
||||
}
|
||||
|
||||
.phone {
|
||||
font-size: 26rpx;
|
||||
line-height: 40rpx;
|
||||
color: #6990c7;
|
||||
}
|
||||
.per_user_img {
|
||||
display: inline-block;
|
||||
width: 40upx;
|
||||
height: 40upx;
|
||||
margin-left: 10rpx;
|
||||
vertical-align: super;
|
||||
}
|
||||
}
|
||||
}
|
||||
.bg_top {
|
||||
padding: 0 30rpx;
|
||||
height: 30vh;
|
||||
position: relative;
|
||||
|
||||
.setIcon {
|
||||
position: absolute;
|
||||
right: 30rpx;
|
||||
}
|
||||
}
|
||||
.list_box {
|
||||
padding: 20rpx 0;
|
||||
}
|
||||
.xiugai {
|
||||
border-radius: 10rpx !important;
|
||||
margin: 0 20rpx;
|
||||
background: rgba(255, 255, 255, 0.65);
|
||||
|
||||
.nav_list {
|
||||
background-color: #b7e0e2;
|
||||
padding: 15rpx 0 15rpx 10rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
font-size: 22rpx;
|
||||
position: relative;
|
||||
font-weight: bold;
|
||||
border-bottom: 1px solid #e5e5e5;
|
||||
|
||||
&:active {
|
||||
background-color: #f5f5f5;
|
||||
}
|
||||
|
||||
text {
|
||||
color: #333;
|
||||
margin-left: 10rpx;
|
||||
}
|
||||
|
||||
&::after {
|
||||
content: "";
|
||||
position: absolute;
|
||||
right: 20rpx;
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
width: 30rpx;
|
||||
height: 30rpx;
|
||||
background-image: url("@/static/icon/icon_right.png");
|
||||
background-position: center center;
|
||||
background-repeat: no-repeat;
|
||||
background-size: cover;
|
||||
}
|
||||
}
|
||||
|
||||
.nav_list:nth-last-child(1) {
|
||||
border-bottom: 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.footer_box {
|
||||
height: 90rpx;
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
display: flex;
|
||||
box-sizing: content-box;
|
||||
background: #fff;
|
||||
padding-top: 5rpx;
|
||||
}
|
||||
.footer_item {
|
||||
position: relative;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.footer_nav_item {
|
||||
/* #ifndef APP-NVUE */
|
||||
display: flex;
|
||||
/* #endif */
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
height: 100%;
|
||||
}
|
||||
.footer_item_text {
|
||||
font-size: 12px;
|
||||
color: #333;
|
||||
margin-top: 4rpx;
|
||||
}
|
||||
|
||||
.footer_item_text_active {
|
||||
color: #7dc1f0 !important;
|
||||
}
|
||||
|
||||
.footer_item_image {
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user