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