feat: 新增心理论坛功能并优化订单相关文案;更新音视频播放组件版本;
- 新增心理论坛页面及文章详情页 - 更新订单状态文案:"待发货"改为"待发出","待收货"改为"待收到" - 统一修改"收货地址"相关文案为"收件地址" - 添加安卓应用包下载地址配置 - 更新依赖edu-core至v1.0.6版本 - 优化首页课程列表布局和样式 - 新增分享功能到我的页面
This commit is contained in:
71
pages/forum/details.vue
Normal file
71
pages/forum/details.vue
Normal file
@@ -0,0 +1,71 @@
|
||||
<template>
|
||||
<view>
|
||||
<z-nav-bar title="文章详情"></z-nav-bar>
|
||||
<web-view :webview-styles="webviewStyles" :src="surl"></web-view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapState } from 'vuex';
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
surl:'',
|
||||
webviewStyles: {
|
||||
progress: {
|
||||
color: '#55aaff'
|
||||
}
|
||||
},
|
||||
|
||||
};
|
||||
},
|
||||
//第一次加载
|
||||
onLoad(e) {
|
||||
// 隐藏原生的tabbar
|
||||
uni.hideTabBar();
|
||||
this.surl = e.url
|
||||
console.log(e, '------')
|
||||
// #ifdef APP-PLUS
|
||||
const pages = getCurrentPages()
|
||||
const page = pages[pages.length - 1];
|
||||
const currentWebview = page.$getAppWebview()
|
||||
currentWebview.setStyle({
|
||||
titleNView: {
|
||||
buttons: [{
|
||||
float: 'right',
|
||||
type: 'close',
|
||||
onclick: function() {
|
||||
uni.navigateBack({
|
||||
delta: 1
|
||||
});
|
||||
}
|
||||
}]
|
||||
}
|
||||
})
|
||||
// #endif
|
||||
},
|
||||
computed: {
|
||||
...mapState(['userInfo'])
|
||||
},
|
||||
//页面显示
|
||||
onShow() {
|
||||
// 隐藏原生的tabbar
|
||||
uni.hideTabBar();
|
||||
},
|
||||
onPullDownRefresh() {
|
||||
uni.stopPullDownRefresh()
|
||||
},
|
||||
//方法
|
||||
methods: {
|
||||
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.box {
|
||||
background-color: #fff;
|
||||
min-height: calc(100vh - 270rpx);
|
||||
}
|
||||
.title{font-size: 32rpx; font-weight: bold; display: block; text-align: center;}
|
||||
.content { font-size: 26rpx; line-height: 48rpx; margin-top: 10rpx;}
|
||||
</style>
|
||||
216
pages/forum/list.vue
Normal file
216
pages/forum/list.vue
Normal file
@@ -0,0 +1,216 @@
|
||||
<template>
|
||||
<view class="commonPageBox">
|
||||
<z-paging ref="paging" v-model="dataList" auto-show-back-to-top @query="getDataList">
|
||||
<template #top>
|
||||
<z-nav-bar title="心理论坛"></z-nav-bar>
|
||||
<view class="search_box">
|
||||
<u-search placeholder="请输入文章标题" v-model="query.title" @search="handleSearch" @custom="handleSearch"></u-search>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<view class="list_item"
|
||||
v-for="(item, index) in dataList" :key="index"
|
||||
v-if="dataList&&dataList.length>0"
|
||||
@click="goToDetail(item)"
|
||||
>
|
||||
<view class="list_item_image">
|
||||
<image v-if="item.imgurl" :src="item.imgurl" mode="aspectFill"></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.description"></view>
|
||||
<view class="list_item_time">{{item.createTime}}</view>
|
||||
<view class="list_item_study">查看详情</view>
|
||||
</view>
|
||||
</view>
|
||||
</z-paging>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data(){
|
||||
return {
|
||||
query: {
|
||||
page: 1,
|
||||
limit: 10,
|
||||
title: '',
|
||||
},
|
||||
dataList: [], //列表数据
|
||||
statusNull: null, //暂无数据显示
|
||||
}
|
||||
},
|
||||
mounted(){
|
||||
},
|
||||
onLoad() {
|
||||
// this.getDataList(this.query.page, this.query.limit)
|
||||
},
|
||||
methods: {
|
||||
//免费课程数据
|
||||
getDataList(pageNo, pageSize){
|
||||
this.$http.request({
|
||||
url: 'common/wxPublicAccount/getWxPublicAccountArticleList',
|
||||
method: "POST",
|
||||
data: {
|
||||
...this.query,
|
||||
page: pageNo,
|
||||
limit: pageSize,
|
||||
},
|
||||
header: {
|
||||
"Content-Type": "application/json",
|
||||
},
|
||||
})
|
||||
.then(res=> {
|
||||
if (res.code == 0) {
|
||||
if(res.page.records && res.page.records.length>0){
|
||||
this.$refs.paging.complete(res.page.records);
|
||||
}else{
|
||||
this.$refs.paging.complete(false);
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
//搜索
|
||||
handleSearch(){
|
||||
this.$refs.paging.reload();
|
||||
},
|
||||
//跳转课程详情
|
||||
goToDetail(item) {
|
||||
uni.navigateTo({
|
||||
url: `/pages/forum/details?url=${item.url}`,
|
||||
});
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.commonPageBox{
|
||||
background: #eff5f8;
|
||||
height: 100vh;
|
||||
}
|
||||
.search_box{
|
||||
background: #fff;
|
||||
padding: 0 20rpx 20rpx;
|
||||
}
|
||||
.cateList {
|
||||
width: 100%;
|
||||
}
|
||||
.flexbox {
|
||||
position: fixed;
|
||||
left: 0;
|
||||
z-index: 9999;
|
||||
}
|
||||
.list_item{
|
||||
position: relative;
|
||||
background: #fff;
|
||||
box-shadow: 0px 0px 10px 0px #CBDBF7;
|
||||
padding: 30rpx 20rpx 30rpx;
|
||||
display: flex;
|
||||
border-radius: 10rpx;
|
||||
margin: 30rpx 30rpx 0;
|
||||
}
|
||||
.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%;
|
||||
height: 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;
|
||||
display: -webkit-box;
|
||||
-webkit-line-clamp: 2;
|
||||
-webkit-box-orient: vertical;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
.list_item_content{
|
||||
margin-top: 15rpx;
|
||||
font-size: 26rpx;
|
||||
line-height: 36rpx;
|
||||
color: #999;
|
||||
display: -webkit-box;
|
||||
-webkit-line-clamp: 2;
|
||||
-webkit-box-orient: vertical;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
.list_item_time{
|
||||
margin-top: 15rpx;
|
||||
font-size: 24rpx;
|
||||
line-height: 36rpx;
|
||||
color: #999;
|
||||
}
|
||||
.list_item_study{
|
||||
line-height: 48rpx;
|
||||
position: absolute;
|
||||
right: 20rpx;
|
||||
bottom: 20rpx;
|
||||
background: #7dc1f0;
|
||||
color: #fff;
|
||||
border-radius: 40rpx;
|
||||
font-size: 24rpx;
|
||||
padding: 0 20rpx;
|
||||
}
|
||||
.list_item_study_out{
|
||||
line-height: 48rpx;
|
||||
position: absolute;
|
||||
right: 20rpx;
|
||||
bottom: 30rpx;
|
||||
background: #294a97;
|
||||
color: #fff;
|
||||
border-radius: 40rpx;
|
||||
font-size: 24rpx;
|
||||
padding: 0 20rpx;
|
||||
}
|
||||
.text_null{
|
||||
display: block;
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
font-size: 26rpx;
|
||||
color: #999;
|
||||
margin: 150rpx 0;
|
||||
}
|
||||
.image_null{
|
||||
color: #999;
|
||||
font-size: 22rpx;
|
||||
}
|
||||
|
||||
::v-deep ::-webkit-scrollbar {
|
||||
/*滚动条整体样式*/
|
||||
width: 4px !important;
|
||||
height: 1px !important;
|
||||
overflow: auto !important;
|
||||
background: #ccc !important;
|
||||
-webkit-appearance: auto !important;
|
||||
display: block;
|
||||
}
|
||||
|
||||
::v-deep ::-webkit-scrollbar-thumb {
|
||||
/*滚动条里面小方块*/
|
||||
border-radius: 10px !important;
|
||||
box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2) !important;
|
||||
background: #7b7979 !important;
|
||||
}
|
||||
|
||||
::v-deep ::-webkit-scrollbar-track {
|
||||
/*滚动条里面轨道*/
|
||||
// box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2) !important;
|
||||
// border-radius: 10px !important;
|
||||
background: #FFFFFF !important;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user