更新优化
This commit is contained in:
parent
1ee574eb6e
commit
4b0dbfddc4
@ -183,6 +183,7 @@
|
|||||||
title: "加入成功",
|
title: "加入成功",
|
||||||
duration: 1000,
|
duration: 1000,
|
||||||
})
|
})
|
||||||
|
this.$emit('addCart');
|
||||||
this.close();
|
this.close();
|
||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
|
@ -695,26 +695,30 @@
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
goodDetail(item) {
|
goodDetail(item) {
|
||||||
goShopDetail(item, this.uid).then(res => {
|
|
||||||
if (this.isLogin) {
|
|
||||||
initiateAssistApi(item.activity_id).then(res => {
|
|
||||||
let id = res.data.product_assist_set_id;
|
|
||||||
uni.hideLoading();
|
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: '/pages/activity/assist_detail/index?id=' + id
|
url: `/pages/goods_details/index?id=${item.product_id}`
|
||||||
});
|
|
||||||
}).catch((err) => {
|
|
||||||
uni.showToast({
|
|
||||||
title: err,
|
|
||||||
icon: 'none'
|
|
||||||
})
|
})
|
||||||
});
|
// goShopDetail(item, this.uid).then(res => {
|
||||||
} else {
|
// if (this.isLogin) {
|
||||||
this.isAuto = true;
|
// console.log(res);
|
||||||
this.isShowAuth = true
|
// initiateAssistApi(item.activity_id).then(res => {
|
||||||
}
|
// let id = res.data.product_assist_set_id;
|
||||||
|
// uni.hideLoading();
|
||||||
|
// uni.navigateTo({
|
||||||
|
// url: '/pages/activity/assist_detail/index?id=' + id
|
||||||
|
// });
|
||||||
|
// }).catch((err) => {
|
||||||
|
// uni.showToast({
|
||||||
|
// title: err,
|
||||||
|
// icon: 'none'
|
||||||
|
// })
|
||||||
|
// });
|
||||||
|
// } else {
|
||||||
|
// this.isAuto = true;
|
||||||
|
// this.isShowAuth = true
|
||||||
|
// }
|
||||||
|
|
||||||
})
|
// })
|
||||||
},
|
},
|
||||||
serch() {
|
serch() {
|
||||||
this.getList()
|
this.getList()
|
||||||
|
@ -106,6 +106,8 @@
|
|||||||
<view class="r_name">{{item.product.store_name}}</view>
|
<view class="r_name">{{item.product.store_name}}</view>
|
||||||
<view class="r_type">
|
<view class="r_type">
|
||||||
<view v-if="item.product.store_info">{{item.product.store_info}}</view>
|
<view v-if="item.product.store_info">{{item.product.store_info}}</view>
|
||||||
|
<view v-else-if="getSkuName(item)">{{getSkuName(item)}}</view>
|
||||||
|
<view v-else-if="item.unit_name">{{item.unit_name}}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="r_btn" v-if="item.product && item.product.price">
|
<view class="r_btn" v-if="item.product && item.product.price">
|
||||||
<view>¥<text style="font-size: 33rpx;">{{ item.product.price.split('.')[0] }}.</text>{{item.product.price.split('.')[1]}}</view>
|
<view>¥<text style="font-size: 33rpx;">{{ item.product.price.split('.')[0] }}.</text>{{item.product.price.split('.')[1]}}</view>
|
||||||
@ -173,7 +175,7 @@
|
|||||||
</view>
|
</view>
|
||||||
</uni-popup>
|
</uni-popup>
|
||||||
|
|
||||||
<shortPopup ref="shortPopupRef"></shortPopup>
|
<shortPopup ref="shortPopupRef" @addCart="loadCart"></shortPopup>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
@ -347,7 +349,6 @@
|
|||||||
this.storeList = [];
|
this.storeList = [];
|
||||||
this.showLoading = true;
|
this.showLoading = true;
|
||||||
await this.getCloundShop();
|
await this.getCloundShop();
|
||||||
this.cartFn();
|
|
||||||
if (this.mer_location == 1) {
|
if (this.mer_location == 1) {
|
||||||
this.selfLocation()
|
this.selfLocation()
|
||||||
}
|
}
|
||||||
@ -720,7 +721,7 @@
|
|||||||
}
|
}
|
||||||
townCloud({
|
townCloud({
|
||||||
street_code: this.street_id,
|
street_code: this.street_id,
|
||||||
category_id: this.storeParam.category_id,
|
// category_id: this.storeParam.category_id,
|
||||||
order: this.storeParam.order,
|
order: this.storeParam.order,
|
||||||
keyword: this.storeParam.keyword,
|
keyword: this.storeParam.keyword,
|
||||||
page: this.storeParam.page,
|
page: this.storeParam.page,
|
||||||
@ -790,6 +791,14 @@
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
},
|
||||||
|
// 刷新购物车
|
||||||
|
loadCart(){
|
||||||
|
this.cartFn();
|
||||||
|
},
|
||||||
|
// 获取规格名称
|
||||||
|
getSkuName(item){
|
||||||
|
return Object.keys(item.sku).join('/')||null;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
//刷新
|
//刷新
|
||||||
@ -797,7 +806,8 @@
|
|||||||
uni.stopPullDownRefresh()
|
uni.stopPullDownRefresh()
|
||||||
},
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
this.showSelect = false
|
this.showSelect = false;
|
||||||
|
this.cartFn();
|
||||||
},
|
},
|
||||||
// 页面返回
|
// 页面返回
|
||||||
onBackPress() {
|
onBackPress() {
|
||||||
@ -1094,13 +1104,20 @@
|
|||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
|
|
||||||
.r_name {
|
.r_name {
|
||||||
height: 3em;
|
width: 100%;
|
||||||
|
height: 64rpx;
|
||||||
|
line-height: 32rpx;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
display: -webkit-box; /* 使用弹性盒子布局 */
|
||||||
|
-webkit-box-orient: vertical; /* 设置为垂直方向布局 */
|
||||||
|
overflow: hidden; /* 隐藏超出部分 */
|
||||||
|
-webkit-line-clamp: 2; /* 限制显示两行文本 */
|
||||||
}
|
}
|
||||||
|
|
||||||
.r_type {
|
.r_type {
|
||||||
font-size: 22.78rpx;
|
font-size: 22.78rpx;
|
||||||
color: #737373;
|
color: #737373;
|
||||||
width: 280rpx;
|
width: 300rpx;
|
||||||
|
|
||||||
view {
|
view {
|
||||||
height: 39rpx;
|
height: 39rpx;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user