合并冲突

master
yeliang-king 2023-05-29 15:20:08 +08:00
commit 3b036a7cb7
13 changed files with 427 additions and 167 deletions

View File

@ -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} * @returns {AxiosPromise}
@ -236,7 +252,7 @@ export function deleteGoodsCollection(ids) {
*/ */
export function deleteStoreCollection(store_id) { export function deleteStoreCollection(store_id) {
return http.request({ return http.request({
url: `/member/collection/delete/STORE/${store_id}`, url: `/member/storeCollection/delete/STORE/${store_id}`,
method: Method.DELETE, method: Method.DELETE,
needToken: true, 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 * @param store_id 店铺ID
@ -262,10 +291,9 @@ export function getGoodsIsCollect(type, good_id) {
*/ */
export function collectionStore(store_id) { export function collectionStore(store_id) {
return http.request({ return http.request({
url: "members/collection/store", url: `/member/storeCollection/add/STORE/${store_id}`,
header: { "content-type": "application/x-www-form-urlencoded" },
method: Method.POST, method: Method.POST,
data: { store_id }, needToken: true,
}); });
} }

View File

@ -96,8 +96,7 @@
<!-- 数量 --> <!-- 数量 -->
<view class="goods-skus-number flex flex-a-c flex-j-sb"> <view class="goods-skus-number flex flex-a-c flex-j-sb">
<view class="view-class-title">数量</view> <view class="view-class-title">数量</view>
<uni-number-box class="uNumber" :min="1" :max="999" v-model="num"></uni-number-box>
<u-input class="view-class-input" input-align="right" v-model="num" type="number" @blur="numCheck()" />
</view> </view>
</scroll-view> </scroll-view>
<!-- 按钮 --> <!-- 按钮 -->
@ -112,8 +111,11 @@
<script> <script>
import * as API_trade from '@/api/trade.js'; import * as API_trade from '@/api/trade.js';
import setup from './popup'; import setup from './popup';
import uniNumberBox from '@/components/uni-number-box'
export default { export default {
components: {
uniNumberBox
},
data() { data() {
return { return {
setup, setup,

View File

@ -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>

View File

@ -121,6 +121,7 @@ export default {
// //
callBackAddress(val) { callBackAddress(val) {
console.log(val)
uni.showLoading({ uni.showLoading({
title: "加载中", title: "加载中",
}); });
@ -133,7 +134,7 @@ export default {
this.form.consigneeAddressPath = val.data.result.name; // '' this.form.consigneeAddressPath = val.data.result.name; // ''
this.form.lat = val.latitude; // this.form.lat = val.latitude; //
this.form.lon = val.longitude; // this.form.lon = val.longitude; //
if (this.$store.state.isShowToast){ uni.hideLoading() }; uni.hideLoading();
} }
this.mapFlag = !this.mapFlag; // this.mapFlag = !this.mapFlag; //

View File

@ -64,6 +64,7 @@
<script> <script>
import { import {
getGoodsCollection, getGoodsCollection,
getStoreCollection,
deleteGoodsCollection, deleteGoodsCollection,
deleteStoreCollection, deleteStoreCollection,
} from "@/api/members.js"; } from "@/api/members.js";
@ -105,21 +106,34 @@
storeList: [], // storeList: [], //
}; };
}, },
onLoad() { onShow() {
this.getGoodList(); this.fetchReloadOrNextPage('reload')
this.getStoreList();
}, },
onReachBottom() { onReachBottom() {
this.fetchReloadOrNextPage('next')
},
methods: {
//
fetchReloadOrNextPage(type) {
if(type == 'next'){
this.navList[this.tabCurrentIndex].params.pageNumber ++;
if (this.tabCurrentIndex == 0) { if (this.tabCurrentIndex == 0) {
this.navList[0].params.pageNumber++;
this.getGoodList(); this.getGoodList();
} else { } 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(); this.getStoreList();
} }
}, },
methods: {
/** /**
* 打开商品左侧取消收藏 * 打开商品左侧取消收藏
*/ */
@ -154,7 +168,7 @@
* 点击店铺左侧取消收藏 * 点击店铺左侧取消收藏
*/ */
clickStoreSwiperAction(val) { clickStoreSwiperAction(val) {
deleteStoreCollection(val.storeId).then((res) => { deleteStoreCollection(val.id).then((res) => {
if (res.statusCode == 200) { if (res.statusCode == 200) {
this.storeList = []; this.storeList = [];
this.getStoreList(); this.getStoreList();
@ -224,7 +238,7 @@
uni.showLoading({ uni.showLoading({
title: "加载中", title: "加载中",
}); });
getGoodsCollection(this.navList[1].params, "store").then((res) => { getStoreCollection(this.navList[1].params, "STORE").then((res) => {
if (this.$store.state.isShowToast){ uni.hideLoading() }; if (this.$store.state.isShowToast){ uni.hideLoading() };
uni.stopPullDownRefresh(); uni.stopPullDownRefresh();
if (res.data.success) { if (res.data.success) {

View File

@ -6,16 +6,21 @@
<u-empty text="暂无历史记录" style="margin-top:200rpx;" mode="history" v-if="whetherEmpty"></u-empty> <u-empty text="暂无历史记录" style="margin-top:200rpx;" mode="history" v-if="whetherEmpty"></u-empty>
<div v-else> <div v-else>
<view v-for="(item, index) in trackList" :key="index"> <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"> <view class="myTracks-items">
<u-swipe-action style="width: 100%;" :show="item.show" :index="index" :key="item.id" <u-swipe-action style="width: 100%;" :show="item.show" :index="index" :key="item.id"
@click="delTracks" @open="open" :options="options"> @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> <image :src="item.thumbnail"></image>
</view> </view>
<view class="myTracks-item-content" @click.stop="navgaiteToDetail(item)"> <view class="myTracks-item-content" @click.stop="navigateToDetail(item)">
<view class="myTracks-item-title"> <view class="myTracks-item-title">
{{ item.goodsName }} {{ item.goodsName }}
<view class="myTracks-item-title-desc"> </view> <view class="myTracks-item-title-desc"> </view>
@ -72,6 +77,7 @@
this.getList(); this.getList();
}, },
onShow() { onShow() {
this.params.pageNumber = 1
this.trackList = []; this.trackList = [];
this.getList(); this.getList();
}, },
@ -83,7 +89,7 @@
/** /**
* 导航到店铺 * 导航到店铺
*/ */
navgaiteToStore(val) { navigateToStore(val) {
uni.navigateTo({ uni.navigateTo({
url: "/pages/product/shopPage?id=" + val.storeId, url: "/pages/product/shopPage?id=" + val.storeId,
}); });
@ -99,7 +105,7 @@
/** /**
* 跳转详情 * 跳转详情
*/ */
navgaiteToDetail(item) { navigateToDetail(item) {
uni.navigateTo({ uni.navigateTo({
url: "/pages/product/goods?id=" + item.id + "&goodsId=" + item.goodsId, url: "/pages/product/goods?id=" + item.id + "&goodsId=" + item.goodsId,
}); });
@ -154,6 +160,10 @@
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.lose-goods{
color: $main-color;
padding-left: 50rpx !important;
}
.myTracks { .myTracks {
width: 100%; width: 100%;
padding-top: 2rpx; padding-top: 2rpx;
@ -224,36 +234,10 @@
padding: 10rpx 0 0 0; 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 { .myTracks-divider {
width: 100%; width: 100%;
height: 20rpx; height: 20rpx;
} }
.myTracks-action-check {
align-items: center;
display: -webkit-box;
display: -webkit-flex;
display: flex;
}
</style> </style>

View File

@ -1,7 +1,11 @@
<template> <template>
<div class="wrapper"> <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="user-box flex">
<div class="flex-8"> <div class="flex-8">
<div v-if="!address.id"></div> <div v-if="!address.id"></div>
@ -10,8 +14,15 @@
<!-- 省市区 --> <!-- 省市区 -->
<div class="flex flex-a-c"> <div class="flex flex-a-c">
<span class="default" v-if="address.isDefault"></span> <span class="default" v-if="address.isDefault"></span>
<div class="address-list" v-if="address.consigneeAddressPath.length != 0"> <div
<span class="address-item" v-for="(item, index) in address.consigneeAddressPath" :key="index"> class="address-list"
v-if="address.consigneeAddressPath.length != 0"
>
<span
class="address-item"
v-for="(item, index) in address.consigneeAddressPath"
:key="index"
>
{{ item }} {{ item }}
</span> </span>
</div> </div>
@ -45,13 +56,10 @@
{{ storeAddress.address }} {{ storeAddress.address }}
</div> </div>
<!-- 联系手机号 --> <!-- 联系手机号 -->
<div> <div></div>
</div> </div>
</div> </div>
</div> <div v-else></div>
<div v-else>
请选择自提点
</div>
</div> </div>
<u-icon name="arrow-right" style="color: #bababa"></u-icon> <u-icon name="arrow-right" style="color: #bababa"></u-icon>
</div> </div>
@ -60,28 +68,50 @@
</div> </div>
</div> </div>
<!-- 开团信息 --> <!-- 开团信息 -->
<view class="group-box" v-if="isAssemble"> <view class="group-box" v-if="isAssemble">
<view class="group-title"> <view class="group-title">
<span v-if="pintuanFlage"></span> <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>
<view class="group"> <view class="group">
<view> <view>
<u-image borderRadius="50%" shape="square" class="head-img" width="81rpx" height="81rpx" <u-image
:src="masterWay.face || userImage"></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 class="btn-one">团长</view>
</view> </view>
<view class="line"> </view> <view class="line"> </view>
<view> <view>
<!-- 如果有最后一名显示最后一名没有最后一名显示等待参团 --> <!-- 如果有最后一名显示最后一名没有最后一名显示等待参团 -->
<u-image class="head-img" v-if="endWay.face" :src="endWay.face" borderRadius="50%" shape="square" <u-image
width="81rpx" height="81rpx"> class="head-img"
v-if="endWay.face"
:src="endWay.face"
borderRadius="50%"
shape="square"
width="81rpx"
height="81rpx"
>
<view slot="loading"></view> <view slot="loading"></view>
</u-image> </u-image>
<u-image class="head-img" borderRadius="50%" shape="square" v-else width="81rpx" height="81rpx" <u-image
:src="endWay.face || userImage"></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 class="wait">{{ endWay.nickname || "等待参团" }}</view>
</view> </view>
@ -89,7 +119,11 @@
</view> </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 v-if="item.checked">
<div @click="navigateToStore(item)"> <div @click="navigateToStore(item)">
<div class="store-name"> <div class="store-name">
@ -97,25 +131,42 @@
</div> </div>
</div> </div>
<div class="promotionNotice">{{ item.promotionNotice || "" }}</div> <div class="promotionNotice">{{ item.promotionNotice || "" }}</div>
<div class="flex goods-item" v-for="(val, i) in item.checkedSkuList" :key="i"> <div
<div class="goods-image" @click=" class="flex goods-item"
v-for="(val, i) in item.checkedSkuList"
:key="i"
>
<div
class="goods-image"
@click="
navigateTo( navigateTo(
'/pages/product/goods?id=' + '/pages/product/goods?id=' +
val.goodsSku.id + val.goodsSku.id +
'&goodsId=' + '&goodsId=' +
val.goodsSku.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>
<div @click=" <div
@click="
navigateTo( navigateTo(
'/pages/product/goods?id=' + '/pages/product/goods?id=' +
val.goodsSku.id + val.goodsSku.id +
'&goodsId=' + '&goodsId=' +
val.goodsSku.goodsId val.goodsSku.goodsId
) )
" class="goods-detail"> "
class="goods-detail"
>
<div class="flex"> <div class="flex">
<p class="goods-name">{{ val.goodsSku.goodsName }}</p> <p class="goods-name">{{ val.goodsSku.goodsName }}</p>
<span class="nums">x{{ val.num }}</span> <span class="nums">x{{ val.num }}</span>
@ -125,22 +176,43 @@
<span class="goods-price">{{ <span class="goods-price">{{
$options.filters.goodsFormatPrice(val.purchasePrice)[0] $options.filters.goodsFormatPrice(val.purchasePrice)[0]
}}</span> }}</span>
<span>.{{ $options.filters.goodsFormatPrice(val.purchasePrice)[1] }}</span> <span
>.{{
$options.filters.goodsFormatPrice(val.purchasePrice)[1]
}}</span
>
</p> </p>
</div> </div>
</div> </div>
<u-row> <u-row>
<u-col :offset="0" :span="4">发票信息</u-col> <u-col :offset="0" :span="4">发票信息</u-col>
<u-col :span="8" class="tipsColor" textAlign="right" @click.native="invoice()"> <u-col
<span v-if="receiptList">{{ receiptList.receiptTitle }} - :span="8"
{{ receiptList.receiptContent }}</span> class="tipsColor"
textAlign="right"
@click.native="invoice()"
>
<span v-if="receiptList"
>{{ receiptList.receiptTitle }} -
{{ receiptList.receiptContent }}</span
>
<span v-else></span> <span v-else></span>
</u-col> </u-col>
</u-row> </u-row>
<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>
<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) => { shippingMethod.find((e) => {
return e.value == shippingText; return e.value == shippingText;
@ -149,40 +221,72 @@
</u-col> </u-col>
</u-row> </u-row>
<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-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-col>
</u-row> </u-row>
</div> </div>
</div> </div>
<!-- 发票信息 --> <!-- 发票信息 -->
<invoices :res="receiptList" @callbackInvoice="callbackInvoice" v-if="invoiceFlag" /> <invoices
<u-select @confirm="confirmDistribution" v-model="shippingFlag" v-if="shippingMethod.length != 0" :res="receiptList"
:list="shippingMethod"></u-select> @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 class="box box5" v-if="orderMessage.priceDetailDTO">
<div> <div>
<u-row> <u-row>
<u-col :span="9">商品合计</u-col> <u-col :span="9">商品合计</u-col>
<u-col :span="3" textAlign="right"> <u-col :span="3" textAlign="right">
<span>{{ orderMessage.priceDetailDTO.goodsPrice | unitPrice }}</span> <span
>{{ orderMessage.priceDetailDTO.goodsPrice | unitPrice }}</span
>
</u-col> </u-col>
</u-row> </u-row>
</div> </div>
<div> <div>
<u-row v-if="shippingText == 'LOGISTICS'"> <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="7"
<u-col v-if="orderMessage.cartTypeEnum != 'VIRTUAL'" :span="5" class="tr tipsColor" textAlign="right"> >运费</u-col
<span v-if="orderMessage.priceDetailDTO.freightPrice == 0"></span> >
<span v-else>{{ <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 orderMessage.priceDetailDTO.freightPrice | unitPrice
}}</span> }}</span
>
</u-col> </u-col>
</u-row> </u-row>
</div> </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 :offset="0" :span="9" @click="GET_Discount()"></u-col>
<u-col <u-col
:span="3" :span="3"
@ -206,9 +310,14 @@
<div> <div>
<u-row> <u-row>
<u-col :span="9">优惠金额</u-col> <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"> <span class="main-color">
-{{ orderMessage.priceDetailDTO.couponPrice | unitPrice }}</span> -{{ orderMessage.priceDetailDTO.couponPrice | unitPrice }}</span
>
</u-col> </u-col>
<u-col :span="3" textAlign="right" v-else>0.00</u-col> <u-col :span="3" textAlign="right" v-else>0.00</u-col>
</u-row> </u-row>
@ -217,9 +326,11 @@
<u-row> <u-row>
<u-col :span="6">活动优惠</u-col> <u-col :span="6">活动优惠</u-col>
<u-col :span="6" class="tr tipsColor" textAlign="right"> <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 orderMessage.priceDetailDTO.discountPrice | unitPrice
}}</span> }}</span
>
<span v-else>0.00</span> <span v-else>0.00</span>
</u-col> </u-col>
</u-row> </u-row>
@ -228,7 +339,12 @@
<!-- 配送地区没有提示 --> <!-- 配送地区没有提示 -->
<div class="notSupportFreight" v-if="notSupportFreight.length != 0"> <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> </u-notice-bar>
</div> </div>
@ -239,14 +355,24 @@
<div v-if="!orderMessage.priceDetailDTO.payPoint" class="number"> <div v-if="!orderMessage.priceDetailDTO.payPoint" class="number">
<span>¥</span> <span>¥</span>
<span class="price">{{ <span class="price">{{
$options.filters.goodsFormatPrice(orderMessage.priceDetailDTO.flowPrice)[0] $options.filters.goodsFormatPrice(
orderMessage.priceDetailDTO.flowPrice
)[0]
}}</span> }}</span>
<span>.{{ $options.filters.goodsFormatPrice(orderMessage.priceDetailDTO.flowPrice)[1] }} <span
>.{{
$options.filters.goodsFormatPrice(
orderMessage.priceDetailDTO.flowPrice
)[1]
}}
</span> </span>
</div> </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 orderMessage.priceDetailDTO.payPoint | unitPrice
}}</span>积分</span> }}</span
>积分</span
>
</div> </div>
<div class="navRiv" @click="createTradeFun()"> <div class="navRiv" @click="createTradeFun()">
<!-- #ifndef MP-WEIXIN --> <!-- #ifndef MP-WEIXIN -->
@ -264,9 +390,9 @@ import * as API_Trade from "@/api/trade";
import * as API_Address from "@/api/address"; import * as API_Address from "@/api/address";
import * as API_Order from "@/api/order"; import * as API_Order from "@/api/order";
import invoices from "@/pages/order/invoice/setInvoice"; import invoices from "@/pages/order/invoice/setInvoice";
import { mapState } from "vuex";
import LiLiWXPay from "@/js_sdk/lili-pay/wx-pay.js"; import LiLiWXPay from "@/js_sdk/lili-pay/wx-pay.js";
import configs from '@/config/config' import configs from "@/config/config";
export default { export default {
onLoad: function (val) { onLoad: function (val) {
this.routerVal = val; this.routerVal = val;
@ -275,11 +401,10 @@ export default {
invoices, invoices,
}, },
watch: {},
data() { data() {
return { return {
configs, configs,
userImage:configs.defaultUserPhoto, userImage: configs.defaultUserPhoto,
invoiceFlag: false, // invoiceFlag: false, //
shippingText: "LOGISTICS", shippingText: "LOGISTICS",
shippingFlag: false, shippingFlag: false,
@ -295,7 +420,8 @@ export default {
}, },
], ],
isAssemble: false, // isAssemble: false, //
couponNums: "", // //
remarkFlag: false,
selectAddressId: "", selectAddressId: "",
routerVal: "", routerVal: "",
params: {}, params: {},
@ -311,15 +437,29 @@ export default {
data: "", data: "",
// //
remarkVal: [], remarkVal: [],
remarkVal1: "",
detail: "", // detail: "", //
endWay: "", // endWay: "", //
masterWay: "", // masterWay: "", //
pintuanFlage: true, // pintuanFlage: true, //
notSupportFreight: [], // notSupportFreight: [], //
notSupportFreightGoodsList: ["以下商品超出配送范围:"], notSupportFreightGoodsList: ["以下商品超出配送范围:"],
storeAddress:"", storeAddress: "",
}; };
}, },
watch: {
// vuex
remarkVal: {
handler(val) {
this.$store.commit("setRemark", val);
},
immediate: true,
deep: true,
},
},
computed: {
...mapState(["remark"]),
},
filters: { filters: {
/** /**
* 发票收据类型 * 发票收据类型
@ -368,12 +508,18 @@ export default {
}, },
async onShow() { async onShow() {
//
if (this.remark && this.remark.length > 0) {
this.remarkFlag = true;
}
uni.showLoading({ uni.showLoading({
mask: true, mask: true,
}); });
await this.getOrderList(); await this.getOrderList();
await this.getDistribution(); await this.getDistribution();
if (this.$store.state.isShowToast){ uni.hideLoading() }; if (this.$store.state.isShowToast) {
uni.hideLoading();
}
if (this.routerVal.way == "PINTUAN") { if (this.routerVal.way == "PINTUAN") {
this.isAssemble = true; this.isAssemble = true;
this.routerVal.parentOrder = JSON.parse( this.routerVal.parentOrder = JSON.parse(
@ -382,7 +528,7 @@ export default {
this.pintuanWay(); this.pintuanWay();
} }
}, },
mounted() { }, mounted() {},
methods: { methods: {
// //
@ -411,7 +557,8 @@ export default {
// //
clickToAddress() { clickToAddress() {
this.navigateTo( this.navigateTo(
`/pages/mine/address/address?from=cart&way=${this.routerVal.way `/pages/mine/address/address?from=cart&way=${
this.routerVal.way
}&parentOrder=${encodeURIComponent( }&parentOrder=${encodeURIComponent(
JSON.stringify(this.routerVal.parentOrder) JSON.stringify(this.routerVal.parentOrder)
)}` )}`
@ -419,8 +566,7 @@ export default {
}, },
clickToStoreAddress() { clickToStoreAddress() {
this.navigateTo( this.navigateTo(
`/pages/mine/address/storeAddress?from=cart&way=${this.routerVal.way `/pages/mine/address/storeAddress?from=cart&way=${this.routerVal.way}&storeId=${this.remarkVal[0].storeId}`
}&storeId=${this.remarkVal[0].storeId}`
); );
}, },
@ -496,7 +642,7 @@ export default {
createTradeFun() { createTradeFun() {
// //
this.$u.throttle(() => { this.$u.throttle(() => {
if (this.shippingText === 'SELF_PICK_UP') { if (this.shippingText === "SELF_PICK_UP") {
if (!this.storeAddress.id) { if (!this.storeAddress.id) {
uni.showToast({ uni.showToast({
title: "请选择提货点", title: "请选择提货点",
@ -505,7 +651,7 @@ export default {
}); });
return false; return false;
} }
} else if (this.shippingText === 'LOGISTICS') { } else if (this.shippingText === "LOGISTICS") {
if (!this.address.id) { if (!this.address.id) {
uni.showToast({ uni.showToast({
title: "请选择地址", title: "请选择地址",
@ -602,12 +748,14 @@ export default {
}, },
// //
async getDistribution() { async getDistribution() {
let shopRes = await API_Trade.shippingMethodList({ way: this.routerVal.way }); let shopRes = await API_Trade.shippingMethodList({
way: this.routerVal.way,
});
let shopList; let shopList;
if (shopRes.data.success) { if (shopRes.data.success) {
shopList = shopRes.data.result; shopList = shopRes.data.result;
let way = []; let way = [];
console.log(shopList) console.log(shopList);
this.shippingWay.forEach((item) => { this.shippingWay.forEach((item) => {
shopList.forEach((child) => { shopList.forEach((child) => {
if (item.value == child) { if (item.value == child) {
@ -650,12 +798,22 @@ export default {
url: "/pages/order/myOrder?status=0", url: "/pages/order/myOrder?status=0",
}); });
} }
let repeatData;
res.data.result.cartList.forEach((item, index) => { 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, storeId: item.storeId,
}; };
this.$set(this.remarkVal, index, repeatData);
}); });
this.orderMessage = res.data.result; this.orderMessage = res.data.result;
/** /**
* 为了避免路径传值在h5中超出限制问题 * 为了避免路径传值在h5中超出限制问题
@ -673,8 +831,8 @@ export default {
res.data.result.memberAddress.consigneeAddressPath.split(","); res.data.result.memberAddress.consigneeAddressPath.split(",");
} }
if (res.data.result.storeAddress) { if (res.data.result.storeAddress) {
this.storeAddress = res.data.result.storeAddress this.storeAddress = res.data.result.storeAddress;
console.log("storeAddress",this.storeAddress); console.log("storeAddress", this.storeAddress);
} }
if ( if (
res.data.result.notSupportFreight && res.data.result.notSupportFreight &&
@ -834,7 +992,7 @@ page {
width: 100%; width: 100%;
transition: 0.35s; transition: 0.35s;
>.tips { > .tips {
margin: 0 32rpx; margin: 0 32rpx;
} }
} }
@ -917,7 +1075,7 @@ page {
font-size: 26rpx; font-size: 26rpx;
font-weight: bold; font-weight: bold;
>span { > span {
font-size: 36rpx; font-size: 36rpx;
} }
} }
@ -928,7 +1086,7 @@ page {
font-size: 28rpx; font-size: 28rpx;
font-weight: bold; font-weight: bold;
>.goods-price { > .goods-price {
font-size: 38rpx; font-size: 38rpx;
padding: 0 2rpx; padding: 0 2rpx;
} }
@ -1023,7 +1181,7 @@ page {
flex: 8; flex: 8;
margin-left: 20rpx !important; margin-left: 20rpx !important;
>p { > p {
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
white-space: nowrap; white-space: nowrap;

View File

@ -542,13 +542,13 @@ export default {
*/ */
submitCancel() { submitCancel() {
cancelOrder(this.orderSn, { reason: this.reason }).then((res) => { cancelOrder(this.orderSn, { reason: this.reason }).then((res) => {
if (res.statusCode == 200) { if (res.data.success) {
uni.showToast({ uni.showToast({
title: "订单已取消", title: "订单已取消",
duration: 2000, duration: 2000,
icon: "none", icon: "none",
}); });
this.initData(0); this.initData(this.tabCurrentIndex);
this.cancelShow = false; this.cancelShow = false;
} else { } else {

View File

@ -89,13 +89,13 @@
$options.filters.goodsFormatPrice(wholesaleList[wholesaleList.length - 1].price)[0] $options.filters.goodsFormatPrice(wholesaleList[wholesaleList.length - 1].price)[0]
}}</span>.{{ }}</span>.{{
$options.filters.goodsFormatPrice(wholesaleList[wholesaleList.length - 1].price)[1] $options.filters.goodsFormatPrice(wholesaleList[wholesaleList.length - 1].price)[1]
}} }}
~ ~
<span>¥</span><span class="price">{{ <span>¥</span><span class="price">{{
$options.filters.goodsFormatPrice(wholesaleList[0].price)[0] $options.filters.goodsFormatPrice(wholesaleList[0].price)[0]
}}</span>.{{ }}</span>.{{
$options.filters.goodsFormatPrice(wholesaleList[0].price)[1] $options.filters.goodsFormatPrice(wholesaleList[0].price)[1]
}} }}
</span> </span>
<span v-else> <span v-else>
<span>¥</span><span class="price">{{ <span>¥</span><span class="price">{{
@ -105,7 +105,12 @@
</span> </span>
</view> </view>
<view class="-goods-price" v-else> <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 class="price">0 </span>.00
</span>
</view> </view>
<view class="icons share" @click="shareChange()"> <view class="icons share" @click="shareChange()">
@ -189,6 +194,7 @@
</view> </view>
</scroll-view> </scroll-view>
<view class="page-bottom mp-iphonex-bottom" id="pageBottom"> <view class="page-bottom mp-iphonex-bottom" id="pageBottom">
<view class="icon-btn"> <view class="icon-btn">
<view class="icon-btn-item" @click="navigateToStore(goodsDetail.storeId)"> <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 v-if="nums && nums > 0" class="num-icon">{{ nums }}</view>
</view> </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 class="to-store-car to-store-btn" v-if="goodsDetail.goodsType != 'VIRTUAL_GOODS'" @click="shutMask(4)">
加入购物车</view> 加入购物车</view>
<view class="to-buy to-store-btn" @click="shutMask(4, 'buy')">立即购买</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 class="to-store-car to-store-btn" v-if="startTimer"></view>
</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 class="to-store-car pt-buy to-store-btn" @click="shutMask(4, 'buy')">
<view>{{ goodsDetail.price | unitPrice }}</view> <view>{{ goodsDetail.price | unitPrice }}</view>
<view>单独购买</view> <view>单独购买</view>
@ -253,6 +264,10 @@
@queryCart="cartCount()" :goodsDetail="goodsDetail" :goodsSpec="goodsSpec" :isGroup="isGroup" :id="productId" @queryCart="cartCount()" :goodsDetail="goodsDetail" :goodsSpec="goodsSpec" :isGroup="isGroup" :id="productId"
v-if="goodsDetail.id" :pointDetail="pointDetail" :wholesaleList="wholesaleList" @handleClickSku="selectSku" v-if="goodsDetail.id" :pointDetail="pointDetail" :wholesaleList="wholesaleList" @handleClickSku="selectSku"
:buyMask="buyMask" /> :buyMask="buyMask" />
<!-- 下架框 -->
<takeDownFormSaleGoods ref="takeDownSale" v-if="takeDownFromSale" />
</view> </view>
</view> </view>
</div> </div>
@ -284,6 +299,7 @@ import popupGoods from "@/components/m-buy/goods"; //购物车商品的模块
import popupAddress from "./product/popup/address"; // import popupAddress from "./product/popup/address"; //
import shares from "@/components/m-share/index"; // import shares from "@/components/m-share/index"; //
import popups from "@/components/popups/popups"; // import popups from "@/components/popups/popups"; //
import takeDownFormSaleGoods from "@/components/m-take-down-sale-goods/index"; //
import setup from "./product/popup/popup"; import setup from "./product/popup/popup";
export default { export default {
@ -302,6 +318,7 @@ export default {
GoodsSwiper, GoodsSwiper,
popupGoods, popupGoods,
popupAddress, popupAddress,
takeDownFormSaleGoods
}, },
data () { data () {
return { return {
@ -385,10 +402,8 @@ export default {
tabScrollTop: null, tabScrollTop: null,
scrollArr: [], scrollArr: [],
scrollId: "1", scrollId: "1",
scrollFlag: true, scrollFlag: true,
current: "1", // current: "1", //
goodsDetail: {}, // goodsDetail: {}, //
goodsSpec: "", // goodsSpec: "", //
imgList: [], // imgList: [], //
@ -398,12 +413,9 @@ export default {
goodsInfo: false, // goodsInfo: false, //
addressFlag: false, // addressFlag: false, //
buyMask: false, // buyMask: false, //
num: 1, // num: 1, //
skuId: "", // skuId: "", //
storeDetail: "", //, storeDetail: "", //,
// //
storeParams: { storeParams: {
pageNumber: 1, pageNumber: 1,
@ -413,7 +425,6 @@ export default {
likeGoodsList: "", // likeGoodsList: "", //
PromotionList: "", //, PromotionList: "", //,
specList: [], specList: [],
skusCombination: [],
selectedSpec: [], selectedSpec: [],
nums: 0, nums: 0,
delivery: "", delivery: "",
@ -425,7 +436,8 @@ export default {
routerVal: "", routerVal: "",
IMLink: "", // IM IMLink: "", // IM
wholesaleList: [] wholesaleList: [],
takeDownFromSale: false, //
}; };
}, },
@ -504,6 +516,10 @@ export default {
}, },
methods: { methods: {
//
reStartTakeDownSale(){
this.$refs.takeDownSale.show = true
},
share () { share () {
return `/pages/product/goods?id=${this.routerVal.id}&goodsId=${this.routerVal.goodsId}`; return `/pages/product/goods?id=${this.routerVal.id}&goodsId=${this.routerVal.goodsId}`;
}, },
@ -539,10 +555,15 @@ export default {
let response = await getGoods(id, goodsId); let response = await getGoods(id, goodsId);
//
if (!response.data.success) { if (!response.data.success) {
setTimeout(() => { //
uni.navigateBack(); if(response.data.code == 11001){
}, 500); this.takeDownFromSale = true
}
// setTimeout(() => {
// uni.navigateBack();
// }, 500);
} }
// //
if (distributionId || this.$store.state.distributionId) { if (distributionId || this.$store.state.distributionId) {

View File

@ -62,3 +62,7 @@
color: #262626; color: #262626;
font-weight: 700; font-weight: 700;
} }
.down-goods{
font-size: 50rpx !important;
}

View File

@ -181,8 +181,8 @@ import { getStoreBaseInfo, getStoreCategory } from "@/api/store.js";
import { import {
receiveCoupons, receiveCoupons,
deleteStoreCollection, deleteStoreCollection,
collectionGoods, collectionStore,
getGoodsIsCollect, getStoreIsCollect,
} from "@/api/members.js"; } from "@/api/members.js";
import config from "@/config/config"; import config from "@/config/config";
@ -374,7 +374,7 @@ export default {
}, },
/**是否收藏店铺 */ /**是否收藏店铺 */
async enableGoodsIsCollect() { async enableGoodsIsCollect() {
let res = await getGoodsIsCollect("STORE", this.storeId); let res = await getStoreIsCollect("STORE", this.storeId);
if (res.data.success) { if (res.data.success) {
this.isCollection = res.data.result; this.isCollection = res.data.result;
} }
@ -465,7 +465,7 @@ export default {
} }
}); });
} else { } else {
collectionGoods("STORE", this.storeId).then((res) => { collectionStore(this.storeId).then((res) => {
if (res.data.success) { if (res.data.success) {
this.isCollection = true; this.isCollection = true;
uni.showToast({ uni.showToast({

View File

@ -7,6 +7,7 @@ Vue.use(Vuex);
const store = new Vuex.Store({ const store = new Vuex.Store({
state: { state: {
isShowToast:false, // 是否在展示Toast中 isShowToast:false, // 是否在展示Toast中
remark:[], //填写订单备注
shareLink:"", //分享链接 shareLink:"", //分享链接
verificationKey: "", //获取key表示验证通过 verificationKey: "", //获取key表示验证通过
distributionId:"", //分销员Id 如果当前账户从未登录过时记录 distributionId:"", //分销员Id 如果当前账户从未登录过时记录
@ -26,6 +27,11 @@ const store = new Vuex.Store({
state.userName = ""; state.userName = "";
state.hasLogin = false; state.hasLogin = false;
}, },
// 设置填写订单中备注
setRemark(state, remark) {
state.remark = remark;
}
}, },
actions: {}, actions: {},
}); });

View File

@ -53,12 +53,19 @@ function cleanStorage() {
let http = new Request(); let http = new Request();
http.setConfig((config) => { /**
// 没有uuid创建 * 创建uuid方法
*/
const createUuid = () => {
if (!storage.getUuid()) { if (!storage.getUuid()) {
storage.setUuid(uuid.v1()); storage.setUuid(uuid.v1());
console.log("uuid", storage.getUuid());
} }
}
http.setConfig((config) => {
createUuid();
/* 设置全局配置 */ /* 设置全局配置 */
config.baseURL = api.buyer; config.baseURL = api.buyer;
config.header = { config.header = {
@ -105,9 +112,10 @@ http.interceptors.request.use(
} }
createUuid();
config.header = { config.header = {
...config.header, ...config.header,
uuid: storage.getUuid() || uuid.v1(), uuid: storage.getUuid()
}; };
return config; return config;
}, },