This commit is contained in:
parent
43d5822200
commit
a25f8d4859
|
@ -77,7 +77,8 @@
|
|||
"path": "pages/shop/Shop",
|
||||
"style": {
|
||||
"navigationBarTitleText": "",
|
||||
"enablePullDownRefresh": false
|
||||
"enablePullDownRefresh": false,
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -273,7 +273,6 @@ export default {
|
|||
width: 30px !important;
|
||||
background-color: transparent !important;
|
||||
bottom: 2px !important;
|
||||
margin-left: -5px;
|
||||
}
|
||||
|
||||
page {
|
||||
|
|
|
@ -4,17 +4,21 @@
|
|||
<u-loading-page :loading="load"></u-loading-page>
|
||||
</view>
|
||||
<view class="workDetail" v-if="load == false">
|
||||
<u-swiper :list="list" :autoplay="true" @change="e => currentNum = e.current" indicatorStyle="right: 20px">
|
||||
<!-- 轮播图 -->
|
||||
<u-swiper v-if="list.length > 0" :list="list" :autoplay="true" @change="e => currentNum = e.current" indicatorStyle="right: 20px">
|
||||
<view slot="indicator" class="indicator-num">
|
||||
<text class="indicator-num__text">{{ currentNum + 1 }}/{{ list.length }}</text>
|
||||
</view>
|
||||
</u-swiper>
|
||||
<!-- 作品名称 -->
|
||||
<view class="work_name">
|
||||
{{detailData.name}}
|
||||
</view>
|
||||
<!-- 作品描述 -->
|
||||
<view class="work_desc">
|
||||
{{detailData.introduce}}
|
||||
</view>
|
||||
<!-- 作品上传时间、浏览量、类型 -->
|
||||
<view class="work_det">
|
||||
<view class="det_box">
|
||||
<view class="box_left">
|
||||
|
@ -41,10 +45,23 @@
|
|||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 附带文件 -->
|
||||
<view class="file_box" v-for="(item,index) in list2" :key="index" @click="downLoad(item.url)">
|
||||
<view class="file_box_left">
|
||||
<image :src="item.img" class="file_box_left_img"></image>
|
||||
</view>
|
||||
<view class="file_box_right">
|
||||
<view class="file_box_name">
|
||||
{{item.name}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 底部点赞收藏 -->
|
||||
<view class="detailBottom">
|
||||
<view class="bottom_box">
|
||||
<view class="bottom_box_left" @click="clickHeart()">
|
||||
<image src="../../static/workDetail/heart2.png" class="bot_img" v-if="detailData.isGreat"></image>
|
||||
<image src="../../static/workDetail/heart2.png" class="bot_img" v-if="detailData.isGreat">
|
||||
</image>
|
||||
<image src="../../static/workDetail/heart1.png" class="bot_img" v-else></image>
|
||||
</view>
|
||||
<view class="bottom_box_right" @click="clickHeart()">
|
||||
|
@ -60,14 +77,6 @@
|
|||
{{detailData.collections}}
|
||||
</view>
|
||||
</view>
|
||||
<!-- <view class="bottom_box">
|
||||
<view class="bottom_box_left">
|
||||
<image src="../../static/workDetail/share.png" class="bot_img"></image>
|
||||
</view>
|
||||
<view class="bottom_box_right">
|
||||
分享
|
||||
</view>
|
||||
</view> -->
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
@ -100,7 +109,7 @@
|
|||
// #ifdef MP-WEIXIN
|
||||
this.iswx = 0
|
||||
// #endif
|
||||
|
||||
|
||||
// #ifndef MP-WEIXIN
|
||||
//除了小程序
|
||||
this.iswx = 1
|
||||
|
@ -150,29 +159,28 @@
|
|||
let gs = item.substr(item.lastIndexOf(".") + 1)
|
||||
if (gs == 'jpg' || gs == 'jpeg' || gs == 'png') {
|
||||
_this.list.push(item)
|
||||
}
|
||||
else if (gs == 'doc' || gs == 'docx') {
|
||||
} else if (gs == 'doc' || gs == 'docx') {
|
||||
_this.list2.push({
|
||||
name: res.data.name + '.doc',
|
||||
img: '../../static/fileImg/workB',
|
||||
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',
|
||||
img: '../../static/fileImg/workB.png',
|
||||
url: item,
|
||||
})
|
||||
} else if (gs == 'pdf') {
|
||||
_this.list2.push({
|
||||
name: res.data.name + '.pdf',
|
||||
img: '../../static/fileImg/pdfB',
|
||||
img: '../../static/fileImg/pdfB.png',
|
||||
url: item,
|
||||
})
|
||||
} else if (gs == 'txt') {
|
||||
_this.list2.push({
|
||||
name: res.data.name + '.txt',
|
||||
img: '../../static/fileImg/pdfB',
|
||||
img: '../../static/fileImg/pdfB.png',
|
||||
url: item,
|
||||
})
|
||||
}
|
||||
|
@ -180,6 +188,7 @@
|
|||
}
|
||||
this.detailData = res.data
|
||||
_this.load = false
|
||||
console.log(this.list2)
|
||||
}
|
||||
}).catch(e => {
|
||||
uni.showToast({
|
||||
|
@ -188,6 +197,7 @@
|
|||
});
|
||||
})
|
||||
},
|
||||
//点赞、取消点赞
|
||||
clickHeart() {
|
||||
if (this.detailData.isGreat) {
|
||||
this.http.request('/worksGreat/delGreat?type=1&workId=' + this.detailData.id, "POST").then(res => {
|
||||
|
@ -200,7 +210,7 @@
|
|||
icon: "none",
|
||||
});
|
||||
})
|
||||
} else{
|
||||
} else {
|
||||
this.http.request('/worksGreat/addGreat?type=1&workId=' + this.detailData.id, "POST").then(res => {
|
||||
if (res.code == 200) {
|
||||
this.getData()
|
||||
|
@ -213,6 +223,7 @@
|
|||
})
|
||||
}
|
||||
},
|
||||
//收藏、取消收藏
|
||||
clickStar() {
|
||||
if (this.detailData.isColl) {
|
||||
this.http.request('/worksCollection/delCollection?workId=' + this.detailData.id, "POST").then(res => {
|
||||
|
@ -237,6 +248,47 @@
|
|||
});
|
||||
})
|
||||
}
|
||||
},
|
||||
//点击文件
|
||||
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)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -314,6 +366,44 @@
|
|||
}
|
||||
}
|
||||
|
||||
.file_box {
|
||||
width: 92%;
|
||||
height: 64px;
|
||||
margin: 10px 4%;
|
||||
font-family: PingFangSC-Semibold, PingFang SC;
|
||||
font-weight: 600;
|
||||
color: #251B1D;
|
||||
background: #F4F5F7;
|
||||
border-radius: 6px;
|
||||
overflow: hidden;
|
||||
|
||||
.file_box_left {
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
margin-top: 12px;
|
||||
margin-left: 12px;
|
||||
float: left;
|
||||
|
||||
.file_box_left_img {
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
}
|
||||
}
|
||||
|
||||
.file_box_right {
|
||||
margin-left: 20px;
|
||||
float: left;
|
||||
|
||||
.file_box_name {
|
||||
height: 64px;
|
||||
line-height: 64px;
|
||||
font-size: 16px;
|
||||
font-weight: 600;
|
||||
color: #251B1D;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.detailBottom {
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
<u-icon slot="suffix" name="arrow-right" style="margin-right: 10px;"></u-icon>
|
||||
</u--input>
|
||||
</view>
|
||||
<u-popup :show="showType" @close="close" @open="open" closeOnClickOverlay :round="5"
|
||||
<u-popup :show="showType" @close="close" closeOnClickOverlay :round="5"
|
||||
customStyle="padding: 16px;">
|
||||
<u-radio-group @change="selectForm1" v-model="radiovalue1" :borderBottom="true" placement="column"
|
||||
iconPlacement="right">
|
||||
|
@ -37,7 +37,7 @@
|
|||
<u-icon slot="suffix" name="arrow-right" style="margin-right: 10px;"></u-icon>
|
||||
</u--input>
|
||||
</view>
|
||||
<u-popup :show="showTab" @close="close" @open="open" closeOnClickOverlay :round="5"
|
||||
<u-popup :show="showTab" @close="close" closeOnClickOverlay :round="5"
|
||||
customStyle="padding: 16px;">
|
||||
<u-checkbox-group @change="selectForm2" v-model="radiovalue2" :borderBottom="true" placement="column"
|
||||
iconPlacement="right">
|
||||
|
|
|
@ -56,7 +56,7 @@
|
|||
style="margin-left: 16rpx;"></text>
|
||||
</view>
|
||||
|
||||
<u-popup :show="showBuy" @close="close" @open="open" closeOnClickOverlay :round="5"
|
||||
<u-popup :show="showBuy" @close="close" closeOnClickOverlay :round="5"
|
||||
customStyle="padding: 16px;">
|
||||
<u-radio-group @change="selectFormB" v-model="radiovalue1" :borderBottom="true" placement="column"
|
||||
iconPlacement="right">
|
||||
|
@ -68,7 +68,7 @@
|
|||
</u-radio-group>
|
||||
</u-popup>
|
||||
|
||||
<u-popup :show="showSex" @close="close" @open="open" closeOnClickOverlay :round="5"
|
||||
<u-popup :show="showSex" @close="close" closeOnClickOverlay :round="5"
|
||||
customStyle="padding: 16px;">
|
||||
<u-radio-group @change="selectForm" v-model="radiovalue7" :borderBottom="true" placement="column"
|
||||
iconPlacement="right">
|
||||
|
@ -224,7 +224,6 @@
|
|||
this.worksVo.price = this.price
|
||||
this.worksVo.wpPath = this.wpPath
|
||||
this.worksVo.code = this.code
|
||||
console.log(this.worksVo)
|
||||
this.http.request('/works/addWork', this.worksVo, "POST").then(res => {
|
||||
if (res.code == 200) {
|
||||
uni.redirectTo({
|
||||
|
|
|
@ -1,5 +1,9 @@
|
|||
<template>
|
||||
<view>
|
||||
<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>
|
||||
|
@ -24,9 +28,6 @@
|
|||
</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">
|
||||
|
@ -54,15 +55,6 @@
|
|||
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</view>
|
||||
<tabbar tabbarId='4'></tabbar>
|
||||
</view>
|
||||
|
@ -72,6 +64,8 @@
|
|||
export default {
|
||||
data() {
|
||||
return {
|
||||
statusHeight: 0,
|
||||
titleHeight: 50,
|
||||
isLoveList: [true, false, true, false],
|
||||
artValue: '',
|
||||
list1: [{
|
||||
|
@ -89,6 +83,14 @@
|
|||
}], lineBg: '../../static/scrollLine.png',
|
||||
};
|
||||
},
|
||||
onReady() {
|
||||
const systemMsg = uni.getSystemInfoSync();
|
||||
this.statusHeight = systemMsg.statusBarHeight
|
||||
// #ifdef MP-WEIXIN
|
||||
const menuButtonInfo = uni.getMenuButtonBoundingClientRect() //胶囊
|
||||
this.titleHeight = menuButtonInfo.height + (menuButtonInfo.top - systemMsg.statusBarHeight) * 2
|
||||
// #endif
|
||||
},
|
||||
methods: {
|
||||
Clickfilter() {
|
||||
console.log("触发筛选");
|
||||
|
|
Loading…
Reference in New Issue