From d675cfe80732e51635f2076385933fa8d2369a6f Mon Sep 17 00:00:00 2001
From: "DESKTOP-GMUNQ1B\\k" <1154079537@qq.com>
Date: Sat, 16 Mar 2024 18:00:57 +0800
Subject: [PATCH] 1
---
api/order.js | 242 +--
pages/store/home/index.vue | 66 +-
pages/users/order_confirm/index.vue | 9 +
pages/users/order_list/index.vue | 2159 ++++++++++++++-------------
4 files changed, 1302 insertions(+), 1174 deletions(-)
diff --git a/api/order.js b/api/order.js
index afacfac..29beff4 100644
--- a/api/order.js
+++ b/api/order.js
@@ -9,19 +9,27 @@
// +----------------------------------------------------------------------
import request from "@/utils/request.js";
+/**
+ * 上传对公账户凭证
+ * @param numType boolean true 购物车数量,false=购物车产品数量
+ */
+export function uploadEnvidenceApi(orderId, url) {
+ return request.post("order/upload/" + orderId + '?url=' + url);
+}
+
/**
* 获取购物车列表
* @param numType boolean true 购物车数量,false=购物车产品数量
*/
export function getCartCounts(data) {
- return request.get("user/cart/count", data);
+ return request.get("user/cart/count", data);
}
/**
* 获取购物车列表
*
*/
export function getCartList(data) {
- return request.get("user/cart/lst", data);
+ return request.get("user/cart/lst", data);
}
/**
@@ -30,74 +38,74 @@ export function getCartList(data) {
* @param int number 修改数量
*/
export function changeCartNum(cartId, data) {
- return request.post("user/cart/change/"+cartId,data);
+ return request.post("user/cart/change/" + cartId, data);
}
/**
* 清除购物车
* @param object ids
-*/
-export function cartDel(data){
- return request.post('user/cart/delete', data);
+ */
+export function cartDel(data) {
+ return request.post('user/cart/delete', data);
}
/**
* 购物车商品属性
* @param object ids
-*/
-export function cartProductAttr(id){
- return request.get(`store/product/get_attr_value/${id}`);
+ */
+export function cartProductAttr(id) {
+ return request.get(`store/product/get_attr_value/${id}`);
}
/**
* 订单列表
* @param object data
-*/
-export function getOrderList(data){
- return request.get('order/list',data);
+ */
+export function getOrderList(data) {
+ return request.get('order/list', data);
}
/**
* 订单产品信息
* @param string unique
-*/
-export function orderProduct(orderId){
- return request.get('reply/product/'+orderId);
+ */
+export function orderProduct(orderId) {
+ return request.get('reply/product/' + orderId);
}
/**
* 订单评价
* @param object data
*
-*/
-export function orderComment(id,data){
- return request.post('reply/'+id,data);
+ */
+export function orderComment(id, data) {
+ return request.post('reply/' + id, data);
}
/**
* 订单支付
* @param object data
-*/
-export function orderPay(id,data){
- return request.post('order/pay/'+id,data);
+ */
+export function orderPay(id, data) {
+ return request.post('order/pay/' + id, data);
}
/**
* 积分商品订单支付
* @param object data
-*/
-export function integralOrderPay(id,data){
- return request.post('order/points/pay/'+id,data);
+ */
+export function integralOrderPay(id, data) {
+ return request.post('order/points/pay/' + id, data);
}
/**
* 订单统计数据
-*/
-export function orderData(data){
- return request.get('order/number', data)
+ */
+export function orderData(data) {
+ return request.get('order/number', data)
}
/**
* 订单取消
* @param string id
*
-*/
+ */
// export function orderCancel(id){
// return request.post('order/cancel',{id:id});
// }
@@ -106,57 +114,57 @@ export function orderData(data){
* 未支付订单取消
* @param string id
*
-*/
-export function unOrderCancel(id){
- return request.post('order/cancel/'+id);
+ */
+export function unOrderCancel(id) {
+ return request.post('order/cancel/' + id);
}
/**
* 删除已完成订单
* @param string uni
*
-*/
-export function orderDel(id){
- return request.post('order/del/'+id);
+ */
+export function orderDel(id) {
+ return request.post('order/del/' + id);
}
/**
* 订单详情
* @param string uni
-*/
-export function getOrderDetail(uni){
- return request.get('order/detail/'+uni);
+ */
+export function getOrderDetail(uni) {
+ return request.get('order/detail/' + uni);
}
/**
* 订单详情
* @param string uni
-*/
-export function groupOrderDetail(uni){
- return request.get('order/group_order_detail/'+uni);
+ */
+export function groupOrderDetail(uni) {
+ return request.get('order/group_order_detail/' + uni);
}
// 支付状态订单
-export function getPayOrder(uni){
- return request.get('order/status/'+uni);
+export function getPayOrder(uni) {
+ return request.get('order/status/' + uni);
}
/**
* 再次下单
* @param string uni
*
-*/
-export function orderAgain(data){
- return request.post('user/cart/again',data);
+ */
+export function orderAgain(data) {
+ return request.post('user/cart/again', data);
}
/**
* 订单收货
* @param string uni
*
-*/
-export function orderTake(uni){
- return request.post('order/take/'+uni);
+ */
+export function orderTake(uni) {
+ return request.post('order/take/' + uni);
}
/**
@@ -164,52 +172,52 @@ export function orderTake(uni){
* @returns {*}
*/
export function express(id) {
- return request.post("order/express/" + id);
+ return request.post("order/express/" + id);
}
/**
* 退款单查询物流信息
* @returns {*}
*/
-export function refundOrderExpress(merId,id) {
- return request.get(`server/${merId}/refund/express/${id}`);
+export function refundOrderExpress(merId, id) {
+ return request.get(`server/${merId}/refund/express/${id}`);
}
/**
* 获取退款理由
*
-*/
-export function ordeRefundReason(){
- return request.get('order/refund/reason');
+ */
+export function ordeRefundReason() {
+ return request.get('order/refund/reason');
}
/**
* 订单退款审核
* @param object data
-*/
-export function orderRefundVerify(data){
- return request.post('order/refund/verify',data);
+ */
+export function orderRefundVerify(data) {
+ return request.post('order/refund/verify', data);
}
/**
* 订单确认获取订单详细信息
* @param string cartId
-*/
-export function orderConfirm(data){
- return request.post('order/check', data);
+ */
+export function orderConfirm(data) {
+ return request.post('order/check', data);
}
/**
* 订单确认获取订单详细信息
* @param string cartId
-*/
-export function getOrderConfirm(data){
- return request.post('v2/order/check', data);
+ */
+export function getOrderConfirm(data) {
+ return request.post('v2/order/check', data);
}
/**
* 获取当前金额能使用的优惠卷
* @param string price
*
-*/
-export function getCouponsOrderPrice(price, data){
- return request.get('coupons/order/' + price, data)
+ */
+export function getCouponsOrderPrice(price, data) {
+ return request.get('coupons/order/' + price, data)
}
@@ -221,50 +229,68 @@ export function getCouponsOrderPrice(price, data){
* @returns {*}
*/
export function postOrderComputed(key, data) {
- return request.post("/order/computed/" + key, data);
+ return request.post("/order/computed/" + key, data);
}
// 生成订单
export function orderCreate(data) {
- return request.post("order/create",data,{ noAuth : true });
+ return request.post("order/create", data, {
+ noAuth: true
+ });
}
// 新的生成订单
export function createOrder(data) {
- return request.post("v2/order/create",data,{ noAuth : true });
+ return request.post("v2/order/create", data, {
+ noAuth: true
+ });
}
// 未支付订单
export function groupOrderList(data) {
- return request.get("order/group_order_list",data,{ noAuth : true });
+ return request.get("order/group_order_list", data, {
+ noAuth: true
+ });
}
// 批量退款列表
export function refundBatch(id) {
- return request.get("refund/batch_product/"+id,{ noAuth : true });
+ return request.get("refund/batch_product/" + id, {
+ noAuth: true
+ });
}
// 退款商品
-export function refundProduct(id,data) {
- return request.get("refund/product/"+id,data,{ noAuth : true });
+export function refundProduct(id, data) {
+ return request.get("refund/product/" + id, data, {
+ noAuth: true
+ });
}
// 申请退款
-export function refundApply(id,data) {
- return request.post("refund/apply/"+id,data,{ noAuth : true });
+export function refundApply(id, data) {
+ return request.post("refund/apply/" + id, data, {
+ noAuth: true
+ });
}
// 退款理由
export function refundMessage() {
- return request.get("common/refund_message",{ noAuth : true });
+ return request.get("common/refund_message", {
+ noAuth: true
+ });
}
// 退款列表
export function refundList(data) {
- return request.get("refund/list",data,{ noAuth : true });
+ return request.get("refund/list", data, {
+ noAuth: true
+ });
}
// 退款详情
export function refundDetail(id) {
- return request.get("refund/detail/"+id,{ noAuth : true });
+ return request.get("refund/detail/" + id, {
+ noAuth: true
+ });
}
// 物流列表
@@ -273,71 +299,79 @@ export function expressList() {
}
// 退回商品提交
-export function refundBackGoods(id,data) {
- return request.post("refund/back_goods/"+id,data,{ noAuth : true });
+export function refundBackGoods(id, data) {
+ return request.post("refund/back_goods/" + id, data, {
+ noAuth: true
+ });
}
// 退款记录删除
export function refundDel(id) {
- return request.post("refund/del/"+id,{ noAuth : true });
+ return request.post("refund/del/" + id, {
+ noAuth: true
+ });
}
// 退款记录删除
export function refundExpress(id) {
- return request.get("refund/express/"+id,{ noAuth : true });
+ return request.get("refund/express/" + id, {
+ noAuth: true
+ });
}
// 核销二维码
export function verifyCode(id) {
- return request.get("order/verify_code/"+id);
+ return request.get("order/verify_code/" + id);
}
/**
* 预售尾款支付
* @param object data
-*/
-export function presellOrderPay(id,data){
- return request.post('presell/pay/'+id,data);
+ */
+export function presellOrderPay(id, data) {
+ return request.post('presell/pay/' + id, data);
}
/**
* 发票订单
* @param object data
-*/
-export function receiptOrder(data){
- return request.get('user/receipt/order',data);
+ */
+export function receiptOrder(data) {
+ return request.get('user/receipt/order', data);
}
/**
* 发票订单
* @param object data
-*/
-export function getReceiptOrder(id){
- return request.get('user/receipt/order/'+id);
+ */
+export function getReceiptOrder(id) {
+ return request.get('user/receipt/order/' + id);
}
/**
* 发票订单
* @param object data
-*/
-export function getCallBackUrlApi(key){
- return request.get('common/pay_key/'+key, {},{ noAuth : true});
+ */
+export function getCallBackUrlApi(key) {
+ return request.get('common/pay_key/' + key, {}, {
+ noAuth: true
+ });
}
/**
* 发票订单
* @param object data
-*/
-export function develiveryDetail(id){
- return request.get(`order/delivery/${id}`);
+ */
+export function develiveryDetail(id) {
+ return request.get(`order/delivery/${id}`);
}
/**
* 订单申请开票
* @param object data
-*/
-export function applyInvoiceApi(id, data){
- return request.post(`order/receipt/${id}`, data);
+ */
+export function applyInvoiceApi(id, data) {
+ return request.post(`order/receipt/${id}`, data);
}
/**
* 退款单取消申请
* @param object data
-*/
-export function refundCancelApi(id){
- return request.post(`refund/cancel/${id}`);
+ */
+export function refundCancelApi(id) {
+ return request.post(`refund/cancel/${id}`);
}
\ No newline at end of file
diff --git a/pages/store/home/index.vue b/pages/store/home/index.vue
index d023ca0..858a4e7 100644
--- a/pages/store/home/index.vue
+++ b/pages/store/home/index.vue
@@ -11,12 +11,12 @@
搜索商品名称
搜索
-
-
+
@@ -24,7 +24,7 @@
- {{store.mer_name}}
+ {{store.mer_name}}
{{ score.number.toFixed(1) }}
- 月销2000+
+ 月销{{store.sales}}+
营业时间 : 90:00-21:00
- {{store.mer_address}}
+
+ {{store.mer_address}}
@@ -687,23 +688,37 @@
}
},
// #endif
- mounted: function() {
- const query = uni.createSelectorQuery().in(this);
- // query.select('#store').boundingClientRect(data => {
- // this.storeHeight = data.height;
- // this.storeTop = data.top;
- // }).exec();
- },
-
methods: {
- // 购物车
- toGwc() {
- uni.switchTab({
- url: "/pages/order_addcart/order_addcart",
- fail(err) {
- console.log(err);
- }
- })
+ // 查看地图
+ showMaoLocation: function() {
+ if (!this.store.lat || !this.store.long) return this
+ .$util.Tips({
+ title: '请设置允许商城访问您的位置!'
+ });
+ let that = this,
+ lat = parseFloat(this.store.lat),
+ long = parseFloat(this.store.long)
+ //#ifdef H5
+ if (that.$wechat.isWeixin() === true) {
+ that.$wechat.seeLocation({
+ latitude: Number(lat),
+ longitude: Number(long),
+ address: this.store.mer_address ? this.store.mer_address : ''
+ }).then(res => {
+ console.log('success');
+ })
+ } else {
+ //#endif
+ uni.openLocation({
+ latitude: lat,
+ longitude: long,
+ address: this.store.mer_address ? this.store.mer_address : '',
+ scale: 8,
+ success: function() {},
+ });
+ // #ifdef H5
+ }
+ //#endif
},
// 列表高度
@@ -1167,8 +1182,8 @@
.header {
position: relative;
- padding: 0 34rpx;
- height: calc(300rpx + var(--status-bar-height));
+ padding: 0 34rpx 20rpx;
+ min-height: calc(300rpx + var(--status-bar-height));
background-color: #40AE36;
.head-menu {
@@ -1194,7 +1209,7 @@
align-items: center;
height: 58rpx;
border-radius: 29rpx;
- margin: 0 32rpx;
+ margin-left: 32rpx;
background-color: #FFFFFF;
.iconfont {
@@ -1237,6 +1252,8 @@
.shop-img {
margin-right: 20rpx;
+ border-radius: 10rpx;
+ overflow: hidden;
}
.shop-info {
@@ -1246,6 +1263,7 @@
font-weight: 600;
font-size: 28rpx;
color: #FFFFFF;
+ word-break: break-word;
}
.shop-info-eva {
diff --git a/pages/users/order_confirm/index.vue b/pages/users/order_confirm/index.vue
index 619635f..19b972c 100644
--- a/pages/users/order_confirm/index.vue
+++ b/pages/users/order_confirm/index.vue
@@ -1518,6 +1518,15 @@
url: goPages + '&status=1'
});
break;
+ case "public":
+ //对公账户
+ return that.$util.Tips({
+ title: '下单成功,请上传支付凭证!'
+ }, {
+ tab: 5,
+ url: "/pages/users/order_list/index"
+ });
+ break;
// #ifdef H5
case 'h5':
let host = window.location.protocol + "//" + window.location.host;
diff --git a/pages/users/order_list/index.vue b/pages/users/order_list/index.vue
index e9f0963..f35703e 100644
--- a/pages/users/order_list/index.vue
+++ b/pages/users/order_list/index.vue
@@ -1,44 +1,46 @@
-
-
-
-
-
-
-
-
- 用户订单
- 商户订单
-
-
-
-
-
-
-
- 全部
- {{orderData.all || 0}}
-
-
- 待付款
- {{orderData.noPay || 0}}
-
-
- 待发货
- {{orderData.noPostage || 0}}
-
-
- 待收货
- {{orderData.noDeliver || 0}}
-
-
- 待评价
- {{orderData.noComment || 0}}
-
-
-
-
-
-
-
-
- 搜索我的订单
-
-
-
-
-
- 预售尾款订单转到这里了!
- 有 {{ presellOrderCount }} 笔预售尾款订单待付款,请点击查看
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{item.group_order_sn}}
-
-
- {{ item.orderList[0].activity_type === 2 && item.orderList[0].orderProduct[0].cart_info.productPresell.presell_type ==2 ? "待付定金" : "待付款" }}
-
-
-
-
-
-
-
-
-
-
-
-
-
- 预售{{goods.cart_info.product.store_name}}
- 发货时间:
-
-
- {{ goods.cart_info.productPresell.delivery_type === 1 ? '支付成功后' : '预售结束后' }}{{ goods.cart_info.productPresell.delivery_day }}天内
-
-
- {{ goods.cart_info.productPresell.delivery_type === 1 ? '支付尾款后' : '预售结束后' }}{{ goods.cart_info.productPresell.delivery_day }}天内
-
-
-
- ¥{{goods.cart_info.productPresellAttr.presell_price}}
- x{{goods.product_num}}
-
-
-
- 定金待支付 ¥{{ order.pay_price }}
- 尾款待支付 ¥{{ order.presellOrder.pay_price }}
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{goods.product_type == 1 ? "秒杀" : goods.product_type == 2 ? "预售" : goods.product_type == 3 ? "助力" : goods.product_type == 4 ? "拼团" : ""}}
- {{goods.cart_info.product.store_name}}
-
-
- ¥{{goods.cart_info.activeSku.active_price}}
- x{{goods.product_num}}
-
-
- ¥{{goods.cart_info.productAttr.price}}
- x{{goods.product_num}}
-
-
-
-
-
-
- 共{{item.total_num || 0}}件商品,总金额
- ¥{{item.pay_price}}
-
-
- 立即付款
-
-
-
-
-
-
-
-
-
-
-
- {{item.merchant.mer_name}}
-
-
-
- {{item.takeOrderCount > 0 ? '部分核销' : '待核销'}}
- 待发货
-
- 待收货
- 待评价
- 已完成
- 已退款
-
-
-
-
-
-
-
-
-
-
- 预售{{goods.cart_info.product.store_name}}
- 发货时间:
-
- {{ goods.cart_info.productPresell.delivery_type === 1 ? '支付成功后' : '预售结束后' }}{{ goods.cart_info.productPresell.delivery_day }}天内
-
- {{ goods.cart_info.productPresell.delivery_type === 1 ? '支付尾款后' : '预售结束后' }}{{ goods.cart_info.productPresell.delivery_day }}天内
-
-
-
- {{goods.is_refund==1?'退款中':goods.is_refund==2?'部分退款':goods.is_refund==3?'全部退款':''}}
-
-
- ¥{{goods.cart_info.productPresellAttr.presell_price}}
- x{{goods.product_num}}
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{goods.product_type == 1 ? "秒杀" : goods.product_type == 2 ? "预售" : goods.product_type == 3 ? "助力" : goods.product_type == 4 ? "拼团" : ""}}
- {{goods.cart_info.product.store_name}}
-
-
- {{goods.is_refund==1?'退款中':goods.is_refund==2?'部分退款':goods.is_refund==3?'全部退款':''}}
-
-
-
- ¥{{goods.cart_info.productAssistAttr.assist_price}}
- x{{goods.product_num}}
-
-
- ¥{{goods.cart_info.activeSku.active_price}}
- x{{goods.product_num}}
-
-
- ¥{{goods.cart_info.productAttr.price}}
- x{{goods.product_num}}
-
-
-
-
- 共{{item.orderNum || 0}}件商品,总金额
- ¥{{item.presell_price}}
-
- 共{{item.orderNum || 0}}件商品,总金额
- ¥{{item.pay_price}}
-
-
-
- 申请开票
-
- 查看详情
-
-
- 查看物流
- 确认收货
-
-
-
+
+ 搜索我的订单
+
+
+
+
+
+ 预售尾款订单转到这里了!
+ 有 {{ presellOrderCount }} 笔预售尾款订单待付款,请点击查看
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{item.group_order_sn}}
+
+
+ {{ item.orderList[0].activity_type === 2 && item.orderList[0].orderProduct[0].cart_info.productPresell.presell_type ==2 ? "待付定金" : "待付款" }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 预售{{goods.cart_info.product.store_name}}
+ 发货时间:
+
+
+ {{ goods.cart_info.productPresell.delivery_type === 1 ? '支付成功后' : '预售结束后' }}{{ goods.cart_info.productPresell.delivery_day }}天内
+
+
+ {{ goods.cart_info.productPresell.delivery_type === 1 ? '支付尾款后' : '预售结束后' }}{{ goods.cart_info.productPresell.delivery_day }}天内
+
+
+
+ ¥{{goods.cart_info.productPresellAttr.presell_price}}
+
+ x{{goods.product_num}}
+
+
+
+ 定金待支付 ¥{{ order.pay_price }}
+ 尾款待支付 ¥{{ order.presellOrder.pay_price }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{goods.product_type == 1 ? "秒杀" : goods.product_type == 2 ? "预售" : goods.product_type == 3 ? "助力" : goods.product_type == 4 ? "拼团" : ""}}
+ {{goods.cart_info.product.store_name}}
+
+
+
+ ¥{{goods.cart_info.activeSku.active_price}}
+ x{{goods.product_num}}
+
+
+ ¥{{goods.cart_info.productAttr.price}}
+ x{{goods.product_num}}
+
+
+
+
+
+
+
+ 共{{item.total_num || 0}}件商品,总金额
+ ¥{{item.pay_price}}
+
+
+
+ 立即付款
+
+
+
+ 上传凭证
+
+
+
+
+
+
+
+
+
+
+
+ {{item.merchant.mer_name}}
+
+
+
+ {{item.takeOrderCount > 0 ? '部分核销' : '待核销'}}
+ 待发货
+
+ 待收货
+ 待评价
+ 已完成
+ 已退款
+
+
+
+
+
+
+
+
+
+
+ 预售{{goods.cart_info.product.store_name}}
+ 发货时间:
+
+ {{ goods.cart_info.productPresell.delivery_type === 1 ? '支付成功后' : '预售结束后' }}{{ goods.cart_info.productPresell.delivery_day }}天内
+
+ {{ goods.cart_info.productPresell.delivery_type === 1 ? '支付尾款后' : '预售结束后' }}{{ goods.cart_info.productPresell.delivery_day }}天内
+
+
+
+ {{goods.is_refund==1?'退款中':goods.is_refund==2?'部分退款':goods.is_refund==3?'全部退款':''}}
+
+
+
+ ¥{{goods.cart_info.productPresellAttr.presell_price}}
+ x{{goods.product_num}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{goods.product_type == 1 ? "秒杀" : goods.product_type == 2 ? "预售" : goods.product_type == 3 ? "助力" : goods.product_type == 4 ? "拼团" : ""}}
+ {{goods.cart_info.product.store_name}}
+
+
+ {{goods.is_refund==1?'退款中':goods.is_refund==2?'部分退款':goods.is_refund==3?'全部退款':''}}
+
+
+
+
+ ¥{{goods.cart_info.productAssistAttr.assist_price}}
+ x{{goods.product_num}}
+
+
+
+ ¥{{goods.cart_info.activeSku.active_price}}
+ x{{goods.product_num}}
+
+
+ ¥{{goods.cart_info.productAttr.price}}
+ x{{goods.product_num}}
+
+
+
+
+ 共{{item.orderNum || 0}}件商品,总金额
+ ¥{{item.presell_price}}
+
+ 共{{item.orderNum || 0}}件商品,总金额
+ ¥{{item.pay_price}}
+
+
+
+ 申请开票
+
+ 查看详情
+
+
+ 查看物流
+ 确认收货
+
+
+
+ 去评价
+
+
+
+
+ 查看详情
+
-
-
-
+ -->
+ 再次购买
+
+
+
+
+
+
+
+ {{loadTitle}}
+
+
+
+
+
+
+
+
+
\ No newline at end of file