This commit is contained in:
lnn19986213 2022-05-07 10:25:06 +08:00
commit 603996e7f1
4 changed files with 544 additions and 233 deletions

View File

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

View File

@ -27,7 +27,7 @@
</view> </view>
</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> <text class="person_itm_sign_tit">身份证号码</text>
<view class="person_itm_sign_right"> <view class="person_itm_sign_right">
<text> {{userInfoObj.idCard}}</text> <text> {{userInfoObj.idCard}}</text>
@ -82,7 +82,8 @@
<view class="person_itm_sign" @click="goChangeInfo('头像',userInfoObj.images)"> <view class="person_itm_sign" @click="goChangeInfo('头像',userInfoObj.images)">
<text class="person_itm_sign_tit">头像</text> <text class="person_itm_sign_tit">头像</text>
<view class="person_itm_sign_right"> <view class="person_itm_sign_right">
<image class="avator" style="" :src=" baseurl+JSON.parse(userInfoObj.images)[0] ">
<image class="avator" :src='imgUrl' >
</image> </image>
<u-icon name="arrow-right"></u-icon> <u-icon name="arrow-right"></u-icon>
@ -264,10 +265,11 @@
honorList: ['荣誉', '无上荣誉'], honorList: ['荣誉', '无上荣誉'],
stanWorkList: ['蒙娜丽莎', '高月'], stanWorkList: ['蒙娜丽莎', '高月'],
userInfoObj: {}, 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: '', xieName: '',
userType: '' userType: '',
imgUrl:''
}; };
}, },
methods: { methods: {
@ -282,6 +284,7 @@
this.http.request('/user/userInfo', {}, "GET").then((res) => { this.http.request('/user/userInfo', {}, "GET").then((res) => {
console.log("res", res.data); console.log("res", res.data);
this.userInfoObj = res.data this.userInfoObj = res.data
this.imgUrl=baseurl+JSON.parse(this.userInfoObj.images)[0]
}).catch((error) => { }).catch((error) => {
uni.showToast({ 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> <template>
<view class=""> <view class="">
<view class=""> <view class="">
<u-loading-page :loading="load"></u-loading-page> <u-loading-page :loading="load"></u-loading-page>
</view> </view>
<view v-if="load == false"> <view v-if="load == false">
<view class="navbar" v-show="opCalue>0" :style="{'opacity':opCalue}"> <view class="navbar" v-show="opCalue>0" :style="{'opacity':opCalue}">
<view class="status_bar" :style="{'height':statusHeight+'px'}"></view> <view class="status_bar" :style="{'height':statusHeight+'px'}"></view>
<view class="apptitle" :style="{'height':titleHeight+'px'}"> <view class="apptitle" :style="{'height':titleHeight+'px'}">
<image src="../../static/blackArrow.png" mode="" class="backImg" @click="back"></image> <image src="../../static/blackArrow.png" mode="" class="backImg" @click="back"></image>
<view class="barLabel"> <view class="barLabel">
文艺之家 文艺之家
</view> </view>
</view> </view>
</view> </view>
<u-swiper :list="list" indicator indicatorMode="dot" circular height="240"></u-swiper> <u-swiper :list="list" indicator indicatorMode="dot" circular height="240"></u-swiper>
<view class="layout"> <view class="layout">
<view class="activityColumn"> <view class="activityColumn">
<view class="banEle"> <view class="banEle">
<view class="title"> <view class="title">
文创展厅 文创展厅
</view> </view>
<text class="more"> <text class="more">
更多 更多
</text> </text>
</view> </view>
<u-scroll-list :indicator="false"> <u-scroll-list :indicator="false">
<view class="scroll-list"> <view class="scroll-list">
<view class="scroll-list__goods-item" v-for="(item, index) in list2" :key="index" <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)"> :class="[(index === 9) && 'scroll-list__goods-item--no-margin-right']"
<image class="scroll-list__goods-item__image" :src="item.image"></image> @click="GoWorksShow(index)">
<view class="scroll-list__goods-item__view overEllipsis">{{ item.title }}</view> <image class="scroll-list__goods-item__image" :src="item.image"></image>
</view> <view class="scroll-list__goods-item__view overEllipsis">{{ item.title }}</view>
</view> </view>
</u-scroll-list> </view>
</view> </u-scroll-list>
<view class="activityColumn"> </view>
<view class="banEle"> <view class="activityColumn">
<view class="title"> <view class="banEle">
活动剪影 <view class="title">
</view> 活动剪影
<!-- <text class="more"> </view>
<!-- <text class="more">
更多 更多
</text> --> </text> -->
</view> </view>
<view class="activity" v-for="(v,i) in num" :key="i"> <!-- <view class="activity" v-for="(v,i) in num" :key="i">
<view class="left"> <view class="left">
<view class="content"> <view class="content">
<view class="title"> <view class="title">
@ -59,213 +60,279 @@
<view class="right"> <view class="right">
<image src="../../static/icon12.jpg" mode=""></image> <image src="../../static/icon12.jpg" mode=""></image>
</view> </view>
</view> </view> -->
</view> <view class="activity" v-for="(v,i) in jianAct" :key="i" @click="goDetail(v.id)">
</view> <view class="left">
</view> <view class="content">
</view> <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> </template>
<script> <script>
export default { import http from '../../request/interface.js'
data() { export default {
return { data() {
load: true, return {
statusHeight: 0, load: true,
titleHeight: 50, statusHeight: 0,
opCalue:0, titleHeight: 50,
list: [ opCalue: 0,
'https://cdn.uviewui.com/uview/swiper/swiper3.png', list: [
'https://cdn.uviewui.com/uview/swiper/swiper2.png' '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', list2: [{
title: '艺起战疫获奖作品展示', image: 'https://cdn.uviewui.com/uview/swiper/swiper2.png',
}, { title: '艺起战疫获奖作品展示',
image: 'https://cdn.uviewui.com/uview/swiper/swiper1.png', }, {
title: '嘉禾' image: 'https://cdn.uviewui.com/uview/swiper/swiper1.png',
}], title: '嘉禾'
num: 4 }],
}; num: 4,
}, jianAct: [],
onShow() { pages: 1,
this.getData() size: 20,
}, };
methods:{ },
getData(){ onShow() {
let _this = this this.getData()
this.http.request('/silhouette/list', {}, "GET").then(res => { this.pages = 1
if (res.code == 200) { },
console.log(res.data) methods: {
_this.load = false goDetail(id){
} uni.navigateTo({
}).catch(e => { url:'/pages/literFamily/ActJianDetail?id='+id
uni.showToast({ })
title: e.data.message, },
icon: "none", getData() {
}); let _this = this
}) this.http.request('/silhouette/list', {
}, page: this.pages,
back(){ size: this.size
uni.navigateBack() }, "GET").then(res => {
}, if (res.code == 200) {
GoWorksShow(id){ console.log(res.data)
uni.navigateTo({ this.jianAct = res.data.records
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
// #ifdef MP-WEIXIN _this.load = false
const menuButtonInfo = uni.getMenuButtonBoundingClientRect() // }
this.titleHeight = menuButtonInfo.height + (menuButtonInfo.top - systemMsg.statusBarHeight) * 2 }).catch(e => {
this.zwHeight = this.statusHeight + this.titleHeight uni.showToast({
// #endif 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> </script>
<style lang="scss"> <style lang="scss">
.navbar { .navbar {
position: fixed; position: fixed;
top: 0; top: 0;
left: 0; left: 0;
width: 100%; width: 100%;
z-index: 999; z-index: 999;
box-sizing: border-box; box-sizing: border-box;
background: #FFFFFF; background: #FFFFFF;
.apptitle {
display: flex;
align-items: center;
padding: 0 16px;
.backImg { .apptitle {
width: 20px; display: flex;
height: 20px; align-items: center;
margin-right: 16px; padding: 0 16px;
}
.barLabel { .backImg {
flex: 1; width: 20px;
text-align: center; height: 20px;
font-size: 16px; margin-right: 16px;
} }
}
}
.layout { .barLabel {
padding: 0 16px; flex: 1;
box-sizing: border-box; text-align: center;
font-size: 16px;
}
}
}
.activityColumn { .layout {
margin-top: 20px; padding: 0 16px;
box-sizing: border-box;
.banEle { .activityColumn {
display: flex; margin-top: 20px;
justify-content: space-between;
margin-bottom: 12px;
.title { .banEle {
font-size: 16px; display: flex;
line-height: 20px; justify-content: space-between;
font-weight: 800; margin-bottom: 12px;
}
.more { .title {
font-size: 12px; font-size: 16px;
color: #AFADB0; line-height: 20px;
} font-weight: 800;
} }
}
.u-scroll-list { .more {
padding-bottom: 0 !important; font-size: 12px;
color: #AFADB0;
}
}
}
.scroll-list { .u-scroll-list {
display: flex; padding-bottom: 0 !important;
&__goods-item { .scroll-list {
margin-right: 16px; display: flex;
display: flex;
flex-direction: column;
position: relative;
&__image { &__goods-item {
width: 200px; margin-right: 16px;
height: 139px; display: flex;
border-radius: 8px; flex-direction: column;
} position: relative;
&__view { &__image {
background-color: rgba(0, 0, 0, 0.4); width: 200px;
color: #FFFFFF; height: 139px;
border-radius: 0px 0px 8px 8px; border-radius: 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;
}
}
}
}
.activity { &__view {
display: flex; background-color: rgba(0, 0, 0, 0.4);
padding-top: 10px; color: #FFFFFF;
padding-bottom: 10px; border-radius: 0px 0px 8px 8px;
border-bottom: 1px solid #F5F5F5; 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 { .activity {
border-bottom: none; display: flex;
} padding-top: 10px;
padding-bottom: 10px;
border-bottom: 1px solid #F5F5F5;
.left { &:last-of-type {
flex: 1; border-bottom: none;
display: flex; }
flex-direction: column;
justify-content: space-between;
.content { .left {
display: flex; flex: 1;
align-items: center; display: flex;
flex-direction: column;
justify-content: space-between;
.title { .content {
font-size: 16px; display: flex;
} align-items: center;
}
.clidate { .title {
margin-top: 6px; font-size: 16px;
display: flex; }
justify-content: space-between; }
font-size: 12px;
color: #8E8F9E;
}
}
.right { .clidate {
margin-left: 10px; margin-top: 6px;
display: flex;
justify-content: space-between;
font-size: 12px;
color: #8E8F9E;
}
}
image { .right {
width: 124px; margin-left: 10px;
height: 93px;
border-radius: 4px; image {
} width: 124px;
} height: 93px;
} border-radius: 4px;
} }
}
}
}
</style> </style>