Commit e20426f4 by wangzhihui

Merge branch 'SAAS+V4.56.0-0908' of http://192.168.3.233:8090/saas/mini-program/…

…points-mall into SAAS+V4.56.0-0908
2 parents cc2efe3f 121cdab7
Showing 42 changed files with 372 additions and 122 deletions
...@@ -48,7 +48,9 @@ Component({ ...@@ -48,7 +48,9 @@ Component({
cartApi.getCartList(para).then(res => { cartApi.getCartList(para).then(res => {
let cartNum = 0 let cartNum = 0
res?.goodsList?.forEach(el => { res?.goodsList?.forEach(el => {
if (!el.flag) {
cartNum = NP.plus(cartNum, el.sellQty || 0) cartNum = NP.plus(cartNum, el.sellQty || 0)
}
}) })
this.setData({ this.setData({
cartNum cartNum
......
...@@ -6,7 +6,9 @@ ...@@ -6,7 +6,9 @@
<view class="goods-action"> <view class="goods-action">
<view class="navigation-box"> <view class="navigation-box">
<view class="item" wx:if="{{!hideShop}}" bindtap="jump"> <view class="item" wx:if="{{!hideShop}}" bindtap="jump">
<view v-if="{{true}}" class="goods-num">{{cartNum}}</view> <view v-if="{{true}}" class="goods-num">
<text>{{cartNum}}</text>
</view>
<view class="sprite-icon" > <view class="sprite-icon" >
<glsx-image src="/index/goods-cart.png"></glsx-image> <glsx-image src="/index/goods-cart.png"></glsx-image>
</view> </view>
......
...@@ -47,7 +47,7 @@ Component({ ...@@ -47,7 +47,7 @@ Component({
} }
let defaultGoods = specificationDetailList?.specificationData.split('&') let defaultGoods = specificationDetailList?.specificationData.split('&')
detailInfo.platformGlGoodsSpecificationList?.map(e => { detailInfo.platformGlGoodsSpecificationList?.map(e => {
defaultGoods.map(i => { defaultGoods?.map(i => {
let [key, value] = i.split('-') let [key, value] = i.split('-')
if (key == e.specificationName) { if (key == e.specificationName) {
e.platformSpecificationValueList.map(c => { e.platformSpecificationValueList.map(c => {
......
<view class="stepper-box"> <view class="stepper-box">
<view class="minus count-box text-center {{count == min?'opacity':''}}" catchtap="change"></view> <view class="minus count-box text-center {{count == min?'opacity':''}}" catchtap="change"></view>
<input class="num count-box text-center" type="number" catchinput="input" value="{{count}}" catchblur="blur" catchtap="tap" /> <input class="num text-center" type="number" catchinput="input" value="{{count}}" catchblur="blur" catchtap="tap" />
<view class="add count-box text-center {{count == max?'opacity':''}}" catchtap="change" data-add> <view class="add count-box text-center {{count == max?'opacity':''}}" catchtap="change" data-add>
</view> </view>
......
...@@ -29,8 +29,14 @@ ...@@ -29,8 +29,14 @@
} }
.stepper-box .num { .stepper-box .num {
width: 59rpx; width: 72rpx;
box-sizing: border-box;
padding: 0 4rpx;
border-radius: 8rpx; border-radius: 8rpx;
font-size: 26rpx;
height: 48rpx;
background: #F0F0F0;
text-align: center;
} }
.stepper-box .add { .stepper-box .add {
......
...@@ -29,7 +29,11 @@ ...@@ -29,7 +29,11 @@
box-sizing: border-box; box-sizing: border-box;
color: #1B233D; color: #1B233D;
justify-content: center; justify-content: center;
font-size: 26rpx; font-size: 30rpx;
/* 添加以下属性防止文本换行 */
white-space: nowrap;
min-width: 100%;
transition: all 0.25s;
} }
.left .text{ .left .text{
justify-content: flex-start; justify-content: flex-start;
...@@ -42,11 +46,13 @@ ...@@ -42,11 +46,13 @@
font-weight: 600; font-weight: 600;
transition: all .25s; transition: all .25s;
color:#1B233D; color:#1B233D;
/* 确保激活状态下文本不会换行 */
white-space: nowrap;
} }
.tab .line { .tab .line {
width: 48rpx; width: 48rpx;
height: var(--borderRadius); height: 8rpx;
background: var(--themeColor); background: var(--themeColor);
border-radius: 6rpx; border-radius: 6rpx;
margin: 0 auto; margin: 0 auto;
......
...@@ -5,10 +5,17 @@ Component({ ...@@ -5,10 +5,17 @@ Component({
nodes: { nodes: {
type: Array, type: Array,
value: [], value: [],
},
height:{
type:String,
value:'256rpx'
} }
}, },
methods: {
// 拨打电话
makePhoneCall(e) {
const phone = e.currentTarget.dataset.phone;
if (phone) {
wx.makePhoneCall({
phoneNumber: phone
});
}
}
}
}); });
\ No newline at end of file \ No newline at end of file
{ {
"component": true, "component": true,
"usingComponents": {} "usingComponents": {
"mp-html":"/components/mp-html/index"
}
} }
\ No newline at end of file \ No newline at end of file
/* 时间轴容器 */ /* 时间轴容器 */
.timeline-container { .timeline-container {
padding: 20rpx 0; // padding: 20rpx 0;
overflow-y: auto; overflow-y: auto;
} }
/* 时间轴节点 */ /* 时间轴节点 */
.timeline-node { .timeline-node {
position: relative; position: relative;
padding-bottom: 40rpx; padding-bottom: 32rpx;
display: flex; display: flex;
&:last-child { &:last-child {
...@@ -27,8 +27,8 @@ ...@@ -27,8 +27,8 @@
/* 时间轴节点点 */ /* 时间轴节点点 */
.timeline-node__dot { .timeline-node__dot {
width: 22rpx; width: 20rpx;
height: 22rpx; height: 20rpx;
background-color: #e8e8ea; background-color: #e8e8ea;
border-radius: 50%; border-radius: 50%;
z-index: 1; z-index: 1;
...@@ -116,8 +116,7 @@ ...@@ -116,8 +116,7 @@
/* 时间轴头部 */ /* 时间轴头部 */
.timeline-node__header { .timeline-node__header {
display: flex; display: flex;
margin-bottom: 16rpx; margin-bottom: 8rpx;
margin-bottom: 16rpx;
align-items: center; align-items: center;
gap: 20rpx; gap: 20rpx;
} }
...@@ -125,7 +124,7 @@ ...@@ -125,7 +124,7 @@
/* 时间轴标题 */ /* 时间轴标题 */
.timeline-node__title { .timeline-node__title {
font-weight: 500; font-weight: 500;
font-size: 28rpx; font-size: 32rpx;
margin-bottom: 8rpx; margin-bottom: 8rpx;
line-height: 1.4; line-height: 1.4;
} }
...@@ -159,3 +158,21 @@ ...@@ -159,3 +158,21 @@
color: #656566; color: #656566;
} }
} }
.phone-numbers {
margin-top: 8rpx;
}
.phone-number {
display: inline-block;
margin-right: 16rpx;
margin-top: 8rpx;
}
.phone-call-text {
color: #fff;
font-size: 24rpx;
background-color: var(--btnColor);
padding: 4rpx 12rpx;
border-radius: 24rpx;
}
\ No newline at end of file \ No newline at end of file
<!-- 时间轴组件 --> <!-- 时间轴组件 -->
<view class="timeline-container" style="height:{{height}}"> <view class="timeline-container">
<view wx:for="{{nodes}}" wx:key="index" class="timeline-node"> <view wx:for="{{nodes}}" wx:key="index" class="timeline-node">
<!-- 时间轴节点 --> <!-- 时间轴节点 -->
<view class="timeline-node__dot-wrapper"> <view class="timeline-node__dot-wrapper">
...@@ -15,7 +15,17 @@ ...@@ -15,7 +15,17 @@
<view wx:if="{{item.operateTime}}" class="timeline-node__time">{{item.operateTime}}</view> <view wx:if="{{item.operateTime}}" class="timeline-node__time">{{item.operateTime}}</view>
</view> </view>
<view class="timeline-node__tip"> <view class="timeline-node__tip">
{{item.content}} <view class="timeline-node__tip">
<rich-text nodes="{{item.content}}"></rich-text>
<!-- 手机号码点击区域 -->
<view wx:if="{{item.phones && item.phones.length > 0}}" class="phone-numbers">
<view wx:for="{{item.phones}}" wx:for-item="phone" wx:key="*this"
class="phone-number" bindtap="makePhoneCall" data-phone="{{phone}}">
<!-- <mp-icon icon="cellphone" color="var(--btnColor)" size="{{14}}"></mp-icon> -->
<text class="phone-call-text">拨打电话: {{phone}}</text>
</view>
</view>
</view>
</view> </view>
</view> </view>
</view> </view>
......
...@@ -47,7 +47,7 @@ export const OrderActionButtons = { ...@@ -47,7 +47,7 @@ export const OrderActionButtons = {
CONFIRM_RECEIVE: { CONFIRM_RECEIVE: {
text: "确认收货", text: "确认收货",
type: "confirmReceive", type: "confirmReceive",
class: "btn", class: "btn confirm",
handler: "onConfirmReceive", handler: "onConfirmReceive",
}, },
SHOW_EXPRESS: { SHOW_EXPRESS: {
......
...@@ -134,8 +134,8 @@ Page({ ...@@ -134,8 +134,8 @@ Page({
}) })
}, },
checkOut() { checkOut() {
let { money, walletObj, contactInfo } = this.data let { total, walletObj, contactInfo } = this.data
if (money > walletObj?.currentScore) return // 积分不足 if (total > walletObj?.currentScore) return // 积分不足
if (!Object.keys(contactInfo)?.length) return wx.p.wxApi.showToast('请选择收货地址') if (!Object.keys(contactInfo)?.length) return wx.p.wxApi.showToast('请选择收货地址')
this.setData({ this.setData({
showModal: true showModal: true
......
...@@ -92,7 +92,7 @@ ...@@ -92,7 +92,7 @@
</view> </view>
</view> </view>
</view> </view>
<view class="btn text-center {{money > walletObj.currentScore ? 'disabled' : ''}}" bindtap="checkOut">立即兑换</view> <view class="btn text-center {{total > walletObj.currentScore ? 'disabled' : ''}}" bindtap="checkOut">立即兑换</view>
</view> </view>
</goods-action> </goods-action>
</block> </block>
......
...@@ -30,7 +30,7 @@ Page({ ...@@ -30,7 +30,7 @@ Page({
let { count } = this.data let { count } = this.data
if (count == 0) { if (count == 0) {
clearInterval(this.timer) clearInterval(this.timer)
wx.p.router.reLaunch('/packageMine/pages/order/index/index') // wx.p.router.reLaunch('/packageMine/pages/order/index/index')
return return
} }
this.setData({ this.setData({
...@@ -41,7 +41,7 @@ Page({ ...@@ -41,7 +41,7 @@ Page({
viewOrderDetail() { viewOrderDetail() {
clearInterval(this.timer) clearInterval(this.timer)
wx.p.router.reLaunch('/packageMine/pages/order/index/index') // wx.p.router.reLaunch('/packageMine/pages/order/index/index')
}, },
/** /**
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
.icon { .icon {
width: 136rpx; width: 136rpx;
height: 136rpx; height: 136rpx;
margin: 168rpx 0 48rpx; margin: 0 0 48rpx;
} }
.title { .title {
font-size: 40rpx; font-size: 40rpx;
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
</view> </view>
</view> </view>
</navigation-bar> </navigation-bar>
<view class="icon"> <view class="icon" style="margin-top: calc({{navHeight}}px + 168rpx);">
<glsx-image src="/status/success.png"></glsx-image> <glsx-image src="/status/success.png"></glsx-image>
</view> </view>
<view class="title">兑换成功</view> <view class="title">兑换成功</view>
......
...@@ -22,7 +22,8 @@ Page({ ...@@ -22,7 +22,8 @@ Page({
detailInfo: {}, detailInfo: {},
eventFlag: false, eventFlag: false,
addressList: [], addressList: [],
defaultAddress: {} defaultAddress: {},
bannerIndex: 0
}, },
appHide() { appHide() {
wx.offAppHide() wx.offAppHide()
...@@ -43,6 +44,11 @@ Page({ ...@@ -43,6 +44,11 @@ Page({
urls urls
}) })
}, },
changeBanner(e) {
this.setData({
bannerIndex: e.detail.current
})
},
navbarReady(e) { navbarReady(e) {
navBarHeight = e.detail.height navBarHeight = e.detail.height
}, },
......
...@@ -16,10 +16,8 @@ Component({ ...@@ -16,10 +16,8 @@ Component({
methods: { methods: {
onPreviewImage(e) { onPreviewImage(e) {
this.triggerEvent('previewimage', { let params = e.currentTarget.dataset;
current: e.currentTarget.dataset.current, wx.p.wxApi.previewImage(params);
urls: e.currentTarget.dataset.urls
});
} }
} }
}); });
\ No newline at end of file \ No newline at end of file
...@@ -5,7 +5,6 @@ ...@@ -5,7 +5,6 @@
.text-box { .text-box {
padding: 32rpx 24rpx; padding: 32rpx 24rpx;
border-bottom: 2rpx solid #eff0f2;
} }
.text-box .title { .text-box .title {
...@@ -22,25 +21,42 @@ ...@@ -22,25 +21,42 @@
} }
.text-box .item .label { .text-box .item .label {
width: 140rpx; width: auto;
min-width: fit-content;
margin-right: 10rpx;
flex-shrink: 0;
} }
.text-box .item .value { .text-box .item .value {
color: #656566; color: #656566;
width: calc(100% - 150rpx); flex: 1;
} }
.photo-box { .photo-box {
padding: 40rpx 0 28rpx 20rpx; position: relative;
display: flex; padding: 32rpx 24rpx;
flex-wrap: wrap; display: grid;
} /* 自动根据容器宽度决定列数,每列最小 200rpx,最大 1fr */
grid-template-columns: repeat(auto-fill, minmax(200rpx, 1fr));
.photo-box .item { gap: 20rpx;
/* 保证最后一行左对齐 */
justify-items: start;
&::before {
content: '';
position: absolute;
top: 0;
left: 24rpx;
right: 24rpx;
height: 1px;
background-color: #FFEFF0F2;
}
.item {
box-sizing: border-box;
width: 200rpx; width: 200rpx;
height: 200rpx; height: 200rpx;
background: #d8d8d8; // background: #d8d8d8;
margin: 0 20rpx 20rpx 0; // margin: 0 20rpx 20rpx 0;
border-radius: 16rpx; border-radius: 8rpx;
overflow: hidden; overflow: hidden;
}
} }
\ No newline at end of file \ No newline at end of file
...@@ -19,10 +19,10 @@ ...@@ -19,10 +19,10 @@
</block> </block>
</view> </view>
</view> </view>
<block wx:if="{{orderInfo.imgUrls && orderInfo.imgUrls.length}}"> <block wx:if="{{orderInfo.imgUrlList && orderInfo.imgUrlList.length}}">
<view class="photo-box"> <view class="photo-box">
<block wx:for="{{orderInfo.imgUrls}}" wx:key="index"> <block wx:for="{{orderInfo.imgUrlList}}" wx:key="index">
<view class="item" bindtap="onPreviewImage" data-current="{{item}}" data-urls="{{orderInfo.imgUrls}}"> <view class="item" bindtap="onPreviewImage" data-current="{{item}}" data-urls="{{orderInfo.imgUrlList}}">
<image webp mode="aspectFill" class="image" src="{{item}}"></image> <image webp mode="aspectFill" class="image" src="{{item}}"></image>
</view> </view>
</block> </block>
......
...@@ -4,6 +4,7 @@ const LOGISTICS_STATUS = { ...@@ -4,6 +4,7 @@ const LOGISTICS_STATUS = {
1002: "运输中", 1002: "运输中",
1003: "已签收", 1003: "已签收",
1004: "拒收", 1004: "拒收",
1005: "正在派件", // 新增状态
}; };
// 状态判断规则配置 // 状态判断规则配置
...@@ -19,34 +20,35 @@ const STATUS_RULES = [ ...@@ -19,34 +20,35 @@ const STATUS_RULES = [
statusDesc: "拒收", statusDesc: "拒收",
}, },
{ {
keywords: ["派件", "驿站", "暂存"], keywords: [
status: 1002, "正在派送",
statusDesc: "运输中", "正在派件",
"派送中",
"正在为您派送",
"派送",
"派件",
"派件中",
],
status: 1005,
statusDesc: "派件中",
}, },
{ {
keywords: ["转运中心", "发往", "到达"], keywords: ["驿站", "暂存", "已发往", "转运中心", "发往", "到达", "已到达"],
status: 1002, status: 1002,
statusDesc: "运输中", statusDesc: "运输中",
}, },
{ {
keywords: ["已收件", "揽收"], keywords: ["已收件", "揽收", "揽件"],
status: 1001,
statusDesc: "已揽件",
},
{
keywords: ["已发往"],
status: 1001, status: 1001,
statusDesc: "已揽件", statusDesc: "已揽件",
}, },
]; ];
Component({ Component({
properties: { properties: {
expressInfo: { expressInfo: {
type: Object, type: Object,
value: {}, value: {},
observer: function (val) { observer: function (val) {
if (!val) return;
this.processExpressInfo(val); this.processExpressInfo(val);
}, },
}, },
...@@ -54,6 +56,10 @@ Component({ ...@@ -54,6 +56,10 @@ Component({
type: Boolean, type: Boolean,
value: false, value: false,
}, },
receiver: {
type: String,
value: "",
},
}, },
data: { data: {
...@@ -89,20 +95,21 @@ Component({ ...@@ -89,20 +95,21 @@ Component({
* @returns {boolean} 是否显示该轨迹 * @returns {boolean} 是否显示该轨迹
*/ */
_shouldShowTrack(trackStatus, logisticsStatus) { _shouldShowTrack(trackStatus, logisticsStatus) {
return true;
const statusThresholds = { const statusThresholds = {
1000: 1000, // 待揽件 - 只显示收件相关记录 1000: 1000, // 待揽件 - 只显示收件相关记录
1001: 1001, // 已揽件 - 显示揽件和发往记录 1001: 1001, // 已揽件 - 显示揽件和发往记录
1002: 1002, // 运输中 - 显示所有运输中的记录 1002: 1002, // 运输中 - 显示所有运输中的记录
1003: 1003, // 已签收 - 显示所有记录 1003: 1003, // 已签收 - 显示所有记录
1004: 1004, // 拒收 - 显示所有记录 1004: 1004, // 拒收 - 显示所有记录
1005: 1005, // 正在派件 - 显示所有记录
}; };
const threshold = statusThresholds[logisticsStatus]; const threshold = statusThresholds[logisticsStatus];
return threshold !== undefined ? trackStatus <= threshold : true; return threshold !== undefined ? trackStatus <= threshold : true;
}, },
/** /**
* 处理物流轨迹数据 * 处理轨迹数据
* @param {Array} shipmentTrack - 原始轨迹数据 * @param {Array} shipmentTrack - 原始轨迹数据
* @param {number} logisticsStatus - 物流状态 * @param {number} logisticsStatus - 物流状态
* @returns {Array} 处理后的轨迹数据 * @returns {Array} 处理后的轨迹数据
...@@ -112,38 +119,62 @@ Component({ ...@@ -112,38 +119,62 @@ Component({
return []; return [];
} }
// 根据showAll决定显示数量 // 第一步:处理所有轨迹数据,获取状态和描述
const tracksToProcess = this.data.showAll const tracks = shipmentTrack
? shipmentTrack
: shipmentTrack.slice(0, 2);
return tracksToProcess
.map((track, index) => { .map((track, index) => {
const { content = "", operateTime = "" } = track; const { content = "", operateTime = "" } = track;
const isLast = index === 0;
// 根据内容判断状态 // 根据内容判断状态
const { status, statusDesc: initialStatusDesc } = const { status, statusDesc } =
this._determineStatusByContent(content); this._determineStatusByContent(content);
// 根据整体物流状态进行最终调整 // 提取手机号码
let finalStatusDesc = initialStatusDesc; const phoneRegex = /(1[3-9]\d{9}|0\d{2,3}[-]?\d{7,8})/g;
if (logisticsStatus < status) { const phones = [];
finalStatusDesc = `${LOGISTICS_STATUS[logisticsStatus]}(进行中)`; let match;
let contentCopy = content;
while ((match = phoneRegex.exec(content)) !== null) {
phones.push(match[1]);
} }
// 高亮手机号码和座机号码
const highlightedContent = content.replace(
phoneRegex,
'<span style="color: #fb8a32;">$1</span>'
);
return { return {
...track, ...track,
content, content: highlightedContent,
phones: phones, // 添加提取的手机号码数组
operateTime, operateTime,
type: isLast ? "active" : "", type: "",
status, status,
statusDesc: finalStatusDesc, statusDesc,
}; };
}) })
.filter((track) => .filter((track) =>
this._shouldShowTrack(track.status, logisticsStatus) this._shouldShowTrack(track.status, logisticsStatus)
); );
// 使用数组反转实现同一状态只显示最后一个的逻辑
// 1. 先反转数组
const reversedTracks = [...tracks].reverse();
// 2. 应用第一次出现状态显示,后续相同状态不显示的逻辑
let lastStatus = null;
const processedReversedTracks = reversedTracks.map((track) => {
const result = { ...track };
if (track.status === lastStatus && track.status === 1002) {
result.statusDesc = "";
result.type = "small";
} else {
lastStatus = track.status;
}
return result;
});
// 3. 再次反转数组,恢复原始顺序
return processedReversedTracks.reverse();
}, },
/** /**
...@@ -152,30 +183,104 @@ Component({ ...@@ -152,30 +183,104 @@ Component({
*/ */
processExpressInfo(expressInfo) { processExpressInfo(expressInfo) {
if (!expressInfo || typeof expressInfo !== "object") { if (!expressInfo || typeof expressInfo !== "object") {
wx.p.sentry.reportError(`快递信息异常:expressInfo参数无效`, {expressInfo}); wx.p.sentry.reportError(`快递信息异常:expressInfo参数无效`, {
expressInfo,
});
console.warn("Express组件: expressInfo参数无效"); console.warn("Express组件: expressInfo参数无效");
return; return;
} }
const { logisticsStatus, shipmentTrack, ...rest } = expressInfo; const {
logisticsStatus,
shipmentTrack,
expressName,
shipmentCode,
...rest
} = expressInfo;
// 验证必要字段 // 验证必要字段
if (typeof logisticsStatus !== "number") { if (typeof logisticsStatus !== "number") {
wx.p.sentry.reportError(`快递信息异常:logisticsStatus字段无效`, {expressInfo}); wx.p.sentry.reportError(`快递信息异常:logisticsStatus字段无效`, {
expressInfo,
});
console.warn("Express组件: logisticsStatus字段无效"); console.warn("Express组件: logisticsStatus字段无效");
return; return;
} }
const processedTrack = this.processShipmentTrack( // 创建默认轨迹对象
const statusDesc = LOGISTICS_STATUS[logisticsStatus] || "未知状态";
let defaultContent = "";
switch (logisticsStatus) {
case 1000:
defaultContent = `物流单号已生成,等待快递揽收。${
expressName ? `物流公司:${expressName}` : ""
}${shipmentCode ? `,运单号:${shipmentCode}` : ""}`;
break;
case 1001:
defaultContent = `包裹已被${
expressName || "快递公司"
}揽收,即将开始运输。`;
break;
case 1002:
defaultContent = `包裹正在运输中,请耐心等待。`;
break;
case 1003:
defaultContent = `包裹已签收,感谢您的购买。`;
break;
case 1004:
defaultContent = `包裹被拒收,请联系客服处理。`;
break;
default:
defaultContent = `包裹状态更新中,请稍后查看。`;
}
// 创建默认轨迹节点
const defaultTrackNode = {
content: defaultContent,
operateTime: "",
type: "normal",
status: logisticsStatus,
statusDesc: statusDesc,
};
// 处理正常轨迹数据
let normalTrackNodes = [];
if (
shipmentTrack &&
Array.isArray(shipmentTrack) &&
shipmentTrack.length > 0
) {
normalTrackNodes = this.processShipmentTrack(
shipmentTrack, shipmentTrack,
logisticsStatus logisticsStatus
); );
} else {
normalTrackNodes = [defaultTrackNode];
}
// 创建收货地址特殊节点
const receiverNode = {
content: this.data.receiver,
operateTime: "",
type: "special",
statusDesc: "收货地址",
};
// 合并节点:收货地址节点 + 默认轨迹节点 + 正常轨迹节点(如果有)
// 如果有正常轨迹节点,则将默认轨迹节点放在最后作为补充
// 如果没有正常轨迹节点,则只使用默认轨迹节点
let combinedTrack = [...normalTrackNodes, receiverNode];
if (!this.data.showAll) {
combinedTrack = combinedTrack.slice(0, 2);
}
combinedTrack[0].type = "active";
const logisticsData = { const logisticsData = {
...rest, ...rest,
expressName,
shipmentCode,
logisticsStatus, logisticsStatus,
logisticsStatusDesc: LOGISTICS_STATUS[logisticsStatus] || "未知状态", logisticsStatusDesc: LOGISTICS_STATUS[logisticsStatus] || "未知状态",
shipmentTrack: processedTrack, shipmentTrack: combinedTrack,
}; };
this.setData({ this.setData({
......
<!-- 时间轴 -->
<view class="item"> <view class="item">
<TimeLine nodes="{{logisticsData.shipmentTrack ||[]}}" height="{{height}}"/> <TimeLine nodes="{{logisticsData.shipmentTrack ||[]}}" height="{{height}}"/>
</view>
\ No newline at end of file \ No newline at end of file
</view>
\ No newline at end of file \ No newline at end of file
.express-container {
background-color: #fff;
border-radius: 12rpx;
overflow: hidden;
}
.express-info {
padding: 24rpx;
border-bottom: 1rpx solid #f5f5f5;
}
.express-status {
margin-bottom: 16rpx;
}
.status-text {
font-size: 32rpx;
font-weight: 500;
color: #333;
}
.express-detail {
display: flex;
flex-direction: column;
gap: 8rpx;
}
.express-name, .express-code {
font-size: 28rpx;
color: #666;
}
...@@ -6,7 +6,11 @@ Component({ ...@@ -6,7 +6,11 @@ Component({
}, },
expressInfo:{ expressInfo:{
type: Object, type: Object,
value: {} value: null
},
receiver:{
type: String,
value: '',
} }
}, },
}); });
\ No newline at end of file \ No newline at end of file
...@@ -31,5 +31,6 @@ ...@@ -31,5 +31,6 @@
width: 670rpx; width: 670rpx;
height: 2rpx; height: 2rpx;
background: #EFF0F2; background: #EFF0F2;
margin-bottom: 24rpx;
} }
} }
\ No newline at end of file \ No newline at end of file
<popup show="{{showExpress}}" show-close-button="{{true}}" showFooter="{{false}}" headerColor="#F7F7F7" title="物流详情" bindconfirm="onConfirmPopup"> <popup show="{{showExpress}}" show-close-button="{{true}}" showFooter="{{false}}" headerColor="#F7F7F7" title="物流详情" bindconfirm="onConfirmPopup">
<view class="popup-content"> <view class="popup-content" wx:if="{{expressInfo && receiver}}">
<Expressage expressInfo="{{expressInfo}}"></Expressage> <Expressage expressInfo="{{expressInfo}}"></Expressage>
<view class="line"></view> <view class="line"></view>
<Express expressInfo="{{expressInfo}}" showAll="{{true}}" /> <Express expressInfo="{{expressInfo}}" receiver="{{receiver}}" showAll="{{true}}" />
</view> </view>
</popup> </popup>
\ No newline at end of file \ No newline at end of file
...@@ -2,6 +2,6 @@ ...@@ -2,6 +2,6 @@
<view class="item"> <view class="item">
<view class="label">收货地址:</view> <view class="label">收货地址:</view>
<view class="value">{{orderInfo.receiveAddress || ''}} <view class="value">{{orderInfo.receiveAddress || ''}}
<view class="value">{{orderInfo.receviveInfo || ''}}</view> <view class="value">{{orderInfo.receiveInfo || ''}}</view>
</view> </view>
</view> </view>
\ No newline at end of file \ No newline at end of file
...@@ -5,4 +5,16 @@ Component({ ...@@ -5,4 +5,16 @@ Component({
value: {}, value: {},
} }
}, },
data:{
bottomDisplay: "none",
},
methods: {
onRendered(e) {
if (e.detail.length) {
this.setData({
bottomDisplay: "block",
});
}
},
},
}) })
\ No newline at end of file \ No newline at end of file
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
<view class="value">{{orderInfo.payDate}}</view> <view class="value">{{orderInfo.payDate}}</view>
</view> </view>
</view> </view>
<view class="order-bottom"> <view class="order-bottom" style="display: {{bottomDisplay}}">
<order-action-buttons order="{{orderInfo}}" /> <order-action-buttons order="{{orderInfo}}" bindonRendered="onRendered"/>
</view> </view>
</view> </view>
\ No newline at end of file \ No newline at end of file
...@@ -35,7 +35,7 @@ Page({ ...@@ -35,7 +35,7 @@ Page({
}, },
queryLogistics(subOrderCode) { queryLogistics(subOrderCode) {
wx.p.api.shopmallApi.queryLogistics({ subOrderCode }).then((data) => { wx.p.api.shopmallApi.queryLogistics({ subOrderCode }).then((data) => {
if(data.shipmentTrack&&data.shipmentTrack.length){ if(data&&data.expressCode){
this.setData({ this.setData({
logisticsInfo: data, logisticsInfo: data,
}) })
...@@ -57,29 +57,33 @@ Page({ ...@@ -57,29 +57,33 @@ Page({
receiveName, receiveName,
receiveMobile, receiveMobile,
} = data.receiveAddress; } = data.receiveAddress;
const receiveAddress = provinceName + cityName + countyName + address;
const receiveInfo = receiveName + receiveMobile;
this.setData({ this.setData({
orderInfo: { orderInfo: {
...data, ...data,
...this.data.orderInfo, ...this.data.orderInfo,
receiveAddress: provinceName + cityName + countyName + address, receiveAddress,
receviveInfo: receiveName + receiveMobile, receiveInfo,
}, },
}); receiver: `${receiveAddress}<br/>${receiveInfo}`,
if (data.expressName && this.data.orderInfo.goodsSource==GoodsSource.SELF) { // 如果有expressInfo也一并设置
this.setData({ ...(data.expressName && this.data.orderInfo.goodsSource == GoodsSource.SELF ? {
expressInfo: { expressInfo: {
expressName: data.expressName, expressName: data.expressName,
shipmentCode: data.expressNo, shipmentCode: data.expressNo,
},
});
} }
}).catch((err) => { } : {})
});
console.log(this.data)
})
.catch((err) => {
wx.p.sentry.reportError(`订单详情异常:${err.message}`, {subOrderCode,err}); wx.p.sentry.reportError(`订单详情异常:${err.message}`, {subOrderCode,err});
}) })
.finally(() => { .finally(() => {
wx.hideLoading(); wx.hideLoading();
}); });
}, },
showExpressPop() { showExpressPop() {
this.setData({ this.setData({
isShowExpressPop: true, isShowExpressPop: true,
......
...@@ -6,10 +6,13 @@ ...@@ -6,10 +6,13 @@
.express-detail{ .express-detail{
position: absolute; position: absolute;
right: 24rpx; right: 24rpx;
top:12rpx; top:0;
color: var(--btnColor); color: var(--btnColor);
font-weight: 400; font-weight: 400;
font-size: 24rpx; font-size: 24rpx;
display: flex;
align-items: center;
gap: 6rpx;
} }
} }
} }
......
...@@ -4,14 +4,15 @@ ...@@ -4,14 +4,15 @@
<Status title="{{Status.text}}" image="{{Status.image}}" tips="{{Status.tips}}"></Status> <Status title="{{Status.text}}" image="{{Status.image}}" tips="{{Status.tips}}"></Status>
</BlockBox> </BlockBox>
<!-- 云中鹤的有物流信息 --> <!-- 云中鹤的有物流信息 -->
<BlockBox wx:if="{{logisticsInfo}}"> <BlockBox wx:if="{{receiver && logisticsInfo}}">
<view class="express-box" bindtap="showExpressPop"> <view class="express-box" bindtap="showExpressPop">
<view class="express-detail"> <view class="express-detail">
物流详情 物流详情
<mp-icon icon="arrow" color="var(--btnColor)" size="{{11}}"></mp-icon> <mp-icon icon="arrow" color="var(--btnColor)" size="{{11}}"></mp-icon>
</view> </view>
<Express expressInfo="{{logisticsInfo}}" showAll="{{false}}"/> <Express expressInfo="{{logisticsInfo}}" receiver="{{receiver}}" showAll="{{false}}"/>
</view> </view>
<Expresspop showExpress="{{isShowExpressPop}}" expressInfo="{{logisticsInfo}}" receiver="{{receiver}}" />
</BlockBox> </BlockBox>
<!-- 自营商品展示快递信息 --> <!-- 自营商品展示快递信息 -->
<BlockBox wx:if="{{expressInfo}}"> <BlockBox wx:if="{{expressInfo}}">
...@@ -26,7 +27,6 @@ ...@@ -26,7 +27,6 @@
<!-- <BlockBox> <!-- <BlockBox>
<content item="{{orderInfo}}" /> <content item="{{orderInfo}}" />
</BlockBox> --> </BlockBox> -->
<Expresspop showExpress="{{isShowExpressPop}}" expressInfo="{{logisticsInfo}}" wx:if="{{logisticsInfo}}" />
</view> </view>
</block> </block>
<glsx-privacy appletName="积分商城"></glsx-privacy> <glsx-privacy appletName="积分商城"></glsx-privacy>
\ No newline at end of file \ No newline at end of file
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
<view class="specification">{{item.specificationData}}</view> <view class="specification">{{item.specificationData}}</view>
</block> </block>
<view class="price"> <view class="price">
{{item.redeemPoints||'--'}}积分 {{item.redeemPoints||'--'}}<text class="unit">积分</text>
</view> </view>
</view> </view>
</view> </view>
......
...@@ -85,8 +85,11 @@ ...@@ -85,8 +85,11 @@
.info-bottom .price { .info-bottom .price {
color: var(--themeColor); color: var(--themeColor);
font-size: 26rpx; font-size: 28rpx;
font-weight: 500; font-weight: 700;
}
.info-bottom .price .unit{
font-weight: 600;
} }
.info-bottom .specification { .info-bottom .specification {
......
...@@ -18,6 +18,7 @@ ...@@ -18,6 +18,7 @@
font-size: 24rpx; font-size: 24rpx;
margin-left: 12rpx; margin-left: 12rpx;
color: #1B233D; color: #1B233D;
font-weight:500;
} }
.btn-box .pay { .btn-box .pay {
......
...@@ -11,7 +11,7 @@ Component({ ...@@ -11,7 +11,7 @@ Component({
observer: function (v) { observer: function (v) {
v && this.getStatus(v); v && this.getStatus(v);
}, },
}, }
}, },
/** /**
...@@ -30,6 +30,6 @@ Component({ ...@@ -30,6 +30,6 @@ Component({
this.setData({ this.setData({
status: _order.text, status: _order.text,
}); });
}, }
}, }
}); });
...@@ -259,7 +259,7 @@ Page({ ...@@ -259,7 +259,7 @@ Page({
if (!loginData.phone || !source) { if (!loginData.phone || !source) {
wx.p.sentry.reportParamError( wx.p.sentry.reportParamError(
'获取门店列表异常:staffPhone, channelSource', '获取门店列表异常:staffPhone, channelSource',
{...loginData, channelSource: source} {staffPhone: loginData.phone, channelSource: source}
) )
} }
commonApi.getMerchantData({staffPhone: loginData?.phone, channelSource: source}).then(res => { commonApi.getMerchantData({staffPhone: loginData?.phone, channelSource: source}).then(res => {
...@@ -275,7 +275,7 @@ Page({ ...@@ -275,7 +275,7 @@ Page({
if (!source || !merchantId || !loginData.phone) { if (!source || !merchantId || !loginData.phone) {
wx.p.sentry.reportParamError( wx.p.sentry.reportParamError(
'门店选择异常:staffPhone, channelSource', '门店选择异常:staffPhone, channelSource',
{...loginData, channelSource: source, merchantId, merchantName} {channelSource: source, merchantId, merchantName}
) )
} }
wx.p.storage.set('userInfo', { wx.p.storage.set('userInfo', {
......
...@@ -37,10 +37,10 @@ Page({ ...@@ -37,10 +37,10 @@ Page({
return return
} }
wx.p.isLogin = true wx.p.isLogin = true
if (!paramsData.phone || !paramsData.channelSource) { if (!paramsData.loginData?.phone || !paramsData.loginData?.channelSource) {
wx.p.sentry.reportParamError( wx.p.sentry.reportParamError(
'门店选择异常:phone, channelSource', '门店选择异常:phone, channelSource',
paramsData {phone: paramsData.loginData?.phone, channelSource: paramsData.loginData?.channelSource}
) )
} }
wx.p.storage.set('userInfo', { ...paramsData.loginData, merchantId: obj?.merchantId, merchantName: obj?.merchantName }) wx.p.storage.set('userInfo', { ...paramsData.loginData, merchantId: obj?.merchantId, merchantName: obj?.merchantName })
......
...@@ -34,10 +34,11 @@ page { ...@@ -34,10 +34,11 @@ page {
margin-bottom: 24rpx; margin-bottom: 24rpx;
background: #FFFFFF; background: #FFFFFF;
border-radius: 24rpx; border-radius: 24rpx;
padding-left: 24rpx; padding-left: 32rpx;
} }
.item-box.disabled { .item-box.disabled {
opacity: .7; opacity: .7;
padding-left: 16rpx;
} }
.box .item { .box .item {
width: 100%; width: 100%;
...@@ -63,7 +64,7 @@ page { ...@@ -63,7 +64,7 @@ page {
} }
.box .item .content .icon, .box .item .content .icon,
.box .item .content .goods-info .preview { .box .item .content .goods-info .preview {
margin-right: 24rpx; margin-right: 20rpx;
} }
.box .item .content .goods-info { .box .item .content .goods-info {
width: calc(100% - 60rpx); width: calc(100% - 60rpx);
...@@ -100,6 +101,7 @@ page { ...@@ -100,6 +101,7 @@ page {
font-size: 20rpx; font-size: 20rpx;
text-align: center; text-align: center;
line-height: 32rpx; line-height: 32rpx;
margin-right: 12rpx;
} }
.box .item .content .goods-info .text .price-box .price { .box .item .content .goods-info .text .price-box .price {
color: #FC5B32; color: #FC5B32;
...@@ -166,10 +168,17 @@ page { ...@@ -166,10 +168,17 @@ page {
} }
.goods-action .total .price { .goods-action .total .price {
color: #FC5B32; color: #FC5B32;
font-size: 40rpx;
display: flex; display: flex;
max-width: 220rpx;
align-items: baseline; align-items: baseline;
.num {
font-size: 40rpx;
font-weight: 700; font-weight: 700;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
width: calc(100% - 50rpx);
}
} }
.goods-action .total .price text { .goods-action .total .price text {
font-size: 24rpx; font-size: 24rpx;
......
...@@ -63,10 +63,10 @@ ...@@ -63,10 +63,10 @@
</view> </view>
<view class="total">合计: <view class="total">合计:
<view class="price"> <view class="price">
<text>积分</text>{{sum||0}} <text>积分</text><text class="num">{{sum||0}}</text>
</view> </view>
</view> </view>
<button class="btn text-center" bindtap="checkOut" disabled="{{count<1}}">结算({{count||0}})</button> <button class="btn text-center" bindtap="checkOut" disabled="{{count<1}}">结算({{count || 0}})</button>
</view> </view>
</goods-action> </goods-action>
</block> </block>
\ No newline at end of file \ No newline at end of file
...@@ -31,7 +31,7 @@ Page({ ...@@ -31,7 +31,7 @@ Page({
label: '200-300积分' label: '200-300积分'
}], }],
subTab: [], subTab: [],
activeTab: '', activeTab: 1,
frontendCategoryId: '', frontendCategoryId: '',
goodsList: [], goodsList: [],
count: 1 count: 1
......
...@@ -133,6 +133,9 @@ page { ...@@ -133,6 +133,9 @@ page {
font-weight: 500; font-weight: 500;
font-size: 32rpx; font-size: 32rpx;
color: #0A0D14; color: #0A0D14;
display: flex;
flex-direction: column;
align-items: flex-start;
} }
.user-info .nickName { .user-info .nickName {
...@@ -185,6 +188,8 @@ page { ...@@ -185,6 +188,8 @@ page {
padding: 0 24rpx; padding: 0 24rpx;
display: flex; display: flex;
align-items: center; align-items: center;
flex: 0 1 auto;
min-width: 0;
.name { .name {
max-width: 280rpx; max-width: 280rpx;
overflow: hidden; overflow: hidden;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!