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", "path": "index",
"style": { "style": {
"navigationBarTitleText": "优惠券" "navigationBarTitleText": "优惠券",
"navigationBarBackgroundColor": "#ffffff"
} }
} }
] ]

View File

@ -1,144 +1,58 @@
<template> <template>
<div class="coupon" v-show="!pageMsg.isLoading"> <view class="main">
<!-- Tabs Header --> <view class="tabBox">
<div class="tabs-header"> <view :class="selectTab === item.value ? 'tabItem selectTabItem' : 'tabItem'" v-for="(item, index) in tabList"
<div class="tab-item" :class="{ active: pageMsg.activeTabs === 0 }" @click="changeActive(0)"> :key="index" @click="handleChangeTab(item.value)">
有效 {{ item.label }}
</div> </view>
<div class="tab-item" :class="{ active: pageMsg.activeTabs === 1 }" @click="changeActive(1)"> </view>
无效
</div>
</div>
<!-- Tabs Content --> <scroll-view class="couponContent" scroll-y>
<div class="tabs-content"> <view class="couponItem" v-for="(item, index) in showCouponList" :key="index">
<!-- 有效 Tab --> <view class="couponItemTop">
<div v-if="pageMsg.activeTabs === 0" class="tab-panel"> <view class="couponItemLeft">
<div> <view class="couponItemPrice">
<div class="couponList"> <text class="couponItemPriceUnit">¥</text>
<div class="couponItem" v-for="(item, i) in couponList" :key="i"> <text class="couponItemPriceValue">{{ item.UseAmount }}</text>
<div class="itemleft"> </view>
<div>
<span class="leftUnit">¥</span> <view class="couponItemRule" v-if="!item.CouponSendId && item.CouponPoint">{{ item.CouponPoint }}积分兑换</view>
<span class="money">{{ item.UseAmount }}</span> <view class="couponItemRule" v-else>{{
</div>
<div v-if="!item.CouponSendId && item.CouponPoint" class="condition">
{{ item.CouponPoint }}积分兑换
</div>
<div v-else class="condition">
{{
item.WithAmount > 0 item.WithAmount > 0
? "满" + item.WithAmount + "可用" ? "满" + item.WithAmount + "可用"
: "无门槛使用" : "无门槛使用"
}} }}</view>
</div> </view>
</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"> <view class="couponItemRight">
<span class="useBtnText" v-if="!item.CouponSendId" @click="goShop(item)">点击领取</span> <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)" <view class="couponItemBottom" v-if="item.showRule">
src="/static/images/home/goUseIcon.svg" /> <view class="couponItemBottomDesc">{{ item.PayMethodText }}</view>
<!-- <span class="useBtnText" @click="handleGoCouponsList(item)" v-else-if="item.takeState">查看</span> --> </view>
<!-- <span class="useBtnText" v-else>{{ </view>
item.CouponStateText <view v-if="showCouponList.length === 0">
}}</span> --> <NoData :text="'暂无信息'" />
</div> </view>
</div> </scroll-view>
</div> </view>
</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>
</template> </template>
@ -162,6 +76,10 @@ export default {
specialCards: [], // specialCards: [], //
novalid: [], novalid: [],
isCustomLoading: false, isCustomLoading: false,
tabList: [{ label: "未使用", value: 1 }, { label: "已使用", value: 2 }, { label: "已过期", value: 3 }],// tab
selectTab: 1,
allCouponList: [],//
showCouponList: [],//
}; };
}, },
computed: { computed: {
@ -173,10 +91,58 @@ export default {
components: { components: {
NoData, 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: { methods: {
...mapMutations({ ...mapMutations({
setIsLoading: "setIsLoading", 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) { handleGoCouponsList(obj) {
console.log('obj', obj); console.log('obj', obj);
// uni.navigateTo({ // 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() { getList() {
let _this = this; let _this = this;
this.$api this.$api
.$get("/WeChat/GetMemberCouponList", { CouponStatus: 0 }) .$get("/WeChat/GetMemberCouponList", { CouponStatus: 0 }) // 使
.then((rs) => { .then((rs) => {
_this.pageMsg.isLoading = false; _this.pageMsg.isLoading = false;
if (rs.Result_Code === 100) { if (rs.Result_Code === 100) {
@ -229,494 +226,239 @@ export default {
this.isCustomLoading = true; this.isCustomLoading = true;
let _this = this; let _this = this;
_this.$api _this.$api
.$get("/WeChat/GetMemberCouponList", { CouponStatus: "1,2" }) .$get("/WeChat/GetMemberCouponList", { CouponStatus: "1,2" }) // 使
.then((rs) => { .then((rs) => {
if (rs.Result_Code === 100) { if (rs.Result_Code === 100) {
console.log('rsrsrsrsrsrsrs', rs);
_this.novalid = rs.Result_Data.List; _this.novalid = rs.Result_Data.List;
} }
_this.isCustomLoading = false; _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> </script>
<style lang="stylus" scoped> <style lang="less" scoped>
bodyColor = #CAA97F; .main {
color999 = #999999; width: 100vw;
height: 100vh;
background-color: #F1F5F6;
.coupon { .tabBox {
padding-bottom: 20rpx; 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 { .tabItem {
opacity: 0.5; // width: 120rpx;
} width: calc(100% / 3);
height: 58rpx;
.coupon-title { font-family: PingFangSC, PingFang SC;
font-weight: 400;
font-size: 28rpx;
color: #333333; color: #333333;
font-size: 32rpx; line-height: 40rpx;
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;
text-align: center; text-align: center;
padding: 12px 0; font-style: normal;
font-size: 16px;
cursor: pointer;
color: #333;
} }
.tab-item.active { .selectTabItem {
font-weight: bold; font-family: PingFangSC, PingFang SC;
color: #caa97f; /* 激活状态颜色 */ font-weight: 400;
border-bottom: 2px solid #caa97f; /* 激活状态下的底部边框 */ font-size: 28rpx;
color: #EC632E;
line-height: 40rpx;
text-align: center;
font-style: normal;
position: relative;
} }
.tabs-content { .selectTabItem::after {
padding: 10px; content: "";
width: 2rem;
height: 6rpx;
background: #EC632E;
position: absolute;
left: 50%;
bottom: 0;
transform: translateX(-50%);
}
} }
.tab-panel { .couponContent {
display: block;
.couponList {
width: 100%; width: 100%;
height: calc(100% - 88rpx);
box-sizing: border-box; box-sizing: border-box;
padding: 46rpx 24rpx 0;
.couponItem { .couponItem {
width: 100%; 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; box-sizing: border-box;
padding-left: 30rpx; padding: 28rpx 24rpx;
margin-right: 50rpx; background: #FFFFFF;
// border-right: 2rpx dashed #E5CD92; border-radius: 8rpx;
margin-bottom: 22rpx;
.leftUnit { .couponItemTop {
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;
width: 100%; width: 100%;
box-sizing: border-box;
padding: 0 32rpx;
display: flex; display: flex;
align-items: center; 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-family: PingFangSC, PingFang SC;
font-weight: 400; font-weight: 600;
font-size: 28rpx; font-size: 28rpx;
color: #000000; color: #E84D38;
line-height: 40rpx; 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; text-align: center;
font-style: normal; font-style: normal;
padding: 8rpx 20rpx;
background: #FF3A3A;
border-radius: 32rpx;
} }
.goUseIcon { .couponItemPriceValue {
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 {
font-family: PingFangSC, PingFang SC; font-family: PingFangSC, PingFang SC;
font-weight: 400; font-weight: 600;
font-size: 34rpx; font-size: 52rpx;
color:#868686; color: #E84D38;
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;
line-height: 40rpx; 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; text-align: left;
font-style: normal; font-style: normal;
display: inline-block; display: -webkit-box;
width: 200rpx; -webkit-line-clamp: 2;
text-overflow: ellipsis; /* 最多显示2行 */
-webkit-box-orient: vertical;
overflow: hidden; overflow: hidden;
white-space: nowrap; text-overflow: ellipsis;
} }
.timeText { .couponItemTime {
.coupon-date {
font-family: PingFangSC, PingFang SC; font-family: PingFangSC, PingFang SC;
font-weight: 400; font-weight: 500;
font-size: 22rpx; font-size: 24rpx;
color: #716F69; color: #666666;
line-height: 32rpx; line-height: 34rpx;
text-align: justify; text-align: left;
font-style: normal; font-style: normal;
} margin-top: 12rpx;
} }
.useBtn { .couponItemUsedType {
.useBtnText { display: flex;
align-items: center;
margin-top: 16rpx;
.couponItemUsedTypeLabel {
font-family: PingFangSC, PingFang SC; font-family: PingFangSC, PingFang SC;
font-weight: 400; font-weight: 400;
font-size: 24rpx; font-size: 24rpx;
color: #FFFFFF; color: #999999;
line-height: 36rpx; line-height: 28rpx;
text-align: center; text-align: left;
font-style: normal; font-style: normal;
padding: 8rpx 20rpx;
background: #FF3A3A;
border-radius: 32rpx;
} }
.goUseIcon { .couponItemUsedTypeIcon {
width: 110rpx; width: 20rpx;
height: 110rpx; 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 { .couponItemRightRight {
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;
width: 120rpx; width: 120rpx;
height: 40rpx; margin-left: 44rpx;
.noUsed {
font-family: PingFangSC, PingFang SC;
font-weight: 400;
font-size: 28rpx;
color: #FFFFFF;
line-height: 40rpx; 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; text-align: left;
margin: 12rpx auto 0 auto; font-style: normal;
box-sizing: border-box; box-sizing: border-box;
font-size: 24rpx; padding: 4rpx 18rpx;
background: #E84D38;
border-radius: 26rpx;
} }
.use-card-btn { .used {
width: 152rpx; font-family: PingFangSC, PingFang SC;
height: 46rpx; font-weight: 400;
color: #fff; font-size: 28rpx;
background: linear-gradient(to right, #A17356, #D8AA8B); 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; font-size: 24rpx;
text-align: center; color: #999999;
border-radius: 36rpx; line-height: 28rpx;
line-height: 48rpx; text-align: left;
margin-top: 38rpx; font-style: normal;
margin-bottom: 17rpx; margin-top: 48rpx;
}
}
}
} }
</style> </style>

View File

@ -72,6 +72,7 @@
}}</view> }}</view>
<view class="status"> <view class="status">
<span class="statusText">营业中</span> <span class="statusText">营业中</span>
<span class="bePacked" v-if="serviceDetail.LoadBearing_State === 1000">爆满</span>
</view> </view>
</view> </view>
@ -560,7 +561,11 @@ export default {
// this.getLocalServer(); // this.getLocalServer();
if (currentService) { if (currentService) {
this.serviceDetail = this.handleMergeDetail(currentService); let res = this.handleMergeDetail(currentService);
this.serviceDetail = {
...this.serviceDetail,
...res
}
console.log('onLoad', this.serviceDetail); console.log('onLoad', this.serviceDetail);
} else { } else {
@ -1430,6 +1435,7 @@ export default {
this.serverPartList = data.Result_Data.List; this.serverPartList = data.Result_Data.List;
let nearService = this.serverPartList[0]; let nearService = this.serverPartList[0];
console.log('nearServicenearServicenearService', nearService);
nearService.sumDetail = this.handleMergeDetail(nearService); nearService.sumDetail = this.handleMergeDetail(nearService);
this.serviceDetail = nearService; this.serviceDetail = nearService;
@ -1871,6 +1877,21 @@ export default {
border-radius: 4rpx; border-radius: 4rpx;
display: inline-block; 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="smallTypeBox">
<view :class="currentTab === item.value ? 'smallTabItem selectSmallTabItem' : 'smallTabItem'" <view :class="currentTab === item.value ? 'smallTabItem selectSmallTabItem' : 'smallTabItem'"
v-for="(item, index) in tabList" :key="index" @click="handleTab(item.value)"> v-for="(item, index) in tabList" :key="index" @click="handleTab(item.value)">
<template v-if="item.value === 7 && selectBigTab === 3 ? false : true">
{{ item.label }} {{ item.label }}
<image v-if="currentTab === item.value" class="closeIcon" <image v-if="currentTab === item.value" class="closeIcon"
src="https://eshangtech.com/caiyunyiImg/closeIcon.png" /> src="https://eshangtech.com/caiyunyiImg/closeIcon.png" />
</template>
</view> </view>
</view> </view>
<!-- 订单列表 --> <!-- 订单列表 -->
<scroll-view :scroll-y="true" class="orderListBox" <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="orderItem" v-for="(item, index) in orderList" :key="index" @click="goEvaluate(item)">
<view class="orderItemTop"> <view class="orderItemTop">
<view class="orderItemTopLeft"> <view class="orderItemTopLeft">
<image class="orderItemIcon" src="https://eshangtech.com/caiyunyiImg/storeIcon.png" /> <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>
<view class="orderItemTopRight"> <view class="orderItemTopRight">
<view class="statusBox">{{ item.SALEBILL_STATE_TEXT || "" }}</view> <view class="statusBox">{{ item.SALEBILL_STATE_TEXT || "" }}</view>
</view> </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"> <view class="orderItemCenterLeft">
<image class="orderItemShopImg" <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>
<view class="orderItemCenterRight"> <view class="orderItemCenterRight">
<view class="orderItemCenterRightLeft"> <view class="orderItemCenterRightLeft">
@ -50,30 +54,46 @@
<view class="orderItemRightLeftSpecifications"></view> <view class="orderItemRightLeftSpecifications"></view>
</view> </view>
<view class="orderItemCenterRightRight"> <view class="orderItemCenterRightRight">
<view class="unitPrice">¥180.88</view> <view class="unitPrice">¥{{ subItem.AVERAGE_PRICE || '-' }}</view>
<view class="orderItemQuantity">x1</view> <view class="orderItemQuantity">x{{ subItem.ORDER_COUNT || '-' }}</view>
</view> </view>
</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"> <view class="orderItemMoneyBox">
<span class="orderItemUnit">实付款</span> <span class="orderItemUnit">实付款</span>
<span class="orderItemMoney">¥{{ item.PAY_AMOUNT || "" }}</span> <span class="orderItemMoney">¥{{ item.PAY_AMOUNT || "" }}</span>
</view> </view>
<view class="orderItemBottom" v-if="false"> <view class="orderItemBottom">
<view class="orderItemBottomLeft"> <view class="orderItemBottomLeft">
<view class="orderItemBottomLeftMore">更多</view> <view class="orderItemBottomLeftMore" v-if="false">更多</view>
</view> </view>
<view class="orderItemBottomRight"> <view class="orderItemBottomRight">
<view class="orderItemBottomRightEvaluate" v-if="item.SALEBILL_STATE > 3000 && item.SALEBILL_STATE <= 5000"> <view class="orderItemBottomRightEvaluate" v-if="item.SALEBILL_STATE > 3000 && item.SALEBILL_STATE <= 5000">
评价 评价
</view> </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>
</view> </view>
<view class="inBottom" v-if="pageMsg.isOver">
<text class="bottomText">我是有底线的</text>
</view>
</scroll-view> </scroll-view>
@ -191,6 +211,60 @@ export default {
this.$utils.addUserBehaviorNew(); this.$utils.addUserBehaviorNew();
}, },
methods: { 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() { handleGoStore() {
@ -204,6 +278,11 @@ export default {
// tab // tab
handleBigTab(val) { handleBigTab(val) {
this.selectBigTab = 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); console.log('this.selectBigTab', this.selectBigTab);
this.orderList = [] this.orderList = []
@ -225,6 +304,7 @@ export default {
? "" ? ""
: ""; : "";
this.handleGetOrderList(type); this.handleGetOrderList(type);
this.$forceUpdate()
}, },
// //
handleScrollTolower() { handleScrollTolower() {
@ -244,24 +324,34 @@ export default {
this.handleGetOrderList(type); this.handleGetOrderList(type);
}, },
handleTab(val) { handleTab(val) {
if (this.selectBigTab === 3 && val === 7) {
this.currentTab = 2
}
this.pageMsg = { this.pageMsg = {
pageIndex: 1, pageIndex: 1,
pageSize: 10, pageSize: 10,
isOver: false, isOver: false,
}; };
if (this.currentTab === val) {
this.currentTab = ""
} else {
this.currentTab = val; this.currentTab = val;
}
this.orderList = []; this.orderList = [];
let type = let type =
val === 1 this.currentTab === 1
? "1005,1010,2010,3000,8000,8010,8020,8900,8999,9000,9999" ? "1005,1010,2010,3000,8000,8010,8020,8900,8999,9000,9999"
: val === 2 : this.currentTab === 2
? "1005" ? "1005"
: val === 3 : this.currentTab === 3
? "1010,2000" ? "1010,2000"
: val === 4 : this.currentTab === 4
? "2010" ? "2010"
: val === 5 : this.currentTab === 5
? "" ? ""
: ""; : "";
this.handleGetOrderList(type); this.handleGetOrderList(type);
@ -317,7 +407,7 @@ export default {
mask: true, mask: true,
}); });
const req = { const req = {
action_type: "GetMallOrderList", action_type: "GetOrderList",
salebillType: this.searchType === "6" ? salebillType: this.searchType === "6" ?
this.selectBigTab === 1 ? '3001,3999' : this.selectBigTab === 1 ? '3001,3999' :
this.selectBigTab === 2 ? '3999' : this.selectBigTab === 2 ? '3999' :
@ -325,7 +415,7 @@ export default {
: :
this.selectBigTab === 1 ? '3000,3001,3002,3999' : this.selectBigTab === 1 ? '3000,3001,3002,3999' :
this.selectBigTab === 2 ? '3000,3002,3999' : this.selectBigTab === 2 ? '3000,3002,3999' :
this.selectBigTab === 3 ? '3001,3999' : '', this.selectBigTab === 3 ? '3001' : '',
salebillState: this.searchType === "6" ? "" : status || "", salebillState: this.searchType === "6" ? "" : status || "",
// salebillType: // salebillType:
// this.searchType === "6" // this.searchType === "6"
@ -391,6 +481,14 @@ export default {
item.SUPPLIER_NAME, 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> </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 { .orderItemMoneyBox {
width: 100%; width: 100%;
display: flex; display: flex;
@ -697,7 +813,7 @@ export default {
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
margin-top: 16rpx; margin-top: 32rpx;
.orderItemBottomLeft { .orderItemBottomLeft {
.orderItemBottomLeftMore { .orderItemBottomLeftMore {
@ -725,7 +841,7 @@ export default {
text-align: left; text-align: left;
font-style: normal; font-style: normal;
text-transform: none; text-transform: none;
padding: 2rpx 26rpx; padding: 4rpx 26rpx;
background: #F2F5F6; background: #F2F5F6;
border-radius: 4rpx; border-radius: 4rpx;
margin-right: 34rpx; margin-right: 34rpx;
@ -740,13 +856,52 @@ export default {
text-align: left; text-align: left;
font-style: normal; font-style: normal;
text-transform: none; text-transform: none;
padding: 2rpx 26rpx; padding: 4rpx 26rpx;
background: #F2F5F6; background: #F2F5F6;
border-radius: 4rpx; 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>
<div class="commodity margin_auto"> <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" /> @update-desc="updateDesc" />
<div class="is_more" @click="isShowMore = !isShowMore"> <div class="is_more" @click="isShowMore = !isShowMore">
<img v-if="shopOrder.length > 5" :src="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" /> " alt="" class="arrow_icon" />
{{ shopOrder.length }}个品项{{ shopCount }}件商品 {{ shopOrder.length }}个品项{{ shopCount }}件商品
</div> </div>

View File

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

View File

@ -1,265 +1,376 @@
<template> <template>
<view class="main"> <view class="main">
<scroll-view :scroll-y="true" class="shopList" v-if="shopList && shopList.length > 0" <view class="maintopBox">
:style="{ height: `calc(100vh - ${safeHeight}px)` }"> <view class="mainTopRight" @click="handleChangeSortType">
<div v-for="(item, i) in shopList" :key="item.COMMODITY_ID" class="shopDetailItem" <view class="distanceText">{{ sortType === 1 ? '按时间' : '按价格' }}</view>
:style="{ marginBottom: index + 1 === shopList.length ? '0' : '8rpx' }" @click="showDetail(item)"> <image class="distanceIcon" src="https://eshangtech.com/caiyunyiImg/sortIcon.png" />
<image class="leftImg" style="width: 80px; height: 80px" </view>
:src="item.DEFAULT_IMG || '/static/images/home/defultImg.png'" :lazy-load="true" </view>
@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>
</div> <view class="mainBottom">
</div> <scroll-view scroll-y="true" class="scrollView" @scrolltolower="handleScrollBottom">
</div> <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> </scroll-view>
<view v-else>
<NoData :text="'暂无商品'" :show="true" />
</view> </view>
</view> </view>
</template> </template>
<script>
import NoData from '../../components/noData.vue';
<script>
import { mapGetters } from "vuex";
export default { export default {
data() { data() {
return { return {
shopList: [], sortType: 1,// 1:2:
safeHeight: 0 dataList: [],//
startX: 0,
moveX: 0,
} }
}, },
onLoad() { onLoad() {
let systemInfo = uni.getSystemInfoSync(); this.handleGetData();
let height = systemInfo.safeAreaInsets.bottom; },
this.safeHeight = Number(height); computed: {
let collectGoodList = uni.getStorageSync('collectGood') ...mapGetters(["user"]),
this.shopList = collectGoodList
}, },
methods: { methods: {
// async handleGetData() {
showDetail(obj) { let req = {
uni.navigateTo({ ProvinceCode: this.user.PROVINCE_CODE,
url: `/pages/shopPages/shopDetail/index?id=${obj.COMMODITY_ID}&pageType=${obj.COMMODITY_NATURE === 5070 ? 'UnionMall' : ''}`, 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> </script>
<style lang="less" scoped> <style lang="less" scoped>
.main { .main {
width: 100vw; width: 100vw;
height: 100vh; height: 100vh;
background: #F5F5F5;
box-sizing: border-box; box-sizing: border-box;
background-color: #F5F5F5; padding: 24rpx 30rpx;
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);
.shopList { .maintopBox {
width: 100%; width: 100%;
height: 40rpx;
.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;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: flex-end; justify-content: flex-end;
.reduceShopCar { .mainTopRight {
width: 25px; display: flex;
height: 25px; align-items: center;
border-radius: 50%;
overflow: hidden;
.optionBtn { .distanceText {
width: 100%;
height: 100%;
}
}
.itemCount {
width: 60rpx;
font-family: PingFangSC, PingFang SC; font-family: PingFangSC, PingFang SC;
font-weight: 400; 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; font-size: 24rpx;
color: #fff; color: #333333;
background: #bbbbbb; line-height: 34rpx;
padding: 4rpx 16rpx; text-align: left;
border-radius: 8rpx; font-style: normal;
text-transform: none;
}
.distanceIcon {
width: 24rpx;
height: 24rpx;
margin-left: 8rpx;
}
} }
} }
.specifications { .mainBottom {
background: linear-gradient(270deg, #fb6c6c 0%, #fd4a4a 100%); width: 100%;
border-radius: 20rpx; margin-top: 16rpx;
font-family: PingFangSC, PingFang SC;
font-weight: 400; .scrollView {
font-size: 28rpx; .nearbyScenicItem {
color: #fff; position: relative;
line-height: 32rpx; overflow: hidden;
text-align: justify; margin-bottom: 16rpx;
font-style: normal; border-radius: 8rpx;
padding: 8rpx 16rpx;
.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; position: relative;
.specificationsCount { .nearByBottomLeftBox {
border: 1px solid #fd4a4a; width: 136rpx;
border-radius: 16rpx; height: 136rpx;
color: #fd4a4a; 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; font-size: 20rpx;
line-height: 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; position: absolute;
top: 0;
right: 0; right: 0;
transform: translate(40%, -80%); top: 0;
background: #fff; width: 120rpx;
} height: 100%;
} background: #ff4d4f;
color: #fff;
.cartcontrol {
width: 80px;
height: 24px;
line-height: 24px;
display: flex; 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; align-items: center;
border-radius: 4rpx 0rpx 0rpx 4rpx; justify-content: center;
font-size: 16rpx; font-size: 28rpx;
color: #9fa3a8; z-index: 10;
}
.img { }
width: 16px;
height: 16px;
} }
} }
.cart-count {
font-size: 24rpx;
flex: 1;
}
}
}
}
}
}
} }
</style> </style>

View File

@ -207,7 +207,7 @@
</view> </view>
<!-- 服务区详情 --> <!-- 服务区详情 -->
<view class="serviceDetail" @click="handleGoDetail"> <view class="serviceDetail" @click="handleGoDetail" v-if="false">
<view class="detailTop"> <view class="detailTop">
<view class="detailImg"> <view class="detailImg">
<image v-if=" <image v-if="
@ -419,29 +419,29 @@ export default {
// //
await this.handleGetCarCode(); await this.handleGetCarCode();
let seatInfo = uni.getStorageSync("seatInfo"); // let seatInfo = uni.getStorageSync("seatInfo");
if (seatInfo) { // if (seatInfo) {
this.seat = JSON.parse(seatInfo); // this.seat = JSON.parse(seatInfo);
} // }
let currentService = uni.getStorageSync("currentService"); // let currentService = uni.getStorageSync("currentService");
if (currentService) { // if (currentService) {
await this.handleGetServiceDetail(currentService.SERVERPART_ID); // await this.handleGetServiceDetail(currentService.SERVERPART_ID);
let obj = this.handleMergeDetail(currentService) // let obj = this.handleMergeDetail(currentService)
let newObj = { // let newObj = {
...currentService, // ...currentService,
sumDetail: obj, // sumDetail: obj,
haveREFUELINGGUN: obj.haveREFUELINGGUN, // haveREFUELINGGUN: obj.haveREFUELINGGUN,
HASCHARGE: obj.HASCHARGE, // HASCHARGE: obj.HASCHARGE,
havePARKING: obj.havePARKING, // havePARKING: obj.havePARKING,
haveWC: obj.haveWC, // haveWC: obj.haveWC,
HASMOTHER: obj.HASMOTHER, // HASMOTHER: obj.HASMOTHER,
HASPILOTLOUNGE: obj.HASPILOTLOUNGE, // HASPILOTLOUNGE: obj.HASPILOTLOUNGE,
} // }
this.serviceDetail = newObj // this.serviceDetail = newObj
this.handleGetChargingStation(this.serviceDetail); // this.handleGetChargingStation(this.serviceDetail);
} // }
if (this.inShop === 2 || this.inShop === 1) { 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() { onLoad: function onLoad() {
var _this2 = this; var _this2 = this;
return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee() { 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) { return _regenerator.default.wrap(function _callee$(_context) {
while (1) { while (1) {
switch (_context.prev = _context.next) { switch (_context.prev = _context.next) {
@ -389,7 +389,8 @@ var _default = {
// this.getLocalServer(); // this.getLocalServer();
if (currentService) { if (currentService) {
_this2.serviceDetail = _this2.handleMergeDetail(currentService); res = _this2.handleMergeDetail(currentService);
_this2.serviceDetail = _objectSpread(_objectSpread({}, _this2.serviceDetail), res);
console.log('onLoad', _this2.serviceDetail); console.log('onLoad', _this2.serviceDetail);
} else { } else {
_this2.getLocalServer(); _this2.getLocalServer();
@ -1370,6 +1371,7 @@ var _default = {
data = _context10.sent; data = _context10.sent;
_this10.serverPartList = data.Result_Data.List; _this10.serverPartList = data.Result_Data.List;
nearService = _this10.serverPartList[0]; nearService = _this10.serverPartList[0];
console.log('nearServicenearServicenearService', nearService);
nearService.sumDetail = _this10.handleMergeDetail(nearService); nearService.sumDetail = _this10.handleMergeDetail(nearService);
_this10.serviceDetail = nearService; _this10.serviceDetail = nearService;
uni.setStorageSync("currentService", nearService); uni.setStorageSync("currentService", nearService);
@ -1378,7 +1380,7 @@ var _default = {
_this10.handleGetChargingStation(nearService); _this10.handleGetChargingStation(nearService);
} }
uni.hideLoading(); uni.hideLoading();
case 13: case 14:
case "end": case "end":
return _context10.stop(); return _context10.stop();
} }

File diff suppressed because one or more lines are too long

View File

@ -166,6 +166,20 @@
border-radius: 4rpx; border-radius: 4rpx;
display: inline-block; 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 { .main .content .serviceDetail .detailTop .detailRight .detailBottom.data-v-57280228 {
margin-top: 16rpx; margin-top: 16rpx;
} }

View File

@ -102,6 +102,36 @@ var render = function () {
var _vm = this var _vm = this
var _h = _vm.$createElement var _h = _vm.$createElement
var _c = _vm._self._c || _h 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 recyclableRender = false
var staticRenderFns = [] var staticRenderFns = []
@ -252,6 +282,26 @@ var _aesJs = __webpack_require__(/*! aes-js */ 212);
// //
// //
// //
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
var NoData = function NoData() { var NoData = function NoData() {
Promise.all(/*! require.ensure | components/noData */[__webpack_require__.e("common/vendor"), __webpack_require__.e("components/noData")]).then((function () { 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)); return resolve(__webpack_require__(/*! ../../../components/noData.vue */ 85));
@ -333,6 +383,72 @@ var _default = {
this.$utils.addUserBehaviorNew(); this.$utils.addUserBehaviorNew();
}, },
methods: { 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() {}, handleGoStore: function handleGoStore() {},
// 返回上个页面 // 返回上个页面
@ -344,6 +460,10 @@ var _default = {
// 大tab切换 // 大tab切换
handleBigTab: function handleBigTab(val) { handleBigTab: function handleBigTab(val) {
this.selectBigTab = 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); console.log('this.selectBigTab', this.selectBigTab);
this.orderList = []; this.orderList = [];
this.pageMsg = { 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 ? "" : ""; 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.handleGetOrderList(type);
this.$forceUpdate();
}, },
// 滚动到底部 加载更多 // 滚动到底部 加载更多
handleScrollTolower: function handleScrollTolower() { handleScrollTolower: function handleScrollTolower() {
@ -361,47 +482,25 @@ var _default = {
this.handleGetOrderList(type); this.handleGetOrderList(type);
}, },
handleTab: function handleTab(val) { handleTab: function handleTab(val) {
if (this.selectBigTab === 3 && val === 7) {
this.currentTab = 2;
}
this.pageMsg = { this.pageMsg = {
pageIndex: 1, pageIndex: 1,
pageSize: 10, pageSize: 10,
isOver: false isOver: false
}; };
if (this.currentTab === val) {
this.currentTab = "";
} else {
this.currentTab = val; this.currentTab = val;
}
this.orderList = []; 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); this.handleGetOrderList(type);
}, },
// 下拉刷新的方法 // 下拉刷新的方法
handleRefresherrefresh: function handleRefresherrefresh() { 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; var _this2 = this;
return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2() { return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2() {
var type; var type;
@ -409,10 +508,19 @@ var _default = {
while (1) { while (1) {
switch (_context2.prev = _context2.next) { switch (_context2.prev = _context2.next) {
case 0: 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 ? "" : ""; 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); return _this2.handleGetOrderList(type);
case 3: case 6:
_this2.triggered = false;
case 7:
case "end": case "end":
return _context2.stop(); return _context2.stop();
} }
@ -420,29 +528,49 @@ var _default = {
}, _callee2); }, _callee2);
}))(); }))();
}, },
// 获取订单数据 // 没传类型的方法
handleGetOrderList: function handleGetOrderList(status) { handleGetTypeOrderList: function handleGetTypeOrderList() {
var _this3 = this; var _this3 = this;
return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee3() { 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) { return _regenerator.default.wrap(function _callee3$(_context3) {
while (1) { while (1) {
switch (_context3.prev = _context3.next) { switch (_context3.prev = _context3.next) {
case 0: case 0:
if (!_this3.pageMsg.isOver) { 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 = 2; _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; break;
} }
return _context3.abrupt("return"); return _context4.abrupt("return");
case 2: case 2:
uni.showLoading({ uni.showLoading({
title: "正在加载...", title: "正在加载...",
mask: true mask: true
}); });
req = { req = {
action_type: "GetMallOrderList", action_type: "GetOrderList",
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' : '', 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: _this3.searchType === "6" ? "" : status || "", salebillState: _this4.searchType === "6" ? "" : status || "",
// salebillType: // salebillType:
// this.searchType === "6" // this.searchType === "6"
// ? this.pageType === "UnionMall" // ? this.pageType === "UnionMall"
@ -452,26 +580,26 @@ var _default = {
// ? 3001 // ? 3001
// : "3000,3002", // : "3000,3002",
// salebillState: this.searchType === "6" ? "" : status || "", // salebillState: this.searchType === "6" ? "" : status || "",
PageIndex: _this3.pageMsg.pageIndex, PageIndex: _this4.pageMsg.pageIndex,
pageSize: _this3.pageMsg.pageSize, pageSize: _this4.pageMsg.pageSize,
ownerUnitId: 911, ownerUnitId: 911,
requestType: "application/x-www-form-urlencoded" requestType: "application/x-www-form-urlencoded"
}; };
_context3.next = 6; _context4.next = 6;
return _this3.$api.postCoop(req); return _this4.$api.postCoop(req);
case 6: case 6:
data = _context3.sent; data = _context4.sent;
console.log("data", data); console.log("data", data);
oldOrderList = []; oldOrderList = [];
if (_this3.orderList && _this3.orderList.length > 0) { if (_this4.orderList && _this4.orderList.length > 0) {
oldOrderList = JSON.parse(JSON.stringify(_this3.orderList)); oldOrderList = JSON.parse(JSON.stringify(_this4.orderList));
} }
console.log("oldOrderList", oldOrderList); console.log("oldOrderList", oldOrderList);
// 手动添加待付款、待发货、待收货 // 手动添加待付款、待发货、待收货
list = data.Data ? data.Data.List : []; list = data.Data ? data.Data.List : [];
resList = []; resList = [];
if (list && list.length > 0) { if (list && list.length > 0) {
if (_this3.currentTab === 5) { if (_this4.currentTab === 5) {
list.forEach(function (item) { list.forEach(function (item) {
if (item.SALEBILL_STATE >= 3000 && item.SALEBILL_STATE !== 8999 && item.SALEBILL_STATE !== 9000 && item.SALEBILL_STATE !== 9999) { if (item.SALEBILL_STATE >= 3000 && item.SALEBILL_STATE !== 8999 && item.SALEBILL_STATE !== 9000 && item.SALEBILL_STATE !== 9999) {
resList.push(item); resList.push(item);
@ -485,17 +613,17 @@ var _default = {
} }
console.log("获取订单数据", list); console.log("获取订单数据", list);
if (resList && resList.length < 10) { if (resList && resList.length < 10) {
_this3.pageMsg.isOver = true; _this4.pageMsg.isOver = true;
} }
_this3.orderList = oldOrderList.concat(resList); _this4.orderList = oldOrderList.concat(resList);
console.log("获取订单数据2", _this3.orderList); console.log("获取订单数据2", _this4.orderList);
uni.hideLoading(); uni.hideLoading();
case 19: case 19:
case "end": case "end":
return _context3.stop(); return _context4.stop();
} }
} }
}, _callee3); }, _callee4);
}))(); }))();
}, },
goEvaluate: function goEvaluate(item) { goEvaluate: function goEvaluate(item) {
@ -503,6 +631,14 @@ var _default = {
uni.navigateTo({ 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 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; text-transform: none;
margin-top: 10rpx; 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 { .main .orderListBox .orderItem .orderItemMoneyBox.data-v-50f48f45 {
width: 100%; width: 100%;
display: flex; display: flex;
@ -267,7 +280,7 @@
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
margin-top: 16rpx; margin-top: 32rpx;
} }
.main .orderListBox .orderItem .orderItemBottom .orderItemBottomLeft .orderItemBottomLeftMore.data-v-50f48f45 { .main .orderListBox .orderItem .orderItemBottom .orderItemBottomLeft .orderItemBottomLeftMore.data-v-50f48f45 {
font-family: PingFangSC, PingFang SC; font-family: PingFangSC, PingFang SC;
@ -292,7 +305,7 @@
text-align: left; text-align: left;
font-style: normal; font-style: normal;
text-transform: none; text-transform: none;
padding: 2rpx 26rpx; padding: 4rpx 26rpx;
background: #F2F5F6; background: #F2F5F6;
border-radius: 4rpx; border-radius: 4rpx;
margin-right: 34rpx; margin-right: 34rpx;
@ -306,10 +319,45 @@
text-align: left; text-align: left;
font-style: normal; font-style: normal;
text-transform: none; text-transform: none;
padding: 2rpx 26rpx; padding: 4rpx 26rpx;
background: #F2F5F6; background: #F2F5F6;
border-radius: 4rpx; 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 { .main .fliter.data-v-50f48f45 {
background: #fff; background: #fff;
margin-bottom: 24rpx; margin-bottom: 24rpx;

View File

@ -125,7 +125,7 @@ var render = function () {
var _vm = this var _vm = this
var _h = _vm.$createElement var _h = _vm.$createElement
var _c = _vm._self._c || _h 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 g0 = _vm.shopOrder.length
var g1 = _vm.shopOrder.length var g1 = _vm.shopOrder.length
if (!_vm._isMounted) { 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) { handleDesc: function handleDesc(e, item) {
this.good.SALEDETAIL_DESC = e.detail.value; this.good.SALEDETAIL_DESC = e.detail.value;
}, },
// 查一下 当前商品有没有被收藏
// 收藏 // 收藏
handleCollect: function handleCollect() { handleCollect: function handleCollect() {
var _this2 = this; var _this2 = this;
if (this.isCollect) { return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee() {
var collectGoodList = uni.getStorageSync('collectGood'); var req, data, _req, _data;
var newList = []; return _regenerator.default.wrap(function _callee$(_context) {
if (collectGoodList && collectGoodList.length > 0) { while (1) {
collectGoodList.forEach(function (item) { switch (_context.prev = _context.next) {
if (item.COMMODITY_ID !== _this2.shopId) { case 0:
newList.push(item); if (!_this2.isCollect) {
_context.next = 10;
break;
} }
}); req = {
} COLLECTIONId: _this2.good.COLLECTION_ID,
uni.setStorageSync('collectGood', newList); 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({ uni.showToast({
title: '取消收藏', title: '删除成功!',
icon: 'none' icon: 'none'
}); });
this.isCollect = false; _this2.isCollect = false;
} else { } else {
var _collectGoodList = uni.getStorageSync('collectGood'); uni.showToast({
if (_collectGoodList && _collectGoodList.length > 0) { title: data.Result_Desc,
_collectGoodList.push(this.good); icon: 'none'
} else { });
_collectGoodList = [this.good];
} }
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({ uni.showToast({
title: '已添加至收藏夹', title: '已添加至收藏夹',
icon: 'none' 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) { startCountdown: function startCountdown(targetTime) {
@ -661,70 +706,70 @@ var _default = {
// 立即购买方法 // 立即购买方法
handleMakeOrder: function handleMakeOrder() { handleMakeOrder: function handleMakeOrder() {
var _this5 = this; 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; var userInfo, userData, nowShopList, orderList, noSelectList, id;
return _regenerator.default.wrap(function _callee$(_context) { return _regenerator.default.wrap(function _callee2$(_context2) {
while (1) { while (1) {
switch (_context.prev = _context.next) { switch (_context2.prev = _context2.next) {
case 0: case 0:
userInfo = {}; userInfo = {};
if (!(_this5.pageType === "UnionMall")) { if (!(_this5.pageType === "UnionMall")) {
_context.next = 12; _context2.next = 12;
break; break;
} }
// 获取最新的用户余额 // 获取最新的用户余额
uni.showLoading({ uni.showLoading({
title: "获取用户余额..." title: "获取用户余额..."
}); });
_context.next = 5; _context2.next = 5;
return _this5.$api.getCoop({ return _this5.$api.getCoop({
action_type: "GetMembershipInfo", action_type: "GetMembershipInfo",
WechatUserId: _this5.user.WechatUserId WechatUserId: _this5.user.WechatUserId
}); });
case 5: case 5:
userData = _context.sent; userData = _context2.sent;
userInfo = userData.Data; userInfo = userData.Data;
console.log("this.userInfo", _this5.userInfo); console.log("this.userInfo", _this5.userInfo);
uni.hideLoading(); uni.hideLoading();
if (userInfo && userInfo.ACCOUNT_BALANCE > 0) { if (userInfo && userInfo.ACCOUNT_BALANCE > 0) {
_context.next = 12; _context2.next = 12;
break; break;
} }
uni.showToast({ uni.showToast({
title: "您未被纳入工会会员采购名录,如有疑问,请联系工会咨询", title: "您未被纳入工会会员采购名录,如有疑问,请联系工会咨询",
icon: "none" icon: "none"
}); });
return _context.abrupt("return"); return _context2.abrupt("return");
case 12: case 12:
if (!(_this5.good.SKULIST && _this5.good.SKULIST.length > 0 && (_this5.good.COMMODITY_RULE === "默认" || !_this5.good.COMMODITY_RULE))) { if (!(_this5.good.SKULIST && _this5.good.SKULIST.length > 0 && (_this5.good.COMMODITY_RULE === "默认" || !_this5.good.COMMODITY_RULE))) {
_context.next = 15; _context2.next = 15;
break; break;
} }
uni.showToast({ uni.showToast({
title: "请先选择规格!", title: "请先选择规格!",
icon: "none" icon: "none"
}); });
return _context.abrupt("return"); return _context2.abrupt("return");
case 15: case 15:
if (!(_this5.good.COMMODITY_STOCK === 0)) { if (!(_this5.good.COMMODITY_STOCK === 0)) {
_context.next = 18; _context2.next = 18;
break; break;
} }
uni.showToast({ uni.showToast({
title: "商品已售罄!", title: "商品已售罄!",
icon: "none" icon: "none"
}); });
return _context.abrupt("return"); return _context2.abrupt("return");
case 18: case 18:
if (!(_this5.good.COMMODITY_STOCK < _this5.good.count)) { if (!(_this5.good.COMMODITY_STOCK < _this5.good.count)) {
_context.next = 21; _context2.next = 21;
break; break;
} }
uni.showToast({ uni.showToast({
title: "商品库存不足!", title: "商品库存不足!",
icon: "none" icon: "none"
}); });
return _context.abrupt("return"); return _context2.abrupt("return");
case 21: case 21:
console.log("this.good", _this5.good); console.log("this.good", _this5.good);
nowShopList = [_this5.good]; nowShopList = [_this5.good];
@ -770,10 +815,10 @@ var _default = {
} }
case 24: case 24:
case "end": 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.SEND_MODE = res.Data.SEND_MODE.toString();
res.Data.AFTERSALE_NATRUE = res.Data.AFTERSALE_NATRUE.toString(); res.Data.AFTERSALE_NATRUE = res.Data.AFTERSALE_NATRUE.toString();
res.Data.DUTY_PARAGRAPH = res.Data.DUTY_PARAGRAPH.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 = res.Data;
_this.good.COMMODITY_CURRPRICE = _this.good.COMMODITY_MEMBERPRICE; _this.good.COMMODITY_CURRPRICE = _this.good.COMMODITY_MEMBERPRICE;
_this.good.count = 1; _this.good.count = 1;

File diff suppressed because one or more lines are too long

View File

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

View File

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

File diff suppressed because one or more lines are too long