合并冲突
commit
3b036a7cb7
|
@ -202,6 +202,22 @@ export function getGoodsCollection(params, type) {
|
|||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取商品收藏
|
||||
* @param params
|
||||
* @returns {AxiosPromise}
|
||||
*/
|
||||
export function getStoreCollection(params, type) {
|
||||
return http.request({
|
||||
url: `/member/storeCollection/${type}`,
|
||||
method: Method.GET,
|
||||
needToken: true,
|
||||
loading: false,
|
||||
message: false,
|
||||
params,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 收藏商品
|
||||
* @returns {AxiosPromise}
|
||||
|
@ -236,7 +252,7 @@ export function deleteGoodsCollection(ids) {
|
|||
*/
|
||||
export function deleteStoreCollection(store_id) {
|
||||
return http.request({
|
||||
url: `/member/collection/delete/STORE/${store_id}`,
|
||||
url: `/member/storeCollection/delete/STORE/${store_id}`,
|
||||
method: Method.DELETE,
|
||||
needToken: true,
|
||||
});
|
||||
|
@ -255,6 +271,19 @@ export function getGoodsIsCollect(type, good_id) {
|
|||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取商品是否被收藏
|
||||
* @param good_id
|
||||
*/
|
||||
export function getStoreIsCollect(type, store_id) {
|
||||
return http.request({
|
||||
url: `/member/storeCollection/isCollection/${type}/${store_id}`,
|
||||
method: Method.GET,
|
||||
needToken: true,
|
||||
loading: false,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 收藏店铺
|
||||
* @param store_id 店铺ID
|
||||
|
@ -262,10 +291,9 @@ export function getGoodsIsCollect(type, good_id) {
|
|||
*/
|
||||
export function collectionStore(store_id) {
|
||||
return http.request({
|
||||
url: "members/collection/store",
|
||||
header: { "content-type": "application/x-www-form-urlencoded" },
|
||||
url: `/member/storeCollection/add/STORE/${store_id}`,
|
||||
method: Method.POST,
|
||||
data: { store_id },
|
||||
needToken: true,
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
@ -96,8 +96,7 @@
|
|||
<!-- 数量 -->
|
||||
<view class="goods-skus-number flex flex-a-c flex-j-sb">
|
||||
<view class="view-class-title">数量</view>
|
||||
|
||||
<u-input class="view-class-input" input-align="right" v-model="num" type="number" @blur="numCheck()" />
|
||||
<uni-number-box class="uNumber" :min="1" :max="999" v-model="num"></uni-number-box>
|
||||
</view>
|
||||
</scroll-view>
|
||||
<!-- 按钮 -->
|
||||
|
@ -112,8 +111,11 @@
|
|||
<script>
|
||||
import * as API_trade from '@/api/trade.js';
|
||||
import setup from './popup';
|
||||
|
||||
import uniNumberBox from '@/components/uni-number-box'
|
||||
export default {
|
||||
components: {
|
||||
uniNumberBox
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
setup,
|
||||
|
|
|
@ -0,0 +1,34 @@
|
|||
<template>
|
||||
<div>
|
||||
<u-popup v-model="show" mode="bottom" height="800rpx" border-radius="14">
|
||||
<div class="wrapper">
|
||||
<view class="down-goods-tips">该商品已下架</view>
|
||||
<scroll-view scroll-y="true" style="height: 670rpx">
|
||||
<goodsRecommend title="其他商品" />
|
||||
</scroll-view>
|
||||
</div>
|
||||
</u-popup>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import goodsRecommend from "@/components/m-goods-recommend/index.vue";
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
show: true, // 是否显示
|
||||
};
|
||||
},
|
||||
components: { goodsRecommend },
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.down-goods-tips {
|
||||
font-size: 36rpx;
|
||||
text-align: center;
|
||||
font-weight: bold;
|
||||
padding: 40rpx 0;
|
||||
}
|
||||
</style>
|
|
@ -121,6 +121,7 @@ export default {
|
|||
|
||||
// 选择地址后数据的回调
|
||||
callBackAddress(val) {
|
||||
console.log(val)
|
||||
uni.showLoading({
|
||||
title: "加载中",
|
||||
});
|
||||
|
@ -133,7 +134,7 @@ export default {
|
|||
this.form.consigneeAddressPath = val.data.result.name; //地址名称, ','分割
|
||||
this.form.lat = val.latitude; //纬度
|
||||
this.form.lon = val.longitude; //经度
|
||||
if (this.$store.state.isShowToast){ uni.hideLoading() };
|
||||
uni.hideLoading();
|
||||
}
|
||||
|
||||
this.mapFlag = !this.mapFlag; //关闭地图
|
||||
|
|
|
@ -64,6 +64,7 @@
|
|||
<script>
|
||||
import {
|
||||
getGoodsCollection,
|
||||
getStoreCollection,
|
||||
deleteGoodsCollection,
|
||||
deleteStoreCollection,
|
||||
} from "@/api/members.js";
|
||||
|
@ -105,21 +106,34 @@
|
|||
storeList: [], //店铺集合
|
||||
};
|
||||
},
|
||||
onLoad() {
|
||||
this.getGoodList();
|
||||
this.getStoreList();
|
||||
onShow() {
|
||||
this.fetchReloadOrNextPage('reload')
|
||||
},
|
||||
onReachBottom() {
|
||||
this.fetchReloadOrNextPage('next')
|
||||
},
|
||||
|
||||
methods: {
|
||||
// 刷新或者下一页
|
||||
fetchReloadOrNextPage(type) {
|
||||
if(type == 'next'){
|
||||
this.navList[this.tabCurrentIndex].params.pageNumber ++;
|
||||
if (this.tabCurrentIndex == 0) {
|
||||
this.navList[0].params.pageNumber++;
|
||||
this.getGoodList();
|
||||
} else {
|
||||
this.navList[1].params.pageNumber++;
|
||||
this.getStoreList();
|
||||
}
|
||||
}
|
||||
else{
|
||||
this.navList[0].params.pageNumber = 1;
|
||||
this.navList[1].params.pageNumber = 1;
|
||||
this.goodList = [];
|
||||
this.storeList = [];
|
||||
this.getGoodList();
|
||||
this.getStoreList();
|
||||
}
|
||||
},
|
||||
|
||||
methods: {
|
||||
/**
|
||||
* 打开商品左侧取消收藏
|
||||
*/
|
||||
|
@ -154,7 +168,7 @@
|
|||
* 点击店铺左侧取消收藏
|
||||
*/
|
||||
clickStoreSwiperAction(val) {
|
||||
deleteStoreCollection(val.storeId).then((res) => {
|
||||
deleteStoreCollection(val.id).then((res) => {
|
||||
if (res.statusCode == 200) {
|
||||
this.storeList = [];
|
||||
this.getStoreList();
|
||||
|
@ -224,7 +238,7 @@
|
|||
uni.showLoading({
|
||||
title: "加载中",
|
||||
});
|
||||
getGoodsCollection(this.navList[1].params, "store").then((res) => {
|
||||
getStoreCollection(this.navList[1].params, "STORE").then((res) => {
|
||||
if (this.$store.state.isShowToast){ uni.hideLoading() };
|
||||
uni.stopPullDownRefresh();
|
||||
if (res.data.success) {
|
||||
|
|
|
@ -6,16 +6,21 @@
|
|||
<u-empty text="暂无历史记录" style="margin-top:200rpx;" mode="history" v-if="whetherEmpty"></u-empty>
|
||||
<div v-else>
|
||||
<view v-for="(item, index) in trackList" :key="index">
|
||||
<view class="myTracks-title" @click="navgaiteToStore(item)">{{item.storeName}}</view>
|
||||
<view class="myTracks-title" @click="navigateToStore(item)" v-if="item.storeName">{{item.storeName}}</view>
|
||||
<view class="myTracks-items">
|
||||
|
||||
<u-swipe-action style="width: 100%;" :show="item.show" :index="index" :key="item.id"
|
||||
@click="delTracks" @open="open" :options="options">
|
||||
<view class="myTracks-item">
|
||||
<view class="myTracks-item-img" @click.stop="navgaiteToDetail(item)">
|
||||
<!-- 已失效商品 -->
|
||||
<div class="myTracks-item lose-goods" v-if="!item.storeName && !item.goodsName && !item.price">
|
||||
已失效商品
|
||||
</div>
|
||||
<!-- 正常有效商品 -->
|
||||
<view v-else class="myTracks-item">
|
||||
<view class="myTracks-item-img" @click.stop="navigateToDetail(item)">
|
||||
<image :src="item.thumbnail"></image>
|
||||
</view>
|
||||
<view class="myTracks-item-content" @click.stop="navgaiteToDetail(item)">
|
||||
<view class="myTracks-item-content" @click.stop="navigateToDetail(item)">
|
||||
<view class="myTracks-item-title">
|
||||
{{ item.goodsName }}
|
||||
<view class="myTracks-item-title-desc"> </view>
|
||||
|
@ -72,6 +77,7 @@
|
|||
this.getList();
|
||||
},
|
||||
onShow() {
|
||||
this.params.pageNumber = 1
|
||||
this.trackList = [];
|
||||
this.getList();
|
||||
},
|
||||
|
@ -83,7 +89,7 @@
|
|||
/**
|
||||
* 导航到店铺
|
||||
*/
|
||||
navgaiteToStore(val) {
|
||||
navigateToStore(val) {
|
||||
uni.navigateTo({
|
||||
url: "/pages/product/shopPage?id=" + val.storeId,
|
||||
});
|
||||
|
@ -99,7 +105,7 @@
|
|||
/**
|
||||
* 跳转详情
|
||||
*/
|
||||
navgaiteToDetail(item) {
|
||||
navigateToDetail(item) {
|
||||
uni.navigateTo({
|
||||
url: "/pages/product/goods?id=" + item.id + "&goodsId=" + item.goodsId,
|
||||
});
|
||||
|
@ -154,6 +160,10 @@
|
|||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.lose-goods{
|
||||
color: $main-color;
|
||||
padding-left: 50rpx !important;
|
||||
}
|
||||
.myTracks {
|
||||
width: 100%;
|
||||
padding-top: 2rpx;
|
||||
|
@ -224,36 +234,10 @@
|
|||
padding: 10rpx 0 0 0;
|
||||
}
|
||||
|
||||
.myTracks-action {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
background: #fff;
|
||||
height: 75rpx;
|
||||
align-items: center;
|
||||
padding: 0 32rpx;
|
||||
}
|
||||
|
||||
.myTracks-action-btn {
|
||||
width: 130rpx;
|
||||
height: 60rpx;
|
||||
line-height: 60rpx;
|
||||
}
|
||||
|
||||
.myTracks-divider {
|
||||
width: 100%;
|
||||
height: 20rpx;
|
||||
}
|
||||
|
||||
|
||||
|
||||
.myTracks-action-check {
|
||||
align-items: center;
|
||||
display: -webkit-box;
|
||||
display: -webkit-flex;
|
||||
display: flex;
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -1,7 +1,11 @@
|
|||
<template>
|
||||
<div class="wrapper">
|
||||
<!-- 选择地址 -->
|
||||
<div class="address-box" @click="clickToAddress()" v-if="shippingText == 'LOGISTICS'">
|
||||
<div
|
||||
class="address-box"
|
||||
@click="clickToAddress()"
|
||||
v-if="shippingText == 'LOGISTICS'"
|
||||
>
|
||||
<div class="user-box flex">
|
||||
<div class="flex-8">
|
||||
<div v-if="!address.id">请选择地址</div>
|
||||
|
@ -10,8 +14,15 @@
|
|||
<!-- 省市区 -->
|
||||
<div class="flex flex-a-c">
|
||||
<span class="default" v-if="address.isDefault">默认</span>
|
||||
<div class="address-list" v-if="address.consigneeAddressPath.length != 0">
|
||||
<span class="address-item" v-for="(item, index) in address.consigneeAddressPath" :key="index">
|
||||
<div
|
||||
class="address-list"
|
||||
v-if="address.consigneeAddressPath.length != 0"
|
||||
>
|
||||
<span
|
||||
class="address-item"
|
||||
v-for="(item, index) in address.consigneeAddressPath"
|
||||
:key="index"
|
||||
>
|
||||
{{ item }}
|
||||
</span>
|
||||
</div>
|
||||
|
@ -45,13 +56,10 @@
|
|||
{{ storeAddress.address }}
|
||||
</div>
|
||||
<!-- 联系手机号 -->
|
||||
<div>
|
||||
<div></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div v-else>
|
||||
请选择自提点
|
||||
</div>
|
||||
<div v-else>请选择自提点</div>
|
||||
</div>
|
||||
<u-icon name="arrow-right" style="color: #bababa"></u-icon>
|
||||
</div>
|
||||
|
@ -60,28 +68,50 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- 开团信息 -->
|
||||
<view class="group-box" v-if="isAssemble">
|
||||
<view class="group-title">
|
||||
<span v-if="pintuanFlage">你正在开团购买</span>
|
||||
<span v-else>为你加入仅差<span>{{ routerVal.parentOrder.toBeGroupedNum }}</span>人的团购买</span>
|
||||
<span v-else
|
||||
>为你加入仅差<span>{{ routerVal.parentOrder.toBeGroupedNum }}</span
|
||||
>人的团购买</span
|
||||
>
|
||||
</view>
|
||||
<view class="group">
|
||||
<view>
|
||||
<u-image borderRadius="50%" shape="square" class="head-img" width="81rpx" height="81rpx"
|
||||
:src="masterWay.face || userImage"></u-image>
|
||||
<u-image
|
||||
borderRadius="50%"
|
||||
shape="square"
|
||||
class="head-img"
|
||||
width="81rpx"
|
||||
height="81rpx"
|
||||
:src="masterWay.face || userImage"
|
||||
></u-image>
|
||||
<view class="btn-one">团长</view>
|
||||
</view>
|
||||
<view class="line"> </view>
|
||||
<view>
|
||||
<!-- 如果有最后一名,显示最后一名,没有最后一名,显示等待参团 -->
|
||||
<u-image class="head-img" v-if="endWay.face" :src="endWay.face" borderRadius="50%" shape="square"
|
||||
width="81rpx" height="81rpx">
|
||||
<u-image
|
||||
class="head-img"
|
||||
v-if="endWay.face"
|
||||
:src="endWay.face"
|
||||
borderRadius="50%"
|
||||
shape="square"
|
||||
width="81rpx"
|
||||
height="81rpx"
|
||||
>
|
||||
<view slot="loading"></view>
|
||||
</u-image>
|
||||
<u-image class="head-img" borderRadius="50%" shape="square" v-else width="81rpx" height="81rpx"
|
||||
:src="endWay.face || userImage"></u-image>
|
||||
<u-image
|
||||
class="head-img"
|
||||
borderRadius="50%"
|
||||
shape="square"
|
||||
v-else
|
||||
width="81rpx"
|
||||
height="81rpx"
|
||||
:src="endWay.face || userImage"
|
||||
></u-image>
|
||||
|
||||
<view class="wait">{{ endWay.nickname || "等待参团" }}</view>
|
||||
</view>
|
||||
|
@ -89,7 +119,11 @@
|
|||
</view>
|
||||
|
||||
<!-- 店铺商品信息 -->
|
||||
<div class="box box2" v-for="(item, index) in orderMessage.cartList" :key="index">
|
||||
<div
|
||||
class="box box2"
|
||||
v-for="(item, index) in orderMessage.cartList"
|
||||
:key="index"
|
||||
>
|
||||
<div v-if="item.checked">
|
||||
<div @click="navigateToStore(item)">
|
||||
<div class="store-name">
|
||||
|
@ -97,25 +131,42 @@
|
|||
</div>
|
||||
</div>
|
||||
<div class="promotionNotice">{{ item.promotionNotice || "" }}</div>
|
||||
<div class="flex goods-item" v-for="(val, i) in item.checkedSkuList" :key="i">
|
||||
<div class="goods-image" @click="
|
||||
<div
|
||||
class="flex goods-item"
|
||||
v-for="(val, i) in item.checkedSkuList"
|
||||
:key="i"
|
||||
>
|
||||
<div
|
||||
class="goods-image"
|
||||
@click="
|
||||
navigateTo(
|
||||
'/pages/product/goods?id=' +
|
||||
val.goodsSku.id +
|
||||
'&goodsId=' +
|
||||
val.goodsSku.goodsId
|
||||
)
|
||||
" :span="3">
|
||||
<u-image borderRadius="10rpx" width="200rpx" height="200rpx" :src="val.goodsSku.thumbnail" alt />
|
||||
"
|
||||
:span="3"
|
||||
>
|
||||
<u-image
|
||||
borderRadius="10rpx"
|
||||
width="200rpx"
|
||||
height="200rpx"
|
||||
:src="val.goodsSku.thumbnail"
|
||||
alt
|
||||
/>
|
||||
</div>
|
||||
<div @click="
|
||||
<div
|
||||
@click="
|
||||
navigateTo(
|
||||
'/pages/product/goods?id=' +
|
||||
val.goodsSku.id +
|
||||
'&goodsId=' +
|
||||
val.goodsSku.goodsId
|
||||
)
|
||||
" class="goods-detail">
|
||||
"
|
||||
class="goods-detail"
|
||||
>
|
||||
<div class="flex">
|
||||
<p class="goods-name">{{ val.goodsSku.goodsName }}</p>
|
||||
<span class="nums">x{{ val.num }}</span>
|
||||
|
@ -125,22 +176,43 @@
|
|||
<span class="goods-price">{{
|
||||
$options.filters.goodsFormatPrice(val.purchasePrice)[0]
|
||||
}}</span>
|
||||
<span>.{{ $options.filters.goodsFormatPrice(val.purchasePrice)[1] }}</span>
|
||||
<span
|
||||
>.{{
|
||||
$options.filters.goodsFormatPrice(val.purchasePrice)[1]
|
||||
}}</span
|
||||
>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<u-row>
|
||||
<u-col :offset="0" :span="4">发票信息</u-col>
|
||||
<u-col :span="8" class="tipsColor" textAlign="right" @click.native="invoice()">
|
||||
<span v-if="receiptList">{{ receiptList.receiptTitle }} -
|
||||
{{ receiptList.receiptContent }}</span>
|
||||
<u-col
|
||||
:span="8"
|
||||
class="tipsColor"
|
||||
textAlign="right"
|
||||
@click.native="invoice()"
|
||||
>
|
||||
<span v-if="receiptList"
|
||||
>{{ receiptList.receiptTitle }} -
|
||||
{{ receiptList.receiptContent }}</span
|
||||
>
|
||||
<span v-else>不开发票</span>
|
||||
</u-col>
|
||||
</u-row>
|
||||
<u-row>
|
||||
<u-col v-if="orderMessage.cartTypeEnum != 'VIRTUAL'" :offset="0" :span="9" @click="shippingFlag = true">配送
|
||||
<u-col
|
||||
v-if="orderMessage.cartTypeEnum != 'VIRTUAL'"
|
||||
:offset="0"
|
||||
:span="9"
|
||||
@click="shippingFlag = true"
|
||||
>配送
|
||||
</u-col>
|
||||
<u-col v-if="orderMessage.cartTypeEnum != 'VIRTUAL'" :span="3" textAlign="right" @click="shippingFlag = true">
|
||||
<u-col
|
||||
v-if="orderMessage.cartTypeEnum != 'VIRTUAL'"
|
||||
:span="3"
|
||||
textAlign="right"
|
||||
@click="shippingFlag = true"
|
||||
>
|
||||
{{
|
||||
shippingMethod.find((e) => {
|
||||
return e.value == shippingText;
|
||||
|
@ -149,40 +221,72 @@
|
|||
</u-col>
|
||||
</u-row>
|
||||
<u-row>
|
||||
<u-col :offset="0" :span="4" class="tl" style="text-align: left">备注信息</u-col>
|
||||
<u-col :offset="0" :span="4" class="tl" style="text-align: left"
|
||||
>备注信息</u-col
|
||||
>
|
||||
<u-col :span="8" textAlign="right">
|
||||
<u-input style="text-align: right" class="uinput" v-model="remarkVal[index].remark" />
|
||||
<u-input
|
||||
style="text-align: right"
|
||||
class="uinput"
|
||||
v-model="remarkVal[index].remark"
|
||||
/>
|
||||
</u-col>
|
||||
</u-row>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 发票信息 -->
|
||||
<invoices :res="receiptList" @callbackInvoice="callbackInvoice" v-if="invoiceFlag" />
|
||||
<u-select @confirm="confirmDistribution" v-model="shippingFlag" v-if="shippingMethod.length != 0"
|
||||
:list="shippingMethod"></u-select>
|
||||
<invoices
|
||||
:res="receiptList"
|
||||
@callbackInvoice="callbackInvoice"
|
||||
v-if="invoiceFlag"
|
||||
/>
|
||||
<u-select
|
||||
@confirm="confirmDistribution"
|
||||
v-model="shippingFlag"
|
||||
v-if="shippingMethod.length != 0"
|
||||
:list="shippingMethod"
|
||||
></u-select>
|
||||
|
||||
<div class="box box5" v-if="orderMessage.priceDetailDTO">
|
||||
<div>
|
||||
<u-row>
|
||||
<u-col :span="9">商品合计</u-col>
|
||||
<u-col :span="3" textAlign="right">
|
||||
<span>¥{{ orderMessage.priceDetailDTO.goodsPrice | unitPrice }}</span>
|
||||
<span
|
||||
>¥{{ orderMessage.priceDetailDTO.goodsPrice | unitPrice }}</span
|
||||
>
|
||||
</u-col>
|
||||
</u-row>
|
||||
</div>
|
||||
<div>
|
||||
<u-row v-if="shippingText == 'LOGISTICS'">
|
||||
<u-col v-if="orderMessage.cartTypeEnum != 'VIRTUAL'" :span="7">运费</u-col>
|
||||
<u-col v-if="orderMessage.cartTypeEnum != 'VIRTUAL'" :span="5" class="tr tipsColor" textAlign="right">
|
||||
<span v-if="orderMessage.priceDetailDTO.freightPrice == 0">包邮</span>
|
||||
<span v-else>¥{{
|
||||
<u-col v-if="orderMessage.cartTypeEnum != 'VIRTUAL'" :span="7"
|
||||
>运费</u-col
|
||||
>
|
||||
<u-col
|
||||
v-if="orderMessage.cartTypeEnum != 'VIRTUAL'"
|
||||
:span="5"
|
||||
class="tr tipsColor"
|
||||
textAlign="right"
|
||||
>
|
||||
<span v-if="orderMessage.priceDetailDTO.freightPrice == 0"
|
||||
>包邮</span
|
||||
>
|
||||
<span v-else
|
||||
>¥{{
|
||||
orderMessage.priceDetailDTO.freightPrice | unitPrice
|
||||
}}</span>
|
||||
}}</span
|
||||
>
|
||||
</u-col>
|
||||
</u-row>
|
||||
</div>
|
||||
<u-row v-if="orderMessage.priceDetailDTO.goodsPrice != 0 && orderMessage.priceDetailDTO.goodsPrice != null">
|
||||
<u-row
|
||||
v-if="
|
||||
orderMessage.priceDetailDTO.goodsPrice != 0 &&
|
||||
orderMessage.priceDetailDTO.goodsPrice != null
|
||||
"
|
||||
>
|
||||
<u-col :offset="0" :span="9" @click="GET_Discount()">优惠券</u-col>
|
||||
<u-col
|
||||
:span="3"
|
||||
|
@ -206,9 +310,14 @@
|
|||
<div>
|
||||
<u-row>
|
||||
<u-col :span="9">优惠金额</u-col>
|
||||
<u-col :span="3" textAlign="right" v-if="orderMessage.priceDetailDTO.couponPrice">
|
||||
<u-col
|
||||
:span="3"
|
||||
textAlign="right"
|
||||
v-if="orderMessage.priceDetailDTO.couponPrice"
|
||||
>
|
||||
<span class="main-color">
|
||||
-¥{{ orderMessage.priceDetailDTO.couponPrice | unitPrice }}</span>
|
||||
-¥{{ orderMessage.priceDetailDTO.couponPrice | unitPrice }}</span
|
||||
>
|
||||
</u-col>
|
||||
<u-col :span="3" textAlign="right" v-else>0.00</u-col>
|
||||
</u-row>
|
||||
|
@ -217,9 +326,11 @@
|
|||
<u-row>
|
||||
<u-col :span="6">活动优惠</u-col>
|
||||
<u-col :span="6" class="tr tipsColor" textAlign="right">
|
||||
<span v-if="orderMessage.priceDetailDTO.discountPrice">-¥{{
|
||||
<span v-if="orderMessage.priceDetailDTO.discountPrice"
|
||||
>-¥{{
|
||||
orderMessage.priceDetailDTO.discountPrice | unitPrice
|
||||
}}</span>
|
||||
}}</span
|
||||
>
|
||||
<span v-else>0.00</span>
|
||||
</u-col>
|
||||
</u-row>
|
||||
|
@ -228,7 +339,12 @@
|
|||
|
||||
<!-- 配送地区没有提示 -->
|
||||
<div class="notSupportFreight" v-if="notSupportFreight.length != 0">
|
||||
<u-notice-bar style="width: 100%" :volume-icon="false" mode="horizontal" :list="notSupportFreightGoodsList">
|
||||
<u-notice-bar
|
||||
style="width: 100%"
|
||||
:volume-icon="false"
|
||||
mode="horizontal"
|
||||
:list="notSupportFreightGoodsList"
|
||||
>
|
||||
</u-notice-bar>
|
||||
</div>
|
||||
|
||||
|
@ -239,14 +355,24 @@
|
|||
<div v-if="!orderMessage.priceDetailDTO.payPoint" class="number">
|
||||
<span>¥</span>
|
||||
<span class="price">{{
|
||||
$options.filters.goodsFormatPrice(orderMessage.priceDetailDTO.flowPrice)[0]
|
||||
$options.filters.goodsFormatPrice(
|
||||
orderMessage.priceDetailDTO.flowPrice
|
||||
)[0]
|
||||
}}</span>
|
||||
<span>.{{ $options.filters.goodsFormatPrice(orderMessage.priceDetailDTO.flowPrice)[1] }}
|
||||
<span
|
||||
>.{{
|
||||
$options.filters.goodsFormatPrice(
|
||||
orderMessage.priceDetailDTO.flowPrice
|
||||
)[1]
|
||||
}}
|
||||
</span>
|
||||
</div>
|
||||
<span v-else class="number"><span style="margin-right: 10rpx">{{
|
||||
<span v-else class="number"
|
||||
><span style="margin-right: 10rpx">{{
|
||||
orderMessage.priceDetailDTO.payPoint | unitPrice
|
||||
}}</span>积分</span>
|
||||
}}</span
|
||||
>积分</span
|
||||
>
|
||||
</div>
|
||||
<div class="navRiv" @click="createTradeFun()">
|
||||
<!-- #ifndef MP-WEIXIN -->
|
||||
|
@ -264,9 +390,9 @@ import * as API_Trade from "@/api/trade";
|
|||
import * as API_Address from "@/api/address";
|
||||
import * as API_Order from "@/api/order";
|
||||
import invoices from "@/pages/order/invoice/setInvoice";
|
||||
|
||||
import { mapState } from "vuex";
|
||||
import LiLiWXPay from "@/js_sdk/lili-pay/wx-pay.js";
|
||||
import configs from '@/config/config'
|
||||
import configs from "@/config/config";
|
||||
export default {
|
||||
onLoad: function (val) {
|
||||
this.routerVal = val;
|
||||
|
@ -275,7 +401,6 @@ export default {
|
|||
invoices,
|
||||
},
|
||||
|
||||
watch: {},
|
||||
data() {
|
||||
return {
|
||||
configs,
|
||||
|
@ -295,7 +420,8 @@ export default {
|
|||
},
|
||||
],
|
||||
isAssemble: false, //是否拼团
|
||||
couponNums: "", //结算页面优惠券数量
|
||||
// 判断是否填写过备注
|
||||
remarkFlag: false,
|
||||
selectAddressId: "",
|
||||
routerVal: "",
|
||||
params: {},
|
||||
|
@ -311,6 +437,7 @@ export default {
|
|||
data: "",
|
||||
// 存储备注
|
||||
remarkVal: [],
|
||||
remarkVal1: "",
|
||||
detail: "", //返回的所有数据
|
||||
endWay: "", //最后一个参团人
|
||||
masterWay: "", //团长信息
|
||||
|
@ -320,6 +447,19 @@ export default {
|
|||
storeAddress: "",
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
// 监听备注 并在 vuex 中存储
|
||||
remarkVal: {
|
||||
handler(val) {
|
||||
this.$store.commit("setRemark", val);
|
||||
},
|
||||
immediate: true,
|
||||
deep: true,
|
||||
},
|
||||
},
|
||||
computed: {
|
||||
...mapState(["remark"]),
|
||||
},
|
||||
filters: {
|
||||
/**
|
||||
* 发票收据类型
|
||||
|
@ -368,12 +508,18 @@ export default {
|
|||
},
|
||||
|
||||
async onShow() {
|
||||
// 判断是否存在写过备注信息的商品
|
||||
if (this.remark && this.remark.length > 0) {
|
||||
this.remarkFlag = true;
|
||||
}
|
||||
uni.showLoading({
|
||||
mask: true,
|
||||
});
|
||||
await this.getOrderList();
|
||||
await this.getDistribution();
|
||||
if (this.$store.state.isShowToast){ uni.hideLoading() };
|
||||
if (this.$store.state.isShowToast) {
|
||||
uni.hideLoading();
|
||||
}
|
||||
if (this.routerVal.way == "PINTUAN") {
|
||||
this.isAssemble = true;
|
||||
this.routerVal.parentOrder = JSON.parse(
|
||||
|
@ -411,7 +557,8 @@ export default {
|
|||
// 点击跳转地址
|
||||
clickToAddress() {
|
||||
this.navigateTo(
|
||||
`/pages/mine/address/address?from=cart&way=${this.routerVal.way
|
||||
`/pages/mine/address/address?from=cart&way=${
|
||||
this.routerVal.way
|
||||
}&parentOrder=${encodeURIComponent(
|
||||
JSON.stringify(this.routerVal.parentOrder)
|
||||
)}`
|
||||
|
@ -419,8 +566,7 @@ export default {
|
|||
},
|
||||
clickToStoreAddress() {
|
||||
this.navigateTo(
|
||||
`/pages/mine/address/storeAddress?from=cart&way=${this.routerVal.way
|
||||
}&storeId=${this.remarkVal[0].storeId}`
|
||||
`/pages/mine/address/storeAddress?from=cart&way=${this.routerVal.way}&storeId=${this.remarkVal[0].storeId}`
|
||||
);
|
||||
},
|
||||
|
||||
|
@ -496,7 +642,7 @@ export default {
|
|||
createTradeFun() {
|
||||
// 防抖
|
||||
this.$u.throttle(() => {
|
||||
if (this.shippingText === 'SELF_PICK_UP') {
|
||||
if (this.shippingText === "SELF_PICK_UP") {
|
||||
if (!this.storeAddress.id) {
|
||||
uni.showToast({
|
||||
title: "请选择提货点",
|
||||
|
@ -505,7 +651,7 @@ export default {
|
|||
});
|
||||
return false;
|
||||
}
|
||||
} else if (this.shippingText === 'LOGISTICS') {
|
||||
} else if (this.shippingText === "LOGISTICS") {
|
||||
if (!this.address.id) {
|
||||
uni.showToast({
|
||||
title: "请选择地址",
|
||||
|
@ -602,12 +748,14 @@ export default {
|
|||
},
|
||||
// 获取配送列表
|
||||
async getDistribution() {
|
||||
let shopRes = await API_Trade.shippingMethodList({ way: this.routerVal.way });
|
||||
let shopRes = await API_Trade.shippingMethodList({
|
||||
way: this.routerVal.way,
|
||||
});
|
||||
let shopList;
|
||||
if (shopRes.data.success) {
|
||||
shopList = shopRes.data.result;
|
||||
let way = [];
|
||||
console.log(shopList)
|
||||
console.log(shopList);
|
||||
this.shippingWay.forEach((item) => {
|
||||
shopList.forEach((child) => {
|
||||
if (item.value == child) {
|
||||
|
@ -650,12 +798,22 @@ export default {
|
|||
url: "/pages/order/myOrder?status=0",
|
||||
});
|
||||
}
|
||||
|
||||
let repeatData;
|
||||
res.data.result.cartList.forEach((item, index) => {
|
||||
this.remarkVal[index] = {
|
||||
remark: item.remark,
|
||||
// 如果已经写过备注信息的话赋值
|
||||
repeatData = {
|
||||
remark: this.remarkFlag
|
||||
? this.remark[index].storeId == item.storeId
|
||||
? this.remark[index].remark
|
||||
: item.remark
|
||||
: item.remark,
|
||||
storeId: item.storeId,
|
||||
};
|
||||
|
||||
this.$set(this.remarkVal, index, repeatData);
|
||||
});
|
||||
|
||||
this.orderMessage = res.data.result;
|
||||
/**
|
||||
* 为了避免路径传值在h5中超出限制问题
|
||||
|
@ -673,7 +831,7 @@ export default {
|
|||
res.data.result.memberAddress.consigneeAddressPath.split(",");
|
||||
}
|
||||
if (res.data.result.storeAddress) {
|
||||
this.storeAddress = res.data.result.storeAddress
|
||||
this.storeAddress = res.data.result.storeAddress;
|
||||
console.log("storeAddress", this.storeAddress);
|
||||
}
|
||||
if (
|
||||
|
|
|
@ -542,13 +542,13 @@ export default {
|
|||
*/
|
||||
submitCancel() {
|
||||
cancelOrder(this.orderSn, { reason: this.reason }).then((res) => {
|
||||
if (res.statusCode == 200) {
|
||||
if (res.data.success) {
|
||||
uni.showToast({
|
||||
title: "订单已取消",
|
||||
duration: 2000,
|
||||
icon: "none",
|
||||
});
|
||||
this.initData(0);
|
||||
this.initData(this.tabCurrentIndex);
|
||||
|
||||
this.cancelShow = false;
|
||||
} else {
|
||||
|
|
|
@ -105,7 +105,12 @@
|
|||
</span>
|
||||
</view>
|
||||
<view class="-goods-price" v-else>
|
||||
<div v-if="takeDownFromSale" class="price down-goods">
|
||||
暂无报价
|
||||
</div>
|
||||
<span v-else>
|
||||
¥<span class="price">0 </span>.00
|
||||
</span>
|
||||
</view>
|
||||
|
||||
<view class="icons share" @click="shareChange()">
|
||||
|
@ -189,6 +194,7 @@
|
|||
</view>
|
||||
</scroll-view>
|
||||
|
||||
|
||||
<view class="page-bottom mp-iphonex-bottom" id="pageBottom">
|
||||
<view class="icon-btn">
|
||||
<view class="icon-btn-item" @click="navigateToStore(goodsDetail.storeId)">
|
||||
|
@ -205,15 +211,20 @@
|
|||
<view v-if="nums && nums > 0" class="num-icon">{{ nums }}</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 下架展示 -->
|
||||
<div class="detail-btn" v-if="takeDownFromSale">
|
||||
<view class="to-store-car to-store-btn" @click="reStartTakeDownSale">
|
||||
查看类似商品</view>
|
||||
</div>
|
||||
<!-- 正常结算页面 -->
|
||||
<view class="detail-btn" v-if="!isGroup">
|
||||
<view class="detail-btn" v-if="!isGroup && !takeDownFromSale">
|
||||
<view class="to-store-car to-store-btn" v-if="goodsDetail.goodsType != 'VIRTUAL_GOODS'" @click="shutMask(4)">
|
||||
加入购物车</view>
|
||||
<view class="to-buy to-store-btn" @click="shutMask(4, 'buy')">立即购买</view>
|
||||
<view class="to-store-car to-store-btn" v-if="startTimer">暂未开始</view>
|
||||
</view>
|
||||
<!-- 拼团结算 -->
|
||||
<view class="detail-btn" v-else>
|
||||
<view class="detail-btn" v-else-if="isGroup">
|
||||
<view class="to-store-car pt-buy to-store-btn" @click="shutMask(4, 'buy')">
|
||||
<view>¥{{ goodsDetail.price | unitPrice }}</view>
|
||||
<view>单独购买</view>
|
||||
|
@ -253,6 +264,10 @@
|
|||
@queryCart="cartCount()" :goodsDetail="goodsDetail" :goodsSpec="goodsSpec" :isGroup="isGroup" :id="productId"
|
||||
v-if="goodsDetail.id" :pointDetail="pointDetail" :wholesaleList="wholesaleList" @handleClickSku="selectSku"
|
||||
:buyMask="buyMask" />
|
||||
|
||||
|
||||
<!-- 下架框 -->
|
||||
<takeDownFormSaleGoods ref="takeDownSale" v-if="takeDownFromSale" />
|
||||
</view>
|
||||
</view>
|
||||
</div>
|
||||
|
@ -284,6 +299,7 @@ import popupGoods from "@/components/m-buy/goods"; //购物车商品的模块
|
|||
import popupAddress from "./product/popup/address"; //地址选择模块
|
||||
import shares from "@/components/m-share/index"; //分享
|
||||
import popups from "@/components/popups/popups"; //气泡框
|
||||
import takeDownFormSaleGoods from "@/components/m-take-down-sale-goods/index"; //下架框
|
||||
import setup from "./product/popup/popup";
|
||||
|
||||
export default {
|
||||
|
@ -302,6 +318,7 @@ export default {
|
|||
GoodsSwiper,
|
||||
popupGoods,
|
||||
popupAddress,
|
||||
takeDownFormSaleGoods
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
|
@ -385,10 +402,8 @@ export default {
|
|||
tabScrollTop: null,
|
||||
scrollArr: [],
|
||||
scrollId: "1",
|
||||
|
||||
scrollFlag: true,
|
||||
current: "1", //当前显示的轮播图页
|
||||
|
||||
goodsDetail: {}, //商品数据
|
||||
goodsSpec: "", //规格数据
|
||||
imgList: [], //轮播图数据
|
||||
|
@ -398,12 +413,9 @@ export default {
|
|||
goodsInfo: false, //商品介绍弹窗
|
||||
addressFlag: false, //配送地址弹窗
|
||||
buyMask: false, //添加购物车直接购买,查看已选 弹窗
|
||||
|
||||
num: 1, //添加到购物车的数量
|
||||
|
||||
skuId: "", //
|
||||
storeDetail: "", //店铺基本信息,
|
||||
|
||||
// 店铺信息
|
||||
storeParams: {
|
||||
pageNumber: 1,
|
||||
|
@ -413,7 +425,6 @@ export default {
|
|||
likeGoodsList: "", //相似商品列表
|
||||
PromotionList: "", //活动,促销,列表
|
||||
specList: [],
|
||||
skusCombination: [],
|
||||
selectedSpec: [],
|
||||
nums: 0,
|
||||
delivery: "",
|
||||
|
@ -425,7 +436,8 @@ export default {
|
|||
|
||||
routerVal: "",
|
||||
IMLink: "", // IM地址
|
||||
wholesaleList: []
|
||||
wholesaleList: [],
|
||||
takeDownFromSale: false, // 下架销售状态
|
||||
};
|
||||
},
|
||||
|
||||
|
@ -504,6 +516,10 @@ export default {
|
|||
},
|
||||
|
||||
methods: {
|
||||
// 重新打开下架
|
||||
reStartTakeDownSale(){
|
||||
this.$refs.takeDownSale.show = true
|
||||
},
|
||||
share () {
|
||||
return `/pages/product/goods?id=${this.routerVal.id}&goodsId=${this.routerVal.goodsId}`;
|
||||
},
|
||||
|
@ -539,10 +555,15 @@ export default {
|
|||
|
||||
let response = await getGoods(id, goodsId);
|
||||
|
||||
// 判断当前接口返回内容
|
||||
if (!response.data.success) {
|
||||
setTimeout(() => {
|
||||
uni.navigateBack();
|
||||
}, 500);
|
||||
// 商品已下架
|
||||
if(response.data.code == 11001){
|
||||
this.takeDownFromSale = true
|
||||
}
|
||||
// setTimeout(() => {
|
||||
// uni.navigateBack();
|
||||
// }, 500);
|
||||
}
|
||||
// 这里是绑定分销员
|
||||
if (distributionId || this.$store.state.distributionId) {
|
||||
|
|
|
@ -62,3 +62,7 @@
|
|||
color: #262626;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.down-goods{
|
||||
font-size: 50rpx !important;
|
||||
}
|
||||
|
|
|
@ -181,8 +181,8 @@ import { getStoreBaseInfo, getStoreCategory } from "@/api/store.js";
|
|||
import {
|
||||
receiveCoupons,
|
||||
deleteStoreCollection,
|
||||
collectionGoods,
|
||||
getGoodsIsCollect,
|
||||
collectionStore,
|
||||
getStoreIsCollect,
|
||||
} from "@/api/members.js";
|
||||
import config from "@/config/config";
|
||||
|
||||
|
@ -374,7 +374,7 @@ export default {
|
|||
},
|
||||
/**是否收藏店铺 */
|
||||
async enableGoodsIsCollect() {
|
||||
let res = await getGoodsIsCollect("STORE", this.storeId);
|
||||
let res = await getStoreIsCollect("STORE", this.storeId);
|
||||
if (res.data.success) {
|
||||
this.isCollection = res.data.result;
|
||||
}
|
||||
|
@ -465,7 +465,7 @@ export default {
|
|||
}
|
||||
});
|
||||
} else {
|
||||
collectionGoods("STORE", this.storeId).then((res) => {
|
||||
collectionStore(this.storeId).then((res) => {
|
||||
if (res.data.success) {
|
||||
this.isCollection = true;
|
||||
uni.showToast({
|
||||
|
|
|
@ -7,6 +7,7 @@ Vue.use(Vuex);
|
|||
const store = new Vuex.Store({
|
||||
state: {
|
||||
isShowToast:false, // 是否在展示Toast中
|
||||
remark:[], //填写订单备注
|
||||
shareLink:"", //分享链接
|
||||
verificationKey: "", //获取key表示验证通过
|
||||
distributionId:"", //分销员Id 如果当前账户从未登录过时记录
|
||||
|
@ -26,6 +27,11 @@ const store = new Vuex.Store({
|
|||
state.userName = "";
|
||||
state.hasLogin = false;
|
||||
},
|
||||
|
||||
// 设置填写订单中备注
|
||||
setRemark(state, remark) {
|
||||
state.remark = remark;
|
||||
}
|
||||
},
|
||||
actions: {},
|
||||
});
|
||||
|
|
|
@ -53,12 +53,19 @@ function cleanStorage() {
|
|||
let http = new Request();
|
||||
|
||||
|
||||
http.setConfig((config) => {
|
||||
// 没有uuid创建
|
||||
/**
|
||||
* 创建uuid方法
|
||||
*/
|
||||
const createUuid = () => {
|
||||
if (!storage.getUuid()) {
|
||||
storage.setUuid(uuid.v1());
|
||||
console.log("uuid", storage.getUuid());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
http.setConfig((config) => {
|
||||
createUuid();
|
||||
/* 设置全局配置 */
|
||||
config.baseURL = api.buyer;
|
||||
config.header = {
|
||||
|
@ -105,9 +112,10 @@ http.interceptors.request.use(
|
|||
|
||||
|
||||
}
|
||||
createUuid();
|
||||
config.header = {
|
||||
...config.header,
|
||||
uuid: storage.getUuid() || uuid.v1(),
|
||||
uuid: storage.getUuid()
|
||||
};
|
||||
return config;
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue