|
@ -126,6 +126,14 @@
|
|||
"enablePullDownRefresh": false
|
||||
}
|
||||
|
||||
}
|
||||
, {
|
||||
"path": "pages/ArtWorks/webView",
|
||||
"style": {
|
||||
"navigationBarTitleText": "文件浏览",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
|
||||
}
|
||||
// 文艺活动
|
||||
, {
|
||||
|
|
|
@ -10,9 +10,7 @@
|
|||
color: '#251B1D',
|
||||
fontWeight: 'bold',
|
||||
transform: 'scale(1.05)'
|
||||
}"
|
||||
:lineColor="`url(${lineBg}) 100% 100%`"
|
||||
:inactiveStyle="{
|
||||
}" :lineColor="`url(${lineBg}) 100% 100%`" :inactiveStyle="{
|
||||
color: '#AFADB0 ',
|
||||
transform: 'scale(1)'
|
||||
}" itemStyle="height: 50px;">
|
||||
|
@ -72,7 +70,8 @@ export default {
|
|||
}],
|
||||
workList: [],
|
||||
pages: 1,
|
||||
size: 20, lineBg: '../../static/scrollLine.png',
|
||||
size: 20,
|
||||
lineBg: '../../static/scrollLine.png',
|
||||
};
|
||||
},
|
||||
// 下拉刷新
|
||||
|
@ -145,16 +144,10 @@ export default {
|
|||
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') {
|
||||
if (gs == 'jpg' || gs == 'jpeg' || gs == 'png' || gs == 'bmp' || gs == 'gif' || gs == 'tif' || gs == 'tiff') {
|
||||
item.file = fileArr[0]
|
||||
} else if (gs == 'doc' || gs == 'docx') {
|
||||
item.file = '../../static/fileImg/workB'
|
||||
} else if (gs == 'xls' || gs == 'xlsx') {
|
||||
item.file = '../../static/fileImg/workB'
|
||||
} else if (gs == 'pdf') {
|
||||
item.file = '../../static/fileImg/pdfB'
|
||||
} else if (gs == 'txt') {
|
||||
item.file = '../../static/fileImg/pdfB'
|
||||
item.file = '../../static/fileImg/pdfS.png'
|
||||
}
|
||||
}
|
||||
})
|
||||
|
@ -194,16 +187,10 @@ export default {
|
|||
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') {
|
||||
if (gs == 'jpg' || gs == 'jpeg' || gs == 'png' || gs == 'bmp' || gs == 'gif' || gs == 'tif' || gs == 'tiff') {
|
||||
item.file = fileArr[0]
|
||||
} else if (gs == 'doc' || gs == 'docx') {
|
||||
item.file = '../../static/fileImg/workB'
|
||||
} else if (gs == 'xls' || gs == 'xlsx') {
|
||||
item.file = '../../static/fileImg/workB'
|
||||
} else if (gs == 'pdf') {
|
||||
item.file = '../../static/fileImg/pdfB'
|
||||
} else if (gs == 'txt') {
|
||||
item.file = '../../static/fileImg/pdfB'
|
||||
item.file = '../../static/fileImg/pdfS.png'
|
||||
}
|
||||
}
|
||||
_this.workList.push(item)
|
||||
|
@ -383,5 +370,4 @@ image {
|
|||
|
||||
}
|
||||
}
|
||||
|
||||
</style>
|
||||
|
|
|
@ -96,6 +96,7 @@
|
|||
id: '',
|
||||
iswx: 0,
|
||||
detailData: {},
|
||||
contractUrl: 'https://www.baidu.com/'
|
||||
}
|
||||
},
|
||||
onLoad(op) {
|
||||
|
@ -157,30 +158,12 @@
|
|||
let fileArr = res.data.file.split(',')
|
||||
fileArr.forEach(function(item) {
|
||||
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)
|
||||
} 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') {
|
||||
_this.list2.push({
|
||||
name: res.data.name + '.pdf',
|
||||
img: '../../static/fileImg/pdfB.png',
|
||||
url: item,
|
||||
})
|
||||
} else if (gs == 'txt') {
|
||||
_this.list2.push({
|
||||
name: res.data.name + '.txt',
|
||||
img: '../../static/fileImg/pdfB.png',
|
||||
name: res.data.name + '.' + gs,
|
||||
img: '../../static/fileImg/pdfS.png',
|
||||
url: item,
|
||||
})
|
||||
}
|
||||
|
@ -188,7 +171,6 @@
|
|||
}
|
||||
this.detailData = res.data
|
||||
_this.load = false
|
||||
console.log(this.list2)
|
||||
}
|
||||
}).catch(e => {
|
||||
uni.showToast({
|
||||
|
@ -251,46 +233,30 @@
|
|||
},
|
||||
//点击文件
|
||||
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)
|
||||
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>
|
||||
|
||||
|
|
|
@ -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>
|
||||
<view class="gap">
|
||||
作品内容可上传图片/音频/word/pdf/txt等
|
||||
作品内容可上传图片(png/jpg/jpeg/bmp/gif/tif/tiff)或pdf
|
||||
</view>
|
||||
<view class="gap" style="line-height: 30rpx;">
|
||||
(若有图片请先上传图片)
|
||||
|
@ -245,16 +245,25 @@
|
|||
uploadFilePromise(url) {
|
||||
return new Promise((resolve, reject) => {
|
||||
let a = uni.uploadFile({
|
||||
url: http.config.baseUrl + '/upload/upload',
|
||||
url: http.config.baseUrl + '/file/upload',
|
||||
filePath: url,
|
||||
name: 'file',
|
||||
formData: {
|
||||
user: 'test'
|
||||
},
|
||||
success: (res) => {
|
||||
console.log(res)
|
||||
if(JSON.parse(res.data).code == 200){
|
||||
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.wpPath = this.wpPath
|
||||
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 => {
|
||||
if (res.code == 200) {
|
||||
uni.redirectTo({
|
||||
|
@ -236,10 +252,6 @@
|
|||
icon: "none",
|
||||
});
|
||||
})
|
||||
// uni.showToast({
|
||||
// title: '确认发布',
|
||||
// duration: 2000
|
||||
// });
|
||||
},
|
||||
sexSelect(e) {
|
||||
this.model1.userInfo.rights = e.name
|
||||
|
|
|
@ -1,17 +1,14 @@
|
|||
<template>
|
||||
<view class="layout">
|
||||
<u-search height=42 margin="12px 0" searchIconColor="#251B1D" shape="square" :showAction="false"
|
||||
v-model="artValue" placeholder="请输入搜索内容"></u-search>
|
||||
|
||||
<view class="shelves">
|
||||
<view class="shelves-item">
|
||||
<image src="../../static/icon12.jpg" mode="widthFix" class="shelves-img"></image>
|
||||
<view class="name">作品名称</view>
|
||||
<view class="">
|
||||
<view class="">
|
||||
<u-loading-page :loading="load"></u-loading-page>
|
||||
</view>
|
||||
<view class="layout" v-if="load == false">
|
||||
<view class="shelves">
|
||||
<view class="shelves-item" v-for="(item,index) in enjoyList" :key="index" @click="ToEnjoy(item.id)">
|
||||
<image :src="item.file" mode="widthFix" class="shelves-img"></image>
|
||||
<view class="name">{{item.name}}</view>
|
||||
</view>
|
||||
<view class="" style="width:16px;"></view>
|
||||
<view class="shelves-item">
|
||||
<image src="../../static/icon12.jpg" mode="widthFix" class="shelves-img"></image>
|
||||
<view class="name">作品名称</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
@ -22,7 +19,8 @@
|
|||
export default {
|
||||
data() {
|
||||
return {
|
||||
artValue: '',
|
||||
load: true,
|
||||
enjoyList: [],
|
||||
};
|
||||
},
|
||||
onReady() {
|
||||
|
@ -36,36 +34,69 @@
|
|||
this.$refs.datetimePicker.setFormatter(this.formatter)
|
||||
// #endif
|
||||
},
|
||||
methods: {
|
||||
|
||||
onShow() {
|
||||
this.getEnjoy()
|
||||
},
|
||||
onLoad(option){
|
||||
console.log(option.id);
|
||||
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
|
||||
})
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.layout {
|
||||
padding: 8px 16px;
|
||||
padding: 16rpx 32rpx;
|
||||
|
||||
.shelves {
|
||||
display: flex;
|
||||
box-sizing: border-box;
|
||||
width: 100%;
|
||||
|
||||
.shelves-item {
|
||||
width: 50%;
|
||||
margin-top: 16px;
|
||||
width: 311rpx;
|
||||
margin-top: 32rpx;
|
||||
margin-left: 16rpx;
|
||||
margin-right: 16rpx;
|
||||
float: left;
|
||||
|
||||
.shelves-img {
|
||||
border-radius: 8px 8px 8px 8px;
|
||||
width: 100%;
|
||||
width: 311rpx;
|
||||
height: 312rpx;
|
||||
}
|
||||
|
||||
.name {
|
||||
font-weight: 800;
|
||||
font-size: 16px;
|
||||
margin-top: 6px;
|
||||
margin-top: 12rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,17 +1,14 @@
|
|||
<template>
|
||||
<view class="layout">
|
||||
<u-search height=42 margin="12px 0" searchIconColor="#251B1D" shape="square" :showAction="false"
|
||||
v-model="artValue" placeholder="请输入名家名称"></u-search>
|
||||
|
||||
<view class="shelves">
|
||||
<view class="shelves-item">
|
||||
<image src="../../static/icon12.jpg" mode="widthFix" class="shelves-img"></image>
|
||||
<view class="name">作品名称</view>
|
||||
<view class="">
|
||||
<view class="">
|
||||
<u-loading-page :loading="load"></u-loading-page>
|
||||
</view>
|
||||
<view class="layout" v-if="load == false">
|
||||
<view class="shelves">
|
||||
<view class="shelves-item" v-for="(item,index) in writerList" :key="index" @click="ToEnjoy(item.id)">
|
||||
<image :src="item.images" mode="widthFix" class="shelves-img"></image>
|
||||
<view class="name">{{item.userName}}</view>
|
||||
</view>
|
||||
<view class="" style="width:16px;"></view>
|
||||
<view class="shelves-item">
|
||||
<image src="../../static/icon12.jpg" mode="widthFix" class="shelves-img"></image>
|
||||
<view class="name">作品名称</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
@ -22,7 +19,8 @@
|
|||
export default {
|
||||
data() {
|
||||
return {
|
||||
artValue: '',
|
||||
load: true,
|
||||
writerList: [],
|
||||
};
|
||||
},
|
||||
onReady() {
|
||||
|
@ -36,36 +34,65 @@
|
|||
this.$refs.datetimePicker.setFormatter(this.formatter)
|
||||
// #endif
|
||||
},
|
||||
methods: {
|
||||
|
||||
onShow() {
|
||||
this.getArtist()
|
||||
},
|
||||
onLoad(option){
|
||||
console.log(option.id);
|
||||
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
|
||||
})
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.layout {
|
||||
padding: 8px 16px;
|
||||
padding: 16rpx 32rpx;
|
||||
|
||||
.shelves {
|
||||
display: flex;
|
||||
box-sizing: border-box;
|
||||
width: 100%;
|
||||
|
||||
.shelves-item {
|
||||
width: 50%;
|
||||
margin-top: 16px;
|
||||
width: 311rpx;
|
||||
margin-top: 32rpx;
|
||||
margin-left: 16rpx;
|
||||
margin-right: 16rpx;
|
||||
float: left;
|
||||
|
||||
.shelves-img {
|
||||
border-radius: 8px 8px 8px 8px;
|
||||
width: 100%;
|
||||
width: 311rpx;
|
||||
height: 312rpx;
|
||||
}
|
||||
|
||||
.name {
|
||||
font-weight: 800;
|
||||
font-size: 16px;
|
||||
margin-top: 6px;
|
||||
margin-top: 12rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
<view class="famous_arts">
|
||||
<view class="ding">
|
||||
<view class="top">
|
||||
|
||||
<view class="left">
|
||||
<view class="avator">
|
||||
<image src="../../static/MoneyIco.png"></image>
|
||||
|
@ -11,16 +10,13 @@
|
|||
<view class="art_name">
|
||||
吕茂盛
|
||||
</view>
|
||||
<view class="aer_Staff">
|
||||
书法家
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="talk" @click="goTalk">
|
||||
<!-- <view class="talk" @click="goTalk">
|
||||
<image class="concat_ico" src="../../static/FamousArts/Talk.png" mode=""></image>
|
||||
发起聊天
|
||||
</view>
|
||||
</view> -->
|
||||
</view>
|
||||
<!-- tabs -->
|
||||
<u-tabs @click="clickTab" :scrollable="false" :list="list1"
|
||||
|
@ -38,53 +34,48 @@
|
|||
</view>
|
||||
|
||||
<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">
|
||||
<image src="../../static/FamousArts/redStart.png"></image>
|
||||
</view>
|
||||
<view class="con">
|
||||
中国书法作家协会
|
||||
{{v}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
||||
<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;">
|
||||
<image style="width: 32rpx; height: 32rpx; vertical-align: bottom;"
|
||||
src="../../static/FamousArts/goldCup.png"></image>
|
||||
</view>
|
||||
<view class="con" style="line-height: 50rpx;">
|
||||
省文联主办的“与党同心庆祝十八大——全党党 外知识分子书画摄影作品展”获优秀作品奖
|
||||
{{v}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
||||
<view class="famous_bot" style="" v-show="id=='3'">
|
||||
<view class="famous_bot_itm" style="display: block;" v-for="(v,i) in 5" :key="i">
|
||||
<view class="works">
|
||||
<image src="../../static/maqian.png" mode=""></image>
|
||||
<view class="famous_bot" v-show="id=='3'">
|
||||
<view class="famous_bot_itm" style="display: block;" v-for="(v,i) in represe" :key="i">
|
||||
<view class="works" v-for="(a,b) in v.value" :key="b">
|
||||
<image :src="a" mode=""></image>
|
||||
</view>
|
||||
<view class="works_name">
|
||||
司马迁书信
|
||||
{{v.name}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
||||
|
||||
</view>
|
||||
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
id: "3",
|
||||
load: true,
|
||||
id: "1",
|
||||
userId: '',
|
||||
list1: [{
|
||||
name: '艺术成就',
|
||||
id: '1'
|
||||
|
@ -95,10 +86,54 @@
|
|||
name: '代表作',
|
||||
id: '3'
|
||||
}],
|
||||
userImg: '',
|
||||
userName: '',
|
||||
achievement:[],
|
||||
honor:[],
|
||||
represe:[],
|
||||
lineBg: '../../static/scrollLine.png',
|
||||
};
|
||||
},
|
||||
onLoad(option) {
|
||||
this.userId = option.id
|
||||
},
|
||||
onShow() {
|
||||
this.getArtist()
|
||||
},
|
||||
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) {
|
||||
this.id = itm.id
|
||||
},
|
||||
|
@ -108,9 +143,7 @@
|
|||
})
|
||||
}
|
||||
},
|
||||
onLoad(option) {
|
||||
console.log(option.id);
|
||||
}
|
||||
|
||||
}
|
||||
</script>
|
||||
|
||||
|
|
|
@ -1,15 +1,22 @@
|
|||
<template>
|
||||
<view class="layout">
|
||||
<view class="">
|
||||
<view class="">
|
||||
<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>
|
||||
<view style="padding:12px 0;">
|
||||
<!-- 搜索 -->
|
||||
<!-- <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>
|
||||
</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"
|
||||
|
@ -19,6 +26,7 @@
|
|||
</u-grid-item>
|
||||
</u-grid>
|
||||
</view>
|
||||
<!-- 每日一赏 -->
|
||||
<view class="group">
|
||||
<view class="groupTitle">
|
||||
<view class="title">
|
||||
|
@ -35,14 +43,15 @@
|
|||
<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(index)">
|
||||
<image class="scroll-list__goods-item__image" :src="item.thumb"></image>
|
||||
<text class="scroll-list__goods-item__text">{{ item.labelName }}</text>
|
||||
: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">
|
||||
|
@ -59,14 +68,15 @@
|
|||
<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>
|
||||
: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 class="group">
|
||||
<view class="groupTitle">
|
||||
<view class="title">
|
||||
|
@ -86,19 +96,19 @@
|
|||
<u-gap height="5" bgColor="#ffffff"></u-gap>
|
||||
<tabbar tabbarId='1'></tabbar>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
load: true,
|
||||
artValue: '',
|
||||
statusHeight: 0,
|
||||
titleHeight: 50,
|
||||
list: [
|
||||
'https://cdn.uviewui.com/uview/swiper/swiper3.png',
|
||||
'https://cdn.uviewui.com/uview/swiper/swiper2.png',
|
||||
],
|
||||
list: [],
|
||||
list2: [{
|
||||
image: 'https://cdn.uviewui.com/uview/swiper/swiper2.png',
|
||||
title: '昨夜星辰昨夜风,画楼西畔桂堂东',
|
||||
|
@ -147,30 +157,8 @@
|
|||
title: '更多功能'
|
||||
},
|
||||
],
|
||||
enjoyList: [{
|
||||
labelName: '策马崩腾',
|
||||
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'
|
||||
}
|
||||
],
|
||||
enjoyList: [],
|
||||
writerList: [],
|
||||
};
|
||||
},
|
||||
onReady() {
|
||||
|
@ -181,14 +169,90 @@
|
|||
this.titleHeight = menuButtonInfo.height + (menuButtonInfo.top - systemMsg.statusBarHeight) * 2
|
||||
// #endif
|
||||
},
|
||||
onShow() {
|
||||
this.getSwpper()
|
||||
},
|
||||
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){
|
||||
uni.navigateTo({
|
||||
url
|
||||
});
|
||||
},
|
||||
cliGridItem(name) {
|
||||
|
||||
switch (name) {
|
||||
case 1:
|
||||
uni.navigateTo({
|
||||
|
@ -232,15 +296,14 @@
|
|||
break;
|
||||
}
|
||||
}
|
||||
,famouserDetaol(id){
|
||||
,famouserDetaol(val){
|
||||
uni.navigateTo({
|
||||
url:"/pages/famousArts/famousArts?id="+String(id)
|
||||
url:"/pages/famousArts/famousArts?id=" + val
|
||||
})
|
||||
|
||||
}
|
||||
,ToEnjoy(id){
|
||||
,ToEnjoy(val){
|
||||
uni.navigateTo({
|
||||
url:"/pages/enjoy/enjoy?id="+String(id)
|
||||
url: "/pages/ArtWorks/artWorkDetail?id=" + val
|
||||
})
|
||||
},
|
||||
goActDeat(index){
|
||||
|
|
|
@ -1,12 +1,16 @@
|
|||
<template>
|
||||
<view>
|
||||
<view class="">
|
||||
<view class="">
|
||||
<u-loading-page :loading="load"></u-loading-page>
|
||||
</view>
|
||||
<view v-if="load == false">
|
||||
<view class="status_bar" :style="{'height':statusHeight+'px'}"></view>
|
||||
<view class="apptitle" :style="{'height':titleHeight+'px'}">
|
||||
<text style="font-size: 32rpx;font-weight: 700;" :style="{'line-height':titleHeight+'px'}">文艺商城</text>
|
||||
</view>
|
||||
<view class="search_box">
|
||||
<u-search height=42 margin="12px 0" searchIconColor="#251B1D" shape="square" :showAction="false"
|
||||
v-model="artValue" placeholder="请输入名家名称"></u-search>
|
||||
v-model="artValue" placeholder="请输入名家名称" @search='search'></u-search>
|
||||
<view class="car_box">
|
||||
<image src="../../static/shop/car.png" mode=""></image>
|
||||
</view>
|
||||
|
@ -16,9 +20,7 @@
|
|||
color: '#251B1D',
|
||||
fontWeight: 'bold',
|
||||
transform: 'scale(1.05)'
|
||||
}"
|
||||
:lineColor="`url(${lineBg}) 100% 100%`"
|
||||
:inactiveStyle="{
|
||||
}" :lineColor="`url(${lineBg}) 100% 100%`" :inactiveStyle="{
|
||||
color: '#AFADB0 ',
|
||||
transform: 'scale(1)'
|
||||
}" itemStyle=" height: 50px; ">
|
||||
|
@ -29,7 +31,7 @@
|
|||
</u-tabs>
|
||||
|
||||
<view class="artworks">
|
||||
<view class="art_item" v-for="(v,i) in isLoveList" :key="i" @click="goOrderDet(i)">
|
||||
<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>
|
||||
|
||||
|
@ -58,29 +60,27 @@
|
|||
</view>
|
||||
<tabbar tabbarId='4'></tabbar>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
load: true,
|
||||
statusHeight: 0,
|
||||
titleHeight: 50,
|
||||
isLoveList: [true, false, true, false],
|
||||
workList: [],
|
||||
artValue: '',
|
||||
type: '',
|
||||
list1: [{
|
||||
name: '全部',
|
||||
}, {
|
||||
name: '书法',
|
||||
}, {
|
||||
name: '绘画'
|
||||
}, {
|
||||
name: '雕刻'
|
||||
}, {
|
||||
name: '摄影'
|
||||
}, {
|
||||
name: '其他'
|
||||
}], lineBg: '../../static/scrollLine.png',
|
||||
value: '',
|
||||
}],
|
||||
pages: 1,
|
||||
size: 20,
|
||||
lineBg: '../../static/scrollLine.png',
|
||||
};
|
||||
},
|
||||
onReady() {
|
||||
|
@ -91,7 +91,106 @@
|
|||
this.titleHeight = menuButtonInfo.height + (menuButtonInfo.top - systemMsg.statusBarHeight) * 2
|
||||
// #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: {
|
||||
//作品分类
|
||||
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() {
|
||||
console.log("触发筛选");
|
||||
},
|
||||
|
|
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 |