This commit is contained in:
parent
7c317cdb10
commit
e752ab8c80
|
@ -85,8 +85,9 @@
|
|||
// 与vue中的proxyTable配置大致上一致,此处我同时代理了两个
|
||||
"/pre" : {
|
||||
// 预发布
|
||||
"target" : "http://10.0.0.5:8080/h5/api", // 目标接口域名
|
||||
// "target" : "https://yxx.ydool.net/h5/api", // 目标接口域名
|
||||
"target" : "http://10.0.0.59:8080/h5/api", // 目标接口域名
|
||||
|
||||
// "target" : "https://yxx.ydool.net/h5/api", // 目标接口域名
|
||||
"changeOrigin" : true, // 是否跨域
|
||||
"secure" : false, // 设置支持https协议的代理
|
||||
"pathRewrite" : {
|
||||
|
|
|
@ -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 => {
|
||||
|
|
|
@ -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">
|
||||
{{ detailData.user.userName }}
|
||||
<view style="font-size: 14px; color: #251B1D;">
|
||||
{{ detailData.user.userName }}
|
||||
</view>
|
||||
<view class="">
|
||||
发布于{{detailData.createdAt}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 作品描述 -->
|
||||
<view class="work_desc">
|
||||
{{detailData.introduce}}
|
||||
<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>
|
||||
|
@ -282,6 +326,14 @@
|
|||
font-size: 12px;
|
||||
}
|
||||
}
|
||||
|
||||
.coverImg{
|
||||
width: 100%;
|
||||
}
|
||||
.decTmgs{
|
||||
width: 94%;
|
||||
margin: 10px 3%;
|
||||
}
|
||||
|
||||
.work_name {
|
||||
width: 94%;
|
||||
|
@ -295,20 +347,46 @@
|
|||
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;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<u-loading-page :loading="load"></u-loading-page>
|
||||
</view>
|
||||
<view v-if="load == false">
|
||||
<view class="express_contain" v-for="(v,i) in list2" :key="i" @click="toDetail(v.id)">
|
||||
<view class="express_contain" v-for="(v,i) in list2" :key="i" @click="toDetail(v.id)">
|
||||
<view class="express_contain_content">
|
||||
{{v.title}}
|
||||
</view>
|
||||
|
@ -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>
|
||||
|
@ -44,16 +45,19 @@
|
|||
this.pages++
|
||||
this.getData();
|
||||
},
|
||||
methods:{
|
||||
getData(){
|
||||
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){
|
||||
if (res.data.records.length > 0) {
|
||||
res.data.records.forEach(function(item) {
|
||||
_this.list2.push(item)
|
||||
})
|
||||
}else{
|
||||
} else {
|
||||
this.pages--
|
||||
}
|
||||
this.load = false
|
||||
|
@ -65,7 +69,7 @@
|
|||
});
|
||||
})
|
||||
},
|
||||
toDetail(val){
|
||||
toDetail(val) {
|
||||
uni.navigateTo({
|
||||
url: "/pages/PolicyExpress/PolicyExpressDetail?id=" + val
|
||||
})
|
||||
|
@ -76,11 +80,14 @@
|
|||
|
||||
<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;
|
||||
font-size: 14px;
|
||||
font-size: 14px;
|
||||
font-family: PingFang SC-Semibold, PingFang SC;
|
||||
|
||||
}
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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: {
|
||||
|
|
|
@ -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>
|
||||
|
@ -75,6 +152,81 @@
|
|||
<style lang="scss">
|
||||
.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%;
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -4,106 +4,155 @@
|
|||
<u-loading-page :loading="load"></u-loading-page>
|
||||
</view>
|
||||
<view class="layout" v-if="load == false">
|
||||
<view class="status_bar" :style="{'height':statusHeight+'px'}"></view>
|
||||
<view class="apptitle" :style="{'height':titleHeight+'px'}">
|
||||
<image src="../../static/icon10.png" mode="" class="logo"></image>
|
||||
<image src="../../static/icon11.png" mode="" class="appname"></image>
|
||||
</view>
|
||||
<!-- 轮播图 -->
|
||||
<u-swiper :list="list" indicator indicatorMode="line" circular></u-swiper>
|
||||
<!-- 功能菜单 -->
|
||||
<view class="menus">
|
||||
<u-grid :border="false" col="4">
|
||||
<u-grid-item v-for="(listItem,listIndex) in menus" @click="cliGridItem" :name="listItem.id"
|
||||
:key="listIndex">
|
||||
<image :src="listItem.imgUrl" mode="" class="menusImg"></image>
|
||||
<text class="grid-text">{{listItem.title}}</text>
|
||||
</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">
|
||||
<view class="title">
|
||||
文艺名家
|
||||
</view>
|
||||
<view class="more" @click="navigateToFun('/pages/famousArts/artistList')">
|
||||
更多
|
||||
</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 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>
|
||||
<text class="scroll-list__goods-item__text">{{ item.userName }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</u-scroll-list>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 热门活动 -->
|
||||
<view class="group">
|
||||
<view class="groupTitle">
|
||||
<view class="title">
|
||||
热门活动
|
||||
</view>
|
||||
<view class="more" @click="navigateToFun('/pages/ArtActivities/ArtActivities')">
|
||||
更多
|
||||
</view>
|
||||
</view>
|
||||
<view class="remark">
|
||||
最精彩的文艺活动
|
||||
</view>
|
||||
<view class="scrollEle">
|
||||
<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="not">
|
||||
<view class="notice">
|
||||
本服务由浙江政务服务网、象山县文学艺术界联合会提供
|
||||
</view>
|
||||
<view class="notice">
|
||||
服务咨询热线:<!-- <text class="phone" @click="callPhone()">65712324</text> -->
|
||||
<a href="tel:65712324">打电话</a>
|
||||
</view>
|
||||
</view>
|
||||
<u-gap height="32" bgColor="#ffffff"></u-gap>
|
||||
<tabbar tabbarId='1'></tabbar>
|
||||
<view class="status_bar" :style="{'height':statusHeight+'px'}"></view>
|
||||
<view class="apptitle" :style="{'height':titleHeight+'px'}">
|
||||
<image src="../../static/icon10.png" mode="" class="logo"></image>
|
||||
<image src="../../static/icon11.png" mode="" class="appname"></image>
|
||||
</view>
|
||||
|
||||
<!-- 轮播图 -->
|
||||
<u-swiper :list="list" indicator indicatorMode="line" circular></u-swiper>
|
||||
<!-- 功能菜单 -->
|
||||
<view class="menus">
|
||||
<u-grid :border="false" col="4">
|
||||
<u-grid-item v-for="(listItem,listIndex) in menus" @click="cliGridItem" :name="listItem.id"
|
||||
:key="listIndex">
|
||||
<image :src="listItem.imgUrl" mode="" class="menusImg"></image>
|
||||
<text class="grid-text">{{listItem.title}}</text>
|
||||
</u-grid-item>
|
||||
</u-grid>
|
||||
</view>
|
||||
<!-- 文艺名家 -->
|
||||
<view class="group">
|
||||
<view class="groupTitle">
|
||||
<view class="title">
|
||||
文艺名家
|
||||
</view>
|
||||
<view class="more" @click="navigateToFun('/pages/famousArts/artistList')">
|
||||
更多
|
||||
</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 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>
|
||||
<text class="scroll-list__goods-item__text">{{ item.userName }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</u-scroll-list>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 热门活动 -->
|
||||
<view class="group">
|
||||
<view class="groupTitle">
|
||||
<view class="title">
|
||||
热门活动
|
||||
</view>
|
||||
<view class="more" @click="navigateToFun('/pages/ArtActivities/ArtActivities')">
|
||||
更多
|
||||
</view>
|
||||
</view>
|
||||
<view class="remark">
|
||||
最精彩的文艺活动
|
||||
</view>
|
||||
<view class="scrollEle">
|
||||
<u-swiper :list="list2" keyName="image" showTitle :autoplay="false" circular @click="goActDeat">
|
||||
</u-swiper>
|
||||
</view>
|
||||
</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="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">65712324</a>
|
||||
</view>
|
||||
</view>
|
||||
<u-gap height="32"></u-gap>
|
||||
<tabbar tabbarId='1'></tabbar>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</template>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
|
@ -165,6 +214,12 @@
|
|||
writerList: [],
|
||||
pages: 1,
|
||||
size: 5,
|
||||
// 初始化左右盒子
|
||||
leftList: [],
|
||||
rightList: [],
|
||||
// 初始化左右盒子高度
|
||||
leftH: 0,
|
||||
rightH: 0
|
||||
};
|
||||
},
|
||||
onReady() {
|
||||
|
@ -177,11 +232,10 @@
|
|||
},
|
||||
onShow() {
|
||||
this.getUserInfo()
|
||||
this.getSwpper()
|
||||
},
|
||||
methods: {
|
||||
//用户信息
|
||||
getUserInfo(){
|
||||
getUserInfo() {
|
||||
let _this = this
|
||||
this.http.request('/user/userInfo', {}, "GET").then(res => {
|
||||
if (res.code == 200) {
|
||||
|
@ -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({
|
||||
|
@ -198,7 +253,7 @@
|
|||
})
|
||||
},
|
||||
//获取轮播图
|
||||
getSwpper(){
|
||||
getSwpper() {
|
||||
let _this = this
|
||||
this.http.request('/indexImage/list', {}, "GET").then(res => {
|
||||
if (res.code == 200) {
|
||||
|
@ -216,27 +271,29 @@
|
|||
})
|
||||
},
|
||||
//每日一赏
|
||||
getEnjoy(){
|
||||
getEnjoy() {
|
||||
let _this = this
|
||||
this.http.request('/indexImage/recommend', {}, "GET").then(res => {
|
||||
if (res.code == 200) {
|
||||
res.data.forEach(function(item){
|
||||
res.data.forEach(function(item) {
|
||||
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'
|
||||
}
|
||||
}
|
||||
})
|
||||
if(res.data.length > 5){
|
||||
this.enjoyList = res.data.slice(0,5)
|
||||
}else{
|
||||
if (res.data.length > 5) {
|
||||
this.enjoyList = res.data.slice(0, 5)
|
||||
} else {
|
||||
this.enjoyList = res.data
|
||||
}
|
||||
this.getArtist()
|
||||
this.doList()
|
||||
}
|
||||
}).catch(e => {
|
||||
uni.showToast({
|
||||
|
@ -246,15 +303,18 @@
|
|||
})
|
||||
},
|
||||
//获取文艺名家
|
||||
getArtist(){
|
||||
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) {
|
||||
// let img = JSON.parse(item.images)
|
||||
// item.images = img[0]
|
||||
}else{
|
||||
} else {
|
||||
item.images = '../../static/txIcon.png'
|
||||
}
|
||||
})
|
||||
|
@ -269,9 +329,12 @@
|
|||
})
|
||||
},
|
||||
//获取热门活动
|
||||
getHdlist(){
|
||||
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) {
|
||||
|
@ -289,7 +352,7 @@
|
|||
});
|
||||
})
|
||||
},
|
||||
navigateToFun(url){
|
||||
navigateToFun(url) {
|
||||
uni.navigateTo({
|
||||
url
|
||||
});
|
||||
|
@ -326,57 +389,82 @@
|
|||
url: "/pages/literFamily/literFamily"
|
||||
})
|
||||
break;
|
||||
// case 6:
|
||||
// uni.navigateTo({
|
||||
// url: "/pages/literHelp/literHelp"
|
||||
// })
|
||||
// break;
|
||||
// case 7:
|
||||
// uni.navigateTo({
|
||||
// url: "/pages/MyPoints/MyPoints"
|
||||
// })
|
||||
// break;
|
||||
// case 8:
|
||||
// uni.navigateTo({
|
||||
// url: "/pages/moreFun/moreFun"
|
||||
// })
|
||||
// break;
|
||||
// case 6:
|
||||
// uni.navigateTo({
|
||||
// url: "/pages/literHelp/literHelp"
|
||||
// })
|
||||
// break;
|
||||
// case 7:
|
||||
// uni.navigateTo({
|
||||
// url: "/pages/MyPoints/MyPoints"
|
||||
// })
|
||||
// break;
|
||||
// case 8:
|
||||
// uni.navigateTo({
|
||||
// url: "/pages/moreFun/moreFun"
|
||||
// })
|
||||
// break;
|
||||
}
|
||||
}
|
||||
,famouserDetaol(val){
|
||||
},
|
||||
famouserDetaol(val) {
|
||||
uni.navigateTo({
|
||||
url:"/pages/famousArts/famousArts?id=" + val
|
||||
url: "/pages/famousArts/famousArts?id=" + val
|
||||
})
|
||||
}
|
||||
,ToEnjoy(val){
|
||||
},
|
||||
ToEnjoy(val) {
|
||||
uni.navigateTo({
|
||||
url: "/pages/ArtWorks/artWorkDetail?id=" + val
|
||||
})
|
||||
},
|
||||
//活动详情
|
||||
goActDeat(index){
|
||||
goActDeat(index) {
|
||||
let id = this.list2[index].id
|
||||
uni.navigateTo({
|
||||
url:'/pages/ActivitiesDetail/ActivitiesDetail?id=' + id
|
||||
url: '/pages/ActivitiesDetail/ActivitiesDetail?id=' + id
|
||||
})
|
||||
},
|
||||
callPhone(){
|
||||
callPhone() {
|
||||
uni.makePhoneCall({
|
||||
// 手机号
|
||||
phoneNumber: '65712324',
|
||||
// 成功回调
|
||||
success: (res) => {
|
||||
console.log('调用成功!')
|
||||
},
|
||||
// 失败回调
|
||||
fail: (res) => {
|
||||
console.log('调用失败!')
|
||||
uni.showToast({
|
||||
title: '调用失败!',
|
||||
icon: 'none',
|
||||
});
|
||||
// 手机号
|
||||
phoneNumber: '65712324',
|
||||
// 成功回调
|
||||
success: (res) => {
|
||||
console.log('调用成功!')
|
||||
},
|
||||
// 失败回调
|
||||
fail: (res) => {
|
||||
console.log('调用失败!')
|
||||
uni.showToast({
|
||||
title: '调用失败!',
|
||||
icon: 'none',
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
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;
|
||||
|
||||
|
@ -469,16 +640,18 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
.not{
|
||||
|
||||
.not {
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
.notice{
|
||||
|
||||
.notice {
|
||||
font-size: 24rpx;
|
||||
color: #808DA1;
|
||||
font-weight: 400;
|
||||
line-height: 36RPX;
|
||||
.phone{
|
||||
|
||||
.phone {
|
||||
color: #1492ff;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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',
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 330 KiB |
Loading…
Reference in New Issue