|
@ -126,6 +126,14 @@
|
||||||
"enablePullDownRefresh": false
|
"enablePullDownRefresh": false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
, {
|
||||||
|
"path": "pages/ArtWorks/webView",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "文件浏览",
|
||||||
|
"enablePullDownRefresh": false
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
// 文艺活动
|
// 文艺活动
|
||||||
, {
|
, {
|
||||||
|
|
|
@ -1,387 +1,373 @@
|
||||||
<template>
|
<template>
|
||||||
<view>
|
<view>
|
||||||
<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">
|
||||||
<u-search height=42 margin="12px 0" searchIconColor="#251B1D" shape="square" :showAction="false"
|
<u-search height=42 margin="12px 0" searchIconColor="#251B1D" shape="square" :showAction="false"
|
||||||
v-model="artValue" placeholder="请输入名家名称" @search='search'></u-search>
|
v-model="artValue" placeholder="请输入名家名称" @search='search'></u-search>
|
||||||
<u-tabs :scrollable="false" @click="clickTabs" :list="list1" :activeStyle="{
|
<u-tabs :scrollable="false" @click="clickTabs" :list="list1" :activeStyle="{
|
||||||
color: '#251B1D',
|
color: '#251B1D',
|
||||||
fontWeight: 'bold',
|
fontWeight: 'bold',
|
||||||
transform: 'scale(1.05)'
|
transform: 'scale(1.05)'
|
||||||
}"
|
}" :lineColor="`url(${lineBg}) 100% 100%`" :inactiveStyle="{
|
||||||
:lineColor="`url(${lineBg}) 100% 100%`"
|
color: '#AFADB0 ',
|
||||||
:inactiveStyle="{
|
transform: 'scale(1)'
|
||||||
color: '#AFADB0 ',
|
}" itemStyle="height: 50px;">
|
||||||
transform: 'scale(1)'
|
</u-tabs>
|
||||||
}" itemStyle=" height: 50px; ">
|
<view class="artworks">
|
||||||
</u-tabs>
|
<view class="art_item" v-for="(v, i) in workList" :key="i">
|
||||||
<view class="artworks">
|
<view class="art_item_top">
|
||||||
<view class="art_item" v-for="(v, i) in workList" :key="i">
|
<image :src="v.file" mode="" @click="toDetail(v.id)"></image>
|
||||||
<view class="art_item_top">
|
<view class="like" @click="like(v.id, v.isGreat)">
|
||||||
<image :src="v.file" mode="" @click="toDetail(v.id)"></image>
|
<view :class="v.isGreat ? 'img_selected' : 'img'">
|
||||||
<view class="like" @click="like(v.id, v.isGreat)">
|
<!-- 红心 -->
|
||||||
<view :class="v.isGreat ? 'img_selected' : 'img'">
|
</view>
|
||||||
<!-- 红心 -->
|
<view class="select_num">
|
||||||
</view>
|
{{ v.likes }}
|
||||||
<view class="select_num">
|
</view>
|
||||||
{{ v.likes }}
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
<view class=" art_item_bott" @click="toDetail(v.id)">
|
||||||
</view>
|
<view class="title">
|
||||||
<view class=" art_item_bott" @click="toDetail(v.id)">
|
{{ v.name }}
|
||||||
<view class="title">
|
</view>
|
||||||
{{ v.name }}
|
<view class="sub_title">
|
||||||
</view>
|
{{ v.type }}作品
|
||||||
<view class="sub_title">
|
</view>
|
||||||
{{ v.type }}作品
|
<view class="img_box">
|
||||||
</view>
|
<view class=" puber">
|
||||||
<view class="img_box">
|
<view class="avtor">
|
||||||
<view class=" puber">
|
<image :src="v.user.images" mode=""></image>
|
||||||
<view class="avtor">
|
</view>
|
||||||
<image :src="v.user.images" mode=""></image>
|
<view class="autor">
|
||||||
</view>
|
{{ v.user.nickName }}
|
||||||
<view class="autor">
|
</view>
|
||||||
{{ v.user.nickName }}
|
</view>
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
|
|
||||||
<view class="time">
|
<view class="time">
|
||||||
{{ v.createdAt }}
|
{{ v.createdAt }}
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
load: true,
|
load: true,
|
||||||
artValue: '',
|
artValue: '',
|
||||||
type: '',
|
type: '',
|
||||||
list1: [{
|
list1: [{
|
||||||
name: '全部',
|
name: '全部',
|
||||||
value: '',
|
value: '',
|
||||||
}],
|
}],
|
||||||
workList: [],
|
workList: [],
|
||||||
pages: 1,
|
pages: 1,
|
||||||
size: 20, lineBg: '../../static/scrollLine.png',
|
size: 20,
|
||||||
};
|
lineBg: '../../static/scrollLine.png',
|
||||||
},
|
};
|
||||||
// 下拉刷新
|
},
|
||||||
onPullDownRefresh() {
|
// 下拉刷新
|
||||||
this.pages = 1
|
onPullDownRefresh() {
|
||||||
this.getData()
|
this.pages = 1
|
||||||
setTimeout(function () {
|
this.getData()
|
||||||
uni.stopPullDownRefresh();
|
setTimeout(function() {
|
||||||
}, 1000);
|
uni.stopPullDownRefresh();
|
||||||
},
|
}, 1000);
|
||||||
//上拉
|
},
|
||||||
onReachBottom() {
|
//上拉
|
||||||
this.pages++
|
onReachBottom() {
|
||||||
this.getMoreData();
|
this.pages++
|
||||||
},
|
this.getMoreData();
|
||||||
onShow() {
|
},
|
||||||
this.list1 = [{
|
onShow() {
|
||||||
name: '全部',
|
this.list1 = [{
|
||||||
type: '',
|
name: '全部',
|
||||||
}],
|
type: '',
|
||||||
this.pages = 1
|
}],
|
||||||
this.getType()
|
this.pages = 1
|
||||||
},
|
this.getType()
|
||||||
methods: {
|
},
|
||||||
//作品分类
|
methods: {
|
||||||
getType() {
|
//作品分类
|
||||||
let _this = this
|
getType() {
|
||||||
this.http.request('/works/select?code=work_type', {}, "GET").then(res => {
|
let _this = this
|
||||||
if (res.code == 200) {
|
this.http.request('/works/select?code=work_type', {}, "GET").then(res => {
|
||||||
res.data.forEach(function (item) {
|
if (res.code == 200) {
|
||||||
_this.list1.push({
|
res.data.forEach(function(item) {
|
||||||
name: item.label,
|
_this.list1.push({
|
||||||
value: item.value
|
name: item.label,
|
||||||
})
|
value: item.value
|
||||||
})
|
})
|
||||||
this.getData()
|
})
|
||||||
}
|
this.getData()
|
||||||
}).catch(e => {
|
}
|
||||||
uni.showToast({
|
}).catch(e => {
|
||||||
title: e.data.message,
|
uni.showToast({
|
||||||
icon: "none",
|
title: e.data.message,
|
||||||
});
|
icon: "none",
|
||||||
})
|
});
|
||||||
},
|
})
|
||||||
//作品列表
|
},
|
||||||
getData() {
|
//作品列表
|
||||||
let _this = this
|
getData() {
|
||||||
this.http.request('/works/list', {
|
let _this = this
|
||||||
page: this.pages,
|
this.http.request('/works/list', {
|
||||||
size: this.size,
|
page: this.pages,
|
||||||
nickName: this.artValue,
|
size: this.size,
|
||||||
workType: this.type
|
nickName: this.artValue,
|
||||||
}, "GET").then(res => {
|
workType: this.type
|
||||||
if (res.code == 200) {
|
}, "GET").then(res => {
|
||||||
_this.workList = res.data.records
|
if (res.code == 200) {
|
||||||
_this.workList.forEach(function (item) {
|
_this.workList = res.data.records
|
||||||
if (item.user.images != undefined) {
|
_this.workList.forEach(function(item) {
|
||||||
let img = JSON.parse(item.user.images)
|
if (item.user.images != undefined) {
|
||||||
item.user.images = img[0]
|
let img = JSON.parse(item.user.images)
|
||||||
}
|
item.user.images = img[0]
|
||||||
//判断作品类型
|
}
|
||||||
if (item.type != undefined) {
|
//判断作品类型
|
||||||
_this.list1.forEach(function (ele) {
|
if (item.type != undefined) {
|
||||||
if (item.type == ele.value) {
|
_this.list1.forEach(function(ele) {
|
||||||
item.type = ele.name
|
if (item.type == ele.value) {
|
||||||
}
|
item.type = ele.name
|
||||||
})
|
}
|
||||||
}
|
})
|
||||||
//判断封面图片
|
}
|
||||||
if (item.file != undefined) {
|
//判断封面图片
|
||||||
let fileArr = item.file.split(',')
|
if (item.file != undefined) {
|
||||||
let gs = fileArr[0].substr(fileArr[0].lastIndexOf(".") + 1)
|
let fileArr = item.file.split(',')
|
||||||
if (gs == 'jpg' || gs == 'jpeg' || gs == 'png') {
|
let gs = fileArr[0].substr(fileArr[0].lastIndexOf(".") + 1)
|
||||||
item.file = fileArr[0]
|
if (gs == 'jpg' || gs == 'jpeg' || gs == 'png' || gs == 'bmp' || gs == 'gif' || gs == 'tif' || gs == 'tiff') {
|
||||||
} else if (gs == 'doc' || gs == 'docx') {
|
item.file = fileArr[0]
|
||||||
item.file = '../../static/fileImg/workB'
|
} else if (gs == 'pdf') {
|
||||||
} else if (gs == 'xls' || gs == 'xlsx') {
|
item.file = '../../static/fileImg/pdfS.png'
|
||||||
item.file = '../../static/fileImg/workB'
|
}
|
||||||
} else if (gs == 'pdf') {
|
}
|
||||||
item.file = '../../static/fileImg/pdfB'
|
})
|
||||||
} else if (gs == 'txt') {
|
_this.load = false
|
||||||
item.file = '../../static/fileImg/pdfB'
|
}
|
||||||
}
|
}).catch(e => {
|
||||||
}
|
uni.showToast({
|
||||||
})
|
title: e.data.message,
|
||||||
_this.load = false
|
icon: "none",
|
||||||
}
|
});
|
||||||
}).catch(e => {
|
})
|
||||||
uni.showToast({
|
},
|
||||||
title: e.data.message,
|
//上拉
|
||||||
icon: "none",
|
getMoreData() {
|
||||||
});
|
const _this = this
|
||||||
})
|
this.http.request('/works/list', {
|
||||||
},
|
page: this.pages,
|
||||||
//上拉
|
size: this.size,
|
||||||
getMoreData() {
|
nickName: this.artValue,
|
||||||
const _this = this
|
workType: this.type
|
||||||
this.http.request('/works/list', {
|
}, "GET").then(res => {
|
||||||
page: this.pages,
|
if (res.data.records.length > 0) {
|
||||||
size: this.size,
|
res.data.records.forEach(function(item) {
|
||||||
nickName: this.artValue,
|
if (item.user.images != undefined) {
|
||||||
workType: this.type
|
let img = JSON.parse(item.user.images)
|
||||||
}, "GET").then(res => {
|
item.user.images = img[0]
|
||||||
if (res.data.records.length > 0) {
|
}
|
||||||
res.data.records.forEach(function (item) {
|
//判断作品类型
|
||||||
if (item.user.images != undefined) {
|
if (item.type != undefined) {
|
||||||
let img = JSON.parse(item.user.images)
|
_this.list1.forEach(function(ele) {
|
||||||
item.user.images = img[0]
|
if (item.type == ele.value) {
|
||||||
}
|
item.type = ele.name
|
||||||
//判断作品类型
|
}
|
||||||
if (item.type != undefined) {
|
})
|
||||||
_this.list1.forEach(function (ele) {
|
}
|
||||||
if (item.type == ele.value) {
|
//判断封面图片
|
||||||
item.type = ele.name
|
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') {
|
||||||
//判断封面图片
|
item.file = fileArr[0]
|
||||||
if (item.file != undefined) {
|
} else if (gs == 'pdf') {
|
||||||
let fileArr = item.file.split(',')
|
item.file = '../../static/fileImg/pdfS.png'
|
||||||
let gs = fileArr[0].substr(fileArr[0].lastIndexOf(".") + 1)
|
}
|
||||||
if (gs == 'jpg' || gs == 'jpeg' || gs == 'png') {
|
}
|
||||||
item.file = fileArr[0]
|
_this.workList.push(item)
|
||||||
} else if (gs == 'doc' || gs == 'docx') {
|
})
|
||||||
item.file = '../../static/fileImg/workB'
|
} else {
|
||||||
} else if (gs == 'xls' || gs == 'xlsx') {
|
this.pages--
|
||||||
item.file = '../../static/fileImg/workB'
|
}
|
||||||
} else if (gs == 'pdf') {
|
|
||||||
item.file = '../../static/fileImg/pdfB'
|
|
||||||
} else if (gs == 'txt') {
|
|
||||||
item.file = '../../static/fileImg/pdfB'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
_this.workList.push(item)
|
|
||||||
})
|
|
||||||
} else {
|
|
||||||
this.pages--
|
|
||||||
}
|
|
||||||
|
|
||||||
}).catch(e => {
|
}).catch(e => {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: e.data.message,
|
title: e.data.message,
|
||||||
icon: "none",
|
icon: "none",
|
||||||
});
|
});
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
//点赞
|
//点赞
|
||||||
like(val1, val2) {
|
like(val1, val2) {
|
||||||
if (val2) {
|
if (val2) {
|
||||||
this.http.request('/worksGreat/delGreat?type=1&workId=' + val1, "POST").then(res => {
|
this.http.request('/worksGreat/delGreat?type=1&workId=' + val1, "POST").then(res => {
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
this.pages = 1
|
this.pages = 1
|
||||||
this.getData()
|
this.getData()
|
||||||
}
|
}
|
||||||
}).catch(e => {
|
}).catch(e => {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: e.data.message,
|
title: e.data.message,
|
||||||
icon: "none",
|
icon: "none",
|
||||||
});
|
});
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
this.http.request('/worksGreat/addGreat?type=1&workId=' + val1, "POST").then(res => {
|
this.http.request('/worksGreat/addGreat?type=1&workId=' + val1, "POST").then(res => {
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
this.pages = 1
|
this.pages = 1
|
||||||
this.getData()
|
this.getData()
|
||||||
}
|
}
|
||||||
}).catch(e => {
|
}).catch(e => {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: e.data.message,
|
title: e.data.message,
|
||||||
icon: "none",
|
icon: "none",
|
||||||
});
|
});
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
//详情页
|
//详情页
|
||||||
toDetail(val) {
|
toDetail(val) {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: "/pages/ArtWorks/artWorkDetail?id=" + val
|
url: "/pages/ArtWorks/artWorkDetail?id=" + val
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
//选择类型
|
//选择类型
|
||||||
clickTabs(item) {
|
clickTabs(item) {
|
||||||
this.type = item.value
|
this.type = item.value
|
||||||
this.pages = 1
|
this.pages = 1
|
||||||
this.getData()
|
this.getData()
|
||||||
},
|
},
|
||||||
search() {
|
search() {
|
||||||
this.pages = 1
|
this.pages = 1
|
||||||
this.getData()
|
this.getData()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
/deep/ .u-tabs__wrapper__nav__line {
|
/deep/ .u-tabs__wrapper__nav__line {
|
||||||
height: 14px !important;
|
height: 14px !important;
|
||||||
width: 30px !important;
|
width: 30px !important;
|
||||||
background-color: transparent !important;
|
background-color: transparent !important;
|
||||||
bottom: 2px !important;
|
bottom: 2px !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
page {
|
page {
|
||||||
width: calc(100% - 32px);
|
width: calc(100% - 32px);
|
||||||
margin: 0 16px;
|
margin: 0 16px;
|
||||||
}
|
}
|
||||||
|
|
||||||
image {
|
image {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.art_item {
|
.art_item {
|
||||||
margin-top: 16px;
|
margin-top: 16px;
|
||||||
border: 1px solid transparent;
|
border: 1px solid transparent;
|
||||||
|
|
||||||
.art_item_top {
|
.art_item_top {
|
||||||
position: relative;
|
position: relative;
|
||||||
height: 192px;
|
height: 192px;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
|
|
||||||
.like {
|
.like {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: calc(100% - 40px);
|
top: calc(100% - 40px);
|
||||||
left: calc(100% - 70px);
|
left: calc(100% - 70px);
|
||||||
width: 59px;
|
width: 59px;
|
||||||
height: 32px;
|
height: 32px;
|
||||||
background: rgba(38, 18, 18, 0.27);
|
background: rgba(38, 18, 18, 0.27);
|
||||||
z-index: 10;
|
z-index: 10;
|
||||||
border-radius: 16px;
|
border-radius: 16px;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
|
|
||||||
.img {
|
.img {
|
||||||
width: 16px;
|
width: 16px;
|
||||||
height: 16px;
|
height: 16px;
|
||||||
background: url(../../static/spaceHeart.png) center/100% no-repeat;
|
background: url(../../static/spaceHeart.png) center/100% no-repeat;
|
||||||
float: left;
|
float: left;
|
||||||
}
|
}
|
||||||
|
|
||||||
.img_selected {
|
.img_selected {
|
||||||
width: 16px;
|
width: 16px;
|
||||||
height: 16px;
|
height: 16px;
|
||||||
background: url(../../static/redHerart.png) center/100% no-repeat;
|
background: url(../../static/redHerart.png) center/100% no-repeat;
|
||||||
float: left;
|
float: left;
|
||||||
}
|
}
|
||||||
|
|
||||||
.select_num {
|
.select_num {
|
||||||
float: left;
|
float: left;
|
||||||
margin-left: 10rpx;
|
margin-left: 10rpx;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.select_num {
|
.select_num {
|
||||||
float: left;
|
float: left;
|
||||||
margin-left: 10rpx;
|
margin-left: 10rpx;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
.art_item_bott {
|
.art_item_bott {
|
||||||
.title {
|
.title {
|
||||||
margin-top: 12px;
|
margin-top: 12px;
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
color: #251B1D;
|
color: #251B1D;
|
||||||
}
|
}
|
||||||
|
|
||||||
.sub_title {
|
.sub_title {
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
color: #AFADB0;
|
color: #AFADB0;
|
||||||
margin-top: 12px;
|
margin-top: 12px;
|
||||||
margin-bottom: 16px;
|
margin-bottom: 16px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.img_box {
|
.img_box {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|
||||||
.puber {
|
.puber {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|
||||||
.avtor {
|
.avtor {
|
||||||
border-radius: 12px;
|
border-radius: 12px;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
width: 24px;
|
width: 24px;
|
||||||
height: 24px;
|
height: 24px;
|
||||||
margin-right: 4px;
|
margin-right: 4px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.autor {
|
.autor {
|
||||||
color: #251B1D;
|
color: #251B1D;
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.time {
|
.time {
|
||||||
color: #AFADB0;
|
color: #AFADB0;
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
@ -96,6 +96,7 @@
|
||||||
id: '',
|
id: '',
|
||||||
iswx: 0,
|
iswx: 0,
|
||||||
detailData: {},
|
detailData: {},
|
||||||
|
contractUrl: 'https://www.baidu.com/'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad(op) {
|
onLoad(op) {
|
||||||
|
@ -157,30 +158,12 @@
|
||||||
let fileArr = res.data.file.split(',')
|
let fileArr = res.data.file.split(',')
|
||||||
fileArr.forEach(function(item) {
|
fileArr.forEach(function(item) {
|
||||||
let gs = item.substr(item.lastIndexOf(".") + 1)
|
let gs = item.substr(item.lastIndexOf(".") + 1)
|
||||||
if (gs == 'jpg' || gs == 'jpeg' || gs == 'png') {
|
if (gs == 'jpg' || gs == 'jpeg' || gs == 'png' || gs == 'bmp' || gs == 'gif' || gs == 'tif' || gs == 'tiff') {
|
||||||
_this.list.push(item)
|
_this.list.push(item)
|
||||||
} else if (gs == 'doc' || gs == 'docx') {
|
|
||||||
_this.list2.push({
|
|
||||||
name: res.data.name + '.doc',
|
|
||||||
img: '../../static/fileImg/workB.png',
|
|
||||||
url: item,
|
|
||||||
})
|
|
||||||
} else if (gs == 'xls' || gs == 'xlsx') {
|
|
||||||
_this.list2.push({
|
|
||||||
name: res.data.name + '.xls',
|
|
||||||
img: '../../static/fileImg/workB.png',
|
|
||||||
url: item,
|
|
||||||
})
|
|
||||||
} else if (gs == 'pdf') {
|
} else if (gs == 'pdf') {
|
||||||
_this.list2.push({
|
_this.list2.push({
|
||||||
name: res.data.name + '.pdf',
|
name: res.data.name + '.' + gs,
|
||||||
img: '../../static/fileImg/pdfB.png',
|
img: '../../static/fileImg/pdfS.png',
|
||||||
url: item,
|
|
||||||
})
|
|
||||||
} else if (gs == 'txt') {
|
|
||||||
_this.list2.push({
|
|
||||||
name: res.data.name + '.txt',
|
|
||||||
img: '../../static/fileImg/pdfB.png',
|
|
||||||
url: item,
|
url: item,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
@ -188,7 +171,6 @@
|
||||||
}
|
}
|
||||||
this.detailData = res.data
|
this.detailData = res.data
|
||||||
_this.load = false
|
_this.load = false
|
||||||
console.log(this.list2)
|
|
||||||
}
|
}
|
||||||
}).catch(e => {
|
}).catch(e => {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
|
@ -251,45 +233,29 @@
|
||||||
},
|
},
|
||||||
//点击文件
|
//点击文件
|
||||||
downLoad(val) {
|
downLoad(val) {
|
||||||
// uni.downloadFile({
|
|
||||||
// url: val, //下载地址接口返回
|
|
||||||
// success: (data) => {
|
|
||||||
// if (data.statusCode === 200) {
|
|
||||||
// //文件保存到本地
|
|
||||||
// uni.saveFile({
|
|
||||||
// tempFilePath: data.tempFilePath, //临时路径
|
|
||||||
// success: function(res) {
|
|
||||||
// uni.showToast({
|
|
||||||
// icon: 'none',
|
|
||||||
// mask: true,
|
|
||||||
// title: '文件已保存:' + res.savedFilePath, //保存路径
|
|
||||||
// duration: 3000,
|
|
||||||
// });
|
|
||||||
// setTimeout(() => {
|
|
||||||
// //打开文档查看
|
|
||||||
// uni.openDocument({
|
|
||||||
// filePath: res.savedFilePath,
|
|
||||||
// success: function(res) {
|
|
||||||
// // console.log('打开文档成功');
|
|
||||||
// }
|
|
||||||
// });
|
|
||||||
// }, 3000)
|
|
||||||
// }
|
|
||||||
// });
|
|
||||||
// }
|
|
||||||
// },
|
|
||||||
// fail: (err) => {
|
|
||||||
// console.log(err);
|
|
||||||
// uni.showToast({
|
|
||||||
// icon: 'none',
|
|
||||||
// mask: true,
|
|
||||||
// title: '失败请重新下载',
|
|
||||||
// });
|
|
||||||
// },
|
|
||||||
// });
|
|
||||||
|
|
||||||
console.log(val)
|
console.log(val)
|
||||||
|
this.openPDF()
|
||||||
|
},
|
||||||
|
openPDF() {
|
||||||
|
switch (uni.getSystemInfoSync().platform) {
|
||||||
|
case "android":
|
||||||
|
console.log("安卓");
|
||||||
|
// 这里直接调用原生的方法,我们上面定义的
|
||||||
|
this.androidOpenPdf(this.contractUrl);
|
||||||
|
break;
|
||||||
|
case "ios":
|
||||||
|
console.log("IOS");
|
||||||
|
//这里跳转web-view页面
|
||||||
|
uni.navigateTo({
|
||||||
|
url: "./webView/webView?contractUrl=" + this.contractUrl,
|
||||||
|
});
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
this.androidOpenPdf(this.contractUrl);
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -0,0 +1,17 @@
|
||||||
|
<template>
|
||||||
|
<view id="web-info">
|
||||||
|
<web-view :src="src"></web-view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
src: '',
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onLoad(option) {
|
||||||
|
this.src = option.contractUrl
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
|
@ -53,7 +53,7 @@
|
||||||
<u--textarea style="padding: 32rpx;" v-model="detailValue" placeholder="请输入作品说明" border="none">
|
<u--textarea style="padding: 32rpx;" v-model="detailValue" placeholder="请输入作品说明" border="none">
|
||||||
</u--textarea>
|
</u--textarea>
|
||||||
<view class="gap">
|
<view class="gap">
|
||||||
作品内容可上传图片/音频/word/pdf/txt等
|
作品内容可上传图片(png/jpg/jpeg/bmp/gif/tif/tiff)或pdf
|
||||||
</view>
|
</view>
|
||||||
<view class="gap" style="line-height: 30rpx;">
|
<view class="gap" style="line-height: 30rpx;">
|
||||||
(若有图片请先上传图片)
|
(若有图片请先上传图片)
|
||||||
|
@ -245,16 +245,25 @@
|
||||||
uploadFilePromise(url) {
|
uploadFilePromise(url) {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
let a = uni.uploadFile({
|
let a = uni.uploadFile({
|
||||||
url: http.config.baseUrl + '/upload/upload',
|
url: http.config.baseUrl + '/file/upload',
|
||||||
filePath: url,
|
filePath: url,
|
||||||
name: 'file',
|
name: 'file',
|
||||||
formData: {
|
formData: {
|
||||||
user: 'test'
|
user: 'test'
|
||||||
},
|
},
|
||||||
success: (res) => {
|
success: (res) => {
|
||||||
setTimeout(() => {
|
console.log(res)
|
||||||
resolve(JSON.parse(res.data).data.path)
|
if(JSON.parse(res.data).code == 200){
|
||||||
}, 1000)
|
setTimeout(() => {
|
||||||
|
resolve(JSON.parse(res.data).data.path)
|
||||||
|
}, 1000)
|
||||||
|
}else{
|
||||||
|
uni.showToast({
|
||||||
|
title: JSON.parse(res.data).message,
|
||||||
|
icon: "none",
|
||||||
|
});
|
||||||
|
this.fileList3.pop()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
})
|
})
|
||||||
|
|
|
@ -224,6 +224,22 @@
|
||||||
this.worksVo.price = this.price
|
this.worksVo.price = this.price
|
||||||
this.worksVo.wpPath = this.wpPath
|
this.worksVo.wpPath = this.wpPath
|
||||||
this.worksVo.code = this.code
|
this.worksVo.code = this.code
|
||||||
|
|
||||||
|
this.http.request('/works/isValid?strLink='+this.wpPath, "POST").then(res => {
|
||||||
|
if (res.code == 200) {
|
||||||
|
uni.redirectTo({
|
||||||
|
url: "/pages/pageHome/pageHome"
|
||||||
|
})
|
||||||
|
this.pushWork()
|
||||||
|
}
|
||||||
|
}).catch(e => {
|
||||||
|
uni.showToast({
|
||||||
|
title: e.data.message,
|
||||||
|
icon: "none",
|
||||||
|
});
|
||||||
|
})
|
||||||
|
},
|
||||||
|
pushWork() {
|
||||||
this.http.request('/works/addWork', this.worksVo, "POST").then(res => {
|
this.http.request('/works/addWork', this.worksVo, "POST").then(res => {
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
uni.redirectTo({
|
uni.redirectTo({
|
||||||
|
@ -236,10 +252,6 @@
|
||||||
icon: "none",
|
icon: "none",
|
||||||
});
|
});
|
||||||
})
|
})
|
||||||
// uni.showToast({
|
|
||||||
// title: '确认发布',
|
|
||||||
// duration: 2000
|
|
||||||
// });
|
|
||||||
},
|
},
|
||||||
sexSelect(e) {
|
sexSelect(e) {
|
||||||
this.model1.userInfo.rights = e.name
|
this.model1.userInfo.rights = e.name
|
||||||
|
|
|
@ -1,17 +1,14 @@
|
||||||
<template>
|
<template>
|
||||||
<view class="layout">
|
<view class="">
|
||||||
<u-search height=42 margin="12px 0" searchIconColor="#251B1D" shape="square" :showAction="false"
|
<view class="">
|
||||||
v-model="artValue" placeholder="请输入搜索内容"></u-search>
|
<u-loading-page :loading="load"></u-loading-page>
|
||||||
|
</view>
|
||||||
<view class="shelves">
|
<view class="layout" v-if="load == false">
|
||||||
<view class="shelves-item">
|
<view class="shelves">
|
||||||
<image src="../../static/icon12.jpg" mode="widthFix" class="shelves-img"></image>
|
<view class="shelves-item" v-for="(item,index) in enjoyList" :key="index" @click="ToEnjoy(item.id)">
|
||||||
<view class="name">作品名称</view>
|
<image :src="item.file" mode="widthFix" class="shelves-img"></image>
|
||||||
</view>
|
<view class="name">{{item.name}}</view>
|
||||||
<view class="" style="width:16px;"></view>
|
</view>
|
||||||
<view class="shelves-item">
|
|
||||||
<image src="../../static/icon12.jpg" mode="widthFix" class="shelves-img"></image>
|
|
||||||
<view class="name">作品名称</view>
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
@ -22,7 +19,8 @@
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
artValue: '',
|
load: true,
|
||||||
|
enjoyList: [],
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
onReady() {
|
onReady() {
|
||||||
|
@ -36,36 +34,69 @@
|
||||||
this.$refs.datetimePicker.setFormatter(this.formatter)
|
this.$refs.datetimePicker.setFormatter(this.formatter)
|
||||||
// #endif
|
// #endif
|
||||||
},
|
},
|
||||||
methods: {
|
onShow() {
|
||||||
|
this.getEnjoy()
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
getEnjoy(){
|
||||||
|
let _this = this
|
||||||
|
this.http.request('/indexImage/recommend', {}, "GET").then(res => {
|
||||||
|
if (res.code == 200) {
|
||||||
|
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') {
|
||||||
|
item.file = fileArr[0]
|
||||||
|
}
|
||||||
|
else if (gs == 'pdf') {
|
||||||
|
item.file = '../../static/fileImg/pdfS.png'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
this.enjoyList = res.data
|
||||||
|
this.load = false
|
||||||
|
}
|
||||||
|
}).catch(e => {
|
||||||
|
uni.showToast({
|
||||||
|
title: e.data.message,
|
||||||
|
icon: "none",
|
||||||
|
});
|
||||||
|
})
|
||||||
|
},
|
||||||
|
ToEnjoy(val){
|
||||||
|
uni.navigateTo({
|
||||||
|
url: "/pages/ArtWorks/artWorkDetail?id=" + val
|
||||||
|
})
|
||||||
|
},
|
||||||
},
|
},
|
||||||
onLoad(option){
|
|
||||||
console.log(option.id);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
.layout {
|
.layout {
|
||||||
padding: 8px 16px;
|
padding: 16rpx 32rpx;
|
||||||
|
|
||||||
.shelves {
|
.shelves {
|
||||||
display: flex;
|
width: 100%;
|
||||||
box-sizing: border-box;
|
|
||||||
|
|
||||||
.shelves-item {
|
.shelves-item {
|
||||||
width: 50%;
|
width: 311rpx;
|
||||||
margin-top: 16px;
|
margin-top: 32rpx;
|
||||||
|
margin-left: 16rpx;
|
||||||
|
margin-right: 16rpx;
|
||||||
|
float: left;
|
||||||
|
|
||||||
.shelves-img {
|
.shelves-img {
|
||||||
border-radius: 8px 8px 8px 8px;
|
border-radius: 8px 8px 8px 8px;
|
||||||
width: 100%;
|
width: 311rpx;
|
||||||
|
height: 312rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.name {
|
.name {
|
||||||
font-weight: 800;
|
font-weight: 800;
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
margin-top: 6px;
|
margin-top: 12rpx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,17 +1,14 @@
|
||||||
<template>
|
<template>
|
||||||
<view class="layout">
|
<view class="">
|
||||||
<u-search height=42 margin="12px 0" searchIconColor="#251B1D" shape="square" :showAction="false"
|
<view class="">
|
||||||
v-model="artValue" placeholder="请输入名家名称"></u-search>
|
<u-loading-page :loading="load"></u-loading-page>
|
||||||
|
</view>
|
||||||
<view class="shelves">
|
<view class="layout" v-if="load == false">
|
||||||
<view class="shelves-item">
|
<view class="shelves">
|
||||||
<image src="../../static/icon12.jpg" mode="widthFix" class="shelves-img"></image>
|
<view class="shelves-item" v-for="(item,index) in writerList" :key="index" @click="ToEnjoy(item.id)">
|
||||||
<view class="name">作品名称</view>
|
<image :src="item.images" mode="widthFix" class="shelves-img"></image>
|
||||||
</view>
|
<view class="name">{{item.userName}}</view>
|
||||||
<view class="" style="width:16px;"></view>
|
</view>
|
||||||
<view class="shelves-item">
|
|
||||||
<image src="../../static/icon12.jpg" mode="widthFix" class="shelves-img"></image>
|
|
||||||
<view class="name">作品名称</view>
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
@ -22,7 +19,8 @@
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
artValue: '',
|
load: true,
|
||||||
|
writerList: [],
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
onReady() {
|
onReady() {
|
||||||
|
@ -36,36 +34,65 @@
|
||||||
this.$refs.datetimePicker.setFormatter(this.formatter)
|
this.$refs.datetimePicker.setFormatter(this.formatter)
|
||||||
// #endif
|
// #endif
|
||||||
},
|
},
|
||||||
methods: {
|
onShow() {
|
||||||
|
this.getArtist()
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
getArtist(){
|
||||||
|
let _this = this
|
||||||
|
this.http.request('/indexImage/artists', {}, "GET").then(res => {
|
||||||
|
if (res.code == 200) {
|
||||||
|
res.data.forEach(function(item) {
|
||||||
|
if (item.images != undefined) {
|
||||||
|
let img = JSON.parse(item.images)
|
||||||
|
item.images = img[0]
|
||||||
|
}
|
||||||
|
})
|
||||||
|
this.writerList = res.data
|
||||||
|
console.log(this.writerList)
|
||||||
|
this.load = false
|
||||||
|
// this.getEnjoy()
|
||||||
|
}
|
||||||
|
}).catch(e => {
|
||||||
|
uni.showToast({
|
||||||
|
title: e.data.message,
|
||||||
|
icon: "none",
|
||||||
|
});
|
||||||
|
})
|
||||||
|
},
|
||||||
|
ToEnjoy(val){
|
||||||
|
uni.navigateTo({
|
||||||
|
url:"/pages/famousArts/famousArts?id=" + val
|
||||||
|
})
|
||||||
|
},
|
||||||
},
|
},
|
||||||
onLoad(option){
|
|
||||||
console.log(option.id);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
.layout {
|
.layout {
|
||||||
padding: 8px 16px;
|
padding: 16rpx 32rpx;
|
||||||
|
|
||||||
.shelves {
|
.shelves {
|
||||||
display: flex;
|
width: 100%;
|
||||||
box-sizing: border-box;
|
|
||||||
|
|
||||||
.shelves-item {
|
.shelves-item {
|
||||||
width: 50%;
|
width: 311rpx;
|
||||||
margin-top: 16px;
|
margin-top: 32rpx;
|
||||||
|
margin-left: 16rpx;
|
||||||
|
margin-right: 16rpx;
|
||||||
|
float: left;
|
||||||
|
|
||||||
.shelves-img {
|
.shelves-img {
|
||||||
border-radius: 8px 8px 8px 8px;
|
border-radius: 8px 8px 8px 8px;
|
||||||
width: 100%;
|
width: 311rpx;
|
||||||
|
height: 312rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.name {
|
.name {
|
||||||
font-weight: 800;
|
font-weight: 800;
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
margin-top: 6px;
|
margin-top: 12rpx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,7 +2,6 @@
|
||||||
<view class="famous_arts">
|
<view class="famous_arts">
|
||||||
<view class="ding">
|
<view class="ding">
|
||||||
<view class="top">
|
<view class="top">
|
||||||
|
|
||||||
<view class="left">
|
<view class="left">
|
||||||
<view class="avator">
|
<view class="avator">
|
||||||
<image src="../../static/MoneyIco.png"></image>
|
<image src="../../static/MoneyIco.png"></image>
|
||||||
|
@ -11,16 +10,13 @@
|
||||||
<view class="art_name">
|
<view class="art_name">
|
||||||
吕茂盛
|
吕茂盛
|
||||||
</view>
|
</view>
|
||||||
<view class="aer_Staff">
|
|
||||||
书法家
|
|
||||||
</view>
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="talk" @click="goTalk">
|
<!-- <view class="talk" @click="goTalk">
|
||||||
<image class="concat_ico" src="../../static/FamousArts/Talk.png" mode=""></image>
|
<image class="concat_ico" src="../../static/FamousArts/Talk.png" mode=""></image>
|
||||||
发起聊天
|
发起聊天
|
||||||
</view>
|
</view> -->
|
||||||
</view>
|
</view>
|
||||||
<!-- tabs -->
|
<!-- tabs -->
|
||||||
<u-tabs @click="clickTab" :scrollable="false" :list="list1"
|
<u-tabs @click="clickTab" :scrollable="false" :list="list1"
|
||||||
|
@ -38,67 +34,106 @@
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="famous_bot" v-show="id=='1'">
|
<view class="famous_bot" v-show="id=='1'">
|
||||||
<view class="famous_bot_itm" v-for="(v,i) in 5" :key="i">
|
<view class="famous_bot_itm" v-for="(v,i) in achievement" :key="i">
|
||||||
<view class="ico">
|
<view class="ico">
|
||||||
<image src="../../static/FamousArts/redStart.png"></image>
|
<image src="../../static/FamousArts/redStart.png"></image>
|
||||||
</view>
|
</view>
|
||||||
<view class="con">
|
<view class="con">
|
||||||
中国书法作家协会
|
{{v}}
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
|
||||||
<view class="famous_bot" v-show="id=='2'">
|
<view class="famous_bot" v-show="id=='2'">
|
||||||
<view class="famous_bot_itm" v-for="(v,i) in 5" :key="i">
|
<view class="famous_bot_itm" v-for="(v,i) in honor" :key="i">
|
||||||
<view class="ico" style="padding-right: 8rpx;">
|
<view class="ico" style="padding-right: 8rpx;">
|
||||||
<image style="width: 32rpx; height: 32rpx; vertical-align: bottom;"
|
<image style="width: 32rpx; height: 32rpx; vertical-align: bottom;"
|
||||||
src="../../static/FamousArts/goldCup.png"></image>
|
src="../../static/FamousArts/goldCup.png"></image>
|
||||||
</view>
|
</view>
|
||||||
<view class="con" style="line-height: 50rpx;">
|
<view class="con" style="line-height: 50rpx;">
|
||||||
省文联主办的“与党同心庆祝十八大——全党党 外知识分子书画摄影作品展”获优秀作品奖
|
{{v}}
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
<view class="famous_bot" v-show="id=='3'">
|
||||||
<view class="famous_bot" style="" v-show="id=='3'">
|
<view class="famous_bot_itm" style="display: block;" v-for="(v,i) in represe" :key="i">
|
||||||
<view class="famous_bot_itm" style="display: block;" v-for="(v,i) in 5" :key="i">
|
<view class="works" v-for="(a,b) in v.value" :key="b">
|
||||||
<view class="works">
|
<image :src="a" mode=""></image>
|
||||||
<image src="../../static/maqian.png" mode=""></image>
|
|
||||||
</view>
|
</view>
|
||||||
<view class="works_name">
|
<view class="works_name">
|
||||||
司马迁书信
|
{{v.name}}
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
id: "3",
|
load: true,
|
||||||
|
id: "1",
|
||||||
|
userId: '',
|
||||||
list1: [{
|
list1: [{
|
||||||
name: '艺术成就',
|
name: '艺术成就',
|
||||||
id: '1'
|
id: '1'
|
||||||
}, {
|
}, {
|
||||||
name: '荣誉奖项',
|
name: '荣誉奖项',
|
||||||
id: '2'
|
id: '2'
|
||||||
}, {
|
}, {
|
||||||
name: '代表作',
|
name: '代表作',
|
||||||
id: '3'
|
id: '3'
|
||||||
}],
|
}],
|
||||||
lineBg: '../../static/scrollLine.png',
|
userImg: '',
|
||||||
|
userName: '',
|
||||||
|
achievement:[],
|
||||||
|
honor:[],
|
||||||
|
represe:[],
|
||||||
|
lineBg: '../../static/scrollLine.png',
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
onLoad(option) {
|
||||||
|
this.userId = option.id
|
||||||
|
},
|
||||||
|
onShow() {
|
||||||
|
this.getArtist()
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
getArtist(){
|
||||||
|
let _this = this
|
||||||
|
this.http.request('/indexImage/artistsDetails', {id:this.userId}, "GET").then(res => {
|
||||||
|
if (res.code == 200) {
|
||||||
|
console.log(res.data)
|
||||||
|
if (res.data.images != undefined) {
|
||||||
|
let img = JSON.parse(res.data.images)
|
||||||
|
_this.userImg = img[0]
|
||||||
|
}
|
||||||
|
//成就
|
||||||
|
if (res.data.artAtt != undefined) {
|
||||||
|
let art = JSON.parse(res.data.artAtt)
|
||||||
|
_this.achievement = art
|
||||||
|
}
|
||||||
|
//荣誉
|
||||||
|
if (res.data.greats != undefined) {
|
||||||
|
let great = JSON.parse(res.data.greats)
|
||||||
|
_this.honor = great
|
||||||
|
}
|
||||||
|
//代表作
|
||||||
|
if (res.data.opus != undefined) {
|
||||||
|
let opu = JSON.parse(res.data.opus)
|
||||||
|
_this.represe = opu
|
||||||
|
}
|
||||||
|
this.load = false
|
||||||
|
}
|
||||||
|
}).catch(e => {
|
||||||
|
uni.showToast({
|
||||||
|
title: e.data.message,
|
||||||
|
icon: "none",
|
||||||
|
});
|
||||||
|
})
|
||||||
|
},
|
||||||
clickTab(itm) {
|
clickTab(itm) {
|
||||||
this.id = itm.id
|
this.id = itm.id
|
||||||
},
|
},
|
||||||
|
@ -108,9 +143,7 @@
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad(option) {
|
|
||||||
console.log(option.id);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
|
@ -1,110 +1,120 @@
|
||||||
<template>
|
<template>
|
||||||
<view class="layout">
|
<view class="">
|
||||||
<view class="status_bar" :style="{'height':statusHeight+'px'}"></view>
|
<view class="">
|
||||||
<view class="apptitle" :style="{'height':titleHeight+'px'}">
|
<u-loading-page :loading="load"></u-loading-page>
|
||||||
<image src="../../static/icon10.png" mode="" class="logo"></image>
|
|
||||||
<image src="../../static/icon11.png" mode="" class="appname"></image>
|
|
||||||
</view>
|
</view>
|
||||||
<view style="padding:12px 0;">
|
<view class="layout" v-if="load == false">
|
||||||
<u-search height=42 margin="12px 0" searchIconColor="#251B1D" shape="square" :showAction="false"
|
<view class="status_bar" :style="{'height':statusHeight+'px'}"></view>
|
||||||
v-model="artValue" placeholder="请输入搜索内容"></u-search>
|
<view class="apptitle" :style="{'height':titleHeight+'px'}">
|
||||||
</view>
|
<image src="../../static/icon10.png" mode="" class="logo"></image>
|
||||||
<u-swiper :list="list" indicator indicatorMode="line" circular></u-swiper>
|
<image src="../../static/icon11.png" mode="" class="appname"></image>
|
||||||
<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>
|
||||||
<view class="more" @click="navigateToFun('/pages/enjoy/enjoy')">
|
<!-- 搜索 -->
|
||||||
更多
|
<!-- <view style="padding:12px 0;">
|
||||||
|
<u-search height=42 margin="12px 0" searchIconColor="#251B1D" shape="square" :showAction="false"
|
||||||
|
v-model="artValue" placeholder="请输入搜索内容"></u-search>
|
||||||
|
</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>
|
||||||
</view>
|
<!-- 每日一赏 -->
|
||||||
<view class="remark">
|
<view class="group">
|
||||||
为您推荐最优秀的作品
|
<view class="groupTitle">
|
||||||
</view>
|
<view class="title">
|
||||||
<view class="scrollEle">
|
每日一赏
|
||||||
<u-scroll-list :indicator="false">
|
</view>
|
||||||
<view class="scroll-list">
|
<view class="more" @click="navigateToFun('/pages/enjoy/enjoy')">
|
||||||
<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(index)">
|
|
||||||
<image class="scroll-list__goods-item__image" :src="item.thumb"></image>
|
|
||||||
<text class="scroll-list__goods-item__text">{{ item.labelName }}</text>
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</u-scroll-list>
|
<view class="remark">
|
||||||
</view>
|
为您推荐最优秀的作品
|
||||||
</view>
|
</view>
|
||||||
<view class="group">
|
<view class="scrollEle">
|
||||||
<view class="groupTitle">
|
<u-scroll-list :indicator="false">
|
||||||
<view class="title">
|
<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>
|
||||||
<view class="more" @click="navigateToFun('/pages/famousArts/artistList')">
|
<!-- 文艺名家 -->
|
||||||
更多
|
<view class="group">
|
||||||
</view>
|
<view class="groupTitle">
|
||||||
</view>
|
<view class="title">
|
||||||
<view class="remark">
|
文艺名家
|
||||||
象山县著名艺术家
|
</view>
|
||||||
</view>
|
<view class="more" @click="navigateToFun('/pages/famousArts/artistList')">
|
||||||
<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(index)" >
|
|
||||||
<image class="scroll-list__goods-item__image" :src="item.thumb"></image>
|
|
||||||
<text class="scroll-list__goods-item__text">{{ item.labelName }}</text>
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</u-scroll-list>
|
<view class="remark">
|
||||||
</view>
|
象山县著名艺术家
|
||||||
</view>
|
</view>
|
||||||
<view class="group">
|
<view class="scrollEle">
|
||||||
<view class="groupTitle">
|
<u-scroll-list :indicator="false">
|
||||||
<view class="title">
|
<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"></image>
|
||||||
|
<text class="scroll-list__goods-item__text">{{ item.userName }}</text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</u-scroll-list>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="more" @click="navigateToFun('/pages/ArtActivities/ArtActivities')">
|
<!-- 热门活动 -->
|
||||||
更多
|
<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>
|
||||||
|
<u-gap height="5" bgColor="#ffffff"></u-gap>
|
||||||
|
<tabbar tabbarId='1'></tabbar>
|
||||||
</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="5" bgColor="#ffffff"></u-gap>
|
|
||||||
<tabbar tabbarId='1'></tabbar>
|
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
load: true,
|
||||||
artValue: '',
|
artValue: '',
|
||||||
statusHeight: 0,
|
statusHeight: 0,
|
||||||
titleHeight: 50,
|
titleHeight: 50,
|
||||||
list: [
|
list: [],
|
||||||
'https://cdn.uviewui.com/uview/swiper/swiper3.png',
|
|
||||||
'https://cdn.uviewui.com/uview/swiper/swiper2.png',
|
|
||||||
],
|
|
||||||
list2: [{
|
list2: [{
|
||||||
image: 'https://cdn.uviewui.com/uview/swiper/swiper2.png',
|
image: 'https://cdn.uviewui.com/uview/swiper/swiper2.png',
|
||||||
title: '昨夜星辰昨夜风,画楼西畔桂堂东',
|
title: '昨夜星辰昨夜风,画楼西畔桂堂东',
|
||||||
}, {
|
}, {
|
||||||
image: 'https://cdn.uviewui.com/uview/swiper/swiper1.png',
|
image: 'https://cdn.uviewui.com/uview/swiper/swiper1.png',
|
||||||
title: '身无彩凤双飞翼,心有灵犀一点通'
|
title: '身无彩凤双飞翼,心有灵犀一点通'
|
||||||
}],
|
}],
|
||||||
menus: [{
|
menus: [{
|
||||||
id: 1,
|
id: 1,
|
||||||
|
@ -147,30 +157,8 @@
|
||||||
title: '更多功能'
|
title: '更多功能'
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
enjoyList: [{
|
enjoyList: [],
|
||||||
labelName: '策马崩腾',
|
writerList: [],
|
||||||
thumb: '../../static/icon12.jpg'
|
|
||||||
}, {
|
|
||||||
labelName: '潇潇洒洒',
|
|
||||||
thumb: '../../static/icon12.jpg'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
labelName: '小燕子',
|
|
||||||
thumb: '../../static/icon12.jpg'
|
|
||||||
}
|
|
||||||
],
|
|
||||||
writerList: [{
|
|
||||||
labelName: '张三',
|
|
||||||
thumb: '../../static/icon12.jpg'
|
|
||||||
}, {
|
|
||||||
labelName: '李四',
|
|
||||||
thumb: '../../static/icon12.jpg'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
labelName: '小燕子',
|
|
||||||
thumb: '../../static/icon12.jpg'
|
|
||||||
}
|
|
||||||
],
|
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
onReady() {
|
onReady() {
|
||||||
|
@ -181,14 +169,90 @@
|
||||||
this.titleHeight = menuButtonInfo.height + (menuButtonInfo.top - systemMsg.statusBarHeight) * 2
|
this.titleHeight = menuButtonInfo.height + (menuButtonInfo.top - systemMsg.statusBarHeight) * 2
|
||||||
// #endif
|
// #endif
|
||||||
},
|
},
|
||||||
|
onShow() {
|
||||||
|
this.getSwpper()
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
//获取轮播图
|
||||||
|
getSwpper(){
|
||||||
|
let _this = this
|
||||||
|
this.http.request('/indexImage/list', {}, "GET").then(res => {
|
||||||
|
if (res.code == 200) {
|
||||||
|
res.data.forEach(function(item) {
|
||||||
|
_this.list.push(item.imagePath)
|
||||||
|
})
|
||||||
|
// this.load = false
|
||||||
|
this.getEnjoy()
|
||||||
|
}
|
||||||
|
}).catch(e => {
|
||||||
|
uni.showToast({
|
||||||
|
title: e.data.message,
|
||||||
|
icon: "none",
|
||||||
|
});
|
||||||
|
})
|
||||||
|
},
|
||||||
|
//每日一赏
|
||||||
|
getEnjoy(){
|
||||||
|
let _this = this
|
||||||
|
this.http.request('/indexImage/recommend', {}, "GET").then(res => {
|
||||||
|
if (res.code == 200) {
|
||||||
|
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') {
|
||||||
|
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{
|
||||||
|
this.enjoyList = res.data
|
||||||
|
}
|
||||||
|
this.getArtist()
|
||||||
|
}
|
||||||
|
}).catch(e => {
|
||||||
|
uni.showToast({
|
||||||
|
title: e.data.message,
|
||||||
|
icon: "none",
|
||||||
|
});
|
||||||
|
})
|
||||||
|
},
|
||||||
|
//获取文艺名家
|
||||||
|
getArtist(){
|
||||||
|
let _this = this
|
||||||
|
this.http.request('/indexImage/artists', {}, "GET").then(res => {
|
||||||
|
if (res.code == 200) {
|
||||||
|
res.data.forEach(function(item) {
|
||||||
|
if (item.images != undefined) {
|
||||||
|
let img = JSON.parse(item.images)
|
||||||
|
item.images = img[0]
|
||||||
|
}
|
||||||
|
})
|
||||||
|
if(res.data.length > 5){
|
||||||
|
this.writerList = res.data.slice(0,5)
|
||||||
|
}else{
|
||||||
|
this.writerList = res.data
|
||||||
|
}
|
||||||
|
this.load = false
|
||||||
|
// this.getEnjoy()
|
||||||
|
}
|
||||||
|
}).catch(e => {
|
||||||
|
uni.showToast({
|
||||||
|
title: e.data.message,
|
||||||
|
icon: "none",
|
||||||
|
});
|
||||||
|
})
|
||||||
|
},
|
||||||
navigateToFun(url){
|
navigateToFun(url){
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url
|
url
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
cliGridItem(name) {
|
cliGridItem(name) {
|
||||||
|
|
||||||
switch (name) {
|
switch (name) {
|
||||||
case 1:
|
case 1:
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
|
@ -232,15 +296,14 @@
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
,famouserDetaol(id){
|
,famouserDetaol(val){
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url:"/pages/famousArts/famousArts?id="+String(id)
|
url:"/pages/famousArts/famousArts?id=" + val
|
||||||
})
|
})
|
||||||
|
|
||||||
}
|
}
|
||||||
,ToEnjoy(id){
|
,ToEnjoy(val){
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url:"/pages/enjoy/enjoy?id="+String(id)
|
url: "/pages/ArtWorks/artWorkDetail?id=" + val
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
goActDeat(index){
|
goActDeat(index){
|
||||||
|
|
|
@ -1,86 +1,86 @@
|
||||||
<template>
|
<template>
|
||||||
<view>
|
<view class="">
|
||||||
<view class="status_bar" :style="{'height':statusHeight+'px'}"></view>
|
<view class="">
|
||||||
<view class="apptitle" :style="{'height':titleHeight+'px'}">
|
<u-loading-page :loading="load"></u-loading-page>
|
||||||
<text style="font-size: 32rpx;font-weight: 700;" :style="{'line-height':titleHeight+'px'}">文艺商城</text>
|
|
||||||
</view>
|
</view>
|
||||||
<view class="search_box">
|
<view v-if="load == false">
|
||||||
<u-search height=42 margin="12px 0" searchIconColor="#251B1D" shape="square" :showAction="false"
|
<view class="status_bar" :style="{'height':statusHeight+'px'}"></view>
|
||||||
v-model="artValue" placeholder="请输入名家名称"></u-search>
|
<view class="apptitle" :style="{'height':titleHeight+'px'}">
|
||||||
<view class="car_box">
|
<text style="font-size: 32rpx;font-weight: 700;" :style="{'line-height':titleHeight+'px'}">文艺商城</text>
|
||||||
<image src="../../static/shop/car.png" mode=""></image>
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
<view class="search_box">
|
||||||
|
<u-search height=42 margin="12px 0" searchIconColor="#251B1D" shape="square" :showAction="false"
|
||||||
<u-tabs :scrollable="false" :list="list1" :activeStyle="{
|
v-model="artValue" placeholder="请输入名家名称" @search='search'></u-search>
|
||||||
color: '#251B1D',
|
<view class="car_box">
|
||||||
fontWeight: 'bold',
|
<image src="../../static/shop/car.png" mode=""></image>
|
||||||
transform: 'scale(1.05)'
|
|
||||||
}"
|
|
||||||
:lineColor="`url(${lineBg}) 100% 100%`"
|
|
||||||
:inactiveStyle="{
|
|
||||||
color: '#AFADB0 ',
|
|
||||||
transform: 'scale(1)'
|
|
||||||
}" itemStyle=" height: 50px; ">
|
|
||||||
<view slot="right" class="filter_icon" style="width: 40rpx; height: 40rpx; flex-shrink: 0;"
|
|
||||||
@click="Clickfilter">
|
|
||||||
<image src="../../static/shop/filter.png" mode=""></image>
|
|
||||||
</view>
|
|
||||||
</u-tabs>
|
|
||||||
|
|
||||||
<view class="artworks">
|
|
||||||
<view class="art_item" v-for="(v,i) in isLoveList" :key="i" @click="goOrderDet(i)">
|
|
||||||
<view class="art_item_top">
|
|
||||||
<image src="../../static/shop/picture.png" mode=""></image>
|
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<u-tabs :scrollable="false" :list="list1" :activeStyle="{
|
||||||
|
color: '#251B1D',
|
||||||
|
fontWeight: 'bold',
|
||||||
|
transform: 'scale(1.05)'
|
||||||
|
}" :lineColor="`url(${lineBg}) 100% 100%`" :inactiveStyle="{
|
||||||
|
color: '#AFADB0 ',
|
||||||
|
transform: 'scale(1)'
|
||||||
|
}" itemStyle=" height: 50px; ">
|
||||||
|
<view slot="right" class="filter_icon" style="width: 40rpx; height: 40rpx; flex-shrink: 0;"
|
||||||
|
@click="Clickfilter">
|
||||||
|
<image src="../../static/shop/filter.png" mode=""></image>
|
||||||
|
</view>
|
||||||
|
</u-tabs>
|
||||||
|
|
||||||
|
<view class="artworks">
|
||||||
|
<view class="art_item" v-for="(v,i) in workList" :key="i" @click="goOrderDet(i)">
|
||||||
|
<view class="art_item_top">
|
||||||
|
<image src="../../static/shop/picture.png" mode=""></image>
|
||||||
|
|
||||||
<view class=" art_item_bott">
|
|
||||||
<view class="title">
|
|
||||||
摄影作品自由生活向美而生作品
|
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="img_box">
|
<view class=" art_item_bott">
|
||||||
<view class=" puber">
|
<view class="title">
|
||||||
|
摄影作品自由生活向美而生作品
|
||||||
|
</view>
|
||||||
|
|
||||||
<view class="txt">
|
<view class="img_box">
|
||||||
<text class="txt1">100</text> <text>积分</text>
|
<view class=" puber">
|
||||||
|
|
||||||
|
<view class="txt">
|
||||||
|
<text class="txt1">100</text> <text>积分</text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view class="time">
|
||||||
|
12人已购
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="time">
|
|
||||||
12人已购
|
|
||||||
</view>
|
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
<tabbar tabbarId='4'></tabbar>
|
||||||
</view>
|
</view>
|
||||||
<tabbar tabbarId='4'></tabbar>
|
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
load: true,
|
||||||
statusHeight: 0,
|
statusHeight: 0,
|
||||||
titleHeight: 50,
|
titleHeight: 50,
|
||||||
isLoveList: [true, false, true, false],
|
workList: [],
|
||||||
artValue: '',
|
artValue: '',
|
||||||
|
type: '',
|
||||||
list1: [{
|
list1: [{
|
||||||
name: '全部',
|
name: '全部',
|
||||||
}, {
|
value: '',
|
||||||
name: '书法',
|
}],
|
||||||
}, {
|
pages: 1,
|
||||||
name: '绘画'
|
size: 20,
|
||||||
}, {
|
lineBg: '../../static/scrollLine.png',
|
||||||
name: '雕刻'
|
|
||||||
}, {
|
|
||||||
name: '摄影'
|
|
||||||
}, {
|
|
||||||
name: '其他'
|
|
||||||
}], lineBg: '../../static/scrollLine.png',
|
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
onReady() {
|
onReady() {
|
||||||
|
@ -91,14 +91,113 @@
|
||||||
this.titleHeight = menuButtonInfo.height + (menuButtonInfo.top - systemMsg.statusBarHeight) * 2
|
this.titleHeight = menuButtonInfo.height + (menuButtonInfo.top - systemMsg.statusBarHeight) * 2
|
||||||
// #endif
|
// #endif
|
||||||
},
|
},
|
||||||
|
// 下拉刷新
|
||||||
|
onPullDownRefresh() {
|
||||||
|
this.pages = 1
|
||||||
|
this.getData()
|
||||||
|
setTimeout(function() {
|
||||||
|
uni.stopPullDownRefresh();
|
||||||
|
}, 1000);
|
||||||
|
},
|
||||||
|
//上拉
|
||||||
|
onReachBottom() {
|
||||||
|
this.pages++
|
||||||
|
this.getMoreData();
|
||||||
|
},
|
||||||
|
onShow() {
|
||||||
|
this.list1 = [{
|
||||||
|
name: '全部',
|
||||||
|
type: '',
|
||||||
|
}],
|
||||||
|
this.pages = 1
|
||||||
|
this.getType()
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
//作品分类
|
||||||
|
getType() {
|
||||||
|
let _this = this
|
||||||
|
this.http.request('/works/select?code=work_type', {}, "GET").then(res => {
|
||||||
|
if (res.code == 200) {
|
||||||
|
res.data.forEach(function(item) {
|
||||||
|
_this.list1.push({
|
||||||
|
name: item.label,
|
||||||
|
value: item.value
|
||||||
|
})
|
||||||
|
})
|
||||||
|
this.getData()
|
||||||
|
}
|
||||||
|
}).catch(e => {
|
||||||
|
uni.showToast({
|
||||||
|
title: e.data.message,
|
||||||
|
icon: "none",
|
||||||
|
});
|
||||||
|
})
|
||||||
|
},
|
||||||
|
//商品列表
|
||||||
|
getData() {
|
||||||
|
let _this = this
|
||||||
|
this.http.request('/goods/list', {
|
||||||
|
page: this.pages,
|
||||||
|
size: this.size,
|
||||||
|
name: this.artValue,
|
||||||
|
type: this.type
|
||||||
|
}, "GET").then(res => {
|
||||||
|
if (res.code == 200) {
|
||||||
|
console.log(res.data)
|
||||||
|
_this.load = false
|
||||||
|
this.workList = res.data.records
|
||||||
|
// res.data.forEach(function(item) {
|
||||||
|
// _this.list1.push({
|
||||||
|
// name: item.label,
|
||||||
|
// value: item.value
|
||||||
|
// })
|
||||||
|
// })
|
||||||
|
}
|
||||||
|
}).catch(e => {
|
||||||
|
uni.showToast({
|
||||||
|
title: e.data.message,
|
||||||
|
icon: "none",
|
||||||
|
});
|
||||||
|
})
|
||||||
|
},
|
||||||
|
//商品列表
|
||||||
|
getMoreData() {
|
||||||
|
let _this = this
|
||||||
|
this.http.request('/goods/list', {
|
||||||
|
page: this.pages,
|
||||||
|
size: this.size,
|
||||||
|
name: this.artValue,
|
||||||
|
type: this.type
|
||||||
|
}, "GET").then(res => {
|
||||||
|
if (res.code == 200) {
|
||||||
|
res.data.records.forEach(function(item) {
|
||||||
|
_this.workList.push(item)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}).catch(e => {
|
||||||
|
uni.showToast({
|
||||||
|
title: e.data.message,
|
||||||
|
icon: "none",
|
||||||
|
});
|
||||||
|
})
|
||||||
|
},
|
||||||
|
//选择类型
|
||||||
|
clickTabs(item) {
|
||||||
|
this.type = item.value
|
||||||
|
this.pages = 1
|
||||||
|
this.getData()
|
||||||
|
},
|
||||||
|
search() {
|
||||||
|
this.pages = 1
|
||||||
|
this.getData()
|
||||||
|
},
|
||||||
Clickfilter() {
|
Clickfilter() {
|
||||||
console.log("触发筛选");
|
console.log("触发筛选");
|
||||||
},
|
},
|
||||||
goOrderDet(id){
|
goOrderDet(id) {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url:`/pages/OrderDetail/OrderDetail?id=${id}`
|
url: `/pages/OrderDetail/OrderDetail?id=${id}`
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
After Width: | Height: | Size: 9.0 KiB |
After Width: | Height: | Size: 3.5 KiB |
After Width: | Height: | Size: 8.9 KiB |
After Width: | Height: | Size: 2.9 KiB |
After Width: | Height: | Size: 3.7 KiB |
After Width: | Height: | Size: 8.7 KiB |
After Width: | Height: | Size: 3.3 KiB |
After Width: | Height: | Size: 8.8 KiB |
After Width: | Height: | Size: 3.4 KiB |
Before Width: | Height: | Size: 9.4 KiB After Width: | Height: | Size: 9.4 KiB |
After Width: | Height: | Size: 3.7 KiB |
After Width: | Height: | Size: 8.7 KiB |
After Width: | Height: | Size: 75 KiB |
After Width: | Height: | Size: 6.6 KiB |
After Width: | Height: | Size: 3.3 KiB |
After Width: | Height: | Size: 75 KiB |
After Width: | Height: | Size: 8.5 KiB |
After Width: | Height: | Size: 2.9 KiB |