diff --git a/buyer/src/api/account.js b/buyer/src/api/account.js index f42da5f5..d0058117 100644 --- a/buyer/src/api/account.js +++ b/buyer/src/api/account.js @@ -11,7 +11,7 @@ import request, {Method} from '@/plugins/request.js' // 获取密码状态 export function getPwdStatus (params) { return request({ - url: '/buyer/members/wallet/check', + url: '/buyer/passport/members/wallet/check', method: Method.GET, needToken: true, params @@ -21,7 +21,7 @@ export function getPwdStatus (params) { // 设置密码 export function setPwd (params) { return request({ - url: '/buyer/members/wallet/set-password', + url: '/buyer/passport/members/wallet/set-password', method: Method.POST, needToken: true, data: params @@ -31,7 +31,7 @@ export function setPwd (params) { // 设置支付密码 export function setUpdatePwdOrdinary (params) { return request({ - url: '/buyer/members/wallet/update-password/ordinary', + url: '/buyer/passport/members/wallet/update-password/ordinary', method: Method.GET, needToken: true, data: params @@ -41,7 +41,7 @@ export function setUpdatePwdOrdinary (params) { // 修改会员资料 export function editMemberInfo (params) { return request({ - url: '/buyer/members/editOwn', + url: '/buyer/passport/members/editOwn', method: Method.PUT, needToken: true, data: params @@ -51,7 +51,7 @@ export function editMemberInfo (params) { // 修改密码 export function editPwd (params) { return request({ - url: `/buyer/members/modifyPass`, + url: `/buyer/passport/members/modifyPass`, method: Method.PUT, needToken: true, data: params @@ -61,7 +61,7 @@ export function editPwd (params) { // 获取密码状态 export function logout () { return request({ - url: '/buyer/members/logout', + url: '/buyer/passport/members/logout', method: Method.POST, needToken: true }) diff --git a/buyer/src/api/address.js b/buyer/src/api/address.js index c3163bb0..76e060de 100644 --- a/buyer/src/api/address.js +++ b/buyer/src/api/address.js @@ -5,7 +5,7 @@ import request, { // 会员收货地址列表 export function memberAddress () { return request({ - url: '/buyer/memberAddress', + url: '/buyer/member/address', needToken: true, method: Method.GET }); @@ -14,7 +14,7 @@ export function memberAddress () { // 添加收货地址 export function newMemberAddress (params) { return request({ - url: '/buyer/memberAddress', + url: '/buyer/member/address', needToken: true, method: Method.POST, data: params @@ -24,7 +24,7 @@ export function newMemberAddress (params) { // 编辑收货地址 export function editMemberAddress (params) { return request({ - url: '/buyer/memberAddress', + url: '/buyer/member/address', needToken: true, method: Method.PUT, params @@ -34,7 +34,7 @@ export function editMemberAddress (params) { // 删除收货地址 export function delMemberAddress (id) { return request({ - url: `/buyer/memberAddress/delById/${id}`, + url: `/buyer/member/address/delById/${id}`, needToken: true, method: Method.DELETE }); @@ -43,7 +43,7 @@ export function delMemberAddress (id) { // 根据id获取会员地址详情 export function getAddrDetail (id) { return request({ - url: `/buyer/memberAddress/get/${id}`, + url: `/buyer/member/address/get/${id}`, needToken: true, method: Method.GET }); @@ -52,7 +52,7 @@ export function getAddrDetail (id) { // 传给后台citycode 获取城市街道等id export function handleRegion (params) { return request({ - url: `${commonUrl}/common/region/region`, + url: `${commonUrl}/common/common/common/region/region`, needToken: true, method: Method.GET, params diff --git a/buyer/src/api/common.js b/buyer/src/api/common.js index 68bebf68..a508640f 100644 --- a/buyer/src/api/common.js +++ b/buyer/src/api/common.js @@ -5,7 +5,7 @@ import request, {Method, commonUrl} from '@/plugins/request.js'; */ export function getVerifyImg (verificationEnums) { return request({ - url: `${commonUrl}/common/slider/${verificationEnums}`, + url: `${commonUrl}/common/common/slider/${verificationEnums}`, method: Method.GET, needToken: false }); @@ -15,7 +15,7 @@ export function getVerifyImg (verificationEnums) { */ export function postVerifyImg (params) { return request({ - url: `${commonUrl}/common/slider/${params.verificationEnums}`, + url: `${commonUrl}/common/common/slider/${params.verificationEnums}`, method: Method.POST, needToken: false, params @@ -26,7 +26,7 @@ export function postVerifyImg (params) { */ export function sendSms (params) { return request({ - url: `${commonUrl}/common/sms/${params.verificationEnums}/${params.mobile}`, + url: `${commonUrl}/common/common/sms/${params.verificationEnums}/${params.mobile}`, method: Method.GET, needToken: false, params @@ -45,7 +45,7 @@ export function getLogo () { // 地区数据,用于三级联动 export function getRegion (id) { return request({ - url: `${commonUrl}/common/region/item/${id}`, + url: `${commonUrl}/common/common/region/item/${id}`, needToken: true, method: Method.GET }); @@ -57,7 +57,7 @@ export function getRegion (id) { */ export function articleList (params) { return request({ - url: `/buyer/article`, + url: `/buyer/other/article`, method: Method.GET, params }); @@ -69,7 +69,7 @@ export function articleList (params) { */ export function articleCateList () { return request({ - url: `/buyer/article/articleCategory/list`, + url: `/buyer/other/article/articleCategory/list`, method: Method.GET }); } @@ -77,7 +77,7 @@ export function articleCateList () { // 通过id获取文章 export function articleDetail (id) { return request({ - url: `/buyer/article/get/${id}`, + url: `/buyer/other/article/get/${id}`, method: Method.GET }); } diff --git a/buyer/src/api/goods.js b/buyer/src/api/goods.js index de77e633..d38d97e4 100644 --- a/buyer/src/api/goods.js +++ b/buyer/src/api/goods.js @@ -5,7 +5,7 @@ import request, { // 商品列表 export function goodsList (params) { return request({ - url: '/buyer/goods/es', + url: '/buyer/goods/goods/es', method: Method.GET, needToken: false, params @@ -15,7 +15,7 @@ export function goodsList (params) { // 商品分类 筛选条件 品牌, 尺寸等 export function filterList (params) { return request({ - url: '/buyer/goods/es/related', + url: '/buyer/goods/goods/es/related', method: Method.GET, needToken: false, params @@ -25,7 +25,7 @@ export function filterList (params) { // id获取商品详情 export function goodsDetail (goodsId) { return request({ - url: `/buyer/goods/get/${goodsId}`, + url: `/buyer/goods/goods/get/${goodsId}`, method: Method.GET, needToken: false }); @@ -34,7 +34,7 @@ export function goodsDetail (goodsId) { // id获取商品Sku详情 export function goodsSkuDetail (params) { return request({ - url: `/buyer/goods/sku/${params.goodsId}/${params.skuId}`, + url: `/buyer/goods/goods/sku/${params.goodsId}/${params.skuId}`, method: Method.GET, needToken: true, params @@ -65,7 +65,7 @@ export function pintuanMembers (pintuanId) { */ export function hotWords (params) { return request({ - url: `/buyer/goods/hot-words`, + url: `/buyer/goods/goods/hot-words`, method: Method.GET, needToken: false, params diff --git a/buyer/src/api/index.js b/buyer/src/api/index.js index 900df3ee..c3a32e68 100644 --- a/buyer/src/api/index.js +++ b/buyer/src/api/index.js @@ -3,7 +3,7 @@ import request, {Method} from '@/plugins/request.js' // 获取首页楼层装修数据 export function indexData (params) { return request({ - url: '/buyer/pageData/getIndex', + url: '/buyer/other/pageData/getIndex', method: Method.GET, needToken: false, params @@ -17,7 +17,7 @@ export function indexData (params) { */ export function pageData (params) { return request({ - url: `/buyer/pageData`, + url: `/buyer/other/pageData`, method: Method.GET, needToken: false, params @@ -28,7 +28,7 @@ export function pageData (params) { */ export function handleRefreshToken (token) { return request({ - url: `/buyer/members/refresh/${token}`, + url: `/buyer/passport/members/refresh/${token}`, method: Method.GET, needToken: false }) diff --git a/buyer/src/api/login.js b/buyer/src/api/login.js index ab81f1f5..fb745279 100644 --- a/buyer/src/api/login.js +++ b/buyer/src/api/login.js @@ -6,7 +6,7 @@ import request, {Method, buyerUrl} from '@/plugins/request.js'; */ export function regist (params) { return request({ - url: '/buyer/members/register', + url: '/buyer/passport/members/register', method: Method.POST, needToken: false, data: params @@ -18,7 +18,7 @@ export function regist (params) { */ export function login (params) { return request({ - url: '/buyer/members/userLogin', + url: '/buyer/passport/members/userLogin', method: Method.POST, needToken: false, data: params, @@ -31,7 +31,7 @@ export function login (params) { */ export function smsLogin (params) { return request({ - url: '/buyer/members/smsLogin', + url: '/buyer/passport/members/smsLogin', method: Method.POST, needToken: false, data: params, @@ -44,7 +44,7 @@ export function smsLogin (params) { */ export function getMemberMsg (params) { return request({ - url: '/buyer/members', + url: '/buyer/passport/members', method: Method.GET, needToken: true, params @@ -55,7 +55,7 @@ export function getMemberMsg (params) { * 第三方登录 支付宝,微博,qq,微信 */ export function webLogin (type) { - window.open(`${buyerUrl}/buyer/connect/login/web/${type}`, 'blank'); + window.open(`${buyerUrl}/buyer/passport/connect/connect/login/web/${type}`, 'blank'); } /** @@ -63,7 +63,7 @@ export function webLogin (type) { */ export function loginCallback (uuid) { return request({ - url: `/buyer/connect/result?state=${uuid}`, + url: `/buyer/passport/connect/connect/result?state=${uuid}`, method: Method.GET, needToken: false }); @@ -74,7 +74,7 @@ export function loginCallback (uuid) { */ export function validateCode (params) { return request({ - url: `/buyer/members/resetByMobile`, + url: `/buyer/passport/members/resetByMobile`, method: Method.POST, needToken: false, params @@ -86,7 +86,7 @@ export function validateCode (params) { */ export function resetPassword (params) { return request({ - url: `/buyer/members/resetPassword`, + url: `/buyer/passport/members/resetPassword`, method: Method.POST, needToken: false, params diff --git a/buyer/src/api/member.js b/buyer/src/api/member.js index 86dc640e..ab863d0d 100644 --- a/buyer/src/api/member.js +++ b/buyer/src/api/member.js @@ -3,7 +3,7 @@ import request, {Method} from '@/plugins/request.js'; // 查询账户余额 export function getMembersWallet () { return request({ - url: '/buyer/members/wallet', + url: '/buyer/passport/members/wallet', method: Method.GET, needToken: true }); @@ -52,7 +52,7 @@ export function recharge (params) { // 提现 export function withdrawalApply (params) { return request({ - url: '/buyer/members/wallet/withdrawal', + url: '/buyer/passport/members/wallet/withdrawal', method: Method.POST, needToken: true, data: params @@ -99,7 +99,7 @@ export function collectList (params) { // 单个商品评价 export function goodsComment (params) { return request({ - url: `/buyer/memberEvaluation/${params.goodsId}/goodsEvaluation`, + url: `/buyer/member/evaluation/${params.goodsId}/goodsEvaluation`, method: Method.GET, needToken: false, params @@ -109,7 +109,7 @@ export function goodsComment (params) { // 商品各评价类别数量 export function goodsCommentNum (goodsId) { return request({ - url: `/buyer/memberEvaluation/${goodsId}/evaluationNumber`, + url: `/buyer/member/evaluation/${goodsId}/evaluationNumber`, method: Method.GET, needToken: false }); @@ -118,7 +118,7 @@ export function goodsCommentNum (goodsId) { // 添加会员评价 export function addEvaluation (params) { return request({ - url: `/buyer/memberEvaluation`, + url: `/buyer/member/evaluation`, method: Method.POST, needToken: true, params @@ -128,7 +128,7 @@ export function addEvaluation (params) { // 会员评价详情 export function evaluationDetail (id) { return request({ - url: `/buyer/memberEvaluation/get/${id}`, + url: `/buyer/member/evaluation/get/${id}`, method: Method.GET, needToken: true }); @@ -195,7 +195,7 @@ export function receiveCoupon (couponId) { // 获取申请售后列表 export function afterSaleList (params) { return request({ - url: `/buyer/afterSale/page`, + url: `/buyer/order/afterSale/page`, method: Method.GET, needToken: true, params @@ -205,7 +205,7 @@ export function afterSaleList (params) { // 获取申请售后页面信息 export function afterSaleInfo (sn) { return request({ - url: `/buyer/afterSale/applyAfterSaleInfo/${sn}`, + url: `/buyer/order/afterSale/applyAfterSaleInfo/${sn}`, method: Method.GET, needToken: true }); @@ -214,7 +214,7 @@ export function afterSaleInfo (sn) { // 获取申请售后、投诉原因 export function afterSaleReason (serviceType) { return request({ - url: `/buyer/afterSale/get/afterSaleReason/${serviceType}`, + url: `/buyer/order/afterSale//get/afterSaleReason/${serviceType}`, method: Method.GET, needToken: true }); @@ -222,7 +222,7 @@ export function afterSaleReason (serviceType) { // 获取申请售后详情 export function afterSaleDetail (sn) { return request({ - url: `/buyer/afterSale/get/${sn}`, + url: `/buyer/order/afterSale//get/${sn}`, method: Method.GET, needToken: true }); @@ -230,7 +230,7 @@ export function afterSaleDetail (sn) { // 售后日志 export function afterSaleLog (sn) { return request({ - url: `/buyer/afterSale/get/getAfterSaleLog/${sn}`, + url: `/buyer/order/afterSale//get/getAfterSaleLog/${sn}`, method: Method.GET, needToken: true }); @@ -239,7 +239,7 @@ export function afterSaleLog (sn) { // 申请售后 export function applyAfterSale (params) { return request({ - url: `/buyer/afterSale/save/${params.orderItemSn}`, + url: `/buyer/order/afterSale/save/${params.orderItemSn}`, method: Method.POST, needToken: true, params @@ -249,7 +249,7 @@ export function applyAfterSale (params) { // 取消售后申请 export function cancelAfterSale (afterSaleSn) { return request({ - url: `/buyer/afterSale/cancel/${afterSaleSn}`, + url: `/buyer/order/afterSale/cancel/${afterSaleSn}`, method: Method.POST, needToken: true }); @@ -258,7 +258,7 @@ export function cancelAfterSale (afterSaleSn) { // 投诉商品 export function handleComplain (data) { return request({ - url: `/buyer/complain`, + url: `/buyer/order/complain`, method: Method.POST, needToken: true, data @@ -267,7 +267,7 @@ export function handleComplain (data) { // 分页获取我的投诉列表 export function complainList (params) { return request({ - url: `/buyer/complain`, + url: `/buyer/order/complain`, method: Method.GET, needToken: true, params @@ -279,7 +279,7 @@ export function complainList (params) { */ export function getComplainDetail (id) { return request({ - url: `/buyer/complain/${id}`, + url: `/buyer/order/complain/${id}`, method: Method.GET, needToken: true }); @@ -290,7 +290,7 @@ export function getComplainDetail (id) { */ export function clearComplain (id) { return request({ - url: `/buyer/complain/status/${id}`, + url: `/buyer/order/complain/status/${id}`, method: Method.PUT, needToken: true }); @@ -390,7 +390,7 @@ export function distCash (params) { */ export function tracksList (params) { return request({ - url: `/buyer/footprint`, + url: `/buyer/member/footprint`, method: Method.GET, needToken: true, params @@ -402,7 +402,7 @@ export function tracksList (params) { */ export function clearTracks () { return request({ - url: `/buyer/footprint`, + url: `/buyer/member/footprint`, method: Method.DELETE, needToken: true }); @@ -414,7 +414,7 @@ export function clearTracks () { */ export function clearTracksById (ids) { return request({ - url: `/buyer/footprint/delByIds/${ids}`, + url: `/buyer/member/footprint/delByIds/${ids}`, method: Method.DELETE, needToken: true }); @@ -449,7 +449,7 @@ export function memberPointHistory (params) { */ export function memberMsgList (params) { return request({ - url: `/buyer/member/message`, + url: `/buyer/message/member`, method: Method.GET, needToken: true, params @@ -462,7 +462,7 @@ export function memberMsgList (params) { export function readMemberMsg (id) { return request({ - url: `/buyer/member/message/${id}`, + url: `/buyer/message/member/${id}`, method: Method.PUT, needToken: true }); @@ -473,7 +473,7 @@ export function readMemberMsg (id) { */ export function delMemberMsg (id) { return request({ - url: `/buyer/member/message/${id}`, + url: `/buyer/message/member/${id}`, method: Method.DELETE, needToken: true }); diff --git a/buyer/src/api/order.js b/buyer/src/api/order.js index c120f60f..d04f48fa 100644 --- a/buyer/src/api/order.js +++ b/buyer/src/api/order.js @@ -5,7 +5,7 @@ import request, { // 查询会员订单列表 export function getOrderList (params) { return request({ - url: `/buyer/orders`, + url: `/buyer/order/order`, method: Method.GET, needToken: true, params @@ -18,7 +18,7 @@ export function getOrderList (params) { */ export function orderDetail (orderSn) { return request({ - url: `/buyer/orders/${orderSn}`, + url: `/buyer/order/order/${orderSn}`, method: Method.GET, needToken: true }); @@ -31,7 +31,7 @@ export function orderDetail (orderSn) { */ export function cancelOrder (params) { return request({ - url: `/buyer/orders/${params.orderSn}/cancel`, + url: `/buyer/order/order/${params.orderSn}/cancel`, method: Method.POST, needToken: true, params @@ -44,7 +44,7 @@ export function cancelOrder (params) { */ export function delOrder (orderSn) { return request({ - url: `/buyer/orders/${orderSn}`, + url: `/buyer/order/order/${orderSn}`, method: Method.DELETE, needToken: true }); @@ -56,7 +56,7 @@ export function delOrder (orderSn) { */ export function sureReceived (orderSn) { return request({ - url: `/buyer/orders/${orderSn}/receiving`, + url: `/buyer/order/order/${orderSn}/receiving`, method: Method.POST, needToken: true }); @@ -68,7 +68,7 @@ export function sureReceived (orderSn) { */ export function getTraces (orderSn) { return request({ - url: `/buyer/orders/getTraces/${orderSn}`, + url: `/buyer/order/order/getTraces/${orderSn}`, method: Method.POST, needToken: true }); @@ -80,7 +80,7 @@ export function getTraces (orderSn) { */ export function evolutionList (params) { return request({ - url: `/buyer/memberEvaluation`, + url: `/buyer/member/evaluation`, method: Method.GET, needToken: true, params @@ -90,7 +90,7 @@ export function evolutionList (params) { // 添加交易投诉对话 export function communication (params) { return request({ - url: `/buyer/complain/communication`, + url: `/buyer/order/complain/communication`, method: Method.POST, needToken: true, params @@ -100,7 +100,7 @@ export function communication (params) { // 退换货服务 提交物流 export function afterSaleDelivery (params) { return request({ - url: `/buyer/afterSale/delivery/${params.afterSaleSn}`, + url: `/buyer/order/afterSale/delivery/${params.afterSaleSn}`, method: Method.POST, needToken: true, params diff --git a/buyer/src/api/pay.js b/buyer/src/api/pay.js index c573a583..c18d9db1 100644 --- a/buyer/src/api/pay.js +++ b/buyer/src/api/pay.js @@ -10,7 +10,7 @@ import request, { */ export function tradeDetail (params) { return request({ - url: '/buyer/cashier/tradeDetail', + url: '/buyer/payment/cashier/tradeDetail', needToken: true, method: Method.GET, params @@ -26,7 +26,7 @@ export function tradeDetail (params) { */ export function pay (params) { return request({ - url: `/buyer/cashier/pay/${params.paymentMethod}/${params.paymentClient}`, + url: `/buyer/payment/cashier/pay/${params.paymentMethod}/${params.paymentClient}`, needToken: true, method: Method.GET, params @@ -40,7 +40,7 @@ export function pay (params) { */ export function payCallback (params) { return request({ - url: `/buyer/cashier/result`, + url: `/buyer/payment/cashier/result`, needToken: true, method: Method.GET, params diff --git a/buyer/src/api/shopentry.js b/buyer/src/api/shopentry.js index ae8e6309..861800cf 100644 --- a/buyer/src/api/shopentry.js +++ b/buyer/src/api/shopentry.js @@ -5,7 +5,7 @@ import request, { // 店铺分页列表 export function shopList (params) { return request({ - url: '/buyer/store', + url: '/buyer/store/store', needToken: true, method: Method.GET, params @@ -15,7 +15,7 @@ export function shopList (params) { // 申请店铺第一步-填写企业信息 export function applyFirst (params) { return request({ - url: '/buyer/store/apply/first', + url: '/buyer/store/store/apply/first', needToken: true, method: Method.PUT, params @@ -25,7 +25,7 @@ export function applyFirst (params) { // 申请店铺第一步-填写企业信息 export function applySecond (params) { return request({ - url: '/buyer/store/apply/second', + url: '/buyer/store/store/apply/second', needToken: true, method: Method.PUT, params @@ -35,7 +35,7 @@ export function applySecond (params) { // 申请店铺第一步-填写企业信息 export function applyThird (params) { return request({ - url: '/buyer/store/apply/third', + url: '/buyer/store/store/apply/third', needToken: true, method: Method.PUT, params @@ -45,7 +45,7 @@ export function applyThird (params) { // 店铺详情 export function getDetailById (id) { return request({ - url: `/buyer/store/get/detail/${id}`, + url: `/buyer/store/store/get/detail/${id}`, needToken: true, method: Method.GET }) @@ -53,7 +53,7 @@ export function getDetailById (id) { // 店铺分类 export function getCateById (id) { return request({ - url: `/buyer/store/label/get/${id}`, + url: `/buyer/goods/store/label/get/${id}`, needToken: true, method: Method.GET }) @@ -61,7 +61,7 @@ export function getCateById (id) { // 店铺入驻协议 export function agreement () { return request({ - url: `/buyer/article/type/STORE_REGISTER`, + url: `/buyer/other/article/type/STORE_REGISTER`, needToken: true, method: Method.GET }) @@ -70,7 +70,7 @@ export function agreement () { // 获取当前登录会员的店铺信息 export function applyStatus () { return request({ - url: `/buyer/store/apply`, + url: `/buyer/store/store/apply`, needToken: true, method: Method.GET }) diff --git a/buyer/src/components/verify/verify.js b/buyer/src/components/verify/verify.js index eb385668..e6cda9f6 100644 --- a/buyer/src/components/verify/verify.js +++ b/buyer/src/components/verify/verify.js @@ -7,7 +7,7 @@ import storage from '@/plugins/storage.js'; */ export function getVerifyImg (verificationEnums) { return request({ - url: `${commonUrl}/common/slider/${verificationEnums}`, + url: `${commonUrl}/common/common/slider/${verificationEnums}`, method: Method.GET, needToken: false, headers: {uuid: storage.getItem('uuid')} @@ -19,7 +19,7 @@ export function getVerifyImg (verificationEnums) { */ export function postVerifyImg (params) { return request({ - url: `${commonUrl}/common/slider/${params.verificationEnums}`, + url: `${commonUrl}/common/common/slider/${params.verificationEnums}`, method: Method.POST, needToken: false, params, diff --git a/buyer/src/pages/CouponCenter.vue b/buyer/src/pages/CouponCenter.vue index e6220a07..e334f550 100644 --- a/buyer/src/pages/CouponCenter.vue +++ b/buyer/src/pages/CouponCenter.vue @@ -51,6 +51,7 @@ export default { list: [], // 优惠券列表 total: 0, // 优惠券总数 params: { // 请求参数 + getType: 'FREE', pageNumber: 1, pageSize: 20 } @@ -95,6 +96,7 @@ export default { content: '
优惠券领取成功,可到我的优惠券页面查看
', okText: '我的优惠券', cancelText: '立即使用', + closable: true, onOk: () => { this.$router.push('/home/Coupons') }, diff --git a/buyer/src/pages/home/orderCenter/AfterSale.vue b/buyer/src/pages/home/orderCenter/AfterSale.vue index e9766042..fdd92c5b 100644 --- a/buyer/src/pages/home/orderCenter/AfterSale.vue +++ b/buyer/src/pages/home/orderCenter/AfterSale.vue @@ -9,7 +9,7 @@ class="width_300" search enter-button - v-model="params.keywords" + v-model="params.sn" @on-search="getList" placeholder="请输入订单号搜索" /> @@ -125,7 +125,7 @@ export default { params: { // 请求参数 pageNumber: 1, pageSize: 10, - keywords: '', + sn: '', sort: 'createTime', order: 'desc' }, diff --git a/buyer/src/pages/payment/Pay.vue b/buyer/src/pages/payment/Pay.vue index b0d3a547..9b5d83b7 100644 --- a/buyer/src/pages/payment/Pay.vue +++ b/buyer/src/pages/payment/Pay.vue @@ -313,8 +313,12 @@ export default { let notSupArea = res.result.notSupportFreight; this.selectedCoupon = {}; if (res.result.platformCoupon) - this.selectedCoupon.platformCoupon = res.result.platformCoupon; - Object.assign(this.selectedCoupon, res.result.storeCoupons); + this.selectedCoupon[res.result.platformCoupon.memberCoupon.id] = res.result.platformCoupon; + if (res.result.storeCoupons && Object.keys(res.result.storeCoupons)[0]) { + let storeMemberCouponsId = Object.keys(res.result.storeCoupons)[0]; + let storeCouponId = res.result.storeCoupons[storeMemberCouponsId].memberCoupon.id; + this.selectedCoupon[storeCouponId] = res.result.storeCoupons[storeMemberCouponsId]; + } if (notSupArea) { let content = []; let title = ""; @@ -340,7 +344,7 @@ export default { const couponKeys = Object.keys(this.selectedCoupon); if (couponKeys.length) { this.couponList.forEach((e) => { - if (e.id === this.selectedCoupon[couponKeys].memberCoupon.id) { + if (this.selectedCoupon[e.id] && e.id === this.selectedCoupon[e.id].memberCoupon.id) { this.usedCouponId.push(e.id); } });