|
|
|
@ -3,7 +3,6 @@ |
|
|
|
<uni-search-bar class="uni-mt-10" placeholder="请输入喜欢的艺术家代号吧~" clearButton="auto" cancelButton="none" |
|
|
|
@confirm="search" /> |
|
|
|
<view class="choiceness-list"> |
|
|
|
<view class="imgList1"> |
|
|
|
<!-- <view class="first-box" :style="'width:'+imgWidth" > |
|
|
|
热门作品 |
|
|
|
</view> --> |
|
|
|
@ -15,12 +14,12 @@ |
|
|
|
mode=""></image> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</template> |
|
|
|
|
|
|
|
<script> |
|
|
|
import { |
|
|
|
imgLists |
|
|
|
imgLists, |
|
|
|
creatorImgsDetails |
|
|
|
} from '@/api/index.js' |
|
|
|
export default { |
|
|
|
data() { |
|
|
|
@ -43,7 +42,7 @@ |
|
|
|
}) |
|
|
|
}, |
|
|
|
// 下拉刷新 |
|
|
|
onPullDownRefresh(){ |
|
|
|
onPullDownRefresh() { |
|
|
|
console.log(1111) |
|
|
|
this.pageNum = 1 |
|
|
|
this.imgList = [] |
|
|
|
@ -59,6 +58,50 @@ |
|
|
|
} |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
// 搜索 |
|
|
|
search(res) { |
|
|
|
if (res.value) { |
|
|
|
console.log('search', res.value) |
|
|
|
this.goCreatorDetail(res.value) |
|
|
|
} else { |
|
|
|
uni.showToast({ |
|
|
|
title: '请输入艺术家代号', |
|
|
|
icon: 'none', |
|
|
|
}) |
|
|
|
} |
|
|
|
}, |
|
|
|
// 前往艺术家空间 |
|
|
|
async goCreatorDetail(scanCode) { |
|
|
|
if (scanCode) { |
|
|
|
const res = await creatorImgsDetails({ |
|
|
|
scanCode |
|
|
|
}) |
|
|
|
console.log('creatorImgsDetails', res) |
|
|
|
if (res.data.code === 200) { |
|
|
|
uni.setStorage({ |
|
|
|
key: 'creatorDetail', |
|
|
|
data: res.data.data, |
|
|
|
success() { |
|
|
|
uni.navigateTo({ |
|
|
|
url: '../creator/creatorDetail' |
|
|
|
}) |
|
|
|
} |
|
|
|
}) |
|
|
|
|
|
|
|
} else { |
|
|
|
uni.showToast({ |
|
|
|
title: res.data.msg, |
|
|
|
icon: 'none' |
|
|
|
}) |
|
|
|
} |
|
|
|
|
|
|
|
} else { |
|
|
|
uni.showToast({ |
|
|
|
title: '搜索码不能为空', |
|
|
|
icon: 'none' |
|
|
|
}) |
|
|
|
} |
|
|
|
}, |
|
|
|
// 图片列表 |
|
|
|
async getImgList() { |
|
|
|
const res = await imgLists({ |
|
|
|
@ -85,7 +128,7 @@ |
|
|
|
data: item.id, |
|
|
|
success() { |
|
|
|
console.log(111111) |
|
|
|
uni.redirectTo({ |
|
|
|
uni.navigateTo({ |
|
|
|
url: '../creator/imgDetail' |
|
|
|
}) |
|
|
|
} |
|
|
|
@ -112,7 +155,6 @@ |
|
|
|
|
|
|
|
<style lang="less"> |
|
|
|
.choiceness { |
|
|
|
padding-right: 40rpx; |
|
|
|
padding-top: 40rpx; |
|
|
|
|
|
|
|
.uni-searchbar { |
|
|
|
@ -120,6 +162,7 @@ |
|
|
|
border-radius: 16rpx; |
|
|
|
padding: 0; |
|
|
|
margin-left: 40rpx; |
|
|
|
margin-right: 40rpx; |
|
|
|
|
|
|
|
.uni-searchbar__box { |
|
|
|
padding: 0; |
|
|
|
@ -129,12 +172,13 @@ |
|
|
|
|
|
|
|
.choiceness-list { |
|
|
|
display: flex; |
|
|
|
|
|
|
|
flex-wrap: wrap; |
|
|
|
justify-content: space-around; |
|
|
|
.first-box { |
|
|
|
border-radius: 16rpx; |
|
|
|
font-size: 16px; |
|
|
|
margin-top: 40rpx; |
|
|
|
margin-left: 40rpx; |
|
|
|
margin-left: 30rpx; |
|
|
|
color: #fff; |
|
|
|
line-height: 60rpx; |
|
|
|
text-align: center; |
|
|
|
@ -146,7 +190,6 @@ |
|
|
|
|
|
|
|
image { |
|
|
|
margin-top: 40rpx; |
|
|
|
margin-left: 40rpx; |
|
|
|
border-radius: 16rpx; |
|
|
|
} |
|
|
|
} |
|
|
|
|