This commit is contained in:
ylj20011123 2025-07-02 19:30:30 +08:00
parent 49ccd01bdf
commit db541a5c44
78 changed files with 1444 additions and 1079 deletions

View File

@ -148,7 +148,8 @@
{
"path": "index",
"style": {
"navigationBarTitleText": "优惠券"
"navigationBarTitleText": "优惠券",
"navigationBarBackgroundColor": "#ffffff"
}
}
]

View File

@ -1,144 +1,58 @@
<template>
<div class="coupon" v-show="!pageMsg.isLoading">
<!-- Tabs Header -->
<div class="tabs-header">
<div class="tab-item" :class="{ active: pageMsg.activeTabs === 0 }" @click="changeActive(0)">
有效
</div>
<div class="tab-item" :class="{ active: pageMsg.activeTabs === 1 }" @click="changeActive(1)">
无效
</div>
</div>
<view class="main">
<view class="tabBox">
<view :class="selectTab === item.value ? 'tabItem selectTabItem' : 'tabItem'" v-for="(item, index) in tabList"
:key="index" @click="handleChangeTab(item.value)">
{{ item.label }}
</view>
</view>
<!-- Tabs Content -->
<div class="tabs-content">
<!-- 有效 Tab -->
<div v-if="pageMsg.activeTabs === 0" class="tab-panel">
<div>
<div class="couponList">
<div class="couponItem" v-for="(item, i) in couponList" :key="i">
<div class="itemleft">
<div>
<span class="leftUnit">¥</span>
<span class="money">{{ item.UseAmount }}</span>
</div>
<div v-if="!item.CouponSendId && item.CouponPoint" class="condition">
{{ item.CouponPoint }}积分兑换
</div>
<div v-else class="condition">
{{
<scroll-view class="couponContent" scroll-y>
<view class="couponItem" v-for="(item, index) in showCouponList" :key="index">
<view class="couponItemTop">
<view class="couponItemLeft">
<view class="couponItemPrice">
<text class="couponItemPriceUnit">¥</text>
<text class="couponItemPriceValue">{{ item.UseAmount }}</text>
</view>
<view class="couponItemRule" v-if="!item.CouponSendId && item.CouponPoint">{{ item.CouponPoint }}积分兑换</view>
<view class="couponItemRule" v-else>{{
item.WithAmount > 0
? "满" + item.WithAmount + "可用"
: "无门槛使用"
}}
</div>
</div>
<div class="itemRight">
<div>
<div class="couponName">{{ item.CouponName }}</div>
<div class="timeText">
<span class="coupon-date" v-if="item.CouponSendId">有效期至{{ item.EndTime }}</span>
<span class="coupon-date" v-else>活动至{{ item.EndTime }}</span>
</div>
</div>
}}</view>
</view>
<div class="useBtn">
<span class="useBtnText" v-if="!item.CouponSendId" @click="goShop(item)">点击领取</span>
<view class="couponItemRight">
<view class="couponItemRightLeft">
<view class="couponItemName">{{ item.CouponName }}</view>
<view class="couponItemTime" v-if="item.CouponSendId">有效期至{{ item.EndTime }}</view>
<view class="couponItemTime" v-else>活动至{{ item.EndTime }}</view>
<view class="couponItemUsedType" @click="handleShowRule(item)" v-if="item.PayMethodText">
<view class="couponItemUsedTypeLabel">使用规则</view>
<image class="couponItemUsedTypeIcon"
:style="{ transform: item.showRule ? 'rotate(180deg)' : 'rotate(0deg)' }"
src="http://saas.eshangtech.com/caiyunyiImg/bottomArrow.png" />
</view>
</view>
<view class="couponItemRightRight">
<view class="noUsed" v-if="item.CouponState === 0" @click="goShop(item)">去使用</view>
<view class="used" v-if="item.CouponState === 1">已使用</view>
<view class="used" v-if="item.CouponState === 2">已过期</view>
</view>
</view>
</view>
<image class="goUseIcon" v-else-if="item.CouponState == 0" @click="handleGoCouponsList(item)"
src="/static/images/home/goUseIcon.svg" />
<!-- <span class="useBtnText" @click="handleGoCouponsList(item)" v-else-if="item.takeState">查看</span> -->
<!-- <span class="useBtnText" v-else>{{
item.CouponStateText
}}</span> -->
</div>
</div>
</div>
</div>
</div>
<NoData :text="'您暂无可使用的优惠券'" v-if="!(couponList && couponList.length > 0)" />
</div>
<!-- 无效 Tab -->
<div v-if="pageMsg.activeTabs === 1" class="tab-panel">
<div>
<div class="invalidList">
<div class="couponItem" v-for="(item, i) in novalid" :key="i" @drop="goShop(item)">
<div class="itemleft">
<div>
<span class="leftUnit">¥</span>
<span class="money">{{ item.UseAmount }}</span>
</div>
<div v-if="!item.CouponSendId && item.CouponPoint" class="condition">
{{ item.CouponPoint }}积分兑换
</div>
<div v-else class="condition">
{{
item.WithAmount > 0
? "满" + item.WithAmount + "可用"
: "无门槛使用"
}}
</div>
</div>
<div class="itemRight">
<div>
<div class="couponName">{{ item.CouponName }}</div>
<div class="timeText">
<span class="coupon-date" v-if="item.CouponSendId">有效期至{{ item.EndTime }}</span>
<span class="coupon-date" v-else>活动至{{ item.EndTime }}</span>
</div>
</div>
<div class="useBtn">
<image class="goUseIcon" @click="goShop(item)" src="/static/home/expire.svg" />
<!-- <span class="useBtnText" @click="handleGoCouponsList(item)" v-else-if="item.takeState">查看</span> -->
<!-- <span class="useBtnText" v-else>{{
item.CouponStateText
}}</span> -->
</div>
</div>
</div>
<!-- <div class="couponItem" v-for="(item, i) in novalid" :key="i" @drop="goShop(item)">
<div class="itemleft">
<div>
<span class="leftUnit">¥</span>
<span class="money">{{ item.UseAmount }}</span>
</div>
<div v-if="!item.CouponSendId && item.CouponPoint" class="condition">
{{ item.CouponPoint }}积分兑换
</div>
<div v-else class="condition">
{{
item.WithAmount > 0
? "满" + item.WithAmount + "可用"
: "无门槛使用"
}}
</div>
</div>
<div class="itemRight">
<div>
<div class="couponName">{{ item.CouponName }}</div>
<div class="timeText">
<span class="coupon-date" v-if="item.CouponSendId">有效期至{{ item.EndTime }}</span>
<span class="coupon-date" v-else>活动至{{ item.EndTime }}</span>
</div>
</div>
<div class="useBtn">
<span class="useBtnText">已过期</span>
</div>
</div>
</div> -->
</div>
</div>
<NoData :text="'暂无信息'" v-if="!(novalid.length > 0)" />
</div>
</div>
</div>
<view class="couponItemBottom" v-if="item.showRule">
<view class="couponItemBottomDesc">{{ item.PayMethodText }}</view>
</view>
</view>
<view v-if="showCouponList.length === 0">
<NoData :text="'暂无信息'" />
</view>
</scroll-view>
</view>
</template>
@ -162,6 +76,10 @@ export default {
specialCards: [], //
novalid: [],
isCustomLoading: false,
tabList: [{ label: "未使用", value: 1 }, { label: "已使用", value: 2 }, { label: "已过期", value: 3 }],// tab
selectTab: 1,
allCouponList: [],//
showCouponList: [],//
};
},
computed: {
@ -173,10 +91,58 @@ export default {
components: {
NoData,
},
onUnload() {
this.novalid = [];
this.couponList = [];
this.pageMsg.isLoading = true;
this.pageMsg.activeTabs = 0;
},
// onHide () {
// this.couponOrder = {}
// this.couponList = []
// this.novalid = []
// },
onShow() {
// this.getList();
},
async onLoad(option) {
await this.handleGetData()
// this.setIsLoading(true)
// this.getUnList();
// this.$utils.addUserBehaviorNew();
},
// onReachBottom() {
// if (this.pageMsg.isLoadMore) {
// this.pageMsg.pageIndex += 1;
// this.getList();
// }
// },
// onPullDownRefresh() {
// this.pageMsg.pageIndex = 1;
// this.getList();
// this.getUnList();
// setTimeout(function () {
// uni.stopPullDownRefresh();
// }, 1000);
// },
methods: {
...mapMutations({
setIsLoading: "setIsLoading",
}),
//
handleShowRule(item) {
item.showRule = !item.showRule
this.$forceUpdate();
},
// tab
handleChangeTab(value) {
this.selectTab = value
this.showCouponList = this.allCouponList[this.selectTab - 1]
console.log('this.showCouponList', this.showCouponList.length);
this.$forceUpdate();
},
handleGoCouponsList(obj) {
console.log('obj', obj);
// uni.navigateTo({
@ -205,10 +171,41 @@ export default {
});
},
async handleGetData() {
const req = {
CouponStatus: "0,1,2"
}
const data = await this.$api.$get("/WeChat/GetMemberCouponList", req)
console.log('data', data);
let list = data.Result_Data.List
// 使
let toBeUsed = []
// 使
let usedAlready = []
//
let expired = []
if (list && list.length > 0) {
list.forEach((item) => {
item.showRule = false
if (item.CouponState === 0) {
toBeUsed.push(item)
} else if (item.CouponState === 1) {
usedAlready.push(item)
} else if (item.CouponState === 2) {
expired.push(item)
}
})
}
this.allCouponList = [toBeUsed, usedAlready, expired]
this.showCouponList = this.allCouponList[this.selectTab - 1]
},
getList() {
let _this = this;
this.$api
.$get("/WeChat/GetMemberCouponList", { CouponStatus: 0 })
.$get("/WeChat/GetMemberCouponList", { CouponStatus: 0 }) // 使
.then((rs) => {
_this.pageMsg.isLoading = false;
if (rs.Result_Code === 100) {
@ -229,494 +226,239 @@ export default {
this.isCustomLoading = true;
let _this = this;
_this.$api
.$get("/WeChat/GetMemberCouponList", { CouponStatus: "1,2" })
.$get("/WeChat/GetMemberCouponList", { CouponStatus: "1,2" }) // 使
.then((rs) => {
if (rs.Result_Code === 100) {
console.log('rsrsrsrsrsrsrs', rs);
_this.novalid = rs.Result_Data.List;
}
_this.isCustomLoading = false;
});
},
},
onUnload() {
this.novalid = [];
this.couponList = [];
this.pageMsg.isLoading = true;
this.pageMsg.activeTabs = 0;
},
// onHide () {
// this.couponOrder = {}
// this.couponList = []
// this.novalid = []
// },
onShow() {
this.getList();
},
onLoad(option) {
// this.setIsLoading(true)
this.getUnList();
this.$utils.addUserBehaviorNew();
},
onReachBottom() {
if (this.pageMsg.isLoadMore) {
this.pageMsg.pageIndex += 1;
this.getList();
}
},
onPullDownRefresh() {
this.pageMsg.pageIndex = 1;
this.getList();
this.getUnList();
setTimeout(function () {
uni.stopPullDownRefresh();
}, 1000);
},
};
</script>
<style lang="stylus" scoped>
bodyColor = #CAA97F;
color999 = #999999;
<style lang="less" scoped>
.main {
width: 100vw;
height: 100vh;
background-color: #F1F5F6;
.coupon {
padding-bottom: 20rpx;
}
.tabBox {
width: 100%;
height: 88rpx;
box-sizing: border-box;
padding: 30rpx 0 0;
background-color: #fff;
display: flex;
align-items: center;
justify-content: space-between;
.coupon-bg {
opacity: 0.5;
}
.coupon-title {
.tabItem {
// width: 120rpx;
width: calc(100% / 3);
height: 58rpx;
font-family: PingFangSC, PingFang SC;
font-weight: 400;
font-size: 28rpx;
color: #333333;
font-size: 32rpx;
display: flex;
align-items: center;
width: 638rpx;
margin: 30rpx auto 0 auto;
image {
width: 62rpx;
height: 62rpx;
margin-right: 24rpx;
border-radius: 36rpx;
}
}
.tabs-header {
display: flex;
justify-content: space-around;
border-bottom: 1px solid #eee;
background:#fff;
}
.tab-item {
// flex: 1;
line-height: 40rpx;
text-align: center;
padding: 12px 0;
font-size: 16px;
cursor: pointer;
color: #333;
font-style: normal;
}
.tab-item.active {
font-weight: bold;
color: #caa97f; /* 激活状态颜色 */
border-bottom: 2px solid #caa97f; /* 激活状态下的底部边框 */
.selectTabItem {
font-family: PingFangSC, PingFang SC;
font-weight: 400;
font-size: 28rpx;
color: #EC632E;
line-height: 40rpx;
text-align: center;
font-style: normal;
position: relative;
}
.tabs-content {
padding: 10px;
.selectTabItem::after {
content: "";
width: 2rem;
height: 6rpx;
background: #EC632E;
position: absolute;
left: 50%;
bottom: 0;
transform: translateX(-50%);
}
}
.tab-panel {
display: block;
.couponList {
.couponContent {
width: 100%;
height: calc(100% - 88rpx);
box-sizing: border-box;
padding: 46rpx 24rpx 0;
.couponItem {
width: 100%;
height: 144rpx;
// background: url('https://eshangtech.com/wanmeiyizhanImg/home/validCoupons.png') no-repeat center;
background: url('https://eshangtech.com/wanmeiyizhanImg/newCouponBg.svg') no-repeat ;
background-size: cover;
display: flex;
align-items: center;
margin-bottom: 32rpx;
.itemleft {
display: flex;
flex-direction: column;
align-items: center;
box-sizing: border-box;
padding-left: 30rpx;
margin-right: 50rpx;
// border-right: 2rpx dashed #E5CD92;
padding: 28rpx 24rpx;
background: #FFFFFF;
border-radius: 8rpx;
margin-bottom: 22rpx;
.leftUnit {
font-family: PingFangSC, PingFang SC;
font-weight: 400;
font-size: 34rpx;
color: #FF3A3A;
line-height: 48rpx;
text-align: left;
font-style: normal;
margin-right: 4rpx;
}
.money {
font-family: DINAlternate, DINAlternate;
font-weight: bold;
font-size: 48rpx;
color: #FF3A3A;
line-height: 56rpx;
text-align: left;
font-style: normal;
}
.condition {
font-family: PingFangSC, PingFang SC;
font-weight: 400;
font-size: 20rpx;
color: #FF3A3A;
line-height: 28rpx;
text-align: justify;
font-style: normal;
}
}
.itemRight {
flex: 1;
.couponItemTop {
width: 100%;
box-sizing: border-box;
padding: 0 32rpx;
display: flex;
align-items: center;
justify-content: space-between;
.couponName {
.couponItemLeft {
width: 160rpx;
margin-right: 22rpx;
.couponItemPrice {
text-align: center;
.couponItemPriceUnit {
font-family: PingFangSC, PingFang SC;
font-weight: 400;
font-weight: 600;
font-size: 28rpx;
color: #000000;
color: #E84D38;
line-height: 40rpx;
text-align: left;
font-style: normal;
display: inline-block;
width: 200rpx;
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
}
.timeText {
.coupon-date {
font-family: PingFangSC, PingFang SC;
font-weight: 400;
font-size: 22rpx;
color: #716F69;
line-height: 32rpx;
text-align: justify;
font-style: normal;
}
}
.useBtn {
.useBtnText {
font-family: PingFangSC, PingFang SC;
font-weight: 400;
font-size: 24rpx;
color: #FFFFFF;
line-height: 36rpx;
text-align: center;
font-style: normal;
padding: 8rpx 20rpx;
background: #FF3A3A;
border-radius: 32rpx;
}
.goUseIcon {
width: 110rpx;
height: 110rpx;
}
}
}
}
}
.invalidList {
width: 100%;
box-sizing: border-box;
.couponItem {
width: 100%;
height: 144rpx;
// background: url('https://eshangtech.com/wanmeiyizhanImg/home/validCoupons.png') no-repeat center;
background: url('https://eshangtech.com/wanmeiyizhanImg/expireBg.svg') no-repeat ;
background-size: cover;
display: flex;
align-items: center;
margin-bottom: 32rpx;
.itemleft {
display: flex;
flex-direction: column;
align-items: center;
box-sizing: border-box;
padding-left: 30rpx;
margin-right: 50rpx;
// border-right: 2rpx dashed #E5CD92;
.leftUnit {
.couponItemPriceValue {
font-family: PingFangSC, PingFang SC;
font-weight: 400;
font-size: 34rpx;
color:#868686;
line-height: 48rpx;
text-align: left;
font-style: normal;
margin-right: 4rpx;
}
.money {
font-family: DINAlternate, DINAlternate;
font-weight: bold;
font-size: 48rpx;
color: #868686;
line-height: 56rpx;
text-align: left;
font-style: normal;
}
.condition {
font-family: PingFangSC, PingFang SC;
font-weight: 400;
font-size: 20rpx;
color: #868686;
line-height: 28rpx;
text-align: justify;
font-style: normal;
}
}
.itemRight {
flex: 1;
width: 100%;
box-sizing: border-box;
padding: 0 32rpx;
display: flex;
align-items: center;
justify-content: space-between;
.couponName {
font-family: PingFangSC, PingFang SC;
font-weight: 400;
font-size: 28rpx;
color: #000000;
font-weight: 600;
font-size: 52rpx;
color: #E84D38;
line-height: 40rpx;
text-align: center;
font-style: normal;
}
}
.couponItemRule {
font-family: PingFangSC, PingFang SC;
font-weight: 400;
font-size: 24rpx;
color: #E84D38;
line-height: 28rpx;
text-align: center;
font-style: normal;
margin-top: 12rpx;
}
}
.couponItemRight {
width: calc(100% - 182rpx);
display: flex;
align-items: center;
.couponItemRightLeft {
width: calc(100% - 120rpx - 44rpx);
.couponItemName {
font-family: PingFangSC, PingFang SC;
font-weight: 600;
font-size: 28rpx;
color: #333333;
line-height: 34rpx;
text-align: left;
font-style: normal;
display: inline-block;
width: 200rpx;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
/* 最多显示2行 */
-webkit-box-orient: vertical;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
.timeText {
.coupon-date {
.couponItemTime {
font-family: PingFangSC, PingFang SC;
font-weight: 400;
font-size: 22rpx;
color: #716F69;
line-height: 32rpx;
text-align: justify;
font-weight: 500;
font-size: 24rpx;
color: #666666;
line-height: 34rpx;
text-align: left;
font-style: normal;
}
margin-top: 12rpx;
}
.useBtn {
.useBtnText {
.couponItemUsedType {
display: flex;
align-items: center;
margin-top: 16rpx;
.couponItemUsedTypeLabel {
font-family: PingFangSC, PingFang SC;
font-weight: 400;
font-size: 24rpx;
color: #FFFFFF;
line-height: 36rpx;
text-align: center;
color: #999999;
line-height: 28rpx;
text-align: left;
font-style: normal;
padding: 8rpx 20rpx;
background: #FF3A3A;
border-radius: 32rpx;
}
.goUseIcon {
width: 110rpx;
height: 110rpx;
}
}
}
}
.couponItemUsedTypeIcon {
width: 20rpx;
height: 20rpx;
margin-left: 4rpx;
}
}
.coupon-card {
background: url('https://eshangtech.com/ShopICO/coupon-bg.png') no-repeat center; // eshangtech.com/ShopICO/coupon-bg.png) no-repeat center
background-size: contain;
height: 229rpx;
width: 669rpx;
padding: 20rpx 30rpx;
margin: 30rpx auto 0 auto;
box-sizing: border-box;
font-size: 24rpx;
}
.coupon-top {
display: flex;
justify-content: space-between;
align-items: center;
height: 100%;
}
.coupon-left {
text-align: center;
color: bodyColor;
}
.coupon-price {
color: #323033;
font-size: 46rpx;
font-weight: bolder;
font-family: 'San Francisco Display Medium';
line-height: 46rpx;
}
.coupon-manjian {
margin-top: 20rpx;
}
.coupon-center {
display: flex;
justify-content: space-between;
align-items: center;
// margin-top 16rpx
}
.coupon-img {
width: 110rpx;
height: 110rpx;
border-radius: 10rpx;
background: #dddddd;
margin-right: 20rpx;
}
.coupon-zx {
display: inline-block;
padding: 6rpx 10rpx;
color: #be6f6b;
border: 2rpx solid #edd0cc;
background: #fef4f3;
border-radius: 6rpx;
margin: 6rpx 0;
}
.coupon-name {
color: #000;
font-size: 28rpx;
margin-bottom: 20rpx;
// font-weight 800
}
.coupon-right {
display: flex;
justify-content: space-between;
align-items: center;
padding-top: 20rpx;
}
.coupon-use-door {
background: url('https://eshangtech.com/ShopICO/coupon-btn.png') no-repeat center; // eshangtech.com/ShopICO/coupon-btn.png) no-repeat center
background-size: contain;
color: #ffffff;
text-align: center;
display: inline-block;
.couponItemRightRight {
width: 120rpx;
height: 40rpx;
margin-left: 44rpx;
.noUsed {
font-family: PingFangSC, PingFang SC;
font-weight: 400;
font-size: 28rpx;
color: #FFFFFF;
line-height: 40rpx;
}
.coupon-door {
display: inline-block;
background: #f2f2f2;
color: #999;
padding: 6rpx 30rpx;
border-radius: 20rpx;
font-size: 24rpx;
}
.coupon-date {
color: #333333;
}
.span24 {
display: block;
color: color999;
font-size: 24rpx;
}
.coupon-btn {
height: 100rpx;
width: 100%;
line-height: 100rpx;
background: #333;
color: bodyColor;
text-align: center;
font-size: 30rpx;
position: fixed;
bottom: 0rpx;
left: 0rpx;
}
.activity-btn {
width: 152rpx;
height: 46rpx;
// position absolute
// bottom 74rpx
// left 55rpx
color: #666;
background: #eee;
border: 2rpx solid #ededed;
font-size: 24rpx;
text-align: center;
border-radius: 36rpx;
line-height: 48rpx;
margin-top: 36rpx;
margin-bottom: 17rpx;
}
.activity-card {
background: url('https://eshangtech.com/ShopICO/activity_card_201907292.png') no-repeat center; // eshangtech.com/ShopICO/activity_card_201907292.png) no-repeat center
background-size: contain;
width: 673rpx;
height: 310rpx;
padding: 35rpx 56rpx;
text-align: left;
margin: 12rpx auto 0 auto;
font-style: normal;
box-sizing: border-box;
font-size: 24rpx;
padding: 4rpx 18rpx;
background: #E84D38;
border-radius: 26rpx;
}
.use-card-btn {
width: 152rpx;
height: 46rpx;
color: #fff;
background: linear-gradient(to right, #A17356, #D8AA8B);
.used {
font-family: PingFangSC, PingFang SC;
font-weight: 400;
font-size: 28rpx;
color: #FFFFFF;
line-height: 40rpx;
text-align: left;
font-style: normal;
padding: 4rpx 18rpx;
background: #CCCCCC;
border-radius: 26rpx;
}
}
}
}
.couponItemBottom {
width: 100%;
box-sizing: border-box;
padding: 0 50rpx 0 24rpx;
font-family: PingFangSC, PingFang SC;
font-weight: 400;
font-size: 24rpx;
text-align: center;
border-radius: 36rpx;
line-height: 48rpx;
margin-top: 38rpx;
margin-bottom: 17rpx;
color: #999999;
line-height: 28rpx;
text-align: left;
font-style: normal;
margin-top: 48rpx;
}
}
}
}
</style>

View File

@ -72,6 +72,7 @@
}}</view>
<view class="status">
<span class="statusText">营业中</span>
<span class="bePacked" v-if="serviceDetail.LoadBearing_State === 1000">爆满</span>
</view>
</view>
@ -560,7 +561,11 @@ export default {
// this.getLocalServer();
if (currentService) {
this.serviceDetail = this.handleMergeDetail(currentService);
let res = this.handleMergeDetail(currentService);
this.serviceDetail = {
...this.serviceDetail,
...res
}
console.log('onLoad', this.serviceDetail);
} else {
@ -1430,6 +1435,7 @@ export default {
this.serverPartList = data.Result_Data.List;
let nearService = this.serverPartList[0];
console.log('nearServicenearServicenearService', nearService);
nearService.sumDetail = this.handleMergeDetail(nearService);
this.serviceDetail = nearService;
@ -1871,6 +1877,21 @@ export default {
border-radius: 4rpx;
display: inline-block;
}
.bePacked {
font-family: PingFangSC, PingFang SC;
font-weight: 400;
font-size: 22rpx;
color: #FF5959;
line-height: 32rpx;
text-align: justify;
font-style: normal;
padding: 2rpx 6rpx;
background: #fbdada;
border-radius: 4rpx;
display: inline-block;
margin-left: 16rpx;
}
}
}

View File

@ -18,31 +18,35 @@
<view class="smallTypeBox">
<view :class="currentTab === item.value ? 'smallTabItem selectSmallTabItem' : 'smallTabItem'"
v-for="(item, index) in tabList" :key="index" @click="handleTab(item.value)">
<template v-if="item.value === 7 && selectBigTab === 3 ? false : true">
{{ item.label }}
<image v-if="currentTab === item.value" class="closeIcon"
src="https://eshangtech.com/caiyunyiImg/closeIcon.png" />
</template>
</view>
</view>
<!-- 订单列表 -->
<scroll-view :scroll-y="true" class="orderListBox"
:style="{ height: `calc(100vh - ${menu.bottom}px - 42px - 35px - 35px)` }">
:style="{ height: `calc(100vh - ${menu.bottom}px - 42px - 35px - 35px)` }" @scrolltolower="handleScrollTolower">
<view class="orderItem" v-for="(item, index) in orderList" :key="index" @click="goEvaluate(item)">
<view class="orderItemTop">
<view class="orderItemTopLeft">
<image class="orderItemIcon" src="https://eshangtech.com/caiyunyiImg/storeIcon.png" />
<view class="orderItemLabel">{{ item.SUPPLIER_NAME || "" }}</view>
<view class="orderItemLabel">{{ item.SHOPNAME || "" }}</view>
</view>
<view class="orderItemTopRight">
<view class="statusBox">{{ item.SALEBILL_STATE_TEXT || "" }}</view>
</view>
</view>
<view class="orderItemCenter" v-for="(subItem, subIndex) in item.IMAGELIST" :key="subIndex">
<view class="orderItemCenter"
v-for="(subItem, subIndex) in item.GOODSList.slice(0, item.isShowMore ? item.GOODSList.length : 5)"
:key="subIndex" @click.stop="handleGoShopDetail(item, subIndex)">
<view class="orderItemCenterLeft">
<image class="orderItemShopImg"
:src="subItem.IMAGE_PATH || 'https://eshangtech.com/ShopICO/no-picture.png'" />
:src="subItem.IMAGE_URL ? subItem.IMAGE_URL.split(',')[0] : 'https://eshangtech.com/ShopICO/no-picture.png'" />
</view>
<view class="orderItemCenterRight">
<view class="orderItemCenterRightLeft">
@ -50,30 +54,46 @@
<view class="orderItemRightLeftSpecifications"></view>
</view>
<view class="orderItemCenterRightRight">
<view class="unitPrice">¥180.88</view>
<view class="orderItemQuantity">x1</view>
<view class="unitPrice">¥{{ subItem.AVERAGE_PRICE || '-' }}</view>
<view class="orderItemQuantity">x{{ subItem.ORDER_COUNT || '-' }}</view>
</view>
</view>
</view>
<div v-if="item.GOODSList.length > 5" class="is_more" @click.stop="handleClickShowMoreShop(item)">
<img :src="item.isShowMore
? '/static/images/home/up_arrow.png'
: '/static/images/home/down_arrow.png'
" alt="" class="arrow_icon" />
{{ item.GOODSList.length }}个品项
</div>
<!-- 实付款 -->
<view class="orderItemMoneyBox">
<span class="orderItemUnit">实付款</span>
<span class="orderItemMoney">¥{{ item.PAY_AMOUNT || "" }}</span>
</view>
<view class="orderItemBottom" v-if="false">
<view class="orderItemBottom">
<view class="orderItemBottomLeft">
<view class="orderItemBottomLeftMore">更多</view>
<view class="orderItemBottomLeftMore" v-if="false">更多</view>
</view>
<view class="orderItemBottomRight">
<view class="orderItemBottomRightEvaluate" v-if="item.SALEBILL_STATE > 3000 && item.SALEBILL_STATE <= 5000">
评价
</view>
<view class="orderItemBottomRightBuyAgain" @click.stop="handleGoStore">再次购买</view>
<view class="orderItemBottomRightBuyAgain" v-if="item.SALEBILL_STATE === 1005"
@click.stop="goEvaluate(item)">
去付款</view>
<view class="orderItemBottomRightBuyAgain" v-if="item.SALEBILL_STATE === 2010"
@click.stop="handleConfirmReceipt(item)">确认收货</view>
<!-- <view class="orderItemBottomRightBuyAgain" @click.stop="handleGoStore">再次购买</view> -->
</view>
</view>
</view>
<view class="inBottom" v-if="pageMsg.isOver">
<text class="bottomText">我是有底线的</text>
</view>
</scroll-view>
@ -191,6 +211,60 @@ export default {
this.$utils.addUserBehaviorNew();
},
methods: {
//
handleConfirmReceipt(obj) {
console.log('obj', obj);
let _this = this
uni.showModal({
title: '提示',
content: '确认已收货?',
success: async function (res) {
if (res.confirm) {
const req = {
action_type: "UpdateOrderState",
action_data: obj.SALEBILL_ID,
saleBillChildId: obj.SALEBILL_CHILD_ID || "",
SALEBILL_STATE: 3000,
}
const data = await _this.$api.getCoop(req)
console.log('data', data);
if (data.error !== 1) {
uni.showToast({
title: data.msg,
icon: 'none'
})
} else {
uni.showToast({
title: "收货成功!",
icon: 'none'
})
let type =
_this.currentTab === 1
? "1005,1010,2010,3000,8000,8010,8020,8900,8999,9000,9999"
: _this.currentTab === 2
? "1005"
: _this.currentTab === 3
? "1010,2000"
: _this.currentTab === 4
? "2010"
: _this.currentTab === 5
? ""
: "";
_this.handleGetOrderList(type);
}
} else if (res.cancel) {
}
}
});
},
//
handleClickShowMoreShop(obj) {
console.log('obj', obj);
obj.isShowMore = !obj.isShowMore
this.$forceUpdate()
},
// 驿
handleGoStore() {
@ -204,6 +278,11 @@ export default {
// tab
handleBigTab(val) {
this.selectBigTab = val
console.log('this.currentTab', this.currentTab);
if (val === 3 && this.currentTab === 7) {
this.currentTab = 2
}
console.log('this.selectBigTab', this.selectBigTab);
this.orderList = []
@ -225,6 +304,7 @@ export default {
? ""
: "";
this.handleGetOrderList(type);
this.$forceUpdate()
},
//
handleScrollTolower() {
@ -244,24 +324,34 @@ export default {
this.handleGetOrderList(type);
},
handleTab(val) {
if (this.selectBigTab === 3 && val === 7) {
this.currentTab = 2
}
this.pageMsg = {
pageIndex: 1,
pageSize: 10,
isOver: false,
};
if (this.currentTab === val) {
this.currentTab = ""
} else {
this.currentTab = val;
}
this.orderList = [];
let type =
val === 1
this.currentTab === 1
? "1005,1010,2010,3000,8000,8010,8020,8900,8999,9000,9999"
: val === 2
: this.currentTab === 2
? "1005"
: val === 3
: this.currentTab === 3
? "1010,2000"
: val === 4
: this.currentTab === 4
? "2010"
: val === 5
: this.currentTab === 5
? ""
: "";
this.handleGetOrderList(type);
@ -317,7 +407,7 @@ export default {
mask: true,
});
const req = {
action_type: "GetMallOrderList",
action_type: "GetOrderList",
salebillType: this.searchType === "6" ?
this.selectBigTab === 1 ? '3001,3999' :
this.selectBigTab === 2 ? '3999' :
@ -325,7 +415,7 @@ export default {
:
this.selectBigTab === 1 ? '3000,3001,3002,3999' :
this.selectBigTab === 2 ? '3000,3002,3999' :
this.selectBigTab === 3 ? '3001,3999' : '',
this.selectBigTab === 3 ? '3001' : '',
salebillState: this.searchType === "6" ? "" : status || "",
// salebillType:
// this.searchType === "6"
@ -391,6 +481,14 @@ export default {
item.SUPPLIER_NAME,
});
},
handleGoShopDetail(item, index) {
console.log('itemitemitemitem', item);
console.log('indexindexindexindex', index);
let obj = item.GOODSList[index]
uni.navigateTo({
url: `/pages/shopPages/shopDetail/index?id=${obj.COMMODITY_ID}`,
});
}
},
};
</script>
@ -663,6 +761,24 @@ export default {
}
}
.is_more {
width: 400rpx;
height: 40rpx;
margin: auto;
text-align: center;
//display: flex;
//flex-direction: row;
//align-items: center;
color: #9fa3a8;
font-size: 28rpx;
.arrow_icon {
width: 26rpx;
height: 16rpx;
margin-right: 16rpx;
}
}
.orderItemMoneyBox {
width: 100%;
display: flex;
@ -697,7 +813,7 @@ export default {
display: flex;
align-items: center;
justify-content: space-between;
margin-top: 16rpx;
margin-top: 32rpx;
.orderItemBottomLeft {
.orderItemBottomLeftMore {
@ -725,7 +841,7 @@ export default {
text-align: left;
font-style: normal;
text-transform: none;
padding: 2rpx 26rpx;
padding: 4rpx 26rpx;
background: #F2F5F6;
border-radius: 4rpx;
margin-right: 34rpx;
@ -740,13 +856,52 @@ export default {
text-align: left;
font-style: normal;
text-transform: none;
padding: 2rpx 26rpx;
padding: 4rpx 26rpx;
background: #F2F5F6;
border-radius: 4rpx;
}
}
}
}
.inBottom {
width: 100%;
display: flex;
align-items: center;
justify-content: center;
.bottomText {
font-family: PingFangSC, PingFang SC;
font-weight: 400;
font-size: 26rpx;
color: #d0d0d0;
line-height: 40rpx;
text-align: justify;
font-style: normal;
position: relative;
padding: 6rpx 0;
}
.bottomText::after {
content: "";
width: 30vw;
height: 2rpx;
background: #e0e0e0;
position: absolute;
left: -32vw;
top: 50%;
}
.bottomText::before {
content: "";
width: 30vw;
height: 2rpx;
background: #e0e0e0;
position: absolute;
right: -32vw;
top: 50%;
}
}
}

View File

@ -47,12 +47,13 @@
</div>
<div class="commodity margin_auto">
<CommodityItem :isSubmit="isSubmit" :obj="item" v-for="(item, index) in shopOrder.slice(0, 5)" :key="index"
<CommodityItem :isSubmit="isSubmit" :obj="item"
v-for="(item, index) in shopOrder.slice(0, isShowMore ? 5 : shopCount)" :key="index"
@update-desc="updateDesc" />
<div class="is_more" @click="isShowMore = !isShowMore">
<img v-if="shopOrder.length > 5" :src="isShowMore
? '/static/images/home/up_arrow.png'
: '/static/images/home/down_arrow.png'
? '/static/images/home/down_arrow.png'
: '/static/images/home/up_arrow.png'
" alt="" class="arrow_icon" />
{{ shopOrder.length }}个品项{{ shopCount }}件商品
</div>

View File

@ -75,10 +75,12 @@
<div style="
display: flex;
box-sizing: border-box;
padding: 16rpx 0 16rpx 32rpx;
padding: 16rpx 32rpx 16rpx 32rpx;
justify-content: space-between;
">
<!-- align-items: center;
justify-content: space-between; -->
<view style="display: flex">
<div class="price-box">
<div class="vip-price">
<span class="unit">¥</span>
@ -96,13 +98,15 @@
</div> -->
</div>
<div class="marketBottom" v-if="good.COMMODITY_RETAILPRICE">
<span class="marketPrice">市场价¥{{ good.COMMODITY_RETAILPRICE }}</span>
</div>
</view>
<div>
<view class="inventory">销量{{ good.COMMODITY_EN || "0" }}</view>
<!-- <span class="sale-count">
{{
good.COMMODITY_STOCK > 0 ? "库存 " + good.COMMODITY_STOCK : "售罄"
@ -111,6 +115,10 @@
<span class="sale-count">已售 {{ good.SALE_COUNT }}</span> -->
</div>
</div>
<div class="product-title">
{{ good.COMMODITY_NAME || "-" }}
</div>
@ -121,7 +129,7 @@
}}</view
> -->
<view class="inventory">库存{{ good.COMMODITY_STOCK || "0" }}</view>
<view class="inventory">销量{{ good.COMMODITY_EN || "0" }}</view>
<view class="inventory">规格{{ good.COMMODITY_RULE || "" }}</view>
<button class="share-btn" @tap="handleShowPopup">
<!-- <van-icon name="share" color="#ea3323" size="20px" /> -->
@ -515,38 +523,103 @@ export default {
handleDesc(e, item) {
this.good.SALEDETAIL_DESC = e.detail.value
},
//
//
handleCollect() {
async handleCollect() {
if (this.isCollect) {
let collectGoodList = uni.getStorageSync('collectGood')
let newList = []
if (collectGoodList && collectGoodList.length > 0) {
collectGoodList.forEach((item) => {
if (item.COMMODITY_ID !== this.shopId) {
newList.push(item)
let req = {
COLLECTIONId: this.good.COLLECTION_ID,
type: "encryption",
}
})
}
uni.setStorageSync('collectGood', newList)
//
console.log('reqreqreq', req);
const data = await this.$api.$zzyLocalPost(
"/Member/DeleteCOLLECTION",
req
);
console.log('data', data);
if (data.Result_Code === 100) {
uni.showToast({
title: '取消收藏',
title: '删除成功!',
icon: 'none'
})
this.isCollect = false
} else {
let collectGoodList = uni.getStorageSync('collectGood')
if (collectGoodList && collectGoodList.length > 0) {
collectGoodList.push(this.good)
} else {
collectGoodList = [this.good]
uni.showToast({
title: data.Result_Desc,
icon: 'none'
})
}
uni.setStorageSync('collectGood', collectGoodList)
} else {
let req = {
COLLECTION_ID: this.good.COLLECTION_ID || "",
COLLECTION_TYPE: 2000,
MEMBERSHIP_ID: this.user.MEMBERSHIP_ID,
TABLE_ID: this.good.COMMODITY_ID,
TABLE_NAME: "COOP_MERCHANT.T_COMMODITY",
APP_GUID: "wxee018fb96955552a",
COLLECTION_STATE: 1,
PROVINCE_CODE: this.user.PROVINCE_CODE,
OWNERUNIT_ID: 911,
type: "encryption",
STAFF_NAME: this.user.MEMBERSHIP_NAME,
OPERATE_DATE: this.$moment.now().format("YYYY-MM-DD")
}
//
console.log('reqreqreq', req);
const data = await this.$api.$zzyLocalPost(
"/Member/SynchroCOLLECTION",
req
);
console.log('data', data);
if (data.Result_Code === 100) {
uni.showToast({
title: '已添加至收藏夹',
icon: 'none'
})
this.isCollect = true
} else {
uni.showToast({
title: data.Result_Desc,
icon: 'none'
})
}
}
// if (this.isCollect) {
// let collectGoodList = uni.getStorageSync('collectGood')
// let newList = []
// if (collectGoodList && collectGoodList.length > 0) {
// collectGoodList.forEach((item) => {
// if (item.COMMODITY_ID !== this.shopId) {
// newList.push(item)
// }
// })
// }
// uni.setStorageSync('collectGood', newList)
// uni.showToast({
// title: '',
// icon: 'none'
// })
// this.isCollect = false
// } else {
// let collectGoodList = uni.getStorageSync('collectGood')
// if (collectGoodList && collectGoodList.length > 0) {
// collectGoodList.push(this.good)
// } else {
// collectGoodList = [this.good]
// }
// uni.setStorageSync('collectGood', collectGoodList)
// uni.showToast({
// title: '',
// icon: 'none'
// })
// this.isCollect = true
// }
},
//
@ -1079,7 +1152,9 @@ export default {
res.Data.DUTY_PARAGRAPH = res.Data.DUTY_PARAGRAPH.toString()
if (res.Data.COLLECTION_STATE === '1') {
_this.isCollect = true
}
_this.good = res.Data;
_this.good.COMMODITY_CURRPRICE = _this.good.COMMODITY_MEMBERPRICE;
@ -1865,6 +1940,12 @@ hr {
padding-right: 32rpx;
}
.inventory {
color: #999999;
font-size: 24rpx;
}
.vip-price {
font-size: 42rpx;
color: #ea3323;

View File

@ -1,265 +1,376 @@
<template>
<view class="main">
<scroll-view :scroll-y="true" class="shopList" v-if="shopList && shopList.length > 0"
:style="{ height: `calc(100vh - ${safeHeight}px)` }">
<div v-for="(item, i) in shopList" :key="item.COMMODITY_ID" class="shopDetailItem"
:style="{ marginBottom: index + 1 === shopList.length ? '0' : '8rpx' }" @click="showDetail(item)">
<image class="leftImg" style="width: 80px; height: 80px"
:src="item.DEFAULT_IMG || '/static/images/home/defultImg.png'" :lazy-load="true"
@error="e => e.target.src = '/static/images/home/defultImg.png'" :key="item.COMMODITY_ID" />
<div class="rightBox">
<p class="detailTitle">{{ item.COMMODITY_NAME }}</p>
<div class="bottom">
<div class="detailPrice">
<span class="priceUnit">¥</span>
<span class="number" style="font-size: 20px">
{{ item.bigNumber || "" }}</span>
<span class="number" style="font-size: 14px">.{{ item.smallNumber || "00" }}</span>
<span class="unit">/ {{ item.COMMODITY_UNIT }}</span>
</div>
<view class="maintopBox">
<view class="mainTopRight" @click="handleChangeSortType">
<view class="distanceText">{{ sortType === 1 ? '按时间' : '按价格' }}</view>
<image class="distanceIcon" src="https://eshangtech.com/caiyunyiImg/sortIcon.png" />
</view>
</view>
</div>
</div>
</div>
<view class="mainBottom">
<scroll-view scroll-y="true" class="scrollView" @scrolltolower="handleScrollBottom">
<view class="nearbyScenicItem" v-for="(item, index) in dataList" :key="index"
@touchstart="handleTouchStart($event, index)" @touchmove="handleTouchMove($event, index)"
@touchend="handleTouchEnd($event, index)">
<view class="swipe-content" :class="{ 'show-delete': item.showDelete }">
<view class="nearByBottomLeftBox">
<image class="nearbyImg" src="/static/images/home/defaultIcon.png" />
</view>
<view class="nearByBottomCenterBox">
<view class="scenicName">{{ item.COMMODITY_NAME }}</view>
<view class="scenicContent" v-if="item.USERDEFINEDTYPE_NAME">
<view class="scenicType">{{ item.USERDEFINEDTYPE_NAME }}</view>
</view>
<view class="scenicBottom">
<view class="scenicBottomItem">
<view class="scenicBottomItemLabel">库存</view>
<view class="scenicBottomItemValue">{{ item.COMMODITY_STOCK || "" }}</view>
</view>
<view class="scenicBottomItem">
<view class="scenicBottomItemLabel">销量</view>
<view class="scenicBottomItemValue">{{ good.COMMODITY_EN || "0" }}</view>
</view>
</view>
</view>
<view class="nearByBottomRightBox">
<view class="shopPriceBox">
<view class="shopPriceUnit">¥</view>
<view class="shopPriceValue">{{ item.COMMODITY_MEMBERPRICE }}</view>
</view>
</view>
<!-- 删除按钮 -->
<view class="delete-btn" v-if="item.showDelete" @click.stop="handleDelete(item)">
删除
</view>
</view>
</view>
</scroll-view>
<view v-else>
<NoData :text="'暂无商品'" :show="true" />
</view>
</view>
</template>
<script>
import NoData from '../../components/noData.vue';
<script>
import { mapGetters } from "vuex";
export default {
data() {
return {
shopList: [],
safeHeight: 0
sortType: 1,// 1:2:
dataList: [],//
startX: 0,
moveX: 0,
}
},
onLoad() {
let systemInfo = uni.getSystemInfoSync();
let height = systemInfo.safeAreaInsets.bottom;
this.safeHeight = Number(height);
let collectGoodList = uni.getStorageSync('collectGood')
this.shopList = collectGoodList
this.handleGetData();
},
computed: {
...mapGetters(["user"]),
},
methods: {
//
showDetail(obj) {
uni.navigateTo({
url: `/pages/shopPages/shopDetail/index?id=${obj.COMMODITY_ID}&pageType=${obj.COMMODITY_NATURE === 5070 ? 'UnionMall' : ''}`,
async handleGetData() {
let req = {
ProvinceCode: this.user.PROVINCE_CODE,
OwnerUnitId: 911,
MemberShipId: this.user.MEMBERSHIP_ID,
AppGuid: "wxee018fb96955552a",
PageIndex: this.PageIndex,
PageSize: 10,
SortStr: this.sortType === 2 ? 'COMMODITY_MEMBERPRICE desc' : "",
type: "encryption"
}
const data = await this.$api.$zzyLocalPost(
"/Member/GetCommodityCollectionList",
req
);
console.log('fjdsifjsaoif', data);
let list = data.Result_Data.List
this.dataList = list
},
handleChangeSortType() {
//
if (this.sortType === 1) {
this.sortType = 2;
} else if (this.sortType === 2) {
this.sortType = 1;
}
this.handleGetData();
},
//
handleScrollBottom() {
},
handleTouchStart(e, index) {
this.startX = e.touches[0].clientX;
// item
this.dataList.forEach((item, i) => {
if (i !== index) item.showDelete = false;
});
},
handleTouchMove(e, index) {
this.moveX = e.touches[0].clientX;
let dis = this.startX - this.moveX;
//
if (dis > 50) {
this.$set(this.dataList[index], 'showDelete', true);
} else if (dis < 10) {
this.$set(this.dataList[index], 'showDelete', false);
}
},
handleTouchEnd(e, index) {
//
},
async handleDelete(obj) {
let req = {
COLLECTIONId: "",
type: "encryption",
}
//
console.log('reqreqreq', req);
const data = await this.$api.$zzyLocalPost(
"/Member/DeleteCOLLECTION",
req
);
console.log('data', data);
if (data.Result_Code === 100) {
uni.showToast({
title: '删除成功!',
icon: 'none'
})
this.handleGetData()
} else {
uni.showToast({
title: data.Result_Desc,
icon: 'none'
})
}
},
}
}
</script>
<style lang="less" scoped>
.main {
width: 100vw;
height: 100vh;
background: #F5F5F5;
box-sizing: border-box;
background-color: #F5F5F5;
display: flex;
flex-direction: column;
justify-content: space-between;
align-items: center;
padding-bottom: constant(safe-area-inset-bottom);
padding-bottom: env(safe-area-inset-bottom);
padding: 24rpx 30rpx;
.shopList {
.maintopBox {
width: 100%;
.shopDetailItem {
width: 100%;
height: 104px;
box-sizing: border-box;
padding: 8px 16px;
display: flex;
border-bottom: 1px solid #f5f7f7;
background-color: #fff;
.leftImg {
width: 80px;
height: 80px;
border-radius: 8px;
}
.rightBox {
margin-left: 12px;
width: calc(100% - 92px);
height: 80px;
display: flex;
flex-direction: column;
justify-content: space-between;
.detailTitle {
display: -webkit-box;
height: 40px;
width: 100%;
font-size: 14px;
font-family: PingFangSC-Semibold, PingFang SC;
font-weight: 600;
color: #020e1a;
line-height: 20px;
overflow: hidden;
text-overflow: ellipsis;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
}
.bottom {
display: flex;
//margin-top: 12px;
align-items: flex-end;
justify-content: space-between;
.detailPrice {
width: calc(100% - 160rpx);
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
.priceUnit {
color: #ff6219;
}
.number {
font-size: 16px;
color: #ff6219;
font-family: PingFangSC-Semibold, PingFang SC;
font-weight: 600;
line-height: 20px;
}
.unit {
display: inline-block;
width: 30%;
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
font-size: 12px;
line-height: 12px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #9fa3a8;
}
}
.addReduceBox {
width: 80px;
height: 40rpx;
display: flex;
align-items: center;
justify-content: flex-end;
.reduceShopCar {
width: 25px;
height: 25px;
border-radius: 50%;
overflow: hidden;
.mainTopRight {
display: flex;
align-items: center;
.optionBtn {
width: 100%;
height: 100%;
}
}
.itemCount {
width: 60rpx;
.distanceText {
font-family: PingFangSC, PingFang SC;
font-weight: 400;
font-size: 28rpx;
color: #020e1a;
line-height: 36rpx;
text-align: center;
font-style: normal;
display: inline-block;
}
.addShopCar {
width: 25px;
height: 25px;
border-radius: 50%;
overflow: hidden;
.optionBtn {
width: 100%;
height: 100%;
}
}
.shopState {
font-size: 24rpx;
color: #fff;
background: #bbbbbb;
padding: 4rpx 16rpx;
border-radius: 8rpx;
color: #333333;
line-height: 34rpx;
text-align: left;
font-style: normal;
text-transform: none;
}
.distanceIcon {
width: 24rpx;
height: 24rpx;
margin-left: 8rpx;
}
}
}
.specifications {
background: linear-gradient(270deg, #fb6c6c 0%, #fd4a4a 100%);
border-radius: 20rpx;
font-family: PingFangSC, PingFang SC;
font-weight: 400;
font-size: 28rpx;
color: #fff;
line-height: 32rpx;
text-align: justify;
font-style: normal;
padding: 8rpx 16rpx;
.mainBottom {
width: 100%;
margin-top: 16rpx;
.scrollView {
.nearbyScenicItem {
position: relative;
overflow: hidden;
margin-bottom: 16rpx;
border-radius: 8rpx;
.swipe-content {
width: calc(100% + 120rpx); //
box-sizing: border-box;
padding: 16rpx 16rpx 24rpx;
display: flex;
align-items: center;
transition: transform 0.2s;
background: #fff;
position: relative;
.specificationsCount {
border: 1px solid #fd4a4a;
border-radius: 16rpx;
color: #fd4a4a;
.nearByBottomLeftBox {
width: 136rpx;
height: 136rpx;
box-sizing: border-box;
padding: 4rpx 0;
margin-right: 28rpx;
.nearbyImg {
width: 100%;
height: 100%;
}
}
.nearByBottomCenterBox {
width: calc(100vw - 164rpx - 140rpx - 60rpx - 32rpx);
.scenicName {
font-family: PingFangSC, PingFang SC;
font-weight: 600;
font-size: 29rpx;
color: #222222;
line-height: 42rpx;
text-align: left;
font-style: normal;
width: 100%;
display: inline-block;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.scenicContent {
width: 100%;
margin-top: 8rpx;
display: flex;
align-items: center;
.scenicType {
font-family: PingFangSC, PingFang SC;
font-weight: 400;
font-size: 22rpx;
color: #3D7FFF;
line-height: 32rpx;
text-align: right;
font-style: normal;
padding: 4rpx 16rpx;
background: rgba(61, 127, 255, 0.1);
border-radius: 6rpx;
margin-right: 30rpx;
}
.scenicRateBox {
display: flex;
align-items: center;
.scenicRate {}
.scenicRateText {
font-family: PingFangSC, PingFang SC;
font-weight: 400;
font-size: 20rpx;
color: rgba(0, 0, 0, 0.6);
line-height: 28rpx;
text-align: left;
font-style: normal;
margin-left: 12rpx;
}
}
}
.scenicBottom {
display: flex;
align-items: flex-end;
justify-content: flex-start;
margin-top: 14rpx;
.scenicBottomItem {
display: flex;
align-items: center;
.scenicBottomItemLabel {
display: inline-block;
width: 70rpx;
font-family: PingFangSC, PingFang SC;
font-weight: 400;
font-size: 22rpx;
color: rgba(0, 0, 0, 0.6);
line-height: 28rpx;
text-align: left;
font-style: normal;
}
.scenicBottomItemValue {
display: inline-block;
width: 80rpx;
font-family: PingFangSC, PingFang SC;
font-weight: 400;
font-size: 22rpx;
color: rgba(0, 0, 0, 0.6);
line-height: 28rpx;
text-align: left;
font-style: normal;
}
}
}
}
.nearByBottomRightBox {
width: 140rpx;
display: flex;
align-items: center;
justify-content: flex-end;
.shopPriceBox {
display: flex;
align-items: flex-end;
.shopPriceUnit {
font-family: PingFangSC, PingFang SC;
font-weight: 600;
font-size: 20rpx;
line-height: 20rpx;
padding: 4rpx 8rpx;
color: #F13216;
text-align: right;
font-style: normal;
}
.shopPriceValue {
font-family: PingFangSC, PingFang SC;
font-weight: 600;
font-size: 40rpx;
line-height: 40rpx;
color: #F13216;
text-align: right;
font-style: normal;
}
}
}
}
.show-delete {
transform: translateX(-120rpx);
}
.delete-btn {
position: absolute;
top: 0;
right: 0;
transform: translate(40%, -80%);
background: #fff;
}
}
.cartcontrol {
width: 80px;
height: 24px;
line-height: 24px;
top: 0;
width: 120rpx;
height: 100%;
background: #ff4d4f;
color: #fff;
display: flex;
justify-content: flex-start;
border: 2rpx solid rgba(2, 14, 26, 0.06);
border-radius: 4rpx;
.subtract {
width: 24px;
height: 24px;
background: #f2f4f5;
display: flex;
justify-content: center;
align-items: center;
border-radius: 4rpx 0rpx 0rpx 4rpx;
font-size: 16rpx;
color: #9fa3a8;
.img {
width: 16px;
height: 16px;
justify-content: center;
font-size: 28rpx;
z-index: 10;
}
}
}
}
.cart-count {
font-size: 24rpx;
flex: 1;
}
}
}
}
}
}
}
</style>

View File

@ -207,7 +207,7 @@
</view>
<!-- 服务区详情 -->
<view class="serviceDetail" @click="handleGoDetail">
<view class="serviceDetail" @click="handleGoDetail" v-if="false">
<view class="detailTop">
<view class="detailImg">
<image v-if="
@ -419,29 +419,29 @@ export default {
//
await this.handleGetCarCode();
let seatInfo = uni.getStorageSync("seatInfo");
if (seatInfo) {
this.seat = JSON.parse(seatInfo);
}
// let seatInfo = uni.getStorageSync("seatInfo");
// if (seatInfo) {
// this.seat = JSON.parse(seatInfo);
// }
let currentService = uni.getStorageSync("currentService");
if (currentService) {
await this.handleGetServiceDetail(currentService.SERVERPART_ID);
// let currentService = uni.getStorageSync("currentService");
// if (currentService) {
// await this.handleGetServiceDetail(currentService.SERVERPART_ID);
let obj = this.handleMergeDetail(currentService)
let newObj = {
...currentService,
sumDetail: obj,
haveREFUELINGGUN: obj.haveREFUELINGGUN,
HASCHARGE: obj.HASCHARGE,
havePARKING: obj.havePARKING,
haveWC: obj.haveWC,
HASMOTHER: obj.HASMOTHER,
HASPILOTLOUNGE: obj.HASPILOTLOUNGE,
}
this.serviceDetail = newObj
this.handleGetChargingStation(this.serviceDetail);
}
// let obj = this.handleMergeDetail(currentService)
// let newObj = {
// ...currentService,
// sumDetail: obj,
// haveREFUELINGGUN: obj.haveREFUELINGGUN,
// HASCHARGE: obj.HASCHARGE,
// havePARKING: obj.havePARKING,
// haveWC: obj.haveWC,
// HASMOTHER: obj.HASMOTHER,
// HASPILOTLOUNGE: obj.HASPILOTLOUNGE,
// }
// this.serviceDetail = newObj
// this.handleGetChargingStation(this.serviceDetail);
// }
if (this.inShop === 2 || this.inShop === 1) {
// 西

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,4 +1,4 @@
{
"component": true,
"usingComponents": {}
"usingComponents": {},
"component": true
}

View File

@ -366,7 +366,7 @@ var _default = {
onLoad: function onLoad() {
var _this2 = this;
return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee() {
var stronge, systemInfo, height, currentService, seatInfo, funList, newFunList, _this;
var stronge, systemInfo, height, currentService, seatInfo, res, funList, newFunList, _this;
return _regenerator.default.wrap(function _callee$(_context) {
while (1) {
switch (_context.prev = _context.next) {
@ -389,7 +389,8 @@ var _default = {
// this.getLocalServer();
if (currentService) {
_this2.serviceDetail = _this2.handleMergeDetail(currentService);
res = _this2.handleMergeDetail(currentService);
_this2.serviceDetail = _objectSpread(_objectSpread({}, _this2.serviceDetail), res);
console.log('onLoad', _this2.serviceDetail);
} else {
_this2.getLocalServer();
@ -1370,6 +1371,7 @@ var _default = {
data = _context10.sent;
_this10.serverPartList = data.Result_Data.List;
nearService = _this10.serverPartList[0];
console.log('nearServicenearServicenearService', nearService);
nearService.sumDetail = _this10.handleMergeDetail(nearService);
_this10.serviceDetail = nearService;
uni.setStorageSync("currentService", nearService);
@ -1378,7 +1380,7 @@ var _default = {
_this10.handleGetChargingStation(nearService);
}
uni.hideLoading();
case 13:
case 14:
case "end":
return _context10.stop();
}

File diff suppressed because one or more lines are too long

View File

@ -166,6 +166,20 @@
border-radius: 4rpx;
display: inline-block;
}
.main .content .serviceDetail .detailTop .detailRight .detailTop .status .bePacked.data-v-57280228 {
font-family: PingFangSC, PingFang SC;
font-weight: 400;
font-size: 22rpx;
color: #FF5959;
line-height: 32rpx;
text-align: justify;
font-style: normal;
padding: 2rpx 6rpx;
background: #fbdada;
border-radius: 4rpx;
display: inline-block;
margin-left: 16rpx;
}
.main .content .serviceDetail .detailTop .detailRight .detailBottom.data-v-57280228 {
margin-top: 16rpx;
}

View File

@ -102,6 +102,36 @@ var render = function () {
var _vm = this
var _h = _vm.$createElement
var _c = _vm._self._c || _h
var l1 = _vm.__map(_vm.orderList, function (item, index) {
var $orig = _vm.__get_orig(item)
var l0 = _vm.__map(
item.GOODSList.slice(0, item.isShowMore ? item.GOODSList.length : 5),
function (subItem, subIndex) {
var $orig = _vm.__get_orig(subItem)
var g0 = subItem.IMAGE_URL ? subItem.IMAGE_URL.split(",") : null
return {
$orig: $orig,
g0: g0,
}
}
)
var g1 = item.GOODSList.length
var g2 = g1 > 5 ? item.GOODSList.length : null
return {
$orig: $orig,
l0: l0,
g1: g1,
g2: g2,
}
})
_vm.$mp.data = Object.assign(
{},
{
$root: {
l1: l1,
},
}
)
}
var recyclableRender = false
var staticRenderFns = []
@ -252,6 +282,26 @@ var _aesJs = __webpack_require__(/*! aes-js */ 212);
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
var NoData = function NoData() {
Promise.all(/*! require.ensure | components/noData */[__webpack_require__.e("common/vendor"), __webpack_require__.e("components/noData")]).then((function () {
return resolve(__webpack_require__(/*! ../../../components/noData.vue */ 85));
@ -333,6 +383,72 @@ var _default = {
this.$utils.addUserBehaviorNew();
},
methods: {
// 确认收获
handleConfirmReceipt: function handleConfirmReceipt(obj) {
console.log('obj', obj);
var _this = this;
uni.showModal({
title: '提示',
content: '确认已收货?',
success: function () {
var _success = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(res) {
var req, data, type;
return _regenerator.default.wrap(function _callee$(_context) {
while (1) {
switch (_context.prev = _context.next) {
case 0:
if (!res.confirm) {
_context.next = 9;
break;
}
req = {
action_type: "UpdateOrderState",
action_data: obj.SALEBILL_ID,
saleBillChildId: obj.SALEBILL_CHILD_ID || "",
SALEBILL_STATE: 3000
};
_context.next = 4;
return _this.$api.getCoop(req);
case 4:
data = _context.sent;
console.log('data', data);
if (data.error !== 1) {
uni.showToast({
title: data.msg,
icon: 'none'
});
} else {
uni.showToast({
title: "收货成功!",
icon: 'none'
});
type = _this.currentTab === 1 ? "1005,1010,2010,3000,8000,8010,8020,8900,8999,9000,9999" : _this.currentTab === 2 ? "1005" : _this.currentTab === 3 ? "1010,2000" : _this.currentTab === 4 ? "2010" : _this.currentTab === 5 ? "" : "";
_this.handleGetOrderList(type);
}
_context.next = 10;
break;
case 9:
if (res.cancel) {}
case 10:
case "end":
return _context.stop();
}
}
}, _callee);
}));
function success(_x) {
return _success.apply(this, arguments);
}
return success;
}()
});
},
// 点击展开更多商品
handleClickShowMoreShop: function handleClickShowMoreShop(obj) {
console.log('obj', obj);
obj.isShowMore = !obj.isShowMore;
this.$forceUpdate();
},
// 点击再次跳转 工会商城 或 彩云驿商城
handleGoStore: function handleGoStore() {},
// 返回上个页面
@ -344,6 +460,10 @@ var _default = {
// 大tab切换
handleBigTab: function handleBigTab(val) {
this.selectBigTab = val;
console.log('this.currentTab', this.currentTab);
if (val === 3 && this.currentTab === 7) {
this.currentTab = 2;
}
console.log('this.selectBigTab', this.selectBigTab);
this.orderList = [];
this.pageMsg = {
@ -353,6 +473,7 @@ var _default = {
};
var type = this.currentTab === 1 ? "1005,1010,2010,3000,8000,8010,8020,8900,8999,9000,9999" : this.currentTab === 2 ? "1005" : this.currentTab === 3 ? "1010,2000" : this.currentTab === 4 ? "2010" : this.currentTab === 5 ? "" : "";
this.handleGetOrderList(type);
this.$forceUpdate();
},
// 滚动到底部 加载更多
handleScrollTolower: function handleScrollTolower() {
@ -361,47 +482,25 @@ var _default = {
this.handleGetOrderList(type);
},
handleTab: function handleTab(val) {
if (this.selectBigTab === 3 && val === 7) {
this.currentTab = 2;
}
this.pageMsg = {
pageIndex: 1,
pageSize: 10,
isOver: false
};
if (this.currentTab === val) {
this.currentTab = "";
} else {
this.currentTab = val;
}
this.orderList = [];
var type = val === 1 ? "1005,1010,2010,3000,8000,8010,8020,8900,8999,9000,9999" : val === 2 ? "1005" : val === 3 ? "1010,2000" : val === 4 ? "2010" : val === 5 ? "" : "";
var type = this.currentTab === 1 ? "1005,1010,2010,3000,8000,8010,8020,8900,8999,9000,9999" : this.currentTab === 2 ? "1005" : this.currentTab === 3 ? "1010,2000" : this.currentTab === 4 ? "2010" : this.currentTab === 5 ? "" : "";
this.handleGetOrderList(type);
},
// 下拉刷新的方法
handleRefresherrefresh: function handleRefresherrefresh() {
var _this = this;
return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee() {
var type;
return _regenerator.default.wrap(function _callee$(_context) {
while (1) {
switch (_context.prev = _context.next) {
case 0:
_this.orderList = [];
_this.pageMsg = {
pageIndex: 1,
pageSize: 10,
isOver: false
};
_this.triggered = true;
type = _this.currentTab === 1 ? "1005,1010,2010,3000,8000,8010,8020,8900,8999,9000,9999" : _this.currentTab === 2 ? "1005" : _this.currentTab === 3 ? "1010,2000" : _this.currentTab === 4 ? "2010" : _this.currentTab === 5 ? "" : "";
_context.next = 6;
return _this.handleGetOrderList(type);
case 6:
_this.triggered = false;
case 7:
case "end":
return _context.stop();
}
}
}, _callee);
}))();
},
// 没传类型的方法
handleGetTypeOrderList: function handleGetTypeOrderList() {
var _this2 = this;
return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2() {
var type;
@ -409,10 +508,19 @@ var _default = {
while (1) {
switch (_context2.prev = _context2.next) {
case 0:
_this2.orderList = [];
_this2.pageMsg = {
pageIndex: 1,
pageSize: 10,
isOver: false
};
_this2.triggered = true;
type = _this2.currentTab === 1 ? "1005,1010,2010,3000,8000,8010,8020,8900,8999,9000,9999" : _this2.currentTab === 2 ? "1005" : _this2.currentTab === 3 ? "1010,2000" : _this2.currentTab === 4 ? "2010" : _this2.currentTab === 5 ? "" : "";
_context2.next = 3;
_context2.next = 6;
return _this2.handleGetOrderList(type);
case 3:
case 6:
_this2.triggered = false;
case 7:
case "end":
return _context2.stop();
}
@ -420,29 +528,49 @@ var _default = {
}, _callee2);
}))();
},
// 获取订单数据
handleGetOrderList: function handleGetOrderList(status) {
// 没传类型的方法
handleGetTypeOrderList: function handleGetTypeOrderList() {
var _this3 = this;
return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee3() {
var req, data, oldOrderList, list, resList;
var type;
return _regenerator.default.wrap(function _callee3$(_context3) {
while (1) {
switch (_context3.prev = _context3.next) {
case 0:
if (!_this3.pageMsg.isOver) {
_context3.next = 2;
type = _this3.currentTab === 1 ? "1005,1010,2010,3000,8000,8010,8020,8900,8999,9000,9999" : _this3.currentTab === 2 ? "1005" : _this3.currentTab === 3 ? "1010,2000" : _this3.currentTab === 4 ? "2010" : _this3.currentTab === 5 ? "" : "";
_context3.next = 3;
return _this3.handleGetOrderList(type);
case 3:
case "end":
return _context3.stop();
}
}
}, _callee3);
}))();
},
// 获取订单数据
handleGetOrderList: function handleGetOrderList(status) {
var _this4 = this;
return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee4() {
var req, data, oldOrderList, list, resList;
return _regenerator.default.wrap(function _callee4$(_context4) {
while (1) {
switch (_context4.prev = _context4.next) {
case 0:
if (!_this4.pageMsg.isOver) {
_context4.next = 2;
break;
}
return _context3.abrupt("return");
return _context4.abrupt("return");
case 2:
uni.showLoading({
title: "正在加载...",
mask: true
});
req = {
action_type: "GetMallOrderList",
salebillType: _this3.searchType === "6" ? _this3.selectBigTab === 1 ? '3001,3999' : _this3.selectBigTab === 2 ? '3999' : _this3.selectBigTab === 3 ? '3001' : '' : _this3.selectBigTab === 1 ? '3000,3001,3002,3999' : _this3.selectBigTab === 2 ? '3000,3002,3999' : _this3.selectBigTab === 3 ? '3001,3999' : '',
salebillState: _this3.searchType === "6" ? "" : status || "",
action_type: "GetOrderList",
salebillType: _this4.searchType === "6" ? _this4.selectBigTab === 1 ? '3001,3999' : _this4.selectBigTab === 2 ? '3999' : _this4.selectBigTab === 3 ? '3001' : '' : _this4.selectBigTab === 1 ? '3000,3001,3002,3999' : _this4.selectBigTab === 2 ? '3000,3002,3999' : _this4.selectBigTab === 3 ? '3001' : '',
salebillState: _this4.searchType === "6" ? "" : status || "",
// salebillType:
// this.searchType === "6"
// ? this.pageType === "UnionMall"
@ -452,26 +580,26 @@ var _default = {
// ? 3001
// : "3000,3002",
// salebillState: this.searchType === "6" ? "" : status || "",
PageIndex: _this3.pageMsg.pageIndex,
pageSize: _this3.pageMsg.pageSize,
PageIndex: _this4.pageMsg.pageIndex,
pageSize: _this4.pageMsg.pageSize,
ownerUnitId: 911,
requestType: "application/x-www-form-urlencoded"
};
_context3.next = 6;
return _this3.$api.postCoop(req);
_context4.next = 6;
return _this4.$api.postCoop(req);
case 6:
data = _context3.sent;
data = _context4.sent;
console.log("data", data);
oldOrderList = [];
if (_this3.orderList && _this3.orderList.length > 0) {
oldOrderList = JSON.parse(JSON.stringify(_this3.orderList));
if (_this4.orderList && _this4.orderList.length > 0) {
oldOrderList = JSON.parse(JSON.stringify(_this4.orderList));
}
console.log("oldOrderList", oldOrderList);
// 手动添加待付款、待发货、待收货
list = data.Data ? data.Data.List : [];
resList = [];
if (list && list.length > 0) {
if (_this3.currentTab === 5) {
if (_this4.currentTab === 5) {
list.forEach(function (item) {
if (item.SALEBILL_STATE >= 3000 && item.SALEBILL_STATE !== 8999 && item.SALEBILL_STATE !== 9000 && item.SALEBILL_STATE !== 9999) {
resList.push(item);
@ -485,17 +613,17 @@ var _default = {
}
console.log("获取订单数据", list);
if (resList && resList.length < 10) {
_this3.pageMsg.isOver = true;
_this4.pageMsg.isOver = true;
}
_this3.orderList = oldOrderList.concat(resList);
console.log("获取订单数据2", _this3.orderList);
_this4.orderList = oldOrderList.concat(resList);
console.log("获取订单数据2", _this4.orderList);
uni.hideLoading();
case 19:
case "end":
return _context3.stop();
return _context4.stop();
}
}
}, _callee3);
}, _callee4);
}))();
},
goEvaluate: function goEvaluate(item) {
@ -503,6 +631,14 @@ var _default = {
uni.navigateTo({
url: "/pages/order/orderdetail/index?sellchildid=" + (item.SALEBILL_CHILD_ID || "") + "&orderInternal=" + item.SALEBILL_ID + "&orderStatus=" + item.SALEBILL_STATE + "&SUPPLIER_NAME=" + item.SUPPLIER_NAME
});
},
handleGoShopDetail: function handleGoShopDetail(item, index) {
console.log('itemitemitemitem', item);
console.log('indexindexindexindex', index);
var obj = item.GOODSList[index];
uni.navigateTo({
url: "/pages/shopPages/shopDetail/index?id=".concat(obj.COMMODITY_ID)
});
}
}
};

File diff suppressed because one or more lines are too long

View File

@ -236,6 +236,19 @@
text-transform: none;
margin-top: 10rpx;
}
.main .orderListBox .orderItem .is_more.data-v-50f48f45 {
width: 400rpx;
height: 40rpx;
margin: auto;
text-align: center;
color: #9fa3a8;
font-size: 28rpx;
}
.main .orderListBox .orderItem .is_more .arrow_icon.data-v-50f48f45 {
width: 26rpx;
height: 16rpx;
margin-right: 16rpx;
}
.main .orderListBox .orderItem .orderItemMoneyBox.data-v-50f48f45 {
width: 100%;
display: flex;
@ -267,7 +280,7 @@
display: flex;
align-items: center;
justify-content: space-between;
margin-top: 16rpx;
margin-top: 32rpx;
}
.main .orderListBox .orderItem .orderItemBottom .orderItemBottomLeft .orderItemBottomLeftMore.data-v-50f48f45 {
font-family: PingFangSC, PingFang SC;
@ -292,7 +305,7 @@
text-align: left;
font-style: normal;
text-transform: none;
padding: 2rpx 26rpx;
padding: 4rpx 26rpx;
background: #F2F5F6;
border-radius: 4rpx;
margin-right: 34rpx;
@ -306,10 +319,45 @@
text-align: left;
font-style: normal;
text-transform: none;
padding: 2rpx 26rpx;
padding: 4rpx 26rpx;
background: #F2F5F6;
border-radius: 4rpx;
}
.main .orderListBox .inBottom.data-v-50f48f45 {
width: 100%;
display: flex;
align-items: center;
justify-content: center;
}
.main .orderListBox .inBottom .bottomText.data-v-50f48f45 {
font-family: PingFangSC, PingFang SC;
font-weight: 400;
font-size: 26rpx;
color: #d0d0d0;
line-height: 40rpx;
text-align: justify;
font-style: normal;
position: relative;
padding: 6rpx 0;
}
.main .orderListBox .inBottom .bottomText.data-v-50f48f45::after {
content: "";
width: 30vw;
height: 2rpx;
background: #e0e0e0;
position: absolute;
left: -32vw;
top: 50%;
}
.main .orderListBox .inBottom .bottomText.data-v-50f48f45::before {
content: "";
width: 30vw;
height: 2rpx;
background: #e0e0e0;
position: absolute;
right: -32vw;
top: 50%;
}
.main .fliter.data-v-50f48f45 {
background: #fff;
margin-bottom: 24rpx;

View File

@ -125,7 +125,7 @@ var render = function () {
var _vm = this
var _h = _vm.$createElement
var _c = _vm._self._c || _h
var l0 = _vm.shopOrder.slice(0, 5)
var l0 = _vm.shopOrder.slice(0, _vm.isShowMore ? 5 : _vm.shopCount)
var g0 = _vm.shopOrder.length
var g1 = _vm.shopOrder.length
if (!_vm._isMounted) {

File diff suppressed because one or more lines are too long

View File

@ -303,39 +303,84 @@ var _default = {
handleDesc: function handleDesc(e, item) {
this.good.SALEDETAIL_DESC = e.detail.value;
},
// 查一下 当前商品有没有被收藏
// 收藏
handleCollect: function handleCollect() {
var _this2 = this;
if (this.isCollect) {
var collectGoodList = uni.getStorageSync('collectGood');
var newList = [];
if (collectGoodList && collectGoodList.length > 0) {
collectGoodList.forEach(function (item) {
if (item.COMMODITY_ID !== _this2.shopId) {
newList.push(item);
return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee() {
var req, data, _req, _data;
return _regenerator.default.wrap(function _callee$(_context) {
while (1) {
switch (_context.prev = _context.next) {
case 0:
if (!_this2.isCollect) {
_context.next = 10;
break;
}
});
}
uni.setStorageSync('collectGood', newList);
req = {
COLLECTIONId: _this2.good.COLLECTION_ID,
type: "encryption"
}; // 同步收藏
console.log('reqreqreq', req);
_context.next = 5;
return _this2.$api.$zzyLocalPost("/Member/DeleteCOLLECTION", req);
case 5:
data = _context.sent;
console.log('data', data);
if (data.Result_Code === 100) {
uni.showToast({
title: '取消收藏',
title: '删除成功!',
icon: 'none'
});
this.isCollect = false;
_this2.isCollect = false;
} else {
var _collectGoodList = uni.getStorageSync('collectGood');
if (_collectGoodList && _collectGoodList.length > 0) {
_collectGoodList.push(this.good);
} else {
_collectGoodList = [this.good];
uni.showToast({
title: data.Result_Desc,
icon: 'none'
});
}
uni.setStorageSync('collectGood', _collectGoodList);
_context.next = 17;
break;
case 10:
_req = {
COLLECTION_ID: _this2.good.COLLECTION_ID || "",
COLLECTION_TYPE: 2000,
MEMBERSHIP_ID: _this2.user.MEMBERSHIP_ID,
TABLE_ID: _this2.good.COMMODITY_ID,
TABLE_NAME: "COOP_MERCHANT.T_COMMODITY",
APP_GUID: "wxee018fb96955552a",
COLLECTION_STATE: 1,
PROVINCE_CODE: _this2.user.PROVINCE_CODE,
OWNERUNIT_ID: 911,
type: "encryption",
STAFF_NAME: _this2.user.MEMBERSHIP_NAME,
OPERATE_DATE: _this2.$moment.now().format("YYYY-MM-DD")
}; // 同步收藏
console.log('reqreqreq', _req);
_context.next = 14;
return _this2.$api.$zzyLocalPost("/Member/SynchroCOLLECTION", _req);
case 14:
_data = _context.sent;
console.log('data', _data);
if (_data.Result_Code === 100) {
uni.showToast({
title: '已添加至收藏夹',
icon: 'none'
});
this.isCollect = true;
_this2.isCollect = true;
} else {
uni.showToast({
title: _data.Result_Desc,
icon: 'none'
});
}
case 17:
case "end":
return _context.stop();
}
}
}, _callee);
}))();
},
// 倒计时方法
startCountdown: function startCountdown(targetTime) {
@ -661,70 +706,70 @@ var _default = {
// 立即购买方法
handleMakeOrder: function handleMakeOrder() {
var _this5 = this;
return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee() {
return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2() {
var userInfo, userData, nowShopList, orderList, noSelectList, id;
return _regenerator.default.wrap(function _callee$(_context) {
return _regenerator.default.wrap(function _callee2$(_context2) {
while (1) {
switch (_context.prev = _context.next) {
switch (_context2.prev = _context2.next) {
case 0:
userInfo = {};
if (!(_this5.pageType === "UnionMall")) {
_context.next = 12;
_context2.next = 12;
break;
}
// 获取最新的用户余额
uni.showLoading({
title: "获取用户余额..."
});
_context.next = 5;
_context2.next = 5;
return _this5.$api.getCoop({
action_type: "GetMembershipInfo",
WechatUserId: _this5.user.WechatUserId
});
case 5:
userData = _context.sent;
userData = _context2.sent;
userInfo = userData.Data;
console.log("this.userInfo", _this5.userInfo);
uni.hideLoading();
if (userInfo && userInfo.ACCOUNT_BALANCE > 0) {
_context.next = 12;
_context2.next = 12;
break;
}
uni.showToast({
title: "您未被纳入工会会员采购名录,如有疑问,请联系工会咨询",
icon: "none"
});
return _context.abrupt("return");
return _context2.abrupt("return");
case 12:
if (!(_this5.good.SKULIST && _this5.good.SKULIST.length > 0 && (_this5.good.COMMODITY_RULE === "默认" || !_this5.good.COMMODITY_RULE))) {
_context.next = 15;
_context2.next = 15;
break;
}
uni.showToast({
title: "请先选择规格!",
icon: "none"
});
return _context.abrupt("return");
return _context2.abrupt("return");
case 15:
if (!(_this5.good.COMMODITY_STOCK === 0)) {
_context.next = 18;
_context2.next = 18;
break;
}
uni.showToast({
title: "商品已售罄!",
icon: "none"
});
return _context.abrupt("return");
return _context2.abrupt("return");
case 18:
if (!(_this5.good.COMMODITY_STOCK < _this5.good.count)) {
_context.next = 21;
_context2.next = 21;
break;
}
uni.showToast({
title: "商品库存不足!",
icon: "none"
});
return _context.abrupt("return");
return _context2.abrupt("return");
case 21:
console.log("this.good", _this5.good);
nowShopList = [_this5.good];
@ -770,10 +815,10 @@ var _default = {
}
case 24:
case "end":
return _context.stop();
return _context2.stop();
}
}
}, _callee);
}, _callee2);
}))();
},
// 减少当前商品
@ -868,6 +913,9 @@ var _default = {
res.Data.SEND_MODE = res.Data.SEND_MODE.toString();
res.Data.AFTERSALE_NATRUE = res.Data.AFTERSALE_NATRUE.toString();
res.Data.DUTY_PARAGRAPH = res.Data.DUTY_PARAGRAPH.toString();
if (res.Data.COLLECTION_STATE === '1') {
_this.isCollect = true;
}
_this.good = res.Data;
_this.good.COMMODITY_CURRPRICE = _this.good.COMMODITY_MEMBERPRICE;
_this.good.count = 1;

File diff suppressed because one or more lines are too long

View File

@ -187,6 +187,10 @@
color: #333;
padding-right: 32rpx;
}
.inventory.data-v-0dc4ca38 {
color: #999999;
font-size: 24rpx;
}
.vip-price.data-v-0dc4ca38 {
font-size: 42rpx;
color: #ea3323;

View File

@ -104,7 +104,9 @@ var render = function () {
var _c = _vm._self._c || _h
var g0 = _vm.$utils.handleFormatNumber(_vm.userInfo.MEMBERSHIP_POINT || 0)
var g1 = _vm.$utils.handleFormatNumber(_vm.userInfo.ACCOUNT_BALANCE || 0)
var g2 = _vm.serviceDetail.ImageLits && _vm.serviceDetail.ImageLits.length > 0
var g2 = false
? undefined
: null
_vm.$mp.data = Object.assign(
{},
{
@ -265,7 +267,7 @@ var _default = {
onShow: function onShow() {
var _this2 = this;
return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee() {
var inShop, seatInfo, currentService, obj, newObj, shopCarList, count;
var inShop, shopCarList, count;
return _regenerator.default.wrap(function _callee$(_context) {
while (1) {
switch (_context.prev = _context.next) {
@ -288,31 +290,30 @@ var _default = {
_context.next = 10;
return _this2.handleGetCarCode();
case 10:
seatInfo = uni.getStorageSync("seatInfo");
if (seatInfo) {
_this2.seat = JSON.parse(seatInfo);
}
currentService = uni.getStorageSync("currentService");
if (!currentService) {
_context.next = 20;
break;
}
_context.next = 16;
return _this2.handleGetServiceDetail(currentService.SERVERPART_ID);
case 16:
obj = _this2.handleMergeDetail(currentService);
newObj = _objectSpread(_objectSpread({}, currentService), {}, {
sumDetail: obj,
haveREFUELINGGUN: obj.haveREFUELINGGUN,
HASCHARGE: obj.HASCHARGE,
havePARKING: obj.havePARKING,
haveWC: obj.haveWC,
HASMOTHER: obj.HASMOTHER,
HASPILOTLOUNGE: obj.HASPILOTLOUNGE
});
_this2.serviceDetail = newObj;
_this2.handleGetChargingStation(_this2.serviceDetail);
case 20:
// let seatInfo = uni.getStorageSync("seatInfo");
// if (seatInfo) {
// this.seat = JSON.parse(seatInfo);
// }
// let currentService = uni.getStorageSync("currentService");
// if (currentService) {
// await this.handleGetServiceDetail(currentService.SERVERPART_ID);
// let obj = this.handleMergeDetail(currentService)
// let newObj = {
// ...currentService,
// sumDetail: obj,
// haveREFUELINGGUN: obj.haveREFUELINGGUN,
// HASCHARGE: obj.HASCHARGE,
// havePARKING: obj.havePARKING,
// haveWC: obj.haveWC,
// HASMOTHER: obj.HASMOTHER,
// HASPILOTLOUNGE: obj.HASPILOTLOUNGE,
// }
// this.serviceDetail = newObj
// this.handleGetChargingStation(this.serviceDetail);
// }
if (_this2.inShop === 2 || _this2.inShop === 1) {
// 判断当前的购物车里面是否有东西
shopCarList = [];
@ -330,7 +331,7 @@ var _default = {
}
_this2.shopCarListCount = count;
}
case 21:
case 11:
case "end":
return _context.stop();
}

File diff suppressed because one or more lines are too long