This commit is contained in:
刘亚磊 2022-07-18 18:23:32 +08:00
parent 19f21c62ab
commit 4e61dfc546
5 changed files with 169 additions and 350 deletions

View File

@ -1,295 +0,0 @@
<template>
<view>
<!-- <u-tabs :list="list1" ></u-tabs> -->
<view class="tabss" style="display: flex;justify-content: space-between; align-items: center;">
<view class="but-L" style="flex: 1;">
<u-button color="#99241B" text="已发布" @click="clickTab(1)"></u-button>
</view>
<view class="but-R" style="flex: 1;" >
<u-button color="#99241B" text="已接单" @click="clickTab(2)"></u-button>
</view>
</view>
<view class="art_act_itm" v-for="(item,i) in orderList" :key="i" @click="goActDeat(i)">
<image src="../../static/icon12.jpg" mode=""></image>
<!-- <image :src="item.images" mode=""></image> -->
<view class="bottom_part" style="padding: 0 12px;">
<view class="ddd" style="display: flex; justify-content: space-between; align-items: center;">
<view class="title">
露凝而白鸿雁来清秋满怀
{{item.title}}
</view>
<view class="tag_sta" v-if="!(item.state=='2')">
已报名
</view>
<view class="tag_sta_end" v-if="item.state=='2'">
已完成
</view>
</view>
<view class="act_time" >
活动时间2022/06/27
活动时间 {{item.createdAt}}
</view>
<view class="but_box" style="margin-top: 20rpx;">
<view style="width: 236rpx; margin: 0 10rpx;" v-if='item.state== "1"&&item.isBaoming'>
<u-button color="#99241B" shape="circle" text="确认完成"></u-button>
</view>
<view style="width: 236rpx;margin: 0 10rpx; " v-if='item.state== "1"'>
<u-button icon="photo-fill" shape="circle" text="图片已上传" @click="touploadedimg()"></u-button>
</view>
<view style="width: 236rpx;margin: 0 10rpx; " v-if='item.state== "1"'>
<u-button icon="photo-fill" shape="circle" color="#99241B" plain text="图片上传"
@click="toUpimgPage()"></u-button>
</view>
<view style="width: 190rpx;margin: 0 10rpx; " @click="testData()" v-if="item.isBaoming">
<u-button shape="circle" text="取消报名"></u-button>
</view>
<view style="width: 190rpx;margin: 0 10rpx; ">
<u-button plain color="#99241B" shape="circle" text="评价" @click="show=true" v-if='item.state== "2"&&!(item.state== "3")'></u-button>
</view>
<view style="width: 190rpx;margin: 0 10rpx; " v-if='item.state== "3"'>
<u-button shape="circle" text="已评价" @click="toEvlauedpg"></u-button>
</view>
</view>
</view>
</view>
<u-modal :show="show" @close="close()" :closeOnClickOverlay="true">
<view class="pinContent">
<view class="pinContent_itm" v-for='(v,i) in score' :key="i">
<view class="pinContent_avator">
<image class="pinContent_avator_img" src="../../static/MyBg.png" mode=""></image>
<view class="pinContent_Time">
<text style="font-size: 24rpx; font-weight: 600;">{{v.name}}</text>
</view>
</view>
<view class="pinContent_rate">
<u-rate count=5 v-model="v.star"></u-rate>
</view>
</view>
</view>
<view slot="confirmButton" style="display: flex; justify-content: center; align-items: center;">
<view style="width: 400rpx;">
<u-button color="#99241B" shape="circle" text="提交" @click="subEvalue()"></u-button>
</view>
</view>
</u-modal>
</view>
</template>
<script>
export default {
data() {
return {
show: false,
count: 4,
value: 2,
rate2: 2,
total: 0,
score: [{
name: "jack",
star: 0
}, {
name: "tom",
star: 0
}],
orderList: [], list1: [{
name: '已发布',
}, {
name: '已接单',
}, ],tabNum:1
};
},
onShow() {
this.getOrderData()
},
methods: {
clickTab(num){
// this.tabNum=num
if(num==1){
this.http.request('/hallUser/ddgl', {}, "GET").then(res => {
if (res.code == 200) {
console.log("testdata1", res.data
)
// that.orderList = res.data.records
}
}).catch(e => {
uni.showToast({
title: e.data.message,
icon: "none",
});
})
}else if(num==2){
this.http.request('/hallUser/myHall', {}, "GET").then(res => {
if (res.code == 200) {
console.log("testdata2", res.data
)
// that.orderList = res.data.records
}
}).catch(e => {
uni.showToast({
title: e.data.message,
icon: "none",
});
})
}
},
getOrderData() {
let that = this
this.http.request('/hallUser/ddgl', {}, "GET").then(res => {
if (res.code == 200) {
console.log("testdata", res.data
)
that.orderList = res.data.records
}
}).catch(e => {
uni.showToast({
title: e.data.message,
icon: "none",
});
})
},
goActDeat(id) {
uni.navigateTo({
// url:`/pages/ActivitiesDetail/ActivitiesDetail?id=${id}`
})
},
toUpimgPage() {
uni.navigateTo({
url: `/pages/my/imgUpload`
})
},
touploadedimg() {
uni.navigateTo({
url: `/pages/my/uploadedImgShow`
})
},
subEvalue() {
this.show = false
console.log(this.score)
//
},
toEvlauedpg() {
uni.navigateTo({
url: `/pages/my/evaluated`
})
},
close() {
this.show = false
}
}
}
</script>
<style lang="scss">
page {
width: calc(100% - 64rpx);
margin: 0rpx 32rpx;
background-color: #F5F5F5 !important;
}
image {
width: 100%;
height: 60%;
}
.but_box {
display: flex;
justify-content: flex-end;
align-items: center;
}
.tag_sta {
width: 100rpx;
height: 48rpx;
background: #F9F2F2;
border-radius: 8rpx;
line-height: 48rpx;
color: #99241B;
text-align: center;
font-size: 24rpx;
}
.tag_sta_end {
width: 100rpx;
height: 48rpx;
background: #FFF4ED;
;
border-radius: 8rpx;
line-height: 48rpx;
color: #FF6600;
text-align: center;
font-size: 24rpx;
}
.act_time {
height: 34rpx;
font-size: 24rpx;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #AFADB0;
line-height: 34rpx;
}
.art_act_itm {
margin-top: 24rpx;
height: 628rpx;
border-radius: 8px;
border: 2rpx solid transparnt;
position: relative;
border-radius: 20rpx;
overflow: hidden;
background-color: #FFFFFF;
.title {
height: 88rpx;
color: #000000;
line-height: 88rpx;
font-size: 32rpx;
font-weight: 600;
color: #251B1D;
}
}
.pinContent {
margin-top: 16rpx;
.pinContent_itm {
width: 500rpx;
display: flex;
align-items: center;
justify-content: space-between;
.pinContent_avator {
display: flex;
align-items: center;
.pinContent_avator_img {
width: 68rpx;
height: 68rpx;
margin-right: 16rpx;
margin: 24rpx 16rpx 24rpx 0rpx;
border-radius: 50%;
overflow: hidden;
}
.pinContent_Time {
display: flex;
flex-direction: column;
justify-content: space-between;
}
}
}
}
</style>

View File

@ -12,8 +12,8 @@
<view class="art_act_itm" v-for="(item,i) in orderList" :key="i" @click="goActDeat(i)" v-if="tabNum==1"> <view class="art_act_itm" v-for="(item,i) in orderList" :key="i" @click="goActDeat(i)" v-if="tabNum==1">
<image src="../../static/icon12.jpg" mode=""></image> <!-- <image src="../../static/icon12.jpg" mode=""></image> -->
<!-- <image :src="item.images" mode=""></image> --> <image :src="item.enclosure" mode=""></image>
<view class="bottom_part" style="padding: 0 12px;"> <view class="bottom_part" style="padding: 0 12px;">
<view class="ddd" style="display: flex; justify-content: space-between; align-items: center;"> <view class="ddd" style="display: flex; justify-content: space-between; align-items: center;">
<view class="title"> <view class="title">
@ -40,24 +40,25 @@
<view style="width: 236rpx;margin: 0 10rpx; " v-if='!(item.state== "0")'> <view style="width: 236rpx;margin: 0 10rpx; " v-if='!(item.state== "0")'>
<u-button icon="photo-fill" shape="circle" text="已传图片" @click="touploadedimg()"></u-button> <u-button icon="photo-fill" shape="circle" text="已传图片" @click="touploadedimg(item.images)">
</u-button>
</view> </view>
<view style="width: 236rpx; margin: 0 10rpx;" v-if='item.state=="1"'> <view style="width: 236rpx; margin: 0 10rpx;" v-if='item.state=="1"' @click="done(item.id)">
<u-button color="#99241B" shape="circle" text="确认完成"></u-button> <u-button color="#99241B" shape="circle" text="确认完成"></u-button>
</view> </view>
<view style="width: 236rpx;margin: 0 10rpx; " v-if='(item.state== "0")'> <view style="width: 236rpx;margin: 0 10rpx; " v-if='(item.state== "0")'>
<u-button icon="photo-fill" shape="circle" color="#99241B" plain text="图片上传" <u-button icon="photo-fill" shape="circle" color="#99241B" plain text="图片上传"
@click="toUpimgPage()"></u-button> @click="toUpimgPage(item.id)"></u-button>
</view> </view>
<view style="width: 190rpx;margin: 0 10rpx; " v-if='item.state== "2" '> <view style="width: 190rpx;margin: 0 10rpx; " v-if='item.state== "2" '>
<u-button plain color="#99241B" shape="circle" text="评价" @click="pingjia(i)"></u-button> <u-button plain color="#99241B" shape="circle" text="评价" @click="pingjia(i,item.id)"></u-button>
</view> </view>
<!-- <view style="width: 190rpx;margin: 0 10rpx; " v-if='item.state== "3"'> --> <view style="width: 190rpx;margin: 0 10rpx; " v-if='item.state== "3"'>
<view style="width: 190rpx;margin: 0 10rpx; " > <!-- <view style="width: 190rpx;margin: 0 10rpx; " > -->
<u-button shape="circle" text="已评价" @click="toEvlauedpg()"></u-button> <u-button shape="circle" text="已评价" @click="toEvlauedpg(item.id)"></u-button>
</view> </view>
</view> </view>
@ -65,8 +66,8 @@
</view> </view>
<view class="art_act_itm" v-for="(item,i) in orderList" :key="i" @click="goActDeat(i)" v-if="tabNum==2"> <view class="art_act_itm" v-for="(item,i) in orderList" :key="i" @click="goActDeat(i)" v-if="tabNum==2">
<image src="../../static/icon12.jpg" mode=""></image> <!-- <image :src="../../static/icon12.jpg" mode=""></image> -->
<!-- <image :src="item.images" mode=""></image> --> <image :src="item.enclosure" mode=""></image>
<view class="bottom_part" style="padding: 0 12px;"> <view class="bottom_part" style="padding: 0 12px;">
<view class="ddd" style="display: flex; justify-content: space-between; align-items: center;"> <view class="ddd" style="display: flex; justify-content: space-between; align-items: center;">
<view class="title"> <view class="title">
@ -94,10 +95,11 @@
<view style="width: 236rpx;margin: 0 10rpx; " v-if='item.state== "0"'> <view style="width: 236rpx;margin: 0 10rpx; " v-if='item.state== "0"'>
<u-button shape="circle" text="取消报名" @click="cancleBM(item.id)"></u-button> <u-button shape="circle" text="取消报名" @click="cancleBM(item.id)"></u-button>
</view> </view>
<view style="width: 236rpx;margin: 0 10rpx; " v-if='item.state== "2"'>
<u-button shape="circle" text="收到的评价" @click="touploadedimg()"></u-button>
</view>
<!-- <view style="width: 236rpx;margin: 0 10rpx; " v-if='item.state== "2"'>
<u-button shape="circle" text="收到的评价" @click="receiveevlaue()"></u-button>
</view>
-->
</view> </view>
</view> </view>
@ -110,32 +112,45 @@
<u-modal :show="show" @close="close()" :closeOnClickOverlay="true"> <u-modal :show="show" @close="close()" :closeOnClickOverlay="true">
<view class="pinContent"> <view class="pinContent">
<!-- <view class="pinContent_itm" v-for='(v,i) in score' :key="i"> --> <view class="pinContent_itm" v-for='(v,i) in baomingpingjia' :key="i">
<view class="pinContent_itm" >
<!-- <view class="pinContent_avator"> <view class="pinContent_avator">
<image class="pinContent_avator_img" src="../../static/MyBg.png" mode=""></image> <!-- <image class="pinContent_avator_img" src="../../static/MyBg.png" mode=""></image> -->
<image class="pinContent_avator_img" :src="v.image" mode=""></image>
<view class="pinContent_Time"> <view class="pinContent_Time">
<text style="font-size: 24rpx; font-weight: 600;">{{v.name}}</text> <text style="font-size: 24rpx; font-weight: 600;">{{v.userName}}</text>
</view> </view>
</view> --> </view>
<view class="pinContent_rate"> <view class="pinContent_rate">
<u-rate count=5 v-model="starvalue"></u-rate> <u-rate count=5 v-model="v.evaluate"></u-rate>
</view> </view>
</view> </view>
</view> </view>
<view slot="confirmButton" style="display: flex; justify-content: center; align-items: center;"> <view slot="confirmButton" style="display: flex; justify-content: center; align-items: center;">
<view style="width: 400rpx;"> <view style="width: 400rpx;">
<u-button color="#99241B" shape="circle" text="提交" @click="subEvalue(pingjiaobj.id,pingjiaobj.userid,starvalue)"></u-button> <u-button color="#99241B" shape="circle" text="提交" @click="subEvalue(baomingpingjia)"></u-button>
</view> </view>
</view> </view>
</u-modal> </u-modal>
<u-modal :show="showShoudao" @close="showShoudao()" title="收到的评价" :closeOnClickOverlay="true">
<u-rate count=5 value="1"></u-rate>
<view slot="confirmButton" style="display: flex; justify-content: center; align-items: center;">
<view style="width: 400rpx;">
<u-button color="#99241B" shape="circle" text="确定" @click="showShoudao=false"></u-button>
</view>
</view>
</u-modal>
</view> </view>
</template> </template>
@ -144,6 +159,7 @@
export default { export default {
data() { data() {
return { return {
showShoudao: false,
show: false, show: false,
count: 4, count: 4,
value: 2, value: 2,
@ -153,7 +169,7 @@
name: "jack", name: "jack",
star: 0 star: 0
}], }],
starvalue:0, starvalue: 0,
orderList: [], orderList: [],
list1: [{ list1: [{
name: '已发布', name: '已发布',
@ -161,7 +177,8 @@
name: '已接单', name: '已接单',
}, ], }, ],
tabNum: 1, tabNum: 1,
pingjiaobj:{} pingjiaobj: {},
baomingpingjia: [],
}; };
}, },
@ -169,9 +186,38 @@
this.clickTab(1) this.clickTab(1)
}, },
methods: { methods: {
pingjia(num){ receiveevlaue() {
this.show=true this.showShoudao = true
this.pingjiaobj= this.orderList[num] },
done(id) {
this.http.request('/hallUser/complete?id=' + id, {}, "POST").then(res => {
if (res.code == 200) {
this.clickTab(1)
}
}).catch(e => {
uni.showToast({
title: e.data.message,
icon: "none",
});
})
},
pingjia(num, id) {
console.log("ddd", id)
this.show = true
this.pingjiaobj = this.orderList[num]
let that = this
this.http.request('/hallUser/pjList?hallId=' + id, {}, "GET").then(res => {
if (res.code == 200) {
console.log("reg", res.data)
this.baomingpingjia = res.data
}
}).catch(e => {
uni.showToast({
title: e.data.message,
icon: "none",
});
})
}, },
cancleBM(id) { cancleBM(id) {
let that = this let that = this
@ -191,13 +237,29 @@
}) })
}, },
clickTab(num) { clickTab(num) {
this.orderList = []
this.tabNum = num this.tabNum = num
if (num == 1) { if (num == 1) {
let that = this let that = this
this.http.request('/hallUser/ddgl', {}, "GET").then(res => { this.http.request('/hallUser/ddgl', {}, "GET").then(res => {
if (res.code == 200) { if (res.code == 200) {
console.log("testdata", res.data) console.log("testdata", res.data)
that.orderList = res.data.records
res.data.records.forEach(function(item) {
if (item.enclosure) {
let fileArr = item.enclosure.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.enclosure = fileArr[0]
} else if (gs == 'pdf') {
item.enclosure = '../../static/fileImg/pdfS.png'
}
}
that.orderList.push(item)
})
// that.orderList = res.data.records
} }
}).catch(e => { }).catch(e => {
uni.showToast({ uni.showToast({
@ -206,10 +268,25 @@
}); });
}) })
} else if (num == 2) { } else if (num == 2) {
let that = this
this.http.request('/hallUser/myHall', {}, "GET").then(res => { this.http.request('/hallUser/myHall', {}, "GET").then(res => {
if (res.code == 200) { if (res.code == 200) {
console.log("testdata2", res) console.log("testdata2", res)
this.orderList = res.data.records res.data.records.forEach(function(item) {
if (item.enclosure) {
let fileArr = item.enclosure.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.enclosure = fileArr[0]
} else if (gs == 'pdf') {
item.enclosure = '../../static/fileImg/pdfS.png'
}
}
that.orderList.push(item)
})
// this.orderList = res.data.records
} }
}).catch(e => { }).catch(e => {
@ -225,25 +302,31 @@
// url:`/pages/ActivitiesDetail/ActivitiesDetail?id=${id}` // url:`/pages/ActivitiesDetail/ActivitiesDetail?id=${id}`
}) })
}, },
toUpimgPage() { toUpimgPage(id) {
uni.navigateTo({ uni.navigateTo({
url: `/pages/my/imgUpload` url: `/pages/my/imgUpload?id=` + id
}) })
}, },
touploadedimg() { touploadedimg(imgstr) {
uni.navigateTo({ uni.navigateTo({
url: `/pages/my/uploadedImgShow` url: `/pages/my/uploadedImgShow?imgstring=` + imgstr
}) })
}, },
subEvalue(id,userid,value) { subEvalue(item) {
let that = this let that = this
this.http.request('/hallUser/evaluate', { let arr = []
"evaluate": value, this.baomingpingjia.forEach(function(em, i) {
"hallId": id, arr.push({
"userId": userid evaluate: em.evaluate,
}, "POST").then(res => { hallId: em.hallId,
userId: em.userId
})
})
console.log("ietm", arr)
that.http.request('/hallUser/evaluate',
arr, "POST").then(res => {
if (res.code == 200) { if (res.code == 200) {
that.clickTab(1)
console.log("testdata", res) console.log("testdata", res)
} }
}).catch(e => { }).catch(e => {
@ -252,17 +335,21 @@
icon: "none", icon: "none",
}); });
}) })
this.show = false this.show = false
console.log(this.score) console.log(this.score)
// //
}, },
toEvlauedpg() { toEvlauedpg(id) {
uni.navigateTo({ uni.navigateTo({
url: `/pages/my/evaluated` url: `/pages/my/evaluated?id=` + id
}) })
}, },
close() { close() {
this.show = false this.show = false
},
closeRecive() {
this.showShoudao = false
} }
} }
} }

View File

@ -2,20 +2,20 @@
<view class="content_main"> <view class="content_main">
<view class="pijia "> <view class="pijia ">
<view class="pinjia_t "> <view class="pinjia_t ">
<text class="pinjia_count">宝贝评价{{total}}</text> <text class="pinjia_count">宝贝评价{{pinjiaList.length}}</text>
</view> </view>
<view class="pinContent" > <view class="pinContent" >
<view class="pinContent_itm" v-for='(v,i) in score' :key="i"> <view class="pinContent_itm" v-for='(v,i) in pinjiaList' :key="i">
<view class="pinContent_avator"> <view class="pinContent_avator">
<image :src="v.avatar" mode=""></image> <image :src="v.image" mode=""></image>
<view class="pinContent_Time"> <view class="pinContent_Time">
<text style="font-size: 24rpx; font-weight: 600;">{{v.userName}}</text> <text style="font-size: 24rpx; font-weight: 600;">{{v.userName}}</text>
<text style="font-size: 24rpx; color: #AFADB0;">{{v.scoreTime}}</text> <text style="font-size: 24rpx; color: #AFADB0;">{{v.updatedAt.split("T")[0]}}</text>
</view> </view>
</view> </view>
<view class="pinContent_rate"> <view class="pinContent_rate">
<u-rate count=5 v-model="v.star" :readonly="true"></u-rate> <u-rate count=5 v-model="v.evaluate" :readonly="true"></u-rate>
</view> </view>
</view> </view>
</view> </view>
@ -27,16 +27,35 @@
export default { export default {
data() { data() {
return { return {
pinjiaList:[],
itemid:null,
rate2: 2, rate2: 2,
total: 2, total: 2,
score:[{ userName:'jaskon',scoreTime:'2020-01-02',avatar:'../../static/DataSearch/TxtImg.png'},{ userName:'tom',scoreTime:'2020-08-02',avatar:'../../static/DataSearch/TxtImg.png'}] score:[{ userName:'jaskon',scoreTime:'2020-01-02',avatar:'../../static/DataSearch/TxtImg.png'},{ userName:'tom',scoreTime:'2020-08-02',avatar:'../../static/DataSearch/TxtImg.png'}]
}; };
}, },
onLoad(op) { onLoad(op) {
/* this.score = JSON.parse(decodeURIComponent(op.score)) console.log("op.if",op.id);
this.total = this.score.length this.itemid=op.id
console.log(this.score) */
}
},onShow() {
this.getpijilist()
},
methods:{
getpijilist(){
this.http.request('/hallUser/pjList?hallId=' + this.itemid, {}, "GET").then(res => {
if (res.code == 200) {
this.pinjiaList=res.data
}
}).catch(e => {
uni.showToast({
title: e.data.message,
icon: "none",
});
})
}
}
} }
</script> </script>

View File

@ -96,7 +96,7 @@
}) })
let data = image.join(',') let data = image.join(',')
console.log(data) console.log(data)
this.http.request('/hall/addHall?id='+ this.id +'&image=' +data, {}, "POST").then(res => { this.http.request('/hallUser/image?id='+ this.id +'&image=' +data, {}, "POST").then(res => {
if (res.code == 200) { if (res.code == 200) {
uni.navigateBack() uni.navigateBack()
} }

View File

@ -2,7 +2,6 @@
<view class="im" > <view class="im" >
<image v-for=" (v,i) in imgArr" class="imgSt" :src="v" mode=""></image> <image v-for=" (v,i) in imgArr" class="imgSt" :src="v" mode=""></image>
</view> </view>
@ -12,8 +11,17 @@
export default { export default {
data() { data() {
return { return {
imgArr:["../../static/DataSearch/TxtImg.png","../../static/DataSearch/TxtImg.png"] imgArr:[]
}; };
},
onLoad(op) {
console.log("ddddd",op.imgstring);
let imgarrs=[]
op.imgstring.split(",").forEach(function(eml,index){
imgarrs.push(eml)
})
this.imgArr=imgarrs
console.log("ar",imgarrs);
} }
} }
</script> </script>