第一次提交

This commit is contained in:
2023-03-18 12:14:55 +08:00
parent 4c96aa0951
commit 42d9ade803
8 changed files with 621 additions and 549 deletions

4
app.js
View File

@@ -17,8 +17,8 @@ App({
code:'', code:'',
// url:'http://chengjie468.gnway.cc:9090', url:'http://chengjie.free.idcfengye.com',
url:'https://35q45673j2.goho.co', // url:'https://35q45673j2.goho.co',
phone:'', phone:'',

View File

@@ -1,7 +1,6 @@
//获取应用实例 //获取应用实例
var app = getApp(); var app = getApp();
Page({ Page({
/** /**
* 页面的初始数据 * 页面的初始数据
*/ */
@@ -35,17 +34,38 @@ 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")
}, },
//条目点击 //条目点击---订单状态:-2已取消 -1拒绝接单 0待付款 1已付款 2已接单待服务3服务中 4已完成 5申请退款 6退款中 7已退款 8已结算
itemclick(e) { itemclick(e) {
// console.log(e.currentTarget.dataset.id) console.log("index==" + e.currentTarget.dataset.index)
console.log(e.currentTarget.dataset.index) console.log("status==" + e.currentTarget.dataset.status)
//去待付款详情
if (e.currentTarget.dataset.status == 0) {
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,
});
}
}
//去取消订单详情
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,
});
}
}
if (this.data.order_list[e.currentTarget.dataset.index].status == '已取消订单') { if (this.data.order_list[e.currentTarget.dataset.index].status == '已取消订单') {
wx.navigateTo({ wx.navigateTo({
url: '/pages/orderdetail/orderdetail?' + "type=" + '1' + '&id=' + this.data.order_list[e.currentTarget.dataset.index].order_id, url: '/pages/orderdetail/orderdetail?' + "type=" + '1' + '&id=' + this.data.order_list[e.currentTarget.dataset.index].order_id,
@@ -69,11 +89,9 @@ Page({
url: '/pages/reforderdetail/reforderdetail?' + "type=" + '2' + '&id=' + e.currentTarget.dataset.id, url: '/pages/reforderdetail/reforderdetail?' + "type=" + '2' + '&id=' + e.currentTarget.dataset.id,
}) })
} }
// wx.navigateTo({ // wx.navigateTo({
// url: '/pages/orderdetail/orderdetail?'+"type="+'1'+ '&id=' +e.currentTarget.dataset.id, // url: '/pages/orderdetail/orderdetail?'+"type="+'1'+ '&id=' +e.currentTarget.dataset.id,
// }) // })
}, },
//跳转订单详情(去付款) //跳转订单详情(去付款)
go_pay(e) { go_pay(e) {
@@ -186,7 +204,7 @@ Page({
* 页面上拉触底事件的处理函数 * 页面上拉触底事件的处理函数
*/ */
onReachBottom: function () { onReachBottom: function () {
console.log("=================dddddddddddddddddddddddddddddddddddddddddddd") console.log("==页面上拉触底事件的处理函数==")
this.getOrderList(); this.getOrderList();
}, },

View File

@@ -13,12 +13,8 @@
<!-- 全部 --> <!-- 全部 -->
<view wx:if="{{nav_type==1||all}}"> <view wx:if="{{nav_type==1||all}}">
<view class="order-list" wx:if="{{order_list.length}}"> <view class="order-list" wx:if="{{order_list.length}}">
<view wx:for="{{order_list}}" data-index="{{index}}" data-id="{{item.id}}" wx:for-item="item" bindtap="itemclick" class="flex-item" style='display:flex;background-color: white;margin-bottom: 24rpx;'> <view wx:for="{{order_list}}" data-index="{{index}}" data-status="{{item.status}}" data-item="{{item}}" wx:for-item="item" bindtap="itemclick" class="flex-item" style='display:flex;background-color: white;margin-bottom: 24rpx;'>
<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>

View File

@@ -119,7 +119,7 @@ Page({
console.log(e.id) console.log(e.id)
//条目点击进入详情页 //条目点击进入详情页
this.setData({ this.setData({
btn1: 2, // btn1: 2,
order_id: e.id order_id: e.id
}) })

View File

@@ -1,6 +1,5 @@
<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: 10;" /> <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: 10;" />
<!--pages/orderdetail/orderdetail.wxml--> <!--pages/orderdetail/orderdetail.wxml-->
<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;">
@@ -29,20 +28,23 @@
</view> </view>
</view> </view>
<view wx:if="{{btn1==2||btn1==3}}" style=" height:105rpx;position: relative;background: #ffffff;margin-top:4rpx;"> <!-- 订单状态:-2已取消 -->
<view wx:if="{{btn1==2}}">
<!-- 订单状态0待付款 -->
<view wx:if="{{item.status==0}}" class="opt_view">
<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">
付款 付款
</view> </view>
<view class="detail_btn" bindtap="cancelOrder" style="right:200rpx;color:#4A4A4A;border: 1rpx solid #4A4A4A;padding:0 30rpx"> <view class="detail_btn" bindtap="cancelOrder">
取消订单 取消订单
</view> </view>
</view> </view>
<view wx:if="{{btn1==3}}"> <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="seeQcode">
查看身份码 查看身份码
</view> </view>
<view class="detail_btn" bindtap="refund" style="right:200rpx;color:#4A4A4A;border: 1rpx solid #4A4A4A;padding:0 30rpx"> <view class="detail_btn" bindtap="refund">
退款 退款
</view> </view>
<!-- <view class="detail_btn" bindtap="pintuan" <!-- <view class="detail_btn" bindtap="pintuan"
@@ -51,6 +53,52 @@
</view> --> </view> -->
</view> </view>
</view> </view>
<!-- 订单状态2待服务 -->
<view wx:if="{{item.status==2}}" class="opt_view">
<view wx:if="{{item.status==2}}">
<view class="detail_btn" style="padding:0 30rpx" bindtap="seeQcode">
查看身份码
</view>
<view class="detail_btn" bindtap="refund">
退款
</view>
</view>
</view>

View File

@@ -84,7 +84,7 @@ page {
color: #FF4A4A; color: #FF4A4A;
opacity: 1; opacity: 1;
text-align: center; text-align: center;
right:200rpx;color:#4A4A4A;border: 1rpx solid #4A4A4A;padding:0 30rpx
} }
.contact { .contact {
@@ -216,6 +216,16 @@ page {
border-bottom: 1rpx solid #E8E8E8; border-bottom: 1rpx solid #E8E8E8;
} }
.opt_view {
height:105rpx;position: relative;background: #ffffff;margin-top:4rpx;
}
.opt_bt_view {
right:200rpx;color:#4A4A4A;border: 1rpx solid #4A4A4A;padding:0 30rpx
}

View File

@@ -25,7 +25,7 @@
<view wx:for="{{special_offer}}" wx:key="{{index}}" wx:for-item="item" class="flex-item bc_green" style='display:flex;background-color: white;margin-right: 10rpx;margin-bottom: 24rpx;'> <view wx:for="{{special_offer}}" wx:key="{{index}}" wx:for-item="item" class="flex-item bc_green" style='display:flex;background-color: white;margin-right: 10rpx;margin-bottom: 24rpx;'>
<view class="Group" bindtap="details" data-item="{{item}}"> <view class="Group" bindtap="details" data-item="{{item}}">
<view class="Group-image"> <view class="Group-image">
<image src="{{url+item.avatar}}"></image> <image src="{{item.facePic}}"></image>
</view> </view>
<view class="content"> <view class="content">

View File

@@ -10,7 +10,7 @@
<view style='display:flex;background-color: white;'> <view style='display:flex;background-color: white;'>
<view class="Group"> <view class="Group">
<view class="Group-image"> <view class="Group-image">
<image src="{{url+item.avatar}}"></image> <image src="{{item.facePic}}"></image>
</view> </view>
<view class="content"> <view class="content">
<view style="display: flex; flex-direction:row;align-items : flex-end;"> <view style="display: flex; flex-direction:row;align-items : flex-end;">