diff --git a/src/pages.json b/src/pages.json index 6532cb3..fdae5b0 100644 --- a/src/pages.json +++ b/src/pages.json @@ -77,7 +77,8 @@ "path": "pages/shop/Shop", "style": { "navigationBarTitleText": "", - "enablePullDownRefresh": false + "enablePullDownRefresh": false, + "navigationStyle": "custom" } } diff --git a/src/pages/ArtWorks/ArtWorks.vue b/src/pages/ArtWorks/ArtWorks.vue index 1f50e66..77cd736 100644 --- a/src/pages/ArtWorks/ArtWorks.vue +++ b/src/pages/ArtWorks/ArtWorks.vue @@ -273,7 +273,6 @@ export default { width: 30px !important; background-color: transparent !important; bottom: 2px !important; - margin-left: -5px; } page { diff --git a/src/pages/ArtWorks/artWorkDetail.vue b/src/pages/ArtWorks/artWorkDetail.vue index 6212237..eed8288 100644 --- a/src/pages/ArtWorks/artWorkDetail.vue +++ b/src/pages/ArtWorks/artWorkDetail.vue @@ -4,17 +4,21 @@ - + + {{ currentNum + 1 }}/{{ list.length }} + {{detailData.name}} + {{detailData.introduce}} + @@ -41,10 +45,23 @@ + + + + + + + + {{item.name}} + + + + - + + @@ -60,14 +77,6 @@ {{detailData.collections}} - @@ -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%; diff --git a/src/pages/PublishWorks/PublishWorks.vue b/src/pages/PublishWorks/PublishWorks.vue index d06c2f6..bc20f12 100644 --- a/src/pages/PublishWorks/PublishWorks.vue +++ b/src/pages/PublishWorks/PublishWorks.vue @@ -17,7 +17,7 @@ - @@ -37,7 +37,7 @@ - diff --git a/src/pages/PublishWorks/PublishWorksNext.vue b/src/pages/PublishWorks/PublishWorksNext.vue index 9aa95b6..00b4386 100644 --- a/src/pages/PublishWorks/PublishWorksNext.vue +++ b/src/pages/PublishWorks/PublishWorksNext.vue @@ -56,7 +56,7 @@ style="margin-left: 16rpx;"> - @@ -68,7 +68,7 @@ - @@ -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({ diff --git a/src/pages/shop/Shop.vue b/src/pages/shop/Shop.vue index dd51faa..a9fb2bb 100644 --- a/src/pages/shop/Shop.vue +++ b/src/pages/shop/Shop.vue @@ -1,5 +1,9 @@