fixbug: 关闭购物车

This commit is contained in:
2025-08-16 20:59:19 +08:00
parent 53b6577aba
commit b76691e5d4
4 changed files with 75 additions and 45 deletions
+4 -2
View File
@@ -5,8 +5,8 @@
<view v-for="item in balanceList" :key="item.id" class="purse_warp_item" @click="jumpBonus(item)">
<view class="purse_item_title">
<view class="purse_item_title-left">
<up-image src="/static/mine/purse_amount.png" width="22" height="22" bgColor="#f1f6ff00"
class="purse_amount"></up-image>
<up-image :src="`https://cex-pub.s3.ap-southeast-1.amazonaws.com/static/mine-purse/${item.categoty}.png`"
width="22" height="22" bgColor="#f1f6ff00" class="purse_amount"></up-image>
<view class="title">{{ item.name }}</view>
<up-image src="/static/common/right_soild.png" width="10" height="10" bgColor="#fff"
class="right_soild"></up-image>
@@ -149,6 +149,8 @@ export default {
.purse_amount {
margin-right: 15rpx;
margin-top: 6rpx;
}
.right_soild {
@@ -465,7 +465,7 @@ export default {
.info_center_warp-item-bottom {
font-size: 26rpx;
color: #999999;
margin-top: 10rpx;
margin-top: 15rpx;
}
}
@@ -477,42 +477,67 @@ export default {
.purse_info_item-mine {
display: flex;
justify-content: space-between;
align-items: center;
border: 0;
height: 128rpx;
margin-bottom: 0;
padding: 0;
.purse_data_warp {
display: flex;
flex-direction: column;
justify-content: center;
margin-left: 20rpx;
.purse_info_name {
font-size: 28rpx;
color: #333333;
font-weight: normal;
}
.purse_info_value {
font-size: 24rpx;
color: #999999;
}
.purse_info_title {
font-weight: bold;
font-size: 32px;
color: #333333;
text-align: end;
}
}
.purse_info_left .ipurse_nfo_right {
display: flex;
justify-content: center;
justify-content: space-between;
flex-direction: column;
height: 82rpx;
.purse_data_warp {
display: flex;
flex-direction: column;
justify-content: center;
margin-left: 20rpx;
.purse_info_name {
font-size: 28rpx;
color: #333333;
font-weight: normal;
}
.purse_info_value {
font-size: 24rpx;
color: #999999;
}
.purse_info_title {
font-weight: bold;
font-size: 32px;
color: #333333;
text-align: end;
}
}
}
.purse_info_left {
.purse_info_name {
font-weight: 400;
}
.purse_info_value {
margin-top: 8rpx;
}
}
.ipurse_nfo_right {
.purse_info_value {
width: 300rpx;
white-space: nowrap;
/* 禁止换行 */
overflow: hidden;
/* 隐藏溢出内容 */
text-overflow: ellipsis;
/* 显示省略号 */
}
}
}
+1 -1
View File
@@ -157,7 +157,7 @@ export default {
background: linear-gradient(180deg, #FF8876 0%, #FF3D36 17%, #FF4646 85%, #FF8978 100%);
border-radius: 24rpx;
padding: 50rpx 24rpx;
margin: 50rpx auto 0;
margin: 100rpx auto 0;
font-size: 34rpx;
color: #FFFAE3;
line-height: 54rpx;
+17 -14
View File
@@ -44,7 +44,7 @@
<!-- 具体规格 -->
<view class="content_concrete">
<view class="concrete_item concrete_item_but" @click="checkSpecification(true,'n')">
<view class="concrete_item concrete_item_but" @click="checkSpecification(true, 'n')">
<view class="concrete_item_">
<view class="concrete_item_title">规格</view>
<view class="concrete_item_value">
@@ -112,7 +112,7 @@
</view>
<view class="product_but_right">
<view v-if="!ji" class="but_comm join_warp" @click="checkSpecification(true, 'addCart')">加入购物车</view>
<view class="but_comm buy_warp" :class="{'border-16':ji}" @click="checkSpecification(true, 'buy')">立即购买</view>
<view class="but_comm buy_warp" :class="{ 'border-16': ji }" @click="checkSpecification(true, 'buy')">立即购买</view>
</view>
</view>
<!-- 选择规格的弹框 -->
@@ -204,7 +204,7 @@
<view class="content_">
<view class="content_1">{{ source === "supply_chain" ? '云仓客服' : '平台客服' }}</view>
<view class="content_3">{{ source === "supply_chain"
? CLOUD_SERVICE_PHONE_NUMBER :CUSTOMER_SERVICE_PHONE_NUMBER}}
? CLOUD_SERVICE_PHONE_NUMBER : CUSTOMER_SERVICE_PHONE_NUMBER }}
</view>
</view>
<view class="but_">
@@ -269,13 +269,13 @@ export default {
serviceShow: false,// 联系客服弹框
openShow: false,
source: null,// 来源:供应链,自营
ji:0
ji: 0
}
},
onLoad(options) {
const id = options.id;
const source = options.source;
if (id && id !== 0) {
this.id = id ? parseInt(id, 10) : 0;
if (source && source === 'supply_chain') {
@@ -385,10 +385,10 @@ export default {
},
async checkSpecification(val, type) {
const source = this.source;
if(type == 'n' && this.ji == 1){
if (type == 'n' && this.ji == 1) {
type = 'buy';
}
console.log('afsdfsd',source,type)
console.log('afsdfsd', source, type)
if (source && source === "supply_chain") {
this.openShow = true;
return;
@@ -498,14 +498,14 @@ export default {
});
return;
}
const params = {
id: this.id,
specsId: selectTempl.id,// 规格ID
goodsNum: this.orderInfo.quantity,// 商品数量
}
console.log('selectTempl',selectTempl)
if(this.ji == 1){
console.log('selectTempl', selectTempl)
if (this.ji == 1) {
params['specsId'] = selectTempl;
uni.navigateTo({
url: `/pages/order_package/order_submit/order_submit?sed=${JSON.stringify(params)}`,
@@ -519,6 +519,7 @@ export default {
url: `/pages/order_package/order_submit/order_submit?ids=${resp.data}`,
})
} else {
this.specificationShow = false;
uni.showToast({
title: '成功加入购物车',
icon: 'success', // 可选 success/loading/none
@@ -540,9 +541,10 @@ export default {
</script>
<style lang="scss" scoped>
.border-16{
border-radius: 16rpx !important;
}
.border-16 {
border-radius: 16rpx !important;
}
.product_info_warp {
height: calc(100vh - 196rpx);
background-color: $app-bj;
@@ -667,7 +669,8 @@ export default {
border-radius: 24rpx;
padding: 10rpx 10rpx 30rpx;
margin-top: 30rpx;
margin-bottom:200rpx;
margin-bottom: 200rpx;
.content_details_title {
padding: 20rpx 30rpx;
}