我的-全部订单-订单详情

pull/23/head
落日晚风 2023-12-05 17:59:31 +08:00
parent 4030e40ebc
commit 648b1a6351
4 changed files with 623 additions and 655 deletions

View File

@ -2,46 +2,29 @@
<template> <template>
<s-layout title="订单详情" class="index-wrap" navbar="inner"> <s-layout title="订单详情" class="index-wrap" navbar="inner">
<!-- 订单状态 --> <!-- 订单状态 -->
<view <view class="state-box ss-flex-col ss-col-center ss-row-right" :style="[
class="state-box ss-flex-col ss-col-center ss-row-right"
:style="[
{ {
marginTop: '-' + Number(statusBarHeight + 88) + 'rpx', marginTop: '-' + Number(statusBarHeight + 88) + 'rpx',
paddingTop: Number(statusBarHeight + 88) + 'rpx', paddingTop: Number(statusBarHeight + 88) + 'rpx',
}, },
]" ]">
>
<view class="ss-flex ss-m-t-32 ss-m-b-20"> <view class="ss-flex ss-m-t-32 ss-m-b-20">
<image <image v-if="
v-if="
state.orderInfo.status_code == 'unpaid' || state.orderInfo.status_code == 'unpaid' ||
state.orderInfo.status_code == 'nosend' || state.orderInfo.status_code == 'nosend' ||
state.orderInfo.status_code == 'nocomment' state.orderInfo.status_code == 'nocomment'
" " class="state-img" :src="sheep.$url.static('/static/img/shop/order/order_loading.png')">
class="state-img"
:src="sheep.$url.static('/static/img/shop/order/order_loading.png')"
>
</image> </image>
<image <image v-if="
v-if="
state.orderInfo.status_code == 'completed' || state.orderInfo.status_code == 'completed' ||
state.orderInfo.status_code == 'refund_agree' state.orderInfo.status_code == 'refund_agree'
" " class="state-img" :src="sheep.$url.static('/static/img/shop/order/order_success.png')">
class="state-img"
:src="sheep.$url.static('/static/img/shop/order/order_success.png')"
>
</image> </image>
<image <image v-if="state.orderInfo.status_code == 'cancel' || state.orderInfo.status_code == 'closed'"
v-if="state.orderInfo.status_code == 'cancel' || state.orderInfo.status_code == 'closed'" class="state-img" :src="sheep.$url.static('/static/img/shop/order/order_close.png')">
class="state-img"
:src="sheep.$url.static('/static/img/shop/order/order_close.png')"
>
</image> </image>
<image <image v-if="state.orderInfo.status_code == 'noget'" class="state-img"
v-if="state.orderInfo.status_code == 'noget'" :src="sheep.$url.static('/static/img/shop/order/order_express.png')">
class="state-img"
:src="sheep.$url.static('/static/img/shop/order/order_express.png')"
>
</image> </image>
<view class="ss-font-30">{{ state.orderInfo.status_text }}</view> <view class="ss-font-30">{{ state.orderInfo.status_text }}</view>
</view> </view>
@ -63,77 +46,54 @@
<!-- 订单信息 --> <!-- 订单信息 -->
<view class="order-list" v-for="item in state.orderInfo.items" :key="item.goods_id"> <view class="order-list" v-for="item in state.orderInfo.items" :key="item.goods_id">
<view class="order-card"> <view class="order-card">
<s-goods-item <s-goods-item @tap="onGoodsDetail(item.goods_id)" :img="item.goods_image" :title="item.goods_title"
@tap="onGoodsDetail(item.goods_id)" :skuText="item.goods_sku_text" :price="item.goods_price" :score="state.orderInfo.score_amount"
:img="item.goods_image" :num="item.goods_num">
:title="item.goods_title" <!-- <template #top>
:skuText="item.goods_sku_text"
:price="item.goods_price"
:score="state.orderInfo.score_amount"
:num="item.goods_num"
>
<template #top>
<view class="order-item ss-flex ss-col-center ss-row-between ss-p-x-20 bg-white"> <view class="order-item ss-flex ss-col-center ss-row-between ss-p-x-20 bg-white">
<view class="item-title">配送方式</view> <view class="item-title">配送方式</view>
<view class="ss-flex ss-col-center"> <view class="ss-flex ss-col-center">
<text class="item-value ss-m-r-20">{{ item.dispatch_type_text }}</text> <text class="item-value ss-m-r-20">{{ item.dispatch_type_text }}</text>
<button <button class="ss-reset-button copy-btn" @tap="onDetail(item)" v-if="
class="ss-reset-button copy-btn"
@tap="onDetail(item)"
v-if="
(item.dispatch_type === 'autosend' || item.dispatch_type === 'custom') && (item.dispatch_type === 'autosend' || item.dispatch_type === 'custom') &&
item.dispatch_status !== 0 item.dispatch_status !== 0
" ">详情</button>
>详情</button
>
</view> </view>
</view> </view>
</template> </template>
<template #tool> <template #tool>
<view class="ss-flex"> <view class="ss-flex">
<button <button class="ss-reset-button apply-btn" v-if="item.btns.includes('aftersale')"
class="ss-reset-button apply-btn"
v-if="item.btns.includes('aftersale')"
@tap.stop=" @tap.stop="
sheep.$router.go('/pages/order/aftersale/apply', { sheep.$router.go('/pages/order/aftersale/apply', {
item: JSON.stringify(item), item: JSON.stringify(item),
}) })
" ">
>
申请售后 申请售后
</button> </button>
<button <button class="ss-reset-button apply-btn" v-if="item.btns.includes('re_aftersale')"
class="ss-reset-button apply-btn"
v-if="item.btns.includes('re_aftersale')"
@tap.stop=" @tap.stop="
sheep.$router.go('/pages/order/aftersale/apply', { sheep.$router.go('/pages/order/aftersale/apply', {
item: JSON.stringify(item), item: JSON.stringify(item),
}) })
" ">
>
重新售后 重新售后
</button> </button>
<button <button class="ss-reset-button apply-btn" v-if="item.btns.includes('aftersale_info')"
class="ss-reset-button apply-btn"
v-if="item.btns.includes('aftersale_info')"
@tap.stop=" @tap.stop="
sheep.$router.go('/pages/order/aftersale/detail', { sheep.$router.go('/pages/order/aftersale/detail', {
id: item.ext.aftersale_id, id: item.ext.aftersale_id,
}) })
" ">
>
售后详情 售后详情
</button> </button>
<button <button class="ss-reset-button apply-btn" v-if="item.btns.includes('buy_again')"
class="ss-reset-button apply-btn"
v-if="item.btns.includes('buy_again')"
@tap.stop=" @tap.stop="
sheep.$router.go('/pages/goods/index', { sheep.$router.go('/pages/goods/index', {
id: item.goods_id, id: item.goods_id,
}) })
" ">
>
再次购买 再次购买
</button> </button>
</view> </view>
@ -142,7 +102,7 @@
<button class="ss-reset-button tag-btn" v-if="item.status_text"> <button class="ss-reset-button tag-btn" v-if="item.status_text">
{{ item.status_text }} {{ item.status_text }}
</button> </button>
</template> </template> -->
</s-goods-item> </s-goods-item>
</view> </view>
</view> </view>
@ -176,19 +136,12 @@
<view class="notice-item ss-flex ss-row-between"> <view class="notice-item ss-flex ss-row-between">
<text class="title">商品总额</text> <text class="title">商品总额</text>
<view class="ss-flex"> <view class="ss-flex">
<text class="detail" v-if="Number(state.orderInfo.goods_amount) > 0" <text class="detail"
>{{ state.orderInfo.goods_amount }}</text v-if="Number(state.orderInfo.goods_amount) > 0">{{ state.orderInfo.goods_amount }}</text>
> <view v-if="state.orderInfo.score_amount && Number(state.orderInfo.goods_amount) > 0"
<view class="detail">+</view>
v-if="state.orderInfo.score_amount && Number(state.orderInfo.goods_amount) > 0"
class="detail"
>+</view
>
<view class="price-text ss-flex ss-col-center" v-if="state.orderInfo.score_amount"> <view class="price-text ss-flex ss-col-center" v-if="state.orderInfo.score_amount">
<image <image :src="sheep.$url.static('/static/img/shop/goods/score1.svg')" class="score-img"></image>
:src="sheep.$url.static('/static/img/shop/goods/score1.svg')"
class="score-img"
></image>
<view class="detail">{{ state.orderInfo.score_amount }}</view> <view class="detail">{{ state.orderInfo.score_amount }}</view>
</view> </view>
</view> </view>
@ -197,10 +150,7 @@
<text class="title">运费</text> <text class="title">运费</text>
<text class="detail">{{ state.orderInfo.dispatch_amount }}</text> <text class="detail">{{ state.orderInfo.dispatch_amount }}</text>
</view> </view>
<view <view class="notice-item ss-flex ss-row-between" v-if="state.orderInfo.total_discount_fee > 0">
class="notice-item ss-flex ss-row-between"
v-if="state.orderInfo.total_discount_fee > 0"
>
<text class="title">优惠金额</text> <text class="title">优惠金额</text>
<text class="detail">¥{{ state.orderInfo.total_discount_fee }}</text> <text class="detail">¥{{ state.orderInfo.total_discount_fee }}</text>
</view> </view>
@ -208,28 +158,17 @@
<text class="title">{{ <text class="title">{{
['paid', 'completed'].includes(state.orderInfo.status) ? '已付款' : '需付款' ['paid', 'completed'].includes(state.orderInfo.status) ? '已付款' : '需付款'
}}</text> }}</text>
<text class="detail all-price" v-if="Number(state.orderInfo.pay_fee) > 0" <text class="detail all-price"
>{{ state.orderInfo.pay_fee }}</text v-if="Number(state.orderInfo.pay_fee) > 0">{{ state.orderInfo.pay_fee }}</text>
> <view v-if="
<view
v-if="
state.orderInfo.score_amount && state.orderInfo.score_amount &&
Number(state.orderInfo.pay_fee) > 0 && Number(state.orderInfo.pay_fee) > 0 &&
['paid', 'completed'].includes(state.orderInfo.status) ['paid', 'completed'].includes(state.orderInfo.status)
" " class="detail all-price">+</view>
class="detail all-price" <view class="price-text ss-flex ss-col-center" v-if="
>+</view
>
<view
class="price-text ss-flex ss-col-center"
v-if="
state.orderInfo.score_amount && ['paid', 'completed'].includes(state.orderInfo.status) state.orderInfo.score_amount && ['paid', 'completed'].includes(state.orderInfo.status)
" ">
> <image :src="sheep.$url.static('/static/img/shop/goods/score1.svg')" class="score-img"></image>
<image
:src="sheep.$url.static('/static/img/shop/goods/score1.svg')"
class="score-img"
></image>
<view class="detail all-price">{{ state.orderInfo.score_amount }}</view> <view class="detail all-price">{{ state.orderInfo.score_amount }}</view>
</view> </view>
</view> </view>
@ -243,65 +182,31 @@
<!-- TODO: 查看物流等待成团评价完后返回页面没刷新页面 --> <!-- TODO: 查看物流等待成团评价完后返回页面没刷新页面 -->
<su-fixed bottom placeholder bg="bg-white" v-if="state.orderInfo.btns?.length"> <su-fixed bottom placeholder bg="bg-white" v-if="state.orderInfo.btns?.length">
<view class="footer-box ss-flex ss-col-center ss-row-right"> <view class="footer-box ss-flex ss-col-center ss-row-right">
<button <button class="ss-reset-button cancel-btn" v-if="state.orderInfo.btns?.includes('cancel')"
class="ss-reset-button cancel-btn" @tap="onCancel(state.orderInfo.id)">取消订单</button>
v-if="state.orderInfo.btns?.includes('cancel')" <button class="ss-reset-button pay-btn ui-BG-Main-Gradient" v-if="state.orderInfo.btns?.includes('pay')"
@tap="onCancel(state.orderInfo.id)" @tap="onPay(state.orderInfo.order_sn)">继续支付</button>
>取消订单</button <button class="ss-reset-button cancel-btn" v-if="state.orderInfo.btns?.includes('apply_refund')"
> @tap="onRefund(state.orderInfo.id)">申请退款</button>
<button <button class="ss-reset-button cancel-btn" v-if="state.orderInfo.btns?.includes('groupon')" @tap="
class="ss-reset-button pay-btn ui-BG-Main-Gradient"
v-if="state.orderInfo.btns?.includes('pay')"
@tap="onPay(state.orderInfo.order_sn)"
>继续支付</button
>
<button
class="ss-reset-button cancel-btn"
v-if="state.orderInfo.btns?.includes('apply_refund')"
@tap="onRefund(state.orderInfo.id)"
>申请退款</button
>
<button
class="ss-reset-button cancel-btn"
v-if="state.orderInfo.btns?.includes('groupon')"
@tap="
sheep.$router.go('/pages/activity/groupon/detail', { sheep.$router.go('/pages/activity/groupon/detail', {
id: state.orderInfo.ext.groupon_id, id: state.orderInfo.ext.groupon_id,
}) })
" ">
>
{{ state.orderInfo.status_code === 'groupon_ing' ? '邀请拼团' : '拼团详情' }} {{ state.orderInfo.status_code === 'groupon_ing' ? '邀请拼团' : '拼团详情' }}
</button> </button>
<button <button class="ss-reset-button cancel-btn" v-if="state.orderInfo.btns?.includes('express')"
class="ss-reset-button cancel-btn" @tap="onExpress(state.orderInfo.id)">查看物流</button>
v-if="state.orderInfo.btns?.includes('express')" <button class="ss-reset-button cancel-btn" v-if="state.orderInfo.btns?.includes('confirm')"
@tap="onExpress(state.orderInfo.id)" @tap="onConfirm(state.orderInfo.id)">确认收货</button>
>查看物流</button <button class="ss-reset-button cancel-btn" v-if="state.orderInfo.btns?.includes('comment')"
> @tap="onComment(state.orderInfo.order_sn)">评价晒单</button>
<button <button v-if="state.orderInfo.btns?.includes('invoice')" class="ss-reset-button cancel-btn"
class="ss-reset-button cancel-btn" @tap.stop="onOrderInvoice(state.orderInfo.invoice?.id)">
v-if="state.orderInfo.btns?.includes('confirm')"
@tap="onConfirm(state.orderInfo.id)"
>确认收货</button
>
<button
class="ss-reset-button cancel-btn"
v-if="state.orderInfo.btns?.includes('comment')"
@tap="onComment(state.orderInfo.order_sn)"
>评价晒单</button
>
<button
v-if="state.orderInfo.btns?.includes('invoice')"
class="ss-reset-button cancel-btn"
@tap.stop="onOrderInvoice(state.orderInfo.invoice?.id)"
>
查看发票 查看发票
</button> </button>
<button <button v-if="state.orderInfo.btns?.includes('re_apply_refund')" class="ss-reset-button cancel-btn"
v-if="state.orderInfo.btns?.includes('re_apply_refund')" @tap.stop="onRefund(state.orderInfo.id)">
class="ss-reset-button cancel-btn"
@tap.stop="onRefund(state.orderInfo.id)"
>
重新退款 重新退款
</button> </button>
</view> </view>
@ -311,9 +216,16 @@
<script setup> <script setup>
import sheep from '@/sheep'; import sheep from '@/sheep';
import { onLoad } from '@dcloudio/uni-app'; import {
import { computed, reactive } from 'vue'; onLoad
import { isEmpty } from 'lodash'; } from '@dcloudio/uni-app';
import {
computed,
reactive
} from 'vue';
import {
isEmpty
} from 'lodash';
const statusBarHeight = sheep.$platform.device.statusBarHeight * 2; const statusBarHeight = sheep.$platform.device.statusBarHeight * 2;
const headerBg = sheep.$url.css('/static/img/shop/order/order_bg.png'); const headerBg = sheep.$url.css('/static/img/shop/order/order_bg.png');
@ -353,7 +265,9 @@
} }
function onGoodsDetail(id) { function onGoodsDetail(id) {
sheep.$router.go('/pages/goods/index', { id }); sheep.$router.go('/pages/goods/index', {
id
});
} }
// //
@ -361,9 +275,12 @@
uni.showModal({ uni.showModal({
title: '提示', title: '提示',
content: '确定要取消订单吗?', content: '确定要取消订单吗?',
success: async function (res) { success: async function(res) {
if (res.confirm) { if (res.confirm) {
const { error, data } = await sheep.$api.order.cancel(orderId); const {
error,
data
} = await sheep.$api.order.cancel(orderId);
if (error === 0) { if (error === 0) {
getOrderDetail(data.order_sn); getOrderDetail(data.order_sn);
} }
@ -377,9 +294,12 @@
uni.showModal({ uni.showModal({
title: '提示', title: '提示',
content: '确定要申请退款吗?', content: '确定要申请退款吗?',
success: async function (res) { success: async function(res) {
if (res.confirm) { if (res.confirm) {
const { error, data } = await sheep.$api.order.applyRefund(orderId); const {
error,
data
} = await sheep.$api.order.applyRefund(orderId);
if (error === 0) { if (error === 0) {
getOrderDetail(data.order_sn); getOrderDetail(data.order_sn);
} }
@ -413,7 +333,10 @@
} }
// //
const { error, data } = await sheep.$api.order.confirm(orderId); const {
error,
data
} = await sheep.$api.order.confirm(orderId);
if (error === 0) { if (error === 0) {
getOrderDetail(data.order_sn); getOrderDetail(data.order_sn);
} }
@ -475,6 +398,7 @@
}); });
} }
async function getOrderDetail(id) { async function getOrderDetail(id) {
//
let res = {}; let res = {};
if (state.comeinType === 'wechat') { if (state.comeinType === 'wechat') {
res = await sheep.$api.order.detail(id, { res = await sheep.$api.order.detail(id, {
@ -483,8 +407,41 @@
} else { } else {
res = await sheep.$api.order.detail(id); res = await sheep.$api.order.detail(id);
} }
if (res.error === 0) { console.log(res, '我的订单详情数据');
if (res.code === 0) {
let obj = {
10: ['待发货', '等待买家付款', ["apply_refund"]]
}
res.data.status_text = obj[res.data.status][0];
res.data.status_desc = obj[res.data.status][1];
res.data.btns = obj[res.data.status][2];
res.data.address = {
province_name: res.data.receiverAreaName.split(' ')[0],
district_name: res.data.receiverAreaName.split(' ')[2],
city_name: res.data.receiverAreaName.split(' ')[1],
address: res.data.receiverDetailAddress,
consignee: res.data.receiverName,
mobile: res.data.receiverMobile,
}
res.data.pay_fee = res.data.payPrice / 100
res.data.create_time = sheep.$helper.timeFormat(res.data.createTime, 'yyyy-mm-dd hh:MM:ss')
res.data.order_sn = res.data.no
res.data.goods_amount = res.data.totalPrice / 100
res.data.dispatch_amount = res.data.deliveryPrice / 100
res.data.pay_types_text = res.data.payChannelName.split(',')
res.data.items = res.data.items.map(ite => {
return {
...ite,
goods_title: ite.spuName,
goods_num: ite.count,
goods_price: ite.price / 100,
goods_image: ite.picUrl,
goods_sku_text: ite.properties.reduce((it0, it1) => it0 + it1.valueName + ' ', '')
}
})
state.orderInfo = res.data; state.orderInfo = res.data;
console.log(state.orderInfo, '修改后数据')
} else { } else {
sheep.$router.back(); sheep.$router.back();
} }
@ -512,6 +469,7 @@
height: 36rpx; height: 36rpx;
margin: 0 4rpx; margin: 0 4rpx;
} }
.apply-btn { .apply-btn {
width: 140rpx; width: 140rpx;
height: 50rpx; height: 50rpx;
@ -521,6 +479,7 @@
line-height: normal; line-height: normal;
margin-left: 16rpx; margin-left: 16rpx;
} }
.state-box { .state-box {
color: rgba(#fff, 0.9); color: rgba(#fff, 0.9);
width: 100%; width: 100%;
@ -528,6 +487,7 @@
linear-gradient(90deg, var(--ui-BG-Main), var(--ui-BG-Main-gradient)); linear-gradient(90deg, var(--ui-BG-Main), var(--ui-BG-Main-gradient));
background-size: 750rpx 100%; background-size: 750rpx 100%;
box-sizing: border-box; box-sizing: border-box;
.state-img { .state-img {
width: 60rpx; width: 60rpx;
height: 60rpx; height: 60rpx;
@ -580,6 +540,7 @@
margin-right: 10rpx; margin-right: 10rpx;
} }
} }
.tag-btn { .tag-btn {
margin-left: 16rpx; margin-left: 16rpx;
font-size: 24rpx; font-size: 24rpx;
@ -642,6 +603,7 @@
} }
} }
} }
.copy-btn { .copy-btn {
width: 100rpx; width: 100rpx;
line-height: 50rpx; line-height: 50rpx;

View File

@ -7,7 +7,7 @@
<s-empty v-if="state.pagination.total === 0" icon="/static/order-empty.png" text="暂无订单"></s-empty> <s-empty v-if="state.pagination.total === 0" icon="/static/order-empty.png" text="暂无订单"></s-empty>
<view v-if="state.pagination.total > 0"> <view v-if="state.pagination.total > 0">
<view class="bg-white order-list-card-box ss-r-10 ss-m-t-14 ss-m-20" v-for="order in state.pagination.data" <view class="bg-white order-list-card-box ss-r-10 ss-m-t-14 ss-m-20" v-for="order in state.pagination.data"
:key="order.id" @tap="onOrderDetail(order.no)"> :key="order.id" @tap="onOrderDetail(order.id)">
<view class="order-card-header ss-flex ss-col-center ss-row-between ss-p-x-20"> <view class="order-card-header ss-flex ss-col-center ss-row-between ss-p-x-20">
<view class="order-no">订单号{{ order.no }}</view> <view class="order-no">订单号{{ order.no }}</view>
<view class="order-state ss-font-26" :class="formatOrderColor(order.status_code)">{{ <view class="order-state ss-font-26" :class="formatOrderColor(order.status_code)">{{
@ -15,7 +15,8 @@
}}</view> }}</view>
</view> </view>
<view class="border-bottom" v-for="item in order.items" :key="item.id"> <view class="border-bottom" v-for="item in order.items" :key="item.id">
<s-goods-item :img="item.picUrl" :title="item.spuName" :skuText="item.properties.length>1? item.properties.reduce((items2,items)=>items2.valueName+' '+items.valueName):item.properties[0].valueName" <s-goods-item :img="item.picUrl" :title="item.spuName"
:skuText="item.properties.length>1? item.properties.reduce((items2,items)=>items2.valueName+' '+items.valueName):item.properties[0].valueName"
:price="item.price/100" :score="order.score_amount" :num="item.count"> :price="item.price/100" :score="order.score_amount" :num="item.count">
<template #tool> <template #tool>
<view class="ss-flex"> <view class="ss-flex">
@ -402,7 +403,7 @@
status: tabMaps[state.currentTab].value, status: tabMaps[state.currentTab].value,
pageSize: list_rows, pageSize: list_rows,
pageNo: page, pageNo: page,
commentStatus: tabMaps[state.currentTab].value==30?false:null commentStatus: tabMaps[state.currentTab].value == 30 ? false : null
}); });
state.error = res.code; state.error = res.code;
if (res.code === 0) { if (res.code === 0) {
@ -430,7 +431,7 @@
// //
function loadmore() { function loadmore() {
if (state.loadStatus !== 'noMore') { if (state.loadStatus !== 'noMore') {
getOrderList(parseInt((state.pagination.data.length/5)+1)); getOrderList(parseInt((state.pagination.data.length / 5) + 1));
} }
} }

View File

@ -4,11 +4,17 @@ import request2 from '@/sheep/request2';
export default { export default {
// 订单详情 // 订单详情
detail: (id, params) => detail: (id, params) =>
request({ request2({
url: 'order/order/' + id, url: 'trade/order/get-detail?id=' + id,
method: 'GET', method: 'GET',
params, params,
}), }),
// detail: (id, params) =>
// request({
// url: 'order/order/' + id,
// method: 'GET',
// params,
// }),
// 发票详情 // 发票详情
invoice: (id) => invoice: (id) =>
request({ request({
@ -59,12 +65,12 @@ export default {
// 解决 SpringMVC 接受 List<Item> 参数的问题 // 解决 SpringMVC 接受 List<Item> 参数的问题
delete data2.items delete data2.items
for (let i = 0; i < data.items.length; i++) { for (let i = 0; i < data.items.length; i++) {
data2['items[' + i + '' + '].skuId'] = data.items[i].skuId + ''; // data2['items[' + i + '' + '].skuId'] = data.items[i].skuId + '';
data2['items[' + i + '' + '].count'] = data.items[i].count + ''; // data2['items[' + i + '' + '].count'] = data.items[i].count + '';
data2['items[' + i + '' + '].cartId'] = data.items[i].cartId + ''; // data2['items[' + i + '' + '].cartId'] = data.items[i].cartId + '';
// data2['items' + `%5B${i}%5D` + '.skuId'] = data.items[i].skuId + ''; data2['items' + `%5B${i}%5D` + '.skuId'] = data.items[i].skuId + '';
// data2['items' + `%5B${i}%5D` + '.count'] = data.items[i].count + ''; data2['items' + `%5B${i}%5D` + '.count'] = data.items[i].count + '';
// data2['items' + `%5B${i}%5D` + '.cartId'] = data.items[i].cartId + ''; data2['items' + `%5B${i}%5D` + '.cartId'] = data.items[i].cartId + '';
} }
console.log(data2, '对比数据') console.log(data2, '对比数据')
return request2({ return request2({

View File

@ -55,8 +55,7 @@ const http = new Request({
method: 'GET', method: 'GET',
header: { header: {
Accept: 'text/json', Accept: 'text/json',
'Content-Type': 'application/json', 'Content-Type': 'application/json;charset=UTF-8',
// ;charset=UTF-8
platform: $platform.name, platform: $platform.name,
}, },
// #ifdef APP-PLUS // #ifdef APP-PLUS