DESKTOP-SORBLEM\xuyay 2 years ago
commit 2a1fab6716

@ -190,6 +190,9 @@
this.to_date = this.$moment(this.from_date).add(this.days - 1, 'd').format("YYYY-MM-DD");
},
toSave(){
this.$u.throttle(this.submitOrder, 500)
},
submitOrder() {
var that = this;
if (!this.$u.test.mobile(this.mobile)) {
@ -220,7 +223,10 @@
data: data,
method: 'POST',
utilSuccess: function(e) {
that.loadPage(1);
uni.$u.route('/packages/packagesPro/pages/proBuySuccess/orderSuccess', {
id: e.id
});
},
utilFail: function(e) {
util.alert(e);

@ -1,8 +1,85 @@
<template>
<view style="background-color: aliceblue;height: 100vh;overflow: hidden;">
<view style="margin: 100rpx auto;text-align: center;">
<image style="width: 117rpx;height: 134rpx;" src="../../../../static/resource/icon/icon_success.png">
</image>
</view>
<view style="margin: 40rpx auto;display: flex;justify-content: center;">
<view class="btn btnlogin" style="margin: 40rpx auto;" @click="toOrder">
<text>查看订单</text>
<image src="../../static/resource/imgs/btn_bg.png" class="btnbg"></image>
</view>
</view>
<view class="btn btnCancel" style="margin: 40rpx auto;" @click="toback">
<text>返回首页</text>
</view>
</view>
</template>
<script>
import util from "../../../../utils/util.js";
export default {
data() {
return {
id: ""
}
},
onShareAppMessage() {},
onLoad() {
},
onReady() {},
onHide() {},
methods: {
toOrder() {
var that = this;
uni.navigateTo({
url: "/packages/packagesOrder/pages/orderInfo/index?id=" + that.id
})
},
toback: function() {
uni.switchTab({
url: '/pages/index/index'
});
}
}
}
</script>
<style>
.btn {
border-radius: 36rpx 36rpx 36rpx 36rpx;
height: 72rpx;
width: 347rpx;
font-weight: 300;
font-size: 26rpx;
line-height: 72rpx;
text-align: center;
position: relative;
}
.btnbg {
width: 400rpx;
height: 76rpx;
position: absolute;
bottom: -36rpx;
left: -27rpx;
}
.btnlogin {
background: linear-gradient(90deg, #0ee2ba, #67f7dc);
color: #fff !important;
}
.btnCancel {
background: #fff;
color: #303233;
}
</style>

@ -1,35 +1,27 @@
<template>
<view class="wrap">
<view class="clearfix procarefilter">
<text class="filteritem active">按年龄
<text class="filteritem" @click="tochange(index)" :class="{active:item.isActive}"
v-for="(item,index) in listfilter" :key="index">
{{item.text}}
<text class="arrow">
<text class="arrowicon arrowup on"></text>
<text class="arrowicon arrowdown on"></text>
</text>
</text>
<text class="filteritem">按护理经验
<text class="arrow">
<text class="arrowicon arrowup"></text>
<text class="arrowicon arrowdown"></text>
</text>
</text>
<text class="filteritem">按评价
<text class="arrow">
<text class="arrowicon arrowup"></text>
<text class="arrowicon arrowdown"></text>
<text class="arrowicon arrowup" :class="{on:(item.up&&item.isActive)}"></text>
<text class="arrowicon arrowdown " :class="{on:(!item.up&&item.isActive)}"></text>
</text>
</text>
</view>
<view class="procarelist">
<!-- 1条数据开始 -->
<view class="procarelist-item">
<view class="procarelist-item" v-for="(item,index) in list" :key="index" @click="toDetail(item.id)">
<view class="clearfix procarelist-top">
<view class="procarelist-img">
<image src="../../../../static/resource/icon/icon_face.jpg"></image>
<image :src="item.avatar_url"></image>
</view>
<view class="procarelist-info">
<view class="procarelist-title">张阿姨</view>
<view class="procarelist-brief"><text class="age orangecolor">58</text><text class="experance orangecolor">5</text>护理经验</view>
<view class="procarelist-title">{{item.name}}</view>
<view class="procarelist-brief">{{item.sex}}<text
class="age orangecolor">{{item.age}}</text><text
class="experance orangecolor">{{item.work_years}}</text>护理经验</view>
<view class="clearfix procarelist-service">
<view class="procarelist-number">已经用心服务过<text class="orangecolor">20</text>个患者 </view>
<view class="procarelist-level">
@ -41,145 +33,151 @@
</view>
</view>
</view>
</view>
<view class="procarelist-bottom">
<view class="procarelist-range">服务范围:</view>
<view class="procarelist-rangelist">
<text>生活照顾</text>
<text>生活照顾</text>
<text>生活照顾</text>
<text>生活照顾</text>
</view>
</view>
</view>
<!-- 1条数据结束 -->
<!-- 2条数据开始 -->
<view class="procarelist-item">
<view class="clearfix procarelist-top">
<view class="procarelist-img">
<image src="../../../../static/resource/icon/icon_face.jpg"></image>
</view>
<view class="procarelist-info">
<view class="procarelist-title">张阿姨</view>
<view class="procarelist-brief"><text class="age orangecolor">58</text><text class="experance orangecolor">5</text>护理经验</view>
<view class="clearfix procarelist-service">
<view class="procarelist-number">已经用心服务过<text class="orangecolor">20</text>个患者 </view>
<view class="procarelist-level">
<text class="on"></text>
<text></text>
<text></text>
<text></text>
<text></text>
</view>
</view>
</view>
</view>
<view class="procarelist-bottom">
<view class="procarelist-range">服务范围:</view>
<view class="procarelist-rangelist">
<text>生活照顾</text>
<text>生活照顾</text>
<text>生活照顾</text>
<text>生活照顾</text>
</view>
</view>
</view>
<!-- 2条数据结束 -->
<!-- 3条数据开始 -->
<view class="procarelist-item">
<view class="clearfix procarelist-top">
<view class="procarelist-img">
<image src="../../../../static/resource/icon/icon_face.jpg"></image>
</view>
<view class="procarelist-info">
<view class="procarelist-title">张阿姨</view>
<view class="procarelist-brief"><text class="age orangecolor">58</text><text class="experance orangecolor">5</text>护理经验</view>
<view class="clearfix procarelist-service">
<view class="procarelist-number">已经用心服务过<text class="orangecolor">20</text>个患者 </view>
<view class="procarelist-level">
<text class="on"></text>
<text></text>
<text></text>
<text></text>
<text></text>
</view>
</view>
</view>
</view>
<view class="procarelist-bottom">
<view class="procarelist-range">服务范围:</view>
<view class="procarelist-rangelist">
<text>生活照顾</text>
<text>生活照顾</text>
<text>生活照顾</text>
<text>生活照顾</text>
</view>
</view>
</view>
<!-- 3条数据结束 -->
<!-- 4条数据开始 -->
<view class="procarelist-item">
<view class="clearfix procarelist-top">
<view class="procarelist-img">
<image src="../../../../static/resource/icon/icon_face.jpg"></image>
</view>
<view class="procarelist-info">
<view class="procarelist-title">张阿姨</view>
<view class="procarelist-brief"><text class="age orangecolor">58</text><text class="experance orangecolor">5</text>护理经验</view>
<view class="clearfix procarelist-service">
<view class="procarelist-number">已经用心服务过<text class="orangecolor">20</text>个患者 </view>
<view class="procarelist-level">
<text class="on"></text>
<text></text>
<text></text>
<text></text>
<text></text>
</view>
</view>
</view>
</view>
<view class="procarelist-bottom">
<view class="procarelist-range">服务范围:</view>
<view class="procarelist-rangelist">
<text>生活照顾</text>
<text>生活照顾</text>
<text>生活照顾</text>
<text>生活照顾</text>
<text>陪床照拂</text>
<text>其他</text>
</view>
</view>
</view>
<!-- 4条数据结束 -->
<!-- 1条数据结束 -->
</view>
</view>
</template>
<script>export default {
<script>
import util from "../../../../utils/util.js";
export default {
data() {
return {
list: [],
currentPage: 0,
host: '',
loading: true,
selectProjectID: "",
listfilter: [{
text: "按年龄",
isActive: true,
up: false,
order_by: "age",
}, {
text: "按护理经验",
isActive: false,
up: false,
order_by: "work_years",
}, {
text: "按评价",
isActive: false,
up: false,
order_by: "stars",
}],
order_by: "age",
asc_or_desc: "desc"
}
},
onPullDownRefresh: function() {
this.loadData(1);
},
onReachBottom: function() {
this.loadData(this.currentPage + 1);
},
onShareAppMessage() {},
onLoad() {
var that = this;
this.host = util.HOST
that.selectProjectID = getApp().globalData.selectedProject.id ?? 1;
this.loadData(1)
},
onReady() {},
onHide() {},
methods: {
tochange(index) {
for (var mod of this.listfilter) {
mod.isActive = false;
}
this.listfilter[index].isActive = true;
this.listfilter[index].up = !this.listfilter[index].up;
this.order_by = this.listfilter[index].order_by;
this.asc_or_desc = this.listfilter[index].up ? "asc" : "desc";
this.loadData(1);
},
toDetail(id) {
uni.navigateTo({
url: "/packages/packagesPro/pages/proCarerInfo/info?id="+id
});
},
loadData: function(n) {
var that = this;
var url = 'customer/get-project-paramedics/' + that.selectProjectID
util.request({
api: url,
data: {
page: n,
page_size: 10,
order_by: that.order_by,
asc_or_desc: that.asc_or_desc
},
utilSuccess: function(t) {
var o = t.data;
uni.stopPullDownRefresh();
if ((that.list.length < 10 && n > 1) || (0 == o.length && n > 1)) {
uni.showToast({
title: '已加载到最后一页',
icon: 'none'
});
} else {
var s;
var i = that.list;
if (1 == n) {
i = o;
} else {
(s = i).push.apply(s, o);
}
console.log(i);
that.currentPage = n
that.list = i
that.loading = false
}
},
utilFail: function(e) {
uni.stopPullDownRefresh();
if (1 == n) {
that.currentPage = n
}
util.alert(e);
}
});
},
}
}
</script>
</script>
<style style="text/css" scoped>
.clearfix:after{ content: ""; display:block; height: 0; clear: both; visibility: hidden;}
.wrap{
.clearfix:after {
content: "";
display: block;
height: 0;
clear: both;
visibility: hidden;
}
.wrap {
width: 100%;
background: #e7f5f4;
padding: 0 30rpx 30rpx;
position: relative;
}
.procarefilter{
.procarefilter {
width: 100%;
padding-top: 33rpx;
padding-bottom: 33rpx;
@ -190,19 +188,22 @@
z-index: 10;
background: #e7f5f4;
}
.filteritem{
.filteritem {
float: left;
width: 33.33%;
font-size: 32rpx;
text-align: center;
color: #303233;
}
.arrow{
.arrow {
position: relative;
width: 16rpx;
margin-left: 10rpx;
}
.arrowicon{
.arrowicon {
position: absolute;
left: 0;
width: 16rpx;
@ -212,39 +213,46 @@
background-repeat: no-repeat;
background-size: 100% auto;
}
.arrowup{
.arrowup {
top: 9rpx;
}
.arrowicon.arrowdown{
.arrowicon.arrowdown {
bottom: 9rpx;
transform: rotate(180deg);
background-image: url(../../../../static/resource/icon/icon_gray_arrow.png);
}
.filteritem.active{
.filteritem.active {
color: #f88a64;
}
.filteritem.active .arrowicon.arrowup.on{
.filteritem.active .arrowicon.arrowup.on {
transform: rotate(-180deg);
background-image: url(../../../../static/resource/icon/icon_orange_arrow.png);
}
.filteritem.active .arrowicon.arrowdown.on{
.filteritem.active .arrowicon.arrowdown.on {
transform: none;
background-image: url(../../../../static/resource/icon/icon_orange_arrow.png);
}
.procarelist{
.procarelist {
padding-top: 98rpx;
}
.procarelist-item{
.procarelist-item {
background: #fff;
box-shadow: 0 2rpx 20rpx rgba(86,98,109,.16);
box-shadow: 0 2rpx 20rpx rgba(86, 98, 109, .16);
border-radius: 4rpx;
margin-bottom: 30rpx;
padding: 24rpx 20rpx 10rpx;
}
.procarelist-top{
}
.procarelist-img{
.procarelist-top {}
.procarelist-img {
float: left;
width: 148rpx;
height: 148rpx;
@ -252,44 +260,54 @@
border-radius: 50%;
overflow: hidden;
}
.procarelist-img image{
.procarelist-img image {
width: 148rpx;
height: 148rpx;
border-radius: 50%;
}
.procarelist-info{
.procarelist-info {
float: right;
width: 72.3%;
padding-top: 15rpx;
}
.procarelist-title{
.procarelist-title {
font-size: 26rpx;
color: #303233;
margin-bottom: 12rpx;
}
.procarelist-brief{
.procarelist-brief {
font-size: 24rpx;
color: #303233;
}
.orangecolor{
.orangecolor {
color: #f88a64;
}
.procarelist-brief text{
.procarelist-brief text {
margin-left: 46rpx;
}
.procarelist-service{
.procarelist-service {
margin-top: 12rpx;
}
.procarelist-number{
.procarelist-number {
float: left;
font-size: 24rpx;
color: #303233;
}
.procarelist-level{
.procarelist-level {
float: right;
margin-top: 1rpx;
}
.procarelist-level text{
.procarelist-level text {
display: inline-block;
width: 25rpx;
height: 24rpx;
@ -299,24 +317,29 @@
background-size: 100% auto;
margin: 0 2rpx;
}
.procarelist-level text.on{
.procarelist-level text.on {
background-image: url(../../../../static/resource/icon/star_on.png);
}
.procarelist-bottom{
.procarelist-bottom {
overflow: hidden;
padding-top: 26rpx;
}
.procarelist-range{
.procarelist-range {
float: left;
font-size: 26rpx;
color: #000;
margin-top: 6rpx;
}
.procarelist-rangelist{
.procarelist-rangelist {
float: right;
width: 72.3%;
}
.procarelist-rangelist text{
.procarelist-rangelist text {
width: 37.2%;
margin-right: 6.38%;
height: 48rpx;
@ -332,5 +355,4 @@
background-origin: padding-box, border-box;
background-image: linear-gradient(to right, #e7f5f4, #e7f5f4), linear-gradient(90deg, #0ee2ba, #66f7db);
}
</style>
Loading…
Cancel
Save