优化调整

This commit is contained in:
曹磊 2025-02-08 16:38:58 +08:00
parent 7c901bce9f
commit f071a4c7ee
13 changed files with 498 additions and 292 deletions

View File

@ -757,9 +757,9 @@ export default {
// /deep/.uni-scroll-view-content{ // /deep/.uni-scroll-view-content{
// height: 350px !important; // height: 350px !important;
// } // }
/deep/.uni-picker-view-wrapper uni-picker-view-column:nth-child(1) { // /deep/.uni-picker-view-wrapper uni-picker-view-column:nth-child(1) {
display: none !important; // display: none !important;
} // }
/deep/uni-page-body { /deep/uni-page-body {
background-color: #f7f7f7 !important; background-color: #f7f7f7 !important;
} }

View File

@ -3,7 +3,7 @@
<view class="u-skeleton"> <view class="u-skeleton">
<view class="bgbox" style=""> <view class="bgbox" style="">
<view v-if="order.status ==1">待付款...</view> <view v-if="order.status ==1">待付款...</view>
<view v-if="order.status ==2">待服务</view> <view v-if="order.status ==2">已接单</view>
<view v-if="order.status ==3">已完成</view> <view v-if="order.status ==3">已完成</view>
<view v-if="order.status ==6">服务中</view> <view v-if="order.status ==6">服务中</view>
<view v-if="order.status ==7">已出发</view> <view v-if="order.status ==7">已出发</view>
@ -1252,9 +1252,9 @@
.lxkf { .lxkf {
width: 48%; width: 48%;
text-align: center; text-align: center;
background-color: #f7f7f7; background-color: #fff;
border: 1px #ccc solid; border: 1px #029D88 solid;
color: #333; color: #029D88;
border-radius: 53px !important; border-radius: 53px !important;
height: 42px; height: 42px;
line-height: 42px; line-height: 42px;

View File

@ -24,14 +24,15 @@
<view class="mian-title" v-if="order && order.ordersMassageList"> <view class="mian-title" v-if="order && order.ordersMassageList">
<view class="mian-title-view">{{order.entryName}}</view> <view class="mian-title-view">{{order.entryName}}</view>
<!-- <view class="nav-btn" v-if="order.status ==1">待支付</view> --> <!-- <view class="nav-btn" v-if="order.status ==1">待支付</view> -->
<view class="nav-btn" v-if="order.status ==2">待服务</view> <view class="nav-btn" v-if="order.status ==2">已接单</view>
<view class="nav-btn" v-if="order.status ==3">待评价</view> <view class="nav-btn" v-if="order.status ==3">待评价</view>
<!-- <view class="nav-btn" v-if="order.status ==4">已取消</view> --> <!-- <view class="nav-btn" v-if="order.status ==4">已取消</view> -->
<view class="nav-btn" v-if="order.status ==5">已完成</view> <view class="nav-btn" v-if="order.status ==5">已完成</view>
<view class="nav-btn" v-if="order.status ==6">服务中</view> <view class="nav-btn" v-if="order.status ==6">服务中</view>
<view class="nav-btn" v-if="order.status ==7">技师出发</view> <view class="nav-btn" v-if="order.status ==7">已出发</view>
<view class="nav-btn" v-if="order.status ==8">技师到达</view> <view class="nav-btn" v-if="order.status ==8">已到达</view>
<view class="nav-btn" v-if="order.status ==9">确认接单</view> <view class="nav-btn" v-if="order.status == 9&&!order.refusalContent">待接单</view>
<view class="progress-status-jd" v-if="order.status == 9&&order.refusalContent">拒单审核中</view>
</view> </view>
<view class="mian-time" v-if="order && order.ordersMassageList"> <view class="mian-time" v-if="order && order.ordersMassageList">
<text class="title-font">服务时长</text><text <text class="title-font">服务时长</text><text
@ -381,14 +382,15 @@
<view class="mian-title" v-if="order && order.ordersMassageList"> <view class="mian-title" v-if="order && order.ordersMassageList">
<view class="mian-title-view">{{order.entryName}}</view> <view class="mian-title-view">{{order.entryName}}</view>
<!-- <view class="nav-btn" v-if="order.status ==1">待支付</view> --> <!-- <view class="nav-btn" v-if="order.status ==1">待支付</view> -->
<view class="nav-btn" v-if="order.status ==2">待服务</view> <view class="nav-btn" v-if="order.status ==2">已接单</view>
<view class="nav-btn" v-if="order.status ==3">待评价</view> <view class="nav-btn" v-if="order.status ==3">待评价</view>
<!-- <view class="nav-btn" v-if="order.status ==4">已取消</view> --> <!-- <view class="nav-btn" v-if="order.status ==4">已取消</view> -->
<view class="nav-btn" v-if="order.status ==5">已完成</view> <view class="nav-btn" v-if="order.status ==5">已完成</view>
<view class="nav-btn" v-if="order.status ==6">服务中</view> <view class="nav-btn" v-if="order.status ==6">服务中</view>
<view class="nav-btn" v-if="order.status ==7">技师出发</view> <view class="nav-btn" v-if="order.status ==7">已出发</view>
<view class="nav-btn" v-if="order.status ==8">技师到达</view> <view class="nav-btn" v-if="order.status ==8">已到达</view>
<view class="nav-btn" v-if="order.status ==9">确认接单</view> <view class="nav-btn" v-if="order.status == 9&&!order.refusalContent">待接单</view>
<view class="progress-status-jd" v-if="order.status == 9&&order.refusalContent">拒单审核中</view>
</view> </view>
<view class="mian-time" v-if="order && order.ordersMassageList"> <view class="mian-time" v-if="order && order.ordersMassageList">
<text class="title-font">服务时长</text><text <text class="title-font">服务时长</text><text
@ -692,14 +694,15 @@
<view class="mian-title" v-if="order && order.ordersMassageList"> <view class="mian-title" v-if="order && order.ordersMassageList">
<view class="mian-title-view">{{order.entryName}}</view> <view class="mian-title-view">{{order.entryName}}</view>
<!-- <view class="nav-btn" v-if="order.status ==1">待支付</view> --> <!-- <view class="nav-btn" v-if="order.status ==1">待支付</view> -->
<view class="nav-btn" v-if="order.status ==2">待服务</view> <view class="nav-btn" v-if="order.status ==2">已接单</view>
<view class="nav-btn" v-if="order.status ==3">待评价</view> <view class="nav-btn" v-if="order.status ==3">待评价</view>
<!-- <view class="nav-btn" v-if="order.status ==4">已取消</view> --> <!-- <view class="nav-btn" v-if="order.status ==4">已取消</view> -->
<view class="nav-btn" v-if="order.status ==5">已完成</view> <view class="nav-btn" v-if="order.status ==5">已完成</view>
<view class="nav-btn" v-if="order.status ==6">服务中</view> <view class="nav-btn" v-if="order.status ==6">服务中</view>
<view class="nav-btn" v-if="order.status ==7">技师出发</view> <view class="nav-btn" v-if="order.status ==7">已出发</view>
<view class="nav-btn" v-if="order.status ==8">技师到达</view> <view class="nav-btn" v-if="order.status ==8">已到达</view>
<view class="nav-btn" v-if="order.status ==9">确认接单</view> <view class="nav-btn" v-if="order.status == 9&&!order.refusalContent">待接单</view>
<view class="progress-status-jd" v-if="order.status == 9&&order.refusalContent">拒单审核中</view>
</view> </view>
<view class="mian-time" v-if="order && order.ordersMassageList"> <view class="mian-time" v-if="order && order.ordersMassageList">
<text class="title-font">服务时长</text><text <text class="title-font">服务时长</text><text
@ -973,14 +976,15 @@
<view class="mian-title" v-if="order && order.ordersMassageList"> <view class="mian-title" v-if="order && order.ordersMassageList">
<view class="mian-title-view">{{order.entryName}}</view> <view class="mian-title-view">{{order.entryName}}</view>
<!-- <view class="nav-btn" v-if="order.status ==1">待支付</view> --> <!-- <view class="nav-btn" v-if="order.status ==1">待支付</view> -->
<view class="nav-btn" v-if="order.status ==2">待服务</view> <view class="nav-btn" v-if="order.status ==2">已接单</view>
<view class="nav-btn" v-if="order.status ==3">待评价</view> <view class="nav-btn" v-if="order.status ==3">待评价</view>
<!-- <view class="nav-btn" v-if="order.status ==4">已取消</view> --> <!-- <view class="nav-btn" v-if="order.status ==4">已取消</view> -->
<view class="nav-btn" v-if="order.status ==5">已完成</view> <view class="nav-btn" v-if="order.status ==5">已完成</view>
<view class="nav-btn" v-if="order.status ==6">服务中</view> <view class="nav-btn" v-if="order.status ==6">服务中</view>
<view class="nav-btn" v-if="order.status ==7">技师出发</view> <view class="nav-btn" v-if="order.status ==7">已出发</view>
<view class="nav-btn" v-if="order.status ==8">技师到达</view> <view class="nav-btn" v-if="order.status ==8">已到达</view>
<view class="nav-btn" v-if="order.status ==9">确认接单</view> <view class="nav-btn" v-if="order.status == 9&&!order.refusalContent">待接单</view>
<view class="progress-status-jd" v-if="order.status == 9&&order.refusalContent">拒单审核中</view>
</view> </view>
<view class="mian-time" v-if="order && order.ordersMassageList"> <view class="mian-time" v-if="order && order.ordersMassageList">
<text class="title-font">服务时长</text><text <text class="title-font">服务时长</text><text
@ -1241,14 +1245,15 @@
<view class="mian-title" v-if="order && order.ordersMassageList"> <view class="mian-title" v-if="order && order.ordersMassageList">
<view class="mian-title-view">{{order.entryName}}</view> <view class="mian-title-view">{{order.entryName}}</view>
<!-- <view class="nav-btn" v-if="order.status ==1">待支付</view> --> <!-- <view class="nav-btn" v-if="order.status ==1">待支付</view> -->
<view class="nav-btn" v-if="order.status ==2">待服务</view> <view class="nav-btn" v-if="order.status ==2">已接单</view>
<view class="nav-btn" v-if="order.status ==3">待评价</view> <view class="nav-btn" v-if="order.status ==3">待评价</view>
<!-- <view class="nav-btn" v-if="order.status ==4">已取消</view> --> <!-- <view class="nav-btn" v-if="order.status ==4">已取消</view> -->
<view class="nav-btn" v-if="order.status ==5">已完成</view> <view class="nav-btn" v-if="order.status ==5">已完成</view>
<view class="nav-btn" v-if="order.status ==6">服务中</view> <view class="nav-btn" v-if="order.status ==6">服务中</view>
<view class="nav-btn" v-if="order.status ==7">技师出发</view> <view class="nav-btn" v-if="order.status ==7">已出发</view>
<view class="nav-btn" v-if="order.status ==8">技师到达</view> <view class="nav-btn" v-if="order.status ==8">已到达</view>
<view class="nav-btn" v-if="order.status ==9">确认接单</view> <view class="nav-btn" v-if="order.status == 9&&!order.refusalContent">待接单</view>
<view class="progress-status-jd" v-if="order.status == 9&&order.refusalContent">拒单审核中</view>
</view> </view>
<view class="mian-time" v-if="order && order.ordersMassageList"> <view class="mian-time" v-if="order && order.ordersMassageList">
<text class="title-font">服务时长</text><text <text class="title-font">服务时长</text><text
@ -1545,7 +1550,7 @@
</view> </view>
<view class="footers-btn footers-true" @click="nineState(order.ordersId)" <view class="footers-btn footers-true" @click="nineState(order.ordersId)"
v-if="order.status == 9&&!order.refusalContentl"> v-if="order.status == 9&&!order.refusalContentl">
确认接单 接单
</view> </view>
<view class="footers-btn footers-bor" v-if="order.status == 9&&!order.refusalContentl" <view class="footers-btn footers-bor" v-if="order.status == 9&&!order.refusalContentl"
@click="toggleJ('bottom',order.ordersId)"> @click="toggleJ('bottom',order.ordersId)">
@ -2036,7 +2041,7 @@
} }
}, },
nineState(ordersId) { // nineState(ordersId) { //
var that = this; var that = this;
this.$Request.getT("/app/artificer/jishiQueren", { this.$Request.getT("/app/artificer/jishiQueren", {
ordersId: ordersId ordersId: ordersId
@ -3533,4 +3538,12 @@
border-bottom: 1px #e5e5e5 solid; border-bottom: 1px #e5e5e5 solid;
margin: 30rpx 0; margin: 30rpx 0;
} }
.progress-status-jd{
color: #fff;
border-radius:30rpx 30rpx 30rpx 8rpx ;
padding: 0 14rpx;
background-image: linear-gradient(-45deg, #ff8c01, #ff5600);
font-size: 26rpx;
line-height: 46rpx;
}
</style> </style>

View File

@ -36,6 +36,8 @@
<span class="view-title-left-text" v-if="orderType == 2">本期{{isSfwc=='1'?'已加钟':'未加钟'}}订单</span> <span class="view-title-left-text" v-if="orderType == 2">本期{{isSfwc=='1'?'已加钟':'未加钟'}}订单</span>
<span class="view-title-left-text" v-if="orderType == 3">本期{{isSfwc=='1'?'已充值':'未充值'}}订单</span> <span class="view-title-left-text" v-if="orderType == 3">本期{{isSfwc=='1'?'已充值':'未充值'}}订单</span>
</view> </view>
<view class="view-title-right" v-if="isSfwc=='1'&&orderType == 2">加钟总金额: {{totalMoney}}</view>
<view class="view-title-right" v-if="isSfwc=='1'&&orderType == 3">充值总金额: {{totalMoney}}</view>
<view class="view-title-right">订单数量: {{totalCount}}</view> <view class="view-title-right">订单数量: {{totalCount}}</view>
</view> </view>
<!--本期加钟 充值 订单--> <!--本期加钟 充值 订单-->
@ -67,7 +69,10 @@
服务地址 : {{item.address}} 服务地址 : {{item.address}}
</view> </view>
<view class="mian-bottom"> <view class="mian-bottom">
<view class="shouyi-text">项目金额 : {{item.priceTotal}}</view> <view class="mian-bottom-xiang shouyi-text">
<view class="view-title-right" v-if="orderType == 2">加钟金额:{{item.addArtificerMoney}}</view>
<view class="view-title-right" v-if="orderType == 3">充值金额:{{item.addArtificerMoney}}</view>
</view>
<view class="mian-bottom-shou"> <view class="mian-bottom-shou">
<span class="shouyi-text">本单收益: </span> <span class="shouyi-text">本单收益: </span>
<span class="shouyi-text" style="color: #FF6000;font-weight: bold;">{{item.artificerMoneyTotal}}</span> <span class="shouyi-text" style="color: #FF6000;font-weight: bold;">{{item.artificerMoneyTotal}}</span>
@ -106,7 +111,9 @@
服务地址 : {{item.address}} 服务地址 : {{item.address}}
</view> </view>
<view class="mian-bottom"> <view class="mian-bottom">
<view class="shouyi-text">项目金额 : {{item.priceTotal}}</view> <view class="shouyi-text">
<!-- 项目金额 : {{item.priceTotal}} -->
</view>
<view class="mian-bottom-shou"> <view class="mian-bottom-shou">
<span class="shouyi-text">本单收益: </span> <span class="shouyi-text">本单收益: </span>
<span class="shouyi-text" style="color: #FF6000;font-weight: bold;">{{item.artificerMoneyTotal}}</span> <span class="shouyi-text" style="color: #FF6000;font-weight: bold;">{{item.artificerMoneyTotal}}</span>
@ -147,7 +154,8 @@
isSfwc:'1', isSfwc:'1',
homePageCountData:'', homePageCountData:'',
earnings:'0', earnings:'0',
totalCount:'' totalCount:'',
totalMoney:''
} }
}, },
onLoad(e) { onLoad(e) {
@ -239,7 +247,8 @@
if (that.page == 1) that.listData = []; // if (that.page == 1) that.listData = []; //
that.listData = [...that.listData, ...res.data.list]; // that.listData = [...that.listData, ...res.data.list]; //
that.earnings = res.earnings; that.earnings = res.earnings;
that.totalCount=res.data.totalCount that.totalCount=res.data.totalCount;
that.totalMoney=res.data.totalMoney;
} else { } else {
that.$queue.showToast(res.msg); that.$queue.showToast(res.msg);
} }

View File

@ -71,8 +71,8 @@
<view class="mian-bottom"> <view class="mian-bottom">
<view class="mian-bottom-xiang shouyi-text">项目金额 : {{item.priceTotal}}</view> <view class="mian-bottom-xiang shouyi-text">项目金额 : {{item.priceTotal}}</view>
<view class="mian-bottom-shou"> <view class="mian-bottom-shou">
<span class="shouyi-text">本单收益: </span> <span class="shouyi-text">本单积分: </span>
<span class="shouyi-text" style="color: #FF6000;font-weight: bold;">{{item.artificerMoneyTotal}}</span> <span class="shouyi-text" style="color: #FF6000;font-weight: bold;">{{item.jifen}}</span>
</view> </view>
</view> </view>
</view> </view>

View File

@ -56,14 +56,14 @@
登录 登录
</view> </view>
</view> </view>
<view class="timeShow">
时间<text class="wztext">{{ loglattime }}</text>
</view>
<view class="gxbox" @click="goNavs('/my/qiandao/index')"> <view class="gxbox" @click="goNavs('/my/qiandao/index')">
<template v-if="loglataddress"> <template v-if="loglataddress">
<view class="flex align-center gengxin"> <view class="align-center gengxin">
位置<text class="wztext">{{ loglataddress }}</text> 位置<text class="wztext">{{ loglataddress }}</text>
</view> </view>
<view class="flex align-center gengxin">
时间<text class="wztext">{{ loglattime }}</text>
</view>
</template> </template>
<template v-else> <template v-else>
<view class="flex align-center gengxin" style="justify-content: center;"> <view class="flex align-center gengxin" style="justify-content: center;">
@ -154,10 +154,13 @@
</view> </view>
<view class="csda"> <view class="csda">
<view class="wlalarm">
每次服务会减少物料包数量当数量少于一定值时将做停牌处理
</view>
<view class="flex align-center" style="font-size: 16px;font-weight: bold;color: #fff;margin-top: 8px; margin-left: 15rpx;"> <view class="flex align-center" style="font-size: 16px;font-weight: bold;color: #fff;margin-top: 8px; margin-left: 15rpx;">
物料记录 物料记录
<image src="../../static/images/index/yiwen.png" style="width: 16px;height: 17px;margin-left: 3px;" <!-- <image src="../../static/images/index/yiwen.png" style="width: 16px;height: 17px;margin-left: 3px;"
@tap="viewHelp"></image> @tap="viewHelp"></image> -->
<!-- 物料包消耗提示 --> <!-- 物料包消耗提示 -->
<view> <view>
@ -199,8 +202,9 @@
</view> </view>
<view v-if="homeMaterialPackageList.length > 3" class="viewMore" @tap="showMoreMaterialPackageList"> <view v-if="homeMaterialPackageList.length > 3" class="viewMore" @tap="showMoreMaterialPackageList">
查看更多</view> 物料仓库</view>
</view> </view>
<view v-if="formatHomeMaterialPackageList.length > 0" class="flex align-center justify-between zbhsga"> <view v-if="formatHomeMaterialPackageList.length > 0" class="flex align-center justify-between zbhsga">
<view class="importMaterialPackage wuliao" v-for="(item, index) in formatHomeMaterialPackageList" <view class="importMaterialPackage wuliao" v-for="(item, index) in formatHomeMaterialPackageList"
:key="item.id"> :key="item.id">
@ -282,7 +286,7 @@
<view class="flex"> <view class="flex">
<view class="flex align-center radius" style="width: 33%;"> <view class="flex align-center radius" style="width: 33%;">
<view class="margin-left" style="text-align: center;margin: 0 auto;"> <view class="margin-left" style="text-align: center;margin: 0 auto;">
<view class="margin-top-xs">待服务</view> <view class="margin-top-xs">已接单</view>
<text class="text-bold text-xl">{{countOrderIng}}</text> <text class="text-bold text-xl">{{countOrderIng}}</text>
</view> </view>
</view> </view>
@ -368,7 +372,7 @@
style="width: 72rpx;height: 72rpx;border-radius: 50%;"> style="width: 72rpx;height: 72rpx;border-radius: 50%;">
</image> </image>
<view class="margin-left"> <view class="margin-left">
<view class="margin-top-xs">待服务</view> <view class="margin-top-xs">已接单</view>
<text class="text-bold text-xl">{{countOrderIng}}</text> <text class="text-bold text-xl">{{countOrderIng}}</text>
</view> </view>
</view> </view>
@ -466,15 +470,15 @@
<text class="title-font">{{ item.serveTime }}</text> <text class="title-font">{{ item.serveTime }}</text>
</view> </view>
<view class="progress-status-fk" v-if="item.status == 1">待付款</view> <view class="progress-status-fk" v-if="item.status == 1">待付款</view>
<view class="progress-status-fw" v-if="item.status == 2">待服务</view> <view class="progress-status-fw" v-if="item.status == 2">已接单</view>
<view class="progress-status-wa" v-if="item.status == 5">已完成</view> <view class="progress-status-wa" v-if="item.status == 5">已完成</view>
<view class="progress-status-jx" v-if="item.status == 6">进行中</view> <view class="progress-status-jx" v-if="item.status == 6">进行中</view>
<view class="progress-status-cf" v-if="item.status == 7">已出发</view> <view class="progress-status-cf" v-if="item.status == 7">已出发</view>
<view class="progress-status-dd" v-if="item.status == 8">已到达</view> <view class="progress-status-dd" v-if="item.status == 8">已到达</view>
<view class="progress-status" v-if="item.status == 3">待评价</view> <view class="progress-status" v-if="item.status == 3">待评价</view>
<view class="progress-status-qx" v-if="item.status == 4">已取消</view> <view class="progress-status-qx" v-if="item.status == 4">已取消</view>
<view class="progress-status-qr" v-if="item.status == 9&&!item.refusalContent">确认</view> <view class="progress-status-qr" v-if="item.status == 9&&!item.refusalContent">接单</view>
<view class="progress-status-jd" v-if="item.status == 9&&item.refusalContent">拒单审核</view> <view class="progress-status-jd" v-if="item.status == 9&&item.refusalContent">拒单审核</view>
<view class="progress-status-daibu" v-if="item.status == 10" >待补单</view> <view class="progress-status-daibu" v-if="item.status == 10" >待补单</view>
<view v-if="item.overTimeOrders == 1" class="progress-status-chaoshi">[超时]</view> <view v-if="item.overTimeOrders == 1" class="progress-status-chaoshi">[超时]</view>
<!-- <view class="text-green" v-if="item.state ==1 ||item.state ==2">待完成</view> <!-- <view class="text-green" v-if="item.state ==1 ||item.state ==2">待完成</view>
@ -1646,6 +1650,7 @@ body {
} }
.gengxin{ .gengxin{
color: #def7f4; color: #def7f4;
display: flex;
} }
.jishi-index-title{ .jishi-index-title{
width: 100%; width: 100%;
@ -1789,7 +1794,6 @@ page {
} }
.wztext { .wztext {
width: 200rpx;
overflow: hidden; overflow: hidden;
//text-overflow: ellipsis; //text-overflow: ellipsis;
white-space: nowrap; white-space: nowrap;
@ -1849,7 +1853,7 @@ page {
} }
.csda { .csda {
height: 202rpx; height: 272rpx;
border-radius: 30rpx; border-radius: 30rpx;
background: url(../../static/index/fun_banner2.png); background: url(../../static/index/fun_banner2.png);
background-size: cover; background-size: cover;
@ -2117,11 +2121,17 @@ uni-switch::before {
.viewMore { .viewMore {
position: absolute; position: absolute;
right: 15px; right: 15px;
top: 25px; // top: 25px;
font-size:24rpx; font-size:24rpx;
color: #019c88; color: #019c88;
} }
.wlalarm {
text-align: center;
font-size: 12px;
color: #ff0000;
}
.materialPackageTitle { .materialPackageTitle {
font-size: 18px; font-size: 18px;
font-weight: bold; font-weight: bold;
@ -2184,7 +2194,7 @@ uni-switch::before {
padding:20rpx 20rpx 10rpx 20rpx; padding:20rpx 20rpx 10rpx 20rpx;
} }
.avatar-section{ .avatar-section{
padding:30rpx 0 50rpx 0; padding:30rpx 0 0rpx 0;
position: relative; position: relative;
} }
.avatar-section-text{ .avatar-section-text{
@ -2199,4 +2209,8 @@ uni-switch::before {
.money_text2{ .money_text2{
font-size:26rpx; font-size:26rpx;
} }
.timeShow{
color: #019c88;
text-align: right;
}
</style> </style>

View File

@ -43,6 +43,8 @@
<span class="view-title-left-text" v-if="orderType==2">本期{{isSfwc=='1'?'已加钟':'未加钟'}}订单</span> <span class="view-title-left-text" v-if="orderType==2">本期{{isSfwc=='1'?'已加钟':'未加钟'}}订单</span>
<span class="view-title-left-text" v-if="orderType==3">本期{{isSfwc=='1'?'已充值':'未充值'}}订单</span> <span class="view-title-left-text" v-if="orderType==3">本期{{isSfwc=='1'?'已充值':'未充值'}}订单</span>
</view> </view>
<view class="view-title-right" v-if="isSfwc=='1'&&orderType == 2">加钟总金额: {{totalMoney}}</view>
<view class="view-title-right" v-if="isSfwc=='1'&&orderType == 3">充值总金额: {{totalMoney}}</view>
<view class="view-title-right">订单数量: {{totalCount}}</view> <view class="view-title-right">订单数量: {{totalCount}}</view>
</view> </view>
<!--本期加钟 充值 订单--> <!--本期加钟 充值 订单-->
@ -74,7 +76,10 @@
服务地址 : {{item.address}} 服务地址 : {{item.address}}
</view> </view>
<view class="mian-bottom"> <view class="mian-bottom">
<view class="mian-bottom-xiang shouyi-text">项目金额 : {{item.priceTotal}}</view> <view class="mian-bottom-xiang shouyi-text">
<view class="view-title-right" v-if="orderType == 2">加钟金额:{{item.addArtificerMoney}}</view>
<view class="view-title-right" v-if="orderType == 3">充值金额:{{item.addArtificerMoney}}</view>
</view>
<view class="mian-bottom-shou"> <view class="mian-bottom-shou">
<span class="shouyi-text">本单收益: </span> <span class="shouyi-text">本单收益: </span>
<span class="shouyi-text" style="color: #FF6000;font-weight: bold;">{{item.artificerMoneyTotal}}</span> <span class="shouyi-text" style="color: #FF6000;font-weight: bold;">{{item.artificerMoneyTotal}}</span>
@ -113,7 +118,9 @@
服务地址 : {{item.address}} 服务地址 : {{item.address}}
</view> </view>
<view class="mian-bottom"> <view class="mian-bottom">
<view class="shouyi-text">项目金额 : {{item.priceTotal}}</view> <view class="shouyi-text">
<!-- 项目金额 : {{item.priceTotal}} -->
</view>
<view class="mian-bottom-shou"> <view class="mian-bottom-shou">
<span class="shouyi-text">本单收益: </span> <span class="shouyi-text">本单收益: </span>
<span class="shouyi-text" style="color: #FF6000;font-weight: bold;">{{item.artificerMoneyTotal}}</span> <span class="shouyi-text" style="color: #FF6000;font-weight: bold;">{{item.artificerMoneyTotal}}</span>
@ -156,7 +163,8 @@
wqsyshow:true, wqsyshow:true,
wqlistData:[], wqlistData:[],
earnings:'0%', earnings:'0%',
totalCount:'' totalCount:'',
totalMoney:''
} }
}, },
onLoad(e) { onLoad(e) {
@ -252,7 +260,8 @@
if (that.page == 1) that.listData = []; // if (that.page == 1) that.listData = []; //
that.listData = [...that.listData, ...res.data.list]; // that.listData = [...that.listData, ...res.data.list]; //
that.earnings = res.earnings; that.earnings = res.earnings;
that.totalCount=res.data.totalCount that.totalCount=res.data.totalCount;
that.totalMoney=res.totalMoney;
} else { } else {
that.$queue.showToast(res.msg); that.$queue.showToast(res.msg);
} }

View File

@ -23,9 +23,9 @@
<view class="flex align-center" style="font-size: 14px;"> <view class="flex align-center" style="font-size: 14px;">
<image src="../../static/images/my/start.png" <image src="../../static/images/my/start.png"
style="width: 13px;height: 12px;margin: 0 6rpx 0 20rpx;"></image> style="width: 13px;height: 12px;margin: 0 6rpx 0 20rpx;"></image>
{{ordersScore}} 星级{{ordersScore}}
</view> </view>
<view class="xyf" @click="goNav('/my/wallet/xinyongfendetail')">{{ creditScore }}</view>
</view> </view>
<view class="flex margin-left-sm margin-top-xs" v-if="XCXIsSelect != ''" <view class="flex margin-left-sm margin-top-xs" v-if="XCXIsSelect != ''"
@ -42,6 +42,7 @@
<view class="online-tag" v-if="renzheng == 3" @click.stop="goNav('/my/renzheng/index')"> <view class="online-tag" v-if="renzheng == 3" @click.stop="goNav('/my/renzheng/index')">
已拒绝 已拒绝
</view> </view>
<view class="xyf" @click="goNav('/my/wallet/xinyongfendetail')">信用分{{ creditScore }}</view>
</view> </view>
</view> </view>
</view> </view>
@ -182,7 +183,7 @@
<image src="../../static/images/my/hetong.png" <image src="../../static/images/my/hetong.png"
style="width: 54rpx;height: 60rpx;margin-bottom: 4px;margin-top: 20px;"></image> style="width: 54rpx;height: 60rpx;margin-bottom: 4px;margin-top: 20px;"></image>
<view class=""> <view class="">
合同 实名认证入口
</view> </view>
</view> </view>

View File

@ -12,22 +12,25 @@
<view class="selectTimt-bottom"> <view class="selectTimt-bottom">
<view @click="showPopup"> <view @click="showPopup">
<uni-title type="h4" title="开始时间" align="center" ></uni-title> <uni-title type="h4" title="开始时间" align="center" ></uni-title>
<view class="uni-input">{{starTime}}</view> <scrollbarPicker :select.sync='starTime' @Time='bindTimeChange'/>
<!-- <view class="uni-input">{{starTime}}</view> -->
</view> </view>
<!-- 弹出层本身 --> <!-- 弹出层本身 -->
<scrollbarPicker :visibleShow.sync="pickerVisible" @Time='bindTimeChange'/> <!-- <scrollbarPicker :visibleShow.sync="pickerVisible" @Time='bindTimeChange'/> -->
</view> </view>
<view class="selectTimt-bottom"> <view class="selectTimt-bottom">
<view @click="showEndPopup"> <view @click="showEndPopup">
<uni-title type="h4" title="结束时间" align="center" ></uni-title> <uni-title type="h4" title="结束时间" align="center" ></uni-title>
<view class="uni-input"> <scrollbarEndPicker :select.sync='endTime' @Time='bindTimeChangeEndTime'/>
<!-- <view class="uni-input">
<span>{{endTime}}</span> <span>{{endTime}}</span>
</view> </view> -->
</view> </view>
<!-- 弹出层本身 --> <!-- 弹出层本身 -->
<scrollbarEndPicker :visibleShow.sync="pickerEndVisible" @Time='bindTimeChangeEndTime'/> <!-- <scrollbarEndPicker :visibleShow.sync="pickerEndVisible" @Time='bindTimeChangeEndTime'/> -->
</view> </view>
</view> </view>
<view class="sub" @click="saveJd()">保存接单</view>
</view> </view>
<view class="container-top"> <view class="container-top">
<span>设置不可接单时间</span> <span>设置不可接单时间</span>
@ -51,7 +54,7 @@
</view> </view>
</view> </view>
</view> </view>
<view class="sub" @click="sub()">保存选择</view> <view class="sub" @click="saveBjd()">保存不接单</view>
<!-- <view class="push-button"> <!-- <view class="push-button">
<view class="detail-btn" @click="sub()"> <view class="detail-btn" @click="sub()">
保存选择 保存选择
@ -87,6 +90,7 @@
isPopupShow: false, isPopupShow: false,
pickerVisible:false, pickerVisible:false,
pickerEndVisible:false, pickerEndVisible:false,
Iselect:false,
today: [{ today: [{
artificerTime: '00:00', artificerTime: '00:00',
isSelected: false, isSelected: false,
@ -664,6 +668,48 @@
} }
}); });
}, },
saveJd() {
this.$queue.showLoading('设置中...');
var data = {
idleTime: this.timeCurrent + ',' + this.tomorrowTime,
artificerId: uni.getStorageSync('artificerId')
}
if (this.selectDate == '明天') {
data.idleTime = (this.timeList + ' ' + this.starTime) + ',' + (dayAfterTomorrow().dayAfterTomorrow +
' ' + this.endTime);
} else if (this.selectDate == '后天') {
data.idleTime = (this.timeList + ' ' + this.starTime) + ',' + (dayAfterTomorrowD().dayAfterTomorrowD +
' ' + this.endTime);
}
this.$Request.postT('/app/artificerTime/setArtificerJdTime', data).then(res => {
if (res.code == 0) {
this.$queue.showToast('设置成功!')
this.getMsTime(this.timeList)
} else {
this.$queue.showToast(res.msg);
}
});
},
saveBjd() {
var time = [];
for (var i = 0; i < this.timeData.length; i++) {
time.push(
this.timeData[i].createTime + ' ' + this.timeData[i].artificerTime
)
}
var data = {
busyTime: time.toString(),
artificerId: uni.getStorageSync('artificerId')
}
this.$Request.postT('/app/artificerTime/setArtificerBjdTime', data).then(res => {
if (res.code == 0) {
this.$queue.showToast('设置成功!')
this.getMsTime(this.timeList)
} else {
this.$queue.showToast(res.msg);
}
});
},
getMsTime(artificerDate) { getMsTime(artificerDate) {
// this.yearsDate = artificerDate; // this.yearsDate = artificerDate;
this.$Request.getT('/app/artificerTime/selectArtificerTimeByArtificerId?artificerId=' + uni.getStorageSync( this.$Request.getT('/app/artificerTime/selectArtificerTimeByArtificerId?artificerId=' + uni.getStorageSync(
@ -721,6 +767,7 @@
this.timeCurrent = jintian + ' ' + this.starTime; this.timeCurrent = jintian + ' ' + this.starTime;
} }
this.endTime = res.endTime.slice(0, 5); this.endTime = res.endTime.slice(0, 5);
//this.Iselect = true;
} else { } else {
this.isTrue = false this.isTrue = false
} }

View File

@ -1,99 +1,101 @@
<template> <template>
<div> <div class="telly-item">
<VuePicker :data="pickData" :showToolbar="true" @cancel="cancel" @confirm="confirm" <!-- <VuePicker :data="pickData" :showToolbar="true" @cancel="cancel" @confirm="confirm"
:visible.sync="pickerVisible" /> :visible.sync="pickerVisible" /> -->
<telly-picker :value="value3" :pickershow="pickerVisible" :showClear='false' :range="pickData" :rangekey="rangekey3"
:placeholderText="placeholderText" @bindChange="multibindChange" @cancel="cancel" @confirm="multiconfirm">
</telly-picker>
</div> </div>
</template> </template>
<script> <script>
import VuePicker from 'vue-pickers' // import VuePicker from 'vue-pickers'
const tdata = [{ const tdata = [
label: '00', {
"hour": '00',
}, },
{ {
label: '01', "hour": '01',
}, },
{ {
label: '02', "hour": '02',
}, },
{ {
label: '03', "hour": '03',
}, },
{ {
label: '04', "hour": '04',
}, },
{ {
label: '05', "hour": '05',
}, },
{ {
label: '06', "hour": '06',
}, },
{ {
label: '07', "hour": '07',
}, },
{ {
label: '08', "hour": '08',
}, },
{ {
label: '09', "hour": '09',
}, },
{ {
label: '10', "hour": '10',
}, },
{ {
label: '11', "hour": '11',
}, },
{ {
label: '12', "hour": '12',
}, },
{ {
label: '13', "hour": '13',
}, },
{ {
label: '14', "hour": '14',
}, },
{ {
label: '15', "hour": '15',
}, },
{ {
label: '16', "hour": '16',
}, },
{ {
label: '17', "hour": '17',
}, },
{ {
label: '18', "hour":'18',
}, },
{ {
label: '19', "hour": '19',
}, },
{ {
label: '20', "hour": '20',
}, },
{ {
label: '21', "hour": '21',
}, },
{ {
label: '22', "hour": '22',
}, },
{ {
label: '23', "hour": '23',
}, },
] ]
var tdata2 = [{ var tdata2 = [
label: '00', {
"minute": '00',
}, },
{ {
label: '30', "minute": '30',
}, },
] ]
export default { export default {
components: {
VuePicker
},
props: { props: {
visibleShow: Boolean, select:String,
}, },
data() { data() {
return { return {
@ -101,25 +103,60 @@
tdata, tdata,
tdata2 tdata2
], ],
pickerVisible: false, pickerVisible: true,
result: '' // result: '',
dateinfo: {},
placeholderText:this.select,
//dateRange: [],
value3: [0, 0],
rangekey3: ['hour', 'minute'],
} }
}, },
watch: { watch:{
visibleShow(val) { select(val){
this.pickerVisible = val this.placeholderText = val
} }
}, },
methods: { methods: {
cancel() { // cancel() {
this.result = 'click cancel result: null' // this.result = 'click cancel result: null'
this.$emit('update:visibleShow', false); // this.$emit('update:visibleShow', false);
// },
// confirm(res) {
// //console.log("this.result",res[0].label)
// this.$emit('update:visibleShow', false);
// this.$emit('Time', `${res[0].label}:${res[1].label}`);
// }
multiconfirm(e) {
console.log(e)
this.dateinfo = {};
this.dateinfo.year = e[0].hour;
this.dateinfo.month = e[1].minute;
this.$emit('Time', `${e[0].hour}:${e[1].minute}`);
},
//
multibindChange(e) {
console.log(e)
},
//
cancel() {
uni.showToast({
title: "点击了取消"
})
}, },
confirm(res) {
//console.log("this.result",res[0].label)
this.$emit('update:visibleShow', false);
this.$emit('Time', `${res[0].label}:${res[1].label}`);
}
} }
} }
</script> </script>
<style lang="scss" scoped>
/deep/.uni-flex{
display: flex;
justify-content: center;
}
.telly-item {
display: flex;
text-align: center;
padding: 10rpx;
justify-content: center;
}
</style>

View File

@ -1,99 +1,99 @@
<template> <template>
<div> <div class="telly-item">
<VuePicker :data="pickData" :showToolbar="true" @cancel="cancel" @confirm="confirm" <telly-picker :value="value3" :showClear='false' :range="pickData" :rangekey="rangekey3"
:visible.sync="pickerVisible" /> :placeholderText="placeholderText" @bindChange="multibindChange" @cancel="cancel" @confirm="multiconfirm">
</telly-picker>
</div> </div>
</template> </template>
<script> <script>
import VuePicker from 'vue-pickers' //import VuePicker from 'vue-pickers'
const tdata = [{ const tdata = [
label: '00', {
"hour": '00',
}, },
{ {
label: '01', "hour": '01',
}, },
{ {
label: '02', "hour": '02',
}, },
{ {
label: '03', "hour": '03',
}, },
{ {
label: '04', "hour": '04',
}, },
{ {
label: '05', "hour": '05',
}, },
{ {
label: '06', "hour": '06',
}, },
{ {
label: '07', "hour": '07',
}, },
{ {
label: '08', "hour": '08',
}, },
{ {
label: '09', "hour": '09',
}, },
{ {
label: '10', "hour": '10',
}, },
{ {
label: '11', "hour": '11',
}, },
{ {
label: '12', "hour": '12',
}, },
{ {
label: '13', "hour": '13',
}, },
{ {
label: '14', "hour": '14',
}, },
{ {
label: '15', "hour": '15',
}, },
{ {
label: '16', "hour": '16',
}, },
{ {
label: '17', "hour": '17',
}, },
{ {
label: '18', "hour":'18',
}, },
{ {
label: '19', "hour": '19',
}, },
{ {
label: '20', "hour": '20',
}, },
{ {
label: '21', "hour": '21',
}, },
{ {
label: '22', "hour": '22',
}, },
{ {
label: '23', "hour": '23',
}, },
] ]
var tdata2 = [{ var tdata2 = [
label: '00', {
"minute": '00',
}, },
{ {
label: '30', "minute": '30',
}, },
] ]
export default { export default {
components: {
VuePicker
},
props: { props: {
visibleShow: Boolean, select:String,
}, },
data() { data() {
return { return {
@ -101,25 +101,60 @@
tdata, tdata,
tdata2 tdata2
], ],
pickerVisible: false, // result: '',
result: '' dateinfo: {},
//dateRange: [],
placeholderText:this.select,
value3: [0, 0],
rangekey3: ['hour', 'minute'],
} }
}, },
watch: { watch:{
visibleShow(val) { select(val){
this.pickerVisible = val this.placeholderText = val
} }
}, },
methods: { methods: {
cancel() { // cancel() {
this.result = 'click cancel result: null' // this.result = 'click cancel result: null'
this.$emit('update:visibleShow', false); // this.$emit('update:visibleShow', false);
// },
// confirm(res) {
// //console.log("this.result",res[0].label)
// this.$emit('update:visibleShow', false);
// this.$emit('Time', `${res[0].label}:${res[1].label}`);
// },
//
multiconfirm(e) {
console.log(e)
//this.dateinfo = {};
// this.dateinfo.year = e[0].hour;
// this.dateinfo.month = e[1].minute;
this.$emit('Time', `${e[0].hour}:${e[1].minute}`);
},
//
multibindChange(e) {
console.log(e)
},
//
cancel() {
uni.showToast({
title: "点击了取消"
})
}, },
confirm(res) {
//console.log("this.result",res[0].label)
this.$emit('update:visibleShow', false);
this.$emit('Time', `${res[0].label}:${res[1].label}`);
}
} }
} }
</script> </script>
<style lang="scss">
/deep/.uni-flex{
display: flex;
}
.telly-item {
display: flex;
text-align: center;
padding: 10rpx;
justify-content: center;
}
</style>

View File

@ -92,15 +92,15 @@
<text class="title-font">{{ item.serveTime }}</text> <text class="title-font">{{ item.serveTime }}</text>
</view> </view>
<!-- <view class="text-green" v-if="item.status == 1">待支付</view> --> <!-- <view class="text-green" v-if="item.status == 1">待支付</view> -->
<view class="progress-status-fk" v-if="item.status == 2">待服务</view> <view class="progress-status-fk" v-if="item.status == 2">已接单</view>
<view class="progress-status" v-if="item.status == 3">待评价</view> <view class="progress-status" v-if="item.status == 3">待评价</view>
<view class="progress-status-qx" v-if="item.status == 4">已取消</view> <view class="progress-status-qx" v-if="item.status == 4">已取消</view>
<view class="progress-status-wa" v-if="item.status == 5">已完成</view> <view class="progress-status-wa" v-if="item.status == 5">已完成</view>
<view class="progress-status-jx" v-if="item.status == 6">服务中</view> <view class="progress-status-jx" v-if="item.status == 6">服务中</view>
<view class="progress-status-cf" v-if="item.status == 7">技师出发</view> <view class="progress-status-cf" v-if="item.status == 7">出发</view>
<view class="progress-status-dd" v-if="item.status == 8">技师到达</view> <view class="progress-status-dd" v-if="item.status == 8">到达</view>
<view class="progress-status-qr" v-if="item.status ==9&&!item.refusalContent">确认</view> <view class="progress-status-qr" v-if="item.status ==9&&!item.refusalContent">接单</view>
<view class="progress-status-jd" v-if="item.status == 9&&item.refusalContent" >拒单审核</view> <view class="progress-status-jd" v-if="item.status == 9&&item.refusalContent" >拒单审核</view>
<view class="progress-status-daibu" v-if="item.status ==10">待补单</view> <view class="progress-status-daibu" v-if="item.status ==10">待补单</view>
<view v-if="item.overTimeOrders == 1" class="progress-status-chaoshi">[超时]</view> <view v-if="item.overTimeOrders == 1" class="progress-status-chaoshi">[超时]</view>
<!-- <view class="text-green" v-if="item.state ==1 ||item.state ==2">待完成</view> <!-- <view class="text-green" v-if="item.state ==1 ||item.state ==2">待完成</view>
@ -158,7 +158,7 @@
<u-button v-if="item.status == 6&&(item.earlyFinishReason!=null||item.endOfServiceTimer<0)" :custom-style="customStyle1" shape="circle" :plain="true" <u-button v-if="item.status == 6&&(item.earlyFinishReason!=null||item.endOfServiceTimer<0)" :custom-style="customStyle1" shape="circle" :plain="true"
@click="cancel(item)">服务完成</u-button> @click="cancel(item)">服务完成</u-button>
<u-button v-if="item.status == 9&& !item.refusalContent" :custom-style="customStyle1" shape="circle" :plain="true" <u-button v-if="item.status == 9&& !item.refusalContent" :custom-style="customStyle1" shape="circle" :plain="true"
@click="nineState(item.ordersId)">确认接单</u-button> @click="nineState(item.ordersId)">接单</u-button>
<u-button :custom-style="customStyle" shape="circle" :plain="true" <u-button :custom-style="customStyle" shape="circle" :plain="true"
@click="goChat">联系客服</u-button> @click="goChat">联系客服</u-button>
</view> </view>
@ -271,7 +271,7 @@
noactivityTitleTextProps: { noactivityTitleTextProps: {
class: 'noactivityTitleTextProps', class: 'noactivityTitleTextProps',
}, },
name: '待服务', name: '已接单',
status: '2' status: '2'
}, { }, {
activityImageProps: { activityImageProps: {
@ -316,8 +316,8 @@
status: 1, status: 1,
nickName: '', nickName: '',
customStyle: { customStyle: {
color: '#999999', color: '#029D88',
border: '2rpx solid #999999', border: '2rpx solid #029D88',
// backgroundColor: '#1E1F31', // backgroundColor: '#1E1F31',
border: "8rpx", border: "8rpx",
width: '180rpx', width: '180rpx',
@ -596,7 +596,7 @@
}) })
} }
}, },
nineState(ordersId){// nineState(ordersId){//
var that=this; var that=this;
that.$Request.getT("/app/artificer/jishiQueren",{ that.$Request.getT("/app/artificer/jishiQueren",{
ordersId:ordersId ordersId:ordersId
@ -604,7 +604,7 @@
if (res.code == 200) { if (res.code == 200) {
console.log("asdsad") console.log("asdsad")
uni.showToast({ uni.showToast({
title:'已确认接单' title:'已接单'
}) })
that.mescroll.resetUpScroll() that.mescroll.resetUpScroll()
} else { } else {

View File

@ -3,20 +3,20 @@
<view class="padding bg radius margin"> <view class="padding bg radius margin">
<view class="padding-top">发布内容</view> <view class="padding-top">发布内容</view>
<view class="margin-tb-sm"> <view class="margin-tb-sm">
<u-input v-model="form.describes" style="border-radius: 20rpx;" <u-input v-model="form.describes" style="border-radius: 20rpx;" type="textarea" height="200"
type="textarea" height="200" placeholde="请填写发布内容" maxlengt="200" :clearable="false" /> placeholde="请填写发布内容" maxlengt="200" :clearable="false" />
</view> </view>
</view> </view>
<view class=" padding bg radius margin"> <view class=" padding bg radius margin">
<view class="margin-top-sm">上传视频</view> <view class="margin-top-sm">上传视频</view>
<view class="flex" style="overflow: hidden;flex-wrap: wrap;"> <view class="flex" style="overflow: hidden;flex-wrap: wrap;">
<view class="margin-top flex margin-right-sm flex-wrap" v-if="videosList"> <view class="margin-top flex margin-right-sm flex-wrap" v-if="videosList">
<view class="flex" style="width: 200rpx;height: 200rpx;margin-right: 5rpx;position: relative;"> <view class="flex" style="width: 200rpx;height: 200rpx;margin-right: 5rpx;position: relative;">
<video style="width: 100%;height: 100%;" :src="videosList"></video> <video style="width: 100%;height: 100%;" :src="videosList"></video>
<view style="z-index: 9;position: absolute;top: -15rpx;right: -15rpx;" @click="headVideoremove"> <view style="z-index: 9;position: absolute;top: -15rpx;right: -15rpx;" @click="headVideoremove">
<u-icon name="close-circle-fill" color="#d81e06" size="50rpx"></u-icon> <u-icon name="close-circle-fill" color="#d81e06" size="50rpx"></u-icon>
</view>
</view> </view>
</view>
</view> </view>
</view> </view>
<view class="margin-top" @click="addvideo" v-if="videosList.length<=0"> <view class="margin-top" @click="addvideo" v-if="videosList.length<=0">
@ -34,12 +34,13 @@
<view class="margin-top-sm">视频封面</view> <view class="margin-top-sm">视频封面</view>
<view class="flex" style="overflow: hidden;flex-wrap: wrap;"> <view class="flex" style="overflow: hidden;flex-wrap: wrap;">
<view class="margin-top flex margin-right-sm flex-wrap" v-if="form.headImg && form.headImg.length"> <view class="margin-top flex margin-right-sm flex-wrap" v-if="form.headImg && form.headImg.length">
<view class="flex" style="width: 200rpx;height: 200rpx;margin-right: 5rpx;position: relative;"> <view class="flex" style="width: 200rpx;height: 200rpx;margin-right: 5rpx;position: relative;">
<image :src="form.headImg" style="width: 100%;height: 100%;"></image> <image :src="form.headImg" style="width: 100%;height: 100%;"></image>
<view style="z-index: 9;position: absolute;top: -15rpx;right: -15rpx;" @click="headImgremove(index)"> <view style="z-index: 9;position: absolute;top: -15rpx;right: -15rpx;"
<u-icon name="close-circle-fill" color="#d81e06" size="50rpx"></u-icon> @click="headImgremove(index)">
</view> <u-icon name="close-circle-fill" color="#d81e06" size="50rpx"></u-icon>
</view> </view>
</view>
</view> </view>
</view> </view>
<view class="margin-top" @click="addImage" v-if="form.headImg.length<=0"> <view class="margin-top" @click="addImage" v-if="form.headImg.length<=0">
@ -48,14 +49,13 @@
<view class="text-center"> <view class="text-center">
<image src="../../static/images/my/avatar.png" style="width: 80rpx;height: 80rpx;"></image> <image src="../../static/images/my/avatar.png" style="width: 80rpx;height: 80rpx;"></image>
</view> </view>
<view class="text-center add-word">添加头像</view> <view class="text-center add-word">添加封面</view>
</view> </view>
</view> </view>
</view> </view>
</view> </view>
<view class="push-button"> <view class="push-button">
<view class="tabbar" <view class="tabbar" @click="submit()">发布
@click="submit()">发布
</view> </view>
</view> </view>
</view> </view>
@ -70,16 +70,15 @@
form: { form: {
// //
headImg: '', headImg: '',
}, },
// //
headImg: [], headImg: [],
videos: [], videos: [],
videosList:'' videosList: ''
} }
}, },
onLoad(e) { onLoad(e) {},
},
methods: { methods: {
headImgremove(index) { headImgremove(index) {
this.form.headImg = '' this.form.headImg = ''
@ -104,14 +103,14 @@
}) })
return return
} }
if (!this.form.headImg) { // if (!this.form.headImg) {
uni.showToast({ // uni.showToast({
title: '请上视频封面', // title: '',
icon: 'none', // icon: 'none',
duration: 1000 // duration: 1000
}) // })
return; // return;
} // }
let data = { let data = {
createBy: uni.getStorageSync("userId"), createBy: uni.getStorageSync("userId"),
filePath: this.videosList, filePath: this.videosList,
@ -137,7 +136,7 @@
} }
}); });
}, },
addvideo(e){ addvideo(e) {
let that = this let that = this
uni.chooseVideo({ uni.chooseVideo({
count: 1, count: 1,
@ -147,77 +146,114 @@
for (let i = 0; i < that.videos.length; i++) { for (let i = 0; i < that.videos.length; i++) {
that.$queue.showLoading("上传中..."); that.$queue.showLoading("上传中...");
uni.getFileInfo({ uni.getFileInfo({
filePath: that.videos[i], filePath: that.videos[i],
success: (infoRes) => { success: (infoRes) => {
const size = infoRes.size; const size = infoRes.size;
if (size / 1024 / 1024 > 10) { if (size / 1024 / 1024 > 10) {
// 2MB // 2MB
uni.showToast({ uni.showToast({
icon:'error', icon: 'error',
title:'视频超出10MB限制,请重新选择' title: '视频超出10MB限制,请重新选择'
}) })
} else { } else {
// 2MB //
uni.uploadFile({ // this.onLoadedMetadata(res.tempFilePath);
url: websocketUtils.uploadFileUrl(), //
filePath: that.videos[i], // 2MB
name: 'file', uni.uploadFile({ //
success: (uploadFileRes) => { url: websocketUtils.uploadFileUrl(), //
that.videosList = JSON.parse(uploadFileRes.data).data filePath: that.videos[i],
console.log("that.videosList",that.videosList) name: 'file',
uni.hideLoading(); success: (uploadFileRes) => {
} that.videosList = JSON.parse(
}); uploadFileRes.data).data
} console.log("that.videosList", that
}, .videosList)
fail: () => { uni.hideLoading();
console.log("上传是被") }
// callback(false); });
} }
},
fail: () => {
console.log("上传失败")
// callback(false);
}
}); });
} }
} }
}) })
}, },
onLoadedMetadata(tempFilePath) {
let that = this
const canvas = document.createElement('canvas');
// Canvas
canvas.width = 295;
canvas.height = 355;
console.log(canvas);
const context = canvas.getContext('2d');
const video = document.createElement('video');
video.src = tempFilePath;
//
video.play().then(() => {
video.pause();
// canvas
context.drawImage(video, 0, 0, canvas.width, canvas.height);
// canvasbase64
const base64Image = canvas.toDataURL('image/png');
// base64Image
that.checkImageSize(base64Image, (isValid) => {
if (isValid) {
//
console.log('图片校验通过,可以上传');
} else {
console.log('图片超出大小限制,请重新选择');
}
});
}).catch(error => {
console.error('无法播放视频:', error);
});
},
// //
checkImageSize(filePath, callback) { checkImageSize(filePath, callback) {
let that = this let that = this
uni.getFileInfo({ uni.getFileInfo({
filePath: filePath, filePath: filePath,
success: (infoRes) => { success: (infoRes) => {
const size = infoRes.size; const size = infoRes.size;
if (size / 1024 / 1024 > 2) { if (size / 1024 / 1024 > 2) {
// 2MB // 2MB
uni.showToast({ uni.showToast({
icon:'error', icon: 'error',
title:'图片超出2MB限制,请重新选择' title: '图片超出2MB限制,请重新选择'
}) })
callback(false); callback(false);
} else { } else {
// 2MB // 2MB
this.uploadImage(filePath) this.uploadImage(filePath)
callback(true); callback(true);
} }
}, },
fail: () => { fail: () => {
callback(false); callback(false);
} }
}); });
}, },
// //
uploadImage(filePath) { uploadImage(filePath) {
console.log("filePath",filePath) console.log("filePath", filePath)
let that = this let that = this
uni.uploadFile({ // uni.uploadFile({ //
url: websocketUtils.uploadFileUrl(), // url: websocketUtils.uploadFileUrl(), //
filePath: filePath, filePath: filePath,
name: 'file', name: 'file',
success: (uploadFileRes) => { success: (uploadFileRes) => {
that.form.headImg = JSON.parse(uploadFileRes.data).data that.form.headImg = JSON.parse(uploadFileRes.data).data
uni.hideLoading(); uni.hideLoading();
} }
}); });
}, },
addImage() { addImage() {
let that = this let that = this
@ -226,14 +262,14 @@
sourceType: ['album', 'camera'], sourceType: ['album', 'camera'],
success: res => { success: res => {
that.$queue.showLoading("上传中..."); that.$queue.showLoading("上传中...");
var tempFilePaths=res.tempFilePaths[0] var tempFilePaths = res.tempFilePaths[0]
that.checkImageSize(tempFilePaths, (isValid) => { that.checkImageSize(tempFilePaths, (isValid) => {
if (isValid) { if (isValid) {
// //
console.log('图片校验通过,可以上传'); console.log('图片校验通过,可以上传');
} else { } else {
console.log('图片超出大小限制,请重新选择'); console.log('图片超出大小限制,请重新选择');
} }
}); });
} }
}) })
@ -249,15 +285,17 @@
.bg { .bg {
width: 94%; width: 94%;
margin:20rpx auto; margin: 20rpx auto;
background-color: #FFFFFF; background-color: #FFFFFF;
padding: 20rpx 36rpx; padding: 20rpx 36rpx;
border-radius: 26rpx; border-radius: 26rpx;
} }
.add-word{
.add-word {
font-size: 26rpx; font-size: 26rpx;
color: #afb5c1; color: #afb5c1;
} }
.skbox {} .skbox {}
.skleft { .skleft {
@ -291,28 +329,30 @@
line-height: 78upx; line-height: 78upx;
/* background: #f7f7f7; */ /* background: #f7f7f7; */
} }
.push-button{
width: 100%; .push-button {
height: 48px; width: 100%;
position: fixed; height: 48px;
bottom: 0px; position: fixed;
display: flex; bottom: 0px;
flex-direction: column; display: flex;
align-items: center; flex-direction: column;
margin: 0 auto; align-items: center;
margin: 0 auto;
} }
.tabbar { .tabbar {
display: inline-block; display: inline-block;
width: 92%; width: 92%;
margin: 0 auto; margin: 0 auto;
text-align: center; text-align: center;
background: linear-gradient(90deg, #019C88, #28BA92, #35C495); background: linear-gradient(90deg, #019C88, #28BA92, #35C495);
height: 40px; height: 40px;
border-radius: 28px; border-radius: 28px;
color: #ffffff; color: #ffffff;
line-height: 40px; line-height: 40px;
margin-top: 4px; margin-top: 4px;
font-size: 17px; font-size: 17px;
} }
.popup_pay { .popup_pay {
@ -347,7 +387,8 @@
.bgCol2 { .bgCol2 {
color: #557EFD; color: #557EFD;
} }
.video-img{
.video-img {
width: 200rpx; width: 200rpx;
height: 200rpx; height: 200rpx;
background: #f7f8fa; background: #f7f8fa;