This commit is contained in:
周源 2022-05-06 17:31:31 +08:00
parent 9cd81332f2
commit 630cdbd3d5
4 changed files with 544 additions and 233 deletions

View File

@ -47,8 +47,9 @@
"path": "pages/literFamily/literFamily",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": false,
"navigationStyle": "custom"
"navigationStyle": "custom",
"enablePullDownRefresh": true,
"onReachBottomDistance": 20
}
},
{
@ -417,6 +418,15 @@
}
}
,{
"path" : "pages/literFamily/ActJianDetail",
"style" :
{
"navigationBarTitleText": "活动剪影详情",
"enablePullDownRefresh": false
}
}
],
"globalStyle": {
"navigationBarTextStyle": "black", // black/white

View File

@ -27,7 +27,7 @@
</view>
</view>
<view class="person_itm_sign" @click="goChangeInfo('身份证号码',JSON.parse(userInfoObj.idCard))">
<view class="person_itm_sign" @click="goChangeInfo('身份证号码',userInfoObj.idCard)">
<text class="person_itm_sign_tit">身份证号码</text>
<view class="person_itm_sign_right">
<text> {{userInfoObj.idCard}}</text>
@ -82,7 +82,8 @@
<view class="person_itm_sign" @click="goChangeInfo('头像',userInfoObj.images)">
<text class="person_itm_sign_tit">头像</text>
<view class="person_itm_sign_right">
<image class="avator" style="" :src=" baseurl+JSON.parse(userInfoObj.images)[0] ">
<image class="avator" :src='imgUrl' >
</image>
<u-icon name="arrow-right"></u-icon>
@ -264,10 +265,11 @@
honorList: ['荣誉', '无上荣誉'],
stanWorkList: ['蒙娜丽莎', '高月'],
userInfoObj: {},
baseurl: http.config.baseUrl.replace('/h5/api', ''), //'http://192.168.0.9:8080'
baseurl: http.config.baseUrl.replace('/h5/api', ''), //'http://192.168.0.29:8080'
xieName: '',
userType: ''
userType: '',
imgUrl:''
};
},
methods: {
@ -282,6 +284,7 @@
this.http.request('/user/userInfo', {}, "GET").then((res) => {
console.log("res", res.data);
this.userInfoObj = res.data
this.imgUrl=baseurl+JSON.parse(this.userInfoObj.images)[0]
}).catch((error) => {
uni.showToast({

View File

@ -0,0 +1,231 @@
<template>
<view class="workDetail">
<u-swiper :list="list" :autoplay="true" @change="e => currentNum = e.current" indicatorStyle="right: 20px">
<view slot="indicator" class="indicator-num">
<text class="indicator-num__text">{{ currentNum + 1 }}/{{ list.length }}</text>
</view>
</u-swiper>
<view class="work_name">
<!-- 作品名称自由生活向美而生作品 -->
{{actDetObj.title}}
</view>
<view class="work_desc">
<!-- 摄影作品摄影作品摄影作品摄影作品摄影作品介绍作品介绍摄影作品自由生活向美而生作品 -->
{{actDetObj.record}}
</view>
<view class="work_det">
<view class="det_box">
<view class="box_left">
<image src="../../static/workDetail/time.png" class="img"></image>
</view>
<view class="box_right">
<!-- 昨天10:20 -->
{{actDetObj.releaseDate}}
</view>
</view>
<view class="det_box">
<view class="box_left">
<image src="../../static/workDetail/seen.png" class="img"></image>
</view>
<view class="box_right">
{{actDetObj.views}}浏览
<!-- 1288浏览 -->
</view>
</view>
</view>
<view class="detailBottom">
<view class="bottom_box" @click="clickHeart()">
<view class="bottom_box_left">
<image src="../../static/workDetail/heart1.png" class="bot_img" v-if="isLick == 0"></image>
<image src="../../static/workDetail/heart2.png" class="bot_img" v-else></image>
</view>
<view class="bottom_box_right">
24
</view>
</view>
<view class="bottom_box" @click="clickStar()">
<view class="bottom_box_left">
<image src="../../static/workDetail/star1.png" class="bot_img" v-if="isCon == 0"></image>
<image src="../../static/workDetail/star2.png" class="bot_img" v-else></image>
</view>
<view class="bottom_box_right">
55
</view>
</view>
<view class="bottom_box">
<view class="bottom_box_left">
<image src="../../static/workDetail/share.png" class="bot_img"></image>
</view>
<view class="bottom_box_right">
分享
</view>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
list: [
'https://cdn.uviewui.com/uview/swiper/swiper2.png',
'https://cdn.uviewui.com/uview/swiper/swiper1.png',
],
currentNum: 1,
isLick: 0,
isCon: 0,
actDetObj: {},
ActId:''
}
},
onShow() {
this.getData()
},onLoad(opt) {
this.ActId=opt.id
},
methods: {
clickHeart() {
if (this.isLick == 0) {
this.isLick = 1
} else if (this.isLick == 1) {
this.isLick = 0
}
},
clickStar() {
if (this.isCon == 0) {
this.isCon = 1
} else if (this.isCon == 1) {
this.isCon = 0
}
},
getData() {
let _this = this
this.http.request('/silhouette/details', {
id: this.ActId
}, "GET").then(res => {
if (res.code == 200) {
console.log(res.data)
this.actDetObj = res.data
// _this.load = false
}
}).catch(e => {
uni.showToast({
title: e.data.message,
icon: "none",
});
})
}
}
}
</script>
<style lang="scss">
.workDetail {
position: relative;
width: 100%;
height: 100%;
.indicator-num {
padding: 2px 0;
background-color: rgba(0, 0, 0, 0.35);
border-radius: 100px;
width: 35px;
@include flex;
justify-content: center;
&__text {
color: #FFFFFF;
font-size: 12px;
}
}
.work_name {
width: 94%;
margin: 10px 3%;
font-size: 16px;
font-family: PingFangSC-Semibold, PingFang SC;
font-weight: 600;
color: #251B1D;
}
.work_desc {
width: 94%;
margin: 10px 3%;
font-size: 12px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #251B1D;
}
.work_det {
width: 94%;
margin: 10px 3%;
height: 17px;
font-size: 12px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #AFADB0;
line-height: 17px;
overflow: hidden;
.det_box {
float: left;
margin-right: 20px;
overflow: hidden;
.box_left {
width: 16px;
height: 16px;
float: left;
.img {
width: 100%;
height: 100%;
}
}
.box_right {
margin-left: 2px;
float: left;
}
}
}
.detailBottom {
position: absolute;
width: 100%;
bottom: 10px;
.bottom_box {
width: 31%;
margin: 0 1%;
padding: 15px 0;
float: left;
.bottom_box_left {
margin-left: 30%;
float: left;
.bot_img {
height: 24px;
width: 24px;
}
}
.bottom_box_right {
float: left;
font-size: 14px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #251B1D;
line-height: 24px;
margin-left: 5px;
}
}
}
}
</style>

View File

@ -1,50 +1,51 @@
<template>
<view class="">
<view class="">
<u-loading-page :loading="load"></u-loading-page>
</view>
<view class="">
<view class="">
<u-loading-page :loading="load"></u-loading-page>
</view>
<view v-if="load == false">
<view class="navbar" v-show="opCalue>0" :style="{'opacity':opCalue}">
<view class="status_bar" :style="{'height':statusHeight+'px'}"></view>
<view class="apptitle" :style="{'height':titleHeight+'px'}">
<image src="../../static/blackArrow.png" mode="" class="backImg" @click="back"></image>
<view class="barLabel">
文艺之家
</view>
</view>
</view>
<u-swiper :list="list" indicator indicatorMode="dot" circular height="240"></u-swiper>
<view class="layout">
<view class="activityColumn">
<view class="banEle">
<view class="title">
文创展厅
</view>
<text class="more">
更多
</text>
</view>
<u-scroll-list :indicator="false">
<view class="scroll-list">
<view class="scroll-list__goods-item" v-for="(item, index) in list2" :key="index"
:class="[(index === 9) && 'scroll-list__goods-item--no-margin-right']" @click="GoWorksShow(index)">
<image class="scroll-list__goods-item__image" :src="item.image"></image>
<view class="scroll-list__goods-item__view overEllipsis">{{ item.title }}</view>
</view>
</view>
</u-scroll-list>
</view>
<view class="activityColumn">
<view class="banEle">
<view class="title">
活动剪影
</view>
<!-- <text class="more">
<view v-if="load == false">
<view class="navbar" v-show="opCalue>0" :style="{'opacity':opCalue}">
<view class="status_bar" :style="{'height':statusHeight+'px'}"></view>
<view class="apptitle" :style="{'height':titleHeight+'px'}">
<image src="../../static/blackArrow.png" mode="" class="backImg" @click="back"></image>
<view class="barLabel">
文艺之家
</view>
</view>
</view>
<u-swiper :list="list" indicator indicatorMode="dot" circular height="240"></u-swiper>
<view class="layout">
<view class="activityColumn">
<view class="banEle">
<view class="title">
文创展厅
</view>
<text class="more">
更多
</text>
</view>
<u-scroll-list :indicator="false">
<view class="scroll-list">
<view class="scroll-list__goods-item" v-for="(item, index) in list2" :key="index"
:class="[(index === 9) && 'scroll-list__goods-item--no-margin-right']"
@click="GoWorksShow(index)">
<image class="scroll-list__goods-item__image" :src="item.image"></image>
<view class="scroll-list__goods-item__view overEllipsis">{{ item.title }}</view>
</view>
</view>
</u-scroll-list>
</view>
<view class="activityColumn">
<view class="banEle">
<view class="title">
活动剪影
</view>
<!-- <text class="more">
更多
</text> -->
</view>
<view class="activity" v-for="(v,i) in num" :key="i">
</view>
<!-- <view class="activity" v-for="(v,i) in num" :key="i">
<view class="left">
<view class="content">
<view class="title">
@ -59,213 +60,279 @@
<view class="right">
<image src="../../static/icon12.jpg" mode=""></image>
</view>
</view>
</view>
</view>
</view>
</view>
</view> -->
<view class="activity" v-for="(v,i) in jianAct" :key="i" @click="goDetail(v.id)">
<view class="left">
<view class="content">
<view class="title">
{{v.title}}
<!-- 送万福进万家文艺惠民 暖人心嫁得好风扇电机接收到删掉就惊世毒妃 -->
</view>
</view>
<view class="clidate">
<view class="cliNum">点击量:{{v.views}} </view>
<view class="date">{{v.releaseDate}}</view>
</view>
</view>
<view class="right">
<!-- <image :src="jianAct[i].picture" mode=""></image> -->
<image src="../../static/icon12.jpg" mode=""></image>
</view>
</view>
</view>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
load: true,
statusHeight: 0,
titleHeight: 50,
opCalue:0,
list: [
'https://cdn.uviewui.com/uview/swiper/swiper3.png',
'https://cdn.uviewui.com/uview/swiper/swiper2.png'
],
list2: [{
image: 'https://cdn.uviewui.com/uview/swiper/swiper2.png',
title: '艺起战疫获奖作品展示',
}, {
image: 'https://cdn.uviewui.com/uview/swiper/swiper1.png',
title: '嘉禾'
}],
num: 4
};
},
onShow() {
this.getData()
},
methods:{
getData(){
let _this = this
this.http.request('/silhouette/list', {}, "GET").then(res => {
if (res.code == 200) {
console.log(res.data)
_this.load = false
}
}).catch(e => {
uni.showToast({
title: e.data.message,
icon: "none",
});
})
},
back(){
uni.navigateBack()
},
GoWorksShow(id){
uni.navigateTo({
url:"/pages/AwardWinningWork/AwardWinningWork?id="+String(id)
})
}
},
onPageScroll(e) {
let scrollTop = e.scrollTop
this.opCalue = (scrollTop - 60) / 100
},
onReady() {
const systemMsg = uni.getSystemInfoSync();
this.statusHeight = systemMsg.statusBarHeight
import http from '../../request/interface.js'
export default {
data() {
return {
load: true,
statusHeight: 0,
titleHeight: 50,
opCalue: 0,
list: [
'https://cdn.uviewui.com/uview/swiper/swiper3.png',
'https://cdn.uviewui.com/uview/swiper/swiper2.png'
],
list2: [{
image: 'https://cdn.uviewui.com/uview/swiper/swiper2.png',
title: '艺起战疫获奖作品展示',
}, {
image: 'https://cdn.uviewui.com/uview/swiper/swiper1.png',
title: '嘉禾'
}],
num: 4,
jianAct: [],
pages: 1,
size: 20,
};
},
onShow() {
this.getData()
this.pages = 1
},
methods: {
goDetail(id){
uni.navigateTo({
url:'/pages/literFamily/ActJianDetail?id='+id
})
},
getData() {
let _this = this
this.http.request('/silhouette/list', {
page: this.pages,
size: this.size
}, "GET").then(res => {
if (res.code == 200) {
console.log(res.data)
this.jianAct = res.data.records
// #ifdef MP-WEIXIN
const menuButtonInfo = uni.getMenuButtonBoundingClientRect() //
this.titleHeight = menuButtonInfo.height + (menuButtonInfo.top - systemMsg.statusBarHeight) * 2
this.zwHeight = this.statusHeight + this.titleHeight
// #endif
}
}
_this.load = false
}
}).catch(e => {
uni.showToast({
title: e.data.message,
icon: "none",
});
})
}, //
getMoreData() {
this.http.request('/silhouette/list', {
page: this.pages,
size: this.size
}, "GET").then(res => {
res.data.records.map((v,i)=>{
this.jianAct.push(v)
})
}).catch(e => {
uni.showToast({
title: e.data.message,
icon: "none",
});
})
},
back() {
uni.navigateBack()
},
GoWorksShow(id) {
uni.navigateTo({
url: "/pages/AwardWinningWork/AwardWinningWork?id=" + String(id)
})
}
},
//
onPullDownRefresh() {
this.pages = 1
this.getData()
setTimeout(function() {
uni.stopPullDownRefresh();
}, 1000);
},
//
onReachBottom() {
this.pages++
this.getMoreData();
},
onPageScroll(e) {
let scrollTop = e.scrollTop
this.opCalue = (scrollTop - 60) / 100
},
onReady() {
const systemMsg = uni.getSystemInfoSync();
this.statusHeight = systemMsg.statusBarHeight
// #ifdef MP-WEIXIN
const menuButtonInfo = uni.getMenuButtonBoundingClientRect() //
this.titleHeight = menuButtonInfo.height + (menuButtonInfo.top - systemMsg.statusBarHeight) * 2
this.zwHeight = this.statusHeight + this.titleHeight
// #endif
}
}
</script>
<style lang="scss">
.navbar {
position: fixed;
top: 0;
left: 0;
width: 100%;
z-index: 999;
box-sizing: border-box;
background: #FFFFFF;
.apptitle {
display: flex;
align-items: center;
padding: 0 16px;
.navbar {
position: fixed;
top: 0;
left: 0;
width: 100%;
z-index: 999;
box-sizing: border-box;
background: #FFFFFF;
.backImg {
width: 20px;
height: 20px;
margin-right: 16px;
}
.apptitle {
display: flex;
align-items: center;
padding: 0 16px;
.barLabel {
flex: 1;
text-align: center;
font-size: 16px;
}
}
}
.backImg {
width: 20px;
height: 20px;
margin-right: 16px;
}
.layout {
padding: 0 16px;
box-sizing: border-box;
.barLabel {
flex: 1;
text-align: center;
font-size: 16px;
}
}
}
.activityColumn {
margin-top: 20px;
.layout {
padding: 0 16px;
box-sizing: border-box;
.banEle {
display: flex;
justify-content: space-between;
margin-bottom: 12px;
.activityColumn {
margin-top: 20px;
.title {
font-size: 16px;
line-height: 20px;
font-weight: 800;
}
.banEle {
display: flex;
justify-content: space-between;
margin-bottom: 12px;
.more {
font-size: 12px;
color: #AFADB0;
}
}
}
.title {
font-size: 16px;
line-height: 20px;
font-weight: 800;
}
.u-scroll-list {
padding-bottom: 0 !important;
.more {
font-size: 12px;
color: #AFADB0;
}
}
}
.scroll-list {
display: flex;
.u-scroll-list {
padding-bottom: 0 !important;
&__goods-item {
margin-right: 16px;
display: flex;
flex-direction: column;
position: relative;
.scroll-list {
display: flex;
&__image {
width: 200px;
height: 139px;
border-radius: 8px;
}
&__goods-item {
margin-right: 16px;
display: flex;
flex-direction: column;
position: relative;
&__view {
background-color: rgba(0, 0, 0, 0.4);
color: #FFFFFF;
border-radius: 0px 0px 8px 8px;
font-size: 12px;
letter-spacing: 1px;
height: 32px;
line-height: 32px;
padding: 0 10px;
position: absolute;
bottom: 0;
left: 0;
width: 100%;
box-sizing: border-box;
}
}
}
}
&__image {
width: 200px;
height: 139px;
border-radius: 8px;
}
.activity {
display: flex;
padding-top: 10px;
padding-bottom: 10px;
border-bottom: 1px solid #F5F5F5;
&__view {
background-color: rgba(0, 0, 0, 0.4);
color: #FFFFFF;
border-radius: 0px 0px 8px 8px;
font-size: 12px;
letter-spacing: 1px;
height: 32px;
line-height: 32px;
padding: 0 10px;
position: absolute;
bottom: 0;
left: 0;
width: 100%;
box-sizing: border-box;
}
}
}
}
&:last-of-type {
border-bottom: none;
}
.activity {
display: flex;
padding-top: 10px;
padding-bottom: 10px;
border-bottom: 1px solid #F5F5F5;
.left {
flex: 1;
display: flex;
flex-direction: column;
justify-content: space-between;
&:last-of-type {
border-bottom: none;
}
.content {
display: flex;
align-items: center;
.left {
flex: 1;
display: flex;
flex-direction: column;
justify-content: space-between;
.title {
font-size: 16px;
}
}
.content {
display: flex;
align-items: center;
.clidate {
margin-top: 6px;
display: flex;
justify-content: space-between;
font-size: 12px;
color: #8E8F9E;
}
}
.title {
font-size: 16px;
}
}
.right {
margin-left: 10px;
.clidate {
margin-top: 6px;
display: flex;
justify-content: space-between;
font-size: 12px;
color: #8E8F9E;
}
}
image {
width: 124px;
height: 93px;
border-radius: 4px;
}
}
}
}
.right {
margin-left: 10px;
image {
width: 124px;
height: 93px;
border-radius: 4px;
}
}
}
}
</style>