优化首页商品卡片的瀑布流样式问题。解决vip页面试用开通后,其他卡片第一个还是显示试用一天问题。
This commit is contained in:
parent
9173f8c347
commit
4c2de20b28
@ -1,230 +1,238 @@
|
|||||||
<!-- 订单详情 -->
|
<!-- 订单详情 -->
|
||||||
<template>
|
<template>
|
||||||
<s-layout title="订单详情" class="index-wrap" navbar="normal">
|
<s-layout title="订单详情" navbar="normal">
|
||||||
<!-- 订单状态 TODO -->
|
<view class="new-overflow">
|
||||||
<!-- <view class="state-box ss-col-center new-class" :style="[
|
<!-- 订单状态 TODO -->
|
||||||
{
|
<!-- <view class="state-box ss-col-center new-class" :style="[
|
||||||
marginTop: '-' + Number(statusBarHeight + 88) + 'rpx',
|
{
|
||||||
paddingTop: Number(statusBarHeight + 88) + 'rpx',
|
marginTop: '-' + Number(statusBarHeight + 88) + 'rpx',
|
||||||
},
|
paddingTop: Number(statusBarHeight + 88) + 'rpx',
|
||||||
]"> -->
|
},
|
||||||
<view class="state-box ss-col-center new-class">
|
]"> -->
|
||||||
<view class="ss-flex ss-m-t-32 ss-m-b-20 ">
|
<view class="state-box ss-col-center new-class">
|
||||||
<!-- 待付款 -->
|
<view class="ss-flex ss-m-t-32 ss-m-b-20 ">
|
||||||
<image v-if=" state.orderInfo.status === 0 " class="state-img"
|
<!-- 待付款 -->
|
||||||
src="https://zysc.fjptzykj.com:3000/shangcheng/8761518e0fa2e892fa65f9c3f79456a23a4dab1796b7069b8a5482ac79d00811.png">
|
<image v-if=" state.orderInfo.status === 0 " class="state-img"
|
||||||
</image>
|
src="https://zysc.fjptzykj.com:3000/shangcheng/8761518e0fa2e892fa65f9c3f79456a23a4dab1796b7069b8a5482ac79d00811.png">
|
||||||
|
</image>
|
||||||
|
|
||||||
<!-- 待收货 -->
|
<!-- 待收货 -->
|
||||||
<image v-if=" state.orderInfo.status === 20 " class="state-img"
|
<image v-if=" state.orderInfo.status === 20 " class="state-img"
|
||||||
src="https://zysc.fjptzykj.com:3000/shangcheng/5aa87fed5713160eb6e7f2cf8697d426d52abac9ede40a1011e8d3296266487e.png">
|
src="https://zysc.fjptzykj.com:3000/shangcheng/5aa87fed5713160eb6e7f2cf8697d426d52abac9ede40a1011e8d3296266487e.png">
|
||||||
</image>
|
</image>
|
||||||
|
|
||||||
<!-- 待评价 -->
|
<!-- 待评价 -->
|
||||||
<image v-if=" state.orderInfo.status === 30 && state.orderInfo.buttons?.includes('comment')" class="state-img"
|
<image v-if=" state.orderInfo.status === 30 && state.orderInfo.buttons?.includes('comment')"
|
||||||
src="https://zysc.fjptzykj.com:3000/shangcheng/b729e67ba7b6039676a43b28ca855228ed82914f7669482b938e9696ed9cc798.png">
|
class="state-img"
|
||||||
</image>
|
src="https://zysc.fjptzykj.com:3000/shangcheng/b729e67ba7b6039676a43b28ca855228ed82914f7669482b938e9696ed9cc798.png">
|
||||||
<!-- 已完成 -->
|
</image>
|
||||||
<image v-if=" state.orderInfo.status === 30 && !state.orderInfo.buttons?.includes('comment')" class="state-img"
|
<!-- 已完成 -->
|
||||||
src="https://zysc.fjptzykj.com:3000/shangcheng/7b1b2022173b3b6812ad256c836b4c5c67b6aa63a203c7d142ae90802a416e7b.png">
|
<image v-if=" state.orderInfo.status === 30 && !state.orderInfo.buttons?.includes('comment')"
|
||||||
</image>
|
class="state-img"
|
||||||
|
src="https://zysc.fjptzykj.com:3000/shangcheng/7b1b2022173b3b6812ad256c836b4c5c67b6aa63a203c7d142ae90802a416e7b.png">
|
||||||
|
</image>
|
||||||
|
|
||||||
<image v-if="
|
<image v-if="
|
||||||
state.orderInfo.status_code == 'unpaid' ||
|
state.orderInfo.status_code == 'unpaid' ||
|
||||||
state.orderInfo.status === 10 || // 待发货
|
state.orderInfo.status === 10 || // 待发货
|
||||||
state.orderInfo.status_code == 'nocomment'
|
state.orderInfo.status_code == 'nocomment'
|
||||||
" class="state-img"
|
" class="state-img"
|
||||||
src="https://zysc.fjptzykj.com:3000/shangcheng/b78f86e49f0408b005c79246af63707c86a855b2dd39556f2fdce7653d95b227.png">
|
src="https://zysc.fjptzykj.com:3000/shangcheng/b78f86e49f0408b005c79246af63707c86a855b2dd39556f2fdce7653d95b227.png">
|
||||||
</image>
|
</image>
|
||||||
<image v-if="
|
<image 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"
|
" class="state-img"
|
||||||
src="https://zysc.fjptzykj.com:3000/shangcheng/b78f86e49f0408b005c79246af63707c86a855b2dd39556f2fdce7653d95b227.png">
|
src="https://zysc.fjptzykj.com:3000/shangcheng/b78f86e49f0408b005c79246af63707c86a855b2dd39556f2fdce7653d95b227.png">
|
||||||
</image>
|
</image>
|
||||||
<image v-if="state.orderInfo.status_code == 'cancel' || state.orderInfo.status_code == 'closed'"
|
<image v-if="state.orderInfo.status_code == 'cancel' || state.orderInfo.status_code == 'closed'"
|
||||||
class="state-img"
|
class="state-img"
|
||||||
src="https://zysc.fjptzykj.com:3000/shangcheng/b78f86e49f0408b005c79246af63707c86a855b2dd39556f2fdce7653d95b227.png">
|
src="https://zysc.fjptzykj.com:3000/shangcheng/b78f86e49f0408b005c79246af63707c86a855b2dd39556f2fdce7653d95b227.png">
|
||||||
</image>
|
</image>
|
||||||
<image v-if="state.orderInfo.status_code == 'noget'" class="state-img"
|
<image v-if="state.orderInfo.status_code == 'noget'" class="state-img"
|
||||||
src="https://zysc.fjptzykj.com:3000/shangcheng/b78f86e49f0408b005c79246af63707c86a855b2dd39556f2fdce7653d95b227.png">
|
src="https://zysc.fjptzykj.com:3000/shangcheng/b78f86e49f0408b005c79246af63707c86a855b2dd39556f2fdce7653d95b227.png">
|
||||||
</image>
|
</image>
|
||||||
<!-- <view class="ss-font-30">{{ formatOrderStatus(state.orderInfo) }}</view> -->
|
<!-- <view class="ss-font-30">{{ formatOrderStatus(state.orderInfo) }}</view> -->
|
||||||
</view>
|
|
||||||
<view class="ss-font-26 ss-m-x-20 ">
|
|
||||||
{{ formatOrderStatusDescription(state.orderInfo) }}
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
|
|
||||||
<!-- 收货地址 -->
|
|
||||||
<view class="order-address-box" v-if="state.orderInfo.receiverAreaId > 0">
|
|
||||||
|
|
||||||
<uni-section title="" type="line" padding>
|
|
||||||
<uni-steps :options="state.list1" :active="state.active" active-color="rgba(214,68,49)"/>
|
|
||||||
</uni-section>
|
|
||||||
|
|
||||||
<view class="new-address">
|
|
||||||
<view class="ss-flex ss-col-center">
|
|
||||||
<text class="address-username">
|
|
||||||
{{ state.orderInfo.receiverName }}
|
|
||||||
</text>
|
|
||||||
<text class="address-phone">{{ state.orderInfo.receiverMobile }}</text>
|
|
||||||
</view>
|
</view>
|
||||||
<view class="address-detail">
|
<view class="ss-font-26 ss-m-x-20 ">
|
||||||
{{ state.orderInfo.receiverAreaName }} {{ state.orderInfo.receiverDetailAddress }}
|
{{ formatOrderStatusDescription(state.orderInfo) }}
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
|
||||||
|
|
||||||
<view class="detail-goods" :style="[{ marginTop: state.orderInfo.receiverAreaId > 0 ? '0' : '-40rpx' }]">
|
<!-- 收货地址 -->
|
||||||
<!-- 订单信 -->
|
<view class="order-address-box" v-if="state.orderInfo.receiverAreaId > 0">
|
||||||
<view class="order-list" v-for="item in state.orderInfo.items" :key="item.goods_id">
|
|
||||||
<view class="order-card">
|
|
||||||
<s-goods-item @tap="onGoodsDetail(item.spuId)" :img="item.picUrl" :title="item.spuName"
|
|
||||||
:skuText="item.properties.map((property) => property.valueName).join(' ')" :price="item.price"
|
|
||||||
:num="item.count">
|
|
||||||
<template #tool>
|
|
||||||
<view class="ss-flex">
|
|
||||||
<button class="ss-reset-button apply-btn"
|
|
||||||
v-if="[10, 20, 30].includes(state.orderInfo.status) && item.afterSaleStatus === 0"
|
|
||||||
@tap.stop="
|
|
||||||
sheep.$router.go('/pages/order/aftersale/apply', {
|
|
||||||
orderId: state.orderInfo.id,
|
|
||||||
itemId: item.id,
|
|
||||||
})
|
|
||||||
">
|
|
||||||
申请售后
|
|
||||||
</button>
|
|
||||||
<button class="ss-reset-button apply-btn" v-if="item.afterSaleStatus === 10" @tap.stop="
|
|
||||||
sheep.$router.go('/pages/order/aftersale/detail', {
|
|
||||||
id: item.afterSaleId,
|
|
||||||
})
|
|
||||||
">
|
|
||||||
退款中
|
|
||||||
</button>
|
|
||||||
<button class="ss-reset-button apply-btn" v-if="item.afterSaleStatus === 20" @tap.stop="
|
|
||||||
sheep.$router.go('/pages/order/aftersale/detail', {
|
|
||||||
id: item.afterSaleId,
|
|
||||||
})
|
|
||||||
">
|
|
||||||
退款成功
|
|
||||||
</button>
|
|
||||||
</view>
|
|
||||||
</template>
|
|
||||||
<template #priceSuffix>
|
|
||||||
<button class="ss-reset-button tag-btn" v-if="item.status_text">
|
|
||||||
{{ item.status_text }}
|
|
||||||
</button>
|
|
||||||
</template>
|
|
||||||
</s-goods-item>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
|
|
||||||
<!-- 自提核销 -->
|
<uni-section title="" type="line" padding>
|
||||||
<PickUpVerify :order-info="state.orderInfo" :systemStore="systemStore" ref="pickUpVerifyRef"></PickUpVerify>
|
<uni-steps :options="state.list1" :active="state.active" active-color="rgba(214,68,49)" />
|
||||||
|
</uni-section>
|
||||||
|
|
||||||
<!-- 订单信息 -->
|
<view class="new-address">
|
||||||
<view class="notice-box">
|
<view class="ss-flex ss-col-center">
|
||||||
<view class="notice-box__content">
|
<text class="address-username">
|
||||||
<view class="notice-item--center">
|
{{ state.orderInfo.receiverName }}
|
||||||
<view class="ss-flex ss-flex-1">
|
</text>
|
||||||
<text class="title">订单编号:</text>
|
<text class="address-phone">{{ state.orderInfo.receiverMobile }}</text>
|
||||||
<text class="detail">{{ state.orderInfo.no }}</text>
|
</view>
|
||||||
|
<view class="address-detail">
|
||||||
|
{{ state.orderInfo.receiverAreaName }} {{ state.orderInfo.receiverDetailAddress }}
|
||||||
</view>
|
</view>
|
||||||
<button class="ss-reset-button copy-btn" @tap="onCopy">复制</button>
|
|
||||||
</view>
|
|
||||||
<view class="notice-item">
|
|
||||||
<text class="title">下单时间:</text>
|
|
||||||
<text class="detail">
|
|
||||||
{{ sheep.$helper.timeFormat(state.orderInfo.createTime, 'yyyy-mm-dd hh:MM:ss') }}
|
|
||||||
</text>
|
|
||||||
</view>
|
|
||||||
<view class="notice-item" v-if="state.orderInfo.payTime">
|
|
||||||
<text class="title">支付时间:</text>
|
|
||||||
<text class="detail">
|
|
||||||
{{ sheep.$helper.timeFormat(state.orderInfo.payTime, 'yyyy-mm-dd hh:MM:ss') }}
|
|
||||||
</text>
|
|
||||||
</view>
|
|
||||||
<view class="notice-item">
|
|
||||||
<text class="title">支付方式:</text>
|
|
||||||
<text class="detail">{{ state.orderInfo.payChannelName || '-' }}</text>
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
|
||||||
|
|
||||||
<!-- 价格信息 -->
|
<view class="detail-goods" :style="[{ marginTop: state.orderInfo.receiverAreaId > 0 ? '0' : '-40rpx' }]">
|
||||||
<view class="order-price-box">
|
<!-- 订单信 -->
|
||||||
<view class="notice-item ss-flex ss-row-between">
|
<view class="order-list" v-for="item in state.orderInfo.items" :key="item.goods_id">
|
||||||
<text class="title">商品总额</text>
|
<view class="order-card">
|
||||||
<view class="ss-flex">
|
<s-goods-item @tap="onGoodsDetail(item.spuId)" :img="item.picUrl" :title="item.spuName"
|
||||||
<text class="detail">¥{{ fen2yuan(state.orderInfo.totalPrice) }}</text>
|
:skuText="item.properties.map((property) => property.valueName).join(' ')"
|
||||||
|
:price="item.price" :num="item.count">
|
||||||
|
<template #tool>
|
||||||
|
<view class="ss-flex">
|
||||||
|
<button class="ss-reset-button apply-btn"
|
||||||
|
v-if="[10, 20, 30].includes(state.orderInfo.status) && item.afterSaleStatus === 0"
|
||||||
|
@tap.stop="
|
||||||
|
sheep.$router.go('/pages/order/aftersale/apply', {
|
||||||
|
orderId: state.orderInfo.id,
|
||||||
|
itemId: item.id,
|
||||||
|
})
|
||||||
|
">
|
||||||
|
申请售后
|
||||||
|
</button>
|
||||||
|
<button class="ss-reset-button apply-btn" v-if="item.afterSaleStatus === 10"
|
||||||
|
@tap.stop="
|
||||||
|
sheep.$router.go('/pages/order/aftersale/detail', {
|
||||||
|
id: item.afterSaleId,
|
||||||
|
})
|
||||||
|
">
|
||||||
|
退款中
|
||||||
|
</button>
|
||||||
|
<button class="ss-reset-button apply-btn" v-if="item.afterSaleStatus === 20"
|
||||||
|
@tap.stop="
|
||||||
|
sheep.$router.go('/pages/order/aftersale/detail', {
|
||||||
|
id: item.afterSaleId,
|
||||||
|
})
|
||||||
|
">
|
||||||
|
退款成功
|
||||||
|
</button>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
<template #priceSuffix>
|
||||||
|
<button class="ss-reset-button tag-btn" v-if="item.status_text">
|
||||||
|
{{ item.status_text }}
|
||||||
|
</button>
|
||||||
|
</template>
|
||||||
|
</s-goods-item>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="notice-item ss-flex ss-row-between">
|
|
||||||
<text class="title">运费</text>
|
|
||||||
<text class="detail">¥{{ fen2yuan(state.orderInfo.deliveryPrice) }}</text>
|
|
||||||
</view>
|
|
||||||
<!-- TODO 芋艿:优惠劵抵扣、积分抵扣 -->
|
|
||||||
<view class="notice-item ss-flex ss-row-between" v-if="state.orderInfo.couponPrice > 0">
|
|
||||||
<text class="title">优惠劵金额</text>
|
|
||||||
<text class="detail">-¥{{ fen2yuan(state.orderInfo.couponPrice) }}</text>
|
|
||||||
</view>
|
|
||||||
<view class="notice-item ss-flex ss-row-between" v-if="state.orderInfo.pointPrice > 0">
|
|
||||||
<text class="title">积分抵扣</text>
|
|
||||||
<text class="detail">-¥{{ fen2yuan(state.orderInfo.pointPrice) }}</text>
|
|
||||||
</view>
|
|
||||||
<view class="notice-item ss-flex ss-row-between" v-if="state.orderInfo.discountPrice > 0">
|
|
||||||
<text class="title">活动优惠</text>
|
|
||||||
<text class="detail">¥{{ fen2yuan(state.orderInfo.discountPrice) }}</text>
|
|
||||||
</view>
|
|
||||||
<view class="notice-item ss-flex ss-row-between" v-if="state.orderInfo.vipPrice > 0">
|
|
||||||
<text class="title">会员优惠</text>
|
|
||||||
<text class="detail">-¥{{ fen2yuan(state.orderInfo.vipPrice) }}</text>
|
|
||||||
</view>
|
|
||||||
<view class="notice-item all-rpice-item ss-flex ss-m-t-20">
|
|
||||||
<text class="title">{{ state.orderInfo.payStatus ? '已付款' : '需付款' }}</text>
|
|
||||||
<text class="detail all-price">¥{{ fen2yuan(state.orderInfo.payPrice) }}</text>
|
|
||||||
</view>
|
|
||||||
<view class="notice-item all-rpice-item ss-flex ss-m-t-20" v-if="state.orderInfo.refundPrice > 0">
|
|
||||||
<text class="title">已退款</text>
|
|
||||||
<text class="detail all-price">¥{{ fen2yuan(state.orderInfo.refundPrice) }}</text>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
|
|
||||||
<!-- 底部按钮 -->
|
<!-- 自提核销 -->
|
||||||
<!-- TODO: 查看物流、等待成团、评价完后返回页面没刷新页面 -->
|
<PickUpVerify :order-info="state.orderInfo" :systemStore="systemStore" ref="pickUpVerifyRef"></PickUpVerify>
|
||||||
<su-fixed bottom placeholder bg="bg-white" v-if="state.orderInfo.buttons?.length">
|
|
||||||
<view class="footer-box ss-flex ss-col-center ss-row-right">
|
<!-- 订单信息 -->
|
||||||
<button class="ss-reset-button cancel-btn" v-if="state.orderInfo.buttons?.includes('cancel')"
|
<view class="notice-box">
|
||||||
@tap="onCancel(state.orderInfo.id)">
|
<view class="notice-box__content">
|
||||||
取消订单
|
<view class="notice-item--center">
|
||||||
</button>
|
<view class="ss-flex ss-flex-1">
|
||||||
<button class="ss-reset-button pay-btn ui-BG-Main-Gradient"
|
<text class="title">订单编号:</text>
|
||||||
v-if="state.orderInfo.buttons?.includes('pay')" @tap="onPay(state.orderInfo.payOrderId)">
|
<text class="detail">{{ state.orderInfo.no }}</text>
|
||||||
继续支付
|
</view>
|
||||||
</button>
|
<button class="ss-reset-button copy-btn" @tap="onCopy">复制</button>
|
||||||
<button class="ss-reset-button cancel-btn" v-if="state.orderInfo.buttons?.includes('combination')" @tap="
|
</view>
|
||||||
sheep.$router.go('/pages/activity/groupon/detail', {
|
<view class="notice-item">
|
||||||
id: state.orderInfo.combinationRecordId,
|
<text class="title">下单时间:</text>
|
||||||
})
|
<text class="detail">
|
||||||
">
|
{{ sheep.$helper.timeFormat(state.orderInfo.createTime, 'yyyy-mm-dd hh:MM:ss') }}
|
||||||
拼团详情
|
</text>
|
||||||
</button>
|
</view>
|
||||||
<button class="ss-reset-button cancel-btn" v-if="state.orderInfo.buttons?.includes('express')"
|
<view class="notice-item" v-if="state.orderInfo.payTime">
|
||||||
@tap="onExpress(state.orderInfo.id)">
|
<text class="title">支付时间:</text>
|
||||||
查看物流
|
<text class="detail">
|
||||||
</button>
|
{{ sheep.$helper.timeFormat(state.orderInfo.payTime, 'yyyy-mm-dd hh:MM:ss') }}
|
||||||
<button class="ss-reset-button cancel-btn" v-if="state.orderInfo.buttons?.includes('confirm')"
|
</text>
|
||||||
@tap="onConfirm(state.orderInfo.id)">
|
</view>
|
||||||
确认收货
|
<view class="notice-item">
|
||||||
</button>
|
<text class="title">支付方式:</text>
|
||||||
<button class="ss-reset-button cancel-btn" v-if="state.orderInfo.buttons?.includes('comment')"
|
<text class="detail">{{ state.orderInfo.payChannelName || '-' }}</text>
|
||||||
@tap="onComment(state.orderInfo.id)">
|
</view>
|
||||||
评价
|
</view>
|
||||||
</button>
|
|
||||||
</view>
|
</view>
|
||||||
</su-fixed>
|
|
||||||
|
<!-- 价格信息 -->
|
||||||
|
<view class="order-price-box">
|
||||||
|
<view class="notice-item ss-flex ss-row-between">
|
||||||
|
<text class="title">商品总额</text>
|
||||||
|
<view class="ss-flex">
|
||||||
|
<text class="detail">¥{{ fen2yuan(state.orderInfo.totalPrice) }}</text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="notice-item ss-flex ss-row-between">
|
||||||
|
<text class="title">运费</text>
|
||||||
|
<text class="detail">¥{{ fen2yuan(state.orderInfo.deliveryPrice) }}</text>
|
||||||
|
</view>
|
||||||
|
<!-- TODO 芋艿:优惠劵抵扣、积分抵扣 -->
|
||||||
|
<view class="notice-item ss-flex ss-row-between" v-if="state.orderInfo.couponPrice > 0">
|
||||||
|
<text class="title">优惠劵金额</text>
|
||||||
|
<text class="detail">-¥{{ fen2yuan(state.orderInfo.couponPrice) }}</text>
|
||||||
|
</view>
|
||||||
|
<view class="notice-item ss-flex ss-row-between" v-if="state.orderInfo.pointPrice > 0">
|
||||||
|
<text class="title">积分抵扣</text>
|
||||||
|
<text class="detail">-¥{{ fen2yuan(state.orderInfo.pointPrice) }}</text>
|
||||||
|
</view>
|
||||||
|
<view class="notice-item ss-flex ss-row-between" v-if="state.orderInfo.discountPrice > 0">
|
||||||
|
<text class="title">活动优惠</text>
|
||||||
|
<text class="detail">¥{{ fen2yuan(state.orderInfo.discountPrice) }}</text>
|
||||||
|
</view>
|
||||||
|
<view class="notice-item ss-flex ss-row-between" v-if="state.orderInfo.vipPrice > 0">
|
||||||
|
<text class="title">会员优惠</text>
|
||||||
|
<text class="detail">-¥{{ fen2yuan(state.orderInfo.vipPrice) }}</text>
|
||||||
|
</view>
|
||||||
|
<view class="notice-item all-rpice-item ss-flex ss-m-t-20">
|
||||||
|
<text class="title">{{ state.orderInfo.payStatus ? '已付款' : '需付款' }}</text>
|
||||||
|
<text class="detail all-price">¥{{ fen2yuan(state.orderInfo.payPrice) }}</text>
|
||||||
|
</view>
|
||||||
|
<view class="notice-item all-rpice-item ss-flex ss-m-t-20" v-if="state.orderInfo.refundPrice > 0">
|
||||||
|
<text class="title">已退款</text>
|
||||||
|
<text class="detail all-price">¥{{ fen2yuan(state.orderInfo.refundPrice) }}</text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<!-- 底部按钮 -->
|
||||||
|
<!-- TODO: 查看物流、等待成团、评价完后返回页面没刷新页面 -->
|
||||||
|
<su-fixed bottom placeholder bg="bg-white" v-if="state.orderInfo.buttons?.length">
|
||||||
|
<view class="footer-box ss-flex ss-col-center ss-row-right">
|
||||||
|
<button class="ss-reset-button cancel-btn" v-if="state.orderInfo.buttons?.includes('cancel')"
|
||||||
|
@tap="onCancel(state.orderInfo.id)">
|
||||||
|
取消订单
|
||||||
|
</button>
|
||||||
|
<button class="ss-reset-button pay-btn ui-BG-Main-Gradient"
|
||||||
|
v-if="state.orderInfo.buttons?.includes('pay')" @tap="onPay(state.orderInfo.payOrderId)">
|
||||||
|
继续支付
|
||||||
|
</button>
|
||||||
|
<button class="ss-reset-button cancel-btn" v-if="state.orderInfo.buttons?.includes('combination')"
|
||||||
|
@tap="
|
||||||
|
sheep.$router.go('/pages/activity/groupon/detail', {
|
||||||
|
id: state.orderInfo.combinationRecordId,
|
||||||
|
})
|
||||||
|
">
|
||||||
|
拼团详情
|
||||||
|
</button>
|
||||||
|
<button class="ss-reset-button cancel-btn" v-if="state.orderInfo.buttons?.includes('express')"
|
||||||
|
@tap="onExpress(state.orderInfo.id)">
|
||||||
|
查看物流
|
||||||
|
</button>
|
||||||
|
<button class="ss-reset-button cancel-btn" v-if="state.orderInfo.buttons?.includes('confirm')"
|
||||||
|
@tap="onConfirm(state.orderInfo.id)">
|
||||||
|
确认收货
|
||||||
|
</button>
|
||||||
|
<button class="ss-reset-button cancel-btn" v-if="state.orderInfo.buttons?.includes('comment')"
|
||||||
|
@tap="onComment(state.orderInfo.id)">
|
||||||
|
评价
|
||||||
|
</button>
|
||||||
|
</view>
|
||||||
|
</su-fixed>
|
||||||
|
|
||||||
|
</view>
|
||||||
</s-layout>
|
</s-layout>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -263,14 +271,12 @@
|
|||||||
title: '待发货'
|
title: '待发货'
|
||||||
}, {
|
}, {
|
||||||
title: '待收货'
|
title: '待收货'
|
||||||
}
|
}, {
|
||||||
, {
|
|
||||||
title: '待评价'
|
title: '待评价'
|
||||||
}
|
}, {
|
||||||
, {
|
|
||||||
title: '已完成'
|
title: '已完成'
|
||||||
}], // 订单状态步骤条
|
}], // 订单状态步骤条
|
||||||
active:0
|
active: 0
|
||||||
});
|
});
|
||||||
|
|
||||||
// ========== 门店自提(核销) ==========
|
// ========== 门店自提(核销) ==========
|
||||||
@ -418,15 +424,15 @@
|
|||||||
|
|
||||||
console.log("打印微信----", state.orderInfo.buttons)
|
console.log("打印微信----", state.orderInfo.buttons)
|
||||||
|
|
||||||
if(res.data.status == 30 && res.data.buttons?.includes('comment')){
|
if (res.data.status == 30 && res.data.buttons?.includes('comment')) {
|
||||||
state.active = 3;
|
state.active = 3;
|
||||||
}else{
|
} else {
|
||||||
switch (res.data.status) {
|
switch (res.data.status) {
|
||||||
case 10:
|
case 10:
|
||||||
state.active = 1;
|
state.active = 1;
|
||||||
break;
|
break;
|
||||||
case 30:
|
case 30:
|
||||||
if(!state.orderInfo.buttons?.includes('comment')){
|
if (!state.orderInfo.buttons?.includes('comment')) {
|
||||||
state.active = 4;
|
state.active = 4;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@ -458,14 +464,18 @@
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
.new-overflow{
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
.new-class {
|
.new-class {
|
||||||
display: flex;
|
display: flex;
|
||||||
// justify-content: center;
|
// justify-content: center;
|
||||||
padding: 11px 29px;
|
padding: 11px 29px;
|
||||||
}
|
}
|
||||||
.new-address{
|
|
||||||
padding-top:30px;
|
.new-address {
|
||||||
padding-left:15px;
|
padding-top: 30px;
|
||||||
|
padding-left: 15px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.score-img {
|
.score-img {
|
||||||
@ -486,7 +496,7 @@
|
|||||||
|
|
||||||
.state-box {
|
.state-box {
|
||||||
color: rgba(#fff, 0.9);
|
color: rgba(#fff, 0.9);
|
||||||
width: 100%;
|
// width: 100%;
|
||||||
// background: v-bind(headerBg) no-repeat,
|
// background: v-bind(headerBg) no-repeat,
|
||||||
// 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: rgba(214, 68, 49);
|
background: rgba(214, 68, 49);
|
||||||
@ -504,7 +514,7 @@
|
|||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
border-radius: 10rpx;
|
border-radius: 10rpx;
|
||||||
// margin: 15px 20rpx 16rpx 20rpx;
|
// margin: 15px 20rpx 16rpx 20rpx;
|
||||||
margin-bottom:10px;
|
margin-bottom: 10px;
|
||||||
padding: 44rpx 0 42rpx 0;
|
padding: 44rpx 0 42rpx 0;
|
||||||
font-size: 30rpx;
|
font-size: 30rpx;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
|
@ -1,495 +1,466 @@
|
|||||||
<!-- 订单列表 -->
|
<!-- 订单列表 -->
|
||||||
<template>
|
<template>
|
||||||
<s-layout title="我的订单">
|
<s-layout title="我的订单">
|
||||||
<su-sticky bgColor="#fff">
|
<su-sticky bgColor="#fff">
|
||||||
<su-tabs
|
<su-tabs :list="tabMaps" :scrollable="false" @change="onTabsChange" :current="state.currentTab" />
|
||||||
:list="tabMaps"
|
</su-sticky>
|
||||||
:scrollable="false"
|
<s-empty v-if="state.pagination.total === 0" icon="/static/order-empty.png" text="暂无订单" />
|
||||||
@change="onTabsChange"
|
<view v-if="state.pagination.total > 0">
|
||||||
:current="state.currentTab"
|
<view class="bg-white order-list-card-box ss-r-10 ss-m-t-14 ss-m-20" v-for="order in state.pagination.list"
|
||||||
/>
|
:key="order.id" @tap="onOrderDetail(order.id)">
|
||||||
</su-sticky>
|
<view class="order-card-header ss-flex ss-col-center ss-row-between ss-p-x-20">
|
||||||
<s-empty v-if="state.pagination.total === 0" icon="/static/order-empty.png" text="暂无订单" />
|
<view class="order-no">订单号:{{ order.no }}</view>
|
||||||
<view v-if="state.pagination.total > 0">
|
<view class="order-state ss-font-26" :class="formatOrderColor(order)">
|
||||||
<view
|
{{ formatOrderStatus(order) }}
|
||||||
class="bg-white order-list-card-box ss-r-10 ss-m-t-14 ss-m-20"
|
</view>
|
||||||
v-for="order in state.pagination.list"
|
</view>
|
||||||
:key="order.id"
|
<view class="border-bottom" v-for="item in order.items" :key="item.id">
|
||||||
@tap="onOrderDetail(order.id)"
|
<s-goods-item :img="item.picUrl" :title="item.spuName"
|
||||||
>
|
:skuText="item.properties.map((property) => property.valueName).join(' ')" :price="item.price"
|
||||||
<view class="order-card-header ss-flex ss-col-center ss-row-between ss-p-x-20">
|
:num="item.count" />
|
||||||
<view class="order-no">订单号:{{ order.no }}</view>
|
</view>
|
||||||
<view class="order-state ss-font-26" :class="formatOrderColor(order)">
|
<view class="pay-box ss-m-t-30 ss-flex ss-row-right ss-p-r-20">
|
||||||
{{ formatOrderStatus(order) }}
|
<view class="ss-flex ss-col-center">
|
||||||
</view>
|
<view class="discounts-title pay-color">共 {{ order.productCount }} 件商品,总金额:</view>
|
||||||
</view>
|
<view class="discounts-money pay-color"> ¥{{ fen2yuan(order.payPrice) }} </view>
|
||||||
<view class="border-bottom" v-for="item in order.items" :key="item.id">
|
</view>
|
||||||
<s-goods-item
|
</view>
|
||||||
:img="item.picUrl"
|
<view class="order-card-footer ss-flex ss-col-center ss-p-x-20"
|
||||||
:title="item.spuName"
|
:class="order.buttons.length > 3 ? 'ss-row-between' : 'ss-row-right'">
|
||||||
:skuText="item.properties.map((property) => property.valueName).join(' ')"
|
<view class="ss-flex ss-col-center">
|
||||||
:price="item.price"
|
<button v-if="order.buttons.includes('combination')" class="tool-btn ss-reset-button"
|
||||||
:num="item.count"
|
@tap.stop="onOrderGroupon(order)">
|
||||||
/>
|
拼团详情
|
||||||
</view>
|
</button>
|
||||||
<view class="pay-box ss-m-t-30 ss-flex ss-row-right ss-p-r-20">
|
<button v-if="order.buttons.length === 0" class="tool-btn ss-reset-button"
|
||||||
<view class="ss-flex ss-col-center">
|
@tap.stop="onOrderDetail(order.id)">
|
||||||
<view class="discounts-title pay-color"
|
查看详情
|
||||||
>共 {{ order.productCount }} 件商品,总金额:</view
|
</button>
|
||||||
>
|
<button v-if="order.buttons.includes('confirm')" class="tool-btn ss-reset-button"
|
||||||
<view class="discounts-money pay-color"> ¥{{ fen2yuan(order.payPrice) }} </view>
|
@tap.stop="onConfirm(order)">
|
||||||
</view>
|
确认收货
|
||||||
</view>
|
</button>
|
||||||
<view
|
<button v-if="order.buttons.includes('express')" class="tool-btn ss-reset-button"
|
||||||
class="order-card-footer ss-flex ss-col-center ss-p-x-20"
|
@tap.stop="onExpress(order.id)">
|
||||||
:class="order.buttons.length > 3 ? 'ss-row-between' : 'ss-row-right'"
|
查看物流
|
||||||
>
|
</button>
|
||||||
<view class="ss-flex ss-col-center">
|
<button v-if="order.buttons.includes('cancel')" class="tool-btn ss-reset-button"
|
||||||
<button
|
@tap.stop="onCancel(order.id)">
|
||||||
v-if="order.buttons.includes('combination')"
|
取消订单
|
||||||
class="tool-btn ss-reset-button"
|
</button>
|
||||||
@tap.stop="onOrderGroupon(order)"
|
<button v-if="order.buttons.includes('comment')" class="tool-btn ss-reset-button"
|
||||||
>
|
@tap.stop="onComment(order.id)">
|
||||||
拼团详情
|
评价
|
||||||
</button>
|
</button>
|
||||||
<button
|
<button v-if="order.buttons.includes('delete')" class="delete-btn ss-reset-button"
|
||||||
v-if="order.buttons.length === 0"
|
@tap.stop="onDelete(order.id)">
|
||||||
class="tool-btn ss-reset-button"
|
删除订单
|
||||||
@tap.stop="onOrderDetail(order.id)"
|
</button>
|
||||||
>
|
<button v-if="order.buttons.includes('pay')"
|
||||||
查看详情
|
class="tool-btn ss-reset-button ui-BG-Main-Gradient" @tap.stop="onPay(order.payOrderId)">
|
||||||
</button>
|
继续支付
|
||||||
<button
|
</button>
|
||||||
v-if="order.buttons.includes('confirm')"
|
</view>
|
||||||
class="tool-btn ss-reset-button"
|
</view>
|
||||||
@tap.stop="onConfirm(order)"
|
</view>
|
||||||
>
|
</view>
|
||||||
确认收货
|
|
||||||
</button>
|
|
||||||
<button
|
|
||||||
v-if="order.buttons.includes('express')"
|
|
||||||
class="tool-btn ss-reset-button"
|
|
||||||
@tap.stop="onExpress(order.id)"
|
|
||||||
>
|
|
||||||
查看物流
|
|
||||||
</button>
|
|
||||||
<button
|
|
||||||
v-if="order.buttons.includes('cancel')"
|
|
||||||
class="tool-btn ss-reset-button"
|
|
||||||
@tap.stop="onCancel(order.id)"
|
|
||||||
>
|
|
||||||
取消订单
|
|
||||||
</button>
|
|
||||||
<button
|
|
||||||
v-if="order.buttons.includes('comment')"
|
|
||||||
class="tool-btn ss-reset-button"
|
|
||||||
@tap.stop="onComment(order.id)"
|
|
||||||
>
|
|
||||||
评价
|
|
||||||
</button>
|
|
||||||
<button
|
|
||||||
v-if="order.buttons.includes('delete')"
|
|
||||||
class="delete-btn ss-reset-button"
|
|
||||||
@tap.stop="onDelete(order.id)"
|
|
||||||
>
|
|
||||||
删除订单
|
|
||||||
</button>
|
|
||||||
<button
|
|
||||||
v-if="order.buttons.includes('pay')"
|
|
||||||
class="tool-btn ss-reset-button ui-BG-Main-Gradient"
|
|
||||||
@tap.stop="onPay(order.payOrderId)"
|
|
||||||
>
|
|
||||||
继续支付
|
|
||||||
</button>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
|
|
||||||
<!-- 加载更多 -->
|
<!-- 加载更多 -->
|
||||||
<uni-load-more
|
<uni-load-more v-if="state.pagination.total > 0" :status="state.loadStatus" :content-text="{
|
||||||
v-if="state.pagination.total > 0"
|
|
||||||
:status="state.loadStatus"
|
|
||||||
:content-text="{
|
|
||||||
contentdown: '上拉加载更多',
|
contentdown: '上拉加载更多',
|
||||||
}"
|
}" @tap="loadMore" />
|
||||||
@tap="loadMore"
|
</s-layout>
|
||||||
/>
|
|
||||||
</s-layout>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { reactive } from 'vue';
|
import {
|
||||||
import { onLoad, onReachBottom, onPullDownRefresh } from '@dcloudio/uni-app';
|
reactive
|
||||||
import {
|
} from 'vue';
|
||||||
fen2yuan,
|
import {
|
||||||
formatOrderColor,
|
onLoad,
|
||||||
formatOrderStatus,
|
onReachBottom,
|
||||||
handleOrderButtons,
|
onPullDownRefresh
|
||||||
} from '@/sheep/hooks/useGoods';
|
} from '@dcloudio/uni-app';
|
||||||
import sheep from '@/sheep';
|
import {
|
||||||
import _ from 'lodash';
|
fen2yuan,
|
||||||
import { isEmpty } from 'lodash';
|
formatOrderColor,
|
||||||
import OrderApi from '@/sheep/api/trade/order';
|
formatOrderStatus,
|
||||||
import { resetPagination } from '@/sheep/util';
|
handleOrderButtons,
|
||||||
|
} from '@/sheep/hooks/useGoods';
|
||||||
|
import sheep from '@/sheep';
|
||||||
|
import _ from 'lodash';
|
||||||
|
import {
|
||||||
|
isEmpty
|
||||||
|
} from 'lodash';
|
||||||
|
import OrderApi from '@/sheep/api/trade/order';
|
||||||
|
import {
|
||||||
|
resetPagination
|
||||||
|
} from '@/sheep/util';
|
||||||
|
|
||||||
// 数据
|
// 数据
|
||||||
const state = reactive({
|
const state = reactive({
|
||||||
currentTab: 0, // 选中的 tabMaps 下标
|
currentTab: 0, // 选中的 tabMaps 下标
|
||||||
pagination: {
|
pagination: {
|
||||||
list: [],
|
list: [],
|
||||||
total: 0,
|
total: 0,
|
||||||
pageNo: 1,
|
pageNo: 1,
|
||||||
pageSize: 5,
|
pageSize: 5,
|
||||||
},
|
},
|
||||||
loadStatus: '',
|
loadStatus: '',
|
||||||
});
|
});
|
||||||
|
|
||||||
const tabMaps = [
|
const tabMaps = [{
|
||||||
{
|
name: '全部',
|
||||||
name: '全部',
|
},
|
||||||
},
|
{
|
||||||
{
|
name: '待付款',
|
||||||
name: '待付款',
|
value: 0,
|
||||||
value: 0,
|
},
|
||||||
},
|
{
|
||||||
{
|
name: '待发货',
|
||||||
name: '待发货',
|
value: 10,
|
||||||
value: 10,
|
},
|
||||||
},
|
{
|
||||||
{
|
name: '待收货',
|
||||||
name: '待收货',
|
value: 20,
|
||||||
value: 20,
|
},
|
||||||
},
|
{
|
||||||
{
|
name: '待评价',
|
||||||
name: '待评价',
|
value: 30,
|
||||||
value: 30,
|
},
|
||||||
},
|
];
|
||||||
];
|
|
||||||
|
|
||||||
// 切换选项卡
|
// 切换选项卡
|
||||||
function onTabsChange(e) {
|
function onTabsChange(e) {
|
||||||
if (state.currentTab === e.index) {
|
if (state.currentTab === e.index) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// 重头加载代码
|
// 重头加载代码
|
||||||
resetPagination(state.pagination);
|
resetPagination(state.pagination);
|
||||||
state.currentTab = e.index;
|
state.currentTab = e.index;
|
||||||
getOrderList();
|
getOrderList();
|
||||||
}
|
}
|
||||||
|
|
||||||
// 订单详情
|
// 订单详情
|
||||||
function onOrderDetail(id) {
|
function onOrderDetail(id) {
|
||||||
sheep.$router.go('/pages/order/detail', {
|
sheep.$router.go('/pages/order/detail', {
|
||||||
id,
|
id,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
// 跳转拼团记录的详情
|
// 跳转拼团记录的详情
|
||||||
function onOrderGroupon(order) {
|
function onOrderGroupon(order) {
|
||||||
sheep.$router.go('/pages/activity/groupon/detail', {
|
sheep.$router.go('/pages/activity/groupon/detail', {
|
||||||
id: order.combinationRecordId,
|
id: order.combinationRecordId,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
// 继续支付
|
// 继续支付
|
||||||
function onPay(payOrderId) {
|
function onPay(payOrderId) {
|
||||||
sheep.$router.go('/pages/pay/index', {
|
sheep.$router.go('/pages/pay/index', {
|
||||||
id: payOrderId,
|
id: payOrderId,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
// 评价
|
// 评价
|
||||||
function onComment(id) {
|
function onComment(id) {
|
||||||
sheep.$router.go('/pages/goods/comment/add', {
|
sheep.$router.go('/pages/goods/comment/add', {
|
||||||
id,
|
id,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
// 确认收货 TODO 芋艿:待测试
|
// 确认收货 TODO 芋艿:待测试
|
||||||
async function onConfirm(order, ignore = false) {
|
async function onConfirm(order, ignore = false) {
|
||||||
// 需开启确认收货组件
|
// 需开启确认收货组件
|
||||||
// todo: 芋艿:需要后续接入微信收货组件
|
// todo: 芋艿:需要后续接入微信收货组件
|
||||||
// 1.怎么检测是否开启了发货组件功能?如果没有开启的话就不能在这里return出去
|
// 1.怎么检测是否开启了发货组件功能?如果没有开启的话就不能在这里return出去
|
||||||
// 2.如果开启了走mpConfirm方法,需要在App.vue的show方法中拿到确认收货结果
|
// 2.如果开启了走mpConfirm方法,需要在App.vue的show方法中拿到确认收货结果
|
||||||
let isOpenBusinessView = true;
|
let isOpenBusinessView = true;
|
||||||
if (
|
if (
|
||||||
sheep.$platform.name === 'WechatMiniProgram' &&
|
sheep.$platform.name === 'WechatMiniProgram' &&
|
||||||
!isEmpty(order.wechat_extra_data) &&
|
!isEmpty(order.wechat_extra_data) &&
|
||||||
isOpenBusinessView &&
|
isOpenBusinessView &&
|
||||||
!ignore
|
!ignore
|
||||||
) {
|
) {
|
||||||
mpConfirm(order);
|
mpConfirm(order);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 正常的确认收货流程
|
// 正常的确认收货流程
|
||||||
const { code } = await OrderApi.receiveOrder(order.id);
|
const {
|
||||||
if (code === 0) {
|
code
|
||||||
resetPagination(state.pagination);
|
} = await OrderApi.receiveOrder(order.id);
|
||||||
await getOrderList();
|
if (code === 0) {
|
||||||
}
|
resetPagination(state.pagination);
|
||||||
}
|
await getOrderList();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// #ifdef MP-WEIXIN
|
// #ifdef MP-WEIXIN
|
||||||
// 小程序确认收货组件 TODO 芋艿:后续再接入
|
// 小程序确认收货组件 TODO 芋艿:后续再接入
|
||||||
function mpConfirm(order) {
|
function mpConfirm(order) {
|
||||||
if (!wx.openBusinessView) {
|
if (!wx.openBusinessView) {
|
||||||
sheep.$helper.toast(`请升级微信版本`);
|
sheep.$helper.toast(`请升级微信版本`);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
wx.openBusinessView({
|
wx.openBusinessView({
|
||||||
businessType: 'weappOrderConfirm',
|
businessType: 'weappOrderConfirm',
|
||||||
extraData: {
|
extraData: {
|
||||||
merchant_id: '1481069012',
|
merchant_id: '1481069012',
|
||||||
merchant_trade_no: order.wechat_extra_data.merchant_trade_no,
|
merchant_trade_no: order.wechat_extra_data.merchant_trade_no,
|
||||||
transaction_id: order.wechat_extra_data.transaction_id,
|
transaction_id: order.wechat_extra_data.transaction_id,
|
||||||
},
|
},
|
||||||
success(response) {
|
success(response) {
|
||||||
console.log('success:', response);
|
console.log('success:', response);
|
||||||
if (response.errMsg === 'openBusinessView:ok') {
|
if (response.errMsg === 'openBusinessView:ok') {
|
||||||
if (response.extraData.status === 'success') {
|
if (response.extraData.status === 'success') {
|
||||||
onConfirm(order, true);
|
onConfirm(order, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
fail(error) {
|
fail(error) {
|
||||||
console.log('error:', error);
|
console.log('error:', error);
|
||||||
},
|
},
|
||||||
complete(result) {
|
complete(result) {
|
||||||
console.log('result:', result);
|
console.log('result:', result);
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
// #endif
|
// #endif
|
||||||
|
|
||||||
// 查看物流
|
// 查看物流
|
||||||
async function onExpress(id) {
|
async function onExpress(id) {
|
||||||
sheep.$router.go('/pages/order/express/log', {
|
sheep.$router.go('/pages/order/express/log', {
|
||||||
id,
|
id,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
// 取消订单
|
// 取消订单
|
||||||
async function onCancel(orderId) {
|
async function onCancel(orderId) {
|
||||||
uni.showModal({
|
uni.showModal({
|
||||||
title: '提示',
|
title: '提示',
|
||||||
content: '确定要取消订单吗?',
|
content: '确定要取消订单吗?',
|
||||||
success: async function (res) {
|
success: async function(res) {
|
||||||
if (!res.confirm) {
|
if (!res.confirm) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const { code } = await OrderApi.cancelOrder(orderId);
|
const {
|
||||||
if (code === 0) {
|
code
|
||||||
// 修改数据的状态
|
} = await OrderApi.cancelOrder(orderId);
|
||||||
let index = state.pagination.list.findIndex((order) => order.id === orderId);
|
if (code === 0) {
|
||||||
const orderInfo = state.pagination.list[index];
|
// 修改数据的状态
|
||||||
orderInfo.status = 40;
|
let index = state.pagination.list.findIndex((order) => order.id === orderId);
|
||||||
handleOrderButtons(orderInfo);
|
const orderInfo = state.pagination.list[index];
|
||||||
}
|
orderInfo.status = 40;
|
||||||
},
|
handleOrderButtons(orderInfo);
|
||||||
});
|
}
|
||||||
}
|
},
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
// 删除订单
|
// 删除订单
|
||||||
function onDelete(orderId) {
|
function onDelete(orderId) {
|
||||||
uni.showModal({
|
uni.showModal({
|
||||||
title: '提示',
|
title: '提示',
|
||||||
content: '确定要删除订单吗?',
|
content: '确定要删除订单吗?',
|
||||||
success: async function (res) {
|
success: async function(res) {
|
||||||
if (res.confirm) {
|
if (res.confirm) {
|
||||||
const { code } = await OrderApi.deleteOrder(orderId);
|
const {
|
||||||
if (code === 0) {
|
code
|
||||||
// 删除数据
|
} = await OrderApi.deleteOrder(orderId);
|
||||||
let index = state.pagination.list.findIndex((order) => order.id === orderId);
|
if (code === 0) {
|
||||||
state.pagination.list.splice(index, 1);
|
// 删除数据
|
||||||
}
|
let index = state.pagination.list.findIndex((order) => order.id === orderId);
|
||||||
}
|
state.pagination.list.splice(index, 1);
|
||||||
},
|
}
|
||||||
});
|
}
|
||||||
}
|
},
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
// 获取订单列表
|
// 获取订单列表
|
||||||
async function getOrderList() {
|
async function getOrderList() {
|
||||||
state.loadStatus = 'loading';
|
state.loadStatus = 'loading';
|
||||||
let { code, data } = await OrderApi.getOrderPage({
|
let {
|
||||||
pageNo: state.pagination.pageNo,
|
code,
|
||||||
pageSize: state.pagination.pageSize,
|
data
|
||||||
status: tabMaps[state.currentTab].value,
|
} = await OrderApi.getOrderPage({
|
||||||
commentStatus: tabMaps[state.currentTab].value === 30 ? false : null,
|
pageNo: state.pagination.pageNo,
|
||||||
});
|
pageSize: state.pagination.pageSize,
|
||||||
if (code !== 0) {
|
status: tabMaps[state.currentTab].value,
|
||||||
return;
|
commentStatus: tabMaps[state.currentTab].value === 30 ? false : null,
|
||||||
}
|
});
|
||||||
data.list.forEach((order) => handleOrderButtons(order));
|
if (code !== 0) {
|
||||||
state.pagination.list = _.concat(state.pagination.list, data.list);
|
return;
|
||||||
state.pagination.total = data.total;
|
}
|
||||||
state.loadStatus = state.pagination.list.length < state.pagination.total ? 'more' : 'noMore';
|
data.list.forEach((order) => handleOrderButtons(order));
|
||||||
}
|
state.pagination.list = _.concat(state.pagination.list, data.list);
|
||||||
|
state.pagination.total = data.total;
|
||||||
|
state.loadStatus = state.pagination.list.length < state.pagination.total ? 'more' : 'noMore';
|
||||||
|
}
|
||||||
|
|
||||||
onLoad(async (options) => {
|
onLoad(async (options) => {
|
||||||
if (options.type) {
|
if (options.type) {
|
||||||
state.currentTab = options.type;
|
state.currentTab = options.type;
|
||||||
}
|
}
|
||||||
await getOrderList();
|
await getOrderList();
|
||||||
});
|
});
|
||||||
|
|
||||||
// 加载更多
|
// 加载更多
|
||||||
function loadMore() {
|
function loadMore() {
|
||||||
if (state.loadStatus === 'noMore') {
|
if (state.loadStatus === 'noMore') {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
state.pagination.pageNo++;
|
state.pagination.pageNo++;
|
||||||
getOrderList();
|
getOrderList();
|
||||||
}
|
}
|
||||||
|
|
||||||
// 上拉加载更多
|
// 上拉加载更多
|
||||||
onReachBottom(() => {
|
onReachBottom(() => {
|
||||||
loadMore();
|
loadMore();
|
||||||
});
|
});
|
||||||
|
|
||||||
// 下拉刷新
|
// 下拉刷新
|
||||||
onPullDownRefresh(() => {
|
onPullDownRefresh(() => {
|
||||||
resetPagination(state.pagination);
|
resetPagination(state.pagination);
|
||||||
getOrderList();
|
getOrderList();
|
||||||
setTimeout(function () {
|
setTimeout(function() {
|
||||||
uni.stopPullDownRefresh();
|
uni.stopPullDownRefresh();
|
||||||
}, 800);
|
}, 800);
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.score-img {
|
.score-img {
|
||||||
width: 36rpx;
|
width: 36rpx;
|
||||||
height: 36rpx;
|
height: 36rpx;
|
||||||
margin: 0 4rpx;
|
margin: 0 4rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.tool-btn {
|
.tool-btn {
|
||||||
width: 160rpx;
|
width: 160rpx;
|
||||||
height: 60rpx;
|
height: 60rpx;
|
||||||
background: #f6f6f6;
|
background: #f6f6f6;
|
||||||
font-size: 26rpx;
|
font-size: 26rpx;
|
||||||
border-radius: 30rpx;
|
border-radius: 30rpx;
|
||||||
margin-right: 10rpx;
|
margin-right: 10rpx;
|
||||||
|
|
||||||
&:last-of-type {
|
&:last-of-type {
|
||||||
margin-right: 0;
|
margin-right: 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.delete-btn {
|
.delete-btn {
|
||||||
width: 160rpx;
|
width: 160rpx;
|
||||||
height: 56rpx;
|
height: 56rpx;
|
||||||
color: #ff3000;
|
color: #ff3000;
|
||||||
background: #fee;
|
background: #fee;
|
||||||
border-radius: 28rpx;
|
border-radius: 28rpx;
|
||||||
font-size: 26rpx;
|
font-size: 26rpx;
|
||||||
margin-right: 10rpx;
|
margin-right: 10rpx;
|
||||||
line-height: normal;
|
line-height: normal;
|
||||||
|
|
||||||
&:last-of-type {
|
&:last-of-type {
|
||||||
margin-right: 0;
|
margin-right: 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.apply-btn {
|
.apply-btn {
|
||||||
width: 140rpx;
|
width: 140rpx;
|
||||||
height: 50rpx;
|
height: 50rpx;
|
||||||
border-radius: 25rpx;
|
border-radius: 25rpx;
|
||||||
font-size: 24rpx;
|
font-size: 24rpx;
|
||||||
border: 2rpx solid #dcdcdc;
|
border: 2rpx solid #dcdcdc;
|
||||||
line-height: normal;
|
line-height: normal;
|
||||||
margin-left: 16rpx;
|
margin-left: 16rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.swiper-box {
|
.swiper-box {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
|
|
||||||
.swiper-item {
|
.swiper-item {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.order-list-card-box {
|
.order-list-card-box {
|
||||||
.order-card-header {
|
.order-card-header {
|
||||||
height: 80rpx;
|
height: 80rpx;
|
||||||
|
|
||||||
.order-no {
|
.order-no {
|
||||||
font-size: 26rpx;
|
font-size: 26rpx;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
}
|
}
|
||||||
|
|
||||||
.order-state {
|
.order-state {}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
.pay-box {
|
.pay-box {
|
||||||
.discounts-title {
|
.discounts-title {
|
||||||
font-size: 24rpx;
|
font-size: 24rpx;
|
||||||
line-height: normal;
|
line-height: normal;
|
||||||
color: #999999;
|
color: #999999;
|
||||||
}
|
}
|
||||||
|
|
||||||
.discounts-money {
|
.discounts-money {
|
||||||
font-size: 24rpx;
|
font-size: 24rpx;
|
||||||
line-height: normal;
|
line-height: normal;
|
||||||
color: #999;
|
color: #999;
|
||||||
font-family: OPPOSANS;
|
font-family: OPPOSANS;
|
||||||
}
|
}
|
||||||
|
|
||||||
.pay-color {
|
.pay-color {
|
||||||
color: #333;
|
color: #333;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.order-card-footer {
|
.order-card-footer {
|
||||||
height: 100rpx;
|
height: 100rpx;
|
||||||
|
|
||||||
.more-item-box {
|
.more-item-box {
|
||||||
padding: 20rpx;
|
padding: 20rpx;
|
||||||
|
|
||||||
.more-item {
|
.more-item {
|
||||||
height: 60rpx;
|
height: 60rpx;
|
||||||
|
|
||||||
.title {
|
.title {
|
||||||
font-size: 26rpx;
|
font-size: 26rpx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.more-btn {
|
.more-btn {
|
||||||
color: $dark-9;
|
color: $dark-9;
|
||||||
font-size: 24rpx;
|
font-size: 24rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.content {
|
.content {
|
||||||
width: 154rpx;
|
width: 154rpx;
|
||||||
color: #333333;
|
color: #333333;
|
||||||
font-size: 26rpx;
|
font-size: 26rpx;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
:deep(.uni-tooltip-popup) {
|
:deep(.uni-tooltip-popup) {
|
||||||
background: var(--ui-BG);
|
background: var(--ui-BG);
|
||||||
}
|
}
|
||||||
|
|
||||||
.warning-color {
|
.warning-color {
|
||||||
color: #faad14;
|
color: #faad14;
|
||||||
}
|
}
|
||||||
|
|
||||||
.danger-color {
|
.danger-color {
|
||||||
color: #ff3000;
|
color: #ff3000;
|
||||||
}
|
}
|
||||||
|
|
||||||
.success-color {
|
.success-color {
|
||||||
color: #52c41a;
|
color: #52c41a;
|
||||||
}
|
}
|
||||||
|
|
||||||
.info-color {
|
.info-color {
|
||||||
color: #999999;
|
color: #999999;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
@ -51,7 +51,7 @@
|
|||||||
<image @tap.stop="showMaoLocation(item)" style="margin-right:10px;"
|
<image @tap.stop="showMaoLocation(item)" style="margin-right:10px;"
|
||||||
src="https://zysc.fjptzykj.com:3000/shangcheng/c7362f85726ef0030b407f1c3749c710ca0caa51fee5cc8ffbb64e11226354a8.png"
|
src="https://zysc.fjptzykj.com:3000/shangcheng/c7362f85726ef0030b407f1c3749c710ca0caa51fee5cc8ffbb64e11226354a8.png"
|
||||||
class="img"></image>
|
class="img"></image>
|
||||||
<image @click="call(item.phone)"
|
<image @click.stop="call(item.phone)"
|
||||||
src="https://zysc.fjptzykj.com:3000/shangcheng/535ee6f79e04d4b6e46fcfa59ed052f214ad6ab756c340c0c040e68357f68e9a.png"
|
src="https://zysc.fjptzykj.com:3000/shangcheng/535ee6f79e04d4b6e46fcfa59ed052f214ad6ab756c340c0c040e68357f68e9a.png"
|
||||||
class="img"></image>
|
class="img"></image>
|
||||||
</view>
|
</view>
|
||||||
|
@ -134,6 +134,7 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<!-- <navigator class="button" hover-class="none" open-type='switchTab'>去获取</navigator> -->
|
<!-- <navigator class="button" hover-class="none" open-type='switchTab'>去获取</navigator> -->
|
||||||
|
<view class="button" @click="sheep.$router.redirect('/pages/index/category')">去获取</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
@ -67,7 +67,7 @@
|
|||||||
:class="valVip == index ? 'on' : ''" v-for="(item,index) in vipList" :key="index">
|
:class="valVip == index ? 'on' : ''" v-for="(item,index) in vipList" :key="index">
|
||||||
<view class="t">{{item.name}}</view>
|
<view class="t">{{item.name}}</view>
|
||||||
<view class="c">¥<text class="tx">{{item.specialPrice}}</text></view>
|
<view class="c">¥<text class="tx">{{item.specialPrice}}</text></view>
|
||||||
<view class="b" v-if="index==0">试用1天</view>
|
<view class="b" v-if="item.name=='试用'">试用1天</view>
|
||||||
<view class="b sc" v-else>¥{{item.originalPrice}}</view>
|
<view class="b sc" v-else>¥{{item.originalPrice}}</view>
|
||||||
</view>
|
</view>
|
||||||
</scroll-view>
|
</scroll-view>
|
||||||
|
@ -70,8 +70,8 @@
|
|||||||
<view v-if="type === 'UserOrder'" class="new-huiy" @click="
|
<view v-if="type === 'UserOrder'" class="new-huiy" @click="
|
||||||
sheep.$router.go('/pages/user/user_vip/list')
|
sheep.$router.go('/pages/user/user_vip/list')
|
||||||
">
|
">
|
||||||
<view class="new-button" v-if="userInfo.activate">已开通</view>
|
<view class="new-button" v-if="userInfo.activate && userInfo.activate != 4">已开通</view>
|
||||||
<view class="new-button" v-if="userInfo.activate == 0">立即开通</view>
|
<view class="new-button" v-if="userInfo.activate == 0 || userInfo.activate == 4">立即开通</view>
|
||||||
<image class="seckill1" mode="aspectFit"
|
<image class="seckill1" mode="aspectFit"
|
||||||
src="https://zysc.fjptzykj.com:3000/shangcheng/64776e2edc3c2f15295e7c3976ba301e08f9170f99a2e845d8f33bd65179b177.png" />
|
src="https://zysc.fjptzykj.com:3000/shangcheng/64776e2edc3c2f15295e7c3976ba301e08f9170f99a2e845d8f33bd65179b177.png" />
|
||||||
</view>
|
</view>
|
||||||
|
@ -43,16 +43,16 @@
|
|||||||
<view v-if="layoutType === LayoutTypeEnum.TWO_COL && state.goodsList.length"
|
<view v-if="layoutType === LayoutTypeEnum.TWO_COL && state.goodsList.length"
|
||||||
class="goods-md-wrap ss-flex ss-flex-wrap ss-col-top">
|
class="goods-md-wrap ss-flex ss-flex-wrap ss-col-top">
|
||||||
<view class="goods-list-box">
|
<view class="goods-list-box">
|
||||||
<!-- <view class="left-list" :style="[{ paddingRight: data.space + 'rpx', marginBottom: data.space + 'px' }]"
|
|
||||||
v-for="item in state.leftGoodsList" :key="item.id"> -->
|
|
||||||
<view class="left-list" :style="[{ paddingRight: data.space + 'rpx', marginBottom: data.space + 'px' }]"
|
<view class="left-list" :style="[{ paddingRight: data.space + 'rpx', marginBottom: data.space + 'px' }]"
|
||||||
v-for="item in state.goodsList" :key="item.id">
|
v-for="item in state.leftGoodsList" :key="item.id">
|
||||||
|
<!-- <view class="left-list" :style="[{ paddingRight: data.space + 'rpx', marginBottom: data.space + 'px' }]"
|
||||||
|
v-for="item in state.goodsList" :key="item.id"> -->
|
||||||
<s-goods-column class="goods-md-box" size="md" :goodsFields="data.fields" :tagStyle="data.badge"
|
<s-goods-column class="goods-md-box" size="md" :goodsFields="data.fields" :tagStyle="data.badge"
|
||||||
:data="item" :titleColor="data.fields.name?.color"
|
:data="item" :titleColor="data.fields.name?.color"
|
||||||
:subTitleColor="data.fields.introduction.color" :topRadius="data.borderRadiusTop"
|
:subTitleColor="data.fields.introduction.color" :topRadius="data.borderRadiusTop"
|
||||||
:bottomRadius="data.borderRadiusBottom" :titleWidth="330 - marginLeft - marginRight"
|
:bottomRadius="data.borderRadiusBottom" :titleWidth="330 - marginLeft - marginRight"
|
||||||
@click="sheep.$router.go('/pages/goods/index', { id: item.id })"
|
@click="sheep.$router.go('/pages/goods/index', { id: item.id })"
|
||||||
@getHeight="calculateGoodsColumn($event, 'left')">
|
>
|
||||||
<!-- 购买按钮 -->
|
<!-- 购买按钮 -->
|
||||||
<template v-slot:cart>
|
<template v-slot:cart>
|
||||||
<button class="ss-reset-button cart-btn" :style="[buyStyle]">
|
<button class="ss-reset-button cart-btn" :style="[buyStyle]">
|
||||||
@ -62,7 +62,7 @@
|
|||||||
</s-goods-column>
|
</s-goods-column>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<!-- <view class="goods-list-box">
|
<view class="goods-list-box">
|
||||||
<view class="right-list" :style="[{ paddingLeft: data.space + 'rpx', marginBottom: data.space + 'px' }]"
|
<view class="right-list" :style="[{ paddingLeft: data.space + 'rpx', marginBottom: data.space + 'px' }]"
|
||||||
v-for="item in state.rightGoodsList" :key="item.id">
|
v-for="item in state.rightGoodsList" :key="item.id">
|
||||||
<s-goods-column class="goods-md-box" size="md" :goodsFields="data.fields" :tagStyle="data.badge"
|
<s-goods-column class="goods-md-box" size="md" :goodsFields="data.fields" :tagStyle="data.badge"
|
||||||
@ -70,7 +70,7 @@
|
|||||||
:subTitleColor="data.fields.introduction.color" :topRadius="data.borderRadiusTop"
|
:subTitleColor="data.fields.introduction.color" :topRadius="data.borderRadiusTop"
|
||||||
:bottomRadius="data.borderRadiusBottom" :titleWidth="330 - marginLeft - marginRight"
|
:bottomRadius="data.borderRadiusBottom" :titleWidth="330 - marginLeft - marginRight"
|
||||||
@click="sheep.$router.go('/pages/goods/index', { id: item.id })"
|
@click="sheep.$router.go('/pages/goods/index', { id: item.id })"
|
||||||
@getHeight="calculateGoodsColumn($event, 'right')">
|
>
|
||||||
<template v-slot:cart>
|
<template v-slot:cart>
|
||||||
<button class="ss-reset-button cart-btn" :style="[buyStyle]">
|
<button class="ss-reset-button cart-btn" :style="[buyStyle]">
|
||||||
{{ btnBuy.type === 'text' ? btnBuy.text : '' }}
|
{{ btnBuy.type === 'text' ? btnBuy.text : '' }}
|
||||||
@ -78,7 +78,7 @@
|
|||||||
</template>
|
</template>
|
||||||
</s-goods-column>
|
</s-goods-column>
|
||||||
</view>
|
</view>
|
||||||
</view> -->
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- 布局3. 单列小图(左图,右内容) -->
|
<!-- 布局3. 单列小图(左图,右内容) -->
|
||||||
@ -135,7 +135,8 @@
|
|||||||
goodsList: [],
|
goodsList: [],
|
||||||
leftGoodsList: [],
|
leftGoodsList: [],
|
||||||
rightGoodsList: [],
|
rightGoodsList: [],
|
||||||
isShow:'recommendNew'
|
isShow:'recommendNew',
|
||||||
|
count:0
|
||||||
});
|
});
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
data: {
|
data: {
|
||||||
@ -183,7 +184,7 @@
|
|||||||
|
|
||||||
//region 商品瀑布流布局
|
//region 商品瀑布流布局
|
||||||
// 下一个要处理的商品索引
|
// 下一个要处理的商品索引
|
||||||
let count = 3;
|
// let count = 0;
|
||||||
// 左列的高度
|
// 左列的高度
|
||||||
let leftHeight = 0;
|
let leftHeight = 0;
|
||||||
// 右列的高度
|
// 右列的高度
|
||||||
@ -194,20 +195,22 @@
|
|||||||
* @param height 商品的高度
|
* @param height 商品的高度
|
||||||
* @param where 添加到哪一列
|
* @param where 添加到哪一列
|
||||||
*/
|
*/
|
||||||
function calculateGoodsColumn(height = 0, where = 'left') {
|
function calculateGoodsColumn() {
|
||||||
// 处理完
|
// 处理完
|
||||||
if (!state.goodsList[count]) return;
|
// if (!state.goodsList[state.count]) return;
|
||||||
|
|
||||||
// 增加列的高度
|
// 增加列的高度
|
||||||
if (where === 'left') leftHeight += height;
|
// if (where === 'left') leftHeight += height;
|
||||||
if (where === 'right') rightHeight += height;
|
// if (where === 'right') rightHeight += height;
|
||||||
// 添加到矮的一列
|
// 添加到矮的一列
|
||||||
if (leftHeight <= rightHeight) {
|
if (state.count % 2 == 0) {
|
||||||
state.leftGoodsList.push(state.goodsList[count]);
|
state.leftGoodsList.push(state.goodsList[state.count]);
|
||||||
} else {
|
} else {
|
||||||
state.rightGoodsList.push(state.goodsList[count]);
|
state.rightGoodsList.push(state.goodsList[state.count]);
|
||||||
}
|
}
|
||||||
|
// console.log();
|
||||||
// 计数
|
// 计数
|
||||||
count++;
|
state.count++;
|
||||||
}
|
}
|
||||||
//endregion
|
//endregion
|
||||||
|
|
||||||
@ -240,20 +243,25 @@
|
|||||||
},
|
},
|
||||||
}).then((res) => {
|
}).then((res) => {
|
||||||
// 分列
|
// 分列
|
||||||
count=0;
|
|
||||||
leftHeight = 0;
|
leftHeight = 0;
|
||||||
rightHeight = 0;
|
rightHeight = 0;
|
||||||
state.goodsList = [];
|
// state.goodsList = [];
|
||||||
state.goodsList = res.data;
|
state.goodsList = res.data;
|
||||||
|
|
||||||
|
state.count = 0
|
||||||
|
// console.log(state.goodsList,"-----state.goodsList")
|
||||||
state.leftGoodsList = []
|
state.leftGoodsList = []
|
||||||
state.rightGoodsList = []
|
state.rightGoodsList = []
|
||||||
calculateGoodsColumn();
|
// 重新计算商品列
|
||||||
|
res.data.forEach((item) => {
|
||||||
|
calculateGoodsColumn();
|
||||||
|
});
|
||||||
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
// 初始化
|
// 初始化
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
if(props.fl){
|
if(props.fl){
|
||||||
classValue("recommendNew");
|
|
||||||
}
|
}
|
||||||
// 加载商品列表
|
// 加载商品列表
|
||||||
if(!props.fl){
|
if(!props.fl){
|
||||||
@ -263,9 +271,12 @@
|
|||||||
// 分列
|
// 分列
|
||||||
calculateGoodsColumn();
|
calculateGoodsColumn();
|
||||||
}
|
}
|
||||||
|
}else{
|
||||||
|
classValue("recommendNew");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
@ -305,18 +316,16 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.goods-md-wrap {
|
// .goods-md-wrap {
|
||||||
width: 100%;
|
// width: 100%;
|
||||||
}
|
// }
|
||||||
|
|
||||||
.goods-list-box {
|
.goods-list-box {
|
||||||
width: 100%;
|
width: 50%;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
::v-deep &{
|
::v-deep &{
|
||||||
display:flex;
|
.left-list, .right-list{
|
||||||
flex-wrap:wrap;
|
// width:48%;
|
||||||
.left-list{
|
|
||||||
width:48%;
|
|
||||||
}
|
}
|
||||||
.left-list:nth-child(3n+2){
|
.left-list:nth-child(3n+2){
|
||||||
margin-right:0;
|
margin-right:0;
|
||||||
|
@ -369,7 +369,7 @@
|
|||||||
import {
|
import {
|
||||||
PromotionActivityTypeEnum
|
PromotionActivityTypeEnum
|
||||||
} from '@/sheep/util/const';
|
} from '@/sheep/util/const';
|
||||||
console.log(PromotionActivityTypeEnum,"PromotionActivityTypeEnum")
|
// console.log(PromotionActivityTypeEnum,"PromotionActivityTypeEnum")
|
||||||
// 接收参数
|
// 接收参数
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
goodsFields: {
|
goodsFields: {
|
||||||
|
@ -147,7 +147,7 @@
|
|||||||
data: activity
|
data: activity
|
||||||
} = await CombinationApi.getCombinationActivity(props.data.activityId);
|
} = await CombinationApi.getCombinationActivity(props.data.activityId);
|
||||||
const ss = await SpuApi.getSpulist();
|
const ss = await SpuApi.getSpulist();
|
||||||
console.log(ss, "getSpuListByIds")
|
// console.log(ss, "getSpuListByIds")
|
||||||
productList.value = ss.data;
|
productList.value = ss.data;
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
@ -211,7 +211,7 @@
|
|||||||
// const { data: activity } = await SeckillApi.getSeckillActivity(props.data.activityId);
|
// const { data: activity } = await SeckillApi.getSeckillActivity(props.data.activityId);
|
||||||
// const { data: spu } = await SpuApi.getSpuDetail(activity.spuId);
|
// const { data: spu } = await SpuApi.getSpuDetail(activity.spuId);
|
||||||
const data = await SpuApi.getSpuSeckilllist();
|
const data = await SpuApi.getSpuSeckilllist();
|
||||||
console.log(data,"datadatadatadatadatadatadatadata")
|
// console.log(data,"datadatadatadatadatadatadatadata")
|
||||||
productList.value = data.data;
|
productList.value = data.data;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -1,15 +1,16 @@
|
|||||||
<!-- 海报弹窗 -->
|
<!-- 海报弹窗 -->
|
||||||
<template>
|
<template>
|
||||||
<su-popup :show="show" round="10" @close="onClosePoster" type="center" class="popup-box">
|
<su-popup :show="show" round="10" @close="onClosePoster" type="center" class="popup-box">
|
||||||
<view class="ss-flex-col ss-col-center ss-row-center">
|
<view class="ss-flex-col ss-col-center ss-row-center"
|
||||||
|
:style="{
|
||||||
|
height: poster.css.height + 'px',
|
||||||
|
width: poster.css.width + 'px',
|
||||||
|
}">
|
||||||
<image
|
<image
|
||||||
v-if="!!painterImageUrl"
|
v-if="!!painterImageUrl"
|
||||||
class="poster-img"
|
class="poster-img"
|
||||||
:src="painterImageUrl"
|
:src="painterImageUrl"
|
||||||
:style="{
|
|
||||||
height: poster.css.height + 'px',
|
|
||||||
width: poster.css.width + 'px',
|
|
||||||
}"
|
|
||||||
:show-menu-by-longpress="true"
|
:show-menu-by-longpress="true"
|
||||||
/>
|
/>
|
||||||
</view>
|
</view>
|
||||||
@ -17,7 +18,6 @@
|
|||||||
class="poster-btn-box ss-m-t-20 ss-flex ss-row-between ss-col-center"
|
class="poster-btn-box ss-m-t-20 ss-flex ss-row-between ss-col-center"
|
||||||
v-if="!!painterImageUrl"
|
v-if="!!painterImageUrl"
|
||||||
>
|
>
|
||||||
<button class="cancel-btn ss-reset-button" @tap="onClosePoster">取消</button>
|
|
||||||
<button class="save-btn ss-reset-button ui-BG-Main" @tap="onSavePoster">
|
<button class="save-btn ss-reset-button ui-BG-Main" @tap="onSavePoster">
|
||||||
{{
|
{{
|
||||||
['wechatOfficialAccount', 'H5'].includes(sheep.$platform.name)
|
['wechatOfficialAccount', 'H5'].includes(sheep.$platform.name)
|
||||||
@ -25,6 +25,7 @@
|
|||||||
: '保存图片'
|
: '保存图片'
|
||||||
}}
|
}}
|
||||||
</button>
|
</button>
|
||||||
|
<button class="cancel-btn ss-reset-button" @tap="onClosePoster">取消</button>
|
||||||
</view>
|
</view>
|
||||||
<!-- 海报画板:默认隐藏只用来生成海报。生成方式为主动调用 -->
|
<!-- 海报画板:默认隐藏只用来生成海报。生成方式为主动调用 -->
|
||||||
<l-painter
|
<l-painter
|
||||||
@ -65,6 +66,7 @@
|
|||||||
css: {
|
css: {
|
||||||
// 根节点若无尺寸,自动获取父级节点
|
// 根节点若无尺寸,自动获取父级节点
|
||||||
width: sheep.$platform.device.windowWidth * 0.9,
|
width: sheep.$platform.device.windowWidth * 0.9,
|
||||||
|
// width: 1 * 0.9,
|
||||||
height: 550,
|
height: 550,
|
||||||
},
|
},
|
||||||
views: [],
|
views: [],
|
||||||
@ -137,10 +139,11 @@
|
|||||||
position: absolute;
|
position: absolute;
|
||||||
left: 50%;
|
left: 50%;
|
||||||
transform: translateX(-50%);
|
transform: translateX(-50%);
|
||||||
bottom: -80rpx;
|
bottom: -172rpx;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
|
||||||
.cancel-btn {
|
.cancel-btn {
|
||||||
width: 240rpx;
|
width: 100%;
|
||||||
height: 70rpx;
|
height: 70rpx;
|
||||||
line-height: 70rpx;
|
line-height: 70rpx;
|
||||||
background: $white;
|
background: $white;
|
||||||
@ -148,10 +151,11 @@
|
|||||||
font-size: 28rpx;
|
font-size: 28rpx;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
color: $dark-9;
|
color: $dark-9;
|
||||||
|
margin-top:10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.save-btn {
|
.save-btn {
|
||||||
width: 240rpx;
|
width: 100%;
|
||||||
height: 70rpx;
|
height: 70rpx;
|
||||||
line-height: 70rpx;
|
line-height: 70rpx;
|
||||||
border-radius: 35rpx;
|
border-radius: 35rpx;
|
||||||
@ -162,5 +166,7 @@
|
|||||||
|
|
||||||
.poster-img {
|
.poster-img {
|
||||||
border-radius: 20rpx;
|
border-radius: 20rpx;
|
||||||
|
width: 100%;
|
||||||
|
height:100%;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
@ -78,7 +78,7 @@ const user = async (poster) => {
|
|||||||
css: {
|
css: {
|
||||||
position: 'fixed',
|
position: 'fixed',
|
||||||
left: width * 0.22,
|
left: width * 0.22,
|
||||||
top: width * 1.3,
|
top: width * 1.3,
|
||||||
width: width * 0.2,
|
width: width * 0.2,
|
||||||
height: width * 0.2,
|
height: width * 0.2,
|
||||||
},
|
},
|
||||||
|
@ -10,14 +10,14 @@
|
|||||||
? sheep.$url.cdn(userInfo.avatar)
|
? sheep.$url.cdn(userInfo.avatar)
|
||||||
: defaultAvatar
|
: defaultAvatar
|
||||||
" mode="aspectFill" @tap="sheep.$router.go('/pages/user/info')"></image>
|
" mode="aspectFill" @tap="sheep.$router.go('/pages/user/info')"></image>
|
||||||
<image v-if="userInfo.activate" class="vipCard"
|
<image v-if="userInfo.activate && userInfo.activate != 4" class="vipCard"
|
||||||
src="https://zysc.fjptzykj.com:3000/shangcheng/8064149c53fe05f8d20263fba31992da2d24a751877a4ddcc696d7f53b5cc771.png">
|
src="https://zysc.fjptzykj.com:3000/shangcheng/8064149c53fe05f8d20263fba31992da2d24a751877a4ddcc696d7f53b5cc771.png">
|
||||||
</image>
|
</image>
|
||||||
</view>
|
</view>
|
||||||
<view style="z-index:22222;">
|
<view style="z-index:22222;">
|
||||||
<view class="nickname-box ss-flex ss-col-center">
|
<view class="nickname-box ss-flex ss-col-center">
|
||||||
<view class="nick-name ss-m-r-20">{{ userInfo?.nickname || nickname }}</view>
|
<view class="nick-name ss-m-r-20">{{ userInfo?.nickname || nickname }}</view>
|
||||||
<view class="vipImg" v-if="userInfo.activate">
|
<view class="vipImg" v-if="userInfo.activate && userInfo.activate != 4">
|
||||||
<image class="img"
|
<image class="img"
|
||||||
src="https://zysc.fjptzykj.com:3000/shangcheng/0419db3d6a991486176256374c05c2834006fd42b3f5f80e3ff385b027b7c34f.png" />
|
src="https://zysc.fjptzykj.com:3000/shangcheng/0419db3d6a991486176256374c05c2834006fd42b3f5f80e3ff385b027b7c34f.png" />
|
||||||
</view>
|
</view>
|
||||||
@ -37,13 +37,13 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<!-- 提示绑定手机号 先隐藏 yudao 需要再修改 -->
|
<!-- 提示绑定手机号 先隐藏 yudao 需要再修改 -->
|
||||||
<view class="bind-mobile-box ss-flex ss-row-between ss-col-center" v-if="isLogin && !userInfo.mobile">
|
<!-- <view class="bind-mobile-box ss-flex ss-row-between ss-col-center" v-if="isLogin && !userInfo.mobile">
|
||||||
<view class="ss-flex">
|
<view class="ss-flex">
|
||||||
<text class="cicon-mobile-o" />
|
<text class="cicon-mobile-o" />
|
||||||
<view class="mobile-title ss-m-l-20"> 点击绑定手机号确保账户安全 </view>
|
<view class="mobile-title ss-m-l-20"> 点击绑定手机号确保账户安全 </view>
|
||||||
</view>
|
</view>
|
||||||
<button class="ss-reset-button bind-btn" @tap="onBind">去绑定</button>
|
<button class="ss-reset-button bind-btn" @tap="onBind">去绑定</button>
|
||||||
</view>
|
</view> -->
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@ -74,7 +74,7 @@ const app = defineStore({
|
|||||||
methods: ['poster', 'link'],
|
methods: ['poster', 'link'],
|
||||||
linkAddress: 'http://127.0.0.1:3000', // TODO 芋艿:可以考虑改到 .env 那
|
linkAddress: 'http://127.0.0.1:3000', // TODO 芋艿:可以考虑改到 .env 那
|
||||||
posterInfo: {
|
posterInfo: {
|
||||||
user_bg: '/shangcheng/user-poster-bg.png',
|
user_bg: '/shangcheng/baa4f41883b4bb8880ff83281f258418281ea0383c505001300ca2953299db8a.png',
|
||||||
goods_bg: '/shangcheng/goods-poster-bg.png',
|
goods_bg: '/shangcheng/goods-poster-bg.png',
|
||||||
groupon_bg: '/shangcheng/groupon-poster-bg.png',
|
groupon_bg: '/shangcheng/groupon-poster-bg.png',
|
||||||
},
|
},
|
||||||
|
@ -339,7 +339,11 @@ by ZXLee
|
|||||||
</script>
|
</script>
|
||||||
<script src="./js/z-paging-main.js" />
|
<script src="./js/z-paging-main.js" />
|
||||||
|
|
||||||
<style scoped>
|
<style scoped lang="scss">
|
||||||
@import "./css/z-paging-main.css";
|
@import "./css/z-paging-main.css";
|
||||||
@import "./css/z-paging-static.css";
|
@import "./css/z-paging-static.css";
|
||||||
|
|
||||||
|
.zp-list-cell{
|
||||||
|
padding: 0 15px;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
Loading…
Reference in New Issue
Block a user