This commit is contained in:
lnn19986213 2023-03-21 15:39:51 +08:00
parent 7c317cdb10
commit e752ab8c80
11 changed files with 629 additions and 202 deletions

View File

@ -85,7 +85,8 @@
// vueproxyTable,
"/pre" : {
//
"target" : "http://10.0.0.5:8080/h5/api", //
"target" : "http://10.0.0.59:8080/h5/api", //
// "target" : "https://yxx.ydool.net/h5/api", //
"changeOrigin" : true, //
"secure" : false, // https

View File

@ -181,7 +181,7 @@
this.http.request('/works/list', {
page: this.pages,
size: this.size,
nickName: this.artValue,
userName: this.artValue,
workType: this.type,
workTypes: this.types,
}, "GET").then(res => {
@ -220,7 +220,7 @@
this.http.request('/works/list', {
page: this.pages,
size: this.size,
nickName: this.artValue,
userName: this.artValue,
workType: this.type,
workTypes: this.types,
}, "GET").then(res => {

View File

@ -4,12 +4,14 @@
<u-loading-page :loading="load"></u-loading-page>
</view>
<view class="workDetail" v-if="load == false">
<!-- 封面图片 -->
<image :src="cover" mode="widthFix" alt="" class="coverImg"></image>
<!-- 轮播图 -->
<u-swiper v-if="list.length > 0" :list="list" :autoplay="true" @change="e => currentNum = e.current" indicatorStyle="right: 20px" height="200">
<!-- <u-swiper v-if="list.length > 0" :list="list" :autoplay="true" @change="e => currentNum = e.current" indicatorStyle="right: 20px" height="200">
<view slot="indicator" class="indicator-num">
<text class="indicator-num__text">{{ currentNum + 1 }}/{{ list.length }}</text>
</view>
</u-swiper>
</u-swiper> -->
<!-- 作品名称 -->
<view class="work_name">
{{detailData.name}}
@ -20,13 +22,20 @@
<image :src="detailData.user.images" mode=""></image>
</view>
<view class="autor">
<view style="font-size: 14px; color: #251B1D;">
{{ detailData.user.userName }}
</view>
<view class="">
发布于{{detailData.createdAt}}
</view>
</view>
<!-- 作品描述 -->
<view class="work_desc">
{{detailData.introduce}}
</view>
<view class="talk" @click="goFollow()" v-if="isFollow == 2">
关注
</view>
<view class="talked" @click="goUnFollow()" v-if="isFollow == 3">
已关注
</view>
</view>
<!-- 作品标签· -->
<view class="sub_title">
@ -34,16 +43,21 @@
{{a}}
</view>
</view>
<!-- 作品描述 -->
<view class="work_desc">
{{detailData.introduce}}
</view>
<!-- 作品上传时间浏览量类型 -->
<view class="work_det">
<view class="det_box">
<!-- <view class="det_box">
<view class="box_left">
<image src="../../static/workDetail/time.png" class="img"></image>
</view>
<view class="box_right">
{{detailData.createdAt}}
</view>
</view>
</view> -->
<view class="det_box">
<view class="box_left">
<image src="../../static/workDetail/seen.png" class="img"></image>
@ -61,6 +75,8 @@
</view>
</view>
</view>
<!-- 其他图片 -->
<image v-if="list.lenght > 0" v-for="item in list" :src="item" mode="widthFix" alt="" class="decTmgs"></image>
<!-- 附带文件 -->
<view class="file_box" v-for="(item,index) in list2" :key="index" @click="downLoad(item.url)">
<view class="file_box_left">
@ -72,9 +88,7 @@
</view>
</view>
</view>
<view style="height: 60px; width: 100%; backgroud:#fff;">
</view>
<view style="height: 60px; width: 100%; backgroud:#fff;"></view>
<!-- 底部点赞收藏 -->
<view class="detailBottom">
<view class="bottom_box">
@ -116,13 +130,14 @@
iswx: 0,
detailData: {},
contractUrl: '',
isFollow: '',
userId: ''
}
},
onLoad(op) {
this.id = op.id
},
onShow() {
this.list2 = []
this.getData()
},
onReady() {
@ -161,7 +176,13 @@
}
})
}
if(this.list.length > 0){
this.cover = this.list[0]
this.list.splice(0,1)
}
this.detailData = res.data
this.isFollow = this.detailData.isFollow
this.userId = this.detailData.user.id
_this.load = false
}
}).catch(e => {
@ -257,8 +278,31 @@
this.androidOpenPdf(this.contractUrl);
break;
}
},
goFollow(){
this.http.request('/userFollow/addFollow?writerId=' + this.userId, "GET").then(res => {
if (res.code == 200) {
this.getData()
}
}).catch(e => {
uni.showToast({
title: e.data.message,
icon: "none",
});
})
},
goUnFollow(){
this.http.request('/userFollow/delFollow?writerId=' + this.userId, "GET").then(res => {
if (res.code == 200) {
this.getData()
}
}).catch(e => {
uni.showToast({
title: e.data.message,
icon: "none",
});
})
},
}
}
</script>
@ -283,6 +327,14 @@
}
}
.coverImg{
width: 100%;
}
.decTmgs{
width: 94%;
margin: 10px 3%;
}
.work_name {
width: 94%;
margin: 10px 3%;
@ -295,21 +347,47 @@
display: flex;
justify-content: space-between;
align-items: center;
padding: 0 3%;
.puber {
display: flex;
align-items: center;
.avtor {
border-radius: 12px;
border-radius: 50px;
overflow: hidden;
width: 24px;
height: 24px;
width: 40px;
height: 40px;
margin-right: 4px;
}
.autor {
color: #251B1D;
color: #AFADB0;
font-size: 12px;
}
}
.talk {
border: 1px solid #99241B;
font-size: 24rpx;
font-weight: 600;
border-radius: 60rpx;
color: #99241B;
display: flex;
align-items: center;
justify-content: center;
padding: 12rpx 24rpx;
box-sizing: border-box;
}
.talked {
border: 1px solid #afadb0;
font-size: 24rpx;
font-weight: 600;
border-radius: 60rpx;
color: #afadb0;
display: flex;
align-items: center;
justify-content: center;
padding: 12rpx 24rpx;
box-sizing: border-box;
}
}
.work_desc {
@ -333,7 +411,7 @@
text-align: center;
color: #99241B;
border: 1rpx solid #E7CAC8;
border-radius: 20px;
border-radius: 6px;
margin: 0 10rpx;
padding: 4rpx 16rpx;
}

View File

@ -12,6 +12,7 @@
{{v.username}} {{v.fbsj}}
</view>
</view>
<u-gap height="16" bgColor="#ffffff"></u-gap>
<u-empty v-if="list2.length == 0" mode="data" icon="../../static/orderE.png" marginTop="120"></u-empty>
</view>
</view>
@ -47,7 +48,10 @@
methods: {
getData() {
let _this = this
this.http.request('/policy/list', {page:this.pages,size:this.size}, "GET").then(res => {
this.http.request('/policy/list', {
page: this.pages,
size: this.size
}, "GET").then(res => {
if (res.code == 200) {
if (res.data.records.length > 0) {
res.data.records.forEach(function(item) {
@ -76,7 +80,10 @@
<style lang="scss">
.express_contain {
padding: 20px 16px;
padding: 20px 0px 12px;
margin: 0 16px;
border-bottom: 1rpx solid #8E8F9E;
.express_contain_content {
color: #32333B;
font-weight: 600;

View File

@ -267,7 +267,6 @@
"X-Token": token
},
success: (res) => {
console.log(res)
if (JSON.parse(res.data).code == 200) {
setTimeout(() => {
resolve(JSON.parse(res.data).data.path)

View File

@ -5,7 +5,7 @@
</view>
<view v-if="load == false">
<view class="bg">
<image :src="image" mode=""></image>
<image :src="image" mode="widthFix"></image>
</view>
<u-gap height="1" bgColor="#fff"></u-gap>
@ -30,7 +30,7 @@
<u--input placeholder="请输入使用费用" inputAlign="right" border="none" type="number" v-model="price">
</u--input> <text style="margin-left: 16rpx;"></text>
</view>
<view class="sub_ti_box" v-if="v2=='可购买' && v1=='积分购买'">
<view class="sub_ti_box" v-if="v2=='可购买' && v1=='积分兑换'">
<text class="right_titl">使用积分</text>
<u--input placeholder="请输入使用积分" inputAlign="right" type="number" border="none" v-model="price">
</u--input> <text style="margin-left: 16rpx;"></text>
@ -90,9 +90,7 @@
</u-radio-group>
</u-popup>
<view style="height: 160rpx; width: 750rpx;">
</view>
<view style="height: 160rpx; width: 750rpx;"></view>
<view class="operation">
<button type="default" class="collection" @click="goPre">上一步</button>
<button type="default" class="apply" @click="cfmPub()">确认发布</button>
@ -118,7 +116,14 @@
wpPath: '',
code: '',
radiovalue1: '',
radiolist1: [],
radiolist1: [{
label: '可购买',
value: '1',
},{
label: '不可购买',
value: '2',
}
],
radiovalue7: '',
radiolist7: [],
radio: '',
@ -152,7 +157,7 @@
console.log(this.image)
},
onShow() {
this.getQx()
// this.getQx()
this.getFs()
},
methods: {

View File

@ -4,12 +4,56 @@
<u-loading-page :loading="load"></u-loading-page>
</view>
<view class="layout" v-if="load == false">
<view class="shelves">
<view class="container">
<view class="left">
<view class="scroll-list__goods-item" v-for="(item, index) in leftList" :key="index"
:class="[(index === 9) && 'scroll-list__goods-item--no-margin-right']"
@click="ToEnjoy(item.id)">
<image class="scroll-list__goods-item__image" :src="item.file" mode="widthFix"></image>
<view class="scroll-list__goods-item__title">
{{ item.name }}
</view>
<view class="scroll-list__goods-item__text">
<text class="det-type">类型:{{ item.name }}</text>
<view class="det_box">
<view class="box_left">
<image src="../../static/workDetail/seen.png" class="img"></image>
</view>
<view class="box_right">
{{item.views}}
</view>
</view>
</view>
</view>
</view>
<view class="right">
<view class="scroll-list__goods-item" v-for="(item, index) in rightList" :key="index"
:class="[(index === 9) && 'scroll-list__goods-item--no-margin-right']"
@click="ToEnjoy(item.id)">
<image class="scroll-list__goods-item__image" :src="item.file" mode="widthFix"></image>
<view class="scroll-list__goods-item__title">
{{ item.name }}
</view>
<view class="scroll-list__goods-item__text">
<text class="det-type">类型:{{ item.name }}</text>
<view class="det_box">
<view class="box_left">
<image src="../../static/workDetail/seen.png" class="img"></image>
</view>
<view class="box_right">
{{item.views}}
</view>
</view>
</view>
</view>
</view>
</view>
<!-- <view class="shelves">
<view class="shelves-item" v-for="(item,index) in enjoyList" :key="index" @click="ToEnjoy(item.id)">
<image :src="item.file" class="shelves-img"></image>
<view class="name">{{item.name}}</view>
</view>
</view>
</view> -->
</view>
</view>
</template>
@ -20,6 +64,12 @@
return {
load: true,
enjoyList: [],
//
leftList: [],
rightList: [],
//
leftH: 0,
rightH: 0
};
},
onReady() {
@ -54,7 +104,8 @@
}
})
this.enjoyList = res.data
this.load = false
this.doList()
}
}).catch(e => {
uni.showToast({
@ -68,6 +119,32 @@
url: "/pages/ArtWorks/artWorkDetail?id=" + val
})
},
doList() {
const that = this
this.leftList = []
this.rightList = []
this.leftH = 0
this.rightH = 0
this.enjoyList.forEach(res => {
//
uni.getImageInfo({
src: res.file,
success: (image) => {
//
let showH = (50 * image.height) / image.width
//
if (that.leftH <= that.rightH) {
that.leftList.push(res)
that.leftH += showH
} else {
that.rightList.push(res)
that.rightH += showH
}
}
})
})
this.load = false
}
},
}
</script>
@ -76,6 +153,81 @@
.layout {
padding: 16rpx 32rpx;
.container {
font-size: 14rpx;
line-height: 24rpx;
.right,
.left {
display: inline-block;
width: 49%;
vertical-align: top;
.scroll-list {
display: flex;
&__goods-item {
width: 100%;
margin: 20rpx 10rpx;
&__image {
width: 100%;
border-radius: 8px;
}
&__title {
font-size: 14px;
font-weight: 500;
padding: 10rpx 24rpx;
}
&__text {
text-align: center;
margin-top: 3px;
height: 16px;
padding: 0 24rpx;
color: #AFADB0;
.det-type{
float: left;
line-height: 16px;
}
.det_box {
float: right;
overflow: hidden;
.box_left {
width: 16px;
height: 16px;
float: left;
.img {
width: 100%;
height: 100%;
}
}
.box_right {
margin-left: 2px;
line-height: 16px;
float: left;
}
}
}
}
}
}
.left {
margin-right: 2%;
}
.left image,
.right image {
width: 100%;
margin-bottom: 10rpx;
}
}
.shelves {
width: 100%;

View File

@ -5,7 +5,7 @@
</view>
<view v-if="load == false">
<view class="bg">
<image src="../../static/puplishBG.png" mode=""></image>
<image :src="image" mode="widthFix"></image>
</view>
<view class="rightBox" @click="showBuy=true">
@ -70,6 +70,7 @@
</u-radio-group>
</u-popup>
<view style="height: 160rpx; width: 750rpx;"></view>
<view class="operation">
<button type="default" class="collection" @click="goPre">上一步</button>
<button type="default" class="apply" @click="cfmPub()">确认修改</button>
@ -99,6 +100,7 @@
radio: '',
switchVal: false,
worksVo: {},
image: '',
};
},
onLoad(op) {
@ -126,6 +128,16 @@
this.radiovalue7 = '面议'
this.v1 = '面议'
}
if (this.worksVo.file) {
let fileArr = this.worksVo.file.split(',')
let gs = fileArr[0].substr(fileArr[0].lastIndexOf(".") + 1)
if (gs == 'jpg' || gs == 'jpeg' || gs == 'png' || gs == 'bmp' || gs == 'gif' || gs == 'tif' || gs == 'tiff') {
this.image = fileArr[0]
}
else if (gs == 'pdf') {
this.image = '../../static/fileImg/pdfS.png'
}
}
console.log(this.worksVo)
},
onShow() {
@ -313,7 +325,7 @@
}
.bg {
height: 520rpx;
// height: 520rpx;
}
.rightBox {

View File

@ -21,31 +21,6 @@
</u-grid-item>
</u-grid>
</view>
<!-- 每日一赏 -->
<view class="group">
<view class="groupTitle">
<view class="title">
每日一赏
</view>
<view class="more" @click="navigateToFun('/pages/enjoy/enjoy')">
更多
</view>
</view>
<view class="remark">
为您推荐最优秀的作品
</view>
<view class="scrollEle">
<u-scroll-list :indicator="false">
<view class="scroll-list">
<view class="scroll-list__goods-item" v-for="(item, index) in enjoyList" :key="index"
:class="[(index === 9) && 'scroll-list__goods-item--no-margin-right']" @click="ToEnjoy(item.id)">
<image class="scroll-list__goods-item__image" :src="item.file"></image>
<text class="scroll-list__goods-item__text">{{ item.name }}</text>
</view>
</view>
</u-scroll-list>
</view>
</view>
<!-- 文艺名家 -->
<view class="group">
<view class="groupTitle">
@ -63,8 +38,10 @@
<u-scroll-list :indicator="false">
<view class="scroll-list">
<view class="scroll-list__goods-item" v-for="(item, index) in writerList" :key="index"
:class="[(index === 9) && 'scroll-list__goods-item--no-margin-right']" @click="famouserDetaol(item.id)" >
<image class="scroll-list__goods-item__image" :src="item.images" style="height: 170px;"></image>
:class="[(index === 9) && 'scroll-list__goods-item--no-margin-right']"
@click="famouserDetaol(item.id)">
<image class="scroll-list__goods-item__image" :src="item.images" style="height: 170px;">
</image>
<text class="scroll-list__goods-item__text">{{ item.userName }}</text>
</view>
</view>
@ -85,20 +62,92 @@
最精彩的文艺活动
</view>
<view class="scrollEle">
<u-swiper :list="list2" keyName="image" showTitle :autoplay="false" circular @click="goActDeat"></u-swiper>
<u-swiper :list="list2" keyName="image" showTitle :autoplay="false" circular @click="goActDeat">
</u-swiper>
</view>
</view>
<u-gap height="32" bgColor="#ffffff"></u-gap>
<!-- 每日一赏 -->
<view class="group">
<view class="groupTitle">
<view class="title">
每日一赏
</view>
<view class="more" @click="navigateToFun('/pages/enjoy/enjoy')">
更多
</view>
</view>
<view class="remark">
为您推荐最优秀的作品
</view>
<view class="container">
<view class="left">
<view class="scroll-list__goods-item" v-for="(item, index) in leftList" :key="index"
:class="[(index === 9) && 'scroll-list__goods-item--no-margin-right']"
@click="ToEnjoy(item.id)">
<image class="scroll-list__goods-item__image" :src="item.file" mode="widthFix"></image>
<view class="scroll-list__goods-item__title">
{{ item.name }}
</view>
<view class="scroll-list__goods-item__text">
<text class="det-type">类型:{{ item.name }}</text>
<view class="det_box">
<view class="box_left">
<image src="../../static/workDetail/seen.png" class="img"></image>
</view>
<view class="box_right">
{{item.views}}
</view>
</view>
</view>
</view>
</view>
<view class="right">
<view class="scroll-list__goods-item" v-for="(item, index) in rightList" :key="index"
:class="[(index === 9) && 'scroll-list__goods-item--no-margin-right']"
@click="ToEnjoy(item.id)">
<image class="scroll-list__goods-item__image" :src="item.file" mode="widthFix"></image>
<view class="scroll-list__goods-item__title">
{{ item.name }}
</view>
<view class="scroll-list__goods-item__text">
<text class="det-type">类型:{{ item.typesName }}</text>
<view class="det_box">
<view class="box_left">
<image src="../../static/workDetail/seen.png" class="img"></image>
</view>
<view class="box_right">
{{item.views}}
</view>
</view>
</view>
</view>
</view>
</view>
<!-- <view class="scrollEle">
<u-scroll-list :indicator="false">
<view class="scroll-list">
<view class="scroll-list__goods-item" v-for="(item, index) in enjoyList" :key="index"
:class="[(index === 9) && 'scroll-list__goods-item--no-margin-right']"
@click="ToEnjoy(item.id)">
<image class="scroll-list__goods-item__image" :src="item.file"></image>
<text class="scroll-list__goods-item__text">{{ item.name }}</text>
</view>
</view>
</u-scroll-list>
</view> -->
</view>
<u-gap height="12"></u-gap>
<view class="not">
<view class="notice">
本服务由浙江政务服务网象山县文学艺术界联合会提供
</view>
<view class="notice">
服务咨询热线<!-- <text class="phone" @click="callPhone()">65712324</text> -->
<a href="tel:65712324">打电话</a>
服务咨询热线
<!-- <text class="phone" @click="callPhone()">65712324</text> -->
<a href="tel:65712324">65712324</a>
</view>
</view>
<u-gap height="32" bgColor="#ffffff"></u-gap>
<u-gap height="32"></u-gap>
<tabbar tabbarId='1'></tabbar>
</view>
@ -165,6 +214,12 @@
writerList: [],
pages: 1,
size: 5,
//
leftList: [],
rightList: [],
//
leftH: 0,
rightH: 0
};
},
onReady() {
@ -177,7 +232,6 @@
},
onShow() {
this.getUserInfo()
this.getSwpper()
},
methods: {
//
@ -189,6 +243,7 @@
uni.removeStorageSync('userType');
uni.setStorageSync('isAdmin', res.data.isAdmin)
uni.setStorageSync('userType', res.data.userType)
this.getSwpper()
}
}).catch(e => {
uni.showToast({
@ -224,7 +279,8 @@
if (item.file != undefined) {
let fileArr = item.file.split(',')
let gs = fileArr[0].substr(fileArr[0].lastIndexOf(".") + 1)
if (gs == 'jpg' || gs == 'jpeg' || gs == 'png' || gs == 'bmp' || gs == 'gif' || gs == 'tif' || gs == 'tiff') {
if (gs == 'jpg' || gs == 'jpeg' || gs == 'png' || gs == 'bmp' || gs ==
'gif' || gs == 'tif' || gs == 'tiff') {
item.file = fileArr[0]
} else if (gs == 'pdf') {
item.file = '../../static/fileImg/pdfS.png'
@ -237,6 +293,7 @@
this.enjoyList = res.data
}
this.getArtist()
this.doList()
}
}).catch(e => {
uni.showToast({
@ -248,7 +305,10 @@
//
getArtist() {
let _this = this
this.http.request('/indexImage/artists', {page:this.pages,size:this.size}, "GET").then(res => {
this.http.request('/indexImage/artists', {
page: this.pages,
size: this.size
}, "GET").then(res => {
if (res.code == 200) {
res.data.records.forEach(function(item) {
if (item.images) {
@ -271,7 +331,10 @@
//
getHdlist() {
let _this = this
this.http.request('/activity/list', {page:this.pages,size:this.size}, "GET").then(res => {
this.http.request('/activity/list', {
page: this.pages,
size: this.size
}, "GET").then(res => {
if (res.code == 200) {
res.data.records.forEach(function(item) {
if (item.images) {
@ -342,13 +405,13 @@
// })
// break;
}
}
,famouserDetaol(val){
},
famouserDetaol(val) {
uni.navigateTo({
url: "/pages/famousArts/famousArts?id=" + val
})
}
,ToEnjoy(val){
},
ToEnjoy(val) {
uni.navigateTo({
url: "/pages/ArtWorks/artWorkDetail?id=" + val
})
@ -377,6 +440,31 @@
});
}
});
},
doList() {
const that = this
this.leftList = []
this.rightList = []
this.leftH = 0
this.rightH = 0
this.enjoyList.forEach(res => {
//
uni.getImageInfo({
src: res.file,
success: (image) => {
//
let showH = (50 * image.height) / image.width
//
if (that.leftH <= that.rightH) {
that.leftList.push(res)
that.leftH += showH
} else {
that.rightList.push(res)
that.rightH += showH
}
}
})
})
}
}
}
@ -386,6 +474,11 @@
.layout {
padding: 0 16px;
padding-bottom: 50px;
background-color: #F9F8F7;
background-image: url('../../static/home/home-bg.png');
background-position: center top;
background-size: 100% auto;
.apptitle {
display: flex;
@ -440,6 +533,84 @@
color: #AFADB0;
}
.container {
font-size: 14rpx;
line-height: 24rpx;
.right,
.left {
display: inline-block;
width: 49%;
vertical-align: top;
.scroll-list {
display: flex;
&__goods-item {
width: 100%;
margin: 20rpx 0rpx;
background-color: #ffffff;
box-shadow: 0px 2px 12px 0px rgba(70,86,124,0.09);
border-radius: 8px;
&__image {
width: 100%;
border-radius: 8px;
}
&__title {
font-size: 14px;
font-weight: 500;
padding: 10rpx 24rpx;
}
&__text {
text-align: center;
margin-top: 3px;
height: 16px;
padding: 0 24rpx;
color: #AFADB0;
.det-type{
float: left;
line-height: 16px;
}
.det_box {
float: right;
overflow: hidden;
.box_left {
width: 16px;
height: 16px;
float: left;
.img {
width: 100%;
height: 100%;
}
}
.box_right {
margin-left: 2px;
line-height: 16px;
float: left;
}
}
}
}
}
}
.left {
margin-right: 2%;
}
.left image,
.right image {
width: 100%;
margin-bottom: 10rpx;
}
}
.scrollEle {
padding-top: 14px;
@ -473,11 +644,13 @@
.not {
width: 100%;
text-align: center;
.notice {
font-size: 24rpx;
color: #808DA1;
font-weight: 400;
line-height: 36RPX;
.phone {
color: #1492ff;
}

View File

@ -6,8 +6,8 @@
export default {
config: {
// baseUrl: "http://192.168.0.57:8080/h5/api", //王锡
baseUrl: "/pre", //俞燕红-跨域
// baseUrl: "https://yxx.ydool.net/h5/api", //
// baseUrl: "/pre", //俞燕红-跨域
baseUrl: "https://yxx.ydool.net/h5/api", //
// baseUrl: "/h5/api", //俞燕红 线上
header: {
'Content-Type': 'application/json;charset=UTF-8',

BIN
src/static/home/home-bg.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 330 KiB