修改订单功能
This commit is contained in:
@@ -39,12 +39,12 @@ Page({
|
|||||||
height: 46 + statusBarHeight,
|
height: 46 + statusBarHeight,
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
//条目点击---订单状态:-2:已取消 -1:拒绝接单 0:待付款 1:已付款 2:已接单(待服务)3:服务中 4:已完成 5申请退款 6退款中 7已退款 8:已结算
|
//条目点击---订单状态:-2:已取消 -1:拒绝接单 0:待接单 1:已接单(待支付) 2:已支付(待服务)3:服务中 4:已完成 5申请退款 6退款中 7已退款 8:已结算
|
||||||
|
|
||||||
itemclick(e) {
|
itemclick(e) {
|
||||||
console.log("index==" + e.currentTarget.dataset.index)
|
console.log("index==" + e.currentTarget.dataset.index)
|
||||||
console.log("status==" + e.currentTarget.dataset.status)
|
console.log("status==" + e.currentTarget.dataset.status)
|
||||||
//去待付款详情
|
//去订单详情页
|
||||||
if (e.currentTarget.dataset.status == 0) {
|
|
||||||
if (e.currentTarget.dataset.item != 0) {
|
if (e.currentTarget.dataset.item != 0) {
|
||||||
let item = JSON.stringify(e.currentTarget.dataset.item);
|
let item = JSON.stringify(e.currentTarget.dataset.item);
|
||||||
console.log("传递的item" + item);
|
console.log("传递的item" + item);
|
||||||
@@ -52,17 +52,6 @@ Page({
|
|||||||
url: "/pages/orderdetail/orderdetail?item=" + item,
|
url: "/pages/orderdetail/orderdetail?item=" + item,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
|
||||||
//去取消订单详情
|
|
||||||
if (e.currentTarget.dataset.status == -2) {
|
|
||||||
if (e.currentTarget.dataset.item != 0) {
|
|
||||||
let item = JSON.stringify(e.currentTarget.dataset.item);
|
|
||||||
console.log("传递的item" + item);
|
|
||||||
wx.navigateTo({
|
|
||||||
url: "/pages/orderdetail/orderdetail?item=" + item,
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -18,12 +18,12 @@
|
|||||||
<view style=" padding: 0 24rpx;height:366rpx;position: relative;background: #ffffff;">
|
<view style=" padding: 0 24rpx;height:366rpx;position: relative;background: #ffffff;">
|
||||||
<view style="height:66rpx;">
|
<view style="height:66rpx;">
|
||||||
<text class="time_msg">订单号:{{item.orderNumber}}</text>
|
<text class="time_msg">订单号:{{item.orderNumber}}</text>
|
||||||
<!-- 订单状态:-2:已取消 -1:拒绝接单 0:待付款 1:已付款 2:已接单(待服务)
|
<!-- 订单状态:-2:已取消 -1:拒绝接单 0:待接单 1:已接单(待支付) 2:已支付(待服务)
|
||||||
3:服务中 4:已完成 5申请退款 6退款中 7已退款 8:已结算 -->
|
3:服务中 4:已完成 5申请退款 6退款中 7已退款 8:已结算 -->
|
||||||
<view wx:if="{{item.status==-2}}" class="status_msg">{{"已取消"}}</view>
|
<view wx:if="{{item.status==-2}}" class="status_msg">{{"已取消"}}</view>
|
||||||
<view wx:if="{{item.status==-1}}" class="status_msg">{{"拒绝接单"}}</view>
|
<view wx:if="{{item.status==-1}}" class="status_msg">{{"拒绝接单"}}</view>
|
||||||
<view wx:if="{{item.status==0}}" class="status_msg">{{"待付款"}}</view>
|
<view wx:if="{{item.status==0}}" class="status_msg">{{"待接单"}}</view>
|
||||||
<view wx:if="{{item.status==1}}" class="status_msg">{{"已付款"}}</view>
|
<view wx:if="{{item.status==1}}" class="status_msg">{{"已接单"}}</view>
|
||||||
<view wx:if="{{item.status==2}}" class="status_msg">{{"待服务"}}</view>
|
<view wx:if="{{item.status==2}}" class="status_msg">{{"待服务"}}</view>
|
||||||
<view wx:if="{{item.status==3}}" class="status_msg">{{"服务中"}}</view>
|
<view wx:if="{{item.status==3}}" class="status_msg">{{"服务中"}}</view>
|
||||||
<view wx:if="{{item.status==4}}" class="status_msg">{{"已完成"}}</view>
|
<view wx:if="{{item.status==4}}" class="status_msg">{{"已完成"}}</view>
|
||||||
@@ -36,20 +36,17 @@
|
|||||||
<view style="height: 1rpx;background: #ECECEC;"></view>
|
<view style="height: 1rpx;background: #ECECEC;"></view>
|
||||||
<view class="details_box">
|
<view class="details_box">
|
||||||
|
|
||||||
<image src="{{url+item.userbAvatar}}" class="Group-image"></image>
|
<image src="{{item.userbAvatar}}" class="Group-image"></image>
|
||||||
<view style="margin-left: 31rpx;margin-top: 40rpx;">
|
<view style="margin-left: 31rpx;margin-top: 40rpx;">
|
||||||
<view class="title">{{item.userbName}}</view>
|
<view class="title">{{item.userbName}}</view>
|
||||||
<view class="detail_number">{{item.serviceTime}}天</view>
|
<view class="detail_number">{{item.serviceTime}}天</view>
|
||||||
<view class="money">实付款:<text style="font-size: 30rpx;color: #FF8F1F;font-family: PingFang SC;font-weight: bold;">¥{{item.yuguMoney}}元</text></view>
|
<view class="money">实付款:<text style="font-size: 30rpx;color: #FF8F1F;font-family: PingFang SC;font-weight: bold;">¥{{item.yuguMoney}}元</text></view>
|
||||||
</view>
|
</view>
|
||||||
<view class="detail_btn" bindtap="go_pay" data-id="{{item.order_id}}" wx:if="{{item.status==0}}" data-item="{{item}}">去付款</view>
|
<view class="detail_btn" bindtap="go_pay" data-id="{{item.order_id}}" wx:if="{{item.status==1}}" data-item="{{item}}">去付款</view>
|
||||||
|
|
||||||
<view class="detail_btn" bindtap="go_Qcode" data-id="{{item.order_id}}" wx:if="{{item.status==1}}">查看二维码</view>
|
|
||||||
|
|
||||||
</view>
|
|
||||||
|
|
||||||
|
<!-- <view class="detail_btn" bindtap="go_Qcode" data-id="{{item.order_id}}" wx:if="{{item.status==1}}">查看二维码</view> -->
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
@@ -114,40 +114,28 @@ Page({
|
|||||||
statusBarHeight: statusBarHeight,
|
statusBarHeight: statusBarHeight,
|
||||||
height: 46 + statusBarHeight,
|
height: 46 + statusBarHeight,
|
||||||
});
|
});
|
||||||
app.console(this.data.height + "=================xxxxxxxxxxxxxxxxxxxxxxxx")
|
|
||||||
console.log(e.type)
|
// console.log(e.type)
|
||||||
console.log(e.id)
|
// console.log(e.id)
|
||||||
//条目点击进入详情页
|
//条目点击进入详情页
|
||||||
this.setData({
|
this.setData({
|
||||||
// btn1: 2,
|
|
||||||
order_id: e.id
|
order_id: e.id
|
||||||
})
|
})
|
||||||
|
//条目点击进入详情页,调取接口获取详情页数据,除外都是通过列表传参的方式展示详情页数据。
|
||||||
|
if(e.type=3){
|
||||||
|
this.getOrderDetail();
|
||||||
|
}
|
||||||
|
app.console(this.data.order_id+"======详情也收到的order_id")
|
||||||
|
|
||||||
var that = this;
|
var that = this;
|
||||||
let item = JSON.parse(e.item);
|
let item = JSON.parse(e.item);
|
||||||
that.setData({
|
that.setData({
|
||||||
item: item,
|
item: item,
|
||||||
charge_phone: 18133233292
|
charge_phone: 18133233292,
|
||||||
|
order_id: item.orderId
|
||||||
});
|
});
|
||||||
// if(options.type==1){
|
app.console("order_id=================" + this.data.order_id)
|
||||||
// this.setData({
|
|
||||||
// btn1:1,
|
|
||||||
// order_id:options.id
|
|
||||||
// })
|
|
||||||
// }
|
|
||||||
// if(options.type==2){
|
|
||||||
// this.setData({
|
|
||||||
// btn1:2,
|
|
||||||
// order_id:options.id
|
|
||||||
// })
|
|
||||||
// }else if(options.type==3){
|
|
||||||
// this.setData({
|
|
||||||
// btn1:3,
|
|
||||||
// order_id:options.id
|
|
||||||
// })
|
|
||||||
// }
|
|
||||||
app.console("类型=================" + this.data.btn1)
|
|
||||||
},
|
},
|
||||||
mengceng() {
|
mengceng() {
|
||||||
this.setData({
|
this.setData({
|
||||||
@@ -157,6 +145,27 @@ Page({
|
|||||||
refund_box: false
|
refund_box: false
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
//确认开始服务
|
||||||
|
startService(){
|
||||||
|
var that = this;
|
||||||
|
wx.request({
|
||||||
|
url: app.globalData.url + '/system/view/startServiceWithOrder',
|
||||||
|
header: app.getRequestHeader(),
|
||||||
|
method: 'post',
|
||||||
|
data: {
|
||||||
|
orderId: that.data.order_id
|
||||||
|
},
|
||||||
|
success: function (res) {
|
||||||
|
var resp = res.data;
|
||||||
|
if (res.data.code == 200) {
|
||||||
|
// that.setData({
|
||||||
|
// item : res.data.data
|
||||||
|
// });
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
},
|
||||||
seeQcode() {
|
seeQcode() {
|
||||||
console.log('点击了查看二维码')
|
console.log('点击了查看二维码')
|
||||||
//console.log(that.data.order_id)
|
//console.log(that.data.order_id)
|
||||||
@@ -483,27 +492,17 @@ Page({
|
|||||||
getOrderDetail: function () {
|
getOrderDetail: function () {
|
||||||
var that = this;
|
var that = this;
|
||||||
wx.request({
|
wx.request({
|
||||||
url: app.buildUrl("/app/Goddesswechat/getOrderDetail"),
|
url: app.globalData.url + '/system/view/getInfo',
|
||||||
header: app.getRequestHeader(),
|
header: app.getRequestHeader(),
|
||||||
method: 'POST',
|
method: 'get',
|
||||||
data: {
|
data: {
|
||||||
version_number: this.data.version_number,
|
orderId: this.data.order_id
|
||||||
uid: wx.getStorageSync('uid'),
|
|
||||||
token: wx.getStorageSync('token'),
|
|
||||||
order_id: this.data.order_id
|
|
||||||
},
|
},
|
||||||
success: function (res) {
|
success: function (res) {
|
||||||
var resp = res.data;
|
var resp = res.data;
|
||||||
console.log(resp + "=================dddddddddddddddddddddddddddddddddddddddddddd")
|
if (res.data.code == 200) {
|
||||||
console.log(resp.erro + "=================dddddddddddddddddddddddddddddddddddddddddddd")
|
|
||||||
if (resp.erro == 0) {
|
|
||||||
that.setData({
|
that.setData({
|
||||||
detail: resp.detail,
|
item : res.data.data
|
||||||
order: resp.order,
|
|
||||||
goods_id: resp.detail.goods_id,
|
|
||||||
id: resp.detail.id,
|
|
||||||
refund: resp.detail.refund,
|
|
||||||
charge_phone: resp.detail.charge_phone
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,12 +4,12 @@
|
|||||||
<view style=" height:328rpx;position: relative;background: #ffffff;margin-top:{{height}}px;">
|
<view style=" height:328rpx;position: relative;background: #ffffff;margin-top:{{height}}px;">
|
||||||
<view style="height:66rpx;padding: 0 24rpx;">
|
<view style="height:66rpx;padding: 0 24rpx;">
|
||||||
<text class="time_msg"></text>
|
<text class="time_msg"></text>
|
||||||
<!-- 订单状态:-2:已取消 -1:拒绝接单 0:待付款 1:已付款 2:已接单(待服务)
|
<!-- 订单状态:-2:已取消 -1:拒绝接单 0:待接单 1:已接单 2:已支付(待服务)
|
||||||
3:服务中 4:已完成 5申请退款 6退款中 7已退款 8:已结算 -->
|
3:服务中 4:已完成 5申请退款 6退款中 7已退款 8:已结算 -->
|
||||||
<view wx:if="{{item.status==-2}}" class="status_msg">{{"已取消"}}</view>
|
<view wx:if="{{item.status==-2}}" class="status_msg">{{"已取消"}}</view>
|
||||||
<view wx:if="{{item.status==-1}}" class="status_msg">{{"拒绝接单"}}</view>
|
<view wx:if="{{item.status==-1}}" class="status_msg">{{"拒绝接单"}}</view>
|
||||||
<view wx:if="{{item.status==0}}" class="status_msg">{{"待付款"}}</view>
|
<view wx:if="{{item.status==0}}" class="status_msg">{{"待接单"}}</view>
|
||||||
<view wx:if="{{item.status==1}}" class="status_msg">{{"已付款"}}</view>
|
<view wx:if="{{item.status==1}}" class="status_msg">{{"已接单"}}</view>
|
||||||
<view wx:if="{{item.status==2}}" class="status_msg">{{"待服务"}}</view>
|
<view wx:if="{{item.status==2}}" class="status_msg">{{"待服务"}}</view>
|
||||||
<view wx:if="{{item.status==3}}" class="status_msg">{{"服务中"}}</view>
|
<view wx:if="{{item.status==3}}" class="status_msg">{{"服务中"}}</view>
|
||||||
<view wx:if="{{item.status==4}}" class="status_msg">{{"已完成"}}</view>
|
<view wx:if="{{item.status==4}}" class="status_msg">{{"已完成"}}</view>
|
||||||
@@ -19,7 +19,7 @@
|
|||||||
<view wx:if="{{item.status==8}}" class="status_msg">{{"已结算"}}</view>
|
<view wx:if="{{item.status==8}}" class="status_msg">{{"已结算"}}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="details_box">
|
<view class="details_box">
|
||||||
<image src="{{url+item.userbAvatar}}" style="width:230rpx;height:230rpx;"></image>
|
<image src="{{item.userbAvatar}}" style="width:230rpx;height:230rpx;"></image>
|
||||||
<view style="margin-left: 31rpx;">
|
<view style="margin-left: 31rpx;">
|
||||||
<view class="title">专业陪护服务({{item.userbName}})</view>
|
<view class="title">专业陪护服务({{item.userbName}})</view>
|
||||||
<!-- <view class="detail_number">数量x{{detail.num}}</view> -->
|
<!-- <view class="detail_number">数量x{{detail.num}}</view> -->
|
||||||
@@ -30,7 +30,7 @@
|
|||||||
|
|
||||||
<!-- 订单状态:-2:已取消 -->
|
<!-- 订单状态:-2:已取消 -->
|
||||||
|
|
||||||
<!-- 订单状态:0:待付款 -->
|
<!-- 订单状态:0:待接单 -->
|
||||||
<view wx:if="{{item.status==0}}" class="opt_view">
|
<view wx:if="{{item.status==0}}" class="opt_view">
|
||||||
<view wx:if="{{item.status==0}}">
|
<view wx:if="{{item.status==0}}">
|
||||||
<view class="detail_btn" style="padding:0 30rpx" bindtap="confirm_pay">
|
<view class="detail_btn" style="padding:0 30rpx" bindtap="confirm_pay">
|
||||||
@@ -54,11 +54,35 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
<!-- 订单状态:1:已接单 -->
|
||||||
|
<view wx:if="{{item.status==1}}" class="opt_view">
|
||||||
|
<view wx:if="{{item.status==1}}">
|
||||||
|
<view class="detail_btn" style="padding:0 30rpx" bindtap="confirm_pay">
|
||||||
|
付款
|
||||||
|
</view>
|
||||||
|
<view class="detail_btn" bindtap="cancelOrder">
|
||||||
|
取消订单
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<!-- <view wx:if="{{item.status==1}}" class="opt_view">
|
||||||
|
<view wx:if="{{item.status==1}}">
|
||||||
|
<view class="detail_btn" style="padding:0 30rpx" bindtap="seeQcode">
|
||||||
|
查看身份码
|
||||||
|
</view>
|
||||||
|
<view class="detail_btn" bindtap="refund">
|
||||||
|
退款
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view> -->
|
||||||
<!-- 订单状态:2:待服务 -->
|
<!-- 订单状态:2:待服务 -->
|
||||||
<view wx:if="{{item.status==2}}" class="opt_view">
|
<view wx:if="{{item.status==2}}" class="opt_view">
|
||||||
<view wx:if="{{item.status==2}}">
|
<view wx:if="{{item.status==2}}">
|
||||||
<view class="detail_btn" style="padding:0 30rpx" bindtap="seeQcode">
|
<view class="detail_btn" style="padding:0 30rpx" bindtap="startService">
|
||||||
查看身份码
|
确认开始服务
|
||||||
</view>
|
</view>
|
||||||
<view class="detail_btn" bindtap="refund">
|
<view class="detail_btn" bindtap="refund">
|
||||||
退款
|
退款
|
||||||
|
|||||||
@@ -1,66 +0,0 @@
|
|||||||
// pages/paysuccess/paysuccess.js
|
|
||||||
Page({
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 页面的初始数据
|
|
||||||
*/
|
|
||||||
data: {
|
|
||||||
|
|
||||||
},
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 生命周期函数--监听页面加载
|
|
||||||
*/
|
|
||||||
onLoad: function (options) {
|
|
||||||
|
|
||||||
},
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 生命周期函数--监听页面初次渲染完成
|
|
||||||
*/
|
|
||||||
onReady: function () {
|
|
||||||
|
|
||||||
},
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 生命周期函数--监听页面显示
|
|
||||||
*/
|
|
||||||
onShow: function () {
|
|
||||||
|
|
||||||
},
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 生命周期函数--监听页面隐藏
|
|
||||||
*/
|
|
||||||
onHide: function () {
|
|
||||||
|
|
||||||
},
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 生命周期函数--监听页面卸载
|
|
||||||
*/
|
|
||||||
onUnload: function () {
|
|
||||||
|
|
||||||
},
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 页面相关事件处理函数--监听用户下拉动作
|
|
||||||
*/
|
|
||||||
onPullDownRefresh: function () {
|
|
||||||
|
|
||||||
},
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 页面上拉触底事件的处理函数
|
|
||||||
*/
|
|
||||||
onReachBottom: function () {
|
|
||||||
|
|
||||||
},
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 用户点击右上角分享
|
|
||||||
*/
|
|
||||||
onShareAppMessage: function () {
|
|
||||||
|
|
||||||
}
|
|
||||||
})
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
{
|
|
||||||
"usingComponents": {}
|
|
||||||
}
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
<!--pages/paysuccess/paysuccess.wxml-->
|
|
||||||
<text>pages/paysuccess/paysuccess.wxml</text>
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
/* pages/paysuccess/paysuccess.wxss */
|
|
||||||
@@ -6,38 +6,24 @@ Page({
|
|||||||
* 页面的初始数据
|
* 页面的初始数据
|
||||||
*/
|
*/
|
||||||
data: {
|
data: {
|
||||||
text: '',
|
|
||||||
texttwo: '',
|
|
||||||
height: '',
|
height: '',
|
||||||
show: false,
|
|
||||||
seckill_status: 1,
|
|
||||||
seckill_start: '请输入开始日期',
|
seckill_start: '请输入开始日期',
|
||||||
seckill_endx: '请输入结束日期',
|
seckill_endx: '请输入结束日期',
|
||||||
time: 30 * 60 * 60 * 1000,
|
time: 30 * 60 * 60 * 1000,
|
||||||
timeflag: 0,
|
timeflag: 0,
|
||||||
seckill_end: '',
|
|
||||||
userInfo: {},
|
userInfo: {},
|
||||||
item: {},
|
item: {},
|
||||||
url: app.globalData.url,
|
|
||||||
hasUserInfo: false,
|
hasUserInfo: false,
|
||||||
date: '',
|
date: '',
|
||||||
paymoney: 0,
|
paymoney: 0,
|
||||||
show: false,
|
|
||||||
canIUseOpenData: wx.canIUse('open-data.type.userAvatarUrl') && wx.canIUse('open-data.type.userNickName'),
|
|
||||||
phone: wx.getStorageSync('phone'),
|
phone: wx.getStorageSync('phone'),
|
||||||
uidFlag: wx.getStorageSync('uidFlag'),
|
uidFlag: wx.getStorageSync('uidFlag'),
|
||||||
imgUrls: [
|
|
||||||
'/pages/image/goddess.jpg',
|
|
||||||
'/pages/image/goddess.jpg',
|
|
||||||
'/pages/image/goddess.jpg'
|
|
||||||
],
|
|
||||||
goods_detail_img: [],
|
goods_detail_img: [],
|
||||||
indicatorDots: true,
|
indicatorDots: true,
|
||||||
autoplay: true,
|
autoplay: true,
|
||||||
interval: 5000,
|
interval: 5000,
|
||||||
duration: 1300,
|
duration: 1300,
|
||||||
id: 0,
|
id: 0,
|
||||||
bg: '#C79C77',
|
|
||||||
order_id: '',
|
order_id: '',
|
||||||
timeData: {},
|
timeData: {},
|
||||||
Height: "", //这是swiper要动态设置的高度属性
|
Height: "", //这是swiper要动态设置的高度属性
|
||||||
@@ -45,30 +31,11 @@ Page({
|
|||||||
is_ok_click: false,
|
is_ok_click: false,
|
||||||
clock: '',
|
clock: '',
|
||||||
address: '',
|
address: '',
|
||||||
danjia:0.01
|
danjia: 0.01,
|
||||||
|
beizhu: '123456',
|
||||||
},
|
},
|
||||||
|
|
||||||
onDisplay() {
|
|
||||||
this.setData({
|
|
||||||
show: true
|
|
||||||
});
|
|
||||||
},
|
|
||||||
onClose() {
|
|
||||||
this.setData({
|
|
||||||
show: false
|
|
||||||
});
|
|
||||||
},
|
|
||||||
formatDate(date) {
|
|
||||||
date = new Date(date);
|
|
||||||
return `${date.getMonth() + 1}/${date.getDate()}`;
|
|
||||||
},
|
|
||||||
onConfirm(event) {
|
|
||||||
this.setData({
|
|
||||||
show: false,
|
|
||||||
text: `选择了 ${event.detail.length} 个日期`,
|
|
||||||
texttwo: this.formatDate(event.detail),
|
|
||||||
});
|
|
||||||
},
|
|
||||||
// 确认支付
|
// 确认支付
|
||||||
confirm_pay: async function () {
|
confirm_pay: async function () {
|
||||||
var that = this;
|
var that = this;
|
||||||
@@ -124,13 +91,18 @@ Page({
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
payment() {
|
payment() {
|
||||||
|
|
||||||
if (this.data.seckill_start == "请输入开始日期") {
|
if (this.data.seckill_start == "请输入开始日期") {
|
||||||
wx.showToast({ title: '请输入开始日期', icon: 'none' });
|
wx.showToast({
|
||||||
|
title: '请输入开始日期',
|
||||||
|
icon: 'none'
|
||||||
|
});
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if (this.data.seckill_endx == "请输入结束日期") {
|
if (this.data.seckill_endx == "请输入结束日期") {
|
||||||
wx.showToast({ title: '请输入结束日期', icon: 'none' });
|
wx.showToast({
|
||||||
|
title: '请输入结束日期',
|
||||||
|
icon: 'none'
|
||||||
|
});
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
var that = this;
|
var that = this;
|
||||||
@@ -144,7 +116,8 @@ Page({
|
|||||||
price: "10",
|
price: "10",
|
||||||
priceType: "1",
|
priceType: "1",
|
||||||
hospitalId: this.data.item.hospitalId,
|
hospitalId: this.data.item.hospitalId,
|
||||||
cId: wx.getStorageSync('uid')
|
cId: wx.getStorageSync('uid'),
|
||||||
|
remark: "1234567890",
|
||||||
},
|
},
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
header: {
|
header: {
|
||||||
@@ -153,84 +126,41 @@ Page({
|
|||||||
},
|
},
|
||||||
success(res) {
|
success(res) {
|
||||||
if (res.data.code == 200) {
|
if (res.data.code == 200) {
|
||||||
console.log('timeStamp=='+res.data.data.timeStamp)
|
that.setData({
|
||||||
console.log('nonceStr=='+res.data.data.nonceStr)
|
order_id: res.data.data.orderId,
|
||||||
console.log('package=='+res.data.data.package)
|
})
|
||||||
console.log('signType=='+res.data.data.signType)
|
console.log('order_id==' + res.data.data.orderId)
|
||||||
console.log('paySign=='+res.data.data.paySign)
|
app.console(that.data.order_id + "======要传的order_id")
|
||||||
wx.requestPayment({
|
|
||||||
timeStamp: res.data.data.timeStamp,
|
|
||||||
nonceStr: res.data.data.nonceStr,
|
|
||||||
package: res.data.data.package,
|
|
||||||
signType: res.data.data.signType,
|
|
||||||
paySign: res.data.data.paySign,
|
|
||||||
success(res) {
|
|
||||||
console.log('支付成功');
|
|
||||||
wx.navigateTo({
|
wx.navigateTo({
|
||||||
url: '/shopping/pages/paysuccess/paysuccess',
|
url: '/shopping/pages/paysuccess/paysuccess?' + "order_id=" + that.data.order_id,
|
||||||
})
|
});
|
||||||
},
|
// console.log('timeStamp==' + res.data.data.timeStamp)
|
||||||
fail(res) {
|
// console.log('nonceStr==' + res.data.data.nonceStr)
|
||||||
console.log('支付失败');
|
// console.log('package==' + res.data.data.package)
|
||||||
}
|
// console.log('signType==' + res.data.data.signType)
|
||||||
})
|
// console.log('paySign==' + res.data.data.paySign)
|
||||||
} else {
|
|
||||||
wx.showToast({
|
|
||||||
title: res.data.msg,
|
|
||||||
icon: 'error',
|
|
||||||
duration: 2000
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// success(res) {
|
|
||||||
// if (res.data.code == 200) {
|
|
||||||
// that.setData({
|
|
||||||
// // order_id: res.data.order_id,
|
|
||||||
// order_id: 123456,
|
|
||||||
// })
|
|
||||||
// // wx.showToast({ title: res.data.msg, icon: 'none' });
|
|
||||||
// wx.requestPayment({
|
// wx.requestPayment({
|
||||||
// timeStamp: res.data.data.timeStamp,
|
// timeStamp: res.data.data.timeStamp,
|
||||||
// nonceStr: res.data.data.nonceStr,
|
// nonceStr: res.data.data.nonceStr,
|
||||||
// package: res.data.data.package,
|
// package: res.data.data.package,
|
||||||
// signType: 'MD5',
|
// signType: res.data.data.signType,
|
||||||
// paySign: res.data.data.paySign,
|
// paySign: res.data.data.paySign,
|
||||||
// success(res) {
|
// success(res) {
|
||||||
// console.log('支付成功');
|
// console.log('支付成功');
|
||||||
|
// app.console(that.data.order_id + "======要传的order_id")
|
||||||
// wx.navigateTo({
|
// wx.navigateTo({
|
||||||
// url: '../paysuccess/paysuccess?' + '&order_id=' + that.data.order_id,
|
// url: '/shopping/pages/paysuccess/paysuccess?' + "order_id=" + that.data.order_id,
|
||||||
// })
|
// });
|
||||||
// },
|
// },
|
||||||
// fail(res) {
|
// fail(res) {
|
||||||
// console.log('支付失败');
|
// console.log('支付失败');
|
||||||
// }
|
// }
|
||||||
// })
|
// })
|
||||||
// } else {
|
} else {
|
||||||
// wx.showToast({
|
wx.showToast({
|
||||||
// title: res.data.msg,
|
title: res.data.msg,
|
||||||
// icon: 'none'
|
icon: 'error',
|
||||||
// });
|
duration: 2000
|
||||||
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
})
|
|
||||||
},
|
|
||||||
|
|
||||||
//是否登录
|
|
||||||
isdenglu() {
|
|
||||||
wx.showModal({
|
|
||||||
title: '提示',
|
|
||||||
content: '请先登录',
|
|
||||||
success(res) {
|
|
||||||
if (res.confirm) {
|
|
||||||
console.log('用户点击确定')
|
|
||||||
wx.switchTab({
|
|
||||||
url: '/pages/my/my'
|
|
||||||
})
|
|
||||||
} else if (res.cancel) {
|
|
||||||
console.log('用户点击取消')
|
|
||||||
wx.switchTab({
|
|
||||||
url: '/pages/my/my'
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -261,7 +191,7 @@ Page({
|
|||||||
var day = parseInt(ms / (1000 * 60 * 60 * 24));
|
var day = parseInt(ms / (1000 * 60 * 60 * 24));
|
||||||
//do something
|
//do something
|
||||||
console.log("day = ", day);
|
console.log("day = ", day);
|
||||||
return day
|
return day + 1
|
||||||
},
|
},
|
||||||
onClickLeft() {
|
onClickLeft() {
|
||||||
wx.navigateBack()
|
wx.navigateBack()
|
||||||
@@ -272,58 +202,21 @@ Page({
|
|||||||
});
|
});
|
||||||
|
|
||||||
},
|
},
|
||||||
imgHeight: function (e) {
|
|
||||||
var winWid = wx.getSystemInfoSync().windowWidth; //获取当前屏幕的宽度
|
|
||||||
var imgh = e.detail.height; //图片高度
|
|
||||||
var imgw = e.detail.width; //图片宽度
|
|
||||||
var swiperH = winWid * imgh / imgw + "px" //等比设置swiper的高度。 即 屏幕宽度 / swiper高度 = 图片宽度 / 图片高度 ==》swiper高度 = 屏幕宽度 * 图片高度 / 图片宽度
|
|
||||||
this.setData({
|
|
||||||
Height: swiperH //设置高度
|
|
||||||
})
|
|
||||||
},
|
|
||||||
/**
|
/**
|
||||||
* 生命周期函数--监听页面加载
|
* 生命周期函数--监听页面加载
|
||||||
*/
|
*/
|
||||||
onLoad: function (e) {
|
onLoad: function (e) {
|
||||||
var statusBarHeight = wx.getSystemInfoSync().statusBarHeight;
|
var statusBarHeight = wx.getSystemInfoSync().statusBarHeight;
|
||||||
app.console(statusBarHeight + "=================xxxxxxxxxxxxxxxxxxxxxxxx")
|
|
||||||
this.setData({
|
this.setData({
|
||||||
statusBarHeight: statusBarHeight,
|
statusBarHeight: statusBarHeight,
|
||||||
height: 46 + statusBarHeight,
|
height: 46 + statusBarHeight,
|
||||||
});
|
});
|
||||||
app.console(this.data.height + "=================xxxxxxxxxxxxxxxxxxxxxxxx")
|
|
||||||
console.log(wx.getStorageSync('uidFlag'))
|
|
||||||
console.log(wx.getStorageSync('uid'))
|
|
||||||
if (wx.getStorageSync('phone') == '') {
|
|
||||||
wx.setStorageSync('uidFlag', false);
|
|
||||||
console.log('请登录')
|
|
||||||
wx.showModal({
|
|
||||||
title: '提示',
|
|
||||||
content: '请先登录',
|
|
||||||
success(res) {
|
|
||||||
if (res.confirm) {
|
|
||||||
console.log('用户点击确定')
|
|
||||||
wx.switchTab({
|
|
||||||
url: '/pages/my/my'
|
|
||||||
})
|
|
||||||
} else if (res.cancel) {
|
|
||||||
console.log('用户点击取消')
|
|
||||||
wx.switchTab({
|
|
||||||
url: '/pages/my/my'
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
var that = this;
|
var that = this;
|
||||||
let item = JSON.parse(e.item);
|
let item = JSON.parse(e.item);
|
||||||
that.setData({
|
that.setData({
|
||||||
item: item
|
item: item
|
||||||
});
|
});
|
||||||
var myDate = new Date();
|
|
||||||
myDate.getDate();
|
|
||||||
app.console("当前天=" + myDate.toLocaleDateString())
|
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* 拨打电话
|
* 拨打电话
|
||||||
@@ -346,7 +239,6 @@ Page({
|
|||||||
* 生命周期函数--监听页面显示
|
* 生命周期函数--监听页面显示
|
||||||
*/
|
*/
|
||||||
onShow: function () {
|
onShow: function () {
|
||||||
|
|
||||||
var that = this;
|
var that = this;
|
||||||
this.getprice();
|
this.getprice();
|
||||||
this.getpriceType();
|
this.getpriceType();
|
||||||
@@ -391,5 +283,3 @@ Page({
|
|||||||
},
|
},
|
||||||
|
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,11 +1,7 @@
|
|||||||
<!--pages/goddess/goddess.wxml-->
|
<!--pages/goddess/goddess.wxml-->
|
||||||
<van-nav-bar title="下单" left-text="" right-text="" left-arrow bind:click-left="onClickLeft" bind:click-right="onClickRight" style=" position: fixed;left: 0;top: 0;width: 100%;z-index: 2;" />
|
<van-nav-bar title="下单" left-text="" right-text="" left-arrow bind:click-left="onClickLeft" bind:click-right="onClickRight" style=" position: fixed;left: 0;top: 0;width: 100%;z-index: 2;" />
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<view style="margin-top: {{height+12}}px;">
|
<view style="margin-top: {{height+12}}px;">
|
||||||
|
|
||||||
<view class="card_con" wx:key="key">
|
<view class="card_con" wx:key="key">
|
||||||
<view style='display:flex;background-color: white;'>
|
<view style='display:flex;background-color: white;'>
|
||||||
<view class="Group">
|
<view class="Group">
|
||||||
@@ -37,22 +33,15 @@
|
|||||||
地址:{{item.address}}</view>
|
地址:{{item.address}}</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<view class="card_cont" wx:key="key" style="margin-top: 24rpx;">
|
<view class="card_cont" wx:key="key" style="margin-top: 24rpx;">
|
||||||
<view class="title-left">
|
<view class="title-left">
|
||||||
{{"陪护时间选择"}}
|
{{"陪护时间选择"}}
|
||||||
</view>
|
</view>
|
||||||
<view style="height: 1rpx;background: #ECECEC;"></view>
|
<view style="height: 1rpx;background: #ECECEC;"></view>
|
||||||
<!-- <van-cell title="选择多个日期" value="{{ text }}" bind:click="onDisplay" />
|
|
||||||
<van-calendar show="{{ show }}" type="multiple" bind:close="onClose" bind:confirm="onConfirm" />
|
|
||||||
<view>{{texttwo}}</view> -->
|
|
||||||
|
|
||||||
|
|
||||||
<view class="row-wrap">
|
<view class="row-wrap">
|
||||||
<view class="label" style="margin-left: 33rpx;">开始日期</view>
|
<view class="label" style="margin-left: 33rpx;">开始日期</view>
|
||||||
<view class="label-right">
|
<view class="label-right">
|
||||||
<!-- <input model:value="{{seckill_start}}" name="nickname" class="input" type="text" placeholder="请输入开始时间" /> -->
|
|
||||||
<picker mode="date" value="{{date}}" start="2022-01-01" end="2025-12-01" bindchange="bindDateChange">
|
<picker mode="date" value="{{date}}" start="2022-01-01" end="2025-12-01" bindchange="bindDateChange">
|
||||||
<view class="picker">
|
<view class="picker">
|
||||||
{{seckill_start}}
|
{{seckill_start}}
|
||||||
@@ -63,7 +52,6 @@
|
|||||||
<view class="row-wrap">
|
<view class="row-wrap">
|
||||||
<view class="label" style="margin-left: 33rpx;">结束日期</view>
|
<view class="label" style="margin-left: 33rpx;">结束日期</view>
|
||||||
<view class="label-right">
|
<view class="label-right">
|
||||||
<!-- <input model:value="{{seckill_end}}" name="nickname" class="input" type="text" placeholder="请输入结束时间" /> -->
|
|
||||||
<picker mode="date" value="{{date}}" start="2022-01-01" end="2025-12-01" bindchange="bindDateChangetwo">
|
<picker mode="date" value="{{date}}" start="2022-01-01" end="2025-12-01" bindchange="bindDateChangetwo">
|
||||||
<view class="picker">
|
<view class="picker">
|
||||||
{{seckill_endx}}
|
{{seckill_endx}}
|
||||||
@@ -74,8 +62,6 @@
|
|||||||
|
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<view class="card_cont" wx:key="key" style="margin-top: 24rpx;">
|
<view class="card_cont" wx:key="key" style="margin-top: 24rpx;">
|
||||||
<view class="title-left">
|
<view class="title-left">
|
||||||
{{"备注"}}
|
{{"备注"}}
|
||||||
@@ -83,7 +69,7 @@
|
|||||||
<view style="height: 1rpx;background: #ECECEC;"></view>
|
<view style="height: 1rpx;background: #ECECEC;"></view>
|
||||||
|
|
||||||
<view class="peisong-way" style="margin-bottom: 30rpx;">
|
<view class="peisong-way" style="margin-bottom: 30rpx;">
|
||||||
<textarea style="font-size: 26rpx;padding-left: 19rpx;padding-top: 19rpx;" model:value="{{input_password}}" bindinput="passwordInput" placeholder="请详细描述您的需求,简单讲述您的病情或症状,方便陪护人员为您服务。" />
|
<textarea style="font-size: 26rpx;padding-left: 19rpx;padding-top: 19rpx;" model:value="{{beizhu}}" bindinput="input" placeholder="请详细描述您的需求,简单讲述您的病情或症状,方便陪护人员为您服务。" />
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -96,10 +82,10 @@
|
|||||||
|
|
||||||
<view class="payment">
|
<view class="payment">
|
||||||
<view style="line-height: 56rpx;color:#333;">
|
<view style="line-height: 56rpx;color:#333;">
|
||||||
<text>需支付:</text>
|
<text>预计金额:</text>
|
||||||
<text style="font-size:40rpx;color:#FF8F1F;margin-left:20rpx;">{{paymoney}}</text>
|
<text style="font-size:40rpx;color:#FF8F1F;margin-left:20rpx;">{{paymoney}}</text>
|
||||||
<text>元</text>
|
<text>元</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="immediately" bindtap="confirm_pay">立即支付</view>
|
<view class="immediately" bindtap="confirm_pay">提交订单</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -58,15 +58,15 @@ Page({
|
|||||||
*/
|
*/
|
||||||
onLoad: function (options) {
|
onLoad: function (options) {
|
||||||
var statusBarHeight = wx.getSystemInfoSync().statusBarHeight;
|
var statusBarHeight = wx.getSystemInfoSync().statusBarHeight;
|
||||||
app.console(statusBarHeight+"=================xxxxxxxxxxxxxxxxxxxxxxxx")
|
|
||||||
this.setData({
|
this.setData({
|
||||||
statusBarHeight: statusBarHeight,
|
statusBarHeight: statusBarHeight,
|
||||||
height: 46 + statusBarHeight,
|
height: 46 + statusBarHeight,
|
||||||
});
|
});
|
||||||
app.console(this.data.height+"=================xxxxxxxxxxxxxxxxxxxxxxxx")
|
|
||||||
this.setData({
|
this.setData({
|
||||||
order_id:options.order_id
|
order_id:options.order_id
|
||||||
})
|
})
|
||||||
|
app.console(this.data.order_id+"======传来的order_id")
|
||||||
this.paySuccess()
|
this.paySuccess()
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<!--shopping/pages/paysuccess/paysuccess.wxml-->
|
<!--shopping/pages/paysuccess/paysuccess.wxml-->
|
||||||
|
|
||||||
<van-nav-bar
|
<van-nav-bar
|
||||||
title="支付成功"
|
title="提交成功"
|
||||||
left-text=""
|
left-text=""
|
||||||
right-text=""
|
right-text=""
|
||||||
left-arrow
|
left-arrow
|
||||||
@@ -13,10 +13,10 @@
|
|||||||
<view class="success">
|
<view class="success">
|
||||||
<image src="/pages/image/success.png"></image>
|
<image src="/pages/image/success.png"></image>
|
||||||
</view>
|
</view>
|
||||||
<view class="news1">支付成功</view>
|
<view class="news1">提交成功</view>
|
||||||
<view class="news2">可在个人中心“我的订单”中查看</view>
|
<view class="news2">可在个人中心“我的订单”中查看</view>
|
||||||
<view style="display:flex;margin-bottom:106rpx; ">
|
<view style="display:flex;margin-bottom:106rpx; ">
|
||||||
<view style="background-image: url(/shopping/image/back_home.png);background-repeat:no-repeat;background-size:contain; width: 304rpx;margin-left: 40rpx;" class="" bindtap="index"></view>
|
<button style="width: 304rpx;margin-left: 40rpx;" class="btn1" bindtap="index">返回首页</button>
|
||||||
<button class="btn2" style="width: 304rpx;" bindtap="godetail">查看详情</button>
|
<button class="btn2" style="width: 304rpx;" bindtap="godetail">查看详情</button>
|
||||||
</view>
|
</view>
|
||||||
<view style=" display:flex; flex-wrap: wrap;justify-content:space-around;">
|
<view style=" display:flex; flex-wrap: wrap;justify-content:space-around;">
|
||||||
|
|||||||
@@ -90,6 +90,16 @@
|
|||||||
background: linear-gradient(312deg, #1B56FF 0%, #2D7AFF 0%, #00DBFC 100%);
|
background: linear-gradient(312deg, #1B56FF 0%, #2D7AFF 0%, #00DBFC 100%);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.btn1 {
|
||||||
|
font-weight: 300;
|
||||||
|
width: 244rpx;
|
||||||
|
height: 80rpx;
|
||||||
|
border-radius: 310rpx;
|
||||||
|
font-size: 30rpx;
|
||||||
|
color: rgb(4, 59, 240);
|
||||||
|
background: linear-gradient(312deg, #eeeff3 0%, #fff 0%, #e6edee 100%);
|
||||||
|
}
|
||||||
|
|
||||||
.price {
|
.price {
|
||||||
display: flex;
|
display: flex;
|
||||||
margin-top: 8rpx;
|
margin-top: 8rpx;
|
||||||
|
|||||||
Reference in New Issue
Block a user