Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
747c1645ec | ||
|
|
34ad2076f0 |
6
app.json
6
app.json
@ -45,6 +45,12 @@
|
|||||||
"iconPath": "assets/icon/tabs/tab1.png",
|
"iconPath": "assets/icon/tabs/tab1.png",
|
||||||
"selectedIconPath": "assets/icon/tabs/tab1-active.png"
|
"selectedIconPath": "assets/icon/tabs/tab1-active.png"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"pagePath": "pages/shop/index/index",
|
||||||
|
"text": "生活圈",
|
||||||
|
"iconPath": "assets/icon/tabs/tab2.png",
|
||||||
|
"selectedIconPath": "assets/icon/tabs/tab2-active.png"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"pagePath": "pages/order/index/index",
|
"pagePath": "pages/order/index/index",
|
||||||
"text": "订单",
|
"text": "订单",
|
||||||
|
|||||||
@ -13,7 +13,7 @@ Page({
|
|||||||
qrcodeUrl:'',
|
qrcodeUrl:'',
|
||||||
lng:0,
|
lng:0,
|
||||||
lat:0,
|
lat:0,
|
||||||
merchantOrderStatus:shopApi.merchantOrderStatus,
|
orderStatus:shopApi.merchantOrderStatus,
|
||||||
merchantOrderStatusKV:shopApi.merchantOrderStatusKV,
|
merchantOrderStatusKV:shopApi.merchantOrderStatusKV,
|
||||||
|
|
||||||
genderKV:userApi.genderKV,
|
genderKV:userApi.genderKV,
|
||||||
@ -46,24 +46,17 @@ Page({
|
|||||||
onLoad(options) {
|
onLoad(options) {
|
||||||
this.data.orderId = options.id;
|
this.data.orderId = options.id;
|
||||||
this.setScrollViewHieght();
|
this.setScrollViewHieght();
|
||||||
app.getLocation().then((data)=>{
|
|
||||||
this.setData({
|
this.getOrderDetail();
|
||||||
lng:data.longitude,
|
|
||||||
lat:data.latitude,
|
|
||||||
});
|
|
||||||
this.getOrderDetail();
|
|
||||||
}).catch(()=>{
|
|
||||||
this.getOrderDetail();
|
|
||||||
});
|
|
||||||
},
|
},
|
||||||
setScrollViewHieght(){
|
setScrollViewHieght(){
|
||||||
const windowInfo = wx.getWindowInfo();
|
const windowInfo = wx.getWindowInfo();
|
||||||
let height = windowInfo.windowHeight;
|
let height = windowInfo.windowHeight;
|
||||||
console.log(this.data.orderDetail.status==this.data.merchantOrderStatus.created,
|
console.log(this.data.orderDetail.status==this.data.orderStatus.created,
|
||||||
this.data.orderDetail.status==this.data.merchantOrderStatus.unverified);
|
this.data.orderDetail.status==this.data.orderStatus.unverified);
|
||||||
if(this.data.orderDetail&&this.data.orderDetail.id){
|
if(this.data.orderDetail&&this.data.orderDetail.id){
|
||||||
if(this.data.orderDetail.status==this.data.merchantOrderStatus.created||
|
if(this.data.orderDetail.status==this.data.orderStatus.created||
|
||||||
this.data.orderDetail.status==this.data.merchantOrderStatus.unverified){
|
this.data.orderDetail.status==this.data.orderStatus.unverified){
|
||||||
height = height - 94;
|
height = height - 94;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -96,7 +89,7 @@ Page({
|
|||||||
orderDetail:data,
|
orderDetail:data,
|
||||||
refresherTriggered:false
|
refresherTriggered:false
|
||||||
});
|
});
|
||||||
if(data.status==this.data.merchantOrderStatus.unverified){
|
if(data.status==this.data.orderStatus.unverified){
|
||||||
this.getQRCode();
|
this.getQRCode();
|
||||||
}else{
|
}else{
|
||||||
this.setData({
|
this.setData({
|
||||||
|
|||||||
@ -87,11 +87,12 @@
|
|||||||
|
|
||||||
<view class="bottom-bar-v2"
|
<view class="bottom-bar-v2"
|
||||||
wx:if="{{orderDetail.status==merchantOrderStatus.created||orderDetail.status==merchantOrderStatus.unverified}}">
|
wx:if="{{orderDetail.status==merchantOrderStatus.created||orderDetail.status==merchantOrderStatus.unverified}}">
|
||||||
<!-- <button class="button button1" plain size="mini">取消订单</button> -->
|
<button class="button btn-cancel" plain size="mini"
|
||||||
<button type="primary" wx:if="{{orderDetail.status==merchantOrderStatus.created}}"
|
wx:if="{{orderDetail.order.status==orderStatus.created}}">取消订单</button>
|
||||||
|
<button class="button btn-pay" type="primary" wx:if="{{orderDetail.status.status==orderStatus.created}}"
|
||||||
bind:tap="pay">去支付</button>
|
bind:tap="pay">去支付</button>
|
||||||
<button class="button button2" plain size="mini" bind:tap="refund" loading="{{refunding}}"
|
<button class="button btn-re-order" plain size="mini" bind:tap="refund" loading="{{refunding}}"
|
||||||
wx:if="{{orderDetail.status==merchantOrderStatus.unverified}}">申请退款</button>
|
wx:if="{{orderDetail.order.status==orderStatus.complete}}">再来一单</button>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<merchant-order id="merchantOrderComponent" bind:paySuccess="paySuccess"/>
|
<merchant-order id="merchantOrderComponent" bind:paySuccess="paySuccess"/>
|
||||||
@ -161,20 +161,23 @@
|
|||||||
|
|
||||||
|
|
||||||
.bottom-bar-v2{
|
.bottom-bar-v2{
|
||||||
text-align: right;
|
display: flex;
|
||||||
|
justify-content:flex-end;
|
||||||
}
|
}
|
||||||
.bottom-bar-v2 .button{
|
.bottom-bar-v2 .button{
|
||||||
line-height: 72rpx;
|
line-height: 72rpx;
|
||||||
padding:0 36rpx;
|
padding:0 36rpx;
|
||||||
font-weight: normal;
|
font-weight: normal;
|
||||||
border-radius: 18rpx;
|
border-radius: 18rpx;
|
||||||
|
margin:0!important;
|
||||||
|
gap: 30rpx;
|
||||||
}
|
}
|
||||||
.bottom-bar-v2 .button1{
|
.bottom-bar-v2 .btn-cancel,.bottom-bar-v2 .btn-re-order{
|
||||||
color: #555555;
|
color: #555555;
|
||||||
border: 1rpx solid rgba(153, 153, 153, 0.5);
|
border: 1rpx solid rgba(153, 153, 153, 0.5);
|
||||||
font-size: 32rpx;
|
font-size: 32rpx;
|
||||||
}
|
}
|
||||||
.bottom-bar-v2 .button2{
|
.bottom-bar-v2 .btn-pay{
|
||||||
font-size: 32rpx;
|
font-size: 32rpx;
|
||||||
margin-left:30rpx;
|
flex:1;
|
||||||
}
|
}
|
||||||
@ -75,8 +75,8 @@ Page({
|
|||||||
onLoad(options) {
|
onLoad(options) {
|
||||||
app.globalData.needRefreshOrderList = false;
|
app.globalData.needRefreshOrderList = false;
|
||||||
if(app.globalData.accessToken){
|
if(app.globalData.accessToken){
|
||||||
this.pager.tab1.loading = false;
|
this.data.pager.tab1.loading = false;
|
||||||
this.pager.tab3.loading = false;
|
this.data.pager.tab3.loading = false;
|
||||||
|
|
||||||
this.loadOrderList();
|
this.loadOrderList();
|
||||||
this.loadMerchantOrderList();
|
this.loadMerchantOrderList();
|
||||||
|
|||||||
@ -1,17 +1,17 @@
|
|||||||
<!-- <nav-bar class="nav-bar"/> -->
|
<!-- <nav-bar class="nav-bar"/> -->
|
||||||
<view class="custom-scroll-view">
|
<view class="custom-scroll-view">
|
||||||
|
|
||||||
<!-- <view class="tab-bar">
|
<view class="tab-bar">
|
||||||
<view class="item-container {{tabIndex==0?'current':''}}" bind:tap="changeTab" data-index="0">
|
<view class="item-container {{tabIndex==0?'current':''}}" bind:tap="changeTab" data-index="0">
|
||||||
<view class="item">配送订单</view>
|
<view class="item">配送订单</view>
|
||||||
</view> -->
|
</view>
|
||||||
<!-- <view class="item-container {{tabIndex==1?'current':''}}" bind:tap="changeTab" data-index="1">
|
<!-- <view class="item-container {{tabIndex==1?'current':''}}" bind:tap="changeTab" data-index="1">
|
||||||
<view class="item">消费买单</view>
|
<view class="item">消费买单</view>
|
||||||
</view> -->
|
</view> -->
|
||||||
<!-- <view class="item-container {{tabIndex==2?'current':''}}" bind:tap="changeTab" data-index="2">
|
<view class="item-container {{tabIndex==2?'current':''}}" bind:tap="changeTab" data-index="2">
|
||||||
<view class="item">商品订单</view>
|
<view class="item">商品订单</view>
|
||||||
</view>
|
</view>
|
||||||
</view> -->
|
</view>
|
||||||
<!-- <swiper style="height:{{scrollViewHeight*2}}rpx"> -->
|
<!-- <swiper style="height:{{scrollViewHeight*2}}rpx"> -->
|
||||||
|
|
||||||
<!-- 跑腿列表 -->
|
<!-- 跑腿列表 -->
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user