diff --git a/common/api/order.js b/common/api/order.js
index 00141fc..faeda26 100644
--- a/common/api/order.js
+++ b/common/api/order.js
@@ -2,7 +2,7 @@
* @Author: ch
* @Date: 2022-03-29 17:38:17
* @LastEditors: ch
- * @LastEditTime: 2022-04-15 11:29:32
+ * @LastEditTime: 2022-04-19 11:10:55
* @Description: file content
*/
import {ToAsyncAwait, MsbRequestTk} from '@/common/utils';
@@ -21,6 +21,7 @@ export const ApiGetOrderList = (params) =>
*/
export const ApiGetBeforeOrder = (data) =>
ToAsyncAwait(MsbRequestTk.get(`${BASE_URL}/app/tradeOrder/buyAdvanceOrder`, data));
+
/**
* 获取购物车预订单
* @param {*} data
@@ -41,6 +42,19 @@ export const ApiGetOrderDetail = (id) =>
*/
export const ApiGetOrderProductDetail = ({orderProductId}) =>
ToAsyncAwait(MsbRequestTk.get(`${BASE_URL}/app/tradeOrder/product/${orderProductId}`));
+
+/**
+ * 获取物流信息
+ * @param {*} orderId
+ */
+export const ApiGetOrderLogistics = ({orderId}) =>
+ ToAsyncAwait(MsbRequestTk.get(`${BASE_URL}/app/tradeOrder/logistics/${orderId}`));
+/**
+ * 确认收货
+ * @param {*} orderId
+ */
+export const ApiPutOrderReceive = (params) =>
+ ToAsyncAwait(MsbRequestTk.put(`${BASE_URL}/app/tradeOrder/receive`, params));
/**
* 提交订单
* @param {*} data
@@ -60,7 +74,8 @@ export const ApiPutCancelOrder = (data) =>
* @param {*} data
*/
export const ApiPostWxPay = (data) =>
- ToAsyncAwait(MsbRequestTk.post(`${BASE_URL}/pay/wxPay/app`, data));
+ // ToAsyncAwait(MsbRequestTk.post(`${BASE_URL}/pay/wxPay/app`, data));
+ ToAsyncAwait(MsbRequestTk.get(`${BASE_URL}/pay/payTest`, data));
@@ -98,7 +113,7 @@ export const ApiGetSaleAfterOrderList = (params) =>
* @param {*} data
*/
export const ApiGetSaleAfterOrderDetail = (params) =>
- ToAsyncAwait(MsbRequestTk.get(`${BASE_URL}/app/refundOrder/${params.refundId}`));
+ ToAsyncAwait(MsbRequestTk.get(`${BASE_URL}/app/refundOrder/refundInfo`, params));
/**
* 售后物流公司
* @param {*} data
diff --git a/common/utils/requset.js b/common/utils/requset.js
index 54d4520..82611e1 100644
--- a/common/utils/requset.js
+++ b/common/utils/requset.js
@@ -2,7 +2,7 @@
* @Author: ch
* @Date: 2022-03-17 17:42:32
* @LastEditors: ch
- * @LastEditTime: 2022-04-15 19:13:32
+ * @LastEditTime: 2022-04-18 10:04:10
* @Description: 项目接口请求统一处理器,返回一个需要token和不需要token的请求封装方法
*/
@@ -11,8 +11,8 @@ import $store from '@/common/store';
const ENV = 'test';
const BASE_URL = {
- 'test' : 'http://k8s-horse-gateway.mashibing.cn',
- // 'test' : '',
+ // 'test' : 'http://k8s-horse-gateway.mashibing.cn',
+ 'test' : '',
'release' : '',
'prod' : ''
};
diff --git a/manifest.json b/manifest.json
index 670834c..69c42d1 100644
--- a/manifest.json
+++ b/manifest.json
@@ -77,19 +77,13 @@
"devServer" : {
"proxy" : {
"/uc/" : {
- "target" : "http://192.168.10.52:8090/"
+ "target" : "http://192.168.10.109:8090/"
},
- "/mall/trade/" : {
- "target" : "http://192.168.10.52:8090/"
- },
- "/mall/base/" : {
- "target" : "http://192.168.10.52:8090/"
+ "/mall/" : {
+ "target" : "http://192.168.10.109:8090/"
},
"/pay/" : {
- "target" : "http://192.168.10.52:8090/"
- },
- "/mall/product/" : {
- "target" : "http://192.168.10.52:8090/"
+ "target" : "http://192.168.10.109:8090/"
}
}
}
diff --git a/pages.json b/pages.json
index 933101c..889a339 100644
--- a/pages.json
+++ b/pages.json
@@ -154,6 +154,21 @@
"navigationBarBackgroundColor" : "#F8F8F8"
}
},
+ {
+ "path": "pages/order/logisitcsInfo",
+ "aliasPath" : "/logisitcsInfo",
+ "style": {
+ "navigationBarTitleText": "物流详情",
+ "navigationBarBackgroundColor" : "#F8F8F8"
+ }
+ },
+ {
+ "path": "pages/order/orderSuccess",
+ "aliasPath" : "/orderSuccess",
+ "style": {
+ "navigationBarTitleText": "交易成功"
+ }
+ },
{
"path": "pages/order/paySuccess",
"aliasPath" : "/paySuccess",
@@ -251,6 +266,12 @@
}
]
},
+ "style": {
+ "app-plus": {
+ "animationType": "slide-in-right",
+ "animationDuration": 300
+ }
+ },
"globalStyle": {
"navigationBarBackgroundColor": "#fff",
"navigationBarTextStyle" : "black",
diff --git a/pages/account/address/list.vue b/pages/account/address/list.vue
index 10ad7fa..87aaf47 100644
--- a/pages/account/address/list.vue
+++ b/pages/account/address/list.vue
@@ -2,19 +2,17 @@
* @Author: ch
* @Date: 2022-03-22 13:54:15
* @LastEditors: ch
- * @LastEditTime: 2022-04-09 15:03:39
+ * @LastEditTime: 2022-04-18 18:36:28
* @Description: file content
-->
-
-
-
+
{{item.province}}{{item.city}}{{item.area}}
{{item.detailAddress}}
diff --git a/pages/account/setting/index.vue b/pages/account/setting/index.vue
index d9cb63c..ab39f0a 100644
--- a/pages/account/setting/index.vue
+++ b/pages/account/setting/index.vue
@@ -2,7 +2,7 @@
* @Author: ch
* @Date: 2022-03-22 15:09:06
* @LastEditors: ch
- * @LastEditTime: 2022-04-09 15:03:40
+ * @LastEditTime: 2022-04-18 18:40:02
* @Description: file content
-->
@@ -28,7 +28,7 @@ export default {
},
methods:{
logout(){
- // this.$store.commit('SET_TOKEN');
+ this.$store.commit('SET_TOKEN');
this.$Router.replace('/login')
}
}
diff --git a/pages/goods/detail/components/SkuPopup.vue b/pages/goods/detail/components/SkuPopup.vue
index f28ee71..c3c29f1 100644
--- a/pages/goods/detail/components/SkuPopup.vue
+++ b/pages/goods/detail/components/SkuPopup.vue
@@ -2,7 +2,7 @@
* @Author: ch
* @Date: 2022-03-24 11:30:55
* @LastEditors: ch
- * @LastEditTime: 2022-04-11 10:37:46
+ * @LastEditTime: 2022-04-19 10:51:46
* @Description: file content
-->
@@ -76,6 +76,11 @@ export default {
skuInfo : {
type : Array,
default : []
+ },
+ // 活动状态
+ activityStatus : {
+ type : String,
+ default : 'noActivity'
}
},
data() {
@@ -201,13 +206,13 @@ export default {
* 立即购买
*/
buyNow(){
- console.log(this.curSku)
this.$Router.push({
path : '/orderSubmit',
query: {
mode : 'buyNow',
skuId : this.curSku.skuId,
- num : this.curBuyNum
+ num : this.curBuyNum,
+ activityType : this.activityStatus === 'startActivity' ? 2 : 1
}
})
},
diff --git a/pages/goods/detail/index.vue b/pages/goods/detail/index.vue
index 58385a9..42f01dd 100644
--- a/pages/goods/detail/index.vue
+++ b/pages/goods/detail/index.vue
@@ -2,7 +2,7 @@
* @Author: ch
* @Date: 2022-03-23 17:27:21
* @LastEditors: ch
- * @LastEditTime: 2022-04-13 11:33:46
+ * @LastEditTime: 2022-04-19 10:48:00
* @Description: file content
-->
@@ -24,7 +24,7 @@
+ :goodsInfo="goods" :skuInfo="skuInfoData" :activityStatus="activityStatus">
@@ -36,10 +36,9 @@
购物车
@@ -72,6 +71,19 @@ export default {
productActivityVO : {}
}
},
+ computed:{
+ activityStatus(){
+ // noActivity 没有活动 noStartActivity有活动,未开始 startActivity活动已开始
+ let status = 'noActivity';
+ if(this.productActivityVO.isActivity){
+ status = 'noStartActivity';
+ }
+ if(this.productActivityVO.isStartActivity){
+ status = 'startActivity';
+ }
+ return status;
+ }
+ },
onLoad(){
this.getGoodsDetail();
},
diff --git a/pages/order/detail/components/LogisitcsInfo.vue b/pages/order/detail/components/LogisitcsInfo.vue
index c099b21..1e25fe6 100644
--- a/pages/order/detail/components/LogisitcsInfo.vue
+++ b/pages/order/detail/components/LogisitcsInfo.vue
@@ -2,14 +2,29 @@
* @Author: ch
* @Date: 2022-04-15 16:36:02
* @LastEditors: ch
- * @LastEditTime: 2022-04-15 17:00:16
+ * @LastEditTime: 2022-04-18 18:38:25
* @Description: file content
-->
-
-
+
+ {{lastLogisitcs.context}}
+
+
+ {{lastLogisitcs.time}}
+
+
+
+
+ {{logisitcsInfo.recipientAddress}}
+
+
+
+
+ {{logisitcsInfo.recipientName}}
+ {{logisitcsInfo.recipientPhone}}
+
@@ -22,15 +37,47 @@ export default {
type : Object,
defalut : () => ({})
}
+ },
+ computed : {
+ lastLogisitcs (){
+ const list = this.logisitcsInfo && this.logisitcsInfo.logisticsDataList
+ if(list && list.length > 0){
+ return list[0]
+ }else{
+ return null
+ }
+
+ }
}
}
\ No newline at end of file
diff --git a/pages/order/detail/components/Operation.vue b/pages/order/detail/components/Operation.vue
index 8231321..bef4b73 100644
--- a/pages/order/detail/components/Operation.vue
+++ b/pages/order/detail/components/Operation.vue
@@ -2,15 +2,23 @@
* @Author: ch
* @Date: 2022-04-15 17:46:10
* @LastEditors: ch
- * @LastEditTime: 2022-04-15 18:02:18
+ * @LastEditTime: 2022-04-18 17:41:55
* @Description: file content
-->
+
+
\ No newline at end of file
diff --git a/pages/order/orderSuccess.vue b/pages/order/orderSuccess.vue
new file mode 100644
index 0000000..2b187db
--- /dev/null
+++ b/pages/order/orderSuccess.vue
@@ -0,0 +1,48 @@
+
+
+
+
+ 交易成功
+
+ 返回首页
+
+
+
+
+
\ No newline at end of file
diff --git a/pages/order/saleAfter/saleAfterApply.vue b/pages/order/saleAfter/saleAfterApply.vue
index 8de3b57..04078cc 100644
--- a/pages/order/saleAfter/saleAfterApply.vue
+++ b/pages/order/saleAfter/saleAfterApply.vue
@@ -2,7 +2,7 @@
* @Author: ch
* @Date: 2022-04-11 13:51:10
* @LastEditors: ch
- * @LastEditTime: 2022-04-14 17:59:09
+ * @LastEditTime: 2022-04-18 17:55:17
* @Description: file content
-->
@@ -15,7 +15,7 @@
- ¥36.3
+ ¥{{$Route.query.amount}}
diff --git a/pages/order/saleAfter/saleAfterDetail/components/LogisticsInfo.vue b/pages/order/saleAfter/saleAfterDetail/components/LogisticsInfo.vue
index 25b5462..751e5ad 100644
--- a/pages/order/saleAfter/saleAfterDetail/components/LogisticsInfo.vue
+++ b/pages/order/saleAfter/saleAfterDetail/components/LogisticsInfo.vue
@@ -2,7 +2,7 @@
* @Author: ch
* @Date: 2022-04-14 14:19:41
* @LastEditors: ch
- * @LastEditTime: 2022-04-15 11:17:27
+ * @LastEditTime: 2022-04-18 18:14:30
* @Description: file content
-->
@@ -12,8 +12,8 @@
收货信息:
- {{data.recipientName}} {{data.recipientPhone}}
- {{data.recipientAddress}}
+ {{data.recipientName}} {{data.recipientPhone}}
+ {{data.recipientAddress}}
@@ -68,4 +68,9 @@ export default {
text-align: right;
}
}
+.recipient{
+ color: $color-grey5;
+ font-size: $font-size-sm;
+ margin-bottom: 10rpx;
+}
\ No newline at end of file
diff --git a/pages/order/saleAfter/saleAfterDetail/components/SubmitLogistics.vue b/pages/order/saleAfter/saleAfterDetail/components/SubmitLogistics.vue
index 60f3d59..eb38ed8 100644
--- a/pages/order/saleAfter/saleAfterDetail/components/SubmitLogistics.vue
+++ b/pages/order/saleAfter/saleAfterDetail/components/SubmitLogistics.vue
@@ -2,16 +2,20 @@
* @Author: ch
* @Date: 2022-04-14 13:44:30
* @LastEditors: ch
- * @LastEditTime: 2022-04-15 11:08:54
+ * @LastEditTime: 2022-04-18 18:08:29
* @Description: file content
-->
商家已同意退货申请,请尽早退货。
-
+
+ {{data.refundLogistics.recipientAddress}}
+
+ 收货人:{{data.refundLogistics.recipientName}}
+ {{data.refundLogistics.recipientPhone}}
+
@@ -164,10 +168,33 @@ export default {
.box{
padding: 0 30rpx;
}
-.address--icon{
- width: 40rpx;
- height: 48rpx;
- margin-right: 10rpx;
+.address{
+ /deep/.u-cell__body__content{
+ padding: 10rpx 0;
+
+ }
+ &--title{
+ overflow: hidden;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+ width: 500rpx;
+ &__grey{
+ color: $color-grey4;
+ }
+ }
+ &--icon{
+ width: 28rpx;
+ height: 34rpx;
+ margin-right: 30rpx;
+ }
+ &--label{
+ margin-top: 26rpx;
+ text{
+ font-size: $font-size-sm;
+ color: $color-grey4;
+ margin-right: 40rpx;
+ }
+ }
}
.title{
height: 98rpx;
diff --git a/pages/order/saleAfter/saleAfterDetail/index.vue b/pages/order/saleAfter/saleAfterDetail/index.vue
index ce654d4..1a0f71f 100644
--- a/pages/order/saleAfter/saleAfterDetail/index.vue
+++ b/pages/order/saleAfter/saleAfterDetail/index.vue
@@ -2,7 +2,7 @@
* @Author: ch
* @Date: 2022-03-31 14:26:09
* @LastEditors: ch
- * @LastEditTime: 2022-04-15 11:17:04
+ * @LastEditTime: 2022-04-18 11:01:25
* @Description: file content
-->
@@ -54,7 +54,9 @@ export default {
* 获取订单最新信息
*/
async getOrderInfo(){
- const {error, result} = await ApiGetSaleAfterOrderDetail({refundId:this.$Route.query.id});
+ const refundId = this.$Route.query.id;
+ const orderProductId = this.$Route.query.orderProductId;
+ const {error, result} = await ApiGetSaleAfterOrderDetail({refundId,orderProductId});
if(error){
uni.$u.toast(error.message);
return false;
diff --git a/pages/order/saleAfter/saleAfterSelect.vue b/pages/order/saleAfter/saleAfterSelect.vue
index bb0e7e3..83cd815 100644
--- a/pages/order/saleAfter/saleAfterSelect.vue
+++ b/pages/order/saleAfter/saleAfterSelect.vue
@@ -2,22 +2,21 @@
* @Author: ch
* @Date: 2022-04-14 16:50:37
* @LastEditors: ch
- * @LastEditTime: 2022-04-15 11:33:42
+ * @LastEditTime: 2022-04-18 17:54:03
* @Description: file content
-->
-
选择售后类型
-
+
申请退款
没有收到货,或已协商同意不退货只退款
-
+
申请退货退款
已收到货,需要退还收到的货物
@@ -48,6 +47,18 @@ export default {
return false;
}
this.orderInfo = result;
+ },
+ select(type,status){
+ const {orderProductId,realAmount} = this.orderInfo.orderProduct;
+ this.$Router.push({
+ path:'/saleAfterApply',
+ query:{
+ status,
+ type,
+ id: orderProductId,
+ amount : realAmount,
+ }
+ });
}
}
}
diff --git a/pages/order/submit.vue b/pages/order/submit.vue
index 81d51b9..af51b18 100644
--- a/pages/order/submit.vue
+++ b/pages/order/submit.vue
@@ -2,13 +2,13 @@
* @Author: ch
* @Date: 2022-03-20 14:14:53
* @LastEditors: ch
- * @LastEditTime: 2022-04-11 18:08:06
+ * @LastEditTime: 2022-04-19 10:58:00
* @Description: file content
-->
+ :border="false" isLink @click="$Router.push('/addressList?source=submitOrder')">
@@ -108,7 +108,9 @@ export default {
if(query.mode === 'buyNow'){
res = await ApiGetBeforeOrder({
productSkuId : query.skuId,
- quantity : query.num
+ quantity : query.num,
+ // 1正常购买 2活动购买
+ activityType : query.activityType
});
}
if(res.error){
@@ -123,13 +125,15 @@ export default {
* 提交订单
*/
async submit(){
+ const {query} = this.$Route;
const {error, result} = await ApiPostSubmitOrder({
orderSource : 2,
recipientAddressId : this.address.id,
products : this.orderInfo.products.map(i => ({
productId : i.productId,
productSkuId : i.productSkuId,
- quantity : i.quantity
+ quantity : i.quantity,
+ activityType : query.activityType
})),
userMessage : this.userMessage
});
@@ -140,11 +144,11 @@ export default {
this.wxpay(result.orderId);
},
async wxpay(orderId){
- const {error, result} = await ApiPostWxPay({orderId});
+ const {error, result} = await ApiPostWxPay({orderId,payTypeEnum:'WXPAY'});
if(error){
- this.$Router.push(`/payFail?ordId=${orderId}`)
+ this.$Router.replace(`/payFail?ordId=${orderId}`)
}else{
- this.$Router.push(`/paySuccess?ordId=${orderId}`)
+ this.$Router.replace(`/paySuccess?ordId=${orderId}`)
}
}
diff --git a/static/order/dw2.png b/static/order/dw2.png
new file mode 100644
index 0000000..31dd176
Binary files /dev/null and b/static/order/dw2.png differ
diff --git a/static/order/fj.png b/static/order/fj.png
new file mode 100644
index 0000000..911b195
Binary files /dev/null and b/static/order/fj.png differ