Merge branch 'dev' of https://gitee.com/fengyuze178/xdd-uniapp-new into dev
This commit is contained in:
@@ -10,6 +10,14 @@ if (NODE_ENV === 'development' || NODE_ENV === 'test') {
|
|||||||
enableDebug: false
|
enableDebug: false
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
if (NODE_ENV === 'fix') {
|
||||||
|
BASE_URL = 'https://shop-pre.xdd618.com/api'
|
||||||
|
SERVICE_URL = 'https://service-pre.xdd618.com/api'
|
||||||
|
SERVICE_WS_URL = 'wss://service-pre.xdd618.com/ws'
|
||||||
|
wx.setEnableDebug({
|
||||||
|
enableDebug: false
|
||||||
|
})
|
||||||
|
}
|
||||||
if (NODE_ENV === 'prod') {
|
if (NODE_ENV === 'prod') {
|
||||||
BASE_URL = 'https://wxapp.xdd618.com/api'
|
BASE_URL = 'https://wxapp.xdd618.com/api'
|
||||||
SERVICE_URL = 'https://service.xdd618.com/api'
|
SERVICE_URL = 'https://service.xdd618.com/api'
|
||||||
|
|||||||
@@ -133,6 +133,17 @@
|
|||||||
"CUSTOM-CONST": true
|
"CUSTOM-CONST": true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"mp-weixin-fix": {
|
||||||
|
"title": "微信小程序(Fix环境)",
|
||||||
|
"env": {
|
||||||
|
"UNI_PLATFORM": "mp-weixin",
|
||||||
|
"VUE_APP_ENV": "fix",
|
||||||
|
"UNI_OUTPUT_DIR": "dist"
|
||||||
|
},
|
||||||
|
"define": {
|
||||||
|
"CUSTOM-CONST": true
|
||||||
|
}
|
||||||
|
},
|
||||||
"mp-weixin": {
|
"mp-weixin": {
|
||||||
"title": "微信小程序(生产环境)",
|
"title": "微信小程序(生产环境)",
|
||||||
"env": {
|
"env": {
|
||||||
|
|||||||
@@ -384,20 +384,17 @@ export default {
|
|||||||
this.mescroll && this.mescroll.triggerDownScroll()
|
this.mescroll && this.mescroll.triggerDownScroll()
|
||||||
},
|
},
|
||||||
search() {
|
search() {
|
||||||
if(this.keyword === '') return
|
const keyword = (this.keyword || '').trim()
|
||||||
const matchIndex = this.listGroup.findIndex((group, index) => {
|
if (!keyword) return
|
||||||
let result
|
const matchIndex = this.listGroup.findIndex(group => {
|
||||||
group.city.forEach(item => {
|
const cityList = Array.isArray(group.city) ? group.city : []
|
||||||
result = item.cityName.indexOf(this.keyword, 0)
|
return cityList.some(item => item && item.cityName && item.cityName.indexOf(keyword) !== -1)
|
||||||
if (result !== -1) {
|
|
||||||
this.asideTap(index);
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
})
|
|
||||||
if (result !== -1) {
|
|
||||||
return result
|
|
||||||
}
|
|
||||||
})
|
})
|
||||||
|
if (matchIndex !== -1) {
|
||||||
|
this.keyword = keyword
|
||||||
|
this.asideTap(matchIndex)
|
||||||
|
return
|
||||||
|
}
|
||||||
if (matchIndex === -1) {
|
if (matchIndex === -1) {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: '未找到该城市,请重新输入城市名称',
|
title: '未找到该城市,请重新输入城市名称',
|
||||||
|
|||||||
+486
-95
@@ -12,7 +12,7 @@
|
|||||||
v-model="keyword"
|
v-model="keyword"
|
||||||
:inputStyle="inputStyle"
|
:inputStyle="inputStyle"
|
||||||
:showAction="false"
|
:showAction="false"
|
||||||
placeholder="请输入商品名/订单号/团购名称"
|
:placeholder="searchPlaceholder"
|
||||||
shape="round"
|
shape="round"
|
||||||
bgColor="#FFF"
|
bgColor="#FFF"
|
||||||
@search="changeType"
|
@search="changeType"
|
||||||
@@ -76,28 +76,28 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view
|
<view
|
||||||
v-if="order.merName && !order.experienceOrderInfo"
|
v-if="getOrderStoreName(order) && !order.experienceOrderInfo"
|
||||||
class="shop-info flex jc-between ai-center"
|
class="shop-info flex jc-between ai-center"
|
||||||
style="padding-bottom: 0"
|
style="padding-bottom: 0"
|
||||||
@click="goStore(orderListIndex)"
|
@click="handleOrderStoreClick(orderListIndex)"
|
||||||
>
|
>
|
||||||
<view class="flex ai-center">
|
<view class="flex ai-center">
|
||||||
<image
|
<image
|
||||||
:src="webUrl+'/orderIcon/shop.png'"
|
:src="webUrl+'/orderIcon/shop.png'"
|
||||||
style="width: 32rpx;height: 32rpx"
|
style="width: 32rpx;height: 32rpx"
|
||||||
/>
|
/>
|
||||||
<text class="name v12-font-weight-400 v12-dark-text v12-font-24">{{ order.merName }}</text>
|
<text class="name v12-font-weight-400 v12-dark-text v12-font-24">{{ getOrderStoreName(order) }}</text>
|
||||||
<image
|
<image
|
||||||
:src="webUrl+'/orderIcon/arrow.png'"
|
:src="webUrl+'/orderIcon/arrow.png'"
|
||||||
style="width: 24rpx;height: 24rpx; margin-top: 5rpx"
|
style="width: 24rpx;height: 24rpx; margin-top: 5rpx"
|
||||||
/>
|
/>
|
||||||
</view>
|
</view>
|
||||||
<view class="flex ai-center">
|
<view v-if="getOrderCityName(order)" class="flex ai-center">
|
||||||
<image
|
<image
|
||||||
:src="webUrl+'/orderIcon/map.png'"
|
:src="webUrl+'/orderIcon/map.png'"
|
||||||
style="width: 28rpx;height: 28rpx"
|
style="width: 28rpx;height: 28rpx"
|
||||||
/>
|
/>
|
||||||
<text class="address v12-dark-text v12-font-bold v12-font-24">{{ order.merCityName }}</text>
|
<text class="address v12-dark-text v12-font-bold v12-font-24">{{ getOrderCityName(order) }}</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view v-if="order.experienceOrderInfo" class="title acea-row row-between-wrapper" style="padding: 0 0 0 16rpx !important;">
|
<view v-if="order.experienceOrderInfo" class="title acea-row row-between-wrapper" style="padding: 0 0 0 16rpx !important;">
|
||||||
@@ -131,7 +131,7 @@
|
|||||||
<view
|
<view
|
||||||
v-else
|
v-else
|
||||||
class="font-color-white statusTag v12-primary"
|
class="font-color-white statusTag v12-primary"
|
||||||
>{{ (order.isGiftCardSend || order.isGiftCardReceive) ? '礼包' : (getStatus(order) || (order._status && order._status._title) || '已完成') }}</view>
|
>{{ getOrderStatusTagText(order) }}</view>
|
||||||
</view>
|
</view>
|
||||||
<view @click="goOrderDetails(orderListIndex)">
|
<view @click="goOrderDetails(orderListIndex)">
|
||||||
<view
|
<view
|
||||||
@@ -186,6 +186,37 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
<view v-else-if="isCollectiveCenterMode && !isBlindBoxGiftOrder(order)">
|
||||||
|
<view
|
||||||
|
v-for="(item, cartInfoIndex) in getCollectiveDisplayItems(order)"
|
||||||
|
:key="`${order.orderId || orderListIndex}-${cartInfoIndex}`"
|
||||||
|
class="item-info acea-row row-between row-top"
|
||||||
|
>
|
||||||
|
<view class="pictrue">
|
||||||
|
<image :src="item.image" />
|
||||||
|
</view>
|
||||||
|
<view class="text" style="margin-top: 0 !important;">
|
||||||
|
<view class="acea-row name-wrap">
|
||||||
|
<view class="name more-t v12-font-bold">{{ item.name }}</view>
|
||||||
|
<view class="money">
|
||||||
|
<view v-if="item.showPrice">
|
||||||
|
<text class="v12-font-22">¥</text>
|
||||||
|
<text class="v12-font-28">{{ force2Decimal(item.price) }}</text>
|
||||||
|
</view>
|
||||||
|
<view class="v12-font-22 v12-secondary-dark-text">x{{ item.qty }}</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="acea-row attr-wrap ">
|
||||||
|
<view
|
||||||
|
v-if="item.sku"
|
||||||
|
class="attr v12-secondary-dark-text v12-font-24 "
|
||||||
|
>
|
||||||
|
{{ item.sku }}
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
<view v-else-if="order.isDrawOrder === 1">
|
<view v-else-if="order.isDrawOrder === 1">
|
||||||
<view class="item-info acea-row row-between row-top draw-order-info">
|
<view class="item-info acea-row row-between row-top draw-order-info">
|
||||||
<view class="pictrue">
|
<view class="pictrue">
|
||||||
@@ -254,22 +285,22 @@
|
|||||||
<image
|
<image
|
||||||
v-if="cart.combinationId === 0 && cart.bargainId === 0 &&cart.seckillId === 0"
|
v-if="cart.combinationId === 0 && cart.bargainId === 0 &&cart.seckillId === 0"
|
||||||
:src="cart.productInfo.image"
|
:src="cart.productInfo.image"
|
||||||
@click.stop="gotoGoodDetail(cart, 1, { id: cart.productInfo.id })"
|
@click.stop="gotoGoodDetail(orderListIndex, cartInfoIndex)"
|
||||||
/>
|
/>
|
||||||
<image
|
<image
|
||||||
v-else-if="cart.combinationId > 0"
|
v-else-if="cart.combinationId > 0"
|
||||||
:src="cart.productInfo.image"
|
:src="cart.productInfo.image"
|
||||||
@click.stop="gotoGoodDetail(cart, 2, { id: cart.combinationId })"
|
@click.stop="gotoGoodDetail(orderListIndex, cartInfoIndex)"
|
||||||
/>
|
/>
|
||||||
<image
|
<image
|
||||||
v-else-if="cart.bargainId > 0"
|
v-else-if="cart.bargainId > 0"
|
||||||
:src="cart.productInfo.image"
|
:src="cart.productInfo.image"
|
||||||
@click.stop="gotoGoodDetail(cart, 3, { id: cart.bargainId })"
|
@click.stop="gotoGoodDetail(orderListIndex, cartInfoIndex)"
|
||||||
/>
|
/>
|
||||||
<image
|
<image
|
||||||
v-else-if="cart.seckillId > 0"
|
v-else-if="cart.seckillId > 0"
|
||||||
:src="cart.productInfo.image"
|
:src="cart.productInfo.image"
|
||||||
@click.stop="gotoGoodDetail(cart, 4, { id: cart.seckillId })"
|
@click.stop="gotoGoodDetail(orderListIndex, cartInfoIndex)"
|
||||||
/>
|
/>
|
||||||
</view>
|
</view>
|
||||||
<view class="text" style="margin-top: 0 !important;">
|
<view class="text" style="margin-top: 0 !important;">
|
||||||
@@ -300,8 +331,8 @@
|
|||||||
<span class="orderTime v12-font-24 v12-dark1-text">{{ order.createTime }}</span>
|
<span class="orderTime v12-font-24 v12-dark1-text">{{ order.createTime }}</span>
|
||||||
</view>
|
</view>
|
||||||
<view class="v12-font-24 v12-dark1-text">
|
<view class="v12-font-24 v12-dark1-text">
|
||||||
共{{ order.totalNum || 0 }}件商品
|
共{{ getOrderTotalNum(order) }}件商品
|
||||||
<text v-if="order.isGiftCardReceiveBlind === 0">
|
<text v-if="order.isGiftCardReceiveBlind === 0 && shouldShowOrderTotalAmount(order)">
|
||||||
<text class="v12-dark-text v12-font-28 v12-font-bold">
|
<text class="v12-dark-text v12-font-28 v12-font-bold">
|
||||||
,总金额
|
,总金额
|
||||||
</text>
|
</text>
|
||||||
@@ -309,7 +340,7 @@
|
|||||||
¥
|
¥
|
||||||
</text>
|
</text>
|
||||||
<text class="money font-color-lightred v12-font-28 v12-primary-text v12-font-bold">
|
<text class="money font-color-lightred v12-font-28 v12-primary-text v12-font-bold">
|
||||||
{{ force2Decimal(order.payPrice) }}
|
{{ force2Decimal(getOrderPayPrice(order)) }}
|
||||||
</text>
|
</text>
|
||||||
</text>
|
</text>
|
||||||
</view>
|
</view>
|
||||||
@@ -351,63 +382,101 @@
|
|||||||
v-if="!order.isGiftCardSend && !order.experienceOrderInfo"
|
v-if="!order.isGiftCardSend && !order.experienceOrderInfo"
|
||||||
class="bottom flex jc-between ai-center"
|
class="bottom flex jc-between ai-center"
|
||||||
>
|
>
|
||||||
|
<template v-if="isCollectiveCenterMode">
|
||||||
<view
|
|
||||||
v-if="[2, 3].includes(parseInt(order._status._type)) && order.isTickets === 0 && order.isDrawOrder === 0"
|
|
||||||
class="group-btn"
|
|
||||||
>
|
|
||||||
<text
|
|
||||||
class="btn-more v12-font-28 v12-font-bold"
|
|
||||||
@click.stop="tapShowMore(orderListIndex)"
|
|
||||||
>更多</text>
|
|
||||||
<view class="group-float" v-show="order.showMore">
|
|
||||||
<view
|
|
||||||
v-if="order.merName && order.isGiftCardReceiveBlind === 0"
|
|
||||||
class="btn btn-service flex jc-center ai-center v12-font-24"
|
|
||||||
@click="goRoom(orderListIndex)"
|
|
||||||
>联系商家</view>
|
|
||||||
<view
|
|
||||||
v-if="order.isTravelGroup === 0 && order.refundSystemStatus !== 2"
|
|
||||||
class="btn flex jc-center ai-center v12-font-24"
|
|
||||||
@click="goRefund(orderListIndex)"
|
|
||||||
>申请退款</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<template v-else>
|
|
||||||
<view class="v12-justify-between" style="width: 100%">
|
<view class="v12-justify-between" style="width: 100%">
|
||||||
<view
|
|
||||||
v-if="order.isDrawOrder > 0"
|
|
||||||
class="bnt service"
|
|
||||||
@click.stop="callMerPhone(orderListIndex)"
|
|
||||||
>联系客服
|
|
||||||
</view>
|
|
||||||
<view>
|
<view>
|
||||||
<view
|
<view
|
||||||
v-if="order.isGiftCardReceiveBlind === 0 &&
|
v-if="showCollectiveContact(order)"
|
||||||
order.merName &&
|
|
||||||
parseInt(order._status._type) !== 0 &&
|
|
||||||
parseInt(order._status._type) !== 9
|
|
||||||
"
|
|
||||||
class="bnt service"
|
class="bnt service"
|
||||||
@click="goRoom(orderListIndex)"
|
@click="goRoom(orderListIndex)"
|
||||||
>联系商家</view>
|
>联系商家</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="v12-justify-between">
|
<view class="flex">
|
||||||
<view
|
<view
|
||||||
|
v-if="showCollectiveModifyAddress(order)"
|
||||||
|
class="bnt service"
|
||||||
|
@click="addressTap(orderListIndex)"
|
||||||
|
>修改地址</view>
|
||||||
|
<view
|
||||||
|
v-if="showCollectiveDetail(order)"
|
||||||
class="bnt service"
|
class="bnt service"
|
||||||
@click="goOrderDetails(orderListIndex)"
|
@click="goOrderDetails(orderListIndex)"
|
||||||
v-if="[-1, -2, -3].includes(parseInt(order._status._type))"
|
|
||||||
>查看详情</view>
|
>查看详情</view>
|
||||||
<view
|
<view
|
||||||
|
v-if="showCollectiveRefund(order)"
|
||||||
|
class="bnt service"
|
||||||
|
@click="goRefund(orderListIndex)"
|
||||||
|
>申请退款</view>
|
||||||
|
<view
|
||||||
|
v-if="showCollectiveTakeOrder(order)"
|
||||||
|
class="bnt bg-color-lightred v12-white v12-primary-text v12-primary-border v12-radius-40"
|
||||||
|
@click="takeOrder(orderListIndex)"
|
||||||
|
>确认收货</view>
|
||||||
|
<view
|
||||||
|
v-if="showCollectiveDelete(order)"
|
||||||
class="bnt service"
|
class="bnt service"
|
||||||
@click="delOrder(orderListIndex)"
|
@click="delOrder(orderListIndex)"
|
||||||
v-if="[9].includes(parseInt(order._status._type))"
|
|
||||||
>删除订单</view>
|
>删除订单</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
<view class="flex">
|
<template v-else>
|
||||||
|
<view
|
||||||
|
v-if="[2, 3].includes(parseInt(order._status._type)) && order.isTickets === 0 && order.isDrawOrder === 0"
|
||||||
|
class="group-btn"
|
||||||
|
>
|
||||||
|
<text
|
||||||
|
class="btn-more v12-font-28 v12-font-bold"
|
||||||
|
@click.stop="tapShowMore(orderListIndex)"
|
||||||
|
>更多</text>
|
||||||
|
<view class="group-float" v-show="order.showMore">
|
||||||
|
<view
|
||||||
|
v-if="order.merName && order.isGiftCardReceiveBlind === 0"
|
||||||
|
class="btn btn-service flex jc-center ai-center v12-font-24"
|
||||||
|
@click="goRoom(orderListIndex)"
|
||||||
|
>联系商家</view>
|
||||||
|
<view
|
||||||
|
v-if="order.isTravelGroup === 0 && order.refundSystemStatus !== 2"
|
||||||
|
class="btn flex jc-center ai-center v12-font-24"
|
||||||
|
@click="goRefund(orderListIndex)"
|
||||||
|
>申请退款</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<template v-else>
|
||||||
|
<view class="v12-justify-between" style="width: 100%">
|
||||||
|
<view
|
||||||
|
v-if="order.isDrawOrder > 0"
|
||||||
|
class="bnt service"
|
||||||
|
@click.stop="callMerPhone(orderListIndex)"
|
||||||
|
>联系客服
|
||||||
|
</view>
|
||||||
|
<view>
|
||||||
|
<view
|
||||||
|
v-if="order.isGiftCardReceiveBlind === 0 &&
|
||||||
|
order.merName &&
|
||||||
|
parseInt(order._status._type) !== 0 &&
|
||||||
|
parseInt(order._status._type) !== 9
|
||||||
|
"
|
||||||
|
class="bnt service"
|
||||||
|
@click="goRoom(orderListIndex)"
|
||||||
|
>联系商家</view>
|
||||||
|
</view>
|
||||||
|
<view class="v12-justify-between">
|
||||||
|
<view
|
||||||
|
class="bnt service"
|
||||||
|
@click="goOrderDetails(orderListIndex)"
|
||||||
|
v-if="[-1, -2, -3].includes(parseInt(order._status._type))"
|
||||||
|
>查看详情</view>
|
||||||
|
<view
|
||||||
|
class="bnt service"
|
||||||
|
@click="delOrder(orderListIndex)"
|
||||||
|
v-if="[9].includes(parseInt(order._status._type))"
|
||||||
|
>删除订单</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
</template>
|
||||||
|
<view v-if="!isCollectiveCenterMode" class="flex">
|
||||||
<template v-if="parseInt(order._status._type) === 0">
|
<template v-if="parseInt(order._status._type) === 0">
|
||||||
<view
|
<view
|
||||||
class="bnt cancelBnt v12-dark-text v12-dark-border"
|
class="bnt cancelBnt v12-dark-text v12-dark-border"
|
||||||
@@ -667,6 +736,7 @@ export default {
|
|||||||
mixins: [pageListenMixins, orderPaySuccessToCheckDrawStatus],
|
mixins: [pageListenMixins, orderPaySuccessToCheckDrawStatus],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
collectiveOrderType: 'wholesaler',
|
||||||
giftItem: {},
|
giftItem: {},
|
||||||
isShowPayPwdPop: false,
|
isShowPayPwdPop: false,
|
||||||
inputStyle: {
|
inputStyle: {
|
||||||
@@ -693,14 +763,15 @@ export default {
|
|||||||
{ name: '全部' },
|
{ name: '全部' },
|
||||||
{ name: '待付款' },
|
{ name: '待付款' },
|
||||||
{ name: '待发货' },
|
{ name: '待发货' },
|
||||||
{ name: '待收货' },
|
{ name: '待收货/待核销' },
|
||||||
{ name: '退款/售后' },
|
{ name: '退款/售后' },
|
||||||
{ name: '待评价' },
|
{ name: '待评价' },
|
||||||
{ name: '已完成' }
|
{ name: '已完成' }
|
||||||
],
|
],
|
||||||
orderTypeTabList: [
|
orderTypeTabList: [
|
||||||
{ name: '购物', orderType: 'shop' },
|
{ name: '购物', orderType: 'shop' },
|
||||||
{ name: '旅居', orderType: 'travel' }
|
{ name: '旅居', orderType: 'travel' },
|
||||||
|
{ name: '集采中心', orderType: 'wholesaler' }
|
||||||
],
|
],
|
||||||
orderTypeTabIndex: 0,
|
orderTypeTabIndex: 0,
|
||||||
orderType: 'shop',
|
orderType: 'shop',
|
||||||
@@ -735,7 +806,15 @@ export default {
|
|||||||
passkeyborad,
|
passkeyborad,
|
||||||
DateRangePicker
|
DateRangePicker
|
||||||
},
|
},
|
||||||
computed: mapGetters(["userInfo"]),
|
computed: {
|
||||||
|
...mapGetters(["userInfo"]),
|
||||||
|
isCollectiveCenterMode() {
|
||||||
|
return this.orderType === this.collectiveOrderType
|
||||||
|
},
|
||||||
|
searchPlaceholder() {
|
||||||
|
return this.isCollectiveCenterMode ? '请输入商品名称/订单号' : '请输入商品名/订单号/团购名称'
|
||||||
|
}
|
||||||
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
const _this = this
|
const _this = this
|
||||||
const needRefreshOrderList = uni.getStorageSync('needRefreshMyOrderList')
|
const needRefreshOrderList = uni.getStorageSync('needRefreshMyOrderList')
|
||||||
@@ -780,12 +859,14 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad() {
|
onLoad() {
|
||||||
this.type = this.type || parseInt(this.$yroute.query.type) || 0
|
const query = this.getPageQuery()
|
||||||
this.orderTypeTabIndex = parseInt(this.$yroute.query.tabIndex) || 0
|
this.type = this.type || parseInt(query.type) || 0
|
||||||
|
this.orderTypeTabIndex = parseInt(query.tabIndex) || 0
|
||||||
|
const currentOrderTypeTab = this.orderTypeTabList[this.orderTypeTabIndex] || this.orderTypeTabList[0]
|
||||||
this.initUserLocation()
|
this.initUserLocation()
|
||||||
this.orderTypeTabChange({
|
this.orderTypeTabChange({
|
||||||
...this.orderTypeTabList[this.orderTypeTabIndex],
|
...currentOrderTypeTab,
|
||||||
index: this.orderTypeTabIndex
|
index: this.orderTypeTabList[this.orderTypeTabIndex] ? this.orderTypeTabIndex : 0
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
onShareAppMessage() {
|
onShareAppMessage() {
|
||||||
@@ -800,6 +881,291 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
getPageQuery() {
|
||||||
|
return (this.$yroute && this.$yroute.query) || {}
|
||||||
|
},
|
||||||
|
getDefaultTabListByOrderType(orderType = this.orderType) {
|
||||||
|
if (orderType === 'travel') {
|
||||||
|
return [
|
||||||
|
{ name: '全部' },
|
||||||
|
{ name: '待付款' },
|
||||||
|
{ name: '待确认' },
|
||||||
|
{ name: '待使用' },
|
||||||
|
{ name: '退款/售后' },
|
||||||
|
{ name: '待评价' },
|
||||||
|
{ name: '已完成' }
|
||||||
|
]
|
||||||
|
}
|
||||||
|
if (orderType === this.collectiveOrderType) {
|
||||||
|
return [
|
||||||
|
{ name: '全部' },
|
||||||
|
{ name: '待发货' },
|
||||||
|
{ name: '待收货' },
|
||||||
|
{ name: '退款/售后' },
|
||||||
|
{ name: '已完成' }
|
||||||
|
]
|
||||||
|
}
|
||||||
|
return [
|
||||||
|
{ name: '全部' },
|
||||||
|
{ name: '待付款' },
|
||||||
|
{ name: '待发货' },
|
||||||
|
{ name: '待收货/待核销' },
|
||||||
|
{ name: '退款/售后' },
|
||||||
|
{ name: '待评价' },
|
||||||
|
{ name: '已完成' }
|
||||||
|
]
|
||||||
|
},
|
||||||
|
getRequestTypeMapByOrderType(orderType = this.orderType) {
|
||||||
|
if (orderType === this.collectiveOrderType) {
|
||||||
|
return {
|
||||||
|
0: 0,
|
||||||
|
1: 2,
|
||||||
|
2: 3,
|
||||||
|
3: -3,
|
||||||
|
4: 5,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return {
|
||||||
|
0: 0,
|
||||||
|
1: 1,
|
||||||
|
2: 2,
|
||||||
|
3: 3,
|
||||||
|
4: -3,
|
||||||
|
5: 4,
|
||||||
|
6: 5,
|
||||||
|
}
|
||||||
|
},
|
||||||
|
getCollectiveStoreName(order) {
|
||||||
|
return order.merName || order.storeName || order.companyName || '集采中心'
|
||||||
|
},
|
||||||
|
getCollectiveCity(order) {
|
||||||
|
return order.merCityName || order.cityName || order.city || ''
|
||||||
|
},
|
||||||
|
getOrderStoreName(order) {
|
||||||
|
if (this.isCollectiveCenterMode) {
|
||||||
|
return this.getCollectiveStoreName(order)
|
||||||
|
}
|
||||||
|
return order.merName || order.storeName || ''
|
||||||
|
},
|
||||||
|
getOrderCityName(order) {
|
||||||
|
if (this.isCollectiveCenterMode) {
|
||||||
|
return this.getCollectiveCity(order)
|
||||||
|
}
|
||||||
|
return order.merCityName || ''
|
||||||
|
},
|
||||||
|
getOrderTotalNum(order) {
|
||||||
|
if (this.isCollectiveCenterMode) {
|
||||||
|
return this.getCollectiveTotalNum(order)
|
||||||
|
}
|
||||||
|
return Number(order && order.totalNum) || 0
|
||||||
|
},
|
||||||
|
shouldShowOrderTotalAmount(order) {
|
||||||
|
if (this.isCollectiveCenterMode && this.isCollectiveCustomGiftOrder(order)) {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
return true
|
||||||
|
},
|
||||||
|
getOrderPayPrice(order) {
|
||||||
|
return Number(order && order.payPrice) || 0
|
||||||
|
},
|
||||||
|
getOrderStatusTagText(order) {
|
||||||
|
if (this.isCollectiveCenterMode) {
|
||||||
|
return this.getStatus(order) || (order._status && order._status._title) || '已完成'
|
||||||
|
}
|
||||||
|
return (order.isGiftCardSend || order.isGiftCardReceive)
|
||||||
|
? '礼包'
|
||||||
|
: (this.getStatus(order) || (order._status && order._status._title) || '已完成')
|
||||||
|
},
|
||||||
|
getCollectiveStatus(order) {
|
||||||
|
return this.getStatus(order) || (order._status && order._status._title) || '已完成'
|
||||||
|
},
|
||||||
|
getCollectiveScenarioCode(order) {
|
||||||
|
return Number(order && order.scenarioCode)
|
||||||
|
},
|
||||||
|
getCollectiveStatusType(order) {
|
||||||
|
return Number(order && order._status && order._status._type)
|
||||||
|
},
|
||||||
|
isCollectiveWholesalerOrder(order) {
|
||||||
|
return this.getCollectiveScenarioCode(order) === 22
|
||||||
|
},
|
||||||
|
isCollectiveCustomGiftOrder(order) {
|
||||||
|
return this.getCollectiveScenarioCode(order) === 24
|
||||||
|
},
|
||||||
|
isBlindBoxGiftOrder(order) {
|
||||||
|
return Number(order && order.isGiftCardReceiveBlind) === 1
|
||||||
|
},
|
||||||
|
getCollectiveProductList(order) {
|
||||||
|
return Array.isArray(order && order.cartInfo) ? order.cartInfo : []
|
||||||
|
},
|
||||||
|
getCollectiveCustomGiftList(order) {
|
||||||
|
const customGiftInfo = order && order.customGiftInfo
|
||||||
|
if (!this.isCollectiveCustomGiftOrder(order)) {
|
||||||
|
return []
|
||||||
|
}
|
||||||
|
if (!customGiftInfo || typeof customGiftInfo !== 'object' || Array.isArray(customGiftInfo)) {
|
||||||
|
return []
|
||||||
|
}
|
||||||
|
return [customGiftInfo]
|
||||||
|
},
|
||||||
|
formatCollectiveImage(image) {
|
||||||
|
const imageUrl = String(image || '').trim()
|
||||||
|
if (!imageUrl) {
|
||||||
|
return ''
|
||||||
|
}
|
||||||
|
if (/^https?:\/\//i.test(imageUrl)) {
|
||||||
|
return imageUrl
|
||||||
|
}
|
||||||
|
if (imageUrl.startsWith('//')) {
|
||||||
|
return `https:${imageUrl}`
|
||||||
|
}
|
||||||
|
if (imageUrl.startsWith('/')) {
|
||||||
|
const apiBaseUrl = String(this.$VUE_APP_API_URL || '').replace(/\/api\/?$/, '')
|
||||||
|
return `${apiBaseUrl}${imageUrl}`
|
||||||
|
}
|
||||||
|
return imageUrl
|
||||||
|
},
|
||||||
|
normalizeCollectiveDisplayItem(item = {}, isCustomGift = false) {
|
||||||
|
if (isCustomGift) {
|
||||||
|
return {
|
||||||
|
image: this.formatCollectiveImage(item.giftImage),
|
||||||
|
name: item.giftName || '商品信息',
|
||||||
|
sku: item.specName || '',
|
||||||
|
qty: Number(item.giftNum) || 1,
|
||||||
|
price: 0,
|
||||||
|
showPrice: false,
|
||||||
|
giftValue: Number(item.giftValue) || 0,
|
||||||
|
isShowValue: Number(item.isShowValue) || 0,
|
||||||
|
isCustomGift: true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
const productInfo = item.productInfo || {}
|
||||||
|
const attrInfo = productInfo.attrInfo || {}
|
||||||
|
const rawPrice =
|
||||||
|
item.truePrice ||
|
||||||
|
item.price ||
|
||||||
|
item.productPrice ||
|
||||||
|
item.unitPrice ||
|
||||||
|
attrInfo.price ||
|
||||||
|
productInfo.price ||
|
||||||
|
0
|
||||||
|
const rawSku =
|
||||||
|
item.sku ||
|
||||||
|
item.spec ||
|
||||||
|
item.specName ||
|
||||||
|
item.attrValue ||
|
||||||
|
item.attrName ||
|
||||||
|
item.unitName ||
|
||||||
|
item.unit ||
|
||||||
|
attrInfo.sku ||
|
||||||
|
''
|
||||||
|
const rawQty =
|
||||||
|
item.cartNum ||
|
||||||
|
item.num ||
|
||||||
|
item.productNum ||
|
||||||
|
item.quantity ||
|
||||||
|
item.qty ||
|
||||||
|
item.giftNum ||
|
||||||
|
1
|
||||||
|
return {
|
||||||
|
image: this.formatCollectiveImage(
|
||||||
|
item.image ||
|
||||||
|
item.productImage ||
|
||||||
|
item.giftImage ||
|
||||||
|
item.cover ||
|
||||||
|
productInfo.image ||
|
||||||
|
attrInfo.image ||
|
||||||
|
''
|
||||||
|
),
|
||||||
|
name:
|
||||||
|
item.storeName ||
|
||||||
|
item.productName ||
|
||||||
|
item.giftName ||
|
||||||
|
item.name ||
|
||||||
|
item.title ||
|
||||||
|
'商品信息',
|
||||||
|
price: Number(rawPrice) || 0,
|
||||||
|
showPrice: true,
|
||||||
|
sku: rawSku,
|
||||||
|
qty: Number(rawQty) || 1,
|
||||||
|
isCustomGift
|
||||||
|
}
|
||||||
|
},
|
||||||
|
getCollectiveDisplayItems(order) {
|
||||||
|
if (this.isBlindBoxGiftOrder(order)) {
|
||||||
|
return []
|
||||||
|
}
|
||||||
|
if (this.isCollectiveCustomGiftOrder(order)) {
|
||||||
|
return this.getCollectiveCustomGiftList(order).map(item => this.normalizeCollectiveDisplayItem(item, true))
|
||||||
|
}
|
||||||
|
if (this.isCollectiveWholesalerOrder(order)) {
|
||||||
|
return this.getCollectiveProductList(order).map(item => this.normalizeCollectiveDisplayItem(item))
|
||||||
|
}
|
||||||
|
return []
|
||||||
|
},
|
||||||
|
getCollectiveTotalNum(order) {
|
||||||
|
const totalNum = Number(order && order.totalNum)
|
||||||
|
if (totalNum > 0) {
|
||||||
|
return totalNum
|
||||||
|
}
|
||||||
|
return this.getCollectiveDisplayItems(order).reduce((sum, item) => sum + Number(item.qty || 0), 0)
|
||||||
|
},
|
||||||
|
getCollectiveProductImage(cart) {
|
||||||
|
const productInfo = (cart && cart.productInfo) || {}
|
||||||
|
const attrInfo = productInfo.attrInfo || {}
|
||||||
|
return productInfo.image || attrInfo.image || ''
|
||||||
|
},
|
||||||
|
getCollectiveProductName(cart) {
|
||||||
|
const productInfo = (cart && cart.productInfo) || {}
|
||||||
|
return productInfo.storeName || cart.storeName || '商品信息'
|
||||||
|
},
|
||||||
|
getCollectiveProductSku(cart) {
|
||||||
|
const productInfo = (cart && cart.productInfo) || {}
|
||||||
|
const attrInfo = productInfo.attrInfo || {}
|
||||||
|
return attrInfo.sku || cart.sku || ''
|
||||||
|
},
|
||||||
|
showCollectiveContact(order) {
|
||||||
|
const statusType = this.getCollectiveStatusType(order)
|
||||||
|
if (!this.isCollectiveWholesalerOrder(order)) {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
return Boolean(
|
||||||
|
(order.merName || order.storeName || order.merPhone || order.merId) &&
|
||||||
|
[1, 2, 4, -1, -2, -3].includes(statusType)
|
||||||
|
)
|
||||||
|
},
|
||||||
|
showCollectiveModifyAddress(order) {
|
||||||
|
const statusType = this.getCollectiveStatusType(order)
|
||||||
|
if (statusType !== 1) {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
if (!(this.isCollectiveWholesalerOrder(order) || this.isCollectiveCustomGiftOrder(order))) {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
return this.canShowModifyAddress(order)
|
||||||
|
},
|
||||||
|
showCollectiveDelete(order) {
|
||||||
|
return Number(order._status && order._status._type) === 9
|
||||||
|
},
|
||||||
|
showCollectiveTakeOrder(order) {
|
||||||
|
return this.getCollectiveStatusType(order) === 2
|
||||||
|
},
|
||||||
|
showCollectiveDetail(order) {
|
||||||
|
const statusType = this.getCollectiveStatusType(order)
|
||||||
|
if (this.isCollectiveCustomGiftOrder(order)) {
|
||||||
|
return [1, 4].includes(statusType)
|
||||||
|
}
|
||||||
|
if (this.isCollectiveWholesalerOrder(order)) {
|
||||||
|
return [1, 4, -1, -2, -3].includes(statusType)
|
||||||
|
}
|
||||||
|
return false
|
||||||
|
},
|
||||||
|
showCollectiveRefund(order) {
|
||||||
|
const statusType = this.getCollectiveStatusType(order)
|
||||||
|
if (!this.isCollectiveWholesalerOrder(order)) {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
return statusType === 2
|
||||||
|
},
|
||||||
isRefundFlow(order) {
|
isRefundFlow(order) {
|
||||||
if (!order) {
|
if (!order) {
|
||||||
return false
|
return false
|
||||||
@@ -1016,6 +1382,13 @@ export default {
|
|||||||
}
|
}
|
||||||
return orderOrIndex
|
return orderOrIndex
|
||||||
},
|
},
|
||||||
|
handleOrderStoreClick(orderOrIndex) {
|
||||||
|
const order = this.getOrderByIndex(orderOrIndex)
|
||||||
|
if (!order || this.isCollectiveCenterMode) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
this.goStore(order)
|
||||||
|
},
|
||||||
delOrder(orderOrIndex) {
|
delOrder(orderOrIndex) {
|
||||||
const order = this.getOrderByIndex(orderOrIndex)
|
const order = this.getOrderByIndex(orderOrIndex)
|
||||||
if (!order) {
|
if (!order) {
|
||||||
@@ -1299,9 +1672,39 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
gotoGoodDetail(cart, type, query){
|
gotoGoodDetail(orderOrIndex, cartOrIndex) {
|
||||||
|
const order = this.getOrderByIndex(orderOrIndex)
|
||||||
|
const cartList = Array.isArray(order && order.cartInfo) ? order.cartInfo : []
|
||||||
|
const cart = typeof cartOrIndex === 'number' ? cartList[cartOrIndex] : cartOrIndex
|
||||||
|
if (!cart) {
|
||||||
|
uni.showToast({
|
||||||
|
title: '未获取到商品信息',
|
||||||
|
icon: 'none'
|
||||||
|
})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
const productInfo = cart.productInfo || {}
|
||||||
|
let type = 1
|
||||||
|
let id = productInfo.id || cart.productId || ''
|
||||||
|
if (Number(cart.combinationId) > 0) {
|
||||||
|
type = 2
|
||||||
|
id = cart.combinationId
|
||||||
|
} else if (Number(cart.bargainId) > 0) {
|
||||||
|
type = 3
|
||||||
|
id = cart.bargainId
|
||||||
|
} else if (Number(cart.seckillId) > 0) {
|
||||||
|
type = 4
|
||||||
|
id = cart.seckillId
|
||||||
|
}
|
||||||
|
if (!id) {
|
||||||
|
uni.showToast({
|
||||||
|
title: '未获取到商品详情参数',
|
||||||
|
icon: 'none'
|
||||||
|
})
|
||||||
|
return
|
||||||
|
}
|
||||||
// isProductStillExist:0-不存在,1-存在
|
// isProductStillExist:0-不存在,1-存在
|
||||||
const isProductStillExist = cart.isProductStillExist || 0
|
const isProductStillExist = Number(cart.isProductStillExist || 0)
|
||||||
if (isProductStillExist === 0) {
|
if (isProductStillExist === 0) {
|
||||||
this.$dialog.toast({ mes: '商品已下架' })
|
this.$dialog.toast({ mes: '商品已下架' })
|
||||||
return
|
return
|
||||||
@@ -1321,7 +1724,17 @@ export default {
|
|||||||
path = '/pages/activity/SeckillDetails/index'
|
path = '/pages/activity/SeckillDetails/index'
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
this.$yrouter.push({ path, query })
|
if (!path) {
|
||||||
|
uni.showToast({
|
||||||
|
title: '未找到商品详情页',
|
||||||
|
icon: 'none'
|
||||||
|
})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
this.$yrouter.push({
|
||||||
|
path,
|
||||||
|
query: { id }
|
||||||
|
})
|
||||||
},
|
},
|
||||||
getOrderData() {
|
getOrderData() {
|
||||||
getOrderData().then(res => {
|
getOrderData().then(res => {
|
||||||
@@ -1376,37 +1789,23 @@ export default {
|
|||||||
},
|
},
|
||||||
tabChange(item) {
|
tabChange(item) {
|
||||||
this.type = item.index
|
this.type = item.index
|
||||||
this.$yroute.query.type = this.type
|
const query = this.getPageQuery()
|
||||||
|
query.type = this.type
|
||||||
this.changeType()
|
this.changeType()
|
||||||
},
|
},
|
||||||
orderTypeTabChange(item) {
|
orderTypeTabChange(item) {
|
||||||
this.orderTypeTabIndex = item.index
|
this.orderTypeTabIndex = item.index
|
||||||
this.orderType = item.orderType
|
this.orderType = item.orderType
|
||||||
|
const query = this.getPageQuery()
|
||||||
|
query.tabIndex = this.orderTypeTabIndex
|
||||||
this.updateTabListByOrderType()
|
this.updateTabListByOrderType()
|
||||||
|
if (this.type > this.tabList.length - 1) {
|
||||||
|
this.type = 0
|
||||||
|
}
|
||||||
this.changeType(this.type)
|
this.changeType(this.type)
|
||||||
},
|
},
|
||||||
updateTabListByOrderType() {
|
updateTabListByOrderType() {
|
||||||
if (this.orderType === 'travel') {
|
this.tabList = this.getDefaultTabListByOrderType()
|
||||||
this.tabList = [
|
|
||||||
{ name: '全部' },
|
|
||||||
{ name: '待付款' },
|
|
||||||
{ name: '待确认' },
|
|
||||||
{ name: '待使用' },
|
|
||||||
{ name: '退款/售后' },
|
|
||||||
{ name: '待评价' },
|
|
||||||
{ name: '已完成' }
|
|
||||||
]
|
|
||||||
} else {
|
|
||||||
this.tabList = [
|
|
||||||
{ name: '全部' },
|
|
||||||
{ name: '待付款' },
|
|
||||||
{ name: '待发货' },
|
|
||||||
{ name: '待收货/待核销' },
|
|
||||||
{ name: '退款/售后' },
|
|
||||||
{ name: '待评价' },
|
|
||||||
{ name: '已完成' }
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
goUserCenter() {
|
goUserCenter() {
|
||||||
this.$yrouter.switchTab({
|
this.$yrouter.switchTab({
|
||||||
@@ -1428,16 +1827,8 @@ export default {
|
|||||||
uni.showLoading({
|
uni.showLoading({
|
||||||
mask: true,
|
mask: true,
|
||||||
})
|
})
|
||||||
const types = {
|
const typeMap = this.getRequestTypeMapByOrderType()
|
||||||
0: 0,
|
const type = typeMap[this.type]
|
||||||
1: 1,
|
|
||||||
2: 2,
|
|
||||||
3: 3,
|
|
||||||
4: -3,
|
|
||||||
5: 4,
|
|
||||||
6: 5,
|
|
||||||
}
|
|
||||||
const type = types[this.type]
|
|
||||||
const {
|
const {
|
||||||
page,
|
page,
|
||||||
limit,
|
limit,
|
||||||
|
|||||||
@@ -732,6 +732,7 @@ export default {
|
|||||||
console.log("getLaunchOptionsSync", uni.getLaunchOptionsSync())
|
console.log("getLaunchOptionsSync", uni.getLaunchOptionsSync())
|
||||||
console.log("getEnterOptionsSync", uni.getEnterOptionsSync())
|
console.log("getEnterOptionsSync", uni.getEnterOptionsSync())
|
||||||
uni.removeStorageSync('couponId')
|
uni.removeStorageSync('couponId')
|
||||||
|
const pageQuery = Object.assign({}, this.resolvePageQuery(), options || {})
|
||||||
const from = options.from
|
const from = options.from
|
||||||
const id = options.id
|
const id = options.id
|
||||||
switch (from) {
|
switch (from) {
|
||||||
@@ -779,10 +780,10 @@ export default {
|
|||||||
if (url && url.productId) {
|
if (url && url.productId) {
|
||||||
this.id = url.productId
|
this.id = url.productId
|
||||||
} else if (options.id) {
|
} else if (options.id) {
|
||||||
this.id = options.id || null
|
this.id = pageQuery.id || options.id || null
|
||||||
this.partnerId = options.partnerId || null
|
this.partnerId = pageQuery.partnerId || options.partnerId || null
|
||||||
this.activityId = this._route.query.activityId
|
this.activityId = Number(pageQuery.activityId || pageQuery.drawActivityId || 0)
|
||||||
this.source = this._route.query.from || ''
|
this.source = pageQuery.from || ''
|
||||||
} else {
|
} else {
|
||||||
const obj = uni.getEnterOptionsSync()
|
const obj = uni.getEnterOptionsSync()
|
||||||
if (options.scene != null || obj.query.scene != null) {
|
if (options.scene != null || obj.query.scene != null) {
|
||||||
@@ -847,6 +848,18 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
resolvePageQuery() {
|
||||||
|
if (this.$yroute && this.$yroute.query) {
|
||||||
|
return this.$yroute.query
|
||||||
|
}
|
||||||
|
if (this.$route && this.$route.query) {
|
||||||
|
return this.$route.query
|
||||||
|
}
|
||||||
|
if (this._route && this._route.query) {
|
||||||
|
return this._route.query
|
||||||
|
}
|
||||||
|
return {}
|
||||||
|
},
|
||||||
gift() {
|
gift() {
|
||||||
this.goCat(2)
|
this.goCat(2)
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -203,31 +203,31 @@
|
|||||||
|
|
||||||
<view style="margin-top: 30rpx;border-radius:20rpx;overflow: hidden;" class="v12-white">
|
<view style="margin-top: 30rpx;border-radius:20rpx;overflow: hidden;" class="v12-white">
|
||||||
<!-- <OrderGoods :evaluate="status.type || 0" :cartInfo="orderInfo.cartInfo || []" title="商品信息"></OrderGoods> -->
|
<!-- <OrderGoods :evaluate="status.type || 0" :cartInfo="orderInfo.cartInfo || []" title="商品信息"></OrderGoods> -->
|
||||||
<view class="v12-radius-20 v12-pa-3" v-for="(cart, d) in orderInfo.cartInfo" :key="d" @click="goGoodsCon(cart, orderInfo.isGiftCardReceiveBlind, orderInfo.isDrawOrder)">
|
<view class="v12-radius-20 v12-pa-3" v-for="(cart, d) in getOrderDetailDisplayItems(orderInfo)" :key="d" @click="goGoodsCon(cart, orderInfo.isGiftCardReceiveBlind, orderInfo.isDrawOrder, orderInfo.scenarioCode)">
|
||||||
<view class="v12-justify-between" v-if="orderInfo.isGiftCardReceiveBlind === 0">
|
<view class="v12-justify-between" v-if="orderInfo.isGiftCardReceiveBlind === 0">
|
||||||
<view class="">
|
<view class="">
|
||||||
<image style="width: 120rpx; height: 120rpx" class="v12-radius-8" :src="cart.productInfo.image"></image>
|
<image style="width: 120rpx; height: 120rpx" class="v12-radius-8" :src="cart.image"></image>
|
||||||
</view>
|
</view>
|
||||||
<view class="v12-justify-between v12-flex-column v12-ml-2" style="flex: 2">
|
<view class="v12-justify-between v12-flex-column v12-ml-2" style="flex: 2">
|
||||||
<view class="v12-font-28 v12-dark-text v12-font-bold more-t">
|
<view class="v12-font-28 v12-dark-text v12-font-bold more-t">
|
||||||
{{ cart.productInfo.storeName }}
|
{{ cart.name }}
|
||||||
</view>
|
</view>
|
||||||
<view v-if="cart.productInfo.attrInfo && orderInfo.isDrawOrder !== 1" class="more-t v12-secondary-dark-text v12-font-24">
|
<view v-if="cart.sku && orderInfo.isDrawOrder !== 1" class="more-t v12-secondary-dark-text v12-font-24">
|
||||||
{{ cart.productInfo.attrInfo.sku || '' }}
|
{{ cart.sku }}
|
||||||
</view>
|
</view>
|
||||||
<view v-if="orderInfo.isDrawOrder === 1" class="more-t v12-secondary-dark-text v12-font-24">
|
<view v-if="orderInfo.isDrawOrder === 1" class="more-t v12-secondary-dark-text v12-font-24">
|
||||||
{{ orderInfo.drawOrderInfo.prizeAttrName || '' }}
|
{{ orderInfo.drawOrderInfo.prizeAttrName || '' }}
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="v12-justify-between v12-flex-column v12-dark-text v12-text-right">
|
<view class="v12-justify-between v12-flex-column v12-dark-text v12-text-right">
|
||||||
<view class=" " v-if="orderInfo.isDrawOrder === 0">
|
<view class=" " v-if="orderInfo.isDrawOrder === 0 && cart.showPrice">
|
||||||
<text class="v12-font-22">
|
<text class="v12-font-22">
|
||||||
¥
|
¥
|
||||||
</text>
|
</text>
|
||||||
<text class="v12-font-28">{{ cart.truePrice }}</text>
|
<text class="v12-font-28">{{ force2Decimal(cart.price) }}</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="v12-font-22">
|
<view class="v12-font-22">
|
||||||
<text>x{{ cart.cartNum }}</text>
|
<text>x{{ cart.qty }}</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -244,7 +244,7 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="" v-if="orderInfo.cartInfo &&( d === orderInfo.cartInfo.length - 1) && orderInfo.isDrawOrder === 0">
|
<view class="" v-if="getOrderDetailDisplayItems(orderInfo).length && (d === getOrderDetailDisplayItems(orderInfo).length - 1) && orderInfo.isDrawOrder === 0">
|
||||||
<view class="v12-justify-between v12-align-center v12-mt-3 v12-dark-text" v-if="orderInfo.isGiftCardReceiveBlind === 0">
|
<view class="v12-justify-between v12-align-center v12-mt-3 v12-dark-text" v-if="orderInfo.isGiftCardReceiveBlind === 0">
|
||||||
<view class="v12-font-24 v12-dark-text">
|
<view class="v12-font-24 v12-dark-text">
|
||||||
商品总价
|
商品总价
|
||||||
@@ -500,7 +500,14 @@
|
|||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
<template v-if="status.type == 1" >
|
<template v-if="status.type == 1" >
|
||||||
<view class="v12-justify-between " style="width: 100%">
|
<view v-if="isCustomGiftOrder(orderInfo)" class="v12-justify-end" style="width: 100%">
|
||||||
|
<view
|
||||||
|
v-if="canShowModifyAddress(orderInfo) && orderInfo.isDrawOrder === 0"
|
||||||
|
class="bnt v12-dark-text v12-dark-border cancel"
|
||||||
|
@click="goAddress"
|
||||||
|
>修改地址</view>
|
||||||
|
</view>
|
||||||
|
<view v-else class="v12-justify-between " style="width: 100%">
|
||||||
<view class="v12-justify-between ">
|
<view class="v12-justify-between ">
|
||||||
<view v-if="orderInfo.isDrawOrder > 0" class="bnt v12-dark-text v12-dark-border cancel" @click.stop="callMerPhone">联系客服</view>
|
<view v-if="orderInfo.isDrawOrder > 0" class="bnt v12-dark-text v12-dark-border cancel" @click.stop="callMerPhone">联系客服</view>
|
||||||
<view v-if="orderInfo.isGiftCardReceiveBlind === 0 && orderInfo.isDrawOrder === 0" class="bnt v12-dark-text v12-dark-border cancel" @click="goRoom(orderInfo)">联系商家</view>
|
<view v-if="orderInfo.isGiftCardReceiveBlind === 0 && orderInfo.isDrawOrder === 0" class="bnt v12-dark-text v12-dark-border cancel" @click="goRoom(orderInfo)">联系商家</view>
|
||||||
@@ -515,7 +522,10 @@
|
|||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
<template v-if="status.type == 2">
|
<template v-if="status.type == 2">
|
||||||
<view class="v12-justify-between " style="width: 100%">
|
<view v-if="isCustomGiftOrder(orderInfo)" class="v12-justify-end" style="width: 100%">
|
||||||
|
<view class="bnt v12-primary-text v12-primary-border" @click="takeOrder">确认收货</view>
|
||||||
|
</view>
|
||||||
|
<view v-else class="v12-justify-between " style="width: 100%">
|
||||||
<view v-if="orderInfo.isGiftCardReceiveBlind === 0" class="bnt v12-dark-text v12-dark-border cancel" @click.stop="callMerPhone">联系客服</view>
|
<view v-if="orderInfo.isGiftCardReceiveBlind === 0" class="bnt v12-dark-text v12-dark-border cancel" @click.stop="callMerPhone">联系客服</view>
|
||||||
<view class="" v-else></view>
|
<view class="" v-else></view>
|
||||||
<view class="v12-justify-between">
|
<view class="v12-justify-between">
|
||||||
@@ -549,7 +559,11 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="bnt v12-dark-text v12-dark-border cancel" @click="buyAgin">再买一单</view>
|
<view class="bnt v12-dark-text v12-dark-border cancel" @click="buyAgin">再买一单</view>
|
||||||
<view class="bnt v12-primary-text v12-primary-border" @click="routerGo(orderInfo.cartInfo[0])">立即评价</view>
|
<view
|
||||||
|
v-if="canShowOrderEvaluate(orderInfo)"
|
||||||
|
class="bnt v12-primary-text v12-primary-border"
|
||||||
|
@click="routerGo(orderInfo.cartInfo[0])"
|
||||||
|
>立即评价</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
@@ -572,7 +586,7 @@
|
|||||||
|
|
||||||
<view class="bnt v12-dark-text v12-dark-border cancel" @click="buyAgin">再买一单</view>
|
<view class="bnt v12-dark-text v12-dark-border cancel" @click="buyAgin">再买一单</view>
|
||||||
<view
|
<view
|
||||||
v-if="!isGiftOrder(orderInfo)"
|
v-if="canShowOrderEvaluate(orderInfo)"
|
||||||
class="bnt v12-primary-text v12-primary-border"
|
class="bnt v12-primary-text v12-primary-border"
|
||||||
@click="routerGo(orderInfo.cartInfo[0])"
|
@click="routerGo(orderInfo.cartInfo[0])"
|
||||||
>立即评价</view>
|
>立即评价</view>
|
||||||
@@ -850,9 +864,10 @@ export default {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
goGoodsCon(item, isGiftCardReceiveBlind, isDrawOrder) {
|
goGoodsCon(item, isGiftCardReceiveBlind, isDrawOrder, scenarioCode) {
|
||||||
if(isGiftCardReceiveBlind) return
|
if(isGiftCardReceiveBlind) return
|
||||||
if(isDrawOrder) return
|
if(isDrawOrder) return
|
||||||
|
if (Number(scenarioCode) === 24) return
|
||||||
const activityId = Number(
|
const activityId = Number(
|
||||||
item.drawActivityId ||
|
item.drawActivityId ||
|
||||||
(item.productInfo && item.productInfo.drawActivityId) ||
|
(item.productInfo && item.productInfo.drawActivityId) ||
|
||||||
@@ -1029,6 +1044,75 @@ export default {
|
|||||||
}
|
}
|
||||||
return status;
|
return status;
|
||||||
},
|
},
|
||||||
|
getOrderScenarioCode(order = this.orderInfo) {
|
||||||
|
return Number(order && order.scenarioCode)
|
||||||
|
},
|
||||||
|
isWholesalerOrder(order = this.orderInfo) {
|
||||||
|
return this.getOrderScenarioCode(order) === 22
|
||||||
|
},
|
||||||
|
isCustomGiftOrder(order = this.orderInfo) {
|
||||||
|
return this.getOrderScenarioCode(order) === 24
|
||||||
|
},
|
||||||
|
isCollectiveOrder(order = this.orderInfo) {
|
||||||
|
return this.isWholesalerOrder(order) || this.isCustomGiftOrder(order)
|
||||||
|
},
|
||||||
|
canShowOrderEvaluate(order = this.orderInfo) {
|
||||||
|
return !this.isGiftOrder(order) && !this.isCollectiveOrder(order)
|
||||||
|
},
|
||||||
|
formatOrderDetailImage(image) {
|
||||||
|
const imageUrl = String(image || '').trim()
|
||||||
|
if (!imageUrl) {
|
||||||
|
return ''
|
||||||
|
}
|
||||||
|
if (/^https?:\/\//i.test(imageUrl)) {
|
||||||
|
return imageUrl
|
||||||
|
}
|
||||||
|
if (imageUrl.startsWith('//')) {
|
||||||
|
return `https:${imageUrl}`
|
||||||
|
}
|
||||||
|
if (imageUrl.startsWith('/')) {
|
||||||
|
const apiBaseUrl = String(this.$VUE_APP_API_URL || '').replace(/\/api\/?$/, '')
|
||||||
|
return `${apiBaseUrl}${imageUrl}`
|
||||||
|
}
|
||||||
|
return imageUrl
|
||||||
|
},
|
||||||
|
normalizeOrderDetailItem(item = {}, isCustomGift = false) {
|
||||||
|
if (isCustomGift) {
|
||||||
|
return {
|
||||||
|
image: this.formatOrderDetailImage(item.giftImage),
|
||||||
|
name: item.giftName || '商品信息',
|
||||||
|
sku: item.specName || '',
|
||||||
|
qty: Number(item.giftNum) || 1,
|
||||||
|
price: 0,
|
||||||
|
showPrice: false,
|
||||||
|
productId: '',
|
||||||
|
productInfo: {}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
const productInfo = item.productInfo || {}
|
||||||
|
const attrInfo = productInfo.attrInfo || {}
|
||||||
|
return {
|
||||||
|
...item,
|
||||||
|
image: this.formatOrderDetailImage(item.image || productInfo.image || attrInfo.image || ''),
|
||||||
|
name: productInfo.storeName || item.storeName || item.productName || '商品信息',
|
||||||
|
sku: attrInfo.sku || item.sku || item.specName || '',
|
||||||
|
qty: Number(item.cartNum || item.num || item.quantity || 1) || 1,
|
||||||
|
price: Number(item.truePrice || item.price || attrInfo.price || productInfo.price || 0) || 0,
|
||||||
|
showPrice: true,
|
||||||
|
productId: item.productId || productInfo.id || ''
|
||||||
|
}
|
||||||
|
},
|
||||||
|
getOrderDetailDisplayItems(order = this.orderInfo) {
|
||||||
|
if (this.isCustomGiftOrder(order)) {
|
||||||
|
const customGiftInfo = order && order.customGiftInfo
|
||||||
|
if (!customGiftInfo || typeof customGiftInfo !== 'object' || Array.isArray(customGiftInfo)) {
|
||||||
|
return []
|
||||||
|
}
|
||||||
|
return [this.normalizeOrderDetailItem(customGiftInfo, true)]
|
||||||
|
}
|
||||||
|
const cartList = Array.isArray(order && order.cartInfo) ? order.cartInfo : []
|
||||||
|
return cartList.map(item => this.normalizeOrderDetailItem(item))
|
||||||
|
},
|
||||||
getStatusImg(order) {
|
getStatusImg(order) {
|
||||||
const type = parseInt(order._status._type);
|
const type = parseInt(order._status._type);
|
||||||
let imgUrl = "";
|
let imgUrl = "";
|
||||||
@@ -1280,7 +1364,13 @@ export default {
|
|||||||
this.orderInfo = res.data
|
this.orderInfo = res.data
|
||||||
this.orderInfo._status._type = parseInt(this.orderInfo._status._type)
|
this.orderInfo._status._type = parseInt(this.orderInfo._status._type)
|
||||||
this.getOrderStatus()
|
this.getOrderStatus()
|
||||||
if (this.orderInfo.combinationId > 0) {
|
if (this.isWholesalerOrder(this.orderInfo)) {
|
||||||
|
this.orderTypeName = "采购批发订单"
|
||||||
|
this.orderTypeNameStatus = false
|
||||||
|
} else if (this.isCustomGiftOrder(this.orderInfo)) {
|
||||||
|
this.orderTypeName = "自建礼品订单"
|
||||||
|
this.orderTypeNameStatus = false
|
||||||
|
} else if (this.orderInfo.combinationId > 0) {
|
||||||
this.orderTypeName = "拼团订单"
|
this.orderTypeName = "拼团订单"
|
||||||
this.orderTypeNameStatus = false
|
this.orderTypeNameStatus = false
|
||||||
} else if (this.orderInfo.bargainId > 0) {
|
} else if (this.orderInfo.bargainId > 0) {
|
||||||
|
|||||||
@@ -6,21 +6,21 @@
|
|||||||
mode="scaleToFill"
|
mode="scaleToFill"
|
||||||
/>
|
/>
|
||||||
<image
|
<image
|
||||||
v-show="partnerType === 'province_partner' || partnerType === ''"
|
v-show="partnerType === 'province_partner' || partnerType === '' || partnerType === 'county_agent'"
|
||||||
:src="images.goodSupplierImage"
|
:src="images.goodSupplierImage"
|
||||||
class="img-item"
|
class="img-item"
|
||||||
mode="widthFix"
|
mode="widthFix"
|
||||||
@click="goto('goods_supplier')"
|
@click="goto('goods_supplier')"
|
||||||
/>
|
/>
|
||||||
<image
|
<image
|
||||||
v-show="partnerType === 'pioneer' || partnerType === ''"
|
v-show="partnerType === 'pioneer' || partnerType === '' || partnerType === 'county_agent'"
|
||||||
:src="images.wenwanSupplierImage"
|
:src="images.wenwanSupplierImage"
|
||||||
class="img-item"
|
class="img-item"
|
||||||
mode="widthFix"
|
mode="widthFix"
|
||||||
@click="goto('wenwan_supplier')"
|
@click="goto('wenwan_supplier')"
|
||||||
/>
|
/>
|
||||||
<image
|
<image
|
||||||
v-show="partnerType === 'pioneer' || partnerType === ''"
|
v-show="partnerType === 'pioneer' || partnerType === '' || partnerType === 'county_agent'"
|
||||||
:src="images.hotelImage"
|
:src="images.hotelImage"
|
||||||
class="img-item"
|
class="img-item"
|
||||||
mode="widthFix"
|
mode="widthFix"
|
||||||
|
|||||||
@@ -24,6 +24,7 @@
|
|||||||
:src="countyFamousTopImage"
|
:src="countyFamousTopImage"
|
||||||
class="img"
|
class="img"
|
||||||
mode="widthFix"
|
mode="widthFix"
|
||||||
|
:lazy-load="true"
|
||||||
/>
|
/>
|
||||||
<view v-if="list.length > 0" class="province-wrap" id="province-wrap">
|
<view v-if="list.length > 0" class="province-wrap" id="province-wrap">
|
||||||
<view
|
<view
|
||||||
@@ -39,6 +40,7 @@
|
|||||||
<image
|
<image
|
||||||
:src="item.icon"
|
:src="item.icon"
|
||||||
class="img"
|
class="img"
|
||||||
|
:lazy-load="true"
|
||||||
/>
|
/>
|
||||||
<view class="name one-t">
|
<view class="name one-t">
|
||||||
{{ item.provinceName }}
|
{{ item.provinceName }}
|
||||||
@@ -61,6 +63,7 @@
|
|||||||
<image
|
<image
|
||||||
:src="webUrl + '/page/qianxian/icon-06.png'"
|
:src="webUrl + '/page/qianxian/icon-06.png'"
|
||||||
class="icon"
|
class="icon"
|
||||||
|
:lazy-load="true"
|
||||||
/>
|
/>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -95,11 +98,13 @@
|
|||||||
<image
|
<image
|
||||||
:src="county.logo"
|
:src="county.logo"
|
||||||
class="county-img"
|
class="county-img"
|
||||||
|
:lazy-load="true"
|
||||||
/>
|
/>
|
||||||
<view class="county-name">
|
<view class="county-name">
|
||||||
<image
|
<image
|
||||||
:src="webUrl + '/home/icon-location.png'"
|
:src="webUrl + '/home/icon-location.png'"
|
||||||
class="icon"
|
class="icon"
|
||||||
|
:lazy-load="true"
|
||||||
/>
|
/>
|
||||||
<view class="county-txt one-t">
|
<view class="county-txt one-t">
|
||||||
{{ county.countyName }}
|
{{ county.countyName }}
|
||||||
@@ -118,11 +123,13 @@
|
|||||||
<image
|
<image
|
||||||
:src="county.logo"
|
:src="county.logo"
|
||||||
class="county-img"
|
class="county-img"
|
||||||
|
:lazy-load="true"
|
||||||
/>
|
/>
|
||||||
<view class="county-name">
|
<view class="county-name">
|
||||||
<image
|
<image
|
||||||
:src="webUrl + '/home/icon-location.png'"
|
:src="webUrl + '/home/icon-location.png'"
|
||||||
class="icon"
|
class="icon"
|
||||||
|
:lazy-load="true"
|
||||||
/>
|
/>
|
||||||
<view class="county-txt one-t">
|
<view class="county-txt one-t">
|
||||||
{{ county.countyName }}
|
{{ county.countyName }}
|
||||||
@@ -140,11 +147,13 @@
|
|||||||
<image
|
<image
|
||||||
:src="county.logo"
|
:src="county.logo"
|
||||||
class="county-img"
|
class="county-img"
|
||||||
|
:lazy-load="true"
|
||||||
/>
|
/>
|
||||||
<view class="county-name">
|
<view class="county-name">
|
||||||
<image
|
<image
|
||||||
:src="webUrl + '/home/icon-location.png'"
|
:src="webUrl + '/home/icon-location.png'"
|
||||||
class="icon"
|
class="icon"
|
||||||
|
:lazy-load="true"
|
||||||
/>
|
/>
|
||||||
<view class="county-txt one-t">
|
<view class="county-txt one-t">
|
||||||
{{ county.countyName }}
|
{{ county.countyName }}
|
||||||
@@ -160,6 +169,7 @@
|
|||||||
:src="webUrl + '/home/no-data-bg.png'"
|
:src="webUrl + '/home/no-data-bg.png'"
|
||||||
mode="widthFix"
|
mode="widthFix"
|
||||||
class="loadend"
|
class="loadend"
|
||||||
|
:lazy-load="true"
|
||||||
/>
|
/>
|
||||||
</view>
|
</view>
|
||||||
<image
|
<image
|
||||||
@@ -167,6 +177,7 @@
|
|||||||
:src="webUrl + '/orderIcon/nodata.png'"
|
:src="webUrl + '/orderIcon/nodata.png'"
|
||||||
class="img-nodata v12-mt-16"
|
class="img-nodata v12-mt-16"
|
||||||
mode="scaleToFill"
|
mode="scaleToFill"
|
||||||
|
:lazy-load="true"
|
||||||
/>
|
/>
|
||||||
</view>
|
</view>
|
||||||
<goo-skeleton
|
<goo-skeleton
|
||||||
|
|||||||
@@ -184,7 +184,7 @@ export default {
|
|||||||
.banner-swiper,
|
.banner-swiper,
|
||||||
.banner-fallback {
|
.banner-fallback {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 500rpx;
|
height: 750rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.banner-image {
|
.banner-image {
|
||||||
@@ -218,7 +218,7 @@ export default {
|
|||||||
margin-top: 20rpx;
|
margin-top: 20rpx;
|
||||||
padding: 20rpx 0rpx;
|
padding: 20rpx 0rpx;
|
||||||
border-radius: 16rpx;
|
border-radius: 16rpx;
|
||||||
font-size: 28rpx;
|
font-size: 30rpx;
|
||||||
line-height: 44rpx;
|
line-height: 44rpx;
|
||||||
color: #333;
|
color: #333;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
@@ -241,7 +241,7 @@ export default {
|
|||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
margin-top: 16rpx;
|
margin-top: 16rpx;
|
||||||
font-size: 26rpx;
|
font-size: 30rpx;
|
||||||
line-height: 40rpx;
|
line-height: 40rpx;
|
||||||
color: #333;
|
color: #333;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
@@ -267,7 +267,7 @@ export default {
|
|||||||
|
|
||||||
.detail-image {
|
.detail-image {
|
||||||
width: 280rpx;
|
width: 280rpx;
|
||||||
height: 220rpx;
|
height: 280rpx;
|
||||||
margin-right: 16rpx;
|
margin-right: 16rpx;
|
||||||
border-radius: 16rpx;
|
border-radius: 16rpx;
|
||||||
display: block;
|
display: block;
|
||||||
|
|||||||
@@ -224,7 +224,7 @@
|
|||||||
@click.stop="handleInfoHotelClick(item)"
|
@click.stop="handleInfoHotelClick(item)"
|
||||||
>
|
>
|
||||||
<view class="info-shop-logo">
|
<view class="info-shop-logo">
|
||||||
<image :src="item.linkHotelLogo" mode="aspectFill" />
|
<image :src="item.linkHotelLogo" mode="aspectFill" :lazy-load="true" />
|
||||||
</view>
|
</view>
|
||||||
<view class="info-shop-main">
|
<view class="info-shop-main">
|
||||||
<view class="info-shop-name">
|
<view class="info-shop-name">
|
||||||
@@ -245,6 +245,7 @@
|
|||||||
<image
|
<image
|
||||||
:src="webUrl + '/20230803152147141807.png'"
|
:src="webUrl + '/20230803152147141807.png'"
|
||||||
class="icon"
|
class="icon"
|
||||||
|
:lazy-load="true"
|
||||||
/>
|
/>
|
||||||
<text class="seeNum-txt">{{ $formatCount(item.pv) }}</text>
|
<text class="seeNum-txt">{{ $formatCount(item.pv) }}</text>
|
||||||
</view>
|
</view>
|
||||||
@@ -253,12 +254,14 @@
|
|||||||
v-if="!item.hasZan"
|
v-if="!item.hasZan"
|
||||||
:src="webUrl + '/page/hotel/zan-off-2.png'"
|
:src="webUrl + '/page/hotel/zan-off-2.png'"
|
||||||
class="zan-off-icon"
|
class="zan-off-icon"
|
||||||
|
:lazy-load="true"
|
||||||
@click="likeInfoItemHandle(item, index, item.zan + 1, true)"
|
@click="likeInfoItemHandle(item, index, item.zan + 1, true)"
|
||||||
/>
|
/>
|
||||||
<image
|
<image
|
||||||
v-else
|
v-else
|
||||||
:src="webUrl + '/page/hotel/zan-on-2.png'"
|
:src="webUrl + '/page/hotel/zan-on-2.png'"
|
||||||
class="zan-on-icon"
|
class="zan-on-icon"
|
||||||
|
:lazy-load="true"
|
||||||
@click="likeInfoItemHandle(item, index, item.zan - 1, false)"
|
@click="likeInfoItemHandle(item, index, item.zan - 1, false)"
|
||||||
/>
|
/>
|
||||||
<text
|
<text
|
||||||
@@ -390,6 +393,7 @@
|
|||||||
<image
|
<image
|
||||||
:src="item"
|
:src="item"
|
||||||
class="img"
|
class="img"
|
||||||
|
:lazy-load="true"
|
||||||
@click="showPic(index)"
|
@click="showPic(index)"
|
||||||
/>
|
/>
|
||||||
</view>
|
</view>
|
||||||
@@ -413,6 +417,7 @@
|
|||||||
:src="item.image"
|
:src="item.image"
|
||||||
mode="widthFix"
|
mode="widthFix"
|
||||||
class="img"
|
class="img"
|
||||||
|
:lazy-load="true"
|
||||||
/>
|
/>
|
||||||
<view class="info-wrap">
|
<view class="info-wrap">
|
||||||
<view class="time">
|
<view class="time">
|
||||||
@@ -470,6 +475,7 @@
|
|||||||
<image
|
<image
|
||||||
:src="webUrl + '/page/qianxian/icon-02.png'"
|
:src="webUrl + '/page/qianxian/icon-02.png'"
|
||||||
class="icon"
|
class="icon"
|
||||||
|
:lazy-load="true"
|
||||||
/>
|
/>
|
||||||
重点项目
|
重点项目
|
||||||
</view>
|
</view>
|
||||||
@@ -486,6 +492,7 @@
|
|||||||
<image
|
<image
|
||||||
:src="webUrl + '/page/qianxian/icon-05.png'"
|
:src="webUrl + '/page/qianxian/icon-05.png'"
|
||||||
class="icon"
|
class="icon"
|
||||||
|
:lazy-load="true"
|
||||||
/>
|
/>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -503,6 +510,7 @@
|
|||||||
<image
|
<image
|
||||||
:src="webUrl + '/page/qianxian/icon-02.png'"
|
:src="webUrl + '/page/qianxian/icon-02.png'"
|
||||||
class="icon"
|
class="icon"
|
||||||
|
:lazy-load="true"
|
||||||
/>
|
/>
|
||||||
招商政策
|
招商政策
|
||||||
</view>
|
</view>
|
||||||
@@ -525,6 +533,7 @@
|
|||||||
<image
|
<image
|
||||||
:src="webUrl + '/page/qianxian/icon-05.png'"
|
:src="webUrl + '/page/qianxian/icon-05.png'"
|
||||||
class="icon"
|
class="icon"
|
||||||
|
:lazy-load="true"
|
||||||
/>
|
/>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -605,11 +614,13 @@
|
|||||||
<image
|
<image
|
||||||
:src="shop.cover + (shop.coverType === 2 ? '?vframe/jpg/offset/1' : '')"
|
:src="shop.cover + (shop.coverType === 2 ? '?vframe/jpg/offset/1' : '')"
|
||||||
class="img"
|
class="img"
|
||||||
|
:lazy-load="true"
|
||||||
/>
|
/>
|
||||||
<view class="location">
|
<view class="location">
|
||||||
<image
|
<image
|
||||||
:src="webUrl + '/page/qianxian/icon-08.png'"
|
:src="webUrl + '/page/qianxian/icon-08.png'"
|
||||||
class="icon"
|
class="icon"
|
||||||
|
:lazy-load="true"
|
||||||
/>
|
/>
|
||||||
<view class="addr one-t">
|
<view class="addr one-t">
|
||||||
{{ shop.address }}
|
{{ shop.address }}
|
||||||
@@ -624,6 +635,7 @@
|
|||||||
<image
|
<image
|
||||||
:src="shop.logo"
|
:src="shop.logo"
|
||||||
class="logo"
|
class="logo"
|
||||||
|
:lazy-load="true"
|
||||||
/>
|
/>
|
||||||
<view class="name one-t">
|
<view class="name one-t">
|
||||||
{{ shop.name }}
|
{{ shop.name }}
|
||||||
|
|||||||
@@ -299,11 +299,12 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad(opts) {
|
onLoad(opts) {
|
||||||
this.cartId = opts.cartId
|
const pageQuery = Object.assign({}, this.resolvePageQuery(), opts || {})
|
||||||
this.isGroupBuy = opts.isGroupBuy === '1'
|
this.cartId = pageQuery.cartId
|
||||||
this.isCountyLotteryGift = opts.from === 'countyLottery' || opts.isCountyLotteryGift === '1' || !!opts.drawActivityId
|
this.isGroupBuy = pageQuery.isGroupBuy === '1'
|
||||||
|
this.isCountyLotteryGift = pageQuery.from === 'countyLottery' || pageQuery.isCountyLotteryGift === '1' || !!pageQuery.drawActivityId
|
||||||
// this.couponId = opts.couponId || 0
|
// this.couponId = opts.couponId || 0
|
||||||
this.discount = opts.discount
|
this.discount = pageQuery.discount
|
||||||
if(this.isGroupBuy) {
|
if(this.isGroupBuy) {
|
||||||
this.getGroupBuyInfo()
|
this.getGroupBuyInfo()
|
||||||
} else {
|
} else {
|
||||||
@@ -332,10 +333,39 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
resolvePageQuery() {
|
||||||
|
if (this.$yroute && this.$yroute.query) {
|
||||||
|
return this.$yroute.query
|
||||||
|
}
|
||||||
|
if (this.$route && this.$route.query) {
|
||||||
|
return this.$route.query
|
||||||
|
}
|
||||||
|
if (this._route && this._route.query) {
|
||||||
|
return this._route.query
|
||||||
|
}
|
||||||
|
return {}
|
||||||
|
},
|
||||||
getCouponId() {
|
getCouponId() {
|
||||||
if (this.isCountyLotteryGift) return 0
|
if (this.isCountyLotteryGift) return 0
|
||||||
return this.couponId || 0
|
return this.couponId || 0
|
||||||
},
|
},
|
||||||
|
isCountyLotteryCartItem(item) {
|
||||||
|
return Number(
|
||||||
|
(item && item.drawActivityId) ||
|
||||||
|
(item && item.productInfo && item.productInfo.drawActivityId) ||
|
||||||
|
0
|
||||||
|
) > 0
|
||||||
|
},
|
||||||
|
syncCountyLotteryGiftFlag(item) {
|
||||||
|
if (!this.isCountyLotteryGift && this.isCountyLotteryCartItem(item)) {
|
||||||
|
this.isCountyLotteryGift = true
|
||||||
|
}
|
||||||
|
if (!this.isCountyLotteryGift) return
|
||||||
|
this.couponTitle = ''
|
||||||
|
if (Number(this.couponId || 0) !== 0) {
|
||||||
|
this.couponId = 0
|
||||||
|
}
|
||||||
|
},
|
||||||
adjustCoverListForProductStory(coverList, productInfo, defaultTemplate) {
|
adjustCoverListForProductStory(coverList, productInfo, defaultTemplate) {
|
||||||
if (!productInfo || !productInfo.productStory) {
|
if (!productInfo || !productInfo.productStory) {
|
||||||
return {
|
return {
|
||||||
@@ -436,6 +466,7 @@ export default {
|
|||||||
this.giftNotice = res.data.giftCardGiftNotice
|
this.giftNotice = res.data.giftCardGiftNotice
|
||||||
this.orderKey = res.data.orderKey
|
this.orderKey = res.data.orderKey
|
||||||
this.goodsInfo = goodsInfo
|
this.goodsInfo = goodsInfo
|
||||||
|
this.syncCountyLotteryGiftFlag(goodsInfo)
|
||||||
this.templateId = template.id
|
this.templateId = template.id
|
||||||
this.defaultIndex = this.coverList.findIndex(item => item.id === this.templateId)
|
this.defaultIndex = this.coverList.findIndex(item => item.id === this.templateId)
|
||||||
console.log(this.defaultIndex, 'defaultIndex');
|
console.log(this.defaultIndex, 'defaultIndex');
|
||||||
@@ -522,6 +553,7 @@ export default {
|
|||||||
this.giftNotice = res.data.giftCardGiftNotice
|
this.giftNotice = res.data.giftCardGiftNotice
|
||||||
this.orderKey = res.data.orderKey
|
this.orderKey = res.data.orderKey
|
||||||
this.goodsInfo = goodsInfo
|
this.goodsInfo = goodsInfo
|
||||||
|
this.syncCountyLotteryGiftFlag(goodsInfo)
|
||||||
this.templateId = template.id
|
this.templateId = template.id
|
||||||
this.selectedCover = template.cover
|
this.selectedCover = template.cover
|
||||||
this.giftImage = template.image
|
this.giftImage = template.image
|
||||||
|
|||||||
Reference in New Issue
Block a user