sadjv3_user/my/gird/shoucang.vue

548 lines
14 KiB
Vue
Raw Normal View History

2024-06-05 19:16:02 +08:00
<template>
2024-06-15 09:08:10 +08:00
<view class="content">
2024-06-05 19:16:02 +08:00
<view style="padding-top: 1rpx;" v-if="orderList.length">
2024-06-15 09:08:10 +08:00
<view class="flex align-center margin-bottom-sm bg margin-sm content-list"
2024-06-05 19:16:02 +08:00
v-for="(item,index) in orderList" :key='index' @click="goOrderDetail(item)"
style="box-shadow: 6rpx 10rpx 4px #F5F5F5;position: relative;">
<view style="position: absolute;z-index: 99;top: 0rpx;left: 0;" v-if="item.isGoods == 1">
2024-06-15 09:08:10 +08:00
<image src="https://admin.sjajk.com/file/uploadPath/2023/02/16/c551f3f0721aec54208011e6948a57cd.png"
2024-06-05 19:16:02 +08:00
style="width: 42rpx;height: 36rpx;"></image>
</view>
2024-06-15 09:08:10 +08:00
<view class="content-img">
2024-06-05 19:16:02 +08:00
<image :src="item.artificerImg?item.artificerImg: '../../static/logo.png'"
@click.stop="saveImgs(item.artificerImg)"
2024-06-15 09:08:10 +08:00
mode="aspectFill"></image>
2024-06-05 19:16:02 +08:00
<image v-if="item.isHot == 1"
src="https://admin.sjajk.com/file/uploadPath/2023/02/16/9ae1b7e9fa931b5fc24cd8edecc10d9f.png"
style="width: 30rpx;height: 36rpx;position: absolute;z-index: 99;top: 40rpx;left: 110rpx;">
</image>
<view class="zpmore_view" v-if="item.lifePhoto" @click.stop="saveImgss(item.lifePhoto,0)">更多照片</view>
</view>
2024-06-26 15:46:40 +08:00
<view class="margin-left flex flex-direction list-right-content" style="width: 85%;">
2024-06-15 09:08:10 +08:00
<view class="flex align-center" style="justify-content: space-between;">
<view class="flex align-center">
<view class="text-bold text-30 margin-right-xs" style="overflow: hidden;text-overflow: ellipsis;white-space: nowrap;">
{{item.artificerName}}
</view>
<image class="dituzhaoren" src="../../static/dituzhaoren2.png" mode=""></image>
2024-06-05 19:16:02 +08:00
</view>
2024-06-15 09:08:10 +08:00
<view class="shou-top">
<view class="shou-top-btn" :class="[item.state == 1 || item.state == 2?'kfw_view':'byy_view']">
{{item.state == 1?'可服务':item.state == 2?'可预约':'休息中'}}
</view>
<view class="zz_view" v-if="item.status == 1 && item.time">
{{item.time}}
2024-06-05 19:16:02 +08:00
</view>
</view>
2024-06-15 09:08:10 +08:00
</view>
2024-06-05 19:16:02 +08:00
<view class="flex" style="margin: 16rpx 0 6px 0;justify-content: start;">
2024-06-15 09:08:10 +08:00
<view class="flex align-center">
<view class="flex align-center margin-right-sm">
<view>
<image class="pinglun" src="../../static/dituzhaoren3.png" mode="">
</image>
2024-06-27 17:29:31 +08:00
<span class="icon-text1">评论</span>
2024-06-15 09:08:10 +08:00
</view>
<!-- <image src="../../static/images/pinglun.png" style="width: 24rpx;height: 24rpx;"></image> -->
2024-06-27 17:29:31 +08:00
<view style="margin-left: 10rpx;color: #222;">
2024-06-15 09:08:10 +08:00
22222{{item.commentCount ? item.commentCount : 0}}
</view>
2024-06-05 19:16:02 +08:00
</view>
2024-06-15 09:08:10 +08:00
<view v-if="item.ordersScore" class="flex align-center">
<view>
<image class="shouc-img" src="../../static/dituzhaoren4.png" mode="">
</image>
2024-06-27 17:29:31 +08:00
<span class="icon-text1">收藏</span>
2024-06-15 09:08:10 +08:00
</view>
<text class="margin-left-xs" style="color: #222;">11111{{item.ordersScore}}.0</text>
2024-06-05 19:16:02 +08:00
</view>
2024-06-15 09:08:10 +08:00
<!-- <view style="color: #999999;">已服务:{{item.ordersCount}}</view> -->
2024-06-05 19:16:02 +08:00
</view>
2024-06-15 09:08:10 +08:00
<!-- <view class="flex align-center">
2024-06-05 19:16:02 +08:00
<image src="../../static/images/aixin2.png" style="width: 24rpx;height: 24rpx;margin-left: 40rpx;"></image>
<view style="margin-left: 10rpx;color: #999;font-size: 26rpx;">
{{item.collectCount ? item.collectCount : 0}}
</view>
2024-06-15 09:08:10 +08:00
</view> -->
2024-06-05 19:16:02 +08:00
</view>
2024-06-15 09:08:10 +08:00
<!-- <view style="width: 100%;display: flex;justify-content: start;align-items: center;">
2024-06-05 19:16:02 +08:00
<view class="flex flex-wrap align-center" style="width: 120rpx;">
<image src="../../static/images/shangjia.png" style="width: 24rpx;height: 24rpx;"></image>
<view style="margin-left: 10rpx;color: #999;font-size: 26rpx;">商家</view>
</view>
2024-06-15 09:08:10 +08:00
2024-06-05 19:16:02 +08:00
<view class="flex" style="font-size: 24rpx;color: #f49650;font-weight: bold;" v-if="item.tripWay == 3">
免出行费
</view>
2024-06-15 09:08:10 +08:00
</view> -->
2024-06-27 17:29:31 +08:00
<view class="list-right-top-bottom">
正规绿色服务!擅长精油SPA中式推拿有按摩师证手法专业期待正规绿色服务!擅长精油SPA中式推拿正规绿色服务!擅长精油SPA中式推拿
</view>
2024-06-15 09:08:10 +08:00
<view class="therapist-mian-bottom">
<view class="flex flex-wrap align-center">
<image class="therapist-bottom-img" src="../../static/dituzhaoren5.png">
</image>
<view class="therapist-mian-bottom-text">春城有约</view>
</view>
<view class="flex align-center" v-if="item.tripWay != 3" >
<image class="therapist-bottom-dingwei" src="../../static/dituzhaoren6.png"></image>
<view class="therapist-bottom-dingwei-text">
{{ item.distance }}
</view>
</view>
2024-06-27 17:29:31 +08:00
<view class="text-center text-sm" v-if="item.status == 1"
style="background: linear-gradient(90deg, #019C88, #0FA78B, #35C495);color: #ffffff;width: 35%;border-radius: 30upx;height: 60upx;line-height: 60upx;margin-top: 10rpx;"
@click.stop="goOrderDetail(item)">
立即预约
</view>
<view class="text-center text-sm" v-else
style="background: #d9d9d9;color: #ffffff;width: 35%;border-radius: 30upx;height: 60upx;line-height: 60upx;margin-top: 20rpx;">
立即预约
</view>
2024-06-05 19:16:02 +08:00
</view>
2024-06-27 17:29:31 +08:00
2024-06-05 19:16:02 +08:00
</view>
</view>
</view>
<empty v-if="orderList.length == 0"></empty>
<!-- <u-skeleton :loading="loading" :animation="true" elColor='#FFFFFF' bgColor='#FFFFFF'></u-skeleton> -->
</view>
</template>
<script>
import empty from '@/components/empty.vue'
export default {
components: {
empty,
},
data() {
return {
loading: true, // 是否显示骨架屏组件
game: [],
orderList: [],
isVip: false,
myId: uni.getStorageSync('userId') ? uni.getStorageSync('userId') : '',
showModal: true,
arr: [],
tab: '',
massageTypeId: '',
page: 1,
limit: 10,
latitude: '',
XCXIsSelect:'否',
longitude: ''
}
},
onLoad(e) {
let that = this
that.XCXIsSelect = this.$queue.getData("XCXIsSelect");
2024-06-15 09:08:10 +08:00
console.log("shouchang",that.XCXIsSelect)
2024-06-05 19:16:02 +08:00
uni.getLocation({
type: 'gcj02',
geocode: true, //设置该参数为true可直接获取经纬度及城市信息
success: function(res) {
console.log(res, '地理位置')
that.latitude = res.latitude
that.longitude = res.longitude
// uni.setStorageSync('latitude', res.latitude)
// uni.setStorageSync('longitude', res.longitude)
that.getData(that.latitude, that.longitude)
},
fail: function() {
console.log('获取地址失败')
}
})
2024-06-15 09:08:10 +08:00
that.getData(139.2222,46.3333)
2024-06-05 19:16:02 +08:00
},
onShow() {
if(this.latitude && this.longitude){
this.getData(this.latitude, this.longitude)
}
},
methods: {
saveImgss(imgs, index) {
console.log(imgs, index)
// let that = this
let imgArr = imgs
// this.imgArr.push(imgs);
// console.log(this.imgArr)
// //预览图片
uni.previewImage({
urls: imgArr,
current: imgArr[index]
});
},
saveImgs(imgs) {
let imgArr = [];
imgArr.push(imgs);
// //预览图片
uni.previewImage({
urls: imgArr,
current: 0
});
},
getData(latitude, longitude) {
let data = {
page: this.page,
limit: this.limit,
latitude: latitude,
longitude: longitude,
}
this.$Request.get("/app/artificer/selectCollectList", data).then(res => {
this.loading = false;
if (res.code == 0) {
for (var i = 0; i < res.data.list.length; i++) {
if (res.data.list[i].distance > 1000) {
res.data.list[i].distance = (res.data.list[i].distance / 1000).toFixed(1) +
'km'
} else {
res.data.list[i].distance = (res.data.list[i].distance).toFixed(1) + 'm'
}
if (res.data.list[i].lifePhoto) {
res.data.list[i].lifePhoto = res.data.list[i].lifePhoto.split(',')
}
}
if (this.page == 1) {
this.orderList = res.data.list
} else {
this.orderList = [...this.orderList, ...res.data.list]
}
}
}).catch(() => {
//联网失败, 结束加载
// this.mescroll.endErr();
});
},
// 跳转订单
goOrder(e) {
let token = this.$queue.getData('token');
if (token) {
uni.navigateTo({
url: "/pages/index/order/orderDet?artificerId=" + e.artificerId + '&massageTypeId=' + this
.massageTypeId
})
} else {
uni.navigateTo({
url: '/pages/public/login'
});
}
},
goOrderDetail(e) {
uni.navigateTo({
url: "/pages/therapist/orderDetail?artificerId=" + e.artificerId + '&massageTypeId=' + this
.massageTypeId
})
}
},
onReachBottom: function() {
this.page = this.page + 1;
this.getData(this.latitude, this.longitude)
},
onPullDownRefresh: function() {
this.page = 1;
this.getData(this.latitude, this.longitude)
setTimeout(d => {
uni.stopPullDownRefresh();
}, 3000);
},
}
</script>
<style lang="scss">
2024-06-15 09:08:10 +08:00
.icon-text{
margin-left: 2px;
font-weight: 400;
2024-06-27 17:29:31 +08:00
font-size: 26rpx;
color: #666;
}
.icon-text1{
margin-left: 2px;
2024-06-26 15:46:40 +08:00
color: #666;
2024-06-27 17:29:31 +08:00
font-size: 26rpx;
2024-06-05 19:16:02 +08:00
}
2024-06-15 09:08:10 +08:00
.pinglun{
2024-06-27 17:29:31 +08:00
width: 28rpx;
height: 26rpx;
2024-06-15 09:08:10 +08:00
}
.shouc-img{
2024-06-26 15:46:40 +08:00
width: 26rpx;
height: 26rpx;
2024-06-15 09:08:10 +08:00
}
.list-right-top-bottom{
width: 100%;
text-align: left;
font-weight: 400;
2024-06-26 15:46:40 +08:00
font-size: 26rpx;
color: #999;
2024-06-15 09:08:10 +08:00
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2; /* 显示的行数,可以根据需要修改 */
overflow: hidden;
text-overflow: ellipsis;
2024-06-26 15:46:40 +08:00
margin-top: 5px;
2024-06-15 09:08:10 +08:00
}
2024-06-26 15:46:40 +08:00
.list-right-content{
padding-right:20rpx;
}
2024-06-15 09:08:10 +08:00
.therapist-bottom-dingwei-text{
2024-06-27 17:29:31 +08:00
font-size: 24rpx;
color: #666;
margin-top: 3px;
2024-06-15 09:08:10 +08:00
}
.therapist-bottom-dingwei{
2024-06-27 17:29:31 +08:00
width: 20.36rpx;
height: 24.14rpx;
2024-06-15 09:08:10 +08:00
margin-right:3px;
2024-06-27 17:29:31 +08:00
margin-top: 3px;
2024-06-15 09:08:10 +08:00
}
.therapist-bottom-img{
2024-06-27 17:29:31 +08:00
width: 30rpx;
height: 30rpx;
2024-06-15 09:08:10 +08:00
margin-right:3px;
}
.therapist-mian-bottom-text{
font-weight: bold;
2024-06-27 17:29:31 +08:00
font-size: 26rpx;
2024-06-15 09:08:10 +08:00
color: #222222;
}
.therapist-mian-bottom{
width: 100%;
display: flex;
flex-direction: row;
justify-content: space-between;
align-items: center;
2024-06-26 15:46:40 +08:00
}
2024-06-15 09:08:10 +08:00
.zz_view {
color: #039E89;
2024-06-26 15:46:40 +08:00
font-size: 22rpx;
2024-06-15 09:08:10 +08:00
padding: 0px 3px;
background: #EBEBEB;
height: 38rpx;
line-height: 38rpx;
text-align: center;
border-top-right-radius: 7rpx;
border-bottom-right-radius: 7rpx;
}
.shou-top-btn{
height: 38rpx;
line-height: 38rpx;
text-align: center;
2024-06-26 15:46:40 +08:00
padding: 0px 5px;
border-top-left-radius: 10rpx;
border-bottom-left-radius: 10rpx;
2024-06-15 09:08:10 +08:00
}
.byy_view {
color: #000000;
background-color: #ebebeb;
}
.kfw_view {
2024-06-26 15:46:40 +08:00
background: linear-gradient(90deg, #029d88, #1eb28f);
2024-06-15 09:08:10 +08:00
color: #FFFFFF;
2024-06-26 15:46:40 +08:00
font-size: 20rpx;
2024-06-15 09:08:10 +08:00
}
.shou-top{
display: flex;
flex-direction: row;
align-items: center;
2024-06-26 15:46:40 +08:00
}
2024-06-15 09:08:10 +08:00
.dituzhaoren{
2024-06-26 15:46:40 +08:00
width: 145.75rpx;
2024-06-15 09:08:10 +08:00
height: 40.97rpx;
}
.content-list{
height: 307rpx;
border-radius: 14rpx;
}
.content-img image{
width: 100%;
height: 100%;
2024-06-26 15:46:40 +08:00
border-radius:17rpx 100rpx 30rpx 17rpx;
2024-06-15 09:08:10 +08:00
}
.content-img{
2024-06-26 15:46:40 +08:00
width: 212.08rpx;
2024-06-15 09:08:10 +08:00
height: 100%;
position: relative;
}
.content {
width: 100%;
height: 100vh;
background-color: #F7F7F7;
2024-06-05 19:16:02 +08:00
}
2024-06-15 09:08:10 +08:00
2024-06-05 19:16:02 +08:00
.zpmore_view {
position: absolute;
2024-06-15 09:08:10 +08:00
bottom: 0px;
2024-06-26 15:46:40 +08:00
margin-bottom: 4px;
2024-06-05 19:16:02 +08:00
left: 14rpx;
color: #f9f3d3;
background: linear-gradient(to right, #0a0c16, #4d4d53);
width: 130upx;
text-align: center;
border-radius: 30rpx;
height: 42rpx;
line-height: 42rpx;
font-size: 24rpx;
margin-left: 10rpx;
}
.bg {
background: #FFFFFF;
}
.ytp_view {
background: #e3e3e3;
width: 400rpx;
border-radius: 10rpx;
font-size: 28rpx;
text-align: center;
height: 80rpx;
line-height: 80rpx;
color: #848484;
margin-top: 40rpx;
}
.tp_view {
background: #ee6c54;
width: 400rpx;
border-radius: 10rpx;
font-size: 28rpx;
text-align: center;
height: 80rpx;
line-height: 80rpx;
color: #FFFFFF;
margin-top: 40rpx;
}
.sticky-tabs {
z-index: 990;
position: sticky;
top: var(--window-top);
// background-color: #fff;
}
/* // 使用mescroll-uni,则top为0 */
.mescroll-uni,
/deep/.mescroll-uni {
.sticky-tabs {
top: 0;
}
}
.demo-tip {
padding: 18upx;
font-size: 24upx;
text-align: center;
}
.line_s {
display: inline-flex;
width: 10rpx;
height: 10rpx;
background: #1AD566;
border-radius: 50%;
margin-right: 10rpx;
}
.line_x {
display: inline-flex;
width: 10rpx;
height: 10rpx;
background: #000000;
border-radius: 50%;
margin-right: 10rpx;
}
.box {
// border: 3rpx solid #005dff;
background: #E8FAE1;
color: #096f4b;
padding: 5rpx 15rpx;
font-size: 26rpx;
letter-spacing: 2rpx;
border-radius: 8rpx;
// margin-top: 10rpx;
margin-right: 8upx;
}
.actve {
font-size: 30rpx;
font-family: PingFang SC;
font-weight: 800;
color: #20C675;
}
.tabview1 {
padding: 20rpx 20rpx;
// width: 686upx;
// height: 100upx;
background: #FFFFFF;
// margin-top: -50upx;
// z-index: 99;
// display: flex;
// line-height: 100upx;
.tabview {
// width: 686upx;
// // height: 100upx;
background: #F2FFF9;
border-radius: 24rpx 24rpx 0 0;
// margin-top: -50upx;
// z-index: 99;
display: flex;
line-height: 100upx;
.tabItem_sel {
font-size: 30upx;
font-family: PingFang SC;
font-weight: 800;
color: #20C675;
flex: 1;
text-align: center;
}
.tabItem {
font-size: 26upx;
font-family: PingFang SC;
font-weight: 500;
color: #333333;
flex: 1;
text-align: center;
}
}
.tabsx {
width: 686upx;
border-radius: 24rpx;
padding-bottom: 10rpx;
display: flex;
align-items: center;
justify-content: space-between;
padding: 20rpx 30rpx;
font-size: 26rpx;
.active {
color: #20C675;
font-size: 30rpx;
font-weight: bold;
}
}
}
</style>