完善订单模块

This commit is contained in:
2025-05-16 09:14:08 +08:00
parent a92a6c5baf
commit 2b0d3c9c20
10 changed files with 463 additions and 237 deletions

View File

@ -186,6 +186,7 @@
}, },
created() { created() {
this.getCartNum() this.getCartNum()
this.getCartListFun()
}, },
methods: { methods: {
...mapActions(['getCartNum']), ...mapActions(['getCartNum']),
@ -241,8 +242,7 @@
showCartPopup() { showCartPopup() {
if (this.cartLists.length > 0) { if (this.cartLists.length > 0) {
this.showCart = true this.showCart = true
} } else {
else {
this.$toast({ this.$toast({
title: '请先添加商品' title: '请先添加商品'
}); });
@ -285,30 +285,29 @@
// 获取购物车列表数据 // 获取购物车列表数据
getCartListFun() { getCartListFun() {
console.log("1>>>", 1);
getCartList().then((res) => { getCartList().then((res) => {
if (res.code == 1) { if (res.code == 1) {
console.log("res>>>", res);
let { let {
lists, lists,
total_amount total_amount
} = res.data; } = res.data;
// let cartType = 0;
// if (lists.length == 0) {
// cartType = 2;
// } else {
// cartType = 1;
// }
this.cartLists = lists; this.cartLists = lists;
// // let cartType = 0;
// this.cartType = cartType; // // if (lists.length == 0) {
// // cartType = 2;
// // } else {
// // cartType = 1;
// // }
// this.cartLists = list;
// console.log(">>>", this.cartLists);
// // this.cartType = cartType;
this.totalPrice = total_amount this.totalPrice = total_amount
// this.isShow = true; // // this.isShow = true;
this.getCartNum(); // this.getCartNum();
} }
}); });
}, },
@ -415,7 +414,7 @@
.main-wrap { .main-wrap {
position: relative; position: relative;
padding: 0 20rpx; padding: 0 20rpx 160rpx;
.goods { .goods {
.info { .info {
width: 100%; width: 100%;
@ -432,7 +431,7 @@
position: fixed; position: fixed;
left: 0; left: 0;
right: 0; right: 0;
bottom: env(safe-area-inset-bottom); bottom: calc(env(safe-area-inset-bottom) + 10rpx);
height: 100rpx; height: 100rpx;
background-color: #212526; background-color: #212526;
} }

View File

@ -0,0 +1,79 @@
<template>
<u-modal v-model="show" :show-cancel-button ="true" :content="getTipsText" @confirm="onConfirm" confirm-color="#ff2c3c"></u-modal>
</template>
<script>
import {
cancelOrder,
delOrder,
confirmOrder
} from '@/api/order';
export default {
props: {
type: Number,
orderId: [Number, String]
},
data() {
return {
show: false
};
},
methods: {
open() {
this.show = true
},
close() {
this.show = false
},
async onConfirm() {
const {
type,
orderId
} = this;
let res = null;
switch (type) {
case 0:
res = await cancelOrder(orderId);
break;
case 1:
res = await delOrder(orderId);
break;
case 2:
res = await confirmOrder(orderId);
break;
}
if (res.code == 1) {
this.close()
this.$emit("refresh")
this.$toast({
title: res.msg
});
}
},
},
computed: {
getTipsText() {
const {
type
} = this
switch (type) {
case 0:
return "确认取消订单吗?"
case 1:
return "确认删除订单吗?"
case 2:
return "确认收货吗?"
}
}
}
}
</script>
<style>
</style>

View File

@ -1,59 +1,61 @@
<template> <template>
<view class="order-goods bg-white"> <view class="bg-white">
<view v-for="(item, index) in list" :key="index" class="item-wrap u-p-b-20"> <view v-for="(item, index) in list" :key="index" class="item-wrap u-p-b-20">
<view class="row-between u-p-l-20 u-p-r-20 u-p-t-20"> <view class="row-between u-p-r-20 u-p-t-20 u-p-b-24" v-if="mode === 'order'">
<view class="u-line-1 nr bold-500 text-000"> {{ item.goods_name || item.name }}</view> <view class="u-line-1 nr bold-500 text-000"> {{ item.goods_name || item.name }}</view>
<view class="text-999 flex1 u-m-l-40 text-nowrap">{{ orderDesc }}</view> <view class="text-999 flex1 u-m-l-40 text-nowrap">{{ orderDesc }}</view>
</view> </view>
<view class="item row" @tap="toGoods(item.goods_id)"> <view class="item" :class="{row: mode != 'pay', 'row-start': mode == 'pay'}" @tap="toGoods(item.goods_id)">
<view> <view>
<u-image :src="item.image_str || item.image" <u-image :src="item.image_str || item.image"
:width="imageWidth" :width="imageWidth"
:height="imageHeight" :height="imageHeight"
:border-radius="imageRadius" :border-radius="imageRadius"
mode="aspectFit" :mode="mode === 'confirm' ? 'aspectFill' : 'aspectFit'"
lazy-load/> lazy-load/>
</view> </view>
<view class="goods-info ml20 flex1"> <view class="goods-info ml20 flex1">
<view class="sm text-999"> <view class="sm text-999" v-if="mode === 'order'">
<view>下单时间:2024-10-10 16:58:53</view> <view>下单时间:2024-10-10 16:58:53</view>
<view>预计时间:2025-10-10 16:58:54</view> <view>预计时间:2025-10-10 16:58:54</view>
<view>数量:x{{ item.goods_num }}</view> <view>数量:x{{ item.goods_num }}</view>
<view>实付:0.00</view> <view>实付:
<price-format
v-if="!item.is_member && order_type === 0"
:weight="500"
:subscript-size="24"
:first-size="34"
:second-size="24"
:price="item.original_price || item.goods_price"
></price-format>
</view>
<view>{{item.spec_value_str || item.spec_value}}</view> <view>{{item.spec_value_str || item.spec_value}}</view>
</view> </view>
<view class="sm text-999" v-if="mode === 'confirm'">
<view class="u-line-2" style="color: #1D2129">{{ item.goods_name || item.name }}</view>
<view class="u-m-t-4">周一至周日可用</view>
<view class="row u-m-t-10">
<view class="primary">
<price-format :price="item.original_price || item.goods_price" :subscriptSize="22" :firstSize="40" :secondSize="32"></price-format>
</view> </view>
</view> </view>
<view class="u-m-t-26 u-m-b-26 u-p-l-20 u-p-r-20">
<u-line color="#EEE" />
</view> </view>
<view class="u-m-t-26 row-between u-p-l-20 u-p-r-20"> <view class="sm text-999" v-if="mode === 'pay'">
<view class="primary flex1"> <view class="u-line-2" style="color: #1D2129">{{ item.goods_name || item.name }}</view>
<view v-if="getCancelTime(orderCancleTime) > 0" >
<u-count-down separator="zh"
:timestamp="getCancelTime(item.order_cancel_time)" separator-color="#FF2C3C"
color="#FF2C3C" :separator-size="26" :font-size="26" bg-color="transparent"
@end="refresh"></u-count-down>
</view> </view>
<view class="sm text-999" v-if="mode === 'order_detail'">
<view class="u-line-2" style="color: #1D2129">{{ item.goods_name || item.name }}</view>
<view class="u-m-t-4">x{{ item.goods_num }}</view>
<view class="row u-m-t-10">
<view class="primary">
<price-format :price="item.original_price || item.goods_price" :subscriptSize="22" :firstSize="40" :secondSize="32"></price-format>
</view> </view>
<view class="row">
<view class="u-m-r-16">
<u-button @click="cancleOrder" hover-class="none" :customStyle="{width: '164rpx', height: '60rpx', color: '#999', border: '1px solid #DDD'}" :plain="true" :hair-line="false" shape="circle">取消订单</u-button>
</view> </view>
<view>
<u-button @click="toPay" hover-class="none" :customStyle="{width: '164rpx', height: '60rpx', backgroundColor: themeColor, color: '#fff', border: 'none'}" :hair-line="false" shape="circle">去付款</u-button>
</view> </view>
<!-- <view>
<u-button @click="seeDetails" hover-class="none" :customStyle="{width: '164rpx', height: '60rpx', backgroundColor: themeColor, color: '#fff', border: 'none'}" :hair-line="false" shape="circle">查看详情</u-button>
</view>
<view>
<u-button @click="toRefund" hover-class="none" :customStyle="{width: '164rpx', height: '60rpx', backgroundColor: themeColor, color: '#fff', border: 'none'}" :hair-line="false" shape="circle">查看详情</u-button>
</view> -->
</view> </view>
</view> </view>
<template v-if="mode === 'comfirm'"> <template v-if="mode === 'confirm'">
<view class="delivery" v-if="delivery === 1 && !item.is_express" <view class="delivery" v-if="delivery === 1 && !item.is_express"
>该商品不支持快递配送</view >该商品不支持快递配送</view
> >
@ -116,7 +118,7 @@ export default {
type: Number, type: Number,
default: 1 default: 1
}, },
// order | comfirm // order | confirm | pay
mode: { mode: {
type: String, type: String,
default: 'order' default: 'order'
@ -140,10 +142,6 @@ export default {
orderDesc: { orderDesc: {
type: String, type: String,
default: '' default: ''
},
orderCancleTime: {
type: Number,
default: 0
} }
}, },
@ -153,18 +151,8 @@ export default {
uni.navigateTo({ uni.navigateTo({
url: `/pages/goods_details/goods_details?id=${id}` url: `/pages/goods_details/goods_details?id=${id}`
}) })
},
refresh() {
this.$emit('refresh')
} }
}, }
computed: {
getCancelTime() {
return (time) => time - Date.now() / 1000;
},
},
} }
</script> </script>
<style lang="scss"> <style lang="scss">

View File

@ -1,63 +1,50 @@
<template> <template>
<view> <mescroll-uni ref="mescroll" top="100rpx" @init="mescrollInit" @down="downCallback" :down="downOption" :up="upOption" @up="upCallback">
<view class="u-p-t-20 u-p-b-20 "> <view class="u-p-20">
<view> <navigator class="bg-white br16 px20 u-m-b-24 u-p-b-20" hover-class="none"
<mescroll-body ref="mescroll" @init="mescrollInit" @down="downCallback" :up="upOption" @up="upCallback"> v-for="(item, index) in orderList"
<navigator :key="index"
class="br16 px20 u-m-b-24" :url="'/pages/order_details/order_details?id=' + item.id">
hover-class="none" <order-goods :list="item.order_goods" :order_type="item.order_type" :imageRadius="12"
url="/pages/order_details/order_details?type=0" :orderDesc="item.order_status_desc"></order-goods>
v-for="(item, index ) in orderList" :key="index"> <view class="u-m-t-26 u-m-b-26 u-p-l-20 u-p-r-20">
<order-goods :list="item.order_goods"
:order_type="item.order_type"
:imageRadius="12"
:orderDesc="item.order_status_desc"
:orderCancleTime="item.order_cancle_time"
@refresh="orderRefresh"></order-goods>
<!-- <view class="row-between">
<view>{{ item. }}</view>
<view class="text-999">待付款</view> -->
<!-- <view class="text-999">已完成</view>
<view class="text-999">退款</view>
<view class="primary" >未制作</view>
<view class="primary" >未取餐</view> -->
<!-- </view>
<view class="u-m-t-16 row">
<view>
<u-image :src="cloudPath + 'img/banner.png'" width="124" height="124" border-radius="16"></u-image>
</view>
<view class="sm ml20 text-999">
<view>下单时间:2024-10-10 16:58:53</view>
<view>预计时间:2025-10-10 16:58:54</view>
<view>数量:1</view>
<view>实付:0.00</view>
</view>
</view>
<view class="u-m-t-26 u-m-b-26">
<u-line color="#EEE" /> <u-line color="#EEE" />
</view> -->
</navigator>
</mescroll-body>
</view> </view>
<!-- <view class="u-m-t-26 row-between"> <view class="u-m-t-26 row-between u-p-l-20 u-p-r-20">
<view class="primary">等待时间:15分钟</view> --> <view class="primary flex1">
<!-- <view class="row"> <view v-if="getCancelTime(item.order_cancel_time) > 0">
<view class="u-m-r-16"> <u-count-down separator="zh" :timestamp="getCancelTime(item.order_cancel_time)"
<u-button @click="cancleOrder" hover-class="none" :customStyle="{width: '164rpx', height: '60rpx', color: '#999', border: '1px solid #DDD'}" :plain="true" :hair-line="false" shape="circle">取消订单</u-button> separator-color="#FF2C3C" color="#FF2C3C" :separator-size="26" :font-size="26"
bg-color="transparent" @end="orderRefresh"></u-count-down>
</view> </view>
<view> <!-- 这边还缺一个未制作等待的时间 -->
<u-button @click="toPay" hover-class="none" :customStyle="{width: '164rpx', height: '60rpx', backgroundColor: themeColor, color: '#fff', border: 'none'}" :hair-line="false" shape="circle">去付款</u-button> <view class="primary" v-if="type === 'finish'">
</view> --> 存餐格号:15号
<!-- <view> </view>
</view>
<view class="row">
<view class="u-m-r-16" v-if="item.cancel_btn">
<u-button @click="cancelOrder(item.id)" hover-class="none"
:customStyle="{ width: '164rpx', height: '60rpx', color: '#999', border: '1px solid #DDD' }"
:plain="true" :hair-line="false" shape="circle">取消订单</u-button>
</view>
<view v-if="item.pay_btn">
<u-button @click="payNow(item.id)" hover-class="none"
:customStyle="{ width: '164rpx', height: '60rpx', backgroundColor: themeColor, color: '#fff', border: 'none' }"
:hair-line="false" shape="circle">去付款</u-button>
</view>
<view v-if="type === 'delivery' || type === 'finish'">
<u-button @click="seeDetails" hover-class="none" :customStyle="{width: '164rpx', height: '60rpx', backgroundColor: themeColor, color: '#fff', border: 'none'}" :hair-line="false" shape="circle">查看详情</u-button> <u-button @click="seeDetails" hover-class="none" :customStyle="{width: '164rpx', height: '60rpx', backgroundColor: themeColor, color: '#fff', border: 'none'}" :hair-line="false" shape="circle">查看详情</u-button>
</view> </view>
<view> <!-- <view>
<u-button @click="toRefund" hover-class="none" :customStyle="{width: '164rpx', height: '60rpx', backgroundColor: themeColor, color: '#fff', border: 'none'}" :hair-line="false" shape="circle">查看详情</u-button> <u-button @click="toRefund" hover-class="none" :customStyle="{width: '164rpx', height: '60rpx', backgroundColor: themeColor, color: '#fff', border: 'none'}" :hair-line="false" shape="circle">申请退款</u-button>
</view> -->
<!-- </view>
</view> --> </view> -->
</view> </view>
</view> </view>
</navigator>
<order-dialog ref="orderDialog" :order-id="orderId" :type="orderType" @refresh="reflesh"></order-dialog>
</view>
</mescroll-uni>
</template> </template>
<script> <script>
@ -82,14 +69,22 @@
data() { data() {
return { return {
orderList: [], orderList: [],
downOption: {
auto: false
},
upOption: { upOption: {
noMoreSize: 4, noMoreSize: 4,
empty: { empty: {
tip: '~ 空空如也 ~', // 提示 tip: '~ 空空如也 ~', // 提示
btnText: '' btnText: '',
fixed: true
}, },
textNoMore: '没有更多了' textNoMore: '没有更多了'
}, },
orderId: "",
pay_way: "",
showCancel: false,
orderType: 0
} }
}, },
created() { created() {
@ -120,14 +115,26 @@
this.mescroll.resetUpScroll() this.mescroll.resetUpScroll()
}, },
// 取消订单 cancelOrder(id) {
cancleOrder() { this.orderId = id;
this.orderType = 0;
this.$nextTick(() => {
this.orderDialog();
});
}, },
// 去付款 payNow(id) {
toPay() { uni.navigateTo({
url: `/pages/payment/payment?from=${"order"}&order_id=${id}`,
});
},
reflesh() {
this.mescroll.resetUpScroll()
},
orderDialog() {
this.$refs.orderDialog.open();
}, },
// 查看详情 // 查看详情
@ -139,10 +146,20 @@
toRefund() { toRefund() {
} }
},
computed: {
getCancelTime() {
return (time) => time - Date.now() / 1000;
},
},
watch: {
type() {
this.mescroll.resetUpScroll()
}
} }
} }
</script> </script>
<style lang="scss"> <style lang="scss">
</style> </style>

View File

@ -15,8 +15,8 @@ const IS_H5 = false
const baseURLMap = { const baseURLMap = {
// 开发环境 // 开发环境
// development: 'https://likeshop-open.yixiangonline.com', // development: 'https://likeshop-open.yixiangonline.com',
// development: 'http://admin.likeshop.com', development: 'http://admin.likeshop.com',
development: 'https://jianbing.stnav.com', // development: 'https://jianbing.stnav.com',
// development: 'https://jb.stnav.com', // development: 'https://jb.stnav.com',
// 生产环境https://php-b2c.likeshop.cn // 生产环境https://php-b2c.likeshop.cn

View File

@ -22,11 +22,11 @@
}, },
{ {
name: '待付款', name: '待付款',
type: orderType.WAIT_PAY type: orderType.PAY
}, },
{ {
name: '未制作', name: '未制作',
type: orderType.NOT_MADE type: orderType.DELIVERY
}, },
{ {
name: '已完成', name: '已完成',
@ -34,7 +34,7 @@
}, },
{ {
name: '退款', name: '退款',
type: orderType.REFUND type: orderType.CLOSE
} }
], ],
current: 0, current: 0,
@ -46,8 +46,10 @@
}, },
methods: { methods: {
tabChange(index) { tabChange(index) {
console.log("this.list>>>", this.list);
this.current = index this.current = index
this.type = this.list[index].type this.type = this.list[index].type
} }
} }
} }

View File

@ -1,12 +1,21 @@
<template> <template>
<view class="u-m-l-32 u-m-r-32"> <view class="u-m-l-32 u-m-r-32" style="padding-bottom: 200rpx;">
<view class="u-p-32 br16 bg-white u-m-t-16"> <view v-if="orderDetail.order_status == 0" class="u-m-t-48 row">
滨江区XXX门店 <view class="bold-500 mb10 xxxl text-000" >未付款</view>
<view class="u-m-l-16 sm row text-999" style="line-height: 26rpx" v-if="cancelTime > 0">请在
<u-count-down separator="zh" :timestamp="cancelTime" separator-color="#999" color="#999"
:separator-size="26" :font-size="26" bg-color="transparent"></u-count-down>
内完成支付
</view>
</view>
<view class="u-p-32 br16 bg-white u-m-t-16" v-if="orderDetail.order_status > 0">
{{ orderDetail.delivery_address }}
</view> </view>
<view class="bg-white u-p-32 u-m-t-36 br8"> <view class="bg-white u-p-32 u-m-t-36 br8">
<view class="row u-col-top"> <view class="row u-col-top">
<view> <!-- <view>
<u-image :src="cloudPath + 'img/banner.png'" width="124" height="124" border-radius="8"></u-image> <u-image :src="cloudPath + 'img/banner.png'" width="124" height="124" border-radius="8"></u-image>
</view> </view>
<view> <view>
@ -29,7 +38,9 @@
<price-format :lineThrough="true" color="#C0C0C0" :subscriptSize="22" :firstSize="22" :secondSize="22" :price="16.9"></price-format> <price-format :lineThrough="true" color="#C0C0C0" :subscriptSize="22" :firstSize="22" :secondSize="22" :price="16.9"></price-format>
</view> </view>
</view> </view>
</view> </view> -->
<order-goods :link="true" :list="orderDetail.order_goods"
:order_type="orderDetail.order_type" :mode="orderDetail.order_status == 0 ? 'pay' : 'order_detail'"></order-goods>
</view> </view>
<view class="row-end"> <view class="row-end">
@ -38,6 +49,38 @@
</view> </view>
</view> </view>
<view class="bg-white u-p-32 u-m-t-40 br8" v-if="orderDetail.order_status == 0" >
<view class="bold-600 u-font-28">保温盒地址</view>
<view class="text-attr u-m-t-16">
<view class="u-m-t-8 text-999">
孙婉宛
</view>
<view class="u-m-t-8 text-999">
15271435646
</view>
<view class="u-m-t-8 text-999">
站前北街4号顺义供电公司北50米
</view>
</view>
</view>
<view class="bg-white u-p-32 u-m-t-40 br8" v-if="orderDetail.order_status == 0" >
<view class="bold-600 u-font-28">订单信息</view>
<view class="text-attr u-m-t-16">
<view class="u-m-t-8 text-999">
<view>买家昵称: 134213234122321232123</view>
</view>
<view class="u-m-t-8 text-999">
<view>订单编号: {{ orderDetail.order_sn }}</view>
</view>
<view class="u-m-t-8 text-999">
<view>下单时间: {{ orderDetail.create_time }}</view>
</view>
</view>
</view>
<view class="bg-white u-p-32 u-m-t-32"> <view class="bg-white u-p-32 u-m-t-32">
<view class="row-between"> <view class="row-between">
<view class="nr">商品总价</view> <view class="nr">商品总价</view>
@ -104,20 +147,125 @@
</view> </view>
</view> </view>
<view class="fixed row-end u-text-center btn-group bg-white u-p-t-20"> <view class="fixed row-start u-text-center btn-group bg-white" v-if="orderDetail.order_status == 0">
<view class="flex1 btn1" @tap="cancelOrder">取消订单</view>
<view class="flex1 btn2 bg-default text-fff" @tap="payNow">立即支付</view>
<!-- <u-button class="flex1" @click="mobileLogin" hover-class="none" :customStyle="{color: themeColor, padding: '16rpx 0'}" :plain="true" :hair-line="false">取消订单</u-button> -->
<!-- <u-button class="flex1" @click="mpLogin" hover-class="none" :customStyle="{backgroundColor: themeColor, color: '#fff', border: 'none', padding: '16rpx 0'}" :hair-line="false">立即支付</u-button> -->
</view>
<view class="fixed row-end u-text-center btn-group bg-white u-p-t-20" v-if="orderDetail.order_status > 0">
<view class="mr20"> <view class="mr20">
<u-button @click="mobileLogin" hover-class="none" :customStyle="{width: '160rpx', height: '80rpx', color: themeColor, border: '1px solid ' + themeColor, padding: '16rpx 0', borderRadius: '8rpx'}" :plain="true" :hair-line="false">查看物流</u-button> <u-button @click="mobileLogin" hover-class="none" :customStyle="{width: '160rpx', height: '60rpx', color: themeColor, border: '1px solid ' + themeColor, padding: '16rpx 0', borderRadius: '8rpx'}" :plain="true" :hair-line="false">查看物流</u-button>
</view> </view>
<view> <view class="u-m-r-34">
<u-button @click="mpLogin" hover-class="none" :customStyle="{width: '160rpx', height: '80rpx', backgroundColor: themeColor, color: '#fff', border: 'none', padding: '16rpx 0', borderRadius: '8rpx'}" :hair-line="false">确认收货</u-button> <u-button @click="mpLogin" hover-class="none" :customStyle="{width: '160rpx', height: '60rpx', backgroundColor: themeColor, color: '#fff', border: 'none', padding: '16rpx 0', borderRadius: '8rpx'}" :hair-line="false">确认收货</u-button>
</view> </view>
</view> </view>
<order-dialog ref="orderDialog" :orderId="orderDetail.id" :type="type" @refresh="onRefresh"></order-dialog>
</view> </view>
</template> </template>
<script> <script>
export default { import {
getOrderDetail,
getwechatSyncCheck,
getwxReceiveDetail,
confirmOrder,
} from "@/api/order"
export default {
data() {
return {
orderDetail: {},
team: {},
isFirstLoading: true,
type: 0,
cancelTime: 0,
showCancel: "",
showLoading: false,
imageQR: "",
priceShow: false,
};
},
onLoad: function (options) {
this.id = options.id;
this.getOrderDetailFun();
},
onUnload() {
uni.$off("payment");
},
methods: {
onRefresh() {
uni.$emit("refreshorder");
const { type } = this;
if ([0, 2].includes(type)) {
this.getOrderDetailFun();
} else if (type == 1) {
setTimeout(() => {
uni.navigateBack();
}, 2000);
}
},
getOrderDetailFun() {
getOrderDetail(this.id)
.then((res) => {
if (res.code == 1) {
this.cancelTime = res.data.order_cancel_time - Date.now() / 1000;
this.orderDetail = res.data;
this.$nextTick(() => {
this.isFirstLoading = false;
});
} else {
setTimeout(() => uni.navigateBack(), 1500);
}
return res.data;
})
.then((data) => {
if (data.delivery_type === 2) {
// 提货码
this.$nextTick(function () {
const refQR = this.$refs["qrcode"];
refQR._makeCode();
});
}
});
},
// 取消订单
cancelOrder() {
this.type = 0;
this.$nextTick(() => {
this.orderDialog();
});
},
orderDialog() {
this.$refs.orderDialog.open();
},
payNow() {
uni.$on("payment", (params) => {
setTimeout(() => {
if (params.result) {
this.$toast({
title: "支付成功",
});
this.getOrderDetailFun();
uni.$emit("refreshorder");
} else {
this.$toast({
title: "支付失败",
});
}
}, 500);
});
uni.navigateTo({
url: `/pages/payment/payment?from=${"order"}&order_id=${this.id}`,
});
},
}
} }
</script> </script>
@ -140,7 +288,13 @@
.btn-group { .btn-group {
& > view { & > view {
font-size: 36rpx;
height: 100rpx; height: 100rpx;
line-height: 100rpx;
}
.btn1 {
color: #323232;
} }
} }
</style> </style>

View File

@ -74,25 +74,7 @@
</view> </view>
<view class="bg-white br16 row u-m-t-32"> <view class="bg-white br16 row u-m-t-32">
<order-goods :team="{ need: orderInfo.team_need }" :list="goodsLists" :delivery="delivery" <order-goods :team="{ need: orderInfo.team_need }" :list="goodsLists" :delivery="delivery"
:order_type="orderInfo.order_type" :imageWidth="260" :imageHeight="172" mode="comfirm"></order-goods> :order_type="orderInfo.order_type" :imageWidth="260" :imageHeight="172" mode="confirm"></order-goods>
<!-- <view>
<u-image :src="cloudPath + 'img/banner.png'" width="260" height="172"></u-image>
</view>
<view class="ml20 flex1">
<view class="nr bold-600">煎饼果子</view>
<view class="text-999 mt10">周一指周日可用</view>
<view class="mt20 row-between">
<view class="row">
<view class="primary">
<price-format :price="12.9" :subscriptSize="22" :firstSize="40" :secondSize="32"></price-format>
</view>
<view class="u-m-l-8">
<price-format :lineThrough="true" color="#C0C0C0" :subscriptSize="22" :firstSize="24" :secondSize="24" :price="16.9"></price-format>
</view>
</view>
<view class="num nr">X1</view>
</view>
</view> -->
</view> </view>
<view class="item row-between bg-white br16 row u-m-t-32 p24" @tap="showCoupon = true"> <view class="item row-between bg-white br16 row u-m-t-32 p24" @tap="showCoupon = true">

View File

@ -64,6 +64,10 @@ page {
/* 定义字体大小 */ /* 定义字体大小 */
.xxxl {
font-size: 40rpx;
}
.xxl { .xxl {
font-size: 36rpx; font-size: 36rpx;
} }

View File

@ -23,13 +23,14 @@ export const orderType = {
// 全部 // 全部
ALL: 'all', ALL: 'all',
// 待付款 // 待付款
WAIT_PAY: 'wait_pay', PAY: 'pay',
// 未制作 // 未制作
NOT_MADE: 'not_made', DELIVERY: 'delivery',
// 已完成 // 已完成
FINISH: 'finish', FINISH: 'finish',
// 退款 // 退款
REFUND: 'refund' REFUND: 'refund',
CLOSE: 'close' //待收货
}; };
// 售后状态 // 售后状态
export const AfterSaleType = { export const AfterSaleType = {