Commit bbf94e84 authored by 彭佳妮(贵阳日报)'s avatar 彭佳妮(贵阳日报)
parents 999a2ff7 8d88838b
......@@ -5,7 +5,7 @@ VITE_APP_ENV = 'development'
VITE_APP_BASE_URL = '/api'
# 照片url路径 (开发环境)
VITE_APP_IMG_URL = 'http://file.rhhzkj.com:8080'
# VITE_APP_IMG_URL = 'http://file.rhhzkj.com:8080'
# 照片url路径(正式环境)
# VITE_APP_IMG_URL = 'https://file.rddyz.com'
VITE_APP_IMG_URL = 'https://file.rddyz.com'
<template>
<view @tap="toShop(item.shopId)" class="card" v-for="item in cardData" :key="item.shopId">
<image class="img" :src="item.shopLogo" mode="aspectFill" />
<image class="img" :src="item.shopLogo" mode="scaleToFill" />
<view class="right">
<text class="text">{{ item.shopName }}</text>
<view class="twoBxo">
......
<template>
<view class="card">
<view class="head">
<image class="imgBg" :src="shopCardData.shopLogo" mode="aspectFill" />
<image class="imgBg" :src="shopCardData.shopLogo" mode="scaleToFill" />
<view class="containerBox">
<image class="img" :src="shopCardData.shopLogo" mode="aspectFill" />
<image class="img" :src="shopCardData.shopLogo" mode="scaleToFill" />
<view class="right">
<text class="text">{{ shopCardData.shopName }}</text>
<view class="twoBxo">
......
......@@ -55,7 +55,7 @@
</view>
</scroll-view>
</view>
<view class="bootom">
<view class="bootom" :style="{ top }">
<view class="bootom-top">
<view class="option" @tap="locationFiltering(0)">
<text :class="{ rotate: rotate }">全部{{ categoryNames }}</text>
......@@ -130,6 +130,7 @@ import fab from '../../components/fab/fab.vue';
import Sort from '../../components/index/Sort.vue';
import { getByParentId, merchantList, prodSpecial } from '../../api/index';
const top = ref(null);
const backIconColor = ref('white');
const textColor = ref('#ffffff');
const backgroundBox = ref('');
......@@ -162,11 +163,20 @@ onLoad((option) => {
params.value.categoryIds = [parentId];
pics.value = pic;
query(parentId);
getTop();
prodSpecialFn();
getLocationFn().then((res) => {
getMerchantList();
});
});
// 获取位置板块贴合高度
const getTop = () => {
xma.xh.getMenuButtonBoundingClientRect({
success(res) {
top.value = (res.top + res.bottom) / 2 + 25 + 'px';
},
});
};
// distance参数来源
const nearby = (distance) => {
console.log('distance', distance);
......
......@@ -38,22 +38,25 @@
<!-- 红包 -->
<view class="redEnvelope">
<view class="title">今日福利</view>
<scroll-view class="box-red" scroll-x="true" @scroll="scroll">
<view class="redBagBox" v-for="(item, index) in coupon" :key="index">
<!-- <scroll-view class="box-red" scroll-x="true" @scroll="scroll"> -->
<view class="box-red">
<view class="redBagBox" v-for="(item, index) in coupon" :key="index" @tap="receive(item)">
<view class="content">
<text class="textO">{{ item.activityName }}</text>
<text class="textW">{{ item.discountValue }}</text>
<text class="textO">{{ item.thresholdAmount }}{{ item.discountValue }}</text>
</view>
<view v-if="item.numState === 0" class="textF" @tap="receive(item)">领取</view>
<view v-if="item.numState === 0" class="textF">领取</view>
<view v-else class="textF" @tap="toUse(item)">去使用</view>
</view>
</scroll-view>
<image
</view>
<!-- </scroll-view> -->
<!-- <image
@tap="toCoupon"
class="discount"
src="../../static/index/discount.png"
mode="widthFix"
/>
/> -->
</view>
<!-- 贵阳老味道 -->
<!-- <view class="guiyang"></view> -->
......@@ -87,7 +90,7 @@
:key="index"
>
<!-- <image class="img" src="../../static/index/eatFood.png" mode="widthFix" /> -->
<image class="img" :src="item.shopLogo" mode="aspectFill" />
<image class="img" :src="item.shopLogo" mode="scaleToFill" />
<text class="one">{{ item.shopName }}</text>
<view class="price">
<text class="two">{{ item.grade }}推荐</text>
......@@ -273,7 +276,7 @@ const toSearch = (res) => {
// 获取优惠券
const getCouponMainList = () => {
couponMainList().then((res) => {
coupon.value = res.data.records.slice(0, 10);
coupon.value = res.data.records.slice(0, 4);
});
};
// 领取优惠券
......@@ -281,19 +284,27 @@ const receive = (data) => {
if (data.couponType === 'mch' && data.numState === 0) {
receiveCoupon([data.couponYzfId]).then((res) => {
data.numState = 1;
xma.showToast({
title: '领取成功!',
icon: 'none',
xma.navigateTo({
url: `/pages/ticket/detail?shopId=${data.activityCode}`,
});
});
} else if (data.couponType === 'mch' && data.numState === 1) {
xma.navigateTo({
url: `/pages/ticket/detail?shopId=${data.activityCode}`,
});
} else if (data.couponType === 'yzf') {
xma.showToast({
title: '请前往或下载翼支付APP领取或使用',
icon: 'none',
});
}
};
// TO优惠券详情
const toCoupon = () => {
xma.navigateTo({
url: '/pages/index/coupon',
});
};
// const toCoupon = () => {
// xma.navigateTo({
// url: '/pages/index/coupon',
// });
// };
// 获取分类
const getClassification = () => {
groupBuyList().then((res) => {
......@@ -654,7 +665,7 @@ page {
.title {
font-family: YouSheBiaoTiHei, YouSheBiaoTiHei;
font-weight: bold;
font-size: 28rpx;
font-size: 26rpx;
color: #3d3d3d;
line-height: 28rpx;
text-shadow: 2px 2px 0px rgba(255, 255, 255, 0.36);
......@@ -664,9 +675,9 @@ page {
.box-red {
padding: 10rpx 0 0 20rpx;
box-sizing: border-box;
white-space: nowrap;
width: 80%;
z-index: -1;
width: 100%;
display: flex;
justify-content: space-evenly;
.redBagBox {
margin-right: 8rpx;
width: 124rpx;
......@@ -687,7 +698,7 @@ page {
align-items: center;
justify-content: center;
.textO {
width: 124rpx;
width: 100rpx;
font-size: 12rpx;
color: #fa5151;
text-align: center;
......
......@@ -497,7 +497,6 @@ function getLocationFn() {
isHighAccuracy: true,
success: function (res) {
// 经纬度
console.log('res.latitude, res.longitude', res.latitude, res.longitude);
resolve({ lat: res.latitude, lon: res.longitude });
},
fail: function (err) {
......@@ -552,6 +551,7 @@ const getStoreInformationFn = (id) => {
if (res.data.shop.labels && res.data.shop.labels !== '') {
shopInfo.value.tagList = res.data.shop.labels.split(',');
}
shopSwiperList.value.push(imgUrl + res.data.shop.shopLogo);
const { lat, lon } = res.data.shop.location;
shopLocation.value.lat = lat;
shopLocation.value.lon = lon;
......@@ -915,8 +915,9 @@ page {
}
}
.shop-business-hours {
white-space: nowrap;
texe {
font-size: 8 * 2rpx;
font-size: 11 * 2rpx;
color: #767676;
}
}
......
......@@ -161,6 +161,9 @@
label-width="100px"
v-model="formData.intro"
prop="intro"
auto-height
show-word-limit
:maxlength="120"
/>
<wd-button type="error" width="80%" class="submitBTN" @tap="submitData">提交</wd-button>
......
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