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