合并冲突

This commit is contained in:
yeliang-king
2023-05-29 15:20:08 +08:00
13 changed files with 427 additions and 167 deletions

View File

@@ -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; //关闭地图

View File

@@ -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() {
if (this.tabCurrentIndex == 0) {
this.navList[0].params.pageNumber++;
this.getGoodList();
} else {
this.navList[1].params.pageNumber++;
this.getStoreList();
}
this.fetchReloadOrNextPage('next')
},
methods: {
// 刷新或者下一页
fetchReloadOrNextPage(type) {
if(type == 'next'){
this.navList[this.tabCurrentIndex].params.pageNumber ++;
if (this.tabCurrentIndex == 0) {
this.getGoodList();
} else {
this.getStoreList();
}
}
else{
this.navList[0].params.pageNumber = 1;
this.navList[1].params.pageNumber = 1;
this.goodList = [];
this.storeList = [];
this.getGoodList();
this.getStoreList();
}
},
/**
* 打开商品左侧取消收藏
*/
@@ -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) {

View File

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