This commit is contained in:
jiangnan 2023-08-03 15:23:51 +08:00
commit 2538c12d4c
6 changed files with 479 additions and 159 deletions

View File

@ -219,6 +219,13 @@
"enablePullDownRefresh": false
}
},
{
"path": "ArtRace/raceWork",
"style": {
"enablePullDownRefresh": false,
"navigationStyle": "custom"
}
},
{
"path": "ConfirmOrder/ConfirmOrder",
"style": {

View File

@ -237,8 +237,13 @@
if (res.code == 200) {
uni.removeStorageSync('isAdmin');
uni.removeStorageSync('userType');
uni.removeStorageSync('isExpert');
uni.removeStorageSync('isVillageAdmin');
uni.removeStorageSync('isExpert');
uni.setStorageSync('isAdmin', res.data.isAdmin)
uni.setStorageSync('userType', res.data.userType)
uni.setStorageSync('isExpert', res.data.isExpert)
uni.setStorageSync('isVillageAdmin', res.data.isVillageAdmin)
this.getSwpper()
}
}).catch(e => {

View File

@ -44,7 +44,7 @@
<view class="item_li">
<view class="standard">
<image class="icon" src="../../static/detailIcon/icon6.png" mode="scaleToFill"></image>
<text> 接单人数:</text>
<text> 参赛人数:</text>
</view>
<view class="content"><text style=" color: #99241B;"> {{data.enrollment}}</text>/{{data.maxNum}}
</view>
@ -88,19 +88,23 @@
<image class="icon" src="../../static/detailIcon/icon0.png" mode="scaleToFill"></image>
<text>参赛作品展示</text>
</view>
<view class="worksPart">
<view class="workItems" v-if="workList.length > 0" v-for="(v,i) in workList" :key="i">
<view class="worksPart" v-if="workList.length > 0">
<view class="workItems" v-for="(v,i) in workList" :key="i" @click="goWorkDetail(v.id)">
<view class="sort" v-if="data.status != 0">
NO.<text>{{ i+1 }}</text>
</view>
<view class="workImg">
<image :src="v.img" style="width: 100%; height: 100%;"></image>
<image :src="v.file" style="width: 100%; height: 100%;"></image>
</view>
<view class="workText">
{{v.name}}
</view>
</view>
<view v-else>
<u-empty mode="data" icon="http://cdn.uviewui.com/uview/empty/data.png" >
</u-empty>
</view>
</view>
<view v-else>
<u-empty mode="data" icon="http://cdn.uviewui.com/uview/empty/data.png">
</u-empty>
</view>
</view>
</view>
@ -122,7 +126,35 @@
workList: []
};
},
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
this.topHeight = this.statusHeight + this.titleHeight
// #endif
// #ifndef MP-WEIXIN
//
this.topHeight = this.statusHeight + this.titleHeight
// #endif
},
onLoad(opt) {
this.id = opt.id
},
onShow() {
this.workList = []
this.load = true
this.getDate()
},
methods: {
goWorkDetail(id) {
uni.navigateTo({
url: "/pagesB/ArtRace/raceWork?id=" + String(id),
})
},
back() {
uni.navigateBack()
},
@ -132,19 +164,25 @@
})
},
getDate() {
let that = this
let par = {
id: this.id,
}
this.http.request('/competition/details', par, "GET").then(res => {
if (res.code == 200) {
if(res.data.file){
if (res.data.file) {
this.list = res.data.file.split(',')
}
// if(res.data.list || res.data.list.lenght > 0){
// }
if(res.data.list && res.data.list.length > 0){
res.data.list.forEach(function(item) {
if (item.file) {
let fileArr = item.file.split(',')
item.file = fileArr[0]
}
that.workList.push(item)
})
}
this.data = res.data
this.workList = res.data.list
this.load = false
}
}).catch(e => {
@ -155,41 +193,20 @@
})
}
},
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
this.topHeight = this.statusHeight + this.titleHeight
// #endif
// #ifndef MP-WEIXIN
//
this.topHeight = this.statusHeight + this.titleHeight
// #endif
},
onLoad(opt) {
this.id = opt.id
},
onShow() {
this.load = true
this.getDate()
},
}
</script>
<style lang="scss">
.art_race_itm {
overflow: hidden;
.return {
position: fixed;
left: 24rpx;
top: 110rpx;
z-index: 10;
image {
width: 48rpx;
height: 48rpx;
@ -329,36 +346,39 @@
.content {}
}
.worksPart{
.worksPart {
padding: 32rpx;
display: flex;
flex-wrap: wrap;
justify-content: space-between;
.workItems{
.workItems {
width: 320rpx;
height: 240rpx;
margin-bottom: 24rpx;
.workImg{
.workImg {
width: 320rpx;
height: 200rpx;
}
.workText{
.workText {
width: 320rpx;
height: 40rpx;
}
}
}
}
}
.orderBtn {
width: 100%;
background-color: #FFF;
padding-bottom: 20rpx;
.btn {
width: calc(100% - 64rpx);
height: 96rpx;
@ -371,6 +391,7 @@
color: #FFFFFF;
margin: 0 auto;
}
.btnQ {
width: calc(100% - 64rpx);
height: 96rpx;
@ -386,5 +407,4 @@
}
}
</style>

View File

@ -12,11 +12,11 @@
</view>
<view class="form_box">
<view class="form_left">
具体内容
作品简介
</view>
</view>
<view class="text_box">
<u--textarea v-model="text2" placeholder="请输入具体内容" maxlength="-1"></u--textarea>
<u--textarea v-model="text2" placeholder="请输入作品简介" maxlength="-1"></u--textarea>
</view>
<view class="gap">
附件上传

View File

@ -0,0 +1,398 @@
<template>
<view>
<view class="">
<u-loading-page :loading="load"></u-loading-page>
</view>
<view class="art_race_itm" v-if="!load">
<view class="return" @click="back">
<image src="../../static/orderLeftArrow.png" mode="scaleToFill"></image>
</view>
<view class="pageImg">
<u-swiper v-if="list.length > 0" :list="list" :autoplay="true" @change="e => currentNum = e.current"
indicatorStyle="right: 20px" height='440rpx'>
<view slot="indicator" class="indicator-num">
<text class="indicator-num__text">{{ currentNum + 1 }}/{{ list.length }}</text>
</view>
</u-swiper>
</view>
<view class="main">
<view class="mainTitle">{{data.name}}</view>
<view class="textList">
<view class="type">
<img class='textImg' src="../../static/detailIcon/icon10.png" alt="">
<view class="text1">作品简介</view>
</view>
<view class="text2">
{{data.introduce}}
</view>
</view>
<view class="textList" v-if="isExpert">
<view class="type">
<img class='textImg' src="../../static/detailIcon/icon10.png" alt="">
<view class="text1">您的评分<text class="redText">{{ data.score }}</text></view>
</view>
</view>
</view>
<view class="line"></view>
<!-- 红色按钮 -->
<view>
<view class="" v-if="isExpert">
<view class="orderBtn" v-if="data.isScore">
<view class="btnQ">已评分</view>
</view>
<view class="orderBtn" v-else>
<view class="btn" @click="toScore">评分</view>
</view>
</view>
<view class="" v-else>
<view class="orderBtn">
<view class="btnQ">您无法评分</view>
</view>
</view>
</view>
<!-- 红色按钮ed -->
<!-- 打分弹窗 -->
<u-popup :show="showB" mode="center" :round="10" @close="close" :safeAreaInsetBottom="false">
<view style="width: 640rpx;">
<view style="padding: 32rpx;">
<view style="font-size: 36rpx; font-weight: 800;">
请打分
</view>
</view>
<view style="margin: 0 32rpx 32rpx;">
<u--input type="number" placeholder="请输入分数" border="surround" v-model="value"></u--input>
</view>
<view
style="display: flex; border-top:2rpx solid #E7E7E7;height: 112rpx;width: 640rpx;line-height: 112rpx; font-size: 32rpx;font-weight: 600;">
<view style="width: 319rpx; border-right:1rpx solid #E7E7E7; text-align: center;"
@click="close">
取消
</view>
<view
style="width: 319rpx; border-right:1rpx solid #E7E7E7; text-align: center; color: #3F84FD;"
@click="sure">
确定
</view>
</view>
</view>
</u-popup>
</view>
</view>
</template>
<script>
export default {
data() {
return {
id: '',
load: true,
statusHeight: 0,
titleHeight: 50,
currentNum: 0,
list: [],
data: {},
workList: [],
isExpert: true,
showB: false,
value: 0,
};
},
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
this.topHeight = this.statusHeight + this.titleHeight
// #endif
// #ifndef MP-WEIXIN
//
this.topHeight = this.statusHeight + this.titleHeight
// #endif
},
onLoad(opt) {
this.id = opt.id
},
onShow() {
this.isExpert = uni.getStorageSync('isExpert');
this.load = true
this.getDate()
},
methods: {
back() {
uni.navigateBack()
},
getDate() {
let that = this
let par = {
id: this.id,
}
this.http.request('/competitionUser/details', par, "GET").then(res => {
if (res.code == 200) {
if (res.data.file) {
this.list = res.data.file.split(',')
}
if (res.data.list && res.data.list.length > 0) {
res.data.list.forEach(function(item) {
if (item.file) {
let fileArr = item.file.split(',')
item.file = fileArr[0]
}
that.workList.push(item)
})
}
this.data = res.data
this.load = false
}
}).catch(e => {
uni.showToast({
title: e.data.message,
icon: "none",
});
})
},
close() {
this.showB = false
this.value = ''
},
toScore() {
this.showB = true
},
sure() {
this.http.request('/competitionUser/score?id=' + this.id + '&sorce=' + this.value, "POST").then(res => {
if (res.code == 200) {
this.showB = false
this.value = ''
this.load = true
this.getDate()
}
}).catch(e => {
uni.showToast({
title: e.data.message,
icon: "none",
});
})
}
},
}
</script>
<style lang="scss">
.art_race_itm {
overflow: hidden;
.return {
position: fixed;
left: 24rpx;
top: 110rpx;
z-index: 10;
image {
width: 48rpx;
height: 48rpx;
}
}
.pageImg {
height: 440rpx;
}
.main {
padding: 32rpx;
.mainTitle {
font-size: 36rpx;
font-weight: 600;
color: #251B1D;
margin-bottom: 28rpx;
}
.textList {
margin-bottom: 24rpx;
.type {
display: flex;
height: 48rpx;
line-height: 48rpx;
.textImg {
width: 32rpx;
height: 32rpx;
margin-top: 10rpx;
margin-right: 16rpx;
}
.text1 {
font-size: 32rpx;
font-weight: 600;
color: #32333C;
.redText {
color: #99241B;
font-size: 36rpx;
}
}
}
.text2 {
font-size: 28rpx;
color: #32333C;
line-height: 48rpx;
}
}
.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;
}
}
}
}
.line {
height: 16rpx;
background: #F4F5F7;
}
.activityDetails {
.item_ul {
.title {
font-size: 32rpx;
font-weight: bold;
padding: 24rpx;
display: flex;
background: #F4F5F7;
.icon {
width: 40rpx;
height: 40rpx;
margin-right: 10rpx;
// display: none;
}
}
.item_li {
padding: 16rpx 32rpx 32rpx;
margin: 16rpx 0;
border-bottom: 2rpx solid #F1F1F1;
display: flex;
// justify-content: space-between;
align-items: center;
font-weight: 600;
.standard {
display: flex;
align-items: center;
margin-right: 10rpx;
.icon {
width: 32rpx;
height: 32rpx;
// display: none;
}
text {
color: #251B1D;
// color: $gray;
margin-left: 8rpx;
}
}
.content {}
}
.worksPart {
padding: 32rpx;
display: flex;
flex-wrap: wrap;
justify-content: space-between;
.workItems {
width: 320rpx;
height: 240rpx;
margin-bottom: 24rpx;
.workImg {
width: 320rpx;
height: 200rpx;
}
.workText {
width: 320rpx;
height: 40rpx;
}
}
}
}
}
.orderBtn {
width: 100%;
background-color: #FFF;
padding-bottom: 20rpx;
.btn {
width: calc(100% - 64rpx);
height: 96rpx;
line-height: 96rpx;
text-align: center;
background: #99241B;
border-radius: 8rpx;
font-size: 32rpx;
font-weight: 600;
color: #FFFFFF;
margin: 0 auto;
}
.btnQ {
width: calc(100% - 64rpx);
height: 96rpx;
line-height: 96rpx;
text-align: center;
background: #F9F2F2;
border-radius: 8rpx;
font-size: 32rpx;
font-weight: 600;
color: #99241B;
margin: 0 auto;
}
}
}
</style>

View File

@ -1,110 +0,0 @@
<template>
<view class="">
<view class="">
<u-loading-page :loading="load"></u-loading-page>
</view>
<view class="layout" v-if="load == false">
<view class="shelves">
<u-empty v-if="writerList.length < 1" mode="data" icon="../../static/orderE.png" style="margin-top: 120px;">
</u-empty>
<view class="shelves-item" v-for="(item,index) in writerList" :key="index" @click="ToEnjoy(item.id)">
<image :src="item.images" class="shelves-img"></image>
<view class="name">{{item.userName}}</view>
</view>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
load: true,
writerList: [],
pages: 1,
size: 20,
};
},
onLoad() {
this.getworkList()
},
//
onPullDownRefresh() {
this.pages = 1
this.writerList = []
this.getArtist()
setTimeout(function() {
uni.stopPullDownRefresh();
}, 1000);
},
//
onReachBottom() {
this.pages++
this.getArtist();
},
methods: {
getworkList(){
let _this = this
this.http.request('/competitionUser/scoreList', {page:this.pages,size:this.size}, "GET").then(res => {
if (res.code == 200) {
if(res.data.records.length > 0){
res.data.records.forEach(function(item) {
// if (item.images) {
// // let img = JSON.parse(item.images)
// // item.images = img[0]
// }else{
// item.images = '../../static/txIcon.png'
// }
_this.writerList.push(item)
})
}else{
this.pages--
}
this.load = false
}
}).catch(e => {
uni.showToast({
title: e.data.message,
icon: "none",
});
})
},
ToEnjoy(val){
uni.navigateTo({
url:"/pagesC/famousArts/famousArts?id=" + val
})
},
},
}
</script>
<style lang="scss">
.layout {
padding: 16rpx 32rpx;
.shelves {
width: 100%;
.shelves-item {
width: 311rpx;
margin-top: 32rpx;
margin-left: 16rpx;
margin-right: 16rpx;
float: left;
.shelves-img {
border-radius: 8px 8px 8px 8px;
width: 311rpx;
height: 380rpx;
}
.name {
font-weight: 800;
font-size: 16px;
margin-top: 12rpx;
}
}
}
}
</style>