1

parent 35a1f91f
...@@ -51,7 +51,7 @@ export function getCouponShopList(prodId, shopId) { ...@@ -51,7 +51,7 @@ export function getCouponShopList(prodId, shopId) {
export function receiveCoupon(data) { export function receiveCoupon(data) {
return request({ return request({
url: `/sgyrdd/coupon/receiveCoupon`, url: `/sgyrdd/coupon/receiveCoupon`,
method: 'GET', method: 'POST',
data, data,
}); });
} }
......
...@@ -56,16 +56,16 @@ ...@@ -56,16 +56,16 @@
</scroll-view> </scroll-view>
</view> </view>
</view> </view>
<view class="product-page" v-for="(item, index) in list" :key="index"> <view class="product-page" v-for="(type, index) in list" :key="index">
<view> <view>
<view class="page-title">{{ item.categoryName }}</view> <view class="page-title">{{ type.categoryName }}</view>
<image mode="aspectFill" :src="item.img" class="main-img" /> <image mode="aspectFill" :src="type.img" class="main-img" />
<view style="display: flex; flex-direction: row"> <view style="display: flex; flex-direction: row">
<view <view
class="detail-border" class="detail-border"
v-for="(item, index) in item.commodityList" v-for="(item, index) in type.commodityList"
:key="index" :key="index"
@click="toDetail(item)" @click="toDetail(item, type.categoryId)"
> >
<image <image
mode="aspectFill" mode="aspectFill"
...@@ -158,6 +158,11 @@ const toBuilding = (item) => { ...@@ -158,6 +158,11 @@ const toBuilding = (item) => {
xma.navigateTo({ xma.navigateTo({
url: `/pages/assistingAgriculture/index/building?categoryId=${item.categoryId}`, url: `/pages/assistingAgriculture/index/building?categoryId=${item.categoryId}`,
}); });
} else if (item.categoryId === '9') {
// 跳转到筑农
xma.navigateTo({
url: `/pages/assistingAgriculture/index/presale?categoryId=${item.categoryId}`,
});
} else if (item.categoryId === '8') { } else if (item.categoryId === '8') {
// 跳转到乡村旅居 // 跳转到乡村旅居
xma.navigateTo({ xma.navigateTo({
...@@ -181,11 +186,18 @@ onPageScroll((e) => { ...@@ -181,11 +186,18 @@ onPageScroll((e) => {
} }
}); });
// 跳转详情页 // 跳转详情页
function toDetail(item) { function toDetail(item, categoryId) {
// TODO: 跳转到详情页 // TODO: 跳转到详情页
xma.navigateTo({ if (categoryId === '9') {
url: `/pages/assistingAgriculture/detail/detail?prodId=${item.prodId}`, xma.navigateTo({
}); url: `/pages/assistingAgriculture/detail/detail?prodId=${item.prodId}`,
});
} else if (categoryId === '8') {
// 跳转到乡村旅居
xma.navigateTo({
url: `/pages/assistingAgriculture/RouteDetails/RouteDetails?shopId=${item.shopId}&prodId=${item.prodId}`,
});
}
} }
</script> </script>
......
...@@ -42,11 +42,11 @@ ...@@ -42,11 +42,11 @@
></view> ></view>
</view> </view>
<view class="price"> <view class="price">
<!-- <view class="discounts">4.5折</view> --> <view class="discounts">{{ (item.price / item.oriPrice) * 10 }}</view>
<text class="text">{{ item.price }}</text> <text class="text">{{ item.price }}</text>
<text class="text2">{{ item.oriPrice }}</text> <text class="text2">{{ item.oriPrice }}</text>
<view class="btn"> <view class="btn">
<!-- <text class="text3">仅剩余5张</text> --> <text class="text3">仅剩余{{ item.stocks }}</text>
<text class="text3">立即抢购</text> <text class="text3">立即抢购</text>
<!-- <image class="qiang" src="../../static/index/qiang.png" mode="widthFix" /> --> <!-- <image class="qiang" src="../../static/index/qiang.png" mode="widthFix" /> -->
</view> </view>
...@@ -483,6 +483,9 @@ page { ...@@ -483,6 +483,9 @@ page {
margin-left: 20rpx; margin-left: 20rpx;
align-items: center; align-items: center;
margin-top: 16rpx; margin-top: 16rpx;
width: 100%;
display: flex;
flex-wrap: wrap;
.item { .item {
width: 100rpx; width: 100rpx;
height: 36rpx; height: 36rpx;
...@@ -493,6 +496,7 @@ page { ...@@ -493,6 +496,7 @@ page {
text-align: center; text-align: center;
line-height: 36rpx; line-height: 36rpx;
margin-right: 8rpx; margin-right: 8rpx;
margin-top: 8rpx;
} }
} }
.price { .price {
...@@ -534,6 +538,9 @@ page { ...@@ -534,6 +538,9 @@ page {
display: flex; display: flex;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
box-sizing: border-box;
padding: 0 8rpx;
text-align: center;
.text3 { .text3 {
font-size: 20rpx; font-size: 20rpx;
color: #fa5151; color: #fa5151;
......
...@@ -181,27 +181,23 @@ ...@@ -181,27 +181,23 @@
没有更多啦~ 没有更多啦~
</view> </view>
</view> </view>
<view class="rich-text-card">
<text class="title">商品详情</text>
<rich-text class="desc" :nodes="prodInfo.content"></rich-text>
</view>
<view class="rich-text-card"> <view class="rich-text-card">
<text class="title">购买须知</text> <text class="title">购买须知</text>
<!-- <rich-text :nodes="'nodes'"></rich-text> --> <!-- <rich-text :nodes="'nodes'"></rich-text> -->
<view class="purchase-information" v-if="showRlue"> <view class="purchase-information" v-if="showRlue">
<view class="purchase-box"> <view class="purchase-box" v-if="prodRlue.createTime">
<text class="title">开始时间</text> <text class="title">开始时间</text>
<text class="content">{{ prodRlue.createTime }}</text> <text class="content">{{ prodRlue.createTime }}</text>
</view> </view>
<view class="purchase-box"> <view class="purchase-box" v-if="prodRlue.endTime">
<text class="title">结束时间</text> <text class="title">结束时间</text>
<text class="content">{{ prodRlue.endTime }}</text> <text class="content">{{ prodRlue.endTime }}</text>
</view> </view>
<view class="purchase-box"> <view class="purchase-box" v-if="prodRlue.labelNames">
<text class="title">标签</text> <text class="title">标签</text>
<text class="content">{{ prodRlue.labelNames }}</text> <text class="content">{{ prodRlue.labelNames }}</text>
</view> </view>
<view class="purchase-box"> <view class="purchase-box" v-if="prodRlue.rule">
<text class="title">规则</text> <text class="title">规则</text>
<text class="content">{{ prodRlue.rule }}</text> <text class="content">{{ prodRlue.rule }}</text>
</view> </view>
...@@ -212,6 +208,10 @@ ...@@ -212,6 +208,10 @@
<i v-else class="iconfont xia icon-shuangxiajiantou"></i> <i v-else class="iconfont xia icon-shuangxiajiantou"></i>
</view> </view>
</view> </view>
<view class="rich-text-card">
<text class="title">商品详情</text>
<rich-text class="desc" :nodes="prodInfo.content"></rich-text>
</view>
<!-- 使用方法-start --> <!-- 使用方法-start -->
<view class="user-detail-card"> <view class="user-detail-card">
<text class="title">使用方法</text> <text class="title">使用方法</text>
...@@ -243,7 +243,7 @@ ...@@ -243,7 +243,7 @@
<text class="title">适用门店</text> <text class="title">适用门店</text>
<text class="goods-name">{{ shopInfo.shopName }}</text> <text class="goods-name">{{ shopInfo.shopName }}</text>
<view class="goods-pf-rs"> <view class="goods-pf-rs">
<text class="goods-fs">{{ shopInfo.grade }}</text> <text class="goods-fs">{{ shopInfo.grade.toFixed(1) }}</text>
<text class="goods-type">火锅</text> <text class="goods-type">火锅</text>
<!-- <text class="goods-rs">36/人</text> --> <!-- <text class="goods-rs">36/人</text> -->
</view> </view>
...@@ -262,10 +262,10 @@ ...@@ -262,10 +262,10 @@
<image src="@/static/shop/share.png"></image> <image src="@/static/shop/share.png"></image>
分享 分享
</view> --> </view> -->
<view class="start" @click="shareFn"> <!-- <view class="start" @click="shareFn">
<!-- <image src="@/static/shop/share.png"></image> <image src="@/static/shop/share.png"></image>
分享 --> 分享
</view> </view> -->
<view class="btn" @click="buyNow">立即抢购</view> <view class="btn" @click="buyNow">立即抢购</view>
</view> </view>
<!-- 底部-end --> <!-- 底部-end -->
...@@ -951,12 +951,13 @@ page { ...@@ -951,12 +951,13 @@ page {
.product-combination-box { .product-combination-box {
display: flex; display: flex;
width: 100%; width: 100%;
align-items: center; align-items: flex-start;
justify-content: space-between; justify-content: space-between;
margin-top: 10rpx; margin-top: 18rpx;
.p-t { .p-t {
font-size: 11 * 2rpx; font-size: 11 * 2rpx;
color: #abaaaa; color: #abaaaa;
max-width: 450rpx;
} }
.price { .price {
font-size: 11 * 2rpx; font-size: 11 * 2rpx;
......
...@@ -12,18 +12,13 @@ ...@@ -12,18 +12,13 @@
v-model="showpopup" v-model="showpopup"
position="bottom" position="bottom"
custom-style="height: 50%;border-radius: 16rpx 16rpx 0 0 ;box-sizing:border-box;padding:20rpx;" custom-style="height: 50%;border-radius: 16rpx 16rpx 0 0 ;box-sizing:border-box;padding:20rpx;"
@close="handleClose"
:safe-area-inset-bottom="true" :safe-area-inset-bottom="true"
:close-on-click-modal="false"
custom-class="popup" custom-class="popup"
> >
<view class="title-box"> <view class="title-box">
<text class="title">选择优惠券</text> <text class="title">选择优惠券</text>
<wd-icon <wd-icon @click="closePopup" color="#D8D8D8" name="close-bold" size="30rpx"></wd-icon>
@click="showpopup = false"
color="#D8D8D8"
name="close-bold"
size="30rpx"
></wd-icon>
</view> </view>
<view class="popup-content"> <view class="popup-content">
<view <view
...@@ -118,6 +113,11 @@ ...@@ -118,6 +113,11 @@
商家优惠券 商家优惠券
<view class="view-coupons" @click="showpopup = true"> <view class="view-coupons" @click="showpopup = true">
<text v-if="activeCouponInfo.reduceAmount">{{ activeCouponInfo.reduceAmount }}</text> <text v-if="activeCouponInfo.reduceAmount">{{ activeCouponInfo.reduceAmount }}</text>
<text v-else>
<text style="color: red">请选择优惠券</text>
0¥
</text>
<wd-icon color="#696969" name="chevron-right" size="22px"></wd-icon> <wd-icon color="#696969" name="chevron-right" size="22px"></wd-icon>
</view> </view>
</view> </view>
...@@ -189,6 +189,16 @@ onLoad((options) => { ...@@ -189,6 +189,16 @@ onLoad((options) => {
skuIds.value = skuId; skuIds.value = skuId;
groupBuyConfirmFn(prodId, skuId); groupBuyConfirmFn(prodId, skuId);
}); });
/**
* 关闭弹窗
*/
function closePopup() {
showpopup.value = false;
// console.log('111');
if (activeCouponId.value !== '') {
groupBuyUpdateFn(activeCouponId.value);
}
}
onShow(() => { onShow(() => {
if (outTradeNos.value) { if (outTradeNos.value) {
// 查询订单状态决定是否支付 // 查询订单状态决定是否支付
...@@ -224,7 +234,6 @@ function radioChange(evt) { ...@@ -224,7 +234,6 @@ function radioChange(evt) {
const { value } = evt.detail; const { value } = evt.detail;
selectType.value = value; selectType.value = value;
} }
function alert() { function alert() {
if (productCoupons.value.length > 0) { if (productCoupons.value.length > 0) {
show.value = true; show.value = true;
...@@ -253,10 +262,13 @@ function showDetailFn(item) { ...@@ -253,10 +262,13 @@ function showDetailFn(item) {
*/ */
function selectShopCoupon(item) { function selectShopCoupon(item) {
if (item.cashCondition <= orderInfo.value.orderItems[0].price) { if (item.cashCondition <= orderInfo.value.orderItems[0].price) {
activeCouponId.value = item.couponId; if (activeCouponId.value === item.couponId) {
activeCouponInfo.value = item; activeCouponId.value = '';
showpopup.value = false; activeCouponInfo.value = {};
groupBuyUpdateFn(item.couponUserId); } else {
activeCouponId.value = item.couponId;
activeCouponInfo.value = item;
}
} else { } else {
xma.showToast({ xma.showToast({
title: '不满足优惠券使用条件', title: '不满足优惠券使用条件',
......
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
<view class="shop-info-right"> <view class="shop-info-right">
<view class="shop-info-score"> <view class="shop-info-score">
<view class="score-text"> <view class="score-text">
<text class="score-num">{{ shopInfo.grade }}</text> <text class="score-num">{{ shopInfo.grade.toFixed(1) }}</text>
<text class="tj">推荐</text> <text class="tj">推荐</text>
</view> </view>
<view class="score-icon"> <view class="score-icon">
...@@ -78,10 +78,10 @@ ...@@ -78,10 +78,10 @@
</view> </view>
<!-- 店铺信息-end --> <!-- 店铺信息-end -->
<!-- 补贴 --> <!-- 补贴 -->
<view class="subsidy-content" @click="jumpPage"> <view class="subsidy-content" @click="jumpPage" v-if="merchantCoupons">
<view class="subsidy"> <view class="subsidy">
<image mode="aspectFill" src="@/static/shop/subsidy.png" /> <image mode="aspectFill" src="@/static/shop/subsidy.png" />
<text class="multi-line">{{ merchantCoupons.activityName || 暂无优惠券 }}</text> <text class="multi-line">{{ merchantCoupons?.activityName || '暂无优惠券' }}</text>
</view> </view>
<view class="more"> <view class="more">
<text>更多</text> <text>更多</text>
...@@ -271,7 +271,7 @@ ...@@ -271,7 +271,7 @@
<image mode="aspectFill" :src="imgUrl + item.shopLogo"></image> <image mode="aspectFill" :src="imgUrl + item.shopLogo"></image>
<text class="goods-name multi-line">{{ item.shopName }}</text> <text class="goods-name multi-line">{{ item.shopName }}</text>
<view class="goods-pf-rs"> <view class="goods-pf-rs">
<text class="goods-fs">{{ item.grade }}</text> <text class="goods-fs">{{ item.grade.toFixed(1) }}</text>
<text class="goods-fs-2"></text> <text class="goods-fs-2"></text>
<!-- <text class="goods-rs">36/人</text> --> <!-- <text class="goods-rs">36/人</text> -->
</view> </view>
......
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