店铺首页购物车

parent e6ee2728
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
</view> --> </view> -->
</view> </view>
<view class="evaluate"> <view class="evaluate">
<view class="evaluate-num"> <view class="evaluate-num" @click="jumpPjPgae">
<text class="env">评价({{ commentData.count }}</text> <text class="env">评价({{ commentData.count }}</text>
<text class="num">好评率({{ commentData.high }} %)</text> <text class="num">好评率({{ commentData.high }} %)</text>
<wd-icon name="arrow-right" size="32rpx" style="margin-top: 2rpx"></wd-icon> <wd-icon name="arrow-right" size="32rpx" style="margin-top: 2rpx"></wd-icon>
...@@ -143,6 +143,11 @@ onLoad((options) => { ...@@ -143,6 +143,11 @@ onLoad((options) => {
function handleClick(e) { function handleClick(e) {
console.log(e); console.log(e);
} }
function jumpPjPgae() {
xma.navigateTo({
url: `/pages/assistingAgriculture/detail/comment?shopId=${dataDetails.value.prod.shopId}`,
});
}
function onChange(e) { function onChange(e) {
console.log(e); console.log(e);
} }
...@@ -211,7 +216,7 @@ const share = () => { ...@@ -211,7 +216,7 @@ const share = () => {
function toStore() { function toStore() {
// TODO: 跳转到筑农严选 // TODO: 跳转到筑农严选
xma.navigateTo({ xma.navigateTo({
url: '/pages/assistingAgriculture/shop/index', url: `/pages/assistingAgriculture/shop/index?shopId=${dataDetails.value.prod.shopId}`,
}); });
} }
function toCart() { function toCart() {
......
...@@ -185,12 +185,9 @@ function toCart() { ...@@ -185,12 +185,9 @@ function toCart() {
url: '/pages/assistingAgriculture/cart/cart', url: '/pages/assistingAgriculture/cart/cart',
}); });
} }
const addPurchase = ref(0);
const sgyBasketlistFn = () => { const sgyBasketlistFn = () => {
const query = { sgyBasketlist().then((res) => {
shopId: currentShopId.value,
shopType: '3',
};
sgyBasketlist(query).then((res) => {
if (res.code === 0) { if (res.code === 0) {
res.data.forEach((shop) => { res.data.forEach((shop) => {
addPurchase.value += shop.prodInfos.length; addPurchase.value += shop.prodInfos.length;
...@@ -208,7 +205,6 @@ function clearFn() { ...@@ -208,7 +205,6 @@ function clearFn() {
}); });
} }
const addPurchase = ref(0);
const addShoppingCart = (item) => { const addShoppingCart = (item) => {
const params = { const params = {
shopId: item.shopId, shopId: item.shopId,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment