Commit c038ddc7 authored by 彭佳妮(贵阳日报)'s avatar 彭佳妮(贵阳日报)
parents f7898e5e 7626514e
...@@ -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'
...@@ -159,6 +159,7 @@ const topFoodDetails = (id) => { ...@@ -159,6 +159,7 @@ const topFoodDetails = (id) => {
margin-top: 10rpx; margin-top: 10rpx;
display: flex; display: flex;
align-items: center; align-items: center;
flex-wrap: wrap;
view { view {
margin-right: 8rpx; margin-right: 8rpx;
display: inline-block; display: inline-block;
...@@ -168,6 +169,8 @@ const topFoodDetails = (id) => { ...@@ -168,6 +169,8 @@ const topFoodDetails = (id) => {
font-size: 18rpx; font-size: 18rpx;
color: #767676; color: #767676;
background: linear-gradient(90deg, #fcdbdb 0%, rgba(255, 255, 255, 0) 98%); 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) => { ...@@ -258,7 +258,7 @@ const choice = (index, item) => {
// 跳转预售 // 跳转预售
const toPresale = () => { const toPresale = () => {
xma.navigateTo({ xma.navigateTo({
url: `/pages/assistingAgriculture/index/presale?categoryId=3273`, url: `/pages/assistingAgriculture/index/presale?categoryId=9`,
}); });
}; };
// 处理content // 处理content
...@@ -290,10 +290,6 @@ function toCart() { ...@@ -290,10 +290,6 @@ function toCart() {
page { page {
background: #f3f3f3; background: #f3f3f3;
} }
.container {
position: relative;
left: 0rpx;
}
.top { .top {
width: 750rpx; width: 750rpx;
height: 128rpx; height: 128rpx;
......
...@@ -34,18 +34,23 @@ ...@@ -34,18 +34,23 @@
height="220" height="220"
imageMode="aspectFill" imageMode="aspectFill"
></wd-swiper> ></wd-swiper>
<view class="env">
<text class="env-info">贵阳市农业农村局 贵阳日报传媒集团联合打造</text>
</view>
</view> </view>
<view class="sort"> <view class="sort">
<view style="display: flex; flex-direction: row"> <view style="display: flex; flex-direction: row">
<view <scroll-view class="box-red" scroll-x="true" @scroll="scroll">
class="borderClass" <view
@click="toBuilding(item)" class="borderClass"
v-for="(item, index) in sortList" @click="toBuilding(item)"
:key="index" 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> <image mode="aspectFill" :src="item.icon" style="width: 96rpx; height: 96rpx" />
</view> <view class="sort-text">{{ item.categoryName }}</view>
</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="(item, index) in list" :key="index">
...@@ -109,7 +114,7 @@ const getList = () => { ...@@ -109,7 +114,7 @@ const getList = () => {
res.data.forEach((item) => { res.data.forEach((item) => {
item.icon = import.meta.env.VITE_APP_IMG_URL + item.pic; 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) => { ...@@ -145,12 +150,12 @@ const onChange = (e) => {
// console.log(e); // console.log(e);
}; };
const toBuilding = (item) => { const toBuilding = (item) => {
if (item.categoryName === '筑农严选') { if (item.categoryId === '10') {
// 跳转到筑农严选 // 跳转到筑农严选
xma.navigateTo({ xma.navigateTo({
url: `/pages/assistingAgriculture/index/building?categoryId=${item.categoryId}`, url: `/pages/assistingAgriculture/index/building?categoryId=${item.categoryId}`,
}); });
} else if (item.categoryName === '乡村旅居') { } else if (item.categoryId === '8') {
// 跳转到乡村旅居 // 跳转到乡村旅居
xma.navigateTo({ xma.navigateTo({
url: `/pages/assistingAgriculture/RuralTravel/RuralTravel?categoryId=${item.categoryId}`, url: `/pages/assistingAgriculture/RuralTravel/RuralTravel?categoryId=${item.categoryId}`,
...@@ -205,11 +210,23 @@ page { ...@@ -205,11 +210,23 @@ page {
height: 186rpx; height: 186rpx;
background: linear-gradient(180deg, #82ce8b -39%, #ffffff 36%); 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 { .borderClass {
width: 96rpx; width: 96rpx;
height: 96rpx; height: 96rpx;
margin-left: 75rpx; margin: 0 36rpx;
margin-top: 22rpx; margin-top: 22rpx;
display: inline-block;
} }
.sort-text { .sort-text {
font-size: 24rpx; font-size: 24rpx;
...@@ -315,4 +332,17 @@ page { ...@@ -315,4 +332,17 @@ page {
color: #ffffff; 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> </style>
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
<view style="display: flex; flex-direction: row"> <view style="display: flex; flex-direction: row">
<view <view
class="borderClass" class="borderClass"
@tap="chooseTab(index, item.categoryId)" @tap="chooseBTab(index, item.categoryId)"
v-for="(item, index) in sortList" v-for="(item, index) in sortList"
:key="index" :key="index"
> >
...@@ -45,19 +45,19 @@ ...@@ -45,19 +45,19 @@
</view> </view>
</view> </view>
<view> <view>
<view> <!-- <view>-->
<scroll-view class="tabs" show-scrollbar="false" scroll-x :scroll-with-animation="true"> <!-- <scroll-view class="tabs" show-scrollbar="false" scroll-x :scroll-with-animation="true">-->
<text <!-- <text-->
@tap="chooseBTab(index, item.categoryId)" <!-- @tap="chooseBTab(index, item.categoryId)"-->
v-for="(item, index) in tabsData" <!-- v-for="(item, index) in tabsData"-->
:key="index" <!-- :key="index"-->
class="text" <!-- class="text"-->
:class="light === index ? 'light' : ''" <!-- :class="light === index ? 'light' : ''"-->
> <!-- >-->
{{ item.categoryName }} <!-- {{ item.categoryName }}-->
</text> <!-- </text>-->
</scroll-view> <!-- </scroll-view>-->
</view> <!-- </view>-->
<view class="tab-list" v-for="(item, index) in buyList" :key="index" @tap="toDetail(item)"> <view class="tab-list" v-for="(item, index) in buyList" :key="index" @tap="toDetail(item)">
<img <img
class="buy-list" class="buy-list"
...@@ -163,6 +163,7 @@ onMounted(async () => { ...@@ -163,6 +163,7 @@ onMounted(async () => {
getPresale(); getPresale();
presaleSortList(); presaleSortList();
getshoppingCartListFn(); getshoppingCartListFn();
chooseBTab(0, '3444');
}); });
// 搜索 // 搜索
const toSearch = () => { const toSearch = () => {
...@@ -224,7 +225,7 @@ const chooseBTab = (index, categoryId) => { ...@@ -224,7 +225,7 @@ const chooseBTab = (index, categoryId) => {
}); });
buyList.value = res.data.records; buyList.value = res.data.records;
}); });
light.value = index; // light.value = index;
}; };
// 筑农首页-分类查询商品列表 // 筑农首页-分类查询商品列表
......
...@@ -7,40 +7,40 @@ ...@@ -7,40 +7,40 @@
:title="title" :title="title"
:showTitle="true" :showTitle="true"
></search> ></search>
<view class="head"> <!-- <view class="head"> -->
<view class="top" :style="{ backgroundImage: topBg }"></view> <view class="top" :style="{ backgroundImage: topBg }"></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 }">全部烧烤烤肉</text> <text :class="{ rotate: rotate }">全部烧烤烤肉</text>
<wd-icon <wd-icon
:class="{ rotate: rotate }" :class="{ rotate: rotate }"
name="fill-arrow-down" name="fill-arrow-down"
size="24rpx" size="24rpx"
class="icon" class="icon"
></wd-icon> ></wd-icon>
</view> </view>
<view class="option" @tap="locationFiltering(1)"> <view class="option" @tap="locationFiltering(1)">
<text :class="{ rotate: rotate2 }">附近</text> <text :class="{ rotate: rotate2 }">附近</text>
<wd-icon <wd-icon
:class="{ rotate: rotate2 }" :class="{ rotate: rotate2 }"
name="fill-arrow-down" name="fill-arrow-down"
size="24rpx" size="24rpx"
class="icon" class="icon"
></wd-icon> ></wd-icon>
</view> </view>
<view class="option" @tap="locationFiltering(2)"> <view class="option" @tap="locationFiltering(2)">
<text :class="{ rotate: rotate3 }">智能排序</text> <text :class="{ rotate: rotate3 }">智能排序</text>
<wd-icon <wd-icon
:class="{ rotate: rotate3 }" :class="{ rotate: rotate3 }"
name="fill-arrow-down" name="fill-arrow-down"
size="24rpx" size="24rpx"
class="icon" class="icon"
></wd-icon> ></wd-icon>
</view>
</view> </view>
<!-- 标签 --> </view>
<!-- <view class="bootom-bottom"> <!-- 标签 -->
<!-- <view class="bootom-bottom">
<view <view
@tap="choice(index)" @tap="choice(index)"
class="item" class="item"
...@@ -51,20 +51,20 @@ ...@@ -51,20 +51,20 @@
{{ item }} {{ item }}
</view> </view>
</view> --> </view> -->
<!-- 美食类别 --> <!-- 美食类别 -->
<Classification v-show="rotate" :category="categoryData" @foodCategory="foodCategory" /> <Classification v-show="rotate" :category="categoryData" @foodCategory="foodCategory" />
<!-- 附近筛选 --> <!-- 附近筛选 -->
<Position <Position
v-show="rotate2" v-show="rotate2"
@nearby="nearby" @nearby="nearby"
@popular="popular" @popular="popular"
@region="region" @region="region"
@refresh="refresh" @refresh="refresh"
/> />
<!-- 排序筛选 --> <!-- 排序筛选 -->
<Sort v-show="rotate3" @sortParams="sortParams" /> <Sort v-show="rotate3" @sortParams="sortParams" />
</view>
</view> </view>
<!-- </view> -->
<FoodDetails :cardData="cardData" /> <FoodDetails :cardData="cardData" />
<wd-status-tip image="content" tip="暂无内容" v-if="cardData.length === 0" /> <wd-status-tip image="content" tip="暂无内容" v-if="cardData.length === 0" />
<view <view
...@@ -98,6 +98,7 @@ const cardData = ref([]); ...@@ -98,6 +98,7 @@ const cardData = ref([]);
const backgroundBox = ref(''); const backgroundBox = ref('');
const backIcon = ref('white'); const backIcon = ref('white');
const title = ref(''); const title = ref('');
const top = ref(null);
let total; let total;
const paramsId = { const paramsId = {
parentId: null, parentId: null,
...@@ -116,11 +117,20 @@ onLoad((options) => { ...@@ -116,11 +117,20 @@ onLoad((options) => {
const { categoryId, place } = options; const { categoryId, place } = options;
paramsId.parentId = categoryId; paramsId.parentId = categoryId;
getByParentIdData(); getByParentIdData();
getTop();
getByType({ place }).then((res) => { getByType({ place }).then((res) => {
topBg.value = `url(${import.meta.env.VITE_APP_IMG_URL + res.data[0].imgUrl})`; 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 = () => { const refresh = () => {
delete listParams.distance; delete listParams.distance;
delete listParams.area; delete listParams.area;
...@@ -272,75 +282,78 @@ onPullDownRefresh(() => { ...@@ -272,75 +282,78 @@ onPullDownRefresh(() => {
page { page {
background: #f3f3f3; background: #f3f3f3;
} }
.head { // .head {
width: 100%; // width: 100%;
margin-bottom: 10rpx; // margin-bottom: 10rpx;
// height: 480rpx; // height: 480rpx;
.top { .top {
height: 356rpx; height: 356rpx;
// background: url('../../static/index/taste.png'); // background: url('../../static/index/taste.png');
background-size: 100% 100%; background-size: 100% 100%;
.icon { .icon {
font-size: 28rpx; font-size: 28rpx;
margin-top: 70rpx; margin-top: 70rpx;
margin-left: 40rpx; margin-left: 40rpx;
color: white; color: white;
}
} }
.bootom { }
// height: 124rpx; .bootom {
height: 80rpx; // 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; display: flex;
flex-direction: column; align-items: center;
justify-content: space-around; padding: 0 20rpx;
border-radius: 6rpx; justify-content: space-between;
background: #ffffff; .option {
position: relative; text {
.bootom-top { font-size: 24rpx;
display: flex; color: #343434;
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;
}
} }
} .red {
.bootom-bottom { color: #fa5151;
display: flex; }
align-items: center; .icon {
padding-left: 40rpx; color: #d8d8d8;
.item { transform: rotate(-180deg);
height: 36rpx; transition: all 0.3s linear;
width: 96rpx;
border-radius: 6rpx;
font-size: 20rpx;
text-align: center;
line-height: 36rpx;
color: #abaaaa;
background: #eeeeee;
margin-right: 20rpx;
} }
.light { .rotate {
color: #ff7c00; transform: rotate(0deg);
background: #ffdcbb; 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> </style>
...@@ -10,8 +10,8 @@ import { getTokenUser } from '../../api/index'; ...@@ -10,8 +10,8 @@ import { getTokenUser } from '../../api/index';
import { getToken } from '../../utils/auth'; import { getToken } from '../../utils/auth';
onLoad(async (options) => { onLoad(async (options) => {
// await signIn(); await signIn();
if (!getToken()) await signIn2(); // if (!getToken()) await signIn2();
const { type } = options; const { type } = options;
switch (type) { switch (type) {
case '0': case '0':
...@@ -21,11 +21,11 @@ onLoad(async (options) => { ...@@ -21,11 +21,11 @@ onLoad(async (options) => {
xma.reLaunch({ url: '/pages/index/index' }); xma.reLaunch({ url: '/pages/index/index' });
break; break;
case '2': case '2':
xma.reLaunch({ url: '/pages/assistingAgriculture/RuralTravel/RuralTravel?categoryId=3268' }); xma.reLaunch({ url: '/pages/assistingAgriculture/RuralTravel/RuralTravel?categoryId=8' });
break; break;
case '3': case '3':
xma.reLaunch({ xma.reLaunch({
url: '/pages/assistingAgriculture/index/building?categoryId=3266', url: '/pages/assistingAgriculture/index/building?categoryId=10',
}); });
break; break;
default: default:
......
...@@ -161,9 +161,9 @@ ...@@ -161,9 +161,9 @@
label-width="100px" label-width="100px"
v-model="formData.intro" v-model="formData.intro"
prop="intro" prop="intro"
auto-height auto-height
show-word-limit show-word-limit
:maxlength="120" :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>
......
...@@ -41,8 +41,8 @@ export default defineConfig({ ...@@ -41,8 +41,8 @@ export default defineConfig({
// 代理配置 // 代理配置
proxy: { proxy: {
'/api': { '/api': {
// target: 'http://test.rhhzkj.com:8080', target: 'http://test.rhhzkj.com:8080',
target: 'https://api.rddyz.com', // target: 'https://api.rddyz.com',
changeOrigin: true, changeOrigin: true,
rewrite: (path) => path.replace(/^\/api/, ''), 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