Commit 985f8f73 authored by 石建新(贵阳日报)'s avatar 石建新(贵阳日报)
parents 35b4040b ace70b4e
......@@ -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">
......@@ -159,6 +159,7 @@ const topFoodDetails = (id) => {
margin-top: 10rpx;
display: flex;
align-items: center;
flex-wrap: wrap;
view {
margin-right: 8rpx;
display: inline-block;
......@@ -168,6 +169,8 @@ const topFoodDetails = (id) => {
font-size: 18rpx;
color: #767676;
background: linear-gradient(90deg, #fcdbdb 0%, rgba(255, 255, 255, 0) 98%);
margin-bottom: 5rpx;
flex-shrink: 0;
}
}
}
......
......@@ -258,7 +258,7 @@ const choice = (index, item) => {
// 跳转预售
const toPresale = () => {
xma.navigateTo({
url: `/pages/assistingAgriculture/index/presale?categoryId=3273`,
url: `/pages/assistingAgriculture/index/presale?categoryId=9`,
});
};
// 处理content
......@@ -290,10 +290,6 @@ function toCart() {
page {
background: #f3f3f3;
}
.container {
position: relative;
left: 0rpx;
}
.top {
width: 750rpx;
height: 128rpx;
......
......@@ -34,18 +34,23 @@
height="220"
imageMode="aspectFill"
></wd-swiper>
<view class="env">
<text class="env-info">贵阳市农业农村局 贵阳日报传媒集团联合打造</text>
</view>
</view>
<view class="sort">
<view style="display: flex; flex-direction: row">
<view
class="borderClass"
@click="toBuilding(item)"
v-for="(item, index) in sortList"
:key="index"
>
<image mode="aspectFill" :src="item.icon" style="width: 96rpx; height: 96rpx" />
<view class="sort-text">{{ item.categoryName }}</view>
</view>
<scroll-view class="box-red" scroll-x="true" @scroll="scroll">
<view
class="borderClass"
@click="toBuilding(item)"
v-for="(item, index) in sortList"
:key="index"
>
<image mode="aspectFill" :src="item.icon" style="width: 96rpx; height: 96rpx" />
<view class="sort-text">{{ item.categoryName }}</view>
</view>
</scroll-view>
</view>
</view>
<view class="product-page" v-for="(item, index) in list" :key="index">
......@@ -109,7 +114,7 @@ const getList = () => {
res.data.forEach((item) => {
item.icon = import.meta.env.VITE_APP_IMG_URL + item.pic;
});
sortList.value = res.data.splice(0, 4);
sortList.value = res.data;
});
};
// 筑农严选首页-分类预售商品列表
......@@ -145,12 +150,12 @@ const onChange = (e) => {
// console.log(e);
};
const toBuilding = (item) => {
if (item.categoryName === '筑农严选') {
if (item.categoryId === '10') {
// 跳转到筑农严选
xma.navigateTo({
url: `/pages/assistingAgriculture/index/building?categoryId=${item.categoryId}`,
});
} else if (item.categoryName === '乡村旅居') {
} else if (item.categoryId === '8') {
// 跳转到乡村旅居
xma.navigateTo({
url: `/pages/assistingAgriculture/RuralTravel/RuralTravel?categoryId=${item.categoryId}`,
......@@ -205,11 +210,23 @@ page {
height: 186rpx;
background: linear-gradient(180deg, #82ce8b -39%, #ffffff 36%);
}
.box-red {
white-space: nowrap;
width: 100%;
::-webkit-scrollbar {
display: none;
width: 0;
height: 0;
color: transparent;
}
background-color: transparent;
}
.borderClass {
width: 96rpx;
height: 96rpx;
margin-left: 75rpx;
margin: 0 36rpx;
margin-top: 22rpx;
display: inline-block;
}
.sort-text {
font-size: 24rpx;
......@@ -315,4 +332,17 @@ page {
color: #ffffff;
}
}
.env {
width: 750rpx;
height: 48rpx;
background: linear-gradient(94deg, #82ce8b 0%, rgba(255, 255, 255, 0) 97%);
position: absolute;
margin-top: -60rpx;
z-index: 999;
.env-info {
font-size: 28rpx;
color: #ffffff;
margin-left: 20rpx;
}
}
</style>
......@@ -35,7 +35,7 @@
<view style="display: flex; flex-direction: row">
<view
class="borderClass"
@tap="chooseTab(index, item.categoryId)"
@tap="chooseBTab(index, item.categoryId)"
v-for="(item, index) in sortList"
:key="index"
>
......@@ -45,19 +45,19 @@
</view>
</view>
<view>
<view>
<scroll-view class="tabs" show-scrollbar="false" scroll-x :scroll-with-animation="true">
<text
@tap="chooseBTab(index, item.categoryId)"
v-for="(item, index) in tabsData"
:key="index"
class="text"
:class="light === index ? 'light' : ''"
>
{{ item.categoryName }}
</text>
</scroll-view>
</view>
<!-- <view>-->
<!-- <scroll-view class="tabs" show-scrollbar="false" scroll-x :scroll-with-animation="true">-->
<!-- <text-->
<!-- @tap="chooseBTab(index, item.categoryId)"-->
<!-- v-for="(item, index) in tabsData"-->
<!-- :key="index"-->
<!-- class="text"-->
<!-- :class="light === index ? 'light' : ''"-->
<!-- >-->
<!-- {{ item.categoryName }}-->
<!-- </text>-->
<!-- </scroll-view>-->
<!-- </view>-->
<view class="tab-list" v-for="(item, index) in buyList" :key="index" @tap="toDetail(item)">
<img
class="buy-list"
......@@ -163,6 +163,7 @@ onMounted(async () => {
getPresale();
presaleSortList();
getshoppingCartListFn();
chooseBTab(0, '3444');
});
// 搜索
const toSearch = () => {
......@@ -224,7 +225,7 @@ const chooseBTab = (index, categoryId) => {
});
buyList.value = res.data.records;
});
light.value = index;
// light.value = index;
};
// 筑农首页-分类查询商品列表
......
......@@ -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> -->
......@@ -65,7 +68,7 @@
@change="onChange"
customClass="guiyang"
height="136rpx"
imageMode="aspectFit"
imageMode="scaleToFill"
></wd-swiper>
<!-- 附近人气美食 -->
<view class="nearby">
......@@ -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;
......
......@@ -7,40 +7,40 @@
:title="title"
:showTitle="true"
></search>
<view class="head">
<view class="top" :style="{ backgroundImage: topBg }"></view>
<view class="bootom">
<view class="bootom-top">
<view class="option" @tap="locationFiltering(0)">
<text :class="{ rotate: rotate }">全部烧烤烤肉</text>
<wd-icon
:class="{ rotate: rotate }"
name="fill-arrow-down"
size="24rpx"
class="icon"
></wd-icon>
</view>
<view class="option" @tap="locationFiltering(1)">
<text :class="{ rotate: rotate2 }">附近</text>
<wd-icon
:class="{ rotate: rotate2 }"
name="fill-arrow-down"
size="24rpx"
class="icon"
></wd-icon>
</view>
<view class="option" @tap="locationFiltering(2)">
<text :class="{ rotate: rotate3 }">智能排序</text>
<wd-icon
:class="{ rotate: rotate3 }"
name="fill-arrow-down"
size="24rpx"
class="icon"
></wd-icon>
</view>
<!-- <view class="head"> -->
<view class="top" :style="{ backgroundImage: topBg }"></view>
<view class="bootom" :style="{ top }">
<view class="bootom-top">
<view class="option" @tap="locationFiltering(0)">
<text :class="{ rotate: rotate }">全部烧烤烤肉</text>
<wd-icon
:class="{ rotate: rotate }"
name="fill-arrow-down"
size="24rpx"
class="icon"
></wd-icon>
</view>
<view class="option" @tap="locationFiltering(1)">
<text :class="{ rotate: rotate2 }">附近</text>
<wd-icon
:class="{ rotate: rotate2 }"
name="fill-arrow-down"
size="24rpx"
class="icon"
></wd-icon>
</view>
<view class="option" @tap="locationFiltering(2)">
<text :class="{ rotate: rotate3 }">智能排序</text>
<wd-icon
:class="{ rotate: rotate3 }"
name="fill-arrow-down"
size="24rpx"
class="icon"
></wd-icon>
</view>
<!-- 标签 -->
<!-- <view class="bootom-bottom">
</view>
<!-- 标签 -->
<!-- <view class="bootom-bottom">
<view
@tap="choice(index)"
class="item"
......@@ -51,20 +51,20 @@
{{ item }}
</view>
</view> -->
<!-- 美食类别 -->
<Classification v-show="rotate" :category="categoryData" @foodCategory="foodCategory" />
<!-- 附近筛选 -->
<Position
v-show="rotate2"
@nearby="nearby"
@popular="popular"
@region="region"
@refresh="refresh"
/>
<!-- 排序筛选 -->
<Sort v-show="rotate3" @sortParams="sortParams" />
</view>
<!-- 美食类别 -->
<Classification v-show="rotate" :category="categoryData" @foodCategory="foodCategory" />
<!-- 附近筛选 -->
<Position
v-show="rotate2"
@nearby="nearby"
@popular="popular"
@region="region"
@refresh="refresh"
/>
<!-- 排序筛选 -->
<Sort v-show="rotate3" @sortParams="sortParams" />
</view>
<!-- </view> -->
<FoodDetails :cardData="cardData" />
<wd-status-tip image="content" tip="暂无内容" v-if="cardData.length === 0" />
<view
......@@ -98,6 +98,7 @@ const cardData = ref([]);
const backgroundBox = ref('');
const backIcon = ref('white');
const title = ref('');
const top = ref(null);
let total;
const paramsId = {
parentId: null,
......@@ -116,11 +117,20 @@ onLoad((options) => {
const { categoryId, place } = options;
paramsId.parentId = categoryId;
getByParentIdData();
getTop();
getByType({ place }).then((res) => {
topBg.value = `url(${import.meta.env.VITE_APP_IMG_URL + res.data[0].imgUrl})`;
});
});
// 获取位置板块贴合高度
const getTop = () => {
xma.xh.getMenuButtonBoundingClientRect({
success(res) {
top.value = (res.top + res.bottom) / 2 + 25 + 'px';
},
});
};
const refresh = () => {
delete listParams.distance;
delete listParams.area;
......@@ -272,75 +282,78 @@ onPullDownRefresh(() => {
page {
background: #f3f3f3;
}
.head {
width: 100%;
margin-bottom: 10rpx;
// height: 480rpx;
.top {
height: 356rpx;
// background: url('../../static/index/taste.png');
background-size: 100% 100%;
.icon {
font-size: 28rpx;
margin-top: 70rpx;
margin-left: 40rpx;
color: white;
}
// .head {
// width: 100%;
// margin-bottom: 10rpx;
// height: 480rpx;
.top {
height: 356rpx;
// background: url('../../static/index/taste.png');
background-size: 100% 100%;
.icon {
font-size: 28rpx;
margin-top: 70rpx;
margin-left: 40rpx;
color: white;
}
.bootom {
// height: 124rpx;
height: 80rpx;
}
.bootom {
// height: 124rpx;
height: 80rpx;
display: flex;
flex-direction: column;
justify-content: space-around;
border-radius: 6rpx;
background: #ffffff;
position: sticky;
margin-bottom: 10rpx;
z-index: 9999;
// top: 100px;
.bootom-top {
display: flex;
flex-direction: column;
justify-content: space-around;
border-radius: 6rpx;
background: #ffffff;
position: relative;
.bootom-top {
display: flex;
align-items: center;
padding: 0 20rpx;
justify-content: space-between;
.option {
text {
font-size: 24rpx;
color: #343434;
}
.red {
color: #fa5151;
}
.icon {
color: #d8d8d8;
transform: rotate(-180deg);
transition: all 0.3s linear;
}
.rotate {
transform: rotate(0deg);
transition: all 0.3s linear;
color: #fa5151;
}
align-items: center;
padding: 0 20rpx;
justify-content: space-between;
.option {
text {
font-size: 24rpx;
color: #343434;
}
}
.bootom-bottom {
display: flex;
align-items: center;
padding-left: 40rpx;
.item {
height: 36rpx;
width: 96rpx;
border-radius: 6rpx;
font-size: 20rpx;
text-align: center;
line-height: 36rpx;
color: #abaaaa;
background: #eeeeee;
margin-right: 20rpx;
.red {
color: #fa5151;
}
.icon {
color: #d8d8d8;
transform: rotate(-180deg);
transition: all 0.3s linear;
}
.light {
color: #ff7c00;
background: #ffdcbb;
.rotate {
transform: rotate(0deg);
transition: all 0.3s linear;
color: #fa5151;
}
}
}
.bootom-bottom {
display: flex;
align-items: center;
padding-left: 40rpx;
.item {
height: 36rpx;
width: 96rpx;
border-radius: 6rpx;
font-size: 20rpx;
text-align: center;
line-height: 36rpx;
color: #abaaaa;
background: #eeeeee;
margin-right: 20rpx;
}
.light {
color: #ff7c00;
background: #ffdcbb;
}
}
}
// }
</style>
......@@ -10,8 +10,8 @@ import { getTokenUser } from '../../api/index';
import { getToken } from '../../utils/auth';
onLoad(async (options) => {
// await signIn();
if (!getToken()) await signIn2();
await signIn();
// if (!getToken()) await signIn2();
const { type } = options;
switch (type) {
case '0':
......@@ -21,11 +21,11 @@ onLoad(async (options) => {
xma.reLaunch({ url: '/pages/index/index' });
break;
case '2':
xma.reLaunch({ url: '/pages/assistingAgriculture/RuralTravel/RuralTravel?categoryId=3268' });
xma.reLaunch({ url: '/pages/assistingAgriculture/RuralTravel/RuralTravel?categoryId=8' });
break;
case '3':
xma.reLaunch({
url: '/pages/assistingAgriculture/index/building?categoryId=3266',
url: '/pages/assistingAgriculture/index/building?categoryId=10',
});
break;
default:
......
......@@ -408,10 +408,27 @@ const handleRefund = (item) => {
});
};
/**
* 再来一单 商品类型,0-普通商品,5-团购,6-套餐,7-预售,8-售券 9-景点,10-旅游路线
*/
const anotherOrder = () => {
xma.navigateTo({
url: `/pages/shop/confirmOrder?prodId=${orderDetail.value.orderItems[0].prodId}&skuId=${orderDetail.value.orderItems[0].skuId}`,
});
// xma.navigateTo({
// url: `/pages/shop/confirmOrder?prodId=${orderDetail.value.orderItems[0].prodId}&skuId=${orderDetail.value.orderItems[0].skuId}`,
// });
switch (orderDetail.value.baseOrder.prodType) {
case 5:
xma.navigateTo({
url: `/pages/packageDetails/packageDetails?prodId=${orderDetail.value.orderItems[0].prodId}`,
});
break;
case 10:
xma.navigateTo({
url: `/pages/assistingAgriculture/RouteDetails/RouteDetails?prodId=${orderDetail.value.orderItems[0].prodId}&shopId=${orderDetail.value.baseOrder.shopId}`,
});
break;
default:
break;
}
};
const toProdDetail = () => {
......
......@@ -196,8 +196,8 @@ const fileDomain = import.meta.env.VITE_APP_IMG_URL;
const stateList = ref({});
const orderDic = ref();
onLoad(async (options) => {
// await signIn();
if (!getToken()) await signIn2();
await signIn();
// if (!getToken()) await signIn2();
if (!getOrderDic()) await orderStatus();
orderDic.value = getOrderDic();
orderDic.value.baseOrder[0].value = 'all';
......
......@@ -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>
......
......@@ -131,8 +131,8 @@ const fileDomain = import.meta.env.VITE_APP_IMG_URL;
const contentHeight = ref('88rpx');
onLoad(async () => {
// await signIn();
if (!getToken()) await signIn2();
await signIn();
// if (!getToken()) await signIn2();
xma.xh.getMenuButtonBoundingClientRect({
success(res) {
contentHeight.value = res.bottom * 2 + 10 + 'rpx'; // 左边界坐标,单位:px
......
......@@ -41,8 +41,8 @@ export default defineConfig({
// 代理配置
proxy: {
'/api': {
// target: 'http://test.rhhzkj.com:8080',
target: 'https://api.rddyz.com',
target: 'http://test.rhhzkj.com:8080',
// target: 'https://api.rddyz.com',
changeOrigin: true,
rewrite: (path) => path.replace(/^\/api/, ''),
},
......
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