diff --git a/api/newFun.js b/api/newFun.js
index 30d2462..1bae1db 100644
--- a/api/newFun.js
+++ b/api/newFun.js
@@ -1,4 +1,49 @@
-import request from '@/utils/request'
+import request from '@/utils/request'
+
+// 上门回收 回收列表
+export const recoveryRecoveryList = (param) => {
+ return request.post('recovery/recoveryList', param)
+}
+
+// 上门回收 回收分类
+export const recoveryCategoryList = (param) => {
+ return request.post('recovery/categoryList', param)
+}
+
+// 服务 服务订单完成
+export const serverConfirmSuccess = (param) => {
+ return request.post('server/confirmSuccess', param)
+}
+
+// 服务 服务订单详情
+export const serverOrderDetails = (param) => {
+ return request.post('server/orderDetails', param)
+}
+
+// 服务 服务订单派单
+export const serverDispatchOrders = (param) => {
+ return request.post('server/dispatchOrders', param)
+}
+
+// 服务 服务订单列表 派单
+export const serverGetEngineer = (param) => {
+ return request.post('server/getEngineer', param)
+}
+
+// 服务 服务订单列表 取消
+export const serverCancelOrder = (param) => {
+ return request.post('server/cancelOrder', param)
+}
+
+// 服务 服务订单列表 服务订单状态
+export const serverOrderInfoStatus = (param) => {
+ return request.post('server/orderStatus', param)
+}
+
+// 服务 服务订单列表
+export const serverOrderList = (param) => {
+ return request.post('server/orderList', param)
+}
// 服务 创建服务订单 服务订单支付信息
export const serverOrderInfo = (param) => {
diff --git a/pages.json b/pages.json
index 75d5809..c9eb096 100644
--- a/pages.json
+++ b/pages.json
@@ -757,6 +757,25 @@
"navigationBarTitleText": "确认服务订单",
"enablePullDownRefresh": false
}
+ },{
+ "path": "recycling/orderList",
+ "style": {
+ "navigationBarTitleText": "我的订单",
+ "enablePullDownRefresh": true
+ }
+ },{
+ "path": "recycling/orderDetail",
+ "style": {
+ "navigationBarTitleText": "订单详情",
+ "navigationStyle": "custom",
+ "enablePullDownRefresh": false
+ }
+ },{
+ "path": "recycling/pay",
+ "style": {
+ "navigationBarTitleText": "支付方式",
+ "enablePullDownRefresh": false
+ }
},
{
"path": "recycling/timer",
diff --git a/pages/news/recycling/confirm.vue b/pages/news/recycling/confirm.vue
index 0f8ceff..32fdbcb 100644
--- a/pages/news/recycling/confirm.vue
+++ b/pages/news/recycling/confirm.vue
@@ -64,7 +64,7 @@
优惠券
- {{couponIndex >= 0? couponList[couponIndex].name:(couponList.length > 0?'请选择优惠券':'暂无优惠券')}}
+ {{couponIndex >= 0? couponList[couponIndex].name:(couponList.length > 0?(couponIndex == -9998?'不使用优惠券':'请选择优惠券'):'暂无优惠券')}}
@@ -159,15 +159,13 @@
¥{{pay_price}}元
提交订单
-
-
优惠券列表
- 不使用
+ 不使用
{{a.name}}
@@ -229,23 +227,9 @@
}
},
methods: {
- clickPay(i){
- if(this.list2[i].method == "balance"){
- console.log(this.orderInfo.pay_price <= this.userInfo.balance)
- console.log(this.orderInfo.pay_price , this.userInfo.balance)
- if(Number(this.orderInfo.pay_price) <= Number(this.userInfo.balance)){
- this.toPay()
- }else{
- uni.showToast({
- icon: "none",
- title: "余额不足,请选择其他支付方式"
- })
- }
- }
- },
tabMItem(a,i) {
this.couponIndex = i
- this.coupon_id = a.coupon_id
+ this.coupon_id = (a?a.coupon_id:"")
this.isShow = false;
this.getServerCheckOrder(1)
},
@@ -258,17 +242,12 @@
if(status == 200){
this.info = data.info
this.couponList= data.coupon_list;
-
this.coupon_id= data.coupon_id
this.coupon_money= data.coupon_money
this.pay_price= data.pay_price
+ console.log(this.couponIndex)
}
},
- closeAction() {
- uni.redirectTo({
- url: "/pages/news/recycling/order"
- })
- },
confirm(e){
this.server_time = e.year+"-"+e.month+'-'+e.day+" "+e.hour+"-"+e.minute+'-'+e.second
},
@@ -285,10 +264,6 @@
}else if(i == 2) {
this.isShow = true
}else if(i == 3) {
- if(this.orderInfo.pay_price){
- this.show2 = true
- return ;
- }
if(!this.server_time){
uni.showToast({
icon: "none",
@@ -309,6 +284,13 @@
title: "联系号码不能为空"
})
return ;
+ }
+ if (!/^1[2|3|4|5|6|7|8|9]\d{9}$/.test(this.mobile)) {
+ uni.showToast({
+ icon: "none",
+ title: "联系号码格式不正确"
+ })
+ return ;
}
if(this.region.length == 0){
uni.showToast({
@@ -332,34 +314,10 @@
}else if(i == 5){
this.remake = a
}else {
- uni.redirectTo({
- url: "/pages/news/recycling/order"
- })
- }
- },
- //去支付
- async toPay() {
- const {status, message} = await newFunApi.serverOrderPay({
- order_id: this.order_id,
- method: 'balance',
- client: "MP-WEIXIN",
- })
- if(status == 200) {
- uni.showToast({
- title: "支付成功"
- })
- setTimeout(()=>{
- uni.redirectTo({
- url: "/pages/news/recycling/order"
- })
- },1000)
- }else{
- uni.showToast({
- icon: "none",
- title: message
- })
+
}
},
+
//创建订单
async toServerCreateOrder() {
let {status, data, message } = await newFunApi.serverCreateOrder({
@@ -375,44 +333,23 @@
if(status == 200){
this.isClick = true
this.order_id = data.order_id
- this.toServerOrder(data.order_id)
- }else{
- this.isClick = true
- uni.showToast({
- icon: "none",
- title: message
+ uni.redirectTo({
+ url: "/pages/news/recycling/pay?type=fuwu&order_id="+data.order_id
})
- }
- },
- //创建支付方式信息
- async toServerOrder(order_id) {
- let {status, data, message } = await newFunApi.serverOrderInfo({
- client: 'MP-WEIXIN',
- order_id
- })
- if(status == 200){
- this.isClick = true
- this.userInfo = data.personal
- this.orderInfo = data.order
- if(data.paymentMethods && data.paymentMethods.length > 0){
- data.paymentMethods.map(a=>{
- if(a.method=='wechat'){
- a.text = "微信支付"
- }else if(a.method=='balance'){
- a.text = "余额支付"+"(余额:"+data.personal.balance+"元)"
- }
- })
- }
- this.list2 = data.paymentMethods;
- this.show2 = true;
}else{
this.isClick = true
uni.showToast({
icon: "none",
title: message
})
+ setTimeout(()=>{
+ uni.redirectTo({
+ url: "/pages/news/recycling/orderList"
+ })
+ },2000)
}
- },
+ },
+
}
}
diff --git a/pages/news/recycling/detail.vue b/pages/news/recycling/detail.vue
index 829b6fc..f6c0952 100644
--- a/pages/news/recycling/detail.vue
+++ b/pages/news/recycling/detail.vue
@@ -6,11 +6,14 @@
- ¥{{type== 1?info.server_price:'待评估'}}
+ ¥{{info.server_price}}
+ 免支付预约
已售{{info.sold}}
- {{info.server_name}}
- {{info.server_category}}
+ {{info.server_name}}
+ {{info.server_category}}
+ {{info.recovery_name}}
+ {{info.recovery_category}}
24小时客服
@@ -32,7 +35,7 @@
上门服务
{{selector[tabIndex]}}
-
@@ -75,18 +78,19 @@
购物车
-->
- 立即预约
+ 立即预约
+ 立即预约
+
+
diff --git a/pages/news/recycling/orderList.vue b/pages/news/recycling/orderList.vue
new file mode 100644
index 0000000..8dbcbaa
--- /dev/null
+++ b/pages/news/recycling/orderList.vue
@@ -0,0 +1,665 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 全部
+
+
+
+ {{item.name}}
+
+
+
+
+
+
+
+ 订单号:{{item.order_no}}
+ {{item.order_status_text}}
+
+
+
+
+ {{item.server_name}}
+
+ x1
+
+ ¥
+ {{item.pay_price}}
+
+
+
+
+
+
+ 共计:
+ ¥{{item.pay_price}}
+
+
+
+ 取消订单
+ 去支付
+ 去派单
+ 立即完成
+ 已完成
+ 已取消
+
+
+
+
+
+
+
+ 订单筛选
+
+
+
+
+ 下单时间
+
+
+
+ -
+
+
+
+
+
+ 来源
+
+
+
+ {{item.name}}
+
+
+
+
+
+ 支付方式
+
+
+
+ {{item.name}}
+
+
+
+
+
+
+ 重置
+
+
+ 确定
+
+
+
+
+
+
+
+
+
+
+
diff --git a/pages/news/recycling/pay.vue b/pages/news/recycling/pay.vue
new file mode 100644
index 0000000..132fd01
--- /dev/null
+++ b/pages/news/recycling/pay.vue
@@ -0,0 +1,187 @@
+
+
+
+ 订单号:{{order_id}}
+ 支付价格:¥{{orderInfo.pay_price}}元
+
+
+ 选择支付方式
+
+
+
+ {{a.method == 'wechat'?'微信支付':'余额支付'}}(余额:{{userInfo.balance}})
+
+
+ 确认支付
+
+
+
+
+
+
diff --git a/pages/news3/dispatch.vue b/pages/news3/dispatch.vue
index 59e9664..689b155 100644
--- a/pages/news3/dispatch.vue
+++ b/pages/news3/dispatch.vue
@@ -4,14 +4,14 @@
- 上门回收服务
+ {{info.server_name}}
x1
¥
- 288
+ {{info.pay_price}}
@@ -19,27 +19,109 @@
接单师傅
-
- 请选择接单师傅
+
+ {{tabIndex>=0?list[tabIndex].real_name:'请选择接单师傅'}}
-
+
+
+ 选择工程师
+
+
+ {{a.real_name}}
+
+
+
+
+
确认派单
@@ -49,6 +131,96 @@ page{
min-height: 100%;
background-color: #F7F8FA;
}
+.goods-classify{
+ width: 100%;
+ overflow: hidden;
+ &-hd{
+ padding: 30rpx 60rpx;
+ position: relative;
+ font-size: 32rpx;
+ font-weight: 500;
+ color: #303030;
+ text-align: center;
+ .a{
+ display: flex;
+ align-items: center;
+ font-size: 28rpx;
+ font-weight: 500;
+ color: #FF624F;
+ position: absolute;
+ top: 30rpx;
+ left: 40rpx;
+ z-index: 2;
+ }
+ }
+ &-bd{
+ overflow: hidden;
+ display: flex;
+ align-items: flex-start;
+ .l{
+ width: 210rpx;
+ height: 560rpx;
+ background-color: #F7F8FA;
+ .item{
+ text-overflow: ellipsis;
+ overflow: hidden;
+ height: 70rpx;
+ font-size: 28rpx;
+ font-weight: 400;
+ color: #303030;
+ white-space: nowrap;
+ line-height: 70rpx;
+ padding-left: 30rpx;
+ box-sizing: border-box;
+ text-align: left;
+ &-on{
+ background-color: #fff;
+ font-weight: 500;
+ }
+ }
+ }
+ .m{
+ width: 100%;
+ text-align: center;
+ max-height: 560rpx;
+ .item{
+ text-overflow: ellipsis;
+ overflow: hidden;
+ height: 70rpx;
+ font-size: 28rpx;
+ font-weight: 400;
+ color: #303030;
+ white-space: nowrap;
+ line-height: 70rpx;
+ padding-left: 80rpx;
+ box-sizing: border-box;
+ text-align: left;
+ &-on{
+ color: #FF624F;
+ }
+ }
+ }
+ .r{
+ width: 540rpx;
+ height: 560rpx;
+ .item{
+ text-overflow: ellipsis;
+ overflow: hidden;
+ height: 70rpx;
+ font-size: 28rpx;
+ font-weight: 400;
+ color: #303030;
+ white-space: nowrap;
+ line-height: 70rpx;
+ padding-left: 80rpx;
+ box-sizing: border-box;
+ &-on{
+ color: #FF624F;
+ }
+ }
+ }
+ }
+}
.dispatchItem{
display: flex;
align-items: center;
diff --git a/pages/user/index.vue b/pages/user/index.vue
index 0d0971c..a42325e 100644
--- a/pages/user/index.vue
+++ b/pages/user/index.vue
@@ -1,7 +1,7 @@
-
+
@@ -188,30 +188,30 @@
服务订单
- 查看全部
+ 查看全部
-
+
2
待确认
-
+
待服务
-
+
待支付
-
+
- 待验收
+ 已完成
@@ -489,7 +489,8 @@
load: that.isFirstload
})
.then(result => {
- that.userInfo = result.data.userInfo
+ that.userInfo = result.data.userInfo;
+ uni.setStorageSync("userInfo",result.data.userInfo)
resolve(that.userInfo)
})
.catch(err => {
@@ -502,6 +503,17 @@
})
})
},
+ toFuwu(type) {
+ if(!uni.getStorageSync('token')){
+ uni.navigateTo({
+ url: "/pages/login/index"
+ })
+ return ;
+ }
+ uni.navigateTo({
+ url: "/pages/news/recycling/orderList?type="+type
+ })
+ },
goLogin() {
// 去登录
uni.navigateTo({
@@ -568,8 +580,8 @@
.section_1 {
position: relative;
width: 902rpx;
- background: url('../../static/home/homeback.png') 100% no-repeat;
- background-size: 100% 100%;
+ background: url('@/static/member/head.png') center -44px no-repeat;
+ background-size: 100% auto;
display: flex;
flex-direction: column;
margin: -26rpx 0 0 -60rpx;